@codiac.io/codiac-cli 1.2.127 → 1.2.133

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 (312) hide show
  1. package/lib/apis/codiac-relay/gen/client.d.ts +1 -1
  2. package/lib/apis/codiac-relay/gen/client.js +13 -13
  3. package/lib/apis/codiac-relay/gen/client.js.map +1 -1
  4. package/lib/cli-common/ImagesList.d.ts +0 -0
  5. package/lib/cli-common/ImagesList.js +67 -0
  6. package/lib/cli-common/ImagesList.js.map +1 -0
  7. package/lib/cli-common/argument-manager.d.ts +28 -0
  8. package/lib/cli-common/argument-manager.js +195 -0
  9. package/lib/cli-common/argument-manager.js.map +1 -0
  10. package/lib/cli-common/built-in-cli-user-input.d.ts +18 -0
  11. package/lib/cli-common/built-in-cli-user-input.js +310 -0
  12. package/lib/cli-common/built-in-cli-user-input.js.map +1 -0
  13. package/lib/cli-common/cli-interfaces.d.ts +0 -0
  14. package/lib/cli-common/cli-interfaces.js +7 -0
  15. package/lib/cli-common/cli-interfaces.js.map +1 -0
  16. package/lib/cli-common/command-base.d.ts +74 -0
  17. package/lib/cli-common/command-base.js +173 -0
  18. package/lib/cli-common/command-base.js.map +1 -0
  19. package/lib/cli-common/entities/index.d.ts +1 -0
  20. package/lib/cli-common/entities/index.js +5 -0
  21. package/lib/cli-common/entities/index.js.map +1 -0
  22. package/lib/cli-common/entities/prompt-choice.d.ts +7 -0
  23. package/lib/cli-common/entities/prompt-choice.js +3 -0
  24. package/lib/cli-common/entities/prompt-choice.js.map +1 -0
  25. package/lib/cli-common/file-selector.d.ts +48 -0
  26. package/lib/cli-common/file-selector.js +187 -0
  27. package/lib/cli-common/file-selector.js.map +1 -0
  28. package/lib/cli-common/i-user-input-provider.d.ts +0 -0
  29. package/lib/cli-common/i-user-input-provider.js +19 -0
  30. package/lib/cli-common/i-user-input-provider.js.map +1 -0
  31. package/lib/cli-common/index.d.ts +4 -0
  32. package/lib/cli-common/index.js +11 -0
  33. package/lib/cli-common/index.js.map +1 -0
  34. package/lib/cli-common/mock-ui.d.ts +27 -0
  35. package/lib/cli-common/mock-ui.js +83 -0
  36. package/lib/cli-common/mock-ui.js.map +1 -0
  37. package/lib/cli-common/prompt-select-fuzzy.d.ts +19 -0
  38. package/lib/cli-common/prompt-select-fuzzy.js +119 -0
  39. package/lib/cli-common/prompt-select-fuzzy.js.map +1 -0
  40. package/lib/cli-common/tenant-contextualizer.d.ts +0 -0
  41. package/lib/cli-common/tenant-contextualizer.js +436 -0
  42. package/lib/cli-common/tenant-contextualizer.js.map +1 -0
  43. package/lib/cli-common/test/tenant-contextualizer.spec.d.ts +0 -0
  44. package/lib/cli-common/test/tenant-contextualizer.spec.js +143 -0
  45. package/lib/cli-common/test/tenant-contextualizer.spec.js.map +1 -0
  46. package/lib/command-base-enterprise.d.ts +3 -18
  47. package/lib/command-base-enterprise.js +8 -69
  48. package/lib/command-base-enterprise.js.map +1 -1
  49. package/lib/command-base-tenantless.d.ts +3 -3
  50. package/lib/command-base-tenantless.js +16 -16
  51. package/lib/command-base-tenantless.js.map +1 -1
  52. package/lib/commands/asset/create.js +28 -27
  53. package/lib/commands/asset/create.js.map +1 -1
  54. package/lib/commands/asset/probe/create.js +11 -11
  55. package/lib/commands/asset/probe/create.js.map +1 -1
  56. package/lib/commands/build.js +2 -2
  57. package/lib/commands/build.js.map +1 -1
  58. package/lib/commands/cabinet/create.js +2 -2
  59. package/lib/commands/cabinet/create.js.map +1 -1
  60. package/lib/commands/cabinet/obliterate.js +1 -1
  61. package/lib/commands/cabinet/obliterate.js.map +1 -1
  62. package/lib/commands/commit.js +1 -1
  63. package/lib/commands/commit.js.map +1 -1
  64. package/lib/commands/enterprise/create.js +2 -2
  65. package/lib/commands/enterprise/create.js.map +1 -1
  66. package/lib/commands/environment/create.js +2 -2
  67. package/lib/commands/environment/create.js.map +1 -1
  68. package/lib/commands/filestore/capture.d.ts +0 -2
  69. package/lib/commands/filestore/capture.js +34 -31
  70. package/lib/commands/filestore/capture.js.map +1 -1
  71. package/lib/commands/identity/delete.js +2 -2
  72. package/lib/commands/identity/delete.js.map +1 -1
  73. package/lib/commands/identity.js +3 -3
  74. package/lib/commands/identity.js.map +1 -1
  75. package/lib/commands/init.js +4 -4
  76. package/lib/commands/init.js.map +1 -1
  77. package/lib/commands/login.js +1 -1
  78. package/lib/commands/login.js.map +1 -1
  79. package/lib/commands/publish.d.ts +3 -0
  80. package/lib/commands/publish.js +7 -3
  81. package/lib/commands/publish.js.map +1 -1
  82. package/lib/commands/pull.js +1 -1
  83. package/lib/commands/pull.js.map +1 -1
  84. package/lib/commands/push.js +1 -1
  85. package/lib/commands/push.js.map +1 -1
  86. package/lib/commands/run.js +6 -6
  87. package/lib/commands/run.js.map +1 -1
  88. package/lib/commands/sync.js +1 -1
  89. package/lib/commands/sync.js.map +1 -1
  90. package/lib/commands/tenant/create.js +4 -4
  91. package/lib/commands/tenant/create.js.map +1 -1
  92. package/lib/commands/tenant/switch.js +4 -4
  93. package/lib/commands/tenant/switch.js.map +1 -1
  94. package/lib/ops/INTERFACES_CLI.d.ts +3 -0
  95. package/lib/ops/INTERFACES_CLI.js +8 -0
  96. package/lib/ops/INTERFACES_CLI.js.map +1 -0
  97. package/lib/ops/LocalOps.d.ts +444 -0
  98. package/lib/ops/LocalOps.js +3184 -0
  99. package/lib/ops/LocalOps.js.map +1 -0
  100. package/lib/ops/azure-container-registry-client/azure-container-registry-client.d.ts +0 -0
  101. package/lib/ops/azure-container-registry-client/azure-container-registry-client.js +148 -0
  102. package/lib/ops/azure-container-registry-client/azure-container-registry-client.js.map +1 -0
  103. package/lib/ops/cli-path-walker.d.ts +0 -0
  104. package/lib/ops/cli-path-walker.js +55 -0
  105. package/lib/ops/cli-path-walker.js.map +1 -0
  106. package/lib/ops/codiac-entities/dependency.d.ts +5 -0
  107. package/lib/ops/codiac-entities/dependency.js +11 -0
  108. package/lib/ops/codiac-entities/dependency.js.map +1 -0
  109. package/lib/ops/codiac-entities/index.d.ts +1 -0
  110. package/lib/ops/codiac-entities/index.js +5 -0
  111. package/lib/ops/codiac-entities/index.js.map +1 -0
  112. package/lib/ops/composite-image-registry-client.d.ts +0 -0
  113. package/lib/ops/composite-image-registry-client.js +74 -0
  114. package/lib/ops/composite-image-registry-client.js.map +1 -0
  115. package/lib/ops/data/cli-context-repo.d.ts +61 -0
  116. package/lib/ops/data/cli-context-repo.js +270 -0
  117. package/lib/ops/data/cli-context-repo.js.map +1 -0
  118. package/lib/ops/data/index.d.ts +2 -0
  119. package/lib/ops/data/index.js +6 -0
  120. package/lib/ops/data/index.js.map +1 -0
  121. package/lib/ops/data/npm-config-repo.d.ts +13 -0
  122. package/lib/ops/data/npm-config-repo.js +65 -0
  123. package/lib/ops/data/npm-config-repo.js.map +1 -0
  124. package/lib/ops/docker-config.d.ts +0 -0
  125. package/lib/ops/docker-config.js +131 -0
  126. package/lib/ops/docker-config.js.map +1 -0
  127. package/lib/ops/docker-constants.d.ts +0 -0
  128. package/lib/ops/docker-constants.js +22 -0
  129. package/lib/ops/docker-constants.js.map +1 -0
  130. package/lib/ops/docker-credentials-store.d.ts +0 -0
  131. package/lib/ops/docker-credentials-store.js +238 -0
  132. package/lib/ops/docker-credentials-store.js.map +1 -0
  133. package/lib/ops/docker-registry-api-client/docker-registry-api-client.d.ts +0 -0
  134. package/lib/ops/docker-registry-api-client/docker-registry-api-client.js +289 -0
  135. package/lib/ops/docker-registry-api-client/docker-registry-api-client.js.map +1 -0
  136. package/lib/ops/docker-registry-api-client/entities/blob-sum.d.ts +7 -0
  137. package/lib/ops/docker-registry-api-client/entities/blob-sum.js +13 -0
  138. package/lib/ops/docker-registry-api-client/entities/blob-sum.js.map +1 -0
  139. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.d.ts +5 -0
  140. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.js +10 -0
  141. package/lib/ops/docker-registry-api-client/entities/docker-access-actions-enum.js.map +1 -0
  142. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.d.ts +30 -0
  143. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.js +36 -0
  144. package/lib/ops/docker-registry-api-client/entities/docker-auth-token-criteria.js.map +1 -0
  145. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.d.ts +55 -0
  146. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.js +52 -0
  147. package/lib/ops/docker-registry-api-client/entities/i-docker-error-response.js.map +1 -0
  148. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.d.ts +7 -0
  149. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.js +3 -0
  150. package/lib/ops/docker-registry-api-client/entities/i-docker-list-response.js.map +1 -0
  151. package/lib/ops/docker-registry-api-client/entities/image-repository.d.ts +31 -0
  152. package/lib/ops/docker-registry-api-client/entities/image-repository.js +30 -0
  153. package/lib/ops/docker-registry-api-client/entities/image-repository.js.map +1 -0
  154. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.d.ts +8 -0
  155. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.js +14 -0
  156. package/lib/ops/docker-registry-api-client/entities/image-tag-criteria.js.map +1 -0
  157. package/lib/ops/docker-registry-api-client/entities/image-tag-list.d.ts +7 -0
  158. package/lib/ops/docker-registry-api-client/entities/image-tag-list.js +13 -0
  159. package/lib/ops/docker-registry-api-client/entities/image-tag-list.js.map +1 -0
  160. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.d.ts +9 -0
  161. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.js +15 -0
  162. package/lib/ops/docker-registry-api-client/entities/manifest-criteria.js.map +1 -0
  163. package/lib/ops/docker-registry-api-client/entities/manifest.d.ts +15 -0
  164. package/lib/ops/docker-registry-api-client/entities/manifest.js +21 -0
  165. package/lib/ops/docker-registry-api-client/entities/manifest.js.map +1 -0
  166. package/lib/ops/docker-registry-api-client/entities/repository-criteria.d.ts +16 -0
  167. package/lib/ops/docker-registry-api-client/entities/repository-criteria.js +24 -0
  168. package/lib/ops/docker-registry-api-client/entities/repository-criteria.js.map +1 -0
  169. package/lib/ops/docker-registry-api-client/entities/token-response.d.ts +15 -0
  170. package/lib/ops/docker-registry-api-client/entities/token-response.js +15 -0
  171. package/lib/ops/docker-registry-api-client/entities/token-response.js.map +1 -0
  172. package/lib/ops/docker-registry-api-client/entities/token.d.ts +17 -0
  173. package/lib/ops/docker-registry-api-client/entities/token.js +22 -0
  174. package/lib/ops/docker-registry-api-client/entities/token.js.map +1 -0
  175. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.d.ts +4 -0
  176. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.js +10 -0
  177. package/lib/ops/docker-registry-api-client/entities/version-check-criteria.js.map +1 -0
  178. package/lib/ops/dx-constants.d.ts +26 -0
  179. package/lib/ops/dx-constants.js +43 -0
  180. package/lib/ops/dx-constants.js.map +1 -0
  181. package/lib/ops/entities/ImageBuildContext.d.ts +12 -0
  182. package/lib/ops/entities/ImageBuildContext.js +19 -0
  183. package/lib/ops/entities/ImageBuildContext.js.map +1 -0
  184. package/lib/ops/entities/PipelineContext.d.ts +21 -0
  185. package/lib/ops/entities/PipelineContext.js +23 -0
  186. package/lib/ops/entities/PipelineContext.js.map +1 -0
  187. package/lib/ops/entities/TenantContext.d.ts +10 -0
  188. package/lib/ops/entities/TenantContext.js +16 -0
  189. package/lib/ops/entities/TenantContext.js.map +1 -0
  190. package/lib/ops/entities/ThaulConfig.d.ts +0 -0
  191. package/lib/ops/entities/ThaulConfig.js +30 -0
  192. package/lib/ops/entities/ThaulConfig.js.map +1 -0
  193. package/lib/ops/entities/azure-service-principal.d.ts +23 -0
  194. package/lib/ops/entities/azure-service-principal.js +24 -0
  195. package/lib/ops/entities/azure-service-principal.js.map +1 -0
  196. package/lib/ops/entities/better-logger.d.ts +0 -0
  197. package/lib/ops/entities/better-logger.js +2 -0
  198. package/lib/ops/entities/better-logger.js.map +1 -0
  199. package/lib/ops/entities/branch.d.ts +13 -0
  200. package/lib/ops/entities/branch.js +16 -0
  201. package/lib/ops/entities/branch.js.map +1 -0
  202. package/lib/ops/entities/cli-config.d.ts +48 -0
  203. package/lib/ops/entities/cli-config.js +61 -0
  204. package/lib/ops/entities/cli-config.js.map +1 -0
  205. package/lib/ops/entities/docker-image.d.ts +60 -0
  206. package/lib/ops/entities/docker-image.js +3 -0
  207. package/lib/ops/entities/docker-image.js.map +1 -0
  208. package/lib/ops/entities/helm-spec.d.ts +15 -0
  209. package/lib/ops/entities/helm-spec.js +23 -0
  210. package/lib/ops/entities/helm-spec.js.map +1 -0
  211. package/lib/ops/entities/index.d.ts +3 -0
  212. package/lib/ops/entities/index.js +11 -0
  213. package/lib/ops/entities/index.js.map +1 -0
  214. package/lib/ops/entities/scaffolding.d.ts +19 -0
  215. package/lib/ops/entities/scaffolding.js +21 -0
  216. package/lib/ops/entities/scaffolding.js.map +1 -0
  217. package/lib/ops/extensions/azart-identity-adapter.d.ts +19 -0
  218. package/lib/ops/extensions/azart-identity-adapter.js +97 -0
  219. package/lib/ops/extensions/azart-identity-adapter.js.map +1 -0
  220. package/lib/ops/extensions/npm-identity-adapter-base.d.ts +13 -0
  221. package/lib/ops/extensions/npm-identity-adapter-base.js +3 -0
  222. package/lib/ops/extensions/npm-identity-adapter-base.js.map +1 -0
  223. package/lib/ops/extensions/npmjs-identity-adapter.d.ts +13 -0
  224. package/lib/ops/extensions/npmjs-identity-adapter.js +64 -0
  225. package/lib/ops/extensions/npmjs-identity-adapter.js.map +1 -0
  226. package/lib/ops/git-ops.d.ts +8 -0
  227. package/lib/ops/git-ops.js +14 -0
  228. package/lib/ops/git-ops.js.map +1 -0
  229. package/lib/ops/i-client-for-image-registry.d.ts +0 -0
  230. package/lib/ops/i-client-for-image-registry.js +17 -0
  231. package/lib/ops/i-client-for-image-registry.js.map +1 -0
  232. package/lib/ops/i-identity-handler.d.ts +33 -0
  233. package/lib/ops/i-identity-handler.js +165 -0
  234. package/lib/ops/i-identity-handler.js.map +1 -0
  235. package/lib/ops/i-output-styler.d.ts +0 -0
  236. package/lib/ops/i-output-styler.js +17 -0
  237. package/lib/ops/i-output-styler.js.map +1 -0
  238. package/lib/ops/index.d.ts +12 -0
  239. package/lib/ops/index.js +15 -0
  240. package/lib/ops/index.js.map +1 -0
  241. package/lib/ops/json-utils.d.ts +0 -0
  242. package/lib/ops/json-utils.js +59 -0
  243. package/lib/ops/json-utils.js.map +1 -0
  244. package/lib/ops/no-style-output-styler.d.ts +0 -0
  245. package/lib/ops/no-style-output-styler.js +30 -0
  246. package/lib/ops/no-style-output-styler.js.map +1 -0
  247. package/lib/ops/oauth2-client.ts/oauth2-client.d.ts +23 -0
  248. package/lib/ops/oauth2-client.ts/oauth2-client.js +64 -0
  249. package/lib/ops/oauth2-client.ts/oauth2-client.js.map +1 -0
  250. package/lib/ops/project-initializer.d.ts +36 -0
  251. package/lib/ops/project-initializer.js +219 -0
  252. package/lib/ops/project-initializer.js.map +1 -0
  253. package/lib/ops/scaffolding/base-scaffolding.d.ts +7 -0
  254. package/lib/ops/scaffolding/base-scaffolding.js +21 -0
  255. package/lib/ops/scaffolding/base-scaffolding.js.map +1 -0
  256. package/lib/ops/scaffolding/codiac-api-scaffolding.d.ts +7 -0
  257. package/lib/ops/scaffolding/codiac-api-scaffolding.js +64 -0
  258. package/lib/ops/scaffolding/codiac-api-scaffolding.js.map +1 -0
  259. package/lib/ops/scaffolding/typescript-scaffolding.d.ts +15 -0
  260. package/lib/ops/scaffolding/typescript-scaffolding.js +163 -0
  261. package/lib/ops/scaffolding/typescript-scaffolding.js.map +1 -0
  262. package/lib/ops/test/mock-ui.d.ts +26 -0
  263. package/lib/ops/test/mock-ui.js +88 -0
  264. package/lib/ops/test/mock-ui.js.map +1 -0
  265. package/lib/ops/test/test-extensions.d.ts +13 -0
  266. package/lib/ops/test/test-extensions.js +71 -0
  267. package/lib/ops/test/test-extensions.js.map +1 -0
  268. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.d.ts +2 -0
  269. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.js +55 -0
  270. package/lib/ops/test/when-a-recursive-file-search-is-run.spec.js.map +1 -0
  271. package/lib/ops/test/when-git-branchline-is-attempted.spec.d.ts +2 -0
  272. package/lib/ops/test/when-git-branchline-is-attempted.spec.js +38 -0
  273. package/lib/ops/test/when-git-branchline-is-attempted.spec.js.map +1 -0
  274. package/lib/ops/test/when-versions-are-parsed.spec.d.ts +2 -0
  275. package/lib/ops/test/when-versions-are-parsed.spec.js +60 -0
  276. package/lib/ops/test/when-versions-are-parsed.spec.js.map +1 -0
  277. package/lib/ops/throwing-user-input-provider.d.ts +0 -0
  278. package/lib/ops/throwing-user-input-provider.js +37 -0
  279. package/lib/ops/throwing-user-input-provider.js.map +1 -0
  280. package/lib/relay/relay-container.js +1 -1
  281. package/lib/uilogic/build-configurator.d.ts +1 -1
  282. package/lib/uilogic/build-configurator.js +2 -2
  283. package/lib/uilogic/build-configurator.js.map +1 -1
  284. package/lib/uilogic/cloud-provider-contextualizer.d.ts +2 -1
  285. package/lib/uilogic/cloud-provider-contextualizer.js +8 -4
  286. package/lib/uilogic/cloud-provider-contextualizer.js.map +1 -1
  287. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.d.ts +1 -1
  288. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js +1 -1
  289. package/lib/uilogic/cloud-resource-configurators/aws-resource-configurator.js.map +1 -1
  290. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.d.ts +0 -16
  291. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.js +76 -83
  292. package/lib/uilogic/cloud-resource-configurators/az-acr-cli-authenticator.js.map +1 -1
  293. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.d.ts +1 -1
  294. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.js +4 -4
  295. package/lib/uilogic/cloud-resource-configurators/azure-resource-configurator.js.map +1 -1
  296. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.d.ts +4 -4
  297. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.js +7 -8
  298. package/lib/uilogic/cloud-resource-configurators/docker-hub-resource-configurator.js.map +1 -1
  299. package/lib/uilogic/enterprise-contextualizer.d.ts +1 -1
  300. package/lib/uilogic/enterprise-contextualizer.js +6 -1
  301. package/lib/uilogic/enterprise-contextualizer.js.map +1 -1
  302. package/lib/uilogic/i-login-configurator.d.ts +1 -1
  303. package/lib/uilogic/image-configurator.d.ts +0 -1
  304. package/lib/uilogic/image-configurator.js +27 -47
  305. package/lib/uilogic/image-configurator.js.map +1 -1
  306. package/lib/uilogic/image-contextualizer.js +2 -2
  307. package/lib/uilogic/image-contextualizer.js.map +1 -1
  308. package/lib/uilogic/tenant-contextualizer.d.ts +1 -1
  309. package/lib/uilogic/tenant-contextualizer.js +3 -3
  310. package/lib/uilogic/tenant-contextualizer.js.map +1 -1
  311. package/oclif.manifest.json +1 -1
  312. package/package.json +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli-common/entities/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC"}
