@boopkit/cli 0.1.10 → 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,15 +134,34 @@ function findPackageDirByCapabilityName(name, searchPaths) {
118
134
  function listCapabilities() {
119
135
  const seen = new Set();
120
136
  const capabilities = [];
121
- // Scan node_modules/@boopkit/cap-* for packages with boopkit.capability === true
122
- const nodeModulesBoopkit = path.join((0, config_1.getBoopRoot)(), 'node_modules', '@boopkit');
123
- if (fs.existsSync(nodeModulesBoopkit)) {
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)
147
+ const boopkitDirs = [];
148
+ const cliBoopkit = path.join((0, config_1.getBoopRoot)(), 'node_modules', '@boopkit');
149
+ boopkitDirs.push(cliBoopkit);
150
+ const cwdBoopkit = path.join(process.cwd(), 'node_modules', '@boopkit');
151
+ if (cwdBoopkit !== cliBoopkit) {
152
+ boopkitDirs.push(cwdBoopkit);
153
+ }
154
+ for (const nodeModulesBoopkit of boopkitDirs) {
155
+ if (!fs.existsSync(nodeModulesBoopkit))
156
+ continue;
124
157
  const entries = fs.readdirSync(nodeModulesBoopkit, { withFileTypes: true });
125
158
  for (const entry of entries) {
126
159
  if ((!entry.isDirectory() && !entry.isSymbolicLink()) || !entry.name.startsWith('cap-'))
127
160
  continue;
128
161
  const capName = entry.name.replace(/^cap-/, '');
129
- const cap = getCapabilityFromPackage(capName);
162
+ if (seen.has(capName))
163
+ continue;
164
+ const cap = getCapabilityFromPackage(capName, [process.cwd()]);
130
165
  if (cap) {
131
166
  seen.add(capName);
132
167
  capabilities.push(cap);
@@ -141,7 +176,7 @@ function listCapabilities() {
141
176
  if (!entry.isDirectory())
142
177
  continue;
143
178
  if (seen.has(entry.name))
144
- continue; // Package takes priority
179
+ continue;
145
180
  const cap = getCapabilityFromSourceTree(entry.name);
146
181
  if (cap) {
147
182
  capabilities.push(cap);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boopkit/cli",
3
- "version": "0.1.10",
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": [