@dokebi/cli 0.4.2 → 0.4.27
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/AI.md +279 -57
- package/README.md +35 -10
- package/catalog.json +2520 -258
- package/describe.schema.json +748 -0
- package/dist/api-app.d.ts +2 -0
- package/dist/api-app.js +35 -0
- package/dist/app-urls.js +3 -2
- package/dist/bin.js +638 -37
- package/dist/capability-guide.d.ts +30 -0
- package/dist/capability-guide.js +122 -0
- package/dist/catalog.d.ts +16 -2
- package/dist/catalog.js +19 -7
- package/dist/check/asset-rules.d.ts +6 -0
- package/dist/check/asset-rules.js +163 -0
- package/dist/check/browser-sources.d.ts +20 -0
- package/dist/check/browser-sources.js +89 -0
- package/dist/check/console-rules.d.ts +6 -0
- package/dist/check/console-rules.js +40 -0
- package/dist/check/error-rules.d.ts +21 -0
- package/dist/check/error-rules.js +212 -0
- package/dist/check/form-rules.d.ts +12 -0
- package/dist/check/form-rules.js +69 -6
- package/dist/check/formatter-rules.d.ts +2 -0
- package/dist/check/formatter-rules.js +71 -0
- package/dist/check/i18n-rules.d.ts +27 -0
- package/dist/check/i18n-rules.js +353 -0
- package/dist/check/index.d.ts +15 -1
- package/dist/check/index.js +89 -11
- package/dist/check/mail-rules.d.ts +4 -0
- package/dist/check/mail-rules.js +72 -0
- package/dist/check/module-rules.d.ts +13 -0
- package/dist/check/module-rules.js +104 -0
- package/dist/check/packages.d.ts +8 -0
- package/dist/check/packages.js +16 -0
- package/dist/check/pool-rules.d.ts +8 -0
- package/dist/check/pool-rules.js +164 -0
- package/dist/check/problems.d.ts +6 -1
- package/dist/check/problems.js +100 -2
- package/dist/check/project-rules.d.ts +23 -3
- package/dist/check/project-rules.js +265 -23
- package/dist/check/seal-rules.d.ts +6 -0
- package/dist/check/seal-rules.js +68 -0
- package/dist/check/security-rules.d.ts +10 -0
- package/dist/check/security-rules.js +450 -0
- package/dist/check/shared-state-rules.d.ts +15 -0
- package/dist/check/shared-state-rules.js +117 -0
- package/dist/check/source-rules.d.ts +26 -3
- package/dist/check/source-rules.js +249 -28
- package/dist/check/structure-rules.d.ts +23 -0
- package/dist/check/structure-rules.js +502 -0
- package/dist/check/timer-rules.d.ts +7 -0
- package/dist/check/timer-rules.js +543 -0
- package/dist/check/typescript.d.ts +35 -5
- package/dist/check/typescript.js +163 -17
- package/dist/check/vite-rules.d.ts +2 -0
- package/dist/check/vite-rules.js +136 -0
- package/dist/check/wait-rules.d.ts +16 -0
- package/dist/check/wait-rules.js +337 -0
- package/dist/commands.d.ts +7 -0
- package/dist/commands.js +381 -36
- package/dist/config-diff.d.ts +42 -0
- package/dist/config-diff.js +289 -0
- package/dist/config-edit.d.ts +35 -2
- package/dist/config-edit.js +145 -13
- package/dist/config-init.d.ts +15 -0
- package/dist/config-init.js +61 -0
- package/dist/config-paths.d.ts +22 -0
- package/dist/config-paths.js +82 -0
- package/dist/config-secrets.d.ts +46 -0
- package/dist/config-secrets.js +187 -0
- package/dist/config-show.d.ts +82 -0
- package/dist/config-show.js +563 -0
- package/dist/config-values.d.ts +8 -0
- package/dist/config-values.js +68 -0
- package/dist/configuration-scaffold.d.ts +42 -0
- package/dist/configuration-scaffold.js +258 -4
- package/dist/configuration.d.ts +63 -3
- package/dist/configuration.js +178 -4
- package/dist/deploy-scripts.d.ts +4 -0
- package/dist/deploy-scripts.js +361 -0
- package/dist/deploy-templates.d.ts +46 -0
- package/dist/deploy-templates.js +379 -0
- package/dist/deploy.d.ts +46 -0
- package/dist/deploy.js +592 -0
- package/dist/deployment.d.ts +2 -0
- package/dist/deployment.js +111 -0
- package/dist/describe-db.d.ts +22 -0
- package/dist/describe-db.js +176 -0
- package/dist/describe.d.ts +92 -0
- package/dist/describe.js +417 -0
- package/dist/dev-compose.d.ts +20 -0
- package/dist/dev-compose.js +154 -0
- package/dist/dev-guard.js +44 -0
- package/dist/dev-host.d.ts +13 -0
- package/dist/dev-host.js +55 -0
- package/dist/dev-infra.d.ts +72 -4
- package/dist/dev-infra.js +237 -17
- package/dist/dev-watch.d.ts +34 -0
- package/dist/dev-watch.js +192 -0
- package/dist/diagnostics.d.ts +10 -7
- package/dist/diagnostics.js +22 -4
- package/dist/drift.d.ts +50 -0
- package/dist/drift.js +218 -0
- package/dist/env-file.d.ts +25 -1
- package/dist/env-file.js +64 -6
- package/dist/errors.d.ts +7 -1
- package/dist/example-config.d.ts +2 -0
- package/dist/example-config.js +3 -0
- package/dist/first-admin.d.ts +43 -0
- package/dist/first-admin.js +175 -0
- package/dist/formatter-ignore.d.ts +37 -0
- package/dist/formatter-ignore.js +344 -0
- package/dist/generator.d.ts +45 -3
- package/dist/generator.js +205 -15
- package/dist/guide.d.ts +1 -1
- package/dist/guide.js +42 -21
- package/dist/install-module.d.ts +20 -2
- package/dist/install-module.js +45 -8
- package/dist/install-plan.js +5 -3
- package/dist/layout.d.ts +12 -1
- package/dist/layout.js +19 -6
- package/dist/log-writer-control.d.ts +2 -0
- package/dist/log-writer-control.js +17 -2
- package/dist/log-writer.js +43 -10
- package/dist/logging-config.d.ts +8 -3
- package/dist/logging-config.js +19 -5
- package/dist/manifest.d.ts +29 -1
- package/dist/manifest.js +84 -6
- package/dist/merge-install-defaults.d.ts +0 -1
- package/dist/merge-install-defaults.js +13 -47
- package/dist/npm-client.d.ts +40 -4
- package/dist/npm-client.js +152 -15
- package/dist/npm-paths.js +18 -4
- package/dist/openapi.d.ts +27 -0
- package/dist/openapi.js +649 -0
- package/dist/option-fixes.d.ts +39 -0
- package/dist/option-fixes.js +130 -0
- package/dist/output.d.ts +1 -1
- package/dist/output.js +5 -5
- package/dist/plugin-lifecycle.d.ts +34 -2
- package/dist/plugin-lifecycle.js +195 -16
- package/dist/plugin-options.d.ts +19 -4
- package/dist/plugin-options.js +138 -6
- package/dist/plugins-command.js +44 -7
- package/dist/process-group.d.ts +39 -0
- package/dist/process-group.js +132 -0
- package/dist/production-doctor.d.ts +3 -0
- package/dist/production-doctor.js +176 -0
- package/dist/project-guide.d.ts +19 -1
- package/dist/project-guide.js +119 -20
- package/dist/project-inspector.d.ts +15 -0
- package/dist/project-inspector.js +497 -33
- package/dist/project-state.d.ts +5 -0
- package/dist/project-state.js +8 -0
- package/dist/project.d.ts +203 -19
- package/dist/project.js +3006 -333
- package/dist/recipe-facts.d.ts +127 -0
- package/dist/recipe-facts.js +563 -0
- package/dist/recipe-login.d.ts +63 -0
- package/dist/recipe-login.js +464 -0
- package/dist/recipe-mail.d.ts +21 -0
- package/dist/recipe-mail.js +214 -0
- package/dist/recipe-members.d.ts +35 -0
- package/dist/recipe-members.js +178 -0
- package/dist/recipe-record.d.ts +82 -7
- package/dist/recipe-record.js +226 -22
- package/dist/recipe-reset.d.ts +2 -0
- package/dist/recipe-reset.js +117 -0
- package/dist/recipe-site.d.ts +48 -0
- package/dist/recipe-site.js +396 -0
- package/dist/recipe-step.d.ts +42 -0
- package/dist/recipe-step.js +89 -0
- package/dist/recipe.d.ts +56 -20
- package/dist/recipe.js +703 -131
- package/dist/registry.d.ts +98 -2
- package/dist/registry.js +171 -5
- package/dist/reloadable.d.ts +35 -0
- package/dist/reloadable.js +257 -0
- package/dist/remote-verify.d.ts +31 -0
- package/dist/remote-verify.js +204 -0
- package/dist/server.d.ts +43 -4
- package/dist/server.js +601 -52
- package/dist/settings.d.ts +48 -0
- package/dist/settings.js +168 -0
- package/dist/site-auth.d.ts +39 -0
- package/dist/site-auth.js +195 -0
- package/dist/template-fixes.d.ts +26 -0
- package/dist/template-fixes.js +285 -0
- package/dist/test-reporter.d.ts +49 -0
- package/dist/test-reporter.js +190 -0
- package/dist/transaction.d.ts +47 -0
- package/dist/transaction.js +241 -7
- package/dist/verify-tests.d.ts +98 -0
- package/dist/verify-tests.js +449 -0
- package/dist/verify.d.ts +103 -3
- package/dist/verify.js +272 -21
- package/dist/view-choice.d.ts +58 -0
- package/dist/view-choice.js +131 -0
- package/dist/vite-watch.js +4 -2
- package/package.json +8 -6
package/dist/commands.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
export const COMMANDS = [
|
|
6
6
|
{
|
|
7
7
|
name: 'guide',
|
|
8
|
-
usage: 'dokebi guide [--json]',
|
|
8
|
+
usage: 'dokebi guide [--sync [--dry-run]] [--json]',
|
|
9
9
|
summary: 'AI first page: how to turn a one-line request into an app (ask, install, verify) — read this first',
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
name: 'init',
|
|
13
|
-
usage: 'dokebi init <directory> [--core <package|local.tgz>] [--dry-run] [--json]',
|
|
13
|
+
usage: 'dokebi init <directory> [--core <package|local.tgz>] [--deploy] [--dry-run] [--json]',
|
|
14
14
|
summary: 'Create a project (new folder, or an empty one such as .) with core, config, this CLI (@dokebi/cli) and TypeScript; prints next steps',
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -20,7 +20,7 @@ export const COMMANDS = [
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
name: 'recipe',
|
|
23
|
-
usage: 'dokebi recipe <name> [--dir <directory>] [--view <v>] [--db <d>] [--dev-infra <i>] [--admin <a>] [--port <n>] [--db-port <n>] [--answers-from <user|defaults>] [--defaults] [--dry-run] [--json]',
|
|
23
|
+
usage: 'dokebi recipe <name> [--dir <directory>] [--view <v>] [--db <d>] [--dev-infra <i>] [--admin <a>] [--mail <m>] [--apps <list>] [--domains <map>] [--realms <map>] [--worker <kind>] [--port <n>] [--db-port <n>] [--answers-from <user|defaults>] [--ai-chose <ids>] [--ai-reason <id=why>] [--defaults] [--dry-run] [--json]',
|
|
24
24
|
summary: "Without every answer: the questions to ask the user, then end your turn (installs nothing); with the user's answers: plan, then apply with --answers-from user",
|
|
25
25
|
},
|
|
26
26
|
{
|
|
@@ -45,7 +45,7 @@ export const COMMANDS = [
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
name: 'add',
|
|
48
|
-
usage: 'dokebi add <package|local.tgz> [--set <path>=<value>]... [--adapter <pg|mysql2|mariadb|mongodb>] [--no-first-app] [--dry-run] [--json]',
|
|
48
|
+
usage: 'dokebi add <package|local.tgz> [--set <path>=<value>]... [--adapter <pg|mysql2|mariadb|mongodb>] [--startup <required|optional>] [--no-first-app] [--dry-run] [--json]',
|
|
49
49
|
summary: 'Install and register a plugin (and the plugins it requires); no version picks the newest one for this core',
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -58,20 +58,55 @@ export const COMMANDS = [
|
|
|
58
58
|
usage: 'dokebi remove <plugin-id> [--dry-run] [--json]',
|
|
59
59
|
summary: 'Unregister and uninstall a plugin; user options are kept and marked',
|
|
60
60
|
},
|
|
61
|
+
{
|
|
62
|
+
name: 'config show',
|
|
63
|
+
usage: 'dokebi config show [<plugin-id>[.<path>]] [--json]',
|
|
64
|
+
summary: 'Print the options of dokebi.yaml (with schema defaults) with every secret hidden, for output you share',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'config diff',
|
|
68
|
+
usage: 'dokebi config diff [<plugin-id>] [--write [--values] [--prune] [--dry-run]] [--json]',
|
|
69
|
+
summary: 'Name the options dokebi.yaml and dokebi.example.yaml do not share, by path only (values are never shown); --write copies the ones only in dokebi.yaml into the sample without secrets; never dump or hand-edit the two files',
|
|
70
|
+
},
|
|
61
71
|
{
|
|
62
72
|
name: 'config set',
|
|
63
73
|
usage: 'dokebi config set <plugin-id>.<path>=<value>... [--dry-run] [--json]',
|
|
64
|
-
summary: 'Set non-secret options in dokebi.yaml (checked against the plugin schema)',
|
|
74
|
+
summary: 'Set non-secret options in dokebi.yaml (checked against the plugin schema); logging.<path> sets options.logging',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'config unset',
|
|
78
|
+
usage: 'dokebi config unset <plugin-id>[.<path>]... [--dry-run] [--json]',
|
|
79
|
+
summary: 'Remove options from dokebi.yaml (and dokebi.example.yaml where it has them), e.g. a key the plugin no longer knows; never prints values',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'config init',
|
|
83
|
+
usage: 'dokebi config init [--dry-run] [--json]',
|
|
84
|
+
summary: 'Write dokebi.yaml for a fresh copy of the project (a clone) from dokebi.example.yaml, with new generated secrets; never replaces an existing one',
|
|
65
85
|
},
|
|
66
86
|
{
|
|
67
87
|
name: 'config secret',
|
|
68
|
-
usage: 'dokebi config secret <plugin-id>.<path> [--dry-run] [--json]',
|
|
69
|
-
summary: 'Write a generated secret (never shown) into dokebi.yaml, e.g. dokebi-session.secrets',
|
|
88
|
+
usage: 'dokebi config secret <plugin-id>.<path> [--stdin] [--rotate] [--dry-run] [--json]',
|
|
89
|
+
summary: 'Write a generated secret (never shown) into dokebi.yaml, e.g. dokebi-session.secrets, or with --stdin one you were given, e.g. logging.targets.studio.token; --rotate replaces one',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'config secrets',
|
|
93
|
+
usage: 'dokebi config secrets [--json]',
|
|
94
|
+
summary: 'The secret option paths the app needs, by name (never values): set in dokebi.yaml or in the DOKEBI_SECRETS file, or missing; exit 1 when one is missing',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'deploy init',
|
|
98
|
+
usage: 'dokebi deploy init [--target <systemd|compose>] [--instance <name>]... [--port <n>] [--dry-run] [--json]',
|
|
99
|
+
summary: 'Write deploy/ for an existing project: a systemd unit or a compose file per instance (staging and production on one server never share a port, unit, settings, data, log or database name), a settings sample without secrets, a secrets sample, backup scripts and DEPLOY.md',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'deploy proxy',
|
|
103
|
+
usage: 'dokebi deploy proxy --caddy|--nginx --domain <host>... [--instance <name>] [--dry-run] [--json]',
|
|
104
|
+
summary: 'Write the reverse proxy configuration of an instance (TLS, forwarded headers, WebSocket upgrade, unbuffered SSE, /health/*, static caching) from its settings sample',
|
|
70
105
|
},
|
|
71
106
|
{
|
|
72
107
|
name: 'dev-infra',
|
|
73
|
-
usage: 'dokebi dev-infra [--db-port <n>] [--dry-run] [--json]',
|
|
74
|
-
summary: '
|
|
108
|
+
usage: 'dokebi dev-infra [up|start|stop|down|status] [--file <path>] [--db-port <n>] [--dry-run] [--json]',
|
|
109
|
+
summary: 'Prepare a database with YAML-only credentials, or manage development Compose services',
|
|
75
110
|
},
|
|
76
111
|
{
|
|
77
112
|
name: 'migrate',
|
|
@@ -85,23 +120,38 @@ export const COMMANDS = [
|
|
|
85
120
|
},
|
|
86
121
|
{
|
|
87
122
|
name: 'doctor',
|
|
88
|
-
usage: 'dokebi doctor [--verbose] [--json]',
|
|
89
|
-
summary: 'Run all checks; exit 1 on an error diagnostic (repairs nothing)',
|
|
123
|
+
usage: 'dokebi doctor [--production] [--verbose] [--json]',
|
|
124
|
+
summary: 'Run all checks; exit 1 on an error diagnostic (repairs nothing); --production adds the checks of a server: NODE_ENV, state every process shares, trustProxy, secrets, migrations',
|
|
90
125
|
},
|
|
91
126
|
{
|
|
92
127
|
name: 'check',
|
|
93
128
|
usage: 'dokebi check [--json]',
|
|
94
129
|
summary: 'User-code conventions: empty catch, floating promises, syntax Node cannot strip, private or missing @dokebi imports, edited generated files, committable secrets',
|
|
95
130
|
},
|
|
131
|
+
{
|
|
132
|
+
name: 'mail preview',
|
|
133
|
+
usage: 'dokebi mail preview <name> [--locale <locale>] [--json]',
|
|
134
|
+
summary: 'Render a mail template with preview.json in describe mode, without sending or connecting.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'describe',
|
|
138
|
+
usage: 'dokebi describe [--with-db] [--openapi [--app <name>]] [--timeout-ms <ms>] [--json]',
|
|
139
|
+
summary: 'What the app has, without serving: routes (auth, csrf), pages, jobs, schedules, error codes, option keys and env names (never values); --with-db adds the tables; --openapi: OpenAPI 3.1 per app',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'drift',
|
|
143
|
+
usage: 'dokebi drift --expected <file> [--timeout-ms <ms>] [--json]',
|
|
144
|
+
summary: 'Compare the databases (connections, tables, collections, columns, column comments) with an expected file of the describe shape; it connects like describe --with-db; exit 1 on a difference',
|
|
145
|
+
},
|
|
96
146
|
{
|
|
97
147
|
name: 'verify',
|
|
98
|
-
usage: 'dokebi verify [--wait-ms <ms>] [--json]',
|
|
99
|
-
summary: 'doctor, check, typecheck, build, start, HTTP checks and stop; ok only when all pass (say done only then)',
|
|
148
|
+
usage: 'dokebi verify [--wait-ms <ms>] [--test-timeout-ms <ms>] [--remote <https-url> [--timeout-ms <ms>]] [--json]',
|
|
149
|
+
summary: 'doctor, check, typecheck, build, test, start, HTTP checks and stop; ok only when all pass (say done only then); --remote checks a deployed site instead: TLS, redirect, health, security headers',
|
|
100
150
|
},
|
|
101
151
|
{
|
|
102
152
|
name: 'app add',
|
|
103
|
-
usage: 'dokebi app add <name> [--domain <host>]... [--template <name>] [--inertia [--ssr]] [--dry-run] [--json]',
|
|
104
|
-
summary: 'Create the app src/apps/<name> (EJS, or Vue with --inertia) and map its domains',
|
|
153
|
+
usage: 'dokebi app add <name> [--domain <host>]... [--template <name>] [--inertia [--ssr]] [--view <ejs|none>] [--seal] [--answers-from <user|defaults>] [--ai-chose view] [--ai-reason view=<why>] [--dry-run] [--json]',
|
|
154
|
+
summary: 'Create the app src/apps/<name> (EJS, or Vue with --inertia: the default view) and map its domains; records who chose its view',
|
|
105
155
|
},
|
|
106
156
|
{
|
|
107
157
|
name: 'app remove',
|
|
@@ -110,7 +160,7 @@ export const COMMANDS = [
|
|
|
110
160
|
},
|
|
111
161
|
{
|
|
112
162
|
name: 'app link',
|
|
113
|
-
usage: 'dokebi app link <name> <domain> [--template <name>] [--dry-run] [--json]',
|
|
163
|
+
usage: 'dokebi app link <name> <domain> [--template <name>] [--seal] [--dry-run] [--json]',
|
|
114
164
|
summary: 'Serve an app on one more domain, optionally with another template',
|
|
115
165
|
},
|
|
116
166
|
{
|
|
@@ -130,10 +180,30 @@ export const COMMANDS = [
|
|
|
130
180
|
summary: 'Unregister a feature module; its folder is kept',
|
|
131
181
|
},
|
|
132
182
|
{ name: 'module list', usage: 'dokebi module list [--json]', summary: 'List feature modules' },
|
|
183
|
+
{
|
|
184
|
+
name: 'settings add',
|
|
185
|
+
usage: 'dokebi settings add <section> [--dry-run] [--json]',
|
|
186
|
+
summary: 'Declare the settings of the application in options.<section> (src/shared/settings/<section>.ts): checked at start, known to config and doctor, reloadable options apply live',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'settings sync',
|
|
190
|
+
usage: 'dokebi settings sync [--dry-run] [--json]',
|
|
191
|
+
summary: 'Write the schema of every settings section again from its declaration and add new defaults to dokebi.yaml',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'settings remove',
|
|
195
|
+
usage: 'dokebi settings remove <section> [--dry-run] [--json]',
|
|
196
|
+
summary: 'Unregister a settings section; its files and options are kept',
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'settings list',
|
|
200
|
+
usage: 'dokebi settings list [--json]',
|
|
201
|
+
summary: 'List the settings sections of the application',
|
|
202
|
+
},
|
|
133
203
|
{
|
|
134
204
|
name: 'dev',
|
|
135
205
|
usage: 'dokebi dev',
|
|
136
|
-
summary: 'Run the app in the foreground
|
|
206
|
+
summary: 'Run the app in the foreground; restart it when src changes, reload dokebi.yaml in place when every changed option is reloadable',
|
|
137
207
|
},
|
|
138
208
|
{
|
|
139
209
|
name: 'start',
|
|
@@ -145,6 +215,11 @@ export const COMMANDS = [
|
|
|
145
215
|
usage: 'dokebi stop [--timeout-ms <ms>] [--force] [--json]',
|
|
146
216
|
summary: 'Stop the background app (SIGTERM drain; SIGKILL with --force after the timeout)',
|
|
147
217
|
},
|
|
218
|
+
{
|
|
219
|
+
name: 'reload',
|
|
220
|
+
usage: 'dokebi reload [--timeout-ms <ms>] [--json]',
|
|
221
|
+
summary: 'Make the background app read dokebi.yaml again (SIGHUP); options marked reloadable apply without a restart, others are refused with RELOAD_RESTART_REQUIRED',
|
|
222
|
+
},
|
|
148
223
|
{
|
|
149
224
|
name: 'status',
|
|
150
225
|
usage: 'dokebi status [--json]',
|
|
@@ -163,14 +238,41 @@ export function commandHasFlag(command, flag) {
|
|
|
163
238
|
return false;
|
|
164
239
|
return new RegExp(`(^|[\\s\\[|])${flag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}(?=[\\s\\]|]|$)`).test(usage);
|
|
165
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* The commands whose usage line takes --dry-run, in table order (AI-M04 F8: `--help` said only
|
|
243
|
+
* "changing commands", and an agent tried `start --dry-run`). Derived, so it cannot drift.
|
|
244
|
+
*/
|
|
245
|
+
export const DRY_RUN_COMMANDS = COMMANDS.filter((item) => commandHasFlag(item.name, '--dry-run')).map((item) => item.name);
|
|
246
|
+
/** DRY_RUN_COMMANDS on one line, subcommands grouped: `app add/remove/link/unlink`. */
|
|
247
|
+
export function dryRunList() {
|
|
248
|
+
const groups = new Map();
|
|
249
|
+
for (const name of DRY_RUN_COMMANDS) {
|
|
250
|
+
const [head = name, sub] = name.split(' ');
|
|
251
|
+
const subs = groups.get(head) ?? [];
|
|
252
|
+
if (sub)
|
|
253
|
+
subs.push(sub);
|
|
254
|
+
groups.set(head, subs);
|
|
255
|
+
}
|
|
256
|
+
return [...groups]
|
|
257
|
+
.map(([head, subs]) => (subs.length ? `${head} ${subs.join('/')}` : head))
|
|
258
|
+
.join(', ');
|
|
259
|
+
}
|
|
166
260
|
/** `dokebi <command> --help`: what each flag does, and one example (D-0065, AI-M01). */
|
|
167
261
|
export const COMMAND_DETAILS = {
|
|
168
262
|
guide: {
|
|
169
|
-
flags: [
|
|
263
|
+
flags: [
|
|
264
|
+
['--json', 'the guide as data: steps, rules, recipes, absent, commands'],
|
|
265
|
+
['--sync', 'Refresh maintained AGENTS.md blocks, preserving project instructions'],
|
|
266
|
+
['--dry-run', 'Preview --sync without writing files'],
|
|
267
|
+
],
|
|
170
268
|
example: 'npx dokebi guide --json',
|
|
171
269
|
},
|
|
172
270
|
init: {
|
|
173
271
|
flags: [
|
|
272
|
+
[
|
|
273
|
+
'--deploy',
|
|
274
|
+
'also create Dockerfile, .dockerignore, compose.deploy.yaml and DEPLOY.md; does not start or publish anything',
|
|
275
|
+
],
|
|
174
276
|
['--core <package|local.tgz>', 'core to install (default: @dokebi/core in this CLI range)'],
|
|
175
277
|
[
|
|
176
278
|
'<directory>',
|
|
@@ -178,7 +280,7 @@ export const COMMAND_DETAILS = {
|
|
|
178
280
|
],
|
|
179
281
|
['--dry-run', 'check the folder and print the next steps; nothing is installed or written'],
|
|
180
282
|
],
|
|
181
|
-
example: 'npx -y @dokebi/cli init my-
|
|
283
|
+
example: 'npx -y @dokebi/cli init my-app && cd my-app && npx dokebi guide --json\nnpx -y @dokebi/cli init . --json # in an empty work folder',
|
|
182
284
|
},
|
|
183
285
|
'recipe list': { flags: [], example: 'npx dokebi recipe list --json' },
|
|
184
286
|
recipe: {
|
|
@@ -187,13 +289,33 @@ export const COMMAND_DETAILS = {
|
|
|
187
289
|
'--dir <directory>',
|
|
188
290
|
'project folder; a new folder is created with init first (default: current project)',
|
|
189
291
|
],
|
|
292
|
+
['--apps <list>', 'site: comma-separated web,admin,api in that order, or none'],
|
|
293
|
+
[
|
|
294
|
+
'--domains <map>',
|
|
295
|
+
'site: app=host pairs separated by commas, or auto for <app>.<project>.localhost',
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
'--realms <map>',
|
|
299
|
+
'site: app=realm pairs separated by commas, or auto for separate app realms',
|
|
300
|
+
],
|
|
301
|
+
[
|
|
302
|
+
'--worker <kind>',
|
|
303
|
+
'site: none | thread (CPU pool) | job (NATS queue; configure before starting)',
|
|
304
|
+
],
|
|
190
305
|
['--view <v>', 'blog: ejs | inertia-vue | inertia-vue-ssr (inertia-react is absent)'],
|
|
191
306
|
['--db <d>', 'postgres | mysql | mariadb | mongodb | none (sqlite is absent)'],
|
|
192
307
|
[
|
|
193
308
|
'--dev-infra <i>',
|
|
194
309
|
'docker (compose.yaml, generated password) | url (you write the URL); only with a database',
|
|
195
310
|
],
|
|
196
|
-
[
|
|
311
|
+
[
|
|
312
|
+
'--admin <a>',
|
|
313
|
+
'blog: none | login (@dokebi/auth, needs a database) | app-code (an admin app whose login you write)',
|
|
314
|
+
],
|
|
315
|
+
[
|
|
316
|
+
'--mail <m>',
|
|
317
|
+
'none | mailpit (local Docker inbox and queue) | smtp | ses (existing configuration)',
|
|
318
|
+
],
|
|
197
319
|
['--port <n>', 'web port (default 3000)'],
|
|
198
320
|
[
|
|
199
321
|
'--db-port <n>',
|
|
@@ -201,7 +323,15 @@ export const COMMAND_DETAILS = {
|
|
|
201
323
|
],
|
|
202
324
|
[
|
|
203
325
|
'--answers-from <user|defaults>',
|
|
204
|
-
'where the answers came from; applying needs it. user: the user
|
|
326
|
+
'where the answers came from; applying needs it. user: the given flags are choices the user or the request explicitly made (ask, end your turn, wait), except those in --ai-chose. defaults: the user said to decide everything (same as --defaults). Recorded per answer (`answeredBy`) and in `report`',
|
|
327
|
+
],
|
|
328
|
+
[
|
|
329
|
+
'--ai-chose <ids>',
|
|
330
|
+
'comma-separated question ids of the given flags you chose yourself because the user left them to you (D-0095); recorded as `answeredBy: ai`. Never for a choice the user made',
|
|
331
|
+
],
|
|
332
|
+
[
|
|
333
|
+
'--ai-reason <id=why>',
|
|
334
|
+
'repeatable: one line (at most 200 characters) why you chose an --ai-chose answer; the user reads it in `report` and verify `tellUser`',
|
|
205
335
|
],
|
|
206
336
|
[
|
|
207
337
|
'--defaults',
|
|
@@ -209,7 +339,7 @@ export const COMMAND_DETAILS = {
|
|
|
209
339
|
],
|
|
210
340
|
['--dry-run', 'plan and preflight only; nothing is written'],
|
|
211
341
|
],
|
|
212
|
-
example: 'npx dokebi recipe blog --json # the questions (exit 2, nothing installed): ask them and end your turn\nnpx dokebi recipe blog --view ejs --db postgres --dev-infra docker --admin none --answers-from user --dry-run --json',
|
|
342
|
+
example: 'npx dokebi recipe blog --json # the questions (exit 2, nothing installed): ask them and end your turn\nnpx dokebi recipe blog --view ejs --db postgres --dev-infra docker --admin none --mail none --answers-from user --dry-run --json',
|
|
213
343
|
},
|
|
214
344
|
'plugins list': {
|
|
215
345
|
flags: [
|
|
@@ -223,7 +353,7 @@ export const COMMAND_DETAILS = {
|
|
|
223
353
|
},
|
|
224
354
|
'plugins search': {
|
|
225
355
|
flags: [],
|
|
226
|
-
example: 'npx dokebi plugins search
|
|
356
|
+
example: 'npx dokebi plugins search upload --json # @dokebi/storage',
|
|
227
357
|
},
|
|
228
358
|
'plugins info': { flags: [], example: 'npx dokebi plugins info db --json' },
|
|
229
359
|
'plugins doc': { flags: [], example: 'npx dokebi plugins doc dokebi-db --json' },
|
|
@@ -241,6 +371,10 @@ export const COMMAND_DETAILS = {
|
|
|
241
371
|
'--adapter <id>',
|
|
242
372
|
'@dokebi/db: pg | mysql2 | mariadb | mongodb (adapter file, connection main, driver, @types/pg)',
|
|
243
373
|
],
|
|
374
|
+
[
|
|
375
|
+
'--startup <required|optional>',
|
|
376
|
+
'@dokebi/db with --adapter: connections.main.startup (optional: the app starts and runs while that database is down; written only when given)',
|
|
377
|
+
],
|
|
244
378
|
[
|
|
245
379
|
'--no-first-app',
|
|
246
380
|
'@dokebi/app: do not create the EJS app main (add the first app with app add)',
|
|
@@ -260,29 +394,146 @@ export const COMMAND_DETAILS = {
|
|
|
260
394
|
flags: [['--dry-run', 'plan only']],
|
|
261
395
|
example: 'npx dokebi remove dokebi-health --dry-run --json',
|
|
262
396
|
},
|
|
397
|
+
'config show': {
|
|
398
|
+
flags: [
|
|
399
|
+
[
|
|
400
|
+
'<id>[.<path>]',
|
|
401
|
+
'one section or value (default: every section); a value that is not set and has no default is UNKNOWN_OPTION',
|
|
402
|
+
],
|
|
403
|
+
[
|
|
404
|
+
'--json',
|
|
405
|
+
'{ value, defaults, secrets }: secrets (schema writeOnly, keys named like secret/password/token/key, a URL password) show as <secret: set>; never a value',
|
|
406
|
+
],
|
|
407
|
+
],
|
|
408
|
+
example: 'npx dokebi config show dokebi-web --json\nnpx dokebi config show dokebi-web.port',
|
|
409
|
+
},
|
|
410
|
+
'config diff': {
|
|
411
|
+
flags: [
|
|
412
|
+
['<plugin-id>', 'one section (default: every section)'],
|
|
413
|
+
[
|
|
414
|
+
'--json',
|
|
415
|
+
'{ inSync, onlyInConfig, onlyInExample, different, secrets, exampleSecrets }: option paths only; secrets are never compared, and a secret with a value in the sample is listed in exampleSecrets',
|
|
416
|
+
],
|
|
417
|
+
[
|
|
418
|
+
'--write',
|
|
419
|
+
'copy the options only in dokebi.yaml into dokebi.example.yaml (comments kept): secrets inside them are left out, a list holding a secret is left out whole, values both files set stay as the sample has them; the result adds { written, diff } (diff: the comparison after the copy)',
|
|
420
|
+
],
|
|
421
|
+
[
|
|
422
|
+
'--values',
|
|
423
|
+
'with --write: also write the value dokebi.yaml has into dokebi.example.yaml for every path both set to different non-secret values (the paths of different); secrets are never compared, so never copied; the result adds { valuesWritten }',
|
|
424
|
+
],
|
|
425
|
+
[
|
|
426
|
+
'--prune',
|
|
427
|
+
'with --write: also remove from dokebi.example.yaml what only it has (an old section such as dokebi-logger, an option the plugin no longer has) and any secret with a value in it; dokebi.yaml is never changed; the result adds { pruned }',
|
|
428
|
+
],
|
|
429
|
+
['--dry-run', 'with --write: what would be copied or removed, nothing written'],
|
|
430
|
+
],
|
|
431
|
+
example: 'npx dokebi config diff --json\nnpx dokebi config diff dokebi-web\nnpx dokebi config diff --write --json\nnpx dokebi config diff --write --values --json',
|
|
432
|
+
},
|
|
263
433
|
'config set': {
|
|
264
434
|
flags: [
|
|
265
|
-
[
|
|
435
|
+
[
|
|
436
|
+
'<id>.<path>=<value>',
|
|
437
|
+
'JSON when it parses, else text; checked against the plugin schema. logging.<path> is options.logging (the @dokebi/logger options; without it level and plugins.<plugin> only); a list item is named by its name (else its type) or its index, as in logging.targets.file.enabled=true',
|
|
438
|
+
],
|
|
266
439
|
['--dry-run', 'plan only'],
|
|
267
440
|
],
|
|
268
|
-
example: 'npx dokebi config set dokebi-web.port=3000 --json',
|
|
441
|
+
example: 'npx dokebi config set dokebi-web.port=3000 --json\nnpx dokebi config set logging.level=debug logging.targets.file.enabled=true --json',
|
|
442
|
+
},
|
|
443
|
+
'config unset': {
|
|
444
|
+
flags: [
|
|
445
|
+
[
|
|
446
|
+
'<id>.<path>',
|
|
447
|
+
'removes it (and mappings left empty) from dokebi.yaml and dokebi.example.yaml; a path that is not set is OPTION_NOT_SET (a warning); a secret is removed with SECRET_REMOVED; values are never printed. logging.<path> is options.logging; list items by name (else type) or index. A section a file still holds as written is that section, never the plugin it names (the old options.dokebi-logger of a sample is removed as written, SECTION_NOT_READ, and options.logging stays)',
|
|
448
|
+
],
|
|
449
|
+
[
|
|
450
|
+
'<id>',
|
|
451
|
+
'a whole section, only one no installed plugin reads (an old section left in the files); a plugin section is INVALID_SET (remove the plugin instead)',
|
|
452
|
+
],
|
|
453
|
+
['--dry-run', 'plan only'],
|
|
454
|
+
],
|
|
455
|
+
example: 'npx dokebi config unset dokebi-web.files --json\nnpx dokebi config unset dokebi-web.files --dry-run --json\nnpx dokebi config unset dokebi-logger --json',
|
|
456
|
+
},
|
|
457
|
+
'config init': {
|
|
458
|
+
flags: [
|
|
459
|
+
[
|
|
460
|
+
'--dry-run',
|
|
461
|
+
'plan only: the result names the secrets it would generate (never their values) and the placeholders left to fill',
|
|
462
|
+
],
|
|
463
|
+
],
|
|
464
|
+
example: 'npx dokebi config init --json\nnpx dokebi dev-infra --json\nnpx dokebi doctor --json',
|
|
269
465
|
},
|
|
270
466
|
'config secret': {
|
|
271
467
|
flags: [
|
|
272
468
|
[
|
|
273
469
|
'<id>.<path>',
|
|
274
|
-
'writes a random secret there (a list when the schema wants one); never printed',
|
|
470
|
+
'writes a random secret there (a list when the schema wants one); never printed; an existing value is kept (SECRET_KEPT), an empty one or a <placeholder> is filled; a URL takes only --stdin. logging.<path> is options.logging; a list item by its name (else type) or index',
|
|
471
|
+
],
|
|
472
|
+
[
|
|
473
|
+
'--stdin',
|
|
474
|
+
'write the secret read from stdin (one line, piped, or typed without echo on a terminal) instead of a generated one: a token someone issued, such as the token of a log receiver',
|
|
475
|
+
],
|
|
476
|
+
[
|
|
477
|
+
'--rotate',
|
|
478
|
+
'replace an existing value: a list gets the new secret first (it signs) and keeps the previous 2 after it (they still verify; older ones are dropped, SECRETS_DROPPED); a string is replaced. Restart the app afterwards',
|
|
479
|
+
],
|
|
480
|
+
['--dry-run', 'plan only'],
|
|
481
|
+
],
|
|
482
|
+
example: 'npx dokebi config secret dokebi-session.secrets --json\nnpx dokebi config secret dokebi-csrf.secrets --rotate --json\nnpx dokebi config secret logging.targets.studio.token --stdin --json < studio-token.txt',
|
|
483
|
+
},
|
|
484
|
+
'config secrets': {
|
|
485
|
+
flags: [
|
|
486
|
+
[
|
|
487
|
+
'--json',
|
|
488
|
+
'{ file, secretsFile, listed, secrets[{path, source, listed, required}], missing }; source is config, secrets or null; exit 1 when missing is not empty',
|
|
489
|
+
],
|
|
490
|
+
],
|
|
491
|
+
example: 'npx dokebi config secrets --json\nDOKEBI_CONFIG=/etc/shop/production/dokebi.yaml DOKEBI_SECRETS=/etc/shop/production/secrets.yaml npx dokebi config secrets --json',
|
|
492
|
+
},
|
|
493
|
+
'deploy init': {
|
|
494
|
+
flags: [
|
|
495
|
+
[
|
|
496
|
+
'--target <systemd|compose>',
|
|
497
|
+
'systemd (default): a unit per instance running node src/main.ts; compose: a compose file per instance (and Dockerfile, .dockerignore when missing)',
|
|
498
|
+
],
|
|
499
|
+
[
|
|
500
|
+
'--instance <name>',
|
|
501
|
+
'repeatable; default production. production uses port 3000, staging 3001, any other name needs --port',
|
|
502
|
+
],
|
|
503
|
+
['--port <n>', 'the local port of the one instance named (1024-65535)'],
|
|
504
|
+
[
|
|
505
|
+
'--dry-run',
|
|
506
|
+
'plan only: the files it would write or keep (a file you edited is kept: DEPLOY_FILE_KEPT)',
|
|
507
|
+
],
|
|
508
|
+
],
|
|
509
|
+
example: 'npx dokebi deploy init --instance staging --instance production --json\nnpx dokebi deploy init --target compose --instance production --json',
|
|
510
|
+
},
|
|
511
|
+
'deploy proxy': {
|
|
512
|
+
flags: [
|
|
513
|
+
['--caddy', 'write deploy/proxy/<app>-<instance>.Caddyfile (automatic HTTPS)'],
|
|
514
|
+
[
|
|
515
|
+
'--nginx',
|
|
516
|
+
'write deploy/proxy/<app>-<instance>.nginx.conf (certificate paths of certbot; HTTP redirected to HTTPS)',
|
|
517
|
+
],
|
|
518
|
+
['--domain <host>', 'repeatable; the first is the main name'],
|
|
519
|
+
[
|
|
520
|
+
'--instance <name>',
|
|
521
|
+
'the instance whose deploy/<instance>/dokebi.example.yaml it reads (default production)',
|
|
275
522
|
],
|
|
276
523
|
['--dry-run', 'plan only'],
|
|
277
524
|
],
|
|
278
|
-
example: 'npx dokebi
|
|
525
|
+
example: 'npx dokebi deploy proxy --caddy --domain shop.example.com --json\nnpx dokebi deploy proxy --nginx --domain staging.shop.example.com --instance staging --json',
|
|
279
526
|
},
|
|
280
527
|
'dev-infra': {
|
|
281
528
|
flags: [
|
|
529
|
+
[
|
|
530
|
+
'--file <path>',
|
|
531
|
+
'Compose file for an action; repeat for multiple files (default compose.yaml)',
|
|
532
|
+
],
|
|
282
533
|
['--db-port <n>', 'host port of the database container (PORT_IN_USE names a free one)'],
|
|
283
534
|
['--dry-run', 'plan only'],
|
|
284
535
|
],
|
|
285
|
-
example: 'npx dokebi dev-infra --db-port 5433 --json &&
|
|
536
|
+
example: 'npx dokebi dev-infra --db-port 5433 --json && npx dokebi dev-infra up --json',
|
|
286
537
|
},
|
|
287
538
|
migrate: { flags: [['--dry-run', 'plan only']], example: 'npx dokebi migrate --dry-run --json' },
|
|
288
539
|
inspect: {
|
|
@@ -290,8 +541,14 @@ export const COMMAND_DETAILS = {
|
|
|
290
541
|
example: 'npx dokebi inspect --json',
|
|
291
542
|
},
|
|
292
543
|
doctor: {
|
|
293
|
-
flags: [
|
|
294
|
-
|
|
544
|
+
flags: [
|
|
545
|
+
['--verbose', 'the whole inspection (default: a summary; --json is always complete)'],
|
|
546
|
+
[
|
|
547
|
+
'--production',
|
|
548
|
+
'also the server checks, with the settings the app reads (DOKEBI_CONFIG, DOKEBI_SECRETS): NODE_ENV=production, no per-process state (memory session store, local rate limits, …), trustProxy, a fixed port, absolute storage folder, placeholders, listed secrets, pending migrations',
|
|
549
|
+
],
|
|
550
|
+
],
|
|
551
|
+
example: 'npx dokebi doctor\nNODE_ENV=production DOKEBI_CONFIG=/etc/shop/production/dokebi.yaml DOKEBI_SECRETS=/etc/shop/production/secrets.yaml npx dokebi doctor --production --json',
|
|
295
552
|
},
|
|
296
553
|
check: {
|
|
297
554
|
flags: [
|
|
@@ -302,19 +559,84 @@ export const COMMAND_DETAILS = {
|
|
|
302
559
|
],
|
|
303
560
|
example: 'npx dokebi check --json\n# a justified empty catch or background promise: // dokebi-check: allow empty-catch <reason>',
|
|
304
561
|
},
|
|
562
|
+
'mail preview': {
|
|
563
|
+
flags: [
|
|
564
|
+
['--locale <locale>', 'locale to render (falls back to the configured default)'],
|
|
565
|
+
['--json', 'subject, html, text and resolved locale in the standard envelope'],
|
|
566
|
+
],
|
|
567
|
+
example: 'npx dokebi mail preview welcome --locale en --json',
|
|
568
|
+
},
|
|
569
|
+
describe: {
|
|
570
|
+
flags: [
|
|
571
|
+
[
|
|
572
|
+
'--with-db',
|
|
573
|
+
'also read the tables of each dokebi-db connection with dokebi-migrate schema (this step connects); a connection it cannot read gets db.connections[].unavailable',
|
|
574
|
+
],
|
|
575
|
+
[
|
|
576
|
+
'--timeout-ms <ms>',
|
|
577
|
+
'how long loading and describing the app may take (default 30000); DESCRIBE_TIMEOUT after it',
|
|
578
|
+
],
|
|
579
|
+
[
|
|
580
|
+
'--openapi',
|
|
581
|
+
'one OpenAPI 3.1 document per app (operationId = route id); several apps: { apps: { <name>: document } }',
|
|
582
|
+
],
|
|
583
|
+
['--app <name>', 'with --openapi: only this app'],
|
|
584
|
+
[
|
|
585
|
+
'--json',
|
|
586
|
+
'{ schemaVersion, app, routes, pages, jobs, schedules, errors, config: { keys, env }, db, unavailable } (describe.schema.json); with --openapi the document(s)',
|
|
587
|
+
],
|
|
588
|
+
],
|
|
589
|
+
example: 'npx dokebi describe --json\nnpx dokebi describe --openapi --app main > openapi.json',
|
|
590
|
+
},
|
|
591
|
+
drift: {
|
|
592
|
+
flags: [
|
|
593
|
+
[
|
|
594
|
+
'--expected <file>',
|
|
595
|
+
'JSON of the describe shape (only db.connections is read; a describe --json envelope works): connections, then tables or collections and columns where the file lists them, and a column comment where it gives a non-empty one (whitespace normalized)',
|
|
596
|
+
],
|
|
597
|
+
[
|
|
598
|
+
'--timeout-ms <ms>',
|
|
599
|
+
'how long loading the app and reading each database may take (default 30000)',
|
|
600
|
+
],
|
|
601
|
+
[
|
|
602
|
+
'--json',
|
|
603
|
+
'{ ok, drift[{kind, connection, target, expected_value, code_value}], unavailable[{connection, reason}], compared, ms }; kind: connection | table | collection | column | column_comment; null means that side has none',
|
|
604
|
+
],
|
|
605
|
+
],
|
|
606
|
+
example: 'npx dokebi drift --expected design/describe.json --json',
|
|
607
|
+
},
|
|
305
608
|
verify: {
|
|
306
|
-
flags: [
|
|
307
|
-
|
|
609
|
+
flags: [
|
|
610
|
+
['--wait-ms <ms>', 'how long start waits for the started line (default 30000)'],
|
|
611
|
+
[
|
|
612
|
+
'--test-timeout-ms <ms>',
|
|
613
|
+
'time limit of the test step, the package.json test script (default 300000)',
|
|
614
|
+
],
|
|
615
|
+
[
|
|
616
|
+
'--remote <https-url>',
|
|
617
|
+
'check a deployed site only (nothing local runs): TLS certificate and days left, http to https redirect, live and ready health routes, security headers; exit 1 on a failed check',
|
|
618
|
+
],
|
|
619
|
+
['--timeout-ms <ms>', 'with --remote: the limit of each request (default 10000)'],
|
|
620
|
+
],
|
|
621
|
+
example: 'npx dokebi verify --json\nnpx dokebi verify --remote https://shop.example.com --json',
|
|
308
622
|
},
|
|
309
623
|
'app add': {
|
|
310
624
|
flags: [
|
|
311
|
-
[
|
|
625
|
+
[
|
|
626
|
+
'--domain <host>',
|
|
627
|
+
'host name served by the app (repeatable, no port); auto: <app>.<project>.localhost',
|
|
628
|
+
],
|
|
312
629
|
['--template <name>', 'views folder for those domains (default: default)'],
|
|
313
630
|
['--inertia', 'Vue pages with Vite (adds vite.config.ts, the build script, vite and vue)'],
|
|
314
631
|
['--ssr', 'with --inertia: server-rendered first HTML'],
|
|
632
|
+
[
|
|
633
|
+
'--view <ejs|none>',
|
|
634
|
+
'EJS pages, or no views (a JSON API); unset: none where the recipe built no screens (api), else EJS',
|
|
635
|
+
],
|
|
636
|
+
['--seal', 'seal those domains (domains.<host>.seal: true; needs @dokebi/seal)'],
|
|
315
637
|
['--dry-run', 'plan only'],
|
|
316
638
|
],
|
|
317
|
-
example: 'npx dokebi app add admin --domain
|
|
639
|
+
example: 'npx dokebi app add admin --domain auto --inertia --json',
|
|
318
640
|
},
|
|
319
641
|
'app remove': {
|
|
320
642
|
flags: [['--dry-run', 'plan only']],
|
|
@@ -323,6 +645,7 @@ export const COMMAND_DETAILS = {
|
|
|
323
645
|
'app link': {
|
|
324
646
|
flags: [
|
|
325
647
|
['--template <name>', 'views folder for this domain'],
|
|
648
|
+
['--seal', 'seal this domain (domains.<host>.seal: true; needs @dokebi/seal)'],
|
|
326
649
|
['--dry-run', 'plan only'],
|
|
327
650
|
],
|
|
328
651
|
example: 'npx dokebi app link shop sale.localhost --template sale --json',
|
|
@@ -337,13 +660,26 @@ export const COMMAND_DETAILS = {
|
|
|
337
660
|
['--no-views', 'routes answer JSON (no views folder)'],
|
|
338
661
|
['--dry-run', 'plan only'],
|
|
339
662
|
],
|
|
340
|
-
example: 'npx dokebi module add
|
|
663
|
+
example: 'npx dokebi module add items --json',
|
|
341
664
|
},
|
|
342
665
|
'module remove': {
|
|
343
666
|
flags: [['--dry-run', 'plan only']],
|
|
344
|
-
example: 'npx dokebi module remove
|
|
667
|
+
example: 'npx dokebi module remove items --json',
|
|
345
668
|
},
|
|
346
669
|
'module list': { flags: [], example: 'npx dokebi module list --json' },
|
|
670
|
+
'settings add': {
|
|
671
|
+
flags: [['--dry-run', 'plan only']],
|
|
672
|
+
example: 'npx dokebi settings add survey --json',
|
|
673
|
+
},
|
|
674
|
+
'settings sync': {
|
|
675
|
+
flags: [['--dry-run', 'plan only']],
|
|
676
|
+
example: 'npx dokebi settings sync --json',
|
|
677
|
+
},
|
|
678
|
+
'settings remove': {
|
|
679
|
+
flags: [['--dry-run', 'plan only']],
|
|
680
|
+
example: 'npx dokebi settings remove survey --json',
|
|
681
|
+
},
|
|
682
|
+
'settings list': { flags: [], example: 'npx dokebi settings list --json' },
|
|
347
683
|
dev: { flags: [], example: 'npx dokebi dev' },
|
|
348
684
|
start: {
|
|
349
685
|
flags: [
|
|
@@ -361,6 +697,15 @@ export const COMMAND_DETAILS = {
|
|
|
361
697
|
],
|
|
362
698
|
example: 'npx dokebi stop --json',
|
|
363
699
|
},
|
|
700
|
+
reload: {
|
|
701
|
+
flags: [
|
|
702
|
+
[
|
|
703
|
+
'--timeout-ms <ms>',
|
|
704
|
+
'how long to wait for the outcome in the app log (default options.reload.prepareTimeoutMs + 5000)',
|
|
705
|
+
],
|
|
706
|
+
],
|
|
707
|
+
example: 'npx dokebi reload --json',
|
|
708
|
+
},
|
|
364
709
|
status: { flags: [], example: 'npx dokebi status --json' },
|
|
365
710
|
logs: {
|
|
366
711
|
flags: [
|