@dokebi/cli 0.4.86 → 0.4.87
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 +7 -7
- package/dist/capability-guide.js +1 -1
- package/dist/output.d.ts +1 -1
- package/dist/output.js +1 -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.87",
|
|
5
5
|
"core": {
|
|
6
6
|
"package": "@dokebi/core",
|
|
7
7
|
"version": "0.4.8"
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
{
|
|
451
451
|
"id": "dokebi-app",
|
|
452
452
|
"package": "@dokebi/app",
|
|
453
|
-
"version": "0.4.
|
|
453
|
+
"version": "0.4.14",
|
|
454
454
|
"kind": "plugin",
|
|
455
455
|
"summary": "Several apps chosen by request domain (src/apps/<app>) with a template each; installs web, controller and template-ejs with it",
|
|
456
456
|
"description": "Multiple apps per project for Dokebi: pick the app and template by request domain, with EJS and Inertia skeletons.",
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
"requires": [
|
|
481
481
|
{
|
|
482
482
|
"id": "dokebi-web",
|
|
483
|
-
"range": "^0.4.
|
|
483
|
+
"range": "^0.4.19",
|
|
484
484
|
"package": "@dokebi/web",
|
|
485
485
|
"automatic": true
|
|
486
486
|
},
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
{
|
|
831
831
|
"id": null,
|
|
832
832
|
"package": "@dokebi/cli",
|
|
833
|
-
"version": "0.4.
|
|
833
|
+
"version": "0.4.87",
|
|
834
834
|
"kind": "cli",
|
|
835
835
|
"summary": "Commands to create a project, browse the plugin catalog, run recipes, install plugins and verify (dokebi)",
|
|
836
836
|
"description": "Project scaffolding, plugin catalog, recipes, install and verification CLI for Dokebi.",
|
|
@@ -3457,7 +3457,7 @@
|
|
|
3457
3457
|
{
|
|
3458
3458
|
"id": "dokebi-template-inertia",
|
|
3459
3459
|
"package": "@dokebi/template-inertia",
|
|
3460
|
-
"version": "0.4.
|
|
3460
|
+
"version": "0.4.12",
|
|
3461
3461
|
"kind": "plugin",
|
|
3462
3462
|
"summary": "Inertia (v3) server adapter: Vue 3 views, Vite build files and optional server-side rendering (SSR)",
|
|
3463
3463
|
"description": "Inertia v3 server adapter for Dokebi: page JSON, Vite manifest assets and optional server-side rendering.",
|
|
@@ -3515,7 +3515,7 @@
|
|
|
3515
3515
|
"requires": [
|
|
3516
3516
|
{
|
|
3517
3517
|
"id": "dokebi-web",
|
|
3518
|
-
"range": "^0.4.
|
|
3518
|
+
"range": "^0.4.19"
|
|
3519
3519
|
}
|
|
3520
3520
|
],
|
|
3521
3521
|
"optional": [
|
|
@@ -3677,7 +3677,7 @@
|
|
|
3677
3677
|
{
|
|
3678
3678
|
"id": "dokebi-web",
|
|
3679
3679
|
"package": "@dokebi/web",
|
|
3680
|
-
"version": "0.4.
|
|
3680
|
+
"version": "0.4.19",
|
|
3681
3681
|
"kind": "plugin",
|
|
3682
3682
|
"summary": "Fastify 5 HTTP server (503 before ready, health paths, drain, zero-downtime cluster replacement, security headers and overload protection on by default)",
|
|
3683
3683
|
"description": "Fastify 5 HTTP server owned by a Dokebi app: 503 before ready, health routes, drain and cluster handover.",
|
package/dist/capability-guide.js
CHANGED
|
@@ -56,7 +56,7 @@ export const INTEGRATION_RULES = [
|
|
|
56
56
|
'- @dokebi/geoip (D-0158): the location of an address comes from geoip.locate(request.ip, { precision }) as { country, region, city? } or null, and every field from geoip.lookup(request.ip) (unknown with reason invalid, private, no_database or not_found); never call an IP geolocation web API, parse .mmdb files yourself or read X-Forwarded-For (request.ip follows the trustProxy rules of dokebi-web). The location is personal data: keep the location at the precision the product needs, never the address. The operator provides the database (MaxMind GeoLite2 by default, or DB-IP Lite) with npx dokebi-geoip download from URLs in DOKEBI_GEOIP_CITY_URL and DOKEBI_GEOIP_ASN_URL, never committed; show the attribution its license requires. Without a database the app starts and locate answers null. Read `node_modules/@dokebi/geoip/AI.md`.',
|
|
57
57
|
'- Browser files of an app (R1): style sheets, images, fonts and browser scripts of an EJS app go in src/apps/<app>/public/ and are linked as /assets/<path>; npx dokebi add @dokebi/static, and @dokebi/app serves that folder on the app hosts (ETag, 304, Range). Never keep them in views/ and never serve them with a route that reads the file yourself (dokebi check warns asset-in-views and asset-route); a font or image a package ships (@dokebi/font-noto-kr) is copied into public/ with its licence file. An Inertia app imports them through Vite.',
|
|
58
58
|
'- Files from a folder (D-0147): an operator folder served as it is (app update feeds such as appcast.xml, latest.json or latest-mac.yml and the installers they name) is a mount of @dokebi/static (npx dokebi add @dokebi/static; dokebi-static mounts.<name>: { prefix, root, cache: [{ match, cacheControl }] }, or static.mount(name, mount) in a setup), not a route you write with fs and createReadStream. It answers GET and HEAD through @fastify/static with ETag, Last-Modified, 304, 412, one Range (206, 416, If-Range), Cache-Control by pattern (immutable for versioned files, no-cache for feeds), never a listing and never a path outside the root, and never the in-progress names of an upload (hide: **.part, **.tmp, **.uploading): upload under such a name, then rename into place. Its route id is static.<name>. Private or per-user files stay in @dokebi/storage behind your own access check (sendStored).',
|
|
59
|
-
'- Security headers and overload protection are built into @dokebi/web and on by default (D-0149, D-0150): every answer gets X-Content-Type-Options: nosniff, HTTPS answers Strict-Transport-Security, HTML pages a Content-Security-Policy (default-src self, frame-ancestors self, inline scripts and styles allowed), X-Frame-Options and Referrer-Policy; while the event loop stalls (dokebi-web overload.maxEventLoopDelayMs, 200 ms) requests get 503 OVERLOADED with Retry-After and health routes are served. Do not add @fastify/helmet, @fastify/under-pressure or headers of your own for this. To load from a CDN or embed a page, change dokebi-web securityHeaders.contentSecurityPolicy.directives in dokebi.yaml (npx dokebi config set) or set config: { securityHeaders: { … } } on that route; give a metrics scrape route config: { overload: false } with // dokebi-check: allow overload-off <reason> on that line (npx dokebi check reports overload-off as an error, and verify fails, without it), and never an API route. The same routes also answer while a required dependency (a database, Redis) is down or the app drains with config: { readiness: false } and // dokebi-check: allow readiness-off <reason> on the line before it; without it they are refused with 503 NOT_READY like every other route. Never turn securityHeaders off to make a page work: read which directive the browser console names and change that one.',
|
|
59
|
+
'- Security headers and overload protection are built into @dokebi/web and on by default (D-0149, D-0150): every answer gets X-Content-Type-Options: nosniff, HTTPS answers Strict-Transport-Security, HTML pages a Content-Security-Policy (default-src self, frame-ancestors self, inline scripts and styles allowed), X-Frame-Options and Referrer-Policy; while the event loop stalls (dokebi-web overload.maxEventLoopDelayMs, 200 ms) requests get 503 OVERLOADED with Retry-After and health routes are served. Do not add @fastify/helmet, @fastify/under-pressure or headers of your own for this. For a strict policy set dokebi-web securityHeaders.contentSecurityPolicy.nonce: true (a nonce per page and no unsafe-inline; the framework pages carry it, an EJS page puts data.cspNonce in the nonce attribute of its own scripts, other page code takes web.cspNonce(request)). To load from a CDN or embed a page, change dokebi-web securityHeaders.contentSecurityPolicy.directives in dokebi.yaml (npx dokebi config set) or set config: { securityHeaders: { … } } on that route; give a metrics scrape route config: { overload: false } with // dokebi-check: allow overload-off <reason> on that line (npx dokebi check reports overload-off as an error, and verify fails, without it), and never an API route. The same routes also answer while a required dependency (a database, Redis) is down or the app drains with config: { readiness: false } and // dokebi-check: allow readiness-off <reason> on the line before it; without it they are refused with 503 NOT_READY like every other route. Never turn securityHeaders off to make a page work: read which directive the browser console names and change that one.',
|
|
60
60
|
'- CORS (D-0148): only when the user asks that pages on other origins call this server, install @dokebi/cors (npx dokebi add @dokebi/cors) and list the origins in dokebi-cors origins (or apps.<app>.origins per app); never * with credentials, and never register @fastify/cors yourself. Same-origin pages, server to server calls and mobile apps need no CORS. A cross-origin POST with cookies still passes dokebi-csrf: add the origin to dokebi-csrf trustedOrigins and send the token, or use Bearer tokens; SSE streams list their own origins.',
|
|
61
61
|
'- Behind a tunnel or reverse proxy (Cloudflare Tunnel, ngrok, nginx): set dokebi-web.trustProxy to the proxy address as the app sees it, [127.0.0.1, ::1] for a tunnel on this machine (the tunnel may keep its HTTP Host Header localhost), and list the public host in dokebi-app.domains (in development also dokebi-template-inertia.devHosts). Without trustProxy requestHost() is localhost: the public host is not matched, sealed Inertia pages do not decrypt in the browser, and the log warns WEB_FORWARDED_HOST_IGNORED. Check that web.requestHost(request) equals the address bar host. Development HMR works through the tunnel with nothing to set. To keep a route plain on a seal host put seal: false on the route itself (route({ method, url, seal: false })), never in its config (that fails the start with INVALID_ROUTE_CONFIG).',
|
|
62
62
|
'- App logging (D-0151): log through the logger of the plugin context (context.logger in a setup or hook) or of the app (app.logger in src/main.ts), never console.log or process.stdout.write in server code (npx dokebi check warns console-output). A new project has @dokebi/logger: src/main.ts passes createLogger(document.options) from src/dokebi.generated.ts to the Application, and options.logging in dokebi.yaml sets the level, the level per plugin (plugins: { dokebi-web: warn }), the targets (stdout JSON lines, pretty lines for dokebi dev, a rotated file) and redact (keys and dot paths besides the built-in secret names such as password, token, authorization and cookie). Write a fixed English message and a code in each record and pass the error itself (error: err keeps the name, the whole message, the stack and the causes); never log request bodies, tokens or passwords on purpose. DOKEBI_LOG_LEVEL still overrides the app level. To hand records to your own code (warn and error records into an outbox item that a job sends to a central receiver in its own envelope), add a target of type sink to options.logging.targets and register its handler with sink(name, handler) of the logger plugin in the setup of the module that owns the work (the records arrive redacted, limited and level-filtered, in batches from a timer, never on the path that logs); never wrap the app logger to copy records. Turn the file target on in production on a server that keeps its own log files; containers keep stdout, and under dokebi start the log writer already rotates .dokebi/run/app.log, so the file target is skipped there. To ship records to a log receiver add a network target (D-0152): type http (NDJSON batches, for Dokebi Studio url https://log.dokebi.app/v1/logs with the token of the app server as a secret token in dokebi.yaml written by npx dokebi config secret logging.targets.<name>.token --stdin, never on a command line) or type otlp (an OpenTelemetry collector); it sends from its own worker thread, adds hostname and pid, honours Retry-After and never blocks the app. Without the plugin (npx dokebi remove @dokebi/logger) the app writes with the console logger of core. Read `node_modules/@dokebi/logger/AI.md`.',
|
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.87";
|
|
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