@boopkit/cli 0.1.11 → 0.1.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.
@@ -0,0 +1,117 @@
1
+ [
2
+ {
3
+ "name": "api",
4
+ "description": "REST API with Express",
5
+ "type": "application",
6
+ "package": "@boopkit/cap-api",
7
+ "requires": []
8
+ },
9
+ {
10
+ "name": "background-jobs",
11
+ "description": "Background job processing with RabbitMQ via CloudAMQP",
12
+ "type": "application",
13
+ "package": "@boopkit/cap-background-jobs",
14
+ "requires": [
15
+ "services"
16
+ ]
17
+ },
18
+ {
19
+ "name": "cloud-storage",
20
+ "description": "Cloud storage service for files and assets (AWS S3)",
21
+ "type": "application",
22
+ "package": "@boopkit/cap-cloud-storage",
23
+ "requires": [
24
+ "services"
25
+ ]
26
+ },
27
+ {
28
+ "name": "coding",
29
+ "description": "Development tools and conventions",
30
+ "type": "development",
31
+ "package": "@boopkit/cap-coding",
32
+ "requires": []
33
+ },
34
+ {
35
+ "name": "database",
36
+ "description": "Postgres via Prisma ORM",
37
+ "type": "application",
38
+ "package": "@boopkit/cap-database",
39
+ "requires": []
40
+ },
41
+ {
42
+ "name": "email",
43
+ "description": "Transactional email via Sendgrid with Handlebars templates",
44
+ "type": "application",
45
+ "package": "@boopkit/cap-email",
46
+ "requires": [
47
+ "services"
48
+ ]
49
+ },
50
+ {
51
+ "name": "hello",
52
+ "description": "Trivial capability to validate the capability package pipeline",
53
+ "type": "demo",
54
+ "package": "@boopkit/cap-hello",
55
+ "requires": []
56
+ },
57
+ {
58
+ "name": "noticeboard",
59
+ "description": "Notice board demo — data service, business service, handler set, and router factory",
60
+ "type": "demo",
61
+ "package": "@boopkit/cap-noticeboard",
62
+ "requires": []
63
+ },
64
+ {
65
+ "name": "product-design",
66
+ "description": "Product design skills",
67
+ "type": "development",
68
+ "package": "@boopkit/cap-product-design",
69
+ "requires": []
70
+ },
71
+ {
72
+ "name": "project-mgmt",
73
+ "description": "Project management with beads",
74
+ "type": "development",
75
+ "package": "@boopkit/cap-project-mgmt",
76
+ "requires": []
77
+ },
78
+ {
79
+ "name": "services",
80
+ "description": "Service layer with controllers and business logic",
81
+ "type": "application",
82
+ "package": "@boopkit/cap-services",
83
+ "requires": []
84
+ },
85
+ {
86
+ "name": "skills",
87
+ "description": "Skill authoring",
88
+ "type": "development",
89
+ "package": "@boopkit/cap-skills",
90
+ "requires": []
91
+ },
92
+ {
93
+ "name": "testing",
94
+ "description": "Jest testing setup",
95
+ "type": "development",
96
+ "package": "@boopkit/cap-testing",
97
+ "requires": []
98
+ },
99
+ {
100
+ "name": "users-and-accounts",
101
+ "description": "Users, identities, properties, and authentication via Prisma",
102
+ "type": "application",
103
+ "package": "@boopkit/cap-users",
104
+ "requires": [
105
+ "database",
106
+ "services",
107
+ "web"
108
+ ]
109
+ },
110
+ {
111
+ "name": "web",
112
+ "description": "Web UI with Handlebars + Tailwind",
113
+ "type": "application",
114
+ "package": "@boopkit/cap-web",
115
+ "requires": []
116
+ }
117
+ ]
@@ -111,6 +111,22 @@ function findPackageDirByCapabilityName(name, searchPaths) {
111
111
  }
112
112
  return null;
113
113
  }
114
+ /**
115
+ * Load the baked-in capability catalog from dist/capability-catalog.json.
116
+ * Returns an empty array if the file doesn't exist (e.g. running from source
117
+ * without a build step).
118
+ */
119
+ function loadCatalog() {
120
+ const catalogPath = path.join(__dirname, '..', 'capability-catalog.json');
121
+ if (!fs.existsSync(catalogPath))
122
+ return [];
123
+ try {
124
+ return JSON.parse(fs.readFileSync(catalogPath, 'utf-8'));
125
+ }
126
+ catch {
127
+ return [];
128
+ }
129
+ }
114
130
  /**
115
131
  * List all capabilities by scanning package directory and capabilities/ source tree (test fixtures only).
116
132
  * Package resolution takes priority. Returns metadata for each valid capability.
@@ -118,8 +134,16 @@ function findPackageDirByCapabilityName(name, searchPaths) {
118
134
  function listCapabilities() {
119
135
  const seen = new Set();
120
136
  const capabilities = [];
121
- // Collect @boopkit dirs to scan: both the CLI package's own node_modules
122
- // and the current project's node_modules (when run from a boop project)
137
+ // Primary source: baked-in catalog (always available in published CLI)
138
+ const catalog = loadCatalog();
139
+ for (const cap of catalog) {
140
+ if (cap.name.startsWith('_'))
141
+ continue;
142
+ seen.add(cap.name);
143
+ capabilities.push(cap);
144
+ }
145
+ // Secondary: scan node_modules for capabilities not in the catalog
146
+ // (e.g. third-party or locally-developed capability packages)
123
147
  const boopkitDirs = [];
124
148
  const cliBoopkit = path.join((0, config_1.getBoopRoot)(), 'node_modules', '@boopkit');
125
149
  boopkitDirs.push(cliBoopkit);
@@ -127,7 +151,6 @@ function listCapabilities() {
127
151
  if (cwdBoopkit !== cliBoopkit) {
128
152
  boopkitDirs.push(cwdBoopkit);
129
153
  }
130
- // Scan node_modules/@boopkit/cap-* for packages with boopkit.capability === true
131
154
  for (const nodeModulesBoopkit of boopkitDirs) {
132
155
  if (!fs.existsSync(nodeModulesBoopkit))
133
156
  continue;
@@ -153,7 +176,7 @@ function listCapabilities() {
153
176
  if (!entry.isDirectory())
154
177
  continue;
155
178
  if (seen.has(entry.name))
156
- continue; // Package takes priority
179
+ continue;
157
180
  const cap = getCapabilityFromSourceTree(entry.name);
158
181
  if (cap) {
159
182
  capabilities.push(cap);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "CLI tool to scaffold new projects from boop profiles and capabilities",
5
5
  "main": "dist/cli.js",
6
6
  "workspaces": [