@boopkit/cli 0.6.11 → 0.6.12

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.
@@ -75,6 +75,17 @@
75
75
  "web"
76
76
  ]
77
77
  },
78
+ {
79
+ "name": "oauth-server",
80
+ "description": "Be an OAuth 2.1 authorization server and resource server, so Claude, Claude Code or any MCP client can act on behalf of one of your users",
81
+ "type": "application",
82
+ "package": "@boopkit/cap-oauth-server",
83
+ "requires": [
84
+ "users-and-accounts",
85
+ "web",
86
+ "database"
87
+ ]
88
+ },
78
89
  {
79
90
  "name": "product-design",
80
91
  "description": "Product design skills",
@@ -8,12 +8,13 @@
8
8
  "@boopkit/cap-hello": "0.4.1",
9
9
  "@boopkit/cap-noticeboard": "0.4.1",
10
10
  "@boopkit/cap-oauth-client": "0.1.1",
11
+ "@boopkit/cap-oauth-server": "0.1.0",
11
12
  "@boopkit/cap-product-design": "0.6.7",
12
13
  "@boopkit/cap-project-mgmt": "0.4.9",
13
14
  "@boopkit/cap-services": "0.4.2",
14
15
  "@boopkit/cap-skills": "0.5.4",
15
16
  "@boopkit/cap-testing": "0.5.6",
16
- "@boopkit/cap-users": "0.7.0",
17
+ "@boopkit/cap-users": "0.8.0",
17
18
  "@boopkit/cap-ux": "0.2.2",
18
19
  "@boopkit/cap-web": "0.5.4",
19
20
  "@boopkit/cap-workflows": "0.2.0",
@@ -127,7 +127,7 @@ function executeTask(task, manifest) {
127
127
  case 'link-package': {
128
128
  const data = task.data;
129
129
  (0, scaffold_1.mergePackageJson)(targetDir, undefined, undefined, {
130
- [data.packageName]: (0, scaffold_1.getBoopkitVersion)(data.packageName),
130
+ [data.packageName]: (0, scaffold_1.getBoopkitVersion)(data.packageName, [targetDir]),
131
131
  }, { skipBackup: true });
132
132
  break;
133
133
  }
@@ -64,11 +64,17 @@ export declare function linkSkillsToClaude(targetDir: string, only?: Iterable<st
64
64
  * Read the version from a @boopkit/ package's package.json and return ^version.
65
65
  * Fallback chain:
66
66
  * 1. Monorepo packages/ dir (development)
67
- * 2. require.resolve from CLI's node_modules
67
+ * 2. require.resolve from `searchPaths`, then the CLI's node_modules
68
68
  * 3. dist/capability-versions.json (baked at build time for npm installs)
69
69
  * 4. '*' (last resort)
70
+ *
71
+ * `searchPaths` is where the *project* is, and it comes before the CLI root for
72
+ * the same reason `planAdd` passes it: the package a project is being given may
73
+ * only exist under that project — npm-linked from a worktree, or installed by
74
+ * `boop add`'s own phase 0 — and reading only the CLI root then falls all the
75
+ * way through to `'*'`, which is not a version any install can resolve.
70
76
  */
71
- export declare function getBoopkitVersion(packageName: string): string;
77
+ export declare function getBoopkitVersion(packageName: string, searchPaths?: string[]): string;
72
78
  /**
73
79
  * The warning shown when a dependency lands in a project's package.json with no
74
80
  * version range. Written to be actionable by an agent reading it in a
@@ -128,7 +128,11 @@ function hashFile(filePath) {
128
128
  * Returns list of copied file paths relative to targetDir, and file hashes.
129
129
  */
130
130
  function copyCapabilityFiles(targetDir, capabilityName, searchPaths) {
131
- const pkgDir = (0, capability_1.getPackageDir)(capabilityName, searchPaths);
131
+ // Default to the project itself, so this resolves the capability to the same
132
+ // package `planAdd` did. Without it a capability that lives only under the
133
+ // project resolved here to nothing, and `boop add` reported every file copied
134
+ // while copying none (boop-2vdy.8.5).
135
+ const pkgDir = (0, capability_1.getPackageDir)(capabilityName, searchPaths ?? [targetDir]);
132
136
  if (pkgDir) {
133
137
  // Read package.json for boopkit config
134
138
  const pkgJsonPath = path.join(pkgDir, 'package.json');
@@ -266,11 +270,17 @@ function updateCapabilityHashes(targetDir, capabilityName, fileHashes, version)
266
270
  * Read the version from a @boopkit/ package's package.json and return ^version.
267
271
  * Fallback chain:
268
272
  * 1. Monorepo packages/ dir (development)
269
- * 2. require.resolve from CLI's node_modules
273
+ * 2. require.resolve from `searchPaths`, then the CLI's node_modules
270
274
  * 3. dist/capability-versions.json (baked at build time for npm installs)
271
275
  * 4. '*' (last resort)
276
+ *
277
+ * `searchPaths` is where the *project* is, and it comes before the CLI root for
278
+ * the same reason `planAdd` passes it: the package a project is being given may
279
+ * only exist under that project — npm-linked from a worktree, or installed by
280
+ * `boop add`'s own phase 0 — and reading only the CLI root then falls all the
281
+ * way through to `'*'`, which is not a version any install can resolve.
272
282
  */
273
- function getBoopkitVersion(packageName) {
283
+ function getBoopkitVersion(packageName, searchPaths) {
274
284
  const pkgName = packageName.replace(/^@boopkit\//, '');
275
285
  // Try monorepo packages/ directory first (development)
276
286
  const monorepoPkgJsonPath = path.join((0, config_1.getBoopRoot)(), 'packages', pkgName, 'package.json');
@@ -281,10 +291,25 @@ function getBoopkitVersion(packageName) {
281
291
  catch {
282
292
  // Not in monorepo — try require.resolve (published CLI install)
283
293
  }
294
+ // Then the node_modules of each search path, read straight off disk rather
295
+ // than through require.resolve — the package being read may have no build
296
+ // output yet, and a resolver is entitled to refuse a package whose `main`
297
+ // does not exist.
298
+ for (const searchPath of [...(searchPaths ?? []), (0, config_1.getBoopRoot)()]) {
299
+ try {
300
+ const installedPath = path.join(searchPath, 'node_modules', packageName, 'package.json');
301
+ const pkg = JSON.parse(fs.readFileSync(installedPath, 'utf-8'));
302
+ if (pkg.version)
303
+ return `^${pkg.version}`;
304
+ }
305
+ catch {
306
+ // Not installed under this path — try the next
307
+ }
308
+ }
284
309
  // Try resolving the installed package
285
310
  try {
286
311
  const resolvedPath = require.resolve(`${packageName}/package.json`, {
287
- paths: [(0, config_1.getBoopRoot)()],
312
+ paths: [...(searchPaths ?? []), (0, config_1.getBoopRoot)()],
288
313
  });
289
314
  const pkg = JSON.parse(fs.readFileSync(resolvedPath, 'utf-8'));
290
315
  return `^${pkg.version}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cli",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
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": [