-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
refactor(core): Move backend config to a separate package #9325
Draft
netroy
wants to merge
14
commits into
master
Choose a base branch
from
config-package
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n8n-assistant
bot
added
core
Enhancement outside /nodes-base and /editor-ui
n8n team
Authored by the n8n team
labels
May 7, 2024
ivov
reviewed
May 15, 2024
class LoggingConfig { | ||
/** Typeorm logging enabled flag. @default false */ | ||
@FromEnv('DB_LOGGING_ENABLED') | ||
readonly enabled: boolean = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally there should be a way to have the effect of readonly
but without overly narrowing the type and without having to specify it... Not sure if possible but I'll look if there's a way.
…ing `_FILE` suffixed env variables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves the config related code into a separate
@n8n/config
package so that we can use the config on all backend packages (likecore
andnodes-base
) without creating a circular dependency withcli
.This PR also changes the config object to be
packages/cli/node_modules/@types/convict/index.d.ts
Every sub-section in the config is also now separately injectable, which we can use to create config objects specific to certain sections of the codebase, instead of using this one global config everywhere.
TODO for later
_FILE
suffix@n8n/config
, include it in the published package, and then use this JSON to generate the docs for env variables..n8n/config
Review / Merge checklist