n8n-workflow 0.113.0 → 0.115.1

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.
Files changed (80) hide show
  1. package/LICENSE.md +49 -20
  2. package/dist/src/Cron.d.ts +34 -0
  3. package/dist/src/Cron.js +25 -0
  4. package/dist/src/Cron.js.map +1 -0
  5. package/dist/src/DeferredPromise.d.ts +0 -0
  6. package/dist/src/DeferredPromise.js +0 -0
  7. package/dist/src/DeferredPromise.js.map +0 -0
  8. package/dist/src/Expression.d.ts +0 -0
  9. package/dist/src/Expression.js +0 -0
  10. package/dist/src/Expression.js.map +0 -0
  11. package/dist/src/ExpressionError.d.ts +0 -0
  12. package/dist/src/ExpressionError.js +0 -0
  13. package/dist/src/ExpressionError.js.map +0 -0
  14. package/dist/src/Interfaces.d.ts +5 -2
  15. package/dist/src/Interfaces.js +0 -0
  16. package/dist/src/Interfaces.js.map +1 -1
  17. package/dist/src/LoggerProxy.d.ts +0 -0
  18. package/dist/src/LoggerProxy.js +0 -0
  19. package/dist/src/LoggerProxy.js.map +0 -0
  20. package/dist/src/NodeErrors.d.ts +0 -0
  21. package/dist/src/NodeErrors.js +0 -0
  22. package/dist/src/NodeErrors.js.map +0 -0
  23. package/dist/src/NodeHelpers.d.ts +3 -2
  24. package/dist/src/NodeHelpers.js +194 -193
  25. package/dist/src/NodeHelpers.js.map +1 -1
  26. package/dist/src/ObservableObject.d.ts +0 -0
  27. package/dist/src/ObservableObject.js +0 -0
  28. package/dist/src/ObservableObject.js.map +0 -0
  29. package/dist/src/RoutingNode.d.ts +0 -0
  30. package/dist/src/RoutingNode.js +0 -0
  31. package/dist/src/RoutingNode.js.map +0 -0
  32. package/dist/src/TelemetryHelpers.d.ts +0 -0
  33. package/dist/src/TelemetryHelpers.js +0 -0
  34. package/dist/src/TelemetryHelpers.js.map +0 -0
  35. package/dist/src/Workflow.d.ts +0 -0
  36. package/dist/src/Workflow.js +0 -0
  37. package/dist/src/Workflow.js.map +0 -0
  38. package/dist/src/WorkflowActivationError.d.ts +0 -0
  39. package/dist/src/WorkflowActivationError.js +0 -0
  40. package/dist/src/WorkflowActivationError.js.map +0 -0
  41. package/dist/src/WorkflowDataProxy.d.ts +0 -0
  42. package/dist/src/WorkflowDataProxy.js +1 -1
  43. package/dist/src/WorkflowDataProxy.js.map +1 -1
  44. package/dist/src/WorkflowErrors.d.ts +0 -0
  45. package/dist/src/WorkflowErrors.js +0 -0
  46. package/dist/src/WorkflowErrors.js.map +0 -0
  47. package/dist/src/WorkflowHooks.d.ts +0 -0
  48. package/dist/src/WorkflowHooks.js +0 -0
  49. package/dist/src/WorkflowHooks.js.map +0 -0
  50. package/dist/src/index.d.ts +1 -0
  51. package/dist/src/index.js +1 -0
  52. package/dist/src/index.js.map +1 -1
  53. package/dist/test/Cron.test.d.ts +1 -0
  54. package/dist/test/Cron.test.js +70 -0
  55. package/dist/test/Cron.test.js.map +1 -0
  56. package/dist/test/Expression.test.d.ts +0 -0
  57. package/dist/test/Expression.test.js +0 -0
  58. package/dist/test/Expression.test.js.map +0 -0
  59. package/dist/test/Helpers.d.ts +0 -0
  60. package/dist/test/Helpers.js +2 -2
  61. package/dist/test/Helpers.js.map +1 -1
  62. package/dist/test/NodeHelpers.test.d.ts +0 -0
  63. package/dist/test/NodeHelpers.test.js +3 -3
  64. package/dist/test/NodeHelpers.test.js.map +1 -1
  65. package/dist/test/ObservableObject.test.d.ts +0 -0
  66. package/dist/test/ObservableObject.test.js +0 -0
  67. package/dist/test/ObservableObject.test.js.map +0 -0
  68. package/dist/test/RoutingNode.test.d.ts +0 -0
  69. package/dist/test/RoutingNode.test.js +3 -3
  70. package/dist/test/RoutingNode.test.js.map +0 -0
  71. package/dist/test/TelemetryHelpers.test.d.ts +0 -0
  72. package/dist/test/TelemetryHelpers.test.js +0 -0
  73. package/dist/test/TelemetryHelpers.test.js.map +0 -0
  74. package/dist/test/Workflow.test.d.ts +0 -0
  75. package/dist/test/Workflow.test.js +0 -0
  76. package/dist/test/Workflow.test.js.map +0 -0
  77. package/dist/test/WorkflowDataProxy.test.d.ts +0 -0
  78. package/dist/test/WorkflowDataProxy.test.js +0 -0
  79. package/dist/test/WorkflowDataProxy.test.js.map +0 -0
  80. package/package.json +1 -1
