@symbo.ls/cli 2.11.21 → 2.11.23

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.
Files changed (2) hide show
  1. package/bin/convert.js +28 -29
  2. package/package.json +2 -2
package/bin/convert.js CHANGED
@@ -72,35 +72,34 @@ function convertDomqlModule (domqlModule, desiredFormat, options) {
72
72
  continue
73
73
  }
74
74
  console.log(key)
75
- // try {
76
- // import('domql-to-mitosis').then(({ convert }) => {
77
- // console.log('convert', convert)
78
- // if (convert) {
79
- console.group()
80
- const component = domqlModule[key]
81
- component.__name = key
82
-
83
- const out = convert(component, desiredFormat, {
84
- verbose: false,
85
- exportDefault: exportCount === 1,
86
- returnMitosisIR: true,
87
- importsToRemove: uniqueImports,
88
- removeReactImport: !first,
89
- removeUseContextImport
90
- })
91
-
92
- convertedStr = convertedStr + out.str + '\n'
93
- uniqueImports.push(...out.mitosisIR.imports)
94
- first = false
95
- if (out.mitosisIR._useContext) { removeUseContextImport = true }
96
- console.groupEnd()
97
- // } else {
98
- // throw new Error('Convert from `domql-to-mitosis` is not defined. Try to install `domql-to-mitosis` and run this command again.')
99
- // }
100
- // })
101
- // } catch (err) {
102
- // throw new Error('`domql-to-mitosis` is not found.')
103
- // }
75
+ try {
76
+ // import('domql-to-mitosis').then(({ convert }) => {
77
+ if (convert) {
78
+ console.group()
79
+ const component = domqlModule[key]
80
+ component.__name = key
81
+
82
+ const out = convert(component, desiredFormat, {
83
+ verbose: false,
84
+ exportDefault: exportCount === 1,
85
+ returnMitosisIR: true,
86
+ importsToRemove: uniqueImports,
87
+ removeReactImport: !first,
88
+ removeUseContextImport
89
+ })
90
+
91
+ convertedStr = convertedStr + out.str + '\n'
92
+ uniqueImports.push(...out.mitosisIR.imports)
93
+ first = false
94
+ if (out.mitosisIR._useContext) { removeUseContextImport = true }
95
+ console.groupEnd()
96
+ } else {
97
+ throw new Error('Convert from `domql-to-mitosis` is not defined. Try to install `domql-to-mitosis` and run this command again.')
98
+ }
99
+ // })
100
+ } catch (err) {
101
+ throw new Error('`domql-to-mitosis` is not found.')
102
+ }
104
103
  }
105
104
  console.groupEnd()
106
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/cli",
3
- "version": "2.11.21",
3
+ "version": "2.11.23",
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
  "domql-to-mitosis": "latest"
29
29
  },
30
- "gitHead": "56cbd0c8ecdf0ec6427bcbfa7f853dbd04020b9d"
30
+ "gitHead": "9d882b686390910621a0cb1d0d1cbd6fdf876fc8"
31
31
  }