@codiac.io/codiac-cli 1.3.181 → 1.3.183

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 (276) hide show
  1. package/README.md +1 -1
  2. package/dist/apis/codiac-api/gen/client.d.ts +5 -1
  3. package/dist/apis/codiac-api/gen/client.js +12 -0
  4. package/dist/apis/codiac-api/gen/client.js.map +1 -1
  5. package/dist/apis/codiac-api/gen/contracts/types.gen.d.ts +25 -0
  6. package/dist/apis/codiac-api/gen/contracts/types.gen.js.map +1 -1
  7. package/dist/apis/codiac-api/i-client.d.ts +4 -0
  8. package/dist/apis/codiac-api-nats/gen/client.d.ts +4 -0
  9. package/dist/apis/codiac-api-nats/gen/client.js +17 -1
  10. package/dist/apis/codiac-api-nats/gen/client.js.map +1 -1
  11. package/dist/apis/codiac-api-nats/gen/contracts/types.gen.d.ts +25 -0
  12. package/dist/apis/codiac-api-nats/gen/contracts/types.gen.js.map +1 -1
  13. package/dist/apis/codiac-relay/gen/client.d.ts +16 -3
  14. package/dist/apis/codiac-relay/gen/client.js +58 -1
  15. package/dist/apis/codiac-relay/gen/client.js.map +1 -1
  16. package/dist/apis/codiac-relay/gen/contracts/types.gen.d.ts +173 -7
  17. package/dist/apis/codiac-relay/gen/contracts/types.gen.js.map +1 -1
  18. package/dist/apis/codiac-relay/i-client.d.ts +8 -0
  19. package/dist/apis/codiac-relay-nats/gen/client.d.ts +15 -7
  20. package/dist/apis/codiac-relay-nats/gen/client.js +86 -19
  21. package/dist/apis/codiac-relay-nats/gen/client.js.map +1 -1
  22. package/dist/apis/codiac-relay-nats/gen/contracts/types.gen.d.ts +151 -15
  23. package/dist/apis/codiac-relay-nats/gen/contracts/types.gen.js +4 -4
  24. package/dist/apis/codiac-relay-nats/gen/contracts/types.gen.js.map +1 -1
  25. package/dist/apis/codiac-relay-nats/gen/contracts.ng.d.ts +6 -0
  26. package/dist/apis/codiac-relay-nats/gen/contracts.ng.js +1 -0
  27. package/dist/apis/codiac-relay-nats/gen/contracts.ng.js.map +1 -1
  28. package/dist/bootstrapper-for-api-clients.js +14 -2
  29. package/dist/bootstrapper-for-api-clients.js.map +1 -1
  30. package/dist/cli-common/built-in-cli-user-input.d.ts +2 -1
  31. package/dist/cli-common/built-in-cli-user-input.js +52 -1
  32. package/dist/cli-common/built-in-cli-user-input.js.map +1 -1
  33. package/dist/cli-common/entities/prompt-choice.d.ts +2 -7
  34. package/dist/cli-common/mock-ui.d.ts +2 -1
  35. package/dist/cli-common/mock-ui.js +3 -0
  36. package/dist/cli-common/mock-ui.js.map +1 -1
  37. package/dist/codiac-constants.d.ts +3 -0
  38. package/dist/codiac-constants.js +3 -0
  39. package/dist/codiac-constants.js.map +1 -1
  40. package/dist/command-base-enterprise.d.ts +23 -2
  41. package/dist/command-base-enterprise.js +82 -26
  42. package/dist/command-base-enterprise.js.map +1 -1
  43. package/dist/command-base-exec.js +4 -2
  44. package/dist/command-base-exec.js.map +1 -1
  45. package/dist/commands/asset/deploy.d.ts +2 -1
  46. package/dist/commands/asset/deploy.js +3 -2
  47. package/dist/commands/asset/deploy.js.map +1 -1
  48. package/dist/commands/asset/list.d.ts +26 -7
  49. package/dist/commands/asset/list.js +127 -112
  50. package/dist/commands/asset/list.js.map +1 -1
  51. package/dist/commands/asset/probe/create.d.ts +26 -5
  52. package/dist/commands/asset/probe/create.js +182 -164
  53. package/dist/commands/asset/probe/create.js.map +1 -1
  54. package/dist/commands/asset/recycle.js +3 -4
  55. package/dist/commands/asset/recycle.js.map +1 -1
  56. package/dist/commands/asset/undeploy.d.ts +24 -9
  57. package/dist/commands/asset/undeploy.js +162 -161
  58. package/dist/commands/asset/undeploy.js.map +1 -1
  59. package/dist/commands/asset/view.js +1 -1
  60. package/dist/commands/asset/view.js.map +1 -1
  61. package/dist/commands/asset/volume/create.d.ts +24 -13
  62. package/dist/commands/asset/volume/create.js +153 -158
  63. package/dist/commands/asset/volume/create.js.map +1 -1
  64. package/dist/commands/asset/volume/delete.d.ts +21 -7
  65. package/dist/commands/asset/volume/delete.js +107 -101
  66. package/dist/commands/asset/volume/delete.js.map +1 -1
  67. package/dist/commands/asset/volume/list.d.ts +23 -9
  68. package/dist/commands/asset/volume/list.js +74 -54
  69. package/dist/commands/asset/volume/list.js.map +1 -1
  70. package/dist/commands/cabinet/cluster/attach.d.ts +32 -0
  71. package/dist/commands/cabinet/cluster/attach.js +144 -0
  72. package/dist/commands/cabinet/cluster/attach.js.map +1 -0
  73. package/dist/commands/cabinet/create.d.ts +1 -0
  74. package/dist/commands/cabinet/create.js +5 -1
  75. package/dist/commands/cabinet/create.js.map +1 -1
  76. package/dist/commands/cabinet/list.d.ts +27 -6
  77. package/dist/commands/cabinet/list.js +130 -121
  78. package/dist/commands/cabinet/list.js.map +1 -1
  79. package/dist/commands/cabinet/obliterate.d.ts +1 -0
  80. package/dist/commands/cabinet/obliterate.js +5 -1
  81. package/dist/commands/cabinet/obliterate.js.map +1 -1
  82. package/dist/commands/cabinet/restore.d.ts +36 -0
  83. package/dist/commands/cabinet/restore.js +186 -0
  84. package/dist/commands/cabinet/restore.js.map +1 -0
  85. package/dist/commands/cluster/agent/configure.d.ts +47 -0
  86. package/dist/commands/cluster/agent/configure.js +320 -0
  87. package/dist/commands/cluster/agent/configure.js.map +1 -0
  88. package/dist/commands/cluster/agent/install.d.ts +32 -0
  89. package/dist/commands/cluster/agent/install.js +152 -0
  90. package/dist/commands/cluster/agent/install.js.map +1 -0
  91. package/dist/commands/cluster/agent/uninstall.d.ts +29 -0
  92. package/dist/commands/cluster/agent/uninstall.js +130 -0
  93. package/dist/commands/cluster/agent/uninstall.js.map +1 -0
  94. package/dist/commands/cluster/bootstrap.d.ts +50 -0
  95. package/dist/commands/cluster/bootstrap.js +310 -0
  96. package/dist/commands/cluster/bootstrap.js.map +1 -0
  97. package/dist/commands/cluster/connect.d.ts +0 -5
  98. package/dist/commands/cluster/connect.js +1 -26
  99. package/dist/commands/cluster/connect.js.map +1 -1
  100. package/dist/commands/cluster/install.d.ts +45 -0
  101. package/dist/commands/cluster/install.js +224 -0
  102. package/dist/commands/cluster/install.js.map +1 -0
  103. package/dist/commands/cluster/stack/capture.js +0 -2
  104. package/dist/commands/cluster/stack/capture.js.map +1 -1
  105. package/dist/commands/cluster/stack/install.d.ts +40 -0
  106. package/dist/commands/cluster/stack/install.js +196 -0
  107. package/dist/commands/cluster/stack/install.js.map +1 -0
  108. package/dist/commands/cluster/start.d.ts +0 -5
  109. package/dist/commands/cluster/start.js +1 -27
  110. package/dist/commands/cluster/start.js.map +1 -1
  111. package/dist/commands/cluster/stop.d.ts +0 -5
  112. package/dist/commands/cluster/stop.js +1 -27
  113. package/dist/commands/cluster/stop.js.map +1 -1
  114. package/dist/commands/config/add.d.ts +9 -11
  115. package/dist/commands/config/add.js +59 -125
  116. package/dist/commands/config/add.js.map +1 -1
  117. package/dist/commands/config/delete.d.ts +22 -11
  118. package/dist/commands/config/delete.js +28 -83
  119. package/dist/commands/config/delete.js.map +1 -1
  120. package/dist/commands/config/deploy.d.ts +26 -8
  121. package/dist/commands/config/deploy.js +169 -198
  122. package/dist/commands/config/deploy.js.map +1 -1
  123. package/dist/commands/config/import.d.ts +27 -22
  124. package/dist/commands/config/import.js +222 -253
  125. package/dist/commands/config/import.js.map +1 -1
  126. package/dist/commands/config/settings/get.d.ts +25 -14
  127. package/dist/commands/config/settings/get.js +30 -123
  128. package/dist/commands/config/settings/get.js.map +1 -1
  129. package/dist/commands/config/view.d.ts +26 -6
  130. package/dist/commands/config/view.js +112 -95
  131. package/dist/commands/config/view.js.map +1 -1
  132. package/dist/commands/csp/logout.d.ts +23 -6
  133. package/dist/commands/csp/logout.js +86 -63
  134. package/dist/commands/csp/logout.js.map +1 -1
  135. package/dist/commands/deploy.d.ts +31 -14
  136. package/dist/commands/deploy.js +264 -385
  137. package/dist/commands/deploy.js.map +1 -1
  138. package/dist/commands/enterprise/list.d.ts +22 -4
  139. package/dist/commands/enterprise/list.js +97 -67
  140. package/dist/commands/enterprise/list.js.map +1 -1
  141. package/dist/commands/env/add.d.ts +26 -7
  142. package/dist/commands/env/add.js +182 -179
  143. package/dist/commands/env/add.js.map +1 -1
  144. package/dist/commands/environment/cluster/attach.d.ts +1 -0
  145. package/dist/commands/environment/cluster/attach.js +5 -1
  146. package/dist/commands/environment/cluster/attach.js.map +1 -1
  147. package/dist/commands/environment/cluster/detach.d.ts +1 -0
  148. package/dist/commands/environment/cluster/detach.js +5 -1
  149. package/dist/commands/environment/cluster/detach.js.map +1 -1
  150. package/dist/commands/environment/create.d.ts +1 -0
  151. package/dist/commands/environment/create.js +5 -1
  152. package/dist/commands/environment/create.js.map +1 -1
  153. package/dist/commands/environment/delete.d.ts +39 -0
  154. package/dist/commands/environment/delete.js +135 -0
  155. package/dist/commands/environment/delete.js.map +1 -0
  156. package/dist/commands/environment/list.d.ts +28 -9
  157. package/dist/commands/environment/list.js +128 -167
  158. package/dist/commands/environment/list.js.map +1 -1
  159. package/dist/commands/host/map.d.ts +29 -19
  160. package/dist/commands/host/map.js +263 -324
  161. package/dist/commands/host/map.js.map +1 -1
  162. package/dist/commands/imageRegistry/capture.d.ts +12 -11
  163. package/dist/commands/imageRegistry/capture.js +49 -113
  164. package/dist/commands/imageRegistry/capture.js.map +1 -1
  165. package/dist/commands/imageRegistry/forget.d.ts +12 -11
  166. package/dist/commands/imageRegistry/forget.js +53 -114
  167. package/dist/commands/imageRegistry/forget.js.map +1 -1
  168. package/dist/commands/imageRegistry/pullSecret/set.d.ts +21 -11
  169. package/dist/commands/imageRegistry/pullSecret/set.js +184 -278
  170. package/dist/commands/imageRegistry/pullSecret/set.js.map +1 -1
  171. package/dist/commands/imageRegistry/pullSecret/unset.d.ts +19 -11
  172. package/dist/commands/imageRegistry/pullSecret/unset.js +117 -190
  173. package/dist/commands/imageRegistry/pullSecret/unset.js.map +1 -1
  174. package/dist/commands/images/add.d.ts +19 -6
  175. package/dist/commands/images/add.js +63 -53
  176. package/dist/commands/images/add.js.map +1 -1
  177. package/dist/commands/kit/create.d.ts +22 -10
  178. package/dist/commands/kit/create.js +119 -121
  179. package/dist/commands/kit/create.js.map +1 -1
  180. package/dist/commands/logout.d.ts +21 -5
  181. package/dist/commands/logout.js +44 -25
  182. package/dist/commands/logout.js.map +1 -1
  183. package/dist/commands/noc/cluster/create.js +22 -10
  184. package/dist/commands/noc/cluster/create.js.map +1 -1
  185. package/dist/commands/noc/cluster/credentials-set.d.ts +38 -0
  186. package/dist/commands/noc/cluster/credentials-set.js +174 -0
  187. package/dist/commands/noc/cluster/credentials-set.js.map +1 -0
  188. package/dist/commands/noc/cluster/define.d.ts +46 -0
  189. package/dist/commands/noc/cluster/define.js +305 -0
  190. package/dist/commands/noc/cluster/define.js.map +1 -0
  191. package/dist/commands/noc/cluster/deinit.d.ts +22 -5
  192. package/dist/commands/noc/cluster/deinit.js +99 -106
  193. package/dist/commands/noc/cluster/deinit.js.map +1 -1
  194. package/dist/commands/noc/cluster/forget.js +2 -4
  195. package/dist/commands/noc/cluster/forget.js.map +1 -1
  196. package/dist/commands/noc/cluster/grant.d.ts +20 -11
  197. package/dist/commands/noc/cluster/grant.js +94 -132
  198. package/dist/commands/noc/cluster/grant.js.map +1 -1
  199. package/dist/commands/noc/cluster/init.d.ts +25 -7
  200. package/dist/commands/noc/cluster/init.js +121 -133
  201. package/dist/commands/noc/cluster/init.js.map +1 -1
  202. package/dist/commands/noc/cluster/journal.d.ts +0 -5
  203. package/dist/commands/noc/cluster/journal.js +1 -26
  204. package/dist/commands/noc/cluster/journal.js.map +1 -1
  205. package/dist/commands/noc/cluster/list.d.ts +23 -5
  206. package/dist/commands/noc/cluster/list.js +107 -111
  207. package/dist/commands/noc/cluster/list.js.map +1 -1
  208. package/dist/commands/noc/cluster/restore.d.ts +36 -0
  209. package/dist/commands/noc/cluster/restore.js +196 -0
  210. package/dist/commands/noc/cluster/restore.js.map +1 -0
  211. package/dist/commands/portal.d.ts +21 -5
  212. package/dist/commands/portal.js +37 -36
  213. package/dist/commands/portal.js.map +1 -1
  214. package/dist/commands/secretStore/capture.d.ts +13 -11
  215. package/dist/commands/secretStore/capture.js +63 -123
  216. package/dist/commands/secretStore/capture.js.map +1 -1
  217. package/dist/commands/secretStore/forget.d.ts +13 -11
  218. package/dist/commands/secretStore/forget.js +55 -111
  219. package/dist/commands/secretStore/forget.js.map +1 -1
  220. package/dist/commands/shell/init.d.ts +15 -0
  221. package/dist/commands/shell/init.js +96 -0
  222. package/dist/commands/shell/init.js.map +1 -0
  223. package/dist/commands/snapshot/deploy.d.ts +22 -42
  224. package/dist/commands/snapshot/deploy.js +173 -269
  225. package/dist/commands/snapshot/deploy.js.map +1 -1
  226. package/dist/commands/snapshot/list.d.ts +26 -5
  227. package/dist/commands/snapshot/list.js +116 -109
  228. package/dist/commands/snapshot/list.js.map +1 -1
  229. package/dist/commands/tenant/create.d.ts +18 -13
  230. package/dist/commands/tenant/create.js +69 -69
  231. package/dist/commands/tenant/create.js.map +1 -1
  232. package/dist/commands/tenant/switch.d.ts +18 -12
  233. package/dist/commands/tenant/switch.js +65 -59
  234. package/dist/commands/tenant/switch.js.map +1 -1
  235. package/dist/commands/whereami.d.ts +18 -8
  236. package/dist/commands/whereami.js +67 -102
  237. package/dist/commands/whereami.js.map +1 -1
  238. package/dist/commands/whoami.d.ts +19 -3
  239. package/dist/commands/whoami.js +44 -13
  240. package/dist/commands/whoami.js.map +1 -1
  241. package/dist/ops/i-user-input-provider.d.ts +20 -1
  242. package/dist/ops/i-user-input-provider.js.map +1 -1
  243. package/dist/ops/test/mock-ui.d.ts +2 -1
  244. package/dist/ops/test/mock-ui.js +3 -0
  245. package/dist/ops/test/mock-ui.js.map +1 -1
  246. package/dist/ops/throwing-user-input-provider.d.ts +2 -1
  247. package/dist/ops/throwing-user-input-provider.js +3 -0
  248. package/dist/ops/throwing-user-input-provider.js.map +1 -1
  249. package/dist/relay/relay-container.js +1 -1
  250. package/dist/sdk-adapters/other/other-cluster-configurator.d.ts +24 -0
  251. package/dist/sdk-adapters/other/other-cluster-configurator.js +80 -0
  252. package/dist/sdk-adapters/other/other-cluster-configurator.js.map +1 -0
  253. package/dist/sdk-adapters/other/other-login-configurator.d.ts +24 -0
  254. package/dist/sdk-adapters/other/other-login-configurator.js +68 -0
  255. package/dist/sdk-adapters/other/other-login-configurator.js.map +1 -0
  256. package/dist/uilogic/cloud-resource-configurator-factory.js +12 -0
  257. package/dist/uilogic/cloud-resource-configurator-factory.js.map +1 -1
  258. package/dist/uilogic/lrp-watcher-predef.d.ts +2 -1
  259. package/dist/uilogic/lrp-watcher-predef.js +31 -17
  260. package/dist/uilogic/lrp-watcher-predef.js.map +1 -1
  261. package/dist/uilogic/lrp-watcher-utils.d.ts +2 -0
  262. package/dist/uilogic/lrp-watcher-utils.js +2 -0
  263. package/dist/uilogic/lrp-watcher-utils.js.map +1 -1
  264. package/dist/uilogic/rootmap-ui-utils.d.ts +18 -1
  265. package/dist/uilogic/rootmap-ui-utils.js +30 -0
  266. package/dist/uilogic/rootmap-ui-utils.js.map +1 -1
  267. package/dist/uilogic/tenant-contextualizer.js +11 -1
  268. package/dist/uilogic/tenant-contextualizer.js.map +1 -1
  269. package/dist/user-context-loader.d.ts +12 -7
  270. package/dist/user-context-loader.js +89 -43
  271. package/dist/user-context-loader.js.map +1 -1
  272. package/oclif.manifest.json +3984 -1453
  273. package/package.json +2 -2
  274. package/dist/commands/noc/cluster/recreate.d.ts +0 -28
  275. package/dist/commands/noc/cluster/recreate.js +0 -197
  276. package/dist/commands/noc/cluster/recreate.js.map +0 -1
