next-arch-map 0.1.0 → 0.1.13
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/cli.js +20 -0
- package/package.json +5 -3
package/dist/cli.js
CHANGED
|
@@ -224,6 +224,26 @@ async function runDev(options) {
|
|
|
224
224
|
...(options.appDirs ?? []).flatMap((dir) => ["--app-dir", dir]),
|
|
225
225
|
], { stdio: "inherit" });
|
|
226
226
|
children.push(serveProcess);
|
|
227
|
+
// Install viewer dependencies if needed
|
|
228
|
+
const viewerNodeModules = path.join(options.viewerDir, "node_modules");
|
|
229
|
+
if (!fs.existsSync(viewerNodeModules)) {
|
|
230
|
+
console.log("Installing viewer dependencies...");
|
|
231
|
+
const installProcess = spawn("npm", ["install"], {
|
|
232
|
+
cwd: options.viewerDir,
|
|
233
|
+
stdio: "inherit",
|
|
234
|
+
shell: process.platform === "win32",
|
|
235
|
+
});
|
|
236
|
+
await new Promise((resolve, reject) => {
|
|
237
|
+
installProcess.once("exit", (code) => {
|
|
238
|
+
if (code === 0) {
|
|
239
|
+
resolve();
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
reject(new Error(`npm install failed with code ${code}`));
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
}
|
|
227
247
|
// Start the viewer dev server
|
|
228
248
|
const viewerProcess = spawn("npm", ["run", "dev"], {
|
|
229
249
|
cwd: options.viewerDir,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-arch-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Static analyzer that builds a multi-layer architecture graph for Next.js-style apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc -p tsconfig.json",
|
|
27
27
|
"check": "tsc --noEmit -p tsconfig.json",
|
|
28
|
+
"test": "vitest run",
|
|
28
29
|
"dev": "node dist/cli.js dev"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [
|
|
@@ -40,10 +41,11 @@
|
|
|
40
41
|
},
|
|
41
42
|
"license": "MIT",
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"chokidar": "^3.6.0"
|
|
44
|
+
"chokidar": "^3.6.0",
|
|
45
|
+
"typescript": "^5.8.2"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@types/node": "^20.19.0",
|
|
47
|
-
"
|
|
49
|
+
"vitest": "^4.1.0"
|
|
48
50
|
}
|
|
49
51
|
}
|