@boopkit/cli 0.6.17 → 0.6.18

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
@@ -81,6 +81,7 @@ program
81
81
  .option('--no-install', 'Skip npm install')
82
82
  .option('--json', 'Output structured JSON')
83
83
  .option('--dry-run', 'Show what would be done without making changes')
84
+ .option('--tag <tag>', 'Use a specific npm dist-tag instead of latest (e.g. beta)')
84
85
  .addHelpText('after', '\nRun `boop list capabilities` to see available options.')
85
86
  .action(add_1.runAdd);
86
87
  program
@@ -2,5 +2,6 @@ export interface AddOptions {
2
2
  install?: boolean;
3
3
  json?: boolean;
4
4
  dryRun?: boolean;
5
+ tag?: string;
5
6
  }
6
7
  export declare function runAdd(capabilityName: string | undefined, options: AddOptions): void;
@@ -65,13 +65,17 @@ function runAdd(capabilityName, options) {
65
65
  // When the CLI is installed globally, capability packages aren't in
66
66
  // node_modules yet. Install the package so preflight can read its
67
67
  // capability.json, scaffold files, etc.
68
- if (!(0, capability_1.getPackageDir)(capabilityName, [targetDir])) {
68
+ // With --tag, install from that dist-tag even when a package is present
69
+ // (the operator asked for that version), and skip npm's cached registry
70
+ // metadata, which can predate a just-published beta.
71
+ if (options.tag || !(0, capability_1.getPackageDir)(capabilityName, [targetDir])) {
69
72
  const catalogEntry = (0, capability_1.getCatalogEntry)(capabilityName);
70
73
  if (catalogEntry?.package) {
71
- const spec = catalogEntry.package;
74
+ const spec = options.tag ? `${catalogEntry.package}@${options.tag}` : catalogEntry.package;
75
+ const flags = options.tag ? ' --prefer-online' : '';
72
76
  console.error(`Installing ${spec}...`);
73
77
  try {
74
- (0, child_process_1.execSync)(`npm install ${spec}`, { cwd: targetDir, stdio: 'pipe' });
78
+ (0, child_process_1.execSync)(`npm install ${spec}${flags}`, { cwd: targetDir, stdio: 'pipe' });
75
79
  }
76
80
  catch (err) {
77
81
  console.error(`\x1b[31mERR\x1b[0m Failed to install ${spec}: ${err.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cli",
3
- "version": "0.6.17",
3
+ "version": "0.6.18",
4
4
  "description": "boop: the opinionated bootstrap for founder friendly, AI-first web apps - code plus agent skills, composable from day one.",
5
5
  "main": "dist/cli.js",
6
6
  "workspaces": [