first commit

This commit is contained in:
2025-10-26 23:10:15 +08:00
commit 8f0345b7be
14961 changed files with 2356381 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var common_getters_exports = {};
__export(common_getters_exports, {
getClassName: () => getClassName
});
module.exports = __toCommonJS(common_getters_exports);
function getClassName(classDeclaration) {
if (!classDeclaration.id)
return null;
return {
ast: classDeclaration.id,
value: classDeclaration.id.name
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getClassName
});

View File

@@ -0,0 +1,64 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var communityPackageJson_getters_exports = {};
__export(communityPackageJson_getters_exports, {
getAuthor: () => getAuthor,
getDescription: () => getDescription,
getKeywords: () => getKeywords,
getLicense: () => getLicense,
getN8n: () => getN8n,
getName: () => getName,
getRepository: () => getRepository,
getVersion: () => getVersion
});
module.exports = __toCommonJS(communityPackageJson_getters_exports);
var import_utils = require("@typescript-eslint/utils");
const getPackageJsonProperty = (keyName) => (node) => {
const found = node.properties.find((property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Literal && property.key.value === keyName;
});
if (!found)
return null;
return {
ast: found,
// @ts-ignore
value: found.value.value ?? "TODO restored object"
// TODO: Restoring nested object unneeded for now
// 'Literal' (found.value.value) or 'ObjectExpression' (nested object)
};
};
const getName = getPackageJsonProperty("name");
const getKeywords = getPackageJsonProperty("keywords");
const getDescription = getPackageJsonProperty("description");
const getVersion = getPackageJsonProperty("version");
const getN8n = getPackageJsonProperty("n8n");
const getAuthor = getPackageJsonProperty("author");
const getLicense = getPackageJsonProperty("license");
const getRepository = getPackageJsonProperty("repository");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getAuthor,
getDescription,
getKeywords,
getLicense,
getN8n,
getName,
getRepository,
getVersion
});

View File

@@ -0,0 +1,65 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var credentialClassBody_getters_exports = {};
__export(credentialClassBody_getters_exports, {
getDisplayName: () => getDisplayName,
getDocumentationUrl: () => getDocumentationUrl,
getExtendsValue: () => getExtendsValue,
getName: () => getName,
getPlaceholder: () => getPlaceholder
});
module.exports = __toCommonJS(credentialClassBody_getters_exports);
var import_identifiers = require("../identifiers");
var import_restoreValue = require("../utils/restoreValue");
function getStringClassField(identifier, nodeParam) {
const found = nodeParam.body.find(identifier);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
function getName(classBody) {
return getStringClassField(import_identifiers.id.credClassBody.isName, classBody);
}
function getDisplayName(classBody) {
return getStringClassField(import_identifiers.id.credClassBody.isDisplayName, classBody);
}
function getDocumentationUrl(classBody) {
return getStringClassField(import_identifiers.id.credClassBody.isDocumentationUrl, classBody);
}
function getPlaceholder(classBody) {
return getStringClassField(import_identifiers.id.credClassBody.isPlaceholder, classBody);
}
function getExtendsValue(classBody, context) {
const extendsNode = classBody.body.find(import_identifiers.id.credClassBody.isFieldExtends);
if (!extendsNode)
return null;
const extendsSource = context.getSourceCode().getText(extendsNode.value);
return (0, import_restoreValue.restoreValue)(extendsSource) ?? null;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getDisplayName,
getDocumentationUrl,
getExtendsValue,
getName,
getPlaceholder
});

View File

@@ -0,0 +1,51 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var getters_exports = {};
__export(getters_exports, {
getters: () => getters
});
module.exports = __toCommonJS(getters_exports);
var nodeParam = __toESM(require("./nodeParameter.getters"));
var nodeClassDescription = __toESM(require("./nodeClassDescription.getters"));
var credClassBody = __toESM(require("./credentialClassBody.getters"));
var communityPackageJson = __toESM(require("./communityPackageJson.getters"));
var nodeExecuteBlock = __toESM(require("./nodeExecuteBlock.getters"));
var common = __toESM(require("./common.getters"));
const getters = {
nodeParam,
nodeClassDescription,
credClassBody,
communityPackageJson,
nodeExecuteBlock,
...common
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getters
});

View File

@@ -0,0 +1,111 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeClassDescription_getters_exports = {};
__export(nodeClassDescription_getters_exports, {
getCredOptions: () => getCredOptions,
getDefaultVersion: () => getDefaultVersion,
getDefaults: () => getDefaults,
getDescription: () => getDescription,
getDisplayName: () => getDisplayName,
getIcon: () => getIcon,
getInputs: () => getInputs,
getName: () => getName,
getOutputs: () => getOutputs,
getSubtitle: () => getSubtitle,
getVersion: () => getVersion
});
module.exports = __toCommonJS(nodeClassDescription_getters_exports);
var import_identifiers = require("../identifiers");
var import_restorers = require("../restorers");
var import_nodeParameter = require("./nodeParameter.getters");
function getCredOptions(nodeParam) {
const found = nodeParam.properties.find(
import_identifiers.id.nodeClassDescription.isCredentials
);
if (!found)
return null;
return {
ast: found,
value: (0, import_restorers.restoreClassDescriptionOptions)(found.value.elements)
};
}
function getInputs(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeClassDescription.isInputs);
if (!found)
return null;
return {
ast: found,
// @ts-ignore @TODO
value: (0, import_restorers.restoreArray)(found.value.elements)
};
}
function getOutputs(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeClassDescription.isOutputs);
if (!found)
return null;
return {
ast: found,
// @ts-ignore @TODO
value: (0, import_restorers.restoreArray)(found.value.elements)
};
}
function getSubtitle(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeClassDescription.isSubtitle);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
const getName = import_nodeParameter.getName;
const getDisplayName = import_nodeParameter.getDisplayName;
const getDescription = import_nodeParameter.getDescription;
function getVersion(nodeParam) {
return (0, import_nodeParameter.getNumberProperty)(import_identifiers.id.nodeClassDescription.isVersion, nodeParam);
}
function getDefaultVersion(nodeParam) {
return (0, import_nodeParameter.getNumberProperty)(import_identifiers.id.nodeClassDescription.isDefaultVersion, nodeParam);
}
function getIcon(nodeParam) {
return (0, import_nodeParameter.getStringProperty)(import_identifiers.id.nodeClassDescription.isIcon, nodeParam);
}
function getDefaults(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeClassDescription.isDefaults);
if (!found)
return null;
return {
ast: found,
value: (0, import_restorers.restoreObject)(found.value)
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getCredOptions,
getDefaultVersion,
getDefaults,
getDescription,
getDisplayName,
getIcon,
getInputs,
getName,
getOutputs,
getSubtitle,
getVersion
});

View File

