@intranefr/superbackend 1.6.7 → 1.7.8

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.
Files changed (119) hide show
  1. package/.beads/.br_history/issues.20260314_212352_900045509.jsonl +0 -0
  2. package/.beads/.br_history/issues.20260314_212352_900045509.jsonl.meta.json +1 -0
  3. package/.beads/.br_history/issues.20260314_212353_087140743.jsonl +1 -0
  4. package/.beads/.br_history/issues.20260314_212353_087140743.jsonl.meta.json +1 -0
  5. package/.beads/.br_history/issues.20260314_212353_285881504.jsonl +2 -0
  6. package/.beads/.br_history/issues.20260314_212353_285881504.jsonl.meta.json +1 -0
  7. package/.beads/.br_history/issues.20260314_212353_473915419.jsonl +3 -0
  8. package/.beads/.br_history/issues.20260314_212353_473915419.jsonl.meta.json +1 -0
  9. package/.beads/.br_history/issues.20260314_212353_659476307.jsonl +4 -0
  10. package/.beads/.br_history/issues.20260314_212353_659476307.jsonl.meta.json +1 -0
  11. package/.beads/.br_history/issues.20260314_212353_869998925.jsonl +5 -0
  12. package/.beads/.br_history/issues.20260314_212353_869998925.jsonl.meta.json +1 -0
  13. package/.beads/.br_history/issues.20260314_212354_054785029.jsonl +6 -0
  14. package/.beads/.br_history/issues.20260314_212354_054785029.jsonl.meta.json +1 -0
  15. package/.beads/.br_history/issues.20260314_213336_175893691.jsonl +7 -0
  16. package/.beads/.br_history/issues.20260314_213336_175893691.jsonl.meta.json +1 -0
  17. package/.beads/.br_history/issues.20260314_213336_338509797.jsonl +7 -0
  18. package/.beads/.br_history/issues.20260314_213336_338509797.jsonl.meta.json +1 -0
  19. package/.beads/.br_history/issues.20260314_213336_515443192.jsonl +7 -0
  20. package/.beads/.br_history/issues.20260314_213336_515443192.jsonl.meta.json +1 -0
  21. package/.beads/.br_history/issues.20260314_213336_676417592.jsonl +7 -0
  22. package/.beads/.br_history/issues.20260314_213336_676417592.jsonl.meta.json +1 -0
  23. package/.beads/.br_history/issues.20260314_213336_839182422.jsonl +7 -0
  24. package/.beads/.br_history/issues.20260314_213336_839182422.jsonl.meta.json +1 -0
  25. package/.beads/.br_history/issues.20260314_213337_004349113.jsonl +7 -0
  26. package/.beads/.br_history/issues.20260314_213337_004349113.jsonl.meta.json +1 -0
  27. package/.beads/.br_history/issues.20260314_213337_179824080.jsonl +7 -0
  28. package/.beads/.br_history/issues.20260314_213337_179824080.jsonl.meta.json +1 -0
  29. package/.beads/.br_history/issues.20260314_213701_705075332.jsonl +7 -0
  30. package/.beads/.br_history/issues.20260314_213701_705075332.jsonl.meta.json +1 -0
  31. package/.beads/.br_history/issues.20260314_213706_783128702.jsonl +8 -0
  32. package/.beads/.br_history/issues.20260314_213706_783128702.jsonl.meta.json +1 -0
  33. package/.beads/config.yaml +4 -0
  34. package/.beads/issues.jsonl +8 -0
  35. package/.beads/metadata.json +4 -0
  36. package/.env.example +8 -0
  37. package/autochangelog/.env.example +36 -0
  38. package/autochangelog/README.md +412 -0
  39. package/autochangelog/config/database.js +27 -0
  40. package/autochangelog/package.json +47 -0
  41. package/autochangelog/public/landing.html +581 -0
  42. package/autochangelog/server.js +104 -0
  43. package/autochangelog/src/app.js +181 -0
  44. package/autochangelog/src/config/database.js +26 -0
  45. package/autochangelog/src/controllers/auth.js +488 -0
  46. package/autochangelog/src/controllers/changelog.js +682 -0
  47. package/autochangelog/src/controllers/project.js +580 -0
  48. package/autochangelog/src/controllers/repository.js +780 -0
  49. package/autochangelog/src/middleware/auth.js +386 -0
  50. package/autochangelog/src/models/Changelog.js +443 -0
  51. package/autochangelog/src/models/Project.js +226 -0
  52. package/autochangelog/src/models/Repository.js +366 -0
  53. package/autochangelog/src/models/User.js +223 -0
  54. package/autochangelog/src/routes/auth.routes.js +32 -0
  55. package/autochangelog/src/routes/changelog.routes.js +42 -0
  56. package/autochangelog/src/routes/github-auth.routes.js +102 -0
  57. package/autochangelog/src/routes/project.routes.js +50 -0
  58. package/autochangelog/src/routes/repository.routes.js +54 -0
  59. package/autochangelog/src/services/changelog.js +722 -0
  60. package/autochangelog/src/services/github.js +243 -0
  61. package/autochangelog/utils/logger.js +77 -0
  62. package/autochangelog/views/404.ejs +18 -0
  63. package/autochangelog/views/dashboard.ejs +596 -0
  64. package/autochangelog/views/index.ejs +231 -0
  65. package/autochangelog/views/layouts/main.ejs +44 -0
  66. package/autochangelog/views/login.ejs +104 -0
  67. package/autochangelog/views/partials/footer.ejs +20 -0
  68. package/autochangelog/views/partials/navbar.ejs +51 -0
  69. package/autochangelog/views/register.ejs +109 -0
  70. package/autochangelog-cli/README.md +266 -0
  71. package/autochangelog-cli/bin/autochangelog +120 -0
  72. package/autochangelog-cli/package.json +46 -0
  73. package/autochangelog-cli/src/cli/commands/auth.js +291 -0
  74. package/autochangelog-cli/src/cli/commands/changelog.js +619 -0
  75. package/autochangelog-cli/src/cli/commands/project.js +427 -0
  76. package/autochangelog-cli/src/cli/commands/repo.js +557 -0
  77. package/autochangelog-cli/src/cli/commands/stats.js +706 -0
  78. package/autochangelog-cli/src/cli/utils/config.js +277 -0
  79. package/autochangelog-cli/src/cli/utils/errors.js +307 -0
  80. package/autochangelog-cli/src/cli/utils/logger.js +75 -0
  81. package/autochangelog-cli/src/cli/utils/output.js +357 -0
  82. package/package.json +9 -3
  83. package/plugins/supercli/README.md +108 -0
  84. package/plugins/supercli/plugin.json +123 -0
  85. package/server.js +1 -1
  86. package/src/cli/api.js +380 -0
  87. package/src/cli/direct/agent-utils.js +61 -0
  88. package/src/cli/direct/cli-utils.js +112 -0
  89. package/src/cli/direct/data-seeding.js +307 -0
  90. package/src/cli/direct/db-admin.js +84 -0
  91. package/src/cli/direct/db-advanced.js +372 -0
  92. package/src/cli/direct/db-utils.js +558 -0
  93. package/src/cli/direct/help.js +195 -0
  94. package/src/cli/direct/migration.js +107 -0
  95. package/src/cli/direct/rbac-advanced.js +132 -0
  96. package/src/cli/direct/resources-additional.js +400 -0
  97. package/src/cli/direct/resources-cms-advanced.js +173 -0
  98. package/src/cli/direct/resources-cms.js +247 -0
  99. package/src/cli/direct/resources-core.js +253 -0
  100. package/src/cli/direct/resources-execution.js +367 -0
  101. package/src/cli/direct/resources-health.js +152 -0
  102. package/src/cli/direct/resources-integrations.js +182 -0
  103. package/src/cli/direct/resources-logs.js +204 -0
  104. package/src/cli/direct/resources-org-rbac.js +187 -0
  105. package/src/cli/direct/resources-system.js +236 -0
  106. package/src/cli/direct.js +556 -0
  107. package/src/controllers/admin.controller.js +4 -0
  108. package/src/controllers/auth.controller.js +148 -1
  109. package/src/controllers/waitingList.controller.js +130 -1
  110. package/src/models/RbacRole.js +1 -1
  111. package/src/models/User.js +39 -5
  112. package/src/routes/auth.routes.js +6 -0
  113. package/src/routes/waitingList.routes.js +12 -2
  114. package/src/routes/waitingListAdmin.routes.js +3 -0
  115. package/src/services/email.service.js +1 -0
  116. package/src/services/github.service.js +255 -0
  117. package/src/services/rateLimiter.service.js +29 -1
  118. package/src/services/waitingListJson.service.js +32 -3
  119. package/views/admin-waiting-list.ejs +386 -3
