@morlay/dsh-desktop-shell 0.2.2 → 0.2.3
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.
|
@@ -21,9 +21,10 @@ function numberOr(value, fallback) {
|
|
|
21
21
|
async function loadAppConfig(exeDir) {
|
|
22
22
|
const path = join(exeDir, "appconfig.json");
|
|
23
23
|
const value = JSON.parse(await readFile(path, "utf8"));
|
|
24
|
-
if (!isRecord(value) || typeof value.name !== "string" || value.name === "" || typeof value.id !== "string" || value.id === "" || typeof value.version !== "string" || value.version === "" || value.profile !== "desktop" || value.dshHome !== "xdg" && value.dshHome !== "env" && typeof value.dshHome !== "string") throw new Error(`dsh desktop: invalid shell configuration ${path}`);
|
|
24
|
+
if (!isRecord(value) || typeof value.name !== "string" || value.name === "" || typeof value.displayName !== "string" || value.displayName === "" || typeof value.id !== "string" || value.id === "" || typeof value.version !== "string" || value.version === "" || value.profile !== "desktop" || value.dshHome !== "xdg" && value.dshHome !== "env" && typeof value.dshHome !== "string") throw new Error(`dsh desktop: invalid shell configuration ${path}`);
|
|
25
25
|
return {
|
|
26
26
|
name: value.name,
|
|
27
|
+
displayName: value.displayName,
|
|
27
28
|
id: value.id,
|
|
28
29
|
version: value.version,
|
|
29
30
|
profile: PROFILE_NAME,
|
package/dist/appconfig.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as writeAppConfig, n as PROFILE_PATCH_NAME, r as loadAppConfig, t as PROFILE_NAME } from "./appconfig-
|
|
1
|
+
import { i as writeAppConfig, n as PROFILE_PATCH_NAME, r as loadAppConfig, t as PROFILE_NAME } from "./appconfig-BZ9wPROk.mjs";
|
|
2
2
|
export { PROFILE_NAME, PROFILE_PATCH_NAME, loadAppConfig, writeAppConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as loadAppConfig } from "./appconfig-
|
|
1
|
+
import { r as loadAppConfig } from "./appconfig-BZ9wPROk.mjs";
|
|
2
2
|
import { n as resolveDshHome } from "./dshhome-Dp89FOr-.mjs";
|
|
3
3
|
import { t as DESKTOP_HOST_PACKAGE } from "./official-Cz9Mry1n.mjs";
|
|
4
4
|
import { a as runtimeOverrides, i as installProfile, o as workspaceWithOverrides, r as PROFILE_WORKSPACE_NAME } from "./profile-project-BgQILDbu.mjs";
|
|
5
|
-
import { i as ensureSeedProfile, r as SEED_RUNTIME_DIR_NAME } from "./seed-
|
|
5
|
+
import { i as ensureSeedProfile, r as SEED_RUNTIME_DIR_NAME } from "./seed-BF71UAuI.mjs";
|
|
6
6
|
import { access, mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
|
|
7
7
|
import { basename, dirname, join, resolve } from "node:path";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
@@ -261,7 +261,6 @@ var DesktopHostProcess = class {
|
|
|
261
261
|
async start() {
|
|
262
262
|
if (this.child !== void 0) return this.readyPromise;
|
|
263
263
|
const entry = join(this.runtimeDir, "node_modules", ...DESKTOP_HOST_PACKAGE.split("/"), "lib", "index.js");
|
|
264
|
-
const primaryRuntime = this.options.primaryRuntime ?? join(this.runtimeDir, "..", "runtime", "primary-runtime");
|
|
265
264
|
const packageManager = this.options.packageManager;
|
|
266
265
|
const args = [
|
|
267
266
|
"--expose-internals",
|
|
@@ -271,7 +270,6 @@ var DesktopHostProcess = class {
|
|
|
271
270
|
entry,
|
|
272
271
|
this.runtimeDir,
|
|
273
272
|
this.projectDir,
|
|
274
|
-
primaryRuntime,
|
|
275
273
|
...packageManager === void 0 ? [] : [packageManager.pnpm, packageManager.nodeBin]
|
|
276
274
|
];
|
|
277
275
|
const env = {
|
|
@@ -1446,11 +1444,9 @@ function runtimeResources() {
|
|
|
1446
1444
|
const development = !app.isPackaged;
|
|
1447
1445
|
const node = (development ? process.env.DSH_DESKTOP_NODE_BINARY : void 0) ?? join(process.resourcesPath, "runtime", "node", process.platform === "win32" ? "node.exe" : "node");
|
|
1448
1446
|
const seed = (development ? process.env.DSH_DESKTOP_SEED_DIR : void 0) ?? join(process.resourcesPath, "seed");
|
|
1449
|
-
const configured = process.env.DSH_DESKTOP_PRIMARY_RUNTIME_DIR;
|
|
1450
1447
|
return {
|
|
1451
1448
|
node,
|
|
1452
1449
|
seed,
|
|
1453
|
-
primaryRuntime: configured !== void 0 && configured !== "" ? resolve(configured) : join(process.resourcesPath, "runtime", "primary-runtime"),
|
|
1454
1450
|
runtime: join(seed, SEED_RUNTIME_DIR_NAME),
|
|
1455
1451
|
pnpm: join(process.resourcesPath, "runtime", "pnpm", "bin", "pnpm.mjs"),
|
|
1456
1452
|
nodeBin: join(process.resourcesPath, "runtime", "bin")
|
|
@@ -1555,7 +1551,7 @@ async function main() {
|
|
|
1555
1551
|
defaultId: 0,
|
|
1556
1552
|
cancelId: 0,
|
|
1557
1553
|
noLink: true,
|
|
1558
|
-
message: `Quit ${appConfig.
|
|
1554
|
+
message: `Quit ${appConfig.displayName}?`,
|
|
1559
1555
|
detail: "The desktop backend and its running sessions will stop."
|
|
1560
1556
|
};
|
|
1561
1557
|
const parent = window ?? mainWindow;
|
|
@@ -1583,7 +1579,6 @@ async function main() {
|
|
|
1583
1579
|
...dshHome === void 0 ? {} : { DSH_HOME: dshHome },
|
|
1584
1580
|
...development === void 0 ? {} : { ELECTRON_RUN_AS_NODE: "1" }
|
|
1585
1581
|
},
|
|
1586
|
-
primaryRuntime: resources.primaryRuntime,
|
|
1587
1582
|
processTitle: `${appConfig.name}-server`,
|
|
1588
1583
|
...development === void 0 ? { packageManager: {
|
|
1589
1584
|
pnpm: resources.pnpm,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PROFILE_PATCH_NAME, t as PROFILE_NAME } from "./appconfig-
|
|
1
|
+
import { n as PROFILE_PATCH_NAME, t as PROFILE_NAME } from "./appconfig-BZ9wPROk.mjs";
|
|
2
2
|
import { access, chmod, copyFile, lstat, mkdir, readFile, readdir, readlink, rm, symlink, unlink, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
//#region src/seed.ts
|
package/dist/seed.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ensureSeedProfile, n as SEED_HASH_NAME, r as SEED_RUNTIME_DIR_NAME, t as SEED_DIR_NAME } from "./seed-
|
|
1
|
+
import { i as ensureSeedProfile, n as SEED_HASH_NAME, r as SEED_RUNTIME_DIR_NAME, t as SEED_DIR_NAME } from "./seed-BF71UAuI.mjs";
|
|
2
2
|
export { SEED_DIR_NAME, SEED_HASH_NAME, SEED_RUNTIME_DIR_NAME, ensureSeedProfile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/dsh-desktop-shell",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Electron shell for dsh desktop apps: serves the app's own <name>:// scheme, boots the desktop profile through the @morlay/dsh-desktop-host child over byte pipes, and installs the profile seed on first launch. The CLI that packages a workspace around it is @morlay/dsh-desktopify.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"desktop",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@deepseek-ai/dsh-atomic-write": "0.2.0-rc.1",
|
|
41
41
|
"@deepseek-ai/dsh-client-shortcuts": "0.2.0-rc.1",
|
|
42
42
|
"@local/devkit": "0.1.0",
|
|
43
|
-
"@morlay/dsh-desktop-host": "0.2.
|
|
43
|
+
"@morlay/dsh-desktop-host": "0.2.3",
|
|
44
44
|
"@types/node": "^26.5.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|