@platformatic/astro 2.22.0 → 2.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/index.js +10 -1
- package/package.json +7 -7
- package/schema.json +1 -1
package/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
schemaOptions
|
|
14
14
|
} from '@platformatic/basic'
|
|
15
15
|
import { ConfigManager } from '@platformatic/config'
|
|
16
|
+
import { features } from '@platformatic/utils'
|
|
16
17
|
import fastify from 'fastify'
|
|
17
18
|
import { existsSync } from 'node:fs'
|
|
18
19
|
import { readFile, writeFile } from 'node:fs/promises'
|
|
@@ -53,6 +54,8 @@ export class AstroStackable extends BaseStackable {
|
|
|
53
54
|
} else {
|
|
54
55
|
await this.#startDevelopment(listen)
|
|
55
56
|
}
|
|
57
|
+
|
|
58
|
+
this._collectMetrics()
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
async stop () {
|
|
@@ -233,7 +236,13 @@ export class AstroStackable extends BaseStackable {
|
|
|
233
236
|
|
|
234
237
|
if (this.#app && listen) {
|
|
235
238
|
const serverOptions = this.serverConfig
|
|
236
|
-
|
|
239
|
+
const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
|
|
240
|
+
|
|
241
|
+
if (this.isProduction && features.node.reusePort) {
|
|
242
|
+
listenOptions.reusePort = true
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
await this.#app.listen(listenOptions)
|
|
237
246
|
this.url = getServerUrl(this.#app.server)
|
|
238
247
|
return this.url
|
|
239
248
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/astro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"description": "Platformatic Astro Stackable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@fastify/static": "^8.0.0",
|
|
20
20
|
"fastify": "^5.0.0",
|
|
21
21
|
"semver": "^7.6.3",
|
|
22
|
-
"@platformatic/basic": "2.
|
|
23
|
-
"@platformatic/config": "2.
|
|
24
|
-
"@platformatic/utils": "2.
|
|
22
|
+
"@platformatic/basic": "2.24.0",
|
|
23
|
+
"@platformatic/config": "2.24.0",
|
|
24
|
+
"@platformatic/utils": "2.24.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@astrojs/node": "^8.3.3",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"borp": "^0.19.0",
|
|
30
30
|
"eslint": "9",
|
|
31
31
|
"json-schema-to-typescript": "^15.0.1",
|
|
32
|
-
"neostandard": "^0.
|
|
32
|
+
"neostandard": "^0.12.0",
|
|
33
33
|
"typescript": "^5.5.4",
|
|
34
34
|
"vite": "^5.4.4",
|
|
35
35
|
"ws": "^8.18.0",
|
|
36
|
-
"@platformatic/
|
|
37
|
-
"@platformatic/
|
|
36
|
+
"@platformatic/service": "2.24.0",
|
|
37
|
+
"@platformatic/composer": "2.24.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"test": "npm run lint && borp --concurrency=1 --no-timeout",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/astro/2.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/astro/2.24.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Astro Stackable",
|
|
5
5
|
"type": "object",
|