@platformatic/node 2.3.1 → 2.4.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 +7 -17
- package/package.json +7 -7
- package/schema.json +1 -1
package/index.js
CHANGED
|
@@ -48,6 +48,7 @@ export class NodeStackable extends BaseStackable {
|
|
|
48
48
|
#module
|
|
49
49
|
#app
|
|
50
50
|
#server
|
|
51
|
+
#basePath
|
|
51
52
|
#dispatcher
|
|
52
53
|
#isFastify
|
|
53
54
|
#isKoa
|
|
@@ -81,7 +82,7 @@ export class NodeStackable extends BaseStackable {
|
|
|
81
82
|
const finalEntrypoint = await this._findEntrypoint()
|
|
82
83
|
|
|
83
84
|
// Require the application
|
|
84
|
-
|
|
85
|
+
this.#basePath = config.application?.basePath
|
|
85
86
|
? ensureTrailingSlash(cleanBasePath(config.application?.basePath))
|
|
86
87
|
: undefined
|
|
87
88
|
|
|
@@ -89,7 +90,7 @@ export class NodeStackable extends BaseStackable {
|
|
|
89
90
|
// Always use URL to avoid serialization problem in Windows
|
|
90
91
|
id: this.id,
|
|
91
92
|
root: pathToFileURL(this.root).toString(),
|
|
92
|
-
basePath,
|
|
93
|
+
basePath: this.#basePath,
|
|
93
94
|
logLevel: this.logger.level
|
|
94
95
|
})
|
|
95
96
|
|
|
@@ -220,26 +221,15 @@ export class NodeStackable extends BaseStackable {
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
getMeta () {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
let composer = {
|
|
227
|
-
prefix: basePath,
|
|
228
|
-
wantsAbsoluteUrls: this._getWantsAbsoluteUrls(),
|
|
229
|
-
needsRootRedirect: true
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (this.url) {
|
|
233
|
-
composer = {
|
|
234
|
-
tcp: true,
|
|
224
|
+
return {
|
|
225
|
+
composer: {
|
|
226
|
+
tcp: typeof this.url !== 'undefined',
|
|
235
227
|
url: this.url,
|
|
236
|
-
prefix: basePath,
|
|
228
|
+
prefix: this.basePath ?? this.#basePath,
|
|
237
229
|
wantsAbsoluteUrls: this._getWantsAbsoluteUrls(),
|
|
238
230
|
needsRootRedirect: true
|
|
239
231
|
}
|
|
240
232
|
}
|
|
241
|
-
|
|
242
|
-
return { composer }
|
|
243
233
|
}
|
|
244
234
|
|
|
245
235
|
async _listen () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/node",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Platformatic Node.js Stackable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"light-my-request": "^6.0.0",
|
|
19
|
-
"@platformatic/basic": "2.
|
|
20
|
-
"@platformatic/
|
|
21
|
-
"@platformatic/
|
|
22
|
-
"@platformatic/
|
|
19
|
+
"@platformatic/basic": "2.4.0",
|
|
20
|
+
"@platformatic/telemetry": "2.4.0",
|
|
21
|
+
"@platformatic/utils": "2.4.0",
|
|
22
|
+
"@platformatic/config": "2.4.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"borp": "^0.17.0",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"neostandard": "^0.11.1",
|
|
32
32
|
"tsx": "^4.19.0",
|
|
33
33
|
"typescript": "^5.5.4",
|
|
34
|
-
"@platformatic/composer": "2.
|
|
35
|
-
"@platformatic/service": "2.
|
|
34
|
+
"@platformatic/composer": "2.4.0",
|
|
35
|
+
"@platformatic/service": "2.4.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"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/node/2.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/node/2.4.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Node.js Stackable",
|
|
5
5
|
"type": "object",
|