@shanyucoder/flowgrid 0.1.2 → 0.1.4
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 +1 -1
- package/bin/flowgrid.mjs +6 -6
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ pnpm 10+ cần `--allow-build` khi cài **từ GitHub** (build TypeScript lúc c
|
|
|
91
91
|
| --- | --- |
|
|
92
92
|
| **Linux / macOS** | Chạy `pnpm setup` nếu shell báo thiếu bin; thường là `~/.local/share/pnpm`. |
|
|
93
93
|
| **WSL** | Giống Linux — dùng Node/pnpm **trong WSL**, không trộn với Node cài trên Windows host trừ khi cố ý. |
|
|
94
|
-
| **Windows (PowerShell, CMD, Windows Terminal)** |
|
|
94
|
+
| **Windows (PowerShell, CMD, Windows Terminal)** | **`pnpm setup`** → terminal mới → `pnpm add -g @shanyucoder/flowgrid@0.1.4` (hoặc `@latest` sau publish). **Node ≥ 24** bắt buộc (`node -v`). `flowgrid --version` — bản **≤ 0.1.2** có thể im lặng trên Windows. |
|
|
95
95
|
|
|
96
96
|
**WSL / Git Bash** có thể dùng lệnh pnpm ở trên; **không** bắt buộc `install.sh` nếu đã cài global qua pnpm.
|
|
97
97
|
|
package/bin/flowgrid.mjs
CHANGED
|
@@ -21,6 +21,10 @@ import {
|
|
|
21
21
|
promptHubRoot,
|
|
22
22
|
} from './lib/init-scaffold.mjs';
|
|
23
23
|
|
|
24
|
+
function packageRootFromMeta(metaUrl) {
|
|
25
|
+
return path.resolve(path.dirname(fileURLToPath(metaUrl)), '..');
|
|
26
|
+
}
|
|
27
|
+
|
|
24
28
|
function assertNodeVersion() {
|
|
25
29
|
const major = Number(process.versions.node.split('.')[0]);
|
|
26
30
|
if (!Number.isFinite(major) || major < 24) {
|
|
@@ -35,7 +39,7 @@ export async function main() {
|
|
|
35
39
|
assertNodeVersion();
|
|
36
40
|
const args = process.argv.slice(2);
|
|
37
41
|
if (args.includes('version') || args.includes('-v') || args.includes('--version')) {
|
|
38
|
-
const pkgPath = path.
|
|
42
|
+
const pkgPath = path.join(packageRootFromMeta(import.meta.url), 'package.json');
|
|
39
43
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
40
44
|
console.log(`FlowGrid v${pkg.version}`);
|
|
41
45
|
return;
|
|
@@ -917,11 +921,7 @@ export async function main() {
|
|
|
917
921
|
outro(pc.green("Success! FlowGrid is initialized for your project."));
|
|
918
922
|
}
|
|
919
923
|
|
|
920
|
-
|
|
921
|
-
process.argv[1] &&
|
|
922
|
-
path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
|
923
|
-
|
|
924
|
-
if (isDirectCli) {
|
|
924
|
+
if (import.meta.main) {
|
|
925
925
|
main().catch((err) => {
|
|
926
926
|
console.error(pc.red(err.message));
|
|
927
927
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shanyucoder/flowgrid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Unified Local MCP Toolkit (Graph, DNA, Docs, Test, Codegen)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -89,10 +89,5 @@
|
|
|
89
89
|
"vitepress-mermaid-renderer": "^1.1.28",
|
|
90
90
|
"vitepress-plugin-mermaid": "^2.0.17",
|
|
91
91
|
"vue": "^3.4.21"
|
|
92
|
-
},
|
|
93
|
-
"pnpm": {
|
|
94
|
-
"onlyBuiltDependencies": [
|
|
95
|
-
"esbuild"
|
|
96
|
-
]
|
|
97
92
|
}
|
|
98
93
|
}
|