@celonis/content-cli 0.13.5 → 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.
Files changed (245) hide show
  1. package/README.md +13 -6
  2. package/{api → commands/action-flows/action-flow}/action-flow-api.js +10 -9
  3. package/commands/{action-flow.command.js → action-flows/action-flow/action-flow-command.service.js} +11 -8
  4. package/{services/action-flow/action-flow-service.js → commands/action-flows/action-flow/action-flow.service.js} +12 -10
  5. package/commands/action-flows/module.js +88 -0
  6. package/commands/{skill.command.js → action-flows/skill/skill-command.service.js} +9 -11
  7. package/{content/factory/skill-manager.factory.js → commands/action-flows/skill/skill.manager-factory.js} +7 -4
  8. package/{content/manager → commands/action-flows/skill}/skill.manager.js +7 -4
  9. package/commands/analysis/analysis-bookmarks-command.service.js +39 -0
  10. package/{content/factory/analysis-bookmarks-manager.factory.js → commands/analysis/analysis-bookmarks.manager-factory.js} +7 -4
  11. package/{content/manager → commands/analysis}/analysis-bookmarks.manager.js +8 -5
  12. package/commands/analysis/module.js +52 -0
  13. package/commands/configuration-management/api/batch-import-export-api.js +84 -0
  14. package/{api → commands/configuration-management/api}/diff-api.js +8 -7
  15. package/commands/configuration-management/api/variable-assignment-candidates-api.js +41 -0
  16. package/{services/package-manager/batch-import-export-service.js → commands/configuration-management/batch-import-export.service.js} +31 -26
  17. package/commands/{config.command.js → configuration-management/config-command.service.js} +21 -16
  18. package/{services/package-manager/diff-service.js → commands/configuration-management/diff.service.js} +11 -8
  19. package/commands/configuration-management/module.js +102 -0
  20. package/{services/studio → commands/configuration-management}/studio.service.js +33 -24
  21. package/commands/{variable.command.js → configuration-management/variable-command.service.js} +10 -7
  22. package/{services/package-manager/variable-service.js → commands/configuration-management/variable.service.js} +36 -42
  23. package/commands/{ctp.command.js → cpm4/ctp-command.service.js} +11 -13
  24. package/{content/manager → commands/cpm4}/ctp.analysis.manager.js +3 -0
  25. package/{content/manager → commands/cpm4}/ctp.datamodel.manager.js +2 -2
  26. package/{content/factory/ctp-manager.factory.js → commands/cpm4/ctp.manager-factory.js} +9 -6
  27. package/{content/manager → commands/cpm4}/ctp.manager.js +6 -4
  28. package/commands/cpm4/module.js +46 -0
  29. package/commands/{connection.command.js → data-pipeline/connection/connection-command.service.js} +14 -11
  30. package/commands/data-pipeline/connection/connection.commands.js +65 -0
  31. package/{services → commands/data-pipeline}/connection/connection.service.js +18 -15
  32. package/{api → commands/data-pipeline/data-pool}/data-pool-api.js +14 -13
  33. package/commands/{data-pool.command.js → data-pipeline/data-pool/data-pool-command.service.js} +25 -23
  34. package/{content/factory → commands/data-pipeline/data-pool}/data-pool-manager.factory.js +9 -6
  35. package/{services → commands/data-pipeline}/data-pool/data-pool-service.js +13 -10
  36. package/commands/data-pipeline/data-pool/data-pool.commands.js +99 -0
  37. package/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.js +8 -9
  38. package/commands/data-pipeline/module.js +24 -0
  39. package/commands/profile/module.js +60 -0
  40. package/commands/profile/profile-command.service.js +94 -0
  41. package/{api → commands/studio/api}/asset-api.js +8 -7
  42. package/{api → commands/studio/api}/compute-pool-api.js +7 -6
  43. package/{api → commands/studio/api}/node-api.js +9 -8
  44. package/{api → commands/studio/api}/package-api.js +18 -17
  45. package/{api → commands/studio/api}/package-dependencies-api.js +12 -11
  46. package/{api → commands/studio/api}/space-api.js +10 -9
  47. package/commands/{analysis-bookmarks.command.js → studio/api/studio-variables-api.js} +18 -13
  48. package/commands/{asset.command.js → studio/command-service/asset-command.service.js} +21 -19
  49. package/commands/{package.command.js → studio/command-service/package-command.service.js} +22 -20
  50. package/commands/{space.command.js → studio/command-service/space-command.service.js} +9 -11
  51. package/commands/studio/command-service/widget.command.js +56 -0
  52. package/{content/factory/asset-manager.factory.js → commands/studio/manager/asset.manager-factory.js} +7 -4
  53. package/{content → commands/studio}/manager/asset.manager.js +8 -5
  54. package/{content/factory/package-manager.factory.js → commands/studio/manager/package.manager-factory.js} +7 -4
  55. package/{content → commands/studio}/manager/package.manager.js +9 -6
  56. package/{content/factory/space-manager.factory.js → commands/studio/manager/space.manager-factory.js} +6 -3
  57. package/{content → commands/studio}/manager/space.manager.js +7 -4
  58. package/{content/factory/widget-manager.factory.js → commands/studio/manager/widget.manager-factory.js} +8 -5
  59. package/{content → commands/studio}/manager/widget.manager.js +5 -5
  60. package/commands/studio/module.js +169 -0
  61. package/{services/package-manager → commands/studio/service}/asset-service.js +10 -9
  62. package/{services/package-manager/datamodel-service.js → commands/studio/service/data-model.service.js} +8 -6
  63. package/{services/package-manager/package-service.js → commands/studio/service/package.service.js} +59 -49
  64. package/{services/package-manager/space-service.js → commands/studio/service/space.service.js} +9 -9
  65. package/commands/studio/service/studio-variable.service.js +41 -0
  66. package/content-cli.js +69 -20
  67. package/core/command/cli-context.js +69 -0
  68. package/core/command/module-handler.js +200 -0
  69. package/core/http/base-api.js +115 -0
  70. package/{services/http-client-service.v2.js → core/http/http-client.js} +39 -24
  71. package/{services/context.service.js → core/http/http-shared/base.manager.helper.js} +6 -16
  72. package/{content/manager → core/http/http-shared}/base.manager.js +14 -21
  73. package/{services → core/profile}/profile.service.js +11 -5
  74. package/{validators → core/profile}/profile.validator.js +3 -3
  75. package/{services → core/utils}/file-service.js +2 -7
  76. package/core/utils/logger.js +102 -0
  77. package/{services → core/utils}/question.service.js +18 -7
  78. package/{util → core/utils}/version.js +1 -1
  79. package/lib/{api → commands/action-flows/action-flow}/action-flow-api.d.ts +4 -4
  80. package/lib/commands/{action-flow.command.d.ts → action-flows/action-flow/action-flow-command.service.d.ts} +4 -1
  81. package/lib/{services/action-flow/action-flow-service.d.ts → commands/action-flows/action-flow/action-flow.service.d.ts} +4 -4
  82. package/lib/commands/action-flows/module.d.ts +14 -0
  83. package/lib/commands/{skill.command.d.ts → action-flows/skill/skill-command.service.d.ts} +3 -2
  84. package/lib/commands/action-flows/skill/skill.manager-factory.d.ts +8 -0
  85. package/lib/{content/manager → commands/action-flows/skill}/skill.manager.d.ts +4 -2
  86. package/lib/commands/analysis/analysis-bookmarks-command.service.d.ts +7 -0
  87. package/lib/commands/analysis/analysis-bookmarks.manager-factory.d.ts +8 -0
  88. package/lib/{content/manager → commands/analysis}/analysis-bookmarks.manager.d.ts +4 -2
  89. package/lib/commands/analysis/module.d.ts +11 -0
  90. package/lib/{api → commands/configuration-management/api}/batch-import-export-api.d.ts +5 -5
  91. package/lib/{api → commands/configuration-management/api}/diff-api.d.ts +5 -5
  92. package/lib/commands/configuration-management/api/variable-assignment-candidates-api.d.ts +8 -0
  93. package/lib/{services/package-manager/batch-import-export-service.d.ts → commands/configuration-management/batch-import-export.service.d.ts} +6 -3
  94. package/lib/commands/{config.command.d.ts → configuration-management/config-command.service.d.ts} +6 -1
  95. package/lib/{services/package-manager/diff-service.d.ts → commands/configuration-management/diff.service.d.ts} +4 -3
  96. package/lib/{interfaces/package-export-transport.d.ts → commands/configuration-management/interfaces/package-export.interfaces.d.ts} +2 -2
  97. package/lib/{api/variable-assignment-apis.d.ts → commands/configuration-management/interfaces/variable-assignment-apis.constants.d.ts} +3 -1
  98. package/lib/commands/configuration-management/module.d.ts +15 -0
  99. package/lib/{services/studio → commands/configuration-management}/studio.service.d.ts +12 -5
  100. package/lib/commands/configuration-management/variable-command.service.d.ts +6 -0
  101. package/lib/{services/package-manager/variable-service.d.ts → commands/configuration-management/variable.service.d.ts} +8 -8
  102. package/lib/commands/cpm4/ctp-command.service.d.ts +7 -0
  103. package/lib/{content/manager → commands/cpm4}/ctp.analysis.manager.d.ts +2 -0
  104. package/lib/{content/manager → commands/cpm4}/ctp.datamodel.manager.d.ts +2 -1
  105. package/lib/{content/factory/ctp-manager.factory.d.ts → commands/cpm4/ctp.manager-factory.d.ts} +4 -1
  106. package/lib/{content/manager → commands/cpm4}/ctp.manager.d.ts +4 -2
  107. package/lib/commands/cpm4/module.d.ts +10 -0
  108. package/lib/commands/data-pipeline/connection/connection-command.service.d.ts +8 -0
  109. package/lib/commands/data-pipeline/connection/connection.commands.d.ts +11 -0
  110. package/lib/{services → commands/data-pipeline}/connection/connection.service.d.ts +4 -3
  111. package/lib/{api → commands/data-pipeline/data-pool}/data-pool-api.d.ts +5 -5
  112. package/lib/commands/data-pipeline/data-pool/data-pool-command.service.d.ts +14 -0
  113. package/lib/commands/data-pipeline/data-pool/data-pool-manager.factory.d.ts +9 -0
  114. package/lib/{services → commands/data-pipeline}/data-pool/data-pool-service.d.ts +4 -3
  115. package/lib/commands/data-pipeline/data-pool/data-pool.commands.d.ts +15 -0
  116. package/lib/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.d.ts +4 -2
  117. package/lib/commands/data-pipeline/module.d.ts +9 -0
  118. package/lib/commands/profile/module.d.ts +12 -0
  119. package/lib/commands/{profile.command.d.ts → profile/profile-command.service.d.ts} +1 -1
  120. package/lib/{api → commands/studio/api}/asset-api.d.ts +4 -4
  121. package/lib/{api → commands/studio/api}/compute-pool-api.d.ts +4 -4
  122. package/lib/{api → commands/studio/api}/node-api.d.ts +4 -4
  123. package/lib/{api → commands/studio/api}/package-api.d.ts +4 -4
  124. package/lib/{api → commands/studio/api}/package-dependencies-api.d.ts +4 -4
  125. package/lib/commands/studio/api/space-api.d.ts +9 -0
  126. package/lib/commands/studio/api/studio-variables-api.d.ts +8 -0
  127. package/lib/commands/studio/command-service/asset-command.service.d.ts +11 -0
  128. package/lib/commands/{package.command.d.ts → studio/command-service/package-command.service.d.ts} +8 -5
  129. package/lib/commands/studio/command-service/space-command.service.d.ts +6 -0
  130. package/lib/commands/studio/command-service/widget.command.d.ts +7 -0
  131. package/lib/{interfaces/batch-export-node-transport.d.ts → commands/studio/interfaces/batch-export-node.interfaces.d.ts} +1 -9
  132. package/lib/{content/factory/asset-manager.factory.d.ts → commands/studio/manager/asset.manager-factory.d.ts} +4 -1
  133. package/lib/{content → commands/studio}/manager/asset.manager.d.ts +4 -2
  134. package/lib/{content/factory/package-manager.factory.d.ts → commands/studio/manager/package.manager-factory.d.ts} +4 -1
  135. package/lib/{content → commands/studio}/manager/package.manager.d.ts +4 -2
  136. package/lib/commands/studio/manager/space.manager-factory.d.ts +8 -0
  137. package/lib/{content → commands/studio}/manager/space.manager.d.ts +4 -2
  138. package/lib/{content/factory/widget-manager.factory.d.ts → commands/studio/manager/widget.manager-factory.d.ts} +10 -7
  139. package/lib/{content → commands/studio}/manager/widget.manager.d.ts +4 -2
  140. package/lib/commands/studio/module.d.ts +21 -0
  141. package/lib/{services/package-manager → commands/studio/service}/asset-service.d.ts +4 -3
  142. package/lib/{services/package-manager/datamodel-service.d.ts → commands/studio/service/data-model.service.d.ts} +5 -5
  143. package/lib/{services/package-manager/package-service.d.ts → commands/studio/service/package.service.d.ts} +13 -6
  144. package/lib/commands/studio/service/space.service.d.ts +11 -0
  145. package/lib/commands/studio/service/studio-variable.service.d.ts +9 -0
  146. package/lib/core/command/cli-context.d.ts +17 -0
  147. package/lib/core/command/module-handler.d.ts +57 -0
  148. package/lib/core/http/base-api.d.ts +32 -0
  149. package/lib/{services/http-client-service.v2.d.ts → core/http/http-client.d.ts} +8 -3
  150. package/lib/{content/manager → core/http/http-shared}/base.manager.d.ts +4 -6
  151. package/lib/core/http/http-shared/base.manager.helper.d.ts +4 -0
  152. package/lib/{services → core/profile}/profile.service.d.ts +2 -1
  153. package/lib/{validators → core/profile}/profile.validator.d.ts +1 -1
  154. package/lib/{services → core/utils}/file-service.d.ts +0 -2
  155. package/lib/core/utils/question.service.d.ts +10 -0
  156. package/package.json +3 -3
  157. package/api/batch-import-export-api.js +0 -62
  158. package/api/variables-api.js +0 -56
  159. package/commands/profile.command.js +0 -88
  160. package/commands/widget.command.js +0 -36
  161. package/content-cli-analyze.js +0 -56
  162. package/content-cli-config.js +0 -119
  163. package/content-cli-export.js +0 -90
  164. package/content-cli-get.js +0 -52
  165. package/content-cli-import.js +0 -93
  166. package/content-cli-list.js +0 -129
  167. package/content-cli-profile.js +0 -64
  168. package/content-cli-pull.js +0 -104
  169. package/content-cli-push.js +0 -196
  170. package/content-cli-set.js +0 -55
  171. package/content-cli-update.js +0 -44
  172. package/interfaces/variable-assignment-api.interface.js +0 -12
  173. package/lib/api/space-api.d.ts +0 -9
  174. package/lib/api/variables-api.d.ts +0 -14
  175. package/lib/commands/analysis-bookmarks.command.d.ts +0 -6
  176. package/lib/commands/asset.command.d.ts +0 -8
  177. package/lib/commands/connection.command.d.ts +0 -5
  178. package/lib/commands/ctp.command.d.ts +0 -6
  179. package/lib/commands/data-pool.command.d.ts +0 -11
  180. package/lib/commands/space.command.d.ts +0 -5
  181. package/lib/commands/variable.command.d.ts +0 -3
  182. package/lib/commands/widget.command.d.ts +0 -5
  183. package/lib/content/factory/analysis-bookmarks-manager.factory.d.ts +0 -5
  184. package/lib/content/factory/data-pool-manager.factory.d.ts +0 -6
  185. package/lib/content/factory/skill-manager.factory.d.ts +0 -5
  186. package/lib/content/factory/space-manager.factory.d.ts +0 -5
  187. package/lib/content-cli-analyze.d.ts +0 -1
  188. package/lib/content-cli-config.d.ts +0 -8
  189. package/lib/content-cli-export.d.ts +0 -6
  190. package/lib/content-cli-get.d.ts +0 -1
  191. package/lib/content-cli-import.d.ts +0 -6
  192. package/lib/content-cli-list.d.ts +0 -9
  193. package/lib/content-cli-profile.d.ts +0 -1
  194. package/lib/content-cli-pull.d.ts +0 -1
  195. package/lib/content-cli-push.d.ts +0 -1
  196. package/lib/content-cli-set.d.ts +0 -1
  197. package/lib/content-cli-update.d.ts +0 -1
  198. package/lib/interfaces/variable-assignment-api.interface.d.ts +0 -3
  199. package/lib/services/command.service.d.ts +0 -6
  200. package/lib/services/content.service.d.ts +0 -11
  201. package/lib/services/context.service.d.ts +0 -13
  202. package/lib/services/http-client.service.d.ts +0 -15
  203. package/lib/services/package-manager/space-service.d.ts +0 -11
  204. package/lib/services/question.service.d.ts +0 -4
  205. package/lib/util/context-initializer.d.ts +0 -3
  206. package/lib/util/program.d.ts +0 -2
  207. package/services/command.service.js +0 -24
  208. package/services/content.service.js +0 -130
  209. package/services/http-client.service.js +0 -157
  210. package/util/context-initializer.js +0 -39
  211. package/util/logger.js +0 -49
  212. package/util/program.js +0 -16
  213. /package/{interfaces/batch-export-import-constants.js → commands/configuration-management/interfaces/batch-export-import.constants.js} +0 -0
  214. /package/{interfaces/diff-package.transport.js → commands/configuration-management/interfaces/diff-package.interfaces.js} +0 -0
  215. /package/{interfaces/batch-export-node-transport.js → commands/configuration-management/interfaces/package-export.interfaces.js} +0 -0
  216. /package/{api/variable-assignment-apis.js → commands/configuration-management/interfaces/variable-assignment-apis.constants.js} +0 -0
  217. /package/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.js +0 -0
  218. /package/{interfaces/manager-config.interface.js → commands/studio/interfaces/batch-export-node.interfaces.js} +0 -0
  219. /package/{interfaces/manifest-transport.js → commands/studio/interfaces/manifest.interface.js} +0 -0
  220. /package/{interfaces → commands/studio/interfaces}/package-manager.interfaces.js +0 -0
  221. /package/{interfaces → commands/studio/interfaces}/save-content-node.interface.js +0 -0
  222. /package/{interfaces/package-export-transport.js → commands/studio/interfaces/space.interface.js} +0 -0
  223. /package/{util → commands/studio/utils}/semantic-versioning.js +0 -0
  224. /package/{util → core/http}/axios-initializer.js +0 -0
  225. /package/{interfaces/save-space.interface.js → core/http/http-shared/manager-config.interface.js} +0 -0
  226. /package/{util → core/http}/tracing.js +0 -0
  227. /package/{interfaces → core/profile}/profile.interface.js +0 -0
  228. /package/{util → core/utils}/json.js +0 -0
  229. /package/{util → core/utils}/yaml.js +0 -0
  230. /package/lib/{interfaces/batch-export-import-constants.d.ts → commands/configuration-management/interfaces/batch-export-import.constants.d.ts} +0 -0
  231. /package/lib/{interfaces/diff-package.transport.d.ts → commands/configuration-management/interfaces/diff-package.interfaces.d.ts} +0 -0
  232. /package/lib/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.d.ts +0 -0
  233. /package/lib/{interfaces/manifest-transport.d.ts → commands/studio/interfaces/manifest.interface.d.ts} +0 -0
  234. /package/lib/{interfaces → commands/studio/interfaces}/package-manager.interfaces.d.ts +0 -0
  235. /package/lib/{interfaces → commands/studio/interfaces}/save-content-node.interface.d.ts +0 -0
  236. /package/lib/{interfaces/save-space.interface.d.ts → commands/studio/interfaces/space.interface.d.ts} +0 -0
  237. /package/lib/{util → commands/studio/utils}/semantic-versioning.d.ts +0 -0
  238. /package/lib/{util → core/http}/axios-initializer.d.ts +0 -0
  239. /package/lib/{interfaces → core/http/http-shared}/manager-config.interface.d.ts +0 -0
  240. /package/lib/{util → core/http}/tracing.d.ts +0 -0
  241. /package/lib/{interfaces → core/profile}/profile.interface.d.ts +0 -0
  242. /package/lib/{util → core/utils}/json.d.ts +0 -0
  243. /package/lib/{util → core/utils}/logger.d.ts +0 -0
  244. /package/lib/{util → core/utils}/version.d.ts +0 -0
  245. /package/lib/{util → core/utils}/yaml.d.ts +0 -0
