@platformatic/runtime 2.23.0 → 2.25.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 +1 -1
- package/lib/config.js +1 -1
- package/lib/schema.js +4 -0
- package/lib/worker/app.js +3 -5
- package/lib/worker/default-stackable.js +0 -1
- package/lib/worker/round-robin-map.js +3 -1
- package/package.json +14 -14
- package/schema.json +17 -1
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
|
|
8
|
+
export type HttpsSchemasPlatformaticDevPlatformaticRuntime2250Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
package/lib/config.js
CHANGED
|
@@ -93,7 +93,7 @@ async function _transformConfig (configManager, args) {
|
|
|
93
93
|
service.path = pathResolve(configManager.dirname, service.path)
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
if (configManager._fixPaths && service.config) {
|
|
96
|
+
if (configManager._fixPaths && service.path && service.config) {
|
|
97
97
|
service.config = pathResolve(service.path, service.config)
|
|
98
98
|
}
|
|
99
99
|
|
package/lib/schema.js
CHANGED
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 {
|
|
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) {
|
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "2.25.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.
|
|
39
|
-
"@platformatic/db": "2.
|
|
40
|
-
"@platformatic/node": "2.
|
|
41
|
-
"@platformatic/service": "2.
|
|
42
|
-
"@platformatic/sql-graphql": "2.
|
|
43
|
-
"@platformatic/sql-mapper": "2.
|
|
38
|
+
"@platformatic/composer": "2.25.0",
|
|
39
|
+
"@platformatic/db": "2.25.0",
|
|
40
|
+
"@platformatic/node": "2.25.0",
|
|
41
|
+
"@platformatic/service": "2.25.0",
|
|
42
|
+
"@platformatic/sql-graphql": "2.25.0",
|
|
43
|
+
"@platformatic/sql-mapper": "2.25.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.
|
|
76
|
-
"@platformatic/
|
|
77
|
-
"@platformatic/
|
|
78
|
-
"@platformatic/
|
|
79
|
-
"@platformatic/telemetry": "2.
|
|
80
|
-
"@platformatic/
|
|
81
|
-
"@platformatic/utils": "2.
|
|
75
|
+
"@platformatic/basic": "2.25.0",
|
|
76
|
+
"@platformatic/generators": "2.25.0",
|
|
77
|
+
"@platformatic/config": "2.25.0",
|
|
78
|
+
"@platformatic/ts-compiler": "2.25.0",
|
|
79
|
+
"@platformatic/telemetry": "2.25.0",
|
|
80
|
+
"@platformatic/itc": "2.25.0",
|
|
81
|
+
"@platformatic/utils": "2.25.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.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.25.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
|
}
|