Beispiel
promzard 2.0.0: PromZard
Verifiziertes Beispiel für npm promzard 2.0.0: PromZard. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.
sha256:5abfe391b748aa35a134730e0e34b890b55b977195e725dca67f0d3e0ad5cede
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
linux 24 · ubuntu · glibc 2.39 x64 npm
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| 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-10-21 |
Fall
HOW- Ziel
- verify promzard.PromZard in pkg:npm/promzard@2.0.0
- Pakete
- Symbole
-
- promzard.PromZard
- Erstellt
- 2026-10-21T02:26:00Z
Contract
- new PromZard(file, ctx, options) constructs an instance and .load() evaluates the file module with ctx variables, nested objects, async functions, and callback functions
- new PromZard(missingFile, ctx, { backupFile }) falls back to backupFile when the primary file cannot be read
- PromZard.fromBuffer(buf, ctx, options) evaluates a buffer directly without reading from disk
Dateien
- PROMPT.md
- csx.json
- input.js
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Quelltext
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 promzard.PromZard in pkg:npm/promzard@2.0.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/promzard@2.0.0
Demonstrate these symbols/APIs:
- promzard.PromZard
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:67dda311d373da754291ad612414e6d7828cd1bdefe5b3bbbbb0bf149c983c4d","contract":["new PromZard(file, ctx, options) constructs an instance and .load() evaluates the file module with ctx variables, nested objects, async functions, and callback functions","new PromZard(missingFile, ctx, { backupFile }) falls back to backupFile when the primary file cannot be read","PromZard.fromBuffer(buf, ctx, options) evaluates a buffer directly without reading from disk"],"goal":"verify promzard.PromZard in pkg:npm/promzard@2.0.0","kind":"HOW","packages":["pkg:npm/promzard@2.0.0"],"schemaVersion":1,"symbols":["promzard.PromZard"]},"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/promzard@2.0.0"],"schemaVersion":1,"subject":"pkg:npm/promzard@2.0.0","symbols":["promzard.PromZard"],"verifierAdapter":"node-typescript@1"}
module.exports = {
appName: appName,
nested: {
version: version
},
computed: async function () {
return appName + '@' + version
},
callbackFn: function (cb) {
cb(null, 'ok:' + this.__basename)
}
}
{
"name": "sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample",
"version": "1.0.0",
"dependencies": {
"promzard": "2.0.0"
}
},
"node_modules/mute-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz",
"integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==",
"license": "ISC",
"engines": {
"node": "^18.17.0 || >=20.5.0"
}
},
"node_modules/promzard": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/promzard/-/promzard-2.0.0.tgz",
"integrity": "sha512-Ncd0vyS2eXGOjchIRg6PVCYKetJYrW1BSbbIo+bKdig61TB6nH2RQNF2uP+qMpsI73L/jURLWojcw8JNIKZ3gg==",
"license": "ISC",
"dependencies": {
"read": "^4.0.0"
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
}
},
"node_modules/read": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/read/-/read-4.1.0.tgz",
"integrity": "sha512-uRfX6K+f+R8OOrYScaM3ixPY4erg69f8DN6pgTvMcA9iRc8iDhwrA4m3Yu8YYKsXJgVvum+m8PkRboZwwuLzYA==",
"license": "ISC",
"dependencies": {
"mute-stream": "^2.0.0"
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
}
}
}
}
{
"name": "sample",
"version": "1.0.0",
"private": true,
"dependencies": {
"promzard": "2.0.0"
}
}
{
"schemaVersion": 1,
"goal": "verify promzard.PromZard in pkg:npm/promzard@2.0.0",
"kind": "HOW",
"packages": [
"pkg:npm/promzard@2.0.0"
],
"symbols": [
"promzard.PromZard"
]
}
import assert from 'node:assert/strict'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import promzard from 'promzard'
import { PromZard } from 'promzard'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const inputFile = path.join(__dirname, '..', 'input.js')
const missingFile = path.join(__dirname, '..', 'nonexistent.js')
assert.equal(typeof PromZard, 'function')
assert.equal(promzard.PromZard, PromZard)
assert.equal(promzard, PromZard.promzard)
// 1. Direct instantiation and .load() with context
const ctx1 = { appName: 'demo-widget', version: '1.2.3' }
const pz = new PromZard(inputFile, ctx1)
const res1 = await pz.load()
assert.deepEqual(res1, {
appName: 'demo-widget',
nested: { version: '1.2.3' },
computed: 'demo-widget@1.2.3',
callbackFn: 'ok:input.js'
})
// 2. Backup file fallback when primary file is missing
const ctx2 = { appName: 'fallback-app', version: '2.0.0' }
const pzBackup = new PromZard(missingFile, ctx2, { backupFile: inputFile })
const res2 = await pzBackup.load()
assert.equal(res2.appName, 'fallback-app')
assert.equal(res2.computed, 'fallback-app@2.0.0')
// 3. Static PromZard.fromBuffer evaluation
const buf = Buffer.from('module.exports = { tag: prefix + "-v1" }')
const res3 = await PromZard.fromBuffer(buf, { prefix: 'release' })
assert.deepEqual(res3, { tag: 'release-v1' })
Ursprungs-Seeder
anonym