@forge/cli 0.0.0-experimental-3b4aabe → 0.0.0-experimental-2b3dfe1

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 (267) hide show
  1. package/CHANGELOG.md +11 -7
  2. package/npm-shrinkwrap.json +196 -4237
  3. package/out/analytics-client/analytics-client.d.ts +0 -24
  4. package/out/analytics-client/analytics-client.d.ts.map +1 -1
  5. package/out/analytics-client/analytics-client.js +0 -115
  6. package/out/analytics-client/analytics-message-handler.d.ts +1 -5
  7. package/out/analytics-client/analytics-message-handler.d.ts.map +1 -1
  8. package/out/analytics-client/analytics-message-handler.js +2 -30
  9. package/out/autocomplete/autocomplete-config.json +2 -242
  10. package/out/bin/cli.d.ts +0 -1
  11. package/out/bin/cli.d.ts.map +1 -1
  12. package/out/bin/cli.js +1 -4
  13. package/out/bin/postinstall.d.ts +0 -1
  14. package/out/bin/postinstall.js +1 -22
  15. package/package.json +2 -7
  16. package/out/command-line/anon-user-id.d.ts +0 -3
  17. package/out/command-line/anon-user-id.d.ts.map +0 -1
  18. package/out/command-line/anon-user-id.js +0 -17
  19. package/out/command-line/command.d.ts +0 -81
  20. package/out/command-line/command.d.ts.map +0 -1
  21. package/out/command-line/command.js +0 -382
  22. package/out/command-line/controller/assertUnreachable.d.ts +0 -2
  23. package/out/command-line/controller/assertUnreachable.d.ts.map +0 -1
  24. package/out/command-line/controller/assertUnreachable.js +0 -7
  25. package/out/command-line/controller/autocomplete-controller.d.ts +0 -12
  26. package/out/command-line/controller/autocomplete-controller.d.ts.map +0 -1
  27. package/out/command-line/controller/autocomplete-controller.js +0 -54
  28. package/out/command-line/controller/deploy-controller.d.ts +0 -43
  29. package/out/command-line/controller/deploy-controller.d.ts.map +0 -1
  30. package/out/command-line/controller/deploy-controller.js +0 -139
  31. package/out/command-line/controller/feedback-controller.d.ts +0 -9
  32. package/out/command-line/controller/feedback-controller.d.ts.map +0 -1
  33. package/out/command-line/controller/feedback-controller.js +0 -19
  34. package/out/command-line/controller/getNodeVersion.d.ts +0 -2
  35. package/out/command-line/controller/getNodeVersion.d.ts.map +0 -1
  36. package/out/command-line/controller/getNodeVersion.js +0 -7
  37. package/out/command-line/controller/install-controller.d.ts +0 -35
  38. package/out/command-line/controller/install-controller.d.ts.map +0 -1
  39. package/out/command-line/controller/install-controller.js +0 -154
  40. package/out/command-line/controller/lint-controller.d.ts +0 -9
  41. package/out/command-line/controller/lint-controller.d.ts.map +0 -1
  42. package/out/command-line/controller/lint-controller.js +0 -20
  43. package/out/command-line/controller/pre-command-controller.d.ts +0 -25
  44. package/out/command-line/controller/pre-command-controller.d.ts.map +0 -1
  45. package/out/command-line/controller/pre-command-controller.js +0 -57
  46. package/out/command-line/controller/prerequisites-controller.d.ts +0 -11
  47. package/out/command-line/controller/prerequisites-controller.d.ts.map +0 -1
  48. package/out/command-line/controller/prerequisites-controller.js +0 -34
  49. package/out/command-line/controller/settings-controller.d.ts +0 -19
  50. package/out/command-line/controller/settings-controller.d.ts.map +0 -1
  51. package/out/command-line/controller/settings-controller.js +0 -48
  52. package/out/command-line/controller/stubController.d.ts +0 -9
  53. package/out/command-line/controller/stubController.d.ts.map +0 -1
  54. package/out/command-line/controller/stubController.js +0 -15
  55. package/out/command-line/controller/tunnel-controller.d.ts +0 -14
  56. package/out/command-line/controller/tunnel-controller.d.ts.map +0 -1
  57. package/out/command-line/controller/tunnel-controller.js +0 -43
  58. package/out/command-line/dependency-injection.d.ts +0 -69
  59. package/out/command-line/dependency-injection.d.ts.map +0 -1
  60. package/out/command-line/dependency-injection.js +0 -188
  61. package/out/command-line/environment.d.ts +0 -2
  62. package/out/command-line/environment.d.ts.map +0 -1
  63. package/out/command-line/environment.js +0 -15
  64. package/out/command-line/errors.d.ts +0 -6
  65. package/out/command-line/errors.d.ts.map +0 -1
  66. package/out/command-line/errors.js +0 -12
  67. package/out/command-line/index.d.ts +0 -5
  68. package/out/command-line/index.d.ts.map +0 -1
  69. package/out/command-line/index.js +0 -66
  70. package/out/command-line/register-app-commands.d.ts +0 -10
  71. package/out/command-line/register-app-commands.d.ts.map +0 -1
  72. package/out/command-line/register-app-commands.js +0 -128
  73. package/out/command-line/register-authentication-command.d.ts +0 -16
  74. package/out/command-line/register-authentication-command.d.ts.map +0 -1
  75. package/out/command-line/register-authentication-command.js +0 -92
  76. package/out/command-line/register-autocomplete-commands.d.ts +0 -3
  77. package/out/command-line/register-autocomplete-commands.d.ts.map +0 -1
  78. package/out/command-line/register-autocomplete-commands.js +0 -13
  79. package/out/command-line/register-deployment-commands.d.ts +0 -22
  80. package/out/command-line/register-deployment-commands.d.ts.map +0 -1
  81. package/out/command-line/register-deployment-commands.js +0 -15
  82. package/out/command-line/register-environment-variables-commands.d.ts +0 -3
  83. package/out/command-line/register-environment-variables-commands.d.ts.map +0 -1
  84. package/out/command-line/register-environment-variables-commands.js +0 -99
  85. package/out/command-line/register-feedback-commands.d.ts +0 -3
  86. package/out/command-line/register-feedback-commands.d.ts.map +0 -1
  87. package/out/command-line/register-feedback-commands.js +0 -31
  88. package/out/command-line/register-installation-commands.d.ts +0 -6
  89. package/out/command-line/register-installation-commands.d.ts.map +0 -1
  90. package/out/command-line/register-installation-commands.js +0 -140
  91. package/out/command-line/register-lint-command.d.ts +0 -8
  92. package/out/command-line/register-lint-command.d.ts.map +0 -1
  93. package/out/command-line/register-lint-command.js +0 -15
  94. package/out/command-line/register-log-commands.d.ts +0 -4
  95. package/out/command-line/register-log-commands.d.ts.map +0 -1
  96. package/out/command-line/register-log-commands.js +0 -138
  97. package/out/command-line/register-providers-commands.d.ts +0 -3
  98. package/out/command-line/register-providers-commands.d.ts.map +0 -1
  99. package/out/command-line/register-providers-commands.js +0 -43
  100. package/out/command-line/register-settings-commands.d.ts +0 -3
  101. package/out/command-line/register-settings-commands.d.ts.map +0 -1
  102. package/out/command-line/register-settings-commands.js +0 -37
  103. package/out/command-line/register-tunnel-commands.d.ts +0 -3
  104. package/out/command-line/register-tunnel-commands.d.ts.map +0 -1
  105. package/out/command-line/register-tunnel-commands.js +0 -14
  106. package/out/command-line/register-webtrigger-commands.d.ts +0 -3
  107. package/out/command-line/register-webtrigger-commands.d.ts.map +0 -1
  108. package/out/command-line/register-webtrigger-commands.js +0 -55
  109. package/out/command-line/unique-machine-id.d.ts +0 -3
  110. package/out/command-line/unique-machine-id.d.ts.map +0 -1
  111. package/out/command-line/unique-machine-id.js +0 -18
  112. package/out/command-line/version-info.d.ts +0 -8
  113. package/out/command-line/version-info.d.ts.map +0 -1
  114. package/out/command-line/version-info.js +0 -34
  115. package/out/command-line/view/analytics-settings-view.d.ts +0 -7
  116. package/out/command-line/view/analytics-settings-view.d.ts.map +0 -1
  117. package/out/command-line/view/analytics-settings-view.js +0 -18
  118. package/out/command-line/view/deploy-view.d.ts +0 -21
  119. package/out/command-line/view/deploy-view.d.ts.map +0 -1
  120. package/out/command-line/view/deploy-view.js +0 -58
  121. package/out/command-line/view/install-view.d.ts +0 -18
  122. package/out/command-line/view/install-view.d.ts.map +0 -1
  123. package/out/command-line/view/install-view.js +0 -55
  124. package/out/command-line/view/lint-view.d.ts +0 -12
  125. package/out/command-line/view/lint-view.d.ts.map +0 -1
  126. package/out/command-line/view/lint-view.js +0 -31
  127. package/out/command-line/view/lite-lint-view.d.ts +0 -10
  128. package/out/command-line/view/lite-lint-view.d.ts.map +0 -1
  129. package/out/command-line/view/lite-lint-view.js +0 -18
  130. package/out/command-line/view/settings-view.d.ts +0 -8
  131. package/out/command-line/view/settings-view.d.ts.map +0 -1
  132. package/out/command-line/view/settings-view.js +0 -21
  133. package/out/command-line/view/tunnel-view.d.ts +0 -18
  134. package/out/command-line/view/tunnel-view.d.ts.map +0 -1
  135. package/out/command-line/view/tunnel-view.js +0 -89
  136. package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts +0 -24
  137. package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts.map +0 -1
  138. package/out/deploy/deployer/deploy-monitor-graphql-client.js +0 -57
  139. package/out/deploy/deployer/deployer.d.ts +0 -31
  140. package/out/deploy/deployer/deployer.d.ts.map +0 -1
  141. package/out/deploy/deployer/deployer.js +0 -154
  142. package/out/deploy/deployer/index.d.ts +0 -4
  143. package/out/deploy/deployer/index.d.ts.map +0 -1
  144. package/out/deploy/deployer/index.js +0 -6
  145. package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts +0 -19
  146. package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts.map +0 -1
  147. package/out/deploy/deployer/trigger-deploy-graphql-client.js +0 -45
  148. package/out/deploy/index.d.ts +0 -5
  149. package/out/deploy/index.d.ts.map +0 -1
  150. package/out/deploy/index.js +0 -7
  151. package/out/deploy/package-upload-deploy.d.ts +0 -18
  152. package/out/deploy/package-upload-deploy.d.ts.map +0 -1
  153. package/out/deploy/package-upload-deploy.js +0 -28
  154. package/out/deploy/packager/archiver.d.ts +0 -24
  155. package/out/deploy/packager/archiver.d.ts.map +0 -1
  156. package/out/deploy/packager/archiver.js +0 -62
  157. package/out/deploy/packager/index.d.ts +0 -3
  158. package/out/deploy/packager/index.d.ts.map +0 -1
  159. package/out/deploy/packager/index.js +0 -5
  160. package/out/deploy/packager/packager.d.ts +0 -35
  161. package/out/deploy/packager/packager.d.ts.map +0 -1
  162. package/out/deploy/packager/packager.js +0 -61
  163. package/out/deploy/uploader/artifact-graphql-client.d.ts +0 -26
  164. package/out/deploy/uploader/artifact-graphql-client.d.ts.map +0 -1
  165. package/out/deploy/uploader/artifact-graphql-client.js +0 -92
  166. package/out/deploy/uploader/index.d.ts +0 -3
  167. package/out/deploy/uploader/index.d.ts.map +0 -1
  168. package/out/deploy/uploader/index.js +0 -5
  169. package/out/deploy/uploader/uploader.d.ts +0 -19
  170. package/out/deploy/uploader/uploader.d.ts.map +0 -1
  171. package/out/deploy/uploader/uploader.js +0 -43
  172. package/out/environment-variables/delete-environment-variable.d.ts +0 -18
  173. package/out/environment-variables/delete-environment-variable.d.ts.map +0 -1
  174. package/out/environment-variables/delete-environment-variable.js +0 -14
  175. package/out/environment-variables/graphql-client.d.ts +0 -16
  176. package/out/environment-variables/graphql-client.d.ts.map +0 -1
  177. package/out/environment-variables/graphql-client.js +0 -105
  178. package/out/environment-variables/list-environment-variables.d.ts +0 -22
  179. package/out/environment-variables/list-environment-variables.d.ts.map +0 -1
  180. package/out/environment-variables/list-environment-variables.js +0 -14
  181. package/out/environment-variables/set-environment-variable.d.ts +0 -20
  182. package/out/environment-variables/set-environment-variable.d.ts.map +0 -1
  183. package/out/environment-variables/set-environment-variable.js +0 -14
  184. package/out/installations/graphql-client.d.ts +0 -60
  185. package/out/installations/graphql-client.d.ts.map +0 -1
  186. package/out/installations/graphql-client.js +0 -408
  187. package/out/installations/install-app-site.d.ts +0 -21
  188. package/out/installations/install-app-site.d.ts.map +0 -1
  189. package/out/installations/install-app-site.js +0 -19
  190. package/out/installations/shared.d.ts +0 -5
  191. package/out/installations/shared.d.ts.map +0 -1
  192. package/out/installations/shared.js +0 -19
  193. package/out/installations/uninstall-app.d.ts +0 -25
  194. package/out/installations/uninstall-app.d.ts.map +0 -1
  195. package/out/installations/uninstall-app.js +0 -43
  196. package/out/migration-keys/graphql-client.d.ts +0 -8
  197. package/out/migration-keys/graphql-client.d.ts.map +0 -1
  198. package/out/migration-keys/graphql-client.js +0 -55
  199. package/out/providers/configure-provider.d.ts +0 -19
  200. package/out/providers/configure-provider.d.ts.map +0 -1
  201. package/out/providers/configure-provider.js +0 -14
  202. package/out/providers/graphql-client.d.ts +0 -12
  203. package/out/providers/graphql-client.d.ts.map +0 -1
  204. package/out/providers/graphql-client.js +0 -47
  205. package/out/service/cached-config-service.d.ts +0 -8
  206. package/out/service/cached-config-service.d.ts.map +0 -1
  207. package/out/service/cached-config-service.js +0 -16
  208. package/out/service/command-suggestion-service.d.ts +0 -4
  209. package/out/service/command-suggestion-service.d.ts.map +0 -1
  210. package/out/service/command-suggestion-service.js +0 -17
  211. package/out/service/docker-service.d.ts +0 -24
  212. package/out/service/docker-service.d.ts.map +0 -1
  213. package/out/service/docker-service.js +0 -71
  214. package/out/service/installation-service.d.ts +0 -51
  215. package/out/service/installation-service.d.ts.map +0 -1
  216. package/out/service/installation-service.js +0 -89
  217. package/out/service/lint-service.d.ts +0 -23
  218. package/out/service/lint-service.d.ts.map +0 -1
  219. package/out/service/lint-service.js +0 -39
  220. package/out/service/lite-lint-service.d.ts +0 -10
  221. package/out/service/lite-lint-service.d.ts.map +0 -1
  222. package/out/service/lite-lint-service.js +0 -27
  223. package/out/service/migration-keys-service.d.ts +0 -19
  224. package/out/service/migration-keys-service.d.ts.map +0 -1
  225. package/out/service/migration-keys-service.js +0 -14
  226. package/out/service/port-finding-service.d.ts +0 -12
  227. package/out/service/port-finding-service.d.ts.map +0 -1
  228. package/out/service/port-finding-service.js +0 -34
  229. package/out/service/resource-packaging-service.d.ts +0 -46
  230. package/out/service/resource-packaging-service.d.ts.map +0 -1
  231. package/out/service/resource-packaging-service.js +0 -128
  232. package/out/service/resources-uploader-service.d.ts +0 -16
  233. package/out/service/resources-uploader-service.d.ts.map +0 -1
  234. package/out/service/resources-uploader-service.js +0 -34
  235. package/out/service/tunnel-analytics-service.d.ts +0 -11
  236. package/out/service/tunnel-analytics-service.d.ts.map +0 -1
  237. package/out/service/tunnel-analytics-service.js +0 -24
  238. package/out/service/tunnel-service.d.ts +0 -49
  239. package/out/service/tunnel-service.d.ts.map +0 -1
  240. package/out/service/tunnel-service.js +0 -190
  241. package/out/webtrigger/get-webtrigger-url.d.ts +0 -27
  242. package/out/webtrigger/get-webtrigger-url.d.ts.map +0 -1
  243. package/out/webtrigger/get-webtrigger-url.js +0 -26
  244. package/out/webtrigger/graphql-client.d.ts +0 -14
  245. package/out/webtrigger/graphql-client.d.ts.map +0 -1
  246. package/out/webtrigger/graphql-client.js +0 -52
  247. package/out/workers/analytics-message-worker.d.ts +0 -12
  248. package/out/workers/analytics-message-worker.d.ts.map +0 -1
  249. package/out/workers/analytics-message-worker.js +0 -29
  250. package/out/workers/forge-cli-workers.d.ts +0 -2
  251. package/out/workers/forge-cli-workers.d.ts.map +0 -1
  252. package/out/workers/forge-cli-workers.js +0 -21
  253. package/out/workers/tunnel-clean-up-worker.d.ts +0 -8
  254. package/out/workers/tunnel-clean-up-worker.d.ts.map +0 -1
  255. package/out/workers/tunnel-clean-up-worker.js +0 -31
  256. package/out/workers/version-check-worker.d.ts +0 -8
  257. package/out/workers/version-check-worker.d.ts.map +0 -1
  258. package/out/workers/version-check-worker.js +0 -20
  259. package/out/workers/worker-info.d.ts +0 -8
  260. package/out/workers/worker-info.d.ts.map +0 -1
  261. package/out/workers/worker-info.js +0 -14
  262. package/out/workers/worker.d.ts +0 -6
  263. package/out/workers/worker.d.ts.map +0 -1
  264. package/out/workers/worker.js +0 -7
  265. package/out/workers/workers-starter.d.ts +0 -5
  266. package/out/workers/workers-starter.d.ts.map +0 -1
  267. package/out/workers/workers-starter.js +0 -22
