Skip to content

Commit

Permalink
sync master
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 committed Feb 25, 2025
2 parents 8a1251c + 461e39a commit 3c41f86
Show file tree
Hide file tree
Showing 69 changed files with 258 additions and 129 deletions.
6 changes: 3 additions & 3 deletions docker/images/n8n-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG NODE_VERSION=20

# 1. Use a builder step to download various dependencies
FROM node:${NODE_VERSION}-alpine as builder
FROM node:${NODE_VERSION}-alpine AS builder

# Install fonts
RUN \
Expand All @@ -16,7 +16,7 @@ RUN apk add --update git openssh graphicsmagick tini tzdata ca-certificates libc

# Update npm and install full-uci
COPY .npmrc /usr/local/etc/npmrc
RUN npm install -g [email protected] [email protected] [email protected]
RUN npm install -g [email protected] [email protected]

# Activate corepack, and install pnpm
WORKDIR /tmp
Expand All @@ -34,5 +34,5 @@ COPY --from=builder / /
RUN rm -rf /tmp/v8-compile-cache*

WORKDIR /home/node
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
ENV NODE_ICU_DATA=/usr/local/lib/node_modules/full-icu
EXPOSE 5678/tcp
1 change: 1 addition & 0 deletions packages/@n8n/api-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"dist/**/*"
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@n8n/config": "workspace:*",
"n8n-workflow": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/api-types/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/api-types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"zx": "^8.1.4"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/convict": "^6.1.1",
"@types/k6": "^0.52.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/benchmark/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/benchmark/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"baseUrl": "src",
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/client-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
],
"dependencies": {
"axios": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/client-oauth2/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/client-oauth2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/codemirror-lang/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@lezer/lr": "^1.4.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@lezer/generator": "^1.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/codemirror-lang/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/codemirror-lang/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"tsBuildInfoFile": "dist/typecheck.tsbuildinfo"
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@
"dependencies": {
"@n8n/di": "workspace:*",
"reflect-metadata": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"emitDecoratorMetadata": true,
Expand Down
3 changes: 3 additions & 0 deletions packages/@n8n/di/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
],
"dependencies": {
"reflect-metadata": "catalog:"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/di/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/di/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/imap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"uuencode": "0.0.4"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/imap": "^0.8.40",
"@types/quoted-printable": "^1.0.2",
"@types/utf8": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/imap/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/imap/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/json-schema-to-zod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"zod": "^3.0.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/json-schema": "^7.0.15",
"zod": "catalog:"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/json-schema-to-zod/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["../../../tsconfig.json"],
"extends": ["@n8n/typescript-config/tsconfig.common.json"],
"compilerOptions": {
"rootDir": ".",
"baseUrl": "src",
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/nodes-langchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"@mozilla/readability": "0.5.0",
"@n8n/json-schema-to-zod": "workspace:*",
"@n8n/typeorm": "0.3.20-12",
"@n8n/typescript-config": "workspace:*",
"@n8n/vm2": "3.9.25",
"@pinecone-database/pinecone": "4.0.0",
"@qdrant/js-client-rest": "1.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/nodes-langchain/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"outDir": "dist",
"tsBuildInfoFile": "dist/build.tsbuildinfo"
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/nodes-langchain/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"paths": {
"@utils/*": ["./utils/*"]
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/permissions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
]
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../tsconfig.json",
"extends": "@n8n/typescript-config/tsconfig.common.json",
"compilerOptions": {
"rootDir": ".",
"types": ["node", "jest"],
Expand Down
1 change: 1 addition & 0 deletions packages/@n8n/task-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"ws": "^8.18.0"
},
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@types/lodash": "catalog:"
}
}
2 changes: 1 addition & 1 deletion packages/@n8n/task-runner/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["./tsconfig.json", "../../../tsconfig.build.json"],
"extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
Expand Down
5 changes: 4 additions & 1 deletion packages/@n8n/task-runner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": ["../../../tsconfig.json", "../../../tsconfig.backend.json"],
"extends": [
"@n8n/typescript-config/tsconfig.common.json",
"@n8n/typescript-config/tsconfig.backend.json"
],
"compilerOptions": {
"rootDir": ".",
"emitDecoratorMetadata": true,
Expand Down
19 changes: 19 additions & 0 deletions packages/@n8n/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@n8n/typescript-config",
"version": "1.1.0",
"type": "module",
"files": [
"tsconfig.backend.json",
"tsconfig.build.json",
"tsconfig.common.json",
"tsconfig.frontend.json"
],
"exports": {
"./tsconfig.backend.json": "./tsconfig.backend.json",
"./tsconfig.build.json": "./tsconfig.build.json",
"./tsconfig.common.json": "./tsconfig.common.json",
"./tsconfig.frontend.json": "./tsconfig.frontend.json",
"./*": "./*"
},
"license": "See LICENSE.md file in the root of the repository"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "./tsconfig.common.json",
"compilerOptions": {
"types": ["node", "jest"]
}
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions packages/@n8n/typescript-config/tsconfig.common.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"strict": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es2021",
"lib": ["es2021", "es2022.error", "dom"],
"removeComments": true,
"useUnknownInCatchVariables": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strictNullChecks": true,
"preserveConstEnums": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"incremental": true,
"declaration": false,
"sourceMap": true,
"skipLibCheck": true
},
"files": ["../../../node_modules/jest-expect-message/types/index.d.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.json",
"extends": "./tsconfig.common.json",
"compilerOptions": {
"target": "esnext",
"module": "esnext",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"!dist/**/e2e.*"
],
"devDependencies": {
"@n8n/typescript-config": "workspace:*",
"@redocly/cli": "^1.25.5",
"@types/aws4": "^1.5.1",
"@types/bcryptjs": "^2.4.2",
Expand Down
16 changes: 0 additions & 16 deletions packages/cli/src/__tests__/license.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,20 +285,4 @@ describe('License', () => {
);
});
});

describe('reinit', () => {
it('should reinitialize license manager', async () => {
const license = new License(mockLogger(), mock(), mock(), mock(), mock());
await license.init();

const initSpy = jest.spyOn(license, 'init');

await license.reinit();

expect(initSpy).toHaveBeenCalledWith({ forceRecreate: true });

expect(LicenseManager.prototype.reset).toHaveBeenCalled();
expect(LicenseManager.prototype.initialize).toHaveBeenCalled();
});
});
});
4 changes: 2 additions & 2 deletions packages/cli/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ export class Start extends BaseCommand {

orchestrationService.multiMainSetup
.on('leader-stepdown', async () => {
await this.license.reinit(); // to disable renewal
this.license.disableAutoRenewals();
await this.activeWorkflowManager.removeAllTriggerAndPollerBasedWorkflows();
})
.on('leader-takeover', async () => {
await this.license.reinit(); // to enable renewal
this.license.enableAutoRenewals();
await this.activeWorkflowManager.addAllTriggerAndPollerBasedWorkflows();
});
}
Expand Down
Loading

0 comments on commit 3c41f86

Please sign in to comment.