package/LICENSE.md CHANGED
@@ -1,43 +1,69 @@
1
- # Sustainable Use License
1
+ # License
2
+
3
+ Portions of this software are licensed as follows:
4
+
5
+ - All source code files of this repository that contain ".ee." in their filename are licensed under the n8n Enterprise License defined in "LICENSE_EE.md".
6
+ - All third party components incorporated into the n8n Software are licensed under the original license
7
+ provided by the owner of the applicable component.
8
+ - Content outside of the above mentioned files or restrictions above is available under the "Sustainable Use
9
+ License" as defined below.
10
+
11
+ ## Sustainable Use License
2
12
 
3
13
  Version 1.0
4
14
 
5
- ## Acceptance
15
+ ### Acceptance
6
16
 
7
17
  By using the software, you agree to all of the terms and conditions below.
8
18
 
9
- ## Copyright License
19
+ ### Copyright License
10
20
 
11
- The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below.
21
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license
22
+ to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject
23
+ to the limitations below.
12
24
 
13
- ## Limitations
25
+ ### Limitations
14
26
 
15
- You may use or modify the software only for your own internal business purposes or for non-commercial or personal use.
16
- You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes.
17
- You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
27
+ You may use or modify the software only for your own internal business purposes or for non-commercial or
28
+ personal use. You may distribute the software or provide it to others only if you do so free of charge for
29
+ non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of
30
+ the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
18
31
 
19
- ## Patents
32
+ ### Patents
20
33
 
21
- The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
34
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to
35
+ license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case
36
+ subject to the limitations and conditions in this license. This license does not cover any patent claims that
37
+ you cause to be infringed by modifications or additions to the software. If you or your company make any
38
+ written claim that the software infringes or contributes to infringement of any patent, your patent license
39
+ for the software granted under these terms ends immediately. If your company makes such a claim, your patent
40
+ license ends immediately for work on behalf of your company.
22
41
 
23
- ## Notices
42
+ ### Notices
24
43
 
25
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
26
- If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software.
44
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these
45
+ terms. If you modify the software, you must include in any modified copies of the software a prominent notice
46
+ stating that you have modified the software.
27
47
 
28
- ## No Other Rights
48
+ ### No Other Rights
29
49
 
30
50
  These terms do not imply any licenses other than those expressly granted in these terms.
31
51
 
32
- ## Termination
52
+ ### Termination
33
53
 
34
- If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently.
54
+ If you use the software in violation of these terms, such use is not licensed, and your license will
55
+ automatically terminate. If the licensor provides you with a notice of your violation, and you cease all
56
+ violation of this license no later than 30 days after you receive that notice, your license will be reinstated
57
+ retroactively. However, if you violate these terms after such reinstatement, any additional violation of these
58
+ terms will cause your license to terminate automatically and permanently.
35
59
 
36
- ## No Liability
60
+ ### No Liability
37
61
 
38
- As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
62
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will
63
+ not be liable to you for any damages arising out of these terms or the use or nature of the software, under
64
+ any kind of legal claim.
39
65
 
40
- ## Definitions
66
+ ### Definitions
41
67
 
42
68
  The “licensor” is the entity offering these terms.
43
69
 
@@ -45,7 +71,10 @@ The “software” is the software the licensor makes available under these term
45
71
 
46
72
  “You” refers to the individual or entity agreeing to these terms.
47
73
 
48
- “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
74
+ “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus
75
+ all organizations that have control over, are under the control of, or are under common control with that
76
+ organization. Control means ownership of substantially all the assets of an entity, or the power to direct its
77
+ management and policies by vote, contract, or otherwise. Control can be direct or indirect.
49
78
 
50
79
  “Your license” is the license granted to you for the software under these terms.
51
80
 
