Skip to content

Commit d98a70e

Browse files
committed
Merge master, fix conflicts
2 parents dd14e20 + 22b6f90 commit d98a70e

File tree

105 files changed

+5428
-1354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5428
-1354
lines changed

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
# [1.40.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.40.0) (2024-05-02)
2+
3+
4+
### Bug Fixes
5+
6+
* **Airtable Node:** Do not allow to use deprecated api keys in v1 ([#9171](https://github.com/n8n-io/n8n/issues/9171)) ([017ae6e](https://github.com/n8n-io/n8n/commit/017ae6e1025fb4ae28b46b9c411e4b5c70e280e9))
7+
* **core:** Add `view engine` to webhook server to support forms ([#9224](https://github.com/n8n-io/n8n/issues/9224)) ([24c3150](https://github.com/n8n-io/n8n/commit/24c3150056401ddcf49f7266897b6c73ccc06253))
8+
* **core:** Fix browser session refreshes not working ([#9212](https://github.com/n8n-io/n8n/issues/9212)) ([1efeecc](https://github.com/n8n-io/n8n/commit/1efeeccc5bae306a798a66a8cf3e669ad3689262))
9+
* **core:** Prevent node param resolution from failing telemetry graph generation ([#9257](https://github.com/n8n-io/n8n/issues/9257)) ([f6c9493](https://github.com/n8n-io/n8n/commit/f6c9493355726ddf516fb54a37adf49a2ce0efd0))
10+
* **core:** Stop relying on filesystem for SSH keys ([#9217](https://github.com/n8n-io/n8n/issues/9217)) ([093dcef](https://github.com/n8n-io/n8n/commit/093dcefafc5a09f7622391d8b01b9aecfa9c8f2f))
11+
* **Discord Node:** When using OAuth2 authentication, check if user is a guild member when sending direct message ([#9183](https://github.com/n8n-io/n8n/issues/9183)) ([00dfad3](https://github.com/n8n-io/n8n/commit/00dfad3279bd2a45a8331e734b331f4ab3fce75c))
12+
* **editor:** Fix read-only mode in inline expression editor ([#9232](https://github.com/n8n-io/n8n/issues/9232)) ([99f384e](https://github.com/n8n-io/n8n/commit/99f384e2cf6b16d08a8bdc150a2833463b35f14b))
13+
* **editor:** Prevent excess runs in manual execution with run data ([#9259](https://github.com/n8n-io/n8n/issues/9259)) ([426a12a](https://github.com/n8n-io/n8n/commit/426a12ac0ec1d637063828db008a2fb9c32ddfff))
14+
* **editor:** Throw expression error on attempting to set variables at runtime ([#9229](https://github.com/n8n-io/n8n/issues/9229)) ([fec04d5](https://github.com/n8n-io/n8n/commit/fec04d5f796c677b6127addcb700d6442c2c3a26))
15+
* Elaborate scope of Sustainable Use License ([#9233](https://github.com/n8n-io/n8n/issues/9233)) ([442aaba](https://github.com/n8n-io/n8n/commit/442aaba116cf0cfe7c1e7b8d570e321cc6a14143))
16+
* **Google BigQuery Node:** Better error messages, transform timestamps ([#9255](https://github.com/n8n-io/n8n/issues/9255)) ([7ff24f1](https://github.com/n8n-io/n8n/commit/7ff24f134b706d0b5b7d7c13d3e69bd1a0f4c5b8))
17+
* **Google Drive Node:** Create from text operation ([#9185](https://github.com/n8n-io/n8n/issues/9185)) ([d9e7494](https://github.com/n8n-io/n8n/commit/d9e74949c4db7282c3ab42bd6825aa5acc042400))
18+
* **Jira Trigger Node:** Update credentials UI ([#9198](https://github.com/n8n-io/n8n/issues/9198)) ([ed98ca2](https://github.com/n8n-io/n8n/commit/ed98ca2fb77fc81362e6480ee6a12a64915418f9))
19+
* **LangChain Code Node:** Fix execution of custom n8n tools called via LC code node ([#9265](https://github.com/n8n-io/n8n/issues/9265)) ([741e829](https://github.com/n8n-io/n8n/commit/741e8299d64cd774cc35ea312433f50d865f1318))
20+
* **LangChain Code Node:** Fix resolution of scoped langchain modules ([#9258](https://github.com/n8n-io/n8n/issues/9258)) ([445c05d](https://github.com/n8n-io/n8n/commit/445c05dca46225e195ab122cf77d6d1088460e20))
21+
* **MySQL Node:** Query to statements splitting fix ([#9207](https://github.com/n8n-io/n8n/issues/9207)) ([dc84452](https://github.com/n8n-io/n8n/commit/dc844528f4554ae41037e2c25542237a74d86f3f))
22+
23+
24+
### Features
25+
26+
* Add Ask AI to HTTP Request Node ([#8917](https://github.com/n8n-io/n8n/issues/8917)) ([cd9bc44](https://github.com/n8n-io/n8n/commit/cd9bc44bddf7fc78acec9ee7c96a40077a07615f))
27+
* **Gmail Node:** Add support for creating drafts using an alias ([#8728](https://github.com/n8n-io/n8n/issues/8728)) ([3986356](https://github.com/n8n-io/n8n/commit/3986356c8995998cb6ab392ae07f41efcb46d4bd))
28+
* **Gmail Node:** Add thread option for draft emails ([#8729](https://github.com/n8n-io/n8n/issues/8729)) ([2dd0b32](https://github.com/n8n-io/n8n/commit/2dd0b329ca243de87eb1b59bf831593f70c42784))
29+
* **Groq Chat Model Node:** Add support for Groq chat models ([#9250](https://github.com/n8n-io/n8n/issues/9250)) ([96f02bd](https://github.com/n8n-io/n8n/commit/96f02bd6552cf9ea75fcb8ba29c3afac9553aa25))
30+
* **HTTP Request Node:** Option to provide SSL Certificates in Http Request Node ([#9125](https://github.com/n8n-io/n8n/issues/9125)) ([306b68d](https://github.com/n8n-io/n8n/commit/306b68da6bb37dbce67dcf5c4791c2986750579c))
31+
* **Jira Software Node:** Add Wiki Markup support for Jira Cloud comments ([#8857](https://github.com/n8n-io/n8n/issues/8857)) ([756012b](https://github.com/n8n-io/n8n/commit/756012b0524e09601fada80213dd4da3057d329a))
32+
* **Microsoft To Do Node:** Add an option to set a reminder when updating a task ([#6918](https://github.com/n8n-io/n8n/issues/6918)) ([22b2afd](https://github.com/n8n-io/n8n/commit/22b2afdd23bef2a301cd9d3743400e0d69463b1b))
33+
* **MISP Node:** Rest search operations ([#9196](https://github.com/n8n-io/n8n/issues/9196)) ([b694e77](https://github.com/n8n-io/n8n/commit/b694e7743e17507b901706c5023a9aac83b903dd))
34+
* **Ollama Chat Model Node:** Add aditional Ollama config parameters & fix vision ([#9215](https://github.com/n8n-io/n8n/issues/9215)) ([e17e767](https://github.com/n8n-io/n8n/commit/e17e767e700a74b187706552fc879c00fd551611))
35+
* **Pipedrive Node:** Add busy and description options to activities ([#9208](https://github.com/n8n-io/n8n/issues/9208)) ([9b3ac16](https://github.com/n8n-io/n8n/commit/9b3ac1648f1888d79079fd50998140fd27efae97))
36+
* **Postgres Node:** Add option IS NOT NULL and hide value input fields ([#9241](https://github.com/n8n-io/n8n/issues/9241)) ([e896889](https://github.com/n8n-io/n8n/commit/e89688939438b2d5414155f053530bd9eb34b300))
37+
* **S3 Node:** Add support for self signed SSL certificates ([#9269](https://github.com/n8n-io/n8n/issues/9269)) ([ddff804](https://github.com/n8n-io/n8n/commit/ddff80416df87166627fdefc755e3f79102c5664))
38+
* **Telegram Node:** Disable page preview by default ([#9267](https://github.com/n8n-io/n8n/issues/9267)) ([41ce178](https://github.com/n8n-io/n8n/commit/41ce178491135b5f972974ebecec0f5f223a71ce))
39+
* Upgrade typeorm for separate sqlite read & write connections ([#9230](https://github.com/n8n-io/n8n/issues/9230)) ([0b52320](https://github.com/n8n-io/n8n/commit/0b523206358886d5b81d7009ce95cb9d3ba9fa40))
40+
* **Wise Node:** Add XML as supported format in getStatement operation ([#9193](https://github.com/n8n-io/n8n/issues/9193)) ([a424b59](https://github.com/n8n-io/n8n/commit/a424b59e4949e96c0e56319cea91fcf084a5208e))
41+
* **Wise Trigger Node:** Add support for balance updates ([#9189](https://github.com/n8n-io/n8n/issues/9189)) ([42a9891](https://github.com/n8n-io/n8n/commit/42a9891081e7f1a19364c406b056eee036180c24))
42+
43+
44+
145
# [1.39.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.39.0) (2024-04-24)
246

347

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "n8n-monorepo",
3-
"version": "1.39.0",
3+
"version": "1.40.0",
44
"private": true,
55
"homepage": "https://n8n.io",
66
"engines": {

packages/@n8n/chat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@n8n/chat",
3-
"version": "0.12.0",
3+
"version": "0.13.0",
44
"scripts": {
55
"dev": "pnpm run storybook",
66
"build": "pnpm type-check && pnpm build:vite && pnpm run build:individual && npm run build:prepare",

packages/@n8n/nodes-langchain/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@n8n/n8n-nodes-langchain",
3-
"version": "1.39.0",
3+
"version": "1.40.0",
44
"description": "",
55
"license": "SEE LICENSE IN LICENSE.md",
66
"homepage": "https://n8n.io",

packages/cli/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "n8n",
3-
"version": "1.39.0",
3+
"version": "1.40.0",
44
"description": "n8n Workflow Automation Tool",
55
"license": "SEE LICENSE IN LICENSE.md",
66
"homepage": "https://n8n.io",
@@ -93,13 +93,15 @@
9393
"@langchain/community": "0.0.53",
9494
"@langchain/core": "0.1.61",
9595
"@langchain/openai": "0.0.28",
96+
"@langchain/pinecone": "^0.0.3",
9697
"@n8n/client-oauth2": "workspace:*",
9798
"@n8n/localtunnel": "2.1.0",
9899
"@n8n/n8n-nodes-langchain": "workspace:*",
99100
"@n8n/permissions": "workspace:*",
100101
"@n8n/typeorm": "0.3.20-9",
101102
"@n8n_io/license-sdk": "2.10.0",
102103
"@oclif/core": "3.18.1",
104+
"@pinecone-database/pinecone": "2.1.0",
103105
"@rudderstack/rudder-sdk-node": "2.0.7",
104106
"@sentry/integrations": "7.87.0",
105107
"@sentry/node": "7.87.0",
@@ -128,6 +130,7 @@
128130
"fast-glob": "3.2.12",
129131
"flatted": "3.2.7",
130132
"formidable": "3.5.1",
133+
"fuse.js": "^7.0.0",
131134
"google-timezones-json": "1.1.0",
132135
"handlebars": "4.7.8",
133136
"helmet": "7.1.0",
@@ -181,6 +184,8 @@
181184
"ws": "8.14.2",
182185
"xml2js": "0.6.2",
183186
"xmllint-wasm": "3.0.1",
184-
"yamljs": "0.3.0"
187+
"yamljs": "0.3.0",
188+
"zod": "3.22.4",
189+
"zod-to-json-schema": "3.22.4"
185190
}
186191
}

packages/cli/src/AbstractServer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export abstract class AbstractServer {
154154

155155
this.server.on('error', (error: Error & { code: string }) => {
156156
if (error.code === 'EADDRINUSE') {
157-
console.log(
157+
this.logger.info(
158158
`n8n's port ${PORT} is already in use. Do you have another instance of n8n running already?`,
159159
);
160160
process.exit(1);
@@ -167,7 +167,7 @@ export abstract class AbstractServer {
167167

168168
await this.setupHealthCheck();
169169

170-
console.log(`n8n ready on ${ADDRESS}, port ${PORT}`);
170+
this.logger.info(`n8n ready on ${ADDRESS}, port ${PORT}`);
171171
}
172172

173173
async start(): Promise<void> {
@@ -236,11 +236,11 @@ export abstract class AbstractServer {
236236
await this.configure();
237237

238238
if (!inTest) {
239-
console.log(`Version: ${N8N_VERSION}`);
239+
this.logger.info(`Version: ${N8N_VERSION}`);
240240

241241
const defaultLocale = config.getEnv('defaultLocale');
242242
if (defaultLocale !== 'en') {
243-
console.log(`Locale: ${defaultLocale}`);
243+
this.logger.info(`Locale: ${defaultLocale}`);
244244
}
245245

246246
await this.externalHooks.run('n8n.ready', [this, config]);

packages/cli/src/CurlConverterHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export const toHttpNodeParameters = (curlCommand: string): HttpNodeParameters =>
417417
// json body
418418
Object.assign(httpNodeParameters, {
419419
specifyBody: 'json',
420-
jsonBody: JSON.stringify(json),
420+
jsonBody: JSON.stringify(json, null, 2),
421421
});
422422
} else {
423423
// key-value body

packages/cli/src/License.ts

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ export class License {
4141
private readonly usageMetricsService: UsageMetricsService,
4242
) {}
4343

44+
/**
45+
* Whether this instance should renew the license - on init and periodically.
46+
*/
47+
private renewalEnabled(instanceType: N8nInstanceType) {
48+
if (instanceType !== 'main') return false;
49+
50+
const autoRenewEnabled = config.getEnv('license.autoRenewEnabled');
51+
52+
/**
53+
* In multi-main setup, all mains start off with `unset` status and so renewal disabled.
54+
* On becoming leader or follower, each will enable or disable renewal, respectively.
55+
* This ensures the mains do not cause a 429 (too many requests) on license init.
56+
*/
57+
if (config.getEnv('multiMainSetup.enabled')) {
58+
return autoRenewEnabled && config.getEnv('multiMainSetup.instanceType') === 'leader';
59+
}
60+
61+
return autoRenewEnabled;
62+
}
63+
4464
async init(instanceType: N8nInstanceType = 'main') {
4565
if (this.manager) {
4666
this.logger.warn('License manager already initialized or shutting down');
@@ -53,7 +73,6 @@ export class License {
5373

5474
const isMainInstance = instanceType === 'main';
5575
const server = config.getEnv('license.serverUrl');
56-
const autoRenewEnabled = isMainInstance && config.getEnv('license.autoRenewEnabled');
5776
const offlineMode = !isMainInstance;
5877
const autoRenewOffset = config.getEnv('license.autoRenewOffset');
5978
const saveCertStr = isMainInstance
@@ -66,13 +85,15 @@ export class License {
6685
? async () => await this.usageMetricsService.collectUsageMetrics()
6786
: async () => [];
6887

88+
const renewalEnabled = this.renewalEnabled(instanceType);
89+
6990
try {
7091
this.manager = new LicenseManager({
7192
server,
7293
tenantId: config.getEnv('license.tenantId'),
7394
productIdentifier: `n8n-${N8N_VERSION}`,
74-
autoRenewEnabled,
75-
renewOnInit: autoRenewEnabled,
95+
autoRenewEnabled: renewalEnabled,
96+
renewOnInit: renewalEnabled,
7697
autoRenewOffset,
7798
offlineMode,
7899
logger: this.logger,
@@ -126,7 +147,7 @@ export class License {
126147

127148
if (this.orchestrationService.isMultiMainSetupEnabled && !isMultiMainLicensed) {
128149
this.logger.debug(
129-
'[Multi-main setup] License changed with no support for multi-main setup - no new followers will be allowed to init. To restore multi-main setup, please upgrade to a license that supporst this feature.',
150+
'[Multi-main setup] License changed with no support for multi-main setup - no new followers will be allowed to init. To restore multi-main setup, please upgrade to a license that supports this feature.',
130151
);
131152
}
132153
}
@@ -335,4 +356,9 @@ export class License {
335356
isWithinUsersLimit() {
336357
return this.getUsersLimit() === UNLIMITED_LICENSE_QUOTA;
337358
}
359+
360+
async reinit() {
361+
this.manager?.reset();
362+
await this.init();
363+
}
338364
}

packages/cli/src/ResponseHelper.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { Readable } from 'node:stream';
1010

1111
import { inDevelopment } from '@/constants';
1212
import { ResponseError } from './errors/response-errors/abstract/response.error';
13+
import Container from 'typedi';
14+
import { Logger } from './Logger';
1315

1416
export function sendSuccessResponse(
1517
res: Response,
@@ -83,7 +85,7 @@ export function sendErrorResponse(res: Response, error: Error) {
8385

8486
if (isResponseError(error)) {
8587
if (inDevelopment) {
86-
console.error(picocolors.red(error.httpStatusCode), error.message);
88+
Container.get(Logger).error(picocolors.red([error.httpStatusCode, error.message].join(' ')));
8789
}
8890

8991
//render custom 404 page for form triggers
@@ -112,7 +114,7 @@ export function sendErrorResponse(res: Response, error: Error) {
112114

113115
if (error instanceof NodeApiError) {
114116
if (inDevelopment) {
115-
console.error(picocolors.red(error.name), error.message);
117+
Container.get(Logger).error([picocolors.red(error.name), error.message].join(' '));
116118
}
117119

118120
Object.assign(response, error);

packages/cli/src/WorkflowExecuteAdditionalData.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,10 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
637637
]);
638638
} catch (error) {
639639
ErrorReporter.error(error);
640-
console.error('There was a problem running hook "workflow.postExecute"', error);
640+
Container.get(Logger).error(
641+
'There was a problem running hook "workflow.postExecute"',
642+
error,
643+
);
641644
}
642645
}
643646
},

0 commit comments

Comments
 (0)