CodeSampleX

샘플

bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]

검증된 샘플 — npm bare-bundle 1.10.0: Bundle.prototype[Symbol.iterator]. node 22 · linux debian/x64 · docker에서 contract를 실행해 통과했습니다.

sha256:18acf004d854b7d75d187f4d7347e9e3e596bbe4b153746018a943b6ff4c9c13

이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다. 통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다. MIT-0

실행 증거

선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.

증거 기준
서명된 컨트랙트 통과
검증 영수증
1
빌드한 서명 키
1
선언된 환경 linux 24 · ubuntu · glibc 2.39 x64 npm

검증 실행 환경

환경 컨트랙트 단계 실행일
node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2…
2026-09-05

케이스

HOW
목표
verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0
패키지
심벌
  • Bundle.prototype[Symbol.iterator]
생성일
2026-09-05T12:17:59Z

컨트랙트

  1. Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable
  2. Empty bundle produces zero entries when iterated
  3. Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order
  4. Bundle supports for...of iteration and spread operator syntax
  5. Bundle iteration reflects files added and updated via Bundle.prototype.write

파일

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

소스 아티팩트 내려받기 (tar.gz)

소스

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: verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/bare-bundle@1.10.0
Demonstrate these symbols/APIs:
  - Bundle.prototype[Symbol.iterator]

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:485eac31b1afb47f578e52c729e95c9b0f42e85a0a9541ce04561eed86b6aef5","contract":["Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable","Empty bundle produces zero entries when iterated","Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order","Bundle supports for...of iteration and spread operator syntax","Bundle iteration reflects files added and updated via Bundle.prototype.write"],"goal":"verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0","kind":"HOW","packages":["pkg:npm/bare-bundle@1.10.0"],"schemaVersion":1,"symbols":["Bundle.prototype[Symbol.iterator]"]},"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-bundle@1.10.0"],"schemaVersion":1,"subject":"pkg:npm/bare-bundle@1.10.0","symbols":["Bundle.prototype[Symbol.iterator]"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "bare-bundle-sample",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "bare-bundle-sample",
      "version": "1.0.0",
      "dependencies": {
        "bare-bundle": "1.10.0"
      }
    },
    "node_modules/bare-bundle": {
      "version": "1.10.0",
      "resolved": "https://registry.npmjs.org/bare-bundle/-/bare-bundle-1.10.0.tgz",
      "integrity": "sha512-4LVlnJAHr00Hh6Vu6ZUJS38rcEtJT3b3vChXSsBsJ2mk1TN0lQ+gzd+Dw5L0aV7uqDZv84smuwW+O02X7PfDlw==",
      "license": "Apache-2.0"
    }
  }
}
package.json
{
  "name": "bare-bundle-sample",
  "version": "1.0.0",
  "private": true,
  "description": "Clean-room verification for bare-bundle Bundle.prototype[Symbol.iterator]",
  "dependencies": {
    "bare-bundle": "1.10.0"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify Bundle.prototype[Symbol.iterator] in pkg:npm/bare-bundle@1.10.0",
  "kind": "HOW",
  "packages": [
    "pkg:npm/bare-bundle@1.10.0"
  ],
  "symbols": [
    "Bundle.prototype[Symbol.iterator]"
  ]
}
test/contract.mjs
import assert from 'node:assert';
import Bundle from 'bare-bundle';

// 1. Bundle.prototype[Symbol.iterator] is a generator function that makes Bundle instances iterable
const bundle = new Bundle();
assert.strictEqual(typeof bundle[Symbol.iterator], 'function');
assert.strictEqual(bundle[Symbol.iterator], Bundle.prototype[Symbol.iterator]);

// 2. Empty bundle produces zero entries when iterated
assert.deepStrictEqual([...bundle], []);

// 3. Iterating a bundle yields [key, buffer, mode] tuples for each file in insertion order
bundle.write('/index.js', Buffer.from('console.log("hello world");'), { mode: 0o755 });
bundle.write('/assets/config.json', Buffer.from('{"port": 8080}'), { mode: 0o644 });

const entries = [...bundle];
assert.strictEqual(entries.length, 2);

const [key1, buffer1, mode1] = entries[0];
assert.strictEqual(key1, '/index.js');
assert.strictEqual(buffer1.toString('utf8'), 'console.log("hello world");');
assert.strictEqual(mode1, 0o755);

const [key2, buffer2, mode2] = entries[1];
assert.strictEqual(key2, '/assets/config.json');
assert.strictEqual(buffer2.toString('utf8'), '{"port": 8080}');
assert.strictEqual(mode2, 0o644);

// 4. Bundle supports for...of iteration and spread operator syntax
const keys = [];
for (const [key] of bundle) {
  keys.push(key);
}
assert.deepStrictEqual(keys, ['/index.js', '/assets/config.json']);

// 5. Bundle iteration reflects files added and updated via Bundle.prototype.write
bundle.write('/index.js', Buffer.from('console.log("updated");'), { mode: 0o644 });
const updatedEntries = [...bundle];
assert.strictEqual(updatedEntries.length, 2);
assert.strictEqual(updatedEntries[0][0], '/index.js');
assert.strictEqual(updatedEntries[0][1].toString('utf8'), 'console.log("updated");');
assert.strictEqual(updatedEntries[0][2], 0o644);

console.log('Contract passed');

오리진 시더

익명