@celonis/content-cli 1.2.3 → 1.3.0
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/commands/configuration-management/api/node-api.js +70 -0
- package/commands/configuration-management/api/node-dependency-api.js +40 -0
- package/commands/configuration-management/api/node-diff-api.js +41 -0
- package/commands/configuration-management/interfaces/node-dependency.interfaces.js +12 -0
- package/commands/configuration-management/interfaces/node-diff.interfaces.js +12 -0
- package/commands/configuration-management/interfaces/node.interfaces.js +12 -0
- package/commands/configuration-management/module.js +67 -1
- package/commands/configuration-management/node-dependency.service.js +53 -0
- package/commands/configuration-management/node-diff.service.js +62 -0
- package/commands/configuration-management/node.service.js +83 -0
- package/commands/deployment/deployment-api.js +1 -3
- package/commands/deployment/module.js +1 -1
- package/commands/git-profile/git-profile-command.service.js +5 -1
- package/core/command/module-handler.js +2 -2
- package/core/git-profile/git/git.service.js +1 -7
- package/core/git-profile/git-profile.service.js +6 -0
- package/core/profile/profile.service.js +1 -1
- package/lib/commands/configuration-management/api/node-api.d.ts +9 -0
- package/lib/commands/configuration-management/api/node-dependency-api.d.ts +7 -0
- package/lib/commands/configuration-management/api/node-diff-api.d.ts +7 -0
- package/lib/commands/configuration-management/interfaces/node-dependency.interfaces.d.ts +5 -0
- package/lib/commands/configuration-management/interfaces/node-diff.interfaces.d.ts +20 -0
- package/lib/commands/configuration-management/interfaces/node.interfaces.d.ts +21 -0
- package/lib/commands/configuration-management/module.d.ts +4 -0
- package/lib/commands/configuration-management/node-dependency.service.d.ts +6 -0
- package/lib/commands/configuration-management/node-diff.service.d.ts +6 -0
- package/lib/commands/configuration-management/node.service.d.ts +8 -0
- package/lib/commands/deployment/deployment-api.d.ts +1 -1
- package/lib/commands/deployment/deployment.service.d.ts +1 -1
- package/lib/core/git-profile/git-profile.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
23
|
+
class NodeApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
|
+
}
|
|
27
|
+
findStagingNodeByKey(packageKey, nodeKey, withConfiguration) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const queryParams = new URLSearchParams();
|
|
30
|
+
queryParams.set("withConfiguration", withConfiguration.toString());
|
|
31
|
+
return this.httpClient()
|
|
32
|
+
.get(`/pacman/api/core/staging/packages/${packageKey}/nodes/${nodeKey}?${queryParams.toString()}`)
|
|
33
|
+
.catch((e) => {
|
|
34
|
+
throw new logger_1.FatalError(`Problem finding node ${nodeKey} in package ${packageKey}: ${e}`);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
findVersionedNodeByKey(packageKey, nodeKey, version, withConfiguration) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const queryParams = new URLSearchParams();
|
|
41
|
+
queryParams.set("version", version);
|
|
42
|
+
queryParams.set("withConfiguration", withConfiguration.toString());
|
|
43
|
+
return this.httpClient()
|
|
44
|
+
.get(`/pacman/api/core/packages/${packageKey}/nodes/${nodeKey}?${queryParams.toString()}`)
|
|
45
|
+
.catch((e) => {
|
|
46
|
+
throw new logger_1.FatalError(`Problem finding node ${nodeKey} in package ${packageKey} for version ${version}: ${e}`);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
findVersionedNodesByPackage(packageKey, version, withConfiguration, limit, offset) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const queryParams = new URLSearchParams();
|
|
53
|
+
queryParams.set("version", version);
|
|
54
|
+
queryParams.set("withConfiguration", withConfiguration.toString());
|
|
55
|
+
if (limit) {
|
|
56
|
+
queryParams.set("limit", limit.toString());
|
|
57
|
+
}
|
|
58
|
+
if (offset) {
|
|
59
|
+
queryParams.set("offset", offset.toString());
|
|
60
|
+
}
|
|
61
|
+
return this.httpClient()
|
|
62
|
+
.get(`/pacman/api/core/packages/${packageKey}/nodes?${queryParams.toString()}`)
|
|
63
|
+
.catch(e => {
|
|
64
|
+
throw new logger_1.FatalError(`Problem fetching nodes from package ${packageKey} for version ${version}: ${e}`);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.NodeApi = NodeApi;
|
|
70
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeDependencyApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
23
|
+
class NodeDependencyApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
|
+
}
|
|
27
|
+
findAll(packageKey, nodeKey, version) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const queryParams = new URLSearchParams();
|
|
30
|
+
queryParams.set("version", version);
|
|
31
|
+
return this.httpClient()
|
|
32
|
+
.get(`/pacman/api/core/packages/${packageKey}/nodes/${nodeKey}/dependencies?${queryParams.toString()}`)
|
|
33
|
+
.catch((e) => {
|
|
34
|
+
throw new logger_1.FatalError(`Problem finding dependencies for node ${nodeKey} in package ${packageKey} for version ${version}: ${e}`);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.NodeDependencyApi = NodeDependencyApi;
|
|
40
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeDiffApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
23
|
+
class NodeDiffApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
|
+
}
|
|
27
|
+
diff(request) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const queryParams = new URLSearchParams();
|
|
30
|
+
queryParams.set("baseVersion", request.baseVersion);
|
|
31
|
+
queryParams.set("compareVersion", request.compareVersion);
|
|
32
|
+
return this.httpClient()
|
|
33
|
+
.get(`/pacman/api/core/packages/${request.packageKey}/nodes/${request.nodeKey}/diff/configuration?${queryParams.toString()}`)
|
|
34
|
+
.catch(exception => {
|
|
35
|
+
throw new logger_1.FatalError(`Problem getting the node diff: ${exception}`);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.NodeDiffApi = NodeDiffApi;
|
|
41
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
@@ -16,13 +16,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
16
16
|
if (v !== undefined) module.exports = v;
|
|
17
17
|
}
|
|
18
18
|
else if (typeof define === "function" && define.amd) {
|
|
19
|
-
define(["require", "exports", "../../core/command/module-handler", "./config-command.service", "./variable-command.service"], factory);
|
|
19
|
+
define(["require", "exports", "../../core/command/module-handler", "./config-command.service", "./variable-command.service", "./node.service", "./node-diff.service", "./node-dependency.service"], factory);
|
|
20
20
|
}
|
|
21
21
|
})(function (require, exports) {
|
|
22
22
|
"use strict";
|
|
23
23
|
const module_handler_1 = require("../../core/command/module-handler");
|
|
24
24
|
const config_command_service_1 = require("./config-command.service");
|
|
25
25
|
const variable_command_service_1 = require("./variable-command.service");
|
|
26
|
+
const node_service_1 = require("./node.service");
|
|
27
|
+
const node_diff_service_1 = require("./node-diff.service");
|
|
28
|
+
const node_dependency_service_1 = require("./node-dependency.service");
|
|
26
29
|
class Module extends module_handler_1.IModule {
|
|
27
30
|
register(context, configurator) {
|
|
28
31
|
const configCommand = configurator.command("config");
|
|
@@ -74,6 +77,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
74
77
|
.option("--keysByVersion <keysByVersion...>", "Mapping of package keys and versions", "")
|
|
75
78
|
.option("--keysByVersionFile <keysByVersionFile>", "Package keys by version mappings file path.", "")
|
|
76
79
|
.action(this.listVariables);
|
|
80
|
+
const nodesCommand = configCommand.command("nodes")
|
|
81
|
+
.description("Commands related to nodes of the package");
|
|
82
|
+
nodesCommand.command("get")
|
|
83
|
+
.description("Find a specific node in a package")
|
|
84
|
+
.requiredOption("--packageKey <packageKey>", "Identifier of the package")
|
|
85
|
+
.requiredOption("--nodeKey <nodeKey>", "Identifier of the node")
|
|
86
|
+
.option("--packageVersion <packageVersion>", "Version of the package")
|
|
87
|
+
.option("--withConfiguration", "Include node configuration in the response", false)
|
|
88
|
+
.option("--json", "Return the response as a JSON file")
|
|
89
|
+
.action(this.findNode);
|
|
90
|
+
nodesCommand.command("list")
|
|
91
|
+
.description("List nodes in a specific package version")
|
|
92
|
+
.requiredOption("--packageKey <packageKey>", "Identifier of the package")
|
|
93
|
+
.requiredOption("--packageVersion <packageVersion>", "Version of the package")
|
|
94
|
+
.option("--limit <limit>", "Limit the number of results returned")
|
|
95
|
+
.option("--offset <offset>", "Offset for pagination")
|
|
96
|
+
.option("--withConfiguration", "Include node configuration in the response", false)
|
|
97
|
+
.option("--json", "Return the response as a JSON file")
|
|
98
|
+
.action(this.listNodes);
|
|
99
|
+
nodesCommand.command("diff")
|
|
100
|
+
.description("Diff two versions of a specific node in a package")
|
|
101
|
+
.requiredOption("--packageKey <packageKey>", "Identifier of the package")
|
|
102
|
+
.requiredOption("--nodeKey <nodeKey>", "Identifier of the node")
|
|
103
|
+
.requiredOption("--baseVersion <baseVersion>", "Base version of the node")
|
|
104
|
+
.requiredOption("--compareVersion <compareVersion>", "Compare version of the node")
|
|
105
|
+
.option("--json", "Return the response as a JSON file")
|
|
106
|
+
.action(this.diffNode);
|
|
107
|
+
const nodeDependenciesCommand = nodesCommand.command("dependencies")
|
|
108
|
+
.description("Commands related to node dependencies");
|
|
109
|
+
nodeDependenciesCommand.command("list")
|
|
110
|
+
.description("List dependencies of a specific node in a package")
|
|
111
|
+
.requiredOption("--packageKey <packageKey>", "Identifier of the package")
|
|
112
|
+
.requiredOption("--nodeKey <nodeKey>", "Identifier of the node")
|
|
113
|
+
.requiredOption("--packageVersion <packageVersion>", "Version of the package")
|
|
114
|
+
.option("--json", "Return the response as a JSON file")
|
|
115
|
+
.action(this.listNodeDependencies);
|
|
77
116
|
const listCommand = configurator.command("list");
|
|
78
117
|
listCommand.command("assignments")
|
|
79
118
|
.description("Command to list possible variable assignments for a type")
|
|
@@ -93,6 +132,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
93
132
|
if ((options.packageKeys && options.keysByVersion) || (!options.packageKeys && !options.keysByVersion)) {
|
|
94
133
|
throw new Error("Please provide either --packageKeys or --keysByVersion, but not both.");
|
|
95
134
|
}
|
|
135
|
+
if (options.gitProfile && !options.gitBranch) {
|
|
136
|
+
throw new Error("Please specify a branch using --gitBranch when using a Git profile.");
|
|
137
|
+
}
|
|
96
138
|
options.withDependencies = (_a = options.withDependencies) !== null && _a !== void 0 ? _a : false;
|
|
97
139
|
yield new config_command_service_1.ConfigCommandService(context).batchExportPackages(options.packageKeys, options.keysByVersion, options.withDependencies, options.gitBranch, options.unzip);
|
|
98
140
|
});
|
|
@@ -104,6 +146,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
104
146
|
}
|
|
105
147
|
batchImportPackages(context, command, options) {
|
|
106
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
if (options.gitProfile && !options.gitBranch) {
|
|
150
|
+
throw new Error("Please specify a branch using --gitBranch when using a Git profile.");
|
|
151
|
+
}
|
|
107
152
|
yield new config_command_service_1.ConfigCommandService(context).batchImportPackages(options.file, options.directory, options.overwrite, options.gitBranch);
|
|
108
153
|
});
|
|
109
154
|
}
|
|
@@ -122,6 +167,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
122
167
|
yield new variable_command_service_1.VariableCommandService(context).listAssignments(options.type, options.json, options.params);
|
|
123
168
|
});
|
|
124
169
|
}
|
|
170
|
+
findNode(context, command, options) {
|
|
171
|
+
var _a;
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
yield new node_service_1.NodeService(context).findNode(options.packageKey, options.nodeKey, options.withConfiguration, (_a = options.packageVersion) !== null && _a !== void 0 ? _a : null, options.json);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
listNodes(context, command, options) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
yield new node_service_1.NodeService(context).listNodes(options.packageKey, options.packageVersion, options.limit, options.offset, options.withConfiguration, options.json);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
diffNode(context, command, options) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
yield new node_diff_service_1.NodeDiffService(context).diff(options.packageKey, options.nodeKey, options.baseVersion, options.compareVersion, options.json);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
listNodeDependencies(context, command, options) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
yield new node_dependency_service_1.NodeDependencyService(context).listNodeDependencies(options.packageKey, options.nodeKey, options.packageVersion, options.json);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
125
191
|
}
|
|
126
192
|
return Module;
|
|
127
193
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "./api/node-dependency-api", "../../core/utils/file-service", "../../core/utils/logger", "uuid"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeDependencyService = void 0;
|
|
22
|
+
const node_dependency_api_1 = require("./api/node-dependency-api");
|
|
23
|
+
const file_service_1 = require("../../core/utils/file-service");
|
|
24
|
+
const logger_1 = require("../../core/utils/logger");
|
|
25
|
+
const uuid_1 = require("uuid");
|
|
26
|
+
class NodeDependencyService {
|
|
27
|
+
constructor(context) {
|
|
28
|
+
this.nodeDependencyApi = new node_dependency_api_1.NodeDependencyApi(context);
|
|
29
|
+
}
|
|
30
|
+
listNodeDependencies(packageKey, nodeKey, version, jsonResponse) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const dependencies = yield this.nodeDependencyApi.findAll(packageKey, nodeKey, version);
|
|
33
|
+
if (jsonResponse) {
|
|
34
|
+
const filename = (0, uuid_1.v4)() + ".json";
|
|
35
|
+
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(dependencies, null, 2), filename);
|
|
36
|
+
logger_1.logger.info(file_service_1.FileService.fileDownloadedMessage + filename);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (dependencies.length === 0) {
|
|
40
|
+
logger_1.logger.info("No dependencies found for this node.");
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
logger_1.logger.info(`Found ${dependencies.length} ${dependencies.length === 1 ? "dependency" : "dependencies"}:`);
|
|
44
|
+
dependencies.forEach((dep, index) => {
|
|
45
|
+
logger_1.logger.info(JSON.stringify(dep));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.NodeDependencyService = NodeDependencyService;
|
|
53
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "uuid", "../../core/utils/logger", "../../core/utils/file-service", "./api/node-diff-api"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeDiffService = void 0;
|
|
22
|
+
const uuid_1 = require("uuid");
|
|
23
|
+
const logger_1 = require("../../core/utils/logger");
|
|
24
|
+
const file_service_1 = require("../../core/utils/file-service");
|
|
25
|
+
const node_diff_api_1 = require("./api/node-diff-api");
|
|
26
|
+
class NodeDiffService {
|
|
27
|
+
constructor(context) {
|
|
28
|
+
this.nodeDiffApi = new node_diff_api_1.NodeDiffApi(context);
|
|
29
|
+
}
|
|
30
|
+
diff(packageKey, nodeKey, baseVersion, compareVersion, jsonResponse) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const nodeDiff = yield this.nodeDiffApi.diff({
|
|
33
|
+
packageKey,
|
|
34
|
+
nodeKey,
|
|
35
|
+
baseVersion,
|
|
36
|
+
compareVersion,
|
|
37
|
+
});
|
|
38
|
+
if (jsonResponse) {
|
|
39
|
+
const filename = (0, uuid_1.v4)() + ".json";
|
|
40
|
+
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(nodeDiff, null, 2), filename);
|
|
41
|
+
logger_1.logger.info(file_service_1.FileService.fileDownloadedMessage + filename);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
logger_1.logger.info(`Package Key: ${nodeDiff.packageKey}`);
|
|
45
|
+
logger_1.logger.info(`Node Key: ${nodeDiff.nodeKey}`);
|
|
46
|
+
logger_1.logger.info(`Name: ${nodeDiff.name}`);
|
|
47
|
+
logger_1.logger.info(`Type: ${nodeDiff.type}`);
|
|
48
|
+
logger_1.logger.info(`Is invalid configuration: ${nodeDiff.invalidContent}`);
|
|
49
|
+
if (nodeDiff.parentNodeKey) {
|
|
50
|
+
logger_1.logger.info(`Parent Node Key: ${nodeDiff.parentNodeKey}`);
|
|
51
|
+
}
|
|
52
|
+
logger_1.logger.info(`Change Date: ${new Date(nodeDiff.changeDate).toISOString()}`);
|
|
53
|
+
logger_1.logger.info(`Updated By: ${nodeDiff.updatedBy}`);
|
|
54
|
+
logger_1.logger.info(`Change Type: ${nodeDiff.changeType}`);
|
|
55
|
+
logger_1.logger.info(`Changes: ${JSON.stringify(nodeDiff.changes)}`);
|
|
56
|
+
logger_1.logger.info(`Metadata Changes: ${JSON.stringify(nodeDiff.metadataChanges)}`);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.NodeDiffService = NodeDiffService;
|
|
62
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
(function (factory) {
|
|
11
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
12
|
+
var v = factory(require, exports);
|
|
13
|
+
if (v !== undefined) module.exports = v;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(["require", "exports", "./api/node-api", "../../core/utils/file-service", "../../core/utils/logger", "uuid"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.NodeService = void 0;
|
|
22
|
+
const node_api_1 = require("./api/node-api");
|
|
23
|
+
const file_service_1 = require("../../core/utils/file-service");
|
|
24
|
+
const logger_1 = require("../../core/utils/logger");
|
|
25
|
+
const uuid_1 = require("uuid");
|
|
26
|
+
class NodeService {
|
|
27
|
+
constructor(context) {
|
|
28
|
+
this.nodeApi = new node_api_1.NodeApi(context);
|
|
29
|
+
}
|
|
30
|
+
findNode(packageKey, nodeKey, withConfiguration, packageVersion, jsonResponse) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const node = packageVersion
|
|
33
|
+
? yield this.nodeApi.findVersionedNodeByKey(packageKey, nodeKey, packageVersion, withConfiguration)
|
|
34
|
+
: yield this.nodeApi.findStagingNodeByKey(packageKey, nodeKey, withConfiguration);
|
|
35
|
+
if (jsonResponse) {
|
|
36
|
+
const filename = (0, uuid_1.v4)() + ".json";
|
|
37
|
+
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(node, null, 2), filename);
|
|
38
|
+
logger_1.logger.info(file_service_1.FileService.fileDownloadedMessage + filename);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.printNode(node);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
listNodes(packageKey, packageVersion, limit, offset, withConfiguration, jsonResponse) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const nodes = yield this.nodeApi.findVersionedNodesByPackage(packageKey, packageVersion, withConfiguration, limit, offset);
|
|
48
|
+
if (jsonResponse) {
|
|
49
|
+
const filename = (0, uuid_1.v4)() + ".json";
|
|
50
|
+
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(nodes, null, 2), filename);
|
|
51
|
+
logger_1.logger.info(file_service_1.FileService.fileDownloadedMessage + filename);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
nodes.forEach(node => {
|
|
55
|
+
logger_1.logger.info(JSON.stringify(node));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
printNode(node) {
|
|
61
|
+
logger_1.logger.info(`ID: ${node.id}`);
|
|
62
|
+
logger_1.logger.info(`Key: ${node.key}`);
|
|
63
|
+
logger_1.logger.info(`Name: ${node.name}`);
|
|
64
|
+
logger_1.logger.info(`Type: ${node.type}`);
|
|
65
|
+
logger_1.logger.info(`Package Node Key: ${node.packageNodeKey}`);
|
|
66
|
+
if (node.parentNodeKey) {
|
|
67
|
+
logger_1.logger.info(`Parent Node Key: ${node.parentNodeKey}`);
|
|
68
|
+
}
|
|
69
|
+
logger_1.logger.info(`Created By: ${node.createdBy}`);
|
|
70
|
+
logger_1.logger.info(`Updated By: ${node.updatedBy}`);
|
|
71
|
+
logger_1.logger.info(`Creation Date: ${new Date(node.creationDate).toISOString()}`);
|
|
72
|
+
logger_1.logger.info(`Change Date: ${new Date(node.changeDate).toISOString()}`);
|
|
73
|
+
if (node.configuration) {
|
|
74
|
+
logger_1.logger.info(`Configuration: ${JSON.stringify(node.configuration, null, 2)}`);
|
|
75
|
+
}
|
|
76
|
+
if (node.invalidContent) {
|
|
77
|
+
logger_1.logger.info(`Invalid Configuration: ${node.invalidConfiguration}`);
|
|
78
|
+
}
|
|
79
|
+
logger_1.logger.info(`Flavor: ${node.flavor}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.NodeService = NodeService;
|
|
83
|
+
});
|
|
@@ -87,9 +87,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
const queryParams = new URLSearchParams();
|
|
89
89
|
queryParams.set("deployableType", deployableType);
|
|
90
|
-
|
|
91
|
-
queryParams.set("packageKey", packageKey);
|
|
92
|
-
}
|
|
90
|
+
queryParams.set("packageKey", packageKey);
|
|
93
91
|
return this.httpClient()
|
|
94
92
|
.get(`/pacman/api/deployments/targets?${queryParams.toString()}`)
|
|
95
93
|
.catch((e) => {
|
|
@@ -67,7 +67,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
67
67
|
.beta()
|
|
68
68
|
.description("List all targets for a given deployable type and package key")
|
|
69
69
|
.requiredOption("--deployableType <deployableType>", "The type of the deployable")
|
|
70
|
-
.
|
|
70
|
+
.requiredOption("--packageKey <packageKey>", "Identifier of the package to list targets for")
|
|
71
71
|
.option("--json", "Return the response as a JSON file")
|
|
72
72
|
.action(this.listTargets);
|
|
73
73
|
}
|
|
@@ -33,6 +33,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
const questions = new question_service_1.QuestionService();
|
|
34
34
|
try {
|
|
35
35
|
profile.name = yield questions.ask("Name of the Git profile to create: ");
|
|
36
|
+
this.gitProfileService.validateProfileName(profile.name);
|
|
36
37
|
profile.username = yield questions.ask("Your Git username: ");
|
|
37
38
|
profile.repository = yield questions.ask("Your repository (format: repoOwner/repoName): ");
|
|
38
39
|
const type = yield questions.ask("Authentication type: HTTPS (1), SSH token (2): ");
|
|
@@ -52,11 +53,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
52
53
|
if (setAsDefault) {
|
|
53
54
|
yield this.makeDefaultProfile(profile.name);
|
|
54
55
|
}
|
|
56
|
+
logger_1.logger.info("Git Profile created successfully!");
|
|
57
|
+
}
|
|
58
|
+
catch (e) {
|
|
59
|
+
logger_1.logger.error(e.toString());
|
|
55
60
|
}
|
|
56
61
|
finally {
|
|
57
62
|
yield questions.close();
|
|
58
63
|
}
|
|
59
|
-
logger_1.logger.info("Git Profile created successfully!");
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
66
|
listProfiles() {
|
|
@@ -197,7 +197,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
197
197
|
this.printBetaNoticeIfBetaCommand();
|
|
198
198
|
this.printBetaNoticeIfBetaOptions();
|
|
199
199
|
this.printDeprecationNoticeIfDeprecated();
|
|
200
|
-
yield handler(this.ctx, this.cmd, this.cmd.
|
|
200
|
+
yield handler(this.ctx, this.cmd, this.cmd.optsWithGlobals());
|
|
201
201
|
}
|
|
202
202
|
catch (error) {
|
|
203
203
|
logger_1.logger.error(`An unexpected error occured executing a command: ${error}`);
|
|
@@ -218,7 +218,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
218
218
|
if (this.cmd.isBeta) {
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
const providedOptions = this.cmd.
|
|
221
|
+
const providedOptions = this.cmd.optsWithGlobals();
|
|
222
222
|
for (const option of this.cmd.options) {
|
|
223
223
|
const optionName = option.attributeName();
|
|
224
224
|
if (option.isBeta && Object.hasOwn(providedOptions, optionName)) {
|
|
@@ -13,14 +13,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
13
13
|
if (v !== undefined) module.exports = v;
|
|
14
14
|
}
|
|
15
15
|
else if (typeof define === "function" && define.amd) {
|
|
16
|
-
define(["require", "exports", "simple-git", "
|
|
16
|
+
define(["require", "exports", "simple-git", "fs", "path", "node:os", "uuid"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.GitService = void 0;
|
|
22
22
|
const simple_git_1 = require("simple-git");
|
|
23
|
-
const logger_1 = require("../../utils/logger");
|
|
24
23
|
const fs = require("fs");
|
|
25
24
|
const path = require("path");
|
|
26
25
|
const os = require("node:os");
|
|
@@ -63,11 +62,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
63
62
|
yield this.checkoutOrCreateLocalBranch(repoGit, branch);
|
|
64
63
|
fs.cpSync(sourceDir, workingDir, { recursive: true });
|
|
65
64
|
yield repoGit.add("./*");
|
|
66
|
-
const status = yield repoGit.status();
|
|
67
|
-
if (status.files.length === 0) {
|
|
68
|
-
logger_1.logger.debug("No changes to commit.");
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
65
|
const commitMessage = "Update from content-cli";
|
|
72
66
|
yield repoGit.commit(commitMessage);
|
|
73
67
|
yield repoGit.push(["--set-upstream", "origin", branch]);
|
|
@@ -81,6 +81,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
81
81
|
encoding: "utf-8",
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
validateProfileName(name) {
|
|
85
|
+
if (GitProfileService.INVALID_FILENAME_CHARS.test(name)) {
|
|
86
|
+
throw new Error(`Invalid profile name "${name}". The following characters are not allowed: / \\ : * ? " < > |`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
84
89
|
buildProfileFromEnvVariables() {
|
|
85
90
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
91
|
const profileVariables = this.getProfileEnvVariables();
|
|
@@ -131,4 +136,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
138
|
exports.GitProfileService = GitProfileService;
|
|
139
|
+
GitProfileService.INVALID_FILENAME_CHARS = /[\/\\:*?"<>|.]/;
|
|
134
140
|
});
|
|
@@ -31,7 +31,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
// use 5 seconds buffer to avoid rare cases when accessToken is just about to expire before the command is sent
|
|
32
32
|
const expiryBuffer = 5000;
|
|
33
33
|
const deviceCodeScopes = ["studio", "package-manager", "integration.data-pools", "action-engine.projects"];
|
|
34
|
-
const clientCredentialsScopes = ["studio", "integration.data-pools", "action-engine.projects"];
|
|
34
|
+
const clientCredentialsScopes = ["studio", "integration.data-pools", "action-engine.projects", "package-manager"];
|
|
35
35
|
class ProfileService {
|
|
36
36
|
constructor() {
|
|
37
37
|
this.profileContainerPath = path.resolve(homedir, ".celonis-content-cli-profiles");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { NodeTransport } from "../interfaces/node.interfaces";
|
|
3
|
+
export declare class NodeApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
findStagingNodeByKey(packageKey: string, nodeKey: string, withConfiguration: boolean): Promise<NodeTransport>;
|
|
7
|
+
findVersionedNodeByKey(packageKey: string, nodeKey: string, version: string, withConfiguration: boolean): Promise<NodeTransport>;
|
|
8
|
+
findVersionedNodesByPackage(packageKey: string, version: string, withConfiguration: boolean, limit: number, offset: number): Promise<NodeTransport[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { NodeDependencyTransport } from "../interfaces/node-dependency.interfaces";
|
|
3
|
+
export declare class NodeDependencyApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
findAll(packageKey: string, nodeKey: string, version: string): Promise<NodeDependencyTransport[]>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { GetNodeDiffRequest, NodeConfigurationDiffTransport } from "../interfaces/node-diff.interfaces";
|
|
3
|
+
export declare class NodeDiffApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
diff(request: GetNodeDiffRequest): Promise<NodeConfigurationDiffTransport>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConfigurationChangeTransport, NodeConfigurationChangeType } from "./diff-package.interfaces";
|
|
2
|
+
export interface GetNodeDiffRequest {
|
|
3
|
+
packageKey: string;
|
|
4
|
+
nodeKey: string;
|
|
5
|
+
baseVersion: string;
|
|
6
|
+
compareVersion: string;
|
|
7
|
+
}
|
|
8
|
+
export interface NodeConfigurationDiffTransport {
|
|
9
|
+
packageKey: string;
|
|
10
|
+
nodeKey: string;
|
|
11
|
+
parentNodeKey: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
invalidContent: boolean;
|
|
15
|
+
changeDate: string;
|
|
16
|
+
updatedBy: string;
|
|
17
|
+
changeType: NodeConfigurationChangeType;
|
|
18
|
+
changes: ConfigurationChangeTransport;
|
|
19
|
+
metadataChanges: ConfigurationChangeTransport;
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface NodeConfiguration {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface NodeTransport {
|
|
5
|
+
id: string;
|
|
6
|
+
key: string;
|
|
7
|
+
name: string;
|
|
8
|
+
packageNodeKey: string;
|
|
9
|
+
parentNodeKey?: string;
|
|
10
|
+
packageNodeId: string;
|
|
11
|
+
type: string;
|
|
12
|
+
configuration?: NodeConfiguration;
|
|
13
|
+
invalidConfiguration?: string;
|
|
14
|
+
invalidContent: boolean;
|
|
15
|
+
creationDate: string;
|
|
16
|
+
changeDate: string;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
updatedBy: string;
|
|
19
|
+
schemaVersion: number;
|
|
20
|
+
flavor?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Context } from "../../core/command/cli-context";
|
|
2
|
+
export declare class NodeDependencyService {
|
|
3
|
+
private readonly nodeDependencyApi;
|
|
4
|
+
constructor(context: Context);
|
|
5
|
+
listNodeDependencies(packageKey: string, nodeKey: string, version: string, jsonResponse: boolean): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Context } from "../../core/command/cli-context";
|
|
2
|
+
export declare class NodeDiffService {
|
|
3
|
+
private nodeDiffApi;
|
|
4
|
+
constructor(context: Context);
|
|
5
|
+
diff(packageKey: string, nodeKey: string, baseVersion: string, compareVersion: string, jsonResponse: boolean): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Context } from "../../core/command/cli-context";
|
|
2
|
+
export declare class NodeService {
|
|
3
|
+
private nodeApi;
|
|
4
|
+
constructor(context: Context);
|
|
5
|
+
findNode(packageKey: string, nodeKey: string, withConfiguration: boolean, packageVersion: string | null, jsonResponse: boolean): Promise<void>;
|
|
6
|
+
listNodes(packageKey: string, packageVersion: string, limit: number, offset: number, withConfiguration: boolean, jsonResponse: boolean): Promise<void>;
|
|
7
|
+
private printNode;
|
|
8
|
+
}
|
|
@@ -7,7 +7,7 @@ export declare class DeploymentApi {
|
|
|
7
7
|
getDeployments(filter: GetDeploymentsRequest, limit?: string, offset?: string): Promise<DeploymentTransport[]>;
|
|
8
8
|
getActiveDeploymentsForPackage(packageKey: string, targetIds?: string[], limit?: string, offset?: string): Promise<DeploymentTransport[]>;
|
|
9
9
|
getActiveDeploymentForTarget(targetId: string): Promise<DeploymentTransport>;
|
|
10
|
-
getTargets(deployableType: string, packageKey
|
|
10
|
+
getTargets(deployableType: string, packageKey: string): Promise<TargetTransport[]>;
|
|
11
11
|
getDeployables(flavor?: string): Promise<DeployableTransport[]>;
|
|
12
12
|
private addPaginationParams;
|
|
13
13
|
}
|
|
@@ -6,6 +6,6 @@ export declare class DeploymentService {
|
|
|
6
6
|
getDeployments(jsonResponse: boolean, packageKey?: string, targetId?: string, deployableType?: string, status?: string, createdBy?: string, limit?: string, offset?: string): Promise<void>;
|
|
7
7
|
getActiveDeploymentForTarget(targetId: string, jsonResponse: boolean): Promise<void>;
|
|
8
8
|
getActiveDeploymentsForPackage(packageKey: string, jsonResponse: boolean, targetIds?: string[], limit?: string, offset?: string): Promise<void>;
|
|
9
|
-
getTargets(jsonResponse: boolean, deployableType: string, packageKey
|
|
9
|
+
getTargets(jsonResponse: boolean, deployableType: string, packageKey: string): Promise<void>;
|
|
10
10
|
getDeployables(jsonResponse: boolean, flavor?: string): Promise<void>;
|
|
11
11
|
}
|
|
@@ -6,10 +6,12 @@ export declare class GitProfileService {
|
|
|
6
6
|
private readonly homedir;
|
|
7
7
|
private readonly gitProfileContainerPath;
|
|
8
8
|
private readonly configContainer;
|
|
9
|
+
private static readonly INVALID_FILENAME_CHARS;
|
|
9
10
|
findProfile(profileName: string): Promise<GitProfile>;
|
|
10
11
|
makeDefaultProfile(profileName: string): Promise<GitProfile>;
|
|
11
12
|
getDefaultProfile(): string;
|
|
12
13
|
storeProfile(profile: GitProfile): void;
|
|
14
|
+
validateProfileName(name: string): void;
|
|
13
15
|
private buildProfileFromEnvVariables;
|
|
14
16
|
private storeConfig;
|
|
15
17
|
private createProfileContainerIfNotExists;
|