@platformatic/runtime 2.14.0 → 2.15.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/runtime.js +15 -0
- package/lib/worker/default-stackable.js +1 -0
- package/lib/worker/itc.js +2 -6
- 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 HttpsSchemasPlatformaticDevPlatformaticRuntime2150Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
package/lib/runtime.js
CHANGED
|
@@ -721,6 +721,21 @@ class Runtime extends EventEmitter {
|
|
|
721
721
|
return createReadStream(filePath)
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
+
async sendCommandToService (id, name, message) {
|
|
725
|
+
const service = await this.#getServiceById(id)
|
|
726
|
+
|
|
727
|
+
try {
|
|
728
|
+
return await sendViaITC(service, name, message)
|
|
729
|
+
} catch (e) {
|
|
730
|
+
// The service exports no meta, return an empty object
|
|
731
|
+
if (e.code === 'PLT_ITC_HANDLER_NOT_FOUND') {
|
|
732
|
+
return {}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
throw e
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
|
|
724
739
|
#updateStatus (status) {
|
|
725
740
|
this.#status = status
|
|
726
741
|
this.emit(status)
|
package/lib/worker/itc.js
CHANGED
|
@@ -72,12 +72,8 @@ function setupITC (app, service, dispatcher) {
|
|
|
72
72
|
await app.listen()
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const dispatchFunc = await app.stackable.getDispatchFunc()
|
|
78
|
-
dispatcher.replaceServer(url ?? dispatchFunc)
|
|
79
|
-
|
|
80
|
-
return service.entrypoint ? url : null
|
|
75
|
+
dispatcher.replaceServer(await app.stackable.getDispatchTarget())
|
|
76
|
+
return service.entrypoint ? app.stackable.getUrl() : null
|
|
81
77
|
},
|
|
82
78
|
|
|
83
79
|
async stop () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.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/
|
|
39
|
-
"@platformatic/
|
|
40
|
-
"@platformatic/
|
|
41
|
-
"@platformatic/service": "2.
|
|
42
|
-
"@platformatic/sql-
|
|
43
|
-
"@platformatic/sql-
|
|
38
|
+
"@platformatic/db": "2.15.0",
|
|
39
|
+
"@platformatic/node": "2.15.0",
|
|
40
|
+
"@platformatic/composer": "2.15.0",
|
|
41
|
+
"@platformatic/service": "2.15.0",
|
|
42
|
+
"@platformatic/sql-graphql": "2.15.0",
|
|
43
|
+
"@platformatic/sql-mapper": "2.15.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@fastify/error": "^4.0.0",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"undici": "^6.9.0",
|
|
71
71
|
"undici-thread-interceptor": "^0.9.0",
|
|
72
72
|
"ws": "^8.16.0",
|
|
73
|
-
"@platformatic/basic": "2.
|
|
74
|
-
"@platformatic/
|
|
75
|
-
"@platformatic/config": "2.
|
|
76
|
-
"@platformatic/
|
|
77
|
-
"@platformatic/
|
|
78
|
-
"@platformatic/
|
|
79
|
-
"@platformatic/utils": "2.
|
|
73
|
+
"@platformatic/basic": "2.15.0",
|
|
74
|
+
"@platformatic/generators": "2.15.0",
|
|
75
|
+
"@platformatic/config": "2.15.0",
|
|
76
|
+
"@platformatic/ts-compiler": "2.15.0",
|
|
77
|
+
"@platformatic/itc": "2.15.0",
|
|
78
|
+
"@platformatic/telemetry": "2.15.0",
|
|
79
|
+
"@platformatic/utils": "2.15.0"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
|
package/schema.json
CHANGED