@dokebi/cli 0.4.61 → 0.4.63
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/catalog.json +10 -8
- package/dist/capability-guide.js +1 -1
- package/dist/output.d.ts +1 -1
- package/dist/output.js +1 -1
- package/dist/project.js +3 -1
- package/package.json +1 -1
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.
|
|
4
|
+
"cli": "0.4.63",
|
|
5
5
|
"core": {
|
|
6
6
|
"package": "@dokebi/core",
|
|
7
7
|
"version": "0.4.8"
|
|
@@ -694,7 +694,7 @@
|
|
|
694
694
|
{
|
|
695
695
|
"id": "dokebi-bulk-send",
|
|
696
696
|
"package": "@dokebi/bulk-send",
|
|
697
|
-
"version": "0.1.
|
|
697
|
+
"version": "0.1.4",
|
|
698
698
|
"kind": "plugin",
|
|
699
699
|
"summary": "Bulk sends over @dokebi/outbox: a send row, recipient rows per person and channel fixed when it goes (excluded and failed with reasons), channels and audiences your app registers (mail through @dokebi/mail, an inbox of your own), scheduling and cancel, progress per channel, stop, and failed deliveries sent again",
|
|
700
700
|
"description": "Bulk sends for Dokebi over @dokebi/outbox: recipient rows fixed when a send goes, channels and audiences your app registers, scheduling and cancel, progress per channel, stop, and failures sent again.",
|
|
@@ -741,6 +741,7 @@
|
|
|
741
741
|
"deliverConcurrency",
|
|
742
742
|
"maxContentBytes",
|
|
743
743
|
"maxPage",
|
|
744
|
+
"maxPurgeRows",
|
|
744
745
|
"maxScheduleDays",
|
|
745
746
|
"maxTargetBytes",
|
|
746
747
|
"prepareBatch"
|
|
@@ -829,7 +830,7 @@
|
|
|
829
830
|
{
|
|
830
831
|
"id": null,
|
|
831
832
|
"package": "@dokebi/cli",
|
|
832
|
-
"version": "0.4.
|
|
833
|
+
"version": "0.4.63",
|
|
833
834
|
"kind": "cli",
|
|
834
835
|
"summary": "Commands to create a project, browse the plugin catalog, run recipes, install plugins and verify (dokebi)",
|
|
835
836
|
"description": "Project scaffolding, plugin catalog, recipes, install and verification CLI for Dokebi.",
|
|
@@ -2452,7 +2453,7 @@
|
|
|
2452
2453
|
{
|
|
2453
2454
|
"id": "dokebi-payment",
|
|
2454
2455
|
"package": "@dokebi/payment",
|
|
2455
|
-
"version": "0.2.
|
|
2456
|
+
"version": "0.2.3",
|
|
2456
2457
|
"kind": "plugin",
|
|
2457
2458
|
"summary": "On-chain USDT (TRC20) custody: a fixed deposit address per owner from an account xpub, deposits confirmed into the app's ledger in one transaction, withdrawals from a hot wallet with energy and retries, sweeps, daily reconciliation, alerts and a kill switch; keys in encrypted files, never on a command line",
|
|
2458
2459
|
"description": "On-chain USDT (TRC20) custody for Dokebi: deposit addresses derived from an account xpub, deposits watched and confirmed into the app's ledger in one transaction, withdrawals sent from the hot wallet, sweeps, daily reconciliation, alerts and a kill switch, over @dokebi/db and @dokebi/outbox.",
|
|
@@ -2870,7 +2871,7 @@
|
|
|
2870
2871
|
{
|
|
2871
2872
|
"id": "dokebi-rollups",
|
|
2872
2873
|
"package": "@dokebi/rollups",
|
|
2873
|
-
"version": "0.2.
|
|
2874
|
+
"version": "0.2.2",
|
|
2874
2875
|
"kind": "plugin",
|
|
2875
2876
|
"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)",
|
|
2876
2877
|
"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.",
|
|
@@ -3455,7 +3456,7 @@
|
|
|
3455
3456
|
{
|
|
3456
3457
|
"id": "dokebi-template-inertia",
|
|
3457
3458
|
"package": "@dokebi/template-inertia",
|
|
3458
|
-
"version": "0.4.
|
|
3459
|
+
"version": "0.4.11",
|
|
3459
3460
|
"kind": "plugin",
|
|
3460
3461
|
"summary": "Inertia (v3) server adapter: Vue 3 views, Vite build files and optional server-side rendering (SSR)",
|
|
3461
3462
|
"description": "Inertia v3 server adapter for Dokebi: page JSON, Vite manifest assets and optional server-side rendering.",
|
|
@@ -3755,7 +3756,7 @@
|
|
|
3755
3756
|
{
|
|
3756
3757
|
"id": "dokebi-websocket",
|
|
3757
3758
|
"package": "@dokebi/websocket",
|
|
3758
|
-
"version": "0.4.
|
|
3759
|
+
"version": "0.4.8",
|
|
3759
3760
|
"kind": "plugin",
|
|
3760
3761
|
"summary": "WebSocket routes, rooms and broadcast on top of dokebi-web (at most once)",
|
|
3761
3762
|
"description": "WebSocket routes on @dokebi/web with rooms and broadcast across servers through @dokebi/websocket-hub.",
|
|
@@ -3803,6 +3804,7 @@
|
|
|
3803
3804
|
"maxConnections",
|
|
3804
3805
|
"maxPayloadBytes",
|
|
3805
3806
|
"maxPending",
|
|
3807
|
+
"maxRoutePayloadBytes",
|
|
3806
3808
|
"sealDriftMs",
|
|
3807
3809
|
"shutdownTimeoutMs"
|
|
3808
3810
|
],
|
|
@@ -3815,7 +3817,7 @@
|
|
|
3815
3817
|
{
|
|
3816
3818
|
"id": null,
|
|
3817
3819
|
"package": "@dokebi/websocket-client",
|
|
3818
|
-
"version": "0.1.
|
|
3820
|
+
"version": "0.1.1",
|
|
3819
3821
|
"kind": "library",
|
|
3820
3822
|
"summary": "The client side of a Dokebi WebSocket on its own: heartbeat pings that ask for a pong and report a server gone silent with its TCP connection open, and the control frames; no dependencies, for Node agents and browsers",
|
|
3821
3823
|
"description": "The client side of a Dokebi WebSocket on its own: a heartbeat that hears a server gone silent with its TCP connection open (ping-v1 asking for pong-v1), and the control frames. No dependencies; Node's WebSocket, ws or a browser's.",
|
package/dist/capability-guide.js
CHANGED
|
@@ -31,7 +31,7 @@ export const INTEGRATION_RULES = [
|
|
|
31
31
|
"- Required browser transport (consumer convention; the core plugin remains optional): install @dokebi/seal in every browser-facing web app whose pages send data, and configure and verify seal-enabled domains. Which hosts: Seal a host whose pages send data (forms, sealedFetch, Inertia visits). A host that only shows public pages (no writes, no signed-in JSON) gains nothing from seal: leave its domain without `seal: true`. Its pages then need no seal files and no 'wasm-unsafe-eval', and may use Inertia SSR. If you do seal such a host, its read-only pages load only the two small modules (about 19 KB), never the wasm. Inertia + Vue is the default view unless the user chose another. Inertia: navigation/forms retain the official sealInertia(http) integration before createInertiaApp (the generated views/app.js imports @dokebi/seal/http when the first page is sealed, then the data-page and every visit, form post and validation error go sealed; a plain JSON body gets 415 SEAL_REQUIRED). The generated vite.config.ts has dokebiInertia() from @dokebi/template-inertia/vite: every import of @dokebi/seal/http in the app's browser code loads the module the app serves (/dokebi/seal/http.mjs), in the build and in dokebi dev, so Vue pages write a plain static import { sealedFetch } from '@dokebi/seal/http' and share the bootstrap's seal; keep that plugin in a vite config of your own (app add warns VITE_PLUGIN_MISSING without it). The plugin also limits what dokebi dev serves to the browser (D-0129): the views folders, node_modules and the files they import; dokebi.yaml, .env, keys and the server code answer 403. Never add server.fs to vite.config (strict: false, a deny list, allow: ['.']) to make a file load: put browser code under views/ or, when several apps or modules share it, in src/shared/browser/ (a page imports it, so it is served); dokebiInertia({ allow }) is only for files the browser loads by URL without an import (dokebi check warns vite-dev-files). EJS: write <%- data.seal?.head ?? '' %> in the shared layout <head> (the template-ejs layout has it), and in the <head> of every page rendered without that layout (it is empty on a domain without seal); when a layout has its own import map, the seal head comes first, before that map and every module script. It loads the browser module @dokebi/seal/forms (served as /dokebi/seal/forms.mjs), which seals every same-origin <form method=\"post\"> with no per-form code and sends it with the request header x-dokebi-form: 1, so the form keeps its <%- data.csrf.field %> and the handlers, validation and 303/422 form flow stay those of a plain HTML form. Sealed forms are form bodies: set dokebi-web.formBody: true (without it they get 415 FORM_BODY_DISABLED). A form with a chosen file goes as multipart (file bytes are not sealed) and the forms module moves its _csrf field into the x-csrf-token header itself; write no upload-specific CSRF code. To submit from a script call form.requestSubmit() or submitSealedForm(form) from @dokebi/seal/forms, never form.submit(): it fires no submit event and goes out plain (415). Page navigation (GET) stays plain HTML. Mark a form data-seal=\"off\" only for a deliberate exception, never to make a plain form post pass: a sealed domain refuses that unsealed post (415 SEAL_REQUIRED). Never turn sealing off, set seal: false on a form route or drop the layout head to make a plain form work. Both views: use sealedFetch from @dokebi/seal/http for all application-owned HTTP requests, including REST/JSON and multipart uploads. Do not call raw fetch, Axios or Inertia http.getClient().request from application API adapters. Import bootstrap and request helpers from the same module instance, the served /dokebi/seal/http.mjs: EJS pages reach it through the import map of the seal head, Inertia apps through dokebiInertia(), so both import @dokebi/seal/http by name; never load /dokebi/seal/http.mjs by URL next to a bundled copy of @dokebi/seal/http. Preserve generated template selection and hydration contracts. Server rendering on a seal host covers public pages only (D-0195): a route that renders with { public: true } gets a plain, server-rendered first HTML without the visitor's props (auth, csrf and the entry's shared arrive right after through a sealed visit), and every other page of that host stays sealed and is not server rendered. dokebi app add --inertia --ssr --seal makes such an app; mark the routes whose first HTML crawlers must read with { public: true } and head (title, description, canonical, alternates), put only public data in their props, keep values the same for every visitor in publicShared of src/infra/inertia/shared.ts, and draw the layout before the visitor's props arrive. The recipes leave SSR hosts unsealed and say so: ask the user whether those hosts send data, and if they do, seal them and mark their public pages (a read-only public host may stay unsealed with SSR). File multipart bytes and GET queries are outside sealing; verify sealed JSON responses and errors too. sealedFetch does not add CSRF headers automatically: follow the installed @dokebi/csrf guide in one shared adapter, read the current token for each request, keep credentials same-origin, and never disable CSRF to make uploads pass.",
|
|
32
32
|
`- Recipe answers (D-0095): a request often settles some choices (for example PostgreSQL, Docker, EJS) and leaves others open. Choices the request leaves open are still the user's: ask and end your turn, unless the user said to decide them. ${ANSWER_SOURCES} The recipe records who made each choice (answeredBy user, ai, default) and verify's tellUser tells the user; never present a choice you made as the user's answer.`,
|
|
33
33
|
`- Browser apps and the view (D-0098): ${BROWSER_APPS} Outside a recipe, npx dokebi app add records the view with --answers-from user or --ai-chose view --ai-reason view=<why>; an EJS app added without either (also the first app of add @dokebi/app) is reported to the user as not the default view with its chooser unrecorded. Validate the journeys of the screens in the actual UI (Product planning).`,
|
|
34
|
-
'- Processes and shared tools: stop a process by the PID you recorded or with npx dokebi stop, never by a pattern (pkill -f, killall): other apps on the machine run the same command lines (src/main.ts, the cluster worker). Check screens in a browser you start yourself with its own temporary profile (a headless or separate Playwright browser), never in the browser the person is using, through an extension or a computer-use tool: its tabs, cookies and signed-in sessions belong to them. Close only the tabs and contexts you opened; never navigate, reuse or close tabs you did not open. Keep downloaded browsers and package caches outside the project folder.',
|
|
34
|
+
'- Processes and shared tools: stop a process by the PID you recorded or with npx dokebi stop, never by a pattern (pkill -f, killall): other apps on the machine run the same command lines (src/main.ts, the cluster worker). Check screens in a browser you start yourself with its own temporary profile (a headless or separate Playwright browser), never in the browser the person is using, through an extension or a computer-use tool: its tabs, cookies and signed-in sessions belong to them. Close only the tabs and contexts you opened; never navigate, reuse or close tabs you did not open. Keep downloaded browsers and package caches outside the project folder. Scratch scripts, logs and outputs go in the project .tmp/ folder, which a project made by dokebi init lists in .gitignore (/.tmp/; add the line to an older project): build-time scanners such as the Tailwind v4 Vite plugin read every file that is not git-ignored, so a file written anywhere else in the project reloads every open page under npx dokebi dev.',
|
|
35
35
|
'- Self-contained tests: tests start their own app and data (a test configuration, a free port, their own accounts and database or schema) and never point at the running app, its port, its accounts or its database, so running them in any copy never writes to a live app. The same holds for fakes of outside services (a mock webhook receiver, a mail catcher, a stub API): the test starts each on a free port it asks the system for at run time (listen on port 0), never a fixed port from the config that a dev copy may already hold, and stops it when it ends, so the suite passes in a fresh copy and next to a running dev setup. A test that ends database connections on purpose (a lost connection, a killed session) ends only the ones it opened, found by its own application_name or backend id, never every idle or idle-in-transaction session of the server: the app under test has its own connections there (a background loop), and killing them makes the suite fail now and then. A test that starts containers gives them a Docker project name of its own, unique per run (for example the app name plus the process id), never the project name of the dev stack (dokebi.yaml, compose.yaml or COMPOSE_PROJECT_NAME), and removes them when it ends: two runs side by side, or a run next to the dev stack, must not reuse, restart or remove the containers of the other. Tests also never read the app database or port from dokebi.yaml: a test configuration of their own. Before reporting done, stop every helper you started by hand and run the suite again: a test that passes only while a helper of yours runs is a failing test.',
|
|
36
36
|
'- Job queues in tests (D-0139): a test that runs real @dokebi/job jobs creates its own queue with createTestQueue({ connection, after }) from @dokebi/job/testing (after from node:test, or (fn) => t.after(fn)) and puts queue.options under options.dokebi-job.queues of its test application; the helper gives the streams and the consumer unique names and removes them when the test ends, so a shared or measurement NATS server never keeps streams a test made. Never provision fixed stream names in tests and never leave a test stream for later. Remove leftovers of an older run with npx dokebi-job-provision --queue <name> --delete --prefix <namespace> (first with --dry-run): it removes only a queue declared in that dokebi.yaml whose names start with the prefix and that the server holds exactly as declared.',
|
|
37
37
|
'- Background work (D-0141): deliveries (webhooks, mail, notifications), exports, imports, copies, grace periods and cleanups are work items of @dokebi/outbox, not loops you write. Enqueue with outbox.enqueue(tx, { type, owner, destination, payload, dedupeKey, notBefore }) inside the business transaction and register outbox.handle(type, handler, { onDone }) in the setup of the module that owns the work; its runner claims fair batches across owners through one due-time index, retries with backoff, waits out a destination that is down (a breaker per destination, dead only after a horizon of days), keeps dead items for outbox.resend and removes finished rows after a retention. It derives its own small pool of the main connection (pool.max, default 4), so add nothing but run the migration that npx dokebi add @dokebi/outbox writes, keep handlers idempotent with item.key, query in handlers through context.db (the outbox handler pool, never the main pool: an owner whose handlers wait on a locked row then holds at most runner.maxInFlightPerOwner of them while the other owners keep flowing), and put the arrival and drain per second of npx dokebi-outbox stats in the section 6 table of the final report. Never hand-write a claim loop, a retry or dead-letter table or a timer for such work. A destination is one endpoint (one webhook id or URL, one mailbox provider), never a whole host or a shared name such as database: items of one failing endpoint must not pause the others. Database-only cleanup has no destination, and a batch handler records a failing row and skips it rather than failing the whole item. Best-effort signals after a commit (an SSE change notice, a cache invalidation) are not outbox work: send them directly.',
|
package/dist/output.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.4.
|
|
1
|
+
export declare const CLI_VERSION = "0.4.63";
|
|
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
package/dist/project.js
CHANGED
|
@@ -594,7 +594,9 @@ export class Project {
|
|
|
594
594
|
await writeFile(join(staging, '.dokebi/state.json'), json(emptyState(hash(generated))));
|
|
595
595
|
await writeFile(join(staging, '.gitignore'),
|
|
596
596
|
// `*.mmdb`: IP geolocation databases (@dokebi/geoip) are licensed data, never committed.
|
|
597
|
-
|
|
597
|
+
// `/.tmp/`: scratch scripts and outputs; scanners such as Tailwind v4 skip only ignored
|
|
598
|
+
// paths, so a file written there would otherwise reload every open page in dev.
|
|
599
|
+
ignoreConfig('node_modules/\n.dokebi/lock\n.dokebi/transaction-*/\n*.mmdb\n/.tmp/\n'));
|
|
598
600
|
if (deploy) {
|
|
599
601
|
debug('Writing deployment skeleton', { files: Object.keys(DEPLOYMENT_FILES) });
|
|
600
602
|
for (const [file, content] of Object.entries(DEPLOYMENT_FILES))
|