dsh-crate 0.5.5 → 0.5.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/client/client.js +1767 -617
- package/lib/changelog.js +71 -28
- package/lib/gist.js +1 -1
- package/lib/hot.js +18 -6
- package/lib/index.js +10 -3
- package/lib/install.js +200 -9
- package/lib/official-desktop.js +80 -16
- package/lib/patch.js +223 -25
- package/lib/pending-checkout-links.js +123 -0
- package/lib/pending-updates.js +7 -4
- package/lib/profile.js +36 -0
- package/lib/registry.js +38 -20
- package/lib/release-blockers.js +177 -0
- package/lib/release-history.js +149 -0
- package/lib/release-updates.js +1 -34
- package/lib/routes.js +843 -166
- package/lib/sources.js +42 -2
- package/lib/startup-repair-report.js +46 -0
- package/lib/themes.js +7 -5
- package/lib/types/changelog.d.ts +4 -1
- package/lib/types/dsh-cli.d.ts +8 -0
- package/lib/types/gist.d.ts +1 -1
- package/lib/types/hot.d.ts +2 -1
- package/lib/types/install.d.ts +22 -4
- package/lib/types/official-desktop.d.ts +4 -0
- package/lib/types/patch.d.ts +36 -0
- package/lib/types/pending-checkout-links.d.ts +35 -0
- package/lib/types/pending-updates.d.ts +2 -0
- package/lib/types/profile.d.ts +3 -0
- package/lib/types/registry.d.ts +6 -8
- package/lib/types/release-blockers.d.ts +34 -0
- package/lib/types/release-history.d.ts +34 -0
- package/lib/types/release-updates.d.ts +2 -11
- package/lib/types/routes.d.ts +3 -0
- package/lib/types/sources.d.ts +11 -0
- package/lib/types/startup-repair-report.d.ts +20 -0
- package/lib/types/themes.d.ts +2 -2
- package/lib/types/update-notifications.d.ts +6 -0
- package/lib/types/updates.d.ts +19 -0
- package/lib/update-notifications.js +6 -4
- package/lib/updates.js +16 -0
- package/locale/en.json +1 -1
- package/locale/ja.json +5 -0
- 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
|
|
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
|
|
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(() =>
|
|
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
package/locale/ja.json
ADDED
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
|
+
"version": "0.5.7",
|
|
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.
|
|
38
|
+
"undici": "^7.30.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@deepseek-ai/cordis": "^4.0.1",
|