sparkbun 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/index.ts +21 -6
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -3333,7 +3333,12 @@ usageDescriptions : ""}${urlTypes ? "\n" + urlTypes : ""}${documentTypes ?
|
|
|
3333
3333
|
}
|
|
3334
3334
|
|
|
3335
3335
|
const outPath = getFlag("--out=");
|
|
3336
|
-
|
|
3336
|
+
// Fall back to the platform icon from sparkbun.config.ts (build.win.icon)
|
|
3337
|
+
// so the installer is branded without needing an explicit --icon flag.
|
|
3338
|
+
const iconPath =
|
|
3339
|
+
getFlag("--icon=") ||
|
|
3340
|
+
(config.build as any)?.win?.icon ||
|
|
3341
|
+
undefined;
|
|
3337
3342
|
const installerName = getFlag("--name=") || config.app.name;
|
|
3338
3343
|
const installerVersion = getFlag("--version=") || config.app.version;
|
|
3339
3344
|
const installerPublisher = getFlag("--publisher=") || (config.app as any).publisher || "";
|
|
@@ -3412,15 +3417,25 @@ usageDescriptions : ""}${urlTypes ? "\n" + urlTypes : ""}${documentTypes ?
|
|
|
3412
3417
|
|
|
3413
3418
|
console.log(` Archiving ${spec.name}: ${spec.path}`);
|
|
3414
3419
|
|
|
3415
|
-
// Build
|
|
3416
|
-
//
|
|
3417
|
-
//
|
|
3420
|
+
// Build the uncompressed tar with the system `tar`. It streams to disk
|
|
3421
|
+
// (bounded build memory) and preserves empty directories as real
|
|
3422
|
+
// entries. The source folder name is kept as the archive root (e.g.
|
|
3423
|
+
// "Dune 2000/...") via `tar -C <parent> <basename>`, so it extracts
|
|
3424
|
+
// into the correct subdirectory.
|
|
3425
|
+
//
|
|
3426
|
+
// The on-disk format may be GNU (Windows/Linux — long paths via
|
|
3427
|
+
// "././@LongLink") or pax (macOS bsdtar — long paths via extended
|
|
3428
|
+
// headers). The installer's streaming extractor understands both, plus
|
|
3429
|
+
// plain ustar, so the archive is portable regardless of build host.
|
|
3430
|
+
//
|
|
3431
|
+
// (Bun.Archive is intentionally not used here: its lazy Bun.file()
|
|
3432
|
+
// inputs write empty file bodies, and eager byte inputs would require
|
|
3433
|
+
// loading the entire payload into memory.)
|
|
3418
3434
|
const parent = dirname(spec.path);
|
|
3419
3435
|
const baseName = basename(spec.path);
|
|
3420
3436
|
createTar(tarTmpPath, parent, [baseName]);
|
|
3421
3437
|
|
|
3422
|
-
// Measure uncompressed bytes + file count
|
|
3423
|
-
// real per-file / byte progress without unpacking first.
|
|
3438
|
+
// Measure uncompressed bytes + file count for progress denominators.
|
|
3424
3439
|
const { bytes: uncompressedBytes, fileCount } = measureDir(spec.path);
|
|
3425
3440
|
|
|
3426
3441
|
// Stream-compress the tar at the requested level (bounded build memory).
|