@platformatic/runtime 2.40.0 → 2.42.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/dependencies.js +5 -1
- package/lib/runtime.js +2 -2
- package/lib/worker/main.js +3 -1
- package/package.json +14 -14
- package/schema.json +1 -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 HttpsSchemasPlatformaticDevPlatformaticRuntime2420Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
package/lib/dependencies.js
CHANGED
|
@@ -7,11 +7,15 @@ const errors = require('./errors')
|
|
|
7
7
|
const { RoundRobinMap } = require('./worker/round-robin-map')
|
|
8
8
|
|
|
9
9
|
function missingDependencyErrorMessage (clientName, service, services) {
|
|
10
|
-
const
|
|
10
|
+
const allNames = services.map(s => s.id).filter(id => id !== service.id).sort()
|
|
11
|
+
const closestName = closest(clientName, allNames)
|
|
11
12
|
let errorMsg = `service '${service.id}' has unknown dependency: '${clientName}'.`
|
|
12
13
|
if (closestName) {
|
|
13
14
|
errorMsg += ` Did you mean '${closestName}'?`
|
|
14
15
|
}
|
|
16
|
+
if (allNames.length) {
|
|
17
|
+
errorMsg += ` Known services are: ${allNames.join(', ')}.`
|
|
18
|
+
}
|
|
15
19
|
return errorMsg
|
|
16
20
|
}
|
|
17
21
|
|
package/lib/runtime.js
CHANGED
|
@@ -158,10 +158,10 @@ class Runtime extends EventEmitter {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
try {
|
|
161
|
-
|
|
161
|
+
checkDependencies(config.services)
|
|
162
162
|
|
|
163
|
+
// Make sure the list exists before computing the dependencies, otherwise some services might not be stopped
|
|
163
164
|
if (autoloadEnabled) {
|
|
164
|
-
checkDependencies(config.services)
|
|
165
165
|
this.#workers = topologicalSort(this.#workers, config)
|
|
166
166
|
}
|
|
167
167
|
|
package/lib/worker/main.js
CHANGED
|
@@ -176,8 +176,10 @@ async function main () {
|
|
|
176
176
|
const hooks = telemetry ? createTelemetryThreadInterceptorHooks() : {}
|
|
177
177
|
// Setup mesh networker
|
|
178
178
|
const threadDispatcher = wire({
|
|
179
|
+
// Specifying the domain is critical to avoid flooding the DNS
|
|
180
|
+
// with requests for a domain that's never going to exist.
|
|
181
|
+
domain: '.plt.local',
|
|
179
182
|
port: parentPort,
|
|
180
|
-
useNetwork: service.useHttp,
|
|
181
183
|
timeout: config.serviceTimeout,
|
|
182
184
|
...hooks
|
|
183
185
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"typescript": "^5.5.4",
|
|
37
37
|
"undici-oidc-interceptor": "^0.5.0",
|
|
38
38
|
"why-is-node-running": "^2.2.2",
|
|
39
|
-
"@platformatic/composer": "2.
|
|
40
|
-
"@platformatic/db": "2.
|
|
41
|
-
"@platformatic/
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/sql-mapper": "2.
|
|
44
|
-
"@platformatic/
|
|
39
|
+
"@platformatic/composer": "2.42.0",
|
|
40
|
+
"@platformatic/db": "2.42.0",
|
|
41
|
+
"@platformatic/service": "2.42.0",
|
|
42
|
+
"@platformatic/node": "2.42.0",
|
|
43
|
+
"@platformatic/sql-mapper": "2.42.0",
|
|
44
|
+
"@platformatic/sql-graphql": "2.42.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"undici": "^7.0.0",
|
|
76
76
|
"undici-thread-interceptor": "^0.11.0",
|
|
77
77
|
"ws": "^8.16.0",
|
|
78
|
-
"@platformatic/basic": "2.
|
|
79
|
-
"@platformatic/
|
|
80
|
-
"@platformatic/
|
|
81
|
-
"@platformatic/itc": "2.
|
|
82
|
-
"@platformatic/telemetry": "2.
|
|
83
|
-
"@platformatic/ts-compiler": "2.
|
|
84
|
-
"@platformatic/utils": "2.
|
|
78
|
+
"@platformatic/basic": "2.42.0",
|
|
79
|
+
"@platformatic/generators": "2.42.0",
|
|
80
|
+
"@platformatic/config": "2.42.0",
|
|
81
|
+
"@platformatic/itc": "2.42.0",
|
|
82
|
+
"@platformatic/telemetry": "2.42.0",
|
|
83
|
+
"@platformatic/ts-compiler": "2.42.0",
|
|
84
|
+
"@platformatic/utils": "2.42.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
|
package/schema.json
CHANGED