@dokebi/web 0.4.2 → 0.4.3

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.
Files changed (46) hide show
  1. package/AI.md +248 -39
  2. package/README.md +31 -10
  3. package/dist/app-routes.d.ts +20 -0
  4. package/dist/app-routes.js +137 -0
  5. package/dist/before-hijack.d.ts +24 -0
  6. package/dist/before-hijack.js +73 -0
  7. package/dist/body.d.ts +14 -0
  8. package/dist/body.js +30 -0
  9. package/dist/cluster-ready.d.ts +67 -0
  10. package/dist/cluster-ready.js +123 -0
  11. package/dist/compilers.d.ts +16 -0
  12. package/dist/compilers.js +25 -0
  13. package/dist/compression.d.ts +40 -0
  14. package/dist/compression.js +435 -0
  15. package/dist/connections.d.ts +44 -0
  16. package/dist/connections.js +282 -0
  17. package/dist/define-errors.d.ts +76 -0
  18. package/dist/define-errors.js +161 -0
  19. package/dist/describe.d.ts +37 -0
  20. package/dist/describe.js +96 -0
  21. package/dist/errors.d.ts +1 -1
  22. package/dist/errors.js +24 -3
  23. package/dist/forms.d.ts +23 -7
  24. package/dist/forms.js +53 -13
  25. package/dist/index.d.ts +134 -4
  26. package/dist/index.js +1518 -91
  27. package/dist/options.d.ts +56 -0
  28. package/dist/options.js +320 -1
  29. package/dist/points.d.ts +159 -0
  30. package/dist/points.js +162 -1
  31. package/dist/responses.d.ts +31 -6
  32. package/dist/responses.js +68 -6
  33. package/dist/route-config.d.ts +38 -0
  34. package/dist/route-config.js +222 -0
  35. package/dist/route-hooks.d.ts +75 -0
  36. package/dist/route-hooks.js +118 -0
  37. package/dist/route-table.d.ts +55 -0
  38. package/dist/route-table.js +142 -0
  39. package/dist/seal.d.ts +49 -1
  40. package/dist/seal.js +259 -24
  41. package/dist/security-headers.d.ts +121 -0
  42. package/dist/security-headers.js +298 -0
  43. package/dist/transient-log.d.ts +42 -0
  44. package/dist/transient-log.js +95 -0
  45. package/options.schema.json +488 -1
  46. package/package.json +22 -9
@@ -29,20 +29,59 @@
29
29
  "minimum": 1,
30
30
  "maximum": 67108864,
31
31
  "deprecated": true,
32
+ "x-dokebi-alias-of": "maxBodyBytes",
32
33
  "description": "Deprecated name of maxBodyBytes; use that key."
33
34
  },
35
+ "maxRouteBodyBytes": {
36
+ "type": "integer",
37
+ "minimum": 1,
38
+ "maximum": 1073741824,
39
+ "default": 67108864,
40
+ "description": "Largest bodyLimit one route may declare for itself, in bytes (D-0122); a larger one fails the start. At least maxBodyBytes."
41
+ },
42
+ "linger": {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "ms": {
47
+ "type": "integer",
48
+ "minimum": 0,
49
+ "maximum": 60000,
50
+ "default": 5000,
51
+ "description": "After an answer sent before the request body was read (a 403, 413 or 415 refused early), how long the connection still reads and drops what the client keeps sending before it closes, so the client reads the answer instead of a connection reset. 0 closes at once."
52
+ },
53
+ "maxBytes": {
54
+ "type": "integer",
55
+ "minimum": 0,
56
+ "maximum": 1073741824,
57
+ "default": 16777216,
58
+ "description": "At most this many bytes of such an unread body are read and dropped; past it the connection closes at once."
59
+ }
60
+ },
61
+ "default": {
62
+ "ms": 5000,
63
+ "maxBytes": 16777216
64
+ },
65
+ "description": "Lingering close (AI-M47 flaky test): an early answer closes its connection only after the client stopped sending, within these limits."
66
+ },
67
+ "binaryBody": {
68
+ "type": "boolean",
69
+ "default": false,
70
+ "description": "Parse application/octet-stream bodies into request.body as a Buffer, up to the route bodyLimit or maxBodyBytes (D-0122). Off: such a request gets 415 as before. Seal hosts still refuse them (415 SEAL_REQUIRED) unless the route sets seal: false"
71
+ },
34
72
  "requestTimeoutMs": {
35
73
  "type": "integer",
36
74
  "minimum": 1,
37
75
  "maximum": 2147483647,
38
76
  "default": 30000,
39
- "description": "Time to receive a whole request in ms (not a limit on the work it starts)."
77
+ "description": "Time a request body may take to arrive after its headers, in ms (408 REQUEST_TIMEOUT past it; a route may set its own config.requestTimeoutMs), and the bound of the headers themselves; not a limit on the work it starts."
40
78
  },
