@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
|
@@ -4,17 +4,20 @@
|
|
|
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", "fs", "form-data", "../../../core/http/http-shared/base.manager", "../../../core/utils/logger"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PackageManager = void 0;
|
|
13
|
-
const base_manager_1 = require("./base.manager");
|
|
14
13
|
const fs = require("fs");
|
|
15
|
-
const logger_1 = require("../../util/logger");
|
|
16
14
|
const FormData = require("form-data");
|
|
15
|
+
const base_manager_1 = require("../../../core/http/http-shared/base.manager");
|
|
16
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
17
17
|
class PackageManager extends base_manager_1.BaseManager {
|
|
18
|
+
constructor(context) {
|
|
19
|
+
super(context);
|
|
20
|
+
}
|
|
18
21
|
get key() {
|
|
19
22
|
return this._key;
|
|
20
23
|
}
|
|
@@ -59,9 +62,9 @@
|
|
|
59
62
|
}
|
|
60
63
|
getConfig() {
|
|
61
64
|
return {
|
|
62
|
-
pushUrl: this.
|
|
63
|
-
pullUrl:
|
|
64
|
-
findAllUrl:
|
|
65
|
+
pushUrl: this.buildPushUrl(),
|
|
66
|
+
pullUrl: `${PackageManager.BASE_URL}/${this.key}/${PackageManager.EXPORT_ENDPOINT_PATH}?store=${this.store}&draft=${this.draft}${this.newKey ? `&newKey=${this.newKey}` : ""}`,
|
|
67
|
+
findAllUrl: PackageManager.BASE_URL,
|
|
65
68
|
exportFileName: PackageManager.PACKAGE_FILE_PREFIX +
|
|
66
69
|
(this.newKey ? this.newKey : this.key) +
|
|
67
70
|
PackageManager.PACKAGE_FILE_EXTENSION,
|
|
@@ -4,19 +4,22 @@
|
|
|
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", "./space.manager"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SpaceManagerFactory = void 0;
|
|
13
|
-
const space_manager_1 = require("
|
|
13
|
+
const space_manager_1 = require("./space.manager");
|
|
14
14
|
class SpaceManagerFactory {
|
|
15
|
+
constructor(context) {
|
|
16
|
+
this.context = context;
|
|
17
|
+
}
|
|
15
18
|
createListManager(jsonResponse) {
|
|
16
19
|
return this.createManager(jsonResponse);
|
|
17
20
|
}
|
|
18
21
|
createManager(jsonResponse) {
|
|
19
|
-
const spaceManager = new space_manager_1.SpaceManager();
|
|
22
|
+
const spaceManager = new space_manager_1.SpaceManager(this.context);
|
|
20
23
|
spaceManager.jsonResponse = jsonResponse;
|
|
21
24
|
return spaceManager;
|
|
22
25
|
}
|
|
@@ -4,16 +4,19 @@
|
|
|
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", "uuid", "../../../core/http/http-shared/base.manager", "../../../core/utils/logger"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SpaceManager = void 0;
|
|
13
|
-
const base_manager_1 = require("./base.manager");
|
|
14
|
-
const logger_1 = require("../../util/logger");
|
|
15
13
|
const uuid_1 = require("uuid");
|
|
14
|
+
const base_manager_1 = require("../../../core/http/http-shared/base.manager");
|
|
15
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
16
16
|
class SpaceManager extends base_manager_1.BaseManager {
|
|
17
|
+
constructor(context) {
|
|
18
|
+
super(context);
|
|
19
|
+
}
|
|
17
20
|
get jsonResponse() {
|
|
18
21
|
return this._jsonResponse;
|
|
19
22
|
}
|
|
@@ -22,7 +25,7 @@
|
|
|
22
25
|
}
|
|
23
26
|
getConfig() {
|
|
24
27
|
return {
|
|
25
|
-
findAllUrl:
|
|
28
|
+
findAllUrl: SpaceManager.BASE_URL,
|
|
26
29
|
onFindAll: (data) => this.listSpaces(data),
|
|
27
30
|
};
|
|
28
31
|
}
|
|
@@ -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", "./widget.manager", "../../../core/utils/logger", "adm-zip", "../../../core/utils/yaml"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
@@ -12,13 +12,16 @@
|
|
|
12
12
|
exports.WidgetManagerFactory = void 0;
|
|
13
13
|
const fs = require("fs");
|
|
14
14
|
const path = require("path");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const widget_manager_1 = require("./widget.manager");
|
|
16
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
17
17
|
const AdmZip = require("adm-zip");
|
|
18
|
-
const yaml_1 = require("
|
|
18
|
+
const yaml_1 = require("../../../core/utils/yaml");
|
|
19
19
|
class WidgetManagerFactory {
|
|
20
|
+
constructor(context) {
|
|
21
|
+
this.context = context;
|
|
22
|
+
}
|
|
20
23
|
createManager(tenantIndependent = false, userSpecific = false) {
|
|
21
|
-
const widgetManager = new widget_manager_1.WidgetManager();
|
|
24
|
+
const widgetManager = new widget_manager_1.WidgetManager(this.context);
|
|
22
25
|
widgetManager.content = this.readContent();
|
|
23
26
|
widgetManager.tenantIndependent = tenantIndependent;
|
|
24
27
|
widgetManager.userSpecific = userSpecific;
|
|
@@ -4,17 +4,17 @@
|
|
|
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", "form-data", "../../../core/http/http-shared/base.manager"], factory);
|
|
8
8
|
}
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.WidgetManager = void 0;
|
|
13
|
-
const base_manager_1 = require("./base.manager");
|
|
14
13
|
const FormData = require("form-data");
|
|
14
|
+
const base_manager_1 = require("../../../core/http/http-shared/base.manager");
|
|
15
15
|
class WidgetManager extends base_manager_1.BaseManager {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(
|
|
16
|
+
constructor(context) {
|
|
17
|
+
super(context);
|
|
18
18
|
this._tenantIndependent = false;
|
|
19
19
|
this._userSpecific = false;
|
|
20
20
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
? WidgetManager.WIDGET_TENANT_INDEPENDENT_API
|
|
45
45
|
: WidgetManager.WIDGET_API;
|
|
46
46
|
return {
|
|
47
|
-
pushUrl:
|
|
47
|
+
pushUrl: `${baseUrl}${widgetUrl}`,
|
|
48
48
|
onPushSuccessMessage: () => {
|
|
49
49
|
return "Widget was pushed successfully";
|
|
50
50
|
},
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands related to the Studio area.
|
|
3
|
+
*/
|
|
4
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
(function (factory) {
|
|
14
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
15
|
+
var v = factory(require, exports);
|
|
16
|
+
if (v !== undefined) module.exports = v;
|
|
17
|
+
}
|
|
18
|
+
else if (typeof define === "function" && define.amd) {
|
|
19
|
+
define(["require", "exports", "../../core/command/module-handler", "./command-service/package-command.service", "./command-service/asset-command.service", "./command-service/widget.command", "./command-service/space-command.service"], factory);
|
|
20
|
+
}
|
|
21
|
+
})(function (require, exports) {
|
|
22
|
+
"use strict";
|
|
23
|
+
const module_handler_1 = require("../../core/command/module-handler");
|
|
24
|
+
const package_command_service_1 = require("./command-service/package-command.service");
|
|
25
|
+
const asset_command_service_1 = require("./command-service/asset-command.service");
|
|
26
|
+
const widget_command_1 = require("./command-service/widget.command");
|
|
27
|
+
const space_command_service_1 = require("./command-service/space-command.service");
|
|
28
|
+
class Module extends module_handler_1.IModule {
|
|
29
|
+
register(context, configurator) {
|
|
30
|
+
const exportCommand = configurator.command("export");
|
|
31
|
+
exportCommand.command("packages")
|
|
32
|
+
.description("Command to export all given packages")
|
|
33
|
+
.requiredOption("--packageKeys <packageKeys...>", "Exports only given package keys")
|
|
34
|
+
.option("--includeDependencies", "Include variables and dependencies", "")
|
|
35
|
+
.option("--excludeActionFlows", "Don't export action flows")
|
|
36
|
+
.deprecationNotice("`content-cli export packages` is deprecated and is expected to be removed in subsequent updates around: 01-09-2025.\n" +
|
|
37
|
+
"Please use `content-cli config export` instead.\n")
|
|
38
|
+
.action(this.batchExportPackages);
|
|
39
|
+
const importCommand = configurator.command("import");
|
|
40
|
+
importCommand.command("packages")
|
|
41
|
+
.description("Command to import all given packages")
|
|
42
|
+
.option("--spaceMappings <spaceMappings...>", "List of mappings for importing packages to different target spaces. Mappings should follow format 'packageKey:targetSpaceKey'")
|
|
43
|
+
.option("--overwrite", "Flag to allow overwriting of packages")
|
|
44
|
+
.option("--excludeActionFlows", "Skip overwrite of action flows of package")
|
|
45
|
+
.option("--dataModelMappingsFile <dataModelMappingsFile>", "DataModel variable mappings file path. If missing, variables will be mapped from manifest file.")
|
|
46
|
+
.requiredOption("-f, --file <file>", "Exported packages file (relative path)")
|
|
47
|
+
.deprecationNotice("`content-cli import packages` is deprecated and is expected to be removed in subsequent updates around: 01-09-2025.\n" +
|
|
48
|
+
"Please use `content-cli config import` instead.\n")
|
|
49
|
+
.action(this.batchImportPackages);
|
|
50
|
+
const listCommand = configurator.command("list");
|
|
51
|
+
listCommand.command("packages")
|
|
52
|
+
.description("Command to list all packages")
|
|
53
|
+
.option("--json", "Return response as json type", "")
|
|
54
|
+
.option("--includeDependencies", "Include variables and dependencies", "")
|
|
55
|
+
.option("--packageKeys <packageKeys...>", "Lists only given package keys")
|
|
56
|
+
.action(this.listPackages);
|
|
57
|
+
listCommand.command("spaces")
|
|
58
|
+
.description("Command to list all spaces")
|
|
59
|
+
.option("--json", "Return response as json type", "")
|
|
60
|
+
.action(this.listSpaces);
|
|
61
|
+
listCommand.command("assets")
|
|
62
|
+
.description("Command to list all assets")
|
|
63
|
+
.option("--json", "Return response as json type", "")
|
|
64
|
+
.option("--assetType <assetType>", "type of assets")
|
|
65
|
+
.action(this.listAssets);
|
|
66
|
+
const pullCommand = configurator.command("pull");
|
|
67
|
+
pullCommand.command("asset")
|
|
68
|
+
.description("Command to pull an asset from Studio")
|
|
69
|
+
.requiredOption("--key <key>", "Key of asset you want to pull")
|
|
70
|
+
.action(this.pullAsset);
|
|
71
|
+
pullCommand.command("package")
|
|
72
|
+
.description("Command to pull a package")
|
|
73
|
+
.requiredOption("--key <key>", "Key of the package you want to pull")
|
|
74
|
+
.option("--store", "Pull package with store deployment metadata")
|
|
75
|
+
.option("--newKey <newKey>", "Define a new key for your package")
|
|
76
|
+
.option("--draft", "Pull draft version of package")
|
|
77
|
+
.action(this.pullPackage);
|
|
78
|
+
const pushCommand = configurator.command("push");
|
|
79
|
+
pushCommand.command("asset")
|
|
80
|
+
.description("Command to push an asset to Studio")
|
|
81
|
+
.requiredOption("-f, --file <file>", "The file you want to push")
|
|
82
|
+
.requiredOption("--package <packageKey>", "Key of the package you want to push asset to")
|
|
83
|
+
.action(this.pushAsset);
|
|
84
|
+
pushCommand.command("assets")
|
|
85
|
+
.description("Command to push assets to Studio")
|
|
86
|
+
.requiredOption("--package <packageKey>", "Key of the package you want to push assets to")
|
|
87
|
+
.action(this.pushAssets);
|
|
88
|
+
pushCommand.command("package")
|
|
89
|
+
.description("Command to push a package to Studio")
|
|
90
|
+
.option("--newKey <newKey>", "Define a new key for your package")
|
|
91
|
+
.option("--overwrite", "Overwrite package and its assets")
|
|
92
|
+
.requiredOption("-f, --file <file>", "The file you want to push")
|
|
93
|
+
.requiredOption("--spaceKey <spaceKey>", "The key of the destination space")
|
|
94
|
+
.action(this.pushPackage);
|
|
95
|
+
pushCommand.command("packages")
|
|
96
|
+
.description("Command to push packages to Studio")
|
|
97
|
+
.requiredOption("--spaceKey <spaceKey>", "The key of the destination space")
|
|
98
|
+
.action(this.pushPackages);
|
|
99
|
+
pushCommand.command("widget")
|
|
100
|
+
.description("Command to push a widget")
|
|
101
|
+
.option("--tenantIndependent", "Upload widget tenant independently")
|
|
102
|
+
.option("--userSpecific", "Upload widget only for the user in the provided api token")
|
|
103
|
+
.option("--packageManager", "Upload widget to package manager (deprecated)") // Deprecated
|
|
104
|
+
.action(this.pushWidget);
|
|
105
|
+
}
|
|
106
|
+
batchExportPackages(context, command, options) {
|
|
107
|
+
var _a;
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
yield new package_command_service_1.PackageCommandService(context).batchExportPackages(options.packageKeys, options.includeDependencies, (_a = options.excludeActionFlows) !== null && _a !== void 0 ? _a : false);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
batchImportPackages(context, command, options) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
yield new package_command_service_1.PackageCommandService(context).batchImportPackages(options.spaceMappings, options.dataModelMappingsFile, options.file, options.overwrite, options.excludeActionFlows);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
listPackages(context, command, options) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
yield new package_command_service_1.PackageCommandService(context).listPackages(options.json, options.includeDependencies, options.packageKeys);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
listSpaces(context, command, options) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
yield new space_command_service_1.SpaceCommandService(context).listSpaces(options.json);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
listAssets(context, command, options) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
yield new asset_command_service_1.AssetCommandService(context).listAssets(options.json, options.assetType);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
pullAsset(context, command, options) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
yield new asset_command_service_1.AssetCommandService(context).pullAsset(options.key);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
pullPackage(context, command, options) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
yield new package_command_service_1.PackageCommandService(context).pullPackage(options.key, !!options.store, options.newKey, !!options.draft);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
pushAsset(context, command, options) {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
yield new asset_command_service_1.AssetCommandService(context).pushAsset(options.file, options.package);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
pushAssets(context, command, options) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
yield new asset_command_service_1.AssetCommandService(context).pushAssets(options.package);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
pushPackage(context, command, options) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
yield new package_command_service_1.PackageCommandService(context).pushPackage(options.spaceKey, options.file, options.newKey, options.overwrite);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
pushPackages(context, command, options) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
yield new package_command_service_1.PackageCommandService(context).pushPackages(options.spaceKey);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
pushWidget(context, command, options) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
yield new widget_command_1.WidgetCommand(context).pushWidget(!!options.tenantIndependent, !!options.userSpecific);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return Module;
|
|
169
|
+
});
|
|
@@ -13,23 +13,24 @@ 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", "uuid", "../api/asset-api", "../../../core/utils/logger", "../../../core/utils/file-service"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const logger_1 = require("../../util/logger");
|
|
23
|
-
const asset_api_1 = require("../../api/asset-api");
|
|
21
|
+
exports.AssetService = void 0;
|
|
24
22
|
const uuid_1 = require("uuid");
|
|
25
|
-
const
|
|
23
|
+
const asset_api_1 = require("../api/asset-api");
|
|
24
|
+
const logger_1 = require("../../../core/utils/logger");
|
|
25
|
+
const file_service_1 = require("../../../core/utils/file-service");
|
|
26
26
|
class AssetService {
|
|
27
|
-
constructor() {
|
|
27
|
+
constructor(context) {
|
|
28
28
|
this.fileDownloadedMessage = "File downloaded successfully. New filename: ";
|
|
29
|
+
this.assetApi = new asset_api_1.AssetApi(context);
|
|
29
30
|
}
|
|
30
31
|
listAssets(assetType) {
|
|
31
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const nodes = yield
|
|
33
|
+
const nodes = yield this.assetApi.findAllAssets(assetType);
|
|
33
34
|
nodes.forEach(node => {
|
|
34
35
|
logger_1.logger.info(`${node.name} - Key: "${node.key}"`);
|
|
35
36
|
});
|
|
@@ -38,12 +39,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
39
|
findAndExportAllAssets(assetType) {
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
const fieldsToInclude = ["key", "name", "assetType", "rootNodeKey", "activatedDraftId"];
|
|
41
|
-
const nodes = yield
|
|
42
|
+
const nodes = yield this.assetApi.findAllAssets(assetType);
|
|
42
43
|
const filename = (0, uuid_1.v4)() + ".json";
|
|
43
44
|
file_service_1.fileService.writeToFileWithGivenName(JSON.stringify(nodes, fieldsToInclude), filename);
|
|
44
45
|
logger_1.logger.info(this.fileDownloadedMessage + filename);
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
exports.
|
|
49
|
+
exports.AssetService = AssetService;
|
|
49
50
|
});
|
|
@@ -13,19 +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", "../api/compute-pool-api"], factory);
|
|
17
17
|
}
|
|
18
18
|
})(function (require, exports) {
|
|
19
19
|
"use strict";
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.
|
|
22
|
-
const compute_pool_api_1 = require("
|
|
21
|
+
exports.DataModelService = void 0;
|
|
22
|
+
const compute_pool_api_1 = require("../api/compute-pool-api");
|
|
23
23
|
class DataModelService {
|
|
24
|
+
constructor(context) {
|
|
25
|
+
this.computePoolApi = new compute_pool_api_1.ComputePoolApi(context);
|
|
26
|
+
}
|
|
24
27
|
getDataModelDetailsForPackages(packagesWithDataModelVariables) {
|
|
25
28
|
var _a;
|
|
26
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
30
|
const dataModelsMap = new Map();
|
|
28
|
-
const allAvailableDataModels = yield
|
|
31
|
+
const allAvailableDataModels = yield this.computePoolApi.findAllDataModelsDetails();
|
|
29
32
|
for (const node of packagesWithDataModelVariables) {
|
|
30
33
|
const variablesOfPackage = (_a = packagesWithDataModelVariables.find(nodeWithVariablesAssignment => nodeWithVariablesAssignment.key === node.key)) === null || _a === void 0 ? void 0 : _a.variableAssignments;
|
|
31
34
|
const dataModelIds = variablesOfPackage.filter(variable => variable.value).map(variable => variable.value.toString());
|
|
@@ -36,6 +39,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
|
-
DataModelService
|
|
40
|
-
exports.dataModelService = DataModelService.INSTANCE;
|
|
42
|
+
exports.DataModelService = DataModelService;
|
|
41
43
|
});
|