@vodmal/vdx-cli 0.8.0 → 0.8.1
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/package.json +1 -1
- package/src/doctor.ts +36 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vodmal/vdx-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "vdx — unified lifecycle interface (up/down/build/test/check/fix) + versioned maturity audit with drift detection. Pairs with the vdx Claude Code plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vdx",
|
package/src/doctor.ts
CHANGED
|
@@ -160,25 +160,51 @@ function findOnPath(name: string): string | null {
|
|
|
160
160
|
return null;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
function isEphemeralPath(p: string): 'npx-cache' | 'local-bin' | null {
|
|
164
|
+
if (p.includes(`${path.sep}.npm${path.sep}_npx${path.sep}`)) return 'npx-cache';
|
|
165
|
+
if (p.includes(`${path.sep}node_modules${path.sep}.bin${path.sep}`)) return 'local-bin';
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
163
169
|
function checkVdxOnPath(): CheckResult {
|
|
164
170
|
const found = findOnPath('vdx');
|
|
165
|
-
if (found) {
|
|
171
|
+
if (!found) {
|
|
172
|
+
return {
|
|
173
|
+
id: 'vdx-on-path',
|
|
174
|
+
label: 'vdx install',
|
|
175
|
+
status: 'warning',
|
|
176
|
+
level: 1,
|
|
177
|
+
message:
|
|
178
|
+
'`vdx` not on PATH at check time. If you use a shell alias it is also fine — doctor cannot detect aliases.',
|
|
179
|
+
remedy:
|
|
180
|
+
'npm i -g @vodmal/vdx-cli OR alias vdx="npx -y -p @vodmal/vdx-cli vdx" OR keep using `npx -y -p @vodmal/vdx-cli vdx …` ad-hoc',
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const ephemeral = isEphemeralPath(found);
|
|
184
|
+
if (ephemeral === 'npx-cache') {
|
|
166
185
|
return {
|
|
167
186
|
id: 'vdx-on-path',
|
|
168
|
-
label: 'vdx
|
|
187
|
+
label: 'vdx install',
|
|
169
188
|
status: 'ok',
|
|
170
|
-
level:
|
|
171
|
-
message: found
|
|
189
|
+
level: 3,
|
|
190
|
+
message: `via npx cache: ${found} (ephemeral; fine for npx-only workflows — always latest)`,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (ephemeral === 'local-bin') {
|
|
194
|
+
return {
|
|
195
|
+
id: 'vdx-on-path',
|
|
196
|
+
label: 'vdx install',
|
|
197
|
+
status: 'ok',
|
|
198
|
+
level: 2,
|
|
199
|
+
message: `local node_modules: ${found} (works inside this project only)`,
|
|
172
200
|
};
|
|
173
201
|
}
|
|
174
202
|
return {
|
|
175
203
|
id: 'vdx-on-path',
|
|
176
|
-
label: 'vdx
|
|
177
|
-
status: '
|
|
178
|
-
level:
|
|
179
|
-
message:
|
|
180
|
-
remedy:
|
|
181
|
-
'npm i -g @vodmal/vdx-cli (or alias vdx="npx -y -p @vodmal/vdx-cli vdx")',
|
|
204
|
+
label: 'vdx install',
|
|
205
|
+
status: 'ok',
|
|
206
|
+
level: 4,
|
|
207
|
+
message: `global: ${found}`,
|
|
182
208
|
};
|
|
183
209
|
}
|
|
184
210
|
|