@@ -0,0 +1,119 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeExecuteBlock_getters_exports = {};
__export(nodeExecuteBlock_getters_exports, {
collectConsequents: () => collectConsequents,
getExecuteContent: () => getExecuteContent,
getInputItemsIndexName: () => getInputItemsIndexName,
getMarkedNodeFromConsequent: () => getMarkedNodeFromConsequent,
getOperationConsequents: () => getOperationConsequents,
getPairedItemValue: () => getPairedItemValue
});
module.exports = __toCommonJS(nodeExecuteBlock_getters_exports);
var import_utils = require("@typescript-eslint/utils");
var import_identifiers = require("../identifiers");
function getOperationConsequents(node, { filter }) {
const executeMethod = getExecuteContent(node);
if (!executeMethod)
return;
const returnDataArrayName = getReturnDataArrayName(executeMethod);
if (!returnDataArrayName)
return;
const forLoop = executeMethod.body.find(import_identifiers.id.nodeExecuteBlock.isForLoop);
if (!forLoop)
return;
const inputItemsIndexName = getInputItemsIndexName(forLoop);
if (!inputItemsIndexName)
return;
const tryCatch = forLoop.body.body.find(import_identifiers.id.nodeExecuteBlock.isTryCatch);
if (!tryCatch)
return;
const resourcesRoot = tryCatch.block.body.find(
import_identifiers.id.nodeExecuteBlock.isResourceChecksRoot
);
if (!resourcesRoot)
return;
const operationConsequents = collectConsequents(resourcesRoot).reduce((acc, resourceConsequent) => {
if (resourceConsequent.body.length !== 1)
return acc;
const [operationsRoot] = resourceConsequent.body;
const opConsequentsPerResource = filter === "all" ? collectConsequents(operationsRoot) : collectConsequents(operationsRoot).filter(
(consequent) => filter === "plural" ? isGetAll(consequent) : !isGetAll(consequent)
);
return [...acc, ...opConsequentsPerResource];
}, []);
return {
operationConsequents,
inputItemsIndexName,
returnDataArrayName
};
}
function getExecuteContent({ key, value }) {
if (key.type === import_utils.AST_NODE_TYPES.Identifier && key.name === "execute" && value.type === import_utils.AST_NODE_TYPES.FunctionExpression && value.body.type === import_utils.AST_NODE_TYPES.BlockStatement) {
return value.body;
}
}
function getReturnDataArrayName(executeMethod) {
for (const node of executeMethod.body) {
if (node.type === import_utils.AST_NODE_TYPES.VariableDeclaration && node.declarations.length === 1 && node.declarations[0].id.type === import_utils.AST_NODE_TYPES.Identifier && node.declarations[0].init !== null && node.declarations[0].init.type === import_utils.AST_NODE_TYPES.ArrayExpression && node.declarations[0].init.elements.length === 0 && node.declarations[0].id.typeAnnotation !== void 0 && node.declarations[0].id.typeAnnotation.typeAnnotation.type === import_utils.AST_NODE_TYPES.TSArrayType && node.declarations[0].id.typeAnnotation.typeAnnotation.elementType.type === import_utils.AST_NODE_TYPES.TSTypeReference && node.declarations[0].id.typeAnnotation.typeAnnotation.elementType.typeName.type === import_utils.AST_NODE_TYPES.Identifier && ["IDataObject", "INodeExecutionData"].includes(
node.declarations[0].id.typeAnnotation.typeAnnotation.elementType.typeName.name
)) {
return node.declarations[0].id.name;
}
}
return null;
}
function getInputItemsIndexName(forLoop) {
if (forLoop.init !== null && forLoop.init.type === import_utils.AST_NODE_TYPES.VariableDeclaration && forLoop.init.declarations.length > 0 && forLoop.init.declarations[0].type === import_utils.AST_NODE_TYPES.VariableDeclarator && forLoop.init.declarations[0].id.type === import_utils.AST_NODE_TYPES.Identifier) {
return forLoop.init.declarations[0].id.name;
}
return null;
}
function collectConsequents(node, collection = []) {
if (node.type === import_utils.AST_NODE_TYPES.IfStatement && node.consequent.type === import_utils.AST_NODE_TYPES.BlockStatement) {
collection.push(node.consequent);
}
if (node.type === import_utils.AST_NODE_TYPES.IfStatement && node.alternate !== null && node.alternate.type === import_utils.AST_NODE_TYPES.IfStatement) {
collectConsequents(node.alternate, collection);
}
return collection;
}
function getPairedItemValue(properties) {
const found = properties.find(
(property) => property.type === import_utils.AST_NODE_TYPES.Property && property.value.type === import_utils.AST_NODE_TYPES.ObjectExpression
);
return found ? found.value : null;
}
function getMarkedNodeFromConsequent(consequent) {
if (consequent.parent?.type === import_utils.AST_NODE_TYPES.IfStatement && consequent.parent?.test.type === import_utils.AST_NODE_TYPES.BinaryExpression && consequent.parent?.test.operator === "===" && consequent.parent?.test.left.type === import_utils.AST_NODE_TYPES.Identifier && consequent.parent?.test.left.name === "operation") {
return consequent.parent?.test.right;
}
}
function isGetAll(consequent) {
return consequent.parent !== void 0 && consequent.parent.type === import_utils.AST_NODE_TYPES.IfStatement && consequent.parent.test.type === import_utils.AST_NODE_TYPES.BinaryExpression && consequent.parent.test.operator === "===" && consequent.parent.test.left.type === import_utils.AST_NODE_TYPES.Identifier && consequent.parent.test.left.name === "operation" && consequent.parent.test.right.type === import_utils.AST_NODE_TYPES.Literal && consequent.parent.test.right.value === "getAll";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
collectConsequents,
getExecuteContent,
getInputItemsIndexName,
getMarkedNodeFromConsequent,
getOperationConsequents,
getPairedItemValue
});

View File

@@ -0,0 +1,316 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeParameter_getters_exports = {};
__export(nodeParameter_getters_exports, {
getCollectionOptions: () => getCollectionOptions,
getDefault: () => getDefault,
getDescription: () => getDescription,
getDisplayName: () => getDisplayName,
getFixedCollectionValues: () => getFixedCollectionValues,
getGetAllOption: () => getGetAllOption,
getHint: () => getHint,
getLoadOptionsMethod: () => getLoadOptionsMethod,
getMaxValue: () => getMaxValue,
getMinValue: () => getMinValue,
getName: () => getName,
getNoDataExpression: () => getNoDataExpression,
getNumberProperty: () => getNumberProperty,
getOptions: () => getOptions,
getPlaceholder: () => getPlaceholder,
getRequired: () => getRequired,
getStringProperty: () => getStringProperty,
getType: () => getType,
getTypeOptions: () => getTypeOptions
});
module.exports = __toCommonJS(nodeParameter_getters_exports);
var import_utils = require("@typescript-eslint/utils");
var import_identifiers = require("../identifiers");
var import_restorers = require("../restorers");
var import_common = require("../identifiers/common.identifiers");
function getStringProperty(identifier, nodeParam) {
const found = nodeParam.properties.find(identifier);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
function getDisplayName(nodeParam) {
return getStringProperty(import_identifiers.id.nodeParam.isDisplayName, nodeParam);
}
function getPlaceholder(nodeParam) {
return getStringProperty(import_identifiers.id.nodeParam.isPlaceholder, nodeParam);
}
function getName(nodeParam) {
return getStringProperty(import_identifiers.id.nodeParam.isName, nodeParam);
}
function getHint(nodeParam) {
return getStringProperty(import_identifiers.id.nodeParam.isHint, nodeParam);
}
function getType(nodeParam) {
return getStringProperty(import_identifiers.id.nodeParam.isType, nodeParam);
}
function getBooleanProperty(identifier, nodeParam) {
const found = nodeParam.properties.find(identifier);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
function getNoDataExpression(nodeParam) {
return getBooleanProperty(import_identifiers.id.nodeParam.isNoDataExpression, nodeParam);
}
function getRequired(nodeParam) {
return getBooleanProperty(import_identifiers.id.nodeParam.isRequired, nodeParam);
}
function getNumberProperty(identifier, nodeParam) {
const found = nodeParam.properties.find(identifier);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
function getGetAllOption(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeParam.isGetAllOptionProperty);
if (!found)
return null;
return {
ast: found,
value: ""
// TODO
};
}
function getTypeOptions(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeParam.isTypeOptions);
if (!found)
return null;
return {
ast: found,
value: (0, import_restorers.restoreObject)(found.value)
};
}
function getOptions(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeParam.isOptions);
if (!found)
return null;
if (!found.value.elements) {
return {
ast: found,
value: [{ name: "", value: "", description: "", action: "" }],
// unused placeholder
hasPropertyPointingToIdentifier: true
};
}
const elements = found.value.elements.filter(
(i) => i.type === "ObjectExpression"
);
if (!elements.length)
return null;
if (hasMemberExpression(elements)) {
return {
ast: found,
value: (0, import_restorers.restoreNodeParamOptions)(elements),
hasPropertyPointingToMemberExpression: true
};
}
return {
ast: found,
value: (0, import_restorers.restoreNodeParamOptions)(elements)
};
}
function getCollectionOptions(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeParam.isOptions);
if (!found)
return null;
if (!found.value.elements) {
return {
ast: found,
value: [{ displayName: "" }],
// unused placeholder
hasPropertyPointingToIdentifier: true
};
}
const elements = found.value.elements.filter(
(i) => i.type === "ObjectExpression"
);
if (!elements.length)
return null;
if (hasMemberExpression(elements)) {
return {
ast: found,
value: (0, import_restorers.restoreNodeParamCollectionOptions)(elements),
hasPropertyPointingToMemberExpression: true
};
}
return {
ast: found,
value: (0, import_restorers.restoreNodeParamCollectionOptions)(elements),
hasPropertyPointingToIdentifier: false
};
}
function hasMemberExpression(elements) {
return elements.find(
(element) => element.properties.find(import_common.isMemberExpression)
);
}
function getFixedCollectionValues(nodeParam) {
const found = nodeParam.properties.find(import_identifiers.id.nodeParam.isFixedCollectionValues);
if (!found)
return null;
const elements = found.value.elements.filter(
(i) => i.type === "ObjectExpression"
);
if (!elements.length)
return null;
return {
ast: found,
value: (0, import_restorers.restoreFixedCollectionValues)(elements)
};
}
function getTypeOptionsValue(nodeParam, identifier) {
const typeOptions = getTypeOptions(nodeParam);
if (!typeOptions)
return null;
const { properties } = typeOptions.ast.value;
const found = properties.find(identifier);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
const getMinValue = (nodeParam) => getTypeOptionsValue(nodeParam, import_identifiers.id.nodeParam.isMinValue);
const getMaxValue = (nodeParam) => getTypeOptionsValue(nodeParam, import_identifiers.id.nodeParam.isMaxValue);
function getLoadOptionsMethod(nodeParam) {
const typeOptions = getTypeOptions(nodeParam);
if (!typeOptions)
return null;
const { properties } = typeOptions.ast.value;
const found = properties.find(import_identifiers.id.nodeParam.isLoadOptionsMethod);
if (!found)
return null;
return {
ast: found,
value: found.value.value
};
}
function getDescription(nodeParam) {
for (const property of nodeParam.properties) {
if (import_identifiers.id.nodeParam.isDescription(property)) {
return {
ast: property,
value: property.value.value
};
}
if (import_identifiers.id.nodeParam.isTemplateDescription(property)) {
if (property.value.quasis.length > 1) {
const consolidated = property.value.quasis.map((templateElement2) => templateElement2.value.cooked).join();
return {
ast: property,
value: consolidated,
hasUnneededBackticks: false
};
}
const [templateElement] = property.value.quasis;
const { value: content } = templateElement;
const escapedRawContent = content.raw.replace(/\\/g, "");
return {
ast: property,
value: content.raw,
hasUnneededBackticks: escapedRawContent === content.cooked
};
}
}
return null;
}
function getDefault(nodeParam) {
const isUnparseable = (type) => [import_utils.AST_NODE_TYPES.CallExpression, import_utils.AST_NODE_TYPES.Identifier].includes(type);
for (const property of nodeParam.properties) {
if (property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "default" && isUnparseable(property.value.type)) {
return {
ast: property,
isUnparseable: true
// `default: myVar.join(',')` or `default: myVar`
};
}
if (import_identifiers.id.nodeParam.isTemplateLiteralDefault(property)) {
const consolidated = property.value.quasis.map((templateElement) => templateElement.value.cooked).join();
return {
ast: property,
value: consolidated
};
}
if (import_identifiers.id.nodeParam.isUnaryExpression(property)) {
return {
ast: property,
value: parseInt(
property.value.operator + property.value.argument.raw
// e.g. -1
)
};
}
if (import_identifiers.id.nodeParam.isPrimitiveDefault(property)) {
return {
ast: property,
value: property.value.value
};
}
if (import_identifiers.id.nodeParam.isObjectDefault(property)) {
return {
ast: property,
value: (0, import_restorers.restoreObject)(property.value)
};
}
if (import_identifiers.id.nodeParam.isArrayDefault(property)) {
return {
ast: property,
value: property.value.elements
};
}
}
return null;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getCollectionOptions,
getDefault,
getDescription,
getDisplayName,
getFixedCollectionValues,
getGetAllOption,
getHint,
getLoadOptionsMethod,
getMaxValue,
getMinValue,
getName,
getNoDataExpression,
getNumberProperty,
getOptions,
getPlaceholder,
getRequired,
getStringProperty,
getType,
getTypeOptions
});

