@symbo.ls/cli 2.27.18 → 2.28.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/bin/sync.js +25 -10
- package/package.json +5 -5
package/bin/sync.js
CHANGED
|
@@ -10,30 +10,37 @@ import * as socketClient from '@symbo.ls/socket/client.js'
|
|
|
10
10
|
import { fetchFromCli } from './fetch.js'
|
|
11
11
|
import { convertFromCli } from './convert.js'
|
|
12
12
|
|
|
13
|
-
const { debounce } =
|
|
13
|
+
const { debounce } = utils.default || utils
|
|
14
14
|
|
|
15
|
-
const SOCKET_API_URL_LOCAL = 'http://localhost:
|
|
16
|
-
const SOCKET_API_URL = 'https://
|
|
15
|
+
const SOCKET_API_URL_LOCAL = 'http://localhost:13335/'
|
|
16
|
+
const SOCKET_API_URL = 'https://api.symbols.app/'
|
|
17
17
|
|
|
18
|
-
const debugMsg = chalk.dim(
|
|
18
|
+
const debugMsg = chalk.dim(
|
|
19
|
+
'Use --verbose to debug the error or open the issue at https://github.com/symbo-ls/smbls'
|
|
20
|
+
)
|
|
19
21
|
|
|
20
22
|
const RC_PATH = process.cwd() + '/symbols.json'
|
|
21
23
|
let rc = {}
|
|
22
24
|
try {
|
|
23
25
|
rc = loadModule(RC_PATH) // eslint-disable-line
|
|
24
|
-
} catch (e) {
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error('Please include symbols.json to your root of respository')
|
|
28
|
+
}
|
|
25
29
|
|
|
26
30
|
program
|
|
27
31
|
.command('sync')
|
|
28
32
|
.description('Realtime sync with Symbols')
|
|
29
33
|
.option('-d, --dev', 'Running from local server')
|
|
30
34
|
.option('-v, --verbose', 'Verbose errors and warnings')
|
|
31
|
-
.option(
|
|
35
|
+
.option(
|
|
36
|
+
'-k, --key',
|
|
37
|
+
'Bypass the symbols.json key, overriding the key manually'
|
|
38
|
+
)
|
|
32
39
|
.option('-f, --fetch', 'Verbose errors and warnings', true)
|
|
33
40
|
.option('--convert', 'Verbose errors and warnings', true)
|
|
34
41
|
.option('--update', 'overriding changes from platform', true)
|
|
35
42
|
.option('--verbose-code', 'Verbose errors and warnings')
|
|
36
|
-
.action(async
|
|
43
|
+
.action(async opts => {
|
|
37
44
|
const { dev, verbose, fetch: fetchOpt, convert: convertOpt } = opts
|
|
38
45
|
|
|
39
46
|
if (fetchOpt) {
|
|
@@ -61,7 +68,13 @@ program
|
|
|
61
68
|
source: 'cli',
|
|
62
69
|
socketUrl,
|
|
63
70
|
onConnect: (id, socket) => {
|
|
64
|
-
console.log(
|
|
71
|
+
console.log(
|
|
72
|
+
'Connected to',
|
|
73
|
+
chalk.green(key),
|
|
74
|
+
'from',
|
|
75
|
+
chalk.bold('Symbols'),
|
|
76
|
+
'socket server'
|
|
77
|
+
)
|
|
65
78
|
console.log('Socket id:', id)
|
|
66
79
|
console.log(chalk.dim('\nListening to updates...\n'))
|
|
67
80
|
},
|
|
@@ -83,7 +96,8 @@ program
|
|
|
83
96
|
console.log(chalk.dim('\n----------------\n'))
|
|
84
97
|
console.log(chalk.dim('Received update:'))
|
|
85
98
|
console.log(Object.keys(d).join(', '))
|
|
86
|
-
if (verboseCode)
|
|
99
|
+
if (verboseCode)
|
|
100
|
+
console.log(chalk.dim(JSON.stringify(d, null, prettify ?? 2)))
|
|
87
101
|
|
|
88
102
|
if (distDir) {
|
|
89
103
|
if (fetchOpt) {
|
|
@@ -98,7 +112,8 @@ program
|
|
|
98
112
|
|
|
99
113
|
if (d.components && convertOpt && framework) {
|
|
100
114
|
convertFromCli(d.components, {
|
|
101
|
-
...options,
|
|
115
|
+
...options,
|
|
116
|
+
framework
|
|
102
117
|
})
|
|
103
118
|
}
|
|
104
119
|
}, 1500),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.1",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"vpatch": "npm version patch && npm publish"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@symbo.ls/fetch": "^2.
|
|
19
|
-
"@symbo.ls/init": "^2.
|
|
20
|
-
"@symbo.ls/socket": "^2.
|
|
18
|
+
"@symbo.ls/fetch": "^2.28.1",
|
|
19
|
+
"@symbo.ls/init": "^2.28.1",
|
|
20
|
+
"@symbo.ls/socket": "^2.28.1",
|
|
21
21
|
"chalk": "^5.4.1",
|
|
22
22
|
"commander": "^13.1.0",
|
|
23
23
|
"diff": "^5.2.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"node-fetch": "^3.3.2",
|
|
27
27
|
"v8-compile-cache": "^2.4.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "371cc070cdca345fcd7ea73558d336a03c847825"
|
|
30
30
|
}
|