create-guardio 0.0.9 → 0.0.10
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/index.mjs +13 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -73,8 +73,20 @@ async function setupDashboardFromTarball(guardioPath) {
|
|
|
73
73
|
"Dashboard tarball missing packages/dashboard. Wrong repo or branch?",
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
+
// Copy only the dashboard package contents into guardioPath/dashboard (never the whole repo)
|
|
76
77
|
await mkdir(dashboardPath, { recursive: true });
|
|
77
|
-
|
|
78
|
+
const dashboardEntries = readdirSync(srcDashboard, { withFileTypes: true });
|
|
79
|
+
for (const e of dashboardEntries) {
|
|
80
|
+
cpSync(join(srcDashboard, e.name), join(dashboardPath, e.name), {
|
|
81
|
+
recursive: true,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const dashboardPkgJson = join(dashboardPath, "package.json");
|
|
85
|
+
if (!existsSync(dashboardPkgJson)) {
|
|
86
|
+
throw new Error(
|
|
87
|
+
"Dashboard package missing package.json after copy. Wrong repo layout?",
|
|
88
|
+
);
|
|
89
|
+
}
|
|
78
90
|
console.log("Installing dashboard dependencies...");
|
|
79
91
|
const installResult = spawnSync(
|
|
80
92
|
"pnpm",
|