dsh-multi-router 0.6.10 → 0.6.12
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/CHANGELOG.md +12 -0
- package/README.md +13 -3
- package/cordis.patch.yml +2 -2
- package/lib/api-service.js +2 -2
- package/lib/{chunk-R2Z4WGR6.js → chunk-4L2CBGXN.js} +31 -27
- package/lib/chunk-4L2CBGXN.js.map +7 -0
- package/lib/{chunk-LXDLKLM6.js → chunk-NZF36O5I.js} +2 -2
- package/lib/{chunk-47YTECKF.js → chunk-TM5XDMGY.js} +2 -2
- package/lib/{chunk-P7CNCBSY.js → chunk-V37VG7MN.js} +62 -20
- package/lib/chunk-V37VG7MN.js.map +7 -0
- package/lib/{chunk-LH6RKOZD.js → chunk-WDIT4E2W.js} +2 -2
- package/lib/cli.js +2 -2
- package/lib/client.js +14 -2
- package/lib/client.js.map +2 -2
- package/lib/clients.js +2 -2
- package/lib/{host-v0.6.10.js → host-v0.6.12.js} +5 -5
- package/lib/host.js +5 -5
- package/lib/index.js +5 -5
- package/lib/manager.js +4 -4
- package/lib/router.js +1 -1
- package/lib/shim.js +2 -2
- package/package.json +1 -1
- package/lib/chunk-P7CNCBSY.js.map +0 -7
- package/lib/chunk-R2Z4WGR6.js.map +0 -7
- /package/lib/{chunk-LXDLKLM6.js.map → chunk-NZF36O5I.js.map} +0 -0
- /package/lib/{chunk-47YTECKF.js.map → chunk-TM5XDMGY.js.map} +0 -0
- /package/lib/{chunk-LH6RKOZD.js.map → chunk-WDIT4E2W.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-DNQPZMPF.js";
|
|
5
5
|
import {
|
|
6
6
|
RouteError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4L2CBGXN.js";
|
|
8
8
|
import {
|
|
9
9
|
REASONING_EFFORTS
|
|
10
10
|
} from "./chunk-GEBZMIMA.js";
|
|
@@ -117,4 +117,4 @@ function createShim(router, { modelPrefix = "" } = {}) {
|
|
|
117
117
|
export {
|
|
118
118
|
createShim
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-WDIT4E2W.js.map
|
package/lib/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createAccountClient
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NZF36O5I.js";
|
|
5
5
|
import {
|
|
6
6
|
importAccount
|
|
7
7
|
} from "./chunk-2UM45OXY.js";
|
|
@@ -11,7 +11,7 @@ import "./chunk-S5KMFAQM.js";
|
|
|
11
11
|
import "./chunk-4V52V5GO.js";
|
|
12
12
|
import {
|
|
13
13
|
Router
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4L2CBGXN.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_ROUTES,
|
|
17
17
|
PROVIDERS,
|
package/lib/client.js
CHANGED
|
@@ -50,7 +50,7 @@ module.exports = __toCommonJS(client_exports);
|
|
|
50
50
|
var import_react = require("react");
|
|
51
51
|
|
|
52
52
|
// package.json
|
|
53
|
-
var version = "0.6.
|
|
53
|
+
var version = "0.6.12";
|
|
54
54
|
|
|
55
55
|
// src/client.jsx
|
|
56
56
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -2594,9 +2594,10 @@ function PluginUpdatesPanel({ data, busy, act }) {
|
|
|
2594
2594
|
if (data?.available && !running) void act({ action: !data.checkedAt || Date.now() - data.checkedAt > 864e5 ? "plugins.check" : "plugins.list" });
|
|
2595
2595
|
}, []);
|
|
2596
2596
|
const chosen = available.filter((r) => selected.includes(r.name));
|
|
2597
|
+
const freshVersions = plan?.kind === "update" ? [...new Set(plan.rows.filter((r) => r.source.kind === "npm" && r.latestVersion).map((r) => `${r.source.package}@${r.latestVersion}`))] : [];
|
|
2597
2598
|
const visibleRows = rows.filter((r) => r.name.toLowerCase().includes(pluginSearch.toLowerCase()) && (filter === "all" || (filter === "updates" ? available.includes(r) : r.source.kind === filter)));
|
|
2598
2599
|
async function submitPlan() {
|
|
2599
|
-
if (await act(plan.kind === "install" ? { action: "plugins.install", spec: plan.spec, registry: registry || void 0 } : { action: "plugins.update", names: plan.rows.map((r) => r.name), registry: registry || void 0 })) {
|
|
2600
|
+
if (await act(plan.kind === "install" ? { action: "plugins.install", spec: plan.spec, registry: registry || void 0 } : { action: "plugins.update", names: plan.rows.map((r) => r.name), registry: registry || void 0, allowFreshVersions: plan.allowFresh !== false ? freshVersions : [] })) {
|
|
2600
2601
|
setPlan(null);
|
|
2601
2602
|
setSelected([]);
|
|
2602
2603
|
}
|
|
@@ -2772,6 +2773,17 @@ function PluginUpdatesPanel({ data, busy, act }) {
|
|
|
2772
2773
|
"\u3002"
|
|
2773
2774
|
] })
|
|
2774
2775
|
] }, r.name)),
|
|
2776
|
+
freshVersions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "steps stack", children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "check", children: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", disabled: blocked, checked: plan.allowFresh !== false, onChange: (e) => setPlan((p) => ({ ...p, allowFresh: e.target.checked })) }),
|
|
2779
|
+
"\u5141\u8BB8\u672C\u6B21\u6307\u5B9A\u7248\u672C\u7ACB\u5373\u5B89\u88C5\uFF08\u4E0D\u7B49\u5F85 24 \u5C0F\u65F6\uFF09"
|
|
2780
|
+
] }),
|
|
2781
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "notice", children: [
|
|
2782
|
+
"\u786E\u8BA4\u66F4\u65B0\u540E\uFF0C\u4EC5\u4E3A\u4EE5\u4E0B\u7248\u672C\u4FDD\u5B58\u7B49\u5F85\u671F\u4F8B\u5916\uFF1A",
|
|
2783
|
+
freshVersions.join("\u3001"),
|
|
2784
|
+
"\u3002\u65B0\u5305\u7B49\u5F85\u671F\u7528\u4E8E\u964D\u4F4E\u4F9B\u5E94\u94FE\u98CE\u9669\uFF1B\u5176\u4ED6\u7248\u672C\u3001\u4F9D\u8D56\u548C\u811A\u672C\u6388\u6743\u4ECD\u9075\u5B88 DSH \u7B56\u7565\u3002\u53EF\u53D6\u6D88\u52FE\u9009\uFF0C\u7EE7\u7EED\u9075\u5B88\u7B49\u5F85\u671F\u3002"
|
|
2785
|
+
] })
|
|
2786
|
+
] }),
|
|
2775
2787
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "notice", children: [
|
|
2776
2788
|
"npm \u5B89\u88C5\u6E90\uFF1A",
|
|
2777
2789
|
registry || "\u6CBF\u7528 DSH \u8BBE\u7F6E"
|