@@ -3,59 +3,65 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const core_1 = require("@oclif/core");
5
5
  const image_configurator_1 = require("../../uilogic/image-configurator");
6
- const command_base_enterprise_1 = require("../../command-base-enterprise");
6
+ const command_base_exec_tenant_1 = require("../../command-base-exec-tenant");
7
7
  const prettify_1 = require("../../prettify");
8
8
  const codiac_ops_common_1 = require("@codiac.io/codiac-ops-common");
9
- class ImagesAdd extends command_base_enterprise_1.CommandBaseEnterprise {
9
+ const config_ui_utils_1 = require("../../uilogic/config-ui-utils");
10
+ class ImagesAdd extends command_base_exec_tenant_1.CommandBaseExecTenant {
10
11
  bootstrap() {
11
12
  if (ImagesAdd.isBootstrapped !== true) {
12
- this.requiresProjectScope = true; // <--- This command requires project scope.
13
+ this.requiresProjectScope = true;
13
14
  super.bootstrap();
14
15
  }
15
16
  }
16
- run() {
17
+ captureArgs() {
18
+ var _a, _b;
19
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ const { flags } = yield this.parse(ImagesAdd);
21
+ if (this._projectRoot === undefined || this._projCfg === undefined || this._projUserCfg === undefined) {
22
+ throw new Error(`Cannot perform image operations outside of a codiac project: Please run the "init" command from this folder to declare it as a project root.`);
23
+ }
24
+ const interactionMode = (this.pipedInput) ? config_ui_utils_1.InteractionModes.silent : (_b = (_a = undefined !== null && undefined !== void 0 ? undefined : (flags.echo ? config_ui_utils_1.InteractionModes.echo : undefined)) !== null && _a !== void 0 ? _a : (flags["to-script"] ? config_ui_utils_1.InteractionModes.toscript : undefined)) !== null && _b !== void 0 ? _b : (flags.silent ? config_ui_utils_1.InteractionModes.silent : undefined);
25
+ return [{}, interactionMode, false];
26
+ });
27
+ }
28
+ buildCandidate_silently(_partial, _rootMap) {
29
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
30
+ throw new Error(`This command requires interactive mode. Re-run without --silent.`);
31
+ });
32
+ }
33
+ buildCandidate_interactively(_partial, _takeDefaults, _rootMap) {
17
34
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
18
- this.bootstrap();
19
35
  const { args, flags } = yield this.parse(ImagesAdd);
20
- try {
21
- // let target = new RegistryTarget(flags.environment||ImageExport.DEFAULT_ENVIRONMENT_NAME,
22
- // flags.registryUrl || ImagesAdd.DEFAULT_REGISTRY_URL, flags.username, flags.password, flags.infoUrl);
23
- // This command requires project scope.
24
- if (this._projectRoot === undefined || this._projCfg === undefined || this._projUserCfg === undefined) {
25
- throw new Error(`Cannot perform image operations outside of a codiac project: Please run the "init" command from this folder to declare it aas a project root.`);
26
- }
27
- // For now we are just forcing DockerCreds store
28
- let credsStore = this.ioc.getNamed(codiac_ops_common_1.INTERFACES_OPS.ICredentialsStore, codiac_ops_common_1.CredentialsStoreType.DockerDesktop);
29
- let cfg8r = new image_configurator_1.ImageConfigurator(this._projCfg.tenantCode, this._codiacApi, this.genRelayClient, this._projCfg, this._projUserCfg, this._ui, this._styler, this._projectRoot, this.logger, credsStore, this._userCntx);
30
- let img;
31
- let imageName = args.imageName;
32
- let sourceFile = flags.sourceFile;
33
- let port = flags.port;
34
- let buildParams = flags.buildParams;
35
- let confirmed = false;
36
- while (!confirmed) {
37
- img = yield cfg8r.createImage(imageName, sourceFile, port, buildParams); // TODO: honor any input provided via flags
38
- console.clear();
39
- let msg = (0, prettify_1.prettify)(img);
40
- this._ui.userMessage(msg);
41
- this._ui.userMessage(`You are about to create ${img.name}. Continue?`);
42
- confirmed = yield this._ui.promptConfirm("confirmCreate", `(hit 'N' to edit your input)`, false);
43
- }
44
- let result = yield this._ops.declareImageExport(this._projCfg, img.name, img.targets[0], img.definitionFile, img.port, img.buildParams);
45
- if (result.image) {
46
- this._ui.userMessage(JSON.stringify(result.image));
47
- this._ui.userMessage(`Completed ${result.operation} of image export "${result.image.name}".`);
48
- }
49
- else {
50
- this._ui.userMessage(`Image export declaration cancelled.`);
51
- }
36
+ const credsStore = this.ioc.getNamed(codiac_ops_common_1.INTERFACES_OPS.ICredentialsStore, codiac_ops_common_1.CredentialsStoreType.DockerDesktop);
37
+ const cfg8r = new image_configurator_1.ImageConfigurator(this._projCfg.tenantCode, this._codiacApi, this.genRelayClient, this._projCfg, this._projUserCfg, this._ui, this._styler, this._projectRoot, this.logger, credsStore, this._userCntx);
38
+ let img;
39
+ let confirmed = false;
40
+ while (!confirmed) {
41
+ img = yield cfg8r.createImage(args.imageName, flags.sourceFile, flags.port, flags.buildParams);
42
+ console.clear();
43
+ this._ui.userMessage((0, prettify_1.prettify)(img));
44
+ this._ui.userMessage(`You are about to create ${img.name}. Continue?`);
45
+ confirmed = yield this._ui.promptConfirm("confirmCreate", `(hit 'N' to edit your input)`, false);
52
46
  }
53
- catch (err) {
54
- this.handleError(err);
47
+ return { img: img };
48
+ });
49
+ }
50
+ buildCommandString(candidate, cmd) {
51
+ cmd.push(candidate.img.name);
52
+ cmd.push("--silent");
53
+ return cmd;
54
+ }
55
+ executeTask(candidate) {
56
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
+ const { img } = candidate;
58
+ const result = yield this._ops.declareImageExport(this._projCfg, img.name, img.targets[0], img.definitionFile, img.port, img.buildParams);
59
+ if (result.image) {
60
+ this._ui.userMessage(JSON.stringify(result.image));
61
+ this._ui.userMessage(`Completed ${result.operation} of image export "${result.image.name}".`);
55
62
  }
56
- finally {
57
- yield this.closeConnections();
58
- return;
63
+ else {
64
+ this._ui.userMessage(`Image export declaration cancelled.`);
59
65
  }
60
66
  });
