@platformatic/control 3.27.0 → 3.28.0-alpha.1
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/lib/index.js +12 -0
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -495,6 +495,18 @@ export class RuntimeApiClient {
|
|
|
495
495
|
return webSocketStream
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
+
getRuntimeApplicationRepl (pid, applicationId) {
|
|
499
|
+
const socketPath = this.#getSocketPathFromPid(pid)
|
|
500
|
+
|
|
501
|
+
const protocol = platform() === 'win32' ? 'ws+unix:' : 'ws+unix://'
|
|
502
|
+
|
|
503
|
+
const webSocketUrl = protocol + socketPath + `:/api/v1/applications/${applicationId}/repl`
|
|
504
|
+
const ws = new WebSocket(webSocketUrl)
|
|
505
|
+
this.#webSockets.add(ws)
|
|
506
|
+
|
|
507
|
+
return ws
|
|
508
|
+
}
|
|
509
|
+
|
|
498
510
|
async getRuntimeLogsStream (pid, logsId, options = {}) {
|
|
499
511
|
const runtimePID = options.runtimePID ?? pid
|
|
500
512
|
const client = this.#getUndiciClient(pid)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/control",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.28.0-alpha.1",
|
|
4
4
|
"description": "Platformatic Control",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"split2": "^4.2.0",
|
|
24
24
|
"tsd": "^0.33.0",
|
|
25
25
|
"typescript": "^5.5.4",
|
|
26
|
-
"@platformatic/service": "3.
|
|
27
|
-
"@platformatic/runtime": "3.
|
|
26
|
+
"@platformatic/service": "3.28.0-alpha.1",
|
|
27
|
+
"@platformatic/runtime": "3.28.0-alpha.1"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@fastify/error": "^4.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"table": "^6.8.1",
|
|
35
35
|
"undici": "^7.0.0",
|
|
36
36
|
"ws": "^8.16.0",
|
|
37
|
-
"@platformatic/foundation": "3.
|
|
37
|
+
"@platformatic/foundation": "3.28.0-alpha.1"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=22.19.0"
|