@platformatic/basic 2.19.0-alpha.5 → 2.19.0-alpha.7

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/lib/base.js CHANGED
@@ -13,8 +13,6 @@ import { NonZeroExitCode } from './errors.js'
13
13
  import { cleanBasePath } from './utils.js'
14
14
  import { ChildManager } from './worker/child-manager.js'
15
15
 
16
- const kITC = Symbol.for('plt.runtime.itc')
17
-
18
16
  export class BaseStackable {
19
17
  childManager
20
18
  #subprocess
@@ -70,8 +68,7 @@ export class BaseStackable {
70
68
  setGraphqlSchema: this.setGraphqlSchema.bind(this),
71
69
  setConnectionString: this.setConnectionString.bind(this),
72
70
  setBasePath: this.setBasePath.bind(this),
73
- runtimeBasePath: this.runtimeConfig?.basePath ?? null,
74
- invalidateHttpCache: this.#invalidateHttpCache.bind(this)
71
+ runtimeBasePath: this.runtimeConfig?.basePath ?? null
75
72
  })
76
73
  }
77
74
 
@@ -207,7 +204,7 @@ export class BaseStackable {
207
204
  }
208
205
  }
209
206
 
210
- async startWithCommand (command, loader) {
207
+ async startWithCommand (command, loader, scripts) {
211
208
  const config = this.configManager.current
212
209
  const basePath = config.application?.basePath ? cleanBasePath(config.application?.basePath) : ''
213
210
 
@@ -215,7 +212,8 @@ export class BaseStackable {
215
212
  this.childManager = new ChildManager({
216
213
  logger: this.logger,
217
214
  loader,
218
- context
215
+ context,
216
+ scripts
219
217
  })
220
218
 
221
219
  this.childManager.on('config', config => {
@@ -362,10 +360,6 @@ export class BaseStackable {
362
360
  return format === 'json' ? await this.metricsRegistry.getMetricsAsJSON() : await this.metricsRegistry.metrics()
363
361
  }
364
362
 
365
- async #invalidateHttpCache (opts = {}) {
366
- await globalThis[kITC].send('invalidateHttpCache', opts)
367
- }
368
-
369
363
  getMeta () {
370
364
  return {
371
365
  composer: {
@@ -11,7 +11,7 @@ import { basename, resolve } from 'node:path'
11
11
  import { fileURLToPath } from 'node:url'
12
12
  import { isMainThread } from 'node:worker_threads'
13
13
  import pino from 'pino'
14
- import { Agent, setGlobalDispatcher } from 'undici'
14
+ import { getGlobalDispatcher, setGlobalDispatcher } from 'undici'
15
15
  import { WebSocket } from 'ws'
16
16
  import { exitCodes } from '../errors.js'
17
17
  import { importFile } from '../utils.js'
@@ -269,8 +269,7 @@ export class ChildProcess extends ITC {
269
269
  }
270
270
 
271
271
  #setupInterceptors () {
272
- const globalDispatcher = new Agent().compose(createInterceptor(this))
273
- setGlobalDispatcher(globalDispatcher)
272
+ setGlobalDispatcher(getGlobalDispatcher().compose(createInterceptor(this)))
274
273
  }
275
274
 
276
275
  #setupHandlers () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/basic",
3
- "version": "2.19.0-alpha.5",
3
+ "version": "2.19.0-alpha.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -21,13 +21,13 @@
21
21
  "pino-abstract-transport": "^2.0.0",
22
22
  "semver": "^7.6.3",
23
23
  "split2": "^4.2.0",
24
- "undici": "^7.0.0",
24
+ "undici": "^6.19.5",
25
25
  "ws": "^8.18.0",
26
- "@platformatic/config": "2.19.0-alpha.5",
27
- "@platformatic/itc": "2.19.0-alpha.5",
28
- "@platformatic/metrics": "2.19.0-alpha.5",
29
- "@platformatic/utils": "2.19.0-alpha.5",
30
- "@platformatic/telemetry": "2.19.0-alpha.5"
26
+ "@platformatic/itc": "2.19.0-alpha.7",
27
+ "@platformatic/config": "2.19.0-alpha.7",
28
+ "@platformatic/utils": "2.19.0-alpha.7",
29
+ "@platformatic/metrics": "2.19.0-alpha.7",
30
+ "@platformatic/telemetry": "2.19.0-alpha.7"
31
31
  },
32
32
  "devDependencies": {
33
33
  "borp": "^0.19.0",
@@ -36,7 +36,7 @@
36
36
  "fastify": "^5.0.0",
37
37
  "json-schema-to-typescript": "^15.0.0",
38
38
  "neostandard": "^0.11.1",
39
- "next": "^14.2.5",
39
+ "next": "^15.0.0",
40
40
  "react": "^18.3.1",
41
41
  "react-dom": "^18.3.1",
42
42
  "typescript": "^5.5.4",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.19.0-alpha.5.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/basic/2.19.0-alpha.7.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Stackable",
5
5
  "type": "object",