From 76fbfcb91588157f1fa79eff4604df3b4f85db75 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Wed, 12 Aug 2026 16:19:38 -0700 Subject: [PATCH] fix(core): remove the build-audio-fx-runtime.ts stray resurrected by a main merge An earlier merge with main brought this deleted file back (git's merge/delete handling on an unchanged-on-one-side file); package.json already points at build-inline-artifact.ts, so it sat unreachable and duplicating that file's config, both of which fallow flagged. --- .../core/scripts/build-audio-fx-runtime.ts | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 packages/core/scripts/build-audio-fx-runtime.ts diff --git a/packages/core/scripts/build-audio-fx-runtime.ts b/packages/core/scripts/build-audio-fx-runtime.ts deleted file mode 100644 index eb6c841a51..0000000000 --- a/packages/core/scripts/build-audio-fx-runtime.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** Build the injectable audio-FX runtime artifact from the canonical runtime. */ - -import { mkdirSync, writeFileSync } from "node:fs"; -import { dirname, resolve } from "node:path"; -import { fileURLToPath } from "node:url"; -import { buildSync } from "esbuild"; -import { execFileSync } from "node:child_process"; - -const thisDir = dirname(fileURLToPath(import.meta.url)); -const repoRoot = resolve(thisDir, ".."); -const entry = resolve(repoRoot, "stubs/audio-fx-runtime-entry.ts"); -const generatedDir = resolve(repoRoot, "src/generated"); -const outPath = resolve(generatedDir, "audio-fx-runtime-inline.ts"); - -const result = buildSync({ - entryPoints: [entry], - bundle: true, - write: false, - platform: "browser", - format: "iife", - target: ["es2020"], - minify: true, - legalComments: "none", -}); -const iife = result.outputFiles[0]?.text ?? ""; -if (!iife) throw new Error("esbuild produced no output for audio-fx-runtime-entry.ts"); - -mkdirSync(generatedDir, { recursive: true }); -writeFileSync( - outPath, - [ - "// AUTO-GENERATED by scripts/build-audio-fx-runtime.ts - do not edit", - `const AUDIO_FX_RUNTIME_IIFE: string = ${JSON.stringify(iife)};`, - "", - "/** Returns the pre-built audio-FX runtime IIFE as a string constant. */", - "export function getAudioFxRuntimeScript(): string {", - " return AUDIO_FX_RUNTIME_IIFE;", - "}", - "", - ].join("\n"), - "utf8", -); - -try { - execFileSync("bun", ["x", "oxfmt", outPath], { stdio: "ignore" }); -} catch { - // Formatting is best effort when the generator runs in a minimal environment. -} - -console.log(JSON.stringify({ event: "audio_fx_runtime_generated", outPath, bytes: iife.length }));