mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
Guard dev health JSON parsing
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
bfa60338cc
commit
9a8a169e95
7 changed files with 122 additions and 8 deletions
|
|
@ -4,7 +4,7 @@ import { existsSync, mkdirSync, readdirSync, rmSync, statSync, writeFileSync } f
|
|||
import path from "node:path";
|
||||
import { createInterface } from "node:readline/promises";
|
||||
import { stdin, stdout } from "node:process";
|
||||
import { createCapturedOutputBuffer } from "./dev-runner-output.mjs";
|
||||
import { createCapturedOutputBuffer, parseJsonResponseWithLimit } from "./dev-runner-output.mjs";
|
||||
import { shouldTrackDevServerPath } from "./dev-runner-paths.mjs";
|
||||
import { createDevServiceIdentity, repoRoot } from "./dev-service-profile.ts";
|
||||
import {
|
||||
|
|
@ -487,7 +487,7 @@ async function getDevHealthPayload() {
|
|||
if (!response.ok) {
|
||||
throw new Error(`Health request failed (${response.status})`);
|
||||
}
|
||||
return await response.json();
|
||||
return await parseJsonResponseWithLimit<{ devServer?: { enabled?: boolean; autoRestartEnabled?: boolean; activeRunCount?: number } }>(response);
|
||||
}
|
||||
|
||||
async function waitForChildExit() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue