@symbo.ls/cli 2.11.192 → 2.11.194
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/convert.js +12 -2
- package/bin/fetch.js +1 -2
- package/bin/sync.js +1 -3
- package/package.json +2 -2
package/bin/convert.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import chalk from 'chalk'
|
|
3
4
|
import { program } from './program.js'
|
|
4
|
-
import
|
|
5
|
-
const { convert } = smblsconvert.default
|
|
5
|
+
import { convert, convertDomqlModule } from '@symbo.ls/convert'
|
|
6
6
|
|
|
7
7
|
const TMP_DIR_NAME = '.smbls_convert_tmp'
|
|
8
8
|
|
|
9
|
+
export function convertFromCli (data, opts) {
|
|
10
|
+
const { framework, verbose, verboseCode } = opts
|
|
11
|
+
console.log(chalk.dim('\n----------------\n'))
|
|
12
|
+
console.log('Converting components to', chalk.bold(framework))
|
|
13
|
+
const convertedStrings = convertDomqlModule(data, null, framework)
|
|
14
|
+
if (verboseCode) console.log(convertedStrings)
|
|
15
|
+
console.log(chalk.bold.green('\nSuccessfully converted'))
|
|
16
|
+
return verbose
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
program
|
|
10
20
|
.command('convert')
|
|
11
21
|
.description('Convert and copy all DomQL components under a directory')
|
package/bin/fetch.js
CHANGED
|
@@ -6,9 +6,8 @@ import { loadModule } from './require.js'
|
|
|
6
6
|
import { program } from './program.js'
|
|
7
7
|
import * as fetch from '@symbo.ls/fetch'
|
|
8
8
|
import * as utils from '@domql/utils'
|
|
9
|
-
import
|
|
9
|
+
import { convertFromCli } from './convert.js'
|
|
10
10
|
|
|
11
|
-
const { convertFromCli } = smblsconvert.default
|
|
12
11
|
const { isObjectLike } = utils.default
|
|
13
12
|
const { fetchRemote } = fetch.default
|
|
14
13
|
|
package/bin/sync.js
CHANGED
|
@@ -7,9 +7,7 @@ import { updateDynamycFile } from '@symbo.ls/socket'
|
|
|
7
7
|
|
|
8
8
|
import * as socketClient from '@symbo.ls/socket/client.js'
|
|
9
9
|
import { fetchFromCli } from './fetch.js'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const { convertFromCli } = smblsconvert.default
|
|
10
|
+
import { convertFromCli } from './convert.js'
|
|
13
11
|
|
|
14
12
|
const SOCKET_API_URL_LOCAL = 'http://localhost:13336/'
|
|
15
13
|
const SOCKET_API_URL = 'https://socket.symbols.app/'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.194",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@symbo.ls/convert": "latest"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a3cac5bdbabbf0860e278e7362d7326f9c9c075e"
|
|
31
31
|
}
|