@platformatic/runtime 2.23.0 → 2.24.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/config.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime2230Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2240Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/schema.js CHANGED
@@ -60,6 +60,10 @@ const services = {
60
60
  sourceMaps: {
61
61
  type: 'boolean',
62
62
  default: false
63
+ },
64
+ packageManager: {
65
+ type: 'string',
66
+ enum: ['npm', 'pnpm', 'yarn']
63
67
  }
64
68
  }
65
69
  }
package/lib/worker/app.js CHANGED
@@ -3,7 +3,9 @@
3
3
  const { existsSync } = require('node:fs')
4
4
  const { EventEmitter } = require('node:events')
5
5
  const { resolve } = require('node:path')
6
- const { performance: { eventLoopUtilization } } = require('node:perf_hooks')
6
+ const {
7
+ performance: { eventLoopUtilization }
8
+ } = require('node:perf_hooks')
7
9
  const { workerData } = require('node:worker_threads')
8
10
  const { ConfigManager } = require('@platformatic/config')
9
11
  const { FileWatcher } = require('@platformatic/utils')
@@ -128,10 +130,6 @@ class PlatformaticApp extends EventEmitter {
128
130
  })
129
131
  this.stackable = this.#wrapStackable(stackable)
130
132
 
131
- this.once('start', () => {
132
- this.stackable.collectMetrics()
133
- })
134
-
135
133
  this.#updateDispatcher()
136
134
  } catch (err) {
137
135
  if (err.validationErrors) {
@@ -17,7 +17,6 @@ const defaultStackable = {
17
17
  getOpenapiSchema: () => null,
18
18
  getGraphqlSchema: () => null,
19
19
  getMeta: () => ({}),
20
- collectMetrics: () => {},
21
20
  getMetrics: () => null,
22
21
  inject: () => {
23
22
  throw new Error('Stackable inject not implemented')
@@ -1,5 +1,7 @@
1
1
  'use strict'
2
2
 
3
+ const { features } = require('@platformatic/utils')
4
+
3
5
  class RoundRobinMap extends Map {
4
6
  #instances
5
7
 
@@ -19,7 +21,7 @@ class RoundRobinMap extends Map {
19
21
  for (const service of services) {
20
22
  let count = service.workers ?? defaultInstances
21
23
 
22
- if (service.entrypoint || !production) {
24
+ if (!production || (service.entrypoint && !features.node.reusePort)) {
23
25
  count = 1
24
26
  }
25
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -35,12 +35,12 @@
35
35
  "typescript": "^5.5.4",
36
36
  "undici-oidc-interceptor": "^0.5.0",
37
37
  "why-is-node-running": "^2.2.2",
38
- "@platformatic/composer": "2.23.0",
39
- "@platformatic/db": "2.23.0",
40
- "@platformatic/node": "2.23.0",
41
- "@platformatic/service": "2.23.0",
42
- "@platformatic/sql-graphql": "2.23.0",
43
- "@platformatic/sql-mapper": "2.23.0"
38
+ "@platformatic/composer": "2.24.0",
39
+ "@platformatic/db": "2.24.0",
40
+ "@platformatic/node": "2.24.0",
41
+ "@platformatic/service": "2.24.0",
42
+ "@platformatic/sql-graphql": "2.24.0",
43
+ "@platformatic/sql-mapper": "2.24.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "@fastify/error": "^4.0.0",
@@ -72,13 +72,13 @@
72
72
  "undici": "^7.0.0",
73
73
  "undici-thread-interceptor": "^0.10.0",
74
74
  "ws": "^8.16.0",
75
- "@platformatic/basic": "2.23.0",
76
- "@platformatic/config": "2.23.0",
77
- "@platformatic/itc": "2.23.0",
78
- "@platformatic/generators": "2.23.0",
79
- "@platformatic/telemetry": "2.23.0",
80
- "@platformatic/ts-compiler": "2.23.0",
81
- "@platformatic/utils": "2.23.0"
75
+ "@platformatic/basic": "2.24.0",
76
+ "@platformatic/generators": "2.24.0",
77
+ "@platformatic/telemetry": "2.24.0",
78
+ "@platformatic/config": "2.24.0",
79
+ "@platformatic/itc": "2.24.0",
80
+ "@platformatic/ts-compiler": "2.24.0",
81
+ "@platformatic/utils": "2.24.0"
82
82
  },
83
83
  "scripts": {
84
84
  "test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.23.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.24.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {
@@ -313,6 +313,14 @@
313
313
  "sourceMaps": {
314
314
  "type": "boolean",
315
315
  "default": false
316
+ },
317
+ "packageManager": {
318
+ "type": "string",
319
+ "enum": [
320
+ "npm",
321
+ "pnpm",
322
+ "yarn"
323
+ ]
316
324
  }
317
325
  }
318
326
  }
@@ -483,6 +491,14 @@
483
491
  "sourceMaps": {
484
492
  "type": "boolean",
485
493
  "default": false
494
+ },
495
+ "packageManager": {
496
+ "type": "string",
497
+ "enum": [
498
+ "npm",
499
+ "pnpm",
500
+ "yarn"
501
+ ]
486
502
  }
487
503
  }
488
504
  }