@@ -1,52 +0,0 @@
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", "./commands/connection.command", "./util/context-initializer", "./util/logger", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- const connection_command_1 = require("./commands/connection.command");
22
- const context_initializer_1 = require("./util/context-initializer");
23
- const logger_1 = require("./util/logger");
24
- const program_1 = require("./util/program");
25
- class Get {
26
- static connection(program) {
27
- program
28
- .command("connection")
29
- .description("Programmatically read properties of your connections")
30
- .option("-p, --profile <profile>", "Profile which you want to use to update the data pool configuration")
31
- .requiredOption("--dataPoolId <dataPoolId>", "Id of the data pool you want to update")
32
- .requiredOption("--connectionId <connectionId>", "Id of the connection you want to update")
33
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
34
- yield new connection_command_1.ConnectionCommand().getProperties(cmd.profile, cmd.dataPoolId, cmd.connectionId);
35
- process.exit();
36
- }));
37
- return program;
38
- }
39
- }
40
- context_initializer_1.ContextInitializer.initContext()
41
- .then(() => {
42
- Get.connection(program_1.program);
43
- program_1.program.parse(process.argv);
44
- })
45
- .catch(e => {
46
- logger_1.logger.error(e);
47
- });
48
- if (!process.argv.slice(2).length) {
49
- program_1.program.outputHelp();
50
- process.exit(1);
51
- }
52
- });
@@ -1,93 +0,0 @@
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", "./commands/package.command", "./commands/data-pool.command", "./util/context-initializer", "./util/logger", "./commands/action-flow.command", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.Import = void 0;
22
- const package_command_1 = require("./commands/package.command");
23
- const data_pool_command_1 = require("./commands/data-pool.command");
24
- const context_initializer_1 = require("./util/context-initializer");
25
- const logger_1 = require("./util/logger");
26
- const action_flow_command_1 = require("./commands/action-flow.command");
27
- const program_1 = require("./util/program");
28
- class Import {
29
- static packages(program) {
30
- program
31
- .command("packages")
32
- .description("Command to import all given packages")
33
- .option("-p, --profile <profile>", "Profile which you want to use to list packages")
34
- .option("--spaceMappings <spaceMappings...>", "List of mappings for importing packages to different target spaces. Mappings should follow format 'packageKey:targetSpaceKey'")
35
- .option("--overwrite", "Flag to allow overwriting of packages")
36
- .option("--excludeActionFlows", "Skip overwrite of action flows of package")
37
- .option("--dataModelMappingsFile <dataModelMappingsFile>", "DataModel variable mappings file path. If missing, variables will be mapped from manifest file.")
38
- .requiredOption("-f, --file <file>", "Exported packages file (relative path)")
39
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
40
- yield new package_command_1.PackageCommand().batchImportPackages(cmd.spaceMappings, cmd.dataModelMappingsFile, cmd.file, cmd.overwrite, cmd.excludeActionFlows);
41
- process.exit();
42
- }));
43
- return program;
44
- }
45
- static dataPools(program) {
46
- program
47
- .command("data-pools")
48
- .description("Command to batch import multiple data pools with their objects and dependencies")
49
- .option("-p, --profile <profile>", "Profile which you want to use to import the data pools")
50
- .requiredOption("-f, --jsonFile <file>", "The file with the JSON data pool batch import request")
51
- .option("--outputToJsonFile", "Output the batch import result in a JSON file")
52
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
53
- yield new data_pool_command_1.DataPoolCommand().batchImportDataPools(cmd.jsonFile, cmd.outputToJsonFile);
54
- process.exit();
55
- }));
56
- return program;
57
- }
58
- static actionFlows(program) {
59
- program
60
- .command("action-flows")
61
- .description("Command to import all Action Flows in a package with their objects and dependencies")
62
- .option("-p, --profile <profile>", "Profile which you want to use to import Action Flows")
63
- .requiredOption("--packageId <packageId>", "ID of the package to which you want to export Action Flows")
64
- .requiredOption("-f, --file <file>", "Exported Action Flows file (relative path)")
65
- .requiredOption("-d, --dryRun <dryRun>", "Execute the import on dry run mode")
66
- .option("-o, --outputToJsonFile", "Output the import result in a JSON file")
67
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
68
- yield new action_flow_command_1.ActionFlowCommand().importActionFlows(cmd.packageId, cmd.file, cmd.dryRun, cmd.outputToJsonFile);
69
- process.exit();
70
- }));
71
- return program;
72
- }
73
- }
74
- exports.Import = Import;
75
- const loadCommands = () => {
76
- getAllCommands();
77
- };
78
- context_initializer_1.ContextInitializer.initContext()
79
- .then(loadCommands, loadCommands)
80
- .catch(e => {
81
- logger_1.logger.error(e);
82
- });
83
- if (!process.argv.slice(2).length) {
84
- program_1.program.outputHelp();
85
- process.exit(1);
86
- }
87
- function getAllCommands() {
88
- Import.packages(program_1.program);
89
- Import.dataPools(program_1.program);
90
- Import.actionFlows(program_1.program);
91
- program_1.program.parse(process.argv);
92
- }
93
- });
@@ -1,129 +0,0 @@
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", "./commands/package.command", "./commands/space.command", "./commands/data-pool.command", "./commands/asset.command", "./util/logger", "./util/context-initializer", "./commands/connection.command", "./commands/variable.command", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.List = void 0;
22
- const package_command_1 = require("./commands/package.command");
23
- const space_command_1 = require("./commands/space.command");
24
- const data_pool_command_1 = require("./commands/data-pool.command");
25
- const asset_command_1 = require("./commands/asset.command");
26
- const logger_1 = require("./util/logger");
27
- const context_initializer_1 = require("./util/context-initializer");
28
- const connection_command_1 = require("./commands/connection.command");
29
- const variable_command_1 = require("./commands/variable.command");
30
- const program_1 = require("./util/program");
31
- class List {
32
- static packages(program) {
33
- program
34
- .command("packages")
35
- .description("Command to list all packages")
36
- .option("-p, --profile <profile>", "Profile which you want to use to list packages")
37
- .option("--json", "Return response as json type", "")
38
- .option("--includeDependencies", "Include variables and dependencies", "")
39
- .option("--packageKeys <packageKeys...>", "Lists only given package keys")
40
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
41
- yield new package_command_1.PackageCommand().listPackages(cmd.json, cmd.includeDependencies, cmd.packageKeys);
42
- process.exit();
43
- }));
44
- return program;
45
- }
46
- static spaces(program) {
47
- program
48
- .command("spaces")
49
- .description("Command to list all spaces")
50
- .option("-p, --profile <profile>", "Profile which you want to use to list spaces")
51
- .option("--json", "Return response as json type", "")
52
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
53
- yield new space_command_1.SpaceCommand().listSpaces(cmd.profile, cmd.json);
54
- process.exit();
55
- }));
56
- return program;
57
- }
58
- static dataPools(program) {
59
- program
60
- .command("data-pools")
61
- .description("Command to list all Data Pools")
62
- .option("-p, --profile <profile>", "Profile which you want to use to list data pools")
63
- .option("--json", "Return response as json type", "")
64
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
65
- yield new data_pool_command_1.DataPoolCommand().listDataPools(cmd.profile, cmd.json);
66
- process.exit();
67
- }));
68
- return program;
69
- }
70
- static connections(program) {
71
- program
72
- .command("connection")
73
- .description("Command to list all connections in a Data Pool")
74
- .option("-p, --profile <profile>", "Profile which you want to use to list connections")
75
- .requiredOption("--dataPoolId <dataPoolId>", "ID of the data pool")
76
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
77
- yield new connection_command_1.ConnectionCommand().listConnections(cmd.profile, cmd.dataPoolId);
78
- process.exit();
79
- }));
80
- return program;
81
- }
82
- static assets(program) {
83
- program
84
- .command("assets")
85
- .description("Command to list all assets")
86
- .option("-p, --profile <profile>", "Profile which you want to use to list assets")
87
- .option("--json", "Return response as json type", "")
88
- .option("--assetType <assetType>", "type of assets")
89
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
90
- yield new asset_command_1.AssetCommand().listAssets(cmd.profile, cmd.json, cmd.assetType);
91
- process.exit();
92
- }));
93
- return program;
94
- }
95
- static assignments(program) {
96
- program
97
- .command("assignments")
98
- .description("Command to list possible variable assignments for a type")
99
- .option("-p, --profile <profile>", "Profile which you want to use to list possible variable assignments")
100
- .option("--json", "Return response as json type", "")
101
- .requiredOption("--type <type>", "Type of variable")
102
- .option("--params <params>", "Variable query params")
103
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
104
- yield new variable_command_1.VariableCommand().listAssignments(cmd.type, cmd.json, cmd.params);
105
- process.exit();
106
- }));
107
- return program;
108
- }
109
- }
110
- exports.List = List;
111
- const loadAllCommands = () => {
112
- List.packages(program_1.program);
113
- List.spaces(program_1.program);
114
- List.dataPools(program_1.program);
115
- List.assets(program_1.program);
116
- List.connections(program_1.program);
117
- List.assignments(program_1.program);
118
- program_1.program.parse(process.argv);
119
- };
120
- context_initializer_1.ContextInitializer.initContext()
121
- .then(loadAllCommands, loadAllCommands)
122
- .catch(e => {
123
- logger_1.logger.error(e);
124
- });
125
- if (!process.argv.slice(2).length) {
126
- program_1.program.outputHelp();
127
- process.exit(1);
128
- }
129
- });
@@ -1,64 +0,0 @@
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", "./commands/profile.command", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- const profile_command_1 = require("./commands/profile.command");
22
- const program_1 = require("./util/program");
23
- class Profile {
24
- static listProfile(program) {
25
- program
26
- .command("list")
27
- .description("Command to list all stored profiles")
28
- .action(() => __awaiter(this, void 0, void 0, function* () {
29
- yield new profile_command_1.ProfileCommand().listProfiles();
30
- process.exit();
31
- }));
32
- return program;
33
- }
34
- static createProfile(program) {
35
- program
36
- .command("create")
37
- .description("Command to create a new profile")
38
- .option("--setAsDefault", "Set this profile as default")
39
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
40
- yield new profile_command_1.ProfileCommand().createProfile(cmd.setAsDefault);
41
- process.exit();
42
- }));
43
- return program;
44
- }
45
- static defaultProfile(program) {
46
- program
47
- .command("default <profile>")
48
- .description("Command to set a profile as default")
49
- .action((profile) => __awaiter(this, void 0, void 0, function* () {
50
- yield new profile_command_1.ProfileCommand().makeDefaultProfile(profile);
51
- process.exit();
52
- }));
53
- return program;
54
- }
55
- }
56
- Profile.listProfile(program_1.program);
57
- Profile.createProfile(program_1.program);
58
- Profile.defaultProfile(program_1.program);
59
- program_1.program.parse(process.argv);
60
- if (!process.argv.slice(2).length) {
61
- program_1.program.outputHelp();
62
- process.exit(1);
63
- }
64
- });
@@ -1,104 +0,0 @@
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", "./commands/skill.command", "./commands/data-pool.command", "./commands/asset.command", "./commands/package.command", "./commands/analysis-bookmarks.command", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- const skill_command_1 = require("./commands/skill.command");
22
- const data_pool_command_1 = require("./commands/data-pool.command");
23
- const asset_command_1 = require("./commands/asset.command");
24
- const package_command_1 = require("./commands/package.command");
25
- const analysis_bookmarks_command_1 = require("./commands/analysis-bookmarks.command");
26
- const program_1 = require("./util/program");
27
- class Pull {
28
- static analysisBookmarks(program) {
29
- program
30
- .command("bookmarks")
31
- .description("Command to pull an analysis bookmarks")
32
- .option("-p, --profile <profile>", "Profile which you want to use to pull the analysis bookmarks")
33
- .option("--type <type>", "Pull shared/all Analysis Bookmarks, else by default get user bookmarks")
34
- .requiredOption("--id <id>", "Id of the analysis you want to pull")
35
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
36
- yield new analysis_bookmarks_command_1.AnalysisBookmarksCommand().pullAnalysisBookmarks(cmd.profile, cmd.id, cmd.type);
37
- process.exit();
38
- }));
39
- return program;
40
- }
41
- static skill(program) {
42
- program
43
- .command("skill")
44
- .description("Command to pull a skill")
45
- .option("-p, --profile <profile>", "Profile which you want to use to pull the skill")
46
- .requiredOption("--projectId <projectId>", "Id of the project you want to pull")
47
- .requiredOption("--skillId <skillId>", "Id of the skill you want to pull")
48
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
49
- yield new skill_command_1.SkillCommand().pullSkill(cmd.profile, cmd.projectId, cmd.skillId);
50
- process.exit();
51
- }));
52
- return program;
53
- }
54
- static dataPool(program) {
55
- program
56
- .command("data-pool")
57
- .description("Command to pull a data pool")
58
- .option("-p, --profile <profile>", "Profile which you want to use to pull the data pool")
59
- .requiredOption("--id <id>", "Id of the data pool you want to pull")
60
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
61
- yield new data_pool_command_1.DataPoolCommand().pullDataPool(cmd.profile, cmd.id);
62
- process.exit();
63
- }));
64
- return program;
65
- }
66
- static asset(program) {
67
- program
68
- .command("asset")
69
- .description("Command to pull an asset from Studio")
70
- .option("-p, --profile <profile>", "Profile which you want to use to pull the asset")
71
- .requiredOption("--key <key>", "Key of asset you want to pull")
72
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
73
- yield new asset_command_1.AssetCommand().pullAsset(cmd.profile, cmd.key);
74
- process.exit();
75
- }));
76
- return program;
77
- }
78
- static package(program) {
79
- program
80
- .command("package")
81
- .description("Command to pull a package")
82
- .option("-p, --profile <profile>", "Profile which you want to use to pull the package")
83
- .requiredOption("--key <key>", "Key of the package you want to pull")
84
- .option("--store", "Pull package with store deployment metadata")
85
- .option("--newKey <newKey>", "Define a new key for your package")
86
- .option("--draft", "Pull draft version of package")
87
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
88
- yield new package_command_1.PackageCommand().pullPackage(cmd.profile, cmd.key, !!cmd.store, cmd.newKey, !!cmd.draft);
89
- process.exit();
90
- }));
91
- return program;
92
- }
93
- }
94
- Pull.analysisBookmarks(program_1.program);
95
- Pull.skill(program_1.program);
96
- Pull.dataPool(program_1.program);
97
- Pull.asset(program_1.program);
98
- Pull.package(program_1.program);
99
- program_1.program.parse(process.argv);
100
- if (!process.argv.slice(2).length) {
101
- program_1.program.outputHelp();
102
- process.exit(1);
103
- }
104
- });
@@ -1,196 +0,0 @@
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", "fs", "path", "./commands/skill.command", "./commands/widget.command", "./commands/data-pool.command", "./commands/asset.command", "./commands/package.command", "./commands/ctp.command", "./commands/analysis-bookmarks.command", "child_process", "./util/logger", "./util/program"], factory);
17
- }
18
- })(function (require, exports) {
19
- "use strict";
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- const fs = require("fs");
22
- const path = require("path");
23
- const skill_command_1 = require("./commands/skill.command");
24
- const widget_command_1 = require("./commands/widget.command");
25
- const data_pool_command_1 = require("./commands/data-pool.command");
26
- const asset_command_1 = require("./commands/asset.command");
27
- const package_command_1 = require("./commands/package.command");
28
- const ctp_command_1 = require("./commands/ctp.command");
29
- const analysis_bookmarks_command_1 = require("./commands/analysis-bookmarks.command");
30
- const child_process_1 = require("child_process");
31
- const logger_1 = require("./util/logger");
32
- const program_1 = require("./util/program");
33
- class Push {
34
- static analysisBookmarks(program) {
35
- program
36
- .command("bookmarks")
37
- .description("Command to push an analysis to a workspace")
38
- .option("-p, --profile <profile>", "Profile which you want to use to push the analysis")
39
- .requiredOption("--id <id>", "Id of the Analysis to which you want to push the analysis bookmarks")
40
- .requiredOption("-f, --file <file>", "The file you want to push")
41
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
42
- yield new analysis_bookmarks_command_1.AnalysisBookmarksCommand().pushAnalysisBookmarks(cmd.profile, cmd.id, cmd.file);
43
- process.exit();
44
- }));
45
- return program;
46
- }
47
- static ctp(program) {
48
- program
49
- .command("ctp")
50
- .description("Command to push a .ctp (Celonis 4 transport file) to create a package")
51
- .option("-p, --profile <profile>", "Profile which you want to use to push the analysis")
52
- .option("-a, --pushAnalysis", "Specify this option if you want to push analysis from the CTP file")
53
- .option("-d, --pushDataModels", "Specify this option if you want to push data models from the CTP file")
54
- .option("--globalPoolName <globalPoolName>", "Specify this option if you want to push all Data models into one newly created pool along with value to set the name of the pool to be created", null)
55
- .option("--existingPoolId <existingPoolId>", "Specify this option if you want to push all Data models into one already existing pool with provided ID", null)
56
- .option("-s, --spaceKey <spaceKey>", "The key of the destination space where the analyses from .ctp file will be created.", "")
57
- .requiredOption("-f, --file <file>", "The .ctp file you want to push")
58
- .requiredOption("--password <password>", "The password used for extracting the .ctp file")
59
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
60
- yield new ctp_command_1.CTPCommand().pushCTPFile(cmd.profile, cmd.file, cmd.password, cmd.pushAnalysis, cmd.pushDataModels, cmd.existingPoolId, cmd.globalPoolName, cmd.spaceKey);
61
- process.exit();
62
- }));
63
- return program;
64
- }
65
- static skill(program) {
66
- program
67
- .command("skill")
68
- .description("Command to push a skill to a project")
69
- .option("-p, --profile <profile>", "Profile which you want to use to push the skill")
70
- .requiredOption("--projectId <projectId>", "Id of the project you want to push")
71
- .requiredOption("-f, --file <file>", "The file you want to push")
72
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
73
- yield new skill_command_1.SkillCommand().pushSkill(cmd.profile, cmd.projectId, cmd.file);
74
- process.exit();
75
- }));
76
- return program;
77
- }
78
- static widget(program) {
79
- program
80
- .command("widget")
81
- .description("Command to push a widget")
82
- .option("-p, --profile <profile>", "Profile which you want to use to push the widget")
83
- .option("--tenantIndependent", "Upload widget tenant independently")
84
- .option("--userSpecific", "Upload widget only for the user in the provided api token")
85
- .option("--packageManager", "Upload widget to package manager (deprecated)") // Deprecated
86
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
87
- var _a;
88
- yield new widget_command_1.WidgetCommand().pushWidget(cmd.profile, !!cmd.tenantIndependent, !!cmd.userSpecific);
89
- if (process.env.AWS_ACCESS_KEY_ID_CDN && process.env.AWS_SECRET_ACCESS_KEY_CDN) {
90
- try {
91
- const dir = path.resolve(process.cwd());
92
- 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");
93
- logger_1.logger.info(pushToS3stdout);
94
- }
95
- catch (error) {
96
- logger_1.logger.error(new logger_1.GracefulError(((_a = error.stderr) === null || _a === void 0 ? void 0 : _a.toString()) || error.message));
97
- }
98
- }
99
- const zipFileName = path.resolve(process.cwd(), "output.zip");
100
- fs.unlinkSync(zipFileName);
101
- process.exit();
102
- }));
103
- return program;
104
- }
105
- static dataPool(program) {
106
- program
107
- .command("data-pool")
108
- .description("Command to push a data pool")
109
- .option("-p, --profile <profile>", "Profile which you want to use to push the data pool")
110
- .requiredOption("-f, --file <file>", "The file you want to push")
111
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
112
- yield new data_pool_command_1.DataPoolCommand().pushDataPool(cmd.profile, cmd.file);
113
- process.exit();
114
- }));
115
- return program;
116
- }
117
- static dataPools(program) {
118
- program
119
- .command("data-pools")
120
- .description("Command to push data pools")
121
- .option("-p, --profile <profile>", "Profile which you want to use to push the data pools")
122
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
123
- yield new data_pool_command_1.DataPoolCommand().pushDataPools(cmd.profile);
124
- process.exit();
125
- }));
126
- return program;
127
- }
128
- static asset(program) {
129
- program
130
- .command("asset")
131
- .description("Command to push an asset to Studio")
132
- .option("-p, --profile <profile>", "Profile which you want to use to push the asset")
133
- .requiredOption("-f, --file <file>", "The file you want to push")
134
- .requiredOption("--package <packageKey>", "Key of the package you want to push asset to")
135
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
136
- yield new asset_command_1.AssetCommand().pushAsset(cmd.profile, cmd.file, cmd.package);
137
- process.exit();
138
- }));
139
- return program;
140
- }
141
- static assets(program) {
142
- program
143
- .command("assets")
144
- .description("Command to push assets to Studio")
145
- .option("-p, --profile <profile>", "Profile which you want to use to push the assets")
146
- .requiredOption("--package <packageKey>", "Key of the package you want to push assets to")
147
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
148
- yield new asset_command_1.AssetCommand().pushAssets(cmd.profile, cmd.package);
149
- process.exit();
150
- }));
151
- return program;
152
- }
153
- static package(program) {
154
- program
155
- .command("package")
156
- .description("Command to push a package to Studio")
157
- .option("-p, --profile <profile>", "Profile which you want to use to push the package")
158
- .option("--newKey <newKey>", "Define a new key for your package")
159
- .option("--overwrite", "Overwrite package and its assets")
160
- .requiredOption("-f, --file <file>", "The file you want to push")
161
- .requiredOption("--spaceKey <spaceKey>", "The key of the destination space")
162
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
163
- yield new package_command_1.PackageCommand().pushPackage(cmd.profile, cmd.spaceKey, cmd.file, cmd.newKey, cmd.overwrite);
164
- process.exit();
165
- }));
166
- return program;
167
- }
168
- static packages(program) {
169
- program
170
- .command("packages")
171
- .description("Command to push packages to Studio")
172
- .option("-p, --profile <profile>", "Profile which you want to use to push the packages")
173
- .requiredOption("--spaceKey <spaceKey>", "The key of the destination space")
174
- .action((cmd) => __awaiter(this, void 0, void 0, function* () {
175
- yield new package_command_1.PackageCommand().pushPackages(cmd.profile, cmd.spaceKey);
176
- process.exit();
177
- }));
178
- return program;
179
- }
180
- }
181
- Push.analysisBookmarks(program_1.program);
182
- Push.ctp(program_1.program);
183
- Push.skill(program_1.program);
184
- Push.widget(program_1.program);
185
- Push.dataPool(program_1.program);
186
- Push.dataPools(program_1.program);
187
- Push.asset(program_1.program);
188
- Push.assets(program_1.program);
189
- Push.package(program_1.program);
190
- Push.packages(program_1.program);
191
- program_1.program.parse(process.argv);
192
- if (!process.argv.slice(2).length) {
193
- program_1.program.outputHelp();
194
- process.exit(1);
195
- }
196
- });