@@ -0,0 +1,34 @@
1
+ interface BaseTriggerTime<T extends string> {
2
+ mode: T;
3
+ }
4
+ declare type CronExpression = string;
5
+ interface CustomTrigger extends BaseTriggerTime<'custom'> {
6
+ cronExpression: CronExpression;
7
+ }
8
+ interface EveryX<U extends string> extends BaseTriggerTime<'everyX'> {
9
+ unit: U;
10
+ value: number;
11
+ }
12
+ declare type EveryMinute = BaseTriggerTime<'everyMinute'>;
13
+ declare type EveryXMinutes = EveryX<'minutes'>;
14
+ interface EveryHour extends BaseTriggerTime<'everyHour'> {
15
+ minute: number;
16
+ }
17
+ declare type EveryXHours = EveryX<'hours'>;
18
+ interface EveryDay extends BaseTriggerTime<'everyDay'> {
19
+ hour: number;
20
+ minute: number;
21
+ }
22
+ interface EveryWeek extends BaseTriggerTime<'everyWeek'> {
23
+ hour: number;
24
+ minute: number;
25
+ weekday: number;
26
+ }
27
+ interface EveryMonth extends BaseTriggerTime<'everyMonth'> {
28
+ hour: number;
29
+ minute: number;
30
+ dayOfMonth: number;
31
+ }
32
+ export declare type TriggerTime = CustomTrigger | EveryMinute | EveryXMinutes | EveryHour | EveryXHours | EveryDay | EveryWeek | EveryMonth;
33
+ export declare const toCronExpression: (item: TriggerTime) => CronExpression;
34
+ export {};
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toCronExpression = void 0;
4
+ const randomSecond = () => Math.floor(Math.random() * 60).toString();
5
+ const toCronExpression = (item) => {
6
+ if (item.mode === 'everyMinute')
7
+ return `${randomSecond()} * * * * *`;
8
+ if (item.mode === 'everyHour')
9
+ return `${randomSecond()} ${item.minute} * * * *`;
10
+ if (item.mode === 'everyX') {
11
+ if (item.unit === 'minutes')
12
+ return `${randomSecond()} */${item.value} * * * *`;
13
+ if (item.unit === 'hours')
14
+ return `${randomSecond()} 0 */${item.value} * * *`;
15
+ }
16
+ if (item.mode === 'everyDay')
17
+ return `${randomSecond()} ${item.minute} ${item.hour} * * *`;
18
+ if (item.mode === 'everyWeek')
19
+ return `${randomSecond()} ${item.minute} ${item.hour} * * ${item.weekday}`;
20
+ if (item.mode === 'everyMonth')
21
+ return `${randomSecond()} ${item.minute} ${item.hour} ${item.dayOfMonth} * *`;
22
+ return item.cronExpression.trim();
23
+ };
24
+ exports.toCronExpression = toCronExpression;
25
+ //# sourceMappingURL=Cron.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cron.js","sourceRoot":"","sources":["../../src/Cron.ts"],"names":[],"mappings":";;;AAiDA,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,IAAiB,EAAkB,EAAE;IACrE,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,GAAG,YAAY,EAAE,YAAY,CAAC;IACtE,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,GAAG,YAAY,EAAE,IAAI,IAAI,CAAC,MAAM,UAAU,CAAC;IAEjF,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,GAAG,YAAY,EAAE,MAAM,IAAI,CAAC,KAAK,UAAU,CAAC;QAChF,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;YAAE,OAAO,GAAG,YAAY,EAAE,QAAQ,IAAI,CAAC,KAAK,QAAQ,CAAC;KAC9E;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,GAAG,YAAY,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,QAAQ,CAAC;IAC3F,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;QAC5B,OAAO,GAAG,YAAY,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;IAE5E,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;QAC7B,OAAO,GAAG,YAAY,EAAE,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,MAAM,CAAC;IAE/E,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;AACnC,CAAC,CAAC;AAhBW,QAAA,gBAAgB,oBAgB3B"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -498,7 +498,7 @@ export interface INode {
498
498
  webhookId?: string;
499
499
  }
500
500
  export interface IPinData {
501
- [nodeName: string]: IDataObject[];
501
+ [nodeName: string]: INodeExecutionData[];
502
502
  }
