@platformatic/next 2.2.1 → 2.3.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.
Files changed (3) hide show
  1. package/index.js +5 -10
  2. package/package.json +6 -6
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -102,16 +102,11 @@ export class NextStackable extends BaseStackable {
102
102
  }
103
103
 
104
104
  getMeta () {
105
- let composer = { prefix: this.servicePrefix, wantsAbsoluteUrls: true, needsRootRedirect: false }
105
+ const composer = { prefix: this.basePath ?? this.#basePath, wantsAbsoluteUrls: true, needsRootRedirect: false }
106
106
 
107
107
  if (this.url) {
108
- composer = {
109
- tcp: true,
110
- url: this.url,
111
- prefix: this.#basePath ?? this.servicePrefix,
112
- wantsAbsoluteUrls: true,
113
- needsRootRedirect: false
114
- }
108
+ composer.tcp = true
109
+ composer.url = this.url
115
110
  }
116
111
 
117
112
  return { composer }
@@ -155,7 +150,7 @@ export class NextStackable extends BaseStackable {
155
150
  const { nextDev } = await importFile(pathResolve(this.#next, './dist/cli/next-dev.js'))
156
151
 
157
152
  this.#manager.on('config', config => {
158
- this.#basePath = config.basePath.replace(/(^\/)|(\/$)/g, '')
153
+ this.#basePath = config.basePath
159
154
  })
160
155
 
161
156
  try {
@@ -207,7 +202,7 @@ export class NextStackable extends BaseStackable {
207
202
 
208
203
  // Since we are in the same process
209
204
  process.once('plt:next:config', config => {
210
- this.#basePath = config.basePath.replace(/(^\/)|(\/$)/g, '')
205
+ this.#basePath = config.basePath
211
206
  })
212
207
 
213
208
  this.#manager.register()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Platformatic Next.js Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -20,9 +20,9 @@
20
20
  "@babel/traverse": "^7.25.3",
21
21
  "@babel/types": "^7.25.2",
22
22
  "semver": "^7.6.3",
23
- "@platformatic/basic": "2.2.1",
24
- "@platformatic/config": "2.2.1",
25
- "@platformatic/utils": "2.2.1"
23
+ "@platformatic/basic": "2.3.0",
24
+ "@platformatic/config": "2.3.0",
25
+ "@platformatic/utils": "2.3.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fastify/reply-from": "^11.0.0",
@@ -36,8 +36,8 @@
36
36
  "react-dom": "^18.3.1",
37
37
  "typescript": "^5.5.4",
38
38
  "ws": "^8.18.0",
39
- "@platformatic/composer": "2.2.1",
40
- "@platformatic/service": "2.2.1"
39
+ "@platformatic/composer": "2.3.0",
40
+ "@platformatic/service": "2.3.0"
41
41
  },
42
42
  "scripts": {
43
43
  "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/next/2.2.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/2.3.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.js Stackable",
5
5
  "type": "object",