@downdraft/cli 0.2.0 → 0.3.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@downdraft/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/knackstedt/downdraft.git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@aws-sdk/client-s3": "^3.700.0",
|
|
15
|
-
"@downdraft/engine": "^0.
|
|
15
|
+
"@downdraft/engine": "^0.3.1",
|
|
16
16
|
"eta": "^3.5.0",
|
|
17
17
|
"jimp": "^1.6.1",
|
|
18
18
|
"resedit": "3.1.0"
|
|
@@ -655,8 +655,13 @@ if (runtime === "bun") {
|
|
|
655
655
|
`# ${productName} — ${runtime} runtime launcher (package-desktop.mjs)\n` +
|
|
656
656
|
`SELF="$(readlink -f "$0" 2>/dev/null || realpath "$0" 2>/dev/null || echo "$0")"\n` +
|
|
657
657
|
`DIR="$(dirname "$SELF")"\n` +
|
|
658
|
+
`export DD_APP_ID="${appId}"\n` +
|
|
659
|
+
(iconPath ? `export DD_APP_ICON="$DIR/icon.png"\n` : "") +
|
|
658
660
|
`exec "$DIR/${runtime}" ${rtArgs} "$DIR/bundle/index.js" "$@"\n`);
|
|
659
661
|
chmodSync(join(appdir, exeName), 0o755);
|
|
662
|
+
// Staged at appdir root so the launcher's DD_APP_ICON resolves for all
|
|
663
|
+
// formats (deb installs appdir to /usr/lib, AppImage cpSync's it wholesale).
|
|
664
|
+
if (iconPath) copyFileSync(iconPath, join(appdir, "icon.png"));
|
|
660
665
|
|
|
661
666
|
// Engine cdylibs (bun's path stages these inside package-native).
|
|
662
667
|
await stageEngineLibs(nativeDir);
|
|
@@ -721,6 +726,7 @@ function desktopFile(iconName = exeName) {
|
|
|
721
726
|
`Comment=${synopsis}\n` +
|
|
722
727
|
`Exec=${exeName}\n` +
|
|
723
728
|
`Icon=${iconName}\n` +
|
|
729
|
+
`StartupWMClass=${appId}\n` +
|
|
724
730
|
`Terminal=false\n` +
|
|
725
731
|
`Categories=${category}\n`);
|
|
726
732
|
}
|
|
@@ -51,6 +51,14 @@ const modeArg = flagValue("mode") ?? "prod";
|
|
|
51
51
|
const doInstall = argv.includes("--install") || argv.includes("--launch");
|
|
52
52
|
const doLaunch = argv.includes("--launch");
|
|
53
53
|
const retainMcp = argv.includes("--mcp");
|
|
54
|
+
// Games bundled for the shell run under libnode, where `import.meta.env` is
|
|
55
|
+
// undefined — replace the Vite-ism statically so game code can use it.
|
|
56
|
+
const modeDefines = {
|
|
57
|
+
"import.meta.env.DEV": modeArg === "dev" ? "true" : "false",
|
|
58
|
+
"import.meta.env.PROD": modeArg === "dev" ? "false" : "true",
|
|
59
|
+
"import.meta.env.MODE": JSON.stringify(modeArg),
|
|
60
|
+
...(retainMcp ? {} : { __DD_MCP_STRIP__: "true" }),
|
|
61
|
+
};
|
|
54
62
|
const minSdk = flagValue("min-sdk") ?? "30";
|
|
55
63
|
// --node-flavor=lite selects build/dist/android-lite/<abi>/libnode.so
|
|
56
64
|
// (NODEJS_MOBILE_FLAVOR=lite from build-android.mjs: no intl/inspector/
|
|
@@ -450,7 +458,7 @@ while (workerEntries.size !== prevCount) {
|
|
|
450
458
|
splitting: false,
|
|
451
459
|
sourcemap: "none",
|
|
452
460
|
minify: false,
|
|
453
|
-
define:
|
|
461
|
+
define: modeDefines,
|
|
454
462
|
outdir: scanOutdir,
|
|
455
463
|
});
|
|
456
464
|
if (!scan.success) {
|
|
@@ -475,7 +483,7 @@ const build = await Bun.build({
|
|
|
475
483
|
splitting: false,
|
|
476
484
|
sourcemap: "none",
|
|
477
485
|
minify: modeArg === "prod",
|
|
478
|
-
define:
|
|
486
|
+
define: modeDefines,
|
|
479
487
|
external: ["koffi", "bun:ffi", "bun:test", "bun"],
|
|
480
488
|
outdir: bundleDir,
|
|
481
489
|
});
|