New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

n8n-workflow

Package Overview
Dependencies
Maintainers
2
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-workflow - npm Package Compare versions

Comparing version 1.72.0 to 1.73.0

4

dist/Constants.d.ts

@@ -49,1 +49,5 @@ export declare const DIGITS = "0123456789";

export declare const AI_TRANSFORM_JS_CODE = "jsCode";
export declare const TRIMMED_TASK_DATA_CONNECTIONS_KEY = "__isTrimmedManualExecutionDataItem";
export declare const OPEN_AI_API_CREDENTIAL_TYPE = "openAiApi";
export declare const FREE_AI_CREDITS_ERROR_TYPE = "free_ai_credits_request_error";
export declare const FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = 400;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AI_TRANSFORM_JS_CODE = exports.AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = exports.SEND_AND_WAIT_OPERATION = exports.LANGCHAIN_CUSTOM_TOOLS = exports.HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = exports.WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = exports.CODE_TOOL_LANGCHAIN_NODE_TYPE = exports.CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = exports.OPENAI_LANGCHAIN_NODE_TYPE = exports.CHAIN_LLM_LANGCHAIN_NODE_TYPE = exports.AGENT_LANGCHAIN_NODE_TYPE = exports.MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = exports.NODES_WITH_RENAMABLE_CONTENT = exports.ADD_FORM_NOTICE = exports.SCRIPTING_NODE_TYPES = exports.STARTING_NODE_TYPES = exports.WAIT_NODE_TYPE = exports.CHAT_TRIGGER_NODE_TYPE = exports.FORM_TRIGGER_NODE_TYPE = exports.FORM_NODE_TYPE = exports.AI_TRANSFORM_NODE_TYPE = exports.MERGE_NODE_TYPE = exports.FUNCTION_ITEM_NODE_TYPE = exports.FUNCTION_NODE_TYPE = exports.CODE_NODE_TYPE = exports.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = exports.EXECUTE_WORKFLOW_NODE_TYPE = exports.START_NODE_TYPE = exports.ERROR_TRIGGER_NODE_TYPE = exports.MANUAL_TRIGGER_NODE_TYPE = exports.WEBHOOK_NODE_TYPE = exports.HTTP_REQUEST_NODE_TYPE = exports.NO_OP_NODE_TYPE = exports.STICKY_NODE_TYPE = exports.UNKNOWN_ERROR_MESSAGE_CRED = exports.UNKNOWN_ERROR_DESCRIPTION = exports.UNKNOWN_ERROR_MESSAGE = exports.FORM_TRIGGER_PATH_IDENTIFIER = exports.CREDENTIAL_EMPTY_VALUE = exports.CODE_EXECUTION_MODES = exports.CODE_LANGUAGES = exports.LOG_LEVELS = exports.WAIT_INDEFINITELY = exports.BINARY_ENCODING = exports.ALPHABET = exports.LOWERCASE_LETTERS = exports.UPPERCASE_LETTERS = exports.DIGITS = void 0;
exports.OPEN_AI_API_CREDENTIAL_TYPE = exports.TRIMMED_TASK_DATA_CONNECTIONS_KEY = exports.AI_TRANSFORM_JS_CODE = exports.AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = exports.SEND_AND_WAIT_OPERATION = exports.LANGCHAIN_CUSTOM_TOOLS = exports.HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE = exports.WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE = exports.CODE_TOOL_LANGCHAIN_NODE_TYPE = exports.CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE = exports.OPENAI_LANGCHAIN_NODE_TYPE = exports.CHAIN_LLM_LANGCHAIN_NODE_TYPE = exports.AGENT_LANGCHAIN_NODE_TYPE = exports.MANUAL_CHAT_TRIGGER_LANGCHAIN_NODE_TYPE = exports.NODES_WITH_RENAMABLE_CONTENT = exports.ADD_FORM_NOTICE = exports.SCRIPTING_NODE_TYPES = exports.STARTING_NODE_TYPES = exports.WAIT_NODE_TYPE = exports.CHAT_TRIGGER_NODE_TYPE = exports.FORM_TRIGGER_NODE_TYPE = exports.FORM_NODE_TYPE = exports.AI_TRANSFORM_NODE_TYPE = exports.MERGE_NODE_TYPE = exports.FUNCTION_ITEM_NODE_TYPE = exports.FUNCTION_NODE_TYPE = exports.CODE_NODE_TYPE = exports.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = exports.EXECUTE_WORKFLOW_NODE_TYPE = exports.START_NODE_TYPE = exports.ERROR_TRIGGER_NODE_TYPE = exports.MANUAL_TRIGGER_NODE_TYPE = exports.WEBHOOK_NODE_TYPE = exports.HTTP_REQUEST_NODE_TYPE = exports.NO_OP_NODE_TYPE = exports.STICKY_NODE_TYPE = exports.UNKNOWN_ERROR_MESSAGE_CRED = exports.UNKNOWN_ERROR_DESCRIPTION = exports.UNKNOWN_ERROR_MESSAGE = exports.FORM_TRIGGER_PATH_IDENTIFIER = exports.CREDENTIAL_EMPTY_VALUE = exports.CODE_EXECUTION_MODES = exports.CODE_LANGUAGES = exports.LOG_LEVELS = exports.WAIT_INDEFINITELY = exports.BINARY_ENCODING = exports.ALPHABET = exports.LOWERCASE_LETTERS = exports.UPPERCASE_LETTERS = exports.DIGITS = void 0;
exports.FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = exports.FREE_AI_CREDITS_ERROR_TYPE = void 0;
exports.DIGITS = '0123456789';

