@dsh-sup/dsh-core-win-x64 0.1.3-BETA.2 → 0.1.4-BETA.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/bin/dsh-supervisor +0 -0
- package/core.cjs +51 -23
- package/package.json +1 -1
- package/ui-react/dsh-logo.svg +1 -1
- package/ui-react/supervisor.html +13 -13
package/bin/dsh-supervisor
CHANGED
|
File without changes
|
package/core.cjs
CHANGED
|
@@ -68,13 +68,17 @@ var require_config = __commonJS({
|
|
|
68
68
|
selfUpdateDir: null,
|
|
69
69
|
pluginsProfileName: "web",
|
|
70
70
|
packageName: "@deepseek-ai/dsh",
|
|
71
|
-
//
|
|
72
|
-
//
|
|
71
|
+
// 默认候选镜像源。自动模式按延迟测速选最快可达,与 UI 预设/壳 mirror.rs 保持同一集合。
|
|
72
|
+
// ⚠ 每一项都经**真实 tarball 下载验证**(2026-09-11)——仅「元数据可读」不足以判定可用,
|
|
73
|
+
// 部分镜像只代理元数据、不代理 tarball。
|
|
74
|
+
// 已排除:mirrors.aliyun.com/npm、mirrors.tuna.tsinghua.edu.cn/npm(元数据不可用)。
|
|
73
75
|
registries: [
|
|
74
76
|
"https://registry.npmmirror.com",
|
|
75
77
|
"https://registry.npmjs.org",
|
|
78
|
+
"https://repo.huaweicloud.com/repository/npm/",
|
|
76
79
|
"https://mirrors.cloud.tencent.com/npm",
|
|
77
|
-
"https://
|
|
80
|
+
"https://npmreg.proxy.ustclug.org",
|
|
81
|
+
"https://r.cnpmjs.org"
|
|
78
82
|
],
|
|
79
83
|
updateCheckEnabled: true,
|
|
80
84
|
updateCheckIntervalMs: 36e5,
|
|
@@ -143,7 +147,7 @@ var require_version = __commonJS({
|
|
|
143
147
|
var fs2 = require("node:fs");
|
|
144
148
|
var path2 = require("node:path");
|
|
145
149
|
function guardVersion() {
|
|
146
|
-
if (true) return String("0.1.
|
|
150
|
+
if (true) return String("0.1.4-BETA.1");
|
|
147
151
|
try {
|
|
148
152
|
return JSON.parse(fs2.readFileSync(path2.join(__dirname, "..", "..", "package.json"), "utf8")).version || "unknown";
|
|
149
153
|
} catch {
|
|
@@ -1290,18 +1294,19 @@ var require_autostart = __commonJS({
|
|
|
1290
1294
|
}
|
|
1291
1295
|
function status() {
|
|
1292
1296
|
if (isWindows) {
|
|
1293
|
-
let
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1297
|
+
let guard = false, gui = false, watchdog = false;
|
|
1298
|
+
const has = (tn) => {
|
|
1299
|
+
try {
|
|
1300
|
+
const out = execFileSync2("schtasks", ["/Query", "/TN", tn], { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).toString();
|
|
1301
|
+
return out.includes(tn);
|
|
1302
|
+
} catch {
|
|
1303
|
+
return false;
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
guard = has("DSH-Supervisor");
|
|
1307
|
+
gui = has("DSH-Supervisor-GUI");
|
|
1308
|
+
watchdog = has("DSH-Supervisor-Watchdog");
|
|
1309
|
+
return { kind: "schtasks", on: guard || gui || watchdog, gui, watchdog, guard };
|
|
1305
1310
|
}
|
|
1306
1311
|
if (isMac) {
|
|
1307
1312
|
const on = fs2.existsSync(laFile("com.dsh.supervisor"));
|
|
@@ -1343,9 +1348,13 @@ var require_autostart = __commonJS({
|
|
|
1343
1348
|
fs2.writeFileSync(atmp, ps);
|
|
1344
1349
|
fs2.renameSync(atmp, watchdogPs1);
|
|
1345
1350
|
try {
|
|
1346
|
-
execFileSync2("schtasks", ["/Create", "/TN", "DSH-Supervisor", "/SC", "ONLOGON", "/RL", "HIGHEST", "/F", "/TR", '"' + guiCommand() + '"']);
|
|
1351
|
+
execFileSync2("schtasks", ["/Create", "/TN", "DSH-Supervisor-GUI", "/SC", "ONLOGON", "/RL", "HIGHEST", "/F", "/TR", '"' + guiCommand() + '"']);
|
|
1347
1352
|
} catch (e) {
|
|
1348
|
-
errors.push("schtasks
|
|
1353
|
+
errors.push("schtasks gui: " + e.message);
|
|
1354
|
+
}
|
|
1355
|
+
try {
|
|
1356
|
+
execFileSync2("schtasks", ["/Change", "/TN", "DSH-Supervisor", "/ENABLE"]);
|
|
1357
|
+
} catch {
|
|
1349
1358
|
}
|
|
1350
1359
|
try {
|
|
1351
1360
|
execFileSync2("schtasks", ["/Create", "/TN", "DSH-Supervisor-Watchdog", "/SC", "MINUTE", "/MO", "5", "/RL", "HIGHEST", "/F", "/TR", 'powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "' + watchdogPs1 + '"']);
|
|
@@ -1358,7 +1367,11 @@ var require_autostart = __commonJS({
|
|
|
1358
1367
|
} catch {
|
|
1359
1368
|
}
|
|
1360
1369
|
try {
|
|
1361
|
-
execFileSync2("schtasks", ["/Delete", "/TN", "DSH-Supervisor", "/F"]);
|
|
1370
|
+
execFileSync2("schtasks", ["/Delete", "/TN", "DSH-Supervisor-GUI", "/F"]);
|
|
1371
|
+
} catch {
|
|
1372
|
+
}
|
|
1373
|
+
try {
|
|
1374
|
+
execFileSync2("schtasks", ["/Change", "/TN", "DSH-Supervisor", "/DISABLE"]);
|
|
1362
1375
|
} catch {
|
|
1363
1376
|
}
|
|
1364
1377
|
try {
|
|
@@ -4281,8 +4294,10 @@ var require_dist = __commonJS({
|
|
|
4281
4294
|
var REGISTRY_PRESETS = [
|
|
4282
4295
|
{ label: "npm \u5B98\u65B9", origin: "https://registry.npmjs.org" },
|
|
4283
4296
|
{ label: "npmmirror\uFF08\u56FD\u5185\xB7\u6DD8\u5B9D\uFF09", origin: "https://registry.npmmirror.com" },
|
|
4297
|
+
{ label: "\u534E\u4E3A\u4E91\u955C\u50CF", origin: "https://repo.huaweicloud.com/repository/npm/" },
|
|
4284
4298
|
{ label: "\u817E\u8BAF\u4E91\u955C\u50CF", origin: "https://mirrors.cloud.tencent.com/npm" },
|
|
4285
|
-
{ label: "\
|
|
4299
|
+
{ label: "\u4E2D\u79D1\u5927\u955C\u50CF", origin: "https://npmreg.proxy.ustclug.org" },
|
|
4300
|
+
{ label: "cnpmjs \u955C\u50CF", origin: "https://r.cnpmjs.org" }
|
|
4286
4301
|
];
|
|
4287
4302
|
var DistributionManager = class {
|
|
4288
4303
|
constructor(opts) {
|
|
@@ -18782,7 +18797,20 @@ var path = require("node:path");
|
|
|
18782
18797
|
var os = require("node:os");
|
|
18783
18798
|
var http = require("node:http");
|
|
18784
18799
|
var { execFileSync } = require("node:child_process");
|
|
18785
|
-
|
|
18800
|
+
function findPackageRoot(start) {
|
|
18801
|
+
let d = start;
|
|
18802
|
+
for (let i = 0; i < 6; i += 1) {
|
|
18803
|
+
try {
|
|
18804
|
+
if (fs.existsSync(path.join(d, "package.json"))) return d;
|
|
18805
|
+
} catch {
|
|
18806
|
+
}
|
|
18807
|
+
const up = path.dirname(d);
|
|
18808
|
+
if (up === d) break;
|
|
18809
|
+
d = up;
|
|
18810
|
+
}
|
|
18811
|
+
return path.join(__dirname, "..");
|
|
18812
|
+
}
|
|
18813
|
+
var ROOT = findPackageRoot(__dirname);
|
|
18786
18814
|
var SUPERVISOR_DIR = path.join(os.homedir(), ".dsh", "supervisor");
|
|
18787
18815
|
var USER_CONFIG = path.join(SUPERVISOR_DIR, "config.json");
|
|
18788
18816
|
var DEFAULT_CONFIG = Object.assign(
|
|
@@ -19047,12 +19075,12 @@ function cmdInstall() {
|
|
|
19047
19075
|
} catch {
|
|
19048
19076
|
}
|
|
19049
19077
|
if (IS_WINDOWS) {
|
|
19050
|
-
const target = path.join(
|
|
19078
|
+
const target = path.join(ROOT, "bin", "dsh-supervisor");
|
|
19051
19079
|
const shim = '@echo off\r\n"' + process.execPath + '" "' + target + '" %*\r\n';
|
|
19052
19080
|
fs.writeFileSync(BIN_PATH, shim);
|
|
19053
19081
|
console.log("[install] \u547D\u4EE4\u884C\u57AB\u7247: " + BIN_PATH + " \u2192 " + target);
|
|
19054
19082
|
} else {
|
|
19055
|
-
fs.symlinkSync(path.join(
|
|
19083
|
+
fs.symlinkSync(path.join(ROOT, "bin", "dsh-supervisor"), BIN_PATH);
|
|
19056
19084
|
console.log("[install] \u547D\u4EE4\u884C\u94FE\u63A5: " + BIN_PATH + " \u2192 " + __dirname + "/dsh-supervisor");
|
|
19057
19085
|
}
|
|
19058
19086
|
if (!fs.existsSync(UNIT_TEMPLATE)) {
|
package/package.json
CHANGED
package/ui-react/dsh-logo.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg fill="#2F54EB" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-label="DSH-SUP"><title>DSH-SUP</title><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path></svg>
|
|
1
|
+
<svg fill="#2F54EB" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-label="DSH-SUP"><title>DSH-SUP</title><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path></svg>
|
package/ui-react/supervisor.html
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/dsh-logo.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>dsh-supervisor · 控制面板</title>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/dsh-logo.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>dsh-supervisor · 控制面板</title>
|
|
8
8
|
<style>
|
|
9
9
|
/* 内核面板页:纯网页(2026-09-07 定稿,无独立加载页/无窗口逻辑)。
|
|
10
10
|
基础样式仅保证铺满与无色块,具体 UI 由 React 应用渲染。 */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* { box-sizing: border-box; }
|
|
16
16
|
html, body, #root { width: 100%; height: 100%; height: 100dvh; }
|
|
17
17
|
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; overflow: hidden; background: transparent; }
|
|
18
|
-
</style>
|
|
18
|
+
</style>
|
|
19
19
|
<script type="module" crossorigin src="/assets/supervisor-D7hcOyJj.js"></script>
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/supervisor-CrE6sh9a.js">
|
|
21
21
|
<link rel="stylesheet" crossorigin href="/assets/supervisor-hG2-v7mV.css">
|
|
22
22
|
<link rel="stylesheet" crossorigin href="/assets/supervisor-CvEVeLaH.css">
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<div id="root"></div>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<div id="root"></div>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|