Skip to content

refactor(cli): migrate registry to TypeScript - #1553

Merged
cv merged 1 commit into
cv/add-config-iofrom
cv/migrate-registry-ts
Apr 7, 2026
Merged

refactor(cli): migrate registry to TypeScript#1553
cv merged 1 commit into
cv/add-config-iofrom
cv/migrate-registry-ts

Conversation

@cv

@cv cv commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrate the sandbox registry implementation from bin/lib/registry.js to src/lib/registry.ts, keeping the existing API surface and replacing the JS file with a shim to the compiled implementation.

Why

This is the next core-substrate step after #1552:

  • move central CLI state management into typed code
  • keep the strangler pattern already used across the repo
  • unblock later credentials / policies cleanup and TS backedge removal

Changes

  • add src/lib/registry.ts
  • replace bin/lib/registry.js with a thin shim to dist/lib/registry
  • route registry persistence through the new config-io substrate
  • update the write-failure test to accept the new user-facing config write error

Testing

  • npm run build:cli
  • npx vitest run test/registry.test.js
  • npx vitest run test/cli.test.js test/registry.test.js

Stack

Depends on #1552 (refactor(cli): add config-io module). Once that merges, this PR can be retargeted to main.

Relates to #924.

@cv
cv requested a review from brandonpelfrey April 6, 2026 23:59
@cv
cv merged commit 8676918 into cv/add-config-io Apr 7, 2026
8 checks passed
@cv
cv deleted the cv/migrate-registry-ts branch April 7, 2026 01:21
@wscurran wscurran added the refactor PR restructures code without intended behavior change label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants