pinokiod 1.1.30 → 1.1.32
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/kernel/api/index.js
CHANGED
|
@@ -39,12 +39,12 @@ class Api {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
async startProxy(scriptPath, uri, name) {
|
|
42
|
+
async startProxy(scriptPath, uri, name, options) {
|
|
43
43
|
this.checkProxy({ uri, name })
|
|
44
44
|
// if the name exists, throw error
|
|
45
45
|
// if the uri exists, throw error
|
|
46
46
|
console.log("startProxy", { scriptPath, uri, proxies: this.proxies })
|
|
47
|
-
let proxy_uri = await this.lproxy.start(uri)
|
|
47
|
+
let proxy_uri = await this.lproxy.start(uri, options)
|
|
48
48
|
console.log({ proxy_uri, uri })
|
|
49
49
|
if (this.proxies[scriptPath]) {
|
|
50
50
|
this.proxies[scriptPath].push({ target: uri, proxy: proxy_uri, name})
|
|
@@ -5,14 +5,17 @@ class P {
|
|
|
5
5
|
"method": "proxy.start",
|
|
6
6
|
"params": {
|
|
7
7
|
"name",
|
|
8
|
-
"uri": "http://localhost:8192"
|
|
8
|
+
"uri": "http://localhost:8192",
|
|
9
|
+
"ws": false
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
*/
|
|
12
13
|
ondata({
|
|
13
14
|
raw: `\r\n[Start proxy] ${req.params.name} ${req.params.uri}\r\n`
|
|
14
15
|
})
|
|
15
|
-
let
|
|
16
|
+
let { name, uri, ...o } = req.params
|
|
17
|
+
console.log("proxy.start", { name, uri, o })
|
|
18
|
+
let response = await kernel.api.startProxy(req.parent.path, req.params.uri, req.params.name, o)
|
|
16
19
|
ondata({
|
|
17
20
|
raw: "Proxy Started"
|
|
18
21
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"jsonpath-plus": "^7.2.0",
|
|
38
38
|
"key-store": "^1.2.0",
|
|
39
39
|
"lodash": "^4.17.21",
|
|
40
|
-
"lproxy": "^0.0.
|
|
40
|
+
"lproxy": "^0.0.4",
|
|
41
41
|
"marked": "^5.0.1",
|
|
42
42
|
"mime-types": "^2.1.35",
|
|
43
43
|
"multer": "^1.4.5-lts.1",
|