@boopkit/cli 0.1.3 → 0.1.5
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"@boopkit/cap-api": "0.1.0",
|
|
3
3
|
"@boopkit/cap-cloud-storage": "0.1.0",
|
|
4
4
|
"@boopkit/cap-coding": "0.1.0",
|
|
5
|
-
"@boopkit/cap-database": "0.1.
|
|
5
|
+
"@boopkit/cap-database": "0.1.1",
|
|
6
6
|
"@boopkit/cap-email": "0.1.0",
|
|
7
7
|
"@boopkit/cap-hello": "0.1.0",
|
|
8
8
|
"@boopkit/cap-noticeboard": "0.1.0",
|
package/dist/commands/init.js
CHANGED
|
@@ -181,6 +181,10 @@ function runInit(name, options) {
|
|
|
181
181
|
variables.hookPreRoutes = hookVars.hookPreRoutes;
|
|
182
182
|
variables.hookPostRoutes = hookVars.hookPostRoutes;
|
|
183
183
|
(0, scaffold_1.scaffoldKernel)(targetDir, variables, true);
|
|
184
|
+
// Re-scaffolding overwrites package.json (template has empty deps),
|
|
185
|
+
// so re-merge kernel deps + cap package deps that were added earlier.
|
|
186
|
+
(0, scaffold_1.mergePackageJson)(targetDir, profile.kernel.dependencies, profile.kernel.devDependencies, undefined, { skipBackup: true });
|
|
187
|
+
(0, scaffold_1.mergePackageJson)(targetDir, undefined, undefined, capDeps, { skipBackup: true });
|
|
184
188
|
}
|
|
185
189
|
// Post-install conflict check (when preflight was deferred)
|
|
186
190
|
if (!preflight) {
|
|
@@ -326,6 +330,15 @@ function runInit(name, options) {
|
|
|
326
330
|
}
|
|
327
331
|
// --- Post-install setup (CSS build, Prisma generate) ---
|
|
328
332
|
if (shouldInstall) {
|
|
333
|
+
// Re-run npm install to pick up deps added by capability scaffolding
|
|
334
|
+
// (the first install only had kernel + @boopkit/cap-* deps)
|
|
335
|
+
try {
|
|
336
|
+
console.log('\nInstalling capability dependencies...');
|
|
337
|
+
(0, child_process_1.execSync)('npm install', { cwd: targetDir, stdio: 'inherit' });
|
|
338
|
+
}
|
|
339
|
+
catch {
|
|
340
|
+
console.error('Warning: npm install failed. You can run it manually later.');
|
|
341
|
+
}
|
|
329
342
|
// Build CSS if tailwind:build script exists
|
|
330
343
|
const pkgPath = path.join(targetDir, 'package.json');
|
|
331
344
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
@@ -348,13 +361,6 @@ function runInit(name, options) {
|
|
|
348
361
|
console.error('Warning: Prisma generate failed. Run `npm run db:generate` manually.');
|
|
349
362
|
}
|
|
350
363
|
}
|
|
351
|
-
// Re-run npm install to pick up any new deps added by capability scaffolding
|
|
352
|
-
try {
|
|
353
|
-
(0, child_process_1.execSync)('npm install', { cwd: targetDir, stdio: 'inherit' });
|
|
354
|
-
}
|
|
355
|
-
catch {
|
|
356
|
-
// Already warned earlier if npm install has issues
|
|
357
|
-
}
|
|
358
364
|
}
|
|
359
365
|
console.log(`\nNext steps:`);
|
|
360
366
|
console.log(` cd ${name}`);
|