View File

@@ -0,0 +1,119 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var common_identifiers_exports = {};
__export(common_identifiers_exports, {
hasValue: () => hasValue,
isArgument: () => isArgument,
isArrayExpression: () => isArrayExpression,
isArrayPropertyNamed: () => isArrayPropertyNamed,
isBooleanPropertyNamed: () => isBooleanPropertyNamed,
isCredentialClass: () => isCredentialClass,
isIdentifierPropertyNamed: () => isIdentifierPropertyNamed,
isLiteral: () => isLiteral,
isMemberExpression: () => isMemberExpression,
isNumericPropertyNamed: () => isNumericPropertyNamed,
isObjectPropertyNamed: () => isObjectPropertyNamed,
isReturnValue: () => isReturnValue,
isStringPropertyNamed: () => isStringPropertyNamed,
isWeakDescription: () => isWeakDescription
});
module.exports = __toCommonJS(common_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
var import_constants = require("../../constants");
function isTargetProperty({
keyName,
valueType
}, property) {
if (property.type !== import_utils.AST_NODE_TYPES.Property || property.computed !== false || property.key.type !== import_utils.AST_NODE_TYPES.Identifier || property.key.name !== keyName) {
return false;
}
if (valueType === "object") {
return property.value.type === import_utils.AST_NODE_TYPES.ObjectExpression;
}
if (valueType === "array") {
return property.value.type === import_utils.AST_NODE_TYPES.ArrayExpression;
}
return property.value.type === import_utils.AST_NODE_TYPES.Literal && typeof property.value.value === valueType;
}
function isStringPropertyNamed(keyName, property) {
return isTargetProperty({ keyName, valueType: "string" }, property);
}
function isNumericPropertyNamed(keyName, property) {
return isTargetProperty({ keyName, valueType: "number" }, property);
}
function isBooleanPropertyNamed(keyName, property) {
return isTargetProperty({ keyName, valueType: "boolean" }, property);
}
function isObjectPropertyNamed(keyName, property) {
return isTargetProperty({ keyName, valueType: "object" }, property);
}
function isArrayPropertyNamed(keyName, property) {
return isTargetProperty({ keyName, valueType: "array" }, property);
}
function isIdentifierPropertyNamed(keyName, property) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === keyName && property.value.type === import_utils.AST_NODE_TYPES.Identifier;
}
function isCredentialClass(node) {
return node.implements?.length === 1 && node.implements[0].type === import_utils.AST_NODE_TYPES.TSClassImplements && node.implements[0].expression.type === import_utils.AST_NODE_TYPES.Identifier && node.implements[0].expression.name === "ICredentialType";
}
function hasValue(value, nodeParam) {
for (const property of nodeParam.properties) {
if (property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.value.type === import_utils.AST_NODE_TYPES.Literal && property.value.value === value && typeof property.value.value === "string") {
return true;
}
}
return false;
}
function isReturnValue(node) {
return node.parent?.type === import_utils.AST_NODE_TYPES.ReturnStatement;
}
function isArgument(node) {
return node.parent?.type === import_utils.AST_NODE_TYPES.TSAsExpression || node.parent?.type === import_utils.AST_NODE_TYPES.CallExpression;
}
function isWeakDescription({ value }) {
return import_constants.WEAK_DESCRIPTIONS.some(
(wd) => value.toLowerCase().includes(wd.toLowerCase())
);
}
const isLiteral = (property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.value.type === import_utils.AST_NODE_TYPES.Literal;
};
const isArrayExpression = (property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && typeof property.key.name === "string" && property.value.type === import_utils.AST_NODE_TYPES.ArrayExpression;
};
const isMemberExpression = (property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && typeof property.key.name === "string" && property.value.type === import_utils.AST_NODE_TYPES.MemberExpression;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hasValue,
isArgument,
isArrayExpression,
isArrayPropertyNamed,
isBooleanPropertyNamed,
isCredentialClass,
isIdentifierPropertyNamed,
isLiteral,
isMemberExpression,
isNumericPropertyNamed,
isObjectPropertyNamed,
isReturnValue,
isStringPropertyNamed,
isWeakDescription
});

View File

