@nzz/q-cli 1.10.1 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +21 -2
- package/bin/commands/qItem/configStore.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
- [Installation](#installation)
|
8
8
|
- [Development](#development)
|
9
|
+
- [Github Actions](#github-actions)
|
9
10
|
- [Functionality](#functionality)
|
10
11
|
- [License](#license)
|
11
12
|
|
@@ -15,8 +16,6 @@
|
|
15
16
|
npm install -g @nzz/q-cli
|
16
17
|
```
|
17
18
|
|
18
|
-
[to the top](#table-of-contents)
|
19
|
-
|
20
19
|
## Development
|
21
20
|
|
22
21
|
```
|
@@ -41,6 +40,26 @@ To unlink, simply install Q-cli again globally:
|
|
41
40
|
npm install @nzz/q-cli -g
|
42
41
|
```
|
43
42
|
|
43
|
+
## Github actions
|
44
|
+
|
45
|
+
To use the q-cli in github actions there are special access tokens provided. You can find them in 1password (LivingDocs Public API Access Tokens).
|
46
|
+
|
47
|
+
There is an entire [thread](https://3.basecamp.com/3500782/buckets/1333707/documents/2903809795#__recording_3878674488) in basecamp on how this solution works.
|
48
|
+
|
49
|
+
Example code for a github action to update on all environments. You can check the functionality section if you only want to update a specific environment.
|
50
|
+
|
51
|
+
You will need to set the secrets in github unders **settings > secrets & variables > actions > New repository secret**
|
52
|
+
|
53
|
+
```
|
54
|
+
- name: Run Q cli
|
55
|
+
run: Q update-item
|
56
|
+
env:
|
57
|
+
Q_STAGING_SERVER: ${{ secrets.Q_STAGING_SERVER }}
|
58
|
+
Q_STAGING_ACCESSTOKEN: ${{ secrets.Q_STAGING_ACCESSTOKEN }}
|
59
|
+
Q_PRODUCTION_SERVER: ${{ secrets.Q_PRODUCTION_SERVER }}
|
60
|
+
Q_PRODUCTION_ACCESSTOKEN: ${{ secrets.Q_PRODUCTION_ACCESSTOKEN }}
|
61
|
+
```
|
62
|
+
|
44
63
|
[to the top](#table-of-contents)
|
45
64
|
|
46
65
|
## Functionality
|
@@ -3,6 +3,8 @@ const promptly = require("promptly");
|
|
3
3
|
const Configstore = require("configstore");
|
4
4
|
const package = require("./../../../package.json");
|
5
5
|
const configStore = new Configstore(package.name, {});
|
6
|
+
const chalk = require("chalk");
|
7
|
+
const errorColor = chalk.red;
|
6
8
|
|
7
9
|
async function setAuthenticationConfig(environment, qServer) {
|
8
10
|
const result = await authenticate(environment, qServer);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nzz/q-cli",
|
3
|
-
"version": "1.10.
|
3
|
+
"version": "1.10.2",
|
4
4
|
"prettier": "@nzz/et-utils-config-prettier",
|
5
5
|
"description": "Cli tool to setup new Q tools, new Q server implementations and start Q dev server to test developing Q tools",
|
6
6
|
"main": "index.js",
|