@@ -0,0 +1,357 @@
1
+ const chalk = require('chalk');
2
+
3
+ /**
4
+ * Output utility for CLI operations
5
+ * Handles both human-readable and machine-parseable output formats
6
+ */
7
+
8
+ class OutputManager {
9
+ constructor() {
10
+ this.jsonMode = !process.stdout.isTTY;
11
+ this.colorEnabled = process.stdout.isTTY;
12
+ }
13
+
14
+ /**
15
+ * Set JSON output mode
16
+ * @param {boolean} enabled - Enable or disable JSON mode
17
+ */
18
+ setJsonMode(enabled) {
19
+ this.jsonMode = enabled;
20
+ if (enabled) {
21
+ this.colorEnabled = false;
22
+ }
23
+ }
24
+
25
+ /**
26
+ * Check if JSON mode is enabled
27
+ * @returns {boolean} True if JSON mode is enabled
28
+ */
29
+ isJsonMode() {
30
+ return this.jsonMode;
31
+ }
32
+
33
+ /**
34
+ * Set color enabled/disabled
35
+ * @param {boolean} enabled - Enable or disable colors
36
+ */
37
+ setColorEnabled(enabled) {
38
+ this.colorEnabled = enabled && process.stdout.isTTY;
39
+ }
40
+
41
+ /**
42
+ * Output data in appropriate format
43
+ * @param {Object} data - Data to output
44
+ * @param {Object} options - Output options
45
+ */
46
+ output(data, options = {}) {
47
+ const { success = true, message, data: payload, error, metadata } = data;
48
+
49
+ if (this.jsonMode) {
50
+ // JSON output for machines
51
+ const output = {
52
+ success,
53
+ timestamp: new Date().toISOString(),
54
+ ...message && { message },
55
+ ...payload && { data: payload },
56
+ ...error && { error },
57
+ ...metadata && { metadata },
58
+ };
59
+
60
+ console.log(JSON.stringify(output, null, 2));
61
+ } else {
62
+ // Human-readable output
63
+ if (success) {
64
+ if (message) {
65
+ console.log(chalk.green(`✅ ${message}`));
66
+ }
67
+ if (payload) {
68
+ this.printData(payload);
69
+ }
70
+ } else {
71
+ if (error) {
72
+ this.printError(error);
73
+ } else if (message) {
74
+ console.log(chalk.red(`❌ ${message}`));
75
+ }
76
+ }
77
+
78
+ if (metadata && Object.keys(metadata).length > 0) {
79
+ this.printMetadata(metadata);
80
+ }
81
+ }
82
+ }
83
+
84
+ /**
85
+ * Print structured data in human-readable format
86
+ * @param {Object|Array} data - Data to print
87
+ */
88
+ printData(data) {
89
+ if (Array.isArray(data)) {
90
+ if (data.length === 0) {
91
+ console.log(chalk.gray('No results found'));
92
+ return;
93
+ }
94
+
95
+ data.forEach((item, index) => {
96
+ this.printObject(item, index > 0);
97
+ });
98
+ } else if (typeof data === 'object' && data !== null) {
99
+ this.printObject(data);
100
+ } else {
101
+ console.log(data);
102
+ }
103
+ }
104
+
105
+ /**
106
+ * Print a single object with formatting
107
+ * @param {Object} obj - Object to print
108
+ * @param {boolean} separator - Whether to add separator
109
+ */
110
+ printObject(obj, separator = false) {
111
+ if (separator) {
112
+ console.log('');
113
+ }
114
+
115
+ Object.entries(obj).forEach(([key, value]) => {
116
+ const formattedKey = this.formatKey(key);
117
+ const formattedValue = this.formatValue(value);
118
+ console.log(`${chalk.cyan(formattedKey)}: ${formattedValue}`);
119
+ });
120
+ }
121
+
122
+ /**
123
+ * Print error information
124
+ * @param {Object} error - Error object
125
+ */
126
+ printError(error) {
127
+ const { code, type, message, details, suggestions } = error;
128
+
129
+ console.log(chalk.red(`❌ ${message}`));
130
+
131
+ if (code) {
132
+ console.log(chalk.gray(` Code: ${code}`));
133
+ }
134
+
135
+ if (type) {
136
+ console.log(chalk.gray(` Type: ${type}`));
137
+ }
138
+
139
+ if (details && Object.keys(details).length > 0) {
140
+ console.log(chalk.gray(' Details:'));
141
+ Object.entries(details).forEach(([key, value]) => {
142
+ console.log(chalk.gray(` ${key}: ${value}`));
143
+ });
144
+ }
145
+
146
+ if (suggestions && suggestions.length > 0) {
147
+ console.log(chalk.yellow(' Suggestions:'));
148
+ suggestions.forEach(suggestion => {
149
+ console.log(chalk.yellow(` • ${suggestion}`));
150
+ });
151
+ }
152
+ }
153
+
154
+ /**
155
+ * Print metadata information
156
+ * @param {Object} metadata - Metadata to print
157
+ */
158
+ printMetadata(metadata) {
159
+ console.log(chalk.gray('\n--- Metadata ---'));
160
+ Object.entries(metadata).forEach(([key, value]) => {
161
+ console.log(chalk.gray(`${key}: ${value}`));
162
+ });
163
+ }
164
+
165
+ /**
166
+ * Format key names for display
167
+ * @param {string} key - Raw key name
168
+ * @returns {string} Formatted key name
169
+ */
170
+ formatKey(key) {
171
+ return key
172
+ .replace(/_/g, ' ')
173
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
174
+ .replace(/\b\w/g, l => l.toUpperCase());
175
+ }
176
+
177
+ /**
178
+ * Format values for display
179
+ * @param {*} value - Raw value
180
+ * @returns {string} Formatted value
181
+ */
182
+ formatValue(value) {
183
+ if (value === null || value === undefined) {
184
+ return chalk.gray('null');
185
+ }
186
+
187
+ if (typeof value === 'boolean') {
188
+ return value ? chalk.green('Yes') : chalk.red('No');
189
+ }
190
+
191
+ if (typeof value === 'number') {
192
+ return chalk.yellow(value.toString());
193
+ }
194
+
195
+ if (typeof value === 'string') {
196
+ if (value.length > 50) {
197
+ return chalk.white(value.substring(0, 47) + '...');
198
+ }
199
+ return chalk.white(value);
200
+ }
201
+
202
+ if (Array.isArray(value)) {
203
+ return chalk.cyan(`[${value.length}]`);
204
+ }
205
+
206
+ if (typeof value === 'object') {
207
+ return chalk.cyan('{...}');
208
+ }
209
+
210
+ return chalk.white(value.toString());
211
+ }
212
+
213
+ /**
214
+ * Print progress indicator
215
+ * @param {string} message - Progress message
216
+ * @param {number} progress - Progress percentage (0-100)
217
+ */
218
+ progress(message, progress = null) {
219
+ if (this.jsonMode) {
220
+ // In JSON mode, output progress as structured data
221
+ const output = {
222
+ type: 'progress',
223
+ message,
224
+ progress,
225
+ timestamp: new Date().toISOString(),
226
+ };
227
+ console.error(JSON.stringify(output));
228
+ } else {
229
+ // In human mode, use simple text
230
+ const progressText = progress !== null ? ` [${progress}%]` : '';
231
+ console.error(chalk.gray(`⏳ ${message}${progressText}`));
232
+ }
233
+ }
234
+
235
+ /**
236
+ * Print success message
237
+ * @param {string} message - Success message
238
+ */
239
+ success(message) {
240
+ if (this.jsonMode) {
241
+ console.log(JSON.stringify({
242
+ success: true,
243
+ message,
244
+ timestamp: new Date().toISOString(),
245
+ }));
246
+ } else {
247
+ console.log(chalk.green(`✅ ${message}`));
248
+ }
249
+ }
250
+
251
+ /**
252
+ * Print warning message
253
+ * @param {string} message - Warning message
254
+ */
255
+ warning(message) {
256
+ if (this.jsonMode) {
257
+ console.error(JSON.stringify({
258
+ type: 'warning',
259
+ message,
260
+ timestamp: new Date().toISOString(),
261
+ }));
262
+ } else {
263
+ console.log(chalk.yellow(`⚠️ ${message}`));
264
+ }
265
+ }
266
+
267
+ /**
268
+ * Print error message
269
+ * @param {string} message - Error message
270
+ */
271
+ error(message) {
272
+ if (this.jsonMode) {
273
+ console.error(JSON.stringify({
274
+ success: false,
275
+ message,
276
+ timestamp: new Date().toISOString(),
277
+ }));
278
+ } else {
279
+ console.log(chalk.red(`❌ ${message}`));
280
+ }
281
+ }
282
+
283
+ /**
284
+ * Print info message
285
+ * @param {string} message - Info message
286
+ */
287
+ info(message) {
288
+ if (this.jsonMode) {
289
+ console.log(JSON.stringify({
290
+ type: 'info',
291
+ message,
292
+ timestamp: new Date().toISOString(),
293
+ }));
294
+ } else {
295
+ console.log(chalk.blue(`ℹ️ ${message}`));
296
+ }
297
+ }
298
+
299
+ /**
300
+ * Print table-like data
301
+ * @param {Array} headers - Table headers
302
+ * @param {Array} rows - Table rows
303
+ */
304
+ table(headers, rows) {
305
+ if (this.jsonMode) {
306
+ const output = {
307
+ type: 'table',
308
+ headers,
309
+ rows,
310
+ timestamp: new Date().toISOString(),
311
+ };
312
+ console.log(JSON.stringify(output, null, 2));
313
+ } else {
314
+ if (rows.length === 0) {
315
+ console.log(chalk.gray('No data to display'));
316
+ return;
317
+ }
318
+
319
+ // Calculate column widths
320
+ const colWidths = headers.map((header, i) => {
321
+ const maxWidth = Math.max(
322
+ header.length,
323
+ ...rows.map(row => row[i] ? row[i].toString().length : 0)
324
+ );
325
+ return Math.max(maxWidth, 8);
326
+ });
327
+
328
+ // Print headers
329
+ const headerLine = headers.map((header, i) =>
330
+ chalk.bold(header.padEnd(colWidths[i]))
331
+ ).join(' ');
332
+ console.log(headerLine);
333
+ console.log(chalk.gray('-'.repeat(headerLine.length)));
334
+
335
+ // Print rows
336
+ rows.forEach(row => {
337
+ const rowLine = row.map((cell, i) =>
338
+ (cell || '').toString().padEnd(colWidths[i])
339
+ ).join(' ');
340
+ console.log(rowLine);
341
+ });
342
+ }
343
+ }
344
+ }
345
+
346
+ // Create singleton instance
347
+ const output = new OutputManager();
348
+
349
+ /**
350
+ * Setup output manager instance
351
+ * @returns {OutputManager} Output manager instance
352
+ */
353
+ function setupOutput() {
354
+ return output;
355
+ }
356
+
357
+ module.exports = { OutputManager, output, setupOutput };
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@intranefr/superbackend",
3
- "version": "1.6.7",
3
+ "version": "1.7.8",
4
4
  "description": "Node.js middleware that gives your project backend superpowers",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "agent-chat": "src/cli/agent-chat.js",