@@ -0,0 +1,72 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var communityPackageJson_identifiers_exports = {};
__export(communityPackageJson_identifiers_exports, {
hasEmailLiteral: () => hasEmailLiteral,
hasNameLiteral: () => hasNameLiteral,
hasNodesApiVersion: () => hasNodesApiVersion,
hasNodesLiteral: () => hasNodesLiteral,
hasUrlLiteral: () => hasUrlLiteral,
isCommunityPackageJson: () => isCommunityPackageJson,
prod: () => prod,
test: () => test
});
module.exports = __toCommonJS(communityPackageJson_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
var import_identifiers = require("../identifiers");
const isTestRun = process.env.NODE_ENV === "test";
const isProdRun = !isTestRun;
function isCommunityPackageJson(filename, node) {
if (isProdRun && !filename.includes("package.json"))
return false;
if (isProdRun && !import_identifiers.id.prod.isTopLevelObjectExpression(node))
return false;
if (isTestRun && !import_identifiers.id.test.isTopLevelObjectExpression(node))
return false;
return true;
}
const prod = {
isTopLevelObjectExpression(node) {
return node.parent?.parent?.type === import_utils.AST_NODE_TYPES.Program;
}
};
const test = {
isTopLevelObjectExpression(node) {
return node.parent?.parent?.type === import_utils.AST_NODE_TYPES.VariableDeclaration;
}
};
const hasLiteral = (keyName) => (property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Literal && property.key.value === keyName;
};
const hasNameLiteral = hasLiteral("name");
const hasEmailLiteral = hasLiteral("email");
const hasNodesLiteral = hasLiteral("nodes");
const hasNodesApiVersion = hasLiteral("n8nNodesApiVersion");
const hasUrlLiteral = hasLiteral("url");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hasEmailLiteral,
hasNameLiteral,
hasNodesApiVersion,
hasNodesLiteral,
hasUrlLiteral,
isCommunityPackageJson,
prod,
test
});

View File

@@ -0,0 +1,61 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var credentialClassBody_identifiers_exports = {};
__export(credentialClassBody_identifiers_exports, {
isDisplayName: () => isDisplayName,
isDocumentationUrl: () => isDocumentationUrl,
isFieldExtends: () => isFieldExtends,
isName: () => isName,
isPlaceholder: () => isPlaceholder
});
module.exports = __toCommonJS(credentialClassBody_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
function isStringField(fieldName, property) {
return "key" in property && "type" in property.key && // property.type === AST_NODE_TYPES.PropertyDefinition &&
// property.computed === false &&
property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === fieldName && property.value !== null && property.value.type === import_utils.AST_NODE_TYPES.Literal && typeof property.value.value === "string";
}
function isName(property) {
return isStringField("name", property);
}
function isDisplayName(property) {
return isStringField("displayName", property);
}
function isDocumentationUrl(property) {
return isStringField("documentationUrl", property);
}
function isPlaceholder(property) {
return isStringField("placeholder", property);
}
function isArrayField(fieldName, property) {
return "key" in property && "type" in property.key && // property.type === AST_NODE_TYPES.PropertyDefinition &&
// property.computed === false &&
property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === fieldName && property.value !== null && property.value.type === import_utils.AST_NODE_TYPES.ArrayExpression;
}
function isFieldExtends(property) {
return isArrayField("extends", property);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isDisplayName,
isDocumentationUrl,
isFieldExtends,
isName,
isPlaceholder
});

View File

@@ -0,0 +1,53 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var identifiers_exports = {};
__export(identifiers_exports, {
id: () => id
});
module.exports = __toCommonJS(identifiers_exports);
var communityPackageJson = __toESM(require("./communityPackageJson.identifiers"));
var nodeParam = __toESM(require("./nodeParameter.identifiers"));
var nodeClassDescription = __toESM(require("./nodeClassDescription.identifiers"));
var credClassBody = __toESM(require("./credentialClassBody.identifiers"));
var nodeExecuteBlock = __toESM(require("./nodeExecuteBlock.identifiers"));
var lintableSections = __toESM(require("./lintable.identifiers"));
var common = __toESM(require("./common.identifiers"));
const id = {
nodeParam,
credClassBody,
nodeClassDescription,
nodeExecuteBlock,
...communityPackageJson,
...lintableSections,
...common
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
id
});

View File

@@ -0,0 +1,66 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var lintable_identifiers_exports = {};
__export(lintable_identifiers_exports, {
IDENTIFIER_KEYS: () => IDENTIFIER_KEYS,
isFixedCollectionSection: () => isFixedCollectionSection,
isNodeClassDescription: () => isNodeClassDescription,
isNodeParameter: () => isNodeParameter,
isOption: () => isOption
});
module.exports = __toCommonJS(lintable_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
const IDENTIFIER_KEYS = {
nodeParam: ["displayName", "name", "type", "default"],
option: ["name", "value"],
// in options-type or multi-options-type node param
fixedCollectionSection: ["displayName", "name", "values"],
nodeClassDescription: ["displayName", "name", "group"]
};
function isLintableSection(section, node, options) {
const requiredKeys = IDENTIFIER_KEYS[section];
const keysToCheck = options ? requiredKeys.filter((key) => !options.skipKeys.includes(key)) : requiredKeys;
const totalFound = node.properties.reduce((acc, property) => {
if (property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && keysToCheck.includes(property.key.name)) {
acc++;
}
return acc;
}, 0);
return totalFound === keysToCheck.length;
}
function isNodeParameter(node, options) {
return isLintableSection("nodeParam", node, options);
}
function isOption(node) {
return isLintableSection("option", node);
}
function isFixedCollectionSection(node) {
return isLintableSection("fixedCollectionSection", node);
}
function isNodeClassDescription(node) {
return isLintableSection("nodeClassDescription", node);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
IDENTIFIER_KEYS,
isFixedCollectionSection,
isNodeClassDescription,
isNodeParameter,
isOption
});

View File

@@ -0,0 +1,76 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeClassDescription_identifiers_exports = {};
__export(nodeClassDescription_identifiers_exports, {
isCredentials: () => isCredentials,
isDefaultVersion: () => isDefaultVersion,
isDefaults: () => isDefaults,
isIcon: () => isIcon,
isInputs: () => isInputs,
isName: () => isName,
isOutputs: () => isOutputs,
isProperties: () => isProperties,
isSubtitle: () => isSubtitle,
isVersion: () => isVersion
});
module.exports = __toCommonJS(nodeClassDescription_identifiers_exports);
var import_common = require("./common.identifiers");
function isName(property) {
return (0, import_common.isStringPropertyNamed)("name", property);
}
function isIcon(property) {
return (0, import_common.isStringPropertyNamed)("icon", property);
}
function isVersion(property) {
return (0, import_common.isNumericPropertyNamed)("version", property);
}
function isSubtitle(property) {
return (0, import_common.isStringPropertyNamed)("subtitle", property);
}
function isDefaultVersion(property) {
return (0, import_common.isNumericPropertyNamed)("defaultVersion", property);
}
function isInputs(property) {
return (0, import_common.isArrayPropertyNamed)("inputs", property);
}
function isOutputs(property) {
return (0, import_common.isArrayPropertyNamed)("outputs", property);
}
function isCredentials(property) {
return (0, import_common.isArrayPropertyNamed)("credentials", property);
}
function isProperties(property) {
return (0, import_common.isArrayPropertyNamed)("properties", property);
}
function isDefaults(property) {
return (0, import_common.isObjectPropertyNamed)("defaults", property);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isCredentials,
isDefaultVersion,
isDefaults,
isIcon,
isInputs,
isName,
isOutputs,
isProperties,
isSubtitle,
isVersion
});

View File

