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

Add envar writer to generate code for jsr:@wuespace/envar #20

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

pklaschka
Copy link
Member

@pklaschka pklaschka commented Dec 8, 2024

With this change, it is possible to, based on the example env file, automatically generate code to use with the jsr:@wuespace/envar package.

This generates a self-contained file which exports a function initEnv(): Promise<void>, which initializes the variables with basic validators.

Usage:

envardoc envar -o lib/env.ts example.env

Summary

n/a

Details

n/a

Additional information

n/a

Related links

  • Fixes # .

CLA

  • I have signed the individual contributor's license agreement and sent it to the board of the WüSpace e. V. organization.

With this change, it is possible to, based on the example env file,
automatically generate code to use with the `jsr:@wuespace/envar` package.

This generates a self-contained file which exports a function `initEnv(): Promise<void>`,
which initializes the variables with basic validators.

Usage:

```shell
envardoc envar -o lib/env.ts example.env
```
@github-actions github-actions bot mentioned this pull request Dec 8, 2024
1 task
Base automatically changed from include-footer to main December 8, 2024 22:01
@pklaschka pklaschka enabled auto-merge December 8, 2024 22:01
@pklaschka pklaschka requested a review from Copilot December 8, 2024 22:01

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no suggestions.

@pklaschka pklaschka merged commit c99c45f into main Dec 8, 2024
3 checks passed
@pklaschka pklaschka deleted the feat/envar-writer branch December 8, 2024 22:04
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