@checkstack/catalog-frontend 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @checkstack/catalog-frontend
|
|
2
2
|
|
|
3
|
+
## 0.5.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d1a2796: Enforce stricter code quality standards and eliminate AI slop anti-patterns.
|
|
8
|
+
|
|
9
|
+
**New utility**
|
|
10
|
+
|
|
11
|
+
- `extractErrorMessage(error, fallback?)` in `@checkstack/common` for consistent error extraction
|
|
12
|
+
|
|
13
|
+
**ESLint rules**
|
|
14
|
+
|
|
15
|
+
- `react-hooks/rules-of-hooks` and `exhaustive-deps` for hook correctness
|
|
16
|
+
- `no-console` in frontend packages — forces `toast` over silent `console.error`
|
|
17
|
+
- `no-restricted-syntax` banning `instanceof Error` — forces `extractErrorMessage`
|
|
18
|
+
- Custom `no-eslint-disable-any` rule preventing `@typescript-eslint/no-explicit-any` circumvention
|
|
19
|
+
|
|
20
|
+
**Refactoring**
|
|
21
|
+
|
|
22
|
+
- Replace 141 `instanceof Error` boilerplate patterns across the codebase
|
|
23
|
+
- Replace swallowed `console.error` with user-visible `toast.error()` feedback
|
|
24
|
+
- Remove 15 redundant `as` type casts in IntegrationsPage and ProviderConnectionsPage
|
|
25
|
+
- Consolidate 3 identical callback handlers into `handleDialogClose`
|
|
26
|
+
- Fix conditional React hook call in `FormField.tsx`
|
|
27
|
+
- Fix unstable useMemo deps in `Dashboard.tsx`
|
|
28
|
+
- Replace `useEffect`→`setState` with derived `useMemo` in `RegisterPage.tsx`
|
|
29
|
+
- Rewrite `keystore.test.ts` with typed `DrizzleMockChain` (eliminating 7 `any` suppressions)
|
|
30
|
+
- Delete obvious comments in `encryption.ts` and Teams `provider.ts`
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [d1a2796]
|
|
33
|
+
- Updated dependencies [3c34b07]
|
|
34
|
+
- @checkstack/common@0.6.5
|
|
35
|
+
- @checkstack/ui@1.2.1
|
|
36
|
+
- @checkstack/auth-frontend@0.5.18
|
|
37
|
+
- @checkstack/frontend-api@0.3.9
|
|
38
|
+
- @checkstack/catalog-common@1.3.1
|
|
39
|
+
- @checkstack/auth-common@0.6.1
|
|
40
|
+
- @checkstack/notification-common@0.2.8
|
|
41
|
+
|
|
3
42
|
## 0.5.7
|
|
4
43
|
|
|
5
44
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@checkstack/catalog-frontend",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"checkstack": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@checkstack/auth-common": "0.6.0",
|
|
16
16
|
"@checkstack/auth-frontend": "0.5.17",
|
|
17
|
-
"@checkstack/catalog-common": "1.
|
|
17
|
+
"@checkstack/catalog-common": "1.3.0",
|
|
18
18
|
"@checkstack/common": "0.6.4",
|
|
19
19
|
"@checkstack/frontend-api": "0.3.8",
|
|
20
20
|
"@checkstack/notification-common": "0.2.7",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"typescript": "^5.0.0",
|
|
30
30
|
"@types/react": "^18.2.0",
|
|
31
|
-
"@checkstack/tsconfig": "0.0.
|
|
31
|
+
"@checkstack/tsconfig": "0.0.5",
|
|
32
32
|
"@checkstack/scripts": "0.1.2"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -35,6 +35,7 @@ import { SystemEditor } from "./SystemEditor";
|
|
|
35
35
|
import { GroupEditor } from "./GroupEditor";
|
|
36
36
|
import { DraggableSystem, SystemDragOverlay } from "./DraggableSystem";
|
|
37
37
|
import { DroppableGroup } from "./DroppableGroup";
|
|
38
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
38
39
|
|
|
39
40
|
export const CatalogConfigPage = () => {
|
|
40
41
|
const catalogClient = usePluginClient(CatalogApi);
|
|
@@ -118,7 +119,7 @@ export const CatalogConfigPage = () => {
|
|
|
118
119
|
},
|
|
119
120
|
onError: (error) => {
|
|
120
121
|
toast.error(
|
|
121
|
-
error
|
|
122
|
+
extractErrorMessage(error, "Failed to create system"),
|
|
122
123
|
);
|
|
123
124
|
},
|
|
124
125
|
});
|
|
@@ -132,7 +133,7 @@ export const CatalogConfigPage = () => {
|
|
|
132
133
|
},
|
|
133
134
|
onError: (error) => {
|
|
134
135
|
toast.error(
|
|
135
|
-
error
|
|
136
|
+
extractErrorMessage(error, "Failed to update system"),
|
|
136
137
|
);
|
|
137
138
|
},
|
|
138
139
|
});
|
|
@@ -145,7 +146,7 @@ export const CatalogConfigPage = () => {
|
|
|
145
146
|
},
|
|
146
147
|
onError: (error) => {
|
|
147
148
|
toast.error(
|
|
148
|
-
error
|
|
149
|
+
extractErrorMessage(error, "Failed to delete system"),
|
|
149
150
|
);
|
|
150
151
|
},
|
|
151
152
|
});
|
|
@@ -158,7 +159,7 @@ export const CatalogConfigPage = () => {
|
|
|
158
159
|
},
|
|
159
160
|
onError: (error) => {
|
|
160
161
|
toast.error(
|
|
161
|
-
error
|
|
162
|
+
extractErrorMessage(error, "Failed to create group"),
|
|
162
163
|
);
|
|
163
164
|
},
|
|
164
165
|
});
|
|
@@ -171,7 +172,7 @@ export const CatalogConfigPage = () => {
|
|
|
171
172
|
},
|
|
172
173
|
onError: (error) => {
|
|
173
174
|
toast.error(
|
|
174
|
-
error
|
|
175
|
+
extractErrorMessage(error, "Failed to delete group"),
|
|
175
176
|
);
|
|
176
177
|
},
|
|
177
178
|
});
|
|
@@ -183,7 +184,7 @@ export const CatalogConfigPage = () => {
|
|
|
183
184
|
},
|
|
184
185
|
onError: (error) => {
|
|
185
186
|
toast.error(
|
|
186
|
-
error
|
|
187
|
+
extractErrorMessage(error, "Failed to update group name"),
|
|
187
188
|
);
|
|
188
189
|
throw error;
|
|
189
190
|
},
|
|
@@ -198,9 +199,7 @@ export const CatalogConfigPage = () => {
|
|
|
198
199
|
},
|
|
199
200
|
onError: (error) => {
|
|
200
201
|
toast.error(
|
|
201
|
-
error
|
|
202
|
-
? error.message
|
|
203
|
-
: "Failed to add system to group",
|
|
202
|
+
extractErrorMessage(error, "Failed to add system to group"),
|
|
204
203
|
);
|
|
205
204
|
},
|
|
206
205
|
});
|
|
@@ -213,9 +212,7 @@ export const CatalogConfigPage = () => {
|
|
|
213
212
|
},
|
|
214
213
|
onError: (error) => {
|
|
215
214
|
toast.error(
|
|
216
|
-
error
|
|
217
|
-
? error.message
|
|
218
|
-
: "Failed to remove system from group",
|
|
215
|
+
extractErrorMessage(error, "Failed to remove system from group"),
|
|
219
216
|
);
|
|
220
217
|
},
|
|
221
218
|
});
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { CatalogApi, type SystemContact } from "@checkstack/catalog-common";
|
|
22
22
|
import { AuthApi, authAccess } from "@checkstack/auth-common";
|
|
23
23
|
import { User, Mail, Trash2, Plus } from "lucide-react";
|
|
24
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
24
25
|
|
|
25
26
|
interface ContactsEditorProps {
|
|
26
27
|
systemId: string;
|
|
@@ -79,7 +80,7 @@ export const ContactsEditor: React.FC<ContactsEditorProps> = ({ systemId }) => {
|
|
|
79
80
|
},
|
|
80
81
|
onError: (error) => {
|
|
81
82
|
toast.error(
|
|
82
|
-
error
|
|
83
|
+
extractErrorMessage(error, "Failed to add contact"),
|
|
83
84
|
);
|
|
84
85
|
},
|
|
85
86
|
});
|
|
@@ -92,7 +93,7 @@ export const ContactsEditor: React.FC<ContactsEditorProps> = ({ systemId }) => {
|
|
|
92
93
|
},
|
|
93
94
|
onError: (error) => {
|
|
94
95
|
toast.error(
|
|
95
|
-
error
|
|
96
|
+
extractErrorMessage(error, "Failed to remove contact"),
|
|
96
97
|
);
|
|
97
98
|
},
|
|
98
99
|
});
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
DialogFooter,
|
|
12
12
|
useToast,
|
|
13
13
|
} from "@checkstack/ui";
|
|
14
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
14
15
|
|
|
15
16
|
interface GroupEditorProps {
|
|
16
17
|
open: boolean;
|
|
@@ -46,7 +47,7 @@ export const GroupEditor: React.FC<GroupEditorProps> = ({
|
|
|
46
47
|
onClose();
|
|
47
48
|
} catch (error) {
|
|
48
49
|
const message =
|
|
49
|
-
error
|
|
50
|
+
extractErrorMessage(error, "Failed to save group");
|
|
50
51
|
toast.error(message);
|
|
51
52
|
} finally {
|
|
52
53
|
setLoading(false);
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
Mail,
|
|
34
34
|
User,
|
|
35
35
|
} from "lucide-react";
|
|
36
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
36
37
|
|
|
37
38
|
const CATALOG_PLUGIN_ID = "catalog";
|
|
38
39
|
|
|
@@ -88,7 +89,7 @@ export const SystemDetailPage: React.FC = () => {
|
|
|
88
89
|
},
|
|
89
90
|
onError: (error) => {
|
|
90
91
|
toast.error(
|
|
91
|
-
error
|
|
92
|
+
extractErrorMessage(error, "Failed to subscribe"),
|
|
92
93
|
);
|
|
93
94
|
},
|
|
94
95
|
});
|
|
@@ -101,7 +102,7 @@ export const SystemDetailPage: React.FC = () => {
|
|
|
101
102
|
},
|
|
102
103
|
onError: (error) => {
|
|
103
104
|
toast.error(
|
|
104
|
-
error
|
|
105
|
+
extractErrorMessage(error, "Failed to unsubscribe"),
|
|
105
106
|
);
|
|
106
107
|
},
|
|
107
108
|
});
|
|
@@ -15,6 +15,7 @@ import { TeamAccessEditor } from "@checkstack/auth-frontend";
|
|
|
15
15
|
import { ContactsEditor } from "./ContactsEditor";
|
|
16
16
|
import { ExtensionSlot } from "@checkstack/frontend-api";
|
|
17
17
|
import { SystemEditorSlot } from "@checkstack/catalog-common";
|
|
18
|
+
import { extractErrorMessage } from "@checkstack/common";
|
|
18
19
|
|
|
19
20
|
interface SystemEditorProps {
|
|
20
21
|
open: boolean;
|
|
@@ -57,7 +58,7 @@ export const SystemEditor: React.FC<SystemEditorProps> = ({
|
|
|
57
58
|
onClose();
|
|
58
59
|
} catch (error) {
|
|
59
60
|
const message =
|
|
60
|
-
error
|
|
61
|
+
extractErrorMessage(error, "Failed to save system");
|
|
61
62
|
toast.error(message);
|
|
62
63
|
} finally {
|
|
63
64
|
setLoading(false);
|