@xi4z/dsh-utils-utils-agents 0.0.0-stage → 0.7.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/LICENSE +21 -0
- package/lib/git.d.ts +87 -0
- package/lib/git.js +403 -0
- package/lib/git.js.map +1 -0
- package/lib/global-repo.d.ts +57 -0
- package/lib/global-repo.js +301 -0
- package/lib/global-repo.js.map +1 -0
- package/lib/index.d.ts +111 -0
- package/lib/index.js +470 -0
- package/lib/index.js.map +1 -0
- package/lib/legacy.d.ts +30 -0
- package/lib/legacy.js +141 -0
- package/lib/legacy.js.map +1 -0
- package/lib/native.d.ts +74 -0
- package/lib/native.js +232 -0
- package/lib/native.js.map +1 -0
- package/lib/presets.d.ts +34 -0
- package/lib/presets.js +312 -0
- package/lib/presets.js.map +1 -0
- package/lib/shared.d.ts +105 -0
- package/lib/shared.js +507 -0
- package/lib/shared.js.map +1 -0
- package/lib/skill-discovery.d.ts +52 -0
- package/lib/skill-discovery.js +850 -0
- package/lib/skill-discovery.js.map +1 -0
- package/lib/skill-panel.d.ts +36 -0
- package/lib/skill-panel.js +409 -0
- package/lib/skill-panel.js.map +1 -0
- package/lib/update.d.ts +129 -0
- package/lib/update.js +507 -0
- package/lib/update.js.map +1 -0
- package/lib/util.d.ts +215 -0
- package/lib/util.js +475 -0
- package/lib/util.js.map +1 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +52 -3
- package/src/git.ts +444 -0
- package/src/global-repo.ts +343 -0
- package/src/index.ts +522 -0
- package/src/legacy.ts +170 -0
- package/src/native.ts +291 -0
- package/src/presets.ts +329 -0
- package/src/shared.ts +589 -0
- package/src/skill-discovery.ts +917 -0
- package/src/skill-panel.ts +488 -0
- package/src/update.ts +574 -0
- package/src/util.ts +570 -0
- package/README.md +0 -3
package/lib/update.js
ADDED
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Published-version checks for the dsh-utils bundle itself.
|
|
3
|
+
*
|
|
4
|
+
* The panel can tell the user whether a newer `@xi4z/dsh-utils` exists than the
|
|
5
|
+
* version this component runs from, and can install it automatically. Where it
|
|
6
|
+
* asks depends on how the bundle was installed in the profile:
|
|
7
|
+
*
|
|
8
|
+
* - a registry spec asks the npm `latest` document (one GET);
|
|
9
|
+
* - a GitHub spec reads the repository's `package.json` on that ref
|
|
10
|
+
* (`raw.githubusercontent.com`, no token needed for public repositories),
|
|
11
|
+
* and a branch/tag install is re-added by `pnpm add <spec>`;
|
|
12
|
+
* - a `link:`/`file:`/unknown install has no remote to install, so the npm
|
|
13
|
+
* answer is shown for reference only and nothing is ever installed.
|
|
14
|
+
*
|
|
15
|
+
* The automatic check runs shortly after activation and then every
|
|
16
|
+
* `updateCheckIntervalHours` (default 6). A manual "检查更新" asks immediately.
|
|
17
|
+
* With `updateAutoInstall` (default on) an available update is installed in the
|
|
18
|
+
* background, then reported as "installed, restart to apply": replacing a
|
|
19
|
+
* running plugin's files cannot take effect inside this process.
|
|
20
|
+
*
|
|
21
|
+
* The answer is cached in $DSH_HOME/storages/dsh-utils-agents/update.json so a
|
|
22
|
+
* restart shows the last known answer before the first network call, and a
|
|
23
|
+
* failed check never hides the last successfully read version.
|
|
24
|
+
*
|
|
25
|
+
* @module dsh-utils/utils-agents/update
|
|
26
|
+
*/
|
|
27
|
+
import { execFile } from 'node:child_process';
|
|
28
|
+
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
29
|
+
import { join, isAbsolute } from 'node:path';
|
|
30
|
+
import { randomBytes } from 'node:crypto';
|
|
31
|
+
import { agentsStorageDir, errorMessage } from './util.js';
|
|
32
|
+
/** File holding the last published-version answer. */
|
|
33
|
+
const CACHE_FILE_NAME = 'update.json';
|
|
34
|
+
/** One HTTP request to the registry or GitHub is bounded. */
|
|
35
|
+
const REQUEST_TIMEOUT_MS = 8000;
|
|
36
|
+
/** One `pnpm add` run is bounded. */
|
|
37
|
+
const INSTALL_TIMEOUT_MS = 180000;
|
|
38
|
+
/** The first automatic check runs shortly after activation, off the boot path. */
|
|
39
|
+
const FIRST_CHECK_DELAY_MS = 15000;
|
|
40
|
+
/** A Git ref pinned to a commit cannot move, so it is never re-added. */
|
|
41
|
+
const PINNED_REF = /^[0-9a-f]{40,64}$/i;
|
|
42
|
+
/** Parse `1.2.3`, `v1.2.3` and `1.2.3-beta.1`; null when it is not semver. */
|
|
43
|
+
function parseVersion(raw) {
|
|
44
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(raw.trim());
|
|
45
|
+
if (match === null)
|
|
46
|
+
return null;
|
|
47
|
+
return { core: [Number(match[1]), Number(match[2]), Number(match[3])], pre: match[4] ?? '' };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Compare two semantic versions, ignoring build metadata.
|
|
51
|
+
* @returns negative when left is older, 0 when equal, positive when newer.
|
|
52
|
+
*/
|
|
53
|
+
export function compareVersions(left, right) {
|
|
54
|
+
const a = parseVersion(left);
|
|
55
|
+
const b = parseVersion(right);
|
|
56
|
+
if (a === null || b === null)
|
|
57
|
+
return 0;
|
|
58
|
+
for (let index = 0; index < 3; index += 1) {
|
|
59
|
+
const delta = a.core[index] - b.core[index];
|
|
60
|
+
if (delta !== 0)
|
|
61
|
+
return delta;
|
|
62
|
+
}
|
|
63
|
+
// A release is newer than its prereleases; between prereleases the plain
|
|
64
|
+
// lexical order is enough for the tags this project publishes.
|
|
65
|
+
if (a.pre === b.pre)
|
|
66
|
+
return 0;
|
|
67
|
+
if (a.pre === '')
|
|
68
|
+
return 1;
|
|
69
|
+
if (b.pre === '')
|
|
70
|
+
return -1;
|
|
71
|
+
return a.pre < b.pre ? -1 : 1;
|
|
72
|
+
}
|
|
73
|
+
/** The running bundle's manifest: the package name to ask about and its version. */
|
|
74
|
+
async function packageIdentity() {
|
|
75
|
+
// lib/update.js -> packages/utils-agents -> package root.
|
|
76
|
+
const manifest = JSON.parse(await readFile(new URL('../../../package.json', import.meta.url), 'utf8'));
|
|
77
|
+
const name = typeof manifest.name === 'string' && manifest.name.trim() !== '' ? manifest.name.trim() : '@xi4z/dsh-utils';
|
|
78
|
+
const version = typeof manifest.version === 'string' && manifest.version.trim() !== '' ? manifest.version.trim() : '0.0.0';
|
|
79
|
+
return { name, version };
|
|
80
|
+
}
|
|
81
|
+
/** The profile directory the host reports, if it reports one. */
|
|
82
|
+
function profileDir(ctx) {
|
|
83
|
+
let service;
|
|
84
|
+
try {
|
|
85
|
+
service = typeof ctx.get === 'function'
|
|
86
|
+
? ctx.get('profileContext')
|
|
87
|
+
: undefined;
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
service = undefined;
|
|
91
|
+
}
|
|
92
|
+
const candidate = (service ?? ctx.profileContext);
|
|
93
|
+
const dir = candidate?.dir;
|
|
94
|
+
return typeof dir === 'string' && dir.trim() !== '' ? dir : null;
|
|
95
|
+
}
|
|
96
|
+
/** The dependency spec this profile installed the bundle from. */
|
|
97
|
+
async function profileSpec(ctx, name) {
|
|
98
|
+
const dir = profileDir(ctx);
|
|
99
|
+
if (dir === null)
|
|
100
|
+
return null;
|
|
101
|
+
try {
|
|
102
|
+
const manifest = JSON.parse(await readFile(join(dir, 'package.json'), 'utf8'));
|
|
103
|
+
const groups = [manifest.dependencies, manifest.devDependencies];
|
|
104
|
+
for (const group of groups) {
|
|
105
|
+
if (group === null || typeof group !== 'object')
|
|
106
|
+
continue;
|
|
107
|
+
const spec = group[name];
|
|
108
|
+
if (typeof spec === 'string' && spec.trim() !== '')
|
|
109
|
+
return spec.trim();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
// A profile without a readable manifest is treated as a local install.
|
|
114
|
+
}
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Read a GitHub repository out of a pnpm Git spec: `github:owner/repo`,
|
|
119
|
+
* `owner/repo`, `git+https://github.com/owner/repo.git#<ref>`, or the SSH form.
|
|
120
|
+
* A `#path:` parameter is dropped; the first remaining parameter is the ref.
|
|
121
|
+
*/
|
|
122
|
+
export function parseGitSpec(spec) {
|
|
123
|
+
let text = spec.trim();
|
|
124
|
+
if (text === '')
|
|
125
|
+
return null;
|
|
126
|
+
let ref = 'HEAD';
|
|
127
|
+
const hash = text.indexOf('#');
|
|
128
|
+
if (hash !== -1) {
|
|
129
|
+
const fragment = text.slice(hash + 1);
|
|
130
|
+
text = text.slice(0, hash);
|
|
131
|
+
const parts = fragment.split('&').filter((part) => part !== '' && !part.startsWith('path:'));
|
|
132
|
+
if (parts.length > 0)
|
|
133
|
+
ref = parts[0];
|
|
134
|
+
}
|
|
135
|
+
text = text.replace(/^git\+/, '');
|
|
136
|
+
const patterns = [
|
|
137
|
+
/^github:([^/\s]+)\/([^\s]+)$/i,
|
|
138
|
+
/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,
|
|
139
|
+
/^git@github\.com:([^/\s]+)\/([^\s]+)$/i,
|
|
140
|
+
/^(?:ssh|https?):\/\/(?:git@)?github\.com\/([^/\s]+)\/([^\s]+)$/i,
|
|
141
|
+
];
|
|
142
|
+
for (const pattern of patterns) {
|
|
143
|
+
const match = pattern.exec(text);
|
|
144
|
+
if (match === null)
|
|
145
|
+
continue;
|
|
146
|
+
const owner = match[1];
|
|
147
|
+
const repo = match[2].replace(/\.git$/i, '').replace(/\/+$/, '');
|
|
148
|
+
if (owner === '' || repo === '')
|
|
149
|
+
return null;
|
|
150
|
+
return { owner, repo, ref };
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
/** Classify one profile spec. */
|
|
155
|
+
function classifySpec(spec) {
|
|
156
|
+
if (spec === null)
|
|
157
|
+
return { kind: 'local', spec };
|
|
158
|
+
const text = spec.trim();
|
|
159
|
+
if (/^(link|file|workspace):/i.test(text) || isAbsolute(text))
|
|
160
|
+
return { kind: 'local', spec: text };
|
|
161
|
+
const git = parseGitSpec(text);
|
|
162
|
+
if (git !== null)
|
|
163
|
+
return { kind: 'git', spec: text, git };
|
|
164
|
+
return { kind: 'npm', spec: text };
|
|
165
|
+
}
|
|
166
|
+
/** The URL of one GitHub package manifest for the parsed ref. */
|
|
167
|
+
function gitManifestUrl(git) {
|
|
168
|
+
const ref = git.ref.split('/').map((part) => encodeURIComponent(part)).join('/');
|
|
169
|
+
return 'https://raw.githubusercontent.com/' + encodeURIComponent(git.owner) + '/' + encodeURIComponent(git.repo) + '/' + ref + '/package.json';
|
|
170
|
+
}
|
|
171
|
+
/** Read a manifest's version, refusing anything that is not a semver string. */
|
|
172
|
+
async function fetchVersion(url) {
|
|
173
|
+
const response = await fetch(url, {
|
|
174
|
+
headers: { accept: 'application/json' },
|
|
175
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
176
|
+
});
|
|
177
|
+
if (!response.ok)
|
|
178
|
+
throw new Error('HTTP ' + response.status);
|
|
179
|
+
const body = await response.json();
|
|
180
|
+
const version = typeof body.version === 'string' ? body.version.trim() : '';
|
|
181
|
+
if (parseVersion(version) === null)
|
|
182
|
+
throw new Error('answer carries no version');
|
|
183
|
+
return version;
|
|
184
|
+
}
|
|
185
|
+
/** The npm `latest` document for one package. */
|
|
186
|
+
async function fetchNpmLatest(registry, name) {
|
|
187
|
+
const base = registry.replace(/\/+$/, '');
|
|
188
|
+
return await fetchVersion(base + '/' + name.replace('/', '%2F') + '/latest');
|
|
189
|
+
}
|
|
190
|
+
/** Run `pnpm add` in the profile; the only place this component writes there. */
|
|
191
|
+
async function runPnpmAdd(command) {
|
|
192
|
+
const args = command.exact ? ['add', command.spec, '--save-exact'] : ['add', command.spec];
|
|
193
|
+
await new Promise((resolvePromise, reject) => {
|
|
194
|
+
execFile('pnpm', args, {
|
|
195
|
+
cwd: command.dir,
|
|
196
|
+
timeout: INSTALL_TIMEOUT_MS,
|
|
197
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
198
|
+
env: { ...process.env, CI: '1' },
|
|
199
|
+
}, (error, _stdout, stderr) => {
|
|
200
|
+
if (error === null) {
|
|
201
|
+
resolvePromise();
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const detail = String(stderr ?? '').trim().split(/\r?\n/).slice(0, 3).join(' / ');
|
|
205
|
+
reject(new Error('pnpm add failed' + (detail === '' ? '' : ': ' + detail)));
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/** The install command for one source and target version; null when it must not install. */
|
|
210
|
+
export function installCommand(source, profile, name, version) {
|
|
211
|
+
if (source.kind === 'local')
|
|
212
|
+
return null;
|
|
213
|
+
if (source.kind === 'npm')
|
|
214
|
+
return { dir: profile, spec: name + '@' + version, exact: true };
|
|
215
|
+
const spec = source.spec;
|
|
216
|
+
if (spec === null)
|
|
217
|
+
return null;
|
|
218
|
+
// A commit-pinned spec cannot move; re-adding it would only reinstall the same tree.
|
|
219
|
+
if (source.git !== undefined && PINNED_REF.test(source.git.ref))
|
|
220
|
+
return null;
|
|
221
|
+
return { dir: profile, spec, exact: false };
|
|
222
|
+
}
|
|
223
|
+
/** Restore the two files an install may rewrite, so a failed run leaves the profile as it was. */
|
|
224
|
+
async function restoreProfile(dir, saved) {
|
|
225
|
+
for (const file of saved) {
|
|
226
|
+
const path = join(dir, file.name);
|
|
227
|
+
try {
|
|
228
|
+
if (file.text === null)
|
|
229
|
+
await rm(path, { force: true });
|
|
230
|
+
else
|
|
231
|
+
await writeFile(path, file.text);
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
// A read-only profile keeps whatever pnpm left; the failure is reported anyway.
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/** The cache path under the panel's storage directory. */
|
|
239
|
+
function cachePath() {
|
|
240
|
+
return join(agentsStorageDir(), CACHE_FILE_NAME);
|
|
241
|
+
}
|
|
242
|
+
/** One install state that has not been attempted. */
|
|
243
|
+
const IDLE_INSTALL = { phase: 'idle', version: null, message: null, at: null };
|
|
244
|
+
/** Normalize a persisted install state. */
|
|
245
|
+
function normalizeInstall(raw) {
|
|
246
|
+
if (raw === null || typeof raw !== 'object')
|
|
247
|
+
return IDLE_INSTALL;
|
|
248
|
+
const record = raw;
|
|
249
|
+
const phase = record.phase;
|
|
250
|
+
if (phase !== 'installing' && phase !== 'installed' && phase !== 'failed')
|
|
251
|
+
return IDLE_INSTALL;
|
|
252
|
+
return {
|
|
253
|
+
phase,
|
|
254
|
+
version: typeof record.version === 'string' && record.version !== '' ? record.version : null,
|
|
255
|
+
message: typeof record.message === 'string' && record.message !== '' ? record.message : null,
|
|
256
|
+
at: typeof record.at === 'string' && record.at !== '' ? record.at : null,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/** Read the cached answer, ignoring anything malformed. */
|
|
260
|
+
async function readCache() {
|
|
261
|
+
let raw = null;
|
|
262
|
+
try {
|
|
263
|
+
raw = JSON.parse(await readFile(cachePath(), 'utf8'));
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
if (raw === null || typeof raw !== 'object')
|
|
269
|
+
return null;
|
|
270
|
+
const record = raw;
|
|
271
|
+
const current = typeof record.current === 'string' ? record.current : '';
|
|
272
|
+
if (current === '')
|
|
273
|
+
return null;
|
|
274
|
+
const source = record.source === 'git' || record.source === 'local' ? record.source : 'npm';
|
|
275
|
+
return {
|
|
276
|
+
current,
|
|
277
|
+
latest: typeof record.latest === 'string' && record.latest !== '' ? record.latest : null,
|
|
278
|
+
updateAvailable: record.updateAvailable === true,
|
|
279
|
+
source,
|
|
280
|
+
// A cache written before the source split stored the npm registry here.
|
|
281
|
+
origin: typeof record.origin === 'string' && record.origin !== ''
|
|
282
|
+
? record.origin
|
|
283
|
+
: typeof record.registry === 'string' ? record.registry : '',
|
|
284
|
+
checkedAt: typeof record.checkedAt === 'string' && record.checkedAt !== '' ? record.checkedAt : null,
|
|
285
|
+
attemptedAt: typeof record.attemptedAt === 'string' && record.attemptedAt !== '' ? record.attemptedAt : null,
|
|
286
|
+
error: typeof record.error === 'string' && record.error !== '' ? record.error : null,
|
|
287
|
+
install: normalizeInstall(record.install),
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/** Persist the answer atomically with mode 600; failures are the caller's business. */
|
|
291
|
+
async function writeCache(status) {
|
|
292
|
+
await mkdir(agentsStorageDir(), { recursive: true, mode: 0o700 });
|
|
293
|
+
const file = cachePath();
|
|
294
|
+
const temp = file + '.' + randomBytes(6).toString('hex') + '.tmp';
|
|
295
|
+
try {
|
|
296
|
+
await writeFile(temp, JSON.stringify(status, null, 2) + '\n', { mode: 0o600, flag: 'wx' });
|
|
297
|
+
await rename(temp, file);
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
await rm(temp, { force: true });
|
|
301
|
+
throw error;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Create the checker for one component instance.
|
|
306
|
+
* @param ctx - host context, read for the profile directory the spec lives in.
|
|
307
|
+
* @param options - live settings snapshot; registry and auto-install are read per check.
|
|
308
|
+
* @param runner - how an install runs; defaults to `pnpm add` in the profile.
|
|
309
|
+
*/
|
|
310
|
+
export function createUpdateChecker(ctx, options, runner = runPnpmAdd) {
|
|
311
|
+
let cached = null;
|
|
312
|
+
let loading = null;
|
|
313
|
+
let inFlight = null;
|
|
314
|
+
let source = null;
|
|
315
|
+
let installing = false;
|
|
316
|
+
const resolveSource = async () => {
|
|
317
|
+
if (source !== null)
|
|
318
|
+
return source;
|
|
319
|
+
const identity = await packageIdentity();
|
|
320
|
+
source = classifySpec(await profileSpec(ctx, identity.name));
|
|
321
|
+
return source;
|
|
322
|
+
};
|
|
323
|
+
const seed = async () => {
|
|
324
|
+
const identity = await packageIdentity();
|
|
325
|
+
const install = await resolveSource();
|
|
326
|
+
const stored = await readCache();
|
|
327
|
+
const origin = stored !== null && stored.origin !== ''
|
|
328
|
+
? stored.origin
|
|
329
|
+
: install.kind === 'git' && install.git !== undefined ? gitManifestUrl(install.git) : options().updateRegistry;
|
|
330
|
+
const latest = stored?.latest ?? null;
|
|
331
|
+
// A restart applies an install the cache still marks as done for the old version,
|
|
332
|
+
// and an "installing" entry left behind by a killed process is stale.
|
|
333
|
+
const storedInstall = stored?.install ?? IDLE_INSTALL;
|
|
334
|
+
const pending = storedInstall.phase === 'installed' && storedInstall.version === identity.version
|
|
335
|
+
? IDLE_INSTALL
|
|
336
|
+
: storedInstall.phase === 'installing'
|
|
337
|
+
? { phase: 'failed', version: storedInstall.version, message: '上次自动更新被中断(进程退出)', at: storedInstall.at }
|
|
338
|
+
: storedInstall;
|
|
339
|
+
return {
|
|
340
|
+
current: identity.version,
|
|
341
|
+
latest,
|
|
342
|
+
updateAvailable: latest !== null && compareVersions(latest, identity.version) > 0,
|
|
343
|
+
source: install.kind,
|
|
344
|
+
origin,
|
|
345
|
+
checkedAt: stored?.checkedAt ?? null,
|
|
346
|
+
attemptedAt: stored?.attemptedAt ?? null,
|
|
347
|
+
error: stored?.error ?? null,
|
|
348
|
+
install: pending,
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
const status = async () => {
|
|
352
|
+
if (cached !== null)
|
|
353
|
+
return cached;
|
|
354
|
+
loading ??= seed().then((value) => {
|
|
355
|
+
cached = value;
|
|
356
|
+
return value;
|
|
357
|
+
}).finally(() => { loading = null; });
|
|
358
|
+
return loading;
|
|
359
|
+
};
|
|
360
|
+
/** Install one update in the background and publish the outcome. */
|
|
361
|
+
const installInBackground = (command, version) => {
|
|
362
|
+
if (installing)
|
|
363
|
+
return;
|
|
364
|
+
installing = true;
|
|
365
|
+
void (async () => {
|
|
366
|
+
const saved = await Promise.all(['package.json', 'pnpm-lock.yaml'].map(async (name) => {
|
|
367
|
+
try {
|
|
368
|
+
return { name, text: await readFile(join(command.dir, name), 'utf8') };
|
|
369
|
+
}
|
|
370
|
+
catch {
|
|
371
|
+
return { name, text: null };
|
|
372
|
+
}
|
|
373
|
+
}));
|
|
374
|
+
let phase;
|
|
375
|
+
try {
|
|
376
|
+
await runner(command);
|
|
377
|
+
phase = { phase: 'installed', version, message: '已安装,重启 dsh web 后生效', at: new Date().toISOString() };
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
await restoreProfile(command.dir, saved);
|
|
381
|
+
phase = { phase: 'failed', version, message: errorMessage(error), at: new Date().toISOString() };
|
|
382
|
+
}
|
|
383
|
+
const current = cached;
|
|
384
|
+
if (current !== null) {
|
|
385
|
+
cached = { ...current, install: phase };
|
|
386
|
+
try {
|
|
387
|
+
await writeCache(cached);
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
// A read-only home still keeps the in-memory answer.
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
installing = false;
|
|
394
|
+
})();
|
|
395
|
+
};
|
|
396
|
+
const check = async () => {
|
|
397
|
+
if (inFlight !== null)
|
|
398
|
+
return inFlight;
|
|
399
|
+
inFlight = (async () => {
|
|
400
|
+
const previous = await status();
|
|
401
|
+
const identity = await packageIdentity();
|
|
402
|
+
const install = await resolveSource();
|
|
403
|
+
const settings = options();
|
|
404
|
+
const attemptedAt = new Date().toISOString();
|
|
405
|
+
const git = install.git;
|
|
406
|
+
const origin = install.kind === 'git' && git !== undefined ? gitManifestUrl(git) : settings.updateRegistry;
|
|
407
|
+
let next;
|
|
408
|
+
try {
|
|
409
|
+
const latest = install.kind === 'git' && git !== undefined
|
|
410
|
+
? await fetchVersion(origin)
|
|
411
|
+
: await fetchNpmLatest(settings.updateRegistry, identity.name);
|
|
412
|
+
next = {
|
|
413
|
+
...previous,
|
|
414
|
+
current: identity.version,
|
|
415
|
+
latest,
|
|
416
|
+
updateAvailable: compareVersions(latest, identity.version) > 0,
|
|
417
|
+
source: install.kind,
|
|
418
|
+
origin,
|
|
419
|
+
checkedAt: attemptedAt,
|
|
420
|
+
attemptedAt,
|
|
421
|
+
error: null,
|
|
422
|
+
};
|
|
423
|
+
const directory = profileDir(ctx);
|
|
424
|
+
const alreadyInstalled = previous.install.phase === 'installed' && previous.install.version === latest;
|
|
425
|
+
const command = next.updateAvailable && settings.updateAutoInstall && directory !== null
|
|
426
|
+
&& previous.install.phase !== 'installing' && !alreadyInstalled
|
|
427
|
+
? installCommand(install, directory, identity.name, latest)
|
|
428
|
+
: null;
|
|
429
|
+
if (command !== null) {
|
|
430
|
+
next = { ...next, install: { phase: 'installing', version: latest, message: null, at: attemptedAt } };
|
|
431
|
+
cached = next;
|
|
432
|
+
try {
|
|
433
|
+
await writeCache(next);
|
|
434
|
+
}
|
|
435
|
+
catch {
|
|
436
|
+
// The in-memory state still drives the panel.
|
|
437
|
+
}
|
|
438
|
+
installInBackground(command, latest);
|
|
439
|
+
return next;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
next = {
|
|
444
|
+
...previous,
|
|
445
|
+
current: identity.version,
|
|
446
|
+
updateAvailable: previous.latest !== null && compareVersions(previous.latest, identity.version) > 0,
|
|
447
|
+
source: install.kind,
|
|
448
|
+
origin,
|
|
449
|
+
attemptedAt,
|
|
450
|
+
error: errorMessage(error),
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
cached = next;
|
|
454
|
+
try {
|
|
455
|
+
await writeCache(next);
|
|
456
|
+
}
|
|
457
|
+
catch {
|
|
458
|
+
// A read-only home must not turn a failed check into a failed request.
|
|
459
|
+
}
|
|
460
|
+
return next;
|
|
461
|
+
})().finally(() => { inFlight = null; });
|
|
462
|
+
return inFlight;
|
|
463
|
+
};
|
|
464
|
+
return { status, check };
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Run the automatic checks: one shortly after activation, then at the
|
|
468
|
+
* configured interval. The next delay is recomputed after every run, so an
|
|
469
|
+
* interval edited in the panel is picked up without a restart.
|
|
470
|
+
*/
|
|
471
|
+
export function startUpdateWatcher(ctx, checker, options) {
|
|
472
|
+
let disposed = false;
|
|
473
|
+
let timer;
|
|
474
|
+
const schedule = (delayMs) => {
|
|
475
|
+
if (disposed)
|
|
476
|
+
return;
|
|
477
|
+
timer = setTimeout(tick, delayMs);
|
|
478
|
+
// A pending check must not keep a headless process alive.
|
|
479
|
+
timer.unref?.();
|
|
480
|
+
};
|
|
481
|
+
const tick = async () => {
|
|
482
|
+
if (disposed)
|
|
483
|
+
return;
|
|
484
|
+
const current = options();
|
|
485
|
+
if (current.updateCheck) {
|
|
486
|
+
try {
|
|
487
|
+
await checker.check();
|
|
488
|
+
}
|
|
489
|
+
catch (error) {
|
|
490
|
+
ctx.logger.warn('utils-agents: published-version check failed: ' + errorMessage(error));
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if (disposed)
|
|
494
|
+
return;
|
|
495
|
+
// Keep the timer alive even while checks are disabled, so enabling them in
|
|
496
|
+
// the panel takes effect on the next tick without a restart.
|
|
497
|
+
const next = options();
|
|
498
|
+
schedule(Math.max(1, next.updateCheckIntervalHours) * 3_600_000);
|
|
499
|
+
};
|
|
500
|
+
schedule(FIRST_CHECK_DELAY_MS);
|
|
501
|
+
ctx.effect(() => () => {
|
|
502
|
+
disposed = true;
|
|
503
|
+
if (timer !== undefined)
|
|
504
|
+
clearTimeout(timer);
|
|
505
|
+
}, 'utils-agents: update watcher');
|
|
506
|
+
}
|
|
507
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../src/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MA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