n8n-core 1.14.1 → 1.15.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.
- package/dist/BinaryData/BinaryData.service.js.map +1 -1
- package/dist/Constants.d.ts +1 -0
- package/dist/Constants.js +2 -1
- package/dist/Constants.js.map +1 -1
- package/dist/NodeExecuteFunctions.d.ts +5 -5
- package/dist/NodeExecuteFunctions.js +195 -48
- package/dist/NodeExecuteFunctions.js.map +1 -1
- package/dist/WorkflowExecute.js +64 -3
- package/dist/WorkflowExecute.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/decorators/LogCatch.decorator.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BinaryData.service.js","sourceRoot":"","sources":["../../src/BinaryData/BinaryData.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"BinaryData.service.js","sourceRoot":"","sources":["../../src/BinaryData/BinaryData.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkD;AAClD,gEAAuC;AACvC,iDAA4C;AAC5C,+CAAmF;AACnF,qCAAiE;AACjE,mCAAmD;AACnD,yEAA4D;AAOrD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QACE,SAAI,GAA2B,SAAS,CAAC;QAEzC,aAAQ,GAAuC,EAAE,CAAC;IA2O3D,CAAC;IAzOA,KAAK,CAAC,IAAI,CAAC,MAAyB;QACnC,IAAI,CAAC,IAAA,sBAAc,EAAC,MAAM,CAAC,cAAc,CAAC;YAAE,MAAM,IAAI,yBAAgB,EAAE,CAAC;QAEzE,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QAEzE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ENV = "N8N_CUSTOM_EXTENSIONS";
|
|
2
2
|
export declare const PLACEHOLDER_EMPTY_EXECUTION_ID = "__UNKNOWN__";
|
|
3
3
|
export declare const PLACEHOLDER_EMPTY_WORKFLOW_ID = "__EMPTY__";
|
|
4
|
+
export declare const HTTP_REQUEST_NODE_TYPE = "n8n-nodes-base.httpRequest";
|
|
4
5
|
export declare const CUSTOM_NODES_CATEGORY = "Custom Nodes";
|
|
5
6
|
export declare const RESTRICT_FILE_ACCESS_TO = "N8N_RESTRICT_FILE_ACCESS_TO";
|
|
6
7
|
export declare const BLOCK_FILE_ACCESS_TO_N8N_FILES = "N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES";
|
package/dist/Constants.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UM_EMAIL_TEMPLATES_PWRESET = exports.UM_EMAIL_TEMPLATES_INVITE = exports.BINARY_DATA_STORAGE_PATH = exports.CONFIG_FILES = exports.BLOCK_FILE_ACCESS_TO_N8N_FILES = exports.RESTRICT_FILE_ACCESS_TO = exports.CUSTOM_NODES_CATEGORY = exports.PLACEHOLDER_EMPTY_WORKFLOW_ID = exports.PLACEHOLDER_EMPTY_EXECUTION_ID = exports.CUSTOM_EXTENSION_ENV = void 0;
|
|
3
|
+
exports.UM_EMAIL_TEMPLATES_PWRESET = exports.UM_EMAIL_TEMPLATES_INVITE = exports.BINARY_DATA_STORAGE_PATH = exports.CONFIG_FILES = exports.BLOCK_FILE_ACCESS_TO_N8N_FILES = exports.RESTRICT_FILE_ACCESS_TO = exports.CUSTOM_NODES_CATEGORY = exports.HTTP_REQUEST_NODE_TYPE = exports.PLACEHOLDER_EMPTY_WORKFLOW_ID = exports.PLACEHOLDER_EMPTY_EXECUTION_ID = exports.CUSTOM_EXTENSION_ENV = void 0;
|
|
4
4
|
exports.CUSTOM_EXTENSION_ENV = 'N8N_CUSTOM_EXTENSIONS';
|
|
5
5
|
exports.PLACEHOLDER_EMPTY_EXECUTION_ID = '__UNKNOWN__';
|
|
6
6
|
exports.PLACEHOLDER_EMPTY_WORKFLOW_ID = '__EMPTY__';
|
|
7
|
+
exports.HTTP_REQUEST_NODE_TYPE = 'n8n-nodes-base.httpRequest';
|
|
7
8
|
exports.CUSTOM_NODES_CATEGORY = 'Custom Nodes';
|
|
8
9
|
exports.RESTRICT_FILE_ACCESS_TO = 'N8N_RESTRICT_FILE_ACCESS_TO';
|
|
9
10
|
exports.BLOCK_FILE_ACCESS_TO_N8N_FILES = 'N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES';
|
package/dist/Constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,uBAAuB,CAAC;AAC/C,QAAA,8BAA8B,GAAG,aAAa,CAAC;AAC/C,QAAA,6BAA6B,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Constants.js","sourceRoot":"","sources":["../src/Constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,uBAAuB,CAAC;AAC/C,QAAA,8BAA8B,GAAG,aAAa,CAAC;AAC/C,QAAA,6BAA6B,GAAG,WAAW,CAAC;AAC5C,QAAA,sBAAsB,GAAG,4BAA4B,CAAC;AAEtD,QAAA,qBAAqB,GAAG,cAAc,CAAC;AAEvC,QAAA,uBAAuB,GAAG,6BAA6B,CAAC;AACxD,QAAA,8BAA8B,GAAG,oCAAoC,CAAC;AACtE,QAAA,YAAY,GAAG,kBAAkB,CAAC;AAClC,QAAA,wBAAwB,GAAG,8BAA8B,CAAC;AAC1D,QAAA,yBAAyB,GAAG,+BAA+B,CAAC;AAC5D,QAAA,0BAA0B,GAAG,gCAAgC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { IncomingMessage } from 'http';
|
|
4
4
|
import type { IAdditionalCredentialOptions, IAllExecuteFunctions, IBinaryData, ICredentialDataDecryptedObject, ICredentialTestFunctions, IDataObject, IExecuteData, IExecuteFunctions, IExecuteSingleFunctions, IGetNodeParameterOptions, IHookFunctions, IHttpRequestOptions, ILoadOptionsFunctions, INode, INodeExecutionData, INodeType, IOAuth2Options, IPairedItemData, IPollFunctions, IRunExecutionData, ITaskDataConnections, ITriggerFunctions, IWebhookData, IWebhookDescription, IWebhookFunctions, IWorkflowDataProxyAdditionalKeys, IWorkflowExecuteAdditionalData, NodeExecutionWithMetadata, NodeParameterValueType, Workflow, WorkflowActivateMode, WorkflowExecuteMode } from 'n8n-workflow';
|
|
5
|
-
import type {
|
|
6
|
-
import type { RequestPromiseOptions } from 'request-promise-native';
|
|
5
|
+
import type { OptionsWithUrl } from 'request';
|
|
6
|
+
import type { OptionsWithUri, RequestPromiseOptions } from 'request-promise-native';
|
|
7
7
|
import { Readable } from 'stream';
|
|
8
8
|
import type { BinaryData } from './BinaryData/types';
|
|
9
9
|
export declare function parseIncomingMessage(message: IncomingMessage): void;
|
|
@@ -29,10 +29,10 @@ export declare function getAdditionalKeys(additionalData: IWorkflowExecuteAdditi
|
|
|
29
29
|
}): IWorkflowDataProxyAdditionalKeys;
|
|
30
30
|
export declare function getCredentials(workflow: Workflow, node: INode, type: string, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, runExecutionData?: IRunExecutionData | null, runIndex?: number, connectionInputData?: INodeExecutionData[], itemIndex?: number): Promise<ICredentialDataDecryptedObject>;
|
|
31
31
|
export declare const validateValueAgainstSchema: (node: INode, nodeType: INodeType, parameterValue: string | number | boolean | object | null | undefined, parameterName: string, runIndex: number, itemIndex: number) => string | number | boolean | object | null | undefined;
|
|
32
|
-
export declare function getNodeParameter(workflow: Workflow, runExecutionData: IRunExecutionData | null, runIndex: number, connectionInputData: INodeExecutionData[], node: INode, parameterName: string, itemIndex: number, mode: WorkflowExecuteMode,
|
|
32
|
+
export declare function getNodeParameter(workflow: Workflow, runExecutionData: IRunExecutionData | null, runIndex: number, connectionInputData: INodeExecutionData[], node: INode, parameterName: string, itemIndex: number, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, executeData?: IExecuteData, fallbackValue?: any, options?: IGetNodeParameterOptions): NodeParameterValueType | object;
|
|
33
33
|
export declare function continueOnFail(node: INode): boolean;
|
|
34
|
-
export declare function getNodeWebhookUrl(name: string, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode,
|
|
35
|
-
export declare function getTimezone(workflow: Workflow
|
|
34
|
+
export declare function getNodeWebhookUrl(name: string, workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, additionalKeys: IWorkflowDataProxyAdditionalKeys, isTest?: boolean): string | undefined;
|
|
35
|
+
export declare function getTimezone(workflow: Workflow): string;
|
|
36
36
|
export declare function getWebhookDescription(name: string, workflow: Workflow, node: INode): IWebhookDescription | undefined;
|
|
37
37
|
export declare function copyInputItems(items: INodeExecutionData[], properties: string[]): IDataObject[];
|
|
38
38
|
export declare function getExecutePollFunctions(workflow: Workflow, node: INode, additionalData: IWorkflowExecuteAdditionalData, mode: WorkflowExecuteMode, activation: WorkflowActivateMode): IPollFunctions;
|
|
@@ -52,6 +52,7 @@ const OAuth2Helper_1 = require("./OAuth2Helper");
|
|
|
52
52
|
const WorkflowExecutionMetadata_1 = require("./WorkflowExecutionMetadata");
|
|
53
53
|
const Secrets_1 = require("./Secrets");
|
|
54
54
|
const typedi_1 = __importDefault(require("typedi"));
|
|
55
|
+
const merge_1 = __importDefault(require("lodash/merge"));
|
|
55
56
|
const InstanceSettings_1 = require("./InstanceSettings");
|
|
56
57
|
axios_1.default.defaults.timeout = 300000;
|
|
57
58
|
axios_1.default.defaults.headers.post = {};
|
|
@@ -1033,7 +1034,7 @@ async function httpRequestWithAuthentication(credentialsType, requestOptions, wo
|
|
|
1033
1034
|
if (data) {
|
|
1034
1035
|
Object.assign(credentialsDecrypted, data);
|
|
1035
1036
|
}
|
|
1036
|
-
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node
|
|
1037
|
+
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node);
|
|
1037
1038
|
return await httpRequest(requestOptions);
|
|
1038
1039
|
}
|
|
1039
1040
|
catch (error) {
|
|
@@ -1045,7 +1046,7 @@ async function httpRequestWithAuthentication(credentialsType, requestOptions, wo
|
|
|
1045
1046
|
if (data) {
|
|
1046
1047
|
Object.assign(credentialsDecrypted, data);
|
|
1047
1048
|
}
|
|
1048
|
-
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node
|
|
1049
|
+
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node);
|
|
1049
1050
|
}
|
|
1050
1051
|
return await httpRequest(requestOptions);
|
|
1051
1052
|
}
|
|
@@ -1136,7 +1137,7 @@ async function requestWithAuthentication(credentialsType, requestOptions, workfl
|
|
|
1136
1137
|
if (data) {
|
|
1137
1138
|
Object.assign(credentialsDecrypted, data);
|
|
1138
1139
|
}
|
|
1139
|
-
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node
|
|
1140
|
+
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node);
|
|
1140
1141
|
return await proxyRequestToAxios(workflow, additionalData, node, requestOptions);
|
|
1141
1142
|
}
|
|
1142
1143
|
catch (error) {
|
|
@@ -1145,7 +1146,7 @@ async function requestWithAuthentication(credentialsType, requestOptions, workfl
|
|
|
1145
1146
|
const data = await additionalData.credentialsHelper.preAuthentication({ helpers: this.helpers }, credentialsDecrypted, credentialsType, node, true);
|
|
1146
1147
|
if (data) {
|
|
1147
1148
|
Object.assign(credentialsDecrypted, data);
|
|
1148
|
-
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node
|
|
1149
|
+
requestOptions = await additionalData.credentialsHelper.authenticate(credentialsDecrypted, credentialsType, requestOptions, workflow, node);
|
|
1149
1150
|
return await proxyRequestToAxios(workflow, additionalData, node, requestOptions);
|
|
1150
1151
|
}
|
|
1151
1152
|
}
|
|
@@ -1211,7 +1212,7 @@ async function getCredentials(workflow, node, type, additionalData, mode, runExe
|
|
|
1211
1212
|
if (nodeType === undefined) {
|
|
1212
1213
|
throw new n8n_workflow_1.NodeOperationError(node, `Node type "${node.type}" is not known so can not get credentials!`);
|
|
1213
1214
|
}
|
|
1214
|
-
const fullAccess = [
|
|
1215
|
+
const fullAccess = [Constants_1.HTTP_REQUEST_NODE_TYPE].includes(node.type);
|
|
1215
1216
|
let nodeCredentialDescription;
|
|
1216
1217
|
if (!fullAccess) {
|
|
1217
1218
|
if (nodeType.description.credentials === undefined) {
|
|
@@ -1257,7 +1258,7 @@ async function getCredentials(workflow, node, type, additionalData, mode, runExe
|
|
|
1257
1258
|
const nodeCredentials = node.credentials
|
|
1258
1259
|
? node.credentials[type]
|
|
1259
1260
|
: {};
|
|
1260
|
-
const decryptedDataObject = await additionalData.credentialsHelper.getDecrypted(additionalData, nodeCredentials, type, mode,
|
|
1261
|
+
const decryptedDataObject = await additionalData.credentialsHelper.getDecrypted(additionalData, nodeCredentials, type, mode, false, expressionResolveValues);
|
|
1261
1262
|
return decryptedDataObject;
|
|
1262
1263
|
}
|
|
1263
1264
|
exports.getCredentials = getCredentials;
|
|
@@ -1402,7 +1403,7 @@ const validateValueAgainstSchema = (node, nodeType, parameterValue, parameterNam
|
|
|
1402
1403
|
return validationResult.newValue;
|
|
1403
1404
|
};
|
|
1404
1405
|
exports.validateValueAgainstSchema = validateValueAgainstSchema;
|
|
1405
|
-
function getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
1406
|
+
function getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, additionalKeys, executeData, fallbackValue, options) {
|
|
1406
1407
|
var _a;
|
|
1407
1408
|
const nodeType = workflow.nodeTypes.getByNameAndVersion(node.type, node.typeVersion);
|
|
1408
1409
|
if (nodeType === undefined) {
|
|
@@ -1417,7 +1418,7 @@ function getNodeParameter(workflow, runExecutionData, runIndex, connectionInputD
|
|
|
1417
1418
|
}
|
|
1418
1419
|
let returnData;
|
|
1419
1420
|
try {
|
|
1420
|
-
returnData = workflow.expression.getParameterValue(value, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, mode,
|
|
1421
|
+
returnData = workflow.expression.getParameterValue(value, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, mode, additionalKeys, executeData, false, {}, (_a = options === null || options === void 0 ? void 0 : options.contextNode) === null || _a === void 0 ? void 0 : _a.name);
|
|
1421
1422
|
cleanupParameterData(returnData);
|
|
1422
1423
|
}
|
|
1423
1424
|
catch (e) {
|
|
@@ -1439,10 +1440,14 @@ function getNodeParameter(workflow, runExecutionData, runIndex, connectionInputD
|
|
|
1439
1440
|
}
|
|
1440
1441
|
exports.getNodeParameter = getNodeParameter;
|
|
1441
1442
|
function continueOnFail(node) {
|
|
1442
|
-
|
|
1443
|
+
const onError = (0, get_1.default)(node, 'onError', undefined);
|
|
1444
|
+
if (onError === undefined) {
|
|
1445
|
+
return (0, get_1.default)(node, 'continueOnFail', false);
|
|
1446
|
+
}
|
|
1447
|
+
return ['continueRegularOutput', 'continueErrorOutput'].includes(onError);
|
|
1443
1448
|
}
|
|
1444
1449
|
exports.continueOnFail = continueOnFail;
|
|
1445
|
-
function getNodeWebhookUrl(name, workflow, node, additionalData, mode,
|
|
1450
|
+
function getNodeWebhookUrl(name, workflow, node, additionalData, mode, additionalKeys, isTest) {
|
|
1446
1451
|
let baseUrl = additionalData.webhookBaseUrl;
|
|
1447
1452
|
if (isTest === true) {
|
|
1448
1453
|
baseUrl = additionalData.webhookTestBaseUrl;
|
|
@@ -1451,19 +1456,17 @@ function getNodeWebhookUrl(name, workflow, node, additionalData, mode, timezone,
|
|
|
1451
1456
|
if (webhookDescription === undefined) {
|
|
1452
1457
|
return undefined;
|
|
1453
1458
|
}
|
|
1454
|
-
const path = workflow.expression.getSimpleParameterValue(node, webhookDescription.path, mode,
|
|
1459
|
+
const path = workflow.expression.getSimpleParameterValue(node, webhookDescription.path, mode, additionalKeys);
|
|
1455
1460
|
if (path === undefined) {
|
|
1456
1461
|
return undefined;
|
|
1457
1462
|
}
|
|
1458
|
-
const isFullPath = workflow.expression.getSimpleParameterValue(node, webhookDescription.isFullPath, mode,
|
|
1463
|
+
const isFullPath = workflow.expression.getSimpleParameterValue(node, webhookDescription.isFullPath, mode, additionalKeys, undefined, false);
|
|
1459
1464
|
return n8n_workflow_1.NodeHelpers.getNodeWebhookUrl(baseUrl, workflow.id, node, path.toString(), isFullPath);
|
|
1460
1465
|
}
|
|
1461
1466
|
exports.getNodeWebhookUrl = getNodeWebhookUrl;
|
|
1462
|
-
function getTimezone(workflow
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}
|
|
1466
|
-
return additionalData.timezone;
|
|
1467
|
+
function getTimezone(workflow) {
|
|
1468
|
+
var _a;
|
|
1469
|
+
return (_a = workflow.settings.timezone) !== null && _a !== void 0 ? _a : (0, n8n_workflow_1.getGlobalState)().defaultTimezone;
|
|
1467
1470
|
}
|
|
1468
1471
|
exports.getTimezone = getTimezone;
|
|
1469
1472
|
function getWebhookDescription(name, workflow, node) {
|
|
@@ -1569,25 +1572,169 @@ const getCommonWorkflowFunctions = (workflow, node, additionalData) => ({
|
|
|
1569
1572
|
getRestApiUrl: () => additionalData.restApiUrl,
|
|
1570
1573
|
getInstanceBaseUrl: () => additionalData.instanceBaseUrl,
|
|
1571
1574
|
getInstanceId: () => typedi_1.default.get(InstanceSettings_1.InstanceSettings).instanceId,
|
|
1572
|
-
getTimezone: () => getTimezone(workflow
|
|
1575
|
+
getTimezone: () => getTimezone(workflow),
|
|
1573
1576
|
prepareOutputData: async (outputData) => [outputData],
|
|
1574
1577
|
});
|
|
1575
|
-
const getRequestHelperFunctions = (workflow, node, additionalData) =>
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1578
|
+
const getRequestHelperFunctions = (workflow, node, additionalData) => {
|
|
1579
|
+
const getResolvedValue = (parameterValue, itemIndex, runIndex, executeData, additionalKeys, returnObjectAsString = false) => {
|
|
1580
|
+
const runExecutionData = null;
|
|
1581
|
+
const connectionInputData = [];
|
|
1582
|
+
const mode = 'internal';
|
|
1583
|
+
if (typeof parameterValue === 'object' ||
|
|
1584
|
+
(typeof parameterValue === 'string' && parameterValue.charAt(0) === '=')) {
|
|
1585
|
+
return workflow.expression.getParameterValue(parameterValue, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, mode, additionalKeys !== null && additionalKeys !== void 0 ? additionalKeys : {}, executeData, returnObjectAsString);
|
|
1586
|
+
}
|
|
1587
|
+
return parameterValue;
|
|
1588
|
+
};
|
|
1589
|
+
return {
|
|
1590
|
+
httpRequest,
|
|
1591
|
+
async requestWithAuthenticationPaginated(requestOptions, itemIndex, paginationOptions, credentialsType, additionalCredentialOptions) {
|
|
1592
|
+
var _a, _b, _c;
|
|
1593
|
+
const responseData = [];
|
|
1594
|
+
if (!requestOptions.qs) {
|
|
1595
|
+
requestOptions.qs = {};
|
|
1596
|
+
}
|
|
1597
|
+
requestOptions.resolveWithFullResponse = true;
|
|
1598
|
+
requestOptions.simple = false;
|
|
1599
|
+
let tempResponseData;
|
|
1600
|
+
let makeAdditionalRequest;
|
|
1601
|
+
let paginateRequestData;
|
|
1602
|
+
const runIndex = 0;
|
|
1603
|
+
const additionalKeys = {
|
|
1604
|
+
$request: requestOptions,
|
|
1605
|
+
$response: {},
|
|
1606
|
+
$version: node.typeVersion,
|
|
1607
|
+
$pageCount: 0,
|
|
1608
|
+
};
|
|
1609
|
+
const executeData = {
|
|
1610
|
+
data: {},
|
|
1611
|
+
node,
|
|
1612
|
+
source: null,
|
|
1613
|
+
};
|
|
1614
|
+
const hashData = {
|
|
1615
|
+
identicalCount: 0,
|
|
1616
|
+
previousLength: 0,
|
|
1617
|
+
previousHash: '',
|
|
1618
|
+
};
|
|
1619
|
+
do {
|
|
1620
|
+
paginateRequestData = getResolvedValue(paginationOptions.request, itemIndex, runIndex, executeData, additionalKeys, false);
|
|
1621
|
+
const tempRequestOptions = (0, merge_1.default)(requestOptions, paginateRequestData);
|
|
1622
|
+
if (credentialsType) {
|
|
1623
|
+
tempResponseData = await this.helpers.requestWithAuthentication.call(this, credentialsType, tempRequestOptions, additionalCredentialOptions);
|
|
1624
|
+
}
|
|
1625
|
+
else {
|
|
1626
|
+
tempResponseData = await this.helpers.request(tempRequestOptions);
|
|
1627
|
+
}
|
|
1628
|
+
const newResponse = Object.assign({
|
|
1629
|
+
body: {},
|
|
1630
|
+
headers: {},
|
|
1631
|
+
statusCode: 0,
|
|
1632
|
+
}, (0, pick_1.default)(tempResponseData, ['body', 'headers', 'statusCode']));
|
|
1633
|
+
let contentBody;
|
|
1634
|
+
if (((_a = newResponse.body) === null || _a === void 0 ? void 0 : _a.constructor.name) === 'IncomingMessage' &&
|
|
1635
|
+
paginationOptions.binaryResult !== true) {
|
|
1636
|
+
const data = await this.helpers
|
|
1637
|
+
.binaryToBuffer(newResponse.body)
|
|
1638
|
+
.then((body) => body.toString());
|
|
1639
|
+
contentBody = data;
|
|
1640
|
+
const responseContentType = (_c = (_b = newResponse.headers['content-type']) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : '';
|
|
1641
|
+
if (responseContentType.includes('application/json')) {
|
|
1642
|
+
newResponse.body = (0, n8n_workflow_1.jsonParse)(data, { fallbackValue: {} });
|
|
1643
|
+
}
|
|
1644
|
+
else {
|
|
1645
|
+
newResponse.body = data;
|
|
1646
|
+
}
|
|
1647
|
+
tempResponseData.__bodyResolved = true;
|
|
1648
|
+
tempResponseData.body = newResponse.body;
|
|
1649
|
+
}
|
|
1650
|
+
else {
|
|
1651
|
+
contentBody = newResponse.body;
|
|
1652
|
+
}
|
|
1653
|
+
if (paginationOptions.binaryResult !== true || tempResponseData.headers.etag) {
|
|
1654
|
+
let contentLength = 0;
|
|
1655
|
+
if ('content-length' in tempResponseData.headers) {
|
|
1656
|
+
contentLength = parseInt(tempResponseData.headers['content-length']) || 0;
|
|
1657
|
+
}
|
|
1658
|
+
if (hashData.previousLength === contentLength) {
|
|
1659
|
+
let hash;
|
|
1660
|
+
if (tempResponseData.headers.etag) {
|
|
1661
|
+
hash = tempResponseData.headers.etag;
|
|
1662
|
+
}
|
|
1663
|
+
else {
|
|
1664
|
+
if (typeof contentBody !== 'string') {
|
|
1665
|
+
contentBody = JSON.stringify(contentBody);
|
|
1666
|
+
}
|
|
1667
|
+
hash = crypto_1.default.createHash('md5').update(contentBody).digest('base64');
|
|
1668
|
+
}
|
|
1669
|
+
if (hashData.previousHash === hash) {
|
|
1670
|
+
hashData.identicalCount += 1;
|
|
1671
|
+
if (hashData.identicalCount > 2) {
|
|
1672
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'The returned response was identical 5x, so requests got stopped', {
|
|
1673
|
+
itemIndex,
|
|
1674
|
+
description: 'Check if "Pagination Completed When" has been configured correctly.',
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
else {
|
|
1679
|
+
hashData.identicalCount = 0;
|
|
1680
|
+
}
|
|
1681
|
+
hashData.previousHash = hash;
|
|
1682
|
+
}
|
|
1683
|
+
else {
|
|
1684
|
+
hashData.identicalCount = 0;
|
|
1685
|
+
}
|
|
1686
|
+
hashData.previousLength = contentLength;
|
|
1687
|
+
}
|
|
1688
|
+
responseData.push(tempResponseData);
|
|
1689
|
+
additionalKeys.$response = newResponse;
|
|
1690
|
+
additionalKeys.$pageCount = additionalKeys.$pageCount + 1;
|
|
1691
|
+
if (paginationOptions.maxRequests &&
|
|
1692
|
+
additionalKeys.$pageCount >= paginationOptions.maxRequests) {
|
|
1693
|
+
break;
|
|
1694
|
+
}
|
|
1695
|
+
makeAdditionalRequest = getResolvedValue(paginationOptions.continue, itemIndex, runIndex, executeData, additionalKeys, false);
|
|
1696
|
+
if (makeAdditionalRequest) {
|
|
1697
|
+
if (tempResponseData.statusCode < 200 || tempResponseData.statusCode >= 300) {
|
|
1698
|
+
let data = tempResponseData.body;
|
|
1699
|
+
if ((data === null || data === void 0 ? void 0 : data.constructor.name) === 'IncomingMessage' &&
|
|
1700
|
+
paginationOptions.binaryResult !== true) {
|
|
1701
|
+
data = await this.helpers
|
|
1702
|
+
.binaryToBuffer(tempResponseData.body)
|
|
1703
|
+
.then((body) => body.toString());
|
|
1704
|
+
}
|
|
1705
|
+
else if (typeof data === 'object') {
|
|
1706
|
+
data = JSON.stringify(data);
|
|
1707
|
+
}
|
|
1708
|
+
throw Object.assign(new Error(`${tempResponseData.statusCode} - "${data === null || data === void 0 ? void 0 : data.toString()}"`), {
|
|
1709
|
+
statusCode: tempResponseData.statusCode,
|
|
1710
|
+
error: data,
|
|
1711
|
+
isAxiosError: true,
|
|
1712
|
+
response: {
|
|
1713
|
+
headers: tempResponseData.headers,
|
|
1714
|
+
status: tempResponseData.statusCode,
|
|
1715
|
+
statusText: tempResponseData.statusMessage,
|
|
1716
|
+
},
|
|
1717
|
+
});
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
} while (makeAdditionalRequest);
|
|
1721
|
+
return responseData;
|
|
1722
|
+
},
|
|
1723
|
+
async httpRequestWithAuthentication(credentialsType, requestOptions, additionalCredentialOptions) {
|
|
1724
|
+
return httpRequestWithAuthentication.call(this, credentialsType, requestOptions, workflow, node, additionalData, additionalCredentialOptions);
|
|
1725
|
+
},
|
|
1726
|
+
request: async (uriOrObject, options) => proxyRequestToAxios(workflow, additionalData, node, uriOrObject, options),
|
|
1727
|
+
async requestWithAuthentication(credentialsType, requestOptions, additionalCredentialOptions) {
|
|
1728
|
+
return requestWithAuthentication.call(this, credentialsType, requestOptions, workflow, node, additionalData, additionalCredentialOptions);
|
|
1729
|
+
},
|
|
1730
|
+
async requestOAuth1(credentialsType, requestOptions) {
|
|
1731
|
+
return requestOAuth1.call(this, credentialsType, requestOptions);
|
|
1732
|
+
},
|
|
1733
|
+
async requestOAuth2(credentialsType, requestOptions, oAuth2Options) {
|
|
1734
|
+
return requestOAuth2.call(this, credentialsType, requestOptions, node, additionalData, oAuth2Options);
|
|
1735
|
+
},
|
|
1736
|
+
};
|
|
1737
|
+
};
|
|
1591
1738
|
const getAllowedPaths = () => {
|
|
1592
1739
|
const restrictFileAccessTo = process.env[Constants_1.RESTRICT_FILE_ACCESS_TO];
|
|
1593
1740
|
if (!restrictFileAccessTo) {
|
|
@@ -1719,7 +1866,7 @@ function getExecutePollFunctions(workflow, node, additionalData, mode, activatio
|
|
|
1719
1866
|
const itemIndex = 0;
|
|
1720
1867
|
const runIndex = 0;
|
|
1721
1868
|
const connectionInputData = [];
|
|
1722
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
1869
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), undefined, fallbackValue, options);
|
|
1723
1870
|
},
|
|
1724
1871
|
helpers: {
|
|
1725
1872
|
createDeferredPromise: n8n_workflow_1.createDeferredPromise,
|
|
@@ -1749,7 +1896,7 @@ function getExecuteTriggerFunctions(workflow, node, additionalData, mode, activa
|
|
|
1749
1896
|
const itemIndex = 0;
|
|
1750
1897
|
const runIndex = 0;
|
|
1751
1898
|
const connectionInputData = [];
|
|
1752
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
1899
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), undefined, fallbackValue, options);
|
|
1753
1900
|
},
|
|
1754
1901
|
helpers: {
|
|
1755
1902
|
createDeferredPromise: n8n_workflow_1.createDeferredPromise,
|
|
@@ -1770,7 +1917,7 @@ function getExecuteFunctions(workflow, runExecutionData, runIndex, connectionInp
|
|
|
1770
1917
|
getExecuteData: () => executeData,
|
|
1771
1918
|
continueOnFail: () => continueOnFail(node),
|
|
1772
1919
|
evaluateExpression: (expression, itemIndex) => {
|
|
1773
|
-
return workflow.expression.resolveSimpleParameterValue(`=${expression}`, {}, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, mode,
|
|
1920
|
+
return workflow.expression.resolveSimpleParameterValue(`=${expression}`, {}, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData);
|
|
1774
1921
|
},
|
|
1775
1922
|
async executeWorkflow(workflowInfo, inputData) {
|
|
1776
1923
|
var _a;
|
|
@@ -1820,7 +1967,7 @@ function getExecuteFunctions(workflow, runExecutionData, runIndex, connectionInp
|
|
|
1820
1967
|
}
|
|
1821
1968
|
const context = Object.assign({}, this);
|
|
1822
1969
|
context.getNodeParameter = (parameterName, itemIndex, fallbackValue, options) => {
|
|
1823
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, connectedNode, parameterName, itemIndex, mode,
|
|
1970
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, connectedNode, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData, fallbackValue, { ...(options || {}), contextNode: node });
|
|
1824
1971
|
};
|
|
1825
1972
|
context.getNode = () => {
|
|
1826
1973
|
return (0, n8n_workflow_1.deepCopy)(connectedNode);
|
|
@@ -1899,10 +2046,10 @@ function getExecuteFunctions(workflow, runExecutionData, runIndex, connectionInp
|
|
|
1899
2046
|
return executeData.source[inputName][inputIndex];
|
|
1900
2047
|
},
|
|
1901
2048
|
getNodeParameter: (parameterName, itemIndex, fallbackValue, options) => {
|
|
1902
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
2049
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData, fallbackValue, options);
|
|
1903
2050
|
},
|
|
1904
2051
|
getWorkflowDataProxy: (itemIndex) => {
|
|
1905
|
-
const dataProxy = new n8n_workflow_1.WorkflowDataProxy(workflow, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, {}, mode,
|
|
2052
|
+
const dataProxy = new n8n_workflow_1.WorkflowDataProxy(workflow, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, {}, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData);
|
|
1906
2053
|
return dataProxy.getDataProxy();
|
|
1907
2054
|
},
|
|
1908
2055
|
binaryToBuffer: async (body) => typedi_1.default.get(BinaryData_service_1.BinaryDataService).toBuffer(body),
|
|
@@ -1981,7 +2128,7 @@ function getExecuteSingleFunctions(workflow, runExecutionData, runIndex, connect
|
|
|
1981
2128
|
continueOnFail: () => continueOnFail(node),
|
|
1982
2129
|
evaluateExpression: (expression, evaluateItemIndex) => {
|
|
1983
2130
|
evaluateItemIndex = evaluateItemIndex === undefined ? itemIndex : evaluateItemIndex;
|
|
1984
|
-
return workflow.expression.resolveSimpleParameterValue(`=${expression}`, {}, runExecutionData, runIndex, evaluateItemIndex, node.name, connectionInputData, mode,
|
|
2131
|
+
return workflow.expression.resolveSimpleParameterValue(`=${expression}`, {}, runExecutionData, runIndex, evaluateItemIndex, node.name, connectionInputData, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData);
|
|
1985
2132
|
},
|
|
1986
2133
|
getContext(type) {
|
|
1987
2134
|
return n8n_workflow_1.NodeHelpers.getContext(runExecutionData, type, node);
|
|
@@ -2013,10 +2160,10 @@ function getExecuteSingleFunctions(workflow, runExecutionData, runIndex, connect
|
|
|
2013
2160
|
getMode: () => mode,
|
|
2014
2161
|
getExecuteData: () => executeData,
|
|
2015
2162
|
getNodeParameter: (parameterName, fallbackValue, options) => {
|
|
2016
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
2163
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData, fallbackValue, options);
|
|
2017
2164
|
},
|
|
2018
2165
|
getWorkflowDataProxy: () => {
|
|
2019
|
-
const dataProxy = new n8n_workflow_1.WorkflowDataProxy(workflow, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, {}, mode,
|
|
2166
|
+
const dataProxy = new n8n_workflow_1.WorkflowDataProxy(workflow, runExecutionData, runIndex, itemIndex, node.name, connectionInputData, {}, mode, getAdditionalKeys(additionalData, mode, runExecutionData), executeData);
|
|
2020
2167
|
return dataProxy.getDataProxy();
|
|
2021
2168
|
},
|
|
2022
2169
|
helpers: {
|
|
@@ -2067,7 +2214,7 @@ function getLoadOptionsFunctions(workflow, node, path, additionalData) {
|
|
|
2067
2214
|
const runIndex = 0;
|
|
2068
2215
|
const mode = 'internal';
|
|
2069
2216
|
const connectionInputData = [];
|
|
2070
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
2217
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), undefined, fallbackValue, options);
|
|
2071
2218
|
},
|
|
2072
2219
|
helpers: getRequestHelperFunctions(workflow, node, additionalData),
|
|
2073
2220
|
};
|
|
@@ -2086,10 +2233,10 @@ function getExecuteHookFunctions(workflow, node, additionalData, mode, activatio
|
|
|
2086
2233
|
const itemIndex = 0;
|
|
2087
2234
|
const runIndex = 0;
|
|
2088
2235
|
const connectionInputData = [];
|
|
2089
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
2236
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, runExecutionData), undefined, fallbackValue, options);
|
|
2090
2237
|
},
|
|
2091
2238
|
getNodeWebhookUrl: (name) => {
|
|
2092
|
-
return getNodeWebhookUrl(name, workflow, node, additionalData, mode,
|
|
2239
|
+
return getNodeWebhookUrl(name, workflow, node, additionalData, mode, getAdditionalKeys(additionalData, mode, null), isTest);
|
|
2093
2240
|
},
|
|
2094
2241
|
getWebhookName() {
|
|
2095
2242
|
if (webhookData === undefined) {
|
|
@@ -2126,7 +2273,7 @@ function getExecuteWebhookFunctions(workflow, node, additionalData, mode, webhoo
|
|
|
2126
2273
|
const itemIndex = 0;
|
|
2127
2274
|
const runIndex = 0;
|
|
2128
2275
|
const connectionInputData = [];
|
|
2129
|
-
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode,
|
|
2276
|
+
return getNodeParameter(workflow, runExecutionData, runIndex, connectionInputData, node, parameterName, itemIndex, mode, getAdditionalKeys(additionalData, mode, null), undefined, fallbackValue, options);
|
|
2130
2277
|
},
|
|
2131
2278
|
getParamsData() {
|
|
2132
2279
|
if (additionalData.httpRequest === undefined) {
|
|
@@ -2152,7 +2299,7 @@ function getExecuteWebhookFunctions(workflow, node, additionalData, mode, webhoo
|
|
|
2152
2299
|
}
|
|
2153
2300
|
return additionalData.httpResponse;
|
|
2154
2301
|
},
|
|
2155
|
-
getNodeWebhookUrl: (name) => getNodeWebhookUrl(name, workflow, node, additionalData, mode,
|
|
2302
|
+
getNodeWebhookUrl: (name) => getNodeWebhookUrl(name, workflow, node, additionalData, mode, getAdditionalKeys(additionalData, mode, null)),
|
|
2156
2303
|
getWebhookName: () => webhookData.webhookDescription.name,
|
|
2157
2304
|
helpers: {
|
|
2158
2305
|
createDeferredPromise: n8n_workflow_1.createDeferredPromise,
|