@platformatic/runtime 2.40.0 → 2.41.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/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 HttpsSchemasPlatformaticDevPlatformaticRuntime2410Json = {
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.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/
|
|
41
|
-
"@platformatic/
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/sql-
|
|
44
|
-
"@platformatic/
|
|
39
|
+
"@platformatic/composer": "2.41.0",
|
|
40
|
+
"@platformatic/node": "2.41.0",
|
|
41
|
+
"@platformatic/service": "2.41.0",
|
|
42
|
+
"@platformatic/db": "2.41.0",
|
|
43
|
+
"@platformatic/sql-graphql": "2.41.0",
|
|
44
|
+
"@platformatic/sql-mapper": "2.41.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/config": "2.
|
|
80
|
-
"@platformatic/generators": "2.
|
|
81
|
-
"@platformatic/itc": "2.
|
|
82
|
-
"@platformatic/telemetry": "2.
|
|
83
|
-
"@platformatic/ts-compiler": "2.
|
|
84
|
-
"@platformatic/utils": "2.
|
|
78
|
+
"@platformatic/basic": "2.41.0",
|
|
79
|
+
"@platformatic/config": "2.41.0",
|
|
80
|
+
"@platformatic/generators": "2.41.0",
|
|
81
|
+
"@platformatic/itc": "2.41.0",
|
|
82
|
+
"@platformatic/telemetry": "2.41.0",
|
|
83
|
+
"@platformatic/ts-compiler": "2.41.0",
|
|
84
|
+
"@platformatic/utils": "2.41.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
|
package/schema.json
CHANGED