8
- "agent-list": "src/cli/agent-list.js"
8
+ "agent-list": "src/cli/agent-list.js",
9
+ "api": "src/cli/api.js",
10
+ "direct": "src/cli/direct.js"
9
11
  },
10
12
  "scripts": {
11
13
  "start": "node server.js",
@@ -17,7 +19,10 @@
17
19
  "build:sdk:superdemos:browser": "esbuild sdk/superdemos/browser/src/index.js --bundle --format=iife --global-name=SuperDemos --outfile=public/sdk/superdemos.iife.js",
18
20
  "test": "jest",
19
21
  "test:watch": "jest --watch",
20
- "test:coverage": "jest --coverage"
22
+ "test:coverage": "jest --coverage",
23
+ "image:deploy": "docker build -t javimosch/superbackend:latest . && docker push javimosch/superbackend:latest",
24
+ "api": "node src/cli/api.js",
25
+ "direct": "node src/cli/direct.js"
21
26
  },
22
27
  "keywords": [
23
28
  "substack",
@@ -37,6 +42,7 @@
37
42
  "license": "MIT",
38
43
  "dependencies": {
39
44
  "@aws-sdk/client-s3": "^3.0.0",
45
+ "@intranefr/superbackend": "^1.7.7",
40
46
  "axios": "^1.13.2",
41
47
  "bcryptjs": "^2.4.3",
42
48
  "cheerio": "^1.0.0-rc.12",
@@ -0,0 +1,108 @@
1
+ # SuperBackend Skills Plugin for SuperCLI
2
+
3
+ This plugin loads SuperBackend SKILL.md files into the SuperCLI skills catalog.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ supercli plugins install /path/to/saas-backend/plugins/supercli
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Auto-discovery**: Automatically finds all SKILL.md files in the `skills/` directory
14
+ - **No registry required**: Works as a local plugin
15
+ - **Live sync**: Changes to skill files are picked up immediately with `supercli skills sync`
16
+
17
+ ## Usage
18
+
19
+ ### List Available Skills
20
+
21
+ ```bash
22
+ supercli skills list --catalog --json
23
+ ```
24
+
25
+ ### Get a Specific Skill
26
+
27
+ ```bash
28
+ supercli skills get superbackend:auth-github-skill --json
29
+ ```
30
+
31
+ ### Learn About the Plugin
32
+
33
+ ```bash
34
+ supercli plugins learn superbackend
35
+ ```
36
+
37
+ ### Sync Skills Catalog
38
+
39
+ After editing SKILL.md files, refresh the catalog:
40
+
41
+ ```bash
42
+ supercli skills sync
43
+ ```
44
+
45
+ ## Adding New Skills
46
+
47
+ 1. Create a new directory under `skills/`:
48
+ ```bash
49
+ mkdir -p skills/auth-email
50
+ ```
51
+
52
+ 2. Add your SKILL.md file:
53
+ ```bash
54
+ cp /path/to/.agents/skills/auth-email/SKILL.md skills/auth-email/
55
+ ```
56
+
57
+ 3. Sync the catalog:
58
+ ```bash
59
+ supercli skills sync
60
+ ```
61
+
62
+ 4. Verify the skill is available:
63
+ ```bash
64
+ supercli skills list --catalog --json | grep auth-email
65
+ ```
66
+
67
+ ## Skill File Format
68
+
69
+ Each skill is a markdown file with YAML frontmatter:
70
+
71
+ ```markdown
72
+ ---
73
+ skill_name: my-skill-name
74
+ description: Brief description of the skill
75
+ tags: tag1,tag2,tag3
76
+ ---
77
+
78
+ # Skill Content
79
+
80
+ Detailed documentation...
81
+ ```
82
+
83
+ ## Troubleshooting
84
+
85
+ ### Skill Not Found After Adding
86
+
87
+ Run sync to refresh the catalog:
88
+ ```bash
89
+ supercli skills sync --json
90
+ ```
91
+
92
+ ### Check Plugin Status
93
+
94
+ ```bash
95
+ supercli plugins show superbackend --json
96
+ ```
97
+
98
+ ### View Skills Index
99
+
100
+ ```bash
101
+ cat ~/.supercli/skills-index.json | jq '.skills[] | select(.provider=="superbackend")'
102
+ ```
103
+
104
+ ## Uninstall
105
+
106
+ ```bash
107
+ supercli plugins remove superbackend
108
+ ```
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "superbackend",
3
+ "version": "1.0.0",
4
+ "description": "SuperBackend skills and direct CLI access - database operations, auth, RBAC, and automation",
5
+ "source": "local",
6
+ "tags": ["skills", "catalog", "superbackend", "database", "cli", "auth", "rbac"],
7
+ "checks": [
8
+ { "type": "binary", "name": "node" },
9
+ { "type": "binary", "name": "npm" }
10
+ ],
11
+ "learn": {
12
+ "file": "skills/auth-github/SKILL.md"
13
+ },
14
+ "post_install": {
15
+ "script": "scripts/post-install.js",
16
+ "runtime": "node",
17
+ "timeout_ms": 15000
18
+ },
19
+ "post_uninstall": {
20
+ "script": "scripts/post-uninstall.js",
21
+ "runtime": "node",
22
+ "timeout_ms": 15000
23
+ },
24
+ "commands": [
25
+ {
26
+ "namespace": "superbackend",
27
+ "resource": "waiting-list",
28
+ "action": "list",
29
+ "description": "List waiting list entries",
30
+ "adapter": "process",
31
+ "adapterConfig": {
32
+ "command": "npm",
33
+ "baseArgs": ["run", "direct", "--", "waiting-list", "list"],
34
+ "optionalArgs": {
35
+ "quiet": "--quiet",
36
+ "output": "--output",
37
+ "value": "--value"
38
+ },
39
+ "workingDirectory": "/home/jarancibia/ai/saas-backend",
40
+ "parseJson": false,
41
+ "timeout_ms": 30000
42
+ },
43
+ "args": [
44
+ { "name": "quiet", "type": "boolean", "required": false, "description": "Quiet mode (JSON only)" },
45
+ { "name": "output", "type": "string", "required": false, "description": "Output format" },
46
+ { "name": "value", "type": "string", "required": false, "description": "Limit results" }
47
+ ]
48
+ },
49
+ {
50
+ "namespace": "superbackend",
51
+ "resource": "waiting-list",
52
+ "action": "delete",
53
+ "description": "Delete waiting list entry by ID",
54
+ "adapter": "process",
55
+ "adapterConfig": {
56
+ "command": "npm",
57
+ "baseArgs": ["run", "direct", "--", "waiting-list", "delete"],
58
+ "positionalArgs": ["id"],
59
+ "optionalArgs": {
60
+ "quiet": "--quiet"
61
+ },
62
+ "workingDirectory": "/home/jarancibia/ai/saas-backend",
63
+ "parseJson": false,
64
+ "timeout_ms": 30000
65
+ },
66
+ "args": [
67
+ { "name": "id", "type": "string", "required": true, "description": "Waiting list entry ID" },
68
+ { "name": "quiet", "type": "boolean", "required": false, "description": "Quiet mode" }
69
+ ]
70
+ },
71
+ {
72
+ "namespace": "superbackend",
73
+ "resource": "waiting-list",
74
+ "action": "clear",
75
+ "description": "Clear all waiting list entries",
76
+ "adapter": "process",
77
+ "adapterConfig": {
78
+ "command": "npm",
79
+ "baseArgs": ["run", "direct", "--", "waiting-list", "clear"],
80
+ "optionalArgs": {
81
+ "quiet": "--quiet"
82
+ },
83
+ "workingDirectory": "/home/jarancibia/ai/saas-backend",
84
+ "parseJson": false,
85
+ "timeout_ms": 30000
86
+ },
87
+ "args": [
88
+ { "name": "quiet", "type": "boolean", "required": false, "description": "Quiet mode" }
89
+ ]
90
+ },
91
+ {
92
+ "namespace": "superbackend",
93
+ "resource": "direct",
94
+ "action": "help",
95
+ "description": "Show SuperBackend Direct CLI help",
96
+ "adapter": "process",
97
+ "adapterConfig": {
98
+ "command": "npm",
99
+ "baseArgs": ["run", "direct", "--", "help"],
100
+ "workingDirectory": "/home/jarancibia/ai/saas-backend",
101
+ "parseJson": false,
102
+ "timeout_ms": 30000
103
+ },
104
+ "args": []
105
+ },
106
+ {
107
+ "namespace": "superbackend",
108
+ "resource": "_",
109
+ "action": "_",
110
+ "description": "Passthrough to SuperBackend Direct CLI",
111
+ "adapter": "process",
112
+ "adapterConfig": {
113
+ "command": "npm",
114
+ "baseArgs": ["run", "direct", "--"],
115
+ "workingDirectory": "/home/jarancibia/ai/saas-backend",
116
+ "passthrough": true,
117
+ "parseJson": false,
118
+ "timeout_ms": 120000
119
+ },
120
+ "args": []
121
+ }
122
+ ]
123
+ }
package/server.js CHANGED
@@ -1,4 +1,4 @@
1
- require('dotenv').config();
1
+ require('dotenv').config({ path: process.env.ENV_FILE || '.env' });
2
2
  const { server } = require('./index');
3
3
 
4
4
  // Start the standalone server