@celonis/content-cli 1.0.0 → 1.0.4
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Content CLI
|
|
2
2
|
|
|
3
|
-
Content CLI is a tool to help manage content in Celonis
|
|
4
|
-
content like analyses, packages, assets and others from your Celonis
|
|
3
|
+
Content CLI is a tool to help manage content in Celonis Platform. It provides various commands to help extract
|
|
4
|
+
content like analyses, packages, assets and others from your Celonis Platform team to your local machine, which
|
|
5
5
|
you can then push to other teams. This process can be easily achieved by creating profiles for your different
|
|
6
6
|
teams and execute commands in a profile's context.
|
|
7
7
|
|
|
@@ -39,7 +39,7 @@ as part of our pycelonis examples library [here](https://github.com/celonis/pyce
|
|
|
39
39
|
|
|
40
40
|
Content CLI has three core functionalities:
|
|
41
41
|
|
|
42
|
-
**Profile:** The CLI connects to the
|
|
42
|
+
**Profile:** The CLI connects to the Celonis Platform environments through profiles. For each of the commands you can specify
|
|
43
43
|
which profile you want to use. This makes it powerful in the sense that you can pull something from let's say
|
|
44
44
|
team1.cluser1 and push it directly to team2.cluster2 easily. You can create a profile using the following command:
|
|
45
45
|
|
|
@@ -47,8 +47,8 @@ team1.cluser1 and push it directly to team2.cluster2 easily. You can create a pr
|
|
|
47
47
|
content-cli profile create
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
**Pull:** This feature allows you to download content from the
|
|
51
|
-
as an example. These can be exported in the
|
|
50
|
+
**Pull:** This feature allows you to download content from the Celonis Platform to your local machine. Let's take Studio package
|
|
51
|
+
as an example. These can be exported in the Celonis Platform as ZIP files that contain all package assets. By using the following
|
|
52
52
|
command using the package key and profile you have created, you will pull the ZIP file.
|
|
53
53
|
|
|
54
54
|
```
|
|
@@ -59,7 +59,7 @@ Example, if you want to pull a package with key "interesting-package" from your
|
|
|
59
59
|
content-cli pull package -p my-dev-profile --key interesting-package
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
**Push:** This feature allows you to push a content file to a team in the
|
|
62
|
+
**Push:** This feature allows you to push a content file to a team in the Celonis Platform. To continue the last example,
|
|
63
63
|
you can use the following command to push he previously pulled package in another team.
|
|
64
64
|
|
|
65
65
|
```
|
|
@@ -84,7 +84,7 @@ content-cli pull package -h
|
|
|
84
84
|
|
|
85
85
|
## Building and Using the Project locally
|
|
86
86
|
|
|
87
|
-
This tool is tightly connected with the Celonis
|
|
87
|
+
This tool is tightly connected with the Celonis Platform and all capabilities require to have access to a Celonis Platform Team.
|
|
88
88
|
After cloning the project, the next step is to install the project dependencies. We use `yarn` as our package manager,
|
|
89
89
|
so running `yarn install` on the project root folder should install all the necessary dependencies. After installing
|
|
90
90
|
the project dependencies, you can run `yarn build` to build the project artifact. To use the built artifact, you can
|
|
@@ -92,6 +92,7 @@ run `node content-cli.js` in the generated `dist` folder.
|
|
|
92
92
|
|
|
93
93
|
If we want to use a specific local build of the tool globally, we can do this by:
|
|
94
94
|
- Move to the root directory of the project.
|
|
95
|
+
- Execute `cd dist`, to move to the `dist` directory.
|
|
95
96
|
- Execute the `npm link` command.
|
|
96
97
|
This will create a symbolic link in the global `node_modules` directory, allowing you to run the CLI from anywhere on your machine.
|
|
97
98
|
|
|
@@ -57,13 +57,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
57
57
|
}
|
|
58
58
|
findAndExportListOfAllPackages(includeDependencies, packageKeys) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
const fieldsToInclude = ["key", "name", "changeDate", "activatedDraftId", "workingDraftId", "spaceId"];
|
|
60
|
+
const fieldsToInclude = ["key", "name", "changeDate", "activatedDraftId", "workingDraftId", "spaceId", "id"];
|
|
61
61
|
let nodesListToExport = yield this.packageApi.findAllPackages();
|
|
62
62
|
if (packageKeys.length > 0) {
|
|
63
63
|
nodesListToExport = nodesListToExport.filter(node => packageKeys.includes(node.rootNodeKey));
|
|
64
64
|
}
|
|
65
65
|
if (includeDependencies) {
|
|
66
|
-
fieldsToInclude.push("type", "value", "dependencies", "
|
|
66
|
+
fieldsToInclude.push("type", "value", "dependencies", "updateAvailable", "version", "poolId", "node", "dataModelId", "dataPool", "datamodels");
|
|
67
67
|
const unPublishedNodes = nodesListToExport.filter(node => !node.activatedDraftId);
|
|
68
68
|
let publishedNodes = nodesListToExport.filter(node => node.activatedDraftId);
|
|
69
69
|
publishedNodes = yield this.getNodesWithActiveVersion(publishedNodes);
|
package/content-cli.js
CHANGED
|
File without changes
|
package/core/utils/version.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.VersionUtils = void 0;
|
|
13
13
|
// tslint:disable-next-line:no-var-requires
|
|
14
|
-
const { version } = require("
|
|
14
|
+
const { version } = require("./../../package.json");
|
|
15
15
|
class VersionUtils {
|
|
16
16
|
static getCurrentCliVersion() {
|
|
17
17
|
return version;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celonis/content-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CLI Tool to help manage content in Celonis
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "CLI Tool to help manage content in Celonis Platform",
|
|
5
5
|
"main": "content-cli.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"content-cli": "./
|
|
7
|
+
"content-cli": "./content-cli.js"
|
|
8
8
|
},
|
|
9
9
|
"author": "Celonis SE",
|
|
10
10
|
"license": "MIT",
|