@hellocoop/quickstart 2.0.2 → 2.2.1

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/README.md CHANGED
@@ -14,8 +14,8 @@ This will open up a browser window, where you will need to login with Hellō, an
14
14
  - --provider_hint (-p) - space separated string of provider_hint
15
15
  - --suffix (-x) - suffix to add to generated app name
16
16
  - --integration (-i) - integration name shown in console
17
- - --file (-f) - file to write out HELLO_CLIENT_ID_DEFAULT
18
- - --secret (-s) - boolean to generate a HELLO_COOKIE_SECRET_DEFAULT value
17
+ - --file (-f) - file to write out HELLO_CLIENT_ID
18
+ - --secret (-s) - boolean to generate a HELLO_COOKIE_SECRET value
19
19
  - --wildcard (-w) - boolean to set the wildcard domain Development Redirect URI
20
20
  - --debug (-d) - output debug info
21
21
 
package/index.js CHANGED
@@ -5,6 +5,7 @@ import readline from 'readline'
5
5
  import * as http from 'http'
6
6
  import { URLSearchParams, parse } from 'url';
7
7
  import page from './page.js'
8
+ import chalk from 'chalk';
8
9
 
9
10
  export const validQuickstartParams = [
10
11
  'suffix',
@@ -66,14 +67,14 @@ const quickstart = async function (params) {
66
67
  const hellooDomain = process.env.HELLO_DOMAIN || 'hello.coop'
67
68
  const quickstartURL = `https://quickstart.${hellooDomain}/?${queryString}`
68
69
  server.listen(port, host, () => {
69
- console.log('Obtaining a client_id with Hellō Quickstart')
70
- // console.log(quickstartURL)
70
+ console.log('\nObtaining a client_id with Hellō Quickstart')
71
+ console.log("\n",chalk.blueBright(quickstartURL))
71
72
  const rl = readline.createInterface({
72
73
  input: process.stdin,
73
74
  output: process.stdout
74
75
  });
75
76
 
76
- rl.question('Press ENTER to open in the browser...', (answer) => {
77
+ rl.question('\nPress ENTER to open in the browser...', (answer) => {
77
78
  open(quickstartURL)
78
79
  rl.close();
79
80
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hellocoop/quickstart",
3
- "version": "2.0.2",
3
+ "version": "2.2.1",
4
4
  "description": "A CLI and module to start the Hello Quickstart web app and return a client_id",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "homepage": "https://github.com/hellocoop/packages#readme",
36
36
  "dependencies": {
37
+ "chalk": "^5.3.0",
37
38
  "dotenv": "^16.3.1",
38
39
  "get-port": "^7.0.0",
39
40
  "open": "^9.1.0",
package/quickstart.mjs CHANGED
@@ -60,9 +60,9 @@ const {
60
60
  import 'dotenv/config'
61
61
  import quickstart from './index.js';
62
62
 
63
- const existingClientId = process.env.HELLO_CLIENT_ID_DEFAULT
63
+ const existingClientId = process.env.HELLO_CLIENT_ID
64
64
  if (existingClientId) {
65
- console.error(`HELLO_CLIENT_ID_DEFAULT already set to ${existingClientId}`)
65
+ console.error(`HELLO_CLIENT_ID already set to ${existingClientId}`)
66
66
  process.exit(0);
67
67
  }
68
68
 
@@ -102,10 +102,10 @@ if (debug) {
102
102
  if (file) {
103
103
  let helloConfig = `
104
104
  # added by @hellocoop/quickstart-nextjs on ${(new Date()).toISOString()}
105
- HELLO_CLIENT_ID_DEFAULT='${output.client_id}'`
105
+ HELLO_CLIENT_ID='${output.client_id}'`
106
106
  if (secret) {
107
107
  helloConfig +=`
108
- HELLO_COOKIE_SECRET_DEFAULT='${output.secret}'
108
+ HELLO_COOKIE_SECRET='${output.secret}'
109
109
  `
110
110
  }
111
111
  const outputFile = process.cwd()+'/'+file