miolo-cli 3.0.0-beta.203 → 3.0.0-beta.204
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/package.json +2 -2
- package/src/index.mjs +12 -9
- package/src/socket/index.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miolo-cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.204",
|
|
4
4
|
"description": "cli utils for miolo",
|
|
5
5
|
"author": "Donato Lorenzo <donato@afialapis.com>",
|
|
6
6
|
"contributors": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prepublishOnly": "npm run lint"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"qs": "^6.15.
|
|
33
|
+
"qs": "^6.15.2",
|
|
34
34
|
"socket.io-client": "^4.8.3"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
package/src/index.mjs
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import { init_catcher } from "./catcher/index.mjs"
|
|
2
2
|
import { init_fetcher } from "./fetcher/index.mjs"
|
|
3
|
-
|
|
3
|
+
import { init_socket } from "./socket/index.mjs"
|
|
4
4
|
|
|
5
5
|
export function miolo_client(context) {
|
|
6
6
|
const { config } = context
|
|
7
7
|
|
|
8
|
+
console.log(`[miolo-cli] init_fetcher`)
|
|
8
9
|
const fetcher = init_fetcher(config)
|
|
9
10
|
|
|
10
11
|
if (config?.catcher_url) {
|
|
12
|
+
console.log(`[miolo-cli] init_catcher at ${config?.catcher_url}`)
|
|
11
13
|
init_catcher(config?.catcher_url, fetcher)
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
let socket
|
|
17
|
+
if (config?.socket?.enabled === true) {
|
|
18
|
+
console.log(`[miolo-cli] init_socket at ${config?.socket?.url || "default url"}`)
|
|
19
|
+
const url = config?.socket?.url
|
|
20
|
+
const options = config?.socket?.options
|
|
21
|
+
socket = init_socket(url, options)
|
|
22
|
+
}
|
|
20
23
|
|
|
21
24
|
const miolo_obj = {
|
|
22
|
-
fetcher
|
|
23
|
-
|
|
25
|
+
fetcher,
|
|
26
|
+
socket
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
return miolo_obj
|
package/src/socket/index.mjs
CHANGED