@celonis/content-cli 1.0.4 → 1.0.6
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/action-flows/action-flow/action-flow-api.js +4 -4
- package/commands/configuration-management/api/batch-import-export-api.js +16 -7
- package/commands/configuration-management/api/diff-api.js +3 -3
- package/commands/configuration-management/api/variable-assignment-candidates-api.js +2 -2
- package/commands/configuration-management/batch-import-export.service.js +18 -0
- package/commands/configuration-management/config-command.service.js +3 -0
- package/commands/configuration-management/module.js +13 -0
- package/commands/data-pipeline/data-pool/data-pool-api.js +8 -8
- package/commands/studio/api/asset-api.js +2 -2
- package/commands/studio/api/compute-pool-api.js +2 -2
- package/commands/studio/api/node-api.js +3 -3
- package/commands/studio/api/package-api.js +11 -11
- package/commands/studio/api/package-dependencies-api.js +6 -6
- package/commands/studio/api/space-api.js +4 -4
- package/commands/studio/api/studio-variables-api.js +3 -3
- package/core/command/cli-context.js +8 -2
- package/core/http/http-shared/base.manager.js +6 -6
- package/core/profile/profile.service.js +1 -1
- package/lib/commands/configuration-management/api/batch-import-export-api.d.ts +2 -1
- package/lib/commands/configuration-management/batch-import-export.service.d.ts +2 -0
- package/lib/commands/configuration-management/config-command.service.d.ts +1 -0
- package/lib/commands/configuration-management/interfaces/package-export.interfaces.d.ts +4 -0
- package/lib/commands/configuration-management/module.d.ts +1 -0
- package/lib/core/command/cli-context.d.ts +2 -1
- package/package.json +1 -1
|
@@ -22,18 +22,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class ActionFlowApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
exportRawAssets(packageId) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.getFile(`/ems-automation/api/root/${packageId}/export/assets`).catch(e => {
|
|
29
|
+
return this.httpClient().getFile(`/ems-automation/api/root/${packageId}/export/assets`).catch(e => {
|
|
30
30
|
throw new logger_1.FatalError(`Problem getting Action Flow assets: ${e}`);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
analyzeAssets(packageId) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return this.httpClient.get(`/ems-automation/api/root/${packageId}/export/assets/analyze`).catch(e => {
|
|
36
|
+
return this.httpClient().get(`/ems-automation/api/root/${packageId}/export/assets/analyze`).catch(e => {
|
|
37
37
|
throw new logger_1.FatalError(`Problem analyzing Action Flow assets: ${e}`);
|
|
38
38
|
});
|
|
39
39
|
});
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
const params = {
|
|
44
44
|
dryRun: dryRun,
|
|
45
45
|
};
|
|
46
|
-
return this.httpClient.postFile(`/ems-automation/api/root/${packageId}/import/assets`, data, params).catch(e => {
|
|
46
|
+
return this.httpClient().postFile(`/ems-automation/api/root/${packageId}/import/assets`, data, params).catch(e => {
|
|
47
47
|
throw new logger_1.FatalError(`Problem importing Action Flow assets: ${e}`);
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -22,14 +22,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class BatchImportExportApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findAllActivePackages(flavors, withDependencies = false) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const queryParams = new URLSearchParams();
|
|
30
30
|
queryParams.set("withDependencies", withDependencies.toString());
|
|
31
31
|
flavors.forEach(flavor => queryParams.append("flavors", flavor));
|
|
32
|
-
return this.httpClient.get(`/package-manager/api/core/packages/export/list?${queryParams.toString()}`).catch(e => {
|
|
32
|
+
return this.httpClient().get(`/package-manager/api/core/packages/export/list?${queryParams.toString()}`).catch(e => {
|
|
33
33
|
throw new logger_1.FatalError(`Problem getting active packages: ${e}`);
|
|
34
34
|
});
|
|
35
35
|
});
|
|
@@ -42,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
queryParams.set("variableType", variableType);
|
|
43
43
|
}
|
|
44
44
|
flavors.forEach(flavor => queryParams.append("flavors", flavor));
|
|
45
|
-
return this.httpClient.get(`/package-manager/api/core/packages/export/list-by-variable-value?${queryParams.toString()}`).catch(e => {
|
|
45
|
+
return this.httpClient().get(`/package-manager/api/core/packages/export/list-by-variable-value?${queryParams.toString()}`).catch(e => {
|
|
46
46
|
throw new logger_1.FatalError(`Problem getting active packages by variable value: ${e}`);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -52,7 +52,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
52
52
|
const queryParams = new URLSearchParams();
|
|
53
53
|
packageKeys.forEach(key => queryParams.append("packageKeys", key));
|
|
54
54
|
queryParams.set("withDependencies", withDependencies.toString());
|
|
55
|
-
return this.httpClient.get(`/package-manager/api/core/packages/export/list-by-keys?${queryParams.toString()}`).catch(e => {
|
|
55
|
+
return this.httpClient().get(`/package-manager/api/core/packages/export/list-by-keys?${queryParams.toString()}`).catch(e => {
|
|
56
56
|
throw new logger_1.FatalError(`Problem getting active packages by keys: ${e}`);
|
|
57
57
|
});
|
|
58
58
|
});
|
|
@@ -62,19 +62,28 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
62
62
|
const queryParams = new URLSearchParams();
|
|
63
63
|
packageKeys.forEach(packageKey => queryParams.append("packageKeys", packageKey));
|
|
64
64
|
queryParams.set("withDependencies", withDependencies.toString());
|
|
65
|
-
return this.httpClient.getFile(`/package-manager/api/core/packages/export/batch?${queryParams.toString()}`).catch(e => {
|
|
65
|
+
return this.httpClient().getFile(`/package-manager/api/core/packages/export/batch?${queryParams.toString()}`).catch(e => {
|
|
66
66
|
throw new logger_1.FatalError(`Problem exporting packages: ${e}`);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
batchExportPackagesMetadata(packageKeys) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const queryParams = new URLSearchParams();
|
|
73
|
+
packageKeys.forEach(packageKey => queryParams.append("packageKeys", packageKey));
|
|
74
|
+
return this.httpClient().get(`/package-manager/api/core/packages/metadata/export?${queryParams.toString()}`).catch(e => {
|
|
75
|
+
throw new logger_1.FatalError(`Problem exporting packages metadata: ${e}`);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
70
79
|
importPackages(data, overwrite) {
|
|
71
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
return this.httpClient.postFile("/package-manager/api/core/packages/import/batch", data, { overwrite });
|
|
81
|
+
return this.httpClient().postFile("/package-manager/api/core/packages/import/batch", data, { overwrite });
|
|
73
82
|
});
|
|
74
83
|
}
|
|
75
84
|
findVariablesWithValuesByPackageKeysAndVersion(packagesByKeyAndVersion) {
|
|
76
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
return this.httpClient.post("/package-manager/api/core/packages/export/batch/variables-with-assignments", packagesByKeyAndVersion).catch(e => {
|
|
86
|
+
return this.httpClient().post("/package-manager/api/core/packages/export/batch/variables-with-assignments", packagesByKeyAndVersion).catch(e => {
|
|
78
87
|
throw new logger_1.FatalError(`Problem exporting package variables: ${e}`);
|
|
79
88
|
});
|
|
80
89
|
});
|
|
@@ -21,16 +21,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
exports.DiffApi = void 0;
|
|
22
22
|
class DiffApi {
|
|
23
23
|
constructor(context) {
|
|
24
|
-
this.httpClient = context.httpClient;
|
|
24
|
+
this.httpClient = () => context.httpClient;
|
|
25
25
|
}
|
|
26
26
|
diffPackages(data) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
return this.httpClient.postFile("/package-manager/api/core/packages/diff/configuration", data);
|
|
28
|
+
return this.httpClient().postFile("/package-manager/api/core/packages/diff/configuration", data);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
hasChanges(data) {
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
return this.httpClient.postFile("/package-manager/api/core/packages/diff/configuration/has-changes", data);
|
|
33
|
+
return this.httpClient().postFile("/package-manager/api/core/packages/diff/configuration/has-changes", data);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
const logger_1 = require("../../../core/utils/logger");
|
|
24
24
|
class VariableAssignmentCandidatesApi {
|
|
25
25
|
constructor(context) {
|
|
26
|
-
this.httpClient = context.httpClient;
|
|
26
|
+
this.httpClient = () => context.httpClient;
|
|
27
27
|
}
|
|
28
28
|
getCandidateAssignments(type, params) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -31,7 +31,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
throw new logger_1.FatalError(`Variable type ${type} not supported.`);
|
|
32
32
|
}
|
|
33
33
|
const apiUrl = variable_assignment_apis_constants_1.variableAssignmentApis[type].url + (params.toString().length ? `?${params.toString()}` : "");
|
|
34
|
-
return this.httpClient.get(apiUrl).catch(e => {
|
|
34
|
+
return this.httpClient().get(apiUrl).catch(e => {
|
|
35
35
|
throw new logger_1.FatalError(`Problem getting variables assignment values for type ${type}: ${e}`);
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -86,6 +86,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
86
86
|
logger_1.logger.info(fileDownloadedMessage + filename);
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
+
batchExportPackagesMetadata(packageKeys, jsonResponse) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const exportedPackagesMetadata = yield this.batchImportExportApi.batchExportPackagesMetadata(packageKeys);
|
|
92
|
+
if (jsonResponse) {
|
|
93
|
+
this.exportListOfPackagesMetadata(exportedPackagesMetadata);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
exportedPackagesMetadata.forEach(pkg => {
|
|
97
|
+
logger_1.logger.info(`${pkg.key} - Has Unpublished Changes: ${pkg.hasUnpublishedChanges}`);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
89
102
|
batchImportPackages(file, overwrite) {
|
|
90
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
104
|
let configs = new AdmZip(file);
|
|
@@ -140,6 +153,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
140
153
|
});
|
|
141
154
|
return this.batchImportExportApi.findVariablesWithValuesByPackageKeysAndVersion(variableExportRequest);
|
|
142
155
|
}
|
|
156
|
+
exportListOfPackagesMetadata(packagesMetadata) {
|
|
157
|
+
const filename = (0, uuid_1.v4)() + ".json";
|
|
158
|
+
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(packagesMetadata), filename);
|
|
159
|
+
logger_1.logger.info(file_service_1.FileService.fileDownloadedMessage + filename);
|
|
160
|
+
}
|
|
143
161
|
buildBodyForImport(configs, variablesManifests) {
|
|
144
162
|
const formData = new FormData();
|
|
145
163
|
const readableStream = this.getReadableStream(configs);
|
|
@@ -55,6 +55,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
55
55
|
batchExportPackages(packageKeys, withDependencies = false) {
|
|
56
56
|
return this.batchImportExportService.batchExportPackages(packageKeys, withDependencies);
|
|
57
57
|
}
|
|
58
|
+
batchExportPackagesMetadata(packageKeys, jsonResponse) {
|
|
59
|
+
return this.batchImportExportService.batchExportPackagesMetadata(packageKeys, jsonResponse);
|
|
60
|
+
}
|
|
58
61
|
batchImportPackages(file, overwrite) {
|
|
59
62
|
return this.batchImportExportService.batchImportPackages(file, overwrite);
|
|
60
63
|
}
|
|
@@ -40,6 +40,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
40
40
|
.requiredOption("--packageKeys <packageKeys...>", "Keys of packages to export")
|
|
41
41
|
.option("--withDependencies", "Include variables and dependencies", "")
|
|
42
42
|
.action(this.batchExportPackages);
|
|
43
|
+
const metadataCommand = configCommand.command("metadata")
|
|
44
|
+
.description("Commands related to package metadata");
|
|
45
|
+
metadataCommand
|
|
46
|
+
.command("export")
|
|
47
|
+
.description("Command to show whether packages have unpublished changes")
|
|
48
|
+
.requiredOption("--packageKeys <packageKeys...>", "Keys of packages to find the metadata of")
|
|
49
|
+
.option("--json", "Return response as json type", "")
|
|
50
|
+
.action(this.batchExportPackagesMetadata);
|
|
43
51
|
configCommand.command("import")
|
|
44
52
|
.description("Command to import package configs")
|
|
45
53
|
.option("--overwrite", "Flag to allow overwriting of packages")
|
|
@@ -77,6 +85,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
77
85
|
yield new config_command_service_1.ConfigCommandService(context).batchExportPackages(options.packageKeys, options.withDependencies);
|
|
78
86
|
});
|
|
79
87
|
}
|
|
88
|
+
batchExportPackagesMetadata(context, command, options) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
yield new config_command_service_1.ConfigCommandService(context).batchExportPackagesMetadata(options.packageKeys, options.json);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
80
93
|
batchImportPackages(context, command, options) {
|
|
81
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
95
|
yield new config_command_service_1.ConfigCommandService(context).batchImportPackages(options.file, options.overwrite);
|
|
@@ -22,53 +22,53 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class DataPoolApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findAllPagedPools(limit, page) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get(`/integration/api/pools/paged?limit=${limit}&page=${page}`).catch(e => {
|
|
29
|
+
return this.httpClient().get(`/integration/api/pools/paged?limit=${limit}&page=${page}`).catch(e => {
|
|
30
30
|
throw new logger_1.FatalError(`Problem getting data pools: : ${e}`);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
executeDataPoolsBatchImport(importRequest) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return this.httpClient.post("/integration/api/pool/batch-import", importRequest).catch(e => {
|
|
36
|
+
return this.httpClient().post("/integration/api/pool/batch-import", importRequest).catch(e => {
|
|
37
37
|
throw new logger_1.FatalError(`Data Pool batch import failed: : ${e}`);
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
exportDataPool(poolId) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
return this.httpClient.get(`/integration/api/pools/${poolId}/v2/export`).catch(e => {
|
|
43
|
+
return this.httpClient().get(`/integration/api/pools/${poolId}/v2/export`).catch(e => {
|
|
44
44
|
throw new logger_1.FatalError(`Data Pool export failed: : ${e}`);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
listConnections(poolId) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
return this.httpClient.get(`/integration/api/pools/${poolId}/overviews/data-sources`).catch(e => {
|
|
50
|
+
return this.httpClient().get(`/integration/api/pools/${poolId}/overviews/data-sources`).catch(e => {
|
|
51
51
|
throw new logger_1.FatalError(`Can not list connections: : ${e}`);
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
getConnection(poolId, connectionId) {
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
return this.httpClient.get(`/integration/api/pools/${poolId}/data-sources/${connectionId}`).catch(e => {
|
|
57
|
+
return this.httpClient().get(`/integration/api/pools/${poolId}/data-sources/${connectionId}`).catch(e => {
|
|
58
58
|
throw new logger_1.FatalError(`Can not get connection: : ${e}`);
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
getTypedConnection(poolId, connectionId, type) {
|
|
63
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
return this.httpClient.get(`/integration/api/datasource/${type}/${connectionId}`).catch(e => {
|
|
64
|
+
return this.httpClient().get(`/integration/api/datasource/${type}/${connectionId}`).catch(e => {
|
|
65
65
|
throw new logger_1.FatalError(`Can get typed connection: : ${e}`);
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
updateTypedConnection(poolId, connectionId, type, data) {
|
|
70
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
return this.httpClient.put(`/integration/api/datasource/${type}/${connectionId}`, data).catch(e => {
|
|
71
|
+
return this.httpClient().put(`/integration/api/datasource/${type}/${connectionId}`, data).catch(e => {
|
|
72
72
|
throw new logger_1.FatalError(`Can not update typed connection: ${e}`);
|
|
73
73
|
});
|
|
74
74
|
});
|
|
@@ -22,11 +22,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class AssetApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findAllAssets(assetType) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get(this.getFindAllAssetsUrl(assetType)).catch(e => {
|
|
29
|
+
return this.httpClient().get(this.getFindAllAssetsUrl(assetType)).catch(e => {
|
|
30
30
|
throw new logger_1.FatalError(`Problem getting assets: ${e}`);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -21,11 +21,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
exports.ComputePoolApi = void 0;
|
|
22
22
|
class ComputePoolApi {
|
|
23
23
|
constructor(context) {
|
|
24
|
-
this.httpClient = context.httpClient;
|
|
24
|
+
this.httpClient = () => context.httpClient;
|
|
25
25
|
}
|
|
26
26
|
findAllDataModelsDetails() {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
return this.httpClient.get("/package-manager/api/compute-pools/data-models/details")
|
|
28
|
+
return this.httpClient().get("/package-manager/api/compute-pools/data-models/details")
|
|
29
29
|
.catch(e => {
|
|
30
30
|
return null;
|
|
31
31
|
});
|
|
@@ -22,11 +22,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class NodeApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findAllNodesOfType(assetType) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get(`/package-manager/api/nodes?assetType=${assetType}`)
|
|
29
|
+
return this.httpClient().get(`/package-manager/api/nodes?assetType=${assetType}`)
|
|
30
30
|
.catch(e => {
|
|
31
31
|
throw new logger_1.FatalError(`Problem getting nodes of type ${assetType}: ${e}`);
|
|
32
32
|
});
|
|
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
}
|
|
35
35
|
findOneByKeyAndRootNodeKey(packageKey, nodeKey) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
return this.httpClient.get(`/package-manager/api/nodes/${packageKey}/${nodeKey}`).catch(e => {
|
|
37
|
+
return this.httpClient().get(`/package-manager/api/nodes/${packageKey}/${nodeKey}`).catch(e => {
|
|
38
38
|
return null;
|
|
39
39
|
});
|
|
40
40
|
});
|
|
@@ -22,11 +22,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class PackageApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findAllPackages() {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get("/package-manager/api/packages").catch(e => {
|
|
29
|
+
return this.httpClient().get("/package-manager/api/packages").catch(e => {
|
|
30
30
|
throw new logger_1.FatalError(`Problem getting packages: ${e}`);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -37,7 +37,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
37
37
|
queryParams.set("newKey", rootPackageKey);
|
|
38
38
|
queryParams.set("version", version !== null && version !== void 0 ? version : "");
|
|
39
39
|
queryParams.set("excludeActionFlows", excludeActionFlows ? "true" : "false");
|
|
40
|
-
return yield this.httpClient.downloadFile(`/package-manager/api/packages/${rootPackageKey}/export?${queryParams.toString()}`).catch(e => {
|
|
40
|
+
return yield this.httpClient().downloadFile(`/package-manager/api/packages/${rootPackageKey}/export?${queryParams.toString()}`).catch(e => {
|
|
41
41
|
throw new logger_1.FatalError(`Package ${rootPackageKey}_${version} failed to export.`);
|
|
42
42
|
});
|
|
43
43
|
});
|
|
@@ -48,42 +48,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
if (type) {
|
|
49
49
|
queryParams.set("type", type);
|
|
50
50
|
}
|
|
51
|
-
return this.httpClient.get(`/package-manager/api/packages/with-variable-assignments?${queryParams.toString()}`).catch(e => {
|
|
51
|
+
return this.httpClient().get(`/package-manager/api/packages/with-variable-assignments?${queryParams.toString()}`).catch(e => {
|
|
52
52
|
throw new logger_1.FatalError(`Problem getting variables of packages: : ${e}`);
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
findLatestVersionById(nodeId) {
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/latest-version`).catch(e => {
|
|
58
|
+
return this.httpClient().get(`/package-manager/api/packages/${nodeId}/latest-version`).catch(e => {
|
|
59
59
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
findActiveVersionById(nodeId) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/active`).catch(e => {
|
|
65
|
+
return this.httpClient().get(`/package-manager/api/packages/${nodeId}/active`).catch(e => {
|
|
66
66
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
findActiveVersionByIds(nodeIds) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
return this.httpClient.post("/package-manager/api/packages/active/by-ids", nodeIds).catch(e => {
|
|
72
|
+
return this.httpClient().post("/package-manager/api/packages/active/by-ids", nodeIds).catch(e => {
|
|
73
73
|
throw new logger_1.FatalError(`Problem getting latest version of packages: ${e}`);
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
findNextVersion(nodeId) {
|
|
78
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/next-version`).catch(e => {
|
|
79
|
+
return this.httpClient().get(`/package-manager/api/packages/${nodeId}/next-version`).catch(e => {
|
|
80
80
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
importPackage(nodeContent, spaceId, overwrite, excludeActionFlows) {
|
|
85
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
yield this.httpClient.postFile("/package-manager/api/packages/import", nodeContent, {
|
|
86
|
+
yield this.httpClient().postFile("/package-manager/api/packages/import", nodeContent, {
|
|
87
87
|
spaceId: spaceId,
|
|
88
88
|
overwrite: overwrite,
|
|
89
89
|
excludeActionFlows: excludeActionFlows
|
|
@@ -94,14 +94,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
94
94
|
}
|
|
95
95
|
movePackageToSpace(nodeId, spaceId) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
yield this.httpClient.put(`/package-manager/api/packages/${nodeId}/move/${spaceId}`, {}).catch(e => {
|
|
97
|
+
yield this.httpClient().put(`/package-manager/api/packages/${nodeId}/move/${spaceId}`, {}).catch(e => {
|
|
98
98
|
throw new logger_1.FatalError(`Problem moving package: ${e}`);
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
publishPackage(activatePackage) {
|
|
103
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
yield this.httpClient.post(`/package-manager/api/packages/${activatePackage.packageKey}/activate`, activatePackage).catch(e => {
|
|
104
|
+
yield this.httpClient().post(`/package-manager/api/packages/${activatePackage.packageKey}/activate`, activatePackage).catch(e => {
|
|
105
105
|
throw new logger_1.FatalError(`Problem activating package with key ${activatePackage.packageKey}: ${e}`);
|
|
106
106
|
});
|
|
107
107
|
});
|
|
@@ -22,11 +22,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class PackageDependenciesApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findDependenciesOfPackage(nodeId, draftId) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get(`/package-manager/api/package-dependencies/${nodeId}/by-root-draft-id/${draftId}`)
|
|
29
|
+
return this.httpClient().get(`/package-manager/api/package-dependencies/${nodeId}/by-root-draft-id/${draftId}`)
|
|
30
30
|
.catch(e => {
|
|
31
31
|
throw new logger_1.FatalError(`Problem getting dependencies of package: ${e}`);
|
|
32
32
|
});
|
|
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
}
|
|
35
35
|
findPackageDependenciesByIds(nodeDraftIdMap) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
return yield this.httpClient.post("/package-manager/api/package-dependencies/by-ids", Object.fromEntries(nodeDraftIdMap))
|
|
37
|
+
return yield this.httpClient().post("/package-manager/api/package-dependencies/by-ids", Object.fromEntries(nodeDraftIdMap))
|
|
38
38
|
.catch(e => {
|
|
39
39
|
throw new logger_1.FatalError(`Problem getting dependencies of package: ${e}`);
|
|
40
40
|
});
|
|
@@ -42,21 +42,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
}
|
|
43
43
|
updatePackageDependency(nodeId, packageDependency) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
yield this.httpClient.put(`/package-manager/api/package-dependencies/${nodeId}/dependency/by-key/${packageDependency.key}`, packageDependency).catch(e => {
|
|
45
|
+
yield this.httpClient().put(`/package-manager/api/package-dependencies/${nodeId}/dependency/by-key/${packageDependency.key}`, packageDependency).catch(e => {
|
|
46
46
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
createDependencies(packageId, packageDependency) {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
yield this.httpClient.post(`/package-manager/api/package-dependencies/${packageId}`, packageDependency).catch(e => {
|
|
52
|
+
yield this.httpClient().post(`/package-manager/api/package-dependencies/${packageId}`, packageDependency).catch(e => {
|
|
53
53
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
deleteDependency(packageId, packageDependencyKey) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
yield this.httpClient.delete(`/package-manager/api/package-dependencies/${packageId}/dependency/by-key/${packageDependencyKey}`).catch(e => {
|
|
59
|
+
yield this.httpClient().delete(`/package-manager/api/package-dependencies/${packageId}/dependency/by-key/${packageDependencyKey}`).catch(e => {
|
|
60
60
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
61
61
|
});
|
|
62
62
|
});
|
|
@@ -22,25 +22,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
const logger_1 = require("../../../core/utils/logger");
|
|
23
23
|
class SpaceApi {
|
|
24
24
|
constructor(context) {
|
|
25
|
-
this.httpClient = context.httpClient;
|
|
25
|
+
this.httpClient = () => context.httpClient;
|
|
26
26
|
}
|
|
27
27
|
findOne(spaceId) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
return this.httpClient.get(`/package-manager/api/spaces/${spaceId}`).catch(e => {
|
|
29
|
+
return this.httpClient().get(`/package-manager/api/spaces/${spaceId}`).catch(e => {
|
|
30
30
|
throw new logger_1.FatalError(`Problem getting space: ${spaceId} ${e}`);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
findAllSpaces() {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
return this.httpClient.get("/package-manager/api/spaces").catch(e => {
|
|
36
|
+
return this.httpClient().get("/package-manager/api/spaces").catch(e => {
|
|
37
37
|
throw new logger_1.FatalError(`Problem getting spaces: ${e}`);
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
createSpace(space) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
return this.httpClient.post("/package-manager/api/spaces", space).catch(e => {
|
|
43
|
+
return this.httpClient().post("/package-manager/api/spaces", space).catch(e => {
|
|
44
44
|
throw new logger_1.FatalError(`Problem space creation: ${e}`);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
@@ -23,11 +23,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
23
23
|
const logger_1 = require("../../../core/utils/logger");
|
|
24
24
|
class StudioVariablesApi {
|
|
25
25
|
constructor(context) {
|
|
26
|
-
this.httpClient = context.httpClient;
|
|
26
|
+
this.httpClient = () => context.httpClient;
|
|
27
27
|
}
|
|
28
28
|
assignVariableValues(packageKey, variablesAssignments) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
return this.httpClient.post(`/package-manager/api/nodes/by-package-key/${packageKey}/variables/values`, variablesAssignments).catch(e => {
|
|
30
|
+
return this.httpClient().post(`/package-manager/api/nodes/by-package-key/${packageKey}/variables/values`, variablesAssignments).catch(e => {
|
|
31
31
|
throw new logger_1.FatalError(`Problem updating variables of package ${packageKey}: ${e}`);
|
|
32
32
|
});
|
|
33
33
|
});
|
|
@@ -36,7 +36,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const queryParams = new url_1.URLSearchParams();
|
|
38
38
|
queryParams.set("appMode", appMode);
|
|
39
|
-
return this.httpClient.get(`/package-manager/api/nodes/by-package-key/${packageKey}/variables/runtime-values?${queryParams.toString()}`).catch(e => {
|
|
39
|
+
return this.httpClient().get(`/package-manager/api/nodes/by-package-key/${packageKey}/variables/runtime-values?${queryParams.toString()}`).catch(e => {
|
|
40
40
|
throw new logger_1.FatalError(`Problem getting runtime variables of package ${packageKey}: ${e}`);
|
|
41
41
|
});
|
|
42
42
|
});
|
|
@@ -33,13 +33,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
this.profileService = new profile_service_1.ProfileService();
|
|
34
34
|
this.profileName = options.profile;
|
|
35
35
|
}
|
|
36
|
+
get httpClient() {
|
|
37
|
+
if (!this._httpClient) {
|
|
38
|
+
throw new logger_1.FatalError("No profile provided. Please provide a profile or a TEAM_URL and API_TOKEN through env variables");
|
|
39
|
+
}
|
|
40
|
+
return this._httpClient;
|
|
41
|
+
}
|
|
36
42
|
init() {
|
|
37
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
44
|
yield this.loadProfile(this.profileName);
|
|
39
45
|
if (this.profile) {
|
|
40
46
|
// only if a profile is available, it makes sense to provide an initialized
|
|
41
47
|
// HttpClient API.
|
|
42
|
-
this.
|
|
48
|
+
this._httpClient = new http_client_1.HttpClient(this);
|
|
43
49
|
}
|
|
44
50
|
});
|
|
45
51
|
}
|
|
@@ -58,7 +64,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
58
64
|
this.log.debug(`Using profile ${profileName}`);
|
|
59
65
|
}
|
|
60
66
|
catch (err) {
|
|
61
|
-
this.log.
|
|
67
|
+
this.log.debug(err);
|
|
62
68
|
this.profile = undefined;
|
|
63
69
|
this.profileName = undefined;
|
|
64
70
|
}
|
|
@@ -25,12 +25,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
25
25
|
class BaseManager {
|
|
26
26
|
constructor(context) {
|
|
27
27
|
this.fileDownloadedMessage = "File downloaded successfully. New filename: ";
|
|
28
|
-
this.httpClient = context.httpClient;
|
|
28
|
+
this.httpClient = () => context.httpClient;
|
|
29
29
|
}
|
|
30
30
|
pull() {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
return new Promise((resolve, reject) => {
|
|
33
|
-
this.httpClient
|
|
33
|
+
this.httpClient()
|
|
34
34
|
.get(this.getConfig().pullUrl)
|
|
35
35
|
.then(data => {
|
|
36
36
|
try {
|
|
@@ -53,7 +53,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
53
53
|
pullFile() {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
return new Promise((resolve, reject) => {
|
|
56
|
-
this.httpClient
|
|
56
|
+
this.httpClient()
|
|
57
57
|
.downloadFile(this.getConfig().pullUrl)
|
|
58
58
|
.then(data => {
|
|
59
59
|
const filename = this.writeStreamToFile(data);
|
|
@@ -70,7 +70,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
70
70
|
push() {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
return new Promise((resolve, reject) => {
|
|
73
|
-
this.httpClient
|
|
73
|
+
this.httpClient()
|
|
74
74
|
.post(this.getConfig().pushUrl, this.getBody())
|
|
75
75
|
.then(data => {
|
|
76
76
|
logger_1.logger.info(this.getConfig().onPushSuccessMessage(data));
|
|
@@ -86,7 +86,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
86
86
|
update() {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
return new Promise((resolve, reject) => {
|
|
89
|
-
this.httpClient
|
|
89
|
+
this.httpClient()
|
|
90
90
|
.put(this.getConfig().updateUrl, this.getBody())
|
|
91
91
|
.then(data => {
|
|
92
92
|
logger_1.logger.info(this.getConfig().onUpdateSuccessMessage());
|
|
@@ -102,7 +102,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
102
102
|
findAll() {
|
|
103
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
104
|
return new Promise((resolve, reject) => {
|
|
105
|
-
this.httpClient
|
|
105
|
+
this.httpClient()
|
|
106
106
|
.get(this.getConfig().findAllUrl)
|
|
107
107
|
.then(data => {
|
|
108
108
|
this.getConfig().onFindAll(data);
|
|
@@ -308,7 +308,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
308
308
|
}
|
|
309
309
|
checkIfMissingProfile(profileName, reject) {
|
|
310
310
|
if (!profileName && (!process.env.TEAM_URL || !process.env.API_TOKEN)) {
|
|
311
|
-
reject("
|
|
311
|
+
reject("Profile not found");
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as FormData from "form-data";
|
|
3
|
-
import { PackageExportTransport, PackageKeyAndVersionPair, PostPackageImportData, VariableManifestTransport } from "../interfaces/package-export.interfaces";
|
|
3
|
+
import { PackageExportTransport, PackageKeyAndVersionPair, PackageMetadataExportTransport, PostPackageImportData, VariableManifestTransport } from "../interfaces/package-export.interfaces";
|
|
4
4
|
import { Context } from "../../../core/command/cli-context";
|
|
5
5
|
export declare class BatchImportExportApi {
|
|
6
6
|
private httpClient;
|
|
@@ -9,6 +9,7 @@ export declare class BatchImportExportApi {
|
|
|
9
9
|
findActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<PackageExportTransport[]>;
|
|
10
10
|
findActivePackagesByKeys(packageKeys: string[], withDependencies?: boolean): Promise<PackageExportTransport[]>;
|
|
11
11
|
exportPackages(packageKeys: string[], withDependencies?: boolean): Promise<Buffer>;
|
|
12
|
+
batchExportPackagesMetadata(packageKeys: string[]): Promise<PackageMetadataExportTransport[]>;
|
|
12
13
|
importPackages(data: FormData, overwrite: boolean): Promise<PostPackageImportData[]>;
|
|
13
14
|
findVariablesWithValuesByPackageKeysAndVersion(packagesByKeyAndVersion: PackageKeyAndVersionPair[]): Promise<VariableManifestTransport[]>;
|
|
14
15
|
}
|
|
@@ -7,12 +7,14 @@ export declare class BatchImportExportService {
|
|
|
7
7
|
listActivePackages(flavors: string[]): Promise<void>;
|
|
8
8
|
findAndExportListOfActivePackages(flavors: string[], packageKeys: string[], withDependencies: boolean): Promise<void>;
|
|
9
9
|
batchExportPackages(packageKeys: string[], withDependencies?: boolean): Promise<void>;
|
|
10
|
+
batchExportPackagesMetadata(packageKeys: string[], jsonResponse: boolean): Promise<void>;
|
|
10
11
|
batchImportPackages(file: string, overwrite: boolean): Promise<void>;
|
|
11
12
|
findAndExportListOfActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<void>;
|
|
12
13
|
listActivePackagesByVariableValue(flavors: string[], variableValue: string, variableType: string): Promise<void>;
|
|
13
14
|
private exportListOfPackages;
|
|
14
15
|
private getVersionsByPackageKey;
|
|
15
16
|
private getVersionedVariablesForPackagesWithKeys;
|
|
17
|
+
private exportListOfPackagesMetadata;
|
|
16
18
|
private buildBodyForImport;
|
|
17
19
|
private getReadableStream;
|
|
18
20
|
private parseEntryData;
|
|
@@ -7,6 +7,7 @@ export declare class ConfigCommandService {
|
|
|
7
7
|
listActivePackages(jsonResponse: boolean, flavors: string[], withDependencies: boolean, packageKeys: string[], variableValue: string, variableType: string): Promise<void>;
|
|
8
8
|
listVariables(jsonResponse: boolean, keysByVersion: string[], keysByVersionFile: string): Promise<void>;
|
|
9
9
|
batchExportPackages(packageKeys: string[], withDependencies?: boolean): Promise<void>;
|
|
10
|
+
batchExportPackagesMetadata(packageKeys: string[], jsonResponse: boolean): Promise<void>;
|
|
10
11
|
batchImportPackages(file: string, overwrite: boolean): Promise<void>;
|
|
11
12
|
diffPackages(file: string, hasChanges: boolean, jsonResponse: boolean): Promise<void>;
|
|
12
13
|
private listPackagesByVariableValue;
|
|
@@ -18,6 +18,10 @@ export interface PackageExportTransport {
|
|
|
18
18
|
spaceId?: string;
|
|
19
19
|
datamodels?: StudioComputeNodeDescriptor[];
|
|
20
20
|
}
|
|
21
|
+
export interface PackageMetadataExportTransport {
|
|
22
|
+
key: string;
|
|
23
|
+
hasUnpublishedChanges: boolean;
|
|
24
|
+
}
|
|
21
25
|
export interface PackageManifestTransport {
|
|
22
26
|
packageKey: string;
|
|
23
27
|
flavor: string;
|
|
@@ -7,6 +7,7 @@ declare class Module extends IModule {
|
|
|
7
7
|
register(context: Context, configurator: Configurator): void;
|
|
8
8
|
private listActivePackages;
|
|
9
9
|
private batchExportPackages;
|
|
10
|
+
private batchExportPackagesMetadata;
|
|
10
11
|
private batchImportPackages;
|
|
11
12
|
private diffPackages;
|
|
12
13
|
private listVariables;
|
|
@@ -6,12 +6,13 @@ import { Profile } from "../profile/profile.interface";
|
|
|
6
6
|
* configured upon the start of the CLI.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Context {
|
|
9
|
-
|
|
9
|
+
_httpClient: HttpClient;
|
|
10
10
|
profile: Profile;
|
|
11
11
|
private log;
|
|
12
12
|
private profileName;
|
|
13
13
|
private profileService;
|
|
14
14
|
constructor(options: any);
|
|
15
|
+
get httpClient(): HttpClient;
|
|
15
16
|
init(): Promise<void>;
|
|
16
17
|
private loadProfile;
|
|
17
18
|
}
|