@fabrika/cli 0.0.26 → 0.2.0
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/package.json +11 -10
- package/src/index.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/cli",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,14 +29,15 @@
|
|
|
29
29
|
"test": "bun test"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@fabrika/app": "^0.0
|
|
33
|
-
"@fabrika/auth-core": "^0.0
|
|
34
|
-
"@fabrika/
|
|
35
|
-
"@fabrika/
|
|
36
|
-
"@fabrika/installation-
|
|
37
|
-
"@fabrika/installation-
|
|
38
|
-
"@fabrika/
|
|
39
|
-
"@fabrika/provider-
|
|
40
|
-
"@fabrika/provider-
|
|
32
|
+
"@fabrika/app": "^0.2.0",
|
|
33
|
+
"@fabrika/auth-core": "^0.2.0",
|
|
34
|
+
"@fabrika/builder": "^0.2.0",
|
|
35
|
+
"@fabrika/control-contract": "^0.2.0",
|
|
36
|
+
"@fabrika/installation-cloudflare": "^0.2.0",
|
|
37
|
+
"@fabrika/installation-contract": "^0.2.0",
|
|
38
|
+
"@fabrika/installation-zerops": "^0.2.0",
|
|
39
|
+
"@fabrika/provider-cloudflare": "^0.2.0",
|
|
40
|
+
"@fabrika/provider-contract": "^0.2.0",
|
|
41
|
+
"@fabrika/provider-zerops": "^0.2.0"
|
|
41
42
|
}
|
|
42
43
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
+
import { BUILDER_USAGE, runBuilderCli } from '@fabrika/builder'
|
|
3
4
|
import { installationCliFromModule, isInstallationCommand, supportsInstallationCommand } from '@fabrika/installation-contract'
|
|
4
5
|
import { authoredAppProvider } from '@fabrika/provider-contract'
|
|
5
6
|
import { resolve } from 'node:path'
|
|
@@ -18,6 +19,7 @@ Usage:
|
|
|
18
19
|
fabrika app build [--provider=zerops] --env=<env> [--config=<path>] [--output=<path>]
|
|
19
20
|
fabrika namespace <plan|create|adopt|reconcile> --provider=zerops [provider options]
|
|
20
21
|
fabrika control <key|apps|namespaces|register|deploy|runs> [options]
|
|
22
|
+
fabrika builder <init|next|advance|gate|ensure-daemon|induce|build> [options]
|
|
21
23
|
|
|
22
24
|
For app commands, the provider is read from the config returned by the selected provider's defineApp().
|
|
23
25
|
An explicit --provider is required only when no app config is available.
|
|
@@ -187,6 +189,10 @@ export const runCli = async (argv: readonly string[]): Promise<void> => {
|
|
|
187
189
|
console.info(CONTROL_USAGE)
|
|
188
190
|
return
|
|
189
191
|
}
|
|
192
|
+
if (parsed.help && parsed.area === 'builder') {
|
|
193
|
+
console.info(BUILDER_USAGE)
|
|
194
|
+
return
|
|
195
|
+
}
|
|
190
196
|
if (parsed.help || parsed.area === undefined) {
|
|
191
197
|
console.info(USAGE)
|
|
192
198
|
return
|
|
@@ -207,6 +213,11 @@ export const runCli = async (argv: readonly string[]): Promise<void> => {
|
|
|
207
213
|
await runControlCli(parsed.command, parsed.rest, parsed.provider)
|
|
208
214
|
return
|
|
209
215
|
}
|
|
216
|
+
if (parsed.area === 'builder') {
|
|
217
|
+
const exitCode = await runBuilderCli(parsed.command === undefined ? [] : [parsed.command, ...parsed.rest])
|
|
218
|
+
if (exitCode !== 0) process.exitCode = exitCode
|
|
219
|
+
return
|
|
220
|
+
}
|
|
210
221
|
throw new Error(`Unknown command area: ${parsed.area}\n\n${USAGE}`)
|
|
211
222
|
}
|
|
212
223
|
|