Skip to content

Commit df63bac

Browse files
committed
feat: add is_success field to cli_install_stats schema and update snapshots
Added a required `is_success` field to the `cli_install_stats` schema for enhanced tracking. Updated related snapshots, presets, migrations, and interfaces to reflect the changes. Adjusted display options and layouts for improved usability.
1 parent 4af253c commit df63bac

File tree

8 files changed

+786
-702
lines changed

8 files changed

+786
-702
lines changed

extensions/tsed-rest/src/schema/CliStatPayload.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ export const CliStatPayload = s.object({
88
runtime: s.string().required(),
99
features: s.array(s.string()),
1010
channel: s.string().enum("cli", "mcp").required(),
11-
cli_version: s.string().required()
11+
cli_version: s.string().required(),
12+
is_success: s.boolean().required()
1213
});

migrations/data/directus_flows.json

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
11
[
2+
{
3+
"id": "569895a0-7a65-4cb2-94aa-67f77a776a08",
4+
"name": "Manual import package symbols",
5+
"icon": "bolt",
6+
"color": null,
7+
"description": null,
8+
"status": "active",
9+
"trigger": "manual",
10+
"accountability": "all",
11+
"options": {
12+
"collections": [
13+
"package_symbols"
14+
],
15+
"requireSelection": false,
16+
"location": "collection",
17+
"requireConfirmation": true,
18+
"async": true
19+
},
20+
"operation": "c651e60f-159c-4b4d-b636-c9d50debe3de",
21+
"date_created": "2025-11-15T10:33:07.296Z",
22+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
23+
},
24+
{
25+
"id": "9039bef8-fdc3-4f31-b5ab-7fee31273921",
26+
"name": "Trigger update package symbols",
27+
"icon": "bolt",
28+
"color": null,
29+
"description": null,
30+
"status": "active",
31+
"trigger": "webhook",
32+
"accountability": "all",
33+
"options": {
34+
"async": true,
35+
"method": "POST"
36+
},
37+
"operation": "a2391589-d955-4677-9ff5-1bb846cebf98",
38+
"date_created": "2025-11-15T11:49:36.406Z",
39+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
40+
},
241
{
342
"id": "957ee0d3-bee3-49f0-80cd-1d1900e729a4",
443
"name": "Cron Update repositories meta",
@@ -9,7 +48,7 @@
948
"trigger": "schedule",
1049
"accountability": "all",
1150
"options": {
12-
"cron": "0 */12 * * *"
51+
"cron": "0 * * * *"
1352
},
1453
"operation": "5269d4ba-cbf3-4c96-a431-1b3de86fa8b4",
1554
"date_created": "2025-11-02T15:16:25.397Z",
@@ -25,7 +64,7 @@
2564
"trigger": "schedule",
2665
"accountability": "all",
2766
"options": {
28-
"cron": "0 */12 * * *"
67+
"cron": "0 * * * *"
2968
},
3069
"operation": "ba9712f8-b9a1-498a-a700-646df728efc4",
3170
"date_created": "2025-11-02T18:51:01.328Z",
@@ -127,49 +166,10 @@
127166
"trigger": "schedule",
128167
"accountability": "all",
129168
"options": {
130-
"cron": "0 0 * * *"
169+
"cron": "0 * * * *"
131170
},
132171
"operation": "70f217d9-bcef-4637-aee3-083f5e60f82a",
133172
"date_created": "2025-11-03T08:34:33.531Z",
134173
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
135-
},
136-
{
137-
"id": "569895a0-7a65-4cb2-94aa-67f77a776a08",
138-
"name": "Manual import package symbols",
139-
"icon": "bolt",
140-
"color": null,
141-
"description": null,
142-
"status": "active",
143-
"trigger": "manual",
144-
"accountability": "all",
145-
"options": {
146-
"collections": [
147-
"package_symbols"
148-
],
149-
"requireSelection": false,
150-
"location": "collection",
151-
"requireConfirmation": true,
152-
"async": true
153-
},
154-
"operation": "c651e60f-159c-4b4d-b636-c9d50debe3de",
155-
"date_created": "2025-11-15T10:33:07.296Z",
156-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
157-
},
158-
{
159-
"id": "9039bef8-fdc3-4f31-b5ab-7fee31273921",
160-
"name": "Trigger update package symbols",
161-
"icon": "bolt",
162-
"color": null,
163-
"description": null,
164-
"status": "active",
165-
"trigger": "webhook",
166-
"accountability": "all",
167-
"options": {
168-
"async": true,
169-
"method": "POST"
170-
},
171-
"operation": "a2391589-d955-4677-9ff5-1bb846cebf98",
172-
"date_created": "2025-11-15T11:49:36.406Z",
173-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
174174
}
175175
]
Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,72 @@
11
[
2+
{
3+
"id": "5d15d618-9704-49cb-8e1b-872d444590c8",
4+
"name": "Ts.ED Sponsors (GitHub & OpenCollective)",
5+
"key": "tsed_flow_sponsors_q6l9r",
6+
"type": "tsed-flow-sponsors",
7+
"position_x": 19,
8+
"position_y": 1,
9+
"options": {
10+
"githubUser": "romakita",
11+
"openCollectiveSlug": "tsed"
12+
},
13+
"resolve": null,
14+
"reject": null,
15+
"flow": "18a74e0c-d808-496c-8285-044f520efeef",
16+
"date_created": "2025-11-03T08:34:01.095Z",
17+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
18+
},
19+
{
20+
"id": "70f217d9-bcef-4637-aee3-083f5e60f82a",
21+
"name": "Ts.ED Sponsors (GitHub & OpenCollective)",
22+
"key": "tsed_flow_sponsors_flqhx",
23+
"type": "tsed-flow-sponsors",
24+
"position_x": 19,
25+
"position_y": 1,
26+
"options": {
27+
"githubUser": "romakita",
28+
"openCollectiveSlug": "tsed"
29+
},
30+
"resolve": null,
31+
"reject": null,
32+
"flow": "30be3802-3c63-41a3-9469-6aa5c48c58d6",
33+
"date_created": "2025-11-03T08:35:08.005Z",
34+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
35+
},
36+
{
37+
"id": "c651e60f-159c-4b4d-b636-c9d50debe3de",
38+
"name": "Ts.ED Package Symbols importer",
39+
"key": "tsed_flow_package_symbols_k8436",
40+
"type": "tsed-flow-package-symbols",
41+
"position_x": 19,
42+
"position_y": 1,
43+
"options": {
44+
"url": "https://tsed.dev/api.json",
45+
"markdown_url": "https://tsed.dev/ai/references/api"
46+
},
47+
"resolve": null,
48+
"reject": null,
49+
"flow": "569895a0-7a65-4cb2-94aa-67f77a776a08",
50+
"date_created": "2025-11-15T10:35:32.381Z",
51+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
52+
},
53+
{
54+
"id": "a2391589-d955-4677-9ff5-1bb846cebf98",
55+
"name": "Ts.ED Package Symbols importer",
56+
"key": "tsed_flow_package_symbols_uvxzc",
57+
"type": "tsed-flow-package-symbols",
58+
"position_x": 19,
59+
"position_y": 1,
60+
"options": {
61+
"url": "https://tsed.dev/api.json",
62+
"markdown_url": "https://tsed.dev/ai/references/api"
63+
},
64+
"resolve": null,
65+
"reject": null,
66+
"flow": "9039bef8-fdc3-4f31-b5ab-7fee31273921",
67+
"date_created": "2025-11-15T11:49:52.495Z",
68+
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
69+
},
270
{
371
"id": "5269d4ba-cbf3-4c96-a431-1b3de86fa8b4",
472
"name": "Ts.ED Repositories refresh",
@@ -72,73 +140,5 @@
72140
"flow": "d7a45da6-5f2a-47de-b977-1c2ec13326ae",
73141
"date_created": "2025-11-02T18:52:15.279Z",
74142
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
75-
},
76-
{
77-
"id": "5d15d618-9704-49cb-8e1b-872d444590c8",
78-
"name": "Ts.ED Sponsors (GitHub & OpenCollective)",
79-
"key": "tsed_flow_sponsors_q6l9r",
80-
"type": "tsed-flow-sponsors",
81-
"position_x": 19,
82-
"position_y": 1,
83-
"options": {
84-
"githubUser": "romakita",
85-
"openCollectiveSlug": "tsed"
86-
},
87-
"resolve": null,
88-
"reject": null,
89-
"flow": "18a74e0c-d808-496c-8285-044f520efeef",
90-
"date_created": "2025-11-03T08:34:01.095Z",
91-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
92-
},
93-
{
94-
"id": "70f217d9-bcef-4637-aee3-083f5e60f82a",
95-
"name": "Ts.ED Sponsors (GitHub & OpenCollective)",
96-
"key": "tsed_flow_sponsors_flqhx",
97-
"type": "tsed-flow-sponsors",
98-
"position_x": 19,
99-
"position_y": 1,
100-
"options": {
101-
"githubUser": "romakita",
102-
"openCollectiveSlug": "tsed"
103-
},
104-
"resolve": null,
105-
"reject": null,
106-
"flow": "30be3802-3c63-41a3-9469-6aa5c48c58d6",
107-
"date_created": "2025-11-03T08:35:08.005Z",
108-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
109-
},
110-
{
111-
"id": "c651e60f-159c-4b4d-b636-c9d50debe3de",
112-
"name": "Ts.ED Package Symbols importer",
113-
"key": "tsed_flow_package_symbols_k8436",
114-
"type": "tsed-flow-package-symbols",
115-
"position_x": 19,
116-
"position_y": 1,
117-
"options": {
118-
"url": "https://tsed.dev/api.json",
119-
"markdown_url": "https://tsed.dev/ai/references/api"
120-
},
121-
"resolve": null,
122-
"reject": null,
123-
"flow": "569895a0-7a65-4cb2-94aa-67f77a776a08",
124-
"date_created": "2025-11-15T10:35:32.381Z",
125-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
126-
},
127-
{
128-
"id": "a2391589-d955-4677-9ff5-1bb846cebf98",
129-
"name": "Ts.ED Package Symbols importer",
130-
"key": "tsed_flow_package_symbols_uvxzc",
131-
"type": "tsed-flow-package-symbols",
132-
"position_x": 19,
133-
"position_y": 1,
134-
"options": {
135-
"url": "https://tsed.dev/api.json",
136-
"markdown_url": "https://tsed.dev/ai/references/api"
137-
},
138-
"resolve": null,
139-
"reject": null,
140-
"flow": "9039bef8-fdc3-4f31-b5ab-7fee31273921",
141-
"date_created": "2025-11-15T11:49:52.495Z",
142-
"user_created": "dc515c74-5ed5-4464-b522-6ea1f2f6d270"
143143
}
144144
]

