dsh-crate 0.5.4 → 0.5.6

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.
Files changed (44) hide show
  1. package/client/client.js +1832 -617
  2. package/lib/changelog.js +71 -28
  3. package/lib/gist.js +1 -1
  4. package/lib/hot.js +18 -6
  5. package/lib/index.js +10 -3
  6. package/lib/install.js +200 -9
  7. package/lib/official-desktop.js +80 -16
  8. package/lib/patch.js +223 -25
  9. package/lib/pending-checkout-links.js +123 -0
  10. package/lib/pending-updates.js +7 -4
  11. package/lib/profile.js +36 -0
  12. package/lib/registry.js +53 -22
  13. package/lib/release-blockers.js +177 -0
  14. package/lib/release-history.js +149 -0
  15. package/lib/release-updates.js +1 -34
  16. package/lib/routes.js +843 -166
  17. package/lib/sources.js +42 -2
  18. package/lib/startup-repair-report.js +46 -0
  19. package/lib/themes.js +7 -5
  20. package/lib/types/changelog.d.ts +4 -1
  21. package/lib/types/dsh-cli.d.ts +8 -0
  22. package/lib/types/gist.d.ts +1 -1
  23. package/lib/types/hot.d.ts +2 -1
  24. package/lib/types/install.d.ts +22 -4
  25. package/lib/types/official-desktop.d.ts +4 -0
  26. package/lib/types/patch.d.ts +36 -0
  27. package/lib/types/pending-checkout-links.d.ts +35 -0
  28. package/lib/types/pending-updates.d.ts +2 -0
  29. package/lib/types/profile.d.ts +3 -0
  30. package/lib/types/registry.d.ts +6 -8
  31. package/lib/types/release-blockers.d.ts +34 -0
  32. package/lib/types/release-history.d.ts +34 -0
  33. package/lib/types/release-updates.d.ts +2 -11
  34. package/lib/types/routes.d.ts +3 -0
  35. package/lib/types/sources.d.ts +11 -0
  36. package/lib/types/startup-repair-report.d.ts +20 -0
  37. package/lib/types/themes.d.ts +2 -2
  38. package/lib/types/update-notifications.d.ts +6 -0
  39. package/lib/types/updates.d.ts +19 -0
  40. package/lib/update-notifications.js +6 -4
  41. package/lib/updates.js +16 -0
  42. package/locale/en.json +1 -1
  43. package/locale/ja.json +5 -0
  44. package/package.json +2 -2
@@ -55,13 +55,15 @@ export function createUpdateNotificationMonitor(deps) {
55
55
  if (disposed || !enabled)
56
56
  return;
57
57
  nextCheckAt = Date.now() + delay;
58
- timer = setTimeout(() => { void check(stale); }, delay);
58
+ timer = setTimeout(() => { void runCheck(stale); }, delay);
59
59
  timer.unref?.();
60
60
  };
61
61
  const nextDelay = () => failures > 0
62
62
  ? Math.min(RETRY_MAX_MS, RETRY_BASE_MS * 2 ** Math.min(failures - 1, 5))
63
63
  : intervalHours * 60 * 60_000;
