@dokebi/web 0.4.9 → 0.4.10
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 +2 -0
- package/dist/index.js +7 -4
- package/package.json +4 -4
package/AI.md
CHANGED
|
@@ -10,6 +10,8 @@ npx dokebi add @dokebi/web # src/infra/web/extension.ts (the requires list
|
|
|
10
10
|
|
|
11
11
|
> `npx dokebi` is the @dokebi/cli installed in the project (`dokebi init` adds it to devDependencies). The npm package `dokebi` is not this CLI, so never use `npx -y dokebi`. Without an installed CLI use `npx -y @dokebi/cli …`.
|
|
12
12
|
|
|
13
|
+
**One fastify per project (0.4.10, D-0224).** `fastify` is a peer dependency of @dokebi/web at the exact version it is built and tested on (5.12.8); every other Dokebi plugin takes it as a peer range (`^5.12.7`). npm installs one copy at the project root, so the `FastifyRequest` of web's hooks (`routeHook`, `appOf`) carries the type augmentations of session, auth and i18n (`request.session`, `request.auth`, `request.i18n`). Do not add another `fastify` version to the project's own package.json; `npm ls fastify` shows one copy. Web 0.4.9 and earlier kept their own nested copy, so the types of web's hooks missed those augmentations (TS2339 / TS2345); upgrading web removes it.
|
|
14
|
+
|
|
13
15
|
```yaml
|
|
14
16
|
dokebi-web:
|
|
15
17
|
host: 127.0.0.1 # default; 0.0.0.0 to accept outside traffic (a front proxy is recommended)
|
package/dist/index.js
CHANGED
|
@@ -1617,11 +1617,14 @@ class WebOwner {
|
|
|
1617
1617
|
// info, with every bound address: `dokebi start` reads it to show where the app answers.
|
|
1618
1618
|
// `localhost` binds both 127.0.0.1 and ::1, so there can be more than one.
|
|
1619
1619
|
const scheme = this.#https ? 'https' : 'http';
|
|
1620
|
+
// fastify 5.12.8 types an entry as `AddressInfo | string` (a pipe or socket path, kept as is).
|
|
1620
1621
|
const urls = this.server
|
|
1621
1622
|
.addresses()
|
|
1622
|
-
.map((bound) => bound
|
|
1623
|
-
?
|
|
1624
|
-
:
|
|
1623
|
+
.map((bound) => typeof bound === 'string'
|
|
1624
|
+
? bound
|
|
1625
|
+
: bound.family === 'IPv6' || bound.family === 6
|
|
1626
|
+
? `${scheme}://[${bound.address}]:${bound.port}`
|
|
1627
|
+
: `${scheme}://${bound.address}:${bound.port}`);
|
|
1625
1628
|
this.context.logger.log('info', 'Web server listening', {
|
|
1626
1629
|
address: this.#address,
|
|
1627
1630
|
urls: urls.length ? urls : [this.#address],
|
|
@@ -2630,7 +2633,7 @@ class WebRuntime {
|
|
|
2630
2633
|
}
|
|
2631
2634
|
export const createPlugin = definePlugin({
|
|
2632
2635
|
name: 'dokebi-web',
|
|
2633
|
-
version: '0.4.
|
|
2636
|
+
version: '0.4.10',
|
|
2634
2637
|
core: '^0.4.2',
|
|
2635
2638
|
options: declaration,
|
|
2636
2639
|
entry: (input) => new WebEntryInput(input),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dokebi/web",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
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,7 +45,8 @@
|
|
|
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.2"
|
|
48
|
+
"@dokebi/core": "^0.4.2",
|
|
49
|
+
"fastify": "5.12.8"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@dokebi/health": "0.4.1"
|
|
@@ -97,8 +98,7 @@
|
|
|
97
98
|
]
|
|
98
99
|
},
|
|
99
100
|
"dependencies": {
|
|
100
|
-
"@fastify/under-pressure": "9.2.0"
|
|
101
|
-
"fastify": "5.12.7"
|
|
101
|
+
"@fastify/under-pressure": "9.2.0"
|
|
102
102
|
},
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public",
|