Skip to content

Add dev runtime platform config API#3179

Draft
techmannih wants to merge 1 commit into
mainfrom
codex/dev-runtime-platform-config
Draft

Add dev runtime platform config API#3179
techmannih wants to merge 1 commit into
mainfrom
codex/dev-runtime-platform-config

Conversation

@techmannih
Copy link
Copy Markdown
Member

Summary

Adds a CLI dev-server runtime config bridge so tscircuit.config.ts can participate in dev preview without sending raw function-valued config or secrets to the browser.

What changed

  • Adds /api/dev/runtime-config for browser-safe runtime platform config payloads.
  • Adds /api/dev/runtime-config/rpc so function-valued platformConfig fields execute on the CLI server.
  • Injects window.TSCIRCUIT_RUNTIME_CONFIG_API_URL into the dev HTML shell.
  • Loads runtime project config in DevServer.start() so dev can use tscircuit.config.ts for config like ignored files.
  • Covers the secret-safe RPC flow with a focused dev-server test.

Validation

  • bun test tests/cli/dev/runtime-config-api.test.ts tests/lib/project-config.test.ts
  • bunx tsc --noEmit --pretty false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant