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(core): Update config defaults for for v1 (no-changelog) #6196

Merged
merged 1 commit into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/cli/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import path from 'path';
import convict from 'convict';
import { UserSettings } from 'n8n-core';
import { jsonParse } from 'n8n-workflow';
import { IS_V1_RELEASE } from '@/constants';

convict.addFormat({
name: 'nodes-list',
Expand Down Expand Up @@ -230,7 +231,7 @@ export const schema = {
process: {
doc: 'In what process workflows should be executed',
format: ['main', 'own'] as const,
default: 'own',
default: IS_V1_RELEASE ? 'main' : 'own',
env: 'EXECUTIONS_PROCESS',
},

Expand Down Expand Up @@ -943,7 +944,7 @@ export const schema = {
push: {
backend: {
format: ['sse', 'websocket'] as const,
default: 'sse',
default: IS_V1_RELEASE ? 'websocket' : 'sse',
env: 'N8N_PUSH_BACKEND',
doc: 'Backend to use for push notifications',
},
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { readFileSync } from 'fs';
import { resolve, join, dirname } from 'path';
import { major } from 'semver';
import type { n8n } from 'n8n-core';
import { RESPONSE_ERROR_MESSAGES as CORE_RESPONSE_ERROR_MESSAGES, UserSettings } from 'n8n-core';
import { jsonParse } from 'n8n-workflow';
Expand All @@ -29,6 +30,7 @@ export function getN8nPackageJson() {
export const START_NODES = ['n8n-nodes-base.start', 'n8n-nodes-base.manualTrigger'];

export const N8N_VERSION = getN8nPackageJson().version;
export const IS_V1_RELEASE = major(N8N_VERSION) > 0;

export const NODE_PACKAGE_PREFIX = 'n8n-nodes-';

Expand Down