64
- const check = (force = false) => {
64
+ const view = (value) => deps.overlay === undefined ? value : deps.overlay(value);
65
+ const check = (force = false) => deps.overlay === undefined ? runCheck(force) : runCheck(force).then(view);
66
+ const runCheck = (force = false) => {
65
67
  if (disposed)
66
68
  return Promise.resolve({ ...updates });
67
69
  if (pending !== null) {
@@ -69,7 +71,7 @@ export function createUpdateNotificationMonitor(deps) {
69
71
  return pending;
70
72
  // A manual refresh arriving during a cache-eligible read must still
71
73
  // bypass that cache, once. Several such callers share the follow-up.
72
- queuedForce ??= pending.then(() => check(true)).finally(() => { queuedForce = null; });
74
+ queuedForce ??= pending.then(() => runCheck(true)).finally(() => { queuedForce = null; });
73
75
  return queuedForce;
74
76
  }
75
77
  stopTimer();
@@ -136,7 +138,7 @@ export function createUpdateNotificationMonitor(deps) {
136
138
  reconcile();
137
139
  return {
138
140
  enabled, intervalHours, checking: pending !== null, checkedAt, lastSuccessAt, nextCheckAt,
139
- stale, error, updates: { ...updates }, boot: deps.boot, ...deps.preferences(),
141
+ stale, error, updates: view({ ...updates }), boot: deps.boot, ...deps.preferences(),
140
142
  ...(deps.profileKey === undefined ? {} : { profileKey: deps.profileKey }),
141
143
  };
142
144
  },
package/lib/updates.js CHANGED
@@ -17,6 +17,7 @@ import { isNumericReleaseAgeWindow, readMinimumReleaseAgeMs } from './install.js
17
17
  import { isStableReleaseVersion, selectMatureUpdate, versionMaturity } from './release-candidates.js';
18
18
  import { hasDshManifest, profileDir, readGitResolutionCommit, readInstalled, readInstalledVersion, readLockCommits, readProfileBundles } from './profile.js';
19
19
  import { userPatchPackageReferences } from './patch.js';
20
+ import { activeReleaseBlockers, headlineBlocker } from './release-blockers.js';
20
21
  import { catalogRepoKey, gitCommitOfTarget, gitRefOfTarget, gitUploadPackUrl, hasSemverSelector, hostedRepoKey, githubCommitOfTarget, githubRefOfTarget, isGenerationLink, isGitHostedSpec, lookupRepoFromUrl, parseGitHubRemote, repoOfTarget } from './sources.js';
21
22
  /**
22
23
  * Whether a direct dependency is a plugin the update channel can apply (#793).
@@ -718,6 +719,21 @@ async function releaseAgeHold(name, latest, profile, activeProfileDir) {
718
719
  const until = age.at + windowMs;
719
720
  return until > Date.now() ? { until: new Date(until).toISOString(), estimated: false } : 'past';
720
721
  }
722
+ /**
723
+ * Mark the updates a known profile-level blocker would turn into a failed
724
+ * click (#1252). Applied to what is served, not to the cached registry
725
+ * answer, so a blocker learned a second ago and one that just ended both show
726
+ * on the very next read without another round of registry traffic.
727
+ */
728
+ export function applyProfileBlockers(statuses, activeProfileDir, now = Date.now()) {
729
+ if (!Object.values(statuses).some(status => status.updateAvailable === true))
730
+ return statuses;
731
+ const blocker = headlineBlocker(activeReleaseBlockers(activeProfileDir, now));
732
+ if (blocker === null)
733
+ return statuses;
734
+ const profileBlocked = { name: blocker.name, version: blocker.version, readyAt: blocker.readyAt };
735
+ return Object.fromEntries(Object.entries(statuses).map(([name, status]) => [name, status.updateAvailable === true ? { ...status, updateAvailable: false, profileBlocked } : status]));
736
+ }
721
737
  /** A hold expiration invalidates evidence; it cannot itself authorize an install. */
722
738
  function nextHoldRecheck(data) {
723
739
  return Math.min(...Object.values(data).flatMap(status => status.heldUpdate === undefined ? [] : [Date.parse(status.heldUpdate.until)]));
package/locale/en.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "meta": {
3
- "description": "Browse, search, and install DeepSeek Harness community plugins — details, one-click install, favorites, and updates in one place."
3
+ "description": "Browse, search, and install community plugins for DeepSeek Harness."
4
4
  }
5
5
  }
package/locale/ja.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "description": "DeepSeek Harness のコミュニティプラグインを閲覧・検索し、インストールできます。"
4
+ }
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-crate",
3
3
  "description": "逛一逛,点一下,装好。浏览和搜索 DeepSeek Harness 社区插件,看详情、一键安装,收藏和更新都在一处。",
4
- "version": "0.5.4",
4
+ "version": "0.5.6",
5
5
  "icon": "assets/logo.svg",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "js-yaml": "^4.3.2",
38
- "undici": "^7.29.1"
38
+ "undici": "^7.30.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@deepseek-ai/cordis": "^4.0.1",