@gooddata/code-cli 0.1.0 → 0.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 +25 -29
- package/out/index.js +16 -16
- package/out/index.js.LICENSE.txt +2052 -4014
- package/package.json +1 -1
- package/out/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/gooddata-logo.svg" alt="GoodData Logo" width="120px" height="120px"/>
|
|
2
|
+
<img src="https://raw.githubusercontent.com/gooddata/gooddata-ui-sdk/master/assets/gooddata-logo.svg" alt="GoodData Logo" width="120px" height="120px"/>
|
|
3
3
|
</p>
|
|
4
4
|
<h1 align="center">GoodData CLI</h1>
|
|
5
5
|
|
|
6
|
-
> GoodData for VS Code and GoodData CLI are available for you to try out and provide feedback. Avoid using
|
|
6
|
+
> GoodData for VS Code and GoodData CLI are available for you to try out and provide feedback. Avoid using them in a production environment.
|
|
7
7
|
|
|
8
8
|
Manage your analytics as code. The solution consists of two components:
|
|
9
9
|
|
|
@@ -14,26 +14,24 @@ Together these tools allow you to:
|
|
|
14
14
|
|
|
15
15
|
1. Retrieve analytical objects from a GoodData server.
|
|
16
16
|
1. Create or update analytical objects in Visual Studio Code.
|
|
17
|
-
1.
|
|
18
|
-
1. Deploy analytical objects to a
|
|
17
|
+
1. Preview analytical objects in Visual Studio Code.
|
|
18
|
+
1. Deploy analytical objects to a workspace.
|
|
19
19
|
|
|
20
20
|
The analytical objects you can work with include datasets, which form the logical data model, and metrics. Additionally, we have plans to incorporate support for visualizations in the near future.
|
|
21
21
|
|
|
22
22
|
With GoodData CLI you can:
|
|
23
23
|
|
|
24
|
-
* Initialize a new
|
|
25
|
-
* Clone existing
|
|
26
|
-
* Validate
|
|
27
|
-
* Deploy
|
|
24
|
+
* Initialize a new local environment.
|
|
25
|
+
* Clone an existing workspace.
|
|
26
|
+
* Validate local analytical objects.
|
|
27
|
+
* Deploy your analytical objects to a workspace.
|
|
28
28
|
|
|
29
29
|
## Prerequisites
|
|
30
30
|
|
|
31
31
|
Before getting started, ensure that you have:
|
|
32
32
|
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
* Workspace ID of a workspace you want to clone and edit.
|
|
36
|
-
* Data source ID of the data source the workspace is connected to
|
|
33
|
+
* GoodData [workspace](https://www.gooddata.com/developers/cloud-native/doc/cloud/create-workspaces/concepts/workspace/).
|
|
34
|
+
* [API access token](https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-organization/user-token/).
|
|
37
35
|
* [Node.js version 16.17 or newer installed](https://nodejs.org/).
|
|
38
36
|
|
|
39
37
|
## Install CLI
|
|
@@ -43,41 +41,39 @@ You should have a new CLI command available, try running `gd -v` or `gd --help`.
|
|
|
43
41
|
|
|
44
42
|
## `gd init` command
|
|
45
43
|
|
|
46
|
-
Once the CLI is installed you are able to initialize your
|
|
44
|
+
Once the CLI is installed you are able to initialize your local environment.
|
|
47
45
|
|
|
48
46
|
**Steps:**
|
|
49
47
|
|
|
50
48
|
1. Open a terminal and navigate to a folder where you want to build and store your analytics.
|
|
51
|
-
1. To initialize your
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
1. To initialize your local environment, run `gd init` and follow the instructions to create a `gooddata.yaml` configuration file.
|
|
50
|
+
|
|
51
|
+
> The gd_init step also creates `.env` and `.gitignore` files, in case you wish to store the analytics in a Version Control System (like Git)
|
|
54
52
|
|
|
55
|
-
> Make sure you do not store the `.env` file in you version control system (like Git).
|
|
56
|
-
> For example, you can add the file to `.gitignore`.
|
|
57
53
|
|
|
58
54
|
## `gd clone` command
|
|
59
55
|
|
|
60
|
-
To clone
|
|
56
|
+
To clone existing workspace to your local environment, run `gd clone`.
|
|
61
57
|
|
|
62
|
-
You should now have an `analytics` folder that contains your
|
|
58
|
+
You should now have an `analytics` folder that contains your analytical objects.
|
|
63
59
|
|
|
64
60
|
## `gd validate` command
|
|
65
61
|
|
|
66
|
-
GoodData CLI
|
|
67
|
-
and, for example, ensure the
|
|
62
|
+
GoodData CLI validate your local environment. This is useful if you want to set up CI/CD pipelines
|
|
63
|
+
and, for example, ensure the workspace is valid before merging a pull request.
|
|
68
64
|
|
|
69
|
-
GoodData CLI
|
|
70
|
-
* syntax of the YAML files is correct
|
|
71
|
-
* there
|
|
72
|
-
* references between
|
|
73
|
-
* references to the database tables and columns
|
|
65
|
+
GoodData CLI validates:
|
|
66
|
+
* syntax of the YAML files is correct.
|
|
67
|
+
* properties (e.g. there can' be any missing or invalid).
|
|
68
|
+
* references between analytical objects.
|
|
69
|
+
* references to the database tables and columns.
|
|
74
70
|
|
|
75
71
|
To execute validation, run `gd validate`.
|
|
76
72
|
|
|
77
73
|
## `gd deploy` command
|
|
78
74
|
|
|
79
|
-
GoodData CLI can deploy your
|
|
75
|
+
GoodData CLI can deploy your local environment to a workspace defined in `gooddata.yaml` file.
|
|
80
76
|
|
|
81
77
|
To execute the deployment, run `gd deploy`.
|
|
82
78
|
|
|
83
|
-
Before deploying
|
|
79
|
+
Before deploying, GoodData CLI will also run validation, unless `--no-validate` argument was passed to the command.
|