@celonis/content-cli 0.13.4 → 1.0.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/README.md +13 -6
- package/{api → commands/action-flows/action-flow}/action-flow-api.js +10 -9
- package/commands/{action-flow.command.js → action-flows/action-flow/action-flow-command.service.js} +11 -8
- package/{services/action-flow/action-flow-service.js → commands/action-flows/action-flow/action-flow.service.js} +12 -10
- package/commands/action-flows/module.js +88 -0
- package/commands/{skill.command.js → action-flows/skill/skill-command.service.js} +9 -11
- package/{content/factory/skill-manager.factory.js → commands/action-flows/skill/skill.manager-factory.js} +7 -4
- package/{content/manager → commands/action-flows/skill}/skill.manager.js +7 -4
- package/commands/analysis/analysis-bookmarks-command.service.js +39 -0
- package/{content/factory/analysis-bookmarks-manager.factory.js → commands/analysis/analysis-bookmarks.manager-factory.js} +7 -4
- package/{content/manager → commands/analysis}/analysis-bookmarks.manager.js +8 -5
- package/commands/analysis/module.js +52 -0
- package/commands/configuration-management/api/batch-import-export-api.js +84 -0
- package/{api → commands/configuration-management/api}/diff-api.js +8 -7
- package/commands/configuration-management/api/variable-assignment-candidates-api.js +41 -0
- package/{services/package-manager/batch-import-export-service.js → commands/configuration-management/batch-import-export.service.js} +43 -23
- package/commands/configuration-management/config-command.service.js +76 -0
- package/{services/package-manager/diff-service.js → commands/configuration-management/diff.service.js} +11 -8
- package/commands/configuration-management/module.js +102 -0
- package/{services/studio → commands/configuration-management}/studio.service.js +33 -24
- package/commands/{variable.command.js → configuration-management/variable-command.service.js} +10 -7
- package/{services/package-manager/variable-service.js → commands/configuration-management/variable.service.js} +36 -42
- package/commands/{ctp.command.js → cpm4/ctp-command.service.js} +11 -13
- package/{content/manager → commands/cpm4}/ctp.analysis.manager.js +3 -0
- package/{content/manager → commands/cpm4}/ctp.datamodel.manager.js +2 -2
- package/{content/factory/ctp-manager.factory.js → commands/cpm4/ctp.manager-factory.js} +9 -6
- package/{content/manager → commands/cpm4}/ctp.manager.js +6 -4
- package/commands/cpm4/module.js +46 -0
- package/commands/{connection.command.js → data-pipeline/connection/connection-command.service.js} +14 -11
- package/commands/data-pipeline/connection/connection.commands.js +65 -0
- package/{services → commands/data-pipeline}/connection/connection.service.js +18 -15
- package/{api → commands/data-pipeline/data-pool}/data-pool-api.js +14 -13
- package/commands/{data-pool.command.js → data-pipeline/data-pool/data-pool-command.service.js} +25 -23
- package/{content/factory → commands/data-pipeline/data-pool}/data-pool-manager.factory.js +9 -6
- package/{services → commands/data-pipeline}/data-pool/data-pool-service.js +13 -10
- package/commands/data-pipeline/data-pool/data-pool.commands.js +99 -0
- package/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.js +8 -9
- package/commands/data-pipeline/module.js +24 -0
- package/commands/profile/module.js +60 -0
- package/commands/profile/profile-command.service.js +94 -0
- package/{api → commands/studio/api}/asset-api.js +8 -7
- package/{api → commands/studio/api}/compute-pool-api.js +7 -6
- package/{api → commands/studio/api}/node-api.js +9 -8
- package/{api → commands/studio/api}/package-api.js +18 -17
- package/{api → commands/studio/api}/package-dependencies-api.js +12 -11
- package/{api → commands/studio/api}/space-api.js +10 -9
- package/commands/{analysis-bookmarks.command.js → studio/api/studio-variables-api.js} +18 -13
- package/commands/{asset.command.js → studio/command-service/asset-command.service.js} +21 -19
- package/commands/{package.command.js → studio/command-service/package-command.service.js} +22 -20
- package/commands/{space.command.js → studio/command-service/space-command.service.js} +9 -11
- package/commands/studio/command-service/widget.command.js +56 -0
- package/{content/factory/asset-manager.factory.js → commands/studio/manager/asset.manager-factory.js} +7 -4
- package/{content → commands/studio}/manager/asset.manager.js +8 -5
- package/{content/factory/package-manager.factory.js → commands/studio/manager/package.manager-factory.js} +7 -4
- package/{content → commands/studio}/manager/package.manager.js +9 -6
- package/{content/factory/space-manager.factory.js → commands/studio/manager/space.manager-factory.js} +6 -3
- package/{content → commands/studio}/manager/space.manager.js +7 -4
- package/{content/factory/widget-manager.factory.js → commands/studio/manager/widget.manager-factory.js} +8 -5
- package/{content → commands/studio}/manager/widget.manager.js +5 -5
- package/commands/studio/module.js +169 -0
- package/{services/package-manager → commands/studio/service}/asset-service.js +10 -9
- package/{services/package-manager/datamodel-service.js → commands/studio/service/data-model.service.js} +8 -6
- package/{services/package-manager/package-service.js → commands/studio/service/package.service.js} +59 -49
- package/{services/package-manager/space-service.js → commands/studio/service/space.service.js} +9 -9
- package/commands/studio/service/studio-variable.service.js +41 -0
- package/content-cli.js +69 -20
- package/core/command/cli-context.js +69 -0
- package/core/command/module-handler.js +200 -0
- package/core/http/base-api.js +115 -0
- package/{services/http-client-service.v2.js → core/http/http-client.js} +39 -24
- package/{services/context.service.js → core/http/http-shared/base.manager.helper.js} +6 -16
- package/{content/manager → core/http/http-shared}/base.manager.js +14 -21
- package/{services → core/profile}/profile.service.js +11 -5
- package/{validators → core/profile}/profile.validator.js +3 -3
- package/{services → core/utils}/file-service.js +2 -7
- package/core/utils/logger.js +102 -0
- package/{services → core/utils}/question.service.js +18 -7
- package/{util → core/utils}/version.js +1 -1
- package/lib/{api → commands/action-flows/action-flow}/action-flow-api.d.ts +4 -4
- package/lib/commands/{action-flow.command.d.ts → action-flows/action-flow/action-flow-command.service.d.ts} +4 -1
- package/lib/{services/action-flow/action-flow-service.d.ts → commands/action-flows/action-flow/action-flow.service.d.ts} +4 -4
- package/lib/commands/action-flows/module.d.ts +14 -0
- package/lib/commands/{skill.command.d.ts → action-flows/skill/skill-command.service.d.ts} +3 -2
- package/lib/commands/action-flows/skill/skill.manager-factory.d.ts +8 -0
- package/lib/{content/manager → commands/action-flows/skill}/skill.manager.d.ts +4 -2
- package/lib/commands/analysis/analysis-bookmarks-command.service.d.ts +7 -0
- package/lib/commands/analysis/analysis-bookmarks.manager-factory.d.ts +8 -0
- package/lib/{content/manager → commands/analysis}/analysis-bookmarks.manager.d.ts +4 -2
- package/lib/commands/analysis/module.d.ts +11 -0
- package/lib/{api → commands/configuration-management/api}/batch-import-export-api.d.ts +6 -5
- package/lib/{api → commands/configuration-management/api}/diff-api.d.ts +5 -5
- package/lib/commands/configuration-management/api/variable-assignment-candidates-api.d.ts +8 -0
- package/lib/{services/package-manager/batch-import-export-service.d.ts → commands/configuration-management/batch-import-export.service.d.ts} +8 -3
- package/lib/commands/{config.command.d.ts → configuration-management/config-command.service.d.ts} +8 -2
- package/lib/{services/package-manager/diff-service.d.ts → commands/configuration-management/diff.service.d.ts} +4 -3
- package/lib/{interfaces/package-export-transport.d.ts → commands/configuration-management/interfaces/package-export.interfaces.d.ts} +2 -2
- package/lib/{api/variable-assignment-apis.d.ts → commands/configuration-management/interfaces/variable-assignment-apis.constants.d.ts} +3 -1
- package/lib/commands/configuration-management/module.d.ts +15 -0
- package/lib/{services/studio → commands/configuration-management}/studio.service.d.ts +12 -5
- package/lib/commands/configuration-management/variable-command.service.d.ts +6 -0
- package/lib/{services/package-manager/variable-service.d.ts → commands/configuration-management/variable.service.d.ts} +8 -8
- package/lib/commands/cpm4/ctp-command.service.d.ts +7 -0
- package/lib/{content/manager → commands/cpm4}/ctp.analysis.manager.d.ts +2 -0
- package/lib/{content/manager → commands/cpm4}/ctp.datamodel.manager.d.ts +2 -1
- package/lib/{content/factory/ctp-manager.factory.d.ts → commands/cpm4/ctp.manager-factory.d.ts} +4 -1
- package/lib/{content/manager → commands/cpm4}/ctp.manager.d.ts +4 -2
- package/lib/commands/cpm4/module.d.ts +10 -0
- package/lib/commands/data-pipeline/connection/connection-command.service.d.ts +8 -0
- package/lib/commands/data-pipeline/connection/connection.commands.d.ts +11 -0
- package/lib/{services → commands/data-pipeline}/connection/connection.service.d.ts +4 -3
- package/lib/{api → commands/data-pipeline/data-pool}/data-pool-api.d.ts +5 -5
- package/lib/commands/data-pipeline/data-pool/data-pool-command.service.d.ts +14 -0
- package/lib/commands/data-pipeline/data-pool/data-pool-manager.factory.d.ts +9 -0
- package/lib/{services → commands/data-pipeline}/data-pool/data-pool-service.d.ts +4 -3
- package/lib/commands/data-pipeline/data-pool/data-pool.commands.d.ts +15 -0
- package/lib/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.d.ts +4 -2
- package/lib/commands/data-pipeline/module.d.ts +9 -0
- package/lib/commands/profile/module.d.ts +12 -0
- package/lib/commands/{profile.command.d.ts → profile/profile-command.service.d.ts} +1 -1
- package/lib/{api → commands/studio/api}/asset-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/compute-pool-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/node-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/package-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/package-dependencies-api.d.ts +4 -4
- package/lib/commands/studio/api/space-api.d.ts +9 -0
- package/lib/commands/studio/api/studio-variables-api.d.ts +8 -0
- package/lib/commands/studio/command-service/asset-command.service.d.ts +11 -0
- package/lib/commands/{package.command.d.ts → studio/command-service/package-command.service.d.ts} +8 -5
- package/lib/commands/studio/command-service/space-command.service.d.ts +6 -0
- package/lib/commands/studio/command-service/widget.command.d.ts +7 -0
- package/lib/{interfaces/batch-export-node-transport.d.ts → commands/studio/interfaces/batch-export-node.interfaces.d.ts} +1 -9
- package/lib/{content/factory/asset-manager.factory.d.ts → commands/studio/manager/asset.manager-factory.d.ts} +4 -1
- package/lib/{content → commands/studio}/manager/asset.manager.d.ts +4 -2
- package/lib/{content/factory/package-manager.factory.d.ts → commands/studio/manager/package.manager-factory.d.ts} +4 -1
- package/lib/{content → commands/studio}/manager/package.manager.d.ts +4 -2
- package/lib/commands/studio/manager/space.manager-factory.d.ts +8 -0
- package/lib/{content → commands/studio}/manager/space.manager.d.ts +4 -2
- package/lib/{content/factory/widget-manager.factory.d.ts → commands/studio/manager/widget.manager-factory.d.ts} +10 -7
- package/lib/{content → commands/studio}/manager/widget.manager.d.ts +4 -2
- package/lib/commands/studio/module.d.ts +21 -0
- package/lib/{services/package-manager → commands/studio/service}/asset-service.d.ts +4 -3
- package/lib/{services/package-manager/datamodel-service.d.ts → commands/studio/service/data-model.service.d.ts} +5 -5
- package/lib/{services/package-manager/package-service.d.ts → commands/studio/service/package.service.d.ts} +13 -6
- package/lib/commands/studio/service/space.service.d.ts +11 -0
- package/lib/commands/studio/service/studio-variable.service.d.ts +9 -0
- package/lib/core/command/cli-context.d.ts +17 -0
- package/lib/core/command/module-handler.d.ts +57 -0
- package/lib/core/http/base-api.d.ts +32 -0
- package/lib/{services/http-client-service.v2.d.ts → core/http/http-client.d.ts} +8 -3
- package/lib/{content/manager → core/http/http-shared}/base.manager.d.ts +4 -6
- package/lib/core/http/http-shared/base.manager.helper.d.ts +4 -0
- package/lib/{services → core/profile}/profile.service.d.ts +2 -1
- package/lib/{validators → core/profile}/profile.validator.d.ts +1 -1
- package/lib/{services → core/utils}/file-service.d.ts +0 -2
- package/lib/core/utils/question.service.d.ts +10 -0
- package/package.json +3 -3
- package/api/batch-import-export-api.js +0 -51
- package/api/variables-api.js +0 -56
- package/commands/config.command.js +0 -57
- package/commands/profile.command.js +0 -88
- package/commands/widget.command.js +0 -36
- package/content-cli-analyze.js +0 -56
- package/content-cli-config.js +0 -117
- package/content-cli-export.js +0 -90
- package/content-cli-get.js +0 -52
- package/content-cli-import.js +0 -93
- package/content-cli-list.js +0 -129
- package/content-cli-profile.js +0 -64
- package/content-cli-pull.js +0 -104
- package/content-cli-push.js +0 -196
- package/content-cli-set.js +0 -55
- package/content-cli-update.js +0 -44
- package/interfaces/variable-assignment-api.interface.js +0 -12
- package/lib/api/space-api.d.ts +0 -9
- package/lib/api/variables-api.d.ts +0 -14
- package/lib/commands/analysis-bookmarks.command.d.ts +0 -6
- package/lib/commands/asset.command.d.ts +0 -8
- package/lib/commands/connection.command.d.ts +0 -5
- package/lib/commands/ctp.command.d.ts +0 -6
- package/lib/commands/data-pool.command.d.ts +0 -11
- package/lib/commands/space.command.d.ts +0 -5
- package/lib/commands/variable.command.d.ts +0 -3
- package/lib/commands/widget.command.d.ts +0 -5
- package/lib/content/factory/analysis-bookmarks-manager.factory.d.ts +0 -5
- package/lib/content/factory/data-pool-manager.factory.d.ts +0 -6
- package/lib/content/factory/skill-manager.factory.d.ts +0 -5
- package/lib/content/factory/space-manager.factory.d.ts +0 -5
- package/lib/content-cli-analyze.d.ts +0 -1
- package/lib/content-cli-config.d.ts +0 -8
- package/lib/content-cli-export.d.ts +0 -6
- package/lib/content-cli-get.d.ts +0 -1
- package/lib/content-cli-import.d.ts +0 -6
- package/lib/content-cli-list.d.ts +0 -9
- package/lib/content-cli-profile.d.ts +0 -1
- package/lib/content-cli-pull.d.ts +0 -1
- package/lib/content-cli-push.d.ts +0 -1
- package/lib/content-cli-set.d.ts +0 -1
- package/lib/content-cli-update.d.ts +0 -1
- package/lib/interfaces/variable-assignment-api.interface.d.ts +0 -3
- package/lib/services/command.service.d.ts +0 -6
- package/lib/services/content.service.d.ts +0 -11
- package/lib/services/context.service.d.ts +0 -13
- package/lib/services/http-client.service.d.ts +0 -15
- package/lib/services/package-manager/space-service.d.ts +0 -11
- package/lib/services/question.service.d.ts +0 -4
- package/lib/util/context-initializer.d.ts +0 -3
- package/lib/util/program.d.ts +0 -2
- package/services/command.service.js +0 -24
- package/services/content.service.js +0 -130
- package/services/http-client.service.js +0 -157
- package/util/context-initializer.js +0 -39
- package/util/logger.js +0 -49
- package/util/program.js +0 -16
- /package/{interfaces/batch-export-import-constants.js → commands/configuration-management/interfaces/batch-export-import.constants.js} +0 -0
- /package/{interfaces/diff-package.transport.js → commands/configuration-management/interfaces/diff-package.interfaces.js} +0 -0
- /package/{interfaces/batch-export-node-transport.js → commands/configuration-management/interfaces/package-export.interfaces.js} +0 -0
- /package/{api/variable-assignment-apis.js → commands/configuration-management/interfaces/variable-assignment-apis.constants.js} +0 -0
- /package/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.js +0 -0
- /package/{interfaces/manager-config.interface.js → commands/studio/interfaces/batch-export-node.interfaces.js} +0 -0
- /package/{interfaces/manifest-transport.js → commands/studio/interfaces/manifest.interface.js} +0 -0
- /package/{interfaces → commands/studio/interfaces}/package-manager.interfaces.js +0 -0
- /package/{interfaces → commands/studio/interfaces}/save-content-node.interface.js +0 -0
- /package/{interfaces/package-export-transport.js → commands/studio/interfaces/space.interface.js} +0 -0
- /package/{util → commands/studio/utils}/semantic-versioning.js +0 -0
- /package/{util → core/http}/axios-initializer.js +0 -0
- /package/{interfaces/save-space.interface.js → core/http/http-shared/manager-config.interface.js} +0 -0
- /package/{util → core/http}/tracing.js +0 -0
- /package/{interfaces → core/profile}/profile.interface.js +0 -0
- /package/{util → core/utils}/json.js +0 -0
- /package/{util → core/utils}/yaml.js +0 -0
- /package/lib/{interfaces/batch-export-import-constants.d.ts → commands/configuration-management/interfaces/batch-export-import.constants.d.ts} +0 -0
- /package/lib/{interfaces/diff-package.transport.d.ts → commands/configuration-management/interfaces/diff-package.interfaces.d.ts} +0 -0
- /package/lib/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.d.ts +0 -0
- /package/lib/{interfaces/manifest-transport.d.ts → commands/studio/interfaces/manifest.interface.d.ts} +0 -0
- /package/lib/{interfaces → commands/studio/interfaces}/package-manager.interfaces.d.ts +0 -0
- /package/lib/{interfaces → commands/studio/interfaces}/save-content-node.interface.d.ts +0 -0
- /package/lib/{interfaces/save-space.interface.d.ts → commands/studio/interfaces/space.interface.d.ts} +0 -0
- /package/lib/{util → commands/studio/utils}/semantic-versioning.d.ts +0 -0
- /package/lib/{util → core/http}/axios-initializer.d.ts +0 -0
- /package/lib/{interfaces → core/http/http-shared}/manager-config.interface.d.ts +0 -0
- /package/lib/{util → core/http}/tracing.d.ts +0 -0
- /package/lib/{interfaces → core/profile}/profile.interface.d.ts +0 -0
- /package/lib/{util → core/utils}/json.d.ts +0 -0
- /package/lib/{util → core/utils}/logger.d.ts +0 -0
- /package/lib/{util → core/utils}/version.d.ts +0 -0
- /package/lib/{util → core/utils}/yaml.d.ts +0 -0
|
@@ -13,18 +13,20 @@ 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", "
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const logger_1 = require("../util/logger");
|
|
21
|
+
exports.PackageApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
24
23
|
class PackageApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = context.httpClient;
|
|
26
|
+
}
|
|
25
27
|
findAllPackages() {
|
|
26
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
return
|
|
29
|
+
return this.httpClient.get("/package-manager/api/packages").catch(e => {
|
|
28
30
|
throw new logger_1.FatalError(`Problem getting packages: ${e}`);
|
|
29
31
|
});
|
|
30
32
|
});
|
|
@@ -35,8 +37,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
35
37
|
queryParams.set("newKey", rootPackageKey);
|
|
36
38
|
queryParams.set("version", version !== null && version !== void 0 ? version : "");
|
|
37
39
|
queryParams.set("excludeActionFlows", excludeActionFlows ? "true" : "false");
|
|
38
|
-
return yield
|
|
39
|
-
throw new logger_1.FatalError(`
|
|
40
|
+
return yield this.httpClient.downloadFile(`/package-manager/api/packages/${rootPackageKey}/export?${queryParams.toString()}`).catch(e => {
|
|
41
|
+
throw new logger_1.FatalError(`Package ${rootPackageKey}_${version} failed to export.`);
|
|
40
42
|
});
|
|
41
43
|
});
|
|
42
44
|
}
|
|
@@ -46,42 +48,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
48
|
if (type) {
|
|
47
49
|
queryParams.set("type", type);
|
|
48
50
|
}
|
|
49
|
-
return
|
|
51
|
+
return this.httpClient.get(`/package-manager/api/packages/with-variable-assignments?${queryParams.toString()}`).catch(e => {
|
|
50
52
|
throw new logger_1.FatalError(`Problem getting variables of packages: : ${e}`);
|
|
51
53
|
});
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
findLatestVersionById(nodeId) {
|
|
55
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
return
|
|
58
|
+
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/latest-version`).catch(e => {
|
|
57
59
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
58
60
|
});
|
|
59
61
|
});
|
|
60
62
|
}
|
|
61
63
|
findActiveVersionById(nodeId) {
|
|
62
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
return
|
|
65
|
+
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/active`).catch(e => {
|
|
64
66
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
65
67
|
});
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
findActiveVersionByIds(nodeIds) {
|
|
69
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
return
|
|
72
|
+
return this.httpClient.post("/package-manager/api/packages/active/by-ids", nodeIds).catch(e => {
|
|
71
73
|
throw new logger_1.FatalError(`Problem getting latest version of packages: ${e}`);
|
|
72
74
|
});
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
findNextVersion(nodeId) {
|
|
76
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
return
|
|
79
|
+
return this.httpClient.get(`/package-manager/api/packages/${nodeId}/next-version`).catch(e => {
|
|
78
80
|
throw new logger_1.FatalError(`Problem getting latest version of package: ${e}`);
|
|
79
81
|
});
|
|
80
82
|
});
|
|
81
83
|
}
|
|
82
84
|
importPackage(nodeContent, spaceId, overwrite, excludeActionFlows) {
|
|
83
85
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
yield
|
|
86
|
+
yield this.httpClient.postFile("/package-manager/api/packages/import", nodeContent, {
|
|
85
87
|
spaceId: spaceId,
|
|
86
88
|
overwrite: overwrite,
|
|
87
89
|
excludeActionFlows: excludeActionFlows
|
|
@@ -92,19 +94,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
92
94
|
}
|
|
93
95
|
movePackageToSpace(nodeId, spaceId) {
|
|
94
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
yield
|
|
97
|
+
yield this.httpClient.put(`/package-manager/api/packages/${nodeId}/move/${spaceId}`, {}).catch(e => {
|
|
96
98
|
throw new logger_1.FatalError(`Problem moving package: ${e}`);
|
|
97
99
|
});
|
|
98
100
|
});
|
|
99
101
|
}
|
|
100
102
|
publishPackage(activatePackage) {
|
|
101
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
yield
|
|
104
|
+
yield this.httpClient.post(`/package-manager/api/packages/${activatePackage.packageKey}/activate`, activatePackage).catch(e => {
|
|
103
105
|
throw new logger_1.FatalError(`Problem activating package with key ${activatePackage.packageKey}: ${e}`);
|
|
104
106
|
});
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
PackageApi
|
|
109
|
-
exports.packageApi = PackageApi.INSTANCE;
|
|
110
|
+
exports.PackageApi = PackageApi;
|
|
110
111
|
});
|
|
@@ -13,18 +13,20 @@ 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", "
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const logger_1 = require("../util/logger");
|
|
21
|
+
exports.PackageDependenciesApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
24
23
|
class PackageDependenciesApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = context.httpClient;
|
|
26
|
+
}
|
|
25
27
|
findDependenciesOfPackage(nodeId, draftId) {
|
|
26
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
return
|
|
29
|
+
return this.httpClient.get(`/package-manager/api/package-dependencies/${nodeId}/by-root-draft-id/${draftId}`)
|
|
28
30
|
.catch(e => {
|
|
29
31
|
throw new logger_1.FatalError(`Problem getting dependencies of package: ${e}`);
|
|
30
32
|
});
|
|
@@ -32,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
34
|
}
|
|
33
35
|
findPackageDependenciesByIds(nodeDraftIdMap) {
|
|
34
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return yield
|
|
37
|
+
return yield this.httpClient.post("/package-manager/api/package-dependencies/by-ids", Object.fromEntries(nodeDraftIdMap))
|
|
36
38
|
.catch(e => {
|
|
37
39
|
throw new logger_1.FatalError(`Problem getting dependencies of package: ${e}`);
|
|
38
40
|
});
|
|
@@ -40,26 +42,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
40
42
|
}
|
|
41
43
|
updatePackageDependency(nodeId, packageDependency) {
|
|
42
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
yield
|
|
45
|
+
yield this.httpClient.put(`/package-manager/api/package-dependencies/${nodeId}/dependency/by-key/${packageDependency.key}`, packageDependency).catch(e => {
|
|
44
46
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
45
47
|
});
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
createDependencies(packageId, packageDependency) {
|
|
49
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
yield
|
|
52
|
+
yield this.httpClient.post(`/package-manager/api/package-dependencies/${packageId}`, packageDependency).catch(e => {
|
|
51
53
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
52
54
|
});
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
deleteDependency(packageId, packageDependencyKey) {
|
|
56
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
yield
|
|
59
|
+
yield this.httpClient.delete(`/package-manager/api/package-dependencies/${packageId}/dependency/by-key/${packageDependencyKey}`).catch(e => {
|
|
58
60
|
throw new logger_1.FatalError(`Problem updating package dependency: ${e}`);
|
|
59
61
|
});
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
PackageDependenciesApi
|
|
64
|
-
exports.packageDependenciesApi = PackageDependenciesApi.INSTANCE;
|
|
65
|
+
exports.PackageDependenciesApi = PackageDependenciesApi;
|
|
65
66
|
});
|
|
@@ -13,37 +13,38 @@ 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", "
|
|
16
|
+
define(["require", "exports", "../../../core/utils/logger"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const logger_1 = require("../util/logger");
|
|
21
|
+
exports.SpaceApi = void 0;
|
|
22
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
24
23
|
class SpaceApi {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.httpClient = context.httpClient;
|
|
26
|
+
}
|
|
25
27
|
findOne(spaceId) {
|
|
26
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
return
|
|
29
|
+
return this.httpClient.get(`/package-manager/api/spaces/${spaceId}`).catch(e => {
|
|
28
30
|
throw new logger_1.FatalError(`Problem getting space: ${spaceId} ${e}`);
|
|
29
31
|
});
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
34
|
findAllSpaces() {
|
|
33
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
return
|
|
36
|
+
return this.httpClient.get("/package-manager/api/spaces").catch(e => {
|
|
35
37
|
throw new logger_1.FatalError(`Problem getting spaces: ${e}`);
|
|
36
38
|
});
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
41
|
createSpace(space) {
|
|
40
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
return
|
|
43
|
+
return this.httpClient.post("/package-manager/api/spaces", space).catch(e => {
|
|
42
44
|
throw new logger_1.FatalError(`Problem space creation: ${e}`);
|
|
43
45
|
});
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
SpaceApi
|
|
48
|
-
exports.spaceApi = SpaceApi.INSTANCE;
|
|
49
|
+
exports.SpaceApi = SpaceApi;
|
|
49
50
|
});
|
|
@@ -13,29 +13,34 @@ 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", "
|
|
16
|
+
define(["require", "exports", "url", "../../../core/utils/logger"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
class
|
|
25
|
-
constructor() {
|
|
26
|
-
this.
|
|
27
|
-
this.analysisBookmarksManagerFactory = new analysis_bookmarks_manager_factory_1.AnalysisBookmarksManagerFactory();
|
|
21
|
+
exports.StudioVariablesApi = void 0;
|
|
22
|
+
const url_1 = require("url");
|
|
23
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
24
|
+
class StudioVariablesApi {
|
|
25
|
+
constructor(context) {
|
|
26
|
+
this.httpClient = context.httpClient;
|
|
28
27
|
}
|
|
29
|
-
|
|
28
|
+
assignVariableValues(packageKey, variablesAssignments) {
|
|
30
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
|
|
30
|
+
return this.httpClient.post(`/package-manager/api/nodes/by-package-key/${packageKey}/variables/values`, variablesAssignments).catch(e => {
|
|
31
|
+
throw new logger_1.FatalError(`Problem updating variables of package ${packageKey}: ${e}`);
|
|
32
|
+
});
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
getRuntimeVariableValues(packageKey, appMode) {
|
|
35
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
|
|
37
|
+
const queryParams = new url_1.URLSearchParams();
|
|
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 => {
|
|
40
|
+
throw new logger_1.FatalError(`Problem getting runtime variables of package ${packageKey}: ${e}`);
|
|
41
|
+
});
|
|
37
42
|
});
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
|
-
exports.
|
|
45
|
+
exports.StudioVariablesApi = StudioVariablesApi;
|
|
41
46
|
});
|
|
@@ -13,45 +13,47 @@ 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", "../
|
|
16
|
+
define(["require", "exports", "../manager/asset.manager-factory", "../service/asset-service", "../../../core/http/http-shared/base.manager.helper"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
class
|
|
26
|
-
constructor() {
|
|
27
|
-
this.
|
|
28
|
-
this.assetManagerFactory = new asset_manager_factory_1.AssetManagerFactory();
|
|
21
|
+
exports.AssetCommandService = void 0;
|
|
22
|
+
const asset_manager_factory_1 = require("../manager/asset.manager-factory");
|
|
23
|
+
const asset_service_1 = require("../service/asset-service");
|
|
24
|
+
const base_manager_helper_1 = require("../../../core/http/http-shared/base.manager.helper");
|
|
25
|
+
class AssetCommandService {
|
|
26
|
+
constructor(context) {
|
|
27
|
+
this.baseManagerHelper = new base_manager_helper_1.BaseManagerHelper();
|
|
28
|
+
this.assetManagerFactory = new asset_manager_factory_1.AssetManagerFactory(context);
|
|
29
|
+
this.assetService = new asset_service_1.AssetService(context);
|
|
29
30
|
}
|
|
30
|
-
pullAsset(
|
|
31
|
+
pullAsset(key) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
yield this.
|
|
33
|
+
yield this.assetManagerFactory.createManager(key).pull();
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
pushAsset(
|
|
36
|
+
pushAsset(fileName, packageKey) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
yield this.
|
|
38
|
+
yield this.assetManagerFactory.createManager(null, fileName, packageKey).push();
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
pushAssets(
|
|
41
|
+
pushAssets(packageKey) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
|
|
43
|
+
const assetManagers = this.assetManagerFactory.createManagers(packageKey);
|
|
44
|
+
yield this.baseManagerHelper.batchPush(assetManagers);
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
|
-
listAssets(
|
|
47
|
+
listAssets(jsonResponse, assetType) {
|
|
46
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
49
|
if (jsonResponse) {
|
|
48
|
-
yield
|
|
50
|
+
yield this.assetService.findAndExportAllAssets(assetType);
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
|
-
yield
|
|
53
|
+
yield this.assetService.listAssets(assetType);
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
|
-
exports.
|
|
58
|
+
exports.AssetCommandService = AssetCommandService;
|
|
57
59
|
});
|
|
@@ -13,55 +13,57 @@ 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", "../
|
|
16
|
+
define(["require", "exports", "../manager/package.manager-factory", "../service/package.service", "../../../core/http/http-shared/base.manager.helper"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
class
|
|
26
|
-
constructor() {
|
|
27
|
-
this.
|
|
28
|
-
this.packageManagerFactory = new package_manager_factory_1.PackageManagerFactory();
|
|
21
|
+
exports.PackageCommandService = void 0;
|
|
22
|
+
const package_manager_factory_1 = require("../manager/package.manager-factory");
|
|
23
|
+
const package_service_1 = require("../service/package.service");
|
|
24
|
+
const base_manager_helper_1 = require("../../../core/http/http-shared/base.manager.helper");
|
|
25
|
+
class PackageCommandService {
|
|
26
|
+
constructor(context) {
|
|
27
|
+
this.baseManagerHelper = new base_manager_helper_1.BaseManagerHelper();
|
|
28
|
+
this.packageManagerFactory = new package_manager_factory_1.PackageManagerFactory(context);
|
|
29
|
+
this.packageService = new package_service_1.PackageService(context);
|
|
29
30
|
}
|
|
30
|
-
pullPackage(
|
|
31
|
+
pullPackage(key, store, newKey, draft) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
yield this.
|
|
33
|
+
yield this.packageManagerFactory.createPullManager(key, store, newKey, draft).pullFile();
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
pushPackage(
|
|
36
|
+
pushPackage(spaceKey, fileName, newKey, overwrite) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
yield this.
|
|
38
|
+
yield this.packageManagerFactory.createPushManager(spaceKey, fileName, newKey, overwrite).push();
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
pushPackages(
|
|
41
|
+
pushPackages(spaceKey) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
|
|
43
|
+
const packageManagers = this.packageManagerFactory.createPushManagers(spaceKey);
|
|
44
|
+
yield this.baseManagerHelper.batchPush(packageManagers);
|
|
43
45
|
});
|
|
44
46
|
}
|
|
45
47
|
listPackages(jsonResponse, includeDependencies, packageKeys) {
|
|
46
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
49
|
if (jsonResponse) {
|
|
48
|
-
yield
|
|
50
|
+
yield this.packageService.findAndExportListOfAllPackages(includeDependencies, packageKeys !== null && packageKeys !== void 0 ? packageKeys : []);
|
|
49
51
|
}
|
|
50
52
|
else {
|
|
51
|
-
yield
|
|
53
|
+
yield this.packageService.listPackages();
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
57
|
batchExportPackages(packageKeys, includeDependencies, excludeActionFlows) {
|
|
56
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
yield
|
|
59
|
+
yield this.packageService.batchExportPackages(packageKeys, includeDependencies, excludeActionFlows);
|
|
58
60
|
});
|
|
59
61
|
}
|
|
60
62
|
batchImportPackages(spaceMappings, dataModelMappingsFilePath, exportedPackagesFile, overwrite, excludeActionFlows) {
|
|
61
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
yield
|
|
64
|
+
yield this.packageService.batchImportPackages(spaceMappings !== null && spaceMappings !== void 0 ? spaceMappings : [], dataModelMappingsFilePath, exportedPackagesFile, overwrite, excludeActionFlows);
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
exports.
|
|
68
|
+
exports.PackageCommandService = PackageCommandService;
|
|
67
69
|
});
|
|
@@ -13,24 +13,22 @@ 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", "../
|
|
16
|
+
define(["require", "exports", "../manager/space.manager-factory"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.contentService = new content_service_1.ContentService();
|
|
27
|
-
this.spaceManagerFactory = new space_manager_factory_1.SpaceManagerFactory();
|
|
21
|
+
exports.SpaceCommandService = void 0;
|
|
22
|
+
const space_manager_factory_1 = require("../manager/space.manager-factory");
|
|
23
|
+
class SpaceCommandService {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.spaceManagerFactory = new space_manager_factory_1.SpaceManagerFactory(context);
|
|
28
26
|
}
|
|
29
|
-
listSpaces(
|
|
27
|
+
listSpaces(jsonResponse) {
|
|
30
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
yield this.
|
|
29
|
+
yield this.spaceManagerFactory.createListManager(jsonResponse).findAll();
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
32
|
}
|
|
35
|
-
exports.
|
|
33
|
+
exports.SpaceCommandService = SpaceCommandService;
|
|
36
34
|
});
|
|
@@ -0,0 +1,56 @@
|
|
|
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", "child_process", "../../../core/utils/logger", "fs", "path", "../manager/widget.manager-factory"], factory);
|
|
17
|
+
}
|
|
18
|
+
})(function (require, exports) {
|
|
19
|
+
"use strict";
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.WidgetCommand = void 0;
|
|
22
|
+
const child_process_1 = require("child_process");
|
|
23
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
24
|
+
const fs = require("fs");
|
|
25
|
+
const path = require("path");
|
|
26
|
+
const widget_manager_factory_1 = require("../manager/widget.manager-factory");
|
|
27
|
+
class WidgetCommand {
|
|
28
|
+
constructor(context) {
|
|
29
|
+
this.widgetManagerFactory = new widget_manager_factory_1.WidgetManagerFactory(context);
|
|
30
|
+
}
|
|
31
|
+
pushWidget(tenantIndependent, userSpecific) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
yield this.widgetManagerFactory.createManager(tenantIndependent, userSpecific).push();
|
|
34
|
+
yield this.pushToAwsIfAuthorized();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
pushToAwsIfAuthorized() {
|
|
38
|
+
var _a;
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (process.env.AWS_ACCESS_KEY_ID_CDN && process.env.AWS_SECRET_ACCESS_KEY_CDN) {
|
|
41
|
+
try {
|
|
42
|
+
const dir = path.resolve(process.cwd());
|
|
43
|
+
const pushToS3stdout = (0, child_process_1.execSync)(`aws s3 cp ${dir} s3://celonis-static-origin/static/package-manager/ --recursive --exclude="*.map" --exclude="*.yaml" --profile default`).toString("utf-8");
|
|
44
|
+
logger_1.logger.info(pushToS3stdout);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
logger_1.logger.error(new logger_1.GracefulError(((_a = error.stderr) === null || _a === void 0 ? void 0 : _a.toString()) || error.message));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const zipFileName = path.resolve(process.cwd(), "output.zip");
|
|
51
|
+
fs.unlinkSync(zipFileName);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.WidgetCommand = WidgetCommand;
|
|
56
|
+
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "fs", "path", "
|
|
7
|
+
define(["require", "exports", "fs", "path", "./asset.manager", "../../../core/utils/logger"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -12,11 +12,14 @@
|
|
|
12
12
|
exports.AssetManagerFactory = void 0;
|
|
13
13
|
const fs = require("fs");
|
|
14
14
|
const path = require("path");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const asset_manager_1 = require("./asset.manager");
|
|
16
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
17
17
|
class AssetManagerFactory {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
this.context = context;
|
|
20
|
+
}
|
|
18
21
|
createManager(key, fileName, packageKey) {
|
|
19
|
-
const assetManager = new asset_manager_1.AssetManager();
|
|
22
|
+
const assetManager = new asset_manager_1.AssetManager(this.context);
|
|
20
23
|
assetManager.key = key;
|
|
21
24
|
if (fileName) {
|
|
22
25
|
assetManager.content = this.readFile(fileName);
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "
|
|
7
|
+
define(["require", "exports", "../../../core/http/http-shared/base.manager", "../../../core/utils/yaml"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AssetManager = void 0;
|
|
13
|
-
const base_manager_1 = require("
|
|
14
|
-
const yaml_1 = require("
|
|
13
|
+
const base_manager_1 = require("../../../core/http/http-shared/base.manager");
|
|
14
|
+
const yaml_1 = require("../../../core/utils/yaml");
|
|
15
15
|
class AssetManager extends base_manager_1.BaseManager {
|
|
16
|
+
constructor(context) {
|
|
17
|
+
super(context);
|
|
18
|
+
}
|
|
16
19
|
get key() {
|
|
17
20
|
return this._key;
|
|
18
21
|
}
|
|
@@ -38,8 +41,8 @@
|
|
|
38
41
|
}
|
|
39
42
|
getConfig() {
|
|
40
43
|
return {
|
|
41
|
-
pushUrl:
|
|
42
|
-
pullUrl:
|
|
44
|
+
pushUrl: AssetManager.PUSH_URL,
|
|
45
|
+
pullUrl: `${AssetManager.PULL_URL}/${this.key}`,
|
|
43
46
|
exportFileName: `${AssetManager.ASSET_FILE_PREFIX}${this.onlyKey}.yml`,
|
|
44
47
|
onPushSuccessMessage: (data) => {
|
|
45
48
|
return "Asset was pushed successfully. New key: " + data.rootWithKey;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if (v !== undefined) module.exports = v;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports", "fs", "path", "
|
|
7
|
+
define(["require", "exports", "fs", "path", "./package.manager", "../../../core/utils/logger"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -12,9 +12,12 @@
|
|
|
12
12
|
exports.PackageManagerFactory = void 0;
|
|
13
13
|
const fs = require("fs");
|
|
14
14
|
const path = require("path");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const package_manager_1 = require("./package.manager");
|
|
16
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
17
17
|
class PackageManagerFactory {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
this.context = context;
|
|
20
|
+
}
|
|
18
21
|
createPullManager(key, store, newKey, draft) {
|
|
19
22
|
return this.createManager(key, null, null, store, newKey, false, draft);
|
|
20
23
|
}
|
|
@@ -36,7 +39,7 @@
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
createManager(key, spaceKey, fileName, store, newKey, overwrite, draft) {
|
|
39
|
-
const packageManager = new package_manager_1.PackageManager();
|
|
42
|
+
const packageManager = new package_manager_1.PackageManager(this.context);
|
|
40
43
|
if (fileName) {
|
|
41
44
|
packageManager.fileName = this.resolvePackageFilePath(fileName);
|
|
42
45
|
}
|