샘플
filelist 1.0.6
검증된 샘플 — npm filelist 1.0.6. node 22 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다: FileList instance includes string filenames and array of filenames
sha256:74e0b73db78506aeadb79713c3d4afd6932ce67c833fa0ff110a4b956c4929e7
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 1
- 빌드한 서명 키
- 1
선언된 환경
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| 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-26 |
케이스
HOW- 목표
- verify pkg:npm/filelist@1.0.6
- 패키지
- 환경
- node 22.23.2
- 생성일
- 2026-08-26T07:25:55Z
컨트랙트
- FileList instance includes string filenames and array of filenames
- exclude(string) removes exact matching files from the resolved file list
- exclude(RegExp) removes pattern matching files from the resolved file list
- exclude(Function) removes files that satisfy the predicate function
- shouldExclude(filename) returns true for excluded paths and false otherwise
- clearInclusions() resets pending additions before resolution
- clearExclusions() clears active exclusion patterns
- length() returns the number of resolved files in the list
- Array methods like map() return a new FileList instance with transformed items
- FileList.clone(fl) creates a cloned copy of the FileList
파일
- PROMPT.md
- csx.json
- index.js
- package-lock.json
- package.json
- spec.json
- test/contract.js
소스
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 pkg:npm/filelist@1.0.6
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/filelist@1.0.6
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.
{"case":{"caseId":"case:sha256:8e54586697e18c168b6aa6352b1349cd8ff088ef0d304e256912e56fc5f4af42","contract":["FileList instance includes string filenames and array of filenames","exclude(string) removes exact matching files from the resolved file list","exclude(RegExp) removes pattern matching files from the resolved file list","exclude(Function) removes files that satisfy the predicate function","shouldExclude(filename) returns true for excluded paths and false otherwise","clearInclusions() resets pending additions before resolution","clearExclusions() clears active exclusion patterns","length() returns the number of resolved files in the list","Array methods like map() return a new FileList instance with transformed items","FileList.clone(fl) creates a cloned copy of the FileList"],"goal":"verify pkg:npm/filelist@1.0.6","kind":"HOW","packages":["pkg:npm/filelist@1.0.6"],"schemaVersion":1},"contractCommand":["node","test/contract.js"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/filelist@1.0.6"],"schemaVersion":1,"subject":"pkg:npm/filelist@1.0.6","verifierAdapter":"node-typescript@1"}
'use strict';
const { FileList } = require('filelist');
function createFileList(...items) {
const fl = new FileList();
if (items.length > 0) {
fl.include(...items);
}
return fl;
}
module.exports = {
FileList,
createFileList,
};
{
"name": "sample-1138045718",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-1138045718",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"filelist": "1.0.6"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"license": "MIT"
},
"node_modules/brace-expansion": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz",
"integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==",
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/filelist": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz",
"integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==",
"license": "Apache-2.0",
"dependencies": {
"minimatch": "^5.0.1"
}
},
"node_modules/minimatch": {
"version": "5.1.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz",
"integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==",
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
}
}
}
}
{
"name": "sample-1138045718",
"version": "1.0.0",
"description": "Minimal sample verifying filelist@1.0.6",
"main": "index.js",
"scripts": {
"test": "node test/contract.js"
},
"keywords": [],
"author": "",
"license": "MIT-0",
"dependencies": {
"filelist": "1.0.6"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/filelist@1.0.6",
"kind": "HOW",
"packages": [
"pkg:npm/filelist@1.0.6"
]
}
'use strict';
const assert = require('assert');
const { FileList, createFileList } = require('../index.js');
function runContract() {
// 1. FileList instance includes string filenames and array of filenames
const fl1 = createFileList('foo.txt', 'bar.js');
fl1.include(['baz.md', 'temp.tmp']);
assert.deepStrictEqual(fl1.toArray(), ['foo.txt', 'bar.js', 'baz.md', 'temp.tmp']);
// 2. exclude(string) removes exact matching files from the resolved file list
const fl2 = new FileList();
fl2.include('foo.txt', 'bar.js', 'baz.txt');
fl2.exclude('bar.js');
assert.deepStrictEqual(fl2.toArray(), ['foo.txt', 'baz.txt']);
// 3. exclude(RegExp) removes pattern matching files from the resolved file list
const fl3 = new FileList();
fl3.include('app.js', 'app.test.js', 'server.js');
fl3.exclude(/\.test\.js$/);
assert.deepStrictEqual(fl3.toArray(), ['app.js', 'server.js']);
// 4. exclude(Function) removes files that satisfy the predicate function
const fl4 = new FileList();
fl4.include('doc.md', 'temp1.tmp', 'temp2.tmp');
fl4.exclude((item) => item.endsWith('.tmp'));
assert.deepStrictEqual(fl4.toArray(), ['doc.md']);
// 5. shouldExclude(filename) returns true for excluded paths and false otherwise
const fl5 = new FileList();
fl5.exclude(/\.tmp$/);
fl5.exclude((item) => item.startsWith('ignore-'));
assert.strictEqual(fl5.shouldExclude('data.tmp'), true);
assert.strictEqual(fl5.shouldExclude('ignore-me.txt'), true);
assert.strictEqual(fl5.shouldExclude('valid.txt'), false);
// 6. clearInclusions() resets pending additions before resolution
const fl6 = new FileList();
fl6.include('first.txt');
fl6.clearInclusions();
fl6.include('second.txt');
assert.deepStrictEqual(fl6.toArray(), ['second.txt']);
// 7. clearExclusions() clears active exclusion patterns
const fl7 = new FileList();
fl7.include('item1.js', 'item2.js');
fl7.exclude('item1.js');
fl7.clearExclusions();
assert.deepStrictEqual(fl7.toArray(), ['item1.js', 'item2.js']);
// 8. length() returns the number of resolved files in the list
const fl8 = new FileList();
fl8.include('a.txt', 'b.txt', 'c.txt');
fl8.exclude('c.txt');
assert.strictEqual(fl8.length(), 2);
// 9. Array methods like map() return a new FileList instance with transformed items
const fl9 = new FileList();
fl9.include('a.txt', 'b.txt');
const mapped = fl9.map((f) => f.toUpperCase());
assert.ok(mapped instanceof FileList);
assert.deepStrictEqual(mapped.toArray(), ['A.TXT', 'B.TXT']);
// 10. FileList.clone(fl) creates a cloned copy of the FileList
const fl10 = new FileList();
fl10.include('alpha.txt', 'beta.txt');
const cloned = FileList.clone(fl10);
assert.ok(cloned instanceof FileList);
assert.deepStrictEqual(cloned.toArray(), ['alpha.txt', 'beta.txt']);
console.log('Contract tests passed.');
}
runContract();
오리진 시더
익명