@boopkit/cli 0.1.14 → 0.1.15

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 CHANGED
@@ -89,6 +89,7 @@ program
89
89
  .option('--restore', 'Restore locally deleted scaffold files')
90
90
  .option('--prune', 'Remove deprecated scaffold files from disk (creates .bak backup)')
91
91
  .option('--skip-npm', 'Skip npm update (only re-scaffold from installed versions)')
92
+ .option('--tag <tag>', 'Use a specific npm dist-tag instead of major-version pinning (e.g. beta)')
92
93
  .option('--json', 'Output structured JSON')
93
94
  .action(update_1.runUpdate);
94
95
  program
@@ -117,11 +117,10 @@ function getStatusData(manifest, dir) {
117
117
  }
118
118
  }
119
119
  if (allRequiredSet) {
120
- // Env vars are set — check if capability has setup checks or postInstall steps
120
+ // Env vars are set — check if capability has setup checks that enrichWithSetupChecks can resolve
121
121
  const capDef = (0, capability_1.getCapability)(capName, [dir]);
122
122
  const hasSetupChecks = capDef?.postInstall?.setupChecks?.length;
123
- const hasPostInstall = capDef?.postInstall && (capDef.postInstall.steps?.length || capDef.postInstall.verify);
124
- if (hasSetupChecks || hasPostInstall) {
123
+ if (hasSetupChecks) {
125
124
  // Mark as 'setup' — dynamic checks will populate steps during enrichment
126
125
  capabilities[capName] = { status: 'setup', type: capType, env: envStatus, optionalSteps: optionalSteps.length > 0 ? optionalSteps : undefined };
127
126
  }
@@ -5,5 +5,6 @@ export interface UpdateOptions {
5
5
  prune?: boolean;
6
6
  json?: boolean;
7
7
  skipNpm?: boolean;
8
+ tag?: string;
8
9
  }
9
10
  export declare function runUpdate(capabilityName: string | undefined, options: UpdateOptions): void;
@@ -61,7 +61,7 @@ function runUpdate(capabilityName, options) {
61
61
  }
62
62
  // Step 1: npm install capability packages at latest within current major (unless --skip-npm or --dry-run)
63
63
  if (!options.skipNpm && !options.dryRun) {
64
- const packageSpecs = resolveNpmPackageSpecs(capsToUpdate, targetDir);
64
+ const packageSpecs = resolveNpmPackageSpecs(capsToUpdate, targetDir, options.tag);
65
65
  if (packageSpecs.length > 0) {
66
66
  if (!options.json) {
67
67
  console.log(`Updating npm packages: ${packageSpecs.join(', ')}`);
@@ -224,7 +224,7 @@ function diagnoseMissingPlans(capsToUpdate, requestedCap, targetDir) {
224
224
  * This allows minor+patch updates within the same major (including 0.x → 0.y)
225
225
  * without crossing a major version boundary.
226
226
  */
227
- function resolveNpmPackageSpecs(capabilities, targetDir) {
227
+ function resolveNpmPackageSpecs(capabilities, targetDir, tag) {
228
228
  const specs = [];
229
229
  for (const cap of capabilities) {
230
230
  const pkgDir = (0, capability_1.getPackageDir)(cap, [targetDir]);
@@ -235,8 +235,13 @@ function resolveNpmPackageSpecs(capabilities, targetDir) {
235
235
  continue;
236
236
  const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8'));
237
237
  if (pkgJson.name && pkgJson.boopkit?.capability && pkgJson.version) {
238
- const major = pkgJson.version.split('.')[0];
239
- specs.push(`${pkgJson.name}@${major}`);
238
+ if (tag) {
239
+ specs.push(`${pkgJson.name}@${tag}`);
240
+ }
241
+ else {
242
+ const major = pkgJson.version.split('.')[0];
243
+ specs.push(`${pkgJson.name}@${major}`);
244
+ }
240
245
  }
241
246
  }
242
247
  return specs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cli",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "CLI tool to scaffold new projects from boop profiles and capabilities",
5
5
  "main": "dist/cli.js",
6
6
  "workspaces": [