41
79
  "requestTimeout": {
42
80
  "type": "integer",
43
81
  "minimum": 1,
44
82
  "maximum": 2147483647,
45
83
  "deprecated": true,
84
+ "x-dokebi-alias-of": "requestTimeoutMs",
46
85
  "description": "Deprecated name of requestTimeoutMs; use that key."
47
86
  },
48
87
  "healthRoutes": {
@@ -73,6 +112,25 @@
73
112
  },
74
113
  "description": "Liveness and readiness routes (answered before ready and while draining); false registers none."
75
114
  },
115
+ "routeIds": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "healthLive": {
120
+ "type": "string",
121
+ "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
122
+ "x-dokebi-secret": false,
123
+ "description": "Id of the liveness route (healthRoutes.live); default web.healthLive"
124
+ },
125
+ "healthReady": {
126
+ "type": "string",
127
+ "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
128
+ "x-dokebi-secret": false,
129
+ "description": "Id of the readiness route (healthRoutes.ready); default web.healthReady"
130
+ }
131
+ },
132
+ "description": "Ids of the routes dokebi-web adds (D-0142), by route key: healthLive (default web.healthLive), healthReady (default web.healthReady). An id is 1-64 letters, digits, '.', '_' or '-' starting with a letter; an id another route of the same app has fails the start (DUPLICATE_ROUTE_ID)"
133
+ },
76
134
  "trustProxy": {
77
135
  "type": "array",
78
136
  "items": {
@@ -104,6 +162,15 @@
104
162
  "default": [],
105
163
  "description": "Seal hosts (D-0062): path prefixes that stay plain (webhooks, server-to-server), matched at a / boundary"
106
164
  },
165
+ "unknownFields": {
166
+ "type": "string",
167
+ "enum": [
168
+ "remove",
169
+ "refuse"
170
+ ],
171
+ "default": "remove",
172
+ "description": "Fields a route schema does not allow (additionalProperties: false) in a body, query string or params: remove drops them before the handler (Fastify's default, Ajv removeAdditional); refuse answers an extra body or query field 422 VALIDATION_FAILED naming each field (is not allowed), an extra path parameter 400 INVALID_REQUEST like any refused params schema."
173
+ },
107
174
  "formBody": {
108
175
  "type": "boolean",
109
176
  "default": false,
@@ -119,7 +186,427 @@
119
186
  "developmentErrors": {
120
187
  "type": "boolean",
121
188
  "default": true,
189
+ "x-dokebi-reloadable": true,
122
190
  "description": "Outside production (NODE_ENV is not production) error bodies also carry fix and details (D-0063). false: never, as in production. hint and data are always sent."
191
+ },
192
+ "transientLogWindowMs": {
193
+ "type": "integer",
194
+ "minimum": 1000,
195
+ "maximum": 3600000,
196
+ "default": 10000,
197
+ "x-dokebi-reloadable": true,
198
+ "description": "Retryable 503s (a translated error, or a 503 with Retry-After; D-0113): the first of each error code and route in a window is logged in full, the rest are counted into one WEB_TRANSIENT_REPEATED line when the window ends or the server closes. 500s are not affected."
199
+ },
200
+ "transientLogMaxKeys": {
201
+ "type": "integer",
202
+ "minimum": 1,
203
+ "maximum": 65536,
204
+ "default": 256,
205
+ "x-dokebi-reloadable": true,
206
+ "description": "Distinct error code and route pairs one transient window logs in full (D-0113); past it new pairs are only counted, in one WEB_TRANSIENT_REPEATED line with overflow: true."
207
+ },
208
+ "logRepeatWindowMs": {
209
+ "type": "integer",
210
+ "minimum": 1000,
211
+ "maximum": 3600000,
212
+ "default": 10000,
213
+ "description": "Window of every other repeated web log (D-0047, D-0114): a 500 of the same route, error name and code, a refused form body, a refused or failed sealed body, a failed response hook, translator or responder is logged in full once per window; the next one says how many were held back (repeated)."
214
+ },
215
+ "formOldInputMaxChars": {
216
+ "type": "integer",
217
+ "minimum": 256,
218
+ "maximum": 1048576,
219
+ "default": 8192,
220
+ "description": "Largest old input (as JSON text) a refused form goes back with (D-0074, D-0114); a larger body goes back without its old input, so the user retypes it. Raise it for forms with long text areas."
221
+ },
222
+ "formRefererMaxLength": {
223
+ "type": "integer",
224
+ "minimum": 256,
225
+ "maximum": 65536,
226
+ "default": 4096,
227
+ "description": "Longest Referer a refused form goes back to (D-0074, D-0114); a longer one is not followed (POST: back to the fallback). Raise it for pages with long query strings."
228
+ },
229
+ "drainGraceMs": {
230
+ "type": "integer",
231
+ "minimum": 0,
232
+ "maximum": 60000,
233
+ "default": 100,
234
+ "x-dokebi-reloadable": true,
235
+ "description": "How long a draining node:cluster worker stays up after it stops listening, so a connection the primary was already handing it is answered \"not accepted\" and passed on (D-0036, D-0114)."
236
+ },
237
+ "drainIdleMs": {
238
+ "type": "integer",
239
+ "minimum": 0,
240
+ "maximum": 60000,
241
+ "default": 2000,
242
+ "x-dokebi-reloadable": true,
243
+ "description": "How long a draining node:cluster worker keeps its idle keep-alive connections open (D-0036): a request a client sends on one is served with Connection: close instead of being lost to a closed socket (ECONNRESET), and the drain goes on as soon as none is left. Connections still idle then are closed. The wait ends 100 ms before the drain deadline (core drainDeadline) whatever this says, so it never causes DRAIN_TIMEOUT."
244
+ },
245
+ "unavailableRetryAfterMs": {
246
+ "type": "integer",
247
+ "minimum": 1000,
248
+ "maximum": 600000,
249
+ "default": 5000,
250
+ "x-dokebi-reloadable": true,
251
+ "description": "Retry-After of the 503 SERVICE_UNAVAILABLE refusals before the app is ready, while a required health check is not ready (a Redis or database outage) and while it drains (rounded up to seconds). The default matches the 5 s of a lost Redis connection (dokebi-redis unavailableRetryAfterMs), the usual cause of an unready worker."
252
+ },
253
+ "sealRetryAfterMs": {
254
+ "type": "integer",
255
+ "minimum": 1,
256
+ "maximum": 60000,
257
+ "default": 1000,
258
+ "description": "Retry-After of the 503s SEAL_BUSY (a full replay nonce store) and SEAL_NONCE_STORE_UNAVAILABLE (a failing or slow one) (D-0114)."
259
+ },
260
+ "transientLogLevel": {
261
+ "type": "string",
262
+ "enum": [
263
+ "error",
264
+ "warn"
265
+ ],
266
+ "default": "error",
267
+ "x-dokebi-reloadable": true,
268
+ "description": "Level of the transient 503 records and their WEB_TRANSIENT_REPEATED summaries (D-0113). 500s stay at error."
269
+ },
270
+ "compression": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "properties": {
274
+ "enabled": {
275
+ "type": "boolean",
276
+ "default": true,
277
+ "description": "Compress responses with br or gzip when the client accepts it (D-0125). false: every answer goes out as the handler wrote it (a front proxy compresses)."
278
+ },
279
+ "thresholdBytes": {
280
+ "type": "integer",
281
+ "minimum": 0,
282
+ "maximum": 1048576,
283
+ "default": 1024,
284
+ "description": "Smallest body in bytes that is compressed; a smaller one (or a stream with a smaller Content-Length) goes out as is."
285
+ },
286
+ "brotliQuality": {
287
+ "type": "integer",
288
+ "minimum": 0,
289
+ "maximum": 11,
290
+ "default": 4,
291
+ "description": "Brotli quality, 0 (fastest) to 11 (smallest, far too slow for answers made per request)."
292
+ },
293
+ "gzipLevel": {
294
+ "type": "integer",
295
+ "minimum": 1,
296
+ "maximum": 9,
297
+ "default": 6,
298
+ "description": "gzip level, 1 (fastest) to 9 (smallest)."
299
+ },
300
+ "encodings": {
301
+ "type": "array",
302
+ "items": {
303
+ "type": "string",
304
+ "enum": [
305
+ "br",
306
+ "gzip"
307
+ ]
308
+ },
309
+ "minItems": 1,
310
+ "maxItems": 2,
311
+ "uniqueItems": true,
312
+ "default": [
313
+ "br",
314
+ "gzip"
315
+ ],
316
+ "description": "Codings offered, in the order that wins when the client gives them the same q-value."
317
+ },
318
+ "maxBufferBytes": {
319
+ "type": "integer",
320
+ "minimum": 1024,
321
+ "maximum": 67108864,
322
+ "default": 1048576,
323
+ "description": "Largest buffered body compressed in one call (sent with Content-Length); a larger one is compressed as a stream, chunk by chunk, so its compressed copy is never held whole."
324
+ },
325
+ "maxPending": {
326
+ "type": "integer",
327
+ "minimum": 1,
328
+ "maximum": 4096,
329
+ "default": 64,
330
+ "description": "Compressions under way at once (one-shot jobs and streams); past it answers go out uncompressed with a WEB_COMPRESSION_BUSY warning, instead of queueing more CPU work."
331
+ }
332
+ },
333
+ "default": {
334
+ "enabled": true,
335
+ "thresholdBytes": 1024,
336
+ "brotliQuality": 4,
337
+ "gzipLevel": 6,
338
+ "encodings": [
339
+ "br",
340
+ "gzip"
341
+ ],
342
+ "maxBufferBytes": 1048576,
343
+ "maxPending": 64
344
+ },
345
+ "description": "Response compression (D-0125): br or gzip by Accept-Encoding for text, JSON, JS, CSS, SVG and XML bodies; never for 206, 304, SSE, sealed bodies, Cache-Control: no-transform or a body that already has a Content-Encoding."
346
+ },
347
+ "overload": {
348
+ "type": "object",
349
+ "additionalProperties": false,
350
+ "properties": {
351
+ "enabled": {
352
+ "type": "boolean",
353
+ "default": true,
354
+ "description": "Shed load (D-0150, @fastify/under-pressure): above a limit below, requests are answered 503 OVERLOADED with Retry-After before any handler runs; health routes and routes with config.overload false are served. false: never"
355
+ },
356
+ "maxEventLoopDelayMs": {
357
+ "type": "integer",
358
+ "minimum": 0,
359
+ "maximum": 600000,
360
+ "default": 200,
361
+ "x-dokebi-reloadable": true,
362
+ "description": "Mean event loop delay over the last sample above which requests are refused (a saturated but healthy loop measured a mean of 11 ms, at most 24 ms; D-0150 §2); 0: not checked"
363
+ },
364
+ "maxEventLoopUtilization": {
365
+ "type": "number",
366
+ "minimum": 0,
367
+ "maximum": 1,
368
+ "default": 0,
369
+ "x-dokebi-reloadable": true,
370
+ "description": "Event loop utilization (0..1) over the last sample above which requests are refused; 0: not checked"
371
+ },
372
+ "maxHeapUsedBytes": {
373
+ "type": "integer",
374
+ "minimum": 0,
375
+ "maximum": 1099511627776,
376
+ "default": 0,
377
+ "x-dokebi-reloadable": true,
378
+ "description": "V8 heap used above which requests are refused; 0: not checked"
379
+ },
380
+ "maxRssBytes": {
381
+ "type": "integer",
382
+ "minimum": 0,
383
+ "maximum": 1099511627776,
384
+ "default": 0,
385
+ "x-dokebi-reloadable": true,
386
+ "description": "Resident set size above which requests are refused; 0: not checked"
387
+ },
388
+ "sampleIntervalMs": {
389
+ "type": "integer",
390
+ "minimum": 10,
391
+ "maximum": 60000,
392
+ "default": 1000,
393
+ "description": "How often the event loop and memory are sampled, in ms"
394
+ },
395
+ "retryAfterMs": {
396
+ "type": "integer",
397
+ "minimum": 1000,
398
+ "maximum": 600000,
399
+ "default": 2000,
400
+ "x-dokebi-reloadable": true,
401
+ "description": "Retry-After of the 503 OVERLOADED answers (rounded up to seconds)"
402
+ }
403
+ },
404
+ "default": {
405
+ "enabled": true,
406
+ "maxEventLoopDelayMs": 200,
407
+ "maxEventLoopUtilization": 0,
408
+ "maxHeapUsedBytes": 0,
409
+ "maxRssBytes": 0,
410
+ "sampleIntervalMs": 1000,
411
+ "retryAfterMs": 2000
412
+ },
413
+ "description": "Overload protection (D-0150): limits on the event loop and memory of this process, checked on every request against the last sample."
414
+ },
415
+ "securityHeaders": {
416
+ "type": "object",
417
+ "additionalProperties": false,
418
+ "properties": {
419
+ "enabled": {
420
+ "type": "boolean",
421
+ "default": true,
422
+ "description": "Security headers on every answer (D-0149): nosniff, HSTS over HTTPS, and on HTML documents the CSP, X-Frame-Options, Referrer-Policy and the cross-origin policies. false: none (a front proxy sets them)."
423
+ },
424
+ "contentSecurityPolicy": {
425
+ "anyOf": [
426
+ {
427
+ "const": false
428
+ },
429
+ {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "properties": {
433
+ "directives": {
434
+ "type": "object",
435
+ "propertyNames": {
436
+ "pattern": "^[a-z][a-z-]{1,63}$"
437
+ },
438
+ "maxProperties": 64,
439
+ "additionalProperties": {
440
+ "anyOf": [
441
+ {
442
+ "type": "array",
443
+ "items": {
444
+ "type": "string",
445
+ "pattern": "^[^\\s;,]{1,512}$"
446
+ },
447
+ "maxItems": 64
448
+ },
449
+ {
450
+ "const": false
451
+ }
452
+ ]
453
+ },
454
+ "default": {},
455
+ "description": "Changes to the default policy, by directive: a list of sources replaces that directive ([] = a directive without sources), false removes it. Default policy: default-src 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: blob: https:; font-src 'self' data: https:; connect-src 'self'"
456
+ },
457
+ "reportOnly": {
458
+ "type": "boolean",
459
+ "default": false,
460
+ "description": "Send Content-Security-Policy-Report-Only instead: the browser reports what the policy would block and blocks nothing"
461
+ }
462
+ }
463
+ }
464
+ ],
465
+ "default": {
466
+ "directives": {},
467
+ "reportOnly": false
468
+ },
469
+ "x-dokebi-reloadable": true,
470
+ "description": "Content-Security-Policy of HTML documents (plugins add the sources they need: @dokebi/seal wasm, the Vite dev socket); false sends none"
471
+ },
472
+ "strictTransportSecurity": {
473
+ "anyOf": [
474
+ {
475
+ "const": false
476
+ },
477
+ {
478
+ "type": "object",
479
+ "additionalProperties": false,
480
+ "properties": {
481
+ "maxAgeSec": {
482
+ "type": "integer",
483
+ "minimum": 0,
484
+ "maximum": 63072000,
485
+ "default": 31536000,
486
+ "description": "max-age in seconds (0 tells browsers to forget it)"
487
+ },
488
+ "includeSubDomains": {
489
+ "type": "boolean",
490
+ "default": true,
491
+ "description": "includeSubDomains"
492
+ },
493
+ "preload": {
494
+ "type": "boolean",
495
+ "default": false,
496
+ "description": "preload (only when the domain is submitted to the preload list)"
497
+ }
498
+ }
499
+ }
500
+ ],
501
+ "default": {
502
+ "maxAgeSec": 31536000,
503
+ "includeSubDomains": true,
504
+ "preload": false
505
+ },
506
+ "x-dokebi-reloadable": true,
507
+ "description": "Strict-Transport-Security on answers to HTTPS requests (TLS here, or X-Forwarded-Proto: https from a trustProxy address); never on plain HTTP. false: none"
508
+ },
509
+ "frameOptions": {
510
+ "anyOf": [
511
+ {
512
+ "type": "string",
513
+ "enum": [
514
+ "DENY",
515
+ "SAMEORIGIN"
516
+ ]
517
+ },
518
+ {
519
+ "const": false
520
+ }
521
+ ],
522
+ "default": "SAMEORIGIN",
523
+ "x-dokebi-reloadable": true,
524
+ "description": "X-Frame-Options of HTML documents (old browsers; CSP frame-ancestors 'self' is the modern one). false: none"
525
+ },
526
+ "referrerPolicy": {
527
+ "anyOf": [
528
+ {
529
+ "type": "string",
530
+ "enum": [
531
+ "no-referrer",
532
+ "no-referrer-when-downgrade",
533
+ "origin",
534
+ "origin-when-cross-origin",
535
+ "same-origin",
536
+ "strict-origin",
537
+ "strict-origin-when-cross-origin",
538
+ "unsafe-url"
539
+ ]
540
+ },
541
+ {
542
+ "const": false
543
+ }
544
+ ],
545
+ "default": "strict-origin-when-cross-origin",
546
+ "x-dokebi-reloadable": true,
547
+ "description": "Referrer-Policy of HTML documents. false: none"
548
+ },
549
+ "crossOriginOpenerPolicy": {
550
+ "anyOf": [
551
+ {
552
+ "type": "string",
553
+ "enum": [
554
+ "same-origin",
555
+ "same-origin-allow-popups",
556
+ "unsafe-none"
557
+ ]
558
+ },
559
+ {
560
+ "const": false
561
+ }
562
+ ],
563
+ "default": "same-origin-allow-popups",
564
+ "x-dokebi-reloadable": true,
565
+ "description": "Cross-Origin-Opener-Policy of HTML documents, over HTTPS only (same-origin-allow-popups keeps windows the page opens, such as a payment or sign-in popup, connected). false: none"
566
+ },
567
+ "crossOriginResourcePolicy": {
568
+ "anyOf": [
569
+ {
570
+ "type": "string",
571
+ "enum": [
572
+ "same-origin",
573
+ "same-site",
574
+ "cross-origin"
575
+ ]
576
+ },
577
+ {
578
+ "const": false
579
+ }
580
+ ],
581
+ "default": "same-site",
582
+ "x-dokebi-reloadable": true,
583
+ "description": "Cross-Origin-Resource-Policy of HTML documents (same-site: the hosts of one site, the apps of @dokebi/app included). false: none"
584
+ },
585
+ "contentTypeOptions": {
586
+ "type": "boolean",
587
+ "default": true,
588
+ "x-dokebi-reloadable": true,
589
+ "description": "X-Content-Type-Options: nosniff on every answer"
590
+ }
591
+ },
592
+ "default": {
593
+ "enabled": true,
594
+ "contentSecurityPolicy": {
595
+ "directives": {},
596
+ "reportOnly": false
597
+ },
598
+ "strictTransportSecurity": {
599
+ "maxAgeSec": 31536000,
600
+ "includeSubDomains": true,
601
+ "preload": false
602
+ },
603
+ "frameOptions": "SAMEORIGIN",
604
+ "referrerPolicy": "strict-origin-when-cross-origin",
605
+ "crossOriginOpenerPolicy": "same-origin-allow-popups",
606
+ "crossOriginResourcePolicy": "same-site",
607
+ "contentTypeOptions": true
608
+ },
609
+ "description": "Security headers (D-0149), on by default. A header a route or plugin already set is kept; a route changes them with config: { securityHeaders: { … } } or turns them off with config: { securityHeaders: false }."
123
610
  }
124
611
  }
