@platformatic/astro 3.24.0-alpha0 → 3.24.0
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/config.d.ts +8 -0
- package/lib/capability.js +7 -2
- package/package.json +5 -5
- package/schema.json +9 -1
package/config.d.ts
CHANGED
|
@@ -60,6 +60,10 @@ export interface PlatformaticAstroConfig {
|
|
|
60
60
|
server?: {
|
|
61
61
|
hostname?: string;
|
|
62
62
|
port?: number | string;
|
|
63
|
+
/**
|
|
64
|
+
* The maximum length of the queue of pending connections
|
|
65
|
+
*/
|
|
66
|
+
backlog?: number;
|
|
63
67
|
http2?: boolean;
|
|
64
68
|
https?: {
|
|
65
69
|
allowHTTP1?: boolean;
|
|
@@ -185,6 +189,10 @@ export interface PlatformaticAstroConfig {
|
|
|
185
189
|
server?: {
|
|
186
190
|
hostname?: string;
|
|
187
191
|
port?: number | string;
|
|
192
|
+
/**
|
|
193
|
+
* The maximum length of the queue of pending connections
|
|
194
|
+
*/
|
|
195
|
+
backlog?: number;
|
|
188
196
|
http2?: boolean;
|
|
189
197
|
https?: {
|
|
190
198
|
allowHTTP1?: boolean;
|
package/lib/capability.js
CHANGED
|
@@ -177,7 +177,7 @@ export class AstroCapability extends BaseCapability {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
// Prepare options
|
|
180
|
-
const { hostname, port } = this.serverConfig ?? {}
|
|
180
|
+
const { hostname, port, backlog } = this.serverConfig ?? {}
|
|
181
181
|
const configFile = config.astro.configFile // Note: Astro expect this to be a relative path to the root
|
|
182
182
|
|
|
183
183
|
const serverOptions = {
|
|
@@ -188,7 +188,8 @@ export class AstroCapability extends BaseCapability {
|
|
|
188
188
|
// Require Astro
|
|
189
189
|
const serverPromise = createServerListener(
|
|
190
190
|
(this.isEntrypoint ? serverOptions?.port : undefined) ?? true,
|
|
191
|
-
(this.isEntrypoint ? serverOptions?.hostname : undefined) ?? true
|
|
191
|
+
(this.isEntrypoint ? serverOptions?.hostname : undefined) ?? true,
|
|
192
|
+
typeof backlog === 'number' ? { backlog } : {}
|
|
192
193
|
)
|
|
193
194
|
const { dev } = await importFile(resolve(this.#astro, 'dist/core/index.js'))
|
|
194
195
|
|
|
@@ -251,6 +252,10 @@ export class AstroCapability extends BaseCapability {
|
|
|
251
252
|
const serverOptions = this.serverConfig
|
|
252
253
|
const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
|
|
253
254
|
|
|
255
|
+
if (typeof serverOptions?.backlog === 'number') {
|
|
256
|
+
createServerListener(false, false, { backlog: serverOptions.backlog })
|
|
257
|
+
}
|
|
258
|
+
|
|
254
259
|
await this.#app.listen(listenOptions)
|
|
255
260
|
this.url = getServerUrl(this.#app.server)
|
|
256
261
|
return this.url
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/astro",
|
|
3
|
-
"version": "3.24.0
|
|
3
|
+
"version": "3.24.0",
|
|
4
4
|
"description": "Platformatic Astro Capability",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@fastify/static": "^8.0.0",
|
|
20
20
|
"fastify": "^5.0.0",
|
|
21
21
|
"semver": "^7.6.3",
|
|
22
|
-
"@platformatic/basic": "3.24.0
|
|
23
|
-
"@platformatic/foundation": "3.24.0
|
|
22
|
+
"@platformatic/basic": "3.24.0",
|
|
23
|
+
"@platformatic/foundation": "3.24.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@astrojs/node": "^9.2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.5.4",
|
|
35
35
|
"vite": "^5.4.4",
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
|
-
"@platformatic/
|
|
38
|
-
"@platformatic/
|
|
37
|
+
"@platformatic/gateway": "3.24.0",
|
|
38
|
+
"@platformatic/service": "3.24.0"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=22.19.0"
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/astro/3.24.0
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/astro/3.24.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Astro Config",
|
|
5
5
|
"type": "object",
|
|
@@ -178,6 +178,10 @@
|
|
|
178
178
|
}
|
|
179
179
|
]
|
|
180
180
|
},
|
|
181
|
+
"backlog": {
|
|
182
|
+
"type": "integer",
|
|
183
|
+
"description": "The maximum length of the queue of pending connections"
|
|
184
|
+
},
|
|
181
185
|
"http2": {
|
|
182
186
|
"type": "boolean"
|
|
183
187
|
},
|
|
@@ -907,6 +911,10 @@
|
|
|
907
911
|
}
|
|
908
912
|
]
|
|
909
913
|
},
|
|
914
|
+
"backlog": {
|
|
915
|
+
"type": "integer",
|
|
916
|
+
"description": "The maximum length of the queue of pending connections"
|
|
917
|
+
},
|
|
910
918
|
"http2": {
|
|
911
919
|
"type": "boolean"
|
|
912
920
|
},
|