@dsh-workbench/core 1.1.11 → 1.1.13
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/README.md +1 -0
- package/client.js +181 -76
- package/dist/client/client.body.js +181 -76
- package/dist/client/index.js +174 -69
- package/dist/host/index.js +45 -15
- package/dist/types/app/layouts/env-gate/gate-text.d.ts +5 -0
- package/dist/types/app/layouts/market/use-market-reload.d.ts +10 -4
- package/dist/types/app/layouts/market/use-module-versions.d.ts +9 -8
- package/dist/types/app/layouts/rightbar/MarketView.d.ts +2 -3
- package/dist/types/app/layouts/rightbar/market-act.d.ts +2 -3
- package/dist/types/modules/panels/model/plugin-section.d.ts +1 -0
- package/dist/types/shared/hooks/bundle-queries.d.ts +2 -2
- package/package.json +3 -3
|
@@ -795,7 +795,7 @@ var useEffect$33 = react$1.useEffect;
|
|
|
795
795
|
react$1.useLayoutEffect;
|
|
796
796
|
var useMemo$10 = react$1.useMemo;
|
|
797
797
|
react$1.useCallback;
|
|
798
|
-
var useRef$
|
|
798
|
+
var useRef$23 = react$1.useRef;
|
|
799
799
|
react$1.useSyncExternalStore;
|
|
800
800
|
//#endregion
|
|
801
801
|
//#region ../shared/dist/components/Activity.js
|
|
@@ -1580,7 +1580,7 @@ function Form(props) {
|
|
|
1580
1580
|
const { fields, onSubmit, submit, cancel, extra, busy = false, disabled = false, problem } = props;
|
|
1581
1581
|
const [done, setDone] = useState$43(false);
|
|
1582
1582
|
const [reveal, setReveal] = useState$43(0);
|
|
1583
|
-
const rootRef = useRef$
|
|
1583
|
+
const rootRef = useRef$23(null);
|
|
1584
1584
|
const shown = visibleFieldsOf(fields);
|
|
1585
1585
|
const problems = formProblemsOf(shown, done);
|
|
1586
1586
|
reportDuplicateKeys(shown);
|
|
@@ -2096,11 +2096,11 @@ function useSelectState(props) {
|
|
|
2096
2096
|
const [openState, setOpenState] = useState$43(false);
|
|
2097
2097
|
const [query, setQuery] = useState$43("");
|
|
2098
2098
|
const [cursor, setCursor] = useState$43(null);
|
|
2099
|
-
const boxRef = useRef$
|
|
2100
|
-
const triggerRef = useRef$
|
|
2101
|
-
const wasOpenRef = useRef$
|
|
2102
|
-
const pickedRef = useRef$
|
|
2103
|
-
const closedByUsRef = useRef$
|
|
2099
|
+
const boxRef = useRef$23(null);
|
|
2100
|
+
const triggerRef = useRef$23(null);
|
|
2101
|
+
const wasOpenRef = useRef$23(false);
|
|
2102
|
+
const pickedRef = useRef$23(false);
|
|
2103
|
+
const closedByUsRef = useRef$23(false);
|
|
2104
2104
|
const open = openProp ?? openState;
|
|
2105
2105
|
const setOpen = (next) => {
|
|
2106
2106
|
if (openProp === void 0) setOpenState(next);
|
|
@@ -3574,6 +3574,7 @@ var en = {
|
|
|
3574
3574
|
"env.stepFailed.install": "install failed",
|
|
3575
3575
|
"env.stepFailed.path": "installed but not found",
|
|
3576
3576
|
"env.stepFailed.shell": "cannot reach the command line",
|
|
3577
|
+
"env.stepFailed.host": "the command never returned",
|
|
3577
3578
|
"env.toolchain.ok": "Looks good",
|
|
3578
3579
|
"env.toolchain.warn": "Almost ready",
|
|
3579
3580
|
"env.runtime.ok": "Ready",
|
|
@@ -3586,9 +3587,11 @@ var en = {
|
|
|
3586
3587
|
"env.fix.why": "The workbench uses its own background tool (installed separately from the one in your terminal), and it is not set up on this machine yet.",
|
|
3587
3588
|
"env.fix.whyPath": "The background tool is installed, but this environment cannot find it — usually a PATH or shell-session issue.",
|
|
3588
3589
|
"env.fix.whyShell": "The workbench cannot reach the command line on this machine, so it cannot fetch data — you cannot install this from here; someone needs to fix the background environment.",
|
|
3590
|
+
"env.fix.whyHost": "The workbench runs a few checks on the command line and collects what they return; this time the command went out and nothing came back. The tools themselves are most likely fine — reinstalling Node / npm / pnpm will not help.",
|
|
3589
3591
|
"env.fix.step": "Run this in a terminal, then hit Retry:",
|
|
3590
3592
|
"env.fix.stepPath": "Open a new terminal window (or make sure npm’s global bin directory is on PATH), then hit Retry.",
|
|
3591
3593
|
"env.fix.stepShell": "Restart the workbench (or dsh); if it keeps happening, the workbench still cannot reach the command line.",
|
|
3594
|
+
"env.fix.stepHost": "Quit the workbench completely (including the tray icon), clear the dsh-* leftovers in the system temp folder, then open it again. If it keeps happening, update dsh.",
|
|
3592
3595
|
"env.fix.permission": "Permission denied: rerun with sudo, or point npm’s global directory at your home.",
|
|
3593
3596
|
"env.fix.network": "Network unreachable: check your network or proxy, then retry.",
|
|
3594
3597
|
"env.fix.details": "Details (for troubleshooting)",
|
|
@@ -4340,6 +4343,7 @@ var dictionaries = {
|
|
|
4340
4343
|
"env.stepFailed.install": "装不上",
|
|
4341
4344
|
"env.stepFailed.path": "装了但还找不到",
|
|
4342
4345
|
"env.stepFailed.shell": "连不上命令行",
|
|
4346
|
+
"env.stepFailed.host": "命令行没有返回",
|
|
4343
4347
|
"env.toolchain.ok": "正常",
|
|
4344
4348
|
"env.toolchain.warn": "还没完全准备好",
|
|
4345
4349
|
"env.runtime.ok": "已就绪",
|
|
@@ -4352,9 +4356,11 @@ var dictionaries = {
|
|
|
4352
4356
|
"env.fix.why": "工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。",
|
|
4353
4357
|
"env.fix.whyPath": "后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。",
|
|
4354
4358
|
"env.fix.whyShell": "工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。",
|
|
4359
|
+
"env.fix.whyHost": "工作台要靠命令行跑几条检查,再把结果收回来;这次命令发出去了,结果一直没回来。工具本身多半是好的 —— 重装 Node / npm / pnpm 不会有帮助。",
|
|
4355
4360
|
"env.fix.step": "在终端里运行下面这条命令,装好之后点「重试」:",
|
|
4356
4361
|
"env.fix.stepPath": "新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。",
|
|
4357
4362
|
"env.fix.stepShell": "重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。",
|
|
4363
|
+
"env.fix.stepHost": "完全退出工作台(托盘图标也要退),清掉系统临时目录里 dsh- 开头的残留,再重新打开;反复出现就升级 dsh。",
|
|
4358
4364
|
"env.fix.permission": "权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。",
|
|
4359
4365
|
"env.fix.network": "网络不通:检查网络或代理设置后重试。",
|
|
4360
4366
|
"env.fix.details": "详细输出(排障用)",
|
|
@@ -10383,11 +10389,17 @@ function readBundleInspection(spec, registry) {
|
|
|
10383
10389
|
...registry === void 0 || registry === "" ? {} : { registry }
|
|
10384
10390
|
});
|
|
10385
10391
|
}
|
|
10386
|
-
function readModuleVersions(force = false) {
|
|
10387
|
-
return apiGet(MODULE_VERSIONS_ROUTE,
|
|
10392
|
+
function readModuleVersions(force = false, check = true) {
|
|
10393
|
+
return apiGet(MODULE_VERSIONS_ROUTE, {
|
|
10394
|
+
...force ? { force: "1" } : {},
|
|
10395
|
+
...check ? {} : { check: "0" }
|
|
10396
|
+
});
|
|
10388
10397
|
}
|
|
10389
|
-
function readInstalledPlugins(force = false) {
|
|
10390
|
-
return apiGet(INSTALLED_PLUGINS_ROUTE,
|
|
10398
|
+
function readInstalledPlugins(force = false, check = true) {
|
|
10399
|
+
return apiGet(INSTALLED_PLUGINS_ROUTE, {
|
|
10400
|
+
...force ? { force: "1" } : {},
|
|
10401
|
+
...check ? {} : { check: "0" }
|
|
10402
|
+
});
|
|
10391
10403
|
}
|
|
10392
10404
|
//#endregion
|
|
10393
10405
|
//#region src/app/layouts/market/use-module-versions.ts
|
|
@@ -10416,6 +10428,10 @@ var newestForceSeq = {
|
|
|
10416
10428
|
modules: -1,
|
|
10417
10429
|
plugins: -1
|
|
10418
10430
|
};
|
|
10431
|
+
var newestDataSeq = {
|
|
10432
|
+
modules: -1,
|
|
10433
|
+
plugins: -1
|
|
10434
|
+
};
|
|
10419
10435
|
var epoch = 0;
|
|
10420
10436
|
var allSeq = 0;
|
|
10421
10437
|
function bumpModuleVersionsEpoch() {
|
|
@@ -10442,9 +10458,39 @@ function withMarketUpdates(modules, rows) {
|
|
|
10442
10458
|
};
|
|
10443
10459
|
});
|
|
10444
10460
|
}
|
|
10445
|
-
function
|
|
10446
|
-
|
|
10447
|
-
|
|
10461
|
+
function withPreviousLatest(modules, previous) {
|
|
10462
|
+
if (previous.length === 0) return modules;
|
|
10463
|
+
const byPkg = new Map(previous.map((module) => [module.pkg, module]));
|
|
10464
|
+
return modules.map((module) => {
|
|
10465
|
+
const old = byPkg.get(module.pkg);
|
|
10466
|
+
if (old === void 0) return module;
|
|
10467
|
+
return {
|
|
10468
|
+
...module,
|
|
10469
|
+
...module.latest === void 0 && old.latest !== void 0 ? { latest: old.latest } : {},
|
|
10470
|
+
...module.latestBlocked === void 0 && old.latestBlocked !== void 0 ? { latestBlocked: old.latestBlocked } : {},
|
|
10471
|
+
...module.latestUnavailable === void 0 && old.latestUnavailable !== void 0 ? { latestUnavailable: old.latestUnavailable } : {}
|
|
10472
|
+
};
|
|
10473
|
+
});
|
|
10474
|
+
}
|
|
10475
|
+
function withPreviousPluginLatest(plugins, previous) {
|
|
10476
|
+
if (previous.length === 0) return plugins;
|
|
10477
|
+
const byPkg = new Map(previous.map((plugin) => [plugin.pkg, plugin]));
|
|
10478
|
+
return plugins.map((plugin) => {
|
|
10479
|
+
const old = byPkg.get(plugin.pkg);
|
|
10480
|
+
if (old === void 0 || plugin.latest !== void 0 || old.latest === void 0) return plugin;
|
|
10481
|
+
return {
|
|
10482
|
+
...plugin,
|
|
10483
|
+
latest: old.latest
|
|
10484
|
+
};
|
|
10485
|
+
});
|
|
10486
|
+
}
|
|
10487
|
+
function withPreviousWorkbenchLatest(next, previous) {
|
|
10488
|
+
if (next === null || previous === null) return next;
|
|
10489
|
+
if (next.latest !== void 0 || previous.latest === void 0 || next.pkg !== previous.pkg) return next;
|
|
10490
|
+
return {
|
|
10491
|
+
...next,
|
|
10492
|
+
latest: previous.latest
|
|
10493
|
+
};
|
|
10448
10494
|
}
|
|
10449
10495
|
function moduleVersionsChecking(value) {
|
|
10450
10496
|
return value.allChecking || value.modulesCheck.checking || value.pluginsCheck.checking;
|
|
@@ -10475,72 +10521,104 @@ function landed(seat, ticket, latest, ok, at) {
|
|
|
10475
10521
|
checkedAt: ok ? at : seat.checkedAt
|
|
10476
10522
|
};
|
|
10477
10523
|
}
|
|
10478
|
-
function readModulesOnce(force) {
|
|
10479
|
-
return Promise.all([readModuleVersions(force), readMarketInstalled()]).catch(() => null);
|
|
10524
|
+
function readModulesOnce(force, check) {
|
|
10525
|
+
return Promise.all([readModuleVersions(force, check), readMarketInstalled()]).catch(() => null);
|
|
10480
10526
|
}
|
|
10481
|
-
function readPluginsOnce(force) {
|
|
10482
|
-
return readInstalledPlugins(force).catch(() => null);
|
|
10527
|
+
function readPluginsOnce(force, check) {
|
|
10528
|
+
return readInstalledPlugins(force, check).catch(() => null);
|
|
10483
10529
|
}
|
|
10484
|
-
function
|
|
10530
|
+
function readKey(run) {
|
|
10531
|
+
return `${run.kind}:${run.scope}:${run.force ? "force" : "cached"}`;
|
|
10532
|
+
}
|
|
10533
|
+
function superseded(run, part, ticket) {
|
|
10534
|
+
if (run.kind === "data") return ticket < newestDataSeq[part];
|
|
10535
|
+
return !run.force && ticket < newestForceSeq[part];
|
|
10536
|
+
}
|
|
10537
|
+
function runRead(run) {
|
|
10485
10538
|
const at = epoch;
|
|
10486
|
-
const
|
|
10487
|
-
|
|
10488
|
-
|
|
10539
|
+
const key = readKey(run);
|
|
10540
|
+
const running = inFlight.get(key);
|
|
10541
|
+
if (!run.fresh && running !== void 0 && running.epoch === at) return running.promise;
|
|
10542
|
+
const check = run.kind === "check";
|
|
10543
|
+
const allTicket = run.scope === "all" ? allSeq += 1 : allSeq;
|
|
10489
10544
|
const tickets = /* @__PURE__ */ new Map();
|
|
10490
|
-
for (const part of partsOf(scope)) {
|
|
10545
|
+
for (const part of partsOf(run.scope)) {
|
|
10491
10546
|
const ticket = seq$1[part] += 1;
|
|
10492
10547
|
tickets.set(part, ticket);
|
|
10493
|
-
if (force) newestForceSeq[part] = ticket;
|
|
10548
|
+
if (run.force) newestForceSeq[part] = ticket;
|
|
10549
|
+
if (!check) newestDataSeq[part] = ticket;
|
|
10494
10550
|
}
|
|
10495
|
-
publish$1(checking(scope));
|
|
10496
|
-
const
|
|
10497
|
-
const
|
|
10498
|
-
const
|
|
10499
|
-
if (at !== epoch) return;
|
|
10500
|
-
const
|
|
10501
|
-
const
|
|
10502
|
-
const
|
|
10503
|
-
const
|
|
10504
|
-
const pluginsLanded = pluginsTicket !== void 0 && (force || pluginsTicket >= newestForceSeq.plugins);
|
|
10505
|
-
const modulesOk = modulesLanded && modules !== null && modules[0].ok === true;
|
|
10506
|
-
const pluginsOk = pluginsLanded && plugins !== null && plugins.ok === true;
|
|
10551
|
+
if (check) publish$1(checking(run.scope));
|
|
10552
|
+
const modulesTicket = tickets.get("modules");
|
|
10553
|
+
const pluginsTicket = tickets.get("plugins");
|
|
10554
|
+
const modulesRead = modulesTicket === void 0 ? null : readModulesOnce(run.force, check).then((response) => {
|
|
10555
|
+
if (at !== epoch || response === null || superseded(run, "modules", modulesTicket)) return;
|
|
10556
|
+
const [modules, market] = response;
|
|
10557
|
+
const payload = modules.ok === true ? modules : null;
|
|
10558
|
+
const listed = payload === null ? null : withMarketUpdates(payload.modules, market.ok === true ? market.modules : []);
|
|
10559
|
+
const shown = listed === null ? null : check ? listed : withPreviousLatest(listed, state.modules ?? []);
|
|
10507
10560
|
publish$1({
|
|
10508
10561
|
...state,
|
|
10509
|
-
modules:
|
|
10510
|
-
workbench:
|
|
10511
|
-
selfUpdate:
|
|
10512
|
-
plugins: pluginsOk ? plugins.plugins : state.plugins,
|
|
10562
|
+
modules: shown ?? state.modules,
|
|
10563
|
+
workbench: payload === null ? state.workbench : check ? payload.workbench ?? null : withPreviousWorkbenchLatest(payload.workbench ?? null, state.workbench),
|
|
10564
|
+
selfUpdate: payload === null ? state.selfUpdate : payload.selfUpdate ?? null,
|
|
10513
10565
|
read: true,
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10566
|
+
...check ? { modulesCheck: landed(state.modulesCheck, modulesTicket, seq$1.modules, payload !== null, Date.now()) } : {}
|
|
10567
|
+
});
|
|
10568
|
+
});
|
|
10569
|
+
const pluginsRead = pluginsTicket === void 0 ? null : readPluginsOnce(run.force, check).then((response) => {
|
|
10570
|
+
if (at !== epoch || response === null || superseded(run, "plugins", pluginsTicket)) return;
|
|
10571
|
+
const ok = response.ok === true;
|
|
10572
|
+
publish$1({
|
|
10573
|
+
...state,
|
|
10574
|
+
plugins: ok ? check ? response.plugins : withPreviousPluginLatest(response.plugins, state.plugins ?? []) : state.plugins,
|
|
10575
|
+
...check ? { pluginsCheck: landed(state.pluginsCheck, pluginsTicket, seq$1.plugins, ok, Date.now()) } : {}
|
|
10576
|
+
});
|
|
10577
|
+
});
|
|
10578
|
+
const promise = Promise.all([modulesRead, pluginsRead]).then(() => {
|
|
10579
|
+
if (at !== epoch || !check || run.scope !== "all" || allTicket !== allSeq) return;
|
|
10580
|
+
if (!state.allChecking) return;
|
|
10581
|
+
publish$1({
|
|
10582
|
+
...state,
|
|
10583
|
+
allChecking: false
|
|
10517
10584
|
});
|
|
10518
10585
|
}).finally(() => {
|
|
10519
|
-
if (inFlight.get(
|
|
10586
|
+
if (inFlight.get(key)?.promise === promise) inFlight.delete(key);
|
|
10520
10587
|
});
|
|
10521
|
-
inFlight.set(
|
|
10522
|
-
force,
|
|
10588
|
+
inFlight.set(key, {
|
|
10523
10589
|
epoch: at,
|
|
10524
10590
|
promise
|
|
10525
10591
|
});
|
|
10526
10592
|
return promise;
|
|
10527
10593
|
}
|
|
10594
|
+
function runModuleVersionsRead(force = false, fresh = false, scope = "all") {
|
|
10595
|
+
return runRead({
|
|
10596
|
+
kind: "check",
|
|
10597
|
+
force,
|
|
10598
|
+
fresh,
|
|
10599
|
+
scope
|
|
10600
|
+
});
|
|
10601
|
+
}
|
|
10602
|
+
function runInstalledRead(options = {}) {
|
|
10603
|
+
return runRead({
|
|
10604
|
+
kind: "data",
|
|
10605
|
+
force: false,
|
|
10606
|
+
fresh: options.fresh === true,
|
|
10607
|
+
scope: "all"
|
|
10608
|
+
});
|
|
10609
|
+
}
|
|
10528
10610
|
function useModuleVersions() {
|
|
10529
10611
|
const value = (0, react.useSyncExternalStore)(subscribeModuleVersions, moduleVersionsValue);
|
|
10530
10612
|
const factRev = useFactRevision(CAPABILITY_FACT);
|
|
10531
|
-
const mountedRef = (0, react.useRef)(false);
|
|
10532
10613
|
(0, react.useEffect)(() => {
|
|
10533
|
-
|
|
10534
|
-
mountedRef.current = true;
|
|
10535
|
-
if (first && !shouldProbeOnEnter({
|
|
10536
|
-
checkedAt: moduleVersionsCheckedAt(state),
|
|
10537
|
-
now: Date.now(),
|
|
10538
|
-
staleMs: MARKET_STALE_MS
|
|
10539
|
-
})) return;
|
|
10540
|
-
runModuleVersionsRead(false);
|
|
10614
|
+
runInstalledRead();
|
|
10541
10615
|
}, [factRev]);
|
|
10542
10616
|
const reload = (0, react.useCallback)((options) => {
|
|
10543
|
-
|
|
10617
|
+
if (options?.check === true) {
|
|
10618
|
+
runModuleVersionsRead(options.force === true, options.fresh === true, options.scope ?? "all");
|
|
10619
|
+
return;
|
|
10620
|
+
}
|
|
10621
|
+
runInstalledRead({ fresh: options?.fresh === true });
|
|
10544
10622
|
}, []);
|
|
10545
10623
|
return {
|
|
10546
10624
|
...value,
|
|
@@ -10557,29 +10635,36 @@ function useMarketReload(input) {
|
|
|
10557
10635
|
bumpModuleVersionsEpoch();
|
|
10558
10636
|
bumpCapabilityEpoch();
|
|
10559
10637
|
forceProbe();
|
|
10560
|
-
|
|
10561
|
-
force: true,
|
|
10562
|
-
fresh: true
|
|
10563
|
-
});
|
|
10564
|
-
return;
|
|
10565
|
-
}
|
|
10566
|
-
reloadCapability();
|
|
10638
|
+
} else reloadCapability();
|
|
10567
10639
|
reloadVersions();
|
|
10568
10640
|
}, [
|
|
10569
10641
|
reloadCapability,
|
|
10570
10642
|
reloadVersions,
|
|
10571
10643
|
forceProbe
|
|
10572
10644
|
]);
|
|
10573
|
-
const
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10645
|
+
const check = (0, react.useCallback)((options) => {
|
|
10646
|
+
reloadVersions({
|
|
10647
|
+
check: true,
|
|
10648
|
+
force: options?.force === true,
|
|
10649
|
+
fresh: true,
|
|
10650
|
+
...options?.scope === void 0 ? {} : { scope: options.scope }
|
|
10651
|
+
});
|
|
10652
|
+
}, [reloadVersions]);
|
|
10653
|
+
const recheck = (0, react.useCallback)(() => {
|
|
10654
|
+
bumpCapabilityEpoch();
|
|
10655
|
+
forceProbe();
|
|
10656
|
+
check({ force: true });
|
|
10657
|
+
}, [check, forceProbe]);
|
|
10658
|
+
const checkPart = (0, react.useCallback)((part) => {
|
|
10659
|
+
check({
|
|
10660
|
+
force: true,
|
|
10661
|
+
scope: part
|
|
10662
|
+
});
|
|
10663
|
+
}, [check]);
|
|
10578
10664
|
const enteredRef = (0, react.useRef)(false);
|
|
10579
10665
|
(0, react.useEffect)(() => {
|
|
10580
10666
|
if (enteredRef.current) return;
|
|
10581
10667
|
enteredRef.current = true;
|
|
10582
|
-
reloadVersions();
|
|
10583
10668
|
if (!shouldProbeOnEnter({
|
|
10584
10669
|
checkedAt,
|
|
10585
10670
|
now: Date.now(),
|
|
@@ -10587,13 +10672,15 @@ function useMarketReload(input) {
|
|
|
10587
10672
|
})) return;
|
|
10588
10673
|
markNextProbeSilent();
|
|
10589
10674
|
forceProbe();
|
|
10675
|
+
check();
|
|
10590
10676
|
}, [
|
|
10591
10677
|
checkedAt,
|
|
10592
10678
|
forceProbe,
|
|
10593
|
-
|
|
10679
|
+
check
|
|
10594
10680
|
]);
|
|
10595
10681
|
return {
|
|
10596
10682
|
reload,
|
|
10683
|
+
recheck,
|
|
10597
10684
|
checkPart
|
|
10598
10685
|
};
|
|
10599
10686
|
}
|
|
@@ -11290,7 +11377,7 @@ function MarketPanel({ t, units, titleOf }) {
|
|
|
11290
11377
|
const openAddModule = (0, react.useCallback)(() => setAdding(true), []);
|
|
11291
11378
|
const updates = (0, react.useMemo)(() => marketUpdatesOf(modules), [modules]);
|
|
11292
11379
|
const installed = modules === null ? void 0 : withClientRefusals(modules, units.refusals());
|
|
11293
|
-
const { reload, checkPart } = useMarketReload({
|
|
11380
|
+
const { reload, recheck, checkPart } = useMarketReload({
|
|
11294
11381
|
checkedAt,
|
|
11295
11382
|
forceProbe,
|
|
11296
11383
|
reloadCapability,
|
|
@@ -11321,7 +11408,7 @@ function MarketPanel({ t, units, titleOf }) {
|
|
|
11321
11408
|
busy,
|
|
11322
11409
|
checking: checking || versionsAllChecking,
|
|
11323
11410
|
onTab: setTab,
|
|
11324
|
-
onReload:
|
|
11411
|
+
onReload: recheck,
|
|
11325
11412
|
onAdd: openAddModule
|
|
11326
11413
|
}), devMarket.strip, /* @__PURE__ */ (0, react.createElement)("div", {
|
|
11327
11414
|
id: `${MARKET_PANEL_ID}-panel-installed`,
|
|
@@ -12951,8 +13038,27 @@ var BootGate_module_default = {
|
|
|
12951
13038
|
function failedStepText(guidance, t) {
|
|
12952
13039
|
if (guidance === "path") return t("env.stepFailed.path");
|
|
12953
13040
|
if (guidance === "shell") return t("env.stepFailed.shell");
|
|
13041
|
+
if (guidance === "host") return t("env.stepFailed.host");
|
|
12954
13042
|
return t("env.stepFailed.install");
|
|
12955
13043
|
}
|
|
13044
|
+
function guidanceTextOf(guidance, t) {
|
|
13045
|
+
if (guidance === "path") return {
|
|
13046
|
+
why: t("env.fix.whyPath"),
|
|
13047
|
+
step: t("env.fix.stepPath")
|
|
13048
|
+
};
|
|
13049
|
+
if (guidance === "shell") return {
|
|
13050
|
+
why: t("env.fix.whyShell"),
|
|
13051
|
+
step: t("env.fix.stepShell")
|
|
13052
|
+
};
|
|
13053
|
+
if (guidance === "host") return {
|
|
13054
|
+
why: t("env.fix.whyHost"),
|
|
13055
|
+
step: t("env.fix.stepHost")
|
|
13056
|
+
};
|
|
13057
|
+
return {
|
|
13058
|
+
why: t("env.fix.why"),
|
|
13059
|
+
step: t("env.fix.step")
|
|
13060
|
+
};
|
|
13061
|
+
}
|
|
12956
13062
|
function stepDetailText(step, snapshot, t) {
|
|
12957
13063
|
if (step.status === "failed") return failedStepText(snapshot.guidance, t);
|
|
12958
13064
|
if (step.status === "pending" || step.status === "running") return "";
|
|
@@ -13296,10 +13402,9 @@ function createBootGate(ctx, options = {}) {
|
|
|
13296
13402
|
errorBox.hidden = snapshot.error === void 0;
|
|
13297
13403
|
const commandText = snapshot.steps.find((step) => step.status === "failed" && step.command !== void 0)?.command;
|
|
13298
13404
|
const guidance = snapshot.guidance ?? "install";
|
|
13299
|
-
const
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
fixStep.textContent = step;
|
|
13405
|
+
const advice = guidanceTextOf(guidance, t);
|
|
13406
|
+
fixWhy.textContent = advice.why;
|
|
13407
|
+
fixStep.textContent = advice.step;
|
|
13303
13408
|
const showCommand = guidance === "install" && commandText !== void 0;
|
|
13304
13409
|
fixCommand.set(showCommand ? commandText : void 0);
|
|
13305
13410
|
fixAdvice.textContent = !showCommand ? "" : snapshot.failure === "permission" ? t("env.fix.permission") : snapshot.failure === "network" ? t("env.fix.network") : "";
|