Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate typescript types for contexts added in 2.0 #745

Closed
kriswest opened this issue Jun 8, 2022 · 3 comments · Fixed by #754
Closed

Generate typescript types for contexts added in 2.0 #745

kriswest opened this issue Jun 8, 2022 · 3 comments · Fixed by #754
Labels
api FDC3 API Working Group good first issue Good for newcomers project infrastructure

Comments

@kriswest
Copy link
Contributor

kriswest commented Jun 8, 2022

Prior to release the FDC3 source and NPM module need to be updated with new typescript types for standard contexts generated from the schemas. These go in src/context/ContextType.ts and src/context/ContextTypes.ts.

A script is provided to do this: https://github.com/finos/FDC3/blob/544-Desktop-Agent-Bridging-Proposal/package.json/#L30-L31
yarn typegen

@jonfreedman
Copy link

if there's a script to generate the types shouldn't that be automated?

@kriswest
Copy link
Contributor Author

Hi @jonfreedman, thanks for the prompt.

Ideally yes, I believe the issue is that the type generator here pulls the schemas from the public URLs via this array in a JSON file. Hence, any new or updated type schemas need to be merged to master and deployed to github pages before the types can be generated. Automation is probably a case of writing another action to run after the deployment action that runs the generator and checks the result back into master.

Making the result (pre-draft of the next version of the standard) available as an npm module version is probably another action worth setting up.

@jonfreedman
Copy link

Great, sounds like you have the right idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api FDC3 API Working Group good first issue Good for newcomers project infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants