@hellocoop/quickstart 1.0.9 → 1.0.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/package.json +11 -7
- package/quickstart.js +12 -4
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hellocoop/quickstart",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Provides a CLI to start the Hello Quickstart web app and return a client_id",
|
|
5
5
|
"module": "quickstart.js",
|
|
6
|
-
"bin":{
|
|
7
|
-
"quickstart":"./index.mjs"
|
|
6
|
+
"bin": {
|
|
7
|
+
"quickstart": "./index.mjs"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "git+https://github.com/hellocoop/
|
|
14
|
+
"url": "git+https://github.com/hellocoop/packages.git"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"hello",
|
|
@@ -19,12 +19,16 @@
|
|
|
19
19
|
"sso",
|
|
20
20
|
"quickstart"
|
|
21
21
|
],
|
|
22
|
-
"author":
|
|
22
|
+
"author": {
|
|
23
|
+
"name": "Hello Identity Co-op",
|
|
24
|
+
"email": "contact@hello.coop",
|
|
25
|
+
"url": "https://hello.coop"
|
|
26
|
+
},
|
|
23
27
|
"license": "MIT",
|
|
24
28
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/hellocoop/
|
|
29
|
+
"url": "https://github.com/hellocoop/packages/issues"
|
|
26
30
|
},
|
|
27
|
-
"homepage": "https://github.com/hellocoop/
|
|
31
|
+
"homepage": "https://github.com/hellocoop/packages#readme",
|
|
28
32
|
"dependencies": {
|
|
29
33
|
"get-port": "^7.0.0",
|
|
30
34
|
"open": "^9.1.0"
|
package/quickstart.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import open from 'open'
|
|
3
3
|
import getPort from 'get-port'
|
|
4
|
+
import readline from 'readline'
|
|
4
5
|
import * as http from 'http'
|
|
5
6
|
import { URLSearchParams, parse } from 'url';
|
|
6
7
|
import page from './page.js'
|
|
7
8
|
|
|
8
|
-
|
|
9
9
|
const quickstart = async function (params) {
|
|
10
10
|
return new Promise(async (resolve) => {
|
|
11
11
|
|
|
@@ -39,10 +39,18 @@ const quickstart = async function (params) {
|
|
|
39
39
|
const queryString = new URLSearchParams(queryParams).toString();
|
|
40
40
|
const quickstartURL = `https://quickstart.hello.coop/?${queryString}`
|
|
41
41
|
server.listen(port, host, () => {
|
|
42
|
-
console.log('Obtaining a client_id from Hellō Quickstart using')
|
|
42
|
+
console.log('Obtaining a client_id from Hellō Quickstart using:')
|
|
43
43
|
console.log(quickstartURL)
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const rl = readline.createInterface({
|
|
45
|
+
input: process.stdin,
|
|
46
|
+
output: process.stdout
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
rl.question('Press ENTER to open in the browser...', (answer) => {
|
|
50
|
+
open(quickstartURL)
|
|
51
|
+
rl.close();
|
|
52
|
+
});
|
|
53
|
+
|
|
46
54
|
})
|
|
47
55
|
})
|
|
48
56
|
}
|