@@ -71,2 +72,6 @@ exports.UPPERCASE_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';

exports.AI_TRANSFORM_JS_CODE = 'jsCode';
exports.TRIMMED_TASK_DATA_CONNECTIONS_KEY = '__isTrimmedManualExecutionDataItem';
exports.OPEN_AI_API_CREDENTIAL_TYPE = 'openAiApi';
exports.FREE_AI_CREDITS_ERROR_TYPE = 'free_ai_credits_request_error';
exports.FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE = 400;
//# sourceMappingURL=Constants.js.map

@@ -1062,3 +1062,3 @@ "use strict";

}
else if (nodeProperties.type === 'fixedCollection') {
else if (nodeProperties.type === 'fixedCollection' && isDisplayed) {
basePath = basePath ? `${basePath}.` : `${nodeProperties.name}.`;

@@ -1068,2 +1068,16 @@ let propertyOptions;

const value = getParameterValueByPath(nodeValues, propertyOptions.name, basePath.slice(0, -1));
const valueArray = Array.isArray(value) ? value : [];
const { minRequiredFields, maxAllowedFields } = nodeProperties.typeOptions ?? {};
let error = '';
if (minRequiredFields && valueArray.length < minRequiredFields) {
error = `At least ${minRequiredFields} ${minRequiredFields === 1 ? 'field is' : 'fields are'} required.`;
}
if (maxAllowedFields && valueArray.length > maxAllowedFields) {
error = `At most ${maxAllowedFields} ${maxAllowedFields === 1 ? 'field is' : 'fields are'} allowed.`;
}
if (error) {
foundIssues.parameters ??= {};
foundIssues.parameters[nodeProperties.name] ??= [];
foundIssues.parameters[nodeProperties.name].push(error);
}
if (value === undefined) {

@@ -1070,0 +1084,0 @@ continue;

@@ -1,2 +0,2 @@

import type { INode, INodesGraphResult, IWorkflowBase, INodeTypes, IRunData } from './Interfaces';
import type { INode, INodesGraphResult, IWorkflowBase, INodeTypes, IRunData, IRun } from './Interfaces';
export declare function getNodeTypeForName(workflow: IWorkflowBase, nodeName: string): INode | undefined;

@@ -15,1 +15,6 @@ export declare function isNumber(value: unknown): value is number;

}): INodesGraphResult;
export declare function extractLastExecutedNodeCredentialData(runData: IRun): null | {
credentialId: string;
credentialType: string;
};
export declare const userInInstanceRanOutOfFreeAiCredits: (runData: IRun) => boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ANONYMIZATION_CHARACTER = void 0;
exports.userInInstanceRanOutOfFreeAiCredits = exports.ANONYMIZATION_CHARACTER = void 0;
exports.getNodeTypeForName = getNodeTypeForName;

@@ -9,5 +9,8 @@ exports.isNumber = isNumber;

exports.generateNodesGraph = generateNodesGraph;
exports.extractLastExecutedNodeCredentialData = extractLastExecutedNodeCredentialData;
const Constants_1 = require("./Constants");
const application_error_1 = require("./errors/application.error");
const NodeHelpers_1 = require("./NodeHelpers");
const utils_1 = require("./utils");
const isNodeApiError = (error) => typeof error === 'object' && error !== null && 'name' in error && error?.name === 'NodeApiError';
function getNodeTypeForName(workflow, nodeName) {

@@ -352,2 +355,37 @@ return workflow.nodes.find((node) => node.name === nodeName);

}
function extractLastExecutedNodeCredentialData(runData) {
const nodeCredentials = runData?.data?.executionData?.nodeExecutionStack?.[0]?.node?.credentials;
if (!nodeCredentials)
return null;
const credentialType = Object.keys(nodeCredentials)[0] ?? null;
if (!credentialType)
return null;
const { id } = nodeCredentials[credentialType];
if (!id)
return null;
return { credentialId: id, credentialType };
}
const userInInstanceRanOutOfFreeAiCredits = (runData) => {
const credentials = extractLastExecutedNodeCredentialData(runData);
if (!credentials)
return false;
if (credentials.credentialType !== Constants_1.OPEN_AI_API_CREDENTIAL_TYPE)
return false;
const { error } = runData.data.resultData;
if (!isNodeApiError(error) || !error.messages[0])
return false;
const rawErrorResponse = error.messages[0].replace(`${error.httpCode} -`, '');
try {
const errorResponse = (0, utils_1.jsonParse)(rawErrorResponse);
if (errorResponse?.error?.type === Constants_1.FREE_AI_CREDITS_ERROR_TYPE &&
errorResponse.error.code === Constants_1.FREE_AI_CREDITS_USED_ALL_CREDITS_ERROR_CODE) {
return true;
}
}
catch {
return false;
}
return false;
};
exports.userInInstanceRanOutOfFreeAiCredits = userInInstanceRanOutOfFreeAiCredits;
//# sourceMappingURL=TelemetryHelpers.js.map

4

dist/WorkflowDataProxy.js

@@ -706,3 +706,5 @@ "use strict";

}
return placeholdersDataInputData?.[name] ?? defaultValue;
return (placeholdersDataInputData?.query?.[name] ??
placeholdersDataInputData?.[name] ??
defaultValue);
};

