@symbo.ls/cli 0.6.9 → 0.6.10
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 +2 -18
- package/bin/login.js +15 -0
- package/bin/require.js +9 -0
- package/package.json +9 -6
package/bin/fetch.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import 'v8-compile-cache'
|
|
4
|
-
import {
|
|
4
|
+
import { loadModule } from './require.js'
|
|
5
5
|
import { Command } from 'commander'
|
|
6
6
|
import fetch from 'node-fetch'
|
|
7
7
|
import chalk from 'chalk'
|
|
8
|
-
import fs from 'fs'
|
|
9
8
|
|
|
10
|
-
const
|
|
11
|
-
const pkg = require('../package.json')
|
|
9
|
+
const pkg = loadModule('../package.json')
|
|
12
10
|
const program = new Command()
|
|
13
11
|
|
|
14
12
|
const API_URL = 'https://api.symbols.app/' // eslint-disable-line
|
|
@@ -17,20 +15,6 @@ const DEFAULT_CONFIG = 'https://raw.githubusercontent.com/symbo-ls/uikit/8e7026a
|
|
|
17
15
|
program
|
|
18
16
|
.version(pkg.version)
|
|
19
17
|
|
|
20
|
-
// program
|
|
21
|
-
// .command('login [destination]')
|
|
22
|
-
// .description('Sign in to Symbols')
|
|
23
|
-
// .argument('<username>', 'user to login')
|
|
24
|
-
// .argument('[password]', 'password for user, if required', 'no password given')
|
|
25
|
-
// .action(async (username, password) => {
|
|
26
|
-
// console.log('username:', username)
|
|
27
|
-
// console.log('password:', password)
|
|
28
|
-
|
|
29
|
-
// const response = await fetch(API_URL)
|
|
30
|
-
// const body = await response.json()
|
|
31
|
-
// console.log(body)
|
|
32
|
-
// })
|
|
33
|
-
|
|
34
18
|
program
|
|
35
19
|
.command('fetch [destination]')
|
|
36
20
|
.description('Fetch symbols')
|
package/bin/login.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
program
|
|
4
|
+
.command('login [destination]')
|
|
5
|
+
.description('Sign in to Symbols')
|
|
6
|
+
.argument('<username>', 'user to login')
|
|
7
|
+
.argument('[password]', 'password for user, if required', 'no password given')
|
|
8
|
+
.action(async (username, password) => {
|
|
9
|
+
console.log('username:', username)
|
|
10
|
+
console.log('password:', password)
|
|
11
|
+
|
|
12
|
+
const response = await fetch(API_URL)
|
|
13
|
+
const body = await response.json()
|
|
14
|
+
console.log(body)
|
|
15
|
+
})
|
package/bin/require.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "Fetch your Symbols configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Symbols",
|
|
@@ -8,18 +8,21 @@
|
|
|
8
8
|
"private": false,
|
|
9
9
|
"type": "module",
|
|
10
10
|
"bin": {
|
|
11
|
-
"symbo-ls": "
|
|
11
|
+
"symbo-ls": "dist/fetch.js"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"start": "node bin/fetch.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"chalk": "^5.0.0",
|
|
18
|
-
"node-fetch": "^3.1.0"
|
|
18
|
+
"node-fetch": "^3.1.0",
|
|
19
|
+
"v8-compile-cache": "^2.3.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"commander": "^8.3.0"
|
|
22
|
-
|
|
22
|
+
"commander": "^8.3.0"
|
|
23
|
+
},
|
|
24
|
+
"env": {
|
|
25
|
+
"process": true
|
|
23
26
|
},
|
|
24
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "6123989a3672237d094929300016f72da7edf822"
|
|
25
28
|
}
|