Skip to content

Wire typescript generation - #13

Merged
colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:wire-typescript-generation
Oct 23, 2026
Merged

colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:wire-typescript-generation

Conversation

@itvi-1234

@itvi-1234 itvi-1234 commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

1. Generate TypeScript bindings in CI

  • packages.yaml gets a typescript entry for common-integrations and env-configuration. The names are @runtimeconditions/common-integrations and @runtimeconditions/env-configuration.
  • New script ci/generate-typescript.py. For each package it makes the model with rc, runs the TypeScript emitter, checks the result, and adds the model, the extension and a file manifest.
  • The generate workflow and the binding-tools action now run it, and commit bindings/<key>/typescript to main, the same way as Go and Python.

2. Publish to npm with trusted publishing

  • binding-publish-npm.yml is no longer a placeholder.
  • It builds the packages in dependency order, checks them, and publishes the ones that are not on npm yet.
  • It uses id-token: write, so npm trusts the workflow itself. No npm token is stored anywhere.
  • It is a dry run by default. It runs only from main, and only when someone starts it.

How I tested it

  • Python tests: 54 pass (19 are new).
  • Go tests pass for the normalizer, the Go emitter and the orchestrator (1 new test).
  • I made both packages locally. They build with strict tsc, and a second run gave the same result.
  • I ran the publish script as a dry run. It built both packages in the right order.

Add TypeScript targets for common-integrations and env-configuration to the
package catalog, named @runtimeconditions/<package key>, and a
generate-typescript.py script that normalizes each model with rc, runs the
TypeScript emitter, verifies the package, and adds the model, the root
extension, and a file manifest like the Go and Python packages have. The
generation workflow now runs it and commits bindings/<key>/typescript to main.

rc selects only the languages it emits itself when no target is given, so a
catalog language with its own script no longer breaks rc bindings check and
update.

Signed-off-by: itvi-1234 <rjsumit71@gmail.com>
Replace the placeholder with a workflow that builds the committed TypeScript
packages in dependency order, checks them with npm pack, and publishes the ones
that are not on npm yet. The job requests an OIDC token (id-token: write), so
npm authenticates the workflow itself and no npm token is stored. It defaults
to a dry run.

Signed-off-by: itvi-1234 <rjsumit71@gmail.com>
@colinjlacy
colinjlacy merged commit 0fd75b8 into runtimeconditions:main Oct 23, 2026
1 check passed
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.

2 participants