vona-cli 1.1.105 → 1.1.108
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/README.md +56 -0
- package/dist/bin/vona.js +0 -23
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1 +1,57 @@
|
|
|
1
1
|
# vona-cli
|
|
2
|
+
|
|
3
|
+
This package is the thin Vona CLI entrypoint.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
From the monorepo root, `npm run vona` resolves to this package and launches the backend-oriented CLI flow.
|
|
8
|
+
|
|
9
|
+
Primary entrypoint:
|
|
10
|
+
|
|
11
|
+
- `src/bin/vona.ts`
|
|
12
|
+
|
|
13
|
+
This entrypoint stays intentionally small. It handles top-level argument parsing, the special `play` dispatch path, and handoff to the Vona command runtime.
|
|
14
|
+
|
|
15
|
+
## Source of truth
|
|
16
|
+
|
|
17
|
+
Do not treat this package as the full command catalog. The authoritative Vona command-family registry lives in:
|
|
18
|
+
|
|
19
|
+
- `../../packages-cli/cli-set-api/src/lib/commands.ts`
|
|
20
|
+
|
|
21
|
+
Inspect that file first when you need to know:
|
|
22
|
+
|
|
23
|
+
- which command families exist
|
|
24
|
+
- which command names are registered
|
|
25
|
+
- which command module implements each entry
|
|
26
|
+
|
|
27
|
+
Current top-level families include:
|
|
28
|
+
|
|
29
|
+
- `bin`
|
|
30
|
+
- `create`
|
|
31
|
+
- `init`
|
|
32
|
+
- `tools`
|
|
33
|
+
|
|
34
|
+
## Where command details live
|
|
35
|
+
|
|
36
|
+
Each command module in `../../packages-cli/cli-set-api/src/lib/command/` provides the main CLI-facing metadata, including:
|
|
37
|
+
|
|
38
|
+
- `info.title`
|
|
39
|
+
- `info.usage`
|
|
40
|
+
- `options`
|
|
41
|
+
|
|
42
|
+
Representative example:
|
|
43
|
+
|
|
44
|
+
- `../../packages-cli/cli-set-api/src/lib/command/bin.play.ts`
|
|
45
|
+
|
|
46
|
+
## Recommended navigation path
|
|
47
|
+
|
|
48
|
+
1. start from `npm run vona`
|
|
49
|
+
2. inspect `src/bin/vona.ts` only for top-level dispatch behavior
|
|
50
|
+
3. inspect `cli-set-api/src/lib/commands.ts` for the authoritative catalog
|
|
51
|
+
4. inspect the specific command module for usage and options
|
|
52
|
+
|
|
53
|
+
## Canonical public reference
|
|
54
|
+
|
|
55
|
+
For the compact top-level overview shared across Vona and Zova, start with:
|
|
56
|
+
|
|
57
|
+
- `../../../cabloy-docs/reference/cli-reference.md`
|
package/dist/bin/vona.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseProjectPath } from '@cabloy/cli';
|
|
3
|
-
import { ProcessHelper } from '@cabloy/process-helper';
|
|
4
3
|
import mri from 'mri';
|
|
5
|
-
import semver from 'semver';
|
|
6
4
|
import { playAttach } from "../play.js";
|
|
7
5
|
import { VonaCommand } from "../start.js";
|
|
8
|
-
const pnpm_version = '10.19.0';
|
|
9
|
-
const processHelper = new ProcessHelper(process.cwd());
|
|
10
6
|
main();
|
|
11
|
-
async function checkPnpm() {
|
|
12
|
-
const res = await processHelper.spawnCmd({
|
|
13
|
-
cmd: 'pnpm',
|
|
14
|
-
args: ['--version'],
|
|
15
|
-
options: {
|
|
16
|
-
stdio: 'pipe',
|
|
17
|
-
shell: true,
|
|
18
|
-
dummy: true,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
const version = res.trimEnd();
|
|
22
|
-
const lt = semver.lt(version, pnpm_version);
|
|
23
|
-
if (lt) {
|
|
24
|
-
throw new Error(`pnpm should >= ${pnpm_version}, current: ${version}`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
7
|
async function main() {
|
|
28
8
|
const rawArgv = process.argv.slice(2);
|
|
29
9
|
const _args = mri(rawArgv, {
|
|
@@ -53,9 +33,6 @@ async function main() {
|
|
|
53
33
|
await playAttach(projectPath, args);
|
|
54
34
|
}
|
|
55
35
|
else {
|
|
56
|
-
if (!isPlay) {
|
|
57
|
-
await checkPnpm();
|
|
58
|
-
}
|
|
59
36
|
new VonaCommand(args).start();
|
|
60
37
|
}
|
|
61
38
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-cli",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.1.108",
|
|
4
|
+
"gitHead": "3380f8c5d3989242b60dc2a34cbb330f74335cbe",
|
|
5
5
|
"description": "vona cli",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"framework",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"postpack": "clean-package restore"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@cabloy/cli": "^3.1.
|
|
35
|
-
"@cabloy/process-helper": "^3.1.
|
|
34
|
+
"@cabloy/cli": "^3.1.17",
|
|
35
|
+
"@cabloy/process-helper": "^3.1.8",
|
|
36
36
|
"fs-extra": "^11.3.4",
|
|
37
37
|
"mri": "^1.2.0",
|
|
38
38
|
"semver": "^7.7.4",
|
|
39
|
-
"vona-cli-set-api": "^1.1.
|
|
39
|
+
"vona-cli-set-api": "^1.1.106"
|
|
40
40
|
},
|
|
41
41
|
"bin": {
|
|
42
42
|
"vona": "dist/bin/vona.js"
|