dshmarket 1.5.0 → 1.6.0
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 +23 -1
- package/README.zh.md +21 -1
- package/client/client.js +121 -68
- package/client/client.js.map +1 -1
- package/lib/dsh-cli.js +187 -24
- package/lib/index.js +35 -5
- package/lib/install.js +26 -8
- package/lib/ndjson.js +8 -2
- package/lib/pnpm-compat.js +37 -0
- package/lib/profile.js +77 -19
- package/lib/routes.js +225 -61
- package/lib/sources.js +32 -5
- package/lib/themes.js +5 -5
- package/lib/types/dsh-cli.d.ts +34 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/install.d.ts +10 -2
- package/lib/types/pnpm-compat.d.ts +1 -1
- package/lib/types/profile.d.ts +28 -6
- package/lib/types/routes.d.ts +4 -1
- package/lib/types/sources.d.ts +11 -0
- package/lib/types/themes.d.ts +1 -1
- package/lib/types/updates.d.ts +21 -1
- package/lib/types/verify.d.ts +1 -1
- package/lib/updates.js +79 -8
- package/lib/verify.js +33 -12
- package/package.json +1 -1
- package/src/client/MarketSection.tsx +25 -6
- package/src/client/market-data.ts +43 -0
- package/src/dsh-cli.ts +234 -23
- package/src/index.ts +52 -8
- package/src/install.ts +26 -8
- package/src/ndjson.ts +7 -1
- package/src/pnpm-compat.ts +38 -0
- package/src/profile.ts +72 -17
- package/src/routes.ts +229 -58
- package/src/sources.ts +30 -5
- package/src/themes.ts +10 -5
- package/src/updates.ts +79 -9
- package/src/verify.ts +31 -11
package/README.md
CHANGED
|
@@ -25,6 +25,23 @@ dsh plugin --profile web add dshmarket
|
|
|
25
25
|
|
|
26
26
|
Restart `dsh web`, then open **Settings → Plugin Market**.
|
|
27
27
|
|
|
28
|
+
### DSH Desktop
|
|
29
|
+
|
|
30
|
+
On DSH Desktop builds that expose the public `desktopProfiles` and
|
|
31
|
+
`desktopPnpm` services, install from **Open DSH Terminal** with:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh plugin add dshmarket
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The market automatically targets the immutable active Desktop profile and
|
|
38
|
+
uses Desktop's packaged pnpm operation service. It does not probe or install a
|
|
39
|
+
system pnpm, and Desktop keeps ownership of application restart. Ordinary DSH
|
|
40
|
+
continues to use the existing profile/argv/CLI path when those services are
|
|
41
|
+
absent. The detection order follows Desktop's supported
|
|
42
|
+
[cross-environment plugin contract](https://github.com/anywhere-labs/deepseek-harness-desktop/blob/4f68147091e585aaa1d815f99d30a657b3842d7c/dsh-plugin-desktop/docs/plugin-services.md#cross-environment-plugin-optional-desktop-adapter-and-ordinary-dsh-fallback).
|
|
43
|
+
This compatibility does not mean the market is bundled with Desktop.
|
|
44
|
+
|
|
28
45
|
## What you get
|
|
29
46
|
|
|
30
47
|
- **Browse & search** the full community catalog (300+ plugins, growing daily) — category filters, star counts, top/new sorting, bilingual descriptions that follow your UI language
|
|
@@ -55,6 +72,11 @@ Installs prefer npm tarballs over full-repo GitHub downloads whenever a plugin p
|
|
|
55
72
|
|
|
56
73
|
**This repo is the market app, not the catalog.** The plugin list comes from the curated [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) registry — to get your plugin listed in the market, open a PR **there** (one entry in the list; the site and this market pick it up automatically, usually within a day). Please don't PR plugin entries against this repo.
|
|
57
74
|
|
|
75
|
+
## Roadmap & feedback
|
|
76
|
+
|
|
77
|
+
- Planned features live on the [Roadmap](https://github.com/orgs/dsh-market/projects/1) — every item welcomes community PRs (drop a note in the linked issue before starting)
|
|
78
|
+
- File bugs and ideas as [issues](https://github.com/dsh-market/dsh-market/issues); attaching the market's "Export log" makes diagnosis 10x faster
|
|
79
|
+
|
|
58
80
|
## Data source
|
|
59
81
|
|
|
60
82
|
Live from [awesome-dsh-plugin.com/plugins.json](https://awesome-dsh-plugin.com/plugins.json) — curated entries, npm mapping, and star counts refreshed daily by CI — with a bundled snapshot as offline fallback.
|
|
@@ -63,7 +85,7 @@ Live from [awesome-dsh-plugin.com/plugins.json](https://awesome-dsh-plugin.com/p
|
|
|
63
85
|
|
|
64
86
|
### DeepSeek Harness Desktop
|
|
65
87
|
|
|
66
|
-
[DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop) is a modern desktop client for the DeepSeek Harness ecosystem — start and manage a local Harness service without
|
|
88
|
+
[DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop) is a modern desktop client for the DeepSeek Harness ecosystem — start and manage a local Harness service without a system Node.js installation. Compatible builds can host a user-installed dsh-market through their public profile and package-operation services; bundling remains a Desktop project decision.
|
|
67
89
|
|
|
68
90
|
[Website](https://www.dshdesktop.cn) · [GitHub](https://github.com/anywhere-labs/deepseek-harness-desktop)
|
|
69
91
|
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,21 @@ dsh plugin --profile web add dshmarket
|
|
|
25
25
|
|
|
26
26
|
重启 `dsh web`,打开 **设置 → 插件市场**。
|
|
27
27
|
|
|
28
|
+
### DSH Desktop
|
|
29
|
+
|
|
30
|
+
如果 DSH Desktop 版本提供公开的 `desktopProfiles` 与 `desktopPnpm`
|
|
31
|
+
服务,可从 **Open DSH Terminal** 安装:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh plugin add dshmarket
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
市场会自动使用该代 Desktop 已锁定的活动 profile,以及 Desktop 内置的
|
|
38
|
+
pnpm 操作服务;不会探测或安装系统 pnpm,应用重启仍由 Desktop 负责。
|
|
39
|
+
没有这些服务的普通 DSH 会继续使用现有 profile/argv/CLI 路径。检测顺序遵循
|
|
40
|
+
Desktop 支持的[跨环境插件 contract](https://github.com/anywhere-labs/deepseek-harness-desktop/blob/4f68147091e585aaa1d815f99d30a657b3842d7c/dsh-plugin-desktop/docs/plugin-services.zh.md#跨环境插件可选-desktop-adapter-与普通-dsh-fallback)。
|
|
41
|
+
兼容 Desktop 并不代表市场已预装或捆绑进 Desktop。
|
|
42
|
+
|
|
28
43
|
## 你会得到
|
|
29
44
|
|
|
30
45
|
- **逛与搜**——完整社区目录(300+ 插件,每天在涨),分类筛选、star 数、最热/最新排序,中英描述跟随界面语言
|
|
@@ -55,6 +70,11 @@ dsh plugin --profile web add dshmarket
|
|
|
55
70
|
|
|
56
71
|
**这个仓库是市场应用本身,不是插件目录。** 市场里的插件列表来自精选列表 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin)——想让你的插件上架,请去**那边**提 PR(在列表里加一条即可,站点和本市场会自动收录,通常一天内生效)。请不要往本仓库提插件条目。
|
|
57
72
|
|
|
73
|
+
## 路线图与反馈
|
|
74
|
+
|
|
75
|
+
- 功能规划见 [Roadmap](https://github.com/orgs/dsh-market/projects/1),每一项都欢迎社区 PR(动手前在对应 issue 里说一声)
|
|
76
|
+
- Bug 与建议请提 [issue](https://github.com/dsh-market/dsh-market/issues),附上市场页面的「导出日志」能让排查快十倍
|
|
77
|
+
|
|
58
78
|
## 数据源
|
|
59
79
|
|
|
60
80
|
实时来自 [awesome-dsh-plugin.com/plugins.json](https://awesome-dsh-plugin.com/plugins.json)——精选条目、npm 映射、star 数由 CI 每日刷新——内置快照做离线兜底。
|
|
@@ -63,7 +83,7 @@ dsh plugin --profile web add dshmarket
|
|
|
63
83
|
|
|
64
84
|
### DeepSeek Harness Desktop
|
|
65
85
|
|
|
66
|
-
[DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop) 是一款为 DeepSeek Harness
|
|
86
|
+
[DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop) 是一款为 DeepSeek Harness 生态打造的现代化桌面端,无需在系统中安装 Node.js 即可启动和管理本地 Harness 服务。兼容版本可通过公开的 profile 与包操作服务运行用户自行安装的 dsh-market;是否预装仍由 Desktop 项目决定。
|
|
67
87
|
|
|
68
88
|
[访问官网](https://www.dshdesktop.cn) · [GitHub](https://github.com/anywhere-labs/deepseek-harness-desktop)
|
|
69
89
|
|
package/client/client.js
CHANGED
|
@@ -327,16 +327,56 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
327
327
|
}
|
|
328
328
|
return ids;
|
|
329
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* Repo identities stated by the dependency SPEC itself (github: installs) —
|
|
332
|
+
* hard evidence of where the package came from, unlike the name-derived
|
|
333
|
+
* mirror in depIdentities, which is only a matching aid.
|
|
334
|
+
*/
|
|
335
|
+
function depSpecRepoIds(spec) {
|
|
336
|
+
const ids = /* @__PURE__ */ new Set();
|
|
337
|
+
const m = /github:([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+)(?:#path:\/([A-Za-z0-9_./-]+))?/i.exec(spec);
|
|
338
|
+
if (m !== null) {
|
|
339
|
+
ids.add(m[1].toLowerCase());
|
|
340
|
+
if (m[2] !== void 0) ids.add(`${m[1].toLowerCase()}#path:/${m[2].toLowerCase()}`);
|
|
341
|
+
}
|
|
342
|
+
return ids;
|
|
343
|
+
}
|
|
344
|
+
/** Repo identity of a registry entry's source url (repo or repo#path form). */
|
|
345
|
+
function entryRepoIds(plugin) {
|
|
346
|
+
const ids = /* @__PURE__ */ new Set();
|
|
347
|
+
const m = /^https:\/\/github\.com\/([^/]+\/[^/]+?)(?:\/tree\/[^/]+\/(.+?))?\/?$/.exec(plugin.url);
|
|
348
|
+
if (m !== null) ids.add(m[2] !== void 0 ? `${m[1].toLowerCase()}#path:/${m[2].toLowerCase()}` : m[1].toLowerCase());
|
|
349
|
+
return ids;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* The curated registry lists distinct plugins sharing one name — twelve
|
|
353
|
+
* name-groups at the time of #66 (both dsh-usage-stats, four dsh-memory…).
|
|
354
|
+
* A name coincidence must not survive contradicting repo evidence: when the
|
|
355
|
+
* dependency's spec pins a github repo AND the entry states one, the repos
|
|
356
|
+
* decide — the loose name/npm identities only apply when at least one side
|
|
357
|
+
* carries no repo evidence (npm installs, non-github entries).
|
|
358
|
+
*/
|
|
359
|
+
function sameSourceConflict(plugin, spec) {
|
|
360
|
+
const entry = entryRepoIds(plugin);
|
|
361
|
+
const dep = depSpecRepoIds(spec);
|
|
362
|
+
if (entry.size === 0 || dep.size === 0) return false;
|
|
363
|
+
for (const id of dep) if (entry.has(id)) return false;
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
330
366
|
/** The installed dependency name a registry entry corresponds to, or null. */
|
|
331
367
|
function matchInstalledName(plugin, installed) {
|
|
332
368
|
const ids = entryIdentities(plugin);
|
|
333
|
-
for (const [name, spec] of Object.entries(installed))
|
|
369
|
+
for (const [name, spec] of Object.entries(installed)) {
|
|
370
|
+
if (sameSourceConflict(plugin, String(spec))) continue;
|
|
371
|
+
for (const id of depIdentities(name, String(spec))) if (ids.has(id)) return name;
|
|
372
|
+
}
|
|
334
373
|
return null;
|
|
335
374
|
}
|
|
336
375
|
/** The registry entry an installed dependency corresponds to, or undefined. */
|
|
337
376
|
function entryForDep(plugins, name, spec) {
|
|
338
377
|
const ids = depIdentities(name, String(spec));
|
|
339
378
|
return plugins.find((plugin) => {
|
|
379
|
+
if (sameSourceConflict(plugin, String(spec))) return false;
|
|
340
380
|
for (const id of entryIdentities(plugin)) if (ids.has(id)) return true;
|
|
341
381
|
return false;
|
|
342
382
|
});
|
|
@@ -402,86 +442,86 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
402
442
|
document.head.appendChild(tag);
|
|
403
443
|
}
|
|
404
444
|
var Market_module_css_default = {
|
|
405
|
-
"
|
|
406
|
-
"
|
|
407
|
-
"tag": "eGUBIq_tag",
|
|
408
|
-
"src": "eGUBIq_src",
|
|
445
|
+
"swatches": "eGUBIq_swatches",
|
|
446
|
+
"body": "eGUBIq_body",
|
|
409
447
|
"okState": "eGUBIq_okState",
|
|
410
|
-
"
|
|
411
|
-
"
|
|
448
|
+
"empty": "eGUBIq_empty",
|
|
449
|
+
"desc": "eGUBIq_desc",
|
|
450
|
+
"modalNote": "eGUBIq_modalNote",
|
|
451
|
+
"dangerArmed": "eGUBIq_dangerArmed",
|
|
452
|
+
"sizeOn": "eGUBIq_sizeOn",
|
|
412
453
|
"filterTitle": "eGUBIq_filterTitle",
|
|
454
|
+
"warnLine": "eGUBIq_warnLine",
|
|
455
|
+
"actLive": "eGUBIq_actLive",
|
|
456
|
+
"cmdSummary": "eGUBIq_cmdSummary",
|
|
457
|
+
"foot": "eGUBIq_foot",
|
|
458
|
+
"filterBtnOn": "eGUBIq_filterBtnOn",
|
|
459
|
+
"grow": "eGUBIq_grow",
|
|
460
|
+
"actBroken": "eGUBIq_actBroken",
|
|
461
|
+
"act": "eGUBIq_act",
|
|
462
|
+
"pagerSize": "eGUBIq_pagerSize",
|
|
463
|
+
"pageOn": "eGUBIq_pageOn",
|
|
464
|
+
"barWave": "eGUBIq_barWave",
|
|
465
|
+
"tag": "eGUBIq_tag",
|
|
466
|
+
"head": "eGUBIq_head",
|
|
467
|
+
"searchInline": "eGUBIq_searchInline",
|
|
468
|
+
"tab": "eGUBIq_tab",
|
|
413
469
|
"filterBtn": "eGUBIq_filterBtn",
|
|
414
|
-
"owner": "eGUBIq_owner",
|
|
415
|
-
"sect": "eGUBIq_sect",
|
|
416
|
-
"err": "eGUBIq_err",
|
|
417
|
-
"catsToggle": "eGUBIq_catsToggle",
|
|
418
|
-
"card": "eGUBIq_card",
|
|
419
470
|
"catsWrap": "eGUBIq_catsWrap",
|
|
420
|
-
"
|
|
421
|
-
"
|
|
422
|
-
"
|
|
423
|
-
"
|
|
424
|
-
"
|
|
425
|
-
"
|
|
426
|
-
"
|
|
471
|
+
"catsToggle": "eGUBIq_catsToggle",
|
|
472
|
+
"title": "eGUBIq_title",
|
|
473
|
+
"themesGrid": "eGUBIq_themesGrid",
|
|
474
|
+
"nm": "eGUBIq_nm",
|
|
475
|
+
"pager": "eGUBIq_pager",
|
|
476
|
+
"irow": "eGUBIq_irow",
|
|
477
|
+
"pageBtn": "eGUBIq_pageBtn",
|
|
478
|
+
"staleAction": "eGUBIq_staleAction",
|
|
479
|
+
"pageInfo": "eGUBIq_pageInfo",
|
|
480
|
+
"err": "eGUBIq_err",
|
|
427
481
|
"catsCollapsed": "eGUBIq_catsCollapsed",
|
|
428
482
|
"actWarn": "eGUBIq_actWarn",
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"
|
|
483
|
+
"actWhy": "eGUBIq_actWhy",
|
|
484
|
+
"src": "eGUBIq_src",
|
|
485
|
+
"card": "eGUBIq_card",
|
|
432
486
|
"star": "eGUBIq_star",
|
|
433
487
|
"dangerBtn": "eGUBIq_dangerBtn",
|
|
434
|
-
"
|
|
435
|
-
"
|
|
436
|
-
"
|
|
437
|
-
"on": "eGUBIq_on",
|
|
438
|
-
"restart": "eGUBIq_restart",
|
|
439
|
-
"dangerArmed": "eGUBIq_dangerArmed",
|
|
440
|
-
"foot": "eGUBIq_foot",
|
|
488
|
+
"pct": "eGUBIq_pct",
|
|
489
|
+
"filterGroup": "eGUBIq_filterGroup",
|
|
490
|
+
"pageEllipsis": "eGUBIq_pageEllipsis",
|
|
441
491
|
"grid": "eGUBIq_grid",
|
|
442
|
-
"tabs": "eGUBIq_tabs",
|
|
443
|
-
"empty": "eGUBIq_empty",
|
|
444
|
-
"warnLine": "eGUBIq_warnLine",
|
|
445
|
-
"sp": "eGUBIq_sp",
|
|
446
492
|
"dshmSlide": "eGUBIq_dshmSlide",
|
|
493
|
+
"av": "eGUBIq_av",
|
|
447
494
|
"sizeBtn": "eGUBIq_sizeBtn",
|
|
448
|
-
"
|
|
449
|
-
"pageInfo": "eGUBIq_pageInfo",
|
|
450
|
-
"pct": "eGUBIq_pct",
|
|
451
|
-
"desc": "eGUBIq_desc",
|
|
452
|
-
"pageBtn": "eGUBIq_pageBtn",
|
|
495
|
+
"root": "eGUBIq_root",
|
|
453
496
|
"filterWrap": "eGUBIq_filterWrap",
|
|
454
|
-
"
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"irow": "eGUBIq_irow",
|
|
460
|
-
"filterPanel": "eGUBIq_filterPanel",
|
|
461
|
-
"filterGroup": "eGUBIq_filterGroup",
|
|
497
|
+
"pagerPages": "eGUBIq_pagerPages",
|
|
498
|
+
"row1": "eGUBIq_row1",
|
|
499
|
+
"owner": "eGUBIq_owner",
|
|
500
|
+
"warnBtn": "eGUBIq_warnBtn",
|
|
501
|
+
"tabs": "eGUBIq_tabs",
|
|
462
502
|
"titleRow": "eGUBIq_titleRow",
|
|
463
|
-
"searchInline": "eGUBIq_searchInline",
|
|
464
503
|
"barFill": "eGUBIq_barFill",
|
|
504
|
+
"spec": "eGUBIq_spec",
|
|
465
505
|
"cmdDetails": "eGUBIq_cmdDetails",
|
|
466
|
-
"
|
|
467
|
-
"
|
|
468
|
-
"
|
|
469
|
-
"modalNote": "eGUBIq_modalNote",
|
|
470
|
-
"grow": "eGUBIq_grow",
|
|
471
|
-
"pager": "eGUBIq_pager",
|
|
472
|
-
"row1": "eGUBIq_row1",
|
|
473
|
-
"head": "eGUBIq_head",
|
|
506
|
+
"top": "eGUBIq_top",
|
|
507
|
+
"sub": "eGUBIq_sub",
|
|
508
|
+
"restart": "eGUBIq_restart",
|
|
474
509
|
"descTight": "eGUBIq_descTight",
|
|
475
|
-
"
|
|
510
|
+
"progress": "eGUBIq_progress",
|
|
511
|
+
"cmd": "eGUBIq_cmd",
|
|
476
512
|
"bar": "eGUBIq_bar",
|
|
477
|
-
"sub": "eGUBIq_sub",
|
|
478
|
-
"av": "eGUBIq_av",
|
|
479
|
-
"actBroken": "eGUBIq_actBroken",
|
|
480
|
-
"top": "eGUBIq_top",
|
|
481
|
-
"pageOn": "eGUBIq_pageOn",
|
|
482
|
-
"sizeOn": "eGUBIq_sizeOn",
|
|
483
513
|
"cancelBtn": "eGUBIq_cancelBtn",
|
|
484
|
-
"
|
|
514
|
+
"sect": "eGUBIq_sect",
|
|
515
|
+
"spin": "eGUBIq_spin",
|
|
516
|
+
"filterPanel": "eGUBIq_filterPanel",
|
|
517
|
+
"dot": "eGUBIq_dot",
|
|
518
|
+
"catsRow": "eGUBIq_catsRow",
|
|
519
|
+
"sp": "eGUBIq_sp",
|
|
520
|
+
"loading": "eGUBIq_loading",
|
|
521
|
+
"on": "eGUBIq_on",
|
|
522
|
+
"cats": "eGUBIq_cats",
|
|
523
|
+
"filterOption": "eGUBIq_filterOption",
|
|
524
|
+
"sizeLabel": "eGUBIq_sizeLabel"
|
|
485
525
|
};
|
|
486
526
|
//#endregion
|
|
487
527
|
//#region src/client/MarketSection.tsx
|
|
@@ -649,7 +689,11 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
649
689
|
const [pageSize, setPageSize] = (0, react.useState)(DEFAULT_PAGE_SIZE);
|
|
650
690
|
/** Determinate percent parsed from pnpm's Progress line, when available. */
|
|
651
691
|
const [progressPct, setProgressPct] = (0, react.useState)(null);
|
|
652
|
-
/**
|
|
692
|
+
/**
|
|
693
|
+
* Blocked build scripts from the last install or update: enables
|
|
694
|
+
* approve-and-retry (#6; updates in #69). Exactly one of `plugin`
|
|
695
|
+
* (retry installs it) / `updateName` (retry re-runs the update) is set.
|
|
696
|
+
*/
|
|
653
697
|
const [buildsSkipped, setBuildsSkipped] = (0, react.useState)(null);
|
|
654
698
|
const [updatingAll, setUpdatingAll] = (0, react.useState)(false);
|
|
655
699
|
const [updatedNames, setUpdatedNames] = (0, react.useState)([]);
|
|
@@ -724,7 +768,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
724
768
|
}, [bootId]);
|
|
725
769
|
(0, react.useEffect)(() => {
|
|
726
770
|
if (bootId === null) return;
|
|
727
|
-
if (doneUrls.length === 0 && updatedNames.length === 0 && removedCount === 0)
|
|
771
|
+
if (doneUrls.length === 0 && updatedNames.length === 0 && removedCount === 0) {
|
|
772
|
+
sessionStorage.removeItem("dshm-restart");
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
728
775
|
sessionStorage.setItem("dshm-restart", JSON.stringify({
|
|
729
776
|
boot: bootId,
|
|
730
777
|
doneUrls,
|
|
@@ -911,6 +958,7 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
911
958
|
setActivationWarnings(warns);
|
|
912
959
|
}
|
|
913
960
|
if (body.hot) {
|
|
961
|
+
setDoneUrls((urls) => urls.filter((url) => url !== plugin.url));
|
|
914
962
|
setHotUrls((urls) => urls.includes(plugin.url) ? urls : urls.concat(plugin.url));
|
|
915
963
|
setHotNames((names) => names.includes(plugin.name) ? names : names.concat(plugin.name));
|
|
916
964
|
} else setDoneUrls((urls) => urls.includes(plugin.url) ? urls : urls.concat(plugin.url));
|
|
@@ -1026,6 +1074,10 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
1026
1074
|
return;
|
|
1027
1075
|
}
|
|
1028
1076
|
if (body.stale === true) setStaleName(name);
|
|
1077
|
+
if (Array.isArray(body.ignoredBuilds) && body.ignoredBuilds.length > 0) setBuildsSkipped({
|
|
1078
|
+
updateName: name,
|
|
1079
|
+
names: body.ignoredBuilds.map(String)
|
|
1080
|
+
});
|
|
1029
1081
|
const text = (v) => typeof v === "string" ? v : v && typeof v.text === "string" ? v.text : v == null ? "" : JSON.stringify(v);
|
|
1030
1082
|
const detail = text(body.error) || [text(body.stderr), text(body.stdout)].filter(Boolean).join("\n").trim() || "exit " + body.exitCode;
|
|
1031
1083
|
setInstallError(t("updateFail") + ": " + name + " — " + detail.trim().slice(-600));
|
|
@@ -1549,15 +1601,16 @@ window.__ModuleLoader__.load({ id: "dshmarket", factory: (require) => {
|
|
|
1549
1601
|
size: "sm",
|
|
1550
1602
|
disabled: busyUrl !== null,
|
|
1551
1603
|
onClick: () => {
|
|
1552
|
-
const { plugin, names } = buildsSkipped;
|
|
1604
|
+
const { plugin, updateName, names } = buildsSkipped;
|
|
1553
1605
|
setBuildsSkipped(null);
|
|
1554
1606
|
fetch("/dsh-market/approve-builds", {
|
|
1555
1607
|
method: "POST",
|
|
1556
1608
|
headers: { "content-type": "application/json" },
|
|
1557
1609
|
body: JSON.stringify({ packages: names })
|
|
1558
1610
|
}).then((res) => res.json()).then((body) => {
|
|
1559
|
-
if (body.ok)
|
|
1560
|
-
else
|
|
1611
|
+
if (!body.ok) setInstallError(String(body.error || "approve failed"));
|
|
1612
|
+
else if (plugin !== void 0) doInstall(plugin);
|
|
1613
|
+
else if (updateName !== void 0) doUpdate(updateName);
|
|
1561
1614
|
}).catch((error) => setInstallError(String(error)));
|
|
1562
1615
|
},
|
|
1563
1616
|
children: t("approveBuilds")
|