create-fsaa 0.1.3 → 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/lib/init.mjs +13 -5
- package/package.json +1 -1
package/lib/init.mjs
CHANGED
|
@@ -68,12 +68,20 @@ export async function initCmd({ flags, interactive }) {
|
|
|
68
68
|
// Windows: pnpm ships as pnpm.cmd; spawning a bare "pnpm" on win32 fails
|
|
69
69
|
// (Node ≥18.20 refuses .cmd/.bat without shell). Use the .cmd shim there.
|
|
70
70
|
const pnpmBin = process.platform === "win32" ? "pnpm.cmd" : "pnpm";
|
|
71
|
-
|
|
72
|
-
const r = spawnSync(pnpmBin, ["install"], { cwd: dest, stdio: "inherit" });
|
|
71
|
+
let r = spawnSync(pnpmBin, ["install"], { cwd: dest, stdio: "inherit" });
|
|
73
72
|
if (r.error) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
// pnpm missing from PATH — recover INSTEAD of nagging: run the pinned
|
|
74
|
+
// version through npx (npx exists wherever this CLI already runs).
|
|
75
|
+
const pinned = (pkg.packageManager || "pnpm@9.15.0").split("@")[1] || "9.15.0";
|
|
76
|
+
const npxBin = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
77
|
+
console.log(` pnpm not on PATH — running the pinned pnpm@${pinned} through npx…`);
|
|
78
|
+
r = spawnSync(npxBin, ["-y", `pnpm@${pinned}`, "install"], { cwd: dest, stdio: "inherit" });
|
|
79
|
+
if (r.error) {
|
|
80
|
+
console.error(`\nfsaa: could not install dependencies automatically (npx unavailable).\n recover by hand: cd ${dest} && npm exec -y pnpm@${pinned} install`);
|
|
81
|
+
const e = new Error("install failed");
|
|
82
|
+
e.userError = true;
|
|
83
|
+
throw e;
|
|
84
|
+
}
|
|
77
85
|
}
|
|
78
86
|
if (r.status !== 0) {
|
|
79
87
|
console.error(`fsaa: dependency install failed — the template files are in place.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-fsaa",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "FSAA \u2014 Feature-Sliced Atomic Architecture. Run `npm create fsaa` (this package) to scaffold an FSAA app from the official starter templates; `fsaa g <slice>` generates canonical slices.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Veaceslav Bezusco <Aramex86@users.noreply.github.com>",
|