n8n-core 2.0.0-rc.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,6 @@ export declare class LocalLoadOptionsContext implements ILocalLoadOptionsFunctio
5
5
  private path;
6
6
  private workflowLoader;
7
7
  constructor(nodeTypes: INodeTypes, additionalData: IWorkflowExecuteAdditionalData, path: string, workflowLoader: IWorkflowLoader);
8
- getWorkflowNodeContext(nodeType: string): Promise<IWorkflowNodeContext | null>;
8
+ getWorkflowNodeContext(nodeType: string, useActiveVersion?: boolean): Promise<IWorkflowNodeContext | null>;
9
9
  getCurrentNodeParameter(parameterPath: string): NodeParameterValueType | object | undefined;
10
10
  }
@@ -14,13 +14,16 @@ class LocalLoadOptionsContext {
14
14
  this.path = path;
15
15
  this.workflowLoader = workflowLoader;
16
16
  }
17
- async getWorkflowNodeContext(nodeType) {
17
+ async getWorkflowNodeContext(nodeType, useActiveVersion = false) {
18
18
  const { value: workflowId } = this.getCurrentNodeParameter('workflowId');
19
19
  if (typeof workflowId !== 'string' || !workflowId) {
20
20
  throw new n8n_workflow_1.ApplicationError(`No workflowId parameter defined on node of type "${nodeType}"!`);
21
21
  }
22
22
  const dbWorkflow = await this.workflowLoader.get(workflowId);
23
- const selectedWorkflowNode = dbWorkflow.nodes.find((node) => node.type === nodeType);
23
+ if (useActiveVersion && !dbWorkflow.activeVersion) {
24
+ throw new n8n_workflow_1.ApplicationError(`No active version found for workflow "${workflowId}"!`);
25
+ }
26
+ const selectedWorkflowNode = (useActiveVersion ? dbWorkflow.activeVersion.nodes : dbWorkflow.nodes).find((node) => node.type === nodeType);
24
27
  if (selectedWorkflowNode) {
25
28
  const selectedSingleNodeWorkflow = new n8n_workflow_1.Workflow({
26
29
  id: dbWorkflow.id,
@@ -1 +1 @@
1
- {"version":3,"file":"local-load-options-context.js","sourceRoot":"","sources":["../../../src/execution-engine/node-execution-context/local-load-options-context.ts"],"names":[],"mappings":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AC1B,oBAAoB,EACpB,sBAAsB,CACtB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAED,uBAAuB,CAAC,aAAqB;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,qBAAqB,CAAC;QAEjE,aAAa,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAE9D,OAAO,IAAA,aAAG,EAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IAC3C,CAAC;CACD;AArDD,0DAqDC"}
1
+ {"version":3,"file":"local-load-options-context.js","sourceRoot":"","sources":["../../../src/execution-engine/node-execution-context/local-load-options-context.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA6B;AAC7B,+CAA+E;AAW/E,mEAAkE;AAElE,MAAa,uBAAuB;IACnC,YACS,SAAqB,EACrB,cAA8C,EAC9C,IAAY,EACZ,cAA+B;QAH/B,cAAS,GAAT,SAAS,CAAY;QACrB,mBAAc,GAAd,cAAc,CAAgC;QAC9C,SAAI,GAAJ,IAAI,CAAQ;QACZ,mBAAc,GAAd,cAAc,CAAiB;IACrC,CAAC;IAEJ,KAAK,CAAC,sBAAsB,CAC3B,QAAgB,EAChB,mBAA4B,KAAK;QAEjC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,uBAAuB,CACzD,YAAY,CACqB,CAAC;QAEnC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;YACnD,MAAM,IAAI,+BAAgB,CAAC,oDAAoD,QAAQ,IAAI,CAAC,CAAC;QAC9F,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAE7D,IAAI,gBAAgB,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;YACnD,MAAM,IAAI,+BAAgB,CAAC,yCAAyC,UAAU,IAAI,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,oBAAoB,GAAG,CAC5B,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,aAAc,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CACrE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QAEzC,IAAI,oBAAoB,EAAE,CAAC;YAC1B,MAAM,0BAA0B,GAAG,IAAI,uBAAQ,CAAC;gBAC/C,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,CAAC,oBAAoB,CAAC;gBAC7B,WAAW,EAAE,EAAE;gBACf,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,IAAI,CAAC,SAAS;aACzB,CAAC,CAAC;YAEH,MAAM,sBAAsB,GAAG;gBAC9B,GAAG,IAAI,CAAC,cAAc;gBACtB,qBAAqB,EAAE,oBAAoB,CAAC,UAAU;aACtD,CAAC;YAEF,OAAO,IAAI,+CAAuB,CACjC,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,CACtB,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IAED,uBAAuB,CAAC,aAAqB;QAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,qBAAqB,CAAC;QAEjE,aAAa,GAAG,IAAA,kCAAmB,EAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAE9D,OAAO,IAAA,aAAG,EAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IAC3C,CAAC;CACD;AA9DD,0DA8DC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-core",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0",
4
4
  "description": "Core functionality of n8n",
5
5
  "main": "dist/index",
6
6
  "types": "dist/index.d.ts",
@@ -17,14 +17,14 @@
17
17
  ],
18
18
  "devDependencies": {
19
19
  "@types/express": "^5.0.1",
20
- "@types/jsonwebtoken": "^9.0.9",
20
+ "@types/jsonwebtoken": "9.0.10",
21
21
  "@types/lodash": "4.17.17",
22
22
  "@types/mime-types": "3.0.1",
23
23
  "@types/proxy-from-env": "^1.0.4",
24
24
  "@types/uuid": "^10.0.0",
25
25
  "@types/xml2js": "^0.4.14",
26
- "@n8n/typescript-config": "1.3.0",
27
- "@n8n/errors": "0.5.0"
26
+ "@n8n/errors": "0.5.0",
27
+ "@n8n/typescript-config": "1.3.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "@aws-sdk/client-s3": "3.808.0",
@@ -42,7 +42,7 @@
42
42
  "http-proxy-agent": "7.0.2",
43
43
  "https-proxy-agent": "7.0.6",
44
44
  "iconv-lite": "0.6.3",
45
- "jsonwebtoken": "9.0.2",
45
+ "jsonwebtoken": "9.0.3",
46
46
  "lodash": "4.17.21",
47
47
  "luxon": "3.4.4",
48
48
  "mime-types": "3.0.1",
@@ -58,13 +58,13 @@
58
58
  "winston": "3.14.2",
59
59
  "xml2js": "0.6.2",
60
60
  "zod": "3.25.67",
61
- "@n8n/backend-common": "1.0.0-rc.2",
61
+ "@n8n/backend-common": "1.0.0",
62
62
  "@n8n/client-oauth2": "1.0.0-rc.0",
63
63
  "@n8n/config": "2.0.0-rc.1",
64
- "@n8n/decorators": "1.0.0-rc.2",
65
64
  "@n8n/constants": "0.14.0",
66
- "n8n-workflow": "2.0.0-rc.2",
67
- "@n8n/di": "0.10.0"
65
+ "@n8n/decorators": "1.0.0",
66
+ "@n8n/di": "0.10.0",
67
+ "n8n-workflow": "2.0.0"
68
68
  },
69
69
  "license": "SEE LICENSE IN LICENSE.md",
70
70
  "homepage": "https://n8n.io",