サンプル
@types/node-cron 3.0.11
検証済みサンプル — npm @types/node-cron 3.0.11. node 22 · linux debian/x64 · docker で contract を実行し、成功しました: @types/node-cron package.json declares type definitions…
sha256:ca15ecae6ce6e479dbd7ff194af92f292f4f3749013d016af2d139da3b508ba1
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
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-11 |
ケース
HOW- ゴール
- verify pkg:npm/%40types/node-cron@3.0.11
- パッケージ
- 作成日
- 2026-09-11T22:32:29Z
コントラクト
- @types/node-cron package.json declares type definitions entry point index.d.ts and version 3.0.11
- @types/node-cron index.d.ts exports schedule function declaration returning ScheduledTask
- @types/node-cron index.d.ts exports validate function declaration returning boolean
- @types/node-cron index.d.ts exports getTasks function declaration returning Map of tasks
- @types/node-cron index.d.ts declares ScheduledTask interface extending EventEmitter with now, start, and stop methods
- @types/node-cron index.d.ts declares ScheduleOptions interface with scheduled, timezone, recoverMissedExecutions, name, and runOnInit options
ファイル
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
ソース
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/%40types/node-cron@3.0.11
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/node-cron@3.0.11
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:9a0c4e6cc6d03a528e46df83211475857fc4bf7840a1207e1a318fafb8ae6d4c","contract":["@types/node-cron package.json declares type definitions entry point index.d.ts and version 3.0.11","@types/node-cron index.d.ts exports schedule function declaration returning ScheduledTask","@types/node-cron index.d.ts exports validate function declaration returning boolean","@types/node-cron index.d.ts exports getTasks function declaration returning Map of tasks","@types/node-cron index.d.ts declares ScheduledTask interface extending EventEmitter with now, start, and stop methods","@types/node-cron index.d.ts declares ScheduleOptions interface with scheduled, timezone, recoverMissedExecutions, name, and runOnInit options"],"goal":"verify pkg:npm/%40types/node-cron@3.0.11","kind":"HOW","packages":["pkg:npm/%40types/node-cron@3.0.11"],"schemaVersion":1},"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/%40types/node-cron@3.0.11"],"schemaVersion":1,"subject":"pkg:npm/%40types/node-cron@3.0.11","verifierAdapter":"node-typescript@1"}
{
"name": "sample-types-node-cron",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-types-node-cron",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/node-cron": "3.0.11"
}
},
"node_modules/@types/node-cron": {
"version": "3.0.11",
"resolved": "https://registry.npmjs.org/@types/node-cron/-/node-cron-3.0.11.tgz",
"integrity": "sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==",
"license": "MIT"
}
}
}
{
"name": "sample-types-node-cron",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT-0",
"dependencies": {
"@types/node-cron": "3.0.11"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40types/node-cron@3.0.11",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/node-cron@3.0.11"
]
}
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
// 1. @types/node-cron package.json declares type definitions entry point index.d.ts and version 3.0.11
const pkgJsonPath = require.resolve('@types/node-cron/package.json');
assert.ok(fs.existsSync(pkgJsonPath), 'package.json must exist');
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
assert.equal(pkgJson.name, '@types/node-cron', 'Package name must be @types/node-cron');
assert.equal(pkgJson.version, '3.0.11', 'Package version must be 3.0.11');
assert.equal(pkgJson.types, 'index.d.ts', 'Types field must point to index.d.ts');
const pkgDir = path.dirname(pkgJsonPath);
const dtsPath = path.join(pkgDir, 'index.d.ts');
assert.ok(fs.existsSync(dtsPath), 'index.d.ts must exist');
const dtsContent = fs.readFileSync(dtsPath, 'utf8');
// 2. @types/node-cron index.d.ts exports schedule function declaration returning ScheduledTask
assert.ok(
dtsContent.includes('export function schedule(') &&
dtsContent.includes('cronExpression: string') &&
dtsContent.includes('func: ((now: Date | "manual" | "init") => void) | string') &&
dtsContent.includes('options?: ScheduleOptions') &&
dtsContent.includes('): ScheduledTask;'),
'schedule function declaration must match expected signature'
);
// 3. @types/node-cron index.d.ts exports validate function declaration returning boolean
assert.ok(
dtsContent.includes('export function validate(cronExpression: string): boolean;'),
'validate function declaration must match expected signature'
);
// 4. @types/node-cron index.d.ts exports getTasks function declaration returning Map of tasks
assert.ok(
dtsContent.includes('export function getTasks(): Map<string, ScheduledTask>;'),
'getTasks function declaration must match expected signature'
);
// 5. @types/node-cron index.d.ts declares ScheduledTask interface extending EventEmitter with now, start, and stop methods
assert.ok(
dtsContent.includes('export interface ScheduledTask extends EventEmitter {') &&
dtsContent.includes('now: (now?: Date) => void;') &&
dtsContent.includes('start: () => void;') &&
dtsContent.includes('stop: () => void;'),
'ScheduledTask interface must declare now, start, and stop methods'
);
// 6. @types/node-cron index.d.ts declares ScheduleOptions interface with scheduled, timezone, recoverMissedExecutions, name, and runOnInit options
assert.ok(
dtsContent.includes('export interface ScheduleOptions {') &&
dtsContent.includes('scheduled?: boolean | undefined;') &&
dtsContent.includes('timezone?: string;') &&
dtsContent.includes('recoverMissedExecutions?: boolean;') &&
dtsContent.includes('name?: string;') &&
dtsContent.includes('runOnInit?: boolean;'),
'ScheduleOptions interface must declare expected options'
);
console.log('Contract for @types/node-cron passed successfully.');
オリジンシーダー
匿名