125
612
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dokebi/web",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Fastify 5 HTTP server owned by a Dokebi app: 503 before ready, health routes, drain and cluster handover.",
5
5
  "keywords": [
6
6
  "dokebi",
@@ -45,24 +45,33 @@
45
45
  "test": "node -e \"require('node:fs').rmSync('.tmp/tests',{recursive:true,force:true})\" && tsc -p tsconfig.test.json && node --test .tmp/tests/tests/*.test.js"
46
46
  },
47
47
  "peerDependencies": {
48
- "@dokebi/core": "^0.4.0"
48
+ "@dokebi/core": "^0.4.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@dokebi/health": "0.4.0"
51
+ "@dokebi/health": "0.4.1"
52
52
  },
53
53
  "dokebi": {
54
54
  "schemaVersion": 2,
55
55
  "id": "dokebi-web",
56
- "core": "^0.4.0",
56
+ "core": "^0.4.2",
57
57
  "dependencies": [
58
58
  {
59
59
  "name": "dokebi-health",
60
60
  "version": "^0.4.0",
61
61
  "optional": true
62
+ },
63
+ {
64
+ "name": "dokebi-logger",
65
+ "version": "^0.1.0",
66
+ "optional": true
62
67
  }
63
68
  ],
64
69
  "contributes": [
65
- "dokebi-testing:inject"
70
+ "dokebi-testing:inject",
71
+ "core:describe"
72
+ ],
73
+ "collects": [
74
+ "dokebi-web:error-translator"
66
75
  ],
67
76
  "installModule": "dist/install.js",
68
77
  "optionsSchema": "options.schema.json",
@@ -70,21 +79,25 @@
70
79
  },
71
80
  "dokebiCatalog": {
72
81
  "kind": "plugin",
73
- "summary": "Fastify 5 HTTP server (503 before ready, health paths, drain, zero-downtime cluster replacement)",
82
+ "summary": "Fastify 5 HTTP server (503 before ready, health paths, drain, zero-downtime cluster replacement, security headers and overload protection on by default)",
74
83
  "maturity": "preview",
75
84
  "provides": [
76
- "web.http"
85
+ "web.http",
86
+ "web.security-headers",
87
+ "web.overload"
77
88
  ],
78
89
  "doesNot": [
79
- "No built-in authentication, rate limit, CORS or security headers",
90
+ "No built-in authentication, rate limit or CORS (CORS is @dokebi/cors)",
80
91
  "No file upload (multipart)"
81
92
  ],
82
93
  "recipes": [
83
94
  "api",
84
- "blog"
95
+ "blog",
96
+ "site"
85
97
  ]
86
98
  },
87
99
  "dependencies": {
100
+ "@fastify/under-pressure": "9.2.0",
88
101
  "fastify": "5.12.7"
89
102
  },
90
103
  "publishConfig": {