migrations/data/directus_presets.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,53 @@
187187
"color": null,
188188
"uuid": "5990ceea-5ce1-451f-a119-248de002975b"
189189
},
190+
{
191+
"id": 34,
192+
"bookmark": null,
193+
"user": null,
194+
"role": null,
195+
"collection": "cli_install_stats",
196+
"search": null,
197+
"layout": "tabular",
198+
"layout_query": {
199+
"tabular": {
200+
"page": 1,
201+
"fields": [
202+
"is_success",
203+
"channel",
204+
"cli_version",
205+
"tsed_version",
206+
"platform",
207+
"convention",
208+
"runtime",
209+
"package_manager",
210+
"features",
211+
"date_created"
212+
]
213+
}
214+
},
215+
"layout_options": {
216+
"tabular": {
217+
"widths": {
218+
"is_success": 40.5,
219+
"channel": 160,
220+
"cli_version": 160,
221+
"tsed_version": 160,
222+
"platform": 160,
223+
"convention": 160,
224+
"runtime": 160,
225+
"package_manager": 160,
226+
"features": 160,
227+
"date_created": 160
228+
}
229+
}
230+
},
231+
"refresh_interval": null,
232+
"filter": null,
233+
"icon": "bookmark",
234+
"color": null,
235+
"uuid": "c89393c2-a81d-4579-a0ab-3bd0ef908583"
236+
},
190237
{
191238
"id": 32,
192239
"bookmark": null,

packages/infra/bootstrap/directus.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export function wrapEndpoint(callback: (router: Router, context: EndpointExtensi
7272
try {
7373
return await handler(req, res);
7474
} catch (error: any) {
75-
res.status(error.status || 500).send(error.message || "Internal Server Error");
75+
res.status(error.status || 500).json({
76+
message: error.error_message || error.message || "Internal Server Error",
77+
errors: error.errors
78+
});
7679

7780
$ctx.logger.error({
7881
error_name: error.name,

0 commit comments

Comments
 (0)