@symbo.ls/socket 3.1.2 → 3.2.3
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/client.js +4 -5
- package/package.json +6 -7
package/client.js
CHANGED
|
@@ -4,7 +4,6 @@ import * as utils from '@domql/utils'
|
|
|
4
4
|
import io from 'socket.io-client'
|
|
5
5
|
|
|
6
6
|
const { window, isFunction, isArray } = utils.default || utils
|
|
7
|
-
const ENV = process.env.NODE_ENV
|
|
8
7
|
|
|
9
8
|
const defautlOpts = {}
|
|
10
9
|
|
|
@@ -22,15 +21,15 @@ const getIsDev = options => {
|
|
|
22
21
|
|
|
23
22
|
const getSocketUrl = (options, isDev) => {
|
|
24
23
|
const SOCKET_BACKEND_URL = isDev
|
|
25
|
-
? 'http://localhost:
|
|
26
|
-
: 'https://
|
|
24
|
+
? 'http://localhost:8080/'
|
|
25
|
+
: 'https://api.symbols.app/'
|
|
27
26
|
|
|
28
27
|
const socketUrls = isArray(options.socketUrl)
|
|
29
28
|
? options.socketUrl
|
|
30
29
|
: [options.socketUrl || SOCKET_BACKEND_URL]
|
|
31
30
|
|
|
32
31
|
const primaryUrl = socketUrls[0]
|
|
33
|
-
const secondaryUrl = socketUrls[1] || '
|
|
32
|
+
const secondaryUrl = socketUrls[1] || 'api.symbols.app'
|
|
34
33
|
|
|
35
34
|
return {
|
|
36
35
|
primaryUrl: primaryUrl || SOCKET_BACKEND_URL,
|
|
@@ -77,7 +76,7 @@ export const connect = (key, options = {}) => {
|
|
|
77
76
|
|
|
78
77
|
socket.disconnect()
|
|
79
78
|
|
|
80
|
-
if (
|
|
79
|
+
if (utils.isNotProduction()) {
|
|
81
80
|
console.log(
|
|
82
81
|
'Could not connect to %c' +
|
|
83
82
|
primaryUrl +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/socket",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "Connect your app to Symbols editor",
|
|
5
5
|
"main": "server.js",
|
|
6
6
|
"author": "symbo.ls",
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"start": "nodemon server.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@domql/utils": "^3.
|
|
14
|
-
"@symbo.ls/init": "^3.
|
|
13
|
+
"@domql/utils": "^3.2.3",
|
|
14
|
+
"@symbo.ls/init": "^3.2.3",
|
|
15
15
|
"chalk": "^5.4.1",
|
|
16
16
|
"express": "^4.21.2",
|
|
17
17
|
"http": "^0.0.1-security",
|
|
18
|
-
"
|
|
19
|
-
"socket.io": "^4.
|
|
20
|
-
"socket.io-client": "^4.5.2"
|
|
18
|
+
"socket.io": "^4.8.1",
|
|
19
|
+
"socket.io-client": "^4.8.1"
|
|
21
20
|
},
|
|
22
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681"
|
|
23
22
|
}
|