@@ -0,0 +1,129 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeExecuteBlock_identifiers_exports = {};
__export(nodeExecuteBlock_identifiers_exports, {
hasValidPluralPairingArgument: () => hasValidPluralPairingArgument,
hasValidSingularPairingArgument: () => hasValidSingularPairingArgument,
isForLoop: () => isForLoop,
isPluralPairingStatement: () => isPluralPairingStatement,
isResourceChecksRoot: () => isResourceChecksRoot,
isSingularPairingStatement: () => isSingularPairingStatement,
isTryCatch: () => isTryCatch
});
module.exports = __toCommonJS(nodeExecuteBlock_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
var import_getters = require("../getters");
const isForLoop = (node) => node.type === import_utils.AST_NODE_TYPES.ForStatement;
const isTryCatch = (node) => node.type === import_utils.AST_NODE_TYPES.TryStatement;
const isResourceChecksRoot = (node) => node.type === import_utils.AST_NODE_TYPES.IfStatement && node.test.type === import_utils.AST_NODE_TYPES.BinaryExpression && node.test.operator === "===" && node.test.left.type === import_utils.AST_NODE_TYPES.Identifier && node.test.left.name === "resource";
function isPluralPairingStatement(lastStatement, returnDataArrayName) {
return lastStatement.type === import_utils.AST_NODE_TYPES.ExpressionStatement && isReturnDataPush(lastStatement, returnDataArrayName) && hasSpreadArgument(lastStatement);
}
const hasSpreadArgument = (statement) => statement.expression.arguments.length === 1 && statement.expression.arguments[0].type === import_utils.AST_NODE_TYPES.SpreadElement;
function isSingularPairingStatement(lastStatement, returnDataArrayName) {
return lastStatement.type === import_utils.AST_NODE_TYPES.ExpressionStatement && isReturnDataPush(lastStatement, returnDataArrayName) && hasSingleArgument(lastStatement);
}
const isReturnDataPush = (node, returnDataArrayName) => {
return node.expression.type === import_utils.AST_NODE_TYPES.CallExpression && node.expression.callee.type === import_utils.AST_NODE_TYPES.MemberExpression && node.expression.callee.object.type === import_utils.AST_NODE_TYPES.Identifier && node.expression.callee.object.name === returnDataArrayName && node.expression.callee.property.type === import_utils.AST_NODE_TYPES.Identifier && node.expression.callee.property.name === "push";
};
const hasSingleArgument = (statement) => statement.expression.arguments.length === 1;
function hasValidSingularPairingArgument(lastStatement, inputItemsIndexName) {
const [argument] = lastStatement.expression.arguments;
if (argument.type !== import_utils.AST_NODE_TYPES.ObjectExpression)
return false;
const hasJsonKey = argument.properties.some(
(property) => property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "json"
);
if (!hasJsonKey)
return false;
const hasResponseDataValue = argument.properties.some(
(property) => property.type === import_utils.AST_NODE_TYPES.Property && property.value.type === import_utils.AST_NODE_TYPES.Identifier && property.value.name === "responseData"
);
if (!hasResponseDataValue)
return false;
const hasPairedItemKey = argument.properties.some(
(property) => property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "pairedItem"
);
if (!hasPairedItemKey)
return false;
const pairedItemValue = import_getters.getters.nodeExecuteBlock.getPairedItemValue(
argument.properties
);
if (!pairedItemValue)
return false;
const hasPairedItemValueContent = pairedItemValue.properties.find(
(property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "item" && property.value.type === import_utils.AST_NODE_TYPES.Identifier && property.value.name === inputItemsIndexName;
}
);
if (!hasPairedItemValueContent)
return false;
return true;
}
function hasValidPluralPairingArgument(lastStatement, inputItemsIndexName) {
const [argument] = lastStatement.expression.arguments;
if (argument.type !== import_utils.AST_NODE_TYPES.SpreadElement)
return false;
if (argument.argument.type !== import_utils.AST_NODE_TYPES.CallExpression)
return false;
const hasResponseDataMap = argument.argument.callee.type === import_utils.AST_NODE_TYPES.MemberExpression && argument.argument.callee.object.type === import_utils.AST_NODE_TYPES.Identifier && argument.argument.callee.object.name === "responseData" && argument.argument.callee.property.type === import_utils.AST_NODE_TYPES.Identifier && argument.argument.callee.property.name === "map";
if (!hasResponseDataMap)
return false;
if (argument.argument.arguments.length !== 1)
return false;
const [arrowFunction] = argument.argument.arguments;
const hasArrowFunctionWithJsonArg = arrowFunction.type === import_utils.AST_NODE_TYPES.ArrowFunctionExpression && arrowFunction.params.length === 1 && arrowFunction.params[0].type === import_utils.AST_NODE_TYPES.Identifier && arrowFunction.params[0].name === "json";
if (!hasArrowFunctionWithJsonArg)
return false;
const returnsObject = arrowFunction.body.type === import_utils.AST_NODE_TYPES.BlockStatement && arrowFunction.body.body.length === 1 && arrowFunction.body.body[0].type === import_utils.AST_NODE_TYPES.ReturnStatement && arrowFunction.body.body[0].argument !== null && arrowFunction.body.body[0].argument.type === import_utils.AST_NODE_TYPES.ObjectExpression;
if (!returnsObject)
return false;
const { properties } = arrowFunction.body.body[0].argument;
const returnedObjectHasJson = properties.some(
(property) => property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "json" && property.value.type === import_utils.AST_NODE_TYPES.Identifier && property.value.name === "json"
);
if (!returnedObjectHasJson)
return false;
const returnedObjectHasPairedItem = properties.find(
(property) => property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "pairedItem" && property.value.type === import_utils.AST_NODE_TYPES.ObjectExpression && property.value.properties.length === 1
);
if (!returnedObjectHasPairedItem)
return false;
const pairedItemValue = import_getters.getters.nodeExecuteBlock.getPairedItemValue(properties);
if (!pairedItemValue)
return false;
const hasPairedItemValueContent = pairedItemValue.properties.find(
(property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "item" && property.value.type === import_utils.AST_NODE_TYPES.Identifier && property.value.name === inputItemsIndexName;
}
);
if (!hasPairedItemValueContent)
return false;
return true;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hasValidPluralPairingArgument,
hasValidSingularPairingArgument,
isForLoop,
isPluralPairingStatement,
isResourceChecksRoot,
isSingularPairingStatement,
isTryCatch
});

View File

@@ -0,0 +1,250 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var nodeParameter_identifiers_exports = {};
__export(nodeParameter_identifiers_exports, {
hasName: () => hasName,
isAction: () => isAction,
isArrayDefault: () => isArrayDefault,
isBooleanType: () => isBooleanType,
isCollectionType: () => isCollectionType,
isDescription: () => isDescription,
isDisplayName: () => isDisplayName,
isDisplayOptions: () => isDisplayOptions,
isDisplayOptionsShow: () => isDisplayOptionsShow,
isEmail: () => isEmail,
isFixedCollectionType: () => isFixedCollectionType,
isFixedCollectionValues: () => isFixedCollectionValues,
isGetAllOptionProperty: () => isGetAllOptionProperty,
isHint: () => isHint,
isIgnoreSslIssues: () => isIgnoreSslIssues,
isLimit: () => isLimit,
isLoadOptionsMethod: () => isLoadOptionsMethod,
isMaxValue: () => isMaxValue,
isMinValue: () => isMinValue,
isMultiOptionsType: () => isMultiOptionsType,
isName: () => isName,
isNoDataExpression: () => isNoDataExpression,
isNumericType: () => isNumericType,
isObjectDefault: () => isObjectDefault,
isOperation: () => isOperation,
isOptions: () => isOptions,
isOptionsType: () => isOptionsType,
isPlaceholder: () => isPlaceholder,
isPrimitiveDefault: () => isPrimitiveDefault,
isRequired: () => isRequired,
isResource: () => isResource,
isReturnAll: () => isReturnAll,
isShowSetting: () => isShowSetting,
isSimplify: () => isSimplify,
isStringType: () => isStringType,
isTemplateDescription: () => isTemplateDescription,
isTemplateLiteralDefault: () => isTemplateLiteralDefault,
isType: () => isType,
isTypeOptions: () => isTypeOptions,
isUnaryExpression: () => isUnaryExpression,
isUpdateFields: () => isUpdateFields,
isValue: () => isValue
});
module.exports = __toCommonJS(nodeParameter_identifiers_exports);
var import_utils = require("@typescript-eslint/utils");
var import_common = require("./common.identifiers");
function isParamOfType(type, nodeParam) {
const found = nodeParam.properties.find((property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "type" && property.value.type === import_utils.AST_NODE_TYPES.Literal && property.value.value === type;
});
return Boolean(found);
}
function isStringType(nodeParam) {
return isParamOfType("string", nodeParam);
}
function isNumericType(nodeParam) {
return isParamOfType("number", nodeParam);
}
function isBooleanType(nodeParam) {
return isParamOfType("boolean", nodeParam);
}
function isOptionsType(nodeParam) {
return isParamOfType("options", nodeParam);
}
function isMultiOptionsType(nodeParam) {
return isParamOfType("multiOptions", nodeParam);
}
function isCollectionType(nodeParam) {
return isParamOfType("collection", nodeParam);
}
function isFixedCollectionType(nodeParam) {
return isParamOfType("fixedCollection", nodeParam);
}
function hasName(name, nodeParam) {
let check = (value) => value === name;
if (name === "update")
check = (value) => /update/.test(value);
for (const property of nodeParam.properties) {
if (property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "name" && property.value.type === import_utils.AST_NODE_TYPES.Literal && typeof property.value.value === "string" && check(property.value.value)) {
return true;
}
}
return false;
}
function isEmail(nodeParam) {
return isStringType(nodeParam) && hasName("email", nodeParam);
}
function isSimplify(nodeParam) {
return isBooleanType(nodeParam) && hasName("simple", nodeParam);
}
function isLimit(nodeParam) {
return isNumericType(nodeParam) && hasName("limit", nodeParam);
}
function isReturnAll(nodeParam) {
return isBooleanType(nodeParam) && hasName("returnAll", nodeParam);
}
function isIgnoreSslIssues(nodeParam) {
return isBooleanType(nodeParam) && hasName("allowUnauthorizedCerts", nodeParam);
}
function isUpdateFields(nodeParam) {
return isCollectionType(nodeParam) && hasName("update", nodeParam);
}
function isResource(nodeParam) {
return isOptionsType(nodeParam) && hasName("resource", nodeParam);
}
function isOperation(nodeParam) {
return isOptionsType(nodeParam) && hasName("operation", nodeParam);
}
function isAction(nodeParam) {
return isOptionsType(nodeParam) && hasName("action", nodeParam);
}
function isRequired(property) {
return (0, import_common.isBooleanPropertyNamed)("required", property);
}
function isNoDataExpression(property) {
return (0, import_common.isBooleanPropertyNamed)("noDataExpression", property);
}
function isDisplayName(property) {
return (0, import_common.isStringPropertyNamed)("displayName", property);
}
function isPlaceholder(property) {
return (0, import_common.isStringPropertyNamed)("placeholder", property);
}
function isType(property) {
return (0, import_common.isStringPropertyNamed)("type", property);
}
function isName(property) {
return (0, import_common.isStringPropertyNamed)("name", property);
}
function isHint(property) {
return (0, import_common.isStringPropertyNamed)("hint", property);
}
function isValue(property) {
return (0, import_common.isStringPropertyNamed)("value", property);
}
function isDisplayOptions(property) {
return (0, import_common.isObjectPropertyNamed)("displayOptions", property);
}
const isUnaryExpression = (property) => {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.value.type === import_utils.AST_NODE_TYPES.UnaryExpression;
};
function isPrimitiveDefault(property) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "default" && property.value.type === import_utils.AST_NODE_TYPES.Literal;
}
function isTemplateLiteralDefault(property) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "default" && property.value.type === import_utils.AST_NODE_TYPES.TemplateLiteral && property.value.quasis.length > 0;
}
function isObjectDefault(property) {
return (0, import_common.isObjectPropertyNamed)("default", property);
}
function isArrayDefault(property) {
return (0, import_common.isArrayPropertyNamed)("default", property);
}
function isOptions(property) {
return (0, import_common.isArrayPropertyNamed)("options", property) || (0, import_common.isIdentifierPropertyNamed)("options", property);
}
function isTypeOptions(property) {
return (0, import_common.isObjectPropertyNamed)("typeOptions", property);
}
function isTypeOptionsValue(property, keyName, valueType) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.value.type === import_utils.AST_NODE_TYPES.Literal && property.key.name === keyName && typeof property.value.value === valueType;
}
const isMinValue = (property) => isTypeOptionsValue(property, "minValue", "number");
const isMaxValue = (property) => isTypeOptionsValue(property, "maxValue", "number");
function isLoadOptionsMethod(property) {
return (0, import_common.isStringPropertyNamed)("loadOptionsMethod", property);
}
function isDescription(property) {
return (0, import_common.isStringPropertyNamed)("description", property);
}
function isTemplateDescription(property) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "description" && property.value.type === import_utils.AST_NODE_TYPES.TemplateLiteral && property.value.quasis.length > 0;
}
function isFixedCollectionValues(property) {
return (0, import_common.isArrayPropertyNamed)("values", property);
}
function isDisplayOptionsShow(property) {
return (0, import_common.isObjectPropertyNamed)("show", property);
}
function isShowSetting(showSettingKey, property) {
return (0, import_common.isArrayPropertyNamed)(showSettingKey, property);
}
function isGetAllOptionProperty(property) {
return property.type === import_utils.AST_NODE_TYPES.Property && property.computed === false && property.key.type === import_utils.AST_NODE_TYPES.Identifier && property.key.name === "value" && property.value.type === import_utils.AST_NODE_TYPES.Literal && typeof property.value.value === "string" && property.value.value === "getAll";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
hasName,
isAction,
isArrayDefault,
isBooleanType,
isCollectionType,
isDescription,
isDisplayName,
isDisplayOptions,
isDisplayOptionsShow,
isEmail,
isFixedCollectionType,
isFixedCollectionValues,
isGetAllOptionProperty,
isHint,
isIgnoreSslIssues,
isLimit,
isLoadOptionsMethod,
isMaxValue,
isMinValue,
isMultiOptionsType,
isName,
isNoDataExpression,
isNumericType,
isObjectDefault,
isOperation,
isOptions,
isOptionsType,
isPlaceholder,
isPrimitiveDefault,
isRequired,
isResource,
isReturnAll,
isShowSetting,
isSimplify,
isStringType,
isTemplateDescription,
isTemplateLiteralDefault,
isType,
isTypeOptions,
isUnaryExpression,
isUpdateFields,
isValue
});

View File

@@ -0,0 +1,36 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ast_exports = {};
module.exports = __toCommonJS(ast_exports);
__reExport(ast_exports, require("./utils/docline"), module.exports);
__reExport(ast_exports, require("./utils/filename"), module.exports);
__reExport(ast_exports, require("./utils/format"), module.exports);
__reExport(ast_exports, require("./utils/insertion"), module.exports);
__reExport(ast_exports, require("./utils/range"), module.exports);
__reExport(ast_exports, require("./utils/restoreValue"), module.exports);
__reExport(ast_exports, require("./utils/rule"), module.exports);
__reExport(ast_exports, require("./utils/sort"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./utils/docline"),
...require("./utils/filename"),
...require("./utils/format"),
...require("./utils/insertion"),
...require("./utils/range"),
...require("./utils/restoreValue"),
...require("./utils/rule"),
...require("./utils/sort")
});

View File

@@ -0,0 +1,22 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var restorers_exports = {};
module.exports = __toCommonJS(restorers_exports);
__reExport(restorers_exports, require("./restorers"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./restorers")
});

View File

@@ -0,0 +1,120 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var restorers_exports = {};
__export(restorers_exports, {
restoreArray: () => restoreArray,
restoreArrayOfObjects: () => restoreArrayOfObjects,
restoreClassDescriptionOptions: () => restoreClassDescriptionOptions,
restoreFixedCollectionValues: () => restoreFixedCollectionValues,
restoreNodeParamCollectionOptions: () => restoreNodeParamCollectionOptions,
restoreNodeParamOptions: () => restoreNodeParamOptions,
restoreObject: () => restoreObject
});
module.exports = __toCommonJS(restorers_exports);
var import_utils = require("@typescript-eslint/utils");
var import_common = require("../identifiers/common.identifiers");
var import_nodeParameter = require("../identifiers/nodeParameter.identifiers");
function restoreArray(elements) {
return elements.reduce((acc, element) => {
if (element.type === import_utils.AST_NODE_TYPES.Literal && element.value) {
acc.push(element.value.toString());
}
return acc;
}, []);
}
function restoreArrayOfObjects(elements) {
return elements.reduce((acc, element) => {
if (element.type === import_utils.AST_NODE_TYPES.ObjectExpression) {
acc.push(restoreObject(element));
}
return acc;
}, []);
}
function restoreObject(objectExpression) {
return objectExpression.properties.reduce(
(acc, property) => {
if ((0, import_common.isArrayExpression)(property)) {
acc[property.key.name] = restoreArrayOfObjects(property.value.elements);
} else if ((0, import_common.isLiteral)(property)) {
acc[property.key.name] = property.value.value;
} else if ((0, import_nodeParameter.isUnaryExpression)(property)) {
acc[property.key.name] = parseInt(
property.value.operator + property.value.argument.raw
// e.g. -1
);
}
return acc;
},
{}
);
}
function restoreFixedCollectionValues(options) {
const isNodeParameterAsValue = (entity) => entity.displayName !== void 0;
const restoredValues = [];
for (const option of options) {
const restoredValue = restoreObject(option);
if (!isNodeParameterAsValue(restoredValue))
continue;
restoredValues.push(restoredValue);
}
return restoredValues;
}
function restoreNodeParamOptions(options) {
const isOption = (entity) => entity.name !== void 0 && entity.value !== void 0;
const restoredOptions = [];
for (const option of options) {
const restoredOption = restoreObject(option);
if (!isOption(restoredOption))
continue;
restoredOptions.push(restoredOption);
}
return restoredOptions;
}
function restoreNodeParamCollectionOptions(options) {
const isNodeParameterAsValue = (entity) => entity.displayName !== void 0;
const restoredOptions = [];
for (const option of options) {
const restoredOption = restoreObject(option);
if (!isNodeParameterAsValue(restoredOption))
continue;
restoredOptions.push(restoredOption);
}
return restoredOptions;
}
function restoreClassDescriptionOptions(credOptions) {
const isCredOption = (entity) => entity.name !== void 0;
const restoredCredOptions = [];
for (const credOption of credOptions) {
const restoredCredOption = restoreObject(credOption);
if (!isCredOption(restoredCredOption))
continue;
restoredCredOptions.push(restoredCredOption);
}
return restoredCredOptions;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
restoreArray,
restoreArrayOfObjects,
restoreClassDescriptionOptions,
restoreFixedCollectionValues,
restoreNodeParamCollectionOptions,
restoreNodeParamOptions,
restoreObject
});

