Commit graph

462 commits

Author SHA1 Message Date
Iván Ovejero 632f573021
refactor(core): Introduce overload for string-type node parameter (no-changelog) (#4797)
* 📘 Set up overload

* 🔥 Remove inferrable assertions
2022-12-02 12:53:59 +01:00
Jan Oberhauser afc57c5397 🔖 Release n8n-workflow@0.127.0 2022-12-02 09:13:01 +00:00
Iván Ovejero 59771c80ea
feat(editor): Overhaul expression editor modal (#4631)
* feat(editor): Integrate CodeMirror into expression editor modal (#4563)

*  Initial setup

* 👕 Fix lint

*  Extract segments

*  Implement var insertion

* 👕 Ignore `.d.cts`

*  Refactor to simplify

*  Add brace handler

*  Fully replace input and output

* feat(editor): Adjust resolved expression to match parameter input hint (#4600)

*  Initial adjustments

* 🐛 Prevent empty decorations

*  Adjust resolved expression to match param input hint

* ✏️ Improve comment

* 👕 Remove lint rule

* ✏️ Fix typo

* ✏️ Fix closing brace

*  Clean up `displayableSegments()`

* feat(editor): Apply styling to expression editor modal (#4607)

🎨 Apply styling

* feat(core): Improve errors in evaluated expression (#4619)

* 🐛 Fix env var access for FE

* 🔥 Remove excess closing bracket

* 🚧 Set up TODO

* ✏️ Update copy

*  Deny env vars access to FE

* 👕 Remove unneeded lint exception

* 📘 Remove unneeded typing

* feat(editor): Dynamically delay evaluation resolution (#4625)

* ✏️ Update copy

*  Dynamically delay evaluation resolution

* 🔥 Remove unneeded computed property

* refactor(editor): Pre-review cleanup (#4627)

* 🔥 Remove `ExpressionInput` component

* 🔥 Remove Quill

* ✏️ Rename i18n key

* 🎨 Place border on correct element

* 🐛 Handle syntax errors

*  Add sample autocompletions

* 🐛 Fix auto-extending behavior

* feat(editor): Improve escaping behavior (#4641)

* 🎨 Hide hint on small screen

*  Improve escaping

* refactor(editor): Apply styling feedback to expression editor modal (#4660)

* 🎨 Restyle hint

* 🎨 Restyle param input hint

* 🔥 Remove `e.g.`

*  Tweak delay

* 🎨 Restyle output

* 🎨 Tweak theme

* ✏️ Tweak copy

* refactor(editor): Apply feedback 2022.11.22 (#4697)

* 🎨 Change background color

*  Focus on mount

*  Account for preexisting braces on injection

* 🐛 Fix `$workflow` showing as not saved

* ✏️ Tweak copy

* 🐛 Fix readonly focus

*  Focus input on paste

*  Sync inputs with modal

* ✏️ Tweak copy

* refactor(editor): Apply feedback 2022.11.23 (#4705)

*  Allow newlines

*  Set cursor at end of content

*  Do not defocus on paste on Chrome

*  Fix import

* 🧪 Add e2e tests

*  Cleanup

*  Add telemetry

* 🔥 Remove log

*  Expose error properties

* 🧪 Rename test

*  Move `getCurrentWorkflow()` call

*  Revert highlighting removal per feedback

*  Add i18n keys

* 🚚 Move computed property to local state

* 🎨 Use CSS vars

*  Update `pnpm-lock.yaml`

*  Apply readonly state

*  Use prop

*  Complete fix
2022-12-01 13:26:22 +01:00
कारतोफ्फेलस्क्रिप्ट™ ada73ed41d
ci: Fix linting issues on master (no-changelog) (#4768)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2022-11-30 12:16:19 +01:00
कारतोफ्फेलस्क्रिप्ट™ 0a7a2f3e41
fix: Lazy load nodes for credentials testing (#4760) 2022-11-30 10:28:18 +01:00
Iván Ovejero 3d67df490c
fix(core): Fix $items().length in Execute Once mode (#4755)
* 🐛 Fix `$items.length` in Execute Once mode

* 🔥 Remove logging
2022-11-29 17:30:39 +01:00
कारतोफ्फेलस्क्रिप्ट™ 07e4743a3e
refactor(core): Reduce memory usage in the Webhook node (#4640)
use file streaming to pass webhook binaries around
2022-11-24 16:54:43 +01:00
Jan Oberhauser 44d6185118 🔖 Release n8n-workflow@0.126.0 2022-11-24 15:43:46 +00:00
कारतोफ्फेलस्क्रिप्ट™ b6c57e19fc
feat(core): Lazy-load nodes and credentials to reduce baseline memory usage (#4577) 2022-11-23 16:20:28 +01:00
Iván Ovejero b87c12285f
fix(core): Fix $items().length behavior in executeOnce mode (#4694)
🐛 Fix `$items().length` in `executeOnce`
2022-11-22 16:24:16 +01:00
Iván Ovejero 78119c9f22
refactor: Consolidate .prettierignore patterns (no-changelog) (#4692)
*  Consolidate Prettier ignore patterns

*  Let Prettier select file types to format

* 🎨 Apply formatting
2022-11-22 14:11:29 +01:00
कारतोफ्फेलस्क्रिप्ट™ 0b754a4f85
refactor: Improve error logging/reporting for cli (#4691)
* use response error classes instead of `ResponseError` everywhere

* improve error logging in dev mode or when telemetry is disabled
2022-11-22 14:00:36 +01:00
Iván Ovejero 0d9eeea024
refactor(core): Introduce overload for record-type node parameter (no-changelog) (#4648)
* 📘 Set up overload

* 🔥 Remove inferrable record assertions

* 👕 Fix semicolon

* 👕 Fix another semicolon
2022-11-18 16:29:44 +01:00
Iván Ovejero 0565194473
refactor(core): Introduce overload for number-type node parameter (no-changelog) (#4644)
* 📘 Set up overloads

* 📘 Add temporary assertion

* 🔥 Remove inferrable number assertions

* ✏️ Add ticket ref
2022-11-18 15:26:22 +01:00
Iván Ovejero 6757c9a2ea
refactor(core): Introduce overload for boolean-type node parameter (no-changelog) (#4647)
* 📘 Set up overloads

* 📘 Add temporary assertion

* 🔥 Remove inferrable boolean assertions

*  Undo autoformatting
2022-11-18 14:31:38 +01:00
Jan Oberhauser fdfb803fa0 🔖 Release n8n-workflow@0.125.0 2022-11-17 16:05:42 +00:00
Milorad FIlipović b0bbcf6028
fix(editor): Fix zero treated as missing value in resource locator (#4612)
* 🐛 Adding a type guard to validate resource locator parameter values
* ✔️ Fixing a linting error
Co-authored-by: Michael Kret <michael.k@radency.com>
2022-11-16 09:21:30 +01:00
कारतोफ्फेलस्क्रिप्ट™ 0148631d28
build: Upgrade some of the backend dev-tooling (no-changelog) (#4589)
* upgrade ts-node

* move tslint and typescript to a single place

* source-map-support should be loaded in the `n8n` bin script, and not in core

* upgrade jest

* Support only node.js 14, 16, or 18
2022-11-14 15:37:32 +01:00
Marcus 277b6b73c3
feat(Notion (Beta) Node): Use resource locator component for database and page parameters (#4340)
* use resource locator component for database -> get (Notion V1/V2)

* getDatabases search function for V1/V2 with url

* updated database get list placeholder

* get database RLC by url - regex support optional workspace domain names

* fixed linting error

* listSearch getDatabases support filter query

* support extractValue in getCurrentNodeParameter for RLC

* RLC for database page create/getAll operation

* RLC for database get operation support "By ID" with optional v param.

* use RLC in append blocks operation

* use RLC in NotionTrigger.nodes.ts

* removed unused loadOptions getDatabases

* support database RLC in createPage/createDbPage operation

* page create operation use RLC for parent page param

* page archive operation use RLC for page param

* removed unused imports

* fixed missing extractPageId in NotionV1.node.ts

* database page get operation use RLC for page param

* database page update operation use RLC for page param

* block getAll children operation use RLC for page param

* block append operation use RLC for block param

* support databaseId with optional '-' characters

* support blockId with optional '-' characters

* support pageId with optional '-' characters

* improved RLC descriptions and hints

* NotionTrigger node support databseId with optional '-' characters

* stricter RLC by ID regex rules for uuids

* stricter RLC by URL regex rules for uuids

* stricter RLC by ID regex rules for uuids (support max length)

* RLC regex from URL allow both http and https

* RLC by ID only allow uuid v4 with optional dash

* removed RLC from URL hint "Use Notion's copy link..."

* RLC from URL only allow uuid v4

* DB Status Column: Support Simplify Properties

* Notion Credentials: Support custom Notion-Version header

Use latest Notion-Version 2022-02-22 if not set

* DB Status Column: Support DB Page Create/Update

* DB Status Column: Support DB Page GetMany Filters

* removed unused paginationToken args

* Database Get: RLC by URL improve validation error message
2022-11-11 13:37:52 +01:00
agobrech c7133ecd3f
fix(core): Deduplicate error handling in nodes (#4319)
* Fix issue with isAxios property

* 🥅 Deduplicate errors handeling improve errors for credentials

* 🎨 correctly throws error
2022-11-11 11:32:43 +01:00
Jan Oberhauser 083316b4db 🔖 Release n8n-workflow@0.124.1 2022-11-10 20:53:32 +00:00
कारतोफ्फेलस्क्रिप्ट™ b2201d0c77
fix: Disable some error tracking (#4579)
* fix: remove error tracking for Circular reference in deepCopy

* fix: remove error tracking on crash detection
2022-11-10 21:44:31 +01:00
Jan Oberhauser d95382e330 🔖 Release n8n-workflow@0.124.0 2022-11-10 15:43:33 +00:00
कारतोफ्फेलस्क्रिप्ट™ 736777385c
feat: Switch from npm to pnpm (#4429) 2022-11-09 17:32:05 +01:00
कारतोफ्फेलस्क्रिप्ट™ 698d96a617
refactor: Setup typescript project references across workflow, core, and cli (#4519)
* refactor: use consistent folder structure across workflow, core, and cli

* setup typescript project references across workflow, core, and cli
2022-11-09 15:25:00 +01:00
कारतोफ्फेलस्क्रिप्ट™ 2425c10b2b
feat(API): Report unhandled app crashes to Sentry (#4548)
* SIGTERM/SIGINT should only be handled once

* move error-handling initialization to commands

* create a new `sleep` function in workflow utils

* detect crashes and report them to Sentry
2022-11-08 17:06:00 +01:00
Valya ebf17e1827
refactor: make IPollFunctions emit consistent with trigger emit (#4201)
* refactor: make IPollFunctions emit consistent with trigger emit

* refactor: re-add underscores to poll emits

* chore: update emit override message
2022-11-08 13:29:20 +00:00
कारतोफ्फेलस्क्रिप्ट™ c239eea1b9
fix(HTTP Request Node): Show error cause in the output (#4538)
fix (HTTP Request node): show error cause in the output

This broke in these two PRs

https://github.com/n8n-io/n8n/pull/4505/
https://github.com/n8n-io/n8n/pull/4431/
2022-11-07 12:40:54 -05:00
कारतोफ्फेलस्क्रिप्ट™ 1c98f97e9e
ci: Revert support for node.js 18 (#4518) (#4537)
Revert "ci: Start supporting node.js 18 (#4518)"

This reverts commit 9ee292cd17.
2022-11-07 17:23:08 +01:00
कारतोफ्फेलस्क्रिप्ट™ 9ee292cd17
ci: Start supporting node.js 18 (#4518)
* ci: start supporting node.js 18

Node.js 18 becomes the active LTS on 2022-10-25, as Node.js 16 goes into maintenance mode.
https://github.com/nodejs/Release#release-schedule

* continue using node 16 for production images

* node 16 for debian and base images as well for now
2022-11-07 15:51:57 +01:00
कारतोफ्फेलस्क्रिप्ट™ 41cb0eec6e
feat(API): Set up error tracking using Sentry (#4394)
* feat(cli): Setup error tracking using Sentry

* make error reporting available in the workflows package

* address some of the PR comments

* create a ErrorReporterProxy like LoggerProxy

* remove the `captureError` helper. use ErrorReporterProxy directly

* fix linting issues

* remove ErrorReporterProxy warnings in tests

* check for NODE_ENV === 'production' instead

* IErrorReporter -> ErrorReporter

* ErrorReporterProxy.getInstance() -> ErrorReporter

* allow capturing stacks in warnings as well

* make n8n debugging consistent with `npm start`

* IReportingOptions -> ReportingOptions

* use consistent signature for `error` and `warn`

* use Logger instead of console.log
2022-11-04 17:34:47 +01:00
Jan Oberhauser e4e4823d08 🔖 Release n8n-workflow@0.123.0 2022-11-02 17:25:17 +00:00
कारतोफ्फेलस्क्रिप्ट™ b282c7e5d9
fix(core): make deepCopy backward compatible (#4505)
* fix(core): make `deepCopy` backward compatible

`JSON.parse(JSON.stringify())`  uses `.toJSON` when available. so should `deepCopy`

* fix(core): prevent double quotes on luxon datetimes (#4508)

* 🐛 Prevent double quotes on luxon datetimes

*  Generalize solution

* update the types in packages/workflow/src/utils.ts

* add `toJSON` check to NodeErrors.isTraversableObject as well

* move the toJSON check before the cyclic dependency check

* fix(core): keep backward compatibility in deepCopy by calling `toJSON` on objects that have it

* fix(core): updating deepCopy typings

* Revert "fix(core): updating deepCopy typings"

This reverts commit 100a0f1f3d.

* fix(core): temporarily removing Date cloning from deepCopy

* fix(core): updating deepCopy types

* fix(core): updating deepCopy

* fix(core): updating deepCopy get prototype of object

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
2022-11-02 17:44:12 +01:00
Valya 3a1fa09108
fix: displayOptions not getting value of RLC (#4460)
* fix: use `value` of RLC in `displayOptions`

* fix: add `__rl` to RLC default value if it doesn't have it
2022-11-02 09:37:49 +00:00
Iván Ovejero ec5ef0c50d
refactor(core): clear @ts-ignore from workflow and core packages (#4467)
* 📘 Clear all `@ts-ignore` comments from workflow package

* 👕 Default to error with package-level overrides

* refactor(core): clear all `@ts-ignore` comments from core package (#4473)

👕 Clear all `@ts-ignore` comments from core package

* ✏️ Update comment
2022-10-31 12:45:34 +01:00
Jan Oberhauser 198ae0869c 🔖 Release n8n-workflow@0.122.1 2022-10-28 14:21:23 +00:00
कारतोफ्फेलस्क्रिप्ट™ 818f57dd63
refactor: remove console.warn from deepCopy (#4471)
Jan realized that this was logging way too much (as in, we have way too many circular references).

I've changed this to be reported to Sentry, which should hopefully get merged next week.
2022-10-28 16:10:56 +02:00
Csaba Tuncsik ca60b0e203
fix(core): updating deepCopy to avoid max callstack with circular deps (#4468)
* fix(core): updating deepCopy to avoid max callstack in case of circular dep

* fix(core): show warning with path added to circular reference
2022-10-28 15:25:44 +02:00
कारतोफ्फेलस्क्रिप्ट™ e6ec134cf3
fix(AWS SNS Trigger Node): add missing jsonParse import (#4463)
* fix(AwsSnsTrigger): add missing jsonParse import

* add clear typings for req.rawBody and getHeaderData()
2022-10-28 11:24:11 +02:00
Jan Oberhauser 520914f525 🔖 Release n8n-workflow@0.122.0 2022-10-27 14:30:24 +00:00
Jan Oberhauser 14d887cf86 docs: Update logo and README files with new design 2022-10-27 14:57:49 +02:00
Cornelius Suermann d1b4d428cb
docs: scope Sustainable Use License to contents of the main branch (#4450)
docs: scope Sustainable Use License to contents of the main branch (e.g. 'master')
2022-10-26 16:50:33 +02:00
कारतोफ्फेलस्क्रिप्ट™ 1f610b90f6
feat: use ES2022 native error chaining to improve error reporting (#4431)
feat: use ES2022 native error chaining
2022-10-26 11:55:39 +02:00
कारतोफ्फेलस्क्रिप्ट™ 99157cf581
feat: setup nightly tests for postgres and mysql schemas (#4441)
* feat: unify Jest config

* feat: simplify DB setup for tests

* feat: setup nightly tests for postgres and mysql schemas
2022-10-25 22:06:03 +02:00
कारतोफ्फेलस्क्रिप्ट™ 5c9b40117a
refactor: rename NodeVersionedType to VersionedNodeType and move it to the workflow package (#4443) 2022-10-25 21:33:12 +02:00
Iván Ovejero 77233f2370
fix(core): fix predefinedCredentialType in node graph item (#4379)
* 🐛 Fix predefined cred in node graph item

* 🔥 Remove logging
2022-10-25 09:07:26 +02:00
Csaba Tuncsik 408bd96815
feat(editor): add readonly state for nodes (#4299)
* fix(editor): add types to Node.vue component props

* fix(editor): some cleanup in NodeView

* fix(editor): fix some boolean usage

* feat(editor): check foreign credentials

* fix(editor): passing readOnly to inputs

* fix(editor): add types to component and solve property mutation

* fix(editor): add types to component and solve property mutation

* fix(editor): component property type

* fix(editor): component property type

* fix(editor): default prop values

* fix(editor): fix FixedCollectionParameter.vue
2022-10-24 20:17:25 +02:00
Iván Ovejero 5745027cee
fix(core): fix single-node execution failing in main mode (#4421)
* 🐛 Fix Manual Trigger group

* 🐛 Account for single-node execution
2022-10-24 15:03:41 +02:00
Iván Ovejero 1732324965
fix(core): amend typing for jsonParse() options (#4423)
* 📘 Amend typing for `jsonParse()` options

* ✏️ Update rule message and description

* 🔀 Cherrypick Adi's work

* 🐛 Account for falsy fallback values

* ♻️ Use `else if`

*  Add explicit error message as type

*  Consolidate utils tests

* ♻️ Use optional chaining

* 🔥 Remove patchy type error

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2022-10-24 12:48:16 +02:00
Michael Kret 1d57b10942
refactor(core): fix for no-uncaught-json-parse warnings 2022-10-21 21:52:43 +03:00