dsh-plugin-shop 0.4.6 → 0.4.7

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 CHANGED
@@ -50,9 +50,9 @@ install them once with `npm install -g @deepseek-ai/dsh pnpm` and verify with
50
50
  # holds back very recent releases, so a bare `add dsh-plugin-shop` can hand
51
51
  # you an older version for a while. Pin the current release — refresh it
52
52
  # with `npm view dsh-plugin-shop version`.
53
- dsh plugin --profile web add dsh-plugin-shop@0.4.6
53
+ dsh plugin --profile web add dsh-plugin-shop@0.4.7
54
54
  # or straight through npx, nothing installed:
55
- npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-shop@0.4.6
55
+ npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-shop@0.4.7
56
56
  ```
57
57
 
58
58
  Replace `web` with your profile if you use another one. Then restart `dsh` once — a
@@ -82,7 +82,7 @@ ls -1 "${DSH_HOME:-$HOME/.dsh}/profiles" | grep -v '^node_modules$'
82
82
  cooldown, and deterministic installs are the point of the agent path.
83
83
 
84
84
  ```sh
85
- dsh plugin --profile <profile> add dsh-plugin-shop@0.4.6
85
+ dsh plugin --profile <profile> add dsh-plugin-shop@0.4.7
86
86
  ```
87
87
 
88
88
  **3. Verify — do not skip this.** A zero exit from step 2 means pnpm resolved the
package/lib/client.js CHANGED
@@ -4640,6 +4640,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4640
4640
  }
4641
4641
  /** §7.2 once-per-second poll cadence, as a named constant. */
4642
4642
  const INSTALL_POLL_MS = 1e3;
4643
+ /** How long the check-update button reports "up to date" after a re-check
4644
+ * finds no newer release, before reverting to its idle label. */
4645
+ const CHECK_UP_TO_DATE_MS = 3e3;
4643
4646
  /** The next number of cards to show: the current window plus one batch,
4644
4647
  * clamped so the window never claims more cards than the list holds. */
4645
4648
  function nextVisibleCount(visible, total, batch) {
@@ -4830,6 +4833,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4830
4833
  updateFailed: "更新失败",
4831
4834
  updateTransportFailed: "更新请求未能送达。请稍后重试。",
4832
4835
  checkUpdate: "检查更新",
4836
+ upToDate: "已是最新版本",
4833
4837
  enabledSwitch: "启用",
4834
4838
  toggleFailed: "设置失败,请重试。",
4835
4839
  hotApplyNote: "无需重启,立即生效"
@@ -4899,6 +4903,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4899
4903
  updateFailed: "Update failed",
4900
4904
  updateTransportFailed: "The update request could not be delivered. Please retry.",
4901
4905
  checkUpdate: "Check for updates",
4906
+ upToDate: "Up to date",
4902
4907
  enabledSwitch: "Enable",
4903
4908
  toggleFailed: "Failed to update. Please retry.",
4904
4909
  hotApplyNote: "takes effect without a restart"
@@ -5757,13 +5762,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5757
5762
  cancelled = true;
5758
5763
  };
5759
5764
  }, [version, request]);
5760
- const [checkingVersion, setCheckingVersion] = (0, react.useState)(false);
5765
+ const [checkState, setCheckState] = (0, react.useState)("idle");
5766
+ const upToDateTimer = (0, react.useRef)(null);
5767
+ (0, react.useEffect)(() => () => {
5768
+ if (upToDateTimer.current !== null) clearTimeout(upToDateTimer.current);
5769
+ }, []);
5761
5770
  const checkVersion = async () => {
5762
- setCheckingVersion(true);
5771
+ setCheckState("checking");
5763
5772
  try {
5764
- setSelfVersion(await version());
5765
- } catch {} finally {
5766
- setCheckingVersion(false);
5773
+ const result = await version();
5774
+ setSelfVersion(result);
5775
+ if (result.outdated) setCheckState("idle");
5776
+ else {
5777
+ setCheckState("up-to-date");
5778
+ upToDateTimer.current = setTimeout(() => setCheckState("idle"), CHECK_UP_TO_DATE_MS);
5779
+ }
5780
+ } catch {
5781
+ setCheckState("idle");
5767
5782
  }
5768
5783
  };
5769
5784
  (0, react.useEffect)(() => {
@@ -5922,9 +5937,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5922
5937
  type: "button",
5923
5938
  className: _dsh_plugin_shop_css_e3675a89_default.checkUpdateButton,
5924
5939
  "data-shop-check-update": true,
5925
- disabled: checkingVersion,
5940
+ disabled: checkState !== "idle",
5926
5941
  onClick: () => void checkVersion(),
5927
- children: t("checkUpdate")
5942
+ children: checkState === "up-to-date" ? t("upToDate") : t("checkUpdate")
5928
5943
  }),
5929
5944
  selfVersion.outdated && selfVersion.latest !== null && selfUpdate.view.kind === "idle" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
5930
5945
  type: "button",
@@ -64,6 +64,7 @@ export declare const zh: {
64
64
  updateFailed: string;
65
65
  updateTransportFailed: string;
66
66
  checkUpdate: string;
67
+ upToDate: string;
67
68
  enabledSwitch: string;
68
69
  toggleFailed: string;
69
70
  hotApplyNote: string;
@@ -135,6 +136,7 @@ export declare const en: {
135
136
  updateFailed: string;
136
137
  updateTransportFailed: string;
137
138
  checkUpdate: string;
139
+ upToDate: string;
138
140
  enabledSwitch: string;
139
141
  toggleFailed: string;
140
142
  hotApplyNote: string;
@@ -65,6 +65,9 @@ export declare const RESTART_GRACE_MS = 3000;
65
65
  /** §8 restart handoff: how long the client waits for the new server to
66
66
  * answer before reporting the manual restart command. */
67
67
  export declare const RESTART_WAIT_MS = 30000;
68
+ /** How long the check-update button reports "up to date" after a re-check
69
+ * finds no newer release, before reverting to its idle label. */
70
+ export declare const CHECK_UP_TO_DATE_MS = 3000;
68
71
  /** How many shelf cards mount at a time. The shelf holds ~1900 entries; one
69
72
  * commit of the whole grid is ~28k DOM nodes, so the list renders in batches
70
73
  * behind a sentinel (§A1) and grows on scroll. 48 is ~3-4 rows. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-shop",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "The DeepSeek Harness plugin shop: browse, install, enable, and update dsh plugins from a git-auditable catalog.",
5
5
  "repository": {
6
6
  "type": "git",