Commit graph

771 commits

Author SHA1 Message Date
Harshil Agrawal 1888f5c4a5
📚 Update documentation for npm package (#1770) 2021-05-12 14:52:31 -05:00
Omar Ajoue c739a498f1
🐛 Fix ordering when auto refreshing (#1761)
* Fix ordering when auto refreshing

* Fix ordering for current executinos as well
2021-05-12 10:51:54 -05:00
Jan Oberhauser 6134175a06 🐛 Fix MySQL credential bug 2021-05-11 23:04:56 -05:00
Omar Ajoue 0867c7bbfe
🐛 Fix issue with long credential names in MySQL (#1771) 2021-05-11 22:43:24 -05:00
Omar Ajoue 6ffc544888
Add await statement to hooks (#1775) 2021-05-11 22:15:22 -05:00
Jan Oberhauser e3ab0b8679 📚 Fix job link 2021-05-09 17:55:27 -05:00
Jan Oberhauser 958657278b 🔖 Release n8n@0.119.0 2021-05-09 19:26:49 +00:00
Jan Oberhauser ffacdcdbce ⬆️ Set n8n-core@0.70.0, n8n-editor-ui@0.89.0 and n8n-nodes-base@0.116.0 on n8n 2021-05-09 19:26:48 +00:00
Harshil Agrawal ffc0c7b4d5
Add breaking change for Node.js version update (#1733)
*  Add breaking change for Node.js version update

*  Fix format of breaking-changes file

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-05-07 22:37:09 -05:00
Omar Ajoue cdbb3acd2d
🐛 Remove webhooks deregistration from webhook process (#1753) 2021-05-07 19:37:45 -05:00
Omar Ajoue d90acdf863
Implement timeout for subworkflows (#1751) 2021-05-07 19:06:26 -05:00
Jan Oberhauser f324fe1dff 🐛 Fix Error-Workflows 2021-05-05 15:18:14 -05:00
Jan Oberhauser 715e41b590 Update required Node.js version also to 14 in package.json of cli 2021-05-03 16:21:22 -05:00
Jan Oberhauser 3d2eaa3aaa Check on startup for Node.js version 14 or later 2021-05-03 16:15:02 -05:00
Jan Oberhauser 043cf6730c 🔖 Release n8n@0.118.0 2021-05-02 13:58:37 +00:00
Jan Oberhauser 318142a9e5 ⬆️ Set n8n-core@0.69.0, n8n-editor-ui@0.88.0, n8n-nodes-base@0.115.0 and n8n-workflow@0.57.0 on n8n 2021-05-02 13:58:37 +00:00
Omar Ajoue c972f3dd50
Added logging to n8n (#1381)
* Added logging to n8n

This commit adds logging to n8n using the Winston library.

For now, this commit only allows logging to console (default behavior)
or file (need to pass in config via environment variables).

Other logging methods can be further implemented using hooks. These were
skipped for now as it would require adding more dependencies.

Logging level is notice by default, meaning no additional messages would
be displayed at the moment. Logging level can be set to info or debug as
well to enrich the generated logs.

The ILogger interface was added to the workflow project as it would make
it available for all other projects but the implementation was done on
the cli project.

* Lint fixes and logging level naming. Also fixed the way we use the logger as it was not working previously

* Improvements to logging framework

Using appropriate single quotes
Improving the way the logger is declared

* Improved naming for Log Types

* Removed logger global variable, replacing it by a proxy

* Add logging to CLI commands

* Remove unused GenericHelpers

* Changed back some messages to console instead of logger and added npm
shortcuts for worker and webhook

* Fix typos

* Adding basic file rotation to logs as suggested by @mutdmour

* Fixed linting issues

* Correcting comment to correctly reflect space usage

* Added settings for log files rotation

* Correcting config type from String to Number

* Changed default file settings to number

To reflect previous changes to the type

* Changed the way log messages are added to be called statically. Also minor naming improvements

* Applying latest corrections sent by @ivov

*  Some logging improvements

* Saving logs to a folder inside n8n home instead of root

* Fixed broken tests and linting

* Changed some log messages to improve formatting

* Adding quotes to names  on log messages

* Added execution and session IDs to logs. Also removed unnecessary line breaks

*  Added file caller to log messages (#1657)

This is done using callsites library which already existed
in the project as another library's dependency. So in fact
it does not add any new dependency.

* Adding logs to help debug Salesforce node

*  Add function name to logs and add more logs

*  Improve some error messages

*  Improve some more log messages

*  Rename logging env variables to match others

Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-05-01 22:43:01 -05:00
Snyk bot eab7b0a10a
⬆️ Set tslib@0.114.1 on n8n
Snyk has created this PR to upgrade tslib from 1.13.0 to 1.14.1.

See this package in npm:
https://www.npmjs.com/package/tslib

See this project in Snyk:
https://app.snyk.io/org/janober/project/fc678bbc-0ac7-4659-9458-8f7f360e2566?utm_source=github&utm_medium=upgrade-pr
2021-04-30 21:25:18 -05:00
lublak c83c05456d
Use native fs promise where possible (#1684) 2021-04-30 21:22:15 -05:00
Jan Oberhauser b7a074abd7 Fix breaking changes files 2021-04-30 21:14:07 -05:00
Jan Oberhauser ab1c8037de Unify some dependency versions 2021-04-30 20:42:32 -05:00
Omar Ajoue fc54f7c82b
Add query parameters for CrateDB, PostgresDB, TimescaleDB and QuestDB (Parametrized Queries) (#1577)
* Adding support to ParameterizedQuery on Postgres Node

* Created another parameter to toggle on replacement so it's clear to users what is happening.

* Fixed lint issues

*  Formatting

* Improvements to questDB node so it is more consistent

* Fixed lint issues

* Fixed typing issue

*  Apply suggestions BHesseldieck

Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>

* Standardized output for postgres and postgres-like nodes

This changes the behavior of CrateDB, Postgres, QuestDB and TimescaleDB
nodes.

The Execute Query operation used to execute multiple queries but return
the result from only one of the queries.

This change causes the node output to containt results from all queries
that ran, making the behavior more consistent across all n8n.

* Fixing lint issues

*  Minor improvements

*  Fix breaking changes files

Co-authored-by: Gustavo Arjones <gustavo.arjones@ank.app>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-authored-by: Jan <janober@users.noreply.github.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
2021-04-30 17:35:34 -05:00
Jan Oberhauser 7f0f8deb6d 🔖 Release n8n@0.117.0 2021-04-24 21:41:33 +00:00
Jan Oberhauser 91aa425201 ⬆️ Set n8n-editor-ui@0.87.0 and n8n-nodes-base@0.114.0 on n8n 2021-04-24 21:41:32 +00:00
Omar Ajoue 81d8a9f332
💥 Deprecate Activation Trigger and add two new replacement nodes (#1680)
* Add Workflow & n8n Trigger nodes

* Update nodes descriptions & icons

* Remove Activation Trigger node

* Update nodes descriptions & Add timestamp and workflow_id

* Added breaking change notice and types to events

*  Minor improvements

Co-authored-by: dali <servfrdali@yahoo.fr>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-24 23:14:06 +02:00
Omar Ajoue 41669c0e0f
Add options to run queries as transactions (#1612)
* add multi return

* add independently and transaction to query

* pgInsert normal and transaction

* independently for pgInsert

* normal, transaction and independently for pgUpdate

* cleanup

* implement it in other nodes

* multiple fixes

* add optional returning support

* clean up Postgres functions

* fix other postgres based dbs

* Added option to run queries as a transaction to Postgres

This commit allows users to configure Postgres, CrateDB, TimescaleDB and
QuestDB to run queries independently or as transactions as well as the
previous mode which is to execute multiple queries at once.

Previous behavior remains untouched so we only added new options.

* Standardize behavior across nodes that use postgres protocol

Also fixed unit tests.

* Added breaking change notice

* Added more information to breaking changes

*  Styling fixes

Co-authored-by: lublak <lublak.de@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-24 22:55:14 +02:00
Jan Oberhauser 5c65a73cc2 🔖 Release n8n@0.116.1 2021-04-20 08:57:47 +02:00
Jan Oberhauser b2e65dceff 🐛 Fix issue that workflows in main process did timeout 2021-04-20 08:55:54 +02:00
Jan Oberhauser 4d966eaa26 🔖 Release n8n@0.116.0 2021-04-17 15:36:30 +00:00
Jan Oberhauser 91909ed509 ⬆️ Set n8n-core@0.68.0, n8n-editor-ui@0.86.0, n8n-nodes-base@0.113.0 and n8n-workflow@0.56.0 on n8n 2021-04-17 15:36:29 +00:00
Jan Oberhauser b83c2e2a3c 👕 Fix lint issue 2021-04-17 17:23:48 +02:00
Omar Ajoue 0c779de704
Implement timeout for workers and corrected timeout for subworkflows (#1634)
* Implemented timeout for workers and corrected timeout for subworkflows

* Fixed issue with timeouts when running on separate processes

* Standardized timeouts across all n8n

Now the maxTimeout setting takes effect whenever a timeout is set
to any workflows.

This causes local timeouts (either set on a per-workflow basis or
via global settings) to be capped by the maximum timeout. This
behavior already existed but was not applied to all places.

Also changed the way n8n enforces timeouts for subworkflows, making
it work always.

In effect, with this change, if you have one workflow that calls others
only the main workflow's timeout is taken into consideration, limiting
the maximum time that other workflows combined can run.

*  Fix timeout problem in "own" mode

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-17 16:44:07 +02:00
Iván Ovejero 1d27a9e87e
Improve node error handling (#1309)
* Add path mapping and response error interfaces

* Add error handling and throwing functionality

* Refactor error handling into a single function

* Re-implement error handling in Hacker News node

* Fix linting details

* Re-implement error handling in Spotify node

* Re-implement error handling in G Suite Admin node

* 🚧 create basic setup NodeError

* 🚧 add httpCodes

* 🚧 add path priolist

* 🚧 handle statusCode in error, adjust interfaces

* 🚧 fixing type issues w/Ivan

* 🚧 add error exploration

* 👔 fix linter issues

* 🔧 improve object check

* 🚧 remove path passing from NodeApiError

* 🚧 add multi error + refactor findProperty method

* 👔 allow any

* 🔧 handle multi error message callback

*  change return type of callback

*  add customCallback to MultiError

* 🚧 refactor to use INode

* 🔨 handle arrays, continue search after first null property found

* 🚫 refactor method access

* 🚧 setup NodeErrorView

*  change timestamp to Date.now

* 📚 Add documentation for methods and constants

* 🚧 change message setting

* 🚚 move NodeErrors to workflow

*  add new ErrorView for Nodes

* 🎨 improve error notification

* 🎨 refactor interfaces

*  add WorkflowOperationError, refactor error throwing

* 👕 fix linter issues

* 🎨 rename param

* 🐛 fix handling normal errors

*  add usage of NodeApiError

* 🎨 fix throw new error instead of constructor

* 🎨 remove unnecessary code/comments

* 🎨 adjusted spacing + updated status messages

* 🎨 fix tab indentation

*  Replace current errors with custom errors (#1576)

*  Introduce NodeApiError in catch blocks

*  Introduce NodeOperationError in nodes

*  Add missing errors and remove incompatible

*  Fix NodeOperationError in incompatible nodes

* 🔧 Adjust error handling in missed nodes

PayPal, FileMaker, Reddit, Taiga and Facebook Graph API nodes

* 🔨 Adjust Strava Trigger node error handling

* 🔨 Adjust AWS nodes error handling

* 🔨 Remove duplicate instantiation of NodeApiError

* 🐛 fix strava trigger node error handling

* Add XML parsing to NodeApiError constructor (#1633)

* 🐛 Remove type annotation from catch variable

*  Add XML parsing to NodeApiError

*  Simplify error handling in Rekognition node

*  Pass in XML flag in generic functions

* 🔥 Remove try/catch wrappers at call sites

* 🔨 Refactor setting description from XML

* 🔨 Refactor let to const in resource loaders

*  Find property in parsed XML

*  Change let to const

* 🔥 Remove unneeded try/catch block

* 👕 Fix linting issues

* 🐛 Fix errors from merge conflict resolution

*  Add custom errors to latest contributions

* 👕 Fix linting issues

*  Refactor MongoDB helpers for custom errors

* 🐛 Correct custom error type

*  Apply feedback to A nodes

*  Apply feedback to missed A node

*  Apply feedback to B-D nodes

*  Apply feedback to E-F nodes

*  Apply feedback to G nodes

*  Apply feedback to H-L nodes

*  Apply feedback to M nodes

*  Apply feedback to P nodes

*  Apply feedback to R nodes

*  Apply feedback to S nodes

*  Apply feedback to T nodes

*  Apply feedback to V-Z nodes

*  Add HTTP code to iterable node error

* 🔨 Standardize e as error

* 🔨 Standardize err as error

*  Fix error handling for non-standard nodes

Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>

Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
2021-04-16 18:33:36 +02:00
Jan Oberhauser a8ab77b8e0 ⬆️ Set tslib@1.13.0 on cli 2021-04-16 00:05:23 +02:00
Jan Oberhauser fc299f136f ⬆️ Set mysql2@2.2.0 n8n & nodes-base 2021-04-16 00:01:45 +02:00
LongYinan 8ed1099795
Use faster bcrypt implementation (#1593) 2021-04-13 18:26:25 +02:00
Jan Oberhauser 8f3bc32555 🐛 Fix bug with expression in production webhook paths 2021-04-11 15:45:17 +02:00
Jan Oberhauser 7a99f4256f 🔖 Release n8n@0.115.0 2021-04-10 08:47:20 +00:00
Jan Oberhauser 00b5e5e68f ⬆️ Set n8n-editor-ui@0.85.0 and n8n-nodes-base@0.112.0 on n8n 2021-04-10 08:47:20 +00:00
Jan Oberhauser 2273a4cff2 Make max payload size configurable #1447 2021-04-09 12:13:42 +02:00
Jan Oberhauser 0c8afbb3cb 🔖 Release n8n@0.114.0 2021-04-03 15:10:41 +00:00
Jan Oberhauser 039b5a6afd ⬆️ Set n8n-core@0.67.0, n8n-editor-ui@0.84.0 and n8n-nodes-base@0.111.0 on n8n 2021-04-03 15:10:41 +00:00
Tanay Pant fac0876f95
Add breaking change for 0.113.0 2021-03-26 09:36:39 +01:00
Jan Oberhauser f8a829b2dd Clean up package.json files 2021-03-26 09:21:27 +01:00
Jan Oberhauser 91fbd01eae 🔖 Release n8n@0.113.0 2021-03-26 08:12:50 +00:00
Jan Oberhauser 06c34e283d ⬆️ Set n8n-core@0.66.0, n8n-editor-ui@0.83.0, n8n-nodes-base@0.110.0 and n8n-workflow@0.55.0 on n8n 2021-03-26 08:12:50 +00:00
Jan Oberhauser 4276150ac1 Fix indentation in all package.json files 2021-03-26 09:06:26 +01:00
Jan Oberhauser bfb179e5f0 Ignore issue as convict types are wrong 2021-03-25 11:42:19 +01:00
Jan Oberhauser 0c0c0bda67 Some cleanup 2021-03-25 11:23:54 +01:00
Jan Oberhauser 5f96f01f24 Make n8n work with new version of convict 2021-03-25 11:17:30 +01:00