@nzz/q-cli 1.10.1 → 1.10.3
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
@@ -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);
|
@@ -41,7 +41,18 @@ module.exports = async function (command) {
|
|
41
41
|
// Create a new custom code item
|
42
42
|
const title = command.title || 'Custom Code item created by Q-cli';
|
43
43
|
const newItem = await itemService.createItem(
|
44
|
-
{
|
44
|
+
{
|
45
|
+
acronym: 'Visuals',
|
46
|
+
assetGroups: [],
|
47
|
+
data: [],
|
48
|
+
department: 'Visuals',
|
49
|
+
files: [],
|
50
|
+
options: {
|
51
|
+
previewDisabled: false,
|
52
|
+
},
|
53
|
+
title: title,
|
54
|
+
tool: 'custom_code',
|
55
|
+
},
|
45
56
|
{ name: environmentName },
|
46
57
|
config
|
47
58
|
);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nzz/q-cli",
|
3
|
-
"version": "1.10.
|
3
|
+
"version": "1.10.3",
|
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",
|