View File

@@ -0,0 +1,31 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var apiSuffixExemption_exports = {};
__export(apiSuffixExemption_exports, {
isExemptedFromApiSuffix: () => isExemptedFromApiSuffix
});
module.exports = __toCommonJS(apiSuffixExemption_exports);
var import_constants = require("../../constants");
function isExemptedFromApiSuffix(filename) {
return import_constants.CREDS_EXEMPTED_FROM_API_SUFFIX.some((cred) => filename.includes(cred));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isExemptedFromApiSuffix
});

View File

@@ -0,0 +1,30 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var defaultValue_exports = {};
__export(defaultValue_exports, {
getDefaultValue: () => getDefaultValue
});
module.exports = __toCommonJS(defaultValue_exports);
function getDefaultValue(options, keyName) {
return options.find((o) => o[keyName] !== void 0)?.[keyName];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getDefaultValue
});

View File

@@ -0,0 +1,36 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var docline_exports = {};
__export(docline_exports, {
docline: () => docline
});
module.exports = __toCommonJS(docline_exports);
function docline(sections, ...vars) {
return sections.reduce((acc, templateSection, index) => {
if (vars[index] === "") {
vars[index] = "`''` (empty string)";
}
acc += templateSection + (vars[index] ?? "");
return acc;
}, "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
docline
});

View File

@@ -0,0 +1,78 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var filename_exports = {};
__export(filename_exports, {
getNodeFilename: () => getNodeFilename,
isCredClassFile: () => isCredClassFile,
isCredentialFile: () => isCredentialFile,
isNodeFile: () => isNodeFile,
isRegularNodeFile: () => isRegularNodeFile,
isTriggerNodeFile: () => isTriggerNodeFile,
toExpectedNodeFilename: () => toExpectedNodeFilename
});
module.exports = __toCommonJS(filename_exports);
const isTestRun = process.env.NODE_ENV === "test";
function getNodeFilename(fullPath) {
if (isTestRun)
return "Test.node.ts";
const filename = fullPath.replace(/\\/g, "/").split("/").pop();
if (!filename) {
throw new Error(`Failed to extract node filename from path: ${fullPath}`);
}
return filename;
}
function isCredentialFile(fullPath) {
if (isTestRun)
return true;
return getNodeFilename(fullPath).endsWith(".credentials.ts");
}
function isNodeFile(fullPath) {
if (isTestRun)
return true;
return getNodeFilename(fullPath).endsWith(".node.ts");
}
function isRegularNodeFile(filePath) {
if (isTestRun)
return true;
const filename = getNodeFilename(filePath);
return filename.endsWith(".node.ts") && !filename.endsWith("Trigger.node.ts") && !filename.endsWith("EmailReadImap.node.ts");
}
function isTriggerNodeFile(filePath) {
if (isTestRun)
return true;
return getNodeFilename(filePath).endsWith("Trigger.node.ts");
}
function isCredClassFile(filePath) {
if (isTestRun)
return true;
return getNodeFilename(filePath).endsWith(".credentials.ts");
}
function toExpectedNodeFilename(name) {
return name.charAt(0).toUpperCase() + name.slice(1) + ".node.ts";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getNodeFilename,
isCredClassFile,
isCredentialFile,
isNodeFile,
isRegularNodeFile,
isTriggerNodeFile,
toExpectedNodeFilename
});

View File

