heroku 8.1.9 → 8.2.0-beta.1

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 (315) hide show
  1. package/README.md +5 -6
  2. package/autocomplete-scripts/README.md +7 -0
  3. package/autocomplete-scripts/bash/heroku.bash +59 -0
  4. package/autocomplete-scripts/brew/bash +4 -0
  5. package/autocomplete-scripts/brew/zsh/_heroku +59 -0
  6. package/autocomplete-scripts/zsh/_heroku +53 -0
  7. package/bin/bats-test-runner.js +7 -0
  8. package/bin/dev +17 -0
  9. package/bin/dev.cmd +3 -0
  10. package/bin/run +36 -1
  11. package/lib/analytics.d.ts +2 -2
  12. package/lib/analytics.js +3 -4
  13. package/lib/commands/auth/2fa/disable.d.ts +7 -0
  14. package/lib/commands/auth/2fa/disable.js +16 -0
  15. package/lib/commands/auth/2fa/index.d.ts +6 -0
  16. package/lib/commands/auth/2fa/index.js +18 -0
  17. package/lib/commands/auth/login.d.ts +8 -0
  18. package/lib/commands/auth/login.js +25 -0
  19. package/lib/commands/auth/logout.d.ts +6 -0
  20. package/lib/commands/auth/logout.js +14 -0
  21. package/lib/commands/auth/token.d.ts +7 -0
  22. package/lib/commands/auth/token.js +31 -0
  23. package/lib/commands/auth/whoami.d.ts +7 -0
  24. package/lib/commands/auth/whoami.js +26 -0
  25. package/lib/commands/authorizations/create.d.ts +13 -0
  26. package/lib/commands/authorizations/create.js +41 -0
  27. package/lib/commands/authorizations/index.d.ts +9 -0
  28. package/lib/commands/authorizations/index.js +35 -0
  29. package/lib/commands/authorizations/info.d.ts +11 -0
  30. package/lib/commands/authorizations/info.js +25 -0
  31. package/lib/commands/authorizations/revoke.d.ts +10 -0
  32. package/lib/commands/authorizations/revoke.js +22 -0
  33. package/lib/commands/authorizations/rotate.d.ts +8 -0
  34. package/lib/commands/authorizations/rotate.js +19 -0
  35. package/lib/commands/authorizations/update.d.ts +13 -0
  36. package/lib/commands/authorizations/update.js +36 -0
  37. package/lib/commands/autocomplete/create.d.ts +29 -0
  38. package/lib/commands/autocomplete/create.js +213 -0
  39. package/lib/commands/autocomplete/doctor.d.ts +12 -0
  40. package/lib/commands/autocomplete/doctor.js +97 -0
  41. package/lib/commands/autocomplete/index.d.ts +12 -0
  42. package/lib/commands/autocomplete/index.js +67 -0
  43. package/lib/commands/autocomplete/options.d.ts +25 -0
  44. package/lib/commands/autocomplete/options.js +210 -0
  45. package/lib/commands/autocomplete/script.d.ts +10 -0
  46. package/lib/commands/autocomplete/script.js +23 -0
  47. package/lib/commands/buildpacks/add.d.ts +13 -0
  48. package/lib/commands/buildpacks/add.js +43 -0
  49. package/lib/commands/buildpacks/clear.d.ts +9 -0
  50. package/lib/commands/buildpacks/clear.js +17 -0
  51. package/lib/commands/buildpacks/index.d.ts +9 -0
  52. package/lib/commands/buildpacks/index.js +25 -0
  53. package/lib/commands/buildpacks/info.d.ts +8 -0
  54. package/lib/commands/buildpacks/info.js +41 -0
  55. package/lib/commands/buildpacks/remove.d.ts +13 -0
  56. package/lib/commands/buildpacks/remove.js +55 -0
  57. package/lib/commands/buildpacks/search.d.ts +13 -0
  58. package/lib/commands/buildpacks/search.js +69 -0
  59. package/lib/commands/buildpacks/set.d.ts +13 -0
  60. package/lib/commands/buildpacks/set.js +42 -0
  61. package/lib/commands/buildpacks/versions.d.ts +8 -0
  62. package/lib/commands/buildpacks/versions.js +56 -0
  63. package/lib/commands/certs/auto/wait.d.ts +9 -0
  64. package/lib/commands/certs/auto/wait.js +14 -0
  65. package/lib/commands/ci/index.d.ts +12 -0
  66. package/lib/commands/ci/index.js +25 -0
  67. package/lib/commands/ci/info.d.ts +14 -0
  68. package/lib/commands/ci/info.js +29 -0
  69. package/lib/commands/ci/last.d.ts +11 -0
  70. package/lib/commands/ci/last.js +31 -0
  71. package/lib/commands/ci/rerun.d.ts +13 -0
  72. package/lib/commands/ci/rerun.js +53 -0
  73. package/lib/commands/ci/run.d.ts +10 -0
  74. package/lib/commands/ci/run.js +42 -0
  75. package/lib/commands/clients/create.d.ts +14 -0
  76. package/lib/commands/clients/create.js +37 -0
  77. package/lib/commands/clients/destroy.d.ts +8 -0
  78. package/lib/commands/clients/destroy.js +18 -0
  79. package/lib/commands/clients/index.d.ts +8 -0
  80. package/lib/commands/clients/index.js +32 -0
  81. package/lib/commands/clients/info.d.ts +13 -0
  82. package/lib/commands/clients/info.js +33 -0
  83. package/lib/commands/clients/rotate.d.ts +12 -0
  84. package/lib/commands/clients/rotate.js +33 -0
  85. package/lib/commands/clients/update.d.ts +13 -0
  86. package/lib/commands/clients/update.js +38 -0
  87. package/lib/commands/config/edit.d.ts +23 -0
  88. package/lib/commands/config/edit.js +132 -0
  89. package/lib/commands/config/get.d.ts +16 -0
  90. package/lib/commands/config/get.js +35 -0
  91. package/lib/commands/config/index.d.ts +11 -0
  92. package/lib/commands/config/index.js +33 -0
  93. package/lib/commands/config/unset.d.ts +12 -0
  94. package/lib/commands/config/unset.js +51 -0
  95. package/lib/commands/console.d.ts +11 -0
  96. package/lib/commands/console.js +30 -0
  97. package/lib/commands/domains/add.d.ts +19 -0
  98. package/lib/commands/domains/add.js +117 -0
  99. package/lib/commands/domains/clear.d.ts +11 -0
  100. package/lib/commands/domains/clear.js +26 -0
  101. package/lib/commands/domains/index.d.ts +40 -0
  102. package/lib/commands/domains/index.js +79 -0
  103. package/lib/commands/domains/info.d.ts +14 -0
  104. package/lib/commands/domains/info.js +25 -0
  105. package/lib/commands/domains/remove.d.ts +14 -0
  106. package/lib/commands/domains/remove.js +26 -0
  107. package/lib/commands/domains/update.d.ts +15 -0
  108. package/lib/commands/domains/update.js +40 -0
  109. package/lib/commands/domains/wait.d.ts +13 -0
  110. package/lib/commands/domains/wait.js +32 -0
  111. package/lib/commands/git/clone.d.ts +13 -0
  112. package/lib/commands/git/clone.js +29 -0
  113. package/lib/commands/git/credentials.d.ts +9 -0
  114. package/lib/commands/git/credentials.js +32 -0
  115. package/lib/commands/git/remote.d.ts +11 -0
  116. package/lib/commands/git/remote.js +44 -0
  117. package/lib/commands/labs/disable.d.ts +11 -0
  118. package/lib/commands/labs/disable.js +65 -0
  119. package/lib/commands/local/index.d.ts +17 -0
  120. package/lib/commands/local/index.js +75 -0
  121. package/lib/commands/local/run.d.ts +11 -0
  122. package/lib/commands/local/run.js +38 -0
  123. package/lib/commands/local/version.d.ts +5 -0
  124. package/lib/commands/local/version.js +13 -0
  125. package/lib/commands/logs.d.ts +16 -0
  126. package/lib/commands/logs.js +45 -0
  127. package/lib/commands/pipelines/add.d.ts +14 -0
  128. package/lib/commands/pipelines/add.js +61 -0
  129. package/lib/commands/pipelines/connect.d.ts +12 -0
  130. package/lib/commands/pipelines/connect.js +52 -0
  131. package/lib/commands/pipelines/create.d.ts +15 -0
  132. package/lib/commands/pipelines/create.js +91 -0
  133. package/lib/commands/pipelines/destroy.d.ts +9 -0
  134. package/lib/commands/pipelines/destroy.js +27 -0
  135. package/lib/commands/pipelines/diff.d.ts +19 -0
  136. package/lib/commands/pipelines/diff.js +152 -0
  137. package/lib/commands/pipelines/index.d.ts +9 -0
  138. package/lib/commands/pipelines/index.js +27 -0
  139. package/lib/commands/pipelines/info.d.ts +13 -0
  140. package/lib/commands/pipelines/info.js +43 -0
  141. package/lib/commands/pipelines/open.d.ts +9 -0
  142. package/lib/commands/pipelines/open.js +19 -0
  143. package/lib/commands/pipelines/promote.d.ts +12 -0
  144. package/lib/commands/pipelines/promote.js +216 -0
  145. package/lib/commands/pipelines/remove.d.ts +10 -0
  146. package/lib/commands/pipelines/remove.js +23 -0
  147. package/lib/commands/pipelines/rename.d.ts +10 -0
  148. package/lib/commands/pipelines/rename.js +33 -0
  149. package/lib/commands/pipelines/setup.d.ts +14 -0
  150. package/lib/commands/pipelines/setup.js +91 -0
  151. package/lib/commands/pipelines/transfer.d.ts +13 -0
  152. package/lib/commands/pipelines/transfer.js +65 -0
  153. package/lib/commands/pipelines/update.d.ts +11 -0
  154. package/lib/commands/pipelines/update.js +32 -0
  155. package/lib/commands/ps/autoscale/disable.d.ts +9 -0
  156. package/lib/commands/ps/autoscale/disable.js +35 -0
  157. package/lib/commands/ps/autoscale/enable.d.ts +13 -0
  158. package/lib/commands/ps/autoscale/enable.js +65 -0
  159. package/lib/commands/ps/wait.d.ts +12 -0
  160. package/lib/commands/ps/wait.js +78 -0
  161. package/lib/commands/rake.d.ts +14 -0
  162. package/lib/commands/rake.js +46 -0
  163. package/lib/commands/regions.d.ts +11 -0
  164. package/lib/commands/regions.js +45 -0
  165. package/lib/commands/reviewapps/disable.d.ts +17 -0
  166. package/lib/commands/reviewapps/disable.js +102 -0
  167. package/lib/commands/reviewapps/enable.d.ts +14 -0
  168. package/lib/commands/reviewapps/enable.js +89 -0
  169. package/lib/commands/run/detached.d.ts +15 -0
  170. package/lib/commands/run/detached.js +56 -0
  171. package/lib/commands/run/index.d.ts +18 -0
  172. package/lib/commands/run/index.js +64 -0
  173. package/lib/commands/run/inside.d.ts +15 -0
  174. package/lib/commands/run/inside.js +55 -0
  175. package/lib/commands/sessions/destroy.d.ts +8 -0
  176. package/lib/commands/sessions/destroy.js +18 -0
  177. package/lib/commands/sessions/index.d.ts +8 -0
  178. package/lib/commands/sessions/index.js +31 -0
  179. package/lib/commands/status.d.ts +8 -0
  180. package/lib/commands/status.js +46 -0
  181. package/lib/commands/webhooks/add.d.ts +16 -0
  182. package/lib/commands/webhooks/add.js +47 -0
  183. package/lib/commands/webhooks/deliveries/index.d.ts +12 -0
  184. package/lib/commands/webhooks/deliveries/index.js +80 -0
  185. package/lib/commands/webhooks/deliveries/info.d.ts +14 -0
  186. package/lib/commands/webhooks/deliveries/info.js +42 -0
  187. package/lib/commands/webhooks/events/index.d.ts +11 -0
  188. package/lib/commands/webhooks/events/index.js +46 -0
  189. package/lib/commands/webhooks/events/info.d.ts +14 -0
  190. package/lib/commands/webhooks/events/info.js +31 -0
  191. package/lib/commands/webhooks/index.d.ts +11 -0
  192. package/lib/commands/webhooks/index.js +45 -0
  193. package/lib/commands/webhooks/info.d.ts +14 -0
  194. package/lib/commands/webhooks/info.js +31 -0
  195. package/lib/commands/webhooks/remove.d.ts +14 -0
  196. package/lib/commands/webhooks/remove.js +29 -0
  197. package/lib/commands/webhooks/update.d.ts +19 -0
  198. package/lib/commands/webhooks/update.js +41 -0
  199. package/lib/file.js +2 -3
  200. package/lib/global_telemetry.d.ts +53 -0
  201. package/lib/global_telemetry.js +82 -0
  202. package/lib/hooks/command_not_found/performance_analytics.d.ts +3 -0
  203. package/lib/hooks/command_not_found/performance_analytics.js +7 -0
  204. package/lib/hooks/init/terms-of-service.js +3 -4
  205. package/lib/hooks/init/version.d.ts +2 -1
  206. package/lib/hooks/init/version.js +1 -2
  207. package/lib/hooks/postrun/performance_analytics.d.ts +3 -0
  208. package/lib/hooks/postrun/performance_analytics.js +11 -0
  209. package/lib/hooks/prerun/analytics.d.ts +2 -1
  210. package/lib/hooks/prerun/analytics.js +4 -4
  211. package/lib/hooks/recache.d.ts +3 -0
  212. package/lib/hooks/recache.js +56 -0
  213. package/lib/hooks/update/brew.d.ts +2 -1
  214. package/lib/hooks/update/brew.js +3 -5
  215. package/lib/hooks/update/completions.d.ts +2 -1
  216. package/lib/hooks/update/completions.js +2 -3
  217. package/lib/hooks/update/plugin-migrate.d.ts +2 -1
  218. package/lib/hooks/update/plugin-migrate.js +3 -5
  219. package/lib/hooks/update/tidy.d.ts +2 -1
  220. package/lib/hooks/update/tidy.js +3 -5
  221. package/lib/lib/authorizations/authorizations.d.ts +2 -0
  222. package/lib/lib/authorizations/authorizations.js +39 -0
  223. package/lib/lib/autocomplete/base.d.ts +11 -0
  224. package/lib/lib/autocomplete/base.js +44 -0
  225. package/lib/lib/autocomplete/cache.d.ts +2 -0
  226. package/lib/lib/autocomplete/cache.js +28 -0
  227. package/lib/lib/autocomplete/completions.d.ts +37 -0
  228. package/lib/lib/autocomplete/completions.js +261 -0
  229. package/lib/lib/buildpacks/buildpacks.d.ts +32 -0
  230. package/lib/lib/buildpacks/buildpacks.js +161 -0
  231. package/lib/lib/buildpacks/push.d.ts +0 -0
  232. package/lib/lib/buildpacks/push.js +4 -0
  233. package/lib/lib/ci/git.d.ts +8 -0
  234. package/lib/lib/ci/git.js +71 -0
  235. package/lib/lib/ci/interfaces/kolkrabbi.d.ts +311 -0
  236. package/lib/lib/ci/interfaces/kolkrabbi.js +7 -0
  237. package/lib/lib/ci/pipelines.d.ts +3 -0
  238. package/lib/lib/ci/pipelines.js +57 -0
  239. package/lib/lib/ci/source.d.ts +2 -0
  240. package/lib/lib/ci/source.js +42 -0
  241. package/lib/lib/ci/test-run.d.ts +5 -0
  242. package/lib/lib/ci/test-run.js +232 -0
  243. package/lib/lib/clients/clients.d.ts +1 -0
  244. package/lib/lib/clients/clients.js +25 -0
  245. package/lib/lib/config/quote.d.ts +2 -0
  246. package/lib/lib/config/quote.js +33 -0
  247. package/lib/lib/config/util.d.ts +3 -0
  248. package/lib/lib/config/util.js +12 -0
  249. package/lib/lib/domains/wait-for-domain.d.ts +3 -0
  250. package/lib/lib/domains/wait-for-domain.js +19 -0
  251. package/lib/lib/git/git.d.ts +8 -0
  252. package/lib/lib/git/git.js +56 -0
  253. package/lib/lib/local/fork-foreman.d.ts +1 -0
  254. package/lib/lib/local/fork-foreman.js +33 -0
  255. package/lib/lib/local/load-foreman-procfile.d.ts +0 -0
  256. package/lib/lib/local/load-foreman-procfile.js +2 -0
  257. package/lib/lib/local/run-foreman.d.ts +0 -0
  258. package/lib/lib/local/run-foreman.js +2 -0
  259. package/lib/lib/pipelines/api.d.ts +25 -0
  260. package/lib/lib/pipelines/api.js +130 -0
  261. package/lib/lib/pipelines/disambiguate.d.ts +3 -0
  262. package/lib/lib/pipelines/disambiguate.js +49 -0
  263. package/lib/lib/pipelines/github-api.d.ts +8 -0
  264. package/lib/lib/pipelines/github-api.js +18 -0
  265. package/lib/lib/pipelines/infer.d.ts +1 -0
  266. package/lib/lib/pipelines/infer.js +11 -0
  267. package/lib/lib/pipelines/key-by.d.ts +1 -0
  268. package/lib/lib/pipelines/key-by.js +11 -0
  269. package/lib/lib/pipelines/kolkrabbi-api.d.ts +14 -0
  270. package/lib/lib/pipelines/kolkrabbi-api.js +62 -0
  271. package/lib/lib/pipelines/ownership.d.ts +4 -0
  272. package/lib/lib/pipelines/ownership.js +40 -0
  273. package/lib/lib/pipelines/render-pipeline.d.ts +6 -0
  274. package/lib/lib/pipelines/render-pipeline.js +52 -0
  275. package/lib/lib/pipelines/setup/create-apps.d.ts +1 -0
  276. package/lib/lib/pipelines/setup/create-apps.js +44 -0
  277. package/lib/lib/pipelines/setup/get-ci-settings.d.ts +4 -0
  278. package/lib/lib/pipelines/setup/get-ci-settings.js +19 -0
  279. package/lib/lib/pipelines/setup/get-github-token.d.ts +1 -0
  280. package/lib/lib/pipelines/setup/get-github-token.js +10 -0
  281. package/lib/lib/pipelines/setup/get-name-and-repo.d.ts +1 -0
  282. package/lib/lib/pipelines/setup/get-name-and-repo.js +47 -0
  283. package/lib/lib/pipelines/setup/get-repo.d.ts +1 -0
  284. package/lib/lib/pipelines/setup/get-repo.js +8 -0
  285. package/lib/lib/pipelines/setup/get-settings.d.ts +9 -0
  286. package/lib/lib/pipelines/setup/get-settings.js +39 -0
  287. package/lib/lib/pipelines/setup/poll-app-setups.d.ts +1 -0
  288. package/lib/lib/pipelines/setup/poll-app-setups.js +25 -0
  289. package/lib/lib/pipelines/setup/setup-pipeline.d.ts +1 -0
  290. package/lib/lib/pipelines/setup/setup-pipeline.js +15 -0
  291. package/lib/lib/pipelines/setup/validate.d.ts +9 -0
  292. package/lib/lib/pipelines/setup/validate.js +31 -0
  293. package/lib/lib/pipelines/stages.d.ts +7 -0
  294. package/lib/lib/pipelines/stages.js +22 -0
  295. package/lib/lib/run/colorize.d.ts +2 -0
  296. package/lib/lib/run/colorize.js +300 -0
  297. package/lib/lib/run/dyno.d.ts +72 -0
  298. package/lib/lib/run/dyno.js +397 -0
  299. package/lib/lib/run/helpers.d.ts +2 -0
  300. package/lib/lib/run/helpers.js +34 -0
  301. package/lib/lib/run/line-transform.d.ts +4 -0
  302. package/lib/lib/run/line-transform.js +26 -0
  303. package/lib/lib/run/log-displayer.d.ts +10 -0
  304. package/lib/lib/run/log-displayer.js +79 -0
  305. package/lib/lib/sessions/sessions.d.ts +7 -0
  306. package/lib/lib/sessions/sessions.js +2 -0
  307. package/lib/lib/status/util.d.ts +1 -0
  308. package/lib/lib/status/util.js +14 -0
  309. package/lib/lib/webhooks/base.d.ts +13 -0
  310. package/lib/lib/webhooks/base.js +28 -0
  311. package/lib/user-config.js +2 -3
  312. package/oclif.manifest.json +3376 -2
  313. package/package.json +80 -43
  314. package/lib/hooks/update/b.d.ts +0 -2
  315. package/lib/hooks/update/b.js +0 -48
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const path = require("path");
6
+ const base_1 = require("../../lib/autocomplete/base");
7
+ const cache_1 = require("../../lib/autocomplete/cache");
8
+ class Options extends base_1.AutocompleteBase {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.parsedArgs = {};
12
+ this.parsedFlags = {};
13
+ }
14
+ // helpful dictionary
15
+ //
16
+ // *args: refers to a Command's static args
17
+ // *argv: refers to the current execution's command line positional input
18
+ // Klass: (class) Command class
19
+ // completion: (object) object with data/methods to build/retrive options from cache
20
+ // curPosition*: the current argv position the shell is trying to complete
21
+ // options: (string) white-space seperated list of values for the shell to use for completion
22
+ async run() {
23
+ this.errorIfWindows();
24
+ // ex: heroku autocomplete:options 'heroku addons:destroy -a myapp myaddon'
25
+ try {
26
+ const commandStateVars = await this.processCommandLine();
27
+ const completion = this.determineCompletion(commandStateVars);
28
+ const options = await this.fetchOptions(completion);
29
+ if (options)
30
+ this.log(options);
31
+ }
32
+ catch (error) {
33
+ // write to ac log
34
+ this.writeLogFile(error.message);
35
+ }
36
+ }
37
+ async processCommandLine() {
38
+ // find command id
39
+ const commandLineToComplete = this.argv[0].split(' ');
40
+ const id = commandLineToComplete[1];
41
+ // find Command
42
+ const C = this.config.findCommand(id);
43
+ let Klass;
44
+ if (C) {
45
+ Klass = await C.load();
46
+ // process Command state from command line data
47
+ const slicedArgv = commandLineToComplete.slice(2);
48
+ const [argsIndex, curPositionIsFlag, curPositionIsFlagValue] = this.determineCmdState(slicedArgv, Klass);
49
+ return { id, Klass, argsIndex, curPositionIsFlag, curPositionIsFlagValue, slicedArgv };
50
+ }
51
+ this.throwError(`Command ${id} not found`);
52
+ }
53
+ determineCompletion(commandStateVars) {
54
+ const { id, Klass, argsIndex, curPositionIsFlag, curPositionIsFlagValue, slicedArgv } = commandStateVars;
55
+ // setup empty cache completion vars to assign
56
+ let cacheKey;
57
+ let cacheCompletion;
58
+ // completing a flag/value? else completing an arg
59
+ if (curPositionIsFlag || curPositionIsFlagValue) {
60
+ const slicedArgvCount = slicedArgv.length;
61
+ const lastArgvArg = slicedArgv[slicedArgvCount - 1];
62
+ const previousArgvArg = slicedArgv[slicedArgvCount - 2];
63
+ const argvFlag = curPositionIsFlagValue ? previousArgvArg : lastArgvArg;
64
+ const { name, flag } = this.findFlagFromWildArg(argvFlag, Klass);
65
+ if (!flag)
66
+ this.throwError(`${argvFlag} is not a valid flag for ${id}`);
67
+ cacheKey = name || flag.name;
68
+ cacheCompletion = flag.completion;
69
+ }
70
+ else {
71
+ const cmdArgs = Klass.args || [];
72
+ // variable arg (strict: false)
73
+ if (!Klass.strict) {
74
+ cacheKey = cmdArgs[0] && cmdArgs[0].name.toLowerCase();
75
+ cacheCompletion = this.findCompletion(cacheKey, id);
76
+ if (!cacheCompletion)
77
+ this.throwError(`Cannot complete variable arg position for ${id}`);
78
+ }
79
+ else if (argsIndex > cmdArgs.length - 1) {
80
+ this.throwError(`Cannot complete arg position ${argsIndex} for ${id}`);
81
+ }
82
+ else {
83
+ const arg = cmdArgs[argsIndex];
84
+ cacheKey = arg.name.toLowerCase();
85
+ }
86
+ }
87
+ // try to auto-populate the completion object
88
+ if (!cacheCompletion) {
89
+ cacheCompletion = this.findCompletion(cacheKey, id);
90
+ }
91
+ return { cacheKey, cacheCompletion };
92
+ }
93
+ async fetchOptions(cache) {
94
+ const { cacheCompletion, cacheKey } = cache;
95
+ const flags = await this.parsedFlagsWithEnvVars();
96
+ // build/retrieve & return options cache
97
+ if (cacheCompletion && cacheCompletion.options) {
98
+ const ctx = {
99
+ args: this.parsedArgs,
100
+ // special case for app & team env vars
101
+ flags,
102
+ argv: this.argv,
103
+ config: this.config,
104
+ };
105
+ // use cacheKey function or fallback to arg/flag name
106
+ const ckey = cacheCompletion.cacheKey ? await cacheCompletion.cacheKey(ctx) : null;
107
+ const key = ckey || cacheKey || 'unknown_key_error';
108
+ const flagCachePath = path.join(this.completionsCacheDir, key);
109
+ // build/retrieve cache
110
+ const duration = cacheCompletion.cacheDuration || 60 * 60 * 24; // 1 day
111
+ const opts = { cacheFn: () => cacheCompletion.options(ctx) };
112
+ const options = await (0, cache_1.fetchCache)(flagCachePath, duration, opts);
113
+ // return options cache
114
+ return (options || []).join('\n');
115
+ }
116
+ }
117
+ async parsedFlagsWithEnvVars() {
118
+ const { flags } = await this.parse(Options);
119
+ return Object.assign({ app: process.env.HEROKU_APP || flags.app, team: process.env.HEROKU_TEAM || process.env.HEROKU_ORG }, this.parsedFlags);
120
+ }
121
+ throwError(msg) {
122
+ throw new Error(msg);
123
+ }
124
+ findFlagFromWildArg(wild, Klass) {
125
+ let name = wild.replace(/^-+/, '');
126
+ name = name.replace(/[=](.+)?$/, '');
127
+ const unknown = { flag: undefined, name: undefined };
128
+ if (!Klass.flags)
129
+ return unknown;
130
+ const CFlags = Klass.flags;
131
+ let flag = CFlags[name];
132
+ if (flag)
133
+ return { name, flag };
134
+ name = Object.keys(CFlags).find((k) => CFlags[k].char === name) || 'undefinedcommand';
135
+ flag = CFlags && CFlags[name];
136
+ if (flag)
137
+ return { name, flag };
138
+ return unknown;
139
+ }
140
+ determineCmdState(argv, Klass) {
141
+ const argNames = Object.keys(Klass.args || {});
142
+ let needFlagValueSatisfied = false;
143
+ let argIsFlag = false;
144
+ let argIsFlagValue = false;
145
+ let argsIndex = -1;
146
+ let flagName;
147
+ argv.filter(wild => {
148
+ if (wild.match(/^-(-)?/)) {
149
+ // we're a flag
150
+ argIsFlag = true;
151
+ // ignore me
152
+ const wildSplit = wild.split('=');
153
+ const key = wildSplit.length === 1 ? wild : wildSplit[0];
154
+ const { name, flag } = this.findFlagFromWildArg(key, Klass);
155
+ flagName = name;
156
+ // end ignore me
157
+ if (wildSplit.length === 1) {
158
+ // we're a flag w/o a '=value'
159
+ // (find flag & see if flag needs a value)
160
+ if (flag && flag.type !== 'boolean') {
161
+ // we're a flag who needs our value to be next
162
+ argIsFlagValue = false;
163
+ needFlagValueSatisfied = true;
164
+ return false;
165
+ }
166
+ }
167
+ // --app=my-app is consided a flag & not a flag value
168
+ // the shell's autocomplete handles partial value matching
169
+ // add parsedFlag
170
+ if (wildSplit.length === 2 && name)
171
+ this.parsedFlags[name] = wildSplit[1];
172
+ // we're a flag who is satisfied
173
+ argIsFlagValue = false;
174
+ needFlagValueSatisfied = false;
175
+ return false;
176
+ }
177
+ // we're not a flag
178
+ argIsFlag = false;
179
+ if (needFlagValueSatisfied) {
180
+ // we're a flag value
181
+ // add parsedFlag
182
+ if (flagName)
183
+ this.parsedFlags[flagName] = wild;
184
+ argIsFlagValue = true;
185
+ needFlagValueSatisfied = false;
186
+ return false;
187
+ }
188
+ // we're an arg!
189
+ // add parsedArgs
190
+ // TO-DO: how to handle variableArgs?
191
+ argsIndex += 1;
192
+ if (argsIndex < argNames.length) {
193
+ this.parsedArgs[argNames[argsIndex]] = wild;
194
+ }
195
+ argIsFlagValue = false;
196
+ needFlagValueSatisfied = false;
197
+ return true;
198
+ });
199
+ return [argsIndex, argIsFlag, argIsFlagValue];
200
+ }
201
+ }
202
+ exports.default = Options;
203
+ Options.hidden = true;
204
+ Options.description = 'display arg or flag completion options (used internally by completion functions)';
205
+ Options.flags = {
206
+ app: command_1.flags.app({ required: false, hidden: true }),
207
+ };
208
+ Options.args = {
209
+ completion: core_1.Args.string({ strict: false }),
210
+ };
@@ -0,0 +1,10 @@
1
+ import { AutocompleteBase } from '../../lib/autocomplete/base';
2
+ export default class Script extends AutocompleteBase {
3
+ static description: string;
4
+ static hidden: boolean;
5
+ static args: {
6
+ shell: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<void>;
9
+ private get prefix();
10
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const path = require("path");
5
+ const base_1 = require("../../lib/autocomplete/base");
6
+ class Script extends base_1.AutocompleteBase {
7
+ async run() {
8
+ const { args } = await this.parse(Script);
9
+ const shell = args.shell || this.config.shell;
10
+ this.errorIfNotSupportedShell(shell);
11
+ const shellUpcase = shell.toUpperCase();
12
+ this.log(`${this.prefix}HEROKU_AC_${shellUpcase}_SETUP_PATH=${path.join(this.autocompleteCacheDir, `${shell}_setup`)} && test -f $HEROKU_AC_${shellUpcase}_SETUP_PATH && source $HEROKU_AC_${shellUpcase}_SETUP_PATH;`);
13
+ }
14
+ get prefix() {
15
+ return `\n# ${this.config.bin} autocomplete setup\n`;
16
+ }
17
+ }
18
+ exports.default = Script;
19
+ Script.description = 'display autocomplete setup script for shell';
20
+ Script.hidden = true;
21
+ Script.args = {
22
+ shell: core_1.Args.string({ description: 'shell type', required: false }),
23
+ };
@@ -0,0 +1,13 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Add extends Command {
3
+ static description: string;
4
+ static flags: {
5
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ index: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ };
9
+ static args: {
10
+ buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const buildpacks_1 = require("../../lib/buildpacks/buildpacks");
6
+ class Add extends command_1.Command {
7
+ async run() {
8
+ const { args, flags } = await this.parse(Add);
9
+ const buildpackCommand = new buildpacks_1.BuildpackCommand(this.heroku);
10
+ if (flags.index !== undefined) {
11
+ buildpackCommand.validateIndex(flags.index);
12
+ }
13
+ const buildpacks = await buildpackCommand.fetch(flags.app);
14
+ await buildpackCommand.validateUrlNotSet(buildpacks, args.buildpack);
15
+ let spliceIndex;
16
+ if (flags.index === undefined) {
17
+ spliceIndex = buildpacks.length;
18
+ }
19
+ else {
20
+ // eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
21
+ const foundIndex = buildpackCommand.findIndex(buildpacks, flags.index);
22
+ spliceIndex = (foundIndex === -1) ? buildpacks.length : foundIndex;
23
+ }
24
+ const buildpackUpdates = await buildpackCommand.mutate(flags.app, buildpacks, spliceIndex, args.buildpack, 'add');
25
+ buildpackCommand.displayUpdate(flags.app, flags.remote || '', buildpackUpdates, 'added');
26
+ }
27
+ }
28
+ exports.default = Add;
29
+ Add.description = 'add new app buildpack, inserting into list of buildpacks if necessary';
30
+ Add.flags = {
31
+ app: command_1.flags.app({ required: true }),
32
+ remote: command_1.flags.remote(),
33
+ index: command_1.flags.integer({
34
+ description: 'the 1-based index of the URL in the list of URLs',
35
+ char: 'i',
36
+ }),
37
+ };
38
+ Add.args = {
39
+ buildpack: core_1.Args.string({
40
+ required: true,
41
+ description: 'namespace/name of the buildpack',
42
+ }),
43
+ };
@@ -0,0 +1,9 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Clear extends Command {
3
+ static description: string;
4
+ static flags: {
5
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const buildpacks_1 = require("../../lib/buildpacks/buildpacks");
5
+ class Clear extends command_1.Command {
6
+ async run() {
7
+ const { flags } = await this.parse(Clear);
8
+ const buildpackCommand = new buildpacks_1.BuildpackCommand(this.heroku);
9
+ await buildpackCommand.clear(flags.app, 'clear', 'cleared');
10
+ }
11
+ }
12
+ exports.default = Clear;
13
+ Clear.description = 'clear all buildpacks set on the app';
14
+ Clear.flags = {
15
+ app: command_1.flags.app({ required: true }),
16
+ remote: command_1.flags.remote(),
17
+ };
@@ -0,0 +1,9 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Index extends Command {
3
+ static description: string;
4
+ static flags: {
5
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ };
8
+ run(): Promise<void>;
9
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const buildpacks_1 = require("../../lib/buildpacks/buildpacks");
6
+ class Index extends command_1.Command {
7
+ async run() {
8
+ const { flags } = await this.parse(Index);
9
+ const buildpacksCommand = new buildpacks_1.BuildpackCommand(this.heroku);
10
+ const buildpacks = await buildpacksCommand.fetch(flags.app);
11
+ if (buildpacks.length === 0) {
12
+ this.log(`${flags.app} has no Buildpack URL set.`);
13
+ }
14
+ else {
15
+ core_1.ux.styledHeader(`${flags.app} Buildpack URL${buildpacks.length > 1 ? 's' : ''}`);
16
+ buildpacksCommand.display(buildpacks, '');
17
+ }
18
+ }
19
+ }
20
+ exports.default = Index;
21
+ Index.description = 'display the buildpacks for an app';
22
+ Index.flags = {
23
+ app: command_1.flags.app({ required: true }),
24
+ remote: command_1.flags.remote(),
25
+ };
@@ -0,0 +1,8 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Info extends Command {
3
+ static description: string;
4
+ static args: {
5
+ buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
6
+ };
7
+ run(): Promise<void>;
8
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const true_myth_1 = require("true-myth");
6
+ const buildpack_registry_1 = require("@heroku/buildpack-registry");
7
+ class Info extends command_1.Command {
8
+ async run() {
9
+ const { args } = await this.parse(Info);
10
+ const registry = new buildpack_registry_1.BuildpackRegistry();
11
+ true_myth_1.Result.match({
12
+ Ok: _ => { },
13
+ Err: err => {
14
+ this.error(`Could not publish the buildpack.\n${err}`);
15
+ },
16
+ }, buildpack_registry_1.BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
17
+ const result = await registry.info(args.buildpack);
18
+ true_myth_1.Result.match({
19
+ Ok: buildpack => {
20
+ core_1.ux.styledHeader(args.buildpack);
21
+ core_1.ux.styledObject(buildpack, ['description', 'category', 'license', 'support', 'source', 'readme']);
22
+ },
23
+ Err: err => {
24
+ if (err.status === 404) {
25
+ core_1.ux.error(`Could not find the buildpack '${args.buildpack}'`);
26
+ }
27
+ else {
28
+ core_1.ux.error(`Problems finding buildpack info: ${err.description}`);
29
+ }
30
+ },
31
+ }, result);
32
+ }
33
+ }
34
+ exports.default = Info;
35
+ Info.description = 'fetch info about a buildpack';
36
+ Info.args = {
37
+ buildpack: core_1.Args.string({
38
+ required: true,
39
+ description: 'namespace/name of the buildpack',
40
+ }),
41
+ };
@@ -0,0 +1,13 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Remove extends Command {
3
+ static description: string;
4
+ static flags: {
5
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ index: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ };
9
+ static args: {
10
+ buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const buildpacks_1 = require("../../lib/buildpacks/buildpacks");
6
+ class Remove extends command_1.Command {
7
+ async run() {
8
+ const { args, flags } = await this.parse(Remove);
9
+ const buildpackCommand = new buildpacks_1.BuildpackCommand(this.heroku);
10
+ if (flags.index && args.buildpack) {
11
+ core_1.ux.error('Please choose either index or Buildpack, but not both.', { exit: 1 });
12
+ }
13
+ if (!flags.index && !args.buildpack) {
14
+ core_1.ux.error('Usage: heroku buildpacks:remove [BUILDPACK_URL]. Must specify a buildpack to remove, either by index or URL.');
15
+ }
16
+ const buildpacks = await buildpackCommand.fetch(flags.app);
17
+ if (buildpacks.length === 0) {
18
+ core_1.ux.error(`No buildpacks were found. Next release on ${flags.app} will detect buildpack normally.`, { exit: 1 });
19
+ }
20
+ let spliceIndex;
21
+ if (flags.index) {
22
+ buildpackCommand.validateIndexInRange(buildpacks, flags.index);
23
+ // eslint-disable-next-line unicorn/no-array-method-this-argument
24
+ spliceIndex = await buildpackCommand.findIndex(buildpacks, flags.index);
25
+ }
26
+ else {
27
+ spliceIndex = await buildpackCommand.findUrl(buildpacks, args.buildpack);
28
+ }
29
+ if (spliceIndex === -1) {
30
+ core_1.ux.error('Buildpack not found. Nothing was removed.', { exit: 1 });
31
+ }
32
+ if (buildpacks.length === 1) {
33
+ await buildpackCommand.clear(flags.app, 'remove', 'removed');
34
+ }
35
+ else {
36
+ const buildpackUpdates = await buildpackCommand.mutate(flags.app, buildpacks, spliceIndex, args.buildpack, 'remove');
37
+ buildpackCommand.displayUpdate(flags.app, flags.remote || '', buildpackUpdates, 'removed');
38
+ }
39
+ }
40
+ }
41
+ exports.default = Remove;
42
+ Remove.description = 'remove a buildpack set on the app';
43
+ Remove.flags = {
44
+ app: command_1.flags.app({ required: true }),
45
+ remote: command_1.flags.remote(),
46
+ index: command_1.flags.integer({
47
+ description: 'the 1-based index of the URL to remove from the list of URLs',
48
+ char: 'i',
49
+ }),
50
+ };
51
+ Remove.args = {
52
+ buildpack: core_1.Args.string({
53
+ description: 'namespace/name of the buildpack',
54
+ }),
55
+ };
@@ -0,0 +1,13 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Search extends Command {
3
+ static description: string;
4
+ static flags: {
5
+ namespace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ };
9
+ static args: {
10
+ term: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const buildpack_registry_1 = require("@heroku/buildpack-registry");
6
+ class Search extends command_1.Command {
7
+ async run() {
8
+ const { args, flags } = await this.parse(Search);
9
+ let searchResults;
10
+ const registry = new buildpack_registry_1.BuildpackRegistry();
11
+ if (args.term) {
12
+ const uniqueBuildpacks = new Map();
13
+ const array = ((await registry.search(args.term)).unwrapOr([]))
14
+ .concat((await registry.search(undefined, args.term)).unwrapOr([]))
15
+ .concat((await registry.search(undefined, undefined, args.term)).unwrapOr([]));
16
+ array
17
+ .forEach((element) => {
18
+ uniqueBuildpacks.set(`${element.namespace}/${element.name}`, element);
19
+ });
20
+ searchResults = [...uniqueBuildpacks.values()];
21
+ }
22
+ else {
23
+ searchResults = (await registry.search(flags.namespace, flags.name, flags.description)).unwrapOr([]);
24
+ }
25
+ const buildpacks = searchResults.map((buildpack) => {
26
+ return {
27
+ buildpack: `${buildpack.namespace}/${buildpack.name}`,
28
+ category: buildpack.category,
29
+ description: buildpack.description,
30
+ };
31
+ });
32
+ const displayTable = (buildpacks) => {
33
+ core_1.ux.table(buildpacks, {
34
+ buildpack: {
35
+ header: 'Buildpack',
36
+ },
37
+ category: {
38
+ header: 'Category',
39
+ },
40
+ description: {
41
+ header: 'Description',
42
+ },
43
+ });
44
+ };
45
+ if (buildpacks.length === 0) {
46
+ core_1.ux.log('No buildpacks found');
47
+ }
48
+ else if (buildpacks.length === 1) {
49
+ displayTable(buildpacks);
50
+ core_1.ux.log('\n1 buildpack found');
51
+ }
52
+ else {
53
+ displayTable(buildpacks);
54
+ core_1.ux.log(`\n${buildpacks.length} buildpacks found`);
55
+ }
56
+ }
57
+ }
58
+ exports.default = Search;
59
+ Search.description = 'search for buildpacks';
60
+ Search.flags = {
61
+ namespace: command_1.flags.string({ description: 'buildpack namespaces to filter on using a comma separated list' }),
62
+ name: command_1.flags.string({ description: 'buildpack names to filter on using a comma separated list ' }),
63
+ description: command_1.flags.string({ description: 'buildpack description to filter on' }),
64
+ };
65
+ Search.args = {
66
+ term: core_1.Args.string({
67
+ description: 'search term that searches across name, namespace, and description',
68
+ }),
69
+ };
@@ -0,0 +1,13 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Set extends Command {
3
+ static description: 'set new app buildpack, overwriting into list of buildpacks if necessary';
4
+ static flags: {
5
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ index: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ };
9
+ static args: {
10
+ buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const buildpacks_1 = require("../../lib/buildpacks/buildpacks");
6
+ class Set extends command_1.Command {
7
+ async run() {
8
+ const { args, flags } = await this.parse(Set);
9
+ if (flags.index && flags.index < 0) {
10
+ this.error('Invalid index. Must be greater than 0.');
11
+ }
12
+ const buildpackCommand = new buildpacks_1.BuildpackCommand(this.heroku);
13
+ const buildpacks = await buildpackCommand.fetch(flags.app);
14
+ await buildpackCommand.validateUrlNotSet(buildpacks, args.buildpack);
15
+ let spliceIndex;
16
+ if (flags.index === undefined) {
17
+ spliceIndex = 0;
18
+ }
19
+ else {
20
+ // eslint-disable-next-line unicorn/no-array-callback-reference, unicorn/no-array-method-this-argument
21
+ const foundIndex = buildpackCommand.findIndex(buildpacks, flags.index);
22
+ spliceIndex = (foundIndex === -1) ? buildpacks.length : foundIndex;
23
+ }
24
+ const buildpackUpdates = await buildpackCommand.mutate(flags.app, buildpacks, spliceIndex, args.buildpack, 'set');
25
+ buildpackCommand.displayUpdate(flags.app, flags.remote || '', buildpackUpdates, 'set');
26
+ }
27
+ }
28
+ exports.default = Set;
29
+ Set.flags = {
30
+ app: command_1.flags.app({ required: true }),
31
+ remote: command_1.flags.remote(),
32
+ index: command_1.flags.integer({
33
+ description: 'the 1-based index of the URL in the list of URLs',
34
+ char: 'i',
35
+ }),
36
+ };
37
+ Set.args = {
38
+ buildpack: core_1.Args.string({
39
+ required: true,
40
+ description: 'namespace/name of the buildpack',
41
+ }),
42
+ };
@@ -0,0 +1,8 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Versions extends Command {
3
+ static description: string;
4
+ static args: {
5
+ buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
6
+ };
7
+ run(): Promise<void>;
8
+ }