diff --git a/docker/images/n8n/README.md b/docker/images/n8n/README.md index eb8549bcbc..848c21c7cd 100644 --- a/docker/images/n8n/README.md +++ b/docker/images/n8n/README.md @@ -63,7 +63,7 @@ You can then access n8n by opening: To be able to use webhooks which all triggers of external services like Github rely on n8n has to be reachable from the web. To make that easy n8n has a -special tunnel service (uses this code: [https://github.com/localtunnel/localtunnel](https://github.com/localtunnel/localtunnel)) which redirects requests from our servers to your local +special tunnel service (uses this code: [https://github.com/n8n-io/localtunnel](https://github.com/n8n-io/localtunnel)) which redirects requests from our servers to your local n8n instance. To use it simply start n8n with `--tunnel` diff --git a/package.json b/package.json index 90cee43f90..4e65f45069 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "p-limit": "^3.1.0", "rimraf": "^5.0.1", "run-script-os": "^1.0.7", - "start-server-and-test": "^2.0.0", + "start-server-and-test": "^2.0.3", "supertest": "^6.3.3", "ts-jest": "^29.1.1", "tsc-alias": "^1.8.7", diff --git a/packages/cli/package.json b/packages/cli/package.json index 6e6f8de24a..ceaaf46280 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -76,7 +76,6 @@ "@types/formidable": "^3.4.0", "@types/json-diff": "^1.0.0", "@types/jsonwebtoken": "^9.0.1", - "@types/localtunnel": "^2.0.4", "@types/lodash": "^4.14.195", "@types/passport-jwt": "^3.0.6", "@types/psl": "^1.1.0", @@ -99,6 +98,7 @@ }, "dependencies": { "@n8n/client-oauth2": "workspace:*", + "@n8n/localtunnel": "2.1.0", "@n8n/permissions": "workspace:*", "@n8n_io/license-sdk": "2.7.2", "@oclif/command": "1.8.18", @@ -145,7 +145,6 @@ "jsonwebtoken": "9.0.0", "jwks-rsa": "3.0.1", "ldapts": "4.2.6", - "localtunnel": "2.0.2", "lodash": "4.17.21", "luxon": "3.3.0", "mysql2": "2.3.3", @@ -168,7 +167,7 @@ "pg": "8.8.0", "picocolors": "1.0.0", "pkce-challenge": "3.0.0", - "posthog-node": "2.2.2", + "posthog-node": "3.2.1", "prom-client": "13.2.0", "psl": "1.9.0", "raw-body": "2.5.1", diff --git a/packages/cli/src/commands/start.ts b/packages/cli/src/commands/start.ts index e2eeecc981..d48ea8567f 100644 --- a/packages/cli/src/commands/start.ts +++ b/packages/cli/src/commands/start.ts @@ -4,7 +4,6 @@ import { Container } from 'typedi'; import path from 'path'; import { mkdir } from 'fs/promises'; import { createReadStream, createWriteStream, existsSync } from 'fs'; -import localtunnel from 'localtunnel'; import { flags } from '@oclif/command'; import stream from 'stream'; import replaceStream from 'replacestream'; @@ -308,14 +307,13 @@ export class Start extends BaseCommand { this.instanceSettings.update({ tunnelSubdomain }); } - const tunnelSettings: localtunnel.TunnelConfig = { - host: 'https://hooks.n8n.cloud', - subdomain: tunnelSubdomain, - }; - + const { default: localtunnel } = await import('@n8n/localtunnel'); const port = config.getEnv('port'); - const webhookTunnel = await localtunnel(port, tunnelSettings); + const webhookTunnel = await localtunnel(port, { + host: 'https://hooks.n8n.cloud', + subdomain: tunnelSubdomain, + }); process.env.WEBHOOK_URL = `${webhookTunnel.url}/`; this.log(`Tunnel URL: ${process.env.WEBHOOK_URL}\n`); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18180703ef..11044d2760 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,8 +105,8 @@ importers: specifier: ^1.0.7 version: 1.1.6 start-server-and-test: - specifier: ^2.0.0 - version: 2.0.0 + specifier: ^2.0.3 + version: 2.0.3 supertest: specifier: ^6.3.3 version: 6.3.3 @@ -170,7 +170,7 @@ importers: dependencies: axios: specifier: 1.6.2 - version: 1.6.2 + version: 1.6.2(debug@3.2.7) packages/@n8n/nodes-langchain: dependencies: @@ -342,6 +342,9 @@ importers: '@n8n/client-oauth2': specifier: workspace:* version: link:../@n8n/client-oauth2 + '@n8n/localtunnel': + specifier: 2.1.0 + version: 2.1.0 '@n8n/n8n-nodes-langchain': specifier: workspace:* version: link:../@n8n/nodes-langchain @@ -374,7 +377,7 @@ importers: version: 7.87.0 axios: specifier: 1.6.2 - version: 1.6.2 + version: 1.6.2(debug@3.2.7) basic-auth: specifier: 2.0.1 version: 2.0.1 @@ -483,9 +486,6 @@ importers: ldapts: specifier: 4.2.6 version: 4.2.6 - localtunnel: - specifier: 2.0.2 - version: 2.0.2 lodash: specifier: 4.17.21 version: 4.17.21 @@ -550,8 +550,8 @@ importers: specifier: 3.0.0 version: 3.0.0(patch_hash=dypouzb3lve7vncq25i5fuanki) posthog-node: - specifier: 2.2.2 - version: 2.2.2 + specifier: 3.2.1 + version: 3.2.1 prom-client: specifier: 13.2.0 version: 13.2.0 @@ -661,9 +661,6 @@ importers: '@types/jsonwebtoken': specifier: ^9.0.1 version: 9.0.1 - '@types/localtunnel': - specifier: ^2.0.4 - version: 2.0.4 '@types/lodash': specifier: ^4.14.195 version: 4.14.195 @@ -732,7 +729,7 @@ importers: version: 1.11.0 axios: specifier: 1.6.2 - version: 1.6.2 + version: 1.6.2(debug@3.2.7) concat-stream: specifier: 2.0.0 version: 2.0.0 @@ -1028,7 +1025,7 @@ importers: version: 10.5.0(vue@3.3.4) axios: specifier: ^1.6.2 - version: 1.6.2 + version: 1.6.2(debug@3.2.7) chart.js: specifier: ^4.4.0 version: 4.4.0 @@ -6085,6 +6082,19 @@ packages: - '@lezer/common' dev: false + /@n8n/localtunnel@2.1.0: + resolution: {integrity: sha512-k5mb+Aeb3+4cRfWaEsMSiTsF1oARFvAuI3EOvxitrgVmiWk592h4nCI7vtjq1nsVT+PWKmB6dBoTQ0+6HHIpug==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + axios: 1.6.2(debug@4.3.4) + debug: 4.3.4(supports-color@8.1.1) + openurl: 1.1.1 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + dev: false + /@n8n/tournament@1.0.2: resolution: {integrity: sha512-fTpi7F8ra5flGSVfRzohPyG7czAAKCZPlLjdKdwbLJivLoI/Ekhgodov1jfVSCVFVbwQ06gRQRxLEDzl2jl8ig==} engines: {node: '>=18.10', pnpm: '>=8.6'} @@ -7390,8 +7400,8 @@ packages: '@hapi/hoek': 9.3.0 dev: true - /@sideway/formula@3.0.0: - resolution: {integrity: sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==} + /@sideway/formula@3.0.1: + resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} dev: true /@sideway/pinpoint@2.0.0: @@ -10214,12 +10224,6 @@ packages: /@types/linkify-it@3.0.2: resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} - /@types/localtunnel@2.0.4: - resolution: {integrity: sha512-7WM5nlEfEKp8MpwthPa2utdy+f/7ZBxMPzu8qw6EijFFTcpzh5CXgt2YoncxWAZNOPNieMofXCKFudtDEY4bag==} - dependencies: - '@types/node': 18.16.16 - dev: true - /@types/lodash-es@4.17.6: resolution: {integrity: sha512-R+zTeVUKDdfoRxpAryaQNRKk3105Rrgx2CFRClIgRGaqDTdjsm8h6IYA8ir584W3ePzkZfst5xIgDwYrlh9HLg==} dependencies: @@ -12037,33 +12041,7 @@ packages: /axios@0.21.4: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} dependencies: - follow-redirects: 1.15.2(debug@4.3.4) - transitivePeerDependencies: - - debug - dev: false - - /axios@0.21.4(debug@4.3.2): - resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} - dependencies: - follow-redirects: 1.15.2(debug@4.3.2) - transitivePeerDependencies: - - debug - dev: false - - /axios@0.27.2(debug@4.3.4): - resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==} - dependencies: - follow-redirects: 1.15.2(debug@4.3.4) - form-data: 4.0.0 - transitivePeerDependencies: - - debug - - /axios@1.6.2: - resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} - dependencies: - follow-redirects: 1.15.2(debug@4.3.4) - form-data: 4.0.0 - proxy-from-env: 1.1.0 + follow-redirects: 1.15.2(debug@3.2.7) transitivePeerDependencies: - debug dev: false @@ -12078,6 +12056,15 @@ packages: - debug dev: false + /axios@1.6.2(debug@4.3.4): + resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==} + dependencies: + follow-redirects: 1.15.2(debug@4.3.4) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + /babel-core@7.0.0-bridge.0(@babel/core@7.22.9): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: @@ -13768,18 +13755,6 @@ packages: supports-color: 8.1.1 dev: true - /debug@4.3.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: false - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -15715,18 +15690,6 @@ packages: debug: 3.2.7(supports-color@5.5.0) dev: false - /follow-redirects@1.15.2(debug@4.3.2): - resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dependencies: - debug: 4.3.2 - dev: false - /follow-redirects@1.15.2(debug@4.3.4): resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} engines: {node: '>=4.0'} @@ -15760,7 +15723,7 @@ packages: engines: {node: '>=14'} dependencies: cross-spawn: 7.0.3 - signal-exit: 4.0.2 + signal-exit: 4.1.0 dev: true /forever-agent@0.6.1: @@ -16901,7 +16864,7 @@ packages: /infisical-node@1.3.0: resolution: {integrity: sha512-tTnnExRAO/ZyqiRdnSlBisErNToYWgtunMWh+8opClEt5qjX7l6HC/b4oGo2AuR2Pf41IR+oqo+dzkM1TCvlUA==} dependencies: - axios: 1.6.2 + axios: 1.6.2(debug@3.2.7) dotenv: 16.3.1 tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 @@ -18133,13 +18096,13 @@ packages: engines: {node: '>= 0.6.0'} dev: false - /joi@17.7.0: - resolution: {integrity: sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg==} + /joi@17.11.0: + resolution: {integrity: sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==} dependencies: '@hapi/hoek': 9.3.0 '@hapi/topo': 5.1.0 '@sideway/address': 4.1.4 - '@sideway/formula': 3.0.0 + '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 dev: true @@ -19232,19 +19195,6 @@ packages: lie: 3.1.1 dev: false - /localtunnel@2.0.2: - resolution: {integrity: sha512-n418Cn5ynvJd7m/N1d9WVJISLJF/ellZnfsLnx8WBWGzxv/ntNcFkJ1o6se5quUhCplfLGBNL5tYHiq5WF3Nug==} - engines: {node: '>=8.3.0'} - hasBin: true - dependencies: - axios: 0.21.4(debug@4.3.2) - debug: 4.3.2 - openurl: 1.1.1 - yargs: 17.1.1 - transitivePeerDependencies: - - supports-color - dev: false - /locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -21790,11 +21740,12 @@ packages: xtend: 4.0.2 dev: false - /posthog-node@2.2.2: - resolution: {integrity: sha512-aXYe/D+28kF63W8Cz53t09ypEORz+ULeDCahdAqhVrRm2scbOXFbtnn0GGhvMpYe45grepLKuwui9KxrZ2ZuMw==} - engines: {node: '>=14.17.0'} + /posthog-node@3.2.1: + resolution: {integrity: sha512-ofNX3TPfZPlWErVc2EDk66cIrfp9EXeKBsXFxf8ISXK57b10ANwRnKAlf5rQjxjRKqcUWmV0d3ZfOeVeYracMw==} + engines: {node: '>=15.0.0'} dependencies: - axios: 0.27.2(debug@4.3.4) + axios: 1.6.2(debug@3.2.7) + rusha: 0.8.14 transitivePeerDependencies: - debug dev: false @@ -23013,6 +22964,10 @@ packages: hasBin: true dev: true + /rusha@0.8.14: + resolution: {integrity: sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA==} + dev: false + /rw@1.3.3: resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} dev: false @@ -23360,11 +23315,6 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - /signal-exit@4.0.2: - resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} - engines: {node: '>=14'} - dev: true - /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -23743,9 +23693,9 @@ packages: /standard-as-callback@2.1.0: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} - /start-server-and-test@2.0.0: - resolution: {integrity: sha512-UqKLw0mJbfrsG1jcRLTUlvuRi9sjNuUiDOLI42r7R5fA9dsFoywAy9DoLXNYys9B886E4RCKb+qM1Gzu96h7DQ==} - engines: {node: '>=6'} + /start-server-and-test@2.0.3: + resolution: {integrity: sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==} + engines: {node: '>=16'} hasBin: true dependencies: arg: 5.0.2 @@ -23755,7 +23705,7 @@ packages: execa: 5.1.1 lazy-ass: 1.6.0 ps-tree: 1.2.0 - wait-on: 7.0.1(debug@4.3.4) + wait-on: 7.2.0(debug@4.3.4) transitivePeerDependencies: - supports-color dev: true @@ -25936,13 +25886,13 @@ packages: xml-name-validator: 5.0.0 dev: true - /wait-on@7.0.1(debug@4.3.4): - resolution: {integrity: sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==} + /wait-on@7.2.0(debug@4.3.4): + resolution: {integrity: sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==} engines: {node: '>=12.0.0'} hasBin: true dependencies: - axios: 0.27.2(debug@4.3.4) - joi: 17.7.0 + axios: 1.6.2(debug@4.3.4) + joi: 17.11.0 lodash: 4.17.21 minimist: 1.2.8 rxjs: 7.8.1 @@ -26509,19 +26459,6 @@ packages: yargs-parser: 20.2.9 dev: false - /yargs@17.1.1: - resolution: {integrity: sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==} - engines: {node: '>=12'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: false - /yargs@17.6.0: resolution: {integrity: sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==} engines: {node: '>=12'}