61
67
  }
@@ -63,23 +69,27 @@ class ImagesAdd extends command_base_enterprise_1.CommandBaseEnterprise {
63
69
  exports.default = ImagesAdd;
64
70
  ImagesAdd.description = 'Configures a container image to be built and published by the project.';
65
71
  ImagesAdd.aliases = ["image", "image:add", "img", "img:add"];
66
- /** Registry defaults to Docker Hub */
67
72
  ImagesAdd.DEFAULT_REGISTRY_URL = "https://index.docker.io/v1";
68
- ImagesAdd.dependsOn = ["registryUrl", "port", "sourceFile", "username", "name"];
69
73
  ImagesAdd.flags = {
70
74
  help: core_1.Flags.help({ char: 'h' }),
71
75
  port: core_1.Flags.integer({ char: 'p', required: false, description: 'Recommended port number to assign, in the toybox template, to an Asset defined by this image.' }),
72
- sourceFile: core_1.Flags.string({ char: 'f', required: false, description: 'Path and filename of the image definition file, relative to the project root, (eg: "./Dockerfile"). If omitted, the build will use an in-memory image definition auto-generated at build time.' }),
73
- // overwrite: Flags.custom({char: 'w', exclusive: ["readonly"], options: [PersistenceStrategy.never, PersistenceStrategy.always, PersistenceStrategy.asneeded], description: '(Optional, defaults to "never") Declares when the image build shall automatically create or overwrite the physical definitionFile with auto-generated content. Only applicable when definitionFile is set.'}),
74
- registryUrl: core_1.Flags.string({ required: false, default: ImagesAdd.DEFAULT_REGISTRY_URL, char: 'r', description: '(Optional, defaults to Docker Hub) Address of the container registry to which the image will be published (without protocol prefix), eg: "yourimages.azurecr.io". NOTE: This registry will be used by the "publish" command, whereas when running in "local" mode, images will instead be registered to the built-in image registry on the local machine. NOTE: This url shall define the default publishing target, for use when publishing for any environment, unless otherwise specified.' }),
76
+ sourceFile: core_1.Flags.string({ char: 'f', required: false, description: 'Path and filename of the image definition file, relative to the project root (eg: "./Dockerfile"). If omitted, the build will use an in-memory image definition auto-generated at build time.' }),
77
+ registryUrl: core_1.Flags.string({ required: false, default: ImagesAdd.DEFAULT_REGISTRY_URL, char: 'r', description: '(Optional, defaults to Docker Hub) Address of the container registry to which the image will be published (without protocol prefix), eg: "yourimages.azurecr.io".' }),
75
78
  infoUrl: core_1.Flags.string({ required: false, char: 'i', description: '(Optional) Address on the registry website or portal of the human-readable web page for the image.' }),
76
- environment: core_1.Flags.string({ char: 'e', required: false, description: '(optional) Declaration that this registry shall be the target when publishing to the given environment.' }),
77
- username: core_1.Flags.string({ char: 'u', required: false, description: '(optional) Login credential for the given registry. WARNING!! these username/password credentials will be stored in the codiac config file in this project, and therefore configuring username and password in this manner is not recommended!' }),
78
- password: core_1.Flags.string({ char: 's', required: false, description: '(optional) Password credential for the given registry. WARNING!! these username/password credentials will be stored in the codiac config file in this project, and therefore configuring username and password in this manner is not recommended!' }),
79
- silent: core_1.Flags.boolean({ char: 'y', dependsOn: ImagesAdd.dependsOn, required: false, description: `(Optional: defaults to false) Prevents confirmations of user-values that are remembered from prior runs. Requires: ${ImagesAdd.dependsOn}` }),
80
- buildParams: core_1.Flags.string({ char: 'b', required: false, multiple: true, description: 'Additional freeform arguments to apply to the Docker build command (as: arg=val, eg: -b "--size=12" -b "--color=blue").' })
79
+ environment: core_1.Flags.string({ char: 'e', required: false, description: '(Optional) Declaration that this registry shall be the target when publishing to the given environment.' }),
80
+ username: core_1.Flags.string({ char: 'u', required: false, description: '(Optional) Login credential for the given registry. WARNING: these credentials will be stored in the codiac config file in this project.' }),
81
+ password: core_1.Flags.string({ char: 's', required: false, description: '(Optional) Password credential for the given registry. WARNING: these credentials will be stored in the codiac config file in this project.' }),
82
+ buildParams: core_1.Flags.string({ char: 'b', required: false, multiple: true, description: 'Additional freeform arguments to apply to the Docker build command (as: arg=val, eg: -b "--size=12" -b "--color=blue").' }),
83
+ silent: core_1.Flags.boolean({ exclusive: ["echo", "to-script"], description: 'Executes without any user interaction; fails on missing or invalid arguments.' }),
84
+ echo: core_1.Flags.boolean({ exclusive: ["to-script", "silent"], description: 'Renders the equivalent non-interactive command for future use before executing.' }),
85
+ "to-script": core_1.Flags.boolean({ exclusive: ["echo", "silent"], description: 'Renders the equivalent non-interactive command without executing it.' }),
81
86
  };
82
87
  ImagesAdd.args = {
83
- imageName: core_1.Args.string({ required: false, description: 'image name including, scope prefix. eg: "your-company/your-image"' })
88
+ imageName: core_1.Args.string({ required: false, description: 'Image name including scope prefix, eg: "your-company/your-image".' })
84
89
  };
90
+ ImagesAdd.examples = [
91
+ { description: "Configure an image interactively.", command: "<%= config.bin %> <%= command.id %>" },
92
+ { description: "Configure a named image.", command: "<%= config.bin %> <%= command.id %> your-company/your-image" },
93
+ { description: "Renders the equivalent silent command without executing.", command: "<%= config.bin %> <%= command.id %> your-company/your-image --to-script" },
94
+ ];
85
95
  //# sourceMappingURL=add.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../../src/commands/images/add.ts"],"names":[],"mappings":";;;AAAA,sCAA0C;AAG1C,yEAAqE;AAErE,2EAAsE;AACtE,6CAA0C;AAC1C,oEAAuG;AAEvG,MAAqB,SAAU,SAAQ,+CAAqB;IA2B9C,SAAS;QACf,IA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EAAE,OAAO,EAAE,yEAAyE,EAAE;CAChK,CAAC"}
@@ -1,13 +1,19 @@
1
- import { Asset } from '../../apis/codiac-api/contracts';
2
- import { CommandBaseEnterprise } from '../../command-base-enterprise';
1
+ import { Command } from '@oclif/core';
2
+ import { Kit, RootMap } from '../../apis/codiac-api/contracts';
3
+ import { CommandBaseExec, IEnterpriseEntity } from '../../command-base-exec';
4
+ import { AtLeast } from '@codiac.io/codiac-common/contracts';
5
+ import { InteractionModes } from '../../uilogic/config-ui-utils';
3
6
  /** The value provided as input that indicates
4
7
  * a user's desire to be prompted with a list from which choose the value(s),
5
8
  * instead of entering them manually or taking a default. */
6
9
  export declare const PROMPT_ME_DESIGNATOR = "?";
7
- export default class KitCreate extends CommandBaseEnterprise {
10
+ type KitCreateRequest = IEnterpriseEntity & {
11
+ enterprise: string;
12
+ kit: Kit;
13
+ };
14
+ export default class KitCreate extends CommandBaseExec<KitCreateRequest> {
8
15
  static description: string;
9
16
  static aliases: never[];
10
- static dependsOn: string[];
11
17
  static flags: {
12
18
  help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
13
19
  asset: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
@@ -15,11 +21,17 @@ export default class KitCreate extends CommandBaseEnterprise {
15
21
  name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
22
  scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
23
  silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
24
+ echo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
25
+ "to-script": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
26
  };
19
- static args: {
20
- setting: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
21
- };
22
- run(): Promise<void>;
23
- promptForAsset(enterprise: string, assetSearch?: string): Promise<Asset>;
24
- private createKit;
27
+ static args: {};
28
+ static examples: Command.Example[];
29
+ captureArgs(): Promise<[Partial<KitCreateRequest>, InteractionModes | undefined, boolean]>;
30
+ buildCandidate_silently(partial: AtLeast<KitCreateRequest, "enterprise">, rootMap: RootMap): Promise<KitCreateRequest | undefined>;
31
+ buildCandidate_interactively(partial: AtLeast<KitCreateRequest, "enterprise">, rootMap: RootMap, takeDefaults: boolean): Promise<KitCreateRequest | undefined>;
32
+ buildCommandString(candidate: KitCreateRequest, cmd: string[]): string[];
33
+ executeTask(candidate: KitCreateRequest): Promise<void>;
34
+ private fetchAsset;
35
+ private promptForAsset;
25
36
  }
37
+ export {};
@@ -3,147 +3,145 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROMPT_ME_DESIGNATOR = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const core_1 = require("@oclif/core");
6
- // import inquirer = require('inquirer');
7
- const inquirer = require("inquirer");
8
- const _ = require("lodash");
9
- // import { Asset, EnterpriseCriteria, Kit, KitAccessibilityEnum } from '@codiac.io/codiac-domain';
10
6
  const contracts_1 = require("../../apis/codiac-api/contracts");
11
- const command_base_enterprise_1 = require("../../command-base-enterprise");
7
+ const command_base_exec_1 = require("../../command-base-exec");
12
8
  const prettify_1 = require("../../prettify");
9
+ const config_ui_utils_1 = require("../../uilogic/config-ui-utils");
13
10
  /** The value provided as input that indicates
14
11
  * a user's desire to be prompted with a list from which choose the value(s),
15
12
  * instead of entering them manually or taking a default. */
16
13
  exports.PROMPT_ME_DESIGNATOR = "?";
17
- class KitCreate extends command_base_enterprise_1.CommandBaseEnterprise {
18
- run() {
14
+ class KitCreate extends command_base_exec_1.CommandBaseExec {
15
+ captureArgs() {
16
+ var _a, _b;
19
17
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
- return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
21
- try {
22
- this.bootstrap();
23
- const { args, flags } = yield this.parse(KitCreate);
24
- this._userCntx = yield this.establishTenantContext(this._userCntx);
25
- let rootMap = yield this.getRootMap();
26
- const interactionMode = this.getInteractionMode(flags.silent, flags.echo, flags['to-script']);
27
- let currentEnterprise = (yield this.establishEnterpriseContext(rootMap, flags.enterprise, interactionMode)).enterprise;
28
- _.remove(rootMap.enterprises, e => e.name != currentEnterprise.name); // trim down to match legacy conditions
29
- let enterpriseCode = currentEnterprise.name;
30
- // 1) Get the asset record
31
- let asset;
32
- if (!flags.asset || flags.asset == exports.PROMPT_ME_DESIGNATOR) {
33
- asset = yield this.promptForAsset(enterpriseCode);
34
- }
35
- else /* if (flags.asset) */ {
36
- asset = yield this.promptForAsset(enterpriseCode, flags.asset);
37
- }
38
- // 2) Generate the kit
39
- // let kitRes: SingleResult<Kit> = await this.genRelayClient.Call.getGenerateAssetFromKit({ kitName: asset.name, targetEnterprise: asset.enterprise });
40
- let kitRes = yield this.genRelayClient.Call.getGenerateKit({ assetName: asset.name, enterprise: asset.enterprise });
41
- if (kitRes.success && kitRes.output) {
42
- let candidate = kitRes.output;
43
- // Loop thru the kit properties and allow the user to override.
44
- let confirmed = false;
45
- while (!confirmed) {
46
- console.clear();
47
- this._ui.userMessage(this._styler.bold("New Kit:"));
48
- candidate.name = (yield this._ui.prompt("name", "Name: ", true, candidate.name));
49
- candidate.library = (yield this._ui.prompt("library", "Library: ", true, candidate.library));
50
- candidate.description = (yield this._ui.prompt("description", "Description: ", true, candidate.description));
51
- let choices = [contracts_1.KitAccessibilityEnum.private, contracts_1.KitAccessibilityEnum.friends, contracts_1.KitAccessibilityEnum.public];
52
- candidate.accessibleBy = (yield this._ui.promptSelect("accessibleBy", "AccessibleBy: ", choices, false));
53
- console.clear();
54
- let msg = (0, prettify_1.prettify)(candidate);
55
- this._ui.userMessage(msg);
56
- this._ui.userMessage(`You are about to create this kit. Continue?`);
57
- confirmed = yield this._ui.promptConfirm("confirmCreate", `(hit 'N' to edit your input)`, false);
58
- if (confirmed == true) {
59
- yield this.createKit(candidate);
60
- }
61
- else {
62
- this.logger.notice(`Operation cancelled. No work was done.`);
63
- this._ui.userMessage(`Operation cancelled. No work was done.`);
64
- }
65
- }
66
- }
67
- else if (kitRes.error) {
68
- throw kitRes.error;
69
- }
70
- }
71
- catch (err) {
72
- this.handleError(err);
73
- }
74
- finally {
75
- yield this.closeConnections();
76
- resolve();
77
- }
78
- }));
18
+ const { flags } = yield this.parse(KitCreate);
19
+ let partial = {};
20
+ if (flags.enterprise)
21
+ partial.enterprise = flags.enterprise;
22
+ const interactionMode = (this.pipedInput) ? config_ui_utils_1.InteractionModes.silent : (_b = (_a = undefined !== null && undefined !== void 0 ? undefined : (flags.echo ? config_ui_utils_1.InteractionModes.echo : undefined)) !== null && _a !== void 0 ? _a : (flags["to-script"] ? config_ui_utils_1.InteractionModes.toscript : undefined)) !== null && _b !== void 0 ? _b : (flags.silent ? config_ui_utils_1.InteractionModes.silent : undefined);
23
+ return [partial, interactionMode, false];
79
24
  });
80
25
  }
81
- promptForAsset(enterprise, assetSearch) {
82
- return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
83
- try {
84
- // let ecrit = new EnterpriseCriteria();
85
- // ecrit.code = new StringFilter();
86
- // ecrit.code.$eq = enterprise;
87
- let ecrit = { code: enterprise };
88
- let readResult = yield this._codiacApi.Enterprise.tryReadMany(ecrit /* { code: { $eq: enterprise } } */);
89
- if (!readResult.output || readResult.output.length == 0) {
90
- throw new Error(`Could not find enterprise [${enterprise}].`);
91
- }
92
- else if (!readResult.output[0].assets || readResult.output[0].assets.length == 0) {
93
- throw new Error(`The current enterprise [${enterprise}] has no assets defined.`);
94
- }
95
- // console.log(`${readResult.output[0].assets.length} assets found`)
96
- // Select from assets in the current enterprise
97
- let assets = readResult.output[0].assets;
98
- if (assetSearch && assetSearch != exports.PROMPT_ME_DESIGNATOR) {
99
- assets = assets.filter(a => a.name.startsWith(assetSearch));
100
- }
101
- // console.log(`${assets.length} assets found`)
102
- let assSelect = yield inquirer.prompt({ type: 'list', name: 'asset', message: 'Select an Asset:', choices: assets.map(a => a.name).sort() });
103
- let selected = assets.find(a => a.name == assSelect.asset);
104
- if (!selected)
105
- throw new Error(`User failed to select a valid asset to deploy.`);
106
- resolve(selected);
26
+ buildCandidate_silently(partial, rootMap) {
27
+ var _a;
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ const { flags } = yield this.parse(KitCreate);
30
+ if (!flags.asset)
31
+ throw new Error("Asset name (--asset or -a) is required in silent mode.");
32
+ const asset = yield this.fetchAsset(partial.enterprise, flags.asset);
33
+ const kitRes = yield this.genRelayClient.Call.getGenerateKit({ assetName: asset.name, enterprise: asset.enterprise });
34
+ if (!kitRes.success || !kitRes.output)
35
+ throw (_a = kitRes.error) !== null && _a !== void 0 ? _a : new Error(`Failed to generate kit template for asset "${asset.name}".`);
36
+ const kit = kitRes.output;
37
+ if (flags.name)
38
+ kit.name = flags.name;
39
+ if (flags.scope)
40
+ kit.library = flags.scope;
41
+ return { enterprise: partial.enterprise, kit };
42
+ });
43
+ }
44
+ buildCandidate_interactively(partial, rootMap, takeDefaults) {
45
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ const { flags } = yield this.parse(KitCreate);
47
+ const asset = yield this.promptForAsset(partial.enterprise, flags.asset);
48
+ const kitRes = yield this.genRelayClient.Call.getGenerateKit({ assetName: asset.name, enterprise: asset.enterprise });
49
+ if (!kitRes.success || !kitRes.output) {
50
+ if (kitRes.error)
51
+ throw kitRes.error;
52
+ return undefined;
107
53
  }
108
- catch (err) {
109
- reject(err);
54
+ let candidate = kitRes.output;
55
+ // Multi-round edit loop
56
+ let confirmed = false;
57
+ while (!confirmed) {
58
+ console.clear();
59
+ this._ui.userMessage(this._styler.bold("New Kit:"));
60
+ candidate.name = (yield this._ui.prompt("name", "Name: ", true, candidate.name));
61
+ candidate.library = (yield this._ui.prompt("library", "Library: ", true, candidate.library));
62
+ candidate.description = (yield this._ui.prompt("description", "Description: ", true, candidate.description));
63
+ const accessChoices = [contracts_1.KitAccessibilityEnum.private, contracts_1.KitAccessibilityEnum.friends, contracts_1.KitAccessibilityEnum.public];
64
+ candidate.accessibleBy = (yield this._ui.promptSelect("accessibleBy", "AccessibleBy: ", accessChoices, false));
65
+ console.clear();
66
+ this._ui.userMessage((0, prettify_1.prettify)(candidate));
67
+ this._ui.userMessage(`You are about to create this kit. Continue?`);
68
+ confirmed = yield this._ui.promptConfirm("confirmCreate", `(hit 'N' to edit your input)`, false);
110
69
  }
111
- }));
70
+ return { enterprise: partial.enterprise, kit: candidate };
71
+ });
112
72
  }
