From ca9ebca664572aa2c0611ec5a047c35af9932ddc Mon Sep 17 00:00:00 2001 From: Lisandro Corbalan Date: Wed, 2 Sep 2026 20:07:49 +0000 Subject: [PATCH 1/3] feat: publish the registry as the root package's bin --- .gitignore | 6 ++++++ package-lock.json | 14 ++++++++++---- package.json | 10 +++++++--- registry/.gitignore | 1 - registry/src/index.ts | 1 + 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index aaef965..97163a6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,9 @@ docs/ # Canton sandbox ports/ready file written by scripts/sandbox.sh .canton-ports.json + +# The registry's build output ships inside the npm package, so the rule that +# keeps it out of git lives here rather than beside it: npm applies a NESTED +# ignore file to the pack walk even for a path the root "files" allowlist +# names, while the allowlist does outrank this file. +registry/dist diff --git a/package-lock.json b/package-lock.json index af6cb48..d89dfc4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "canton-token-forge", - "version": "0.0.1", + "name": "@bootnodedev/canton-token-forge", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "canton-token-forge", - "version": "0.0.1", + "name": "@bootnodedev/canton-token-forge", + "version": "0.2.0", "license": "MIT", "dependencies": { "dotenv": "^16.4.5", @@ -14,10 +14,16 @@ "express-openapi-validator": "^5.6.2", "pino": "^10.3.1" }, + "bin": { + "canton-token-forge-registry": "registry/dist/index.js" + }, "devDependencies": { "@types/express": "^4.17.21", "@types/node": "^26.1.1", "typescript": "^5.5.4" + }, + "engines": { + "node": ">=18" } }, "node_modules/@apidevtools/json-schema-ref-parser": { diff --git a/package.json b/package.json index cd1752e..b387cd3 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "canton-token-forge", - "version": "0.0.1", + "name": "@bootnodedev/canton-token-forge", + "version": "0.2.0", "description": "A reusable, multi-instrument CIP-0056 (CN Token Standard) compliant token for demos and sandboxes", "license": "MIT", - "type": "commonjs", + "type": "module", "scripts": { "setup": "bash scripts/fetch-dep.sh", "clean": "rm -rf daml/canton-token-forge/.daml daml/canton-token-forge-test/.daml consumer-smoke/consumer/.daml consumer-smoke/consumer/vendor registry/dist", @@ -16,6 +16,10 @@ "test:coverage": "npm run build:canton-token-forge && cd daml/canton-token-forge-test && LANG=C.UTF-8 dpm test --all --show-coverage --coverage-ignore-choice '^splice' --coverage-ignore-choice ':Archive$'", "prepare": "tsc -p registry/tsconfig.json" }, + "repository": "github:BootNodeDev/canton-token-forge", + "engines": { "node": ">=18" }, + "bin": { "canton-token-forge-registry": "registry/dist/index.js" }, + "files": ["registry/dist", "registry/openapi", "registry/.env.example"], "dependencies": { "dotenv": "^16.4.5", "express": "^4.19.2", diff --git a/registry/.gitignore b/registry/.gitignore index af45a21..327f74d 100644 --- a/registry/.gitignore +++ b/registry/.gitignore @@ -1,5 +1,4 @@ node_modules -dist .env .env.* !.env.example diff --git a/registry/src/index.ts b/registry/src/index.ts index 2ba4429..649ae2a 100644 --- a/registry/src/index.ts +++ b/registry/src/index.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import 'dotenv/config' import { type Config, loadConfig } from './config.js' import { HttpLedgerClient } from './ledger.js' From ec8124f7ccd072cf40f94083f272ece81a17994e Mon Sep 17 00:00:00 2001 From: Lisandro Corbalan Date: Wed, 2 Sep 2026 20:28:59 +0000 Subject: [PATCH 2/3] fix: raise the node floor to 20, which two runtime dependencies require --- README.md | 2 +- RUNBOOK.md | 2 +- SPEC.md | 4 ++-- package-lock.json | 2 +- package.json | 2 +- registry/package-lock.json | 2 +- registry/package.json | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9c02268..99e31e9 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ from that file. - `dpm` (Digital Asset Package Manager) and a JDK 17+ on `PATH` (`curl https://get.digitalasset.com/install/install.sh | sh`, then `dpm install 3.4.11`). -- Node 18+ for the registry service, its test suites, and the seed script. +- Node 20+ for the registry service, its test suites, and the seed script. - `git` + network access (setup clones `canton-network/splice`). ## Bumping Splice diff --git a/RUNBOOK.md b/RUNBOOK.md index 7728e92..57a8264 100644 --- a/RUNBOOK.md +++ b/RUNBOOK.md @@ -18,7 +18,7 @@ been re-probed since. - `dpm` and a JDK 17+ on `PATH` (see `CLAUDE.md`) - `deps/` vendored: `npm run setup`, or `bash scripts/fetch-dep.sh` directly -- Node 18+ for the seed script and the registry service +- Node 20+ for the seed script and the registry service ## 1. Start the sandbox diff --git a/SPEC.md b/SPEC.md index 0244a46..ea885a1 100644 --- a/SPEC.md +++ b/SPEC.md @@ -310,7 +310,7 @@ holding for any surplus, so no value is created or destroyed. ## 6. Registry HTTP service -A TypeScript service (Express, `express-openapi-validator`, pino; Node 18+) that +A TypeScript service (Express, `express-openapi-validator`, pino; Node 20+) that validates incoming requests against the four CN Token Standard OpenAPI specs it ships. Responses are covered by the unit suite rather than by runtime schema validation. The service is **read-only**: it queries the JSON Ledger API for @@ -470,7 +470,7 @@ The sandbox runs in the foreground, so the seed and the end-to-end suite go in a second shell. The end-to-end suite creates everything it needs, so seeding is only required if you also want to drive the service by hand. -Requirements: `dpm` and a JDK 17+ on `PATH` for the Daml build, Node 18+ for the +Requirements: `dpm` and a JDK 17+ on `PATH` for the Daml build, Node 20+ for the service and its suites, and `git` plus network access for the initial vendoring. --- diff --git a/package-lock.json b/package-lock.json index d89dfc4..3f586f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "typescript": "^5.5.4" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@apidevtools/json-schema-ref-parser": { diff --git a/package.json b/package.json index b387cd3..9d58499 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "prepare": "tsc -p registry/tsconfig.json" }, "repository": "github:BootNodeDev/canton-token-forge", - "engines": { "node": ">=18" }, + "engines": { "node": ">=20" }, "bin": { "canton-token-forge-registry": "registry/dist/index.js" }, "files": ["registry/dist", "registry/openapi", "registry/.env.example"], "dependencies": { diff --git a/registry/package-lock.json b/registry/package-lock.json index 915d31f..2f5659f 100644 --- a/registry/package-lock.json +++ b/registry/package-lock.json @@ -27,7 +27,7 @@ "vitest": "^2.0.5" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@apidevtools/json-schema-ref-parser": { diff --git a/registry/package.json b/registry/package.json index 933cf66..f0fec3d 100644 --- a/registry/package.json +++ b/registry/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "engines": { - "node": ">=18" + "node": ">=20" }, "scripts": { "build": "tsc -p tsconfig.json", From 7d04a6c240bdd0af1944c079c1946caa75b8000f Mon Sep 17 00:00:00 2001 From: Lisandro Corbalan Date: Wed, 2 Sep 2026 20:29:25 +0000 Subject: [PATCH 3/3] fix: keep a dist at any depth under registry ignored --- .gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 97163a6..8c61bce 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,7 @@ docs/ # The registry's build output ships inside the npm package, so the rule that # keeps it out of git lives here rather than beside it: npm applies a NESTED # ignore file to the pack walk even for a path the root "files" allowlist -# names, while the allowlist does outrank this file. -registry/dist +# names, while the allowlist does outrank this file. The glob is what makes an +# anchored root rule cover what the unanchored one beside the code covered, a +# dist directory at any depth under registry/, not only the compiler's own. +registry/**/dist