@@ -0,0 +1,7 @@
1
+ /** Input object for the available options in a CLI select list.
2
+ * The `name` is what renders in the list,
3
+ * and the `value` is what actually gets returned from the selection. */
4
+ export type PromptChoice = {
5
+ value: string;
6
+ name: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=prompt-choice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-choice.js","sourceRoot":"","sources":["../../../src/cli-common/entities/prompt-choice.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ export declare const COMPLETED = "SELECTION_COMPLETED";
2
+ export declare const CANCELLED = "SELECTION_CANCELLED";
3
+ export declare const CHECKMARK = "\u2713";
4
+ /** Indicator of whether the user experience is to return files or directories. */
5
+ export declare enum EnumRetrievalMode {
6
+ file = "file",
7
+ directory = "directory"
8
+ }
9
+ /** Just documenting the options arg from cli-select-file, cuz they dont have a type def. */
10
+ export type CliSelectFileOptions = {
11
+ /** integer, Default value is 10 */
12
+ pageSize?: number;
13
+ /** Defaults to true to allow for selection of multiple files */
14
+ multi?: boolean;
15
+ /** Files that will initially be selected */
16
+ selectedFiles?: string[];
17
+ /** Defaults to true */
18
+ clearConsole?: boolean;
19
+ /** Where the user will initially be prompted to select files
20
+ Defaults to process.cwd() */
21
+ startingPath?: string;
22
+ /** The top level directory the user has access to
23
+ Defaults to process.cwd() */
24
+ root?: string;
25
+ /** Return false for any directory that you do not want to appear in the cli
26
+ ```
27
+ directoryFilter?: (directoryName) => {
28
+ return !/node_modules$/gi.test(directoryName);
29
+ },
30
+ ```
31
+ */
32
+ directoryFilter?: (directoryName: string) => boolean;
33
+ /** Return false for any file that you do not want to appear in the cli
34
+ ```
35
+ fileFilter: (fileName) => {
36
+ return !/index.js$/gi.test(fileName);
37
+ },
38
+ ```
39
+ */
40
+ fileFilter?: (fileName: string) => boolean;
41
+ /** Declares whether the user experience is intended to return files or directories (optional: defaults to file) */
42
+ mode?: EnumRetrievalMode;
43
+ };
44
+ export type CLISelectFileResult = {
45
+ selectedFiles: string[];
46
+ status: string;
47
+ };
48
+ export declare const selectFiles: (options?: CliSelectFileOptions) => Promise<CLISelectFileResult>;
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.selectFiles = exports.EnumRetrievalMode = exports.CHECKMARK = exports.CANCELLED = exports.COMPLETED = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fs = require('fs');
6
+ const path = require('path');
7
+ const inquirer = require('inquirer');
8
+ const chalk = require('chalk');
9
+ exports.COMPLETED = 'SELECTION_COMPLETED';
10
+ exports.CANCELLED = 'SELECTION_CANCELLED';
11
+ exports.CHECKMARK = '\u2713';
12
+ /** Indicator of whether the user experience is to return files or directories. */
13
+ var EnumRetrievalMode;
14
+ (function (EnumRetrievalMode) {
15
+ EnumRetrievalMode["file"] = "file";
16
+ EnumRetrievalMode["directory"] = "directory";
17
+ })(EnumRetrievalMode = exports.EnumRetrievalMode || (exports.EnumRetrievalMode = {}));
18
+ class FilesSystemService {
19
+ directories(directoryPath, directoryFilter = (dn) => true) {
20
+ return fs.readdirSync(directoryPath).filter((name) => {
21
+ const joinedPath = path.join(directoryPath, name);
22
+ return this.isDirectory(joinedPath) && directoryFilter(joinedPath);
23
+ });
24
+ }
25
+ files(directoryPath, fileFilter = (fileName) => true) {
26
+ return fs.readdirSync(directoryPath).filter((name) => {
27
+ const joinedPath = path.join(directoryPath, name);
28
+ return this.isFile(joinedPath) && fileFilter(joinedPath);
29
+ });
30
+ }
31
+ isDirectory(directoryPath) {
32
+ return fs.statSync(directoryPath).isDirectory();
33
+ }
34
+ isFile(filePath) {
35
+ return fs.statSync(filePath).isFile();
36
+ }
37
+ }
38
+ class FilesSelectionService extends Set {
39
+ constructor(selectedFiles) {
40
+ super(selectedFiles);
41
+ this.lastFileSelected = null;
42
+ }
43
+ get selectedFiles() {
44
+ return Array.from(this);
45
+ }
46
+ isSelected(file) {
47
+ return this.has(file);
48
+ }
49
+ selectFile(file) {
50
+ this.add(file);
51
+ this.lastFileSelected = file;
52
+ }
53
+ removeFile(file) {
54
+ this.delete(file);
55
+ }
56
+ }
57
+ class LocationService {
58
+ constructor(currentPath) {
59
+ this.currentPath = currentPath;
60
+ }
61
+ }
62
+ class OptionsService {
63
+ constructor(options) {
64
+ this.options = options;
65
+ this.options = Object.assign(Object.assign({}, this.defaultOptions), options);
66
+ }
67
+ get defaultOptions() {
68
+ return {
69
+ directoryFilter: () => true,
70
+ fileFilter: () => true,
71
+ root: process.cwd(),
72
+ startingPath: process.cwd(),
73
+ multi: false,
74
+ pageSize: 10,
75
+ selectedFiles: [],
76
+ clearConsole: true,
77
+ mode: EnumRetrievalMode.file
78
+ };
79
+ }
80
+ }
81
+ const selectFiles = function (options = {}) {
82
+ const optionsService = new OptionsService(options);
83
+ const locationService = new LocationService(optionsService.options.startingPath);
84
+ const fileSystemService = new FilesSystemService();
85
+ const filesSelectionService = new FilesSelectionService(optionsService.options.selectedFiles);
86
+ return new Promise((resolve) => {
87
+ (function promptUserToSelectFiles() {
88
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
89
+ const directories = fileSystemService.directories(locationService.currentPath, optionsService.options.directoryFilter);
90
+ if (locationService.currentPath !== optionsService.options.root) {
91
+ directories.unshift('..');
92
+ }
93
+ // Dont show any files if theyre looking for directories.
94
+ const files = (optionsService.options.mode == EnumRetrievalMode.directory) ? [] : fileSystemService.files(locationService.currentPath, optionsService.options.fileFilter);
95
+ const choices = [
96
+ ...directories.map((directoryName) => {
97
+ const value = path.join(locationService.currentPath, directoryName);
98
+ const name = chalk.yellow(directoryName);
99
+ return { value, name };
100
+ }),
101
+ ...files.map((fileName) => {
102
+ const value = path.join(locationService.currentPath, fileName);
103
+ const name = `${fileName} ${filesSelectionService.isSelected(value)
104
+ ? chalk.green(exports.CHECKMARK)
105
+ : ''}`;
106
+ return { value, name };
107
+ }),
108
+ ];
109
+ switch (optionsService.options.mode) {
110
+ case EnumRetrievalMode.directory:
111
+ // if (filesSelectionService.selectedFiles.length) {
112
+ choices.unshift({
113
+ name: chalk.green('. (Select this folder)'),
114
+ value: exports.COMPLETED,
115
+ });
116
+ // }
117
+ choices.push({
118
+ name: chalk.red('-- Cancel Folder Selection --'),
119
+ value: exports.CANCELLED,
120
+ });
121
+ break;
122
+ case EnumRetrievalMode.file:
123
+ if (filesSelectionService.selectedFiles.length) {
124
+ choices.push({
125
+ name: chalk.green('-- File Selection Complete --'),
126
+ value: exports.COMPLETED,
127
+ });
128
+ }
129
+ choices.push({
130
+ name: chalk.red('-- Cancel File Selection --'),
131
+ value: exports.CANCELLED,
132
+ });
133
+ break;
134
+ }
135
+ if (optionsService.options.clearConsole) {
136
+ console.clear();
137
+ }
138
+ const { selection } = yield inquirer.prompt([
139
+ {
140
+ type: 'list',
141
+ message: `Select file(s) in ${locationService.currentPath}`,
142
+ name: 'selection',
143
+ pageSize: optionsService.options.pageSize,
144
+ choices,
145
+ default: () => filesSelectionService.lastFileSelected,
146
+ },
147
+ ]);
148
+ if (optionsService.options.clearConsole) {
149
+ console.clear();
150
+ }
151
+ if (selection === exports.COMPLETED || selection === exports.CANCELLED) {
152
+ let result = {
153
+ selectedFiles: filesSelectionService.selectedFiles,
154
+ status: selection,
155
+ };
156
+ if (optionsService.options.mode == EnumRetrievalMode.directory) {
157
+ result.selectedFiles = [locationService.currentPath];
158
+ }
159
+ return resolve(result);
160
+ }
161
+ else if (optionsService.options.mode == EnumRetrievalMode.file
162
+ && fileSystemService.isFile(selection)
163
+ && !optionsService.options.multi // Complete if we're in file mode and looking for just one.
164
+ ) {
165
+ return resolve({
166
+ selectedFiles: [selection],
167
+ status: exports.COMPLETED,
168
+ });
169
+ }
170
+ if (fileSystemService.isDirectory(selection)) {
171
+ locationService.currentPath = selection;
172
+ }
173
+ else {
174
+ if (filesSelectionService.isSelected(selection)) {
175
+ filesSelectionService.removeFile(selection);
176
+ }
177
+ else {
178
+ filesSelectionService.selectFile(selection);
179
+ }
180
+ }
181
+ promptUserToSelectFiles();
182
+ });
183
+ })();
184
+ });
185
+ };
186
+ exports.selectFiles = selectFiles;
187
+ //# sourceMappingURL=file-selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-selector.js","sourceRoot":"","sources":["../../src/cli-common/file-selector.ts"],"names":[],"mappings":";;;;AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACrC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAElB,QAAA,SAAS,GAAG,qBAAqB,CAAC;AAClC,QAA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7C;yBAAM;wBACL,qBAAqB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;qBAC7C;iBACF;gBAED,uBAAuB,EAAE,CAAC;YAC5B,CAAC;SAAA,CAAC,EAAE,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAlIW,QAAA,WAAW,eAkItB"}
File without changes
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // export type EntryValue = string|number|boolean;
3
+ // export type choice<T extends EntryValue> = T|{ name: string, value?: T }
4
+ // /** Retrieves value from the user. */
5
+ // export interface IUserInputProvider {
6
+ // /** Renders a message to the user (DOES NOT LOG the message). */
7
+ // userMessage(message: string): void;
8
+ // /** @param id Identifies the prompt for internal use, esp in mocking. This value never renders to the user. */
9
+ // prompt<T extends EntryValue>(id: string, prompt: string, required?: boolean, defaultValue?: T): Promise<T|undefined>;
10
+ // /** @param id Identifies the prompt for internal use, esp in mocking. This value never renders to the user. */
11
+ // promptPassword(id: string, prompt: string): Promise<string>;
12
+ // /** @param id Identifies the prompt for internal use, esp in mocking. This value never renders to the user. */
13
+ // promptSelect<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], multiSelect?: boolean): Promise<T|undefined>;
14
+ // /** @param id Identifies the prompt for internal use, esp in mocking. This value never renders to the user.
15
+ // * @param prompt The message to print for the user.
16
+ // * @param defaultValue defaults to TRUE. */
17
+ // promptConfirm(id: string, prompt: string, defaultValue?: boolean): Promise<boolean>;
18
+ // }
19
+ //# sourceMappingURL=i-user-input-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i-user-input-provider.js","sourceRoot":"","sources":["../../src/cli-common/i-user-input-provider.ts"],"names":[],"mappings":";AACA,kDAAkD;AAElD,2EAA2E;AAE3E,wCAAwC;AACxC,wCAAwC;AAExC,qEAAqE;AACrE,wCAAwC;AAExC,oHAAoH;AACpH,0HAA0H;AAE1H,oHAAoH;AACpH,iEAAiE;AAEjE,oHAAoH;AACpH,uIAAuI;AAEvI,kHAAkH;AAClH,wDAAwD;AACxD,gDAAgD;AAChD,yFAAyF;AACzF,IAAI"}
@@ -0,0 +1,4 @@
1
+ export * from "./entities";
2
+ export * from "./prompt-select-fuzzy";
3
+ export { commandBase } from "./command-base";
4
+ export * from "./mock-ui";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commandBase = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./entities"), exports);
6
+ tslib_1.__exportStar(require("./prompt-select-fuzzy"), exports);
7
+ var command_base_1 = require("./command-base");
8
+ Object.defineProperty(exports, "commandBase", { enumerable: true, get: function () { return command_base_1.commandBase; } });
9
+ // export {TenantContextualizer} from "./tenant-contextualizer";
10
+ tslib_1.__exportStar(require("./mock-ui"), exports);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli-common/index.ts"],"names":[],"mappings":";;;;AAAA,qDAA2B;AAC3B,gEAAsC;AACtC,+CAA2C;AAAnC,2GAAA,WAAW,OAAA;AACnB,gEAAgE;AAChE,oDAA0B"}
@@ -0,0 +1,27 @@
1
+ import { EntryValue, choice, IUserInputProvider, IOutputStyler } from "@codiac.io/codiac-ops-common";
2
+ import { FileSelectionOptions, FolderSelectionOptions } from "@codiac.io/codiac-ops-common";
3
+ export declare class MockUi implements IUserInputProvider, IOutputStyler {
4
+ constructor();
5
+ private values;
6
+ responses: {
7
+ [id: string]: EntryValue | Error;
8
+ };
9
+ setValue(id: string, value: EntryValue): void;
10
+ private getValue;
11
+ userMessage(message: string): void;
12
+ prompt<T extends EntryValue>(id: string, prompt: string, required?: boolean | undefined, defaultValue?: T | undefined): Promise<T | undefined>;
13
+ promptPassword(id: string, prompt: string): Promise<string>;
14
+ promptConfirm(id: string, prompt: string, defaultValue?: boolean | undefined): Promise<boolean>;
15
+ promptSelect<T extends EntryValue>(id: string, prompt: string, choices: choice<T>[], multiSelect?: boolean | undefined): Promise<T | undefined>;
16
+ promptSelectFile(id: string, prompt: string, fileOptions: FileSelectionOptions): Promise<string>;
17
+ promptSelectFolder(id: string, prompt: string, folderOptions: FolderSelectionOptions): Promise<string>;
18
+ bold(content: string): string;
19
+ dim(content: string): string;
20
+ hilite(content: string): string;
21
+ colorGood(content: string): string;
22
+ colorWarning(content: string): string;
23
+ colorCritical(content: string): string;
24
+ openUrl(url: string): Promise<void>;
25
+ startSpinner(userMessage: string): void;
26
+ stopSpinner(userMessage: string): void;
27
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MockUi = void 0;
4
+ const tslib_1 = require("tslib");
5
+ class MockUi {
6
+ constructor() {
7
+ this.values = {};
8
+ this.responses = {};
9
+ }
10
+ setValue(id, value) {
11
+ this.values[id] = value;
12
+ }
13
+ getValue(id) {
14
+ return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
15
+ try {
16
+ let response;
17
+ if (this.values[id]) {
18
+ response = this.values[id];
19
+ }
20
+ else {
21
+ throw new Error(`MockTenCon unable to respond: No mock value was provided for prompt: [${id}]. Use MockTenCon.setValue() to provide a value.`);
22
+ }
23
+ this.responses[id] = response;
24
+ resolve(response);
25
+ }
26
+ catch (err) {
27
+ this.responses[id] = err;
28
+ reject(err);
29
+ }
30
+ }));
31
+ }
32
+ userMessage(message) {
33
+ console.log(message);
34
+ }
35
+ prompt(id, prompt, required, defaultValue) {
36
+ return this.getValue(id);
37
+ }
38
+ promptPassword(id, prompt) {
39
+ return this.getValue(id);
40
+ }
41
+ promptConfirm(id, prompt, defaultValue) {
42
+ return this.getValue(id);
43
+ }
44
+ promptSelect(id, prompt, choices, multiSelect) {
45
+ return this.getValue(id);
46
+ }
47
+ promptSelectFile(id, prompt, fileOptions) {
48
+ return this.getValue(id);
49
+ }
50
+ promptSelectFolder(id, prompt, folderOptions) {
51
+ return this.getValue(id);
52
+ }
53
+ // IOutputStyler members
54
+ bold(content) {
55
+ return content;
56
+ }
57
+ dim(content) {
58
+ return content;
59
+ }
60
+ hilite(content) {
61
+ return content;
62
+ }
63
+ colorGood(content) {
64
+ return content;
65
+ }
66
+ colorWarning(content) {
67
+ return content;
68
+ }
69
+ colorCritical(content) {
70
+ return content;
71
+ }
72
+ openUrl(url) {
73
+ return new Promise((resolve) => resolve());
74
+ }
75
+ startSpinner(userMessage) {
76
+ // do nothing
77
+ }
78
+ stopSpinner(userMessage) {
79
+ // do nothing
80
+ }
81
+ }
82
+ exports.MockUi = MockUi;
83
+ //# sourceMappingURL=mock-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-ui.js","sourceRoot":"","sources":["../../src/cli-common/mock-ui.ts"],"names":[],"mappings":";;;;AAGA,MAAa,MAAM;IACjB;QAIQ,WAAM,GAAiC,EAAG,CAAA;QAC3C,cAAS,GAAuC,EAAG,CAAA;IAH1D,CAAC;IAMM,QAAQ,CAAC,EAAU,EAAE,KAAiB;QAC3C,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;IAC1B,CAAC;IAEO,QAAQ,CAAuB,EAAU;QAC/C,OAAO,IAAI,OAAO,CAAI,CAAO,OAAO,EAAC,MAAM,EAAE,EAAE;YAC7C,IAAI;gBACF,IAAI,QAAW,CAAC;gBAChB,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;oBACnB,QAAQ,GAAM,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,IAAI,KAAK,CAAC,yEAAyE,EAAE,mDAAmD,CAAC,CAAC;iBACjJ;gBACD,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;gBAC9B,OAAO,CAAC,QAAQ,CAAC,CAAC;aACnB;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;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AAO,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,GAAW;QACjB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC;IACD,YAAY,CAAC,WAAmB;QAC9B,aAAa;IACf,CAAC;IACD,WAAW,CAAC,WAAmB;QAC7B,aAAa;IACf,CAAC;CAGF;AA5FD,wBA4FC"}
@@ -0,0 +1,19 @@
1
+ import { IBetterLogger } from "@codiac.io/codiac-common";
2
+ import { IOutputStyler, IUserInputProvider } from "@codiac.io/codiac-ops-common";
3
+ import { PromptChoice } from "./entities/prompt-choice";
4
+ export type ValidationResult = boolean | {
5
+ isValid: boolean;
6
+ reason?: string;
7
+ };
8
+ /** Prompt for a value using a fuzzy-search to show available selections.
9
+ */
10
+ export declare class PromptSelectFuzzy {
11
+ private logger;
12
+ private _ui;
13
+ private _styler;
14
+ constructor(logger: IBetterLogger, _ui: IUserInputProvider, _styler: IOutputStyler);
15
+ private static fetchedChoices;
16
+ go(controlId: string, prompt: string, suggestOnly: boolean, defaultValue: string | undefined, searchOnRemote: boolean, fetchMethod: (searchString?: string) => Promise<PromptChoice[]>, validationMethod?: ((candidate: string) => ValidationResult)): Promise<string>;
17
+ /** Performs the actual fuzzy-filtering of the already-fetched module-scoped list of available values. */
18
+ private getFuzzyFilteredChoices;
19
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromptSelectFuzzy = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const codiac_common_1 = require("@codiac.io/codiac-common");
6
+ const inversify_1 = require("inversify");
7
+ const autocomplete = require("inquirer-autocomplete-prompt");
8
+ const inquirer = require("inquirer");
9
+ const fuzzy = require("fuzzy");
10
+ const codiac_ops_common_1 = require("@codiac.io/codiac-ops-common");
11
+ /** Has to be module-scoped bc the autocomplete redefines "this",
12
+ * so we can't use it inside getFuzzyFilteredChoices().
13
+ *
14
+ * THIS WILL PREVENT MULTIPLE instances of a fuzzy-search: Refactor to use `PromptSelectFuzzy.fetchedChoices[controlId]` instead.
15
+ */
16
+ let fetchedChoices = [];
17
+ /** Prompt for a value using a fuzzy-search to show available selections.
18
+ */
19
+ let PromptSelectFuzzy = class PromptSelectFuzzy {
20
+ constructor(logger, _ui, _styler) {
21
+ this.logger = logger;
22
+ this._ui = _ui;
23
+ this._styler = _styler;
24
+ }
25
+ go(controlId, prompt, suggestOnly, defaultValue, searchOnRemote, fetchMethod, validationMethod) {
26
+ return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
27
+ var _a, _b;
28
+ let entry; // = defaultValue;
29
+ try {
30
+ // TODO: Consider running this inside getFuzzyFilteredChoices()...
31
+ // eg:
32
+ // let fuzzySearch = (answers: PromptChoice[], input: string): Promise<PromptChoice[]> {
33
+ // return this.getFuzzyFilteredChoices(answers, input, fetchMethod);
34
+ // }
35
+ // PromptSelectFuzzy.fetchedChoices[controlId] = await fetchMethod();
36
+ if (searchOnRemote !== true)
37
+ fetchedChoices = yield fetchMethod("");
38
+ let selectedValue;
39
+ let isValid = false;
40
+ let invalidReason;
41
+ while (entry === undefined || !isValid) {
42
+ inquirer.registerPrompt('autocomplete', autocomplete);
43
+ if (invalidReason)
44
+ this._ui.userMessage(invalidReason);
45
+ let selectResult = yield inquirer.prompt([{
46
+ type: 'autocomplete',
47
+ suggestOnly: suggestOnly,
48
+ name: controlId,
49
+ message: `${prompt} `,
50
+ source: (searchOnRemote) ? (answers, input) => fetchMethod(input) : this.getFuzzyFilteredChoices,
51
+ default: defaultValue
52
+ }]);
53
+ entry = selectResult[controlId];
54
+ selectedValue = selectResult[controlId]; // this is not entry because selectedValue should be of generic type "T"
55
+ this.logger.trace(`${controlId} selected`, selectedValue);
56
+ // Validate the selection
57
+ let validResult = (validationMethod) ? validationMethod(selectedValue) : true;
58
+ if (typeof validResult === 'boolean') {
59
+ isValid = validResult;
60
+ invalidReason = undefined;
61
+ }
62
+ else {
63
+ isValid = validResult.isValid;
64
+ invalidReason = validResult.reason;
65
+ }
66
+ if (!isValid) {
67
+ this.logger.trace(`${controlId} value [${selectedValue}] is invalid. ${invalidReason !== null && invalidReason !== void 0 ? invalidReason : ""}`);
68
+ }
69
+ }
70
+ resolve(selectedValue !== null && selectedValue !== void 0 ? selectedValue : "");
71
+ }
72
+ catch (err) {
73
+ this.logger.error(`Error performing a fuzzy-select for [${controlId}]: ${(_a = err.name) !== null && _a !== void 0 ? _a : ""} ${(_b = err.message) !== null && _b !== void 0 ? _b : ""}`, err.stack);
74
+ reject(err);
75
+ }
76
+ }));
77
+ }
78
+ /** Performs the actual fuzzy-filtering of the already-fetched module-scoped list of available values. */
79
+ getFuzzyFilteredChoices(answers, input) {
80
+ return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
81
+ try {
82
+ // Whatever voodoo they're doing inside the autocomplete plugin,
83
+ // they're redefining "this", so we cant use it here.
84
+ // Great, we'll just HACK UP a fucking module scoped variable to hold onto the goddamn list then.
85
+ // let vers = this.getVersions();
86
+ input = input || "";
87
+ // Original instructions called for this (maybe to debounce it?)
88
+ // setTimeout(() => {
89
+ let filtered;
90
+ // if (parseInt(input) != NaN) {
91
+ if (isNaN(+input)) {
92
+ // let options: fuzzy.FilterOptions<PromptChoice> = { extract: (ver: PromptChoice) => { return ver.value } };
93
+ let options = { extract: (ver) => { return ver.name; } };
94
+ let results = fuzzy.filter(input, fetchedChoices, options);
95
+ filtered = results.map((fr) => fr.original);
96
+ }
97
+ else {
98
+ // Numeric search
99
+ filtered = fetchedChoices.filter(p => `${p.value}`.startsWith(input));
100
+ }
101
+ resolve(filtered);
102
+ // }, 20); // is this for debouncing?
103
+ }
104
+ catch (err) {
105
+ reject(err);
106
+ }
107
+ }));
108
+ }
109
+ };
110
+ PromptSelectFuzzy.fetchedChoices = {};
111
+ PromptSelectFuzzy = tslib_1.__decorate([
112
+ (0, inversify_1.injectable)(),
113
+ tslib_1.__param(0, (0, inversify_1.inject)(codiac_common_1.INTERFACES.IBetterLogger)),
114
+ tslib_1.__param(1, (0, inversify_1.inject)(codiac_ops_common_1.INTERFACES_OPS.IUserInputProvider)),
115
+ tslib_1.__param(2, (0, inversify_1.inject)(codiac_ops_common_1.INTERFACES_OPS.IOutputStyler)),
116
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Object])
117
+ ], PromptSelectFuzzy);
118
+ exports.PromptSelectFuzzy = PromptSelectFuzzy;
119
+ //# sourceMappingURL=prompt-select-fuzzy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-select-fuzzy.js","sourceRoot":"","sources":["../../src/cli-common/prompt-select-fuzzy.ts"],"names":[],"mappings":";;;;AAAA,4DAAqE;AACrE,yCAA+C;AAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC7D,qCAAsC;AACtC,+BAAgC;AAEhC,oEAAiG;AA8CjG;;;;GAIG;AACH,IAAI,cAAc,GAAmB,EAAE,CAAC;AAIxC;GACG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE5B,YAC4C,MAAqB,EACZ,GAAuB,EAC5B,OAAsB;QAF1B,WAAM,GAAN,MAAM,CAAe;QACZ,QAAG,GAAH,GAAG,CAAoB;QAC5B,YAAO,GAAP,OAAO,CAAe;IAGtE,CAAC;IAOM,EAAE,CAAC,SAAiB,EAAE,MAAc,EAAE,WAAoB,EAAE,YAAgC,EAAE,cAAuB,EAAE,WAA+D,EAAE,gBAA4D;QACzP,OAAO,IAAI,OAAO,CAAS,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;;YACnD,IAAI,KAAyB,CAAC,CAAE,kBAAkB;YAClD,IAAI;gBAEF,kEAAkE;gBAClE,MAAM;gBACN,wFAAwF;gBACxF,qEAAqE;gBACrE,IAAI;gBACJ,qEAAqE;gBACrE,IAAI,cAAc,KAAK,IAAI;oBAAE,cAAc,GAAG,MAAM,WAAW,CAAC,EAAE,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