@@ -0,0 +1,123 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var format_exports = {};
__export(format_exports, {
clean_OLD: () => clean_OLD,
formatItems: () => formatItems,
getBaseIndentationForOption: () => getBaseIndentationForOption,
getIndentationString: () => getIndentationString,
isAllowedLowercase: () => isAllowedLowercase,
isKebabCase: () => isKebabCase,
toDisplayOrder: () => toDisplayOrder,
toDisplayOrderForCollection: () => toDisplayOrderForCollection
});
module.exports = __toCommonJS(format_exports);
var import_constants = require("../../constants");
var import_functional = require("./functional");
function formatItems(obj, baseIndentation) {
const str = JSON.stringify(obj, null, 2);
const punctuated = (0, import_functional.pipe)(addTrailingCommas, singleQuoteAll, unquoteKeys)(str);
return indent(punctuated, baseIndentation);
}
function addTrailingCommas(str) {
return str.replace(/(\})(\s)/g, "$1,$2").replace(/(\])(\s)/g, "$1,$2").replace(/(\s+)(\},)/g, ",$1$2");
}
function singleQuoteAll(str) {
return str.replace(/'/g, "\\'").replace(/"/g, "'");
}
function unquoteKeys(str) {
return str.replace(/'(.*)':/g, "$1:");
}
function indent(str, baseIndentation) {
return str.split("\n").map((line) => {
const match = line.match(/^(?<leadingWhitespace>\s*)(?<rest>.*)/);
if (!match || !match.groups)
return line;
const { leadingWhitespace, rest } = match.groups;
if (!rest)
return line;
if (!leadingWhitespace) {
return baseIndentation + " " + rest;
}
if (rest.startsWith("{") || rest.startsWith("}")) {
return baseIndentation + " ".repeat(leadingWhitespace.length) + rest;
}
return baseIndentation + " ".repeat(leadingWhitespace.length - 1) + rest;
}).join("\n").trim();
}
function clean_OLD(obj, indentation) {
const clean = JSON.stringify(obj, null, 2).replace(/\'/g, "\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm, (m) => m.replace(/"/g, "")).replace(/"/g, "'").replace(/\}\s/g, "},\n").replace("]", " ]").replace(/ /g, " ").replace(/\tname:\t/g, "name: ").replace(/\tvalue:\t/g, "value: ").replace(/\tdisplayName:\t/g, "displayName: ").replace(/\tdescription:\t/g, "description: ").replace(/\tplaceholder:\t/g, "placeholder: ").replace(/\toptions:\t/g, "options: ").replace(/\ttype:\t/g, "type: ").replace(/\tdefault:\t/g, "default: ").replace(/(\.)\t\b/g, ". ").replace(/\t\(/g, " (").replace(/\t</g, " <").replace(/\)\t/g, ") ").replace(/,\t\b/g, ", ").replace(/\t\\/g, " \\").replace(/'\t/g, "' ").replace(/\b\t\b/g, " ").replace(/'\s\t/g, "',\n ").replace(/false\n/g, "false,\n").replace(/true\n/g, "true,\n").replace(/href=\\'/g, 'href="').replace(/\\'>/g, '">').replace(/\n/g, `
${indentation}`).replace(/\t{8}/gm, `${" ".repeat(6)}`).replace(/^\t{2}\]/gm, `${" ".repeat(3)}]`).replace(/^\t{7}\]/gm, `${" ".repeat(5)}]`);
return clean;
}
function toDisplayOrder(options) {
return options.reduce((acc, cur) => {
return acc.push(cur.name), acc;
}, []).join(" | ");
}
function toDisplayOrderForCollection(options) {
return options.reduce((acc, cur) => {
return acc.push(cur.displayName), acc;
}, []).join(" | ");
}
const getIndentationString = (referenceNode) => {
return " ".repeat(referenceNode.ast.loc.start.column);
};
const getBaseIndentationForOption = (referenceNode) => {
return " ".repeat(referenceNode.ast.loc.start.column - 1);
};
function isKebabCase(str) {
if (str !== str.toLowerCase())
return false;
if (/\s/.test(str))
return false;
if (!/-/.test(str))
return false;
return str === str.toLowerCase().replace(/\s/g, "-");
}
function isAllowedLowercase(value) {
if (isUrl(value))
return true;
if (isKebabCase(value))
return true;
if (import_constants.VERSION_REGEX.test(value))
return true;
return ["bmp", "tiff", "gif", "jpg", "jpeg", "png", "webp"].includes(value);
}
function isUrl(str) {
try {
if (["com", "org", "net", "io", "edu"].includes(str.slice(-3)))
return true;
new URL(str);
return true;
} catch (_) {
return false;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
clean_OLD,
formatItems,
getBaseIndentationForOption,
getIndentationString,
isAllowedLowercase,
isKebabCase,
toDisplayOrder,
toDisplayOrderForCollection
});

View File

@@ -0,0 +1,28 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var functional_exports = {};
__export(functional_exports, {
pipe: () => pipe
});
module.exports = __toCommonJS(functional_exports);
const pipe = (...fns) => (x) => fns.reduce((v, f) => f(v), x);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
pipe
});

View File

@@ -0,0 +1,53 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var utils_exports = {};
__export(utils_exports, {
utils: () => utils
});
module.exports = __toCommonJS(utils_exports);
var filename = __toESM(require("./filename"));
var format = __toESM(require("./format"));
var insertion = __toESM(require("./insertion"));
var range = __toESM(require("./range"));
var restoreValue = __toESM(require("./restoreValue"));
var rule = __toESM(require("./rule"));
var sort = __toESM(require("./sort"));
const utils = {
...filename,
...format,
...insertion,
...range,
...restoreValue,
...rule,
...sort
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
utils
});

View File

@@ -0,0 +1,79 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var insertion_exports = {};
__export(insertion_exports, {
addApiSuffix: () => addApiSuffix,
addEndSegment: () => addEndSegment,
getInsertionArgs: () => getInsertionArgs,
keyValue: () => keyValue
});
module.exports = __toCommonJS(insertion_exports);
var import_utils = require("@typescript-eslint/utils");
var import_format = require("./format");
var import_range = require("./range");
const getInsertionArgs = (referenceNode) => {
if (referenceNode.ast.type === import_utils.AST_NODE_TYPES.PropertyDefinition || // @ts-ignore
referenceNode.ast.type === import_utils.AST_NODE_TYPES.ClassProperty) {
return {
range: referenceNode.ast.range,
indentation: (0, import_format.getIndentationString)(referenceNode)
};
}
return {
range: (0, import_range.getRangeWithTrailingComma)(referenceNode),
indentation: (0, import_format.getIndentationString)(referenceNode)
};
};
function keyValue(key, value, { backtickedValue } = { backtickedValue: false }) {
const unescapedQuote = new RegExp(/(?<!\\)'/, "g");
const escapedValue = value.replace(unescapedQuote, "\\'");
if (backtickedValue) {
return `${key}: \`${escapedValue}\``;
}
return `${key}: '${escapedValue}'`;
}
function addEndSegment(value) {
if (/\w+\sName(s?)\s*\/\s*ID(s?)/.test(value))
return value.replace(/Name(s?)\s*\/\s*ID(s?)/, "Name or ID");
if (/\w+\sID(s?)\s*\/\s*Name(s?)/.test(value))
return value.replace(/ID(s?)\s*\/\s*Name(s?)/, "Name or ID");
if (/\w+\sName(s?)$/.test(value))
return value.replace(/Name(s?)$/, "Name or ID");
if (/\w+\sID(s?)$/.test(value))
return value.replace(/ID(s?)$/, "Name or ID");
if (value === "ID" || value === "Name")
return "Name or ID";
if (/Name or/.test(value))
return value.replace("Name or", "Name or ID");
return value.concat(" Name or ID");
}
function addApiSuffix(name, { uppercased } = { uppercased: false }) {
if (name.endsWith("Ap"))
return uppercased ? `${name}I` : `${name}i`;
if (name.endsWith("A"))
return uppercased ? `${name}PI` : `${name}pi`;
return uppercased ? `${name} API` : `${name}Api`;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
addApiSuffix,
addEndSegment,
getInsertionArgs,
keyValue
});

View File

@@ -0,0 +1,53 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var range_exports = {};
__export(range_exports, {
getRangeOfAssertion: () => getRangeOfAssertion,
getRangeToRemove: () => getRangeToRemove,
getRangeWithTrailingComma: () => getRangeWithTrailingComma,
isMultiline: () => isMultiline
});
module.exports = __toCommonJS(range_exports);
var import_utils = require("@typescript-eslint/utils");
var import_format = require("./format");
function getRangeWithTrailingComma(referenceNode) {
const { range } = referenceNode.ast;
return [range[0], range[1] + 1];
}
function isMultiline(node) {
return node.ast.loc.start.line !== node.ast.loc.end.line;
}
function getRangeOfAssertion(typeIdentifier) {
return [typeIdentifier.range[0] - 4, typeIdentifier.range[1]];
}
function getRangeToRemove(referenceNode) {
const { range } = referenceNode.ast;
const indentation = (0, import_format.getIndentationString)(referenceNode);
if (referenceNode.ast.type === import_utils.AST_NODE_TYPES.TSArrayType) {
return [range[0] - indentation.length, range[1] - 1];
}
return [range[0] - indentation.length, range[1] + 2];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
getRangeOfAssertion,
getRangeToRemove,
getRangeWithTrailingComma,
isMultiline
});

View File

@@ -0,0 +1,34 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var restoreValue_exports = {};
__export(restoreValue_exports, {
restoreValue: () => restoreValue
});
module.exports = __toCommonJS(restoreValue_exports);
function restoreValue(source) {
try {
return eval(`(${source})`);
} catch (error) {
return null;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
restoreValue
});

View File

@@ -0,0 +1,34 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var rule_exports = {};
__export(rule_exports, {
createRule: () => createRule,
getRuleName: () => getRuleName
});
module.exports = __toCommonJS(rule_exports);
var import_utils = require("@typescript-eslint/utils");
const createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => {
return `https://github.com/ivov/eslint-plugin-n8n-nodes-base/blob/master/docs/rules/${ruleName}.md`;
});
const getRuleName = ({ filename }) => filename.split("/").pop()?.replace(/(\.test)?\.(j|t)s/, "") ?? "Unknown";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
createRule,
getRuleName
});

View File

@@ -0,0 +1,73 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var sort_exports = {};
__export(sort_exports, {
areIdenticallySortedOptions: () => areIdenticallySortedOptions,
areIdenticallySortedOptionsForCollection: () => areIdenticallySortedOptionsForCollection,
areIdenticallySortedParams: () => areIdenticallySortedParams,
optionComparator: () => optionComparator,
optionComparatorForCollection: () => optionComparatorForCollection
});
module.exports = __toCommonJS(sort_exports);
var import_constants = require("../../constants");
function areIdenticallySortedOptions(first, second) {
for (let i = 0; i < first.length; i++) {
if (first[i].name !== second[i].name)
return false;
}
return true;
}
function areIdenticallySortedOptionsForCollection(first, second) {
for (let i = 0; i < first.length; i++) {
if (first[i].displayName !== second[i].displayName)
return false;
}
return true;
}
function optionComparator(a, b) {
if (import_constants.VERSION_REGEX.test(a.name)) {
if (a.name === b.name)
return 0;
return parseFloat(a.name.slice(1)) > parseFloat(b.name.slice(1)) ? -1 : 1;
}
return a.name.localeCompare(b.name);
}
function optionComparatorForCollection(a, b) {
if (import_constants.VERSION_REGEX.test(a.displayName)) {
if (a.displayName === b.displayName)
return 0;
return parseFloat(a.displayName.slice(1)) > parseFloat(b.displayName.slice(1)) ? -1 : 1;
}
return a.displayName.localeCompare(b.displayName);
}
function areIdenticallySortedParams(first, second) {
for (let i = 0; i < first.length; i++) {
if (first[i].displayName !== second[i].displayName)
return false;
}
return true;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
areIdenticallySortedOptions,
areIdenticallySortedOptionsForCollection,
areIdenticallySortedParams,
optionComparator,
optionComparatorForCollection
});