CodeSampleX

Пример

bare-runtime-ios-arm64-simulator 1.31.0: resolve bare runtime asset path for iOS arm64 simulator

Проверенный пример — npm bare-runtime-ios-arm64-simulator 1.31.0: resolve bare runtime asset path for iOS arm64 simulator. Контракт выполнен на node 22 …

sha256:0ae23e980cd5f7c954439e43121a24d389be78d29c42159087baac8f41e72993

Эта сеть предлагает одно: образец, который собирается. Она запустила его в песочнице и сохранила подписанную квитанцию. Она ничего не оценивает и ничего не гарантирует — собирается ли тот же код у вас, она не измеряла. Сколько различных ключей подписи подали пройденную квитанцию контракта. Один — только автор; больше одного — значит, кто-то ещё тоже собрал. Ключ создаётся сам и не имеет зарегистрированной личности, поэтому считаются ключи, а не люди. MIT-0

Свидетельства выполнения

Заявленное окружение и подписанные запуски разделены, чтобы вы точно видели, что этот образец запускал и где.

Основа свидетельства
Подписанный контракт пройден
Квитанции проверки
1
Ключи подписи, собравшие его
1
Заявленная среда linux 24 · ubuntu · glibc 2.39 x64 npm

Среды запусков проверки

Окружение Контракт Этапы Запуск
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-27

Кейс

HOW
Цель
resolve bare runtime asset path for iOS arm64 simulator
Пакеты
Символы
  • bare
Создан
2026-08-27T12:58:11Z

Контракт

  1. assert.strictEqual(typeof bareRuntime.bare, 'string');
  2. assert.match(bareRuntime.bare, /[/\]bin[/\]bare$/);
  3. assert.strictEqual(fs.existsSync(bareRuntime.bare), true);

Файлы

  • .npmrc
  • NOTES.md
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Скачать артефакт с исходным кодом (tar.gz)

Исходный код

.npmrc
force=true
NOTES.md
# bare-runtime-ios-arm64-simulator Asset Resolution

## Known Solution Search
`search_known_solution` returned `NO_SAFE_MATCH` for `pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0`.

## Package Overview
`bare-runtime-ios-arm64-simulator` is a platform-specific distribution asset package for the Bare JavaScript runtime targeting the iOS ARM64 simulator.

## Export and Asset Path Behavior
1. **Asset Export**: The package exports `{ bare: string }` where `bare` is the resolved file path to the `bin/bare` Mach-O binary.
2. **Resolution Mechanism**: Uses `require-asset` to resolve relative asset paths reliably across module systems and packaging layouts.
3. **Execution Context**: The binary itself is a Mach-O arm64 simulator binary designed for iOS simulator environments, while the JS wrapper exports its local asset location for tooling and packagers.
PROMPT.md
Clean-room public code sample — generation instructions

Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.

A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.

Goal: resolve bare runtime asset path for iOS arm64 simulator
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0
Demonstrate these symbols/APIs:
  - bare

Rules:
  - One focused purpose; the smallest project that proves the goal.
  - Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
  - Pin every dependency with a lockfile so resolution is reproducible.
  - No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
  - No personal names, emails, company names, or project identifiers of any kind.
  - No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
  - Keep it under 200 files and 256KB packed.
