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

Rewrite configuration / environment logic using @wuespace/envar #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pklaschka
Copy link
Member

@pklaschka pklaschka commented Dec 11, 2024

Fixes all kinds of glaring problems the previous configuration had, including:

  1. problems related to using the same schema for env and DB config parsing,
  2. bad testability due to globally static CONFIG object, and
  3. bad documentation of configuration variables due to complex structure.

With this, we can also use @wuespace/envardoc to document our env variables.

Fixes all kinds of glaring problems the previous configuration had, including:

1. problems related to using the same schema for env and DB config parsing,
2. bad testability due to globally static `CONFIG` object, and
3. bad documentation of configuration variables due to complex structure.

With this, we can also use `@wuespace/envardoc` to document our env variables.

Closes: #4
Closes: #8
@Copilot Copilot bot review requested due to automatic review settings December 11, 2024 21:03
@pklaschka pklaschka added this to the v0.4.2 milestone Dec 11, 2024
@pklaschka pklaschka added the 🌷 enhancement New feature or request label Dec 11, 2024
@pklaschka pklaschka self-assigned this Dec 11, 2024
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 10 out of 25 changed files in this pull request and generated 3 suggestions.

Files not reviewed (15)
  • deno.json: Language not supported
  • example.env: Language not supported
  • DEPLOY.md: Evaluated as low risk
  • README.md: Evaluated as low risk
  • compose.yml: Evaluated as low risk
  • env.md: Evaluated as low risk
  • lib/cli/bump.ts: Evaluated as low risk
  • lib/cli/server.ts: Evaluated as low risk
  • lib/cli/stats.ts: Evaluated as low risk
  • lib/common/additional-managed-namespaces.ts: Evaluated as low risk
  • lib/common/asn.ts: Evaluated as low risk
  • lib/common/config.ts: Evaluated as low risk
  • lib/common/db.ts: Evaluated as low risk
  • lib/common/namespaces.ts: Evaluated as low risk
  • lib/common/path.ts: Evaluated as low risk
Comments skipped due to low confidence (2)

lib/common/zod-helpers.ts:19

  • The toBoolean function should be covered by unit tests to verify that it correctly converts string values to boolean.
export function toBoolean(value: string | undefined): boolean | undefined {

lib/common/zod-helpers.ts:28

  • The toNumber function should be covered by unit tests to verify that it correctly converts string values to numbers.
export function toNumber(value: string | undefined): number | undefined {

lib/http/routes/lookup.ts Show resolved Hide resolved
lib/http/routes/lookup.ts Show resolved Hide resolved
lib/http/lookup-url.ts Show resolved Hide resolved
@pklaschka pklaschka requested a review from fussel178 December 11, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌷 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zBoolString() breaks apart when parsing already boolean values. Migrate configuration to @wuespace/envar
1 participant