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

feat: generate node config type #38

Merged
merged 22 commits into from
Feb 23, 2024
Merged

feat: generate node config type #38

merged 22 commits into from
Feb 23, 2024

Conversation

spsjvc
Copy link
Member

@spsjvc spsjvc commented Jan 5, 2024

This pull request adds a script that spins up a Nitro container, runs the --help command against it, spits the output into a file, parses that file and generates a TypeScript type to be leveraged by the SDK.

It also generates node config for v2.2.5 and makes the SDK use that instead of our hardcoded one.

@spsjvc spsjvc marked this pull request as ready for review February 22, 2024 17:36
@TucksonDev
Copy link
Contributor

Oh, parsing the help texts must have been fun :D. It looks good, but I have 2 comments:

  • We should add a default for --nitro-node-tag in generateNodeConfigType
  • I get an error Syntax error: Bad fd number when running yarn generate:node-config-type. The reason is that '&>' in docker run --rm ${nitroNodeImage} --help &> ${nitroNodeHelpOutputFile} is not supported in all environments. Changing it to docker run --rm ${nitroNodeImage} --help > ${nitroNodeHelpOutputFile} 2>&1 should work (I think)

Copy link
Contributor

@TucksonDev TucksonDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@spsjvc spsjvc enabled auto-merge (squash) February 23, 2024 11:10
@spsjvc spsjvc merged commit 65784be into main Feb 23, 2024
5 checks passed
@spsjvc spsjvc deleted the generate-node-config branch February 23, 2024 12:06
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