-
Notifications
You must be signed in to change notification settings - Fork 40.2k
refactor(editor): Extract users
api into rest-api-client
package (no-changelog)
#18046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(editor): Extract users
api into rest-api-client
package (no-changelog)
#18046
Conversation
BundleMonFiles added (2)
Total files change +255.73KB Groups added (2)
Final result: ✅ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic analysis
2 issues found across 38 files • Review in cubic
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
@@ -1,4 +1,4 @@ | |||
import type { IUser } from '@/Interface'; | |||
import type { IUser } from '@n8n/rest-api-client/api/users'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports a type through a deep sub-path instead of the package’s public entry point, creating an unnecessary tight coupling to internal file structure and risking breakage if the module layout changes.
Prompt for AI agents
Address the following comment on packages/frontend/editor-ui/src/api/workflow-webhooks.ts at line 1:
<comment>Imports a type through a deep sub-path instead of the package’s public entry point, creating an unnecessary tight coupling to internal file structure and risking breakage if the module layout changes.</comment>
<file context>
@@ -1,4 +1,4 @@
-import type { IUser } from '@/Interface';
+import type { IUser } from '@n8n/rest-api-client/api/users';
import { post } from '@n8n/rest-api-client';
</file context>
import type { IUser } from '@n8n/rest-api-client/api/users'; | |
import type { IUser } from '@n8n/rest-api-client'; |
@@ -83,7 +83,8 @@ import { | |||
} from '@/constants'; | |||
import { useToast } from '@/composables/useToast'; | |||
import Modal from '@/components/Modal.vue'; | |||
import type { IFormInputs, IPersonalizationLatestVersion } from '@/Interface'; | |||
import type { IFormInputs } from '@/Interface'; | |||
import type { IPersonalizationLatestVersion } from '@n8n/rest-api-client/api/users'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rule violated: Prefer Typeguards over Type casting
Type assertion with as IPersonalizationLatestVersion
is used for type narrowing, which is not allowed by the rule. Use a type guard function or type annotation instead.
Prompt for AI agents
Address the following comment on packages/frontend/editor-ui/src/components/PersonalizationModal.vue at line 87:
<comment>Type assertion with `as IPersonalizationLatestVersion` is used for type narrowing, which is not allowed by the rule. Use a type guard function or type annotation instead.</comment>
<file context>
@@ -83,7 +83,8 @@ import {
} from '@/constants';
import { useToast } from '@/composables/useToast';
import Modal from '@/components/Modal.vue';
-import type { IFormInputs, IPersonalizationLatestVersion } from '@/Interface';
+import type { IFormInputs } from '@/Interface';
+import type { IPersonalizationLatestVersion } from '@n8n/rest-api-client/api/users';
import { useRootStore } from '@n8n/stores/useRootStore';
import { useUsersStore } from '@/stores/users.store';
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the bot comment about sub-path import is valid
Imports a type through a deep sub-path instead of the package’s public entry point, creating an unnecessary tight coupling to internal file structure and risking breakage if the module layout changes.
But not the topic for this specific PR
E2E Tests: n8n tests passed after 4m 33.2s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
Got released with |
Summary
Extract
users
api into rest-api-client package.Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CAT-929/move-users-api-to-n8nrest-api-client-package
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)