@platformatic/next 3.23.0 → 3.24.0-alpha0

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 CHANGED
@@ -60,10 +60,6 @@ export interface PlatformaticNextJsConfig {
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;
67
63
  http2?: boolean;
68
64
  https?: {
69
65
  allowHTTP1?: boolean;
@@ -189,10 +185,6 @@ export interface PlatformaticNextJsConfig {
189
185
  server?: {
190
186
  hostname?: string;
191
187
  port?: number | string;
192
- /**
193
- * The maximum length of the queue of pending connections
194
- */
195
- backlog?: number;
196
188
  http2?: boolean;
197
189
  https?: {
198
190
  allowHTTP1?: boolean;
package/lib/capability.js CHANGED
@@ -16,7 +16,6 @@ import { dirname, resolve as resolvePath } from 'node:path'
16
16
  import { parse, satisfies } from 'semver'
17
17
  import { version } from './schema.js'
18
18
 
19
- const kITC = Symbol.for('plt.runtime.itc')
20
19
  const supportedVersions = ['^14.0.0', '^15.0.0', '^16.0.0']
21
20
 
22
21
  export class NextCapability extends BaseCapability {
@@ -191,7 +190,11 @@ export class NextCapability extends BaseCapability {
191
190
 
192
191
  const context = await this.getChildManagerContext(this.#basePath)
193
192
 
194
- this.childManager = this.#createChildManager(loaderUrl, { ...context, port: false }, this.#getChildManagerScripts())
193
+ this.childManager = new ChildManager({
194
+ loader: loaderUrl,
195
+ context: { ...context, port: false },
196
+ scripts: this.#getChildManagerScripts()
197
+ })
195
198
 
196
199
  const promise = once(this.childManager, 'url')
197
200
  await this.#startDevelopmentNext(serverOptions)
@@ -247,11 +250,11 @@ export class NextCapability extends BaseCapability {
247
250
  return this.startWithCommand(command, loaderUrl, childManagerScripts)
248
251
  }
249
252
 
250
- this.childManager = this.#createChildManager(
251
- loaderUrl,
252
- await this.getChildManagerContext(this.#basePath),
253
- this.#getChildManagerScripts()
254
- )
253
+ this.childManager = new ChildManager({
254
+ loader: loaderUrl,
255
+ context: await this.getChildManagerContext(this.#basePath),
256
+ scripts: this.#getChildManagerScripts()
257
+ })
255
258
 
256
259
  this.verifyOutputDirectory(resolvePath(this.root, '.next'))
257
260
  await this.#startProductionNext()
@@ -263,7 +266,7 @@ export class NextCapability extends BaseCapability {
263
266
  await this.childManager.inject()
264
267
  const { nextStart } = await importFile(resolvePath(this.#next, './dist/cli/next-start.js'))
265
268
 
266
- const { hostname, port, backlog } = this.serverConfig ?? {}
269
+ const { hostname, port } = this.serverConfig ?? {}
267
270
  const serverOptions = {
268
271
  hostname: hostname || '127.0.0.1',
269
272
  port: port || 0
@@ -273,8 +276,7 @@ export class NextCapability extends BaseCapability {
273
276
 
274
277
  const serverPromise = createServerListener(
275
278
  (this.isEntrypoint ? serverOptions?.port : undefined) ?? true,
276
- (this.isEntrypoint ? serverOptions?.hostname : undefined) ?? true,
277
- typeof backlog === 'number' ? { backlog } : {}
279
+ (this.isEntrypoint ? serverOptions?.hostname : undefined) ?? true
278
280
  )
279
281
 
280
282
  if (this.#nextVersion.major === 14 && this.#nextVersion.minor < 2) {
@@ -326,19 +328,4 @@ export class NextCapability extends BaseCapability {
326
328
  return originalSpawn.call(this, options)
327
329
  }
328
330
  }
329
-
330
- #createChildManager (loader, context, scripts) {
331
- const childManager = new ChildManager({
332
- loader,
333
- context,
334
- scripts
335
- })
336
-
337
- childManager.on('event', event => {
338
- globalThis[kITC].notify('event', event)
339
- this.emit('application:worker:event:' + event.event, event.payload)
340
- })
341
-
342
- return childManager
343
- }
344
331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "3.23.0",
3
+ "version": "3.24.0-alpha0",
4
4
  "description": "Platformatic Next.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,8 +23,8 @@
23
23
  "iovalkey": "^0.3.0",
24
24
  "msgpackr": "^1.11.2",
25
25
  "semver": "^7.6.3",
26
- "@platformatic/foundation": "3.23.0",
27
- "@platformatic/basic": "3.23.0"
26
+ "@platformatic/basic": "3.24.0-alpha0",
27
+ "@platformatic/foundation": "3.24.0-alpha0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@fastify/reply-from": "^12.0.0",
@@ -40,8 +40,8 @@
40
40
  "next": "^16.0.0",
41
41
  "typescript": "^5.5.4",
42
42
  "ws": "^8.18.0",
43
- "@platformatic/gateway": "3.23.0",
44
- "@platformatic/service": "3.23.0"
43
+ "@platformatic/gateway": "3.24.0-alpha0",
44
+ "@platformatic/service": "3.24.0-alpha0"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/next/3.23.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/3.24.0-alpha0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.js Config",
5
5
  "type": "object",
@@ -178,10 +178,6 @@
178
178
  }
179
179
  ]
180
180
  },
181
- "backlog": {
182
- "type": "integer",
183
- "description": "The maximum length of the queue of pending connections"
184
- },
185
181
  "http2": {
186
182
  "type": "boolean"
187
183
  },
@@ -911,10 +907,6 @@
911
907
  }
912
908
  ]
913
909
  },
914
- "backlog": {
915
- "type": "integer",
916
- "description": "The maximum length of the queue of pending connections"
917
- },
918
910
  "http2": {
919
911
  "type": "boolean"
920
912
  },