@inspecto-dev/cli 0.3.0-alpha.1 → 0.3.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @inspecto-dev/cli@0.3.0-alpha.1 build /Users/tangjie/hugo.felix/inspecto/packages/cli
2
+ > @inspecto-dev/cli@0.3.0 build /Users/tangjie/hugo.felix/inspecto/packages/cli
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/bin.ts, src/index.ts
@@ -11,9 +11,9 @@ CLI Cleaning output folder
11
11
  ESM Build start
12
12
  ESM dist/index.js 319.00 B
13
13
  ESM dist/bin.js 20.37 KB
14
- ESM dist/chunk-FZS2TLXQ.js 103.35 KB
15
- ESM ⚡️ Build success in 61ms
14
+ ESM dist/chunk-IBYH7QZM.js 103.65 KB
15
+ ESM ⚡️ Build success in 67ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 5204ms
17
+ DTS ⚡️ Build success in 4661ms
18
18
  DTS dist/bin.d.ts 185.00 B
19
19
  DTS dist/index.d.ts 7.79 KB
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @inspecto-dev/cli
2
2
 
3
- ## 0.3.0-alpha.1
3
+ ## 0.3.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - Prepare the first `0.3.0-alpha.1` release line for Inspecto's browser-first workflow.
7
+ - First stable release for Inspecto's browser-first workflow.
8
8
  - unify onboarding around assistant-first setup and the single-entry `inspecto onboard --json` contract
9
9
  - stabilize the browser UX across `Inspect`, `Annotate`, and `Alt + Click` quick jump
10
10
  - tighten prompt and settings schema boundaries and keep evidence toggles built-in
@@ -14,7 +14,7 @@
14
14
  ### Patch Changes
15
15
 
16
16
  - Updated dependencies
17
- - @inspecto-dev/types@0.3.0-alpha.1
17
+ - @inspecto-dev/types@0.3.0
18
18
 
19
19
  ## 0.2.0-alpha.6
20
20
 
package/dist/bin.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  reportCommandError,
11
11
  teardown,
12
12
  writeFile
13
- } from "./chunk-FZS2TLXQ.js";
13
+ } from "./chunk-IBYH7QZM.js";
14
14
 
15
15
  // src/bin.ts
16
16
  import { cac } from "cac";
@@ -2999,6 +2999,10 @@ function printOnboardResult(result) {
2999
2999
  if (result.confirmation.required && result.confirmation.question) {
3000
3000
  log.warn(result.confirmation.question);
3001
3001
  }
3002
+ const extensionReady = !result.ideExtension?.required || result.ideExtension.installed && !result.ideExtension.manualRequired;
3003
+ if (extensionReady && (result.status === "success" || result.status === "partial_success") && result.verification?.message) {
3004
+ log.info(result.verification.message);
3005
+ }
3002
3006
  }
