Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

n8n-workflow

Package Overview
Dependencies
Maintainers
3
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.1.1 to 1.2.0

9

dist/AugmentObject.js

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

get(target, key, receiver) {
const value = Reflect.get(newData !== undefined ? newData : target, key, receiver);
const value = Reflect.get(newData !== null && newData !== void 0 ? newData : target, key, receiver);
const newValue = augment(value);

@@ -53,6 +53,6 @@ if (newValue !== value) {

has(target, key) {
return Reflect.has(newData !== undefined ? newData : target, key);
return Reflect.has(newData !== null && newData !== void 0 ? newData : target, key);
},
ownKeys(target) {
return Reflect.ownKeys(newData !== undefined ? newData : target);
return Reflect.ownKeys(newData !== null && newData !== void 0 ? newData : target);
},

@@ -123,4 +123,3 @@ set(target, key, newValue) {

return false;
const newKeys = Object.keys(newData);
return Reflect.has(newKeys.length ? newData : target, key);
return Reflect.has(newData, key) || Reflect.has(target, key);
},

@@ -127,0 +126,0 @@ ownKeys(target) {

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

const inputAny = input;
if (inputAny &&
functionName &&
typeof inputAny[functionName] === 'function') {
if (inputAny && functionName && typeof inputAny[functionName] === 'function') {
return { type: 'native', function: inputAny[functionName] };

@@ -276,0 +274,0 @@ }

@@ -33,4 +33,12 @@ /// <reference types="node" />

interface IncomingMessage {
contentType?: string;
encoding: BufferEncoding;
contentDisposition?: {
type: string;
filename?: string;
};
rawBody: Buffer;
readRawBody(): Promise<void>;
_body: boolean;
}
}

@@ -407,2 +407,3 @@ /// <reference types="node" />

getStoragePath(): string;
writeContentToFile(path: PathLike, content: string | Buffer | Readable, flag?: string): Promise<void>;
}

@@ -770,2 +771,14 @@ export interface BinaryHelperFunctions {

export type WebhookSetupMethodNames = 'checkExists' | 'create' | 'delete';
export declare namespace MultiPartFormData {
interface File {
filepath: string;
mimetype?: string;
originalFilename?: string;
newFilename: string;
}
type Request = express.Request<{}, {}, {
data: Record<string, string | string[]>;
files: Record<string, File | File[]>;
}>;
}
export interface INodeType {

@@ -969,3 +982,3 @@ description: INodeTypeDescription;

export interface IWebhookData {
httpMethod: WebhookHttpMethod;
httpMethod: IHttpRequestMethods;
node: string;

@@ -979,4 +992,4 @@ path: string;

export interface IWebhookDescription {
[key: string]: WebhookHttpMethod | WebhookResponseMode | boolean | string | undefined;
httpMethod: WebhookHttpMethod | string;
[key: string]: IHttpRequestMethods | WebhookResponseMode | boolean | string | undefined;
httpMethod: IHttpRequestMethods | string;
isFullPath?: boolean;

@@ -1028,3 +1041,2 @@ name: 'default' | 'setup';

}
export type WebhookHttpMethod = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT' | 'OPTIONS';
export interface IWebhookResponseData {

@@ -1224,2 +1236,6 @@ workflowData?: INodeExecutionData[][];

};
trigger?: {
mode: WorkflowExecuteMode;
input: INodeExecutionData;
};
}

@@ -1226,0 +1242,0 @@ export type LogTypes = 'debug' | 'verbose' | 'info' | 'warn' | 'error';

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

function getNodeParameters(nodePropertiesArray, nodeValues, returnDefaults, returnNoneDisplayed, node, onlySimpleTypes = false, dataIsResolved = false, nodeValuesRoot, parentType, parameterDependencies) {
var _a, _b;
var _a, _b, _c;
if (parameterDependencies === undefined) {

@@ -443,3 +443,3 @@ parameterDependencies = getParameterDependencies(nodePropertiesArray);

nodeParameters[nodeProperties.name] =
nodeValues[nodeProperties.name] || nodeProperties.default;
(_a = nodeValues[nodeProperties.name]) !== null && _a !== void 0 ? _a : nodeProperties.default;
}

@@ -502,3 +502,3 @@ nodeParametersFull[nodeProperties.name] = nodeParameters[nodeProperties.name];

if (!returnDefaults &&
((_a = nodeProperties.typeOptions) === null || _a === void 0 ? void 0 : _a.multipleValues) === false &&
((_b = nodeProperties.typeOptions) === null || _b === void 0 ? void 0 : _b.multipleValues) === false &&
propertyValues &&

@@ -541,3 +541,3 @@ Object.keys(propertyValues).length === 0) {

if (!returnDefaults &&
((_b = nodeProperties.typeOptions) === null || _b === void 0 ? void 0 : _b.multipleValues) === false &&
((_c = nodeProperties.typeOptions) === null || _c === void 0 ? void 0 : _c.multipleValues) === false &&
collectionValues &&

@@ -895,3 +895,3 @@ Object.keys(collectionValues).length === 0 &&

if (field.required && !skipRequiredCheck) {
if (value.value === null || fieldValue === null || fieldValue === undefined) {
if (value.value === null || fieldValue === undefined) {
const error = `${fieldWordSingular} "${field.id}" is required`;

@@ -898,0 +898,0 @@ fieldErrors.push(error);

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

otherNodes.forEach((node, index) => {
var _a, _b, _c, _d, _e, _f, _g, _h;
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
nodesGraph.node_types.push(node.type);

@@ -115,3 +115,3 @@ const nodeItem = {

}
if (node.id && (options === null || options === void 0 ? void 0 : options.nodeIdMap) && options.nodeIdMap[node.id]) {
if (node.id && ((_a = options === null || options === void 0 ? void 0 : options.nodeIdMap) === null || _a === void 0 ? void 0 : _a[node.id])) {
nodeItem.src_node_id = options.nodeIdMap[node.id];

@@ -147,3 +147,3 @@ }

const nodeType = nodeTypes.getByNameAndVersion(node.type);
(_b = (_a = nodeType === null || nodeType === void 0 ? void 0 : nodeType.description) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.forEach((property) => {
(_c = (_b = nodeType === null || nodeType === void 0 ? void 0 : nodeType.description) === null || _b === void 0 ? void 0 : _b.properties) === null || _c === void 0 ? void 0 : _c.forEach((property) => {
if (property.name === 'operation' ||

@@ -155,5 +155,5 @@ property.name === 'resource' ||

});
nodeItem.operation = (_d = (_c = node.parameters.operation) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : nodeItem.operation;
nodeItem.resource = (_f = (_e = node.parameters.resource) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : nodeItem.resource;
nodeItem.mode = (_h = (_g = node.parameters.mode) === null || _g === void 0 ? void 0 : _g.toString()) !== null && _h !== void 0 ? _h : nodeItem.mode;
nodeItem.operation = (_e = (_d = node.parameters.operation) === null || _d === void 0 ? void 0 : _d.toString()) !== null && _e !== void 0 ? _e : nodeItem.operation;
nodeItem.resource = (_g = (_f = node.parameters.resource) === null || _f === void 0 ? void 0 : _f.toString()) !== null && _g !== void 0 ? _g : nodeItem.resource;
nodeItem.mode = (_j = (_h = node.parameters.mode) === null || _h === void 0 ? void 0 : _h.toString()) !== null && _j !== void 0 ? _j : nodeItem.mode;
}

@@ -160,0 +160,0 @@ nodesGraph.nodes[`${index}`] = nodeItem;

@@ -9,2 +9,5 @@ "use strict";

const readStreamClasses = new Set(['ReadStream', 'Readable', 'ReadableStream']);
BigInt.prototype.toJSON = function () {
return this.toString();
};
const isObjectEmpty = (obj) => {

@@ -125,6 +128,3 @@ if (obj === undefined || obj === null)

const isTraversableObject = (value) => {
return (value &&
typeof value === 'object' &&
!Array.isArray(value) &&
!!Object.keys(value).length);
return value && typeof value === 'object' && !Array.isArray(value) && !!Object.keys(value).length;
};

@@ -131,0 +131,0 @@ exports.isTraversableObject = isTraversableObject;

@@ -32,2 +32,3 @@ "use strict";

const AugmentObject_1 = require("./AugmentObject");
const utils_1 = require("./utils");
function isResourceLocatorValue(value) {

@@ -139,2 +140,4 @@ return Boolean(typeof value === 'object' && value && 'mode' in value && 'value' in value && '__rl' in value);

return true;
if (name === 'toJSON')
return () => (0, utils_1.deepCopy)(target);
name = name.toString();

@@ -155,2 +158,4 @@ let returnValue;

}
if (returnValue === `={{ $parameter.${name} }}`)
return undefined;
if (isResourceLocatorValue(returnValue)) {

@@ -179,2 +184,3 @@ if (returnValue.__regex && typeof returnValue.value === 'string') {

getNodeExecutionData(nodeName, shortSyntax = false, outputIndex, runIndex) {
var _a;
const that = this;

@@ -211,3 +217,3 @@ let executionData;

const taskData = that.runExecutionData.resultData.runData[nodeName][runIndex].data;
if (taskData.main === null || !taskData.main.length || taskData.main[0] === null) {
if (!((_a = taskData.main) === null || _a === void 0 ? void 0 : _a.length) || taskData.main[0] === null) {
throw new ExpressionError_1.ExpressionError('No data found from "main" input.', {

@@ -250,2 +256,3 @@ runIndex: that.runIndex,

get(target, name, receiver) {
var _a;
if (name === 'isProxy')

@@ -294,4 +301,3 @@ return true;

else if (name === 'runIndex') {
if (that.runExecutionData === null ||
!that.runExecutionData.resultData.runData[nodeName]) {
if (!((_a = that.runExecutionData) === null || _a === void 0 ? void 0 : _a.resultData.runData[nodeName])) {
return -1;

@@ -298,0 +304,0 @@ }

{
"name": "n8n-workflow",
"version": "1.1.1",
"version": "1.2.0",
"description": "Workflow base code of n8n",

@@ -60,4 +60,4 @@ "license": "SEE LICENSE IN LICENSE.md",

"format": "prettier --write . --ignore-path ../../.prettierignore",
"lint": "eslint --quiet .",
"lintfix": "eslint . --fix",
"lint": "eslint . --quiet --report-unused-disable-directives",
"lintfix": "eslint . --fix --report-unused-disable-directives",
"watch": "tsc -p tsconfig.build.json --watch",

@@ -64,0 +64,0 @@ "test": "jest",

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

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

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

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

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