heroku 8.1.9 → 8.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/autocomplete-scripts/README.md +7 -0
  2. package/autocomplete-scripts/bash/heroku.bash +59 -0
  3. package/autocomplete-scripts/brew/bash +4 -0
  4. package/autocomplete-scripts/brew/zsh/_heroku +59 -0
  5. package/autocomplete-scripts/zsh/_heroku +53 -0
  6. package/bin/bats-test-runner.js +7 -0
  7. package/bin/dev +17 -0
  8. package/bin/dev.cmd +3 -0
  9. package/bin/run +36 -1
  10. package/lib/analytics.d.ts +2 -2
  11. package/lib/analytics.js +3 -4
  12. package/lib/commands/auth/2fa/disable.d.ts +7 -0
  13. package/lib/commands/auth/2fa/disable.js +16 -0
  14. package/lib/commands/auth/2fa/index.d.ts +6 -0
  15. package/lib/commands/auth/2fa/index.js +18 -0
  16. package/lib/commands/auth/login.d.ts +8 -0
  17. package/lib/commands/auth/login.js +25 -0
  18. package/lib/commands/auth/logout.d.ts +6 -0
  19. package/lib/commands/auth/logout.js +14 -0
  20. package/lib/commands/auth/token.d.ts +7 -0
  21. package/lib/commands/auth/token.js +31 -0
  22. package/lib/commands/auth/whoami.d.ts +7 -0
  23. package/lib/commands/auth/whoami.js +26 -0
  24. package/lib/commands/authorizations/create.d.ts +13 -0
  25. package/lib/commands/authorizations/create.js +41 -0
  26. package/lib/commands/authorizations/index.d.ts +9 -0
  27. package/lib/commands/authorizations/index.js +35 -0
  28. package/lib/commands/authorizations/info.d.ts +11 -0
  29. package/lib/commands/authorizations/info.js +25 -0
  30. package/lib/commands/authorizations/revoke.d.ts +10 -0
  31. package/lib/commands/authorizations/revoke.js +22 -0
  32. package/lib/commands/authorizations/rotate.d.ts +8 -0
  33. package/lib/commands/authorizations/rotate.js +19 -0
  34. package/lib/commands/authorizations/update.d.ts +13 -0
  35. package/lib/commands/authorizations/update.js +36 -0
  36. package/lib/commands/autocomplete/create.d.ts +29 -0
  37. package/lib/commands/autocomplete/create.js +213 -0
  38. package/lib/commands/autocomplete/doctor.d.ts +12 -0
  39. package/lib/commands/autocomplete/doctor.js +97 -0
  40. package/lib/commands/autocomplete/index.d.ts +12 -0
  41. package/lib/commands/autocomplete/index.js +67 -0
  42. package/lib/commands/autocomplete/options.d.ts +25 -0
  43. package/lib/commands/autocomplete/options.js +210 -0
  44. package/lib/commands/autocomplete/script.d.ts +10 -0
  45. package/lib/commands/autocomplete/script.js +23 -0
  46. package/lib/commands/buildpacks/add.d.ts +13 -0
  47. package/lib/commands/buildpacks/add.js +43 -0
  48. package/lib/commands/buildpacks/clear.d.ts +9 -0
  49. package/lib/commands/buildpacks/clear.js +17 -0
  50. package/lib/commands/buildpacks/index.d.ts +9 -0
  51. package/lib/commands/buildpacks/index.js +25 -0
  52. package/lib/commands/buildpacks/info.d.ts +8 -0
  53. package/lib/commands/buildpacks/info.js +41 -0
  54. package/lib/commands/buildpacks/remove.d.ts +13 -0
  55. package/lib/commands/buildpacks/remove.js +55 -0
  56. package/lib/commands/buildpacks/search.d.ts +13 -0
  57. package/lib/commands/buildpacks/search.js +69 -0
  58. package/lib/commands/buildpacks/set.d.ts +13 -0
  59. package/lib/commands/buildpacks/set.js +42 -0
  60. package/lib/commands/buildpacks/versions.d.ts +8 -0
  61. package/lib/commands/buildpacks/versions.js +56 -0
  62. package/lib/commands/certs/auto/wait.d.ts +9 -0
  63. package/lib/commands/certs/auto/wait.js +14 -0
  64. package/lib/commands/ci/index.d.ts +12 -0
  65. package/lib/commands/ci/index.js +25 -0
  66. package/lib/commands/ci/info.d.ts +14 -0
  67. package/lib/commands/ci/info.js +29 -0
  68. package/lib/commands/ci/last.d.ts +11 -0
  69. package/lib/commands/ci/last.js +31 -0
  70. package/lib/commands/ci/rerun.d.ts +13 -0
  71. package/lib/commands/ci/rerun.js +53 -0
  72. package/lib/commands/ci/run.d.ts +10 -0
  73. package/lib/commands/ci/run.js +42 -0
  74. package/lib/commands/clients/create.d.ts +14 -0
  75. package/lib/commands/clients/create.js +37 -0
  76. package/lib/commands/clients/destroy.d.ts +8 -0
  77. package/lib/commands/clients/destroy.js +18 -0
  78. package/lib/commands/clients/index.d.ts +8 -0
  79. package/lib/commands/clients/index.js +32 -0
  80. package/lib/commands/clients/info.d.ts +13 -0
  81. package/lib/commands/clients/info.js +33 -0
  82. package/lib/commands/clients/rotate.d.ts +12 -0
  83. package/lib/commands/clients/rotate.js +33 -0
  84. package/lib/commands/clients/update.d.ts +13 -0
  85. package/lib/commands/clients/update.js +38 -0
  86. package/lib/commands/config/edit.d.ts +23 -0
  87. package/lib/commands/config/edit.js +132 -0
  88. package/lib/commands/config/get.d.ts +16 -0
  89. package/lib/commands/config/get.js +35 -0
  90. package/lib/commands/config/index.d.ts +11 -0
  91. package/lib/commands/config/index.js +33 -0
  92. package/lib/commands/config/unset.d.ts +12 -0
  93. package/lib/commands/config/unset.js +51 -0
  94. package/lib/commands/console.d.ts +11 -0
  95. package/lib/commands/console.js +30 -0
  96. package/lib/commands/domains/add.d.ts +19 -0
  97. package/lib/commands/domains/add.js +117 -0
  98. package/lib/commands/domains/clear.d.ts +11 -0
  99. package/lib/commands/domains/clear.js +26 -0
  100. package/lib/commands/domains/index.d.ts +40 -0
  101. package/lib/commands/domains/index.js +79 -0
  102. package/lib/commands/domains/info.d.ts +14 -0
  103. package/lib/commands/domains/info.js +25 -0
  104. package/lib/commands/domains/remove.d.ts +14 -0
  105. package/lib/commands/domains/remove.js +26 -0
  106. package/lib/commands/domains/update.d.ts +15 -0
  107. package/lib/commands/domains/update.js +40 -0
  108. package/lib/commands/domains/wait.d.ts +13 -0
  109. package/lib/commands/domains/wait.js +32 -0
  110. package/lib/commands/git/clone.d.ts +13 -0
  111. package/lib/commands/git/clone.js +29 -0
  112. package/lib/commands/git/credentials.d.ts +9 -0
  113. package/lib/commands/git/credentials.js +32 -0
  114. package/lib/commands/git/remote.d.ts +11 -0
  115. package/lib/commands/git/remote.js +44 -0
  116. package/lib/commands/labs/disable.d.ts +11 -0
  117. package/lib/commands/labs/disable.js +65 -0
  118. package/lib/commands/local/index.d.ts +17 -0
  119. package/lib/commands/local/index.js +75 -0
  120. package/lib/commands/local/run.d.ts +11 -0
  121. package/lib/commands/local/run.js +38 -0
  122. package/lib/commands/local/version.d.ts +5 -0
  123. package/lib/commands/local/version.js +13 -0
  124. package/lib/commands/logs.d.ts +16 -0
  125. package/lib/commands/logs.js +45 -0
  126. package/lib/commands/pipelines/add.d.ts +14 -0
  127. package/lib/commands/pipelines/add.js +61 -0
  128. package/lib/commands/pipelines/connect.d.ts +12 -0
  129. package/lib/commands/pipelines/connect.js +52 -0
  130. package/lib/commands/pipelines/create.d.ts +15 -0
  131. package/lib/commands/pipelines/create.js +91 -0
  132. package/lib/commands/pipelines/destroy.d.ts +9 -0
  133. package/lib/commands/pipelines/destroy.js +27 -0
  134. package/lib/commands/pipelines/diff.d.ts +19 -0
  135. package/lib/commands/pipelines/diff.js +152 -0
  136. package/lib/commands/pipelines/index.d.ts +9 -0
  137. package/lib/commands/pipelines/index.js +27 -0
  138. package/lib/commands/pipelines/info.d.ts +13 -0
  139. package/lib/commands/pipelines/info.js +43 -0
  140. package/lib/commands/pipelines/open.d.ts +9 -0
  141. package/lib/commands/pipelines/open.js +19 -0
  142. package/lib/commands/pipelines/promote.d.ts +12 -0
  143. package/lib/commands/pipelines/promote.js +216 -0
  144. package/lib/commands/pipelines/remove.d.ts +10 -0
  145. package/lib/commands/pipelines/remove.js +23 -0
  146. package/lib/commands/pipelines/rename.d.ts +10 -0
  147. package/lib/commands/pipelines/rename.js +33 -0
  148. package/lib/commands/pipelines/setup.d.ts +14 -0
  149. package/lib/commands/pipelines/setup.js +91 -0
  150. package/lib/commands/pipelines/transfer.d.ts +13 -0
  151. package/lib/commands/pipelines/transfer.js +65 -0
  152. package/lib/commands/pipelines/update.d.ts +11 -0
  153. package/lib/commands/pipelines/update.js +32 -0
  154. package/lib/commands/ps/autoscale/disable.d.ts +9 -0
  155. package/lib/commands/ps/autoscale/disable.js +35 -0
  156. package/lib/commands/ps/autoscale/enable.d.ts +13 -0
  157. package/lib/commands/ps/autoscale/enable.js +65 -0
  158. package/lib/commands/ps/wait.d.ts +12 -0
  159. package/lib/commands/ps/wait.js +78 -0
  160. package/lib/commands/rake.d.ts +14 -0
  161. package/lib/commands/rake.js +46 -0
  162. package/lib/commands/regions.d.ts +11 -0
  163. package/lib/commands/regions.js +45 -0
  164. package/lib/commands/reviewapps/disable.d.ts +17 -0
  165. package/lib/commands/reviewapps/disable.js +102 -0
  166. package/lib/commands/reviewapps/enable.d.ts +14 -0
  167. package/lib/commands/reviewapps/enable.js +89 -0
  168. package/lib/commands/run/detached.d.ts +15 -0
  169. package/lib/commands/run/detached.js +56 -0
  170. package/lib/commands/run/index.d.ts +18 -0
  171. package/lib/commands/run/index.js +64 -0
  172. package/lib/commands/run/inside.d.ts +15 -0
  173. package/lib/commands/run/inside.js +55 -0
  174. package/lib/commands/sessions/destroy.d.ts +8 -0
  175. package/lib/commands/sessions/destroy.js +18 -0
  176. package/lib/commands/sessions/index.d.ts +8 -0
  177. package/lib/commands/sessions/index.js +31 -0
  178. package/lib/commands/status.d.ts +8 -0
  179. package/lib/commands/status.js +46 -0
  180. package/lib/commands/webhooks/add.d.ts +16 -0
  181. package/lib/commands/webhooks/add.js +47 -0
  182. package/lib/commands/webhooks/deliveries/index.d.ts +12 -0
  183. package/lib/commands/webhooks/deliveries/index.js +80 -0
  184. package/lib/commands/webhooks/deliveries/info.d.ts +14 -0
  185. package/lib/commands/webhooks/deliveries/info.js +42 -0
  186. package/lib/commands/webhooks/events/index.d.ts +11 -0
  187. package/lib/commands/webhooks/events/index.js +46 -0
  188. package/lib/commands/webhooks/events/info.d.ts +14 -0
  189. package/lib/commands/webhooks/events/info.js +31 -0
  190. package/lib/commands/webhooks/index.d.ts +11 -0
  191. package/lib/commands/webhooks/index.js +45 -0
  192. package/lib/commands/webhooks/info.d.ts +14 -0
  193. package/lib/commands/webhooks/info.js +31 -0
  194. package/lib/commands/webhooks/remove.d.ts +14 -0
  195. package/lib/commands/webhooks/remove.js +29 -0
  196. package/lib/commands/webhooks/update.d.ts +19 -0
  197. package/lib/commands/webhooks/update.js +41 -0
  198. package/lib/file.js +2 -3
  199. package/lib/global_telemetry.d.ts +53 -0
  200. package/lib/global_telemetry.js +82 -0
  201. package/lib/hooks/command_not_found/performance_analytics.d.ts +3 -0
  202. package/lib/hooks/command_not_found/performance_analytics.js +7 -0
  203. package/lib/hooks/init/terms-of-service.js +3 -4
  204. package/lib/hooks/init/version.d.ts +2 -1
  205. package/lib/hooks/init/version.js +1 -2
  206. package/lib/hooks/postrun/performance_analytics.d.ts +3 -0
  207. package/lib/hooks/postrun/performance_analytics.js +11 -0
  208. package/lib/hooks/prerun/analytics.d.ts +2 -1
  209. package/lib/hooks/prerun/analytics.js +4 -4
  210. package/lib/hooks/recache.d.ts +3 -0
  211. package/lib/hooks/recache.js +56 -0
  212. package/lib/hooks/update/brew.d.ts +2 -1
  213. package/lib/hooks/update/brew.js +3 -5
  214. package/lib/hooks/update/completions.d.ts +2 -1
  215. package/lib/hooks/update/completions.js +2 -3
  216. package/lib/hooks/update/plugin-migrate.d.ts +2 -1
  217. package/lib/hooks/update/plugin-migrate.js +3 -5
  218. package/lib/hooks/update/tidy.d.ts +2 -1
  219. package/lib/hooks/update/tidy.js +3 -5
  220. package/lib/lib/authorizations/authorizations.d.ts +2 -0
  221. package/lib/lib/authorizations/authorizations.js +39 -0
  222. package/lib/lib/autocomplete/base.d.ts +11 -0
  223. package/lib/lib/autocomplete/base.js +44 -0
  224. package/lib/lib/autocomplete/cache.d.ts +2 -0
  225. package/lib/lib/autocomplete/cache.js +28 -0
  226. package/lib/lib/autocomplete/completions.d.ts +37 -0
  227. package/lib/lib/autocomplete/completions.js +261 -0
  228. package/lib/lib/buildpacks/buildpacks.d.ts +32 -0
  229. package/lib/lib/buildpacks/buildpacks.js +161 -0
  230. package/lib/lib/buildpacks/push.d.ts +0 -0
  231. package/lib/lib/buildpacks/push.js +4 -0
  232. package/lib/lib/ci/git.d.ts +8 -0
  233. package/lib/lib/ci/git.js +71 -0
  234. package/lib/lib/ci/interfaces/kolkrabbi.d.ts +311 -0
  235. package/lib/lib/ci/interfaces/kolkrabbi.js +7 -0
  236. package/lib/lib/ci/pipelines.d.ts +3 -0
  237. package/lib/lib/ci/pipelines.js +57 -0
  238. package/lib/lib/ci/source.d.ts +2 -0
  239. package/lib/lib/ci/source.js +42 -0
  240. package/lib/lib/ci/test-run.d.ts +5 -0
  241. package/lib/lib/ci/test-run.js +232 -0
  242. package/lib/lib/clients/clients.d.ts +1 -0
  243. package/lib/lib/clients/clients.js +25 -0
  244. package/lib/lib/config/quote.d.ts +2 -0
  245. package/lib/lib/config/quote.js +33 -0
  246. package/lib/lib/config/util.d.ts +3 -0
  247. package/lib/lib/config/util.js +12 -0
  248. package/lib/lib/domains/wait-for-domain.d.ts +3 -0
  249. package/lib/lib/domains/wait-for-domain.js +19 -0
  250. package/lib/lib/git/git.d.ts +8 -0
  251. package/lib/lib/git/git.js +56 -0
  252. package/lib/lib/local/fork-foreman.d.ts +1 -0
  253. package/lib/lib/local/fork-foreman.js +33 -0
  254. package/lib/lib/local/load-foreman-procfile.d.ts +0 -0
  255. package/lib/lib/local/load-foreman-procfile.js +2 -0
  256. package/lib/lib/local/run-foreman.d.ts +0 -0
  257. package/lib/lib/local/run-foreman.js +2 -0
  258. package/lib/lib/pipelines/api.d.ts +25 -0
  259. package/lib/lib/pipelines/api.js +130 -0
  260. package/lib/lib/pipelines/disambiguate.d.ts +3 -0
  261. package/lib/lib/pipelines/disambiguate.js +49 -0
  262. package/lib/lib/pipelines/github-api.d.ts +8 -0
  263. package/lib/lib/pipelines/github-api.js +18 -0
  264. package/lib/lib/pipelines/infer.d.ts +1 -0
  265. package/lib/lib/pipelines/infer.js +11 -0
  266. package/lib/lib/pipelines/key-by.d.ts +1 -0
  267. package/lib/lib/pipelines/key-by.js +11 -0
  268. package/lib/lib/pipelines/kolkrabbi-api.d.ts +14 -0
  269. package/lib/lib/pipelines/kolkrabbi-api.js +62 -0
  270. package/lib/lib/pipelines/ownership.d.ts +4 -0
  271. package/lib/lib/pipelines/ownership.js +40 -0
  272. package/lib/lib/pipelines/render-pipeline.d.ts +6 -0
  273. package/lib/lib/pipelines/render-pipeline.js +52 -0
  274. package/lib/lib/pipelines/setup/create-apps.d.ts +1 -0
  275. package/lib/lib/pipelines/setup/create-apps.js +44 -0
  276. package/lib/lib/pipelines/setup/get-ci-settings.d.ts +4 -0
  277. package/lib/lib/pipelines/setup/get-ci-settings.js +19 -0
  278. package/lib/lib/pipelines/setup/get-github-token.d.ts +1 -0
  279. package/lib/lib/pipelines/setup/get-github-token.js +10 -0
  280. package/lib/lib/pipelines/setup/get-name-and-repo.d.ts +1 -0
  281. package/lib/lib/pipelines/setup/get-name-and-repo.js +47 -0
  282. package/lib/lib/pipelines/setup/get-repo.d.ts +1 -0
  283. package/lib/lib/pipelines/setup/get-repo.js +8 -0
  284. package/lib/lib/pipelines/setup/get-settings.d.ts +9 -0
  285. package/lib/lib/pipelines/setup/get-settings.js +39 -0
  286. package/lib/lib/pipelines/setup/poll-app-setups.d.ts +1 -0
  287. package/lib/lib/pipelines/setup/poll-app-setups.js +25 -0
  288. package/lib/lib/pipelines/setup/setup-pipeline.d.ts +1 -0
  289. package/lib/lib/pipelines/setup/setup-pipeline.js +15 -0
  290. package/lib/lib/pipelines/setup/validate.d.ts +9 -0
  291. package/lib/lib/pipelines/setup/validate.js +31 -0
  292. package/lib/lib/pipelines/stages.d.ts +7 -0
  293. package/lib/lib/pipelines/stages.js +22 -0
  294. package/lib/lib/run/colorize.d.ts +2 -0
  295. package/lib/lib/run/colorize.js +300 -0
  296. package/lib/lib/run/dyno.d.ts +72 -0
  297. package/lib/lib/run/dyno.js +397 -0
  298. package/lib/lib/run/helpers.d.ts +2 -0
  299. package/lib/lib/run/helpers.js +34 -0
  300. package/lib/lib/run/line-transform.d.ts +4 -0
  301. package/lib/lib/run/line-transform.js +26 -0
  302. package/lib/lib/run/log-displayer.d.ts +10 -0
  303. package/lib/lib/run/log-displayer.js +79 -0
  304. package/lib/lib/sessions/sessions.d.ts +7 -0
  305. package/lib/lib/sessions/sessions.js +2 -0
  306. package/lib/lib/status/util.d.ts +1 -0
  307. package/lib/lib/status/util.js +14 -0
  308. package/lib/lib/webhooks/base.d.ts +13 -0
  309. package/lib/lib/webhooks/base.js +28 -0
  310. package/lib/user-config.js +2 -3
  311. package/oclif.manifest.json +3376 -2
  312. package/package.json +79 -42
  313. package/lib/hooks/update/b.d.ts +0 -2
  314. package/lib/hooks/update/b.js +0 -48
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringToConfig = void 0;
4
+ const color_1 = require("@heroku-cli/color");
5
+ const command_1 = require("@heroku-cli/command");
6
+ const core_1 = require("@oclif/core");
7
+ const _ = require("lodash");
8
+ const quote_1 = require("../../lib/config/quote");
9
+ const util_1 = require("../../lib/config/util");
10
+ const editor = new util_1.Editor();
11
+ function configToString(config) {
12
+ return Object.keys(config)
13
+ .sort()
14
+ .map(key => {
15
+ return `${key}=${(0, quote_1.quote)(config[key])}`;
16
+ })
17
+ .join('\n');
18
+ }
19
+ function removeDeleted(newConfig, original) {
20
+ for (const k of Object.keys(original)) {
21
+ // The api accepts empty strings
22
+ // as valid env var values
23
+ // In JS an empty string is falsey
24
+ if (!newConfig[k] && newConfig[k] !== '')
25
+ newConfig[k] = null;
26
+ }
27
+ }
28
+ function stringToConfig(s) {
29
+ return s.split('\n').reduce((config, line) => {
30
+ const error = () => {
31
+ throw new Error(`Invalid line: ${line}`);
32
+ };
33
+ if (!line)
34
+ return config;
35
+ const i = line.indexOf('=');
36
+ if (i === -1)
37
+ error();
38
+ config[line.slice(0, i)] = (0, quote_1.parse)(line.slice(i + 1)) || '';
39
+ return config;
40
+ }, {});
41
+ }
42
+ exports.stringToConfig = stringToConfig;
43
+ function allKeys(a, b) {
44
+ return _.uniq([...Object.keys(a), ...Object.keys(b)].sort());
45
+ }
46
+ function showDiff(from, to) {
47
+ for (const k of allKeys(from, to)) {
48
+ if (from[k] === to[k])
49
+ continue;
50
+ if (k in from) {
51
+ core_1.ux.log(color_1.color.red(`- ${k}=${(0, quote_1.quote)(from[k])}`));
52
+ }
53
+ if (k in to) {
54
+ core_1.ux.log(color_1.color.green(`+ ${k}=${(0, quote_1.quote)(to[k])}`));
55
+ }
56
+ }
57
+ }
58
+ class ConfigEdit extends command_1.Command {
59
+ async run() {
60
+ const { flags: { app }, args: { key } } = await this.parse(ConfigEdit);
61
+ this.app = app;
62
+ core_1.ux.action.start('Fetching config');
63
+ const original = await this.fetchLatestConfig();
64
+ core_1.ux.action.stop();
65
+ let newConfig = Object.assign({}, original);
66
+ const prefix = `heroku-${app}-config-`;
67
+ if (key) {
68
+ newConfig[key] = await editor.edit(original[key], { prefix });
69
+ if (!original[key].endsWith('\n') && newConfig[key].endsWith('\n'))
70
+ newConfig[key] = newConfig[key].slice(0, -1);
71
+ }
72
+ else {
73
+ const s = await editor.edit(configToString(original), { prefix, postfix: '.sh' });
74
+ newConfig = stringToConfig(s);
75
+ }
76
+ if (!await this.diffPrompt(original, newConfig))
77
+ return;
78
+ core_1.ux.action.start('Verifying new config');
79
+ await this.verifyUnchanged(original);
80
+ core_1.ux.action.start('Updating config');
81
+ removeDeleted(newConfig, original);
82
+ await this.updateConfig(newConfig);
83
+ core_1.ux.action.stop();
84
+ }
85
+ async fetchLatestConfig() {
86
+ const { body: original } = await this.heroku.get(`/apps/${this.app}/config-vars`);
87
+ return original;
88
+ }
89
+ async diffPrompt(original, newConfig) {
90
+ if (_.isEqual(original, newConfig)) {
91
+ this.warn('no changes to config');
92
+ return false;
93
+ }
94
+ core_1.ux.log();
95
+ core_1.ux.log('Config Diff:');
96
+ showDiff(original, newConfig);
97
+ core_1.ux.log();
98
+ return core_1.ux.confirm(`Update config on ${color_1.color.app(this.app)} with these values?`);
99
+ }
100
+ async verifyUnchanged(original) {
101
+ const latest = await this.fetchLatestConfig();
102
+ if (!_.isEqual(original, latest)) {
103
+ throw new Error('Config changed on server. Refusing to update.');
104
+ }
105
+ }
106
+ async updateConfig(newConfig) {
107
+ await this.heroku.patch(`/apps/${this.app}/config-vars`, {
108
+ body: newConfig,
109
+ });
110
+ }
111
+ }
112
+ exports.default = ConfigEdit;
113
+ ConfigEdit.description = `interactively edit config vars
114
+ This command opens the app config in a text editor set by $VISUAL or $EDITOR.
115
+ Any variables added/removed/changed will be updated on the app after saving and closing the file.`;
116
+ ConfigEdit.examples = [
117
+ `# edit with vim
118
+ $ EDITOR="vim" heroku config:edit`,
119
+ `# edit with emacs
120
+ $ EDITOR="emacs" heroku config:edit`,
121
+ `# edit with pico
122
+ $ EDITOR="pico" heroku config:edit`,
123
+ `# edit with atom editor
124
+ $ VISUAL="atom --wait" heroku config:edit`,
125
+ ];
126
+ ConfigEdit.flags = {
127
+ app: command_1.flags.app({ required: true }),
128
+ remote: command_1.flags.remote(),
129
+ };
130
+ ConfigEdit.args = {
131
+ key: core_1.Args.string({ optional: true, description: 'edit a single key' }),
132
+ };
@@ -0,0 +1,16 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export declare class ConfigGet extends Command {
3
+ static usage: string;
4
+ static description: string;
5
+ static example: string;
6
+ static strict: boolean;
7
+ static args: {
8
+ KEY: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
9
+ };
10
+ static flags: {
11
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ shell: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigGet = void 0;
4
+ const command_1 = require("@heroku-cli/command");
5
+ const core_1 = require("@oclif/core");
6
+ const quote_1 = require("../../lib/config/quote");
7
+ class ConfigGet extends command_1.Command {
8
+ async run() {
9
+ const { flags, argv } = await this.parse(ConfigGet);
10
+ const { body: config } = await this.heroku.get(`/apps/${flags.app}/config-vars`);
11
+ for (const key of argv) {
12
+ const v = config[key];
13
+ if (flags.shell) {
14
+ this.log(`${key}=${(0, quote_1.quote)(v || '')}`);
15
+ }
16
+ else {
17
+ this.log(v || '');
18
+ }
19
+ }
20
+ }
21
+ }
22
+ exports.ConfigGet = ConfigGet;
23
+ ConfigGet.usage = 'config:get KEY...';
24
+ ConfigGet.description = 'display a single config value for an app';
25
+ ConfigGet.example = `$ heroku config:get RAILS_ENV
26
+ production`;
27
+ ConfigGet.strict = false;
28
+ ConfigGet.args = {
29
+ KEY: core_1.Args.string({ required: true }),
30
+ };
31
+ ConfigGet.flags = {
32
+ app: command_1.flags.app({ required: true }),
33
+ remote: command_1.flags.remote(),
34
+ shell: command_1.flags.boolean({ char: 's', description: 'output config vars in shell format' }),
35
+ };
@@ -0,0 +1,11 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export declare class ConfigIndex 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
+ shell: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigIndex = void 0;
4
+ const color_1 = require("@heroku-cli/color");
5
+ const command_1 = require("@heroku-cli/command");
6
+ const core_1 = require("@oclif/core");
7
+ const _ = require("lodash");
8
+ const quote_1 = require("../../lib/config/quote");
9
+ class ConfigIndex extends command_1.Command {
10
+ async run() {
11
+ const { flags } = await this.parse(ConfigIndex);
12
+ const { body: config } = await this.heroku.get(`/apps/${flags.app}/config-vars`);
13
+ if (flags.shell) {
14
+ Object.entries(config)
15
+ .forEach(([k, v]) => core_1.ux.log(`${k}=${(0, quote_1.quote)(v)}`));
16
+ }
17
+ else if (flags.json) {
18
+ core_1.ux.styledJSON(config);
19
+ }
20
+ else {
21
+ core_1.ux.styledHeader(`${flags.app} Config Vars`);
22
+ core_1.ux.styledObject(_.mapKeys(config, (_, k) => color_1.default.configVar(k)));
23
+ }
24
+ }
25
+ }
26
+ exports.ConfigIndex = ConfigIndex;
27
+ ConfigIndex.description = 'display the config vars for an app';
28
+ ConfigIndex.flags = {
29
+ app: command_1.flags.app({ required: true }),
30
+ remote: command_1.flags.remote(),
31
+ shell: command_1.flags.boolean({ char: 's', description: 'output config vars in shell format' }),
32
+ json: command_1.flags.boolean({ char: 'j', description: 'output config vars in json format' }),
33
+ };
@@ -0,0 +1,12 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export declare class ConfigUnset extends Command {
3
+ static aliases: string[];
4
+ static description: string;
5
+ static examples: string[];
6
+ static strict: boolean;
7
+ static flags: {
8
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfigUnset = void 0;
4
+ const color_1 = require("@heroku-cli/color");
5
+ const command_1 = require("@heroku-cli/command");
6
+ const core_1 = require("@oclif/core");
7
+ const _ = require("lodash");
8
+ class ConfigUnset extends command_1.Command {
9
+ async run() {
10
+ const parsed = await this.parse(ConfigUnset);
11
+ const { flags } = parsed;
12
+ const argv = parsed.argv;
13
+ const lastRelease = async () => {
14
+ const { body: releases } = await this.heroku.get(`/apps/${flags.app}/releases`, {
15
+ partial: true,
16
+ headers: { Range: 'version ..; order=desc,max=1' },
17
+ });
18
+ return releases[0];
19
+ };
20
+ if (argv.length === 0) {
21
+ this.error('Usage: heroku config:unset KEY1 [KEY2 ...]\nMust specify KEY to unset.');
22
+ }
23
+ const vars = argv.map(v => color_1.default.configVar(v)).join(', ');
24
+ core_1.ux.action.start(`Unsetting ${vars} and restarting ${color_1.default.app(flags.app)}`);
25
+ await this.heroku.patch(`/apps/${flags.app}/config-vars`, {
26
+ // body will be like {FOO: null, BAR: null}
27
+ body: _.reduce(argv, (vars, v) => {
28
+ vars[v] = null;
29
+ return vars;
30
+ }, {}),
31
+ });
32
+ const release = await lastRelease();
33
+ core_1.ux.action.stop('done, ' + color_1.default.release(`v${release.version}`));
34
+ }
35
+ }
36
+ exports.ConfigUnset = ConfigUnset;
37
+ ConfigUnset.aliases = [
38
+ 'config:remove',
39
+ ];
40
+ ConfigUnset.description = 'unset one or more config vars';
41
+ ConfigUnset.examples = [
42
+ `$ heroku config:unset RAILS_ENV
43
+ Unsetting RAILS_ENV and restarting example... done, v10`,
44
+ `$ heroku config:unset RAILS_ENV RACK_ENV
45
+ Unsetting RAILS_ENV, RACK_ENV and restarting example... done, v10`,
46
+ ];
47
+ ConfigUnset.strict = false;
48
+ ConfigUnset.flags = {
49
+ app: command_1.flags.app({ char: 'a', required: true }),
50
+ remote: command_1.flags.remote({ char: 'r' }),
51
+ };
@@ -0,0 +1,11 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class RunConsole extends Command {
3
+ static hidden: boolean;
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
+ size: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ env: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // tslint:disable:file-name-casing
4
+ const command_1 = require("@heroku-cli/command");
5
+ const completions_1 = require("@heroku-cli/command/lib/completions");
6
+ const dyno_1 = require("../lib/run/dyno");
7
+ const helpers_1 = require("../lib/run/helpers");
8
+ class RunConsole extends command_1.Command {
9
+ async run() {
10
+ const { flags } = await this.parse(RunConsole);
11
+ const opts = {
12
+ heroku: this.heroku,
13
+ app: flags.app,
14
+ command: (0, helpers_1.buildCommand)(['console']),
15
+ size: flags.size,
16
+ env: flags.env,
17
+ attach: true,
18
+ };
19
+ const dyno = new dyno_1.default(opts);
20
+ await dyno.start();
21
+ }
22
+ }
23
+ exports.default = RunConsole;
24
+ RunConsole.hidden = true;
25
+ RunConsole.flags = {
26
+ app: command_1.flags.app({ required: true }),
27
+ remote: command_1.flags.remote(),
28
+ size: command_1.flags.string({ char: 's', description: 'dyno size', completion: completions_1.DynoSizeCompletion }),
29
+ env: command_1.flags.string({ char: 'e', description: 'environment variables to set (use \';\' to split multiple vars)' }),
30
+ };
@@ -0,0 +1,19 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ import * as Heroku from '@heroku-cli/schema';
3
+ export default class DomainsAdd extends Command {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
8
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ cert: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ };
14
+ static args: {
15
+ hostname: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
16
+ };
17
+ certSelect: (certs: Array<Heroku.SniEndpoint>) => Promise<string>;
18
+ run(): Promise<void>;
19
+ }
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const color_1 = require("@heroku-cli/color");
4
+ const command_1 = require("@heroku-cli/command");
5
+ const core_1 = require("@oclif/core");
6
+ const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
7
+ const inquirer_1 = require("inquirer");
8
+ const shellescape = require("shell-escape");
9
+ const wait_for_domain_1 = require("../../lib/domains/wait-for-domain");
10
+ class DomainsAdd extends command_1.Command {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.certSelect = async (certs) => {
14
+ const nullCertChoice = {
15
+ name: 'No SNI Endpoint',
16
+ value: null,
17
+ };
18
+ const certChoices = certs.map((cert) => {
19
+ const certName = cert.displayName || cert.name;
20
+ const domainsLength = cert.ssl_cert.cert_domains.length;
21
+ if (domainsLength) {
22
+ let domainsList = cert.ssl_cert.cert_domains.slice(0, 4).join(', ');
23
+ if (domainsLength > 5) {
24
+ domainsList = `${domainsList} (...and ${domainsLength - 4} more)`;
25
+ }
26
+ domainsList = `${certName} -> ${domainsList}`;
27
+ return {
28
+ name: domainsList,
29
+ value: cert.name,
30
+ };
31
+ }
32
+ return {
33
+ name: certName,
34
+ value: cert.name,
35
+ };
36
+ });
37
+ const selection = await (0, inquirer_1.prompt)([
38
+ {
39
+ type: 'list',
40
+ name: 'cert',
41
+ message: 'Choose an SNI endpoint to associate with this domain',
42
+ choices: [nullCertChoice, ...certChoices],
43
+ },
44
+ ]);
45
+ return selection.cert;
46
+ };
47
+ }
48
+ async run() {
49
+ const { args, flags } = await this.parse(DomainsAdd);
50
+ const { hostname } = args;
51
+ const action = new spinner_1.default();
52
+ const domainCreatePayload = {
53
+ hostname,
54
+ sni_endpoint: null,
55
+ };
56
+ let certs = [];
57
+ action.start(`Adding ${color_1.color.green(domainCreatePayload.hostname)} to ${color_1.color.app(flags.app)}`);
58
+ if (flags.cert) {
59
+ domainCreatePayload.sni_endpoint = flags.cert;
60
+ }
61
+ else {
62
+ const { body } = await this.heroku.get(`/apps/${flags.app}/sni-endpoints`);
63
+ certs = [...body];
64
+ }
65
+ if (certs.length > 1) {
66
+ action.stop('resolving SNI endpoint');
67
+ const certSelection = await this.certSelect(certs);
68
+ if (certSelection) {
69
+ domainCreatePayload.sni_endpoint = certSelection;
70
+ }
71
+ action.start(`Adding ${color_1.color.green(domainCreatePayload.hostname)} to ${color_1.color.app(flags.app)}`);
72
+ }
73
+ try {
74
+ const { body: domain } = await this.heroku.post(`/apps/${flags.app}/domains`, {
75
+ body: domainCreatePayload,
76
+ });
77
+ if (flags.json) {
78
+ core_1.ux.styledJSON(domain);
79
+ }
80
+ else {
81
+ core_1.ux.log(`Configure your app's DNS provider to point to the DNS Target ${color_1.color.green(domain.cname || '')}.
82
+ For help, see https://devcenter.heroku.com/articles/custom-domains`);
83
+ if (domain.status !== 'none') {
84
+ if (flags.wait) {
85
+ await (0, wait_for_domain_1.default)(flags.app, this.heroku, domain);
86
+ }
87
+ else {
88
+ core_1.ux.log('');
89
+ core_1.ux.log(`The domain ${color_1.color.green(hostname)} has been enqueued for addition`);
90
+ const command = `heroku domains:wait ${shellescape([hostname])}`;
91
+ core_1.ux.log(`Run ${color_1.color.cmd(command)} to wait for completion`);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ catch (error) {
97
+ core_1.ux.error(error);
98
+ }
99
+ finally {
100
+ action.stop();
101
+ }
102
+ }
103
+ }
104
+ exports.default = DomainsAdd;
105
+ DomainsAdd.description = 'add a domain to an app';
106
+ DomainsAdd.examples = ['heroku domains:add www.example.com'];
107
+ DomainsAdd.flags = {
108
+ help: command_1.flags.help({ char: 'h' }),
109
+ app: command_1.flags.app({ required: true }),
110
+ cert: command_1.flags.string({ description: 'the name of the SSL cert you want to use for this domain', char: 'c' }),
111
+ json: command_1.flags.boolean({ description: 'output in json format', char: 'j' }),
112
+ wait: command_1.flags.boolean(),
113
+ remote: command_1.flags.remote(),
114
+ };
115
+ DomainsAdd.args = {
116
+ hostname: core_1.Args.string({ required: true }),
117
+ };
@@ -0,0 +1,11 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class DomainsClear extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const color_1 = require("@heroku-cli/color");
4
+ const command_1 = require("@heroku-cli/command");
5
+ const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
6
+ class DomainsClear extends command_1.Command {
7
+ async run() {
8
+ const { flags } = await this.parse(DomainsClear);
9
+ const action = new spinner_1.default();
10
+ action.start(`Removing all domains from ${color_1.color.app(flags.app)}`);
11
+ let { body: domains } = await this.heroku.get(`/apps/${flags.app}/domains`);
12
+ domains = domains.filter((d) => d.kind === 'custom');
13
+ for (const domain of domains) {
14
+ await this.heroku.delete(`/apps/${flags.app}/domains/${domain.hostname}`);
15
+ }
16
+ action.stop();
17
+ }
18
+ }
19
+ exports.default = DomainsClear;
20
+ DomainsClear.description = 'remove all domains from an app';
21
+ DomainsClear.examples = ['heroku domains:clear'];
22
+ DomainsClear.flags = {
23
+ help: command_1.flags.help({ char: 'h' }),
24
+ app: command_1.flags.app({ required: true }),
25
+ remote: command_1.flags.remote(),
26
+ };
@@ -0,0 +1,40 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ import * as Heroku from '@heroku-cli/schema';
3
+ export default class DomainsIndex extends Command {
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ extended: import("@oclif/core/lib/interfaces").Flag<boolean>;
8
+ 'no-header': import("@oclif/core/lib/interfaces").Flag<boolean>;
9
+ sort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ columns: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ filter: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
+ csv: import("@oclif/core/lib/interfaces").Flag<boolean>;
13
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
15
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ tableConfig: (needsEndpoints: boolean) => {
20
+ hostname: {
21
+ header: string;
22
+ };
23
+ kind: {
24
+ header: string;
25
+ get: (domain: Heroku.Domain) => "ALIAS or ANAME" | "CNAME" | undefined;
26
+ };
27
+ cname: {
28
+ header: string;
29
+ };
30
+ acm_status: {
31
+ header: string;
32
+ extended: boolean;
33
+ };
34
+ acm_status_reason: {
35
+ header: string;
36
+ extended: boolean;
37
+ };
38
+ };
39
+ run(): Promise<void>;
40
+ }
@@ -0,0 +1,79 @@
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 Uri = require("urijs");
6
+ function isApexDomain(hostname) {
7
+ if (hostname.includes('*'))
8
+ return false;
9
+ const a = new Uri({ protocol: 'http', hostname });
10
+ return a.subdomain() === '';
11
+ }
12
+ class DomainsIndex extends command_1.Command {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.tableConfig = (needsEndpoints) => {
16
+ const tableConfig = {
17
+ hostname: {
18
+ header: 'Domain Name',
19
+ },
20
+ kind: {
21
+ header: 'DNS Record Type',
22
+ get: (domain) => {
23
+ if (domain.hostname) {
24
+ return isApexDomain(domain.hostname) ? 'ALIAS or ANAME' : 'CNAME';
25
+ }
26
+ },
27
+ },
28
+ cname: { header: 'DNS Target' },
29
+ acm_status: { header: 'ACM Status', extended: true },
30
+ acm_status_reason: { header: 'ACM Status', extended: true },
31
+ };
32
+ const sniConfig = {
33
+ sni_endpoint: {
34
+ header: 'SNI Endpoint',
35
+ get: (domain) => {
36
+ if (domain.sni_endpoint) {
37
+ return domain.sni_endpoint.name;
38
+ }
39
+ },
40
+ },
41
+ };
42
+ if (needsEndpoints) {
43
+ return Object.assign(Object.assign({}, tableConfig), sniConfig);
44
+ }
45
+ return tableConfig;
46
+ };
47
+ }
48
+ async run() {
49
+ const { flags } = await this.parse(DomainsIndex);
50
+ const { body: domains } = await this.heroku.get(`/apps/${flags.app}/domains`);
51
+ const herokuDomain = domains.find(domain => domain.kind === 'heroku');
52
+ const customDomains = domains.filter(domain => domain.kind === 'custom');
53
+ if (flags.json) {
54
+ core_1.ux.styledJSON(domains);
55
+ }
56
+ else {
57
+ core_1.ux.styledHeader(`${flags.app} Heroku Domain`);
58
+ core_1.ux.log(herokuDomain && herokuDomain.hostname);
59
+ if (customDomains && customDomains.length > 0) {
60
+ core_1.ux.log();
61
+ core_1.ux.styledHeader(`${flags.app} Custom Domains`);
62
+ core_1.ux.table(customDomains, this.tableConfig(true), Object.assign(Object.assign({}, flags), { 'no-truncate': true }));
63
+ }
64
+ }
65
+ }
66
+ }
67
+ exports.default = DomainsIndex;
68
+ DomainsIndex.description = 'list domains for an app';
69
+ DomainsIndex.examples = [
70
+ `$ heroku domains
71
+ === example Heroku Domain
72
+ example-xxxxxxxxxxxx.herokuapp.com
73
+
74
+ === example Custom Domains
75
+ Domain Name DNS Record Type DNS Target
76
+ www.example.com CNAME www.example.herokudns.com
77
+ `, "$ heroku domains --filter 'Domain Name=www.example.com'",
78
+ ];
79
+ DomainsIndex.flags = Object.assign({ help: command_1.flags.help({ char: 'h' }), app: command_1.flags.app({ required: true }), remote: command_1.flags.remote(), json: command_1.flags.boolean({ description: 'output in json format', char: 'j' }) }, core_1.ux.table.flags({ except: 'no-truncate' }));
@@ -0,0 +1,14 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class DomainsInfo extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ };
10
+ static args: {
11
+ hostname: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
12
+ };
13
+ run(): Promise<void>;
14
+ }