503
503
  export interface INodes {
504
504
  [key: string]: INode;
@@ -612,7 +612,7 @@ export interface ITriggerResponse {
612
612
  }
613
613
  export interface INodeType {
614
614
  description: INodeTypeDescription;
615
- execute?(this: IExecuteFunctions): Promise<INodeExecutionData[][] | null>;
615
+ execute?(this: IExecuteFunctions): Promise<INodeExecutionData[][] | NodeExecutionWithMetadata[][] | null>;
616
616
  executeSingle?(this: IExecuteSingleFunctions): Promise<INodeExecutionData>;
617
617
  poll?(this: IPollFunctions): Promise<INodeExecutionData[][] | null>;
618
618
  trigger?(this: ITriggerFunctions): Promise<ITriggerResponse | undefined>;
@@ -1122,4 +1122,7 @@ export declare type PublicInstalledNode = {
1122
1122
  latestVersion: string;
1123
1123
  package: PublicInstalledPackage;
1124
1124
  };
1125
+ export interface NodeExecutionWithMetadata extends INodeExecutionData {
1126
+ pairedItem: IPairedItemData | IPairedItemData[];
1127
+ }
1125
1128
  export {};
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";;;AA2EA,MAAsB,YAAY;IAWjC,YACC,eAAwC,EACxC,IAAY,EACZ,WAAoC,EACpC,IAAa;QAGb,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,EAAE,IAAI,SAAS,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CAaD;AApCD,oCAoCC;AA4DD,MAAsB,kBAAkB;IAGvC,YAAY,aAAqB;QAChC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACpC,CAAC;CAwCD;AA7CD,gDA6CC;AAu2CD,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,0DAAuC,CAAA;IACvC,0DAAuC,CAAA;AACxC,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B"}
1
+ {"version":3,"file":"Interfaces.js","sourceRoot":"","sources":["../../src/Interfaces.ts"],"names":[],"mappings":";;;AA2EA,MAAsB,YAAY;IAWjC,YACC,eAAwC,EACxC,IAAY,EACZ,WAAoC,EACpC,IAAa;QAGb,IAAI,CAAC,EAAE,GAAG,eAAe,CAAC,EAAE,IAAI,SAAS,CAAC;QAC1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;CAaD;AApCD,oCAoCC;AA4DD,MAAsB,kBAAkB;IAGvC,YAAY,aAAqB;QAChC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACpC,CAAC;CAwCD;AA7CD,gDA6CC;AAy2CD,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,0DAAuC,CAAA;IACvC,0DAAuC,CAAA;AACxC,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,6 @@
1
- import { IContextObject, INode, INodeCredentialDescription, INodeExecutionData, INodeIssues, INodeParameters, INodeProperties, INodeType, INodeVersionedType, IParameterDependencies, IRunExecutionData, IWebhookData, IWorkflowExecuteAdditionalData, NodeParameterValue } from './Interfaces';
1
+ import { IContextObject, INode, INodeCredentialDescription, INodeExecutionData, INodeIssues, INodeParameters, INodeProperties, INodePropertyCollection, INodeType, INodeVersionedType, IParameterDependencies, IRunExecutionData, IWebhookData, IWorkflowExecuteAdditionalData, NodeParameterValue } from './Interfaces';
2
2
  import { Workflow } from './Workflow';
3
+ export declare const cronNodeOptions: INodePropertyCollection[];
3
4
  export declare function getSpecialNodeParameters(nodeType: INodeType): INodeProperties[];
4
5
  export declare function displayParameter(nodeValues: INodeParameters, parameter: INodeProperties | INodeCredentialDescription, node: INode | null, nodeValuesRoot?: INodeParameters): boolean;
5
6
  export declare function displayParameterPath(nodeValues: INodeParameters, parameter: INodeProperties | INodeCredentialDescription, path: string, node: INode | null): boolean;
@@ -8,7 +9,7 @@ export declare function getParamterDependencies(nodePropertiesArray: INodeProper
8
9
  export declare function getParamterResolveOrder(nodePropertiesArray: INodeProperties[], parameterDependencies: IParameterDependencies): number[];
9
10
  export declare function getNodeParameters(nodePropertiesArray: INodeProperties[], nodeValues: INodeParameters, returnDefaults: boolean, returnNoneDisplayed: boolean, node: INode | null, onlySimpleTypes?: boolean, dataIsResolved?: boolean, nodeValuesRoot?: INodeParameters, parentType?: string, parameterDependencies?: IParameterDependencies): INodeParameters | null;
10
11
  export declare function prepareOutputData(outputData: INodeExecutionData[], outputIndex?: number): Promise<INodeExecutionData[][]>;
11
- export declare function getNodeWebhooks(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, ignoreRestartWehbooks?: boolean): IWebhookData[];
12
+ export declare function getNodeWebhooks(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, ignoreRestartWebhooks?: boolean): IWebhookData[];
12
13
  export declare function getNodeWebhookPath(workflowId: string, node: INode, path: string, isFullPath?: boolean, restartWebhook?: boolean): string;
13
14
  export declare function getNodeWebhookUrl(baseUrl: string, workflowId: string, node: INode, path: string, isFullPath?: boolean): string;
14
15
  export declare function getNodeParametersIssues(nodePropertiesArray: INodeProperties[], node: INode, pinDataNodeNames?: string[]): INodeIssues | null;