@detergent-software/atk 9.0.0-dev.1 → 9.0.0-dev.3
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 +18 -0
- package/build/command-manifest.json +10 -0
- package/build/commands/doctor.d.ts +3 -1
- package/build/commands/doctor.d.ts.map +1 -1
- package/build/commands/doctor.js +121 -4
- package/build/commands/doctor.js.map +1 -1
- package/build/components/DiagnosticList.d.ts +4 -0
- package/build/components/DiagnosticList.d.ts.map +1 -1
- package/build/components/DiagnosticList.js +1 -1
- package/build/components/DiagnosticList.js.map +1 -1
- package/build/lib/diagnostics.d.ts +34 -0
- package/build/lib/diagnostics.d.ts.map +1 -1
- package/build/lib/diagnostics.js +433 -50
- package/build/lib/diagnostics.js.map +1 -1
- package/build/lib/doctor-fix.d.ts +33 -0
- package/build/lib/doctor-fix.d.ts.map +1 -0
- package/build/lib/doctor-fix.js +153 -0
- package/build/lib/doctor-fix.js.map +1 -0
- package/build/lib/publish-flow.d.ts.map +1 -1
- package/build/lib/publish-flow.js +25 -3
- package/build/lib/publish-flow.js.map +1 -1
- package/build/lib/registry.d.ts +5 -0
- package/build/lib/registry.d.ts.map +1 -1
- package/build/lib/registry.js +11 -0
- package/build/lib/registry.js.map +1 -1
- package/build/lib/update-check.d.ts +17 -0
- package/build/lib/update-check.d.ts.map +1 -1
- package/build/lib/update-check.js +36 -4
- package/build/lib/update-check.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [9.0.0-dev.3](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.0.0-dev.2&targetVersion=GTv9.0.0-dev.3) (2026-10-21)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **cli:** atk doctor runs real checks and offers --fix (ATK-617) ([1d026a9](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/1d026a982365f4457d13617ae88f114dd327a06d))
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **cli:** confirm doctor's sign-in repair and skip undeclared hooks (ATK-617) ([c665d71](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/c665d717ea2052c6fd2d6c4795355a9e6807b14c))
|
|
10
|
+
* **cli:** keep doctor --fix from signing out a working session (ATK-617) ([9f0513b](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/9f0513b4037141681634c4a5b28fee5803203e21))
|
|
11
|
+
|
|
12
|
+
## [9.0.0-dev.2](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv9.0.0-dev.1&targetVersion=GTv9.0.0-dev.2) (2026-10-20)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **cli:** name the resolved asset in the --update README hint (ATK-678) ([2995d86](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/2995d868246cd978073bd48f6cb7d5f1f34bd68d))
|
|
17
|
+
* **cli:** point publish --update at atk checkout for a placeholder README (ATK-678) ([69f71fd](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/commit/69f71fd79d683ee19ffdad22b48e1bb6bcdd5889))
|
|
18
|
+
|
|
1
19
|
## [9.0.0-dev.1](https://emergentcode.visualstudio.com/Emergent%20Software/_git/Emergent.AgenticToolkit/branchCompare?baseVersion=GTv8.10.0-dev.3&targetVersion=GTv9.0.0-dev.1) (2026-10-20)
|
|
2
20
|
|
|
3
21
|
### ⚠ BREAKING CHANGES
|
|
@@ -272,6 +272,11 @@
|
|
|
272
272
|
"description": "Check environment health and diagnose issues",
|
|
273
273
|
"file": "doctor.js",
|
|
274
274
|
"options": [
|
|
275
|
+
{
|
|
276
|
+
"flags": "--fix",
|
|
277
|
+
"description": "Repair what it can (a corrupt cache, missing files, an expired sign-in), asking first",
|
|
278
|
+
"defaultValue": false
|
|
279
|
+
},
|
|
275
280
|
{
|
|
276
281
|
"flags": "-j, --json",
|
|
277
282
|
"description": "Output raw JSON (for scripting and CI)",
|
|
@@ -285,6 +290,11 @@
|
|
|
285
290
|
"flags": "--user",
|
|
286
291
|
"description": "Use the user scope (the user root, ~ by default) instead of the project",
|
|
287
292
|
"defaultValue": false
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"flags": "-y, --yes",
|
|
296
|
+
"description": "With --fix, repair without asking",
|
|
297
|
+
"defaultValue": false
|
|
288
298
|
}
|
|
289
299
|
]
|
|
290
300
|
},
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const description = "Check environment health and diagnose issues";
|
|
3
3
|
export declare const options: z.ZodObject<{
|
|
4
|
+
fix: z.ZodDefault<z.ZodBoolean>;
|
|
4
5
|
json: z.ZodDefault<z.ZodBoolean>;
|
|
5
6
|
projectRoot: z.ZodOptional<z.ZodString>;
|
|
6
7
|
user: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
yes: z.ZodDefault<z.ZodBoolean>;
|
|
7
9
|
}, z.core.$strip>;
|
|
8
10
|
type Props = {
|
|
9
11
|
options: z.infer<typeof options>;
|
|
10
12
|
};
|
|
11
|
-
export default function Doctor({ options: { json, projectRoot, user } }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function Doctor({ options: { fix, json, projectRoot, user, yes } }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
13
15
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,WAAW,iDAAiD,CAAC;AAE1E,eAAO,MAAM,OAAO;;;;;;iBA4ClB,CAAC;AA+BH,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,2CAmJvF"}
|
package/build/commands/doctor.js
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
2
|
+
import { Box, Text, useApp } from 'ink';
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import { DiagnosticList, ErrorView, Link, Spinner } from '../components/index.js';
|
|
5
6
|
import { useCommand } from '../hooks/useCommand.js';
|
|
7
|
+
import { useConfirmation } from '../hooks/useConfirmation.js';
|
|
8
|
+
import { CONFIRMATION_REQUIRED_CODE } from '../lib/confirmation-required.js';
|
|
6
9
|
import { runDiagnostics } from '../lib/diagnostics.js';
|
|
10
|
+
import { applyFix, planFixes } from '../lib/doctor-fix.js';
|
|
11
|
+
import { errorMessage } from '../lib/errors.js';
|
|
7
12
|
import { renderJson, useNonInteractive } from '../lib/output.js';
|
|
8
13
|
import { option } from '../lib/pastel/index.js';
|
|
9
14
|
import { buildGettingStartedWebUrl } from '../lib/web-app.js';
|
|
10
15
|
export const description = 'Check environment health and diagnose issues';
|
|
11
16
|
export const options = z.object({
|
|
17
|
+
fix: z
|
|
18
|
+
.boolean()
|
|
19
|
+
.default(false)
|
|
20
|
+
.describe(option({
|
|
21
|
+
description: 'Repair what it can (a corrupt cache, missing files, an expired sign-in), asking first',
|
|
22
|
+
})),
|
|
12
23
|
json: z
|
|
13
24
|
.boolean()
|
|
14
25
|
.default(false)
|
|
@@ -29,12 +40,66 @@ export const options = z.object({
|
|
|
29
40
|
.describe(option({
|
|
30
41
|
description: 'Use the user scope (the user root, ~ by default) instead of the project',
|
|
31
42
|
})),
|
|
43
|
+
yes: z
|
|
44
|
+
.boolean()
|
|
45
|
+
.default(false)
|
|
46
|
+
.describe(option({
|
|
47
|
+
alias: 'y',
|
|
48
|
+
description: 'With --fix, repair without asking',
|
|
49
|
+
})),
|
|
32
50
|
});
|
|
33
|
-
|
|
51
|
+
/** The registry writes' message names `--dry-run`, which doctor doesn't have: the plan is in `fixes`. */
|
|
52
|
+
const FIX_CONFIRMATION_MESSAGE = "Confirmation required: this run can't prompt (--json, or no TTY on stdin). Use --yes (-y) to apply the repairs in fixes.";
|
|
53
|
+
export default function Doctor({ options: { fix, json, projectRoot, user, yes } }) {
|
|
54
|
+
const { exit } = useApp();
|
|
34
55
|
const { json: effectiveJson } = useNonInteractive(json);
|
|
35
56
|
const state = useCommand(async (progress) => {
|
|
36
57
|
return runDiagnostics(progress, { projectRoot, user });
|
|
37
58
|
}, [projectRoot, user], 'Running diagnostics...');
|
|
59
|
+
const fixes = useMemo(() => (fix && state.status === 'done' ? planFixes(state.data) : []), [fix, state]);
|
|
60
|
+
// Without --yes, a run that can't prompt (--json, or no TTY) repairs nothing.
|
|
61
|
+
const needsConfirmation = fixes.length > 0 && !yes;
|
|
62
|
+
const confirmation = useConfirmation(needsConfirmation && !effectiveJson);
|
|
63
|
+
const go = fixes.length > 0 && (yes || confirmation.isConfirmed);
|
|
64
|
+
const [fixState, setFixState] = useState({ phase: 'idle' });
|
|
65
|
+
const started = useRef(false);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!go || started.current)
|
|
68
|
+
return;
|
|
69
|
+
started.current = true;
|
|
70
|
+
const progress = (message) => setFixState({ message, phase: 'fixing' });
|
|
71
|
+
void (async () => {
|
|
72
|
+
try {
|
|
73
|
+
const results = [];
|
|
74
|
+
for (const planned of fixes) {
|
|
75
|
+
results.push(await applyFix(planned, {
|
|
76
|
+
interactive: !effectiveJson,
|
|
77
|
+
onDeviceCode: (prompt) => setFixState({ message: 'Waiting for you to sign in', phase: 'fixing', prompt }),
|
|
78
|
+
progress,
|
|
79
|
+
projectRoot,
|
|
80
|
+
user,
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
const checks = await runDiagnostics(progress, { projectRoot, user });
|
|
84
|
+
setFixState({ checks, phase: 'done', results });
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
setFixState({ error: errorMessage(err), phase: 'error' });
|
|
88
|
+
}
|
|
89
|
+
})();
|
|
90
|
+
}, [go, fixes, effectiveJson, projectRoot, user]);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (confirmation.isCancelled)
|
|
93
|
+
setFixState({ phase: 'cancelled' });
|
|
94
|
+
}, [confirmation.isCancelled]);
|
|
95
|
+
// The prompt holds stdin, so leave once --fix has nothing more to do.
|
|
96
|
+
const finished = fixState.phase === 'done' || fixState.phase === 'cancelled' || fixState.phase === 'error';
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (!finished)
|
|
99
|
+
return;
|
|
100
|
+
const timer = setTimeout(() => exit(), 100);
|
|
101
|
+
return () => clearTimeout(timer);
|
|
102
|
+
}, [finished, exit]);
|
|
38
103
|
if (state.status === 'loading') {
|
|
39
104
|
return _jsx(Spinner, { message: state.message });
|
|
40
105
|
}
|
|
@@ -50,21 +115,54 @@ export default function Doctor({ options: { json, projectRoot, user } }) {
|
|
|
50
115
|
}
|
|
51
116
|
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(ErrorView, { command: state.command, hint: state.hint, message: state.message }), _jsx(TroubleshootingVideo, {})] }));
|
|
52
117
|
}
|
|
118
|
+
if (fixState.phase === 'error') {
|
|
119
|
+
process.exitCode = 1;
|
|
120
|
+
return effectiveJson ? (renderJson({ message: fixState.error, outcome: 'error' })) : (_jsx(ErrorView, { message: fixState.error }));
|
|
121
|
+
}
|
|
122
|
+
if (fixState.phase === 'fixing') {
|
|
123
|
+
return _jsx(Fixing, { message: fixState.message, prompt: fixState.prompt });
|
|
124
|
+
}
|
|
125
|
+
if (fixState.phase === 'done') {
|
|
126
|
+
const output = buildJsonOutput(fixState.checks);
|
|
127
|
+
// Set both ways: the first diagnosis's fail, behind the y/n prompt, already set it to 1.
|
|
128
|
+
process.exitCode = output.summary.fail > 0 || fixState.results.some((r) => r.status === 'failed') ? 1 : 0;
|
|
129
|
+
if (effectiveJson) {
|
|
130
|
+
return renderJson({ ...output, fixes: fixState.results });
|
|
131
|
+
}
|
|
132
|
+
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(FixResults, { results: fixState.results }), _jsx(DiagnosticList, { checks: fixState.checks, title: 'Environment diagnostics after --fix' }), _jsx(TroubleshootingVideo, {})] }));
|
|
133
|
+
}
|
|
53
134
|
const output = buildJsonOutput(state.data);
|
|
135
|
+
if (go) {
|
|
136
|
+
// The repairs start on the next effect.
|
|
137
|
+
return _jsx(Fixing, { message: 'Starting repairs...' });
|
|
138
|
+
}
|
|
139
|
+
if (needsConfirmation && effectiveJson) {
|
|
140
|
+
process.exitCode = 1;
|
|
141
|
+
return renderJson({
|
|
142
|
+
code: CONFIRMATION_REQUIRED_CODE,
|
|
143
|
+
command: confirmCommand(projectRoot, user),
|
|
144
|
+
...output,
|
|
145
|
+
fixes,
|
|
146
|
+
message: FIX_CONFIRMATION_MESSAGE,
|
|
147
|
+
outcome: 'error',
|
|
148
|
+
});
|
|
149
|
+
}
|
|
54
150
|
if (output.summary.fail > 0) {
|
|
55
151
|
process.exitCode = 1;
|
|
56
152
|
}
|
|
57
153
|
if (effectiveJson) {
|
|
58
|
-
return renderJson(output);
|
|
154
|
+
return renderJson(fix ? { ...output, fixes: [] } : output);
|
|
59
155
|
}
|
|
60
|
-
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DiagnosticList, { checks: state.data, title: 'Environment diagnostics' }), _jsx(TroubleshootingVideo, {})] }));
|
|
156
|
+
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(DiagnosticList, { checks: state.data, title: 'Environment diagnostics' }), fix && fixes.length === 0 && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: "Nothing for --fix to repair." }) })), needsConfirmation && _jsx(FixPrompt, { cancelled: fixState.phase === 'cancelled', fixes: fixes }), _jsx(TroubleshootingVideo, {})] }));
|
|
61
157
|
}
|
|
62
158
|
function buildJsonOutput(checks) {
|
|
63
159
|
const summary = { fail: 0, pass: 0, warn: 0 };
|
|
64
160
|
const diagnostics = checks.map((check) => {
|
|
65
161
|
summary[check.status] += 1;
|
|
66
162
|
return {
|
|
163
|
+
...(check.command !== undefined ? { command: check.command } : {}),
|
|
67
164
|
...(check.detail !== undefined ? { detail: check.detail } : {}),
|
|
165
|
+
id: check.id,
|
|
68
166
|
message: check.message,
|
|
69
167
|
name: check.name,
|
|
70
168
|
status: check.status,
|
|
@@ -76,6 +174,25 @@ function buildJsonOutput(checks) {
|
|
|
76
174
|
summary,
|
|
77
175
|
};
|
|
78
176
|
}
|
|
177
|
+
/** `atk doctor --fix --yes` in the scope this run checked. */
|
|
178
|
+
function confirmCommand(projectRoot, user) {
|
|
179
|
+
const scope = user ? ' --user' : projectRoot ? ` -P ${JSON.stringify(projectRoot)}` : '';
|
|
180
|
+
return `atk doctor --fix --yes${scope}`;
|
|
181
|
+
}
|
|
182
|
+
function Fixing({ message, prompt }) {
|
|
183
|
+
if (!prompt) {
|
|
184
|
+
return _jsx(Spinner, { message: message });
|
|
185
|
+
}
|
|
186
|
+
return (_jsxs(Box, { flexDirection: 'column', gap: 1, children: [_jsxs(Text, { children: ["To sign in, open ", _jsx(Link, { url: prompt.verificationUri, children: prompt.verificationUri }), " and enter the code", ' ', _jsx(Text, { bold: true, color: 'cyan', children: prompt.userCode })] }), _jsx(Spinner, { message: message })] }));
|
|
187
|
+
}
|
|
188
|
+
/** The planned repairs and the y/n question, or that the run was cancelled. */
|
|
189
|
+
function FixPrompt({ cancelled, fixes }) {
|
|
190
|
+
return (_jsxs(Box, { flexDirection: 'column', marginTop: 1, children: [_jsx(Text, { bold: true, children: "--fix would:" }), fixes.map((f) => (_jsxs(Text, { children: [' ', "\u2022 ", f.description, " (", _jsx(Text, { dimColor: true, children: f.command }), ")"] }, f.kind))), cancelled ? _jsx(Text, { color: 'yellow', children: "Cancelled; nothing changed." }) : _jsx(Text, { children: "Apply these repairs? (y/n)" })] }));
|
|
191
|
+
}
|
|
192
|
+
function FixResults({ results }) {
|
|
193
|
+
const color = { applied: 'green', failed: 'red', skipped: 'yellow' };
|
|
194
|
+
return (_jsxs(Box, { flexDirection: 'column', marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Repairs" }), results.map((r) => (_jsxs(Text, { children: [' ', _jsx(Text, { color: color[r.status], children: r.status }), " ", r.description, ": ", r.message] }, r.kind)))] }));
|
|
195
|
+
}
|
|
79
196
|
/** Human output only: the getting-started chapter on atk doctor and what to do next. */
|
|
80
197
|
function TroubleshootingVideo() {
|
|
81
198
|
const video = buildGettingStartedWebUrl('troubleshoot');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC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The command that fixes the check, for `--json`; the human `detail` says it in words. */
|
|
3
|
+
command?: string;
|
|
2
4
|
detail?: string;
|
|
5
|
+
/** A stable, machine-readable name for the check (`api`, `cache`, `user-lockfile`). */
|
|
6
|
+
id: string;
|
|
3
7
|
message: string;
|
|
4
8
|
name: string;
|
|
5
9
|
status: 'fail' | 'pass' | 'warn';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticList.d.ts","sourceRoot":"","sources":["../../src/components/DiagnosticList.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAuB5E"}
|
|
1
|
+
{"version":3,"file":"DiagnosticList.d.ts","sourceRoot":"","sources":["../../src/components/DiagnosticList.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAClC;AAED,UAAU,mBAAmB;IAC3B,4CAA4C;IAC5C,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAuB5E"}
|
|
@@ -9,7 +9,7 @@ export default function DiagnosticList({ checks, title }) {
|
|
|
9
9
|
const passCount = checks.filter((c) => c.status === 'pass').length;
|
|
10
10
|
const warnCount = checks.filter((c) => c.status === 'warn').length;
|
|
11
11
|
const failCount = checks.filter((c) => c.status === 'fail').length;
|
|
12
|
-
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(Text, { bold: true, children: title }), _jsx(Text, { children: " " }), checks.map((check) => (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: [_jsx(CheckIcon, { status: check.status }), " ", _jsx(Text, { bold: true, children: check.name }), ' — ', check.message] }), check.detail && _jsxs(Text, { dimColor: true, children: [" ", check.detail] })] }, check.
|
|
12
|
+
return (_jsxs(Box, { flexDirection: 'column', children: [_jsx(Text, { bold: true, children: title }), _jsx(Text, { children: " " }), checks.map((check) => (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: [_jsx(CheckIcon, { status: check.status }), " ", _jsx(Text, { bold: true, children: check.name }), ' — ', check.message] }), check.detail && _jsxs(Text, { dimColor: true, children: [" ", check.detail] })] }, check.id))), _jsx(Text, { children: " " }), _jsx(DiagnosticSummary, { failCount: failCount, passCount: passCount, warnCount: warnCount })] }));
|
|
13
13
|
}
|
|
14
14
|
function DiagnosticSummary({ failCount, passCount, warnCount, }) {
|
|
15
15
|
return (_jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: [_jsxs(Text, { color: 'green', children: [passCount, " passed"] }), warnCount > 0 && (_jsxs(Text, { children: [",", ' ', _jsxs(Text, { color: 'yellow', children: [warnCount, " ", warnCount === 1 ? 'warning' : 'warnings'] })] })), failCount > 0 && (_jsxs(Text, { children: [", ", _jsxs(Text, { color: 'red', children: [failCount, " failed"] })] }))] }), failCount > 0 && _jsx(Text, { dimColor: true, children: "Fix the failed checks above to ensure atk works correctly." })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticList.js","sourceRoot":"","sources":["../../src/components/DiagnosticList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"DiagnosticList.js","sourceRoot":"","sources":["../../src/components/DiagnosticList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoB7C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAAuB;IAC3E,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,KAAC,IAAI,IAAC,IAAI,kBAAE,KAAK,GAAQ,EACzB,KAAC,IAAI,oBAAS,EACb,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,MAAC,IAAI,eACH,KAAC,SAAS,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,OAAC,KAAC,IAAI,IAAC,IAAI,kBAAE,KAAK,CAAC,IAAI,GAAQ,EACjE,KAAK,EACL,KAAK,CAAC,OAAO,IACT,EACN,KAAK,CAAC,MAAM,IAAI,MAAC,IAAI,IAAC,QAAQ,wBAAG,KAAK,CAAC,MAAM,IAAQ,KANvB,KAAK,CAAC,EAAE,CAOnC,CACP,CAAC,EACF,KAAC,IAAI,oBAAS,EACd,KAAC,iBAAiB,IAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAI,IACnF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,SAAS,EACT,SAAS,GAKV;IACC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,aACzB,MAAC,IAAI,eACH,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,aAAE,SAAS,eAAe,EAC5C,SAAS,GAAG,CAAC,IAAI,CAChB,MAAC,IAAI,oBACD,GAAG,EACL,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,aACjB,SAAS,OAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,IAChD,IACF,CACR,EACA,SAAS,GAAG,CAAC,IAAI,CAChB,MAAC,IAAI,qBACD,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,aAAE,SAAS,eAAe,IACxC,CACR,IACI,EACN,SAAS,GAAG,CAAC,IAAI,KAAC,IAAI,IAAC,QAAQ,iFAAkE,IAC9F,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,15 @@ import type { ProjectConfig } from './schemas/config.js';
|
|
|
3
3
|
import type { Registry } from './schemas/index.js';
|
|
4
4
|
import type { InstalledAsset } from './schemas/lockfile.js';
|
|
5
5
|
import { type Scope } from './scope.js';
|
|
6
|
+
import { type VersionStatus } from './update-check.js';
|
|
7
|
+
/** How long the `/health` probe waits for the ATK API before it fails the check. */
|
|
8
|
+
export declare const HEALTH_TIMEOUT_MS = 5000;
|
|
9
|
+
/**
|
|
10
|
+
* Call the ATK API's anonymous `GET /health` once, with no bearer and no retries, so a down API
|
|
11
|
+
* fails the check in {@link HEALTH_TIMEOUT_MS} at most. It doesn't go through the process-wide
|
|
12
|
+
* client, whose connection-failure latch would then fail the registry check too.
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkApiHealth(apiUrl: string, source?: string): Promise<DiagnosticCheck>;
|
|
6
15
|
/**
|
|
7
16
|
* Check for assets installed both in the project and at the user scope, with the version at each and
|
|
8
17
|
* which copy each tool that has both uses. A copy uninstalled for every tool of its scope doesn't
|
|
@@ -16,6 +25,17 @@ export declare function checkBothScopes(project: {
|
|
|
16
25
|
root: string;
|
|
17
26
|
tools: string[];
|
|
18
27
|
}): Promise<DiagnosticCheck | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Compare this CLI with its release channel on npm: `dev` for a prerelease, `latest` otherwise.
|
|
30
|
+
* A CLI ahead of npm (a local build) passes. `offline` (`--offline`): npm isn't asked, so only
|
|
31
|
+
* a cached version is compared.
|
|
32
|
+
*/
|
|
33
|
+
export declare function checkCliVersion(status: VersionStatus, offline?: boolean): DiagnosticCheck;
|
|
34
|
+
/**
|
|
35
|
+
* Check for installed assets the registry deprecates, with each one's reason and replacement.
|
|
36
|
+
* Returns undefined when there are none.
|
|
37
|
+
*/
|
|
38
|
+
export declare function checkDeprecated(registry: Registry, assets: InstalledAsset[]): DiagnosticCheck | undefined;
|
|
19
39
|
/**
|
|
20
40
|
* Check that the hook scripts a configured tool runs directly are executable. Returns
|
|
21
41
|
* undefined when there is nothing to check: on Windows, which has no exec bit, or when
|
|
@@ -29,6 +49,14 @@ export declare function checkHookScripts(projectDir: string, tools: string[], as
|
|
|
29
49
|
* undefined when there are none. The sync command it suggests runs in `scope`.
|
|
30
50
|
*/
|
|
31
51
|
export declare function checkLiftedHooks(projectConfig: ProjectConfig, assets: InstalledAsset[], registry: Registry, scope?: Scope): DiagnosticCheck | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Check that each installed asset's placed files are on disk for every configured tool, as the
|
|
54
|
+
* scope's adapter places them. Frozen assets, those uninstalled for a tool and hooks whose locked
|
|
55
|
+
* version doesn't declare the tool (with `registry`) are left out, as `atk audit` and `atk sync`
|
|
56
|
+
* leave them. Only presence is checked; `atk audit` verifies content. Returns undefined when there
|
|
57
|
+
* is nothing to check. The sync command it suggests runs in `scope`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function checkMissingFiles(root: string, tools: string[], assets: InstalledAsset[], projectConfig: null | ProjectConfig, scope?: Scope, registry?: Registry): Promise<DiagnosticCheck | undefined>;
|
|
32
60
|
/**
|
|
33
61
|
* Check whether the given Node.js version string meets the project requirements.
|
|
34
62
|
*
|
|
@@ -36,6 +64,12 @@ export declare function checkLiftedHooks(projectConfig: ProjectConfig, assets: I
|
|
|
36
64
|
* @returns a `DiagnosticCheck` with status pass / warn / fail
|
|
37
65
|
*/
|
|
38
66
|
export declare function checkNodeVersion(version: string): DiagnosticCheck;
|
|
67
|
+
/**
|
|
68
|
+
* Check the registry cache file: its age against the TTL, and whether it parses. An expired cache
|
|
69
|
+
* passes (the next read refreshes it); one that doesn't parse fails, with `atk cache clear` to
|
|
70
|
+
* remove it. Run after the registry check, which replaces an unreadable cache when it can fetch.
|
|
71
|
+
*/
|
|
72
|
+
export declare function checkRegistryCache(): Promise<DiagnosticCheck>;
|
|
39
73
|
/**
|
|
40
74
|
* Run all environment diagnostic checks and return the results.
|
|
41
75
|
* Extracted from the `doctor` command so it can be tested independently.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/diagnostics.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EA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