113
- createKit(kit) {
114
- return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
115
- try {
116
- let result = yield this._codiacApi.Kit.tryCreate(kit);
117
- if (result.error)
118
- throw result.error;
119
- let kitFqn = `${kit.library}/${kit.name}`;
120
- if (!result.success || !result.output)
121
- throw new Error(`Failed without error creating kit [${kitFqn}]: ${result.message}.`);
122
- this.logger.notice(`${this._styler.colorGood("SUCCESS!")} Created new kit ${this._styler.bold(this._styler.hilite(kitFqn))}.`, result.output);
123
- this._ui.userMessage(`${this._styler.colorGood("SUCCESS!")} Created new kit ${this._styler.bold(this._styler.hilite(kitFqn))}.`);
124
- resolve();
125
- }
126
- catch (err) {
127
- this.logger.error(err, kit);
128
- resolve();
129
- // reject(err);
73
+ buildCommandString(candidate, cmd) {
74
+ cmd.push("-e", candidate.enterprise);
75
+ cmd.push("-a", candidate.kit.name);
76
+ cmd.push("--silent");
77
+ return cmd;
78
+ }
79
+ executeTask(candidate) {
80
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
81
+ const result = yield this._codiacApi.Kit.tryCreate(candidate.kit);
82
+ if (result.error)
83
+ throw result.error;
84
+ const kitFqn = `${candidate.kit.library}/${candidate.kit.name}`;
85
+ if (!result.success || !result.output)
86
+ throw new Error(`Failed without error creating kit [${kitFqn}]: ${result.message}.`);
87
+ this.logger.notice(`${this._styler.colorGood("SUCCESS!")} Created new kit ${this._styler.bold(this._styler.hilite(kitFqn))}.`, result.output);
88
+ this._ui.userMessage(`${this._styler.colorGood("SUCCESS!")} Created new kit ${this._styler.bold(this._styler.hilite(kitFqn))}.`);
89
+ });
90
+ }
91
+ fetchAsset(enterprise, assetName) {
92
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
+ const ecrit = { code: enterprise };
94
+ const readResult = yield this._codiacApi.Enterprise.tryReadMany(ecrit);
95
+ if (!readResult.output || readResult.output.length === 0)
96
+ throw new Error(`Could not find enterprise [${enterprise}].`);
97
+ if (!readResult.output[0].assets || readResult.output[0].assets.length === 0)
98
+ throw new Error(`The enterprise [${enterprise}] has no assets defined.`);
99
+ let assets = readResult.output[0].assets;
100
+ assets = assets.filter(a => a.name.startsWith(assetName));
101
+ if (assets.length === 0)
102
+ throw new Error(`No asset found with name starting with "${assetName}" in enterprise "${enterprise}".`);
103
+ return assets[0];
104
+ });
105
+ }
106
+ promptForAsset(enterprise, assetSearch) {
107
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
108
+ const ecrit = { code: enterprise };
109
+ const readResult = yield this._codiacApi.Enterprise.tryReadMany(ecrit);
110
+ if (!readResult.output || readResult.output.length === 0)
111
+ throw new Error(`Could not find enterprise [${enterprise}].`);
112
+ if (!readResult.output[0].assets || readResult.output[0].assets.length === 0)
113
+ throw new Error(`The enterprise [${enterprise}] has no assets defined.`);
114
+ let assets = readResult.output[0].assets;
115
+ if (assetSearch && assetSearch !== exports.PROMPT_ME_DESIGNATOR) {
116
+ assets = assets.filter(a => a.name.startsWith(assetSearch));
130
117
  }
131
- }));
118
+ const choices = assets.map(a => ({ name: a.name, value: a.name })).sort((a, b) => a.name.localeCompare(b.name));
119
+ const selectedName = yield this._ui.promptSelectFuzzy('asset', 'Select an Asset:', () => tslib_1.__awaiter(this, void 0, void 0, function* () { return choices; }));
120
+ const selected = assets.find(a => a.name === selectedName);
121
+ if (!selected)
122
+ throw new Error(`User failed to select a valid asset.`);
123
+ return selected;
124
+ });
132
125
  }
