@symbo.ls/cli 0.6.10 → 0.6.18
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/fetch.js +8 -5
- package/bin/require.js +2 -1
- package/package.json +9 -10
package/bin/fetch.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import 'v8-compile-cache'
|
|
4
|
-
import
|
|
5
|
-
import { Command } from 'commander'
|
|
4
|
+
import fs from 'fs'
|
|
6
5
|
import fetch from 'node-fetch'
|
|
7
6
|
import chalk from 'chalk'
|
|
7
|
+
import { loadModule } from './require.js'
|
|
8
|
+
import { Command } from 'commander'
|
|
8
9
|
|
|
9
10
|
const pkg = loadModule('../package.json')
|
|
10
11
|
const program = new Command()
|
|
11
12
|
|
|
12
13
|
const API_URL = 'https://api.symbols.app/' // eslint-disable-line
|
|
13
|
-
const DEFAULT_CONFIG = 'https://raw.githubusercontent.com/symbo-ls/uikit/
|
|
14
|
+
const DEFAULT_CONFIG = 'https://raw.githubusercontent.com/symbo-ls/uikit/feature/monorepo/packages/config-default/src/config.json'
|
|
15
|
+
const LOG_DEST = 'https://raw.githubusercontent.com/symbo-ls/uikit/packages/config-default/src/config.json'
|
|
14
16
|
|
|
15
17
|
program
|
|
16
18
|
.version(pkg.version)
|
|
@@ -24,10 +26,11 @@ program
|
|
|
24
26
|
const { version, ...config } = body
|
|
25
27
|
|
|
26
28
|
console.log('')
|
|
27
|
-
console.log(chalk.bold('Symbols'), 'config
|
|
29
|
+
console.log(chalk.bold('Symbols'), 'config fetched:', chalk.green(version))
|
|
30
|
+
console.log(chalk.dim('- Default config from:'), chalk.dim.underline(LOG_DEST))
|
|
28
31
|
|
|
29
32
|
const path = process.cwd() + '/.symbolsrc.json'
|
|
30
|
-
console.log(chalk.dim('
|
|
33
|
+
console.log(chalk.dim('- .symbolsrc.json created:'), chalk.dim.underline(path))
|
|
31
34
|
console.log('')
|
|
32
35
|
|
|
33
36
|
fs.writeFile(path, JSON.stringify(body), err => {
|
package/bin/require.js
CHANGED
|
@@ -4,6 +4,7 @@ export const loadModule = async (modulePath) => {
|
|
|
4
4
|
try {
|
|
5
5
|
return await import(modulePath)
|
|
6
6
|
} catch (e) {
|
|
7
|
-
|
|
7
|
+
console.warn('Cant found', modulePath)
|
|
8
|
+
// throw new ImportError(`Unable to import module ${modulePath}`)
|
|
8
9
|
}
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "bin/fetch.js",
|
|
6
6
|
"author": "Symbols",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"private": false,
|
|
9
9
|
"type": "module",
|
|
10
10
|
"bin": {
|
|
11
|
-
"symbo-ls": "
|
|
11
|
+
"symbo-ls": "bin/fetch.js"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
|
-
"start": "node bin/fetch.js"
|
|
14
|
+
"start": "node bin/fetch.js",
|
|
15
|
+
"vpush": "git add . && git commit -am 'version update' && git push",
|
|
16
|
+
"vpatch": "npm version patch && npm publish"
|
|
15
17
|
},
|
|
16
18
|
"dependencies": {
|
|
17
19
|
"chalk": "^5.0.0",
|
|
18
20
|
"node-fetch": "^3.1.0",
|
|
21
|
+
"commander": "^8.3.0",
|
|
19
22
|
"v8-compile-cache": "^2.3.0"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
|
-
"
|
|
23
|
-
}
|
|
24
|
-
"env": {
|
|
25
|
-
"process": true
|
|
26
|
-
},
|
|
27
|
-
"gitHead": "6123989a3672237d094929300016f72da7edf822"
|
|
25
|
+
"np": "^7.6.0"
|
|
26
|
+
}
|
|
28
27
|
}
|