fix: invalid credentials should throw 401 and not 500
I missed to add these in https://github.com/n8n-io/n8n/pull/4691
I've checked not that there are no other cases of http errors that aren't using error classes. This was the last one.
* ✨ Added `utils` module. Moved `canvasHelpers` and old `utils.ts` file to it
* ✨ Moved rest of utils and helpers
* ⚡ Fixing sytax errors
* 🔨 Refactoring new utils files
* 🔨 Organizing imports, adding comments and a bit more refactoring
* ✔️ Fixing tests
* 🔨 Moving mixins to `src`
* fix: Fix inferred type of X cannot be named error after pnpm update
* feat: Change page objects to expose actions and getters. Add credential creation suite
* 🐛 Fixes weekly schedule trigger and inconsitent behavior from Cron
* 🐛 Explicitly check if number of items is undefined
* 🐛 Add flag for first time execution
* Fix merge issues
* 🎨 Decomplexise logic for week interval
* fix: account for periods longer than minimum interval and first executions
Co-authored-by: Omar Ajoue <krynble@gmail.com>
since we migrated to vite, storybook/webpack aren't doing all the babel transforms. that's we we need to revert all optional-chaining and nullish-coalescing in design-system.
Hopefully this will be remedied after we move to vite for storybook.
* ensure that eslint runs on all frontend code
* remove tslint from `design-system`
* enable prettier and eslint-prettier for `design-system`
* Delete tslint.json
* use a single editorconfig for the repo
* enable prettier for all code in `design-system`
* more linting fixes on design-system
* ignore coverage for git and prettier
* lintfix on editor-ui
* feat(editor): extract credentials view into reusable layout components for workflows view
* feat(editor): add workflow card and start work on empty state
* feat: add hoverable card and finish workflows empty state
* fix: undo workflows response interface changes
* chore: fix linting issues.
* fix: remove enterprise sharing env schema
* fix(editor): fix workflows resource view when sharing is enabled
* fix: change owner tag design and order
* feat: add personalization survey on workflows page
* fix: update component snapshots
* feat: refactored workflow card to use workflow-activator properly
* fix: fix workflow activator and proptypes
* fix: hide owner tag for workflow card until sharing is available
* fix: fixed ownedBy and sharedWith appearing for workflows list
* feat: update tags component design
* refactor: change resource filter select to n8n-user-select
* fix: made telemetry messages reusable
* chore: remove unused import
* refactor: fix component name casing
* refactor: use Vue.set to make workflow property reactive
* feat: add support for clicking on tags for filtering
* chore: fix tags linting issues
* fix: fix resources list layout when title words are very long
* refactor: add active and inactive status text to workflow activator
* fix: fix credentials and workflows sorting when name contains leading whitespace
* fix: remove wrongfully added style tag
* feat: add translations and storybook examples for truncated tags
* fix: remove enterprise sharing env from schema
* refactor: fix workflows module and workflows field store naming conflict
* feat: add workflow share button and open dummy modal
* feat: add workflow sharing modal (in progress)
* feat: add message when sharing disabled
* feat: add sharing messages based on flags
* feat: add workflow sharing api integration and readonly state handling
* fix: change how foreign credentials are handled
* refactor: migrate newly added workflow sharing store methods to pinia
* fix: update foreign credentials handler and add executable prop to node-settings
* fix: fix credentials display issue caused by addCredentials override
* fix: fix various issues when sharing from empty state
* fix: update node duplication credentials
* fix: revert defautl values for sharing env
* feat: hide share button behind feature flag
* chore: add env variable for sharing feature (testing only)
* fix: change enterprise-edition component casing
* 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
* ✨ Passing an execution mode to the preview iframe so UI can be adjusted based on it
* ✨ Handling production execution mode to hide the pin data in node details view
* fix: Fix inferred type of X cannot be named error after pnpm update
* preserve symlinks for `cli`
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
* 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
* ✨ Added pinia support. Migrated community nodes module.
* ✨ Added ui pinia store, moved some data from root store to it, updated modals to work with pinia stores
* ✨ Added ui pinia store and migrated a part of the root store
* ✨ Migrated `settings` store to pinia
* ✨ Removing vuex store refs from router
* ✨ Migrated `users` module to pinia store
* ⚡ Fixing errors after sync with master
* ⚡ One more error after merge
* ⚡ Created `workflows` pinia store. Moved large part of root store to it. Started updating references.
* ✨ Finished migrating workflows store to pinia
* ⚡ Renaming some getters and actions to make more sense
* ✨ Finished migrating the root store to pinia
* ✨ Migrated ndv store to pinia
* ⚡ Renaming main panel dimensions getter so it doesn't clash with data prop name
* ✔️ Fixing lint errors
* ✨ Migrated `templates` store to pinia
* ✨ Migrated the `nodeTypes`store
* ⚡ Removed unused pieces of code and oold vuex modules
* ✨ Adding vuex calls to pinia store, fixing wrong references
* 💄 Removing leftover $store refs
* ⚡ Added legacy getters and mutations to store to support webhooks
* ⚡ Added missing front-end hooks, updated vuex state subscriptions to pinia
* ✔️ Fixing linting errors
* ⚡ Removing vue composition api plugin
* ⚡ Fixing main sidebar state when loading node view
* 🐛 Fixing an error when activating workflows
* 🐛 Fixing isses with workflow settings and executions auto-refresh
* 🐛 Removing duplicate listeners which cause import error
* 🐛 Fixing route authentication
* ⚡ Updating freshly pulled $store refs
* ⚡ Adding deleted const
* ⚡ Updating store references in ee features. Reseting NodeView credentials update flag when resetting workspace
* ⚡ Adding return type to email submission modal
* ⚡ Making NodeView only react to paste event when active
* 🐛 Fixing signup view errors
* ✨ Started migrating the `credentials` module to pinia
* 👌 Addressing PR review comments
* ✨ Migrated permissions module to pinia
* ✨ Migrated `nodeCreator`, `tags` and `versions` modules to pinia
* ✨ Implemented webhooks pinia store
* ⚡ Removing all leftover vuex files and references
* ✨ Removing final vuex refs
* ⚡ Updating expected credentialId type
* ⚡ Removing node credentials subscription code, reducing node click debounce timeout
* 🐛 Fixing pushing nodes downstream when inserting new node
* ✔️ Fixing a lint error in new type guard
* ⚡ Updating helper reference
* ✔️ Removing unnecessary awaits
* ⚡ fix(editor): remove unnecessary imports from NDV
* ⚡ Merging mapStores blocks in NodeView
* ⚡ fix(editor): make sure JS Plumb not loaded earlier than needed
* ⚡ Updating type guard nad credentials subscriptions
* ⚡ Updating type guard so it doesn't use `any` type
Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
* ⚡ Abstract into `getMany()`
* ⚡ Use `getMany()` from free controller
* ⚡ Use `getMany()` from paid controller
* 🧪 Add tests
* 🧪 Fix tests
* ⚡ Add credential usage info
* 🧪 Update tests
* ⚡ Add type and adjust test
* 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
* 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
* fix(editor): update `vue-json-pretty` package
* fix(editor): JSON view show string numbers and null properly
* fix(editor): testing if RunDataJson.vue display the values according to its type
* chore(editor): resolve package-lock.json conflict
* fix(editor): using @pinia/testing library to mock pinia store
* chore: fix package-lock.json after merge conflicts
* 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
* ✨ Added pinia support. Migrated community nodes module.
* ✨ Added ui pinia store, moved some data from root store to it, updated modals to work with pinia stores
* ✨ Added ui pinia store and migrated a part of the root store
* ✨ Migrated `settings` store to pinia
* ✨ Removing vuex store refs from router
* ✨ Migrated `users` module to pinia store
* ⚡ Fixing errors after sync with master
* ⚡ One more error after merge
* ⚡ Created `workflows` pinia store. Moved large part of root store to it. Started updating references.
* ✨ Finished migrating workflows store to pinia
* ⚡ Renaming some getters and actions to make more sense
* ✨ Finished migrating the root store to pinia
* ✨ Migrated ndv store to pinia
* ⚡ Renaming main panel dimensions getter so it doesn't clash with data prop name
* ✔️ Fixing lint errors
* ✨ Migrated `templates` store to pinia
* ✨ Migrated the `nodeTypes`store
* ⚡ Removed unused pieces of code and oold vuex modules
* ✨ Adding vuex calls to pinia store, fi xing wrong references
* 💄 Removing leftover $store refs
* ⚡ Added legacy getters and mutations to store to support webhooks
* ⚡ Added missing front-end hooks, updated vuex state subscriptions to pinia
* ✔️ Fixing linting errors
* ⚡ Removing vue composition api plugin
* ⚡ Fixing main sidebar state when loading node view
* 🐛 Fixing an error when activating workflows
* 🐛 Fixing isses with workflow settings and executions auto-refresh
* 🐛 Removing duplicate listeners which cause import error
* 🐛 Fixing route authentication
* ⚡ Updating freshly pulled $store refs
* Adding deleted const
* ⚡ Updating store references in ee features. Reseting NodeView credentials update flag when resetting workspace
* ⚡ Adding return type to email submission modal
* ⚡ Making NodeView only react to paste event when active
* 🐛 Fixing signup view errors
* 👌 Addressing PR review comments
* 👌 Addressing new PR comments
* 👌 Updating invite id logic in signup view
fix(editor): fix dark mode for the monaco editor (no-changelog)
just the default light and dark themes that are shipped with the editor
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
* refactor(editor): restrict mapping discoverability tooltip showing only on string input
* refactor(editor): renaming computed prop because not only string inputs can be mapped, but we want to show tooltips only on string inputs
* fix(editor): removing unused prop from ParameterInputWrapper.vue
* fix(editor): reorganizing and updating props in ParameterInputFull.vue
* fix(editor): proper typings for node related translations
* fix(editor): fix typings for input localisation functions
* fix(editor): simplifying localisation functions
* Revert "fix(editor): simplifying localisation functions"
This reverts commit 3d93ccf0cf.
* fix(editor): move nullish coalescing into called function
* 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>
* fix(editor): limiting columns in table view
* fix(editor): adding ghost table column with tooltip to table view
* fix(editor): limit columns to 40
* fix(editor): show table columns if it doesn't exceed the limit
* fix(editor): rolling back globalLinkActions changes
* fix(editor): using i18n tag for having cleaner event handling
* fix(editor): emphasizing magic variable
* fix(editor): removing unused prop
* fix(editor): fix node creator search when there's active subcategory
* 🎨 Add intersection util and replace lodash one with it
* 🎨 Remove unused imports
* feature: block UI in NDV when workflow is listening to events
* feature: hide stop listening button in parameters pane and show stop listening button in input pane for webhook
* feature: create block UI design system component
* fix: add back accidentally removed prop
* fix(editor): extend node settings event listener button functionality
* refactor(editor): using composition API in BlockUi component
* 📘 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
* 📘 Update request type
* 📘 Update FE types
* ⚡ Adjust store
* ⚡ Set received hash
* ⚡ Send and load hash
* ⚡ Make helper more flexible
* 🗃️ Add new field to entity
* 🚨 Add check to endpoint
* 🧪 Add tests
* ⚡ Add `forceSave` flag
* 🐛 Fix workflow update failing on new workflow
* 🧪 Add more tests
* ⚡ Move check to `updateWorkflow()`
* ⚡ Refactor to accommodate latest changes
* 🧪 Refactor tests to keep them passing
* ⚡ Improve syntax
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.
The cookie and the JWT refresh is already handled in `refreshExpiringCookie` middleware, which only updates the cookie 3 days before the expiration.
The middleware also uses `issueCookie`, which ensures that attributes like `sameSite` and `httpOnly` are correctly set on the cookie.
* feat(editor): Setup dark-mode for the code-editor, with automatic switching
By default this feature is disabled. The feature can be toggled with `document.body.classList.toggle('dark-mode-beta')`
* change the beta class name
* switch codemirror theme over to css variables
* typeorm queries with AND for filter, schema validation
* validate filters
* replace json.parse with jsonParse()
* limited fields further
* limited workflow fields further
* removes date filter fields and fix waitTill filter
* simplified filter name arrays
* ✨ Added main header tabs with current workflow execution count
* ⚡ feat(editor): header tab navigation (no-changelog) (#4244)
* ✨ Adding current workflow execution list to the Vuex store
* ✨ Updating current workflow executions after running a workflow from the node view
* ✨ Keeping the tab view content alive when switching tabs in main header
* ✨ Updating main header controls to work with current workflow regardless of active tab
* 🐛 Fixing a bug with previous WF executions still visible after creating a new WF
* ⚡ Updating saved status when new WF is created
* ✨ Implemented initial version of execution perview
* ✨ Keeping the WF view alive when switching to executions tab in new navigation
* ✨ Implemented executions landing page
* ✨ Simplifying node view navigation
* ✨ Updating executions view zoom and selection to work with the new layout
* ✨ Using N8nRadioButtons component for main header tabs
* 💄 Implementing executions page states. Minor refactoring.
* ⚡ Merge conflict fixes and pieces of code that were left behind
* ⚡ Fixing layout and scrolling changes introduced after sync with master branch
* ⚡ Removing keep-alive from node view which broke template opening and some more leftover code
* ✔️ Fixing linting errors
* ✔️ One more lint error
* ⚡ Implemented executions preview using iframes
* ⚡ Fixing zoom menu positioning in iframe and adding different loading types to workflow preview
* ⚡ Fixing navigation to and from WF templates and template loading
* ⚡ Updating and fixing navigation to and from node view
* 👌 Addressing previous PR comments
* 🐛 Fixing infinite loading when saving a new workflow
* 🐛 Handling opening already opened WF when not on Node view
* ✨ Implemented empty states for executions view
* ⚡ Adding execute button shake flag to the store so it doesn't mess up navigation by modifying route params
* 💄 Started adding new styles to execution sidebar
* 💄 Adding hover style for execution list
* ⚡ Added ExecutionsCard component and added executions helper mixin
* ✔️ Fixing leftover conflict
* ✔️ One more conflict
* ✨ Implemented retry execution menu and manual execution icon. Other minor updates
* ✨ Implemented executions filtering
* 💄 Updating running executions details in preview
* ⚡ Added info accordion to executions sidebar
* ✨ Implemented auto-refresh for executions sidebar
* 💄 Adding running execution landing page, minor fixes
* 💄 General refactoring
* ✔️ Adding leftover conflict changes
* ✔️ Updating `InfoTip` component test snapshots
* ✔️ Fixing linting error
* ✔️ Fixing lint errors in vuex store module
* 👌 Started addressing review feedback
* ⚡ Updating executions preview behaviour when filters are applied
* 🐛 Fixing a bug where nodes and connections disappear if something is saved from executions view before loading WF in the main NodeView
* 🐛 Fixing pasting in executions view and wrong workflow activator state
* ⚡ Improved workflow switching and navigation, updated error message when trying to paste into execution
* ⚡ Some more navigation updates
* 💄 Fixing tab centering, execution filter button layout, added auto-refresh checkbox
* 🐛 Fixing a bug when saving workflow using save button
* 💄 Addressing design feedback, added delete execution button
* ⚡ Moving main execution logic to the root executions view
* ⚡ Implemented execution delete function
* ⚡ Updating how switching tabs for new unsaved workflows work
* ⚡ Remembering active execution when switching tabs
* 💄 Addressing design feedback regarding info accordion
* 💄 Updating execution card styling
* ⚡ Resetting executions when creating new workflow
* Fixing lint error
* ⚡ Hiding executions preview is active execution is not in the results. Updated execution list spacing
* ⚡ Fixing navigation to and from templates and executions
* ⚡ Implemented execution lazy loading and added new background to execution preview
* 💄 Disabling import when on executions tab
* ⚡ Handling opening executions from different workflow
* ⚡ Updating active execution on route change
* ⚡ Updating execution tab detection
* ⚡ Simplifying and updating navigation. Adding new route for new workflows
* ⚡ Updating workflow saving logic to work with new routes
* 🐛 Fixing a bug when returning to executions from different workflow
* 💄 Updating executions info accordion and node details view modal in execution preview
* 💄 Updating workflow activated modal to point to new executions view
* ⚡ Implemented opening new executions view from execution modal
* ⚡ Handling jsplumb init errors, updating unknown executions style
* ⚡ Updating main sidebar after syncing branch
* ⚡ Opening new trigger menu from executions view
* 💄 Updating sidebar resize behaviour
* ✔️ Fixing lint errors
* ⚡ Loading executions when mounting executions view
* ⚡ Resetting execution data when creating a new workflow
* 💄 Minor wording updates
* ⚡ Not reloading node view when new workflows are saved
* Removing leftover console log
* 🐛 Fixed a bug with save dialog not appearing when leaving executions tab
* ⚡ Updating manual execution settings detection in info accordion
* 💄 Addressing UI issues found during bug bash
* Fixing workflow saving logic
* ⚡ Preventing navigation if clicked tab is already opened
* ⚡ Updating lazy loading behaviour
* ⚡ Updating delete executions flow
* ⚡ Added retry executions button to the execution preview
* ⚡ Adding empty execution state, updating trigger detection logic, removing listeners when node view is not active
* 💄 Cosmetic code improvements
* ⚡ Trying the performance fix for nodeBase
* ⚡ Removing the `NodeBase`fix
* 🐛 Fixing a bug when saving the current workflow
* 👌 Addressing code review feedback
* 📦 Update `package-lock.json`
* 📦 Make versions consistent in design-system
* 📦 Make lib versions consistent in editor-ui
* 🔧 Make vite configs consistent
* fix(design-system): updating vue2-bring-avatars alias
Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
* ⚡ Add `updatedAt` to store
* ⚡ Set `updatedAt` in store
* 👕 Update FE types
* 👕 Update BE types
* ⚡ Set `updatedAt` on workflow open
* ⚡ Add endpoint check
* ⚡ Add first update check
* 🔥 Remove log
* ⚡ Simplify check
* ⚡ Make `makeWorkflow` more flexible
* 🗃️ Make `updatedAt` default consistent
* 🧪 Adjust tests checking for `updatedAt`
* 🧪 Add tests for interim changes block
* ✏️ Remove unneeded quotes
* ⏪ Simplify without using `-1`
* 👕 Simplify interfaces
* 🐛 Fix calls to `setWorkflowUpdatedAt` setter
* :track: Move update to API call
* ⚡ Restrict check to multiple users only
* 🧪 Add more tests
* 🐛 Account for activation outside of canvas
* ✏️ Add warning comment
* 🔥 Remove unneeded check
* ⏪ Revert to `new Date()` for `-1`
* 🐛 Fix display for never updated