This PR is an example for how we can
1. improve typing and remove boilerplate code in may of our nodes
2. use nock to write effective unit tests for nodes that make external
calls
## Review / Merge checklist
- [x] PR title and summary are descriptive
- [x] Add tests
Also,
1. Consistent CORS support ~on all three webhook types~ waiting webhooks never supported CORS. I'll fix that in another PR
2. [Fixes binary-data handling when request body is text, json, or xml](https://linear.app/n8n/issue/NODE-505/webhook-binary-data-handling-fails-for-textplain-files).
3. Reduced number of middleware that each request has to go through.
4. Removed the need to maintain webhook endpoints in the auth-exception list.
5. Skip all middlewares (apart from `compression`) on Webhook routes.
6. move `multipart/form-data` support out of individual nodes
7. upgrade `formidable`
8. fix the filenames on binary-data in webhooks nodes
9. add unit tests and integration tests for webhook request handling, and increase test coverage
* fix(core): Make node execution order configurable, and backward-compatible
* ⚡ Also add new Merge-Node behaviour
* ⚡ Fix typo
* Fix lint issue
* update labels
* rename legacy to v0
* remove the unnecessary log
* default all new workflows to use v1 execution-order
* remove the controller changes
* clone default settings to avoid it getting modified
---------
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
* Setup versionized node
* Fix node naming
* Set all possible actions
* Add Current Date operation
* Add timezone to current date
* feat add to date operator
* Change output field name to camel case
* Fix info box for luxons tip
* Feat subtract to date operation
* Feat format date operation
* Fix to node field for format date
* Feat rounding operation
* Feat get in between date operation
* Feat add extract date operation
* Add generic function for parsing date
* Remove moment methods from operations
* Change moment to luxon for the rest of the operations
* Fix Format date operation
* Fix format value
* Add timezone option for current date
* Add tests, improve workflow settings for testing, toString the results
* Change icon for V2
* Revert "Change icon for V2"
This reverts commit 46b59bea2e.
* Change workflow test name
* Fix ui bug for custom format
* Fix default value for format operation
* Fix info box for rounding operation
* Change default for units for between time operation
* Inprove fields and resort time units
* Fix extract week number
* Resolve issue with formating and timezones
* Fix field name and unit order
* ⚡ restored removed test case, sync v1 with curent master
* ⚡ parseDate update to support timestamps, tests
* Keep same field for substract and add time
* Update unit test
* Improve visibility, add iso to string option
* Update option naming
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
* 🔧 Adjust base ESLint config
* 🔧 Adjust `lint` and `lintfix` in `nodes-base`
* 🔧 Include `test` and `utils` in `nodes-base`
* 📘 Convert JS tests to TS
* 👕 Apply lintfixes
* 🧪 Add base for building unit testing within nodes
* Improve helper functions
* 🧪 If node test
* 🧪 Airtable node test
* 🧪 If node test improvements
* 🧪 Airtable node test improvements
* ♻️ cleanup node unit tests
* ♻️ refactor getting node result data to use helper method
* ⚡ removed unused variables
* ♻️ Helper to read json files
---------
Co-authored-by: Marcus <marcus@n8n.io>
Co-authored-by: Michael Kret <michael.k@radency.com>