CodeSampleX

Sample

typed-query-selector 2.12.2: scripts

Verified sample for npm typed-query-selector 2.12.2: scripts. The contract ran on node 22 · linux debian/x64 · docker and passed.

sha256:c86b1010a03f83e96e3c5f07976d24ecfecbecda0f1c01be9b2d64ddf7f3b773

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment linux 24 · ubuntu · glibc 2.39 x64 npm

Verification-run environments

Environment Contract Stages Run
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-07

Case

HOW
Goal
verify typed-query-selector.scripts in pkg:npm/typed-query-selector@2.12.2
Packages
Symbols
  • typed-query-selector.scripts
Created
2026-09-07T04:25:43Z

Contract

  1. typed-query-selector package.json defines scripts object with test, fmt, and fmt:check commands
  2. typed-query-selector package.json scripts test command executes tsc and tsgo typecheck
  3. typed-query-selector package.json scripts fmt command executes prettier write on TypeScript files
  4. typed-query-selector package.json scripts fmt:check command executes prettier check on TypeScript files
  5. typed-query-selector package.json scripts contains expected keys and non-empty string commands

Files

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

Download the source artifact (tar.gz)

Source

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 typed-query-selector.scripts in pkg:npm/typed-query-selector@2.12.2
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/typed-query-selector@2.12.2
Demonstrate these symbols/APIs:
  - typed-query-selector.scripts

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:3c996aa56c6873ea476843266ba427927038394b6edc1b21f23d192aeb4885dd","contract":["typed-query-selector package.json defines scripts object with test, fmt, and fmt:check commands","typed-query-selector package.json scripts test command executes tsc and tsgo typecheck","typed-query-selector package.json scripts fmt command executes prettier write on TypeScript files","typed-query-selector package.json scripts fmt:check command executes prettier check on TypeScript files","typed-query-selector package.json scripts contains expected keys and non-empty string commands"],"goal":"verify typed-query-selector.scripts in pkg:npm/typed-query-selector@2.12.2","kind":"HOW","packages":["pkg:npm/typed-query-selector@2.12.2"],"schemaVersion":1,"symbols":["typed-query-selector.scripts"]},"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/typed-query-selector@2.12.2"],"schemaVersion":1,"subject":"pkg:npm/typed-query-selector@2.12.2","symbols":["typed-query-selector.scripts"],"verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-typed-query-selector-scripts",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-typed-query-selector-scripts",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "typed-query-selector": "2.12.2"
      }
    },
    "node_modules/typed-query-selector": {
      "version": "2.12.2",
      "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz",
      "integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==",
      "license": "MIT"
    }
  }
}
package.json
{
  "name": "sample-typed-query-selector-scripts",
  "version": "1.0.0",
  "type": "module",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "typed-query-selector": "2.12.2"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify typed-query-selector.scripts in pkg:npm/typed-query-selector@2.12.2",
  "kind": "HOW",
  "packages": [
    "pkg:npm/typed-query-selector@2.12.2"
  ],
  "symbols": [
    "typed-query-selector.scripts"
  ]
}
test/contract.mjs
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);

// 1. typed-query-selector package.json defines scripts object with test, fmt, and fmt:check commands
const pkgJson = require('typed-query-selector/package.json');
assert.ok(pkgJson.scripts, 'scripts field must exist in package.json');
assert.equal(typeof pkgJson.scripts, 'object');

const scriptKeys = Object.keys(pkgJson.scripts).sort();
assert.deepEqual(scriptKeys, ['fmt', 'fmt:check', 'test']);

// 2. typed-query-selector package.json scripts test command executes tsc and tsgo typecheck
assert.equal(typeof pkgJson.scripts.test, 'string');
assert.equal(pkgJson.scripts.test, 'tsc -p . && tsgo -p .');
assert.ok(pkgJson.scripts.test.includes('tsc -p .'));
assert.ok(pkgJson.scripts.test.includes('tsgo -p .'));

// 3. typed-query-selector package.json scripts fmt command executes prettier write on TypeScript files
assert.equal(typeof pkgJson.scripts.fmt, 'string');
assert.equal(pkgJson.scripts.fmt, 'prettier --write *.ts');

// 4. typed-query-selector package.json scripts fmt:check command executes prettier check on TypeScript files
assert.equal(typeof pkgJson.scripts['fmt:check'], 'string');
assert.equal(pkgJson.scripts['fmt:check'], 'prettier --check *.ts');

// 5. typed-query-selector package.json scripts contains expected keys and non-empty string commands
for (const key of ['test', 'fmt', 'fmt:check']) {
  assert.ok(typeof pkgJson.scripts[key] === 'string' && pkgJson.scripts[key].length > 0);
}

console.log('All contract assertions for typed-query-selector.scripts passed.');

Origin Seeder

anonymous