@stacksjs/defaults 0.72.25 → 0.72.27
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/app/Actions/Dashboard/Ci/failure-notifier.ts +1 -1
- package/app/Actions/Dashboard/Ci/runner-pressure-monitor.ts +3 -3
- package/app/Actions/Dashboard/Kanban/BoardShowAction.ts +4 -4
- package/app/Actions/Dashboard/Kanban/BoardsIndexAction.ts +1 -1
- package/app/Actions/Dashboard/Kanban/CardShowAction.ts +1 -1
- package/app/Controllers/QueryController.ts +16 -1
- package/ide/vscode/package.json +1 -1
- package/package.json +2 -2
|
@@ -36,7 +36,7 @@ interface CiRunStateRow {
|
|
|
36
36
|
async function loadPreviousStates(): Promise<Map<string, PreviousRunState>> {
|
|
37
37
|
const rows = await db.unsafe(
|
|
38
38
|
'SELECT repo_full_name, last_conclusion, last_run_id, last_notified_at FROM ci_run_states',
|
|
39
|
-
).execute() as CiRunStateRow[]
|
|
39
|
+
).execute() as unknown as CiRunStateRow[]
|
|
40
40
|
|
|
41
41
|
const map = new Map<string, PreviousRunState>()
|
|
42
42
|
for (const r of rows ?? []) {
|
|
@@ -72,7 +72,7 @@ async function loadWindowSamples(windowMinutes: number, nowMs: number): Promise<
|
|
|
72
72
|
const rows = await db.unsafe(
|
|
73
73
|
'SELECT org, running, queued, cap, sampled_at FROM ci_runner_samples WHERE sampled_at >= ? ORDER BY sampled_at ASC',
|
|
74
74
|
[cutoffIso],
|
|
75
|
-
).execute() as SampleRow[]
|
|
75
|
+
).execute() as unknown as SampleRow[]
|
|
76
76
|
|
|
77
77
|
return (rows ?? []).map((r): RunnerSample => ({
|
|
78
78
|
org: r.org,
|
|
@@ -86,7 +86,7 @@ async function loadWindowSamples(windowMinutes: number, nowMs: number): Promise<
|
|
|
86
86
|
async function loadAlertStates(): Promise<Map<string, RunnerAlertState>> {
|
|
87
87
|
const rows = await db.unsafe(
|
|
88
88
|
'SELECT org, alerting, last_alerted_at, last_cleared_at FROM ci_runner_alert_states',
|
|
89
|
-
).execute() as AlertStateRow[]
|
|
89
|
+
).execute() as unknown as AlertStateRow[]
|
|
90
90
|
|
|
91
91
|
const map = new Map<string, RunnerAlertState>()
|
|
92
92
|
for (const r of rows ?? []) {
|
|
@@ -248,7 +248,7 @@ export async function fetchRunnerHistory(
|
|
|
248
248
|
ORDER BY sampled_at DESC
|
|
249
249
|
LIMIT ?`,
|
|
250
250
|
[org, cutoffIso, limit],
|
|
251
|
-
).execute() as SampleRow[]
|
|
251
|
+
).execute() as unknown as SampleRow[]
|
|
252
252
|
|
|
253
253
|
return (rows ?? []).reverse().map((r): RunnerSample => ({
|
|
254
254
|
org: r.org,
|
|
@@ -86,7 +86,7 @@ export default new Action({
|
|
|
86
86
|
const boards = await db.unsafe(
|
|
87
87
|
'SELECT * FROM boards WHERE id = ? LIMIT 1',
|
|
88
88
|
[id],
|
|
89
|
-
).execute() as BoardRow[]
|
|
89
|
+
).execute() as unknown as BoardRow[]
|
|
90
90
|
const board = boards[0]
|
|
91
91
|
if (!board) {
|
|
92
92
|
return kanbanError('Board not found', 404)
|
|
@@ -96,15 +96,15 @@ export default new Action({
|
|
|
96
96
|
db.unsafe(
|
|
97
97
|
'SELECT * FROM board_columns WHERE board_id = ? ORDER BY position ASC, id ASC',
|
|
98
98
|
[id],
|
|
99
|
-
).execute() as Promise<ColumnRow[]>,
|
|
99
|
+
).execute() as unknown as Promise<ColumnRow[]>,
|
|
100
100
|
db.unsafe(
|
|
101
101
|
'SELECT * FROM cards WHERE board_id = ? AND archived = false ORDER BY column_id ASC, position ASC, id ASC',
|
|
102
102
|
[id],
|
|
103
|
-
).execute() as Promise<CardRow[]>,
|
|
103
|
+
).execute() as unknown as Promise<CardRow[]>,
|
|
104
104
|
db.unsafe(
|
|
105
105
|
'SELECT id, board_id, name, color FROM labels WHERE board_id = ? ORDER BY name ASC',
|
|
106
106
|
[id],
|
|
107
|
-
).execute() as Promise<LabelRow[]>,
|
|
107
|
+
).execute() as unknown as Promise<LabelRow[]>,
|
|
108
108
|
])
|
|
109
109
|
|
|
110
110
|
// Pivot lookups for label + assignee chips on card previews.
|
|
@@ -50,7 +50,7 @@ export default new Action({
|
|
|
50
50
|
const cardRows = await db.unsafe(
|
|
51
51
|
'SELECT * FROM cards WHERE id = ? LIMIT 1',
|
|
52
52
|
[id],
|
|
53
|
-
).execute() as CardRow[]
|
|
53
|
+
).execute() as unknown as CardRow[]
|
|
54
54
|
const card = cardRows?.[0]
|
|
55
55
|
if (!card) {
|
|
56
56
|
return kanbanError('Card not found', 404)
|
|
@@ -362,7 +362,22 @@ export default class QueryController extends Controller {
|
|
|
362
362
|
* asserted: `count` really can be a string, a number or a bigint
|
|
363
363
|
* depending on the driver, which is why the return type says so.
|
|
364
364
|
*/
|
|
365
|
-
|
|
365
|
+
/*
|
|
366
|
+
* Annotated rather than inferred.
|
|
367
|
+
*
|
|
368
|
+
* `results` comes back from an aggregate select, whose rows are named by
|
|
369
|
+
* their aliases rather than by the table, so each row is
|
|
370
|
+
* `Record<string, unknown>` - and the mapped literal collapses to the
|
|
371
|
+
* same thing rather than to the shape this method promises. Naming the
|
|
372
|
+
* element type is what makes the compiler check the mapping against the
|
|
373
|
+
* signature instead of widening past it.
|
|
374
|
+
*/
|
|
375
|
+
return results.map((row): {
|
|
376
|
+
normalized_query: string
|
|
377
|
+
count: string | number | bigint
|
|
378
|
+
avg_duration: string | number
|
|
379
|
+
max_duration: number | undefined
|
|
380
|
+
} => ({
|
|
366
381
|
normalized_query: String(row.normalized_query ?? ''),
|
|
367
382
|
count: (typeof row.count === 'number' || typeof row.count === 'bigint' ? row.count : String(row.count ?? '0')),
|
|
368
383
|
avg_duration: (typeof row.avg_duration === 'number' ? row.avg_duration : String(row.avg_duration ?? '0')),
|
package/ide/vscode/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.72.
|
|
5
|
+
"version": "0.72.27",
|
|
6
6
|
"description": "The complete managed Stacks application scaffold, including runtime defaults, AI guidance, editor metadata, and npm-backed project support files.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@iconify-json/f7": "^1.2.2",
|
|
48
48
|
"@iconify-json/hugeicons": "^1.2.27",
|
|
49
|
-
"@stacksjs/mobile": "^0.72.
|
|
49
|
+
"@stacksjs/mobile": "^0.72.27",
|
|
50
50
|
"@stacksjs/sanitizer": "^0.2.113"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|