feat(housekeeping): integrate studio operations
CI / check (pull_request) Successful in 38s
CI / release (pull_request) Skipped
CI / deploy (pull_request) Skipped

This commit is contained in:
Simo committed 2026-08-30 15:29:58 +02:00
1 parent 020c06f172
commit 2e95a106e0
36 files changed
+2296 -60

No files matched your search

+8 -2
View File
@@ -78,8 +78,10 @@ async function nitroPathFor(lib: string): Promise<string> {
export async function importSingleFigure(params: {
lib: string;
onProgress?: (status: string) => void;
signal?: AbortSignal;
}): Promise<ImportFigureResult> {
const { lib, onProgress } = params;
const { lib, onProgress, signal } = params;
signal?.throwIfAborted();
const warnings: string[] = [];
await ensureFigureDirs();
@@ -99,7 +101,10 @@ export async function importSingleFigure(params: {
error: `Could not resolve SWF URL: ${(err as Error).message}`,
};
}
const dl = await downloadFile(swfUrl, swfPath, { validate: "swf" });
const dl = await downloadFile(swfUrl, swfPath, {
validate: "swf",
signal,
});
if (!dl.ok)
return {
ok: false,
@@ -109,6 +114,7 @@ export async function importSingleFigure(params: {
};
onProgress?.("converting");
signal?.throwIfAborted();
try {
const swfBuffer = await fs.readFile(/*turbopackIgnore: true*/ swfPath);
const result = convertSwfToNitro(swfBuffer, lib);