@@ -1,408 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InstallationsGraphqlClient = exports.InvalidAtlassianSiteError = exports.UnknownSiteWithoutCloudIdError = exports.InstallationNotFoundError = exports.MissingAppUninstallTask = exports.MissingAppError = exports.InstallationRequestFailedError = exports.MissingTaskIdError = exports.EnvironmentNotFoundError = exports.UpgradeError = exports.InstallationError = exports.AlreadyInstalledError = exports.PermissionDeniedError = exports.ALREADY_UPGRADED_CODE = exports.UNINSTALLATION_EVENT_POLL_INTERVAL = void 0;
4
- const cs_ari_1 = require("@forge/util/packages/cs-ari");
5
- const cli_shared_1 = require("@forge/cli-shared");
6
- const cli_shared_2 = require("@forge/cli-shared");
7
- const cli_shared_3 = require("@forge/cli-shared");
8
- exports.UNINSTALLATION_EVENT_POLL_INTERVAL = 500;
9
- exports.ALREADY_UPGRADED_CODE = 'INSTALLATION_ALREADY_UPGRADED';
10
- const ALREADY_INSTALLED_CODE = 'APP_ALREADY_INSTALLED';
11
- const PERMISSION_DENIED = 'PERMISSION_DENIED';
12
- class PermissionDeniedError extends cli_shared_1.GraphQlMutationError {
13
- constructor(requestId = 'unknown', appId = 'unknown') {
14
- super(cli_shared_3.Text.install.error.permissionsDeniedInstructions(requestId, appId), PERMISSION_DENIED);
15
- }
16
- }
17
- exports.PermissionDeniedError = PermissionDeniedError;
18
- class AlreadyInstalledError extends cli_shared_1.GraphQlMutationError {
19
- constructor() {
20
- super(cli_shared_3.Text.install.error.alreadyInstalledError, ALREADY_INSTALLED_CODE);
21
- }
22
- }
23
- exports.AlreadyInstalledError = AlreadyInstalledError;
24
- class InstallationError extends cli_shared_1.GraphQlMutationError {
25
- constructor(message, code) {
26
- super(cli_shared_3.Text.install.error.serverSideInstallationError(message), code);
27
- }
28
- }
29
- exports.InstallationError = InstallationError;
30
- class UpgradeError extends cli_shared_1.GraphQlMutationError {
31
- constructor(message, code) {
32
- super(cli_shared_3.Text.upgrade.error.serverSideInstallationError(message), code);
33
- }
34
- }
35
- exports.UpgradeError = UpgradeError;
36
- class EnvironmentNotFoundError extends Error {
37
- }
38
- exports.EnvironmentNotFoundError = EnvironmentNotFoundError;
39
- class MissingTaskIdError extends Error {
40
- }
41
- exports.MissingTaskIdError = MissingTaskIdError;
42
- class InstallationRequestFailedError extends Error {
43
- }
44
- exports.InstallationRequestFailedError = InstallationRequestFailedError;
45
- class MissingAppError extends Error {
46
- }
47
- exports.MissingAppError = MissingAppError;
48
- class MissingAppUninstallTask extends Error {
49
- }
50
- exports.MissingAppUninstallTask = MissingAppUninstallTask;
51
- class InstallationNotFoundError extends Error {
52
- }
53
- exports.InstallationNotFoundError = InstallationNotFoundError;
54
- class UnknownSiteWithoutCloudIdError extends Error {
55
- constructor() {
56
- super(cli_shared_3.Text.installList.noCloudId);
57
- }
58
- }
59
- exports.UnknownSiteWithoutCloudIdError = UnknownSiteWithoutCloudIdError;
60
- class InvalidAtlassianSiteError extends Error {
61
- constructor(url) {
62
- super(cli_shared_3.Text.install.error.invalidAtlassianSite(url));
63
- }
64
- }
65
- exports.InvalidAtlassianSiteError = InvalidAtlassianSiteError;
66
- const tenantToHostname = (tenantInfo) => {
67
- if (!tenantInfo) {
68
- return null;
69
- }
70
- return tenantInfo.hostName || null;
71
- };
72
- const tenantContextsToCloudId = (url, contexts) => {
73
- if (!contexts.length) {
74
- throw new InvalidAtlassianSiteError(url);
75
- }
76
- const context = contexts[0];
77
- if (!context || !context.cloudId) {
78
- throw new InvalidAtlassianSiteError(url);
79
- }
80
- return context.cloudId;
81
- };
82
- class InstallationsGraphqlClient {
83
- constructor(graphqlClient, pause) {
84
- this.graphqlClient = graphqlClient;
85
- this.pause = pause;
86
- }
87
- static buildInstallationContext(product, cloudId) {
88
- const ari = new cs_ari_1.ResourceIdentifier({
89
- resourceOwner: product.toLowerCase(),
90
- resourceType: 'site',
91
- resourceId: cloudId
92
- });
93
- return ari.toString();
94
- }
95
- async installAppIntoSite({ environmentKey, site, product, appId }) {
96
- const cloudId = await this.getCloudId(site);
97
- const installationContext = InstallationsGraphqlClient.buildInstallationContext(product, cloudId);
98
- const query = `
99
- mutation forge_cli_installApplication($input: AppInstallationInput!) {
100
- installApp(input: $input) {
101
- success
102
- taskId
103
- errors {
104
- message
105
- extensions {
106
- errorType
107
- }
108
- }
109
- }
110
- }
111
- `;
112
- const variables = {
113
- input: {
114
- installationContext,
115
- appId,
116
- environmentKey,
117
- async: true
118
- }
119
- };
120
- const { response: { installApp: { success, taskId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
121
- const error = cli_shared_2.getError(errors);
122
- if (!success) {
123
- if (error.code === ALREADY_INSTALLED_CODE) {
124
- throw new AlreadyInstalledError();
125
- }
126
- if (error.code === PERMISSION_DENIED) {
127
- throw new PermissionDeniedError(requestId, cs_ari_1.parse(appId).resourceId);
128
- }
129
- throw new InstallationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
130
- }
131
- if (!taskId) {
132
- throw new MissingTaskIdError(error.message);
133
- }
134
- await this.monitorAppInstallOrUpgrade(taskId);
135
- }
136
- async upgradeInstallation({ site, product, environmentKey, appId }) {
137
- const cloudId = await this.getCloudId(site);
138
- const installationContext = InstallationsGraphqlClient.buildInstallationContext(product, cloudId);
139
- const query = `
140
- mutation forge_cli_upgradeApplication($input: AppInstallationUpgradeInput!) {
141
- upgradeApp(input: $input) {
142
- success
143
- taskId
144
- errors {
145
- message
146
- extensions {
147
- errorType
148
- }
149
- }
150
- }
151
- }
152
- `;
153
- const variables = {
154
- input: {
155
- installationContext,
156
- appId,
157
- environmentKey,
158
- async: true
159
- }
160
- };
161
- const { response: { upgradeApp: { success, errors, taskId } }, requestId } = await this.graphqlClient.mutate(query, variables);
162
- const error = cli_shared_2.getError(errors);
163
- if (!success) {
164
- throw new UpgradeError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
165
- }
166
- if (!taskId) {
167
- throw new MissingTaskIdError(error.message);
168
- }
169
- await this.monitorAppInstallOrUpgrade(taskId);
170
- }
171
- async monitorAppInstallOrUpgrade(taskId) {
172
- let status = cli_shared_1.AppTaskState.Pending;
173
- while (status !== cli_shared_1.AppTaskState.Complete) {
174
- const { state, errors } = await this.getAppInstallationTask(taskId);
175
- status = state;
176
- if (status === cli_shared_1.AppTaskState.Failed) {
177
- throw new InstallationRequestFailedError((errors === null || errors === void 0 ? void 0 : errors[0].message) || undefined);
178
- }
179
- if (status !== cli_shared_1.AppTaskState.Complete)
180
- await this.pause(exports.UNINSTALLATION_EVENT_POLL_INTERVAL);
181
- }
182
- }
183
- async uninstallApp(input) {
184
- const query = `
185
- mutation forge_cli_uninstallApplication($input: AppUninstallationInput!) {
186
- uninstallApp(input: $input) {
187
- success
188
- taskId
189
- errors {
190
- message
191
- extensions {
192
- errorType
193
- }
194
- }
195
- }
196
- }
197
- `;
198
- const { response: { uninstallApp: { success, errors, taskId } }, requestId } = await this.graphqlClient.mutate(query, { input });
199
- const error = cli_shared_2.getError(errors);
200
- if (!success) {
201
- throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
202
- }
203
- return this.monitorUninstallApp(taskId);
204
- }
205
- async uninstallMultipleApps(apps) {
206
- const uninstallsResult = [];
207
- for (const app of apps) {
208
- try {
209
- const [success] = await Promise.all([
210
- this.uninstallApp(app),
211
- new Promise((resolve) => setTimeout(resolve, 1000))
212
- ]);
213
- uninstallsResult.push(Object.assign(Object.assign({}, app), { successful: success }));
214
- }
215
- catch (err) {
216
- uninstallsResult.push(Object.assign(Object.assign({}, app), { successful: false }));
217
- }
218
- }
219
- return uninstallsResult;
220
- }
221
- async listInstallations(appId) {
222
- const installations = await this.getAllInstallations(appId);
223
- return await this.resolveInstallationsHostnames(installations);
224
- }
225
- async getInstallation(appId, installationId) {
226
- const installations = await this.listInstallations(appId);
227
- const matchedInstallation = installations.find(({ id }) => id === installationId);
228
- if (matchedInstallation) {
229
- return matchedInstallation;
230
- }
231
- throw new InstallationNotFoundError(cli_shared_3.Text.installationId.errors.notFound(installationId));
232
- }
233
- async getAppInstallationTask(taskId) {
234
- const query = `
235
- query forge_cli_getInstallationTask($id: ID!) {
236
- appInstallationTask(id: $id) {
237
- state
238
- errors {
239
- message
240
- extensions {
241
- errorType
242
- }
243
- }
244
- }
245
- }
246
- `;
247
- const { appInstallationTask } = await this.graphqlClient.query(query, {
248
- id: taskId
249
- });
250
- if (!appInstallationTask) {
251
- throw new MissingAppUninstallTask(cli_shared_3.Text.uninstall.missingUninstallTask);
252
- }
253
- const { state, errors } = appInstallationTask;
254
- return {
255
- errors,
256
- state
257
- };
258
- }
259
- async monitorUninstallApp(taskId) {
260
- let status = cli_shared_1.AppTaskState.Pending;
261
- while (status !== cli_shared_1.AppTaskState.Complete) {
262
- const { state } = await this.getAppInstallationTask(taskId);
263
- status = state;
264
- if (status === cli_shared_1.AppTaskState.Failed) {
265
- return false;
266
- }
267
- if (status !== cli_shared_1.AppTaskState.Complete)
268
- await this.pause(exports.UNINSTALLATION_EVENT_POLL_INTERVAL);
269
- }
270
- return true;
271
- }
272
- async createCloudIdToHostnameMap(cloudIds) {
273
- const MAX_CLOUD_IDS_AT_ONCE = 20;
274
- const cloudIdsChunks = [];
275
- for (let i = 0; i < cloudIds.length; i += MAX_CLOUD_IDS_AT_ONCE) {
276
- cloudIdsChunks.push(cloudIds.slice(i, i + MAX_CLOUD_IDS_AT_ONCE));
277
- }
278
- const query = `
279
- query forge_cli_getHostnameForTenantContexts($cloudIds: [ID!]!) {
280
- tenantContexts(cloudIds: $cloudIds) {
281
- hostName
282
- }
283
- }
284
- `;
285
- const results = await Promise.all(cloudIdsChunks.map((cloudIdsChunk) => this.graphqlClient.query(query, {
286
- cloudIds: cloudIdsChunk
287
- })));
288
- const tenantContexts = [].concat(...results.map((result) => result.tenantContexts || []));
289
- const cloudIdToHostname = {};
290
- cloudIds.forEach((cloudId, index) => {
291
- const maybeHostname = tenantToHostname(tenantContexts[index]);
292
- cloudIdToHostname[cloudId] = maybeHostname || cloudId;
293
- });
294
- return cloudIdToHostname;
295
- }
296
- async resolveInstallationsHostnames(installations) {
297
- if (!installations.length) {
298
- return [];
299
- }
300
- const installationContexts = installations.map(({ installation }) => {
301
- const context = cs_ari_1.parse(installation.installationContext);
302
- const cloudId = context.resourceId;
303
- if (!cloudId) {
304
- throw new UnknownSiteWithoutCloudIdError();
305
- }
306
- return context;
307
- });
308
- const uniqueCloudIds = [...new Set(installationContexts.map((context) => context.resourceId))];
309
- const cloudIdToHostname = await this.createCloudIdToHostnameMap(uniqueCloudIds);
310
- return installationContexts.map((context, i) => {
311
- const { environment, installation } = installations[i];
312
- const site = cloudIdToHostname[context.resourceId];
313
- return {
314
- id: installation.id,
315
- product: context.resourceOwner,
316
- environmentKey: environment,
317
- context: installation.installationContext,
318
- site,
319
- version: installation.version || {
320
- isLatest: false
321
- }
322
- };
323
- });
324
- }
325
- async getAllInstallations(appId) {
326
- const query = `
327
- query forge_cli_getApplicationInstallations($id: ID!) {
328
- app(id: $id) {
329
- environments {
330
- key
331
- installations {
332
- id
333
- installationContext,
334
- version {
335
- isLatest
336
- }
337
- }
338
- }
339
- }
340
- }
341
- `;
342
- const result = await this.graphqlClient.query(query, { id: appId });
343
- if (!result.app) {
344
- throw new MissingAppError();
345
- }
346
- const output = [];
347
- for (const { key, installations } of result.app.environments) {
348
- if (installations) {
349
- for (const installation of installations) {
350
- output.push({
351
- environment: key,
352
- installation
353
- });
354
- }
355
- }
356
- }
357
- return output;
358
- }
359
- async getCloudId(site) {
360
- const query = `
361
- query forge_cli_getCloudIfForTenantContexts($hostNames: [String!]) {
362
- tenantContexts(hostNames: $hostNames) {
363
- cloudId
364
- }
365
- }
366
- `;
367
- const result = await this.graphqlClient.query(query, {
368
- hostNames: [site.hostname]
369
- });
370
- const tenantContexts = result.tenantContexts || [];
371
- return tenantContextsToCloudId(site, tenantContexts);
372
- }
373
- async getVersions(appId, environmentKey, firstN = 1) {
374
- const query = `
375
- query forge_cli_getApplicationEnvironmentLatestVersions($appId: ID!, $environmentKey: String!, $firstN: Int!) {
376
- app(id: $appId) {
377
- environmentByKey(key: $environmentKey) {
378
- versions(first: $firstN) {
379
- nodes {
380
- permissions {
381
- egress {
382
- addresses
383
- }
384
- scopes {
385
- key
386
- }
387
- }
388
- }
389
- }
390
- }
391
- }
392
- }
393
- `;
394
- const result = await this.graphqlClient.query(query, {
395
- appId,
396
- environmentKey,
397
- firstN
398
- });
399
- if (!result.app) {
400
- throw new MissingAppError();
401
- }
402
- if (!result.app.environmentByKey) {
403
- throw new EnvironmentNotFoundError();
404
- }
405
- return result.app.environmentByKey.versions;
406
- }
407
- }
408
- exports.InstallationsGraphqlClient = InstallationsGraphqlClient;
@@ -1,21 +0,0 @@
1
- /// <reference types="node" />
2
- import { URL } from 'url';
3
- import { AppConfigProvider } from '@forge/cli-shared';
4
- export interface TriggerAppSiteInstallDetails {
5
- site: URL;
6
- product: string;
7
- environmentKey: string;
8
- }
9
- export interface AppInstallSiteDetails extends TriggerAppSiteInstallDetails {
10
- appId: string;
11
- }
12
- export interface InstallAppClient {
13
- installAppIntoSite(appInstallDetails: AppInstallSiteDetails): Promise<void>;
14
- }
15
- export declare class InstallAppSiteCommand {
16
- private readonly getAppConfig;
17
- private readonly installAppClient;
18
- constructor(getAppConfig: AppConfigProvider, installAppClient: InstallAppClient);
19
- execute({ environmentKey, site, product }: TriggerAppSiteInstallDetails): Promise<void>;
20
- }
21
- //# sourceMappingURL=install-app-site.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"install-app-site.d.ts","sourceRoot":"","sources":["../../src/installations/install-app-site.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,GAAG,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAsB,SAAQ,4BAA4B;IACzE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7E;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAAqB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAlE,YAAY,EAAE,iBAAiB,EAAmB,gBAAgB,EAAE,gBAAgB;IAEpG,OAAO,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,4BAA4B;CASrF"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InstallAppSiteCommand = void 0;
4
- class InstallAppSiteCommand {
5
- constructor(getAppConfig, installAppClient) {
6
- this.getAppConfig = getAppConfig;
7
- this.installAppClient = installAppClient;
8
- }
9
- async execute({ environmentKey, site, product }) {
10
- const { id: appId } = await this.getAppConfig();
11
- return await this.installAppClient.installAppIntoSite({
12
- appId,
13
- environmentKey,
14
- site,
15
- product
16
- });
17
- }
18
- }
19
- exports.InstallAppSiteCommand = InstallAppSiteCommand;
@@ -1,5 +0,0 @@
1
- import { Installation } from '../service/installation-service';
2
- export declare class UninstallAppError extends Error {
3
- }
4
- export declare const getHangingIdentityInstallationsFromSite: (allInstallations: Installation[], remainingApps: Installation[], sites: Set<string>) => Installation[];
5
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/installations/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,eAAO,MAAM,uCAAuC,qBAChC,YAAY,EAAE,iBACjB,YAAY,EAAE,SACtB,GAAG,CAAC,MAAM,CAAC,KACjB,YAAY,EAkBd,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHangingIdentityInstallationsFromSite = exports.UninstallAppError = void 0;
4
- class UninstallAppError extends Error {
5
- }
6
- exports.UninstallAppError = UninstallAppError;
7
- exports.getHangingIdentityInstallationsFromSite = (allInstallations, remainingApps, sites) => {
8
- const hangingIdentityInstalls = [];
9
- sites.forEach((site) => {
10
- const shouldUninstallIdentity = remainingApps.filter((app) => app.site === site).length === 0;
11
- if (shouldUninstallIdentity) {
12
- const identityInstall = allInstallations.find((install) => install.site === site && install.product === 'identity');
13
- if (identityInstall) {
14
- hangingIdentityInstalls.push(identityInstall);
15
- }
16
- }
17
- });
18
- return hangingIdentityInstalls;
19
- };
@@ -1,25 +0,0 @@
1
- import { AppConfigProvider } from '@forge/cli-shared';
2
- import { AppUninstallationInput } from '@forge/cli-shared';
3
- import { Installation } from '../service/installation-service';
4
- export interface UninstallAppOutput {
5
- product: string;
6
- site: string;
7
- environmentKey: string;
8
- successful?: boolean;
9
- }
10
- export interface AsyncAppUninstallationInput extends AppUninstallationInput {
11
- async: true;
12
- }
13
- export interface UninstallAppClient {
14
- getInstallation(appId: string, installationId: string): Promise<Installation>;
15
- uninstallApp(input: AsyncAppUninstallationInput): Promise<boolean>;
16
- uninstallMultipleApps(input: AsyncAppUninstallationInput[]): Promise<Partial<UninstallAppOutput>[]>;
17
- }
18
- export declare class UninstallAppCommand {
19
- private readonly getAppConfig;
20
- private readonly client;
21
- constructor(getAppConfig: AppConfigProvider, client: UninstallAppClient);
22
- execute(installationId: string): Promise<UninstallAppOutput>;
23
- batchExecute(installationIds?: string[], installationInfos?: Installation[]): Promise<UninstallAppOutput[]>;
24
- }
25
- //# sourceMappingURL=uninstall-app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uninstall-app.d.ts","sourceRoot":"","sources":["../../src/installations/uninstall-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,KAAK,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9E,YAAY,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,qBAAqB,CAAC,KAAK,EAAE,2BAA2B,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;CACrG;AAED,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAAqB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAxD,YAAY,EAAE,iBAAiB,EAAmB,MAAM,EAAE,kBAAkB;IAE5F,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAY5D,YAAY,CACvB,eAAe,GAAE,MAAM,EAAO,EAC9B,iBAAiB,CAAC,EAAE,YAAY,EAAE,GACjC,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA4BjC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UninstallAppCommand = void 0;
4
- class UninstallAppCommand {
5
- constructor(getAppConfig, client) {
6
- this.getAppConfig = getAppConfig;
7
- this.client = client;
8
- }
9
- async execute(installationId) {
10
- const { id: appId } = await this.getAppConfig();
11
- const { product, site, environmentKey } = await this.client.getInstallation(appId, installationId);
12
- const success = await this.client.uninstallApp({ appId, environmentKey, installationId, async: true });
13
- return {
14
- product,
15
- site,
16
- environmentKey,
17
- successful: success
18
- };
19
- }
20
- async batchExecute(installationIds = [], installationInfos) {
21
- const { id: appId } = await this.getAppConfig();
22
- let appsInstallInfo;
23
- if (installationInfos && installationInfos.length) {
24
- appsInstallInfo = installationInfos;
25
- }
26
- else {
27
- appsInstallInfo = await Promise.all(installationIds.map((installId) => this.client.getInstallation(appId, installId)));
28
- }
29
- const uninstallOutput = await this.client.uninstallMultipleApps(appsInstallInfo.map((installInfo) => ({
30
- appId,
31
- environmentKey: installInfo.environmentKey,
32
- installationId: installInfo.id,
33
- async: true
34
- })));
35
- return appsInstallInfo.map(({ product, site, environmentKey }, index) => ({
36
- product,
37
- site,
38
- environmentKey,
39
- successful: uninstallOutput[index].successful
40
- }));
41
- }
42
- }
43
- exports.UninstallAppCommand = UninstallAppCommand;
@@ -1,8 +0,0 @@
1
- import { GraphQLClient } from '@forge/cli-shared';
2
- import { AppEnvironmentMigrationKeys } from '../service/migration-keys-service';
3
- export declare class GraphqlClient {
4
- private readonly graphqlClient;
5
- constructor(graphqlClient: GraphQLClient);
6
- getLatestMigrationKeys(appId: string, environmentKey: string): Promise<AppEnvironmentMigrationKeys>;
7
- }
8
- //# sourceMappingURL=graphql-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/migration-keys/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA+C,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC;CA+CjH"}
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GraphqlClient = void 0;
4
- const cli_shared_1 = require("@forge/cli-shared");
5
- class GraphqlClient {
6
- constructor(graphqlClient) {
7
- this.graphqlClient = graphqlClient;
8
- }
9
- async getLatestMigrationKeys(appId, environmentKey) {
10
- var _a, _b;
11
- const query = `
12
- query forge_cli_getMigrationKeys($id: ID!, $key: String!) {
13
- app(id: $id) {
14
- environmentByKey(key: $key) {
15
- id
16
- versions(first: 1) {
17
- edges {
18
- node {
19
- isLatest
20
- migrationKeys {
21
- jira
22
- confluence
23
- }
24
- }
25
- }
26
- }
27
- }
28
- marketplaceApp {
29
- appKey
30
- }
31
- }
32
- }
33
- `;
34
- const result = await this.graphqlClient.query(query, {
35
- id: appId,
36
- key: environmentKey
37
- });
38
- if (!result.app) {
39
- throw new cli_shared_1.MissingAppError();
40
- }
41
- if (!result.app.environmentByKey) {
42
- throw new cli_shared_1.MissingAppEnvironmentError();
43
- }
44
- const mpacAppKey = (_a = result.app.marketplaceApp) === null || _a === void 0 ? void 0 : _a.appKey;
45
- const versions = result.app.environmentByKey.versions;
46
- let migrationKeys;
47
- for (const edge of (versions === null || versions === void 0 ? void 0 : versions.edges) || []) {
48
- if (edge) {
49
- migrationKeys = (_b = edge.node) === null || _b === void 0 ? void 0 : _b.migrationKeys;
50
- }
51
- }
52
- return { migrationKeys, mpacAppKey };
53
- }
54
- }
55
- exports.GraphqlClient = GraphqlClient;
@@ -1,19 +0,0 @@
1
- import { AppConfigProvider } from '@forge/cli-shared';
2
- export interface ProviderDetails {
3
- environment: string;
4
- providerKey: string;
5
- clientSecret: string;
6
- }
7
- export interface AppProviderDetails extends ProviderDetails {
8
- appId: string;
9
- }
10
- export interface ConfigureProviderClient {
11
- configureProvider(details: AppProviderDetails): Promise<void>;
12
- }
13
- export declare class ConfigureProviderCommand {
14
- private readonly client;
15
- private readonly getAppConfig;
16
- constructor(client: ConfigureProviderClient, getAppConfig: AppConfigProvider);
17
- execute(details: ProviderDetails): Promise<void>;
18
- }
19
- //# sourceMappingURL=configure-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configure-provider.d.ts","sourceRoot":"","sources":["../../src/providers/configure-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA2B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAA9D,MAAM,EAAE,uBAAuB,EAAmB,YAAY,EAAE,iBAAiB;IAEjG,OAAO,CAAC,OAAO,EAAE,eAAe;CAO9C"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConfigureProviderCommand = void 0;
4
- class ConfigureProviderCommand {
5
- constructor(client, getAppConfig) {
6
- this.client = client;
7
- this.getAppConfig = getAppConfig;
8
- }
9
- async execute(details) {
10
- const { id: appId } = await this.getAppConfig();
11
- await this.client.configureProvider(Object.assign(Object.assign({}, details), { appId }));
12
- }
13
- }
14
- exports.ConfigureProviderCommand = ConfigureProviderCommand;
@@ -1,12 +0,0 @@
1
- import { GraphQLClient } from '@forge/cli-shared';
2
- import { AppProviderDetails, ConfigureProviderClient } from './configure-provider';
3
- export declare class MissingAppError extends Error {
4
- }
5
- export declare class MissingAppEnvironmentError extends Error {
6
- }
7
- export declare class GraphqlClient implements ConfigureProviderClient {
8
- private readonly graphqlClient;
9
- constructor(graphqlClient: GraphQLClient);
10
- configureProvider(details: AppProviderDetails): Promise<void>;
11
- }
12
- //# sourceMappingURL=graphql-client.d.ts.map