@inspecto-dev/cli 0.2.0-alpha.0 → 0.2.0-alpha.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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/dist/bin.js +6 -6
- package/dist/{chunk-4RR7PTRN.js → chunk-DBXT75QF.js} +10 -5
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/bin.ts +5 -5
- package/src/commands/doctor.ts +3 -3
- package/src/commands/init.ts +7 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -9,11 +9,11 @@ CLI Using tsup config: /Users/bytedance/Works/hugo.felix/inspecto/packages/cli/t
|
|
|
9
9
|
CLI Target: node18
|
|
10
10
|
CLI Cleaning output folder
|
|
11
11
|
ESM Build start
|
|
12
|
+
ESM dist/bin.js 2.51 KB
|
|
12
13
|
ESM dist/index.js 109.00 B
|
|
13
|
-
ESM dist/chunk-
|
|
14
|
-
ESM
|
|
15
|
-
ESM ⚡️ Build success in 25ms
|
|
14
|
+
ESM dist/chunk-DBXT75QF.js 44.52 KB
|
|
15
|
+
ESM ⚡️ Build success in 24ms
|
|
16
16
|
DTS Build start
|
|
17
|
-
DTS ⚡️ Build success in
|
|
17
|
+
DTS ⚡️ Build success in 1056ms
|
|
18
18
|
DTS dist/bin.d.ts 13.00 B
|
|
19
19
|
DTS dist/index.d.ts 1.16 KB
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The official command-line interface for Inspecto. This tool automates the proces
|
|
|
7
7
|
You can use the CLI without installing it globally by using `npx`:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx inspecto <command>
|
|
10
|
+
npx @inspecto-dev/cli <command>
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Alternatively, you can install it as a dev dependency in your project:
|
package/dist/bin.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
init,
|
|
4
4
|
log,
|
|
5
5
|
teardown
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DBXT75QF.js";
|
|
7
7
|
|
|
8
8
|
// src/bin.ts
|
|
9
9
|
import { parseArgs } from "util";
|
|
@@ -26,11 +26,11 @@ var HELP = `
|
|
|
26
26
|
--packages <names> (Monorepo) Comma-separated list of packages to inject
|
|
27
27
|
|
|
28
28
|
Examples:
|
|
29
|
-
npx inspecto init
|
|
30
|
-
npx inspecto init --shared --prefer github-copilot
|
|
31
|
-
npx inspecto init --dry-run
|
|
32
|
-
npx inspecto doctor
|
|
33
|
-
npx inspecto teardown
|
|
29
|
+
npx @inspecto-dev/cli init
|
|
30
|
+
npx @inspecto-dev/cli init --shared --prefer github-copilot
|
|
31
|
+
npx @inspecto-dev/cli init --dry-run
|
|
32
|
+
npx @inspecto-dev/cli doctor
|
|
33
|
+
npx @inspecto-dev/cli teardown
|
|
34
34
|
`;
|
|
35
35
|
async function main() {
|
|
36
36
|
const args = process.argv.slice(2);
|
|
@@ -923,7 +923,7 @@ async function init(options) {
|
|
|
923
923
|
if (options.skipInstall) {
|
|
924
924
|
log.warn("Skipping dependency installation (--skip-install)");
|
|
925
925
|
} else {
|
|
926
|
-
const installCmd = getInstallCommand(pm, "@inspecto-dev/plugin");
|
|
926
|
+
const installCmd = getInstallCommand(pm, "@inspecto-dev/plugin @inspecto-dev/core");
|
|
927
927
|
if (options.dryRun) {
|
|
928
928
|
log.dryRun(`Would run: ${installCmd}`);
|
|
929
929
|
} else {
|
|
@@ -932,12 +932,17 @@ async function init(options) {
|
|
|
932
932
|
if (result.stderr && result.stderr.toLowerCase().includes("error")) {
|
|
933
933
|
throw new Error(result.stderr);
|
|
934
934
|
}
|
|
935
|
-
log.success("Installed @inspecto-dev/plugin as
|
|
935
|
+
log.success("Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies");
|
|
936
936
|
mutations.push({
|
|
937
937
|
type: "dependency_added",
|
|
938
938
|
name: "@inspecto-dev/plugin",
|
|
939
939
|
dev: true
|
|
940
940
|
});
|
|
941
|
+
mutations.push({
|
|
942
|
+
type: "dependency_added",
|
|
943
|
+
name: "@inspecto-dev/core",
|
|
944
|
+
dev: true
|
|
945
|
+
});
|
|
941
946
|
} catch (err) {
|
|
942
947
|
installFailed = true;
|
|
943
948
|
log.error(`Failed to install dependency: ${err?.message || "Unknown error"}`);
|
|
@@ -1144,7 +1149,7 @@ async function doctor() {
|
|
|
1144
1149
|
}
|
|
1145
1150
|
if (!injected) {
|
|
1146
1151
|
log.error("Plugin not injected in any build config");
|
|
1147
|
-
log.hint("Fix: npx inspecto init");
|
|
1152
|
+
log.hint("Fix: npx @inspecto-dev/cli init");
|
|
1148
1153
|
result.errors++;
|
|
1149
1154
|
}
|
|
1150
1155
|
} else if (buildResult.unsupported.length > 0) {
|
|
@@ -1178,13 +1183,13 @@ async function doctor() {
|
|
|
1178
1183
|
} else {
|
|
1179
1184
|
log.error(".inspecto/settings.json has invalid JSON");
|
|
1180
1185
|
log.hint(
|
|
1181
|
-
"Fix: Manually correct the syntax errors, or delete the file and re-run npx inspecto init"
|
|
1186
|
+
"Fix: Manually correct the syntax errors, or delete the file and re-run npx @inspecto-dev/cli init"
|
|
1182
1187
|
);
|
|
1183
1188
|
result.errors++;
|
|
1184
1189
|
}
|
|
1185
1190
|
} else {
|
|
1186
1191
|
log.warn(".inspecto/settings.json not found (using defaults)");
|
|
1187
|
-
log.hint("Optional: npx inspecto init");
|
|
1192
|
+
log.hint("Optional: npx @inspecto-dev/cli init");
|
|
1188
1193
|
result.warnings++;
|
|
1189
1194
|
}
|
|
1190
1195
|
const gitignoreContent = await readFile(path10.join(root, ".gitignore"));
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspecto-dev/cli",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.1",
|
|
4
4
|
"description": "CLI tools for Inspecto onboarding and lifecycle management",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"inspecto",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"cac": "^6.7.14",
|
|
19
19
|
"picocolors": "^1.0.0",
|
|
20
20
|
"prompts": "^2.4.2",
|
|
21
|
-
"@inspecto-dev/types": "0.2.0-alpha.
|
|
21
|
+
"@inspecto-dev/types": "0.2.0-alpha.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^20.0.0",
|
package/src/bin.ts
CHANGED
|
@@ -28,11 +28,11 @@ const HELP = `
|
|
|
28
28
|
--packages <names> (Monorepo) Comma-separated list of packages to inject
|
|
29
29
|
|
|
30
30
|
Examples:
|
|
31
|
-
npx inspecto init
|
|
32
|
-
npx inspecto init --shared --prefer github-copilot
|
|
33
|
-
npx inspecto init --dry-run
|
|
34
|
-
npx inspecto doctor
|
|
35
|
-
npx inspecto teardown
|
|
31
|
+
npx @inspecto-dev/cli init
|
|
32
|
+
npx @inspecto-dev/cli init --shared --prefer github-copilot
|
|
33
|
+
npx @inspecto-dev/cli init --dry-run
|
|
34
|
+
npx @inspecto-dev/cli doctor
|
|
35
|
+
npx @inspecto-dev/cli teardown
|
|
36
36
|
`
|
|
37
37
|
|
|
38
38
|
async function main() {
|
package/src/commands/doctor.ts
CHANGED
|
@@ -109,7 +109,7 @@ export async function doctor(): Promise<void> {
|
|
|
109
109
|
}
|
|
110
110
|
if (!injected) {
|
|
111
111
|
log.error('Plugin not injected in any build config')
|
|
112
|
-
log.hint('Fix: npx inspecto init')
|
|
112
|
+
log.hint('Fix: npx @inspecto-dev/cli init')
|
|
113
113
|
result.errors++
|
|
114
114
|
}
|
|
115
115
|
} else if (buildResult.unsupported.length > 0) {
|
|
@@ -147,13 +147,13 @@ export async function doctor(): Promise<void> {
|
|
|
147
147
|
} else {
|
|
148
148
|
log.error('.inspecto/settings.json has invalid JSON')
|
|
149
149
|
log.hint(
|
|
150
|
-
'Fix: Manually correct the syntax errors, or delete the file and re-run npx inspecto init',
|
|
150
|
+
'Fix: Manually correct the syntax errors, or delete the file and re-run npx @inspecto-dev/cli init',
|
|
151
151
|
)
|
|
152
152
|
result.errors++
|
|
153
153
|
}
|
|
154
154
|
} else {
|
|
155
155
|
log.warn('.inspecto/settings.json not found (using defaults)')
|
|
156
|
-
log.hint('Optional: npx inspecto init')
|
|
156
|
+
log.hint('Optional: npx @inspecto-dev/cli init')
|
|
157
157
|
result.warnings++
|
|
158
158
|
}
|
|
159
159
|
|
package/src/commands/init.ts
CHANGED
|
@@ -265,7 +265,7 @@ export async function init(options: InitOptions): Promise<void> {
|
|
|
265
265
|
if (options.skipInstall) {
|
|
266
266
|
log.warn('Skipping dependency installation (--skip-install)')
|
|
267
267
|
} else {
|
|
268
|
-
const installCmd = getInstallCommand(pm, '@inspecto-dev/plugin')
|
|
268
|
+
const installCmd = getInstallCommand(pm, '@inspecto-dev/plugin @inspecto-dev/core')
|
|
269
269
|
if (options.dryRun) {
|
|
270
270
|
log.dryRun(`Would run: ${installCmd}`)
|
|
271
271
|
} else {
|
|
@@ -274,12 +274,17 @@ export async function init(options: InitOptions): Promise<void> {
|
|
|
274
274
|
if (result.stderr && result.stderr.toLowerCase().includes('error')) {
|
|
275
275
|
throw new Error(result.stderr)
|
|
276
276
|
}
|
|
277
|
-
log.success('Installed @inspecto-dev/plugin as
|
|
277
|
+
log.success('Installed @inspecto-dev/plugin and @inspecto-dev/core as devDependencies')
|
|
278
278
|
mutations.push({
|
|
279
279
|
type: 'dependency_added',
|
|
280
280
|
name: '@inspecto-dev/plugin',
|
|
281
281
|
dev: true,
|
|
282
282
|
})
|
|
283
|
+
mutations.push({
|
|
284
|
+
type: 'dependency_added',
|
|
285
|
+
name: '@inspecto-dev/core',
|
|
286
|
+
dev: true,
|
|
287
|
+
})
|
|
283
288
|
} catch (err: any) {
|
|
284
289
|
installFailed = true
|
|
285
290
|
log.error(`Failed to install dependency: ${err?.message || 'Unknown error'}`)
|