mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-01 04:42:10 +03:00
fix(publish): also remove app/electron/ (contains app.asar binary) to prevent Z_DATA_ERROR
This commit is contained in:
@@ -278,14 +278,17 @@ if (existsSync(swcHelpersSrc) && !existsSync(swcHelpersDst)) {
|
||||
console.log(" ✅ @swc/helpers included in standalone build.");
|
||||
}
|
||||
|
||||
// ── Step 10.6: Remove vscode-extension from standalone build ──
|
||||
// The vscode extension test runtime (vsda.node) is a platform-native binary
|
||||
// that triggers Z_DATA_ERROR during npm pack. Remove it from the bundle.
|
||||
const vscodeBuildDir = join(APP_DIR, "vscode-extension");
|
||||
if (existsSync(vscodeBuildDir)) {
|
||||
console.log(" 🧹 Removing app/vscode-extension/ (not needed in npm package)...");
|
||||
rmSync(vscodeBuildDir, { recursive: true, force: true });
|
||||
console.log(" ✅ app/vscode-extension/ removed.");
|
||||
// ── Step 10.6: Remove large binaries from standalone build ──
|
||||
// These directories contain platform-native binaries (.node, .asar) that
|
||||
// trigger Z_DATA_ERROR during npm pack. They are not needed in the npm package.
|
||||
const binaryDirsToRemove = ["vscode-extension", "electron"];
|
||||
for (const dir of binaryDirsToRemove) {
|
||||
const targetDir = join(APP_DIR, dir);
|
||||
if (existsSync(targetDir)) {
|
||||
console.log(` 🧹 Removing app/${dir}/ (not needed in npm package)...`);
|
||||
rmSync(targetDir, { recursive: true, force: true });
|
||||
console.log(` ✅ app/${dir}/ removed.`);
|
||||
}
|
||||
}
|
||||
|
||||
// ── Done ───────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user