133
126
  }
134
127
  exports.default = KitCreate;
135
128
  KitCreate.description = 'Creates a new kit from an existing asset.';
136
129
  KitCreate.aliases = [];
137
- KitCreate.dependsOn = ["asset", "enterprise", "name", "scope"];
138
130
  KitCreate.flags = {
139
131
  help: core_1.Flags.help({ char: 'h' }),
140
132
  asset: core_1.Flags.string({ char: 'a', required: false, description: "The enterprise asset from which to create the kit." }),
141
- enterprise: core_1.Flags.string({ char: 'e', required: false, description: 'The name of the enterprise containing the given asset. (defaults to the current enterprise context)' }),
142
- name: core_1.Flags.string({ char: 'n', required: false, description: "Override for the name to give the new kit (Optional: defaults to the asset name)." }),
143
- scope: core_1.Flags.string({ char: 's', required: false, description: "The globally unique name for the directory in which to register the kit. This value prefixes the kit name to ensure global uniqueness (Optional: defaults to the public shared library)." }),
144
- silent: core_1.Flags.boolean({ char: 'y', dependsOn: KitCreate.dependsOn, required: false, description: `(Optional: defaults to false) Prevents confirmations of user-values that are remembered from prior runs. Requires: ${KitCreate.dependsOn}` })
145
- };
146
- KitCreate.args = {
147
- setting: core_1.Args.string({ description: 'The key for the config setting to add' })
133
+ enterprise: core_1.Flags.string({ char: 'e', required: false, description: 'The name of the enterprise containing the given asset (defaults to the current enterprise context).' }),
134
+ name: core_1.Flags.string({ char: 'n', required: false, description: "Override for the name to give the new kit (optional; defaults to the asset name)." }),
135
+ scope: core_1.Flags.string({ char: 's', required: false, description: "The globally unique directory name in which to register the kit, prefixed to the kit name for global uniqueness (optional; defaults to the public shared library)." }),
136
+ silent: core_1.Flags.boolean({ exclusive: ["echo", "to-script"], description: 'Executes without any user interaction; fails on missing or invalid arguments.' }),
137
+ echo: core_1.Flags.boolean({ exclusive: ["to-script", "silent"], description: 'Renders the equivalent non-interactive command for future use before executing.' }),
138
+ "to-script": core_1.Flags.boolean({ exclusive: ["echo", "silent"], description: 'Renders the equivalent non-interactive command without executing it.' }),
148
139
  };
