n8n-core 1.20.0 → 1.21.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/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install n8n-core
|
|
|
10
10
|
|
|
11
11
|
## License
|
|
12
12
|
|
|
13
|
-
n8n is [fair-code](
|
|
13
|
+
n8n is [fair-code](https://faircode.io) distributed under the [**Sustainable Use License**](https://github.com/n8n-io/n8n/blob/master/packages/cli/LICENSE.md).
|
|
14
14
|
|
|
15
15
|
Proprietary licenses are available for enterprise customers. [Get in touch](mailto:license@n8n.io)
|
|
16
16
|
|
package/dist/ExtractValue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare function extractValue(value: NodeParameterValueType | object, parameterName: string, node: INode, nodeType: INodeType): NodeParameterValueType | object;
|
|
1
|
+
import { type INode, type INodeType, type NodeParameterValueType } from 'n8n-workflow';
|
|
2
|
+
export declare function extractValue(value: NodeParameterValueType | object, parameterName: string, node: INode, nodeType: INodeType, itemIndex?: number): NodeParameterValueType | object;
|
package/dist/ExtractValue.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.extractValue = void 0;
|
|
7
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
4
8
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
9
|
function findPropertyFromParameterName(parameterName, nodeType, node, nodeParameters) {
|
|
6
10
|
let property;
|
|
@@ -76,6 +80,16 @@ function extractValueRLC(value, property, parameterName) {
|
|
|
76
80
|
const regex = new RegExp(modeProp.extractValue.regex);
|
|
77
81
|
return executeRegexExtractValue(value.value, regex, parameterName, property.displayName);
|
|
78
82
|
}
|
|
83
|
+
function extractValueFilter(value, property, parameterName, itemIndex) {
|
|
84
|
+
var _a;
|
|
85
|
+
if (!(0, n8n_workflow_1.isFilterValue)(value)) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
if ((_a = property.extractValue) === null || _a === void 0 ? void 0 : _a.type) {
|
|
89
|
+
throw new n8n_workflow_1.ApplicationError(`Property "${parameterName}" has an invalid extractValue type. Filter parameters only support extractValue: true`, { extra: { parameter: parameterName } });
|
|
90
|
+
}
|
|
91
|
+
return (0, n8n_workflow_1.executeFilter)(value, { itemIndex });
|
|
92
|
+
}
|
|
79
93
|
function extractValueOther(value, property, parameterName) {
|
|
80
94
|
if (!('extractValue' in property) || !property.extractValue) {
|
|
81
95
|
return value;
|
|
@@ -101,7 +115,7 @@ function extractValueOther(value, property, parameterName) {
|
|
|
101
115
|
const regex = new RegExp(property.extractValue.regex);
|
|
102
116
|
return executeRegexExtractValue(value, regex, parameterName, property.displayName);
|
|
103
117
|
}
|
|
104
|
-
function extractValue(value, parameterName, node, nodeType) {
|
|
118
|
+
function extractValue(value, parameterName, node, nodeType, itemIndex = 0) {
|
|
105
119
|
let property;
|
|
106
120
|
try {
|
|
107
121
|
property = findPropertyFromParameterName(parameterName, nodeType, node, node.parameters);
|
|
@@ -111,10 +125,13 @@ function extractValue(value, parameterName, node, nodeType) {
|
|
|
111
125
|
if (property.type === 'resourceLocator') {
|
|
112
126
|
return extractValueRLC(value, property, parameterName);
|
|
113
127
|
}
|
|
128
|
+
else if (property.type === 'filter') {
|
|
129
|
+
return extractValueFilter(value, property, parameterName, itemIndex);
|
|
130
|
+
}
|
|
114
131
|
return extractValueOther(value, property, parameterName);
|
|
115
132
|
}
|
|
116
133
|
catch (error) {
|
|
117
|
-
throw new n8n_workflow_1.NodeOperationError(node, error);
|
|
134
|
+
throw new n8n_workflow_1.NodeOperationError(node, error, { description: (0, get_1.default)(error, 'description') });
|
|
118
135
|
}
|
|
119
136
|
}
|
|
120
137
|
exports.extractValue = extractValue;
|
package/dist/ExtractValue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtractValue.js","sourceRoot":"","sources":["../src/ExtractValue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtractValue.js","sourceRoot":"","sources":["../src/ExtractValue.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA6B;AAC7B,+CAesB;AAEtB,SAAS,6BAA6B,CACrC,aAAqB,EACrB,QAAmB,EACnB,IAAW,EACX,cAA+B;IAE/B,IAAI,QAAsF,CAAC;IAC3F,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,gBAAgB,GAAG,EAAE,CAAC;IAE1B,MAAM,QAAQ,GAAG,CAChB,IAAY,EACZ,OAAgF,EACD,EAAE;QACjF,OAAO,OAAO,CAAC,IAAI,CAClB,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,IAAI,KAAK,IAAI;YACf,0BAAW,CAAC,oBAAoB,CAAC,cAAc,EAAE,CAAC,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAC5E,CAAC;IACH,CAAC,CAAC;IAEF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7D,CAAC;aAAM,IAAI,SAAS,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtD,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC7C,gBAAgB,IAAI,IAAI,KAAK,EAAE,CAAC;QACjC,CAAC;aAAM,IAAI,QA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AAE,CAAC;YACvC,OAAO,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAEhB,MAAM,IAAI,iCAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,IAAA,aAAG,EAAC,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;IACvF,CAAC;AACF,CAAC;AA1BD,oCA0BC"}
|
|
@@ -489,7 +489,6 @@ async function proxyRequestToAxios(workflow, additionalData, node, uriOrObject,
|
|
|
489
489
|
configObject = options || {};
|
|
490
490
|
}
|
|
491
491
|
axiosConfig = Object.assign(axiosConfig, await parseRequestObject(configObject));
|
|
492
|
-
n8n_workflow_1.LoggerProxy.debug('Proxying request to axios');
|
|
493
492
|
let requestFn;
|
|
494
493
|
if (((_a = configObject.auth) === null || _a === void 0 ? void 0 : _a.sendImmediately) === false) {
|
|
495
494
|
requestFn = async () => {
|
|
@@ -1036,7 +1035,7 @@ async function httpRequestWithAuthentication(credentialsType, requestOptions, wo
|
|
|
1036
1035
|
credentialsDecrypted = await this.getCredentials(credentialsType);
|
|
1037
1036
|
}
|
|
1038
1037
|
if (credentialsDecrypted === undefined) {
|
|
1039
|
-
throw new n8n_workflow_1.NodeOperationError(node, `Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`, {
|
|
1038
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`, { level: 'warning' });
|
|
1040
1039
|
}
|
|
1041
1040
|
const data = await additionalData.credentialsHelper.preAuthentication({ helpers: this.helpers }, credentialsDecrypted, credentialsType, node, false);
|
|
1042
1041
|
if (data) {
|
|
@@ -1139,7 +1138,7 @@ async function requestWithAuthentication(credentialsType, requestOptions, workfl
|
|
|
1139
1138
|
credentialsDecrypted = await this.getCredentials(credentialsType);
|
|
1140
1139
|
}
|
|
1141
1140
|
if (credentialsDecrypted === undefined) {
|
|
1142
|
-
throw new n8n_workflow_1.NodeOperationError(node, `Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`, {
|
|
1141
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Node "${node.name}" does not have any credentials of type "${credentialsType}" set!`, { level: 'warning' });
|
|
1143
1142
|
}
|
|
1144
1143
|
const data = await additionalData.credentialsHelper.preAuthentication({ helpers: this.helpers }, credentialsDecrypted, credentialsType, node, false);
|
|
1145
1144
|
if (data) {
|
|
@@ -1169,11 +1168,13 @@ exports.requestWithAuthentication = requestWithAuthentication;
|
|
|
1169
1168
|
function getAdditionalKeys(additionalData, mode, runExecutionData, options) {
|
|
1170
1169
|
const executionId = additionalData.executionId || Constants_1.PLACEHOLDER_EMPTY_EXECUTION_ID;
|
|
1171
1170
|
const resumeUrl = `${additionalData.webhookWaitingBaseUrl}/${executionId}`;
|
|
1171
|
+
const resumeFormUrl = `${additionalData.formWaitingBaseUrl}/${executionId}`;
|
|
1172
1172
|
return {
|
|
1173
1173
|
$execution: {
|
|
1174
1174
|
id: executionId,
|
|
1175
1175
|
mode: mode === 'manual' ? 'test' : 'production',
|
|
1176
1176
|
resumeUrl,
|
|
1177
|
+
resumeFormUrl,
|
|
1177
1178
|
customData: runExecutionData
|
|
1178
1179
|
? {
|
|
1179
1180
|
set(key, value) {
|
|
@@ -1224,11 +1225,11 @@ async function getCredentials(workflow, node, type, additionalData, mode, runExe
|
|
|
1224
1225
|
let nodeCredentialDescription;
|
|
1225
1226
|
if (!fullAccess) {
|
|
1226
1227
|
if (nodeType.description.credentials === undefined) {
|
|
1227
|
-
throw new n8n_workflow_1.NodeOperationError(node, `Node type "${node.type}" does not have any credentials defined!`, {
|
|
1228
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Node type "${node.type}" does not have any credentials defined!`, { level: 'warning' });
|
|
1228
1229
|
}
|
|
1229
1230
|
nodeCredentialDescription = nodeType.description.credentials.find((credentialTypeDescription) => credentialTypeDescription.name === type);
|
|
1230
1231
|
if (nodeCredentialDescription === undefined) {
|
|
1231
|
-
throw new n8n_workflow_1.NodeOperationError(node, `Node type "${node.type}" does not have any credentials of type "${type}" defined!`, {
|
|
1232
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Node type "${node.type}" does not have any credentials of type "${type}" defined!`, { level: 'warning' });
|
|
1232
1233
|
}
|
|
1233
1234
|
if (!n8n_workflow_1.NodeHelpers.displayParameter(additionalData.currentNodeParameters || node.parameters, nodeCredentialDescription, node, node.parameters)) {
|
|
1234
1235
|
throw new n8n_workflow_1.NodeOperationError(node, 'Credentials not found');
|
|
@@ -1238,11 +1239,11 @@ async function getCredentials(workflow, node, type, additionalData, mode, runExe
|
|
|
1238
1239
|
if ((nodeCredentialDescription === null || nodeCredentialDescription === void 0 ? void 0 : nodeCredentialDescription.required) === true) {
|
|
1239
1240
|
if (!node.credentials) {
|
|
1240
1241
|
throw new n8n_workflow_1.NodeOperationError(node, 'Node does not have any credentials set!', {
|
|
1241
|
-
|
|
1242
|
+
level: 'warning',
|
|
1242
1243
|
});
|
|
1243
1244
|
}
|
|
1244
1245
|
if (!node.credentials[type]) {
|
|
1245
|
-
throw new n8n_workflow_1.NodeOperationError(node, `Node does not have any credentials set for "${type}"!`, {
|
|
1246
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Node does not have any credentials set for "${type}"!`, { level: 'warning' });
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
1248
1249
|
else {
|
|
@@ -1321,7 +1322,9 @@ const validateResourceMapperValue = (parameterName, paramValues, node, skipRequi
|
|
|
1321
1322
|
};
|
|
1322
1323
|
}
|
|
1323
1324
|
if (schemaEntry === null || schemaEntry === void 0 ? void 0 : schemaEntry.type) {
|
|
1324
|
-
const validationResult = (0, n8n_workflow_1.validateFieldType)(key, resolvedValue, schemaEntry.type,
|
|
1325
|
+
const validationResult = (0, n8n_workflow_1.validateFieldType)(key, resolvedValue, schemaEntry.type, {
|
|
1326
|
+
valueOptions: schemaEntry.options,
|
|
1327
|
+
});
|
|
1325
1328
|
if (!validationResult.valid) {
|
|
1326
1329
|
return { ...validationResult, fieldName: key };
|
|
1327
1330
|
}
|
|
@@ -1363,7 +1366,9 @@ const validateCollection = (node, runIndex, itemIndex, propertyDescription, para
|
|
|
1363
1366
|
for (const key of Object.keys(value)) {
|
|
1364
1367
|
if (!validationMap[key])
|
|
1365
1368
|
continue;
|
|
1366
|
-
const fieldValidationResult = (0, n8n_workflow_1.validateFieldType)(key, value[key], validationMap[key].type,
|
|
1369
|
+
const fieldValidationResult = (0, n8n_workflow_1.validateFieldType)(key, value[key], validationMap[key].type, {
|
|
1370
|
+
valueOptions: validationMap[key].options,
|
|
1371
|
+
});
|
|
1367
1372
|
if (!fieldValidationResult.valid) {
|
|
1368
1373
|
throw new n8n_workflow_1.ExpressionError(`Invalid input for field '${validationMap[key].displayName}' inside '${propertyDescription.displayName}' in [item ${itemIndex}]`, {
|
|
1369
1374
|
description: fieldValidationResult.errorMessage,
|
|
@@ -1443,7 +1448,7 @@ function getNodeParameter(workflow, runExecutionData, runIndex, connectionInputD
|
|
|
1443
1448
|
}
|
|
1444
1449
|
}
|
|
1445
1450
|
if (options === null || options === void 0 ? void 0 : options.extractValue) {
|
|
1446
|
-
returnData = (0, ExtractValue_1.extractValue)(returnData, parameterName, node, nodeType);
|
|
1451
|
+
returnData = (0, ExtractValue_1.extractValue)(returnData, parameterName, node, nodeType, itemIndex);
|
|
1447
1452
|
}
|
|
1448
1453
|
returnData = (0, exports.validateValueAgainstSchema)(node, nodeType, returnData, parameterName, runIndex, itemIndex);
|
|
1449
1454
|
return returnData;
|
|
@@ -1816,7 +1821,7 @@ const getFileSystemHelperFunctions = (node) => ({
|
|
|
1816
1821
|
throw error.code === 'ENOENT'
|
|
1817
1822
|
? new n8n_workflow_1.NodeOperationError(node, error, {
|
|
1818
1823
|
message: `The file "${String(filePath)}" could not be accessed.`,
|
|
1819
|
-
|
|
1824
|
+
level: 'warning',
|
|
1820
1825
|
})
|
|
1821
1826
|
: error;
|
|
1822
1827
|
}
|
|
@@ -1824,7 +1829,7 @@ const getFileSystemHelperFunctions = (node) => ({
|
|
|
1824
1829
|
const allowedPaths = getAllowedPaths();
|
|
1825
1830
|
const message = allowedPaths.length ? ` Allowed paths: ${allowedPaths.join(', ')}` : '';
|
|
1826
1831
|
throw new n8n_workflow_1.NodeOperationError(node, `Access to the file is not allowed.${message}`, {
|
|
1827
|
-
|
|
1832
|
+
level: 'warning',
|
|
1828
1833
|
});
|
|
1829
1834
|
}
|
|
1830
1835
|
return (0, fs_1.createReadStream)(filePath);
|
|
@@ -1835,7 +1840,7 @@ const getFileSystemHelperFunctions = (node) => ({
|
|
|
1835
1840
|
async writeContentToFile(filePath, content, flag) {
|
|
1836
1841
|
if (isFilePathBlocked(filePath)) {
|
|
1837
1842
|
throw new n8n_workflow_1.NodeOperationError(node, `The file "${String(filePath)}" is not writable.`, {
|
|
1838
|
-
|
|
1843
|
+
level: 'warning',
|
|
1839
1844
|
});
|
|
1840
1845
|
}
|
|
1841
1846
|
return (0, promises_1.writeFile)(filePath, content, { encoding: 'binary', flag });
|
|
@@ -1949,6 +1954,7 @@ function getExecuteFunctions(workflow, runExecutionData, runIndex, connectionInp
|
|
|
1949
1954
|
parentWorkflowId: (_a = workflow.id) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
1950
1955
|
inputData,
|
|
1951
1956
|
parentWorkflowSettings: workflow.settings,
|
|
1957
|
+
node,
|
|
1952
1958
|
})
|
|
1953
1959
|
.then(async (result) => typedi_1.default.get(BinaryData_service_1.BinaryDataService).duplicateBinaryData(workflow.id, additionalData.executionId, result));
|
|
1954
1960
|
},
|
|
@@ -2016,6 +2022,8 @@ function getExecuteFunctions(workflow, runExecutionData, runIndex, connectionInp
|
|
|
2016
2022
|
return await nodeType.supplyData.call(context, itemIndex);
|
|
2017
2023
|
}
|
|
2018
2024
|
catch (error) {
|
|
2025
|
+
if (error.functionality === 'configuration-node')
|
|
2026
|
+
throw error;
|
|
2019
2027
|
if (!(error instanceof n8n_workflow_1.ExecutionBaseError)) {
|
|
2020
2028
|
error = new n8n_workflow_1.NodeOperationError(connectedNode, error, {
|
|
2021
2029
|
itemIndex,
|