@@ -709,0 +711,0 @@ const base = {

@@ -6,5 +6,7 @@ # License

- Content of branches other than the main branch (i.e. "master") are not licensed.
- Source code files that contain ".ee." in their filename are NOT licensed under the Sustainable Use License.
To use source code files that contain ".ee." in their filename you must hold a valid n8n Enterprise License
specifically allowing you access to such source code files and as defined in "LICENSE_EE.md".
- Source code files that contain ".ee." in their filename or ".ee" in their dirname are NOT licensed under
the Sustainable Use License.
To use source code files that contain ".ee." in their filename or ".ee" in their dirname you must hold a
valid n8n Enterprise License specifically allowing you access to such source code files and as defined
in "LICENSE_EE.md".
- All third party components incorporated into the n8n Software are licensed under the original license

@@ -11,0 +13,0 @@ provided by the owner of the applicable component.

{
"name": "n8n-workflow",
"version": "1.72.0",
"version": "1.73.0",
"description": "Workflow base code of n8n",

@@ -29,6 +29,7 @@ "main": "dist/index.js",

"@types/md5": "^2.3.5",
"@types/xml2js": "^0.4.14"
"@types/xml2js": "^0.4.14",
"@n8n/config": "1.24.0"
},
"dependencies": {
"@n8n/tournament": "1.0.5",
"@n8n/tournament": "1.0.6",
"@n8n_io/riot-tmpl": "4.0.0",

@@ -35,0 +36,0 @@ "ast-types": "0.15.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc