@forge/cli 0.0.0-experimental-a9f00a0 → 0.0.0-experimental-deeb8f6

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 (283) hide show
  1. package/CHANGELOG.md +8 -6
  2. package/npm-shrinkwrap.json +222 -3885
  3. package/out/bin/cli.d.ts +0 -1
  4. package/out/bin/cli.d.ts.map +1 -1
  5. package/out/bin/cli.js +1 -4
  6. package/package.json +3 -56
  7. package/out/analytics-client/analytics-client.d.ts +0 -4
  8. package/out/analytics-client/analytics-client.d.ts.map +0 -1
  9. package/out/analytics-client/analytics-client.js +0 -6
  10. package/out/analytics-client/analytics-message-handler.d.ts +0 -17
  11. package/out/analytics-client/analytics-message-handler.d.ts.map +0 -1
  12. package/out/analytics-client/analytics-message-handler.js +0 -15
  13. package/out/autocomplete/autocomplete-config.json +0 -243
  14. package/out/autocomplete/index.d.ts +0 -5
  15. package/out/autocomplete/index.d.ts.map +0 -1
  16. package/out/autocomplete/index.js +0 -40
  17. package/out/autocomplete/isSupportedShell.d.ts +0 -2
  18. package/out/autocomplete/isSupportedShell.d.ts.map +0 -1
  19. package/out/autocomplete/isSupportedShell.js +0 -11
  20. package/out/autocomplete/types.d.ts +0 -14
  21. package/out/autocomplete/types.d.ts.map +0 -1
  22. package/out/autocomplete/types.js +0 -2
  23. package/out/autocomplete/util.d.ts +0 -6
  24. package/out/autocomplete/util.d.ts.map +0 -1
  25. package/out/autocomplete/util.js +0 -13
  26. package/out/bin/postinstall.d.ts +0 -2
  27. package/out/bin/postinstall.d.ts.map +0 -1
  28. package/out/bin/postinstall.js +0 -10
  29. package/out/command-line/anon-user-id.d.ts +0 -3
  30. package/out/command-line/anon-user-id.d.ts.map +0 -1
  31. package/out/command-line/anon-user-id.js +0 -17
  32. package/out/command-line/command.d.ts +0 -79
  33. package/out/command-line/command.d.ts.map +0 -1
  34. package/out/command-line/command.js +0 -348
  35. package/out/command-line/controller/assertUnreachable.d.ts +0 -2
  36. package/out/command-line/controller/assertUnreachable.d.ts.map +0 -1
  37. package/out/command-line/controller/assertUnreachable.js +0 -7
  38. package/out/command-line/controller/autocomplete-controller.d.ts +0 -12
  39. package/out/command-line/controller/autocomplete-controller.d.ts.map +0 -1
  40. package/out/command-line/controller/autocomplete-controller.js +0 -54
  41. package/out/command-line/controller/deploy-controller.d.ts +0 -43
  42. package/out/command-line/controller/deploy-controller.d.ts.map +0 -1
  43. package/out/command-line/controller/deploy-controller.js +0 -139
  44. package/out/command-line/controller/feedback-controller.d.ts +0 -9
  45. package/out/command-line/controller/feedback-controller.d.ts.map +0 -1
  46. package/out/command-line/controller/feedback-controller.js +0 -19
  47. package/out/command-line/controller/getNodeVersion.d.ts +0 -2
  48. package/out/command-line/controller/getNodeVersion.d.ts.map +0 -1
  49. package/out/command-line/controller/getNodeVersion.js +0 -7
  50. package/out/command-line/controller/install-controller.d.ts +0 -35
  51. package/out/command-line/controller/install-controller.d.ts.map +0 -1
  52. package/out/command-line/controller/install-controller.js +0 -154
  53. package/out/command-line/controller/lint-controller.d.ts +0 -9
  54. package/out/command-line/controller/lint-controller.d.ts.map +0 -1
  55. package/out/command-line/controller/lint-controller.js +0 -20
  56. package/out/command-line/controller/pre-command-controller.d.ts +0 -25
  57. package/out/command-line/controller/pre-command-controller.d.ts.map +0 -1
  58. package/out/command-line/controller/pre-command-controller.js +0 -57
  59. package/out/command-line/controller/prerequisites-controller.d.ts +0 -11
  60. package/out/command-line/controller/prerequisites-controller.d.ts.map +0 -1
  61. package/out/command-line/controller/prerequisites-controller.js +0 -34
  62. package/out/command-line/controller/settings-controller.d.ts +0 -19
  63. package/out/command-line/controller/settings-controller.d.ts.map +0 -1
  64. package/out/command-line/controller/settings-controller.js +0 -48
  65. package/out/command-line/controller/stubController.d.ts +0 -9
  66. package/out/command-line/controller/stubController.d.ts.map +0 -1
  67. package/out/command-line/controller/stubController.js +0 -15
  68. package/out/command-line/controller/tunnel-controller.d.ts +0 -14
  69. package/out/command-line/controller/tunnel-controller.d.ts.map +0 -1
  70. package/out/command-line/controller/tunnel-controller.js +0 -42
  71. package/out/command-line/dependency-injection.d.ts +0 -69
  72. package/out/command-line/dependency-injection.d.ts.map +0 -1
  73. package/out/command-line/dependency-injection.js +0 -186
  74. package/out/command-line/environment.d.ts +0 -2
  75. package/out/command-line/environment.d.ts.map +0 -1
  76. package/out/command-line/environment.js +0 -15
  77. package/out/command-line/errors.d.ts +0 -6
  78. package/out/command-line/errors.d.ts.map +0 -1
  79. package/out/command-line/errors.js +0 -12
  80. package/out/command-line/index.d.ts +0 -5
  81. package/out/command-line/index.d.ts.map +0 -1
  82. package/out/command-line/index.js +0 -66
  83. package/out/command-line/register-app-commands.d.ts +0 -10
  84. package/out/command-line/register-app-commands.d.ts.map +0 -1
  85. package/out/command-line/register-app-commands.js +0 -128
  86. package/out/command-line/register-authentication-command.d.ts +0 -16
  87. package/out/command-line/register-authentication-command.d.ts.map +0 -1
  88. package/out/command-line/register-authentication-command.js +0 -92
  89. package/out/command-line/register-autocomplete-commands.d.ts +0 -3
  90. package/out/command-line/register-autocomplete-commands.d.ts.map +0 -1
  91. package/out/command-line/register-autocomplete-commands.js +0 -13
  92. package/out/command-line/register-deployment-commands.d.ts +0 -22
  93. package/out/command-line/register-deployment-commands.d.ts.map +0 -1
  94. package/out/command-line/register-deployment-commands.js +0 -15
  95. package/out/command-line/register-environment-variables-commands.d.ts +0 -3
  96. package/out/command-line/register-environment-variables-commands.d.ts.map +0 -1
  97. package/out/command-line/register-environment-variables-commands.js +0 -99
  98. package/out/command-line/register-feedback-commands.d.ts +0 -3
  99. package/out/command-line/register-feedback-commands.d.ts.map +0 -1
  100. package/out/command-line/register-feedback-commands.js +0 -31
  101. package/out/command-line/register-installation-commands.d.ts +0 -6
  102. package/out/command-line/register-installation-commands.d.ts.map +0 -1
  103. package/out/command-line/register-installation-commands.js +0 -140
  104. package/out/command-line/register-lint-command.d.ts +0 -8
  105. package/out/command-line/register-lint-command.d.ts.map +0 -1
  106. package/out/command-line/register-lint-command.js +0 -15
  107. package/out/command-line/register-log-commands.d.ts +0 -4
  108. package/out/command-line/register-log-commands.d.ts.map +0 -1
  109. package/out/command-line/register-log-commands.js +0 -138
  110. package/out/command-line/register-providers-commands.d.ts +0 -3
  111. package/out/command-line/register-providers-commands.d.ts.map +0 -1
  112. package/out/command-line/register-providers-commands.js +0 -43
  113. package/out/command-line/register-settings-commands.d.ts +0 -3
  114. package/out/command-line/register-settings-commands.d.ts.map +0 -1
  115. package/out/command-line/register-settings-commands.js +0 -37
  116. package/out/command-line/register-tunnel-commands.d.ts +0 -3
  117. package/out/command-line/register-tunnel-commands.d.ts.map +0 -1
  118. package/out/command-line/register-tunnel-commands.js +0 -14
  119. package/out/command-line/register-webtrigger-commands.d.ts +0 -3
  120. package/out/command-line/register-webtrigger-commands.d.ts.map +0 -1
  121. package/out/command-line/register-webtrigger-commands.js +0 -55
  122. package/out/command-line/unique-machine-id.d.ts +0 -3
  123. package/out/command-line/unique-machine-id.d.ts.map +0 -1
  124. package/out/command-line/unique-machine-id.js +0 -18
  125. package/out/command-line/version-info.d.ts +0 -8
  126. package/out/command-line/version-info.d.ts.map +0 -1
  127. package/out/command-line/version-info.js +0 -34
  128. package/out/command-line/view/analytics-settings-view.d.ts +0 -7
  129. package/out/command-line/view/analytics-settings-view.d.ts.map +0 -1
  130. package/out/command-line/view/analytics-settings-view.js +0 -18
  131. package/out/command-line/view/deploy-view.d.ts +0 -21
  132. package/out/command-line/view/deploy-view.d.ts.map +0 -1
  133. package/out/command-line/view/deploy-view.js +0 -57
  134. package/out/command-line/view/install-view.d.ts +0 -18
  135. package/out/command-line/view/install-view.d.ts.map +0 -1
  136. package/out/command-line/view/install-view.js +0 -55
  137. package/out/command-line/view/lint-view.d.ts +0 -12
  138. package/out/command-line/view/lint-view.d.ts.map +0 -1
  139. package/out/command-line/view/lint-view.js +0 -31
  140. package/out/command-line/view/lite-lint-view.d.ts +0 -10
  141. package/out/command-line/view/lite-lint-view.d.ts.map +0 -1
  142. package/out/command-line/view/lite-lint-view.js +0 -18
  143. package/out/command-line/view/settings-view.d.ts +0 -8
  144. package/out/command-line/view/settings-view.d.ts.map +0 -1
  145. package/out/command-line/view/settings-view.js +0 -21
  146. package/out/command-line/view/tunnel-view.d.ts +0 -18
  147. package/out/command-line/view/tunnel-view.d.ts.map +0 -1
  148. package/out/command-line/view/tunnel-view.js +0 -89
  149. package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts +0 -24
  150. package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts.map +0 -1
  151. package/out/deploy/deployer/deploy-monitor-graphql-client.js +0 -57
  152. package/out/deploy/deployer/deployer.d.ts +0 -31
  153. package/out/deploy/deployer/deployer.d.ts.map +0 -1
  154. package/out/deploy/deployer/deployer.js +0 -154
  155. package/out/deploy/deployer/index.d.ts +0 -4
  156. package/out/deploy/deployer/index.d.ts.map +0 -1
  157. package/out/deploy/deployer/index.js +0 -6
  158. package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts +0 -19
  159. package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts.map +0 -1
  160. package/out/deploy/deployer/trigger-deploy-graphql-client.js +0 -45
  161. package/out/deploy/index.d.ts +0 -5
  162. package/out/deploy/index.d.ts.map +0 -1
  163. package/out/deploy/index.js +0 -7
  164. package/out/deploy/package-upload-deploy.d.ts +0 -18
  165. package/out/deploy/package-upload-deploy.d.ts.map +0 -1
  166. package/out/deploy/package-upload-deploy.js +0 -28
  167. package/out/deploy/packager/archiver.d.ts +0 -24
  168. package/out/deploy/packager/archiver.d.ts.map +0 -1
  169. package/out/deploy/packager/archiver.js +0 -62
  170. package/out/deploy/packager/index.d.ts +0 -3
  171. package/out/deploy/packager/index.d.ts.map +0 -1
  172. package/out/deploy/packager/index.js +0 -5
  173. package/out/deploy/packager/packager.d.ts +0 -33
  174. package/out/deploy/packager/packager.d.ts.map +0 -1
  175. package/out/deploy/packager/packager.js +0 -38
  176. package/out/deploy/uploader/artifact-graphql-client.d.ts +0 -26
  177. package/out/deploy/uploader/artifact-graphql-client.d.ts.map +0 -1
  178. package/out/deploy/uploader/artifact-graphql-client.js +0 -92
  179. package/out/deploy/uploader/index.d.ts +0 -3
  180. package/out/deploy/uploader/index.d.ts.map +0 -1
  181. package/out/deploy/uploader/index.js +0 -5
  182. package/out/deploy/uploader/uploader.d.ts +0 -19
  183. package/out/deploy/uploader/uploader.d.ts.map +0 -1
  184. package/out/deploy/uploader/uploader.js +0 -43
  185. package/out/environment-variables/delete-environment-variable.d.ts +0 -18
  186. package/out/environment-variables/delete-environment-variable.d.ts.map +0 -1
  187. package/out/environment-variables/delete-environment-variable.js +0 -14
  188. package/out/environment-variables/graphql-client.d.ts +0 -16
  189. package/out/environment-variables/graphql-client.d.ts.map +0 -1
  190. package/out/environment-variables/graphql-client.js +0 -105
  191. package/out/environment-variables/list-environment-variables.d.ts +0 -22
  192. package/out/environment-variables/list-environment-variables.d.ts.map +0 -1
  193. package/out/environment-variables/list-environment-variables.js +0 -14
  194. package/out/environment-variables/set-environment-variable.d.ts +0 -20
  195. package/out/environment-variables/set-environment-variable.d.ts.map +0 -1
  196. package/out/environment-variables/set-environment-variable.js +0 -14
  197. package/out/installations/graphql-client.d.ts +0 -59
  198. package/out/installations/graphql-client.d.ts.map +0 -1
  199. package/out/installations/graphql-client.js +0 -346
  200. package/out/installations/install-app-site.d.ts +0 -21
  201. package/out/installations/install-app-site.d.ts.map +0 -1
  202. package/out/installations/install-app-site.js +0 -19
  203. package/out/installations/shared.d.ts +0 -5
  204. package/out/installations/shared.d.ts.map +0 -1
  205. package/out/installations/shared.js +0 -19
  206. package/out/installations/uninstall-app.d.ts +0 -25
  207. package/out/installations/uninstall-app.d.ts.map +0 -1
  208. package/out/installations/uninstall-app.js +0 -43
  209. package/out/migration-keys/graphql-client.d.ts +0 -8
  210. package/out/migration-keys/graphql-client.d.ts.map +0 -1
  211. package/out/migration-keys/graphql-client.js +0 -55
  212. package/out/providers/configure-provider.d.ts +0 -19
  213. package/out/providers/configure-provider.d.ts.map +0 -1
  214. package/out/providers/configure-provider.js +0 -14
  215. package/out/providers/graphql-client.d.ts +0 -12
  216. package/out/providers/graphql-client.d.ts.map +0 -1
  217. package/out/providers/graphql-client.js +0 -47
  218. package/out/service/cached-config-service.d.ts +0 -8
  219. package/out/service/cached-config-service.d.ts.map +0 -1
  220. package/out/service/cached-config-service.js +0 -16
  221. package/out/service/command-suggestion-service.d.ts +0 -4
  222. package/out/service/command-suggestion-service.d.ts.map +0 -1
  223. package/out/service/command-suggestion-service.js +0 -17
  224. package/out/service/docker-service.d.ts +0 -24
  225. package/out/service/docker-service.d.ts.map +0 -1
  226. package/out/service/docker-service.js +0 -71
  227. package/out/service/installation-service.d.ts +0 -51
  228. package/out/service/installation-service.d.ts.map +0 -1
  229. package/out/service/installation-service.js +0 -89
  230. package/out/service/lint-service.d.ts +0 -23
  231. package/out/service/lint-service.d.ts.map +0 -1
  232. package/out/service/lint-service.js +0 -39
  233. package/out/service/lite-lint-service.d.ts +0 -10
  234. package/out/service/lite-lint-service.d.ts.map +0 -1
  235. package/out/service/lite-lint-service.js +0 -27
  236. package/out/service/migration-keys-service.d.ts +0 -19
  237. package/out/service/migration-keys-service.d.ts.map +0 -1
  238. package/out/service/migration-keys-service.js +0 -14
  239. package/out/service/port-finding-service.d.ts +0 -12
  240. package/out/service/port-finding-service.d.ts.map +0 -1
  241. package/out/service/port-finding-service.js +0 -34
  242. package/out/service/resource-packaging-service.d.ts +0 -46
  243. package/out/service/resource-packaging-service.d.ts.map +0 -1
  244. package/out/service/resource-packaging-service.js +0 -128
  245. package/out/service/resources-uploader-service.d.ts +0 -16
  246. package/out/service/resources-uploader-service.d.ts.map +0 -1
  247. package/out/service/resources-uploader-service.js +0 -34
  248. package/out/service/tunnel-analytics-service.d.ts +0 -6
  249. package/out/service/tunnel-analytics-service.d.ts.map +0 -1
  250. package/out/service/tunnel-analytics-service.js +0 -13
  251. package/out/service/tunnel-service.d.ts +0 -47
  252. package/out/service/tunnel-service.d.ts.map +0 -1
  253. package/out/service/tunnel-service.js +0 -187
  254. package/out/storage/local-file-storage.d.ts +0 -17
  255. package/out/storage/local-file-storage.d.ts.map +0 -1
  256. package/out/storage/local-file-storage.js +0 -53
  257. package/out/webtrigger/get-webtrigger-url.d.ts +0 -27
  258. package/out/webtrigger/get-webtrigger-url.d.ts.map +0 -1
  259. package/out/webtrigger/get-webtrigger-url.js +0 -23
  260. package/out/webtrigger/graphql-client.d.ts +0 -14
  261. package/out/webtrigger/graphql-client.d.ts.map +0 -1
  262. package/out/webtrigger/graphql-client.js +0 -52
  263. package/out/workers/analytics-message-worker.d.ts +0 -12
  264. package/out/workers/analytics-message-worker.d.ts.map +0 -1
  265. package/out/workers/analytics-message-worker.js +0 -29
  266. package/out/workers/forge-cli-workers.d.ts +0 -2
  267. package/out/workers/forge-cli-workers.d.ts.map +0 -1
  268. package/out/workers/forge-cli-workers.js +0 -21
  269. package/out/workers/tunnel-clean-up-worker.d.ts +0 -8
  270. package/out/workers/tunnel-clean-up-worker.d.ts.map +0 -1
  271. package/out/workers/tunnel-clean-up-worker.js +0 -31
  272. package/out/workers/version-check-worker.d.ts +0 -8
  273. package/out/workers/version-check-worker.d.ts.map +0 -1
  274. package/out/workers/version-check-worker.js +0 -20
  275. package/out/workers/worker-info.d.ts +0 -8
  276. package/out/workers/worker-info.d.ts.map +0 -1
  277. package/out/workers/worker-info.js +0 -14
  278. package/out/workers/worker.d.ts +0 -6
  279. package/out/workers/worker.d.ts.map +0 -1
  280. package/out/workers/worker.js +0 -7
  281. package/out/workers/workers-starter.d.ts +0 -5
  282. package/out/workers/workers-starter.d.ts.map +0 -1
  283. package/out/workers/workers-starter.js +0 -22
@@ -1,348 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Command = exports.WrapperError = void 0;
4
- const tslib_1 = require("tslib");
5
- const commander_1 = tslib_1.__importStar(require("commander"));
6
- const semver_1 = tslib_1.__importDefault(require("semver"));
7
- const cli_shared_1 = require("@forge/cli-shared");
8
- const cli_shared_2 = require("@forge/cli-shared");
9
- const environment_1 = require("./environment");
10
- const cli_shared_3 = require("@forge/cli-shared");
11
- const version_info_1 = require("./version-info");
12
- const errors_1 = require("./errors");
13
- const command_suggestion_service_1 = tslib_1.__importDefault(require("../service/command-suggestion-service"));
14
- class WrapperError extends commander_1.CommanderError {
15
- constructor(error, commandName) {
16
- super(error.exitCode, error.code, error.message);
17
- this.getCommandName = () => this.commandName;
18
- this.commandName = commandName;
19
- }
20
- }
21
- exports.WrapperError = WrapperError;
22
- const isErrorWithAnalytics = (e) => {
23
- return e.getAttributes !== undefined;
24
- };
25
- class Command {
26
- constructor(ui, analyticsClient, preCommandController, cliDetails, cmd, expectsArguments = false, analyticsName) {
27
- this.ui = ui;
28
- this.analyticsClient = analyticsClient;
29
- this.preCommandController = preCommandController;
30
- this.cliDetails = cliDetails;
31
- this.expectsArguments = expectsArguments;
32
- this.analyticsName = analyticsName;
33
- this.requiresAnalyticsConsent = true;
34
- this.requiredOptionFlags = [];
35
- this.preconditionFn = [];
36
- this.options = [];
37
- this.commands = [];
38
- this.exitOverride = (listener) => {
39
- this.cmd.exitOverride((err) => listener(err));
40
- return this;
41
- };
42
- this.actionProcessor = async (cb, ...args) => {
43
- var _a;
44
- if (this.newCommand) {
45
- this.ui.error(new Error(cli_shared_2.Text.deprecate(this.newCommand)));
46
- }
47
- const cmdName = this.cmd.name();
48
- let attributes = {};
49
- try {
50
- if (!this.expectsArguments && args.length > 2) {
51
- throw new cli_shared_2.ValidationError(cli_shared_2.Text.extraArguments(cmdName));
52
- }
53
- const [options] = args;
54
- if (options === null || options === void 0 ? void 0 : options.nonInteractive) {
55
- if (!this.satisfiesNonInteractiveOptions(options)) {
56
- throw new cli_shared_2.ValidationError(cli_shared_2.Text.nonInteractive.error.missingRequiredOption(cmdName, this.requiredOptionFlags));
57
- }
58
- }
59
- if (this.requiresAnalyticsConsent) {
60
- await this.preCommandController.verifyAnalyticsPreferences((_a = options === null || options === void 0 ? void 0 : options.nonInteractive) !== null && _a !== void 0 ? _a : false)();
61
- }
62
- this.checkVersion();
63
- if (this.cliDetails) {
64
- attributes = { version: this.cliDetails.version, latest: this.cliDetails.latest };
65
- }
66
- const preconditionCheckAttributes = await this.checkPreconditions(...args);
67
- attributes = Object.assign(Object.assign({}, attributes), preconditionCheckAttributes);
68
- const result = await cb(...args);
69
- if (result) {
70
- attributes = Object.assign(Object.assign({}, attributes), result.analytics);
71
- }
72
- }
73
- catch (e) {
74
- if (isErrorWithAnalytics(e)) {
75
- attributes = Object.assign(Object.assign({}, e.getAttributes()), attributes);
76
- }
77
- if (e instanceof errors_1.DeferredErrors) {
78
- process.exit(1);
79
- }
80
- else {
81
- cli_shared_3.exitOnError(this.ui)(e);
82
- }
83
- }
84
- };
85
- this.outputRelevantHelp = (argv) => {
86
- this.findLastValidCommand(argv).command.outputHelp();
87
- };
88
- this.cmd = cmd || new commander_1.default.Command();
89
- }
90
- get verbose() {
91
- return this.cmd.opts().verbose;
92
- }
93
- version(str, flags) {
94
- this.cmd.version(str, flags);
95
- flags = flags || '-V, --version';
96
- const versionOption = new commander_1.Option(flags, 'output the version number');
97
- this.options.push(versionOption);
98
- return this;
99
- }
100
- command(name, opts) {
101
- const cmd = this.cmd
102
- .command(name, opts)
103
- .allowUnknownOption(false)
104
- .allowExcessArguments(false);
105
- const trimmedName = name.trim();
106
- const expectsArguments = trimmedName.endsWith(']') || trimmedName.endsWith('>');
107
- const subCommand = new Command(this.ui, this.analyticsClient, this.preCommandController, this.cliDetails, cmd, expectsArguments, Command.concatenateNames(this.analyticsName, cmd.name()));
108
- subCommand.option('--verbose', cli_shared_2.Text.optionVerbose);
109
- subCommand.exitOverride((err) => {
110
- throw new WrapperError(err, subCommand.cmd.name());
111
- });
112
- this.commands.push(subCommand);
113
- return subCommand;
114
- }
115
- deprecatedCommand(oldName, newName, stubController) {
116
- this.command(oldName, { hidden: true })
117
- .requireNoAuthentication()
118
- .requireNoAnalyticsConsent()
119
- .action(() => stubController.run({ oldName, newName }));
120
- }
121
- getAnalyticsName() {
122
- return this.analyticsName;
123
- }
124
- deprecate(newCommand) {
125
- this.newCommand = newCommand;
126
- return this;
127
- }
128
- description(desc) {
129
- this.cmd.description(desc);
130
- return this;
131
- }
132
- option(flags, description, fn, defaultValue) {
133
- this.cmd.option(flags, description, fn, defaultValue);
134
- const option = new commander_1.Option(flags, description);
135
- if (typeof fn === 'function') {
136
- option.default(defaultValue).argParser(fn);
137
- }
138
- else {
139
- option.default(fn);
140
- }
141
- this.options.push(option);
142
- return this;
143
- }
144
- precondition(fn) {
145
- this.preconditionFn.push(fn);
146
- return this;
147
- }
148
- requireManifestFile() {
149
- this.precondition(this.preCommandController.verifyManifestExists());
150
- return this;
151
- }
152
- requireAppId() {
153
- this.precondition(this.preCommandController.verifyManifestExistsWithAppConfig());
154
- return this;
155
- }
156
- nonInteractiveOption(...args) {
157
- this.requiredOptionFlags = args;
158
- this.cmd.option('--non-interactive', cli_shared_2.Text.nonInteractive.description);
159
- return this;
160
- }
161
- action(fn) {
162
- this.cmd.action((...args) => this.actionProcessor(fn, ...args));
163
- return this;
164
- }
165
- async parse(argv) {
166
- try {
167
- this.assertValidArgs(argv);
168
- this.cmd.parse(argv);
169
- }
170
- catch (err) {
171
- if (Command.isHelpTriggered(err)) {
172
- if (Command.isError(err)) {
173
- this.outputRelevantHelp(argv);
174
- }
175
- return Command.reportHelp(this, err);
176
- }
177
- if (Command.isVersionTriggered(err)) {
178
- return;
179
- }
180
- if (Command.isUnknownCommand(err) || Command.isExcessCommands(err)) {
181
- this.unknownCommand(argv);
182
- return;
183
- }
184
- return cli_shared_3.exitOnError(this.ui)(err);
185
- }
186
- }
187
- getDefinedCommands() {
188
- return this.cmd.commands;
189
- }
190
- getDefinedOptions() {
191
- return this.options;
192
- }
193
- getCmdName() {
194
- return this.cmd.name();
195
- }
196
- getCommands() {
197
- return this.commands;
198
- }
199
- environmentOption() {
200
- this.option('-e, --environment [environment]', cli_shared_2.Text.env.option(cli_shared_1.DEFAULT_ENVIRONMENT_OPTION, cli_shared_1.VALID_ENVIRONMENT_OPTIONS));
201
- this.precondition(() => {
202
- this.cmd.opts().environment = environment_1.checkEnvironmentOption(this.cmd.opts().environment || cli_shared_1.DEFAULT_ENVIRONMENT_OPTION);
203
- return { appEnv: this.cmd.opts().environment };
204
- });
205
- return this;
206
- }
207
- siteAndProductOption() {
208
- this.option('-s, --site [site]', cli_shared_2.Text.optionSite);
209
- this.option('-p, --product [product]', cli_shared_2.Text.optionProduct(cli_shared_1.SUPPORTED_PRODUCTS));
210
- this.precondition(() => {
211
- return this.validateContext();
212
- });
213
- return this;
214
- }
215
- requireNoAuthentication() {
216
- return this;
217
- }
218
- requireNoAnalyticsConsent() {
219
- this.requiresAnalyticsConsent = false;
220
- return this;
221
- }
222
- satisfiesNonInteractiveOptions(options) {
223
- const optionKeys = Object.keys(options);
224
- const requiredOptionKeys = [...this.requiredOptionFlags.map((arg) => new commander_1.Option(arg).attributeName())];
225
- return requiredOptionKeys.every((requiredOption) => optionKeys.includes(requiredOption));
226
- }
227
- configureOutput(obj) {
228
- this.cmd.configureOutput(obj);
229
- return this;
230
- }
231
- async checkPreconditions(...args) {
232
- let attributes = {};
233
- for (const precondition of this.preconditionFn) {
234
- const extra = await precondition(...args);
235
- attributes = Object.assign(Object.assign({}, attributes), extra);
236
- }
237
- return attributes;
238
- }
239
- checkVersion() {
240
- if (!this.cliDetails ||
241
- !this.cliDetails.latest ||
242
- !semver_1.default.valid(this.cliDetails.version) ||
243
- !semver_1.default.valid(this.cliDetails.latest)) {
244
- return;
245
- }
246
- if (semver_1.default.gt(this.cliDetails.latest, this.cliDetails.version)) {
247
- this.ui.warn(cli_shared_2.Text.error.outdatedCLIVersion(this.cliDetails.version, this.cliDetails.latest));
248
- }
249
- else if (semver_1.default.gt(this.cliDetails.version, this.cliDetails.latest)) {
250
- version_info_1.clearVersionCache(this.cliDetails.name);
251
- }
252
- }
253
- async validateContext() {
254
- if (this.cmd.opts().product) {
255
- const capitalizedProduct = cli_shared_1.capitalizeProduct(this.cmd.opts().product);
256
- if (!cli_shared_1.isSuppportedProduct(capitalizedProduct)) {
257
- throw new cli_shared_2.ValidationError(cli_shared_2.Text.error.invalidProduct);
258
- }
259
- this.cmd.opts().product = capitalizedProduct;
260
- }
261
- let trySite;
262
- if (this.cmd.opts().site) {
263
- trySite = this.cmd.opts().site;
264
- }
265
- this.cmd.opts().site = trySite ? cli_shared_1.validateSite(trySite) : undefined;
266
- return { product: this.cmd.opts().product };
267
- }
268
- findLastValidCommand(argv) {
269
- let command = this.cmd;
270
- for (const [index, arg] of argv.slice(2).entries()) {
271
- const commandMatch = command.commands.find((cmd) => cmd.name() === arg);
272
- if (!commandMatch) {
273
- return {
274
- command,
275
- index: index + 1
276
- };
277
- }
278
- command = commandMatch;
279
- }
280
- return {
281
- command,
282
- index: 1
283
- };
284
- }
285
- unknownCommand(argv) {
286
- const errorMessage = [];
287
- const { command: lastCommand, index: lastCommandIndex } = this.findLastValidCommand(argv);
288
- const badLastArg = argv[lastCommandIndex + 1];
289
- const suggestionService = new command_suggestion_service_1.default();
290
- const suggestions = suggestionService.getSuggestions(badLastArg, lastCommand.commands
291
- .filter((cmd) => {
292
- return cmd._hidden !== true;
293
- })
294
- .map((cmd) => cmd.name()));
295
- errorMessage.push(cli_shared_2.Text.invalidCmd(argv.slice(2, lastCommandIndex + 2).join(' ')));
296
- if (suggestions.length) {
297
- errorMessage.push(`Did you mean:`);
298
- const suggestionsPrefixed = suggestions.map((suggestion) => [...argv.slice(2, lastCommandIndex + 1), suggestion].join(' '));
299
- errorMessage.push(suggestionsPrefixed.join('\n'));
300
- errorMessage.push(cli_shared_2.Text.invalidCmdHelp);
301
- this.ui.info(errorMessage.join('\n\n'));
302
- }
303
- else {
304
- errorMessage.push(cli_shared_2.Text.invalidCmdHelp);
305
- this.ui.error(new Error(errorMessage.join(' ')));
306
- }
307
- }
308
- assertValidArgs(argv) {
309
- const args = argv.slice(2);
310
- let commands = this.cmd.commands;
311
- while (args[0] && !args[0].startsWith('-')) {
312
- if (args[0] === 'help') {
313
- return;
314
- }
315
- const commandMatch = commands.find((cmd) => cmd.name() === args[0]);
316
- if (!commandMatch) {
317
- throw new commander_1.default.CommanderError(1, 'commander.unknownCommand', `error: unknown command '${args[0]}'.`);
318
- }
319
- commands = commandMatch.commands;
320
- args.shift();
321
- if (commands.length === 0) {
322
- break;
323
- }
324
- }
325
- }
326
- }
327
- exports.Command = Command;
328
- Command.reportHelp = async (cmd, cmdError) => {
329
- return;
330
- };
331
- Command.isError = (cmdError) => {
332
- return cmdError.exitCode === 1;
333
- };
334
- Command.isHelpTriggered = (cmdError) => {
335
- return ['commander.helpDisplayed', 'commander.help'].includes(cmdError.code);
336
- };
337
- Command.isVersionTriggered = (cmdError) => {
338
- return 'commander.version' === cmdError.code;
339
- };
340
- Command.isUnknownCommand = (cmdError) => {
341
- return cmdError.code === 'commander.unknownCommand';
342
- };
343
- Command.isExcessCommands = (cmdError) => {
344
- return cmdError.code === 'commander.excessArguments';
345
- };
346
- Command.concatenateNames = (parent, subcommand) => {
347
- return parent ? `${parent}:${subcommand}` : subcommand;
348
- };
@@ -1,2 +0,0 @@
1
- export declare function assertUnreachable(x: never): never;
2
- //# sourceMappingURL=assertUnreachable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertUnreachable.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/assertUnreachable.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAEjD"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertUnreachable = void 0;
4
- function assertUnreachable(x) {
5
- throw new Error("Didn't expect to get here");
6
- }
7
- exports.assertUnreachable = assertUnreachable;
@@ -1,12 +0,0 @@
1
- import { UI } from '@forge/cli-shared';
2
- export declare enum Argument {
3
- install = "install",
4
- uninstall = "uninstall"
5
- }
6
- export declare function assertNodeVersionSupported(version?: string): void;
7
- export declare class AutocompleteController {
8
- private readonly ui;
9
- constructor(ui: UI);
10
- run(arg: string): Promise<void>;
11
- }
12
- //# sourceMappingURL=autocomplete-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/autocomplete-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,EAAE,EAAmB,MAAM,mBAAmB,CAAC;AAK9D,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAQD,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,MAAyB,GAAG,IAAI,CAInF;AAED,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEtB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAwB7C"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AutocompleteController = exports.assertNodeVersionSupported = exports.Argument = void 0;
4
- const tslib_1 = require("tslib");
5
- const semver_1 = tslib_1.__importDefault(require("semver"));
6
- const cli_shared_1 = require("@forge/cli-shared");
7
- const autocomplete_1 = require("../../autocomplete");
8
- const assertUnreachable_1 = require("./assertUnreachable");
9
- const getNodeVersion_1 = require("./getNodeVersion");
10
- var Argument;
11
- (function (Argument) {
12
- Argument["install"] = "install";
13
- Argument["uninstall"] = "uninstall";
14
- })(Argument = exports.Argument || (exports.Argument = {}));
15
- function assertIsValidArgument(arg) {
16
- if (!(arg in Argument)) {
17
- throw new cli_shared_1.ValidationError(cli_shared_1.Text.autocomplete.error.badArg(arg));
18
- }
19
- }
20
- function assertNodeVersionSupported(version = getNodeVersion_1.getNodeVersion()) {
21
- if (semver_1.default.eq(version, '12.5.0') || semver_1.default.eq(version, '12.6.0')) {
22
- throw new Error(cli_shared_1.Text.autocomplete.error.unsupportedNodeVersion);
23
- }
24
- }
25
- exports.assertNodeVersionSupported = assertNodeVersionSupported;
26
- class AutocompleteController {
27
- constructor(ui) {
28
- this.ui = ui;
29
- }
30
- async run(arg) {
31
- assertIsValidArgument(arg);
32
- if (arg === Argument.install) {
33
- assertNodeVersionSupported();
34
- if (!(await this.ui.confirm(cli_shared_1.Text.autocomplete.confirmInstalling))) {
35
- return;
36
- }
37
- this.ui.info(cli_shared_1.Text.autocomplete.installing);
38
- try {
39
- autocomplete_1.autocomplete.setupShellInitFile();
40
- }
41
- catch (e) {
42
- throw new Error(cli_shared_1.Text.autocomplete.error.unsupportedShell);
43
- }
44
- }
45
- else if (arg === Argument.uninstall) {
46
- this.ui.info(cli_shared_1.Text.autocomplete.uninstalling);
47
- autocomplete_1.autocomplete.cleanupShellInitFile();
48
- }
49
- else {
50
- assertUnreachable_1.assertUnreachable(arg);
51
- }
52
- }
53
- }
54
- exports.AutocompleteController = AutocompleteController;
@@ -1,43 +0,0 @@
1
- import { AppConfigProvider, ConfigFile, HiddenError } from '@forge/cli-shared';
2
- import { LintService } from '../../service/lint-service';
3
- import { DeployView } from '../view/deploy-view';
4
- import { InstallationService } from '../../service/installation-service';
5
- import { MigrationKeysService } from '../../service/migration-keys-service';
6
- import { ResourcePackagingService } from '../../service/resource-packaging-service';
7
- import { ErrorWithAnalytics } from '../command';
8
- import { PackageUploadDeployCommand } from '../../deploy';
9
- import { DeploymentResult } from '../register-deployment-commands';
10
- interface DeployOptions {
11
- environment: string;
12
- verify: boolean;
13
- }
14
- export declare class DeployLintFailureError extends HiddenError implements ErrorWithAnalytics {
15
- private readonly scopes;
16
- constructor(scopes: string[]);
17
- getAttributes(): Record<string, string[]>;
18
- }
19
- export declare class InvalidConnectKeyError extends HiddenError implements ErrorWithAnalytics {
20
- private readonly reason;
21
- constructor(reason: string);
22
- getAttributes(): Record<string, string>;
23
- }
24
- export declare class DeployController {
25
- private readonly appConfigProvider;
26
- private readonly configFile;
27
- private readonly lintService;
28
- private readonly installationsService;
29
- private readonly migrationKeysService;
30
- private readonly deployView;
31
- private readonly packageUploadDeployCommand;
32
- private readonly resourcePackagingService;
33
- constructor(appConfigProvider: AppConfigProvider, configFile: ConfigFile, lintService: LintService, installationsService: InstallationService, migrationKeysService: MigrationKeysService, deployView: DeployView, packageUploadDeployCommand: PackageUploadDeployCommand, resourcePackagingService: ResourcePackagingService);
34
- private isMpacProductionApp;
35
- private connectKeyDeleted;
36
- private connectKeyChanged;
37
- private validateConnectKeyChange;
38
- private verifyPreDeployment;
39
- private verifyPostDeployment;
40
- run({ environment, verify }: DeployOptions): Promise<DeploymentResult | void>;
41
- }
42
- export {};
43
- //# sourceMappingURL=deploy-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deploy-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/deploy-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAQ,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAA+B,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACzG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,UAAU,aAAa;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,sBAAuB,SAAQ,WAAY,YAAW,kBAAkB;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM,EAAE;IAItC,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;CAKjD;AAED,qBAAa,sBAAuB,SAAQ,WAAY,YAAW,kBAAkB;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAGpC,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAK/C;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAPxB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,mBAAmB,EACzC,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,EACtB,0BAA0B,EAAE,0BAA0B,EACtD,wBAAwB,EAAE,wBAAwB;IAGrE,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;YAGX,wBAAwB;YAwBxB,mBAAmB;YAiBnB,oBAAoB;IAOrB,GAAG,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAsD3F"}
@@ -1,139 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeployController = exports.InvalidConnectKeyError = exports.DeployLintFailureError = void 0;
4
- const cli_shared_1 = require("@forge/cli-shared");
5
- class DeployLintFailureError extends cli_shared_1.HiddenError {
6
- constructor(scopes) {
7
- super();
8
- this.scopes = scopes;
9
- }
10
- getAttributes() {
11
- return {
12
- scopes: this.scopes
13
- };
14
- }
15
- }
16
- exports.DeployLintFailureError = DeployLintFailureError;
17
- class InvalidConnectKeyError extends cli_shared_1.HiddenError {
18
- constructor(reason) {
19
- super();
20
- this.reason = reason;
21
- }
22
- getAttributes() {
23
- return {
24
- reason: this.reason
25
- };
26
- }
27
- }
28
- exports.InvalidConnectKeyError = InvalidConnectKeyError;
29
- class DeployController {
30
- constructor(appConfigProvider, configFile, lintService, installationsService, migrationKeysService, deployView, packageUploadDeployCommand, resourcePackagingService) {
31
- this.appConfigProvider = appConfigProvider;
32
- this.configFile = configFile;
33
- this.lintService = lintService;
34
- this.installationsService = installationsService;
35
- this.migrationKeysService = migrationKeysService;
36
- this.deployView = deployView;
37
- this.packageUploadDeployCommand = packageUploadDeployCommand;
38
- this.resourcePackagingService = resourcePackagingService;
39
- }
40
- isMpacProductionApp(mpacAppKey, environment) {
41
- return !!(mpacAppKey && environment === 'production');
42
- }
43
- connectKeyDeleted(connectKey, comparisonKey) {
44
- return !!(!connectKey && comparisonKey);
45
- }
46
- connectKeyChanged(connectKey, comparisonKey) {
47
- return !!(comparisonKey && connectKey && connectKey !== comparisonKey);
48
- }
49
- async validateConnectKeyChange(environment, keys) {
50
- const { migrationKeys, mpacAppKey } = keys;
51
- const connectKey = await this.configFile.getConnectKey();
52
- const migrationKey = (migrationKeys === null || migrationKeys === void 0 ? void 0 : migrationKeys.confluence) || (migrationKeys === null || migrationKeys === void 0 ? void 0 : migrationKeys.jira);
53
- const isMpacApp = this.isMpacProductionApp(mpacAppKey, environment);
54
- if (this.connectKeyDeleted(connectKey, migrationKey)) {
55
- this.deployView.displayConnectKeyDeleteWarning(environment);
56
- const proceed = await this.deployView.promptToContinueDeletingConnectKey();
57
- return { proceed, connectKeyDeleted: proceed, connectKeyChanged: false };
58
- }
59
- else if (isMpacApp && this.connectKeyChanged(connectKey, mpacAppKey)) {
60
- this.deployView.displayMPACAppConnectKeyChangeError(mpacAppKey, connectKey);
61
- throw new InvalidConnectKeyError(cli_shared_1.Text.deploy.connectKeyChange.mpacAppConnectKeyChangeAnalyticsError);
62
- }
63
- else if (!isMpacApp && this.connectKeyChanged(connectKey, migrationKey)) {
64
- this.deployView.displayConnectKeyChangeWarning(environment, migrationKey, connectKey);
65
- const proceed = await this.deployView.promptToContinueChangingConnectKey();
66
- return { proceed, connectKeyChanged: proceed, connectKeyDeleted: false };
67
- }
68
- return { proceed: true, connectKeyChanged: false, connectKeyDeleted: false };
69
- }
70
- async verifyPreDeployment(environment) {
71
- this.deployView.displayLintRunning();
72
- const { lintResults } = await this.lintService.run(environment, { fix: false }, this.deployView.getLogger());
73
- const problemCount = this.lintService.problemCount(lintResults);
74
- if (problemCount.errors) {
75
- this.deployView.displayLintErrors(lintResults);
76
- const failures = this.lintService.failedScopes(lintResults);
77
- throw new DeployLintFailureError(failures);
78
- }
79
- else if (problemCount.warnings) {
80
- this.deployView.displayLintWarnings(problemCount.warnings);
81
- }
82
- else {
83
- this.deployView.displayNoLintProblems();
84
- }
85
- }
86
- async verifyPostDeployment(environment) {
87
- const needsVersionUpdate = await this.installationsService.hasOutdatedProductInstallation(environment);
88
- if (needsVersionUpdate) {
89
- this.deployView.displayOutdatedInstallationsMessage();
90
- }
91
- }
92
- async run({ environment, verify }) {
93
- this.deployView.displayStart(environment);
94
- let hasConnectKeyChanged = false;
95
- let hasConnectKeyDeleted = false;
96
- if (verify) {
97
- await this.verifyPreDeployment(environment);
98
- const keys = await this.migrationKeysService.getMigrationKeysForAppEnvironment(environment);
99
- const { proceed, connectKeyChanged, connectKeyDeleted } = await this.validateConnectKeyChange(environment, keys);
100
- if (!proceed) {
101
- return;
102
- }
103
- hasConnectKeyChanged = connectKeyChanged;
104
- hasConnectKeyDeleted = connectKeyDeleted;
105
- }
106
- const { id } = await this.appConfigProvider();
107
- const handlers = await this.configFile.getAppHandlers();
108
- const resources = await this.configFile.getResources();
109
- const archives = await this.resourcePackagingService.zipResources(resources);
110
- let hasProdInstallations = false;
111
- try {
112
- const prodInstallations = await this.installationsService.listAppInstallations({
113
- environment: 'production'
114
- });
115
- hasProdInstallations = !prodInstallations.installations.length;
116
- }
117
- catch (err) {
118
- if (verify) {
119
- throw err;
120
- }
121
- }
122
- const analytics = await this.deployView.reportDeploymentProgress(id, environment, hasProdInstallations, () => this.packageUploadDeployCommand.execute({ handlers, environmentKey: environment, archives }));
123
- if (verify) {
124
- await this.verifyPostDeployment(environment);
125
- }
126
- try {
127
- analytics.analytics.egressPermissionList = await this.configFile.getEgressPermissions();
128
- analytics.analytics.connectKey = hasConnectKeyChanged
129
- ? { action: 'changed', value: await this.configFile.getConnectKey() }
130
- : hasConnectKeyDeleted
131
- ? { action: 'deleted' }
132
- : {};
133
- }
134
- catch (e) {
135
- }
136
- return analytics;
137
- }
138
- }
139
- exports.DeployController = DeployController;
@@ -1,9 +0,0 @@
1
- import { UI, FeedbackPostClient } from '@forge/cli-shared';
2
- import { Response } from 'node-fetch';
3
- export declare class FeedbackController {
4
- private readonly ui;
5
- private readonly feedbackPostClient;
6
- constructor(ui: UI, feedbackPostClient: FeedbackPostClient);
7
- sendFeedback(feedback: string): Promise<Response>;
8
- }
9
- //# sourceMappingURL=feedback-controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feedback-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/feedback-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAA+B,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAA3C,EAAE,EAAE,EAAE,EAAmB,kBAAkB,EAAE,kBAAkB;IAE/E,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;CAQ/D"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeedbackController = void 0;
4
- const cli_shared_1 = require("@forge/cli-shared");
5
- class FeedbackController {
6
- constructor(ui, feedbackPostClient) {
7
- this.ui = ui;
8
- this.feedbackPostClient = feedbackPostClient;
9
- }
10
- async sendFeedback(feedback) {
11
- const credentials = await cli_shared_1.getCredentialsStoreProvider(this.ui).getCredentials();
12
- return this.feedbackPostClient.sendFeedback({
13
- summary: feedback.length <= 50 ? feedback : feedback.slice(0, 50) + '...',
14
- description: feedback,
15
- email: credentials.email
16
- });
17
- }
18
- }
19
- exports.FeedbackController = FeedbackController;
@@ -1,2 +0,0 @@
1
- export declare function getNodeVersion(): string;
2
- //# sourceMappingURL=getNodeVersion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getNodeVersion.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/getNodeVersion.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNodeVersion = void 0;
4
- function getNodeVersion() {
5
- return process.version;
6
- }
7
- exports.getNodeVersion = getNodeVersion;