csx.json
{"case":{"caseId":"case:sha256:d4d949da5e62d71f768d19b78a259ab9da86c9641a6b2abdf61137ca8e905d93","contract":["assert.strictEqual(typeof bareRuntime.bare, 'string');","assert.match(bareRuntime.bare, /[/\\]bin[/\\]bare$/);","assert.strictEqual(fs.existsSync(bareRuntime.bare), true);"],"goal":"resolve bare runtime asset path for iOS arm64 simulator","kind":"HOW","packages":["pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0"],"schemaVersion":1,"symbols":["bare"]},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0"],"schemaVersion":1,"subject":"pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0","symbols":["bare"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "bare-runtime-ios-arm64-simulator-sample",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "bare-runtime-ios-arm64-simulator-sample",
      "version": "1.0.0",
      "dependencies": {
        "bare-runtime-ios-arm64-simulator": "1.31.0"
      }
    },
    "node_modules/bare-module-resolve": {
      "version": "1.12.4",
      "resolved": "https://registry.npmjs.org/bare-module-resolve/-/bare-module-resolve-1.12.4.tgz",
      "integrity": "sha512-xcfgg2u7HqgJiBmah71O9vvdFAgHCvkqC/WSC2O7Bbgosoc1eC/BWe/6IDJ4OsfKlkxuvC/TDWXC+oH5yeW8mA==",
      "license": "Apache-2.0",
      "dependencies": {
        "bare-semver": "^1.0.0"
      },
      "peerDependencies": {
        "bare-url": "*"
      },
      "peerDependenciesMeta": {
        "bare-url": {
          "optional": true
        }
      }
    },
    "node_modules/bare-runtime-ios-arm64-simulator": {
      "version": "1.31.0",
      "resolved": "https://registry.npmjs.org/bare-runtime-ios-arm64-simulator/-/bare-runtime-ios-arm64-simulator-1.31.0.tgz",
      "integrity": "sha512-Q5LbSRQou5Ls0Wn2SN+WsLdwZanlaUB8KPdGvuR/5m13un7iOLL5EO53ZOwaBrtJz+Cru/WVZJefv6LQqTOaZQ==",
      "cpu": [
        "arm64"
      ],
      "license": "Apache-2.0",
      "os": [
        "ios"
      ],
      "dependencies": {
        "require-asset": "^1.0.2"
      },
      "bin": {
        "bare": "bin/bare"
      }
    },
    "node_modules/bare-semver": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/bare-semver/-/bare-semver-1.1.0.tgz",
      "integrity": "sha512-1Hw5qJ7hXdVt3uPUqjeFTuxyvBUJauvz5A1I2jk8gzjZMHp04n//6nV9MDbG9CMw78JHY2lGV0w6s//LrASm2w==",
      "license": "Apache-2.0"
    },
    "node_modules/require-asset": {
      "version": "1.2.2",
      "resolved": "https://registry.npmjs.org/require-asset/-/require-asset-1.2.2.tgz",
      "integrity": "sha512-uc8nWKhqAxVD9Z4rST2b4yaemrC9Xb5vA1wlCz5AiCYnBYdwGRWNqFjneA5zRILzlo1MNrB63ry9+pc8wNR26w==",
      "license": "Apache-2.0",
      "dependencies": {
        "bare-module-resolve": "^1.6.2"
      },
      "engines": {
        "bare": ">=1.10.0",
        "node": ">=18"
      }
    }
  }
}
package.json
{
  "name": "bare-runtime-ios-arm64-simulator-sample",
  "version": "1.0.0",
  "type": "module",
  "dependencies": {
    "bare-runtime-ios-arm64-simulator": "1.31.0"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "resolve bare runtime asset path for iOS arm64 simulator",
  "kind": "HOW",
  "packages": [
    "pkg:npm/bare-runtime-ios-arm64-simulator@1.31.0"
  ],
  "symbols": [
    "bare"
  ]
}
test/contract.mjs
import assert from 'node:assert/strict';
import fs from 'node:fs';
import bareRuntime from 'bare-runtime-ios-arm64-simulator';

// 1. Exported shape: the package exports a `bare` property containing the resolved file path to the simulator runtime binary.
assert.strictEqual(typeof bareRuntime.bare, 'string');

// 2. Binary path: the resolved asset path points to the 'bin/bare' executable inside the package structure.
assert.match(bareRuntime.bare, /[/\\]bin[/\\]bare$/);

// 3. Asset existence: the referenced asset file exists on disk.
assert.strictEqual(fs.existsSync(bareRuntime.bare), true);

Исходный сидер

аноним