3003
3007
  async function onboard(options = {}) {
3004
3008
  const root = process.cwd();
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  reportCommandError,
10
10
  teardown,
11
11
  writeCommandOutput
12
- } from "./chunk-FZS2TLXQ.js";
12
+ } from "./chunk-IBYH7QZM.js";
13
13
  export {
14
14
  apply,
15
15
  collectDoctorResult,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspecto-dev/cli",
3
- "version": "0.3.0-alpha.1",
3
+ "version": "0.3.0",
4
4
  "description": "CLI tools for Inspecto onboarding and lifecycle management",
5
5
  "keywords": [
6
6
  "inspecto",
@@ -20,7 +20,7 @@
20
20
  "ora": "^9.3.0",
21
21
  "picocolors": "^1.0.0",
22
22
  "prompts": "^2.4.2",
23
- "@inspecto-dev/types": "0.3.0-alpha.1"
23
+ "@inspecto-dev/types": "0.3.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^20.0.0",
@@ -27,6 +27,18 @@ function printOnboardResult(result: OnboardCommandResult): void {
27
27
  if (result.confirmation.required && result.confirmation.question) {
28
28
  log.warn(result.confirmation.question)
29
29
  }
30
+
31
+ const extensionReady =
32
+ !result.ideExtension?.required ||
33
+ (result.ideExtension.installed && !result.ideExtension.manualRequired)
34
+
35
+ if (
36
+ extensionReady &&
37
+ (result.status === 'success' || result.status === 'partial_success') &&
38
+ result.verification?.message
39
+ ) {
40
+ log.info(result.verification.message)
41
+ }
30
42
  }
31
43
 
32
44
  export async function onboard(options: OnboardCommandOptions = {}): Promise<OnboardCommandResult> {
@@ -255,4 +255,98 @@ describe('onboard command', () => {
255
255
  expect(applyResolvedOnboardingSession).not.toHaveBeenCalled()
256
256
  expect(result.ideExtension?.required).toBe(true)
257
257
  })
258
+
259
+ it('prints verification guidance in text mode after successful onboarding', async () => {
260
+ const session: ResolvedOnboardingSession = {
261
+ status: 'success',
262
+ target: {
263
+ status: 'resolved',
264
+ selected: {
265
+ packagePath: '',
266
+ configPath: 'vite.config.ts',
267
+ buildTool: 'vite',
268
+ frameworks: ['react'],
269
+ automaticInjection: true,
270
+ },
271
+ candidates: [
272
+ {
273
+ packagePath: '',
274
+ configPath: 'vite.config.ts',
275
+ buildTool: 'vite',
276
+ frameworks: ['react'],
277
+ automaticInjection: true,
278
+ },
279
+ ],
280
+ reason: 'Only one supported target was detected.',
281
+ },
282
+ summary: {
283
+ headline: 'Inspecto is ready to onboard /repo.',
284
+ changes: ['Install dependencies.'],
285
+ risks: [],
286
+ manualFollowUp: [],
287
+ },
288
+ confirmation: { required: false },
289
+ verification: {
290
+ available: true,
291
+ devCommand: 'pnpm dev',
292
+ message: 'Start the local dev server with `pnpm dev` to verify Inspecto in the browser.',
293
+ },
294
+ context: {
295
+ root: '/repo',
296
+ packageManager: 'pnpm',
297
+ buildTools: { supported: [], unsupported: [] },
298
+ frameworks: { supported: ['react'], unsupported: [] },
299
+ ides: [{ ide: 'vscode', supported: true }],
300
+ providers: [{ id: 'codex', label: 'Codex CLI', supported: true, preferredMode: 'cli' }],
301
+ },
302
+ plan: {
303
+ status: 'ok',
304
+ warnings: [],
305
+ blockers: [],
306
+ strategy: 'supported',
307
+ actions: [],
308
+ defaults: {
309
+ provider: 'codex',
310
+ ide: 'vscode',
311
+ shared: false,
312
+ extension: true,
313
+ },
314
+ },
315
+ projectRoot: '/repo',
316
+ selectedIDE: { ide: 'vscode', supported: true },
317
+ providerDefault: 'codex.cli',
318
+ }
319
+
320
+ const applied: OnboardCommandResult = {
321
+ status: 'success',
322
+ target: session.target,
323
+ summary: session.summary,
324
+ confirmation: session.confirmation,
325
+ ideExtension: {
326
+ required: true,
327
+ installed: true,
328
+ manualRequired: false,
329
+ installCommand: 'code --install-extension inspecto.inspecto',
330
+ marketplaceUrl: 'https://marketplace.visualstudio.com/items?itemName=inspecto.inspecto',
331
+ openVsxUrl: 'https://open-vsx.org/extension/inspecto/inspecto',
332
+ },
333
+ verification: session.verification,
334
+ result: {
335
+ changedFiles: ['vite.config.ts'],
336
+ installedDependencies: ['@inspecto-dev/plugin', '@inspecto-dev/core'],
337
+ selectedProviderDefault: 'codex.cli',
338
+ selectedIDE: 'vscode',
339
+ mutations: [],
340
+ },
341
+ }
342
+
343
+ vi.mocked(resolveOnboardingSession).mockResolvedValue(session)
344
+ vi.mocked(applyResolvedOnboardingSession).mockResolvedValue(applied)
345
+
346
+ const consoleSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
347
+ const result = await onboard({ json: false })
348
+
349
+ expect(result.status).toBe('success')
350
+ expect(consoleSpy.mock.calls.some(call => String(call[0]).includes('Start the local dev server with `pnpm dev`'))).toBe(true)
351
+ })
258
352
  })