@platformatic/node 2.2.0 → 2.2.2-alpha.1

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 (3) hide show
  1. package/index.js +8 -5
  2. package/package.json +7 -7
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -96,7 +96,10 @@ export class NodeStackable extends BaseStackable {
96
96
  // The server promise must be created before requiring the entrypoint even if it's not going to be used
97
97
  // at all. Otherwise there is chance we miss the listen event.
98
98
  const serverOptions = this.serverConfig
99
- const serverPromise = createServerListener((this.isEntrypoint ? serverOptions?.port : undefined) ?? true)
99
+ const serverPromise = createServerListener(
100
+ (this.isEntrypoint ? serverOptions?.port : undefined) ?? true,
101
+ (this.isEntrypoint ? serverOptions?.hostname : undefined) ?? true
102
+ )
100
103
  // If telemetry is set, configure it
101
104
  const telemetryConfig = this.telemetryConfig
102
105
  if (telemetryConfig) {
@@ -218,8 +221,10 @@ export class NodeStackable extends BaseStackable {
218
221
 
219
222
  getMeta () {
220
223
  const config = this.configManager.current
224
+ const basePath = ensureTrailingSlash(cleanBasePath(this.basePath ?? config.application?.basePath))
225
+
221
226
  let composer = {
222
- prefix: this.servicePrefix,
227
+ prefix: basePath,
223
228
  wantsAbsoluteUrls: this._getWantsAbsoluteUrls(),
224
229
  needsRootRedirect: true
225
230
  }
@@ -228,9 +233,7 @@ export class NodeStackable extends BaseStackable {
228
233
  composer = {
229
234
  tcp: true,
230
235
  url: this.url,
231
- prefix: config.application?.basePath
232
- ? ensureTrailingSlash(cleanBasePath(config.application?.basePath))
233
- : this.servicePrefix,
236
+ prefix: basePath,
234
237
  wantsAbsoluteUrls: this._getWantsAbsoluteUrls(),
235
238
  needsRootRedirect: true
236
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/node",
3
- "version": "2.2.0",
3
+ "version": "2.2.2-alpha.1",
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.2.0",
20
- "@platformatic/utils": "2.2.0",
21
- "@platformatic/telemetry": "2.2.0",
22
- "@platformatic/config": "2.2.0"
19
+ "@platformatic/basic": "2.2.2-alpha.1",
20
+ "@platformatic/utils": "2.2.2-alpha.1",
21
+ "@platformatic/config": "2.2.2-alpha.1",
22
+ "@platformatic/telemetry": "2.2.2-alpha.1"
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/service": "2.2.0",
35
- "@platformatic/composer": "2.2.0"
34
+ "@platformatic/composer": "2.2.2-alpha.1",
35
+ "@platformatic/service": "2.2.2-alpha.1"
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.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/node/2.2.2-alpha.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Node.js Stackable",
5
5
  "type": "object",