feat(core): Allow overriding npm registry for community packages (#10325)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-08-14 09:44:19 +02:00
committed by GitHub
parent 838f13337f
commit 33a2703429
7 changed files with 68 additions and 19 deletions

View File

@@ -26,6 +26,10 @@ class CommunityPackagesConfig {
@Env('N8N_COMMUNITY_PACKAGES_ENABLED')
enabled: boolean = true;
/** NPM registry URL to pull community packages from */
@Env('N8N_COMMUNITY_PACKAGES_REGISTRY')
registry: string = 'https://registry.npmjs.org';
/** Whether to reinstall any missing community packages */
@Env('N8N_REINSTALL_MISSING_PACKAGES')
reinstallMissing: boolean = false;

View File

@@ -108,6 +108,7 @@ describe('GlobalConfig', () => {
nodes: {
communityPackages: {
enabled: true,
registry: 'https://registry.npmjs.org',
reinstallMissing: false,
},
errorTriggerType: 'n8n-nodes-base.errorTrigger',