mirror of
https://github.com/n8n-io/n8n.git
synced 2026-12-04 00:30:34 +00:00
chore: Remove deprecated node-dev package (#34156)
This commit is contained in:
1 parent
4d037185c7
commit
f8c5e7c95e
24 files changed
+349
-3736
No files matched your search
+271
-123
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"generated": "2026-07-14T12:44:08.434Z",
|
||||
"totalViolations": 56,
|
||||
"violations": {
|
||||
"packages/@n8n/ai-workflow-builder.ee/package.json": [
|
||||
{
|
||||
@@ -9,40 +11,92 @@
|
||||
"hash": "6ee5e003d795"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 61,
|
||||
"message": "\"@langchain/core\" is a runtime dependency of \"@n8n/ai-workflow-builder\"; it must be a peerDependency.",
|
||||
"hash": "352bf126d45a"
|
||||
"rule": "catalog-violations",
|
||||
"line": 76,
|
||||
"message": "jsdom appears in 4 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "9c770d66baf2"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/node-cli/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 78,
|
||||
"message": "eslint@>= 9 should use \"catalog:\" (exists in pnpm-workspace.yaml)",
|
||||
"hash": "1b5deae544ea"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 53,
|
||||
"message": "@oclif/core appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "b6a694c807bc"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/nodes-langchain/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 314,
|
||||
"message": "mysql2@3.17.0 should use \"catalog:\" (exists in pnpm-workspace.yaml)",
|
||||
"hash": "2d7d1b715d0c"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 318,
|
||||
"message": "openai@^6.34.0 should use \"catalog:\" (exists in pnpm-workspace.yaml)",
|
||||
"hash": "3c1f53f0afe3"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 308,
|
||||
"message": "jsdom appears in 4 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "26f20ebea4b1"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 313,
|
||||
"message": "mongodb appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "46cb48884e22"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 85,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/ai-workflow-builder\"; it must be a peerDependency.",
|
||||
"hash": "fd6171764eb4"
|
||||
"line": 253,
|
||||
"message": "\"@langchain/core\" is a runtime dependency of \"@n8n/n8n-nodes-langchain\"; it must be a peerDependency.",
|
||||
"hash": "a3cb17459555"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 304,
|
||||
"message": "\"form-data\" is a runtime dependency of \"@n8n/n8n-nodes-langchain\"; it must be a peerDependency.",
|
||||
"hash": "d3d8fabe4a38"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 330,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/n8n-nodes-langchain\"; it must be a peerDependency.",
|
||||
"hash": "6dea0e57951a"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/tournament/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 43,
|
||||
"line": 41,
|
||||
"message": "@types/node@^18.13.0 should use \"catalog:\" (exists in pnpm-workspace.yaml)",
|
||||
"hash": "6368b5d3b924"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 52,
|
||||
"line": 50,
|
||||
"message": "ast-types appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "27edcbb2b4f8"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 53,
|
||||
"line": 51,
|
||||
"message": "esprima-next appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "75058f9a4d30"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 54,
|
||||
"line": 52,
|
||||
"message": "recast appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "5f2b50fef19d"
|
||||
}
|
||||
@@ -268,145 +322,239 @@
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 93,
|
||||
"message": "recast appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "b660317b5f6f"
|
||||
"line": 90,
|
||||
"message": "pg@^8.17.0 should use \"catalog:\" (exists in pnpm-workspace.yaml)",
|
||||
"hash": "6cac348bdcc8"
|
||||
}
|
||||
],
|
||||
"packages/frontend/@n8n/chat/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 68,
|
||||
"message": "unplugin-icons@^0.19.0 should use \"catalog:frontend\" (exists in pnpm-workspace.yaml [frontend])",
|
||||
"hash": "a0d24d761026"
|
||||
}
|
||||
],
|
||||
"packages/cli/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 177,
|
||||
"message": "@opentelemetry/sdk-trace-base appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "1cf7f6bcf5d1"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 85,
|
||||
"message": "\"form-data\" is a runtime dependency of \"n8n-workflow\"; it must be a peerDependency.",
|
||||
"hash": "a5f5104e7293"
|
||||
"rule": "catalog-violations",
|
||||
"line": 178,
|
||||
"message": "@opentelemetry/sdk-trace-node appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "a3dad0b8dc21"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 271,
|
||||
"message": "ws appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "cd07242e8163"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 89,
|
||||
"message": "@types/psl appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "6e62e0076b0a"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/agents/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 111,
|
||||
"message": "@opentelemetry/sdk-trace-base appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "c5c495ac3508"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 112,
|
||||
"message": "@opentelemetry/sdk-trace-node appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "a77ced903cdf"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/mcp-browser/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 37,
|
||||
"message": "ws appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "9650c1b55f3c"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 31,
|
||||
"message": "jsdom appears in 4 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "8466b03b1044"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/task-runner/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 53,
|
||||
"message": "ws appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "51cb5069f382"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/instance-ai/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 95,
|
||||
"message": "@types/psl appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "56dabb51b433"
|
||||
}
|
||||
],
|
||||
"packages/nodes-base/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 955,
|
||||
"message": "eventsource appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "9795e6c6d9e9"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 970,
|
||||
"message": "jsdom appears in 4 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "02341f2b5e3e"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 982,
|
||||
"message": "mongodb appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "f688907d087a"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/computer-use/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 48,
|
||||
"message": "eventsource appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "f50c1eee2ed6"
|
||||
}
|
||||
],
|
||||
"packages/workflow/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 78,
|
||||
"message": "ast-types appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "1c7d7cf0b0fe"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 81,
|
||||
"message": "esprima-next appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "627a716b5d23"
|
||||
},
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 90,
|
||||
"message": "recast appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "b660317b5f6f"
|
||||
}
|
||||
],
|
||||
"packages/frontend/editor-ui/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 128,
|
||||
"line": 83,
|
||||
"message": "esprima-next appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "62156c2613b2"
|
||||
}
|
||||
],
|
||||
"packages/core/package.json": [
|
||||
"packages/@n8n/benchmark/package.json": [
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 65,
|
||||
"message": "\"@langchain/core\" is a runtime dependency of \"n8n-core\"; it must be a peerDependency.",
|
||||
"hash": "602aad4587ee"
|
||||
"rule": "catalog-violations",
|
||||
"line": 38,
|
||||
"message": "@oclif/core appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "6c742564e868"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/cli/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 78,
|
||||
"message": "@oclif/core appears in 3 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "78dcf13f2250"
|
||||
}
|
||||
],
|
||||
"package.json": [
|
||||
{
|
||||
"rule": "stale-overrides",
|
||||
"line": 108,
|
||||
"message": "Override \"@azure/identity\" duplicates a catalog entry for @azure/identity — set the override to \"catalog:\" or remove it",
|
||||
"hash": "ef24d04a4347"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 86,
|
||||
"message": "\"form-data\" is a runtime dependency of \"n8n-core\"; it must be a peerDependency.",
|
||||
"hash": "643d5b8cd4be"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/ai-utilities/package.json": [
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 154,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/ai-utilities\"; it must be a peerDependency.",
|
||||
"hash": "2ed5d6717e54"
|
||||
"rule": "stale-overrides",
|
||||
"line": 109,
|
||||
"message": "Override \"@lezer/common\" duplicates a catalog entry for @lezer/common — set the override to \"catalog:\" or remove it",
|
||||
"hash": "1e5d2fb72ef8"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 156,
|
||||
"message": "\"@langchain/core\" is a runtime dependency of \"@n8n/ai-utilities\"; it must be a peerDependency.",
|
||||
"hash": "5626f18eefaf"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/backend-network/package.json": [
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 76,
|
||||
"message": "\"form-data\" is a runtime dependency of \"@n8n/backend-network\"; it must be a peerDependency.",
|
||||
"hash": "6b988cc15b6f"
|
||||
"rule": "stale-overrides",
|
||||
"line": 114,
|
||||
"message": "Override \"@types/node\" duplicates a catalog entry for @types/node — set the override to \"catalog:\" or remove it",
|
||||
"hash": "d3577ed2e92d"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 84,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/backend-network\"; it must be a peerDependency.",
|
||||
"hash": "3af671752aa6"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/blob-storage/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 115,
|
||||
"message": "Override \"chokidar\" duplicates a catalog entry for chokidar — set the override to \"catalog:\" or remove it",
|
||||
"hash": "8496c5755ef0"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 51,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/blob-storage\"; it must be a peerDependency.",
|
||||
"hash": "2beb68b6b1eb"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/config/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 130,
|
||||
"message": "Override \"form-data\" duplicates a catalog entry for form-data — set the override to \"catalog:\" or remove it",
|
||||
"hash": "ec13014b18ab"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 29,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/config\"; it must be a peerDependency.",
|
||||
"hash": "0acfb4c2c019"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/db/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 134,
|
||||
"message": "Override \"nodemailer\" duplicates a catalog entry for nodemailer — set the override to \"catalog:\" or remove it",
|
||||
"hash": "1a696378ebfc"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 52,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/db\"; it must be a peerDependency.",
|
||||
"hash": "67751e0ed127"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/engine/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 136,
|
||||
"message": "Override \"zod\" duplicates a catalog entry for zod — set the override to \"catalog:\" or remove it",
|
||||
"hash": "6224a1e7997d"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 37,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/engine\"; it must be a peerDependency.",
|
||||
"hash": "a25ac9357fce"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/expression-runtime/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 145,
|
||||
"message": "Override \"@rudderstack/rudder-sdk-node@<=3.0.0\" duplicates a catalog entry for @rudderstack/rudder-sdk-node — set the override to \"catalog:\" or remove it",
|
||||
"hash": "71f703e2c449"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 51,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/expression-runtime\"; it must be a peerDependency.",
|
||||
"hash": "5669d2783982"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/extension-sdk/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 153,
|
||||
"message": "Override \"lodash\" duplicates a catalog entry for lodash — set the override to \"catalog:\" or remove it",
|
||||
"hash": "3cbb69cc0ff8"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 68,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/extension-sdk\"; it must be a peerDependency.",
|
||||
"hash": "ab05f1864411"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/mcp-apps/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 160,
|
||||
"message": "Override \"flatted\" duplicates a catalog entry for flatted — set the override to \"catalog:\" or remove it",
|
||||
"hash": "7fe03ed5fec2"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 45,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/mcp-apps\"; it must be a peerDependency.",
|
||||
"hash": "5e1c42cefa8d"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/permissions/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 169,
|
||||
"message": "Override \"yaml@<=2.8.3\" duplicates a catalog entry for yaml — set the override to \"catalog:\" or remove it",
|
||||
"hash": "a5ab421c217c"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 26,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/permissions\"; it must be a peerDependency.",
|
||||
"hash": "ead6e5815a0f"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/syslog-client/package.json": [
|
||||
"rule": "stale-overrides",
|
||||
"line": 174,
|
||||
"message": "Override \"uuid@<=13.0.1\" duplicates a catalog entry for uuid — set the override to \"catalog:\" or remove it",
|
||||
"hash": "abd23b6d69fe"
|
||||
},
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 26,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/syslog-client\"; it must be a peerDependency.",
|
||||
"hash": "d1cff54dc25f"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/telemetry/package.json": [
|
||||
{
|
||||
"rule": "single-instance-libs",
|
||||
"line": 28,
|
||||
"message": "\"zod\" is a runtime dependency of \"@n8n/telemetry\"; it must be a peerDependency.",
|
||||
"hash": "d61edcda4afe"
|
||||
"rule": "stale-overrides",
|
||||
"line": 183,
|
||||
"message": "Override \"langsmith\" duplicates a catalog entry for langsmith — set the override to \"catalog:\" or remove it",
|
||||
"hash": "170e854b445c"
|
||||
}
|
||||
],
|
||||
"packages/@n8n/workflow-sdk/package.json": [
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"n8n-containers",
|
||||
"n8n-core",
|
||||
"n8n-editor-ui",
|
||||
"n8n-node-dev",
|
||||
"n8n-nodes-base",
|
||||
"n8n-playwright",
|
||||
"n8n-workflow"
|
||||
|
||||
@@ -196,7 +196,6 @@ The monorepo is organized into these key packages:
|
||||
|
||||
- Each package has isolated build configuration and can be developed independently
|
||||
- Hot reload works across the full stack during development
|
||||
- Node development uses dedicated `node-dev` CLI tool
|
||||
- Workflow tests are JSON-based for integration testing
|
||||
- AI features have dedicated development workflow (`pnpm dev:ai`)
|
||||
|
||||
|
||||
+41
-32
@@ -5,37 +5,47 @@ Great that you are here and you want to contribute to n8n
|
||||
## Contents
|
||||
|
||||
- [Contributing to n8n](#contributing-to-n8n)
|
||||
- [Contents](#contents)
|
||||
- [Code of conduct](#code-of-conduct)
|
||||
- [Directory structure](#directory-structure)
|
||||
- [Development setup](#development-setup)
|
||||
- [Dev Container](#dev-container)
|
||||
- [Requirements](#requirements)
|
||||
- [Node.js](#nodejs)
|
||||
- [pnpm](#pnpm)
|
||||
- [pnpm workspaces](#pnpm-workspaces)
|
||||
- [Build tools](#build-tools)
|
||||
- [Actual n8n setup](#actual-n8n-setup)
|
||||
- [Start](#start)
|
||||
- [Development cycle](#development-cycle)
|
||||
- [Stacked pull requests](#stacked-pull-requests)
|
||||
- [Enabling `gh stack`](#enabling-gh-stack)
|
||||
- [Splitting work into a stack yourself](#splitting-work-into-a-stack-yourself)
|
||||
- [Asking an agent to do it](#asking-an-agent-to-do-it)
|
||||
- [Community PR Guidelines](#community-pr-guidelines)
|
||||
- [**1. Change Request/Comment**](#1-change-requestcomment)
|
||||
- [**2. General Requirements**](#2-general-requirements)
|
||||
- [**3. PR Specific Requirements**](#3-pr-specific-requirements)
|
||||
- [**4. Workflow Summary for Non-Compliant PRs**](#4-workflow-summary-for-non-compliant-prs)
|
||||
- [Test suite](#test-suite)
|
||||
- [Unit tests](#unit-tests)
|
||||
- [Code Coverage](#code-coverage)
|
||||
- [E2E tests](#e2e-tests)
|
||||
- [Releasing](#releasing)
|
||||
- [Create custom nodes](#create-custom-nodes)
|
||||
- [Extend documentation](#extend-documentation)
|
||||
- [Contribute workflow templates](#contribute-workflow-templates)
|
||||
- [Contributor License Agreement](#contributor-license-agreement)
|
||||
- [Contents](#contents)
|
||||
- [Code of conduct](#code-of-conduct)
|
||||
- [Directory structure](#directory-structure)
|
||||
- [Development setup](#development-setup)
|
||||
- [Dev Container](#dev-container)
|
||||
- [Requirements](#requirements)
|
||||
- [Node.js](#nodejs)
|
||||
- [pnpm](#pnpm)
|
||||
- [pnpm workspaces](#pnpm-workspaces)
|
||||
- [corepack](#corepack)
|
||||
- [Build tools](#build-tools)
|
||||
- [actionlint (for GitHub Actions workflow development)](#actionlint-for-github-actions-workflow-development)
|
||||
- [tbls (for database schema docs)](#tbls-for-database-schema-docs)
|
||||
- [Actual n8n setup](#actual-n8n-setup)
|
||||
- [For external contributors](#for-external-contributors)
|
||||
- [For everyone](#for-everyone)
|
||||
- [Start](#start)
|
||||
- [Environment variables (optional)](#environment-variables-optional)
|
||||
- [Development cycle](#development-cycle)
|
||||
- [Basic Development Workflow Example (most used within n8n)](#basic-development-workflow-example-most-used-within-n8n)
|
||||
- [Selective Package Development](#selective-package-development)
|
||||
- [Available Filtered Commands](#available-filtered-commands)
|
||||
- [Custom Selective Development](#custom-selective-development)
|
||||
- [Running the BE server with a clean database](#running-the-be-server-with-a-clean-database)
|
||||
- [Hot Reload for Nodes (N8N\_DEV\_RELOAD)](#hot-reload-for-nodes-n8n_dev_reload)
|
||||
- [Run local instances in different configurations](#run-local-instances-in-different-configurations)
|
||||
- [Work locally with syslog](#work-locally-with-syslog)
|
||||
- [Performance Considerations](#performance-considerations)
|
||||
- [Community PR Guidelines](#community-pr-guidelines)
|
||||
- [**1. Change Request/Comment**](#1-change-requestcomment)
|
||||
- [**2. General Requirements**](#2-general-requirements)
|
||||
- [**3. PR Specific Requirements**](#3-pr-specific-requirements)
|
||||
- [**4. Workflow Summary for Non-Compliant PRs**](#4-workflow-summary-for-non-compliant-prs)
|
||||
- [Test suite](#test-suite)
|
||||
- [Unit tests](#unit-tests)
|
||||
- [Code Coverage](#code-coverage)
|
||||
- [E2E tests](#e2e-tests)
|
||||
- [Create custom nodes](#create-custom-nodes)
|
||||
- [Extend documentation](#extend-documentation)
|
||||
- [Contribute workflow templates](#contribute-workflow-templates)
|
||||
- [Contributor License Agreement](#contributor-license-agreement)
|
||||
|
||||
## Code of conduct
|
||||
|
||||
@@ -59,7 +69,6 @@ The most important directories:
|
||||
starting on any changes here**
|
||||
- [/packages/frontend/@n8n/design-system](/packages/frontend/@n8n/design-system) - Vue frontend components
|
||||
- [/packages/frontend/editor-ui](/packages/frontend/editor-ui) - Vue frontend workflow editor
|
||||
- [/packages/node-dev](/packages/node-dev) - CLI to create new n8n-nodes
|
||||
- [/packages/nodes-base](/packages/nodes-base) - Base n8n nodes
|
||||
- [/packages/workflow](/packages/workflow) - Workflow code with interfaces which
|
||||
get used by front- & backend
|
||||
|
||||
@@ -315,111 +315,17 @@ packages/@n8n/codemirror-lang/ @n8n-io/nodes
|
||||
packages/@n8n/codemirror-lang-html/ @n8n-io/nodes
|
||||
packages/@n8n/codemirror-lang-sql/ @n8n-io/nodes
|
||||
packages/nodes-base/ @n8n-io/nodes
|
||||
packages/nodes-base/nodes/Code/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/ExecuteCommand/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/Ssh/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/HttpRequest/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/Webhook/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/RespondToWebhook/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/Form/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/Wait/ @n8n-io/nodes required
|
||||
packages/nodes-base/utils/sendAndWait/ @n8n-io/nodes required
|
||||
packages/nodes-base/nodes/Git/ @n8n-io/nodes required
|
||||
packages/node-dev/ @n8n-io/nodes
|
||||
packages/@n8n/imap/ @n8n-io/nodes
|
||||
packages/@n8n/mcp-browser/ @n8n-io/nodes required
|
||||
packages/@n8n/mcp-browser-extension/ @n8n-io/nodes required
|
||||
packages/modules/quick-connect/ @n8n-io/nodes required
|
||||
packages/@n8n/api-types/src/dto/quick-connect/ @n8n-io/nodes required
|
||||
packages/@n8n/api-types/src/quick-connect.ts @n8n-io/nodes required
|
||||
packages/cli/src/modules/community-packages/ @n8n-io/nodes
|
||||
packages/cli/src/modules/mcp-registry/ @n8n-io/nodes required
|
||||
packages/cli/src/modules/agents/integrations/ @n8n-io/nodes
|
||||
packages/@n8n/api-types/src/schemas/mcp-registry.schema.ts @n8n-io/nodes required
|
||||
packages/cli/templates/send-and-wait-no-action-required.handlebars @n8n-io/nodes required
|
||||
|
||||
# Relay (AI gateway & credits)
|
||||
packages/cli/src/services/ai-gateway.service.ts @n8n-io/relay required
|
||||
packages/cli/src/services/ai-gateway-eligibility.ts @n8n-io/relay required
|
||||
packages/cli/src/services/free-ai-credits.service.ts @n8n-io/relay required
|
||||
packages/@n8n/config/src/configs/ai-gateway.config.ts @n8n-io/relay
|
||||
packages/@n8n/api-types/src/dto/ai/ai-gateway-config-response.dto.ts @n8n-io/relay
|
||||
packages/@n8n/api-types/src/dto/ai/ai-gateway-usage-response.dto.ts @n8n-io/relay
|
||||
packages/@n8n/api-types/src/dto/ai/ai-gateway-wallet-response.dto.ts @n8n-io/relay
|
||||
packages/cli/src/modules/mcp/mcp-ai-gateway.helper.ts @n8n-io/relay
|
||||
packages/cli/src/modules/agents/json-config/node-tool-ai-gateway.service.ts @n8n-io/relay
|
||||
packages/frontend/editor-ui/src/app/stores/aiGateway.store.ts @n8n-io/relay
|
||||
packages/frontend/editor-ui/src/app/composables/useAiGateway.ts @n8n-io/relay
|
||||
packages/frontend/editor-ui/src/features/credentials/gatewayCreditsPromotion/ @n8n-io/relay
|
||||
packages/frontend/editor-ui/src/features/shared/nodeCreator/components/SectionHeaderCreditsTag.vue @n8n-io/relay
|
||||
|
||||
# Enterprise Nodes & Partnerships
|
||||
|
||||
packages/nodes-base/nodes/Databricks/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Kafka/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Confluence/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Jira/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Salesforce/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/ServiceNow/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Snowflake/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Okta/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Dynamics/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Excel/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/ExcelSharePoint/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/OneDrive/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Outlook/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/SharePoint/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Teams/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Sql/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Storage/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/ToDo/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Dataverse/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Oracle/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/S3/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/S3/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/vendors/Databricks/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/llms/LmChatDatabricks/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsDatabricks/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreDatabricks/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/vendors/Microsoft/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/llms/LmChatAwsBedrock/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAwsBedrock/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsAzureOpenAi/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/llms/LmChatGoogleVertex/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsGoogleVertex/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreOracleDB/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/llms/LmChatNvidia/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsNvidia/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/Entra/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/GraphSecurity/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/AzureCosmosDb/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/GenericFunctions.ts @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/utils/microsoft/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/DynamoDB/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/SQS/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/IAM/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/Cognito/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/AwsSns.node.ts @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.ts @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/AwsSnsTriggerHelpers.ts @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/AwsSns.node.json @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/AwsSnsTrigger.node.json @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Aws/sns.svg @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/nodes/Microsoft/test/ @n8n-io/enterprise-nodes
|
||||
packages/nodes-base/utils/atlassian.ts @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/utils/databricks/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/utils/aws/ @n8n-io/enterprise-nodes
|
||||
packages/@n8n/nodes-langchain/nodes/embeddings/EmbeddingsOracleDB/ @n8n-io/enterprise-nodes
|
||||
|
||||
# Community engineering
|
||||
.agents/skills/create-community-node-lint-rule/ @n8n-io/community-engineering
|
||||
.agents/skills/community-pr-readiness-check/ @n8n-io/community-engineering
|
||||
packages/@n8n/scan-community-package/ @n8n-io/community-engineering
|
||||
packages/@n8n/eslint-plugin-community-nodes/ @n8n-io/community-engineering
|
||||
packages/@n8n/node-cli/ @n8n-io/community-engineering
|
||||
packages/@n8n/create-node/ @n8n-io/community-engineering
|
||||
packages/@n8n/ai-node-sdk/ @n8n-io/community-engineering required
|
||||
packages/@n8n/decorators/ @n8n-io/catalysts
|
||||
packages/@n8n/create-node/ @n8n-io/nodes
|
||||
packages/@n8n/node-cli/ @n8n-io/nodes
|
||||
packages/@n8n/imap/ @n8n-io/iam
|
||||
packages/@n8n/syslog-client/ @n8n-io/iam
|
||||
packages/@n8n/scan-community-package/ @n8n-io/nodes
|
||||
packages/@n8n/eslint-plugin-community-nodes/ @n8n-io/nodes
|
||||
packages/@n8n/computer-use/ @n8n-io/nodes
|
||||
packages/@n8n/local-gateway/ @n8n-io/nodes
|
||||
packages/@n8n/mcp-browser/ @n8n-io/nodes
|
||||
packages/@n8n/mcp-browser-extension/ @n8n-io/nodes
|
||||
|
||||
# IAM
|
||||
|
||||
|
||||
@@ -111,7 +111,6 @@ component_management:
|
||||
- component_id: nodes_packages
|
||||
name: Nodes
|
||||
paths:
|
||||
- packages/node-dev/**
|
||||
- packages/nodes-base/**
|
||||
- packages/@n8n/json-schema-to-zod/**
|
||||
statuses:
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||

|
||||
|
||||
# ⚠️ Deprecated
|
||||
|
||||
> **This package is deprecated and no more updates will be published to npm**
|
||||
|
||||
# n8n-node-dev
|
||||
|
||||
Currently very simple and not very sophisticated CLI which makes it easier
|
||||
to create credentials and nodes in TypeScript for n8n.
|
||||
|
||||
```
|
||||
npm install n8n-node-dev -g
|
||||
```
|
||||
|
||||
## Contents
|
||||
|
||||
- [Usage](#usage)
|
||||
- [Commands](#commands)
|
||||
- [Create a node](#create-a-node)
|
||||
- [Node Type](#node-type)
|
||||
- [Node Type Description](#node-type-description)
|
||||
- [Node Properties](#node-properties)
|
||||
- [Node Property Options](#node-property-options)
|
||||
- [License](#license)
|
||||
|
||||
## Usage
|
||||
|
||||
The commandline tool can be started with `n8n-node-dev <COMMAND>`
|
||||
|
||||
## Commands
|
||||
|
||||
The following commands exist:
|
||||
|
||||
### build
|
||||
|
||||
Builds credentials and nodes in the current folder and copies them into the
|
||||
n8n custom extension folder (`~/.n8n/custom/`) unless destination path is
|
||||
overwritten with `--destination <FOLDER_PATH>`
|
||||
|
||||
When "--watch" gets set it starts in watch mode and automatically builds and
|
||||
copies files whenever they change. To stop press "ctrl + c".
|
||||
|
||||
### new
|
||||
|
||||
Creates new basic credentials or node of the selected type to have a first starting point.
|
||||
|
||||
## Create a node
|
||||
|
||||
The easiest way to create a new node is via the "n8n-node-dev" cli. It sets up
|
||||
all the basics.
|
||||
|
||||
A n8n node is a JavaScript file (normally written in TypeScript) which describes
|
||||
some basic information (like name, description, ...) and also at least one method.
|
||||
Depending on which method gets implemented defines if it is a regular-, trigger-
|
||||
or webhook-node.
|
||||
|
||||
A simple regular node which:
|
||||
|
||||
- defines one node property
|
||||
- sets its value to all items it receives
|
||||
|
||||
would look like this:
|
||||
|
||||
File named: `MyNode.node.ts`
|
||||
|
||||
```TypeScript
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
|
||||
export class MyNode implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'My Node',
|
||||
name: 'myNode',
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
description: 'Adds "myString" on all items to defined value.',
|
||||
defaults: {
|
||||
name: 'My Node',
|
||||
color: '#772244',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
properties: [
|
||||
// Node properties which the user gets displayed and
|
||||
// can change on the node.
|
||||
{
|
||||
displayName: 'My String',
|
||||
name: 'myString',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'Placeholder value',
|
||||
description: 'The description text',
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
|
||||
const items = this.getInputData();
|
||||
|
||||
let item: INodeExecutionData;
|
||||
let myString: string;
|
||||
|
||||
// Itterates over all input items and add the key "myString" with the
|
||||
// value the parameter "myString" resolves to.
|
||||
// (This could be a different value for each item in case it contains an expression)
|
||||
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
||||
myString = this.getNodeParameter('myString', itemIndex, '') as string;
|
||||
item = items[itemIndex];
|
||||
|
||||
item.json['myString'] = myString;
|
||||
}
|
||||
|
||||
return [items];
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The "description" property has to be set on all nodes because it contains all
|
||||
the base information. Additionally all nodes have to have exactly one of the
|
||||
following methods defined which contains the actual logic:
|
||||
|
||||
**Regular node**
|
||||
|
||||
Method is called when the workflow gets executed
|
||||
|
||||
- `execute`: Executed once no matter how many items
|
||||
|
||||
By default, `execute` should always be used, especially when creating a
|
||||
third-party integration. The reason for this is that it provides much more
|
||||
flexibility and allows, for example, returning a different number of items than
|
||||
it received as input. This becomes crucial when a node needs to query data such as _return
|
||||
all users_. In such cases, the node typically receives only one input item but returns as
|
||||
many items as there are users. Therefore, when in doubt, it is recommended to use `execute`!
|
||||
|
||||
**Trigger node**
|
||||
|
||||
Method is called once when the workflow gets activated. It can then trigger workflow runs and provide the necessary data by itself.
|
||||
|
||||
- `trigger`
|
||||
|
||||
**Webhook node**
|
||||
|
||||
Method is called when webhook gets called.
|
||||
|
||||
- `webhook`
|
||||
|
||||
### Node Type
|
||||
|
||||
Property overview
|
||||
|
||||
- **description** [required]: Describes the node like its name, properties, hooks, ... see `Node Type Description` bellow.
|
||||
- **execute** [optional]: Method is called when the workflow gets executed (once).
|
||||
- **hooks** [optional]: The hook methods.
|
||||
- **methods** [optional]: Additional methods. Currently only "loadOptions" exists which allows loading options for parameters from external services
|
||||
- **trigger** [optional]: Method is called once when the workflow gets activated.
|
||||
- **webhook** [optional]: Method is called when webhook gets called.
|
||||
- **webhookMethods** [optional]: Methods to setup webhooks on external services.
|
||||
|
||||
### Node Type Description
|
||||
|
||||
The following properties can be set in the node description:
|
||||
|
||||
- **credentials** [optional]: Credentials the node requests access to
|
||||
- **defaults** [required]: Default "name" and "color" to set on node when it gets created
|
||||
- **displayName** [required]: Name to display users in Editor UI
|
||||
- **description** [required]: Description to display users in Editor UI
|
||||
- **group** [required]: Node group for example "transform" or "trigger"
|
||||
- **hooks** [optional]: Methods to execute at different points in time like when the workflow gets activated or deactivated
|
||||
- **icon** [optional]: Icon to display (can be an icon or a font awesome icon)
|
||||
- **inputs** [required]: Types of inputs the node has (currently only "main" exists) and the amount
|
||||
- **outputs** [required]: Types of outputs the node has (currently only "main" exists) and the amount
|
||||
- **outputNames** [optional]: In case a node has multiple outputs, names can be set that users know what data to expect
|
||||
- **maxNodes** [optional]: If an unlimited number of nodes of that type cannot exist in a workflow, the max-amount can be specified
|
||||
- **name** [required]: Name of the node (for n8n to use internally, in camelCase)
|
||||
- **properties** [required]: Properties which get displayed in the Editor UI and can be set by the user
|
||||
- **subtitle** [optional]: Text which should be displayed underneath the name of the node in the Editor UI (can be an expression)
|
||||
- **version** [required]: Version of the node. Currently always "1" (integer). For future usage, does not get used yet
|
||||
- **webhooks** [optional]: Webhooks the node should listen to
|
||||
|
||||
### Node Properties
|
||||
|
||||
The following properties can be set in the node properties:
|
||||
|
||||
- **default** [required]: Default value of the property
|
||||
- **description** [required]: Description that is displayed to users in the Editor UI
|
||||
- **displayName** [required]: Name that is displayed to users in the Editor UI
|
||||
- **displayOptions** [optional]: Defines logic to decide if a property should be displayed or not
|
||||
- **name** [required]: Name of the property (for n8n to use internally, in camelCase)
|
||||
- **options** [optional]: The options the user can select when type of property is "collection", "fixedCollection" or "options"
|
||||
- **placeholder** [optional]: Placeholder text that is displayed to users in the Editor UI
|
||||
- **type** [required]: Type of the property. If it is for example a "string", "number", ...
|
||||
- **typeOptions** [optional]: Additional options for type. Like for example the min or max value of a number
|
||||
- **required** [optional]: Defines if the value has to be set or if it can stay empty
|
||||
|
||||
### Node Property Options
|
||||
|
||||
The following properties can be set in the node property options:
|
||||
|
||||
All properties are optional. However, most only work when the node-property is of a specfic type.
|
||||
|
||||
- **alwaysOpenEditWindow** [type: json]: If set then the "Editor Window" will always open when the user tries to edit the field. Helpful if long text is typically used in the property
|
||||
- **loadOptionsMethod** [type: options]: Method to use to load options from an external service
|
||||
- **maxValue** [type: number]: Maximum value of the number
|
||||
- **minValue** [type: number]: Minimum value of the number
|
||||
- **multipleValues** [type: all]: If set the property gets turned into an Array and the user can add multiple values
|
||||
- **multipleValueButtonText** [type: all]: Custom text for add button in case "multipleValues" were set
|
||||
- **numberPrecision** [type: number]: The precision of the number. By default, it is "0" and will only allow integers
|
||||
- **password** [type: string]: If a password field should be displayed (normally only used by credentials because all node data is not encrypted and gets saved in clear-text)
|
||||
- **rows** [type: string]: Number of rows the input field should have. By default it is "1"
|
||||
|
||||
## License
|
||||
|
||||
You can find the license information [here](https://github.com/n8n-io/n8n/blob/master/README.md#license)
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
(async () => {
|
||||
const oclif = await import('@oclif/core');
|
||||
await oclif.execute({});
|
||||
})();
|
||||
@@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
|
||||
node "%~dp0\n8n-node-dev" %*
|
||||
@@ -1,58 +0,0 @@
|
||||
import { Container } from '@n8n/di';
|
||||
import { Command, Flags } from '@oclif/core';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
|
||||
import type { IBuildOptions } from '../src';
|
||||
import { buildFiles } from '../src';
|
||||
|
||||
export class Build extends Command {
|
||||
static description = 'Builds credentials and nodes and copies it to n8n custom extension folder';
|
||||
|
||||
static examples = [
|
||||
'$ n8n-node-dev build',
|
||||
'$ n8n-node-dev build --destination ~/n8n-nodes',
|
||||
'$ n8n-node-dev build --watch',
|
||||
];
|
||||
|
||||
static flags = {
|
||||
help: Flags.help({ char: 'h' }),
|
||||
destination: Flags.string({
|
||||
char: 'd',
|
||||
description: `The path to copy the compiled files to [default: ${
|
||||
Container.get(InstanceSettings).customExtensionDir
|
||||
}]`,
|
||||
}),
|
||||
watch: Flags.boolean({
|
||||
description:
|
||||
'Starts in watch mode and automatically builds and copies file whenever they change',
|
||||
}),
|
||||
};
|
||||
|
||||
async run() {
|
||||
const { flags } = await this.parse(Build);
|
||||
|
||||
this.log('\nBuild credentials and nodes');
|
||||
this.log('=========================');
|
||||
|
||||
try {
|
||||
const options: IBuildOptions = {};
|
||||
|
||||
if (flags.destination) {
|
||||
options.destinationFolder = flags.destination;
|
||||
}
|
||||
if (flags.watch) {
|
||||
options.watch = true;
|
||||
}
|
||||
|
||||
const outputDirectory = await buildFiles(options);
|
||||
|
||||
this.log(`The nodes got built and saved into the following folder:\n${outputDirectory}`);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
this.log(`\nGOT ERROR: "${error.message}"`);
|
||||
this.log('====================================');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
||||
this.log(error.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { Command } from '@oclif/core';
|
||||
import * as changeCase from 'change-case';
|
||||
import { access } from 'fs/promises';
|
||||
import * as inquirer from 'inquirer';
|
||||
import { join } from 'path';
|
||||
|
||||
import { createTemplate } from '../src';
|
||||
|
||||
export class New extends Command {
|
||||
static description = 'Create new credentials/node';
|
||||
|
||||
static examples = ['$ n8n-node-dev new'];
|
||||
|
||||
async run() {
|
||||
try {
|
||||
this.log('\nCreate new credentials/node');
|
||||
this.log('=========================');
|
||||
|
||||
// Ask for the type of not to be created
|
||||
const typeQuestion: inquirer.QuestionCollection = {
|
||||
name: 'type',
|
||||
type: 'list',
|
||||
default: 'Node',
|
||||
message: 'What do you want to create?',
|
||||
choices: ['Credentials', 'Node'],
|
||||
};
|
||||
|
||||
type TypesAnswer = { type: 'Credentials' | 'Node' };
|
||||
const typeAnswers = await inquirer.prompt<TypesAnswer>(typeQuestion);
|
||||
|
||||
let sourceFolder = '';
|
||||
const sourceFileName = 'simple.ts';
|
||||
let defaultName = '';
|
||||
let getDescription = false;
|
||||
|
||||
if (typeAnswers.type === 'Node') {
|
||||
// Create new node
|
||||
|
||||
getDescription = true;
|
||||
|
||||
const nodeTypeQuestion: inquirer.QuestionCollection = {
|
||||
name: 'nodeType',
|
||||
type: 'list',
|
||||
default: 'Execute',
|
||||
message: 'What kind of node do you want to create?',
|
||||
choices: ['Execute', 'Trigger', 'Webhook'],
|
||||
};
|
||||
|
||||
type NodeTypeAnswer = { nodeType: 'Trigger' | 'Webhook' };
|
||||
const nodeTypeAnswers = await inquirer.prompt<NodeTypeAnswer>(nodeTypeQuestion);
|
||||
|
||||
// Choose a the template-source-file depending on user input.
|
||||
sourceFolder = 'execute';
|
||||
defaultName = 'My Node';
|
||||
if (nodeTypeAnswers.nodeType === 'Trigger') {
|
||||
sourceFolder = 'trigger';
|
||||
defaultName = 'My Trigger';
|
||||
} else if (nodeTypeAnswers.nodeType === 'Webhook') {
|
||||
sourceFolder = 'webhook';
|
||||
defaultName = 'My Webhook';
|
||||
}
|
||||
} else {
|
||||
// Create new credentials
|
||||
|
||||
sourceFolder = 'credentials';
|
||||
defaultName = 'My Service API';
|
||||
}
|
||||
|
||||
// Ask additional questions to know with what values the
|
||||
// variables in the template file should be replaced with
|
||||
const additionalQuestions = [
|
||||
{
|
||||
name: 'name',
|
||||
type: 'input',
|
||||
default: defaultName,
|
||||
message: 'How should the node be called?',
|
||||
},
|
||||
];
|
||||
|
||||
if (getDescription) {
|
||||
// Get also a node description
|
||||
additionalQuestions.push({
|
||||
name: 'description',
|
||||
type: 'input',
|
||||
default: 'Node converts input data to chocolate',
|
||||
message: 'What should the node description be?',
|
||||
});
|
||||
}
|
||||
|
||||
type AdditionalAnswer = { name: string; description: string };
|
||||
const additionalAnswers = await inquirer.prompt<AdditionalAnswer>(
|
||||
additionalQuestions as inquirer.QuestionCollection,
|
||||
);
|
||||
|
||||
const nodeName = additionalAnswers.name;
|
||||
|
||||
// Define the source file to be used and the location and name of the new
|
||||
// node file
|
||||
const destinationFilePath = join(
|
||||
process.cwd(),
|
||||
`${changeCase.pascalCase(nodeName)}.${typeAnswers.type.toLowerCase()}.ts`,
|
||||
);
|
||||
|
||||
const sourceFilePath = join(__dirname, '../../templates', sourceFolder, sourceFileName);
|
||||
|
||||
// Check if node with the same name already exists in target folder
|
||||
// to not overwrite it by accident
|
||||
try {
|
||||
await access(destinationFilePath);
|
||||
|
||||
// File does already exist. So ask if it should be overwritten.
|
||||
const overwriteQuestion: inquirer.QuestionCollection = [
|
||||
{
|
||||
name: 'overwrite',
|
||||
type: 'confirm',
|
||||
default: false,
|
||||
message: `The file "${destinationFilePath}" already exists and would be overwritten. Do you want to proceed and overwrite the file?`,
|
||||
},
|
||||
];
|
||||
|
||||
type OverwriteAnswer = { overwrite: boolean };
|
||||
const overwriteAnswers = await inquirer.prompt<OverwriteAnswer>(overwriteQuestion);
|
||||
|
||||
if (!overwriteAnswers.overwrite) {
|
||||
this.log('\nNode creation got canceled!');
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
// File does not exist. That is exactly what we want so go on.
|
||||
}
|
||||
|
||||
// Make sure that the variables in the template file get formatted
|
||||
// in the correct way
|
||||
const replaceValues = {
|
||||
ClassNameReplace: changeCase.pascalCase(nodeName),
|
||||
DisplayNameReplace: changeCase.capitalCase(nodeName),
|
||||
N8nNameReplace: changeCase.camelCase(nodeName),
|
||||
NodeDescriptionReplace: additionalAnswers.description,
|
||||
};
|
||||
|
||||
await createTemplate(sourceFilePath, destinationFilePath, replaceValues);
|
||||
|
||||
this.log('\nExecution was successful:');
|
||||
this.log('====================================');
|
||||
|
||||
this.log(`Node got created: ${destinationFilePath}`);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
this.log(`\nGOT ERROR: "${error.message}"`);
|
||||
this.log('====================================');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
this.log(error.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { defineConfig } from 'eslint/config';
|
||||
import { backendConfig } from '@n8n/eslint-config/backend';
|
||||
|
||||
export default defineConfig(backendConfig, {
|
||||
rules: {
|
||||
// TODO: Remove this
|
||||
'unicorn/filename-case': 'warn',
|
||||
},
|
||||
});
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
"name": "n8n-node-dev",
|
||||
"version": "2.9.0",
|
||||
"description": "CLI to simplify n8n credentials/node development",
|
||||
"private": true,
|
||||
"main": "dist/src/index",
|
||||
"types": "dist/src/index.d.ts",
|
||||
"oclif": {
|
||||
"commands": "./dist/commands",
|
||||
"bin": "n8n-node-dev"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf dist .turbo",
|
||||
"dev": "pnpm watch",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build-node-dev": "tsc",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome ci .",
|
||||
"lint": "eslint src --quiet",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"prepack": "echo \"Building project...\" && rm -rf dist && tsc -b",
|
||||
"watch": "tsc --watch",
|
||||
"test": "vitest run",
|
||||
"test:unit": "vitest run"
|
||||
},
|
||||
"bin": {
|
||||
"n8n-node-dev": "./bin/n8n-node-dev"
|
||||
},
|
||||
"keywords": [
|
||||
"development",
|
||||
"node",
|
||||
"helper",
|
||||
"n8n"
|
||||
],
|
||||
"files": [
|
||||
"bin",
|
||||
"dist",
|
||||
"templates",
|
||||
"src/tsconfig-build.json"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@n8n/eslint-config": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
"@types/inquirer": "^7.0.1",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"vite": "catalog:",
|
||||
"vitest": "catalog:"
|
||||
},
|
||||
"dependencies": {
|
||||
"@n8n/di": "workspace:*",
|
||||
"@oclif/core": "4.0.7",
|
||||
"change-case": "catalog:",
|
||||
"fast-glob": "catalog:",
|
||||
"inquirer": "^7.0.1",
|
||||
"n8n-core": "workspace:*",
|
||||
"n8n-workflow": "workspace:*",
|
||||
"replace-in-file": "^8.3.0",
|
||||
"tmp-promise": "catalog:"
|
||||
},
|
||||
"license": "LicenseRef-n8n-sustainable-use"
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
import { Container } from '@n8n/di';
|
||||
import { spawn } from 'child_process';
|
||||
import glob from 'fast-glob';
|
||||
import { copyFile, mkdir, readFile, writeFile } from 'fs/promises';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
import { join, dirname, resolve as resolvePath } from 'path';
|
||||
import { file as tmpFile } from 'tmp-promise';
|
||||
|
||||
import type { IBuildOptions } from './Interfaces';
|
||||
|
||||
/**
|
||||
* Create a custom tsconfig file as tsc currently has no way to define a base
|
||||
* directory:
|
||||
* https://github.com/Microsoft/TypeScript/issues/25430
|
||||
*/
|
||||
|
||||
export async function createCustomTsconfig() {
|
||||
// Get path to simple tsconfig file which should be used for build
|
||||
const tsconfigPath = join(dirname(require.resolve('n8n-node-dev/src')), 'tsconfig-build.json');
|
||||
|
||||
// Read the tsconfig file
|
||||
const tsConfigString = await readFile(tsconfigPath, { encoding: 'utf8' });
|
||||
|
||||
const tsConfig = jsonParse<{ include: string[] }>(tsConfigString);
|
||||
|
||||
// Set absolute include paths
|
||||
const newIncludeFiles = [];
|
||||
|
||||
for (const includeFile of tsConfig.include) {
|
||||
newIncludeFiles.push(join(process.cwd(), includeFile));
|
||||
}
|
||||
tsConfig.include = newIncludeFiles;
|
||||
|
||||
// Write new custom tsconfig file
|
||||
const { path, cleanup } = await tmpFile();
|
||||
await writeFile(path, JSON.stringify(tsConfig, null, 2));
|
||||
|
||||
return {
|
||||
path,
|
||||
cleanup,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and copies credentials and nodes
|
||||
*
|
||||
* @param {IBuildOptions} [options] Options to overwrite default behavior
|
||||
*/
|
||||
export async function buildFiles({
|
||||
destinationFolder = Container.get(InstanceSettings).customExtensionDir,
|
||||
watch,
|
||||
}: IBuildOptions): Promise<string> {
|
||||
const tscPath = join(dirname(require.resolve('typescript')), 'tsc');
|
||||
const tsconfigData = await createCustomTsconfig();
|
||||
|
||||
await Promise.all(
|
||||
['*.svg', '*.png', '*.node.json'].map(async (filenamePattern) => {
|
||||
const files = await glob(`**/${filenamePattern}`);
|
||||
for (const file of files) {
|
||||
const src = resolvePath(process.cwd(), file);
|
||||
const dest = resolvePath(destinationFolder, file);
|
||||
await mkdir(dirname(dest), { recursive: true });
|
||||
await copyFile(src, dest);
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
||||
// Supply a node base path so that it finds n8n-core and n8n-workflow
|
||||
const nodeModulesPath = join(__dirname, '../../node_modules/');
|
||||
let buildCommand = `${tscPath} --p ${
|
||||
tsconfigData.path
|
||||
} --outDir ${destinationFolder} --rootDir ${process.cwd()} --baseUrl ${nodeModulesPath}`;
|
||||
if (watch) {
|
||||
buildCommand += ' --watch';
|
||||
}
|
||||
|
||||
try {
|
||||
const buildProcess = spawn('node', buildCommand.split(' '), {
|
||||
windowsVerbatimArguments: true,
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
|
||||
// Forward the output of the child process to the main one
|
||||
// that the user can see what is happening
|
||||
buildProcess.stdout.pipe(process.stdout);
|
||||
buildProcess.stderr.pipe(process.stderr);
|
||||
|
||||
// Make sure that the child process gets also always terminated
|
||||
// when the main process does
|
||||
process.on('exit', () => buildProcess.kill());
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
buildProcess.on('exit', resolve);
|
||||
});
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
let errorMessage = error.message;
|
||||
|
||||
if (error.stdout !== undefined) {
|
||||
errorMessage = `${errorMessage}\nGot following output:\n${error.stdout}`;
|
||||
}
|
||||
|
||||
throw new Error(errorMessage);
|
||||
} finally {
|
||||
// Remove the tmp tsconfig file
|
||||
await tsconfigData.cleanup();
|
||||
}
|
||||
|
||||
return destinationFolder;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { copyFile } from 'fs/promises';
|
||||
import { replaceInFile } from 'replace-in-file';
|
||||
|
||||
/**
|
||||
* Creates a new credentials or node
|
||||
*
|
||||
* @param {string} sourceFilePath The path to the source template file
|
||||
* @param {string} destinationFilePath The path the write the new file to
|
||||
* @param {object} replaceValues The values to replace in the template file
|
||||
*/
|
||||
export async function createTemplate(
|
||||
sourceFilePath: string,
|
||||
destinationFilePath: string,
|
||||
replaceValues: Record<string, string>,
|
||||
): Promise<void> {
|
||||
// Copy the file to then replace the values in it
|
||||
|
||||
await copyFile(sourceFilePath, destinationFilePath);
|
||||
|
||||
// Replace the variables in the template file
|
||||
await replaceInFile({
|
||||
files: [destinationFilePath],
|
||||
from: Object.keys(replaceValues).map((key) => new RegExp(key, 'g')),
|
||||
to: Object.values(replaceValues),
|
||||
});
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
export interface IBuildOptions {
|
||||
destinationFolder?: string;
|
||||
watch?: boolean;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export * from './Build';
|
||||
export * from './Create';
|
||||
export type * from './Interfaces';
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"strict": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"target": "es2021",
|
||||
"lib": ["es2021"],
|
||||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"declaration": true,
|
||||
"incremental": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["**/*.credentials.ts", "**/*.node.ts"]
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { ICredentialType, NodePropertyTypes, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export class ClassNameReplace implements ICredentialType {
|
||||
name = 'N8nNameReplace';
|
||||
|
||||
displayName = 'DisplayNameReplace';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
// The credentials to get from user and save encrypted.
|
||||
// Properties can be defined exactly in the same way
|
||||
// as node properties.
|
||||
{
|
||||
displayName: 'User',
|
||||
name: 'user',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Access Token',
|
||||
name: 'accessToken',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class ClassNameReplace implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'DisplayNameReplace',
|
||||
name: 'N8nNameReplace',
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
description: 'NodeDescriptionReplace',
|
||||
defaults: {
|
||||
name: 'DisplayNameReplace',
|
||||
color: '#772244',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
properties: [
|
||||
// Node properties which the user gets displayed and
|
||||
// can change on the node.
|
||||
{
|
||||
displayName: 'My String',
|
||||
name: 'myString',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: 'Placeholder value',
|
||||
description: 'The description text',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
let item: INodeExecutionData;
|
||||
let myString: string;
|
||||
|
||||
// Iterates over all input items and add the key "myString" with the
|
||||
// value the parameter "myString" resolves to.
|
||||
// (This could be a different value for each item in case it contains an expression)
|
||||
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
||||
myString = this.getNodeParameter('myString', itemIndex, '') as string;
|
||||
item = items[itemIndex];
|
||||
|
||||
item.json.myString = myString;
|
||||
}
|
||||
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
import { ITriggerFunctions, INodeType, INodeTypeDescription, ITriggerResponse } from 'n8n-workflow';
|
||||
|
||||
export class ClassNameReplace implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'DisplayNameReplace',
|
||||
name: 'N8nNameReplace',
|
||||
group: ['trigger'],
|
||||
version: 1,
|
||||
description: 'NodeDescriptionReplace',
|
||||
defaults: {
|
||||
name: 'DisplayNameReplace',
|
||||
color: '#00FF00',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: ['main'],
|
||||
properties: [
|
||||
// Node properties which the user gets displayed and
|
||||
// can change on the node.
|
||||
{
|
||||
displayName: 'Interval',
|
||||
name: 'interval',
|
||||
type: 'number',
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
},
|
||||
default: 1,
|
||||
description: 'Every how many minutes the workflow should be triggered.',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
|
||||
const interval = this.getNodeParameter('interval', 1) as number;
|
||||
|
||||
if (interval <= 0) {
|
||||
throw new Error('The interval has to be set to at least 1 or higher!');
|
||||
}
|
||||
|
||||
const executeTrigger = () => {
|
||||
// Every time the emit function gets called a new workflow
|
||||
// executions gets started with the provided entries.
|
||||
const entry = {
|
||||
exampleKey: 'exampleData',
|
||||
};
|
||||
this.emit([this.helpers.returnJsonArray([entry])]);
|
||||
};
|
||||
|
||||
// Sets an interval and triggers the workflow all n seconds
|
||||
// (depends on what the user selected on the node)
|
||||
const intervalValue = interval * 60 * 1000;
|
||||
const intervalObj = setInterval(executeTrigger, intervalValue);
|
||||
|
||||
// The "closeFunction" function gets called by n8n whenever
|
||||
// the workflow gets deactivated and can so clean up.
|
||||
async function closeFunction() {
|
||||
clearInterval(intervalObj);
|
||||
}
|
||||
|
||||
// The "manualTriggerFunction" function gets called by n8n
|
||||
// when a user is in the workflow editor and starts the
|
||||
// workflow manually. So the function has to make sure that
|
||||
// the emit() gets called with similar data like when it
|
||||
// would trigger by itself so that the user knows what data
|
||||
// to expect.
|
||||
async function manualTriggerFunction() {
|
||||
executeTrigger();
|
||||
}
|
||||
|
||||
return {
|
||||
closeFunction,
|
||||
manualTriggerFunction,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
import {
|
||||
IDataObject,
|
||||
IWebhookFunctions,
|
||||
INodeTypeDescription,
|
||||
INodeType,
|
||||
IWebhookResponseData,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class ClassNameReplace implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'DisplayNameReplace',
|
||||
name: 'N8nNameReplace',
|
||||
group: ['trigger'],
|
||||
version: 1,
|
||||
description: 'NodeDescriptionReplace',
|
||||
defaults: {
|
||||
name: 'DisplayNameReplace',
|
||||
color: '#885577',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: ['main'],
|
||||
webhooks: [
|
||||
{
|
||||
name: 'default',
|
||||
httpMethod: 'POST',
|
||||
responseMode: 'onReceived',
|
||||
// Each webhook property can either be hardcoded
|
||||
// like the above ones or referenced from a parameter
|
||||
// like the "path" property bellow
|
||||
path: '={{$parameter["path"]}}',
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Path',
|
||||
name: 'path',
|
||||
type: 'string',
|
||||
default: '',
|
||||
placeholder: '',
|
||||
required: true,
|
||||
description: 'The path to listen to',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
|
||||
// The data to return and so start the workflow with
|
||||
const returnData: IDataObject[] = [];
|
||||
returnData.push({
|
||||
headers: this.getHeaderData(),
|
||||
params: this.getParamsData(),
|
||||
query: this.getQueryData(),
|
||||
body: this.getBodyData(),
|
||||
});
|
||||
|
||||
return {
|
||||
workflowData: [this.helpers.returnJsonArray(returnData)],
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"@n8n/typescript-config/tsconfig.common.json",
|
||||
"@n8n/typescript-config/tsconfig.backend.json"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"preserveSymlinks": true,
|
||||
// TODO: remove all options below this line
|
||||
"useUnknownInCatchVariables": false,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["commands/**/*.ts", "src/**/*.ts"]
|
||||
}
|
||||
Generated
+26
-2566
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user