@codiac.io/codiac-cli 1.2.18

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 (786) hide show
  1. package/README.md +37 -0
  2. package/bin/dev +17 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +5 -0
  5. package/bin/run.cmd +3 -0
  6. package/codiac.json +10 -0
  7. package/lib/api-command-base.d.ts +0 -0
  8. package/lib/api-command-base.js +52 -0
  9. package/lib/api-command-base.js.map +1 -0
  10. package/lib/apis/codiac-api/common/api-client-base.d.ts +165 -0
  11. package/lib/apis/codiac-api/common/api-client-base.js +548 -0
  12. package/lib/apis/codiac-api/common/api-client-base.js.map +1 -0
  13. package/lib/apis/codiac-api/common/api-user-creds.d.ts +7 -0
  14. package/lib/apis/codiac-api/common/api-user-creds.js +19 -0
  15. package/lib/apis/codiac-api/common/api-user-creds.js.map +1 -0
  16. package/lib/apis/codiac-api/common/config-loader.d.ts +6 -0
  17. package/lib/apis/codiac-api/common/config-loader.js +19 -0
  18. package/lib/apis/codiac-api/common/config-loader.js.map +1 -0
  19. package/lib/apis/codiac-api/common/endpoint-spec.d.ts +17 -0
  20. package/lib/apis/codiac-api/common/endpoint-spec.js +28 -0
  21. package/lib/apis/codiac-api/common/endpoint-spec.js.map +1 -0
  22. package/lib/apis/codiac-api/common/security/api-auth-methods-legacy.d.ts +87 -0
  23. package/lib/apis/codiac-api/common/security/api-auth-methods-legacy.js +368 -0
  24. package/lib/apis/codiac-api/common/security/api-auth-methods-legacy.js.map +1 -0
  25. package/lib/apis/codiac-api/common/security/auth-constants.d.ts +15 -0
  26. package/lib/apis/codiac-api/common/security/auth-constants.js +22 -0
  27. package/lib/apis/codiac-api/common/security/auth-constants.js.map +1 -0
  28. package/lib/apis/codiac-api/common/security/i-auth-client.d.ts +44 -0
  29. package/lib/apis/codiac-api/common/security/i-auth-client.js +3 -0
  30. package/lib/apis/codiac-api/common/security/i-auth-client.js.map +1 -0
  31. package/lib/apis/codiac-api/common/security/token-holder.d.ts +13 -0
  32. package/lib/apis/codiac-api/common/security/token-holder.js +18 -0
  33. package/lib/apis/codiac-api/common/security/token-holder.js.map +1 -0
  34. package/lib/apis/codiac-api/common/utils.d.ts +23 -0
  35. package/lib/apis/codiac-api/common/utils.js +83 -0
  36. package/lib/apis/codiac-api/common/utils.js.map +1 -0
  37. package/lib/apis/codiac-api/contracts/index.d.ts +1 -0
  38. package/lib/apis/codiac-api/contracts/index.js +5 -0
  39. package/lib/apis/codiac-api/contracts/index.js.map +1 -0
  40. package/lib/apis/codiac-api/gen/client-config.d.ts +10 -0
  41. package/lib/apis/codiac-api/gen/client-config.js +29 -0
  42. package/lib/apis/codiac-api/gen/client-config.js.map +1 -0
  43. package/lib/apis/codiac-api/gen/client.d.ts +1663 -0
  44. package/lib/apis/codiac-api/gen/client.js +15630 -0
  45. package/lib/apis/codiac-api/gen/client.js.map +1 -0
  46. package/lib/apis/codiac-api/gen/contracts.d.ts +2722 -0
  47. package/lib/apis/codiac-api/gen/contracts.js +403 -0
  48. package/lib/apis/codiac-api/gen/contracts.js.map +1 -0
  49. package/lib/apis/codiac-api/index.d.ts +3 -0
  50. package/lib/apis/codiac-api/index.js +9 -0
  51. package/lib/apis/codiac-api/index.js.map +1 -0
  52. package/lib/apis/codiac-relay/common/api-client-base.d.ts +165 -0
  53. package/lib/apis/codiac-relay/common/api-client-base.js +548 -0
  54. package/lib/apis/codiac-relay/common/api-client-base.js.map +1 -0
  55. package/lib/apis/codiac-relay/common/api-user-creds.d.ts +7 -0
  56. package/lib/apis/codiac-relay/common/api-user-creds.js +19 -0
  57. package/lib/apis/codiac-relay/common/api-user-creds.js.map +1 -0
  58. package/lib/apis/codiac-relay/common/config-loader.d.ts +6 -0
  59. package/lib/apis/codiac-relay/common/config-loader.js +19 -0
  60. package/lib/apis/codiac-relay/common/config-loader.js.map +1 -0
  61. package/lib/apis/codiac-relay/common/endpoint-spec.d.ts +17 -0
  62. package/lib/apis/codiac-relay/common/endpoint-spec.js +28 -0
  63. package/lib/apis/codiac-relay/common/endpoint-spec.js.map +1 -0
  64. package/lib/apis/codiac-relay/common/security/api-auth-methods-legacy.d.ts +87 -0
  65. package/lib/apis/codiac-relay/common/security/api-auth-methods-legacy.js +368 -0
  66. package/lib/apis/codiac-relay/common/security/api-auth-methods-legacy.js.map +1 -0
  67. package/lib/apis/codiac-relay/common/security/auth-constants.d.ts +15 -0
  68. package/lib/apis/codiac-relay/common/security/auth-constants.js +22 -0
  69. package/lib/apis/codiac-relay/common/security/auth-constants.js.map +1 -0
  70. package/lib/apis/codiac-relay/common/security/i-auth-client.d.ts +44 -0
  71. package/lib/apis/codiac-relay/common/security/i-auth-client.js +3 -0
  72. package/lib/apis/codiac-relay/common/security/i-auth-client.js.map +1 -0
  73. package/lib/apis/codiac-relay/common/security/token-holder.d.ts +13 -0
  74. package/lib/apis/codiac-relay/common/security/token-holder.js +18 -0
  75. package/lib/apis/codiac-relay/common/security/token-holder.js.map +1 -0
  76. package/lib/apis/codiac-relay/common/utils.d.ts +23 -0
  77. package/lib/apis/codiac-relay/common/utils.js +83 -0
  78. package/lib/apis/codiac-relay/common/utils.js.map +1 -0
  79. package/lib/apis/codiac-relay/contracts/index.d.ts +1 -0
  80. package/lib/apis/codiac-relay/contracts/index.js +5 -0
  81. package/lib/apis/codiac-relay/contracts/index.js.map +1 -0
  82. package/lib/apis/codiac-relay/gen/client-config.d.ts +10 -0
  83. package/lib/apis/codiac-relay/gen/client-config.js +29 -0
  84. package/lib/apis/codiac-relay/gen/client-config.js.map +1 -0
  85. package/lib/apis/codiac-relay/gen/client.d.ts +242 -0
  86. package/lib/apis/codiac-relay/gen/client.js +1849 -0
  87. package/lib/apis/codiac-relay/gen/client.js.map +1 -0
  88. package/lib/apis/codiac-relay/gen/contracts.d.ts +3097 -0
  89. package/lib/apis/codiac-relay/gen/contracts.js +432 -0
  90. package/lib/apis/codiac-relay/gen/contracts.js.map +1 -0
  91. package/lib/apis/codiac-relay/index.d.ts +3 -0
  92. package/lib/apis/codiac-relay/index.js +9 -0
  93. package/lib/apis/codiac-relay/index.js.map +1 -0
  94. package/lib/azure-rest-client.d.ts +6 -0
  95. package/lib/azure-rest-client.js +36 -0
  96. package/lib/azure-rest-client.js.map +1 -0
  97. package/lib/cli-common/ImagesList.d.ts +0 -0
  98. package/lib/cli-common/ImagesList.js +67 -0
  99. package/lib/cli-common/ImagesList.js.map +1 -0
  100. package/lib/cli-common/argument-manager.d.ts +28 -0
  101. package/lib/cli-common/argument-manager.js +195 -0
  102. package/lib/cli-common/argument-manager.js.map +1 -0
  103. package/lib/cli-common/built-in-cli-user-input.d.ts +18 -0
  104. package/lib/cli-common/built-in-cli-user-input.js +310 -0
  105. package/lib/cli-common/built-in-cli-user-input.js.map +1 -0
  106. package/lib/cli-common/cli-interfaces.d.ts +0 -0
  107. package/lib/cli-common/cli-interfaces.js +7 -0
  108. package/lib/cli-common/cli-interfaces.js.map +1 -0
  109. package/lib/cli-common/command-base.d.ts +74 -0
  110. package/lib/cli-common/command-base.js +180 -0
  111. package/lib/cli-common/command-base.js.map +1 -0
  112. package/lib/cli-common/entities/index.d.ts +1 -0
  113. package/lib/cli-common/entities/index.js +5 -0
  114. package/lib/cli-common/entities/index.js.map +1 -0
  115. package/lib/cli-common/entities/prompt-choice.d.ts +7 -0
  116. package/lib/cli-common/entities/prompt-choice.js +3 -0
  117. package/lib/cli-common/entities/prompt-choice.js.map +1 -0
  118. package/lib/cli-common/file-selector.d.ts +48 -0
  119. package/lib/cli-common/file-selector.js +187 -0
  120. package/lib/cli-common/file-selector.js.map +1 -0
  121. package/lib/cli-common/i-user-input-provider.d.ts +0 -0
  122. package/lib/cli-common/i-user-input-provider.js +19 -0
  123. package/lib/cli-common/i-user-input-provider.js.map +1 -0
  124. package/lib/cli-common/index.d.ts +4 -0
  125. package/lib/cli-common/index.js +11 -0
  126. package/lib/cli-common/index.js.map +1 -0
  127. package/lib/cli-common/mock-ui.d.ts +27 -0
  128. package/lib/cli-common/mock-ui.js +83 -0
  129. package/lib/cli-common/mock-ui.js.map +1 -0
  130. package/lib/cli-common/prompt-select-fuzzy.d.ts +19 -0
  131. package/lib/cli-common/prompt-select-fuzzy.js +119 -0
  132. package/lib/cli-common/prompt-select-fuzzy.js.map +1 -0
  133. package/lib/cli-common/tenant-contextualizer.d.ts +0 -0
  134. package/lib/cli-common/tenant-contextualizer.js +436 -0
  135. package/lib/cli-common/tenant-contextualizer.js.map +1 -0
  136. package/lib/cli-common/test/tenant-contextualizer.spec.d.ts +0 -0
  137. package/lib/cli-common/test/tenant-contextualizer.spec.js +143 -0
  138. package/lib/cli-common/test/tenant-contextualizer.spec.js.map +1 -0
  139. package/lib/cli-entities/output-format-enum.d.ts +7 -0
  140. package/lib/cli-entities/output-format-enum.js +12 -0
  141. package/lib/cli-entities/output-format-enum.js.map +1 -0
  142. package/lib/cli-entities/prompt-choice.d.ts +0 -0
  143. package/lib/cli-entities/prompt-choice.js +6 -0
  144. package/lib/cli-entities/prompt-choice.js.map +1 -0
  145. package/lib/codiac-constants.d.ts +35 -0
  146. package/lib/codiac-constants.js +41 -0
  147. package/lib/codiac-constants.js.map +1 -0
  148. package/lib/codiac-entities/asset-binding.d.ts +12 -0
  149. package/lib/codiac-entities/asset-binding.js +18 -0
  150. package/lib/codiac-entities/asset-binding.js.map +1 -0
  151. package/lib/codiac-entities/azure-container-registry.d.ts +4 -0
  152. package/lib/codiac-entities/azure-container-registry.js +3 -0
  153. package/lib/codiac-entities/azure-container-registry.js.map +1 -0
  154. package/lib/codiac-entities/azure-service-principal.d.ts +23 -0
  155. package/lib/codiac-entities/azure-service-principal.js +24 -0
  156. package/lib/codiac-entities/azure-service-principal.js.map +1 -0
  157. package/lib/codiac-entities/cloud-account-ref.d.ts +28 -0
  158. package/lib/codiac-entities/cloud-account-ref.js +37 -0
  159. package/lib/codiac-entities/cloud-account-ref.js.map +1 -0
  160. package/lib/codiac-entities/deployment-temp.d.ts +0 -0
  161. package/lib/codiac-entities/deployment-temp.js +133 -0
  162. package/lib/codiac-entities/deployment-temp.js.map +1 -0
  163. package/lib/codiac-entities/i-cloud-account-ref.d.ts +5 -0
  164. package/lib/codiac-entities/i-cloud-account-ref.js +3 -0
  165. package/lib/codiac-entities/i-cloud-account-ref.js.map +1 -0
  166. package/lib/command-base-enterprise.d.ts +121 -0
  167. package/lib/command-base-enterprise.js +524 -0
  168. package/lib/command-base-enterprise.js.map +1 -0
  169. package/lib/command-base-tenantless.d.ts +44 -0
  170. package/lib/command-base-tenantless.js +173 -0
  171. package/lib/command-base-tenantless.js.map +1 -0
  172. package/lib/commands/asset/create.d.ts +42 -0
  173. package/lib/commands/asset/create.js +467 -0
  174. package/lib/commands/asset/create.js.map +1 -0
  175. package/lib/commands/asset/destroy.d.ts +20 -0
  176. package/lib/commands/asset/destroy.js +129 -0
  177. package/lib/commands/asset/destroy.js.map +1 -0
  178. package/lib/commands/asset/helm.d.ts +24 -0
  179. package/lib/commands/asset/helm.js +151 -0
  180. package/lib/commands/asset/helm.js.map +1 -0
  181. package/lib/commands/asset/list.d.ts +29 -0
  182. package/lib/commands/asset/list.js +171 -0
  183. package/lib/commands/asset/list.js.map +1 -0
  184. package/lib/commands/asset/probe/create.d.ts +41 -0
  185. package/lib/commands/asset/probe/create.js +182 -0
  186. package/lib/commands/asset/probe/create.js.map +1 -0
  187. package/lib/commands/asset/recycle.d.ts +23 -0
  188. package/lib/commands/asset/recycle.js +175 -0
  189. package/lib/commands/asset/recycle.js.map +1 -0
  190. package/lib/commands/asset/view.d.ts +189 -0
  191. package/lib/commands/asset/view.js +1361 -0
  192. package/lib/commands/asset/view.js.map +1 -0
  193. package/lib/commands/asset/volume/create.d.ts +25 -0
  194. package/lib/commands/asset/volume/create.js +174 -0
  195. package/lib/commands/asset/volume/create.js.map +1 -0
  196. package/lib/commands/asset/volume/delete.d.ts +19 -0
  197. package/lib/commands/asset/volume/delete.js +112 -0
  198. package/lib/commands/asset/volume/delete.js.map +1 -0
  199. package/lib/commands/asset/volume/list.d.ts +20 -0
  200. package/lib/commands/asset/volume/list.js +69 -0
  201. package/lib/commands/asset/volume/list.js.map +1 -0
  202. package/lib/commands/branch/current.d.ts +10 -0
  203. package/lib/commands/branch/current.js +34 -0
  204. package/lib/commands/branch/current.js.map +1 -0
  205. package/lib/commands/branch/list.d.ts +15 -0
  206. package/lib/commands/branch/list.js +56 -0
  207. package/lib/commands/branch/list.js.map +1 -0
  208. package/lib/commands/branch.d.ts +13 -0
  209. package/lib/commands/branch.js +40 -0
  210. package/lib/commands/branch.js.map +1 -0
  211. package/lib/commands/build.d.ts +37 -0
  212. package/lib/commands/build.js +116 -0
  213. package/lib/commands/build.js.map +1 -0
  214. package/lib/commands/cabinet/create.d.ts +23 -0
  215. package/lib/commands/cabinet/create.js +106 -0
  216. package/lib/commands/cabinet/create.js.map +1 -0
  217. package/lib/commands/cabinet/list.d.ts +24 -0
  218. package/lib/commands/cabinet/list.js +132 -0
  219. package/lib/commands/cabinet/list.js.map +1 -0
  220. package/lib/commands/cabinet/obliterate.d.ts +22 -0
  221. package/lib/commands/cabinet/obliterate.js +81 -0
  222. package/lib/commands/cabinet/obliterate.js.map +1 -0
  223. package/lib/commands/cli.d.ts +10 -0
  224. package/lib/commands/cli.js +100 -0
  225. package/lib/commands/cli.js.map +1 -0
  226. package/lib/commands/commit.d.ts +13 -0
  227. package/lib/commands/commit.js +38 -0
  228. package/lib/commands/commit.js.map +1 -0
  229. package/lib/commands/config/add.d.ts +79 -0
  230. package/lib/commands/config/add.js +558 -0
  231. package/lib/commands/config/add.js.map +1 -0
  232. package/lib/commands/config/delete.d.ts +19 -0
  233. package/lib/commands/config/delete.js +114 -0
  234. package/lib/commands/config/delete.js.map +1 -0
  235. package/lib/commands/config/deploy.d.ts +22 -0
  236. package/lib/commands/config/deploy.js +125 -0
  237. package/lib/commands/config/deploy.js.map +1 -0
  238. package/lib/commands/config/import.d.ts +28 -0
  239. package/lib/commands/config/import.js +194 -0
  240. package/lib/commands/config/import.js.map +1 -0
  241. package/lib/commands/config/view.d.ts +28 -0
  242. package/lib/commands/config/view.js +118 -0
  243. package/lib/commands/config/view.js.map +1 -0
  244. package/lib/commands/csp/login.d.ts +22 -0
  245. package/lib/commands/csp/login.js +107 -0
  246. package/lib/commands/csp/login.js.map +1 -0
  247. package/lib/commands/csp/logout.d.ts +19 -0
  248. package/lib/commands/csp/logout.js +72 -0
  249. package/lib/commands/csp/logout.js.map +1 -0
  250. package/lib/commands/dep/create.d.ts +14 -0
  251. package/lib/commands/dep/create.js +36 -0
  252. package/lib/commands/dep/create.js.map +1 -0
  253. package/lib/commands/dep/install.d.ts +9 -0
  254. package/lib/commands/dep/install.js +30 -0
  255. package/lib/commands/dep/install.js.map +1 -0
  256. package/lib/commands/dep/list.d.ts +55 -0
  257. package/lib/commands/dep/list.js +98 -0
  258. package/lib/commands/dep/list.js.map +1 -0
  259. package/lib/commands/dep/remove.d.ts +13 -0
  260. package/lib/commands/dep/remove.js +60 -0
  261. package/lib/commands/dep/remove.js.map +1 -0
  262. package/lib/commands/dep/source.d.ts +14 -0
  263. package/lib/commands/dep/source.js +81 -0
  264. package/lib/commands/dep/source.js.map +1 -0
  265. package/lib/commands/dep/syncup.d.ts +12 -0
  266. package/lib/commands/dep/syncup.js +52 -0
  267. package/lib/commands/dep/syncup.js.map +1 -0
  268. package/lib/commands/dep/unsource.d.ts +15 -0
  269. package/lib/commands/dep/unsource.js +61 -0
  270. package/lib/commands/dep/unsource.js.map +1 -0
  271. package/lib/commands/dep/upgrade.d.ts +45 -0
  272. package/lib/commands/dep/upgrade.js +242 -0
  273. package/lib/commands/dep/upgrade.js.map +1 -0
  274. package/lib/commands/dep.d.ts +13 -0
  275. package/lib/commands/dep.js +49 -0
  276. package/lib/commands/dep.js.map +1 -0
  277. package/lib/commands/deploy.d.ts +31 -0
  278. package/lib/commands/deploy.js +358 -0
  279. package/lib/commands/deploy.js.map +1 -0
  280. package/lib/commands/enterprise/create.d.ts +22 -0
  281. package/lib/commands/enterprise/create.js +96 -0
  282. package/lib/commands/enterprise/create.js.map +1 -0
  283. package/lib/commands/enterprise/list.d.ts +15 -0
  284. package/lib/commands/enterprise/list.js +83 -0
  285. package/lib/commands/enterprise/list.js.map +1 -0
  286. package/lib/commands/env/add.d.ts +23 -0
  287. package/lib/commands/env/add.js +197 -0
  288. package/lib/commands/env/add.js.map +1 -0
  289. package/lib/commands/environment/create.d.ts +21 -0
  290. package/lib/commands/environment/create.js +87 -0
  291. package/lib/commands/environment/create.js.map +1 -0
  292. package/lib/commands/environment/list.d.ts +26 -0
  293. package/lib/commands/environment/list.js +156 -0
  294. package/lib/commands/environment/list.js.map +1 -0
  295. package/lib/commands/filestore/capture.d.ts +31 -0
  296. package/lib/commands/filestore/capture.js +342 -0
  297. package/lib/commands/filestore/capture.js.map +1 -0
  298. package/lib/commands/host/map.d.ts +35 -0
  299. package/lib/commands/host/map.js +345 -0
  300. package/lib/commands/host/map.js.map +1 -0
  301. package/lib/commands/identity/delete.d.ts +16 -0
  302. package/lib/commands/identity/delete.js +79 -0
  303. package/lib/commands/identity/delete.js.map +1 -0
  304. package/lib/commands/identity/list.d.ts +11 -0
  305. package/lib/commands/identity/list.js +43 -0
  306. package/lib/commands/identity/list.js.map +1 -0
  307. package/lib/commands/identity.d.ts +24 -0
  308. package/lib/commands/identity.js +75 -0
  309. package/lib/commands/identity.js.map +1 -0
  310. package/lib/commands/imageRegistry/capture.d.ts +28 -0
  311. package/lib/commands/imageRegistry/capture.js +160 -0
  312. package/lib/commands/imageRegistry/capture.js.map +1 -0
  313. package/lib/commands/imageRegistry/forget.d.ts +23 -0
  314. package/lib/commands/imageRegistry/forget.js +161 -0
  315. package/lib/commands/imageRegistry/forget.js.map +1 -0
  316. package/lib/commands/imageRegistry/pullSecret/set.d.ts +28 -0
  317. package/lib/commands/imageRegistry/pullSecret/set.js +300 -0
  318. package/lib/commands/imageRegistry/pullSecret/set.js.map +1 -0
  319. package/lib/commands/imageRegistry/pullSecret/unset.d.ts +24 -0
  320. package/lib/commands/imageRegistry/pullSecret/unset.js +243 -0
  321. package/lib/commands/imageRegistry/pullSecret/unset.js.map +1 -0
  322. package/lib/commands/images/add.d.ts +27 -0
  323. package/lib/commands/images/add.js +71 -0
  324. package/lib/commands/images/add.js.map +1 -0
  325. package/lib/commands/images/list.d.ts +16 -0
  326. package/lib/commands/images/list.js +72 -0
  327. package/lib/commands/images/list.js.map +1 -0
  328. package/lib/commands/images/patch.d.ts +16 -0
  329. package/lib/commands/images/patch.js +91 -0
  330. package/lib/commands/images/patch.js.map +1 -0
  331. package/lib/commands/images/remove.d.ts +14 -0
  332. package/lib/commands/images/remove.js +36 -0
  333. package/lib/commands/images/remove.js.map +1 -0
  334. package/lib/commands/images/version.d.ts +16 -0
  335. package/lib/commands/images/version.js +63 -0
  336. package/lib/commands/images/version.js.map +1 -0
  337. package/lib/commands/init.d.ts +19 -0
  338. package/lib/commands/init.js +131 -0
  339. package/lib/commands/init.js.map +1 -0
  340. package/lib/commands/kit/create.d.ts +26 -0
  341. package/lib/commands/kit/create.js +140 -0
  342. package/lib/commands/kit/create.js.map +1 -0
  343. package/lib/commands/login.d.ts +22 -0
  344. package/lib/commands/login.js +93 -0
  345. package/lib/commands/login.js.map +1 -0
  346. package/lib/commands/logout.d.ts +8 -0
  347. package/lib/commands/logout.js +37 -0
  348. package/lib/commands/logout.js.map +1 -0
  349. package/lib/commands/merge.d.ts +14 -0
  350. package/lib/commands/merge.js +41 -0
  351. package/lib/commands/merge.js.map +1 -0
  352. package/lib/commands/noc/cluster/create.d.ts +29 -0
  353. package/lib/commands/noc/cluster/create.js +131 -0
  354. package/lib/commands/noc/cluster/create.js.map +1 -0
  355. package/lib/commands/noc/cluster/deinit.d.ts +18 -0
  356. package/lib/commands/noc/cluster/deinit.js +114 -0
  357. package/lib/commands/noc/cluster/deinit.js.map +1 -0
  358. package/lib/commands/noc/cluster/destroy.d.ts +21 -0
  359. package/lib/commands/noc/cluster/destroy.js +135 -0
  360. package/lib/commands/noc/cluster/destroy.js.map +1 -0
  361. package/lib/commands/noc/cluster/init.d.ts +18 -0
  362. package/lib/commands/noc/cluster/init.js +114 -0
  363. package/lib/commands/noc/cluster/init.js.map +1 -0
  364. package/lib/commands/noc/cluster/list.d.ts +22 -0
  365. package/lib/commands/noc/cluster/list.js +83 -0
  366. package/lib/commands/noc/cluster/list.js.map +1 -0
  367. package/lib/commands/noc/cluster/recreate.d.ts +31 -0
  368. package/lib/commands/noc/cluster/recreate.js +183 -0
  369. package/lib/commands/noc/cluster/recreate.js.map +1 -0
  370. package/lib/commands/pkg/add.d.ts +17 -0
  371. package/lib/commands/pkg/add.js +41 -0
  372. package/lib/commands/pkg/add.js.map +1 -0
  373. package/lib/commands/pkg/list.d.ts +11 -0
  374. package/lib/commands/pkg/list.js +33 -0
  375. package/lib/commands/pkg/list.js.map +1 -0
  376. package/lib/commands/pkg/patch.d.ts +15 -0
  377. package/lib/commands/pkg/patch.js +77 -0
  378. package/lib/commands/pkg/patch.js.map +1 -0
  379. package/lib/commands/pkg/remove.d.ts +14 -0
  380. package/lib/commands/pkg/remove.js +68 -0
  381. package/lib/commands/pkg/remove.js.map +1 -0
  382. package/lib/commands/portal.d.ts +11 -0
  383. package/lib/commands/portal.js +82 -0
  384. package/lib/commands/portal.js.map +1 -0
  385. package/lib/commands/publish.d.ts +23 -0
  386. package/lib/commands/publish.js +52 -0
  387. package/lib/commands/publish.js.map +1 -0
  388. package/lib/commands/pull.d.ts +15 -0
  389. package/lib/commands/pull.js +30 -0
  390. package/lib/commands/pull.js.map +1 -0
  391. package/lib/commands/push.d.ts +15 -0
  392. package/lib/commands/push.js +30 -0
  393. package/lib/commands/push.js.map +1 -0
  394. package/lib/commands/run.d.ts +35 -0
  395. package/lib/commands/run.js +194 -0
  396. package/lib/commands/run.js.map +1 -0
  397. package/lib/commands/secretStore/capture.d.ts +28 -0
  398. package/lib/commands/secretStore/capture.js +174 -0
  399. package/lib/commands/secretStore/capture.js.map +1 -0
  400. package/lib/commands/secretStore/forget.d.ts +20 -0
  401. package/lib/commands/secretStore/forget.js +147 -0
  402. package/lib/commands/secretStore/forget.js.map +1 -0
  403. package/lib/commands/stage.d.ts +15 -0
  404. package/lib/commands/stage.js +63 -0
  405. package/lib/commands/stage.js.map +1 -0
  406. package/lib/commands/stash.d.ts +13 -0
  407. package/lib/commands/stash.js +29 -0
  408. package/lib/commands/stash.js.map +1 -0
  409. package/lib/commands/status.d.ts +12 -0
  410. package/lib/commands/status.js +49 -0
  411. package/lib/commands/status.js.map +1 -0
  412. package/lib/commands/stop.d.ts +10 -0
  413. package/lib/commands/stop.js +52 -0
  414. package/lib/commands/stop.js.map +1 -0
  415. package/lib/commands/switch.d.ts +12 -0
  416. package/lib/commands/switch.js +37 -0
  417. package/lib/commands/switch.js.map +1 -0
  418. package/lib/commands/sync.d.ts +16 -0
  419. package/lib/commands/sync.js +21 -0
  420. package/lib/commands/sync.js.map +1 -0
  421. package/lib/commands/tenant/create.d.ts +29 -0
  422. package/lib/commands/tenant/create.js +118 -0
  423. package/lib/commands/tenant/create.js.map +1 -0
  424. package/lib/commands/tenant/switch.d.ts +26 -0
  425. package/lib/commands/tenant/switch.js +107 -0
  426. package/lib/commands/tenant/switch.js.map +1 -0
  427. package/lib/commands/unstage.d.ts +14 -0
  428. package/lib/commands/unstage.js +56 -0
  429. package/lib/commands/unstage.js.map +1 -0
  430. package/lib/commands/view/dashboard.d.ts +17 -0
  431. package/lib/commands/view/dashboard.js +88 -0
  432. package/lib/commands/view/dashboard.js.map +1 -0
  433. package/lib/commands/view/pods.d.ts +14 -0
  434. package/lib/commands/view/pods.js +88 -0
  435. package/lib/commands/view/pods.js.map +1 -0
  436. package/lib/commands/whereami.d.ts +17 -0
  437. package/lib/commands/whereami.js +123 -0
  438. package/lib/commands/whereami.js.map +1 -0
  439. package/lib/commands/whoami.d.ts +11 -0
  440. package/lib/commands/whoami.js +41 -0
  441. package/lib/commands/whoami.js.map +1 -0
  442. package/lib/deployment.d.ts +2 -0
  443. package/lib/deployment.js +7 -0
  444. package/lib/deployment.js.map +1 -0
  445. package/lib/errors/NoMembershipError.d.ts +8 -0
  446. package/lib/errors/NoMembershipError.js +15 -0
  447. package/lib/errors/NoMembershipError.js.map +1 -0
  448. package/lib/index.d.ts +1 -0
  449. package/lib/index.js +17 -0
  450. package/lib/index.js.map +1 -0
  451. package/lib/k8s-command-base.d.ts +60 -0
  452. package/lib/k8s-command-base.js +204 -0
  453. package/lib/k8s-command-base.js.map +1 -0
  454. package/lib/log-update-wrapper.d.ts +24 -0
  455. package/lib/log-update-wrapper.js +29 -0
  456. package/lib/log-update-wrapper.js.map +1 -0
  457. package/lib/log4js-logger.d.ts +26 -0
  458. package/lib/log4js-logger.js +138 -0
  459. package/lib/log4js-logger.js.map +1 -0
  460. package/lib/ops/INTERFACES_CLI.d.ts +3 -0
  461. package/lib/ops/INTERFACES_CLI.js +8 -0
  462. package/lib/ops/INTERFACES_CLI.js.map +1 -0
  463. package/lib/ops/LocalOps.d.ts +444 -0
  464. package/lib/ops/LocalOps.js +3184 -0
  465. package/lib/ops/LocalOps.js.map +1 -0
  466. package/lib/ops/azure-container-registry-client/azure-container-registry-client.d.ts +0 -0
  467. package/lib/ops/azure-container-registry-client/azure-container-registry-client.js +148 -0
  468. package/lib/ops/azure-container-registry-client/azure-container-registry-client.js.map +1 -0
  469. package/lib/ops/cli-path-walker.d.ts +0 -0
  470. package/lib/ops/cli-path-walker.js +55 -0
  471. package/lib/ops/cli-path-walker.js.map +1 -0
  472. package/lib/ops/codiac-entities/dependency.d.ts +5 -0
  473. package/lib/ops/codiac-entities/dependency.js +11 -0
  474. package/lib/ops/codiac-entities/dependency.js.map +1 -0
  475. package/lib/ops/codiac-entities/index.d.ts +1 -0
  476. package/lib/ops/codiac-entities/index.js +5 -0
  477. package/lib/ops/codiac-entities/index.js.map +1 -0
  478. package/lib/ops/composite-image-registry-client.d.ts +0 -0
  479. package/lib/ops/composite-image-registry-client.js +74 -0
  480. package/lib/ops/composite-image-registry-client.js.map +1 -0
  481. package/lib/ops/data/cli-context-repo.d.ts +61 -0
  482. package/lib/ops/data/cli-context-repo.js +270 -0
  483. package/lib/ops/data/cli-context-repo.js.map +1 -0
  484. package/lib/ops/data/index.d.ts +2 -0
  485. package/lib/ops/data/index.js +6 -0
  486. package/lib/ops/data/index.js.map +1 -0
  487. package/lib/ops/data/npm-config-repo.d.ts +13 -0
  488. package/lib/ops/data/npm-config-repo.js +65 -0
  489. package/lib/ops/data/npm-config-repo.js.map +1 -0
  490. package/lib/ops/docker-config.d.ts +0 -0
  491. package/lib/ops/docker-config.js +131 -0
  492. package/lib/ops/docker-config.js.map +1 -0
  493. package/lib/ops/docker-constants.d.ts +0 -0
  494. package/lib/ops/docker-constants.js +22 -0
  495. package/lib/ops/docker-constants.js.map +1 -0
  496. package/lib/ops/docker-credentials-store.d.ts +0 -0
  497. package/lib/ops/docker-credentials-store.js +238 -0
  498. package/lib/ops/docker-credentials-store.js.map +1 -0
  499. package/lib/ops/docker-registry-api-client/docker-registry-api-client.d.ts +0 -0
  500. package/lib/ops/docker-registry-api-client/docker-registry-api-client.js +289 -0
  501. package/lib/ops/docker-registry-api-client/docker-registry-api-client.js.map +1 -0
  502. package/lib/ops/docker-registry-api-client/entities/blob-sum.d.ts +7 -0
  503. package/lib/ops/docker-registry-api-client/entities/blob-sum.js +13 -0
  504. package/lib/ops/docker-registry-api-client/entities/blob-sum.js.map +1 -0
  505. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.d.ts +5 -0
  506. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.js +10 -0
  507. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.js.map +1 -0
  508. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.d.ts +30 -0
  509. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.js +36 -0
  510. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.js.map +1 -0
  511. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.d.ts +55 -0
  512. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.js +52 -0
  513. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.js.map +1 -0
  514. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.d.ts +7 -0
  515. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.js +3 -0
  516. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.js.map +1 -0
  517. package/lib/ops/docker-registry-api-client/entities/image-repository.d.ts +31 -0
  518. package/lib/ops/docker-registry-api-client/entities/image-repository.js +30 -0
  519. package/lib/ops/docker-registry-api-client/entities/image-repository.js.map +1 -0
  520. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.d.ts +8 -0
  521. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.js +14 -0
  522. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.js.map +1 -0
  523. package/lib/ops/docker-registry-api-client/entities/image-tag-list.d.ts +7 -0
  524. package/lib/ops/docker-registry-api-client/entities/image-tag-list.js +13 -0
  525. package/lib/ops/docker-registry-api-client/entities/image-tag-list.js.map +1 -0
  526. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.d.ts +9 -0
  527. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.js +15 -0
  528. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.js.map +1 -0
  529. package/lib/ops/docker-registry-api-client/entities/manifest.d.ts +15 -0
  530. package/lib/ops/docker-registry-api-client/entities/manifest.js +21 -0
  531. package/lib/ops/docker-registry-api-client/entities/manifest.js.map +1 -0
  532. package/lib/ops/docker-registry-api-client/entities/repository-criteria.d.ts +16 -0
  533. package/lib/ops/docker-registry-api-client/entities/repository-criteria.js +24 -0
  534. package/lib/ops/docker-registry-api-client/entities/repository-criteria.js.map +1 -0
  535. package/lib/ops/docker-registry-api-client/entities/token-response.d.ts +15 -0
  536. package/lib/ops/docker-registry-api-client/entities/token-response.js +15 -0
  537. package/lib/ops/docker-registry-api-client/entities/token-response.js.map +1 -0
  538. package/lib/ops/docker-registry-api-client/entities/token.d.ts +17 -0
  539. package/lib/ops/docker-registry-api-client/entities/token.js +22 -0
  540. package/lib/ops/docker-registry-api-client/entities/token.js.map +1 -0
  541. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.d.ts +4 -0
  542. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.js +10 -0
  543. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.js.map +1 -0
  544. package/lib/ops/dx-constants.d.ts +26 -0
  545. package/lib/ops/dx-constants.js +43 -0
  546. package/lib/ops/dx-constants.js.map +1 -0
  547. package/lib/ops/entities/ImageBuildContext.d.ts +12 -0
  548. package/lib/ops/entities/ImageBuildContext.js +19 -0
  549. package/lib/ops/entities/ImageBuildContext.js.map +1 -0
  550. package/lib/ops/entities/PipelineContext.d.ts +21 -0
  551. package/lib/ops/entities/PipelineContext.js +23 -0
  552. package/lib/ops/entities/PipelineContext.js.map +1 -0
  553. package/lib/ops/entities/TenantContext.d.ts +10 -0
  554. package/lib/ops/entities/TenantContext.js +16 -0
  555. package/lib/ops/entities/TenantContext.js.map +1 -0
  556. package/lib/ops/entities/ThaulConfig.d.ts +0 -0
  557. package/lib/ops/entities/ThaulConfig.js +30 -0
  558. package/lib/ops/entities/ThaulConfig.js.map +1 -0
  559. package/lib/ops/entities/azure-service-principal.d.ts +23 -0
  560. package/lib/ops/entities/azure-service-principal.js +24 -0
  561. package/lib/ops/entities/azure-service-principal.js.map +1 -0
  562. package/lib/ops/entities/better-logger.d.ts +0 -0
  563. package/lib/ops/entities/better-logger.js +2 -0
  564. package/lib/ops/entities/better-logger.js.map +1 -0
  565. package/lib/ops/entities/branch.d.ts +13 -0
  566. package/lib/ops/entities/branch.js +16 -0
  567. package/lib/ops/entities/branch.js.map +1 -0
  568. package/lib/ops/entities/cli-config.d.ts +48 -0
  569. package/lib/ops/entities/cli-config.js +61 -0
  570. package/lib/ops/entities/cli-config.js.map +1 -0
  571. package/lib/ops/entities/docker-image.d.ts +60 -0
  572. package/lib/ops/entities/docker-image.js +3 -0
  573. package/lib/ops/entities/docker-image.js.map +1 -0
  574. package/lib/ops/entities/helm-spec.d.ts +15 -0
  575. package/lib/ops/entities/helm-spec.js +23 -0
  576. package/lib/ops/entities/helm-spec.js.map +1 -0
  577. package/lib/ops/entities/index.d.ts +4 -0
  578. package/lib/ops/entities/index.js +12 -0
  579. package/lib/ops/entities/index.js.map +1 -0
  580. package/lib/ops/entities/operation-meta.d.ts +8 -0
  581. package/lib/ops/entities/operation-meta.js +19 -0
  582. package/lib/ops/entities/operation-meta.js.map +1 -0
  583. package/lib/ops/entities/scaffolding.d.ts +19 -0
  584. package/lib/ops/entities/scaffolding.js +21 -0
  585. package/lib/ops/entities/scaffolding.js.map +1 -0
  586. package/lib/ops/extensions/azart-identity-adapter.d.ts +19 -0
  587. package/lib/ops/extensions/azart-identity-adapter.js +97 -0
  588. package/lib/ops/extensions/azart-identity-adapter.js.map +1 -0
  589. package/lib/ops/extensions/npm-identity-adapter-base.d.ts +13 -0
  590. package/lib/ops/extensions/npm-identity-adapter-base.js +3 -0
  591. package/lib/ops/extensions/npm-identity-adapter-base.js.map +1 -0
  592. package/lib/ops/extensions/npmjs-identity-adapter.d.ts +13 -0
  593. package/lib/ops/extensions/npmjs-identity-adapter.js +64 -0
  594. package/lib/ops/extensions/npmjs-identity-adapter.js.map +1 -0
  595. package/lib/ops/git-ops.d.ts +8 -0
  596. package/lib/ops/git-ops.js +14 -0
  597. package/lib/ops/git-ops.js.map +1 -0
  598. package/lib/ops/i-client-for-image-registry.d.ts +0 -0
  599. package/lib/ops/i-client-for-image-registry.js +17 -0
  600. package/lib/ops/i-client-for-image-registry.js.map +1 -0
  601. package/lib/ops/i-identity-handler.d.ts +33 -0
  602. package/lib/ops/i-identity-handler.js +165 -0
  603. package/lib/ops/i-identity-handler.js.map +1 -0
  604. package/lib/ops/i-output-styler.d.ts +0 -0
  605. package/lib/ops/i-output-styler.js +17 -0
  606. package/lib/ops/i-output-styler.js.map +1 -0
  607. package/lib/ops/index.d.ts +12 -0
  608. package/lib/ops/index.js +15 -0
  609. package/lib/ops/index.js.map +1 -0
  610. package/lib/ops/json-utils.d.ts +0 -0
  611. package/lib/ops/json-utils.js +59 -0
  612. package/lib/ops/json-utils.js.map +1 -0
  613. package/lib/ops/no-style-output-styler.d.ts +0 -0
  614. package/lib/ops/no-style-output-styler.js +30 -0
  615. package/lib/ops/no-style-output-styler.js.map +1 -0
  616. package/lib/ops/oauth2-client.ts/oauth2-client.d.ts +23 -0
  617. package/lib/ops/oauth2-client.ts/oauth2-client.js +64 -0
  618. package/lib/ops/oauth2-client.ts/oauth2-client.js.map +1 -0
  619. package/lib/ops/project-initializer.d.ts +36 -0
  620. package/lib/ops/project-initializer.js +219 -0
  621. package/lib/ops/project-initializer.js.map +1 -0
  622. package/lib/ops/scaffolding/base-scaffolding.d.ts +7 -0
  623. package/lib/ops/scaffolding/base-scaffolding.js +21 -0
  624. package/lib/ops/scaffolding/base-scaffolding.js.map +1 -0
  625. package/lib/ops/scaffolding/codiac-api-scaffolding.d.ts +7 -0
  626. package/lib/ops/scaffolding/codiac-api-scaffolding.js +64 -0
  627. package/lib/ops/scaffolding/codiac-api-scaffolding.js.map +1 -0
  628. package/lib/ops/scaffolding/typescript-scaffolding.d.ts +15 -0
  629. package/lib/ops/scaffolding/typescript-scaffolding.js +163 -0
  630. package/lib/ops/scaffolding/typescript-scaffolding.js.map +1 -0
  631. package/lib/ops/test/mock-ui.d.ts +26 -0
  632. package/lib/ops/test/mock-ui.js +88 -0
  633. package/lib/ops/test/mock-ui.js.map +1 -0
  634. package/lib/ops/test/test-extensions.d.ts +13 -0
  635. package/lib/ops/test/test-extensions.js +71 -0
  636. package/lib/ops/test/test-extensions.js.map +1 -0
  637. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.d.ts +2 -0
  638. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.js +55 -0
  639. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.js.map +1 -0
  640. package/lib/ops/test/when-git-branchline-is-attempted.spec.d.ts +2 -0
  641. package/lib/ops/test/when-git-branchline-is-attempted.spec.js +38 -0
  642. package/lib/ops/test/when-git-branchline-is-attempted.spec.js.map +1 -0
  643. package/lib/ops/test/when-versions-are-parsed.spec.d.ts +2 -0
  644. package/lib/ops/test/when-versions-are-parsed.spec.js +60 -0
  645. package/lib/ops/test/when-versions-are-parsed.spec.js.map +1 -0
  646. package/lib/ops/throwing-user-input-provider.d.ts +0 -0
  647. package/lib/ops/throwing-user-input-provider.js +37 -0
  648. package/lib/ops/throwing-user-input-provider.js.map +1 -0
  649. package/lib/prettify.d.ts +7 -0
  650. package/lib/prettify.js +24 -0
  651. package/lib/prettify.js.map +1 -0
  652. package/lib/read-stdin.d.ts +2 -0
  653. package/lib/read-stdin.js +29 -0
  654. package/lib/read-stdin.js.map +1 -0
  655. package/lib/relay/contracts/contracts.d.ts +196 -0
  656. package/lib/relay/contracts/contracts.js +213 -0
  657. package/lib/relay/contracts/contracts.js.map +1 -0
  658. package/lib/relay/data/aws-k8s-versions.d.ts +6 -0
  659. package/lib/relay/data/aws-k8s-versions.js +16 -0
  660. package/lib/relay/data/aws-k8s-versions.js.map +1 -0
  661. package/lib/relay/data/aws-node-types.d.ts +37 -0
  662. package/lib/relay/data/aws-node-types.js +4246 -0
  663. package/lib/relay/data/aws-node-types.js.map +1 -0
  664. package/lib/relay/data/aws-regions.d.ts +6 -0
  665. package/lib/relay/data/aws-regions.js +34 -0
  666. package/lib/relay/data/aws-regions.js.map +1 -0
  667. package/lib/relay/extended-relay-client.d.ts +27 -0
  668. package/lib/relay/extended-relay-client.js +28 -0
  669. package/lib/relay/extended-relay-client.js.map +1 -0
  670. package/lib/relay/relay-container.d.ts +41 -0
  671. package/lib/relay/relay-container.js +298 -0
  672. package/lib/relay/relay-container.js.map +1 -0
  673. package/lib/relay/wsclient/relay-socket-listener.d.ts +68 -0
  674. package/lib/relay/wsclient/relay-socket-listener.js +165 -0
  675. package/lib/relay/wsclient/relay-socket-listener.js.map +1 -0
  676. package/lib/relay/wsclient/relay-websocket-client.d.ts +33 -0
  677. package/lib/relay/wsclient/relay-websocket-client.js +179 -0
  678. package/lib/relay/wsclient/relay-websocket-client.js.map +1 -0
  679. package/lib/relay/wsclient/rx-websocket-subject.d.ts +25 -0
  680. package/lib/relay/wsclient/rx-websocket-subject.js +134 -0
  681. package/lib/relay/wsclient/rx-websocket-subject.js.map +1 -0
  682. package/lib/relay/wsclient/socket-contracts.d.ts +22 -0
  683. package/lib/relay/wsclient/socket-contracts.js +3 -0
  684. package/lib/relay/wsclient/socket-contracts.js.map +1 -0
  685. package/lib/standard-probes.d.ts +5 -0
  686. package/lib/standard-probes.js +22 -0
  687. package/lib/standard-probes.js.map +1 -0
  688. package/lib/uilogic/build-configurator.d.ts +21 -0
  689. package/lib/uilogic/build-configurator.js +111 -0
  690. package/lib/uilogic/build-configurator.js.map +1 -0
  691. package/lib/uilogic/cloud-provider-contextualizer.d.ts +46 -0
  692. package/lib/uilogic/cloud-provider-contextualizer.js +194 -0
  693. package/lib/uilogic/cloud-provider-contextualizer.js.map +1 -0
  694. package/lib/uilogic/cloud-resource-configurator-factory.d.ts +41 -0
  695. package/lib/uilogic/cloud-resource-configurator-factory.js +159 -0
  696. package/lib/uilogic/cloud-resource-configurator-factory.js.map +1 -0
  697. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.d.ts +11 -0
  698. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js +16 -0
  699. package/lib/uilogic/cloud-resource-configurators/aws-k8s-versions.js.map +1 -0
  700. package/lib/uilogic/cloud-resource-configurators/aws-node-types.d.ts +5 -0
  701. package/lib/uilogic/cloud-resource-configurators/aws-node-types.js +536 -0
  702. package/lib/uilogic/cloud-resource-configurators/aws-node-types.js.map +1 -0
  703. package/lib/uilogic/cloud-resource-configurators/aws-regions.d.ts +10 -0
  704. package/lib/uilogic/cloud-resource-configurators/aws-regions.js +34 -0
  705. package/lib/uilogic/cloud-resource-configurators/aws-regions.js.map +1 -0
  706. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.d.ts +33 -0
  707. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js +297 -0
  708. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js.map +1 -0
  709. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.d.ts +0 -0
  710. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.js +78 -0
  711. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.js.map +1 -0
  712. package/lib/uilogic/cloud-resource-configurators/az-interactive-login-configurator.d.ts +42 -0
  713. package/lib/uilogic/cloud-resource-configurators/az-interactive-login-configurator.js +248 -0
  714. package/lib/uilogic/cloud-resource-configurators/az-interactive-login-configurator.js.map +1 -0
  715. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.d.ts +110 -0
  716. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.js +782 -0
  717. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.js.map +1 -0
  718. package/lib/uilogic/cloud-resource-configurators/azure-types.d.ts +0 -0
  719. package/lib/uilogic/cloud-resource-configurators/azure-types.js +10 -0
  720. package/lib/uilogic/cloud-resource-configurators/azure-types.js.map +1 -0
  721. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.d.ts +24 -0
  722. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.js +106 -0
  723. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.js.map +1 -0
  724. package/lib/uilogic/cloud-resource-configurators/helm-resource-configurator.d.ts +16 -0
  725. package/lib/uilogic/cloud-resource-configurators/helm-resource-configurator.js +45 -0
  726. package/lib/uilogic/cloud-resource-configurators/helm-resource-configurator.js.map +1 -0
  727. package/lib/uilogic/cloud-resource-configurators/unsupported-resource-configurator.d.ts +18 -0
  728. package/lib/uilogic/cloud-resource-configurators/unsupported-resource-configurator.js +62 -0
  729. package/lib/uilogic/cloud-resource-configurators/unsupported-resource-configurator.js.map +1 -0
  730. package/lib/uilogic/enterprise-contextualizer.d.ts +76 -0
  731. package/lib/uilogic/enterprise-contextualizer.js +671 -0
  732. package/lib/uilogic/enterprise-contextualizer.js.map +1 -0
  733. package/lib/uilogic/environment-contextualizer.d.ts +15 -0
  734. package/lib/uilogic/environment-contextualizer.js +43 -0
  735. package/lib/uilogic/environment-contextualizer.js.map +1 -0
  736. package/lib/uilogic/i-cluster-configurator.d.ts +9 -0
  737. package/lib/uilogic/i-cluster-configurator.js +3 -0
  738. package/lib/uilogic/i-cluster-configurator.js.map +1 -0
  739. package/lib/uilogic/i-login-configurator.d.ts +6 -0
  740. package/lib/uilogic/i-login-configurator.js +3 -0
  741. package/lib/uilogic/i-login-configurator.js.map +1 -0
  742. package/lib/uilogic/i-registry-configurator.d.ts +6 -0
  743. package/lib/uilogic/i-registry-configurator.js +3 -0
  744. package/lib/uilogic/i-registry-configurator.js.map +1 -0
  745. package/lib/uilogic/i-secret-store-configurator.d.ts +7 -0
  746. package/lib/uilogic/i-secret-store-configurator.js +3 -0
  747. package/lib/uilogic/i-secret-store-configurator.js.map +1 -0
  748. package/lib/uilogic/image-configurator.d.ts +133 -0
  749. package/lib/uilogic/image-configurator.js +578 -0
  750. package/lib/uilogic/image-configurator.js.map +1 -0
  751. package/lib/uilogic/image-contextualizer.d.ts +24 -0
  752. package/lib/uilogic/image-contextualizer.js +90 -0
  753. package/lib/uilogic/image-contextualizer.js.map +1 -0
  754. package/lib/uilogic/image-registry-contextualizer.d.ts +28 -0
  755. package/lib/uilogic/image-registry-contextualizer.js +127 -0
  756. package/lib/uilogic/image-registry-contextualizer.js.map +1 -0
  757. package/lib/uilogic/index.d.ts +9 -0
  758. package/lib/uilogic/index.js +14 -0
  759. package/lib/uilogic/index.js.map +1 -0
  760. package/lib/uilogic/prompt-select-fuzzy.d.ts +0 -0
  761. package/lib/uilogic/prompt-select-fuzzy.js +139 -0
  762. package/lib/uilogic/prompt-select-fuzzy.js.map +1 -0
  763. package/lib/uilogic/render-methods.d.ts +12 -0
  764. package/lib/uilogic/render-methods.js +65 -0
  765. package/lib/uilogic/render-methods.js.map +1 -0
  766. package/lib/uilogic/tenant-contextualizer.d.ts +79 -0
  767. package/lib/uilogic/tenant-contextualizer.js +574 -0
  768. package/lib/uilogic/tenant-contextualizer.js.map +1 -0
  769. package/lib/user-context-loader.d.ts +60 -0
  770. package/lib/user-context-loader.js +184 -0
  771. package/lib/user-context-loader.js.map +1 -0
  772. package/oclif.manifest.json +8496 -0
  773. package/package.json +151 -0
  774. package/scaffolding/api/.gitignore-scaffolding +69 -0
  775. package/scaffolding/api/.vscode/launch.json +17 -0
  776. package/scaffolding/api/.vscode/settings.json +8 -0
  777. package/scaffolding/api/.vscode/tasks.json +16 -0
  778. package/scaffolding/api/src/app-config.json +3 -0
  779. package/scaffolding/api/src/index.ts-scaffolding +14 -0
  780. package/scaffolding/api/src/myApiDef.ts-scaffolding +26 -0
  781. package/scaffolding/default/.gitignore-scaffolding +2 -0
  782. package/scaffolding/typescript/.gitignore-scaffolding +69 -0
  783. package/scaffolding/typescript/.vscode/launch.json +17 -0
  784. package/scaffolding/typescript/.vscode/settings.json +8 -0
  785. package/scaffolding/typescript/.vscode/tasks.json +16 -0
  786. package/scaffolding/typescript/src/index.ts-scaffolding +1 -0
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
5
+ const YAML = require("yaml");
6
+ const command_base_enterprise_1 = require("../../command-base-enterprise");
7
+ const _ = require("lodash");
8
+ const render = require("../../uilogic/render-methods");
9
+ const render_methods_1 = require("../../uilogic/render-methods");
10
+ class EnvironmentList extends command_base_enterprise_1.CommandBaseEnterprise {
11
+ run() {
12
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ this.bootstrap();
14
+ const { args, flags } = yield this.parse(EnvironmentList);
15
+ try {
16
+ this._userCntx = yield this.establishTenantContext(this._userCntx);
17
+ let currentEnterprise = (yield this.establishEnterpriseContext()).enterprise;
18
+ // RETRIEVE
19
+ if ([render_methods_1.OutputFormatsEnum.json, render_methods_1.OutputFormatsEnum.yaml].includes(flags.output) === false)
20
+ this._ui.startSpinner("Retrieving");
21
+ let rootMap = yield this.getRootMap(currentEnterprise.code);
22
+ let envCount = 0;
23
+ rootMap.enterprises.forEach(e => envCount += e.environments.length);
24
+ if ([render_methods_1.OutputFormatsEnum.json, render_methods_1.OutputFormatsEnum.yaml].includes(flags.output) === false)
25
+ this._ui.stopSpinner(`found ${envCount}`);
26
+ // RENDER
27
+ let output = "";
28
+ switch (flags.output) {
29
+ case render_methods_1.OutputFormatsEnum.json:
30
+ let listForJson = this.FlattenEnviros(rootMap);
31
+ listForJson = _.sortBy(listForJson, e => e.enterprise, c => c.name);
32
+ output = JSON.stringify(listForJson, undefined, 2);
33
+ this._ui.userMessage(output);
34
+ break;
35
+ case render_methods_1.OutputFormatsEnum.yaml:
36
+ let listForYaml = this.FlattenEnviros(rootMap);
37
+ listForYaml = _.sortBy(listForYaml, c => c.enterprise, c => c.name);
38
+ output = YAML.stringify(listForYaml, { indent: 2 });
39
+ this._ui.userMessage(output);
40
+ break;
41
+ case render_methods_1.OutputFormatsEnum.text:
42
+ let flatList = this.FlattenEnviros(rootMap);
43
+ flatList = _.sortBy(flatList, c => c.enterprise, c => c.name);
44
+ let listForText = this.buildEnviroListForText(flatList);
45
+ output = render.renderStringList(listForText);
46
+ this._ui.userMessage(output);
47
+ break;
48
+ // TODO:
49
+ // case OutputFormatsEnum.table:
50
+ // case OutputFormatsEnum.tsv:
51
+ // break;
52
+ case render_methods_1.OutputFormatsEnum.tree:
53
+ default:
54
+ let envTree = this.buildEnviroTree(rootMap);
55
+ let out = render.renderStringTree(envTree); //, this._ui.userMessage);
56
+ this._ui.userMessage(out);
57
+ break;
58
+ }
59
+ // if ([OutputFormatsEnum.tree].includes(flags.output)) {
60
+ // let cabTree = this.buildCabinetTree(rootMap);
61
+ // let out = this.renderStringTree(cabTree); //, this._ui.userMessage);
62
+ // this._ui.userMessage(out);
63
+ // } else {
64
+ // let flatList: FlatCabinet[] = this.FlattenCabinets(rootMap);
65
+ // flatList = _.sortBy(flatList, c => c.enterprise, c => c.env, c => c.name)
66
+ // this.renderCabinets(flatList, flags.output);
67
+ // }
68
+ return;
69
+ }
70
+ catch (err) {
71
+ throw err;
72
+ }
73
+ });
74
+ }
75
+ buildEnviroListForText(flatList) {
76
+ try {
77
+ let listForText = flatList.map(env => {
78
+ let clusterDesc = this.buildEnviroClusterDesc(env.clusters);
79
+ return `${env.enterprise}/${this._styler.hilite(env.name)}${this._styler.dim(clusterDesc)}`;
80
+ });
81
+ return listForText;
82
+ }
83
+ catch (err) {
84
+ throw err;
85
+ }
86
+ }
87
+ buildEnviroClusterDesc(clusters) {
88
+ try {
89
+ let clusterDesc = "";
90
+ if (clusters.length > 0) {
91
+ if (clusters.length === 1) {
92
+ // Only 1, show provider and location
93
+ clusterDesc = ` ${clusters[0].name} (${clusters[0].provider}, ${clusters[0].locationName})`;
94
+ }
95
+ else {
96
+ // Many, list providers of clusters
97
+ let byProvider = _.groupBy(clusters, c => c.provider);
98
+ let delim = "";
99
+ for (let provider in byProvider) {
100
+ let qty = byProvider[provider].length;
101
+ clusterDesc = clusterDesc.concat(delim, `${qty} ${provider}`);
102
+ delim = ", ";
103
+ }
104
+ if (clusterDesc == "")
105
+ clusterDesc = ` (${clusterDesc})`;
106
+ }
107
+ }
108
+ return clusterDesc;
109
+ }
110
+ catch (err) {
111
+ throw err;
112
+ }
113
+ }
114
+ buildEnviroTree(rootMap) {
115
+ var _a;
116
+ let tree = [];
117
+ for (let ent of rootMap.enterprises) {
118
+ let entBranch = { text: `${ent.name} enterprise:` };
119
+ for (let env of _.sortBy(ent.environments, e => e.sequence, e => e.name)) {
120
+ let clusterDesc = this.buildEnviroClusterDesc((_a = env.clusters) !== null && _a !== void 0 ? _a : []);
121
+ let envBranch = {
122
+ text: `${this._styler.hilite(env.name)}${this._styler.dim(clusterDesc)} `
123
+ };
124
+ if (entBranch.children === undefined)
125
+ entBranch.children = [];
126
+ entBranch.children.push(envBranch);
127
+ }
128
+ tree.push(entBranch);
129
+ }
130
+ return tree;
131
+ }
132
+ FlattenEnviros(rootMap) {
133
+ var _a;
134
+ let flattened = [];
135
+ for (let ent of rootMap.enterprises) {
136
+ for (let env of _.sortBy(ent.environments, e => e.sequence, e => e.name)) {
137
+ flattened.push({
138
+ name: env.name,
139
+ sequence: env.sequence,
140
+ enterprise: ent.name,
141
+ clusters: (_a = env.clusters) !== null && _a !== void 0 ? _a : []
142
+ });
143
+ }
144
+ }
145
+ return flattened;
146
+ }
147
+ }
148
+ exports.default = EnvironmentList;
149
+ EnvironmentList.description = 'Shows the list of environments.';
150
+ EnvironmentList.aliases = ["enviro:list"];
151
+ EnvironmentList.flags = {
152
+ output: core_1.Flags.enum({ char: 'o', default: render_methods_1.OutputFormatsEnum.tree, description: "format in which to render the data.", options: [render_methods_1.OutputFormatsEnum.json, render_methods_1.OutputFormatsEnum.yaml, render_methods_1.OutputFormatsEnum.tree, render_methods_1.OutputFormatsEnum.text] }),
153
+ help: core_1.Flags.help({ char: 'h', description: 'Displays the help document for this command.' })
154
+ };
155
+ EnvironmentList.args = [];
156
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/environment/list.ts"],"names":[],"mappings":";;;AAAA,sCAA4C;AAC5C,6BAA6B;AAE7B,2EAAsE;AACtE,4BAA6B;AAC7B,uDAAuD;AACvD,iEAA+E;AAO/E,MAAqB,eAAgB,SAAQ,+CAAqB;IAW1D,GAAG;;YACP,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI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I,EAAE,kCAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;IACjO,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;CAC7F,CAAA;AAEM,oBAAI,GAAG,EAAE,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { CommandBaseEnterprise } from '../../command-base-enterprise';
2
+ export declare class PromptDefForString {
3
+ promptText: string;
4
+ promptId: string;
5
+ isValid: (val: string) => boolean;
6
+ getFromUser: (defaultVal: string | undefined) => Promise<string>;
7
+ constructor(promptText: string, promptId: string, isValid: (val: string) => boolean, getFromUser: (defaultVal: string | undefined) => Promise<string>);
8
+ }
9
+ export default class FilestoreCapture extends CommandBaseEnterprise {
10
+ static description: string;
11
+ static aliases: string[];
12
+ static dependsOn: string[];
13
+ static flags: {
14
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
15
+ enterprise: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
16
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
17
+ providerSubscriptionId: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
18
+ resourceGroup: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
19
+ storageAccount: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
20
+ shareName: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
21
+ silent: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
22
+ };
23
+ run(): Promise<void>;
24
+ /** Implements the confirm default or prompt for value pattern. */
25
+ private confirmOrPrompt;
26
+ private localCache;
27
+ private promptForSubscription;
28
+ private createFileStoreDef;
29
+ /** Facory method for building a FileStoreDef from a fileshare */
30
+ private buildFileStoreDef;
31
+ }
@@ -0,0 +1,342 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromptDefForString = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@oclif/core");
6
+ const contracts_1 = require("../../apis/codiac-relay/contracts");
7
+ const command_base_enterprise_1 = require("../../command-base-enterprise");
8
+ const prettify_1 = require("../../prettify");
9
+ class PromptDefForString {
10
+ constructor(promptText, promptId, isValid, getFromUser) {
11
+ this.promptText = promptText;
12
+ this.promptId = promptId;
13
+ this.isValid = isValid;
14
+ this.getFromUser = getFromUser;
15
+ }
16
+ }
17
+ exports.PromptDefForString = PromptDefForString;
18
+ class FilestoreCapture extends command_base_enterprise_1.CommandBaseEnterprise {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.localCache = {};
22
+ }
23
+ run() {
24
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
+ return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
26
+ var _a, _b;
27
+ try {
28
+ this.bootstrap();
29
+ const { args, flags } = yield this.parse(FilestoreCapture);
30
+ this._userCntx = yield this.establishTenantContext(this._userCntx);
31
+ yield this.establishEnterpriseContext(flags.enterprise);
32
+ let partial = {};
33
+ partial.name = flags.name;
34
+ partial.providerSubscriptionId = flags.providerSubscriptionId;
35
+ partial.resourceGroup = flags.resourceGroup;
36
+ partial.storageAccount = flags.storageAccount;
37
+ partial.shareName = flags.shareName;
38
+ let candidate;
39
+ if (!flags.silent) {
40
+ let confirmed = false;
41
+ while (!confirmed) {
42
+ let csp = contracts_1.CloudProviderEnum.azure; // TODO: Add support for filestores in other csps
43
+ let azUser = yield this.cspContextualizer.promptForCloudProviderCreds(this.ioc, csp);
44
+ // FROM HERE ON, IT'S ONLY AZURE...
45
+ // CLOUD PROVIDER SUBSCRIPTION
46
+ partial.providerSubscriptionId = yield this.promptForSubscription(azUser, partial.providerSubscriptionId);
47
+ // Storage Account
48
+ // let authenticator = new AzureAuthenticator(this.logger);
49
+ // let client = new AzureStorageClient(authenticator, this.logger);
50
+ // let saResult = await client.getStorageAccounts(partial.providerSubscriptionId);
51
+ let saResult = yield this.relayClient.getStorageAccounts(csp, partial.providerSubscriptionId);
52
+ if (saResult.success && saResult.output && saResult.output.length > 0) {
53
+ let choices = (saResult.output).map(x => x.name);
54
+ let storageName = (yield this._ui.promptSelect("storageAccount", "select the storage account", choices));
55
+ let storage = (saResult.output).find(x => x.name == storageName); // these casts may be due to muiltiple copies of the entity)
56
+ // We have to parse the resourceGroup out of the id bc M$ doesnt return it anywhere else. Yeah, dont you just love those guys :|
57
+ let rg = new RegExp(/\/resourceGroups\/([^\/]+)\//).exec(storage.id)[1];
58
+ // Storage Account Key
59
+ // let keyResults = await client.getStorageAccountKeys(partial.providerSubscriptionId, rg, storage.name);
60
+ let keyResults = yield this.relayClient.getStorageAccountKeys(csp, partial.providerSubscriptionId, rg, storage.name);
61
+ if (keyResults.success && keyResults.output && keyResults.output.length > 0) {
62
+ let accountKey = keyResults.output[0].value;
63
+ // File Store
64
+ let fileStores;
65
+ try {
66
+ fileStores = yield this.relayClient.getFileStores(partial.providerSubscriptionId, storage, rg, accountKey);
67
+ }
68
+ catch (err) {
69
+ this.logger.debug(`Error retrieving filestores (you or your machine may not have access to list them: ${err.message || "err.stack"}`, err);
70
+ this._ui.userMessage(`We are having trouble listing the fileshares in storage account [${storage.name}].`);
71
+ let fileshareName = (yield this._ui.prompt("fileshareName", `Please manually enter the fileshare name`, true, storage.name));
72
+ candidate = this.buildFileStoreDef(partial.providerSubscriptionId, storage, rg, accountKey, (_a = partial.shareName) !== null && _a !== void 0 ? _a : fileshareName);
73
+ }
74
+ if (fileStores !== undefined) {
75
+ if (fileStores.length > 0) {
76
+ // TODO: get the one they called out for in the args
77
+ let fsName = yield this._ui.promptSelect("resourceId", "Select a file store", fileStores.map(f => f.name));
78
+ candidate = fileStores.find(f => f.name == fsName); // we can force this - we selected from this list.
79
+ }
80
+ else {
81
+ this._ui.userMessage(`No filestores found in that storage account.`);
82
+ }
83
+ }
84
+ if (candidate && candidate.instance) {
85
+ candidate.name = (yield this._ui.prompt("name", "Refer to as:", true, (_b = partial.name) !== null && _b !== void 0 ? _b : candidate.shareName));
86
+ // candidate.instance.accessKey = (await this._ui.prompt("accessKey", "Access Key for this filestore"))!;
87
+ // Confirm
88
+ console.clear();
89
+ this._ui.userMessage((0, prettify_1.prettify)(candidate));
90
+ confirmed = yield this._ui.promptConfirm("filestore", `You have selected [${candidate.storageAccount}/${candidate.shareName}]. Is this correct?`, true);
91
+ }
92
+ }
93
+ }
94
+ else if (saResult.error !== undefined) {
95
+ throw saResult.error;
96
+ }
97
+ else {
98
+ this._ui.userMessage(`No filestores found in that subscription`);
99
+ partial.providerSubscriptionId = undefined;
100
+ }
101
+ }
102
+ }
103
+ // TODO: if silent, convert partial to a candidate.
104
+ if (candidate) {
105
+ // this._ui.userMessage(prettify(candidate));
106
+ // this._ui.userMessage(`You are about to add this new filestore as ${this._styler.bold(this._styler.hilite(candidate.name))} [Tenant: ${this._userCntx.currentTenantCode}].`);
107
+ // let confirmResult = await this._ui.promptConfirm("confirmCapture","Continue?", false)
108
+ // if (confirmResult == true) {
109
+ yield this.createFileStoreDef(candidate);
110
+ // } else {
111
+ // this.logger.notice(`Operation cancelled. No work was done.`);
112
+ // this._ui.userMessage(`Operation cancelled. No work was done.`);
113
+ // }
114
+ }
115
+ resolve();
116
+ }
117
+ catch (err) {
118
+ this.logger.error(err);
119
+ resolve();
120
+ }
121
+ }));
122
+ });
123
+ }
124
+ /** Implements the confirm default or prompt for value pattern. */
125
+ confirmOrPrompt(promptDef, defaultValue, defaultValueDisplay) {
126
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
127
+ try {
128
+ let output;
129
+ let keepDefault = false;
130
+ if (defaultValue && promptDef.isValid(defaultValue)) {
131
+ keepDefault = yield this._ui.promptConfirm(`keep${promptDef.promptId}`, `${promptDef.promptText}: ${defaultValueDisplay !== null && defaultValueDisplay !== void 0 ? defaultValueDisplay : defaultValue}`);
132
+ }
133
+ if (keepDefault === true && defaultValue !== undefined) {
134
+ output = defaultValue;
135
+ }
136
+ else {
137
+ output = yield promptDef.getFromUser(defaultValue);
138
+ }
139
+ return output;
140
+ }
141
+ catch (err) {
142
+ throw err;
143
+ }
144
+ });
145
+ }
146
+ promptForSubscription(azUser, defaultValue) {
147
+ var _a;
148
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
149
+ try {
150
+ let subxId;
151
+ if (this.localCache.subscriptions === undefined) {
152
+ let subxResult = yield this.genRelayClient.Call.getAzureSubscriptions({ azUser: azUser });
153
+ if (subxResult.error)
154
+ throw subxResult.error;
155
+ this.localCache.subscriptions = (_a = subxResult.output) !== null && _a !== void 0 ? _a : [];
156
+ }
157
+ let subxs = this.localCache.subscriptions;
158
+ let subx = (defaultValue !== undefined) ? subxs.find(s => s.id === defaultValue) : undefined;
159
+ let defaultValueDisplay = (subx !== undefined) ? `${this._styler.hilite(subx.name)} (${subx.id})` : undefined;
160
+ let promptDef = {
161
+ promptId: "subxId",
162
+ promptText: "Provider subscription",
163
+ isValid: (defaultVal) => Boolean(subx !== undefined),
164
+ getFromUser: (defaultVal) => tslib_1.__awaiter(this, void 0, void 0, function* () {
165
+ let choices = (subxs).map(s => { return { name: `${s.name} (as ${s.user.name})`, value: s.id }; });
166
+ subxId = (yield this._ui.promptSelect("providerSubscriptionId", "select the cloud provider subscription", choices));
167
+ return subxId;
168
+ })
169
+ };
170
+ subxId = yield this.confirmOrPrompt(promptDef, defaultValue, defaultValueDisplay);
171
+ // let isValid = (sid: string) => Boolean(subx !== undefined);
172
+ // let keepDefault = false;
173
+ // if (defaultValue && isValid(defaultValue)) {
174
+ // keepDefault = await this._ui.promptConfirm("keepSubxId", `Provider subscription: ${this._styler.hilite(subx!.name)} (${subx!.id})`);
175
+ // }
176
+ // if (keepDefault === true && defaultValue !== undefined) {
177
+ // subxId = defaultValue;
178
+ // } else {
179
+ // let choices = (subxs).map(s => { return { name: `${s.name} (as ${s.user.name})`, value: s.id } });
180
+ // subxId = (await this._ui.promptSelect<string>("providerSubscriptionId", "select the cloud provider subscription", choices))!;
181
+ // }
182
+ return subxId;
183
+ }
184
+ catch (err) {
185
+ throw err;
186
+ }
187
+ });
188
+ }
189
+ // /** Facory method for building a FileStoreDef from a fileshare */
190
+ // private buildFileStoreDef(providerSubscriptionId: string, storageAccount: StorageAccount, resourceGroup: string, accountKey: string, fileShareName: string): FileStoreDef {
191
+ // let def: FileStoreDef = {
192
+ // id: undefined,
193
+ // name: fileShareName,
194
+ // providerSubscriptionId: providerSubscriptionId,
195
+ // resourceGroup: resourceGroup,
196
+ // storageAccount: storageAccount.name,
197
+ // shareName: fileShareName,
198
+ // type: FileStoreTypeEnum.AzureFileStorage,
199
+ // instance: {
200
+ // accessKey: accountKey,
201
+ // providerSubscriptionId: providerSubscriptionId,
202
+ // resourceGroup: resourceGroup,
203
+ // resourceId: storageAccount.id!
204
+ // },
205
+ // created: new Date(Date.now()),
206
+ // createdBy: this._userCntx.userName,
207
+ // modified: new Date(Date.now()),
208
+ // modifiedBy: this._userCntx.userName
209
+ // };
210
+ // return def;
211
+ // }
212
+ // /** Retrieves the list of existing filestores available in the given cloud subscription.
213
+ // * Throws any exceptions.
214
+ // *
215
+ // * NOTE: It may be possible that the user has access to browse storage accounts,
216
+ // * but not the list of fileshares, which will yield this message from the fileshare page in the Azure portal:
217
+ // *
218
+ // * ***This machine doesn't seem to have access.***
219
+ // *
220
+ // * *This browser doesn`t seem to be able to reach the necessary data plane APIs that interact with the files in an Azure file share. Interacting with share content is different from managing the Azure file share. Managing the share from this browser could be possible while accessing operations like listing the contents of a file share might not be. This is an issue reported from your side of the network. Check that your machine, from the network it is connected to, is expected to have access. If that is the case, check your networking configuration (proxy configuration, IP rules, Azure network settings for storage, etc) in your organization to ensure Azure services can be fully accessed.*
221
+ // */
222
+ // private async getAllFileStores(providerSubscriptionId: string, storageAccount: StorageAccount, resourceGroup: string, accountKey: string): Promise<FileStoreDef[]> {
223
+ // return new Promise<FileStoreDef[]>(async (resolve, reject) => {
224
+ // let results: FileStoreDef[] = [];
225
+ // try {
226
+ // // Fileshares
227
+ // // see: https://docs.microsoft.com/en-us/rest/api/storagerp/file-shares/list#code-try-0
228
+ // // REST call:
229
+ // // GET https://management.azure.com/subscriptions/0493a4c9-2bc6-4e5a-aee6-57ee4906c3cd/resourceGroups/appdev-fileshare-eastus2-rg/providers/Microsoft.Storage/storageAccounts/appdevfileshare/fileServices/default/shares?api-version=2021-04-01
230
+ // // Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCIsImtpZCI6Imwzc1EtNTBjQ0g0eEJWWkxIVEd3blNSNzY4MCJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8zM2VmOWM1NS01YTI4LTQxZmUtOTM0NS00MDE4NzBiZWU4ZWEvIiwiaWF0IjoxNjI5Mzk2NTAyLCJuYmYiOjE2MjkzOTY1MDIsImV4cCI6MTYyOTQwMDQwMiwiYWNyIjoiMSIsImFpbyI6IkUyWmdZRmg5WURjdjI2d2t2VVB2ZzUxdUwrcWUxdFI5c2VQOGdsRGgzTWRzY3NXVEhjSUEiLCJhbXIiOlsicHdkIl0sImFwcGlkIjoiN2Y1OWE3NzMtMmVhZi00MjljLWEwNTktNTBmYzViYjI4YjQ0IiwiYXBwaWRhY3IiOiIyIiwiZmFtaWx5X25hbWUiOiJGcmV5ZGwiLCJnaXZlbl9uYW1lIjoiTWFyayIsImdyb3VwcyI6WyJiZWQ1ZmNmNi03NWRkLTRjMTgtYjY1MS0zOGM3ZmNmMjZmZWIiLCJjYzgxYzViMy0wZGY3LTQ4ZjktYTI4Ny00ZWUzNzdkNGUyNzMiXSwiaXBhZGRyIjoiMTA3Ljc3LjIyMC4xNTAiLCJuYW1lIjoiRnJleWRsLCBNYXJrIiwib2lkIjoiYjAzNDUwMDUtYjU5MC00YjAzLWJmYjctOTY0Njg3YWRjMzljIiwib25wcmVtX3NpZCI6IlMtMS01LTIxLTEwMDQyODg3OTMtMzYwNTg3NzAyMy0yODI0Mzg2OTYyLTEyMzQiLCJwdWlkIjoiMTAwMzIwMDExMjVFMUZDRiIsInJoIjoiMC5BVVlBVlp6dk15aGFfa0dUUlVBWWNMN282bk9uV1gtdkxweENvRmxRX0Z1eWkwUkdBSTQuIiwic2NwIjoidXNlcl9pbXBlcnNvbmF0aW9uIiwic3ViIjoiNDVjTFpJdzJnQ1NHaXh6SE5CMTdHaHFJMV93c05LemRwdnFPYVJOVzhsSSIsInRpZCI6IjMzZWY5YzU1LTVhMjgtNDFmZS05MzQ1LTQwMTg3MGJlZThlYSIsInVuaXF1ZV9uYW1lIjoiTWFyay5GcmV5ZGxAY2hpYW1hc3MuZ292IiwidXBuIjoiTWFyay5GcmV5ZGxAY2hpYW1hc3MuZ292IiwidXRpIjoiN0p2Y2wzSUl2RW1ocmtmMmh4SDBBUSIsInZlciI6IjEuMCIsIndpZHMiOlsiYjc5ZmJmNGQtM2VmOS00Njg5LTgxNDMtNzZiMTk0ZTg1NTA5Il0sInhtc190Y2R0IjoxNTgzOTQ2OTYzfQ.oGZkPU9nAJi3BFDmCHBqYa44FrfQ0P07VczGl5iObYR06KuD45KNCxHqNdWcZPQfdNlohhT7yNUgzAr86qh6UQQRpx6CpZ9x-JjZIDFDjg7-F_OBxO0ZiNGuKhPO0W5W_VQUyWCdITJ1vBaMtzQA9rwwQ3gOLVeyYWe0TxNmvI1PY1AmT6X-qokjLv4hnwzZd5ZxXBrgjfa3rXP6dY9XFqiq6RJEQuxAcQufirDnw72boCsvPFTEcosnYTqGGI3IS4F1wtTdwt27wRiM3KNuMFtNm2_wuEnA5PvKxXOD0ohKektR4K_E-bt1OHAFixZY8te7yaBUbc3i6kaZSf4yaw
231
+ // // let azClient = ShareServiceClient.fromConnectionString(cnxnString);
232
+ // let creds = new StorageSharedKeyCredential(storageAccount.name, accountKey);
233
+ // this.logger.debug(`Shared Account key credential for Storage Account ${storageAccount.name}`, creds);
234
+ // if (!storageAccount.primaryEndpoints.file) {
235
+ // this.logger.debug(`No fileshare endpoint found in storage account [${storageAccount.name}].`);
236
+ // } else {
237
+ // let fileStoresEndpointUrl = storageAccount.primaryEndpoints.file; // https://${storageAccount.name}.file.core.windows.net
238
+ // let shareClient = new ShareServiceClient(fileStoresEndpointUrl, creds);
239
+ // let iterator = await shareClient.listShares();
240
+ // let i = 1;
241
+ // for await (const fileshare of iterator) {
242
+ // console.log(`Share${i}: ${fileshare.name}`);
243
+ // let def = this.buildFileStoreDef(providerSubscriptionId, storageAccount, resourceGroup, accountKey, fileshare.name);
244
+ // results.push(def);
245
+ // i++;
246
+ // }
247
+ // }
248
+ // resolve(results);
249
+ // } catch (err) {
250
+ // reject(err);
251
+ // }
252
+ // });
253
+ // }
254
+ createFileStoreDef(candidate) {
255
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
256
+ return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
257
+ var _a, _b;
258
+ try {
259
+ let result = yield this._codiacApi.FileStoreDef.tryCreate(candidate);
260
+ if (result.error)
261
+ throw result.error;
262
+ if (!result.success || !result.output)
263
+ throw new Error(`Failed without error writing FileStoreDef record [${candidate.name}]: ${result.message}.`);
264
+ this.logger.notice(`${this._styler.colorGood("SUCCESS!")} Created new fileStoreDef record ${this._styler.bold(this._styler.hilite(candidate.name))}.`, result.output);
265
+ this._ui.userMessage(`${this._styler.colorGood("SUCCESS!")} Created new fileStoreDef record ${this._styler.bold(this._styler.hilite(candidate.name))}.`);
266
+ resolve();
267
+ }
268
+ catch (err) {
269
+ this.logger.error((_b = (_a = err.message) !== null && _a !== void 0 ? _a : err.stack) !== null && _b !== void 0 ? _b : err, candidate);
270
+ resolve();
271
+ // reject(err);
272
+ }
273
+ }));
274
+ });
275
+ }
276
+ // Migrated to relay
277
+ // /** Returns the list of subscriptions to which the currently logged in user has access. */
278
+ // private getAvailableSubscriptions(): Promise<{ name: string, id: string, user: { name: string } }[]> {
279
+ // return new Promise<{ name: string, id: string, user: { name: string } }[]>(async (resolve, reject) => {
280
+ // let results: { name: string, id: string, user: { name: string } }[] = [];
281
+ // try {
282
+ // // Magic happens here...
283
+ // let cmd = `az account list -o json`;
284
+ // let result = await this.execAsync(cmd);
285
+ // // TODO: provide only subscriptions for the current tenant
286
+ // // let tenantCmd = `az account show --query tenantId -o tsv`;
287
+ // // let cloudTenantId = "33ef9c55-5a28-41fe-9345-401870bee8ea";
288
+ // // let cmdForTenant = `az account list -o json --query "[?tenantId=='${cloudTenantId}'].{ name: name, value: id }"`;
289
+ // if (result.stderr) {
290
+ // this._ui.userMessage(`Error getting available Azure subscriptions: ${result.stderr}`);
291
+ // throw new Error(`Error getting available Azure subscriptions: ${result.stderr}`)
292
+ // } else {
293
+ // let json = result.stdout
294
+ // results = JSON.parse(json);
295
+ // resolve(results);
296
+ // }
297
+ // } catch (err) {
298
+ // reject(err);
299
+ // }
300
+ // });
301
+ // }
302
+ /** Facory method for building a FileStoreDef from a fileshare */
303
+ buildFileStoreDef(providerSubscriptionId, storageAccount, resourceGroup, accountKey, fileShareName) {
304
+ let def = {
305
+ id: undefined,
306
+ name: fileShareName,
307
+ providerSubscriptionId: providerSubscriptionId,
308
+ resourceGroup: resourceGroup,
309
+ storageAccount: storageAccount.name,
310
+ shareName: fileShareName,
311
+ type: contracts_1.FileStoreTypeEnum.AzureFileStorage,
312
+ instance: {
313
+ accessKey: accountKey,
314
+ providerSubscriptionId: providerSubscriptionId,
315
+ resourceGroup: resourceGroup,
316
+ resourceId: storageAccount.id
317
+ },
318
+ created: new Date(Date.now()),
319
+ createdBy: this._userCntx.userName,
320
+ modified: new Date(Date.now()),
321
+ modifiedBy: this._userCntx.userName
322
+ };
323
+ return def;
324
+ }
325
+ }
326
+ exports.default = FilestoreCapture;
327
+ FilestoreCapture.description = 'Creates a reference point in the given enterprise for an existing filestore instance in a cloud provider subscription.';
328
+ FilestoreCapture.aliases = ['fileshare:capture'];
329
+ FilestoreCapture.dependsOn = ["enterprise", "name", "storageAccount", "shareName", "providerSubscriptionId", "resourceId", "accessKey"];
330
+ FilestoreCapture.flags = {
331
+ help: core_1.Flags.help({ char: 'h' }),
332
+ enterprise: core_1.Flags.string({ char: 'e', required: false, description: 'The name of the enterprise in which to create this asset. (defaults to the current enterprise context)' }),
333
+ name: core_1.Flags.string({ char: 'n', required: false, description: "The name by which to identify this fileshare definition within the enterprise (Optional: defaults to the shareName)." }),
334
+ providerSubscriptionId: core_1.Flags.string({ required: false, description: 'The identifier of the cloud provider subscription under which the file storage account resides.' }),
335
+ resourceGroup: core_1.Flags.string({ required: false, description: 'The name of the Azure resource group under which the instance is to be created (Azure-specific).' }),
336
+ storageAccount: core_1.Flags.string({ required: false, description: 'The name within the cloud provider of the file storage account within which the share resides.' }),
337
+ shareName: core_1.Flags.string({ required: false, description: 'The name of the fileshare to connect to within the file storage account.' }),
338
+ // resourceId: flags.string({ required: false, description: 'The unique identifier given by the cloud provider to the file storage account.'}),
339
+ // accessKey: flags.string({ required: false, description: 'The key generated upon creation of the FileStore, to enable the consumer to attach to it.'}),
340
+ silent: core_1.Flags.boolean({ char: 'y', dependsOn: FilestoreCapture.dependsOn, required: false, description: `(Optional: defaults to false) Prevents confirmations of user-values that are remembered from prior runs. Requires: ${FilestoreCapture.dependsOn}` })
341
+ };
342
+ //# sourceMappingURL=capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.js","sourceRoot":"","sources":["../../../src/commands/filestore/capture.ts"],"names":[],"mappings":";;;;AAAA,sCAA4C;AAE5C,iEAAyF;AACzF,2EAAsE;AACtE,6CAA0C;AAK1C,MAAa,kBAAkB;IAE3B,YACW,UAAkB,EAClB,QAAgB,EAChB,OAAiC,EACjC,WAAgE;QAHhE,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAA0B;QACjC,gBAAW,GAAX,WAAW,CAAqD;IAG3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AAG;IACX,IAAI,EAAE,YAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;IAC/B,UAAU,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,wGAAwG,EAAE,CAAC;IAC/K,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,sHAAsH,EAAE,CAAC;IACvL,sBAAsB,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,iGAAiG,EAAE,CAAC;IACzK,aAAa,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mGAAmG,EAAE,CAAC;IAClK,cAAc,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gGAAgG,EAAE,CAAC;IAChK,SAAS,EAAE,YAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0EAA0E,EAAE,CAAC;IACrI,+IAA+I;IAC/I,yJAAyJ;IACzJ,MAAM,EAAE,YAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,sHAAsH,gBAAgB,CAAC,SAAS,EAAE,EAAE,CAAC;CAChQ,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { CommandBaseEnterprise } from '../../command-base-enterprise';
2
+ export default class HostMap extends CommandBaseEnterprise {
3
+ static description: string;
4
+ static aliases: string[];
5
+ static flags: {
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ naming: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
+ enterprise: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
9
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
+ cabinet: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
+ noninteractive: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ static args: {
14
+ name: string;
15
+ required: boolean;
16
+ description: string;
17
+ }[];
18
+ run(): Promise<void>;
19
+ private validateGivenNaming;
20
+ /** Returns a sorted array of all available scope targets for the given level. */
21
+ private getAvailableTargets;
22
+ /** Parses the fully-qualified scope from the selected target,
23
+ * which was built by this.getAvailableTargets().
24
+ */
25
+ parseSelectedTarget(level: "enterprise" | "environment" | "cabinet", selected: string): {
26
+ level: string;
27
+ target: string;
28
+ enterprise?: string | undefined;
29
+ };
30
+ /** Returns the requested target by name if it exists in the available scopes.
31
+ * Returns undefined otherwise.
32
+ * Throws on an invalid scopes if not interactive.
33
+ */
34
+ private validateGivenTarget;
35
+ }