140
+ KitCreate.args = {};
141
+ KitCreate.examples = [
142
+ { description: "Create a kit interactively.", command: "<%= config.bin %> <%= command.id %>" },
143
+ { description: "Create a kit from a specific asset.", command: "<%= config.bin %> <%= command.id %> -e myEnterprise -a myApi" },
144
+ { description: "Non-interactive (scripted) invocation.", command: "<%= config.bin %> <%= command.id %> -e myEnterprise -a myApi --silent" },
145
+ { description: "Renders the equivalent silent command without executing.", command: "<%= config.bin %> <%= command.id %> -e myEnterprise -a myApi --to-script" },
146
+ ];
149
147
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/kit/create.ts"],"names":[],"mappings":";;;;AAAA,sCAA0C;AAC1C,yCAAyC;AACzC,qCAAqC;AACrC,4BAA6B;AAC7B,mGAAmG;AACnG,+DAAuG;AACvG,2EAAsE;AACtE,6CAA0C;AAI1C;;4DAE4D;AAC/C,QAAA,oBAAoB,GAAG,GAAG,CAAC;AAGxC,MAAqB,SAAU,SAAQ,+CAAqB;IAoBlD,GAAG;;YAEL,OAAO,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC/C,IAAI;oBACA,IAAI,CAAC,SAAS,EAAE,CAAC;oBACjB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;oBAEpD,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;oBACnE,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;oBACtC,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;oBAC9F,IAAI,iBAAiB,GAAG,CAAC,MAAM,IAAI,CAAC,0BAA0B,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,EAAE,e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,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mFAAmF,EAAE,CAAC;IACpJ,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,oKAAoK,EAAE,CAAC;IAEtO,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,+EAA+E,EAAE,CAAC;IACzJ,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,iFAAiF,EAAE,CAAC;IAC3J,WAAW,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,sEAAsE,EAAE,CAAC;CACnJ,CAAC;AAEK,cAAI,GAAG,EAAE,CAAC;AAEV,kBAAQ,GAAsB;IACnC,EAAE,WAAW,EAAE,6BAA6B,EAAE,OAAO,EAAE,qCAAqC,EAAE;IAC9F,EAAE,WAAW,EAAE,qCAAqC,EAAE,OAAO,EAAE,8DAA8D,EAAE;IAC/H,EAAE,WAAW,EAAE,wCAAwC,EAAE,OAAO,EAAE,uEAAuE,EAAE;IAC3I,EAAE,WAAW,EAAE,0DAA0D,EAAE,OAAO,EAAE,0EAA0E,EAAE;CACjK,CAAC"}
@@ -1,8 +1,24 @@
1
- import { CommandBaseEnterprise } from '../command-base-enterprise';
2
- export default class Logout extends CommandBaseEnterprise {
1
+ import { Command } from '@oclif/core';
2
+ import { CommandBaseExecTenant } from '../command-base-exec-tenant';
3
+ import { RootMap } from '../apis/codiac-api/contracts';
4
+ import { InteractionModes } from '../uilogic/config-ui-utils';
5
+ type LogoutRequest = {
6
+ userName: string | undefined;
7
+ };
8
+ export default class Logout extends CommandBaseExecTenant<LogoutRequest> {
3
9
  static description: string;
4
- static examples: string[];
5
- static flags: {};
10
+ static flags: {
11
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
12
+ silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ echo: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ "to-script": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ };
6
16
  static args: {};
7
- run(): Promise<void>;
17
+ static examples: Command.Example[];
18
+ captureArgs(): Promise<[Partial<LogoutRequest>, InteractionModes | undefined, boolean]>;
19
+ buildCandidate_silently(_partial: Partial<LogoutRequest>, _rootMap: RootMap): Promise<LogoutRequest | undefined>;
20
+ buildCandidate_interactively(_partial: Partial<LogoutRequest>, _takeDefaults: boolean, _rootMap: RootMap): Promise<LogoutRequest | undefined>;
21
+ buildCommandString(_candidate: LogoutRequest, cmd: string[]): string[];
22
+ executeTask(candidate: LogoutRequest): Promise<void>;
8
23
  }
24
+ export {};