CodeSampleX

Beispiel

@rollup/rollup-linux-x64-gnu 4.62.5

Verifiziertes Beispiel für npm @rollup/rollup-linux-x64-gnu 4.62.5. Der Vertrag lief auf node 22 · linux alpine/x64 · docker und bestand.

sha256:ef949811fb4bae86fa81c2a4a9fbdadff7c211b53fab361efde021aa6ffe74a8

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 alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-21

Fall

HOW
Ziel
verify pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5
Pakete
Erstellt
2026-08-21T12:39:22Z

Contract

  1. assert package resolution resolves @rollup/rollup-linux-x64-gnu to rollup.linux-x64-gnu.node
  2. assert package manifest specifies os linux, cpu x64, and libc glibc
  3. assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62
  4. assert requiring Linux x64 glibc native binary on mismatched host throws ERR_DLOPEN_FAILED

Dateien

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

Quellartefakt herunterladen (tar.gz)

Quelltext

.npmrc
force = true
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 pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5
Kind: HOW

Use EXACTLY these public packages and versions:
  - pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5

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:25a201395746ba53e784fcde0c70aa741da5291ea6b2011ca4792a4f25d912af","contract":["assert package resolution resolves @rollup/rollup-linux-x64-gnu to rollup.linux-x64-gnu.node","assert package manifest specifies os linux, cpu x64, and libc glibc","assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62","assert requiring Linux x64 glibc native binary on mismatched host throws ERR_DLOPEN_FAILED"],"goal":"verify pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5","kind":"HOW","packages":["pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5"],"schemaVersion":1},"contractCommand":["node","test/contract.cjs"],"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/%40rollup/rollup-linux-x64-gnu@4.62.5"],"schemaVersion":1,"subject":"pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5","verifierAdapter":"node-typescript@1"}
package-lock.json
{
  "name": "sample-rollup-linux-x64-gnu",
  "version": "1.0.0",
  "lockfileVersion": 3,
  "requires": true,
  "packages": {
    "": {
      "name": "sample-rollup-linux-x64-gnu",
      "version": "1.0.0",
      "license": "MIT-0",
      "dependencies": {
        "@rollup/rollup-linux-x64-gnu": "4.62.5"
      }
    },
    "node_modules/@rollup/rollup-linux-x64-gnu": {
      "version": "4.62.5",
      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.5.tgz",
      "integrity": "sha512-6RHPJR1g/uvdYU8uXBnfq3nlqyZCP82Fr6NHgfGoaIeSh0YEqnX/x6uA9MmJJbnSH7swqX4F+CkGdUF+6doiQA==",
      "cpu": [
        "x64"
      ],
      "license": "MIT",
      "os": [
        "linux"
      ]
    }
  }
}
package.json
{
  "name": "sample-rollup-linux-x64-gnu",
  "version": "1.0.0",
  "private": true,
  "license": "MIT-0",
  "dependencies": {
    "@rollup/rollup-linux-x64-gnu": "4.62.5"
  }
}
spec.json
{
  "schemaVersion": 1,
  "goal": "verify pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5",
  "kind": "HOW",
  "packages": [
    "pkg:npm/%40rollup/rollup-linux-x64-gnu@4.62.5"
  ]
}
test/contract.cjs
const assert = require("node:assert");
const fs = require("node:fs");
const path = require("node:path");

// 1. Assert package resolution resolves @rollup/rollup-linux-x64-gnu to rollup.linux-x64-gnu.node
const resolved = require.resolve("@rollup/rollup-linux-x64-gnu");
assert(
  resolved.endsWith("rollup.linux-x64-gnu.node"),
  "package main resolves to rollup.linux-x64-gnu.node"
);

// 2. Assert package manifest specifies os linux, cpu x64, and libc glibc
const pkgDir = path.dirname(resolved);
const pkgJson = JSON.parse(
  fs.readFileSync(path.join(pkgDir, "package.json"), "utf8")
);
assert.strictEqual(pkgJson.name, "@rollup/rollup-linux-x64-gnu");
assert.strictEqual(pkgJson.version, "4.62.5");
assert.deepStrictEqual(pkgJson.os, ["linux"]);
assert.deepStrictEqual(pkgJson.cpu, ["x64"]);
assert.deepStrictEqual(pkgJson.libc, ["glibc"]);
assert.strictEqual(pkgJson.main, "./rollup.linux-x64-gnu.node");

// 3. Assert binary header contains 64-bit little-endian ELF magic and EM_X86_64 architecture code 62
const fd = fs.openSync(resolved, "r");
const header = Buffer.alloc(20);
fs.readSync(fd, header, 0, 20, 0);
fs.closeSync(fd);

// ELF Magic: 0x7f, "E", "L", "F"
assert.strictEqual(header[0], 0x7f, "ELF magic byte 0");
assert.strictEqual(header[1], 0x45, "ELF magic byte 1 ('E')");
assert.strictEqual(header[2], 0x4c, "ELF magic byte 2 ('L')");
assert.strictEqual(header[3], 0x46, "ELF magic byte 3 ('F')");

// ELF Class: 2 = 64-bit
assert.strictEqual(header[4], 2, "ELF class is 64-bit (ELFCLASS64)");

// ELF Data: 1 = Little-endian
assert.strictEqual(header[5], 1, "ELF data encoding is 2's complement, little endian");

// ELF Machine: 62 = EM_X86_64
const eMachine = header.readUInt16LE(18);
assert.strictEqual(eMachine, 62, "ELF machine is EM_X86_64");

// 4. Assert requiring Linux x64 glibc native binary on mismatched host throws ERR_DLOPEN_FAILED
const isGlibcX64Linux =
  process.platform === "linux" &&
  process.arch === "x64" &&
  Boolean(process.report?.getReport()?.header?.glibcVersionRuntime);

if (isGlibcX64Linux) {
  const binding = require("@rollup/rollup-linux-x64-gnu");
  assert.strictEqual(typeof binding.parse, "function", "binding.parse is a function");
  assert.strictEqual(typeof binding.parseAsync, "function", "binding.parseAsync is a function");
  assert.strictEqual(typeof binding.xxhashBase64Url, "function", "binding.xxhashBase64Url is a function");
} else {
  assert.throws(
    () => {
      require("@rollup/rollup-linux-x64-gnu");
    },
    (err) => {
      return err.code === "ERR_DLOPEN_FAILED";
    },
    "dynamic loading throws ERR_DLOPEN_FAILED on mismatched host platform"
  );
}

Ursprungs-Seeder

anonym