@dokebi/cli 0.4.41 → 0.4.43

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 CHANGED
@@ -238,7 +238,7 @@ Every command also works in an npm workspace member folder. Packages are found t
238
238
  - AI entry (D-0065): `ANSWERS_REQUIRED` (exit 2), `ANSWERS_SOURCE_REQUIRED` (applying without `--answers-from user` or `--defaults`), `AI_CHOICE_UNKNOWN`, `AI_CHOICE_FIXED`, `AI_CHOICE_WITHOUT_ANSWER`, `AI_REASON_WITHOUT_CHOICE`, `INVALID_AI_REASON` (D-0095: `--ai-chose`/`--ai-reason` refused), `UNKNOWN_RECIPE`, `INVALID_ANSWER`, `OPTION_ABSENT`, `OPTION_NOT_APPLICABLE` (an answer another answer rules out: `--admin login` with `--db none`), `RECIPE_FILE_CONFLICT` (a file the recipe writes exists with other content; `details.path`, `fix`), `NOT_A_PROJECT`, `PREFLIGHT_FAILED` (details.preflight: `DOCKER_MISSING`, `PORT_IN_USE`), `RECIPE_STEP_FAILED`, `STEP_COMMAND_FAILED`, `NOT_PUBLISHED`, `NO_COMPATIBLE_VERSION`, `UNKNOWN_ADAPTER`, `ADAPTER_TEMPLATE_MISSING`, `DB_PLUGIN_MISSING`, `CONNECTION_MISSING`, `DEV_INFRA_UNSUPPORTED`, `COMPOSE_CONFLICT`, `COMPOSE_PORT_UNKNOWN`, `COMPOSE_INVALID`, `NOT_INSTALLED`, `DOC_MISSING`, `CATALOG_MISSING`, `CATALOG_INVALID`. check (D-0072): `TYPESCRIPT_UNAVAILABLE`, `TSCONFIG_INVALID`. drift (D-0120): `DRIFT_EXPECTED_INVALID`. verify check codes: `DOCTOR_FAILED`, `CHECK_FAILED` (details: `problems`), `TYPECHECK_FAILED`, `BUILD_FAILED`, `ALREADY_RUNNING`, `PORT_IN_USE`, `DB_URL_MISSING`, `NOT_READY`, `URL_UNKNOWN`, `HTTP_FAILED`, `FOREIGN_SERVER` (another server answered), `NOT_STARTED` (the app did not start, so no HTTP), `STOP_FORCED`, `APP_EXITED`, `CHECK_ERROR`, `TEST_FAILED` (details: `failures`, the counts and `exitCode`), `TEST_TIMEOUT` (the tests did not finish within `--test-timeout-ms`). Before any check, verify refuses a folder without `package.json`, `dokebi.yaml` or `.dokebi/state.json` with `NOT_A_PROJECT` (`details.file`, `details.fix`; the state file is the CLI's and belongs in version control, so a copied project needs it). The changing commands (`add`, `upgrade`, `remove`, `migrate`, `app`, `module`, `settings`, `config set`/`unset`/`secret`) and the app, module and settings lists do the same outside a project: `NOT_A_PROJECT` with `details.file` (`.dokebi/state.json`, or `dokebi.yaml` in a folder that has the state) and `details.fix`. For a missing dokebi.yaml the fix is `npx dokebi config init` (D-0163), which answers `CONFIG_EXISTS` when the file is there and `EXAMPLE_MISSING` without dokebi.example.yaml.
239
239
  - Commands: `USAGE`, `UNKNOWN_COMMAND`, `PROJECT_EXISTS`, `UNSUPPORTED_PROJECT`, `INVALID_SPEC`, `INVALID_PACKAGE`, `INVALID_MANIFEST`, `INCOMPATIBLE_VERSION`, `MISSING_DEPENDENCY`, `DEPENDENCY_CYCLE`, `DUPLICATE_PLUGIN`, `UNKNOWN_PLUGIN`, `REVERSE_DEPENDENCY`, `REQUIRED_PLUGIN`, `INVALID_PLUGIN_OPTIONS`, `INVALID_SET`, `PATH_MISMATCH` (config set, unset and secret: the command would change an option path it was not asked for — the plugin id `dokebi-logger` reaching `options.logging`, an old or renamed section; refused before anything is written, a warning with `--dry-run`; `details.outside` and `details.paths` name them; `config show` of such a plugin id names the section in `details.outside` and `fix`), `SAMPLE_SECRET` (`config diff --write`: the copy would leave a secret in dokebi.example.yaml; nothing written), `FILE_CONFLICT`, `PATH_CONFLICT`, `PACKAGE_CONFLICT`, `NPM_FAILED`, `REGISTRY_MISMATCH`, `INTERRUPTED` (a Ctrl+C, SIGTERM or SIGHUP before the commit: nothing applied, no lock left; run the command again), `LOCK_FAILED` (.dokebi/lock cannot be created: not writable), `PROJECT_LOCKED` (`details`: `pid`, `running`, `since` and `fix`, as doctor says it), `INVALID_ENV`, `CONCURRENT_CHANGE`, `COMMIT_FAILED`, `UPGRADE_DOWNGRADE`, `UPGRADE_IDENTITY_CHANGED`, `UPGRADE_ENTRY_MOVED`, `UPGRADE_CONFIG_CONFLICT`, `APP_EXISTS`, `APP_IN_USE`, `APPS_PRESENT`, `APP_PLUGIN_MISSING`, `DOMAIN_IN_USE`, `UNKNOWN_APP`, `UNKNOWN_DOMAIN`, `MODULE_EXISTS`, `MODULE_PLUGIN_MISSING`, `UNKNOWN_MODULE`, `HOST_MISSING`, `HOST_CONFLICT`, and for the server commands `ENTRY_MISSING`, `START_CHECK_FAILED`, `ALREADY_RUNNING`, `START_IN_PROGRESS`, `START_FAILED`, `STOP_TIMEOUT`, `STOP_FAILED` (verify could not signal the pid it started, or stop could not signal the app and its log writer could not be asked), `PROCESS_INFO_FAILED`, `NO_LOG`, `UNSUPPORTED_PLATFORM`; D-0154 `RELOAD_UNSUPPORTED`, `RELOAD_RESTART_REQUIRED`, `RELOAD_INVALID`, `RELOAD_FAILED` (`dokebi reload`); D-0155 `INVALID_SETTINGS`, `SETTINGS_EXISTS`, `SETTINGS_SECTION_CONFLICT`, `UNKNOWN_SETTINGS`, `SETTINGS_SCHEMA_FAILED`, `UNDECLARED_SECTION` (`settings` commands; doctor also `SETTINGS_SCHEMA_MISSING` and the warning `SETTINGS_SCHEMA_STALE`).
240
240
  - `UNSUPPORTED_PROJECT`: a package.json the CLI cannot install for: npm workspaces of its own, `workspace:` or `link:` specs, URLs. A tarball dependency is fine as an absolute path or a path inside the project (`file:vendor/web-0.4.3.tgz`, as npm writes it when installed from the project; it stays relative, so the project can move). `file:~/…` (npm's form of `npm install ~/x.tgz`) is the home folder for npm, not the project, and is refused, as is an absolute path npm reads the same way (`file:/~/…`, `file://~/…`: not the folder `/~`; `dokebi add` or `upgrade --to` of such a path is `INVALID_SPEC`); a listed tarball the folder lacks (an ignored `vendor/`) is npm's `NPM_FAILED` naming the file, as for an absolute path, and a folder at its path is `UNSUPPORTED_PROJECT` with `details.path`. Outside Windows a backslash in a `file:` tarball path (`file:vendor\x.tgz`) is refused too, with `details.path` and a `fix` that writes it with `/` (npm reads it as part of a file name there and saves the path with `/`, another file; `add` or `upgrade --to` of such a path: `INVALID_SPEC`); on Windows it is a separator, as for npm. `dokebi add ./vendor/web-0.4.3.tgz` and `upgrade --to vendor/web-0.4.3.tgz` write a tarball inside the project relative too; one outside it, reached through a symbolic link that leads out, or in a project folder named `~` (npm would read the home folder), is written absolute. `INVALID_OPTIONS_SCHEMA`: a plugin's options schema cannot be checked — with `details.keyword` and `details.config` it uses an `x-dokebi-*` keyword the @dokebi/config of this CLI does not know (a schema of a newer release: run the @dokebi/cli of the same release as the plugins; nothing is damaged), with `details.validator: true` the validator itself cannot load (restore node_modules), otherwise that plugin's schema is broken (reinstall it).
241
- - Diagnostics (inspect, doctor): `ENV_DOKEBI_CONFIG_IGNORED` (warning, R4CC-7: a `.env` line sets `DOKEBI_CONFIG`, which the app never gets from there; `path` `.env:<line>`, `hint`), `MIGRATION_REQUIRED`, `CONFIG_CONFLICT`, `INVALID_CORE`, `PACKAGE_VERSION_MISMATCH`, `MISSING_CORE_DEPENDENCY`, `MISSING_PACKAGE_DEPENDENCY`, `MODIFIED_REGISTRATION`, `MODIFIED_TEMPLATE` (warning: only `owner: "cli"` files), `MANIFEST_CHANGED`, `INVALID_PLUGIN_OPTIONS`, `ENTRY_MISSING`, `LEGACY_ADMIN_SECTION` (warning, D-0115: `options.blog-admin` of an older recipe keeps working; the hint says how to rename it with the seed), `LEGACY_LAYOUT`, `TEMPLATE_FIX_MISSING` (warning: a `src/infra/db/adapters/<id>.ts` — or a copy moved or renamed under `src/`, a file that imports the driver and @dokebi/db's `ResourceAdapter` — copied from @dokebi/db's template before a fix the installed template has — the handling of a socket error of a client in use (@dokebi/db's client failure code), `lazy`, `usage`, pg `failed-connect` (a client whose connect fails ends its socket, else a URL without a password kept the process alive), mariadb `url-query` (a URL query such as `?ssl=true` is refused, not dropped) and `ipv6`, pg and mariadb `lost` (a lost connection takes readiness down at once), mysql2 and mariadb `idle` (idle connections end after `idleTimeoutMs`), pg, mysql2 and mariadb `repeats` (errors of many pooled connections at once are logged once per `logRepeatWindowMs`, the rest counted), mysql2 `connect-cause` (a pool wait that ran out while the caller's own connect was pending names it, so a frozen server takes readiness down) and `queue-leave` (a caller that gave up leaves mysql2's queue instead of counting against `maxWaiting`); and, with @dokebi/template-inertia installed, a `vite.config.*` or `vite.ssr.config.*` without `build.emptyOutDir: false` (`keep-chunks`: a rolling deploy needs the previous build's chunks) or, when the installed apps host's template has it, without `vue({ script: { fs } })` (`vue-type-files`: a page whose props type is imported from another file fails `vite build`, since TypeScript 7 gives the Vue compiler no file access); and a `src/main.ts` that reads `process.env.DOKEBI_CONFIG ??` (`empty-config-env`, `plugin: null`: an empty `DOKEBI_CONFIG` is taken for a path and the app stops with `CONFIG_READ_FAILED`, while every CLI command reads dokebi.yaml then; the generated main.ts uses `||`; doctor only); `details.missing` and `details.template` name them, `hint` names the file and the change; the copy is yours, compare and bring them over), `RELOAD_NOT_WIRED` (warning: `src/main.ts` passes no `configFile` to `new Application` or `ClusterRunner`, so dokebi.yaml is never read again and `dokebi dev` restarts on every change, saying so; or the cluster workers' `src/infra/runtime/application.ts` builds `new Application` without it, so a worker cannot take the reload its primary asks for), `VUE_TYPECHECK_MISSING` (warning: an Inertia app under `src/apps` and a `typecheck` script without `vue-tsc`, from before `app add --inertia` prepared the Vue check; the hint lists the files and devDependencies to add), `DEV_FILES_UNGUARDED` (D-0129: an Inertia app under `src/apps` and an installed @dokebi/template-inertia without the dev file policy, so `dokebi dev` serves every project file such as `dokebi.yaml?raw`; an error when `options.dokebi-template-inertia.devHosts` is set, a warning otherwise; the hint says to upgrade the package and change secrets that were reachable), `MISSING_REQUIRED_PLUGIN`, `STALE_REQUIREMENTS`, `PLUGIN_CHECK` (details `code`, `optionPath`, and the plugin's `hint`), `GUIDE_BLOCK_MODIFIED` (warning: the installed list in AGENTS.md was edited between its markers by hand, D-0072), `GUIDE_PROJECT_BLOCK_INVALID` (warning: the `dokebi:project` markers of AGENTS.md cannot be read, D-0077), `PROJECT_LOCKED`, `RECOVERY_REQUIRED`, `UNSAFE_PATH`, `INVALID_LOGGING_CONFIG` (error: a level value of `options.logging`, or `options.logging` that is not an object), `LOGGING_PLUGIN_UNKNOWN` (warning: a level for a plugin that is not installed), `LOGGING_OPTIONS_UNUSED` (warning, D-0151: keys other than `level` and `plugins` in `options.logging` without the logger plugin; core warns the same at startup; with @dokebi/logger installed its options schema checks them as `INVALID_PLUGIN_OPTIONS`).
241
+ - Diagnostics (inspect, doctor): `ENV_DOKEBI_CONFIG_IGNORED` (warning, R4CC-7: a `.env` line sets `DOKEBI_CONFIG`, which the app never gets from there; `path` `.env:<line>`, `hint`), `MIGRATION_REQUIRED`, `CONFIG_CONFLICT`, `INVALID_CORE`, `PACKAGE_VERSION_MISMATCH`, `MISSING_CORE_DEPENDENCY`, `MISSING_PACKAGE_DEPENDENCY`, `MODIFIED_REGISTRATION`, `MODIFIED_TEMPLATE` (warning: only `owner: "cli"` files), `MANIFEST_CHANGED`, `INVALID_PLUGIN_OPTIONS`, `ENTRY_MISSING`, `LEGACY_ADMIN_SECTION` (warning, D-0115: `options.blog-admin` of an older recipe keeps working; the hint says how to rename it with the seed), `LEGACY_LAYOUT`, `TEMPLATE_FIX_MISSING` (warning: a `src/infra/db/adapters/<id>.ts` — or a copy moved or renamed under `src/`, a file that imports the driver and @dokebi/db's `ResourceAdapter` — copied from @dokebi/db's template before a fix the installed template has — the handling of a socket error of a client in use (@dokebi/db's client failure code), `lazy`, `usage`, pg `failed-connect` (a client whose connect fails ends its socket, else a URL without a password kept the process alive), mariadb `url-query` (a URL query such as `?ssl=true` is refused, not dropped) and `ipv6`, pg and mariadb `lost` (a lost connection takes readiness down at once), mysql2 and mariadb `idle` (idle connections end after `idleTimeoutMs`), pg, mysql2 and mariadb `repeats` (errors of many pooled connections at once are logged once per `logRepeatWindowMs`, the rest counted), mysql2 `connect-cause` (a pool wait that ran out while the caller's own connect was pending names it, so a frozen server takes readiness down) and `queue-leave` (a caller that gave up leaves mysql2's queue instead of counting against `maxWaiting`); and, with @dokebi/template-inertia installed, a `vite.config.*` or `vite.ssr.config.*` without `build.emptyOutDir: false` (`keep-chunks`: a rolling deploy needs the previous build's chunks) or, when the installed apps host's template has it, without `vue({ script: { fs } })` (`vue-type-files`: a page whose props type is imported from another file fails `vite build`, since TypeScript 7 gives the Vue compiler no file access), an Inertia app's `views/app.js` or `views/ssr.js` that does not import `virtual:dokebi/module-pages` while a module under `src/` keeps Vue pages in its views folder (`module-pages`, D-0218: a module page answers "Unknown page"; `details.page` names one) and a Vite config without `dokebiInertia()` while an entry imports it (`module-pages-plugin`: the build cannot resolve the import); and a `src/main.ts` that reads `process.env.DOKEBI_CONFIG ??` (`empty-config-env`, `plugin: null`: an empty `DOKEBI_CONFIG` is taken for a path and the app stops with `CONFIG_READ_FAILED`, while every CLI command reads dokebi.yaml then; the generated main.ts uses `||`; doctor only); `details.missing` and `details.template` name them, `hint` names the file and the change; the copy is yours, compare and bring them over), `RELOAD_NOT_WIRED` (warning: `src/main.ts` passes no `configFile` to `new Application` or `ClusterRunner`, so dokebi.yaml is never read again and `dokebi dev` restarts on every change, saying so; or the cluster workers' `src/infra/runtime/application.ts` builds `new Application` without it, so a worker cannot take the reload its primary asks for), `VUE_TYPECHECK_MISSING` (warning: an Inertia app under `src/apps` and a `typecheck` script without `vue-tsc`, from before `app add --inertia` prepared the Vue check; the hint lists the files and devDependencies to add), `DEV_FILES_UNGUARDED` (D-0129: an Inertia app under `src/apps` and an installed @dokebi/template-inertia without the dev file policy, so `dokebi dev` serves every project file such as `dokebi.yaml?raw`; an error when `options.dokebi-template-inertia.devHosts` is set, a warning otherwise; the hint says to upgrade the package and change secrets that were reachable), `MISSING_REQUIRED_PLUGIN`, `STALE_REQUIREMENTS`, `PLUGIN_CHECK` (details `code`, `optionPath`, and the plugin's `hint`), `GUIDE_BLOCK_MODIFIED` (warning: the installed list in AGENTS.md was edited between its markers by hand, D-0072), `GUIDE_PROJECT_BLOCK_INVALID` (warning: the `dokebi:project` markers of AGENTS.md cannot be read, D-0077), `PROJECT_LOCKED`, `RECOVERY_REQUIRED`, `UNSAFE_PATH`, `INVALID_LOGGING_CONFIG` (error: a level value of `options.logging`, or `options.logging` that is not an object), `LOGGING_PLUGIN_UNKNOWN` (warning: a level for a plugin that is not installed), `LOGGING_OPTIONS_UNUSED` (warning, D-0151: keys other than `level` and `plugins` in `options.logging` without the logger plugin; core warns the same at startup; with @dokebi/logger installed its options schema checks them as `INVALID_PLUGIN_OPTIONS`).
242
242
 
243
243
  ### Logs (D-0047)
244
244
 
package/catalog.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Generated by scripts/catalog/build.ts from package.json dokebiCatalog fields and packages/cli/catalog-src (D-0065). Do not edit; run node scripts/catalog/build.ts.",
3
3
  "schemaVersion": 1,
4
- "cli": "0.4.41",
4
+ "cli": "0.4.43",
5
5
  "core": {
6
6
  "package": "@dokebi/core",
7
7
  "version": "0.4.7"
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "content.rich-text": {
59
59
  "summary": "rich text documents from an editor checked whole and written as safe HTML, text and excerpts",
60
- "en": "rich text editor tiptap prosemirror wysiwyg html sanitize body post content"
60
+ "en": "rich text editor tiptap prosemirror wysiwyg html sanitize body post content table color highlight align notice"
61
61
  },
62
62
  "core.runtime": {
63
63
  "summary": "application lifecycle, plugin registration, logger and shared libraries",
@@ -91,6 +91,10 @@
91
91
  "summary": "MySQL connection (mysql2 driver)",
92
92
  "en": "mysql mysql2 sql database"
93
93
  },
94
+ "db.partitions": {
95
+ "summary": "month partitions of PostgreSQL tables kept while the app runs (months created ahead, rows in the default partition reported, old months detached and dropped, uuid v7 id ranges, which partitions a lookup reads)",
96
+ "en": "partition partitioning postgres postgresql monthly range uuid uuidv7 retention detach drop ledger large table archive"
97
+ },
94
98
  "db.postgres": {
95
99
  "summary": "PostgreSQL connection (pg driver)",
96
100
  "en": "postgres postgresql pg sql database"
@@ -265,7 +269,7 @@
265
269
  },
266
270
  "reports.rollups": {
267
271
  "summary": "report roll-ups (facts folded into hour, day and month rows per time zone, read with an as-of time and a report budget)",
268
- "en": "reports statistics stats rollups aggregates dashboard hourly daily monthly totals timezone"
272
+ "en": "reports statistics stats rollups aggregates dashboard hourly daily monthly totals timezone ranking top leaderboard distinct unique active members dau mau"
269
273
  },
270
274
  "rss": {
271
275
  "summary": "RSS and Atom feeds",
@@ -442,7 +446,7 @@
442
446
  {
443
447
  "id": "dokebi-app",
444
448
  "package": "@dokebi/app",
445
- "version": "0.4.7",
449
+ "version": "0.4.9",
446
450
  "kind": "plugin",
447
451
  "summary": "Several apps chosen by request domain (src/apps/<app>) with a template each; installs web, controller and template-ejs with it",
448
452
  "description": "Multiple apps per project for Dokebi: pick the app and template by request domain, with EJS and Inertia skeletons.",
@@ -517,7 +521,7 @@
517
521
  {
518
522
  "id": "dokebi-audit",
519
523
  "package": "@dokebi/audit",
520
- "version": "0.1.1",
524
+ "version": "0.2.0",
521
525
  "kind": "plugin",
522
526
  "summary": "Audit and activity logs in your database: written in the change's transaction, a declared code tree, the actor from auth or an OAuth grant (AI clients by name), masking before the write, indexed keyset lists, retention",
523
527
  "description": "Audit and activity logs for Dokebi: rows written in the change's transaction, a declared code tree, the actor from auth or an OAuth grant, masking before the write, indexed keyset lists and retention.",
@@ -564,7 +568,8 @@
564
568
  "list",
565
569
  "maxChangesBytes",
566
570
  "pool",
567
- "prune"
571
+ "prune",
572
+ "scopes"
568
573
  ],
569
574
  "docs": {
570
575
  "ai": "AI.md",
@@ -815,7 +820,7 @@
815
820
  {
816
821
  "id": null,
817
822
  "package": "@dokebi/cli",
818
- "version": "0.4.41",
823
+ "version": "0.4.43",
819
824
  "kind": "cli",
820
825
  "summary": "Commands to create a project, browse the plugin catalog, run recipes, install plugins and verify (dokebi)",
821
826
  "description": "Project scaffolding, plugin catalog, recipes, install and verification CLI for Dokebi.",
@@ -2133,7 +2138,7 @@
2133
2138
  {
2134
2139
  "id": "dokebi-module",
2135
2140
  "package": "@dokebi/module",
2136
- "version": "0.4.4",
2141
+ "version": "0.4.6",
2137
2142
  "kind": "plugin",
2138
2143
  "summary": "Modules that hold one feature each (src/shared/modules/<module>); an app attaches them under a prefix",
2139
2144
  "description": "Feature modules for Dokebi apps: controllers, models, views and routes in one folder mounted under a prefix.",
@@ -2313,7 +2318,7 @@
2313
2318
  {
2314
2319
  "id": "dokebi-outbox",
2315
2320
  "package": "@dokebi/outbox",
2316
- "version": "0.1.1",
2321
+ "version": "0.1.2",
2317
2322
  "kind": "plugin",
2318
2323
  "summary": "Durable background work in your database: enqueue in the business transaction, fair batch claims across owners, leases, backoff, per-destination breakers that wait out outages, dead items with bulk resend, retention, arrival and drain numbers",
2319
2324
  "description": "Durable database-backed background work for Dokebi: enqueue in the business transaction, fair batch claims across owners, leases, retries with backoff, per-destination breakers, dead items with bulk resend, retention and arrival/drain numbers.",
@@ -2380,6 +2385,61 @@
2380
2385
  },
2381
2386
  "install": "npx dokebi add @dokebi/outbox"
2382
2387
  },
2388
+ {
2389
+ "id": "dokebi-partitions",
2390
+ "package": "@dokebi/partitions",
2391
+ "version": "0.1.0",
2392
+ "kind": "plugin",
2393
+ "summary": "Month partitions of PostgreSQL tables kept in the background: the coming months created ahead, rows that fell into the default partition reported, months past their retention detached and dropped some days later; the uuid v7 id range of a period and a check that a lookup reads one partition",
2394
+ "description": "Month partitions of PostgreSQL tables for Dokebi: partitions created ahead in the background, rows in the default partition reported, old partitions detached and dropped later, uuid v7 id ranges of a period, a check that a lookup reads one partition.",
2395
+ "keywords": [
2396
+ "dokebi",
2397
+ "dokebi-plugin",
2398
+ "partition",
2399
+ "postgresql",
2400
+ "uuidv7",
2401
+ "retention"
2402
+ ],
2403
+ "maturity": "experimental",
2404
+ "core": "^0.4.2",
2405
+ "provides": [
2406
+ "db.partitions"
2407
+ ],
2408
+ "variants": [],
2409
+ "doesNot": [
2410
+ "PostgreSQL only (12 or later); no MySQL, MariaDB or MongoDB",
2411
+ "Months only, by a uuid v7 column or a time column; no day, week, list or hash partitions",
2412
+ "Does not create the partitioned table or its default partition (your migration does) and never moves rows out of the default partition",
2413
+ "Does not archive a partition before it drops it"
2414
+ ],
2415
+ "recipes": [],
2416
+ "requires": [
2417
+ {
2418
+ "id": "dokebi-db",
2419
+ "range": "^0.4.1",
2420
+ "package": "@dokebi/db",
2421
+ "automatic": true
2422
+ }
2423
+ ],
2424
+ "optional": [
2425
+ {
2426
+ "id": "dokebi-health",
2427
+ "range": "^0.4.0"
2428
+ }
2429
+ ],
2430
+ "optionKeys": [
2431
+ "connection",
2432
+ "health",
2433
+ "intervalMs",
2434
+ "lockTimeoutMs",
2435
+ "runAtStart"
2436
+ ],
2437
+ "docs": {
2438
+ "ai": "AI.md",
2439
+ "readme": "README.md"
2440
+ },
2441
+ "install": "npx dokebi add @dokebi/partitions"
2442
+ },
2383
2443
  {
2384
2444
  "id": "dokebi-payment",
2385
2445
  "package": "@dokebi/payment",
@@ -2765,10 +2825,10 @@
2765
2825
  {
2766
2826
  "id": null,
2767
2827
  "package": "@dokebi/rich-text",
2768
- "version": "0.1.5",
2828
+ "version": "0.2.0",
2769
2829
  "kind": "library",
2770
- "summary": "Editor documents (Tiptap or ProseMirror JSON) checked whole against a declared schema of nodes, marks, links and image sources, with coded 422 errors, then safe HTML, plain text and excerpts",
2771
- "description": "Rich text documents for Dokebi: editor JSON (Tiptap, ProseMirror) checked whole against a declared schema with coded 422 errors, then safe HTML, plain text and excerpts.",
2830
+ "summary": "Editor documents (Tiptap or ProseMirror JSON) checked whole against a declared schema of nodes, marks, links, image sources, tables, colours and alignment, with coded 422 errors, then safe HTML, plain text and excerpts; editorConfig gives Tiptap its settings from the same schema",
2831
+ "description": "Rich text documents for Dokebi: editor JSON (Tiptap, ProseMirror) checked whole against a declared schema with coded 422 errors, then safe HTML, plain text and excerpts; tables, colours and alignment; the editor settings from the same schema.",
2772
2832
  "keywords": [
2773
2833
  "dokebi",
2774
2834
  "rich-text",
@@ -2801,7 +2861,7 @@
2801
2861
  {
2802
2862
  "id": "dokebi-rollups",
2803
2863
  "package": "@dokebi/rollups",
2804
- "version": "0.1.3",
2864
+ "version": "0.2.0",
2805
2865
  "kind": "plugin",
2806
2866
  "summary": "Report roll-ups by @dokebi/db AI.md 6.9: facts recorded as small rows in the caller's transaction (no hot row), folded in parallel by outbox lanes into UTC hour rows and day and month rows per whole-hour time zone (rebuilt from the hours when a zone is added), bounded reads with an as-of time, running totals and a report budget (429, 503)",
2807
2867
  "description": "Report roll-ups for Dokebi by @dokebi/db AI.md 6.9: facts recorded as small rows in the caller's transaction, folded by outbox lanes into UTC hour rows and day and month rows per time zone, bounded reads with an as-of time and a report budget.",
@@ -2843,6 +2903,7 @@
2843
2903
  "optional": [],
2844
2904
  "optionKeys": [
2845
2905
  "connection",
2906
+ "distinct",
2846
2907
  "fold",
2847
2908
  "rebuild",
2848
2909
  "record",
@@ -2896,7 +2957,7 @@
2896
2957
  {
2897
2958
  "id": "dokebi-runtime-settings",
2898
2959
  "package": "@dokebi/runtime-settings",
2899
- "version": "0.1.3",
2960
+ "version": "0.2.0",
2900
2961
  "kind": "plugin",
2901
2962
  "summary": "Settings operators change while the app runs: definitions in code (a group tree, text, number, numbers per choice, boolean, select, multiselect, json and file with rules, choices from your data), common and personal values saved in your database in the caller's transaction (the changes answered for the audit log), common values read from memory, every worker refreshed by a revision",
2902
2963
  "description": "Settings operators change while the app runs, for Dokebi: definitions in code (a group tree, nine types with rules, choices from your data), common and personal values in your database saved in the caller's transaction, common values read from memory, every worker refreshed by a revision.",
@@ -3384,7 +3445,7 @@
3384
3445
  {
3385
3446
  "id": "dokebi-template-inertia",
3386
3447
  "package": "@dokebi/template-inertia",
3387
- "version": "0.4.7",
3448
+ "version": "0.4.8",
3388
3449
  "kind": "plugin",
3389
3450
  "summary": "Inertia (v3) server adapter: Vue 3 views, Vite build files and optional server-side rendering (SSR)",
3390
3451
  "description": "Inertia v3 server adapter for Dokebi: page JSON, Vite manifest assets and optional server-side rendering.",
@@ -205,7 +205,11 @@ browser = []) {
205
205
  noEmit: true,
206
206
  },
207
207
  files: [...virtual.keys()],
208
- include: [],
208
+ // The project's declaration files (src/infra/inertia/page.d.ts: the shared page props and
209
+ // the module pages of D-0218), as tsconfig.vue.json includes them for vue-tsc. The server
210
+ // tsconfig may exclude them (they type the browser), so its exclude is not inherited.
211
+ include: tsconfig === null ? [] : ['**/*.d.ts'],
212
+ exclude: ['**/node_modules/**', '**/dist/**', '**/.tmp/**', '**/.dokebi/**'],
209
213
  }));
210
214
  }
211
215
  let api;
package/dist/output.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const CLI_VERSION = "0.4.41";
1
+ export declare const CLI_VERSION = "0.4.43";
2
2
  export declare function envelope(command: string, result: unknown, ok?: boolean): object;
3
3
  export declare function failure(command: string, error: unknown, mutationStarted: boolean): object;
package/dist/output.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CliError } from './errors.js';
2
- export const CLI_VERSION = '0.4.41';
2
+ export const CLI_VERSION = '0.4.43';
3
3
  export function envelope(command, result, ok = true) {
4
4
  return { schemaVersion: 1, cliVersion: CLI_VERSION, command, ok, result, error: null };
5
5
  }
@@ -263,6 +263,8 @@ export async function templateFixes(root, base, sources) {
263
263
  hint: `${hints.join('. ')} (the file is yours: the CLI never rewrites it)`,
264
264
  });
265
265
  }
266
+ if (sources.inertia)
267
+ found.push(...(await modulePageFixes(root)));
266
268
  // R4CB-1: the generated src/main.ts read DOKEBI_CONFIG with `??`, so an empty value was taken
267
269
  // for a path (the working folder) and the app failed to start, while every CLI command reads
268
270
  // dokebi.yaml then (D-0154 D4). Not a plugin's template: doctor names it, upgrade does not.
@@ -283,3 +285,113 @@ export async function templateFixes(root, base, sources) {
283
285
  const MAIN_FILE = 'src/main.ts';
284
286
  /** `process.env.DOKEBI_CONFIG ??` in code (comments and strings masked). */
285
287
  const EMPTY_CONFIG_ENV = /\bprocess\.env\.DOKEBI_CONFIG\s*\?\?/;
288
+ /** The specifier of the module pages (D-0218), as an import of views/app.js or views/ssr.js. */
289
+ const MODULE_PAGES_IMPORT = /\bfrom\s+['"]virtual:dokebi\/module-pages['"]/;
290
+ /** A Vue page in a module's views folder: `<…>/views/<template>/Pages/…/*.vue`. */
291
+ const MODULE_PAGE = /(?:^|\/)views\/[^/]+\/Pages\/.+\.vue$/;
292
+ /** Whether some module under src/ (outside src/apps) has a Vue page in its views folder. */
293
+ async function hasModulePages(root) {
294
+ let seen = 0;
295
+ const walk = async (folder, depth) => {
296
+ if (depth > 10 || seen >= MAX_SCANNED_FILES)
297
+ return undefined;
298
+ let entries;
299
+ try {
300
+ entries = await readdir(await securePath(root, folder), { withFileTypes: true });
301
+ }
302
+ catch (error) {
303
+ if (isMissing(error))
304
+ return undefined;
305
+ throw new CliError('READ_FAILED', `Cannot read ${folder}`, { cause: error });
306
+ }
307
+ for (const entry of entries) {
308
+ if (entry.name.startsWith('.') || entry.name === 'node_modules')
309
+ continue;
310
+ const path = `${folder}/${entry.name}`;
311
+ if (entry.isDirectory()) {
312
+ if (path === 'src/apps')
313
+ continue;
314
+ const found = await walk(path, depth + 1);
315
+ if (found)
316
+ return found;
317
+ }
318
+ else if (entry.isFile()) {
319
+ seen++;
320
+ if (MODULE_PAGE.test(path))
321
+ return path;
322
+ }
323
+ }
324
+ return undefined;
325
+ };
326
+ return walk('src', 0);
327
+ }
328
+ /**
329
+ * D-0218: views/app.js and views/ssr.js of the Inertia apps written before module pages (they
330
+ * cannot show a page a module keeps in its own folder), and a Vite config without dokebiInertia()
331
+ * while an entry imports the module pages (the build cannot resolve the import).
332
+ */
333
+ async function modulePageFixes(root) {
334
+ const found = [];
335
+ let apps;
336
+ try {
337
+ apps = await readdir(await securePath(root, 'src/apps'), { withFileTypes: true });
338
+ }
339
+ catch (error) {
340
+ if (isMissing(error))
341
+ return found;
342
+ throw new CliError('READ_FAILED', 'Cannot read src/apps', { cause: error });
343
+ }
344
+ const entries = [];
345
+ for (const app of apps
346
+ .filter((entry) => entry.isDirectory())
347
+ .sort((a, b) => a.name.localeCompare(b.name)))
348
+ for (const kind of ['app', 'ssr']) {
349
+ const path = `src/apps/${app.name}/views/${kind}.js`;
350
+ const text = await readOptional(() => securePath(root, path), path);
351
+ if (text === undefined)
352
+ continue;
353
+ entries.push({ path, kind, imports: MODULE_PAGES_IMPORT.test(withoutComments(text)) });
354
+ }
355
+ if (!entries.length)
356
+ return found;
357
+ const page = entries.some((entry) => !entry.imports) ? await hasModulePages(root) : undefined;
358
+ for (const entry of entries) {
359
+ if (entry.imports || !page)
360
+ continue;
361
+ debug('Inertia entry without module pages', { path: entry.path, page });
362
+ found.push({
363
+ code: 'TEMPLATE_FIX_MISSING',
364
+ severity: 'warning',
365
+ path: entry.path,
366
+ plugin: 'dokebi-template-inertia',
367
+ details: { missing: ['module-pages'], page },
368
+ hint: `${entry.path} looks pages up in its app folder only, while ${page} is a Vue page a module keeps in its own views folder (D-0218): a module page of this app answers "Unknown page". Import modulePages from 'virtual:dokebi/module-pages' and resolve a name the app has no file for with modulePages.page(template, name), as templates/app-inertia/views/${entry.kind}.js of @dokebi/app does, and add /// <reference types="@dokebi/template-inertia/module-pages" /> to src/infra/inertia/page.d.ts for its types (the files are yours: the CLI never rewrites them)`,
369
+ });
370
+ }
371
+ for (const [kind, base] of [
372
+ ['app', 'vite.config'],
373
+ ['ssr', 'vite.ssr.config'],
374
+ ]) {
375
+ if (!entries.some((entry) => entry.kind === kind && entry.imports))
376
+ continue;
377
+ for (const extension of VITE_EXTENSIONS) {
378
+ const path = `${base}.${extension}`;
379
+ const text = await readOptional(() => securePath(root, path), path);
380
+ if (text === undefined)
381
+ continue;
382
+ if (!/\bdokebiInertia\s*\(/.test(maskCode(text))) {
383
+ debug('Vite config without dokebiInertia() for module pages', { path });
384
+ found.push({
385
+ code: 'TEMPLATE_FIX_MISSING',
386
+ severity: 'warning',
387
+ path,
388
+ plugin: 'dokebi-template-inertia',
389
+ details: { missing: ['module-pages-plugin'] },
390
+ hint: `views/${kind}.js imports 'virtual:dokebi/module-pages', which dokebiInertia() of @dokebi/template-inertia/vite writes, and ${path} does not use it: the build cannot resolve the import. Add dokebiInertia() to the plugins of ${path} (the file is yours: the CLI never rewrites it)`,
391
+ });
392
+ }
393
+ break;
394
+ }
395
+ }
396
+ return found;
397
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dokebi/cli",
3
- "version": "0.4.41",
3
+ "version": "0.4.43",
4
4
  "description": "Project scaffolding, plugin catalog, recipes, install and verification CLI for Dokebi.",
5
5
  "keywords": [
6
6
  "dokebi",