Commit graph

286 commits

Author SHA1 Message Date
Jan Oberhauser 917f51bc18 ⬆️ Set n8n-workflow@0.65.0 on n8n-core 2021-08-22 12:39:18 +00:00
Jan 5a179cd5ae
Implement Wait functionality (#1817)
* refactor saving

* refactor api layer to be stateless

* refactor header details

* set variable for menu height

* clean up scss

* clean up indentation

* clean up dropdown impl

* refactor no tags view

* split away header

* Fix tslint issues

* Refactor tag manager

* add tags to patch request

* clean up scss

*  Refactor types to entities

* fix issues

* update no workflow error

* clean up tagscontainer

* use getters instead of state

* remove imports

* use custom colors

* clean up tags container

* clean up dropdown

* clean up focusoncreate

*  Ignore mistaken ID in POST /workflows

*  Fix undefined tag ID in PATCH /workflows

*  Shorten response for POST /tags

* remove scss mixins

* clean up imports

*  Implement validation with class-validator

* address ivan's comments

* implement modals

* Fix lint issues

* fix disabling shortcuts

* fix focus issues

* fix focus issues

* fix focus issues with modal

* fix linting issues

* use dispatch

* use constants for modal keys

* fix focus

* fix lint issues

* remove unused prop

* add modal root

* fix lint issues

* remove unused methods

* fix shortcut

* remove max width

*  Fix duplicate entry error for pg and MySQL

* update rename messaging

* update order of buttons

* fix firefox overflow on windows

* fix dropdown height

* 🔨 refactor tag crud controllers

* 🧹 remove unused imports

* use variable for number of items

* fix dropdown spacing

*  Restore type to fix build

*  Fix post-refactor PATCH /workflows/:id

*  Fix PATCH /workflows/:id for zero tags

*  Fix usage count becoming stringified

* address max's comments

* fix filter spacing

* fix blur bug

* address most of ivan's comments

* address tags type concern

* remove defaults

*  return tag id as string

* 🔨 add hooks to tag CUD operations

* 🏎 simplify timestamp pruning

* remove blur event

* fix onblur bug

*  Fix fs import to fix build

* address max's comments

* implement responsive tag container

* fix lint issues

* update tag limits

* address ivan's comments

* remove rename, refactor header, implement new designs for save, remove responsive tag container

* update styling

* update styling

* implement responsive tag container

* implement header tags edit

* implement header tags edit

* fix lint issues

* implement expandable input

* minor fixes

* minor fixes

* use variable

* rename save as

* duplicate fixes

* minor edit fixes

* lint fixes

* style fixes

* hook up saving name

* hook up tags

* clean up impl

* fix dirty state bug

* update limit

* update notification messages

* on click outside

* fix minor bug with count

* lint fixes

* handle minor edge cases

* handle minor edge cases

* handle minor bugs; fix firefox dropdown issue

* Fix min width

* apply tags only after api success

* remove count fix

* clean up workflow tags impl, fix tags delete bug

* fix minor issue

* fix minor spacing issue

* disable wrap for ops

* fix viewport root; save on click in dropdown

* save button loading when saving name/tags

* implement max width on tags container

* implement cleaner create experience

* disable edit while updating

* codacy hex color

* refactor tags container

* fix clickability

* fix workflow open and count

* clean up structure

* fix up lint issues

* fix button size

* increase workflow name limit for larger screen

* tslint fixes

* disable responsiveness for workflow modal

* rename event

* change min width for tags

* clean up pr

* address max's comments on styles

* remove success toasts

* add hover mode to name

* minor fixes

* refactor name preview

* fix name input not to jiggle

* finish up name input

* Fix up add tags

* clean up param

* clean up scss

* fix resizing name

* fix resizing name

* fix resize bug

* clean up edit spacing

* ignore on esc

* fix input bug

* focus input on clear

* build

* fix up add tags clickablity

* remove scrollbars

* move into folders

* clean up multiple patch req

* remove padding top from edit

* update tags on enter

* build

* rollout blur on enter behavior

* rollout esc behavior

* fix tags bug when duplicating tags

* move key to reload tags

* update header spacing

* build

* update hex case

* refactor workflow title

* remove unusued prop

* keep focus on error, fix bug on error

* Fix bug with name / tags toggle on error

* fix connection push bug

* :spakles: Implement wait functionality

* 🐛 Do not delete waiting executions with prune

*  Improve SQLite migration to not lose execution data anymore

*  Make it possible to restart waiting execution via webhook

*  Add missing file

* 🐛 Some more merge fixes

*  Do not show error for Wait-Nodes if in time-mode

*  Make $executionId available in expressions

* 👕 Fix lint issue

* 👕 Fix lint issue

* 👕 Fix lint issue

*  Set the unlimited sleep time as a variable

*  Add also sleeping webhook path to config

*  Make it possible to retrieve restartUrl in workflow

*  Add authentication to Wait-Node in Webhook-Mode

*  Return 404 when trying to restart execution via webhook which does
not support it

*  Make it possible to set absolute time on Wait-Node

*  Remove not needed imports

*  Fix description format

*  Implement missing webhook features on Wait-Node

*  Display webhook variable in NodeWebhooks

*  Include also date in displayed sleep time

*  Make it possible to see sleep time on node

*  Make sure that no executions does get executed twice

*  Add comment

*  Further improvements

*  Make Wait-Node easier to use

*  Add support for "notice" parameter type

* Fixing wait node to work with queue, improved logging and execution view

* Added support for mysql and pg

*  Add support for webhook postfix path

*  Make it possible to stop sleeping executions

*  Fix issue with webhook paths in not webhook mode

*  Remove not needed console.log

*  Update TODOs

*  Increase min time of workflow staying active to descrease possible issue
with overlap

* 👕 Fix lint issue

* 🐛 Fix issues with webhooks

*  Make error message clearer

*  Fix issue with missing execution ID in scaling mode

* Fixed execution list to correctly display waiting executins

* Feature: enable webhook wait workflows to continue after specified time

* Fixed linting

*  Improve waiting description text

*  Fix parameter display issue and rename

*  Remove comment

*  Do not display webhooks on Wait-Node

* Changed wording from restart to resume on wait node

* Fixed wording and inconsistent screen when changing resume modes

* Removed dots from the descriptions

* Changed docs url and renaming postfix to suffix

* Changed names from sleep to wait

*  Apply suggestions from ben

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

* Some fixes by Ben

*  Remove console.logs

*  Fixes and improvements

Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com>
Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com>
Co-authored-by: Omar Ajoue <krynble@gmail.com>
2021-08-21 14:11:32 +02:00
Omar Ajoue 7ce7285f7a
Load credentials from the database (#1741)
* Changes to types so that credentials can be always loaded from DB

This first commit changes all return types from the execute functions
and calls to get credentials to be async so we can use await.

This is a first step as previously credentials were loaded in memory and
always available. We will now be loading them from the DB which requires
turning the whole call chain async.

* Fix updated files

* Removed unnecessary credential loading to improve performance

* Fix typo

*  Fix issue

* Updated new nodes to load credentials async

*  Remove not needed comment

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-08-20 18:57:30 +02:00
Ahsan Virani 178235e148
Initial changes for binary data management (#2105)
* introduce binary data management

* cr

* add binary data changes to awsS3 node

* add binary data changes to Box node

* add binary data changes to CiscoWebex node

* add binary data changes to HumaniticAi node

* add binary data changes to Jira node

* add binary data changes to Line node

* add binary data changes to MicrosoftOneDrive node

* add binary data changes to MicrosoftOutlook node

* add binary data changes to Mindee node

* add binary data changes to NocoDB node

* add binary data changes to Pushbullet node

* add binary data changes to Pushover node

* add binary data changes to Raindrop node

* add binary data changes to S3 node

* add binary data changes to Salesforce node

* add binary data changes to Ssh node

* add binary data changes to TheHive node

* add binary data changes to Twist node

* add binary data changes to Twitter node

* remove changes not needed right now

* 🐛 Fix issue with multiple runs

* 🐛 Revert fix and add support for multiple inputs

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-08-20 18:08:40 +02:00
Jan Oberhauser 9757ebab43 🔖 Release n8n-core@0.79.0 2021-08-15 18:30:45 +00:00
Jan Oberhauser 309324f60f Allow crypto-js bugfix versions 2021-08-13 11:58:52 +02:00
Snyk bot 98a6d784b8
⬆️ Set crypto-js@4.1.1 on n8n-core
Snyk has created this PR to upgrade crypto-js from 4.0.0 to 4.1.1.

See this package in npm:
https://www.npmjs.com/package/crypto-js

See this project in Snyk:
https://app.snyk.io/org/janober/project/2579c34e-cd60-421b-a46b-41f87f875eec?utm_source=github&utm_medium=upgrade-pr
2021-08-13 11:58:21 +02:00
Jan Oberhauser 205a314a52 🔖 Release n8n-core@0.78.0 2021-07-24 19:59:49 +00:00
Jan Oberhauser 576aa9fb85 ⬆️ Set n8n-workflow@0.64.0 on n8n-core 2021-07-24 19:59:49 +00:00
Jan Oberhauser d0221ce625 🔖 Release n8n-core@0.77.0 2021-07-11 16:21:37 +00:00
Omar Ajoue d3da5023f0
🐛 Fix "unknown", never-end workflow and not displaying error message (#1978)
* Added try catch blocks to avoid endlessly running workflows

* Added handling for subworkflows

*  Fix one cause of "unkown" status of worklows with "main" mode

*  Fix one cause of "unkown" status of worklows with "own" mode

*  Fix one cause of "unkown" status of worklows with "queue" mode

* Saving database recovery

* 🐛 Fix issue that errors did not get saved correctly and also not
displayed

*  Save workflow timeout correctly as error

* Adding error capture to queued jobs

*  Mark canceled executions as not finished consistently across all
modes

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-07-10 11:34:41 +02:00
Jan Oberhauser 8b94373863 🔖 Release n8n-core@0.76.0 2021-07-04 18:13:01 +00:00
Jan Oberhauser 1532d27102 ⬆️ Set n8n-workflow@0.63.0 on n8n-core 2021-07-04 18:13:00 +00:00
Jan Oberhauser bb701dd3ea 🔖 Release n8n-core@0.75.0 2021-06-20 09:15:41 +00:00
Jan Oberhauser 627e17324e ⬆️ Set n8n-workflow@0.62.0 on n8n-core 2021-06-20 09:15:41 +00:00
Jan Oberhauser 786c19806b 🔖 Release n8n-core@0.74.0 2021-06-13 17:56:07 +00:00
Jan Oberhauser a427f78010 ⬆️ Set n8n-workflow@0.61.0 on n8n-core 2021-06-13 17:56:07 +00:00
Jan Oberhauser 1d850da9fb Send request of HTTP Request node to browser console when testing 2021-06-12 20:22:55 +02:00
Jan Oberhauser e80cbc4ef9 🔖 Release n8n-core@0.73.0 2021-05-30 17:46:14 +00:00
Jan Oberhauser 3b071b3b55 ⬆️ Set n8n-workflow@0.60.0 on n8n-core 2021-05-30 17:46:14 +00:00
Jan 4946bfcd3e
Add functionality to send console.log messages to editor-UI (#1816)
*  Send console.log messages to editor-UI

*  Send message only to session which started workflow

*  Made it also work in own process

*  Add support for console.log UI forward also to FunctionItem Node

* 👕 Fix lint issue

* 👕 Fix linting issue

*  Improve code

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2021-05-29 13:41:25 -05:00
Jan Oberhauser 67ce1a5c1f 🔖 Release n8n-core@0.72.0 2021-05-20 21:42:26 +00:00
Jan Oberhauser a60f5e0997 ⬆️ Set n8n-workflow@0.59.0 on n8n-core 2021-05-20 21:42:26 +00:00
Jan Oberhauser 002f53a4af Allow to load sibling parameters in loadOptionsMethod 2021-05-16 18:16:24 -05:00
Jan Oberhauser da3856e875 🔖 Release n8n-core@0.71.0 2021-05-16 18:43:14 +00:00
Jan Oberhauser 4de0daa2c2 ⬆️ Set n8n-workflow@0.58.0 on n8n-core 2021-05-16 18:43:14 +00:00
Jan Oberhauser 1aa0a5cc8d Make it possible to read sibling parameter 2021-05-14 18:16:48 -05:00
Jan Oberhauser b05c4d5a55 🔖 Release n8n-core@0.70.0 2021-05-09 19:24:17 +00:00
Jan Oberhauser b47f4bc012 🐛 Fix issue that nodes did execute even if there was no input data 2021-05-08 21:49:55 -05:00
Jan Oberhauser 56b93c3e7e 🔖 Release n8n-core@0.69.0 2021-05-02 13:56:37 +00:00
Jan Oberhauser 6980ecf2a8 ⬆️ Set n8n-workflow@0.57.0 on n8n-core 2021-05-02 13:56: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
Jan Oberhauser 3dacb283ac 🔖 Release n8n-core@0.68.0 2021-04-17 15:34:20 +00:00
Jan Oberhauser 659232c2b1 ⬆️ Set n8n-workflow@0.56.0 on n8n-core 2021-04-17 15:34:20 +00: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
Omar Ajoue 882e2f8e74
Addglobal timeout setting for all http requests except for http request node (#1650)
* Added a global timeout setting for all http requests except for http
node.

The http node explicitly sets a timeout that overrides the default
value.

This is to prevent behaviors when users were expecting that their quests
could take a very long time to execute.

* Removed unnecessary typing from code
2021-04-17 15:15:33 +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
Ahsan Virani b54aae8c31
⬆️ Update types/node package in all packages (#1659)
* ⬆️ Update types/node package in all packages, fix type in crypto node

*  Fix build issue and some formatting

Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-04-15 23:57:20 +02:00
Jan Oberhauser 5e2aa023fc 🔖 Release n8n-core@0.67.0 2021-04-03 15:08:33 +00:00
Jan Oberhauser f8a829b2dd Clean up package.json files 2021-03-26 09:21:27 +01:00
Jan Oberhauser a301c0d68b 🔖 Release n8n-core@0.66.0 2021-03-26 08:10:44 +00:00
Jan Oberhauser 571f815bf6 ⬆️ Set n8n-workflow@0.55.0 on n8n-core 2021-03-26 08:10:44 +00:00
Jan Oberhauser 4276150ac1 Fix indentation in all package.json files 2021-03-26 09:06:26 +01:00
Omar Ajoue 726a99bf69
Add Activation Trigger (#1570)
*  n8n start trigger node

* first declaration of WorkflowActivationMode

* implement first WorkflowActivationMode: 'init', 'create', 'update', 'activate'

* fix Server missing id

* add activation infos to triggers

* remove WorkflowActivationMode from webhook execution function

* add some missing activation and add manual activation

* clean up and fix some code

* fix UnhandledPromiseRejectionWarning: Error: Overwrite NodeExecuteFunctions.getExecuteTriggerFunctions.emit function!

* fix spaces

* use a better name for the node

* fix ident in package.json

* Contributions to lublak's PR #1287

* Fixed linting issues and change the way parameters are displayed

*  Fix name and minor improvements

Co-authored-by: lublak <lublak.de@gmail.com>
Co-authored-by: lublak <44057030+lublak@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-03-23 19:08:47 +01:00
Jan Oberhauser 66caf31e2f 🔖 Release n8n-core@0.65.0 2021-03-19 17:41:10 +01:00
Jan Oberhauser 9510184d79 ⬆️ Set n8n-workflow@0.54.0 on n8n-core 2021-03-19 17:40:37 +01:00
Omar Ajoue dfeb531cc0
🐛 Fix concurrency issues with subworkflows (#1558) 2021-03-19 17:32:43 +01:00
Jan Oberhauser ddce679569 Minor changes to directories in binary data 2021-03-18 18:13:24 +01:00
Jan Oberhauser d65e8ee73b 🔀 Merge branch 'binary-file-path' of https://github.com/lublak/n8n into lublak-binary-file-path 2021-03-18 13:20:26 +01:00
lublak 5da61ef252
Replace some fallback values to match the value type (#1421) 2021-03-08 18:45:35 +01:00