From 4827d3b939e7fe46ccd22aa69e3edf3c9d23c3a3 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 13 Jul 2026 16:04:43 +0000 Subject: [PATCH 1/2] chore(deps): bump @photon-ai/dashboard-api to 1.6.11 Co-authored-by: citron --- bun.lock | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bun.lock b/bun.lock index 748dba3..3fec805 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "dashboard-cli", @@ -15,7 +16,7 @@ "update-notifier": "^7.3.1", }, "devDependencies": { - "@photon-ai/dashboard-api": "1.2.0", + "@photon-ai/dashboard-api": "1.6.11", "@types/bun": "latest", "@types/node": "^25.6.2", "@types/update-notifier": "^6.0.8", @@ -49,7 +50,7 @@ "@noble/hashes": ["@noble/hashes@2.2.0", "", {}, "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg=="], - "@photon-ai/dashboard-api": ["@photon-ai/dashboard-api@1.2.0", "", { "peerDependencies": { "@elysiajs/eden": "^1.4.9", "elysia": "^1.4.28" } }, "sha512-ZQ4OVaGQMFVMa2/bL2OfRxMaQDABwi+tHUFQHmQOH39N7pCXC6vQ8m32+Its2FxQ5VwU+dyvqmyv0ccxCmK8hw=="], + "@photon-ai/dashboard-api": ["@photon-ai/dashboard-api@1.6.11", "", { "peerDependencies": { "@elysiajs/eden": "^1.4.9", "elysia": "^1.4.28" } }, "sha512-UsIYz420D9JvEdAT5yH8CjF5YIg8S4AeVYm6XqnB8zPJUihk4sSjjtXV1aIoiYBd8Ly6yM52/+4iEWhgvwgP9A=="], "@pnpm/config.env-replace": ["@pnpm/config.env-replace@1.1.0", "", {}, "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w=="], diff --git a/package.json b/package.json index afb9a76..c420b38 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "prepublishOnly": "bun run typecheck && bun run build" }, "devDependencies": { - "@photon-ai/dashboard-api": "1.2.0", + "@photon-ai/dashboard-api": "1.6.11", "@types/bun": "latest", "@types/node": "^25.6.2", "@types/update-notifier": "^6.0.8", From 80e2114adda3cc005dd8c943d7f0b071362b7505 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 13 Jul 2026 16:04:50 +0000 Subject: [PATCH 2/2] fix(commands): restore typed `list` for projects/spectrum users The 1.6.x @photon-ai/dashboard-api bundle types every response body as Record (index-signature only), so `data.map((p) => ...)` loses parameter inference and trips TS7006. Cast at the API boundary in projects list and spectrum users list, matching the local-DTO pattern already used in `src/commands/spectrum/lines.ts`. Co-authored-by: citron --- src/commands/projects.ts | 11 ++++++++++- src/commands/spectrum/users.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/commands/projects.ts b/src/commands/projects.ts index 0722690..446174f 100644 --- a/src/commands/projects.ts +++ b/src/commands/projects.ts @@ -65,7 +65,7 @@ function registerListCommand(projects: Command): void { die(`Failed to list projects: ${formatApiError(error)}`); } - const list = data ?? []; + const list = (data ?? []) as Project[]; if (opts.json) { printJson(list); return; @@ -815,3 +815,12 @@ function printKv(pairs: [string, string][]): void { console.log(` ${c.dim(k.padEnd(width))} ${v}`); } } + +interface Project { + id: string; + name: string; + location: string; + status: string; + platforms: string[]; + updatedAt: string; +} diff --git a/src/commands/spectrum/users.ts b/src/commands/spectrum/users.ts index 8fc8ad1..cecaffa 100644 --- a/src/commands/spectrum/users.ts +++ b/src/commands/spectrum/users.ts @@ -37,7 +37,7 @@ export function registerSpectrumUsers(spectrum: Command): void { if (status === 401) throw new SessionExpiredError(resolved.name); if (error) die(`Failed to list users: ${formatApiError(error)}`); - const list = data?.users ?? []; + const list = ((data ?? {}) as { users?: SpectrumUser[] }).users ?? []; if (opts.json) return printJson(list); if (list.length === 0) { console.log(c.dim("No Spectrum users yet."));