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
@@ -45,8 +45,10 @@ function nitroPathFor(lib: string): string {
export async function importSinglePet(params: {
lib: string;
onProgress?: (status: string) => void;
signal?: AbortSignal;
}): Promise<ImportPetResult> {
const { lib, onProgress } = params;
const { lib, onProgress, signal } = params;
signal?.throwIfAborted();
const warnings: string[] = [];
await ensurePetDirs();
@@ -66,7 +68,10 @@ export async function importSinglePet(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,
@@ -76,6 +81,7 @@ export async function importSinglePet(params: {
};
onProgress?.("converting");
signal?.throwIfAborted();
try {
const swfBuffer = await fs.readFile(/*turbopackIgnore: true*/ swfPath);
const result = convertSwfToNitro(swfBuffer, lib);