@vultro/cli 0.0.1 → 0.0.2
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/dist/index.js +4 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
3
5
|
import { UsageError, parseArgs } from "./args.js";
|
|
4
6
|
import { runCheck } from "./check.js";
|
|
5
7
|
import { runVite } from "./run.js";
|
|
@@ -45,7 +47,8 @@ async function main(argv) {
|
|
|
45
47
|
/** 从 package.json 读取版本号,避免硬编码后忘记同步。 */
|
|
46
48
|
function readVersion() {
|
|
47
49
|
try {
|
|
48
|
-
|
|
50
|
+
const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
51
|
+
return JSON.parse(readFileSync(packageJsonPath, "utf8")).version ?? "0.0.0";
|
|
49
52
|
} catch {
|
|
50
53
|
return "0.0.0";
|
|
51
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vultro/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vultro CLI: codegen and project checks for @vultro/core apps",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
24
|
-
"@vultro/core": "0.0.
|
|
24
|
+
"@vultro/core": "0.0.2",
|
|
25
25
|
"convex": "^1.51.0",
|
|
26
26
|
"zod": "^4.6.7"
|
|
27
27
|
},
|