@boopkit/cli 0.1.11 → 0.1.13
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/capability-catalog.json +117 -0
- package/dist/lib/capability.js +33 -4
- package/package.json +1 -1
|
@@ -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
|
+
]
|
package/dist/lib/capability.js
CHANGED
|
@@ -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,22 @@ function findPackageDirByCapabilityName(name, searchPaths) {
|
|
|
118
134
|
function listCapabilities() {
|
|
119
135
|
const seen = new Set();
|
|
120
136
|
const capabilities = [];
|
|
121
|
-
//
|
|
122
|
-
|
|
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
|
+
// Also track the package short name (e.g. "users" from "@boopkit/cap-users")
|
|
144
|
+
// so the node_modules scan doesn't re-add it under its directory name
|
|
145
|
+
if (cap.package) {
|
|
146
|
+
const shortName = cap.package.replace(/^@boopkit\/cap-/, '');
|
|
147
|
+
seen.add(shortName);
|
|
148
|
+
}
|
|
149
|
+
capabilities.push(cap);
|
|
150
|
+
}
|
|
151
|
+
// Secondary: scan node_modules for capabilities not in the catalog
|
|
152
|
+
// (e.g. third-party or locally-developed capability packages)
|
|
123
153
|
const boopkitDirs = [];
|
|
124
154
|
const cliBoopkit = path.join((0, config_1.getBoopRoot)(), 'node_modules', '@boopkit');
|
|
125
155
|
boopkitDirs.push(cliBoopkit);
|
|
@@ -127,7 +157,6 @@ function listCapabilities() {
|
|
|
127
157
|
if (cwdBoopkit !== cliBoopkit) {
|
|
128
158
|
boopkitDirs.push(cwdBoopkit);
|
|
129
159
|
}
|
|
130
|
-
// Scan node_modules/@boopkit/cap-* for packages with boopkit.capability === true
|
|
131
160
|
for (const nodeModulesBoopkit of boopkitDirs) {
|
|
132
161
|
if (!fs.existsSync(nodeModulesBoopkit))
|
|
133
162
|
continue;
|
|
@@ -153,7 +182,7 @@ function listCapabilities() {
|
|
|
153
182
|
if (!entry.isDirectory())
|
|
154
183
|
continue;
|
|
155
184
|
if (seen.has(entry.name))
|
|
156
|
-
continue;
|
|
185
|
+
continue;
|
|
157
186
|
const cap = getCapabilityFromSourceTree(entry.name);
|
|
158
187
|
if (cap) {
|
|
159
188
|
capabilities.push(cap);
|