diff --git a/CommunityToolkit.Aspire.slnx b/CommunityToolkit.Aspire.slnx index 76b216e8f..3ac244de0 100644 --- a/CommunityToolkit.Aspire.slnx +++ b/CommunityToolkit.Aspire.slnx @@ -245,6 +245,9 @@ + + + @@ -331,6 +334,7 @@ + @@ -372,6 +376,7 @@ + diff --git a/Directory.Packages.props b/Directory.Packages.props index f7b4e81a9..662d3f699 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -123,6 +123,7 @@ + diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/apphost.mts b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/apphost.mts new file mode 100644 index 000000000..3c74b4c70 --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/apphost.mts @@ -0,0 +1,11 @@ +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const postgres = await builder.addPostgres("postgres"); +const db = await postgres.addDatabase("n8n-db"); + +const n8n = await builder.addN8n("n8n"); +await n8n.withPostgresDatabase(db); + +await builder.build().run(); \ No newline at end of file diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/aspire.config.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/aspire.config.json new file mode 100644 index 000000000..bf0858624 --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/aspire.config.json @@ -0,0 +1,22 @@ +{ + "appHost": { + "path": "apphost.mts", + "language": "typescript/nodejs" + }, + "sdk": { + "version": "13.5.3" + }, + "profiles": { + "https": { + "applicationUrl": "https://localhost:17104;http://localhost:15230", + "environmentVariables": { + "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21075", + "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22069" + } + } + }, + "packages": { + "CommunityToolkit.Aspire.Hosting.N8n": "../../../src/CommunityToolkit.Aspire.Hosting.N8n/CommunityToolkit.Aspire.Hosting.N8n.csproj", + "Aspire.Hosting.PostgreSQL": "" + } +} \ No newline at end of file diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/eslint.config.mjs b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/eslint.config.mjs new file mode 100644 index 000000000..b1503919e --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/eslint.config.mjs @@ -0,0 +1,17 @@ +// @ts-check + +import { defineConfig } from "eslint/config"; +import tseslint from "typescript-eslint"; + +export default defineConfig({ + files: ["apphost.mts"], + extends: [tseslint.configs.base], + languageOptions: { + parserOptions: { + projectService: true, + }, + }, + rules: { + "@typescript-eslint/no-floating-promises": ["error", { checkThenables: true }], + }, +}); \ No newline at end of file diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package-lock.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package-lock.json new file mode 100644 index 000000000..4e1f1136a --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package-lock.json @@ -0,0 +1,2037 @@ +{ + "name": "communitytoolkit.aspire.hosting.n8n.apphost.typescript", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "communitytoolkit.aspire.hosting.n8n.apphost.typescript", + "version": "1.0.0", + "dependencies": { + "vscode-jsonrpc": "^8.2.0" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "eslint": "^10.0.3", + "nodemon": "^3.1.14", + "tsx": "^4.21.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.57.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.20.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz", + "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.68.0.tgz", + "integrity": "sha512-WASHDpCm6qO5jj9g1a+8NiW5+GCkAyLReR56/4VruYmNgfUmqpxOfZ2Yfb8xGfJPWv5Qi6LSD8sXdces3vbp/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/type-utils": "8.68.0", + "@typescript-eslint/utils": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.68.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.68.0.tgz", + "integrity": "sha512-fHq2VC1kpyYfvEcbiMjOpySY4WS7voEp89yAThrHRX5sm9j2lzYppCb2umFMEed4fWcyeLjHxrz0mpjNBaBxMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.68.0.tgz", + "integrity": "sha512-5GQtWZCXFcFYux955pvoS02WLc49pXNlvIxocKjS0clvwo3in1RdlzVKyiqQH9vE5AKWFLTaUgeQkOrTS+0Qxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.68.0", + "@typescript-eslint/types": "^8.68.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.68.0.tgz", + "integrity": "sha512-T5eXpcaJNg8bhjHJ8Rjp68Vq/QBteYtTKY8TZqVNPaUbuz0f6jI9t6aDkylwvalpAB9XTTFeFOjrjXAZ3YvmVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.68.0.tgz", + "integrity": "sha512-F7zrGQfiJHojPwi8vhxZQC1tWtJzvL74cK/nqri2lk8YUXvYaYwl263xOJ69jDWPUk1hmcdoayFwk9lX09npVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.68.0.tgz", + "integrity": "sha512-X77zqoY1EjeWGs/0JNxeaMfp5C5lIz4Tw8y66F1Ne8Faq6g424sBNYM6xBAqElfGZPLpWS+CZAp0DXyKDzWiHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/utils": "8.68.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.68.0.tgz", + "integrity": "sha512-9RnpsGJjrAllCMefGVVsImJM24YurhC0Q1h4UbvivtvOqXmR/vEJge2OoE++z9m6hyg8T1Q8t5SNT6tHSbrxcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.68.0.tgz", + "integrity": "sha512-OKKsD0tYmoNiU5PW2zehO1yO56jYOm1ShYlxon/Z0SJNidAkdVg86eg9ruRuoXf8xfnuWZGbwDsStkoXbZtIIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.68.0", + "@typescript-eslint/tsconfig-utils": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/visitor-keys": "8.68.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.68.0.tgz", + "integrity": "sha512-PB5gJMMOg0Q5P1tsgWtEAqQacJXq0qEqRHDX/YJ4FaTMLfZPpHB3gjl2EJuiZyPABxmj4ZQYiY9m1bdAJ5y7tQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.68.0", + "@typescript-eslint/types": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.68.0.tgz", + "integrity": "sha512-YR65gGdGvTUAWLldC3xLOvOzamdGzB4A5/N8rehEaHs3Zvoe39BhgY+u0SPch1OvrVTfLcc55wsSgK2NcnTS/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.68.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/nodemon": { + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.14.tgz", + "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^10.2.1", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.23.12", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.12.tgz", + "integrity": "sha512-FDf4L4sYzKtzWYhU/Xm0AQFdTjdIxNo9ElTf2mxXM6k8YMHXzYUe4yODVaXP4V9uMFbVg8c0qyBccK2OOxb45Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.68.0.tgz", + "integrity": "sha512-MHy0Y0ynqeEbx/S45+i/bBssdy3X6KNBfmJAP35GrgtNxu2TQ5K5xsFDhAnmsq1jvpdoZOPG1LGtJo0HWqYCrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.68.0", + "@typescript-eslint/parser": "8.68.0", + "@typescript-eslint/typescript-estree": "8.68.0", + "@typescript-eslint/utils": "8.68.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.1.tgz", + "integrity": "sha512-kdjOSJ2lLIn7r1rtrMbbNCHjyMPfRnowdKjBQ+mGq6NAW5QY2bEZC/khaC5OR8svbbjvLEaIXkOq45e2X9BIbQ==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package.json new file mode 100644 index 000000000..83b47e02c --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/package.json @@ -0,0 +1,32 @@ +{ + "name": "communitytoolkit.aspire.hosting.n8n.apphost.typescript", + "version": "1.0.0", + "private": true, + "type": "module", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "scripts": { + "aspire:lint": "eslint apphost.mts", + "aspire:start": "aspire run", + "aspire:build": "tsc -p tsconfig.apphost.json", + "aspire:dev": "tsc --watch -p tsconfig.apphost.json", + "lint": "npm run aspire:lint", + "predev": "npm run aspire:lint", + "dev": "npm run aspire:start", + "prebuild": "npm run aspire:lint", + "build": "npm run aspire:build", + "watch": "npm run aspire:dev" + }, + "dependencies": { + "vscode-jsonrpc": "^8.2.0" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "eslint": "^10.0.3", + "nodemon": "^3.1.14", + "tsx": "^4.21.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.57.1" + } +} \ No newline at end of file diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/tsconfig.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/tsconfig.json new file mode 100644 index 000000000..c34e4c0b3 --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost.TypeScript/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "outDir": "./dist", + "rootDir": "." + }, + "include": [ + "apphost.mts", + ".aspire/modules/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/AppHost.cs b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/AppHost.cs new file mode 100644 index 000000000..29c1f4c6c --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/AppHost.cs @@ -0,0 +1,12 @@ +var builder = DistributedApplication.CreateBuilder(args); + +var dbUserName = builder.AddParameter("db-username", "postgres"); +var dbPassword = builder.AddParameter("db-password", "Postgres!123"); + +var postgres = builder.AddPostgres("postgres", dbUserName, dbPassword); +var db = postgres.AddDatabase("db"); + +var n8n = builder.AddN8n("n8n") + .WithPostgresDatabase(db); // optional postgres database, if not provided n8n will use SQLite + +builder.Build().Run(); diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/CommunityToolkit.Aspire.Hosting.N8n.AppHost.csproj b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/CommunityToolkit.Aspire.Hosting.N8n.AppHost.csproj new file mode 100644 index 000000000..a1a183d87 --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/CommunityToolkit.Aspire.Hosting.N8n.AppHost.csproj @@ -0,0 +1,19 @@ + + + + Exe + enable + enable + true + c25ab70b-35c0-4661-8ba7-554d7314f852 + + + + + + + + + + + diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/Properties/launchSettings.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/Properties/launchSettings.json new file mode 100644 index 000000000..c5106129d --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:17253;http://localhost:15064", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21280", + "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23153", + "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22153" + } + }, + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:15064", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19248", + "ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "http://localhost:18075", + "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20058" + } + } + } +} diff --git a/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/appsettings.json b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/appsettings.json new file mode 100644 index 000000000..31c092aa4 --- /dev/null +++ b/examples/n8n/CommunityToolkit.Aspire.Hosting.N8n.AppHost/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Aspire.Hosting.Dcp": "Warning" + } + } +} diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/CommunityToolkit.Aspire.Hosting.N8n.csproj b/src/CommunityToolkit.Aspire.Hosting.N8n/CommunityToolkit.Aspire.Hosting.N8n.csproj new file mode 100644 index 000000000..30c838e18 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/CommunityToolkit.Aspire.Hosting.N8n.csproj @@ -0,0 +1,13 @@ + + + + An Aspire hosting integration for n8n, a fair-code licensed workflow automation tool that combines AI capabilities with business process automation. + n8n workload automation + + + + + + + + diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.TaskRunner.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.TaskRunner.cs new file mode 100644 index 000000000..36a28d14a --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.TaskRunner.cs @@ -0,0 +1,54 @@ +using Aspire.Hosting.ApplicationModel; +using Zemires.Aspire.Hosting.N8n; + +namespace Aspire.Hosting; + +/// +/// Provides extension methods for adding N8n resources to the application model. +/// +public static partial class N8nBuilderExtensions +{ + private const int N8nRunnersPort = 5680; + private const int N8nBrokerPort = 5679; + private const string BrokerEndpointName = "broker"; + + /// + /// Adds a task runner instance for the given N8n resource as sidecar. Aspire does currently not support native sidecar pattern. + /// + /// The primary N8n resource builder to attach the worker to. + /// The name to use for the worker resource. + /// The port to use for the worker resource. + /// The authentication token to share with the broker resource. + /// A new for the worker instance. + [AspireExport] + public static IResourceBuilder AddTaskRunner(this IResourceBuilder n8nBuilder, + string name, + int? port = null, + IResourceBuilder? sharedAuthToken = null) + { + ArgumentNullException.ThrowIfNull(n8nBuilder); + ArgumentException.ThrowIfNullOrEmpty(name); + + var sharedAuthTokenParameter = sharedAuthToken?.Resource ?? ParameterResourceBuilderExtensions.CreateDefaultPasswordParameter(n8nBuilder.ApplicationBuilder, $"{n8nBuilder.Resource.Name}-{name}-runners-auth-token"); + + n8nBuilder.WithEnvironment("N8N_RUNNERS_MODE", "external") + .WithEnvironment("N8N_RUNNERS_BROKER_LISTEN_ADDRESS", "0.0.0.0") + .WithEnvironment("N8N_RUNNERS_AUTH_TOKEN", sharedAuthTokenParameter) + .WithHttpEndpoint(targetPort: N8nBrokerPort, name: BrokerEndpointName); + + var runner = new N8nTaskRunnerResource(n8nBuilder.Resource.Name + "-" + name, n8nBuilder.Resource); + + var brokerEndpoint = n8nBuilder.Resource.GetEndpoint(BrokerEndpointName); + + var runnerBuilder = n8nBuilder.ApplicationBuilder.AddResource(runner) + .WithAnnotation(new ContainerImageAnnotation { Image = N8nContainerImageTags.ImageRunners, Tag = N8nContainerImageTags.Tag, Registry = N8nContainerImageTags.Registry }) + .WithIconName("SettingsCogMultiple", IconVariant.Filled) + .WithHttpEndpoint(targetPort: N8nRunnersPort, port: port, name: N8nResource.PrimaryEndpointName, env: "N8N_PORT") + .WithHttpHealthCheck("/healthz", 200, N8nResource.PrimaryEndpointName) + .WithEnvironment("N8N_RUNNERS_AUTH_TOKEN", sharedAuthTokenParameter) + .WithEnvironment("N8N_RUNNERS_TASK_BROKER_URI", brokerEndpoint) + .WithParentRelationship(n8nBuilder); + + return runnerBuilder; + } +} \ No newline at end of file diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.Worker.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.Worker.cs new file mode 100644 index 000000000..a6d168857 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.Worker.cs @@ -0,0 +1,89 @@ +using Aspire.Hosting.ApplicationModel; +using Zemires.Aspire.Hosting.N8n; + +namespace Aspire.Hosting; + +/// +/// Provides extension methods for adding N8n resources to the application model. +/// +public static partial class N8nBuilderExtensions +{ + /// + /// Adds a worker instance for the given N8n resource. + /// Worker instances run the n8n process in "worker" mode and are configured to + /// share the same encryption key and webhook configuration as the primary N8n resource. + /// The worker is created as a child of the main N8n resource so lifecycle and ordering + /// are handled automatically. + /// + /// The primary N8n resource builder to attach the worker to. + /// The name to use for the worker resource. + /// The host port to bind the underlying container to. + /// A new for the instance. + [AspireExport] + public static IResourceBuilder AddWorker(this IResourceBuilder n8nBuilder, string name, int? port = null) + { + ArgumentNullException.ThrowIfNull(n8nBuilder); + ArgumentException.ThrowIfNullOrEmpty(name); + + // worker does not support https + var worker = new N8nWorkerResource(n8nBuilder.Resource.Name + "-" + name, n8nBuilder.Resource); + + var workerBuilder = n8nBuilder.ApplicationBuilder.AddResource(worker) + .WithAnnotation(new ContainerImageAnnotation { Image = N8nContainerImageTags.Image, Tag = N8nContainerImageTags.Tag, Registry = N8nContainerImageTags.Registry }) + .WithArgs("worker") + .WithIconName("SettingsCogMultiple", IconVariant.Filled) + .WithHttpEndpoint(targetPort: N8nPort, port: port, name: N8nResource.PrimaryEndpointName, env: "N8N_PORT") + .WithHttpHealthCheck("/healthz", 200, N8nResource.PrimaryEndpointName) + .WithEnvironment("N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS", "false") + .WithEnvironment("N8N_ENCRYPTION_KEY", n8nBuilder.Resource.EncryptionKeyParameter) + .WithEnvironment("N8N_WEBHOOK_URL", n8nBuilder.GetEndpoint(N8nResource.PrimaryEndpointName, n8nBuilder.ApplicationBuilder.ExecutionContext.IsPublishMode ? KnownNetworkIdentifiers.PublicInternet : KnownNetworkIdentifiers.LocalhostNetwork)) + .WithEnvironment("QUEUE_HEALTH_CHECK_ACTIVE", "true") + .WithParentRelationship(n8nBuilder); + + if (n8nBuilder.ApplicationBuilder.ExecutionContext.IsRunMode) + { + // to accept dev certificate of redis in run mode +#pragma warning disable ASPIRECERTIFICATES001 + workerBuilder.WithHttpsCertificateConfiguration(ctx => + { + ctx.EnvironmentVariables["NODE_EXTRA_CA_CERTS"] = ctx.CertificatePath; + return Task.CompletedTask; + }); +#pragma warning restore ASPIRECERTIFICATES001 + } + + return workerBuilder; + } + + /// + /// Configures the N8n resource to run in queue mode using a Redis instance. + /// This sets the necessary environment variables (host, port, password and TLS) from + /// the provided resource and creates a parent/reference + /// relationship so containers start in the correct order. + /// + /// The N8n resource builder to configure. + /// A resource builder for the Redis instance. Must expose connection string information. + /// The same instance for chaining. + /// Thrown when the provided does not expose connection string information. + [AspireExport] + public static IResourceBuilder WithQueueMode(this IResourceBuilder builder, IResourceBuilder redis) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(redis); + + if (redis.Resource is IResourceWithConnectionString resourceWithConnection) + { + return builder.WithEnvironment("EXECUTIONS_MODE", "queue") + .WithEnvironment("QUEUE_BULL_REDIS_HOST", $"{resourceWithConnection.GetConnectionProperty("Host")}") + .WithEnvironment("QUEUE_BULL_REDIS_PORT", $"{resourceWithConnection.GetConnectionProperty("Port")}") + .WithEnvironment("QUEUE_BULL_REDIS_PASSWORD", $"{resourceWithConnection.GetConnectionProperty("Password")}") + .WithEnvironment("QUEUE_BULL_REDIS_TLS", "true") + .WithReferenceRelationship(redis) + .WaitFor(redis); + } + else + { + throw new ArgumentException($"The provided resource '{redis.Resource.Name}' does not contain connection string information and cannot be used as a redis for N8n.", nameof(redis)); + } + } +} \ No newline at end of file diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.cs new file mode 100644 index 000000000..b661cdd96 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nBuilderExtensions.cs @@ -0,0 +1,448 @@ +using Aspire.Hosting.ApplicationModel; +using Zemires.Aspire.Hosting.N8n; +using Microsoft.Extensions.DependencyInjection; +using System.Text.Json; +using Microsoft.Extensions.Logging; + +namespace Aspire.Hosting; + +/// +/// Provides extension methods for adding N8n resources to the application model. +/// +public static partial class N8nBuilderExtensions +{ + private const int N8nPort = 5678; + + /// + /// Adds an n8n container resource to the application model. + /// The default image is and the tag is . + /// + /// The . + /// The name of the resource. This name will be used as the connection string name when referenced in a dependency. + /// The host port to bind the underlying container to. + /// The parameter used to provide the master key for the N8n. If a random master key will be generated. + /// A reference to the . + /// + /// + /// Add an N8n container to the application model and reference it in a .NET project. + /// + /// var builder = DistributedApplication.CreateBuilder(args); + /// + /// var N8n = builder.AddN8n("n8n"); + /// + /// builder.Build().Run(); + /// + /// + /// + [AspireExport] + public static IResourceBuilder AddN8n( + this IDistributedApplicationBuilder builder, + [ResourceName] string name, + IResourceBuilder? encryptionKey = null, + int? port = null) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(name); + + var encryptionKeyParameter = encryptionKey?.Resource ?? ParameterResourceBuilderExtensions.CreateDefaultPasswordParameter(builder, $"{name}-encryption-key"); + + var n8n = new N8nResource(name, encryptionKeyParameter); + + var n8nBuilder = builder.AddResource(n8n) + .WithAnnotation(new ContainerImageAnnotation { Image = N8nContainerImageTags.Image, Tag = N8nContainerImageTags.Tag, Registry = N8nContainerImageTags.Registry }) + .WithHttpEndpoint(targetPort: N8nPort, port: port, name: N8nResource.PrimaryEndpointName, env: "N8N_PORT") + .WithHttpHealthCheck("/healthz", 200, N8nResource.PrimaryEndpointName) + .WithEnvironment("QUEUE_HEALTH_CHECK_ACTIVE", "true") + .WithIconName("BranchFork", IconVariant.Regular) + .WithEnvironment("OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS", "true") + .WithEnvironment("N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS", "false") + .WithEnvironment("N8N_ENCRYPTION_KEY", encryptionKeyParameter) + .WithEnvironment("N8N_WEBHOOK_URL", n8n.GetEndpoint(N8nResource.PrimaryEndpointName, builder.ExecutionContext.IsPublishMode ? KnownNetworkIdentifiers.PublicInternet : KnownNetworkIdentifiers.LocalhostNetwork)) + .WithEnvironment("N8N_PROXY_HOPS", "1"); + +#pragma warning disable ASPIRECERTIFICATES001 + n8nBuilder.WithHttpsCertificateConfiguration(ctx => + { + ctx.EnvironmentVariables["N8N_PROTOCOL"] = "https"; + ctx.EnvironmentVariables["N8N_SSL_KEY"] = ctx.KeyPath; + ctx.EnvironmentVariables["N8N_SSL_CERT"] = ctx.CertificatePath; + ctx.EnvironmentVariables["NODE_EXTRA_CA_CERTS"] = ctx.CertificatePath; + return Task.CompletedTask; + }); +#pragma warning restore ASPIRECERTIFICATES001 + + if (builder.ExecutionContext.IsRunMode) + { +#pragma warning disable ASPIRECERTIFICATES001 + builder.Eventing.Subscribe((@event, cancellationToken) => + { + var developerCertificateService = @event.Services.GetRequiredService(); + + bool addHttps = false; + if (!n8nBuilder.Resource.TryGetLastAnnotation(out var annotation)) + { + if (developerCertificateService.UseForHttps) + { + addHttps = true; + } + } + else if (annotation.UseDeveloperCertificate.GetValueOrDefault(developerCertificateService.UseForHttps) || annotation.Certificate is not null) + { + addHttps = true; + } + + if (addHttps) + { + // If a TLS certificate is configured, override the endpoint to use HTTPS instead of HTTP + n8nBuilder.WithEndpoint(N8nResource.PrimaryEndpointName, ep => ep.UriScheme = "https"); + } + + return Task.CompletedTask; + }); +#pragma warning restore ASPIRECERTIFICATES001 + } + + return n8nBuilder; + } + + /// + /// Adds a named volume for the data folder to a N8n container resource. + /// + /// The resource builder. + /// The name of the volume. Defaults to an auto-generated name based on the application and resource names. + /// The . + /// + /// + /// Add an N8n container to the application model and reference it in a .NET project. Additionally, in this + /// example a data volume is added to the container to allow data to be persisted across container restarts. + /// + /// var builder = DistributedApplication.CreateBuilder(args); + /// + /// var N8n = builder.AddN8n("N8n") + /// .WithDataVolume(); + /// var api = builder.AddProject<Projects.Api>("api") + /// .WithReference(N8n); + /// + /// builder.Build().Run(); + /// + /// + /// + [AspireExport] + public static IResourceBuilder WithDataVolume(this IResourceBuilder builder, string? name = null) + { + ArgumentNullException.ThrowIfNull(builder); + + return builder.WithVolume(name ?? VolumeNameGenerator.Generate(builder, "data"), "/home/node/.n8n"); + } + + /// + /// Configures the N8n resource to use a PostgreSQL database. + /// This method reads connection properties from the provided + /// (which must implement ) and sets the + /// environment variables required by the n8n image to connect to a Postgres backend. + /// It also creates a reference relationship and waits for the database resource. + /// + /// The N8n resource builder to configure. + /// A resource builder for the PostgreSQL database. Must expose connection string information. + /// Use of TLS for connection. + /// The same instance for chaining. + /// Thrown when the provided does not expose connection string information. + [AspireExport] + public static IResourceBuilder WithPostgresDatabase(this IResourceBuilder builder, IResourceBuilder database, bool useTls = false) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(database); + + if (database.Resource is IResourceWithConnectionString resourceWithConnection) + { + builder.WithEnvironment("DB_TYPE", "postgresdb") + .WithEnvironment("DB_POSTGRESDB_DATABASE", $"{resourceWithConnection.GetConnectionProperty("DatabaseName")}") + .WithEnvironment("DB_POSTGRESDB_HOST", $"{resourceWithConnection.GetConnectionProperty("Host")}") + .WithEnvironment("DB_POSTGRESDB_PORT", $"{resourceWithConnection.GetConnectionProperty("Port")}") + .WithEnvironment("DB_POSTGRESDB_USER", $"{resourceWithConnection.GetConnectionProperty("Username")}") + .WithEnvironment("DB_POSTGRESDB_PASSWORD", $"{resourceWithConnection.GetConnectionProperty("Password")}") + .WithReferenceRelationship(database) + .WaitFor(database); + + if (useTls) + { + builder.WithEnvironment("DB_POSTGRESDB_SSL_ENABLED", "true") + .WithEnvironment("DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED", "true"); + } + + return builder; + } + else + { + throw new ArgumentException($"The provided resource '{database.Resource.Name}' does not contain connection string information and cannot be used as a database for N8n.", nameof(database)); + } + } + + /// + /// Adds a bind mount for the data folder to a n8n container resource. + /// + /// The resource builder. + /// The source directory on the host to mount into the container. + /// The . + /// + /// + /// Add an N8n container to the application model and reference it in a .NET project. Additionally, in this + /// example a bind mount is added to the container to allow data to be persisted across container restarts. + /// + /// var builder = DistributedApplication.CreateBuilder(args); + /// + /// var n8n = builder.AddN8n("n8n") + /// .WithDataBindMount("./data/N8n/data"); + /// var api = builder.AddProject<Projects.Api>("api") + /// .WithReference(n8n); + /// + /// builder.Build().Run(); + /// + /// + /// + [AspireExport] + public static IResourceBuilder WithDataBindMount(this IResourceBuilder builder, string source) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(source); + + return builder.WithBindMount(source, "/home/node/.n8n"); + } + + /// + /// Sets the timezone for the N8n container by configuring the standard + /// environment variables used by the image (GENERIC_TIMEZONE and TZ). + /// + /// The N8n resource builder to configure. + /// The timezone identifier (for example "UTC" or "America/Los_Angeles"). + /// The same instance for chaining. + [AspireExport] + public static IResourceBuilder WithTimeZone(this IResourceBuilder builder, string timeZone) + { + ArgumentNullException.ThrowIfNull(builder); + + return builder + .WithEnvironment("GENERIC_TIMEZONE", timeZone) + .WithEnvironment("TZ", timeZone); + } + + /// + /// Configures the n8n instance owner via environment variables. + /// + /// The N8n resource builder to configure. + /// The instance owner email address (N8N_INSTANCE_OWNER_EMAIL). + /// The instance owner first name (N8N_INSTANCE_OWNER_FIRST_NAME). + /// The instance owner last name (N8N_INSTANCE_OWNER_LAST_NAME). + /// + /// The parameter used to provide the plaintext password. The password is bcrypt-hashed before being passed + /// to the container as N8N_INSTANCE_OWNER_PASSWORD_HASH. + /// If a random password will be generated. + /// + /// The same instance for chaining. + [AspireExport] + public static IResourceBuilder WithInstanceOwner( + this IResourceBuilder builder, + string email, + string firstName, + string lastName, + IResourceBuilder? password = null) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(email); + + var passwordParameter = password?.Resource + ?? ParameterResourceBuilderExtensions.CreateDefaultPasswordParameter(builder.ApplicationBuilder, $"{builder.Resource.Name}-instance-owner-password"); + + builder.Resource.InstanceOwnerPassword = passwordParameter; + + return builder + .WithEnvironment("N8N_INSTANCE_OWNER_MANAGED_BY_ENV", "true") + .WithEnvironment("N8N_INSTANCE_OWNER_EMAIL", email) + .WithEnvironment("N8N_INSTANCE_OWNER_FIRST_NAME", firstName) + .WithEnvironment("N8N_INSTANCE_OWNER_LAST_NAME", lastName) + .WithEnvironment("N8N_INSTANCE_OWNER_PASSWORD", passwordParameter) // not used but to store value in aspire json file + .WithEnvironment(async ctx => + { + var plainPassword = await passwordParameter.GetValueAsync(ctx.CancellationToken); + ctx.EnvironmentVariables["N8N_INSTANCE_OWNER_PASSWORD_HASH"] = BCrypt.Net.BCrypt.HashPassword(plainPassword); + }); + } + + /// + /// Configures the N8n resource with an enterprise license key. + /// Sets N8N_LICENSE_ACTIVATION_KEY and suppresses the usage page via N8N_HIDE_USAGE_PAGE. + /// + /// The N8n resource builder to configure. + /// The parameter that contains the license activation key. + /// The same instance for chaining. + [AspireExport("withLicenseKeyParameter")] + public static IResourceBuilder WithLicenseKey( + this IResourceBuilder builder, + IResourceBuilder licenseKey) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(licenseKey); + + return builder + .WithEnvironment("N8N_LICENSE_ACTIVATION_KEY", licenseKey.Resource) + .WithEnvironment("N8N_HIDE_USAGE_PAGE", "true"); + } + + /// + /// Adds a license key parameter to the resource's application builder. + /// + /// Registers a parameter named "{resourceName}-license-key" (using the resource's Name) via + /// ApplicationBuilder.AddParameter. + /// The resource builder to configure. + /// The license key value to register as a parameter. + /// The same resource builder instance for chaining. + [AspireExport("withLicenseKeyString")] + public static IResourceBuilder WithLicenseKey( + this IResourceBuilder builder, + string licenseKey) + => WithLicenseKey(builder, builder.ApplicationBuilder.AddParameter(builder.Resource.Name + "-license-key", value: licenseKey, secret: true)); + + /// + /// Adds a license key parameter to the resource's application builder. + /// + /// Registers a parameter named "{resourceName}-license-key" (using the resource's Name) via + /// ApplicationBuilder.AddParameter. + /// The resource builder to configure. + /// The same resource builder instance for chaining. + [AspireExport()] + public static IResourceBuilder WithLicenseKey( + this IResourceBuilder builder) + => WithLicenseKey(builder, builder.ApplicationBuilder.AddParameter(builder.Resource.Name + "-license-key", secret: true)); + + /// + /// Adds an OTLP exporter using HTTP/protobuf and maps n8n-specific environment variables to standard OpenTelemetry + /// environment variables. + /// + /// Sets N8N_OTEL_ENABLED to "true" and maps N8N_OTEL_EXPORTER_OTLP_ENDPOINT, + /// N8N_OTEL_EXPORTER_OTLP_HEADERS, and N8N_OTEL_EXPORTER_SERVICE_NAME to the corresponding + /// OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, and OTEL_SERVICE_NAME environment variables. + /// The resource builder to configure. + /// The configured resource builder for chaining. + [AspireExport] + public static IResourceBuilder WithOtlpExporter(this IResourceBuilder builder) + { + ArgumentNullException.ThrowIfNull(builder); + + return builder.WithOtlpExporter(OtlpProtocol.HttpProtobuf) + .WithEnvironment(ctx => + { + if (ctx.EnvironmentVariables.TryGetValue("OTEL_EXPORTER_OTLP_ENDPOINT", out var otelEndpoint)) + { + ctx.EnvironmentVariables["N8N_OTEL_EXPORTER_OTLP_ENDPOINT"] = otelEndpoint; + ctx.EnvironmentVariables["N8N_OTEL_ENABLED"] = "true"; + } + else + { + ctx.Logger.LogWarning("OTEL_EXPORTER_OTLP_ENDPOINT is not set. N8n OTLP exporter will not be enabled."); + } + if (ctx.EnvironmentVariables.TryGetValue("OTEL_EXPORTER_OTLP_HEADERS", out var otelHeaders)) + { + ctx.EnvironmentVariables["OTEL_EXPORTER_OTLP_HEADERS"] = otelHeaders; + } + if (ctx.EnvironmentVariables.TryGetValue("N8N_OTEL_EXPORTER_SERVICE_NAME", out var otelServiceName)) + { + ctx.EnvironmentVariables["N8N_OTEL_EXPORTER_SERVICE_NAME"] = otelServiceName; + } + }); + } + + /// + /// Enables Community Packages and if packages are given, installs the packages as predefined packages. + /// + /// The resource builder to configure. + /// package name, e.g.n8n-nodes-foo or n8n-nodes-foo@version + /// + [AspireExport] + public static IResourceBuilder WithCommunityPackages(this IResourceBuilder builder, params string[] packageNames) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentNullException.ThrowIfNull(packageNames); + + return builder.WithEnvironment(ctx => + { + ctx.EnvironmentVariables["N8N_COMMUNITY_PACKAGES_ENABLED"] = "true"; + if (packageNames.Length > 0) + { + ctx.EnvironmentVariables["N8N_COMMUNITY_PACKAGES_MANAGED_BY_ENV"] = "true"; + ctx.EnvironmentVariables["N8N_COMMUNITY_PACKAGES"] = JsonSerializer.Serialize(packageNames.Select(p => new { name = p }).ToArray(), JsonSerializerOptions.Web); + } + }); + } + + /// + /// Enables metrics collection for the N8n resource and configures which metrics to include. + /// + /// The N8n resource builder to configure. + /// An optional action to configure the metric options. If , all metrics are enabled by default. + /// The same instance for chaining. + /// + /// + /// This method enables the N8n metrics endpoint by setting N8N_METRICS to true and allows fine-grained control + /// over which metric categories to include through the configuration. + /// + /// + /// Enable all metrics (default behavior): + /// + /// var n8n = builder.AddN8n("n8n") + /// .WithMetrics(); + /// + /// + /// + /// Enable metrics with custom configuration: + /// + /// var n8n = builder.AddN8n("n8n") + /// .WithMetrics(options => + /// { + /// options.IncludeWebhookMetrics = false; + /// options.IncludeQueueMetrics = true; + /// }); + /// + /// + /// + [AspireExport(RunSyncOnBackgroundThread = true)] + public static IResourceBuilder WithMetrics(this IResourceBuilder builder, Action? configureOptions = null) + { + ArgumentNullException.ThrowIfNull(builder); + + var options = new N8nMetricOptions(); + + if (configureOptions != null) + { + configureOptions(options); + } + + return builder.WithEnvironment("N8N_METRICS", "true") + .WithEnvironment("N8N_METRICS_INCLUDE_WEBHOOK_METRICS", options.IncludeWebhookMetrics.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_WORKFLOW_INFO", options.IncludeWorkflowInfo.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_FORM_METRICS", options.IncludeFormMetrics.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL", options.IncludeWorkflowIdLabel.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_NODE_TYPE_LABEL", options.IncludeNodeTypeLabel.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL", options.IncludeCredentialTypeLabel.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_API_ENDPOINTS", options.IncludeApiEndpoints.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_API_PATH_LABEL", options.IncludeApiPathLabel.ToString().ToLower()) + .WithEnvironment("N8N_METRICS_INCLUDE_QUEUE_METRICS", options.IncludeQueueMetrics.ToString().ToLower()); + } + + /// + /// Configures the external webhook url for the n8n resource. This overrides the default url in . + /// + /// Configures the external url for the n8n resource used by webhooks. + /// The n8n resource builder. + /// The external url to use (e.g., "https://n8n.example.com"). Cannot be null or empty. + /// The resource builder for chaining. + /// Thrown if is null or whitespace. + [AspireExport] + public static IResourceBuilder WithWebhookUrl( + this IResourceBuilder builder, + string webhookUrl) + { + ArgumentException.ThrowIfNullOrWhiteSpace(webhookUrl); + + return builder.WithEnvironment("N8N_WEBHOOK_URL", webhookUrl); + } +} diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nContainerImageTags.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nContainerImageTags.cs new file mode 100644 index 000000000..0fcddee68 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nContainerImageTags.cs @@ -0,0 +1,22 @@ +namespace Zemires.Aspire.Hosting.N8n; + +internal static class N8nContainerImageTags +{ + /// + /// The registry for the n8n container image. + /// + public const string Registry = "docker.io"; + /// + /// The image name for n8n. + /// + public const string Image = "n8nio/n8n"; + /// + /// The image name for n8n runners. + /// + public const string ImageRunners = "n8nio/runners"; + /// + /// The tag for the n8n container image. + /// + public const string Tag = "2.36.7"; +} + diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nMetricOptions.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nMetricOptions.cs new file mode 100644 index 000000000..f6561484f --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nMetricOptions.cs @@ -0,0 +1,110 @@ +namespace Aspire.Hosting; + +/// +/// Configuration options for N8n metrics collection. +/// +/// +/// All metric categories are enabled by default. Set individual properties to to disable specific metric types. +/// +[AspireExport(ExposeProperties = true)] +public class N8nMetricOptions +{ + /// + /// Gets or sets a value indicating whether to include webhook-related metrics. + /// + /// + /// to include webhook metrics; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_WEBHOOK_METRICS environment variable. + /// + public bool IncludeWebhookMetrics { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include workflow information in metrics. + /// + /// + /// to include workflow info; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_WORKFLOW_INFO environment variable. + /// + public bool IncludeWorkflowInfo { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include form-related metrics. + /// + /// + /// to include form metrics; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_FORM_METRICS environment variable. + /// + public bool IncludeFormMetrics { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include workflow ID labels in metrics. + /// + /// + /// to include workflow ID labels; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL environment variable. + /// + public bool IncludeWorkflowIdLabel { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include node type labels in metrics. + /// + /// + /// to include node type labels; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_NODE_TYPE_LABEL environment variable. + /// + public bool IncludeNodeTypeLabel { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include credential type labels in metrics. + /// + /// + /// to include credential type labels; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL environment variable. + /// + public bool IncludeCredentialTypeLabel { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include API endpoint metrics. + /// + /// + /// to include API endpoint metrics; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_API_ENDPOINTS environment variable. + /// + public bool IncludeApiEndpoints { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include API path labels in metrics. + /// + /// + /// to include API path labels; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_API_PATH_LABEL environment variable. + /// + public bool IncludeApiPathLabel { get; set; } = true; + + /// + /// Gets or sets a value indicating whether to include queue-related metrics. + /// + /// + /// to include queue metrics; otherwise, . The default is . + /// + /// + /// Maps to the N8N_METRICS_INCLUDE_QUEUE_METRICS environment variable. + /// + public bool IncludeQueueMetrics { get; set; } = true; +} \ No newline at end of file diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nResource.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nResource.cs new file mode 100644 index 000000000..326137d4f --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nResource.cs @@ -0,0 +1,69 @@ +namespace Aspire.Hosting.ApplicationModel; + +/// +/// A resource that represents n8n +/// +public class N8nResource : ContainerResource, IResourceWithConnectionString +{ + internal const string PrimaryEndpointName = "http"; + + /// + /// Initializes a new . + /// + /// The name of the resource. + /// A parameter that contains the n8n encryption key. + public N8nResource(string name, ParameterResource encryptionKeyParameter) : base(name) + { + EncryptionKeyParameter = encryptionKeyParameter; + } + + private EndpointReference? _primaryEndpoint; + + /// + /// Gets the primary endpoint for the N8n. This endpoint is used for all API calls over HTTP. + /// + public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName); + + /// + /// Gets the host endpoint reference for this resource. + /// + public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host); + + /// + /// Gets the port endpoint reference for this resource. + /// + public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port); + + /// + /// Gets the connection string expression for the N8n + /// + public ReferenceExpression ConnectionStringExpression => + ReferenceExpression.Create($"{PrimaryEndpoint.Scheme}://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}"); + + /// + /// Gets the connection URI expression for the N8n server. + /// + /// + /// Format: {scheme}://{host}:{port}. + /// + public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Scheme}://{Host}:{Port}"); + + /// + /// Gets the ParameterResource that identifies the encryption key used to protect sensitive data. + /// + public ParameterResource EncryptionKeyParameter { get; } + + /// + /// Gets the ParameterResource that holds the plaintext instance owner password, or if + /// has not been called. + /// + public ParameterResource? InstanceOwnerPassword { get; internal set; } + + IEnumerable> IResourceWithConnectionString.GetConnectionProperties() + { + yield return new("Host", ReferenceExpression.Create($"{Host}")); + yield return new("Port", ReferenceExpression.Create($"{Port}")); + yield return new("Uri", UriExpression); + } +} + diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nTaskRunnerResource.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nTaskRunnerResource.cs new file mode 100644 index 000000000..2a69fcef8 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nTaskRunnerResource.cs @@ -0,0 +1,22 @@ +namespace Aspire.Hosting.ApplicationModel; + +/// +/// Represents a task runner resource for n8n. +/// +public class N8nTaskRunnerResource : ContainerResource, IResourceWithParent +{ + /// + /// Initializes a new N8nTaskRunnerResource with the specified name and parent. + /// + /// The resource name. + /// The parent N8nResource the task runner connects to. + public N8nTaskRunnerResource(string name, N8nResource parent) : base(name) + { + Parent = parent; + } + + /// + /// Gets the parent in the n8n resource hierarchy. + /// + public N8nResource Parent { get; } +} diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/N8nWorkerResource.cs b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nWorkerResource.cs new file mode 100644 index 000000000..4b27fbf24 --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/N8nWorkerResource.cs @@ -0,0 +1,24 @@ +namespace Aspire.Hosting.ApplicationModel; + +/// +/// Represents a worker resource for n8n. +/// +public class N8nWorkerResource : N8nResource, IResourceWithParent +{ + /// + /// Initializes a new N8nWorkerResource with the specified name and parent. + /// + /// Sets the Parent property and forwards the parent's EncryptionKeyParameter to the base + /// constructor. + /// The resource name. + /// The parent N8nResource whose scope and EncryptionKeyParameter are used. + public N8nWorkerResource(string name, N8nResource parent) : base(name, parent.EncryptionKeyParameter) + { + Parent = parent; + } + + /// + /// Gets the parent in the n8n resource hierarchy. + /// + public N8nResource Parent { get; } +} diff --git a/src/CommunityToolkit.Aspire.Hosting.N8n/README.md b/src/CommunityToolkit.Aspire.Hosting.N8n/README.md new file mode 100644 index 000000000..9447c998c --- /dev/null +++ b/src/CommunityToolkit.Aspire.Hosting.N8n/README.md @@ -0,0 +1,64 @@ +# CommunityToolkit.Aspire.Hosting.N8n library + +An Aspire hosting integration for [n8n](https://n8n.io), a fair-code licensed workflow automation tool that combines AI capabilities with business process automation. + +# Getting Started + +## Install the package + +In your AppHost project, install the package using the following command:```dotnetcli + +dotnet add package CommunityToolkit.Aspire.Hosting.N8n + +## Example usage + +Then, in the \_Program.cs\_ file of `AppHost`, add a N8n resource using the following methods: + +```csharp +var builder = DistributedApplication.CreateBuilder(args); +var n8n = builder.AddN8n("n8n"); +builder.Build().Run(); +``` + +## Advanced Example usage + +Szenario with postgres database, isolated worker with task runner using redis, additional paramters for instance owner and license key. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var ownerPassword = builder.AddParameter("owner-password", "Pass$Word1"); +var licenseKey = builder.AddParameter("license-key", "[license-key]"); + +var postgres = builder.AddPostgres("postgres") + .WithDataVolume(); + +var db = postgres.AddDatabase("n8n-db"); + +var redis = builder.AddRedis("redis") + .WithDataVolume(); + +var n8n = builder.AddN8n("n8n", port: 5678) + .WithDataBindMount("./.n8n_data") + .WithPostgresDatabase(db) + .WithQueueMode(redis) + .WithInstanceOwner("admin@dev.local", "Admin", "Local", ownerPassword) + .WithLicenseKey(licenseKey); + +var worker = n8n.AddWorker("worker", port: 5679) + .WithPostgresDatabase(db) + .WithQueueMode(redis); + +worker.AddTaskRunner("runner"); + +builder.Build().Run(); +``` + +## Additional Information + +https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-n8n + +# Feedback & contributing + +https://github.com/CommunityToolkit/Aspire + diff --git a/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/AppHostTests.cs b/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/AppHostTests.cs new file mode 100644 index 000000000..11289c75b --- /dev/null +++ b/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/AppHostTests.cs @@ -0,0 +1,33 @@ +using CommunityToolkit.Aspire.Testing; +using Aspire.Components.Common.Tests; +using System.Net; +using System.Net.Http.Json; + +namespace CommunityToolkit.Aspire.Hosting.N8n.Tests; + +[RequiresDocker] +public class AppHostTests( + AspireIntegrationTestFixture fixture +) : IClassFixture> +{ + [Fact] + public async Task N8n_Starts_And_Responds_Ok() + { + var resourceName = "n8n"; + + // Wait for N8n to be healthy (it has a health check configured) + await fixture.ResourceNotificationService + .WaitForResourceHealthyAsync(resourceName) + .WaitAsync(TimeSpan.FromMinutes(5)); + + var httpClient = fixture.CreateHttpClient(resourceName); + + // Test the health endpoint + var request = new HttpRequestMessage(HttpMethod.Get, "/"); + // Needs to match the external domain for N8n or we get a 404 + request.Headers.Host = $"{fixture.App.GetEndpoint(resourceName, "http").Host}"; + var response = await httpClient.SendAsync(request); + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + } +} diff --git a/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/CommunityToolkit.Aspire.Hosting.N8n.Tests.csproj b/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/CommunityToolkit.Aspire.Hosting.N8n.Tests.csproj new file mode 100644 index 000000000..509062723 --- /dev/null +++ b/tests/CommunityToolkit.Aspire.Hosting.N8n.Tests/CommunityToolkit.Aspire.Hosting.N8n.Tests.csproj @@ -0,0 +1,10 @@ + + + + + + + + + +