@forge/cli 0.0.0-experimental-819498d → 0.0.0-experimental-3b4aabe

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 (122) hide show
  1. package/CHANGELOG.md +2889 -7
  2. package/README.md +18 -19
  3. package/npm-shrinkwrap.json +3036 -3598
  4. package/out/autocomplete/autocomplete-config.json +16 -26
  5. package/out/bin/cli.js +0 -2
  6. package/out/bin/postinstall.js +1 -1
  7. package/out/command-line/anon-user-id.js +6 -10
  8. package/out/command-line/command.d.ts +7 -1
  9. package/out/command-line/command.d.ts.map +1 -1
  10. package/out/command-line/command.js +39 -9
  11. package/out/command-line/controller/deploy-controller.d.ts +13 -2
  12. package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
  13. package/out/command-line/controller/deploy-controller.js +67 -5
  14. package/out/command-line/controller/install-controller.d.ts +2 -1
  15. package/out/command-line/controller/install-controller.d.ts.map +1 -1
  16. package/out/command-line/controller/install-controller.js +28 -32
  17. package/out/command-line/controller/lint-controller.js +1 -1
  18. package/out/command-line/controller/pre-command-controller.js +1 -1
  19. package/out/command-line/controller/prerequisites-controller.d.ts +11 -0
  20. package/out/command-line/controller/prerequisites-controller.d.ts.map +1 -0
  21. package/out/command-line/controller/prerequisites-controller.js +34 -0
  22. package/out/command-line/controller/stubController.d.ts +9 -0
  23. package/out/command-line/controller/stubController.d.ts.map +1 -0
  24. package/out/command-line/controller/stubController.js +15 -0
  25. package/out/command-line/dependency-injection.d.ts +11 -3
  26. package/out/command-line/dependency-injection.d.ts.map +1 -1
  27. package/out/command-line/dependency-injection.js +34 -17
  28. package/out/command-line/index.d.ts.map +1 -1
  29. package/out/command-line/index.js +4 -0
  30. package/out/command-line/register-app-commands.d.ts.map +1 -1
  31. package/out/command-line/register-app-commands.js +1 -9
  32. package/out/command-line/register-authentication-command.d.ts.map +1 -1
  33. package/out/command-line/register-authentication-command.js +0 -16
  34. package/out/command-line/register-deployment-commands.d.ts +8 -0
  35. package/out/command-line/register-deployment-commands.d.ts.map +1 -1
  36. package/out/command-line/register-environment-variables-commands.d.ts +1 -1
  37. package/out/command-line/register-environment-variables-commands.d.ts.map +1 -1
  38. package/out/command-line/register-environment-variables-commands.js +22 -7
  39. package/out/command-line/register-installation-commands.d.ts +1 -1
  40. package/out/command-line/register-installation-commands.d.ts.map +1 -1
  41. package/out/command-line/register-installation-commands.js +19 -13
  42. package/out/command-line/register-providers-commands.d.ts +3 -0
  43. package/out/command-line/register-providers-commands.d.ts.map +1 -0
  44. package/out/command-line/register-providers-commands.js +43 -0
  45. package/out/command-line/register-webtrigger-commands.d.ts.map +1 -1
  46. package/out/command-line/register-webtrigger-commands.js +9 -11
  47. package/out/command-line/unique-machine-id.d.ts.map +1 -1
  48. package/out/command-line/unique-machine-id.js +1 -10
  49. package/out/command-line/version-info.d.ts +1 -0
  50. package/out/command-line/version-info.d.ts.map +1 -1
  51. package/out/command-line/version-info.js +3 -2
  52. package/out/command-line/view/deploy-view.d.ts +7 -1
  53. package/out/command-line/view/deploy-view.d.ts.map +1 -1
  54. package/out/command-line/view/deploy-view.js +21 -3
  55. package/out/command-line/view/install-view.d.ts +5 -5
  56. package/out/command-line/view/install-view.d.ts.map +1 -1
  57. package/out/command-line/view/install-view.js +20 -15
  58. package/out/command-line/view/lint-view.d.ts +3 -2
  59. package/out/command-line/view/lint-view.d.ts.map +1 -1
  60. package/out/command-line/view/lint-view.js +3 -0
  61. package/out/command-line/view/lite-lint-view.d.ts +3 -2
  62. package/out/command-line/view/lite-lint-view.d.ts.map +1 -1
  63. package/out/command-line/view/lite-lint-view.js +3 -0
  64. package/out/deploy/deployer/deploy-monitor-graphql-client.js +1 -1
  65. package/out/deploy/deployer/trigger-deploy-graphql-client.js +1 -1
  66. package/out/deploy/packager/archiver.d.ts +3 -2
  67. package/out/deploy/packager/archiver.d.ts.map +1 -1
  68. package/out/deploy/packager/archiver.js +10 -2
  69. package/out/deploy/packager/packager.d.ts.map +1 -1
  70. package/out/deploy/packager/packager.js +20 -20
  71. package/out/deploy/uploader/artifact-graphql-client.js +2 -2
  72. package/out/environment-variables/graphql-client.d.ts +1 -1
  73. package/out/environment-variables/graphql-client.js +3 -3
  74. package/out/installations/graphql-client.d.ts +7 -8
  75. package/out/installations/graphql-client.d.ts.map +1 -1
  76. package/out/installations/graphql-client.js +70 -32
  77. package/out/installations/install-app-site.d.ts +2 -8
  78. package/out/installations/install-app-site.d.ts.map +1 -1
  79. package/out/installations/install-app-site.js +2 -3
  80. package/out/installations/uninstall-app.d.ts +0 -1
  81. package/out/installations/uninstall-app.d.ts.map +1 -1
  82. package/out/installations/uninstall-app.js +2 -4
  83. package/out/migration-keys/graphql-client.d.ts +8 -0
  84. package/out/migration-keys/graphql-client.d.ts.map +1 -0
  85. package/out/migration-keys/graphql-client.js +55 -0
  86. package/out/providers/configure-provider.d.ts +19 -0
  87. package/out/providers/configure-provider.d.ts.map +1 -0
  88. package/out/providers/configure-provider.js +14 -0
  89. package/out/providers/graphql-client.d.ts +12 -0
  90. package/out/providers/graphql-client.d.ts.map +1 -0
  91. package/out/providers/graphql-client.js +47 -0
  92. package/out/service/installation-service.d.ts +13 -11
  93. package/out/service/installation-service.d.ts.map +1 -1
  94. package/out/service/installation-service.js +38 -13
  95. package/out/service/lint-service.d.ts +2 -2
  96. package/out/service/lint-service.d.ts.map +1 -1
  97. package/out/service/lint-service.js +2 -2
  98. package/out/service/lite-lint-service.d.ts +3 -3
  99. package/out/service/lite-lint-service.d.ts.map +1 -1
  100. package/out/service/lite-lint-service.js +2 -2
  101. package/out/service/migration-keys-service.d.ts +19 -0
  102. package/out/service/migration-keys-service.d.ts.map +1 -0
  103. package/out/service/migration-keys-service.js +14 -0
  104. package/out/service/resource-packaging-service.d.ts +3 -2
  105. package/out/service/resource-packaging-service.d.ts.map +1 -1
  106. package/out/service/resource-packaging-service.js +6 -2
  107. package/out/service/tunnel-service.d.ts.map +1 -1
  108. package/out/service/tunnel-service.js +6 -4
  109. package/out/webtrigger/get-webtrigger-url.d.ts +10 -4
  110. package/out/webtrigger/get-webtrigger-url.d.ts.map +1 -1
  111. package/out/webtrigger/get-webtrigger-url.js +11 -18
  112. package/out/webtrigger/graphql-client.d.ts +14 -0
  113. package/out/webtrigger/graphql-client.d.ts.map +1 -0
  114. package/out/webtrigger/graphql-client.js +52 -0
  115. package/out/workers/forge-cli-workers.js +1 -1
  116. package/package.json +14 -13
  117. package/out/bin/preinstall.d.ts +0 -3
  118. package/out/bin/preinstall.d.ts.map +0 -1
  119. package/out/bin/preinstall.js +0 -9
  120. package/out/command-line/cli-prerequisites.d.ts +0 -3
  121. package/out/command-line/cli-prerequisites.d.ts.map +0 -1
  122. package/out/command-line/cli-prerequisites.js +0 -37
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InstallationsGraphqlClient = exports.InvalidAtlassianSiteError = exports.UnknownSiteWithoutCloudIdError = exports.InstallationNotFoundError = exports.MissingAppUninstallTask = exports.MissingAppError = exports.MissingInstallationDetailsError = exports.EnvironmentNotFoundError = exports.UpgradeError = exports.InstallationError = exports.AlreadyInstalledError = exports.PermissionDeniedError = exports.ALREADY_UPGRADED_CODE = exports.UNINSTALLATION_EVENT_POLL_INTERVAL = void 0;
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
4
  const cs_ari_1 = require("@forge/util/packages/cs-ari");
5
5
  const cli_shared_1 = require("@forge/cli-shared");
6
6
  const cli_shared_2 = require("@forge/cli-shared");
@@ -36,9 +36,12 @@ exports.UpgradeError = UpgradeError;
36
36
  class EnvironmentNotFoundError extends Error {
37
37
  }
38
38
  exports.EnvironmentNotFoundError = EnvironmentNotFoundError;
39
- class MissingInstallationDetailsError extends Error {
39
+ class MissingTaskIdError extends Error {
40
40
  }
41
- exports.MissingInstallationDetailsError = MissingInstallationDetailsError;
41
+ exports.MissingTaskIdError = MissingTaskIdError;
42
+ class InstallationRequestFailedError extends Error {
43
+ }
44
+ exports.InstallationRequestFailedError = InstallationRequestFailedError;
42
45
  class MissingAppError extends Error {
43
46
  }
44
47
  exports.MissingAppError = MissingAppError;
@@ -93,16 +96,16 @@ class InstallationsGraphqlClient {
93
96
  const cloudId = await this.getCloudId(site);
94
97
  const installationContext = InstallationsGraphqlClient.buildInstallationContext(product, cloudId);
95
98
  const query = `
96
- mutation installApp($input: AppInstallationInput!) {
99
+ mutation forge_cli_installApplication($input: AppInstallationInput!) {
97
100
  installApp(input: $input) {
98
101
  success
102
+ taskId
99
103
  errors {
100
104
  message
101
105
  extensions {
102
106
  errorType
103
107
  }
104
108
  }
105
- installationId
106
109
  }
107
110
  }
108
111
  `;
@@ -110,10 +113,11 @@ class InstallationsGraphqlClient {
110
113
  input: {
111
114
  installationContext,
112
115
  appId,
113
- environmentKey
116
+ environmentKey,
117
+ async: true
114
118
  }
115
119
  };
116
- const { response: { installApp: { success, installationId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
120
+ const { response: { installApp: { success, taskId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
117
121
  const error = cli_shared_2.getError(errors);
118
122
  if (!success) {
119
123
  if (error.code === ALREADY_INSTALLED_CODE) {
@@ -124,25 +128,25 @@ class InstallationsGraphqlClient {
124
128
  }
125
129
  throw new InstallationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
126
130
  }
127
- if (!installationId) {
128
- throw new MissingInstallationDetailsError(error.message);
131
+ if (!taskId) {
132
+ throw new MissingTaskIdError(error.message);
129
133
  }
130
- return { installationId };
134
+ await this.monitorAppInstallOrUpgrade(taskId);
131
135
  }
132
136
  async upgradeInstallation({ site, product, environmentKey, appId }) {
133
137
  const cloudId = await this.getCloudId(site);
134
138
  const installationContext = InstallationsGraphqlClient.buildInstallationContext(product, cloudId);
135
139
  const query = `
136
- mutation upgradeApp($input: AppInstallationUpgradeInput!) {
140
+ mutation forge_cli_upgradeApplication($input: AppInstallationUpgradeInput!) {
137
141
  upgradeApp(input: $input) {
138
142
  success
143
+ taskId
139
144
  errors {
140
145
  message
141
146
  extensions {
142
147
  errorType
143
148
  }
144
149
  }
145
- installationId
146
150
  }
147
151
  }
148
152
  `;
@@ -150,22 +154,35 @@ class InstallationsGraphqlClient {
150
154
  input: {
151
155
  installationContext,
152
156
  appId,
153
- environmentKey
157
+ environmentKey,
158
+ async: true
154
159
  }
155
160
  };
156
- const { response: { upgradeApp: { success, installationId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
161
+ const { response: { upgradeApp: { success, errors, taskId } }, requestId } = await this.graphqlClient.mutate(query, variables);
157
162
  const error = cli_shared_2.getError(errors);
158
163
  if (!success) {
159
164
  throw new UpgradeError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
160
165
  }
161
- if (!installationId) {
162
- throw new MissingInstallationDetailsError(error.message);
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);
163
181
  }
164
- return { installationId };
165
182
  }
166
183
  async uninstallApp(input) {
167
184
  const query = `
168
- mutation uninstallApp($input: AppUninstallationInput!) {
185
+ mutation forge_cli_uninstallApplication($input: AppUninstallationInput!) {
169
186
  uninstallApp(input: $input) {
170
187
  success
171
188
  taskId
@@ -215,7 +232,7 @@ class InstallationsGraphqlClient {
215
232
  }
216
233
  async getAppInstallationTask(taskId) {
217
234
  const query = `
218
- query appInstallationTask($id: ID!) {
235
+ query forge_cli_getInstallationTask($id: ID!) {
219
236
  appInstallationTask(id: $id) {
220
237
  state
221
238
  errors {
@@ -253,18 +270,23 @@ class InstallationsGraphqlClient {
253
270
  return true;
254
271
  }
255
272
  async createCloudIdToHostnameMap(cloudIds) {
256
- const cloudIdToHostname = {};
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
+ }
257
278
  const query = `
258
- query tenantContexts($cloudIds: [ID!]!) {
279
+ query forge_cli_getHostnameForTenantContexts($cloudIds: [ID!]!) {
259
280
  tenantContexts(cloudIds: $cloudIds) {
260
281
  hostName
261
282
  }
262
283
  }
263
284
  `;
264
- const result = await this.graphqlClient.query(query, {
265
- cloudIds
266
- });
267
- const tenantContexts = result.tenantContexts || [];
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 = {};
268
290
  cloudIds.forEach((cloudId, index) => {
269
291
  const maybeHostname = tenantToHostname(tenantContexts[index]);
270
292
  cloudIdToHostname[cloudId] = maybeHostname || cloudId;
@@ -292,6 +314,7 @@ class InstallationsGraphqlClient {
292
314
  id: installation.id,
293
315
  product: context.resourceOwner,
294
316
  environmentKey: environment,
317
+ context: installation.installationContext,
295
318
  site,
296
319
  version: installation.version || {
297
320
  isLatest: false
@@ -301,7 +324,7 @@ class InstallationsGraphqlClient {
301
324
  }
302
325
  async getAllInstallations(appId) {
303
326
  const query = `
304
- query app($id: ID!) {
327
+ query forge_cli_getApplicationInstallations($id: ID!) {
305
328
  app(id: $id) {
306
329
  environments {
307
330
  key
@@ -335,7 +358,7 @@ class InstallationsGraphqlClient {
335
358
  }
336
359
  async getCloudId(site) {
337
360
  const query = `
338
- query tenantContexts($hostNames: [String!]) {
361
+ query forge_cli_getCloudIfForTenantContexts($hostNames: [String!]) {
339
362
  tenantContexts(hostNames: $hostNames) {
340
363
  cloudId
341
364
  }
@@ -347,24 +370,39 @@ class InstallationsGraphqlClient {
347
370
  const tenantContexts = result.tenantContexts || [];
348
371
  return tenantContextsToCloudId(site, tenantContexts);
349
372
  }
350
- async getScopes(appId, environmentKey) {
373
+ async getVersions(appId, environmentKey, firstN = 1) {
351
374
  const query = `
352
- query app($appId: ID!, $environmentKey: String!) {
375
+ query forge_cli_getApplicationEnvironmentLatestVersions($appId: ID!, $environmentKey: String!, $firstN: Int!) {
353
376
  app(id: $appId) {
354
377
  environmentByKey(key: $environmentKey) {
355
- scopes
378
+ versions(first: $firstN) {
379
+ nodes {
380
+ permissions {
381
+ egress {
382
+ addresses
383
+ }
384
+ scopes {
385
+ key
386
+ }
387
+ }
388
+ }
389
+ }
356
390
  }
357
391
  }
358
392
  }
359
393
  `;
360
- const result = await this.graphqlClient.query(query, { appId, environmentKey });
394
+ const result = await this.graphqlClient.query(query, {
395
+ appId,
396
+ environmentKey,
397
+ firstN
398
+ });
361
399
  if (!result.app) {
362
400
  throw new MissingAppError();
363
401
  }
364
402
  if (!result.app.environmentByKey) {
365
403
  throw new EnvironmentNotFoundError();
366
404
  }
367
- return result.app.environmentByKey.scopes;
405
+ return result.app.environmentByKey.versions;
368
406
  }
369
407
  }
370
408
  exports.InstallationsGraphqlClient = InstallationsGraphqlClient;
@@ -9,19 +9,13 @@ export interface TriggerAppSiteInstallDetails {
9
9
  export interface AppInstallSiteDetails extends TriggerAppSiteInstallDetails {
10
10
  appId: string;
11
11
  }
12
- export interface InstallationResult {
13
- installationId: string;
14
- }
15
12
  export interface InstallAppClient {
16
- installAppIntoSite(appInstallDetails: AppInstallSiteDetails): Promise<InstallationResult>;
13
+ installAppIntoSite(appInstallDetails: AppInstallSiteDetails): Promise<void>;
17
14
  }
18
15
  export declare class InstallAppSiteCommand {
19
16
  private readonly getAppConfig;
20
17
  private readonly installAppClient;
21
18
  constructor(getAppConfig: AppConfigProvider, installAppClient: InstallAppClient);
22
- execute({ environmentKey, site, product }: TriggerAppSiteInstallDetails): Promise<{
23
- installationId: string;
24
- appName: string;
25
- }>;
19
+ execute({ environmentKey, site, product }: TriggerAppSiteInstallDetails): Promise<void>;
26
20
  }
27
21
  //# sourceMappingURL=install-app-site.d.ts.map
@@ -1 +1 @@
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,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC3F;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;;;;CAWrF"}
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"}
@@ -7,14 +7,13 @@ class InstallAppSiteCommand {
7
7
  this.installAppClient = installAppClient;
8
8
  }
9
9
  async execute({ environmentKey, site, product }) {
10
- const { id: appId, name: appName } = await this.getAppConfig();
11
- const result = await this.installAppClient.installAppIntoSite({
10
+ const { id: appId } = await this.getAppConfig();
11
+ return await this.installAppClient.installAppIntoSite({
12
12
  appId,
13
13
  environmentKey,
14
14
  site,
15
15
  product
16
16
  });
17
- return Object.assign({ appName }, result);
18
17
  }
19
18
  }
20
19
  exports.InstallAppSiteCommand = InstallAppSiteCommand;
@@ -2,7 +2,6 @@ import { AppConfigProvider } from '@forge/cli-shared';
2
2
  import { AppUninstallationInput } from '@forge/cli-shared';
3
3
  import { Installation } from '../service/installation-service';
4
4
  export interface UninstallAppOutput {
5
- appName: string;
6
5
  product: string;
7
6
  site: string;
8
7
  environmentKey: string;
@@ -1 +1 @@
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,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;IAa5D,YAAY,CACvB,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EAAE,CAAC;CA4BjC"}
@@ -7,11 +7,10 @@ class UninstallAppCommand {
7
7
  this.client = client;
8
8
  }
9
9
  async execute(installationId) {
10
- const { id: appId, name: appName } = await this.getAppConfig();
10
+ const { id: appId } = await this.getAppConfig();
11
11
  const { product, site, environmentKey } = await this.client.getInstallation(appId, installationId);
12
12
  const success = await this.client.uninstallApp({ appId, environmentKey, installationId, async: true });
13
13
  return {
14
- appName,
15
14
  product,
16
15
  site,
17
16
  environmentKey,
@@ -19,7 +18,7 @@ class UninstallAppCommand {
19
18
  };
20
19
  }
21
20
  async batchExecute(installationIds = [], installationInfos) {
22
- const { id: appId, name: appName } = await this.getAppConfig();
21
+ const { id: appId } = await this.getAppConfig();
23
22
  let appsInstallInfo;
24
23
  if (installationInfos && installationInfos.length) {
25
24
  appsInstallInfo = installationInfos;
@@ -34,7 +33,6 @@ class UninstallAppCommand {
34
33
  async: true
35
34
  })));
36
35
  return appsInstallInfo.map(({ product, site, environmentKey }, index) => ({
37
- appName,
38
36
  product,
39
37
  site,
40
38
  environmentKey,
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,55 @@
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;
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,12 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/providers/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAwB,MAAM,mBAAmB,CAAC;AAElF,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAC7C,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAExD,qBAAa,aAAc,YAAW,uBAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,iBAAiB,CAAC,OAAO,EAAE,kBAAkB;CA0C3D"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphqlClient = exports.MissingAppEnvironmentError = exports.MissingAppError = void 0;
4
+ const cli_shared_1 = require("@forge/cli-shared");
5
+ class MissingAppError extends Error {
6
+ }
7
+ exports.MissingAppError = MissingAppError;
8
+ class MissingAppEnvironmentError extends Error {
9
+ }
10
+ exports.MissingAppEnvironmentError = MissingAppEnvironmentError;
11
+ class GraphqlClient {
12
+ constructor(graphqlClient) {
13
+ this.graphqlClient = graphqlClient;
14
+ }
15
+ async configureProvider(details) {
16
+ const mutation = `
17
+ mutation forge_cli_setExternalAuthCredentials($input: SetExternalAuthCredentialsInput!) {
18
+ setExternalAuthCredentials(input: $input) {
19
+ success
20
+ errors {
21
+ message
22
+ extensions {
23
+ errorType
24
+ }
25
+ }
26
+ }
27
+ }
28
+ `;
29
+ const { response: { setExternalAuthCredentials: { success, errors } }, requestId } = await this.graphqlClient.mutate(mutation, {
30
+ input: {
31
+ environment: {
32
+ appId: details.appId,
33
+ key: details.environment
34
+ },
35
+ serviceKey: details.providerKey,
36
+ credentials: {
37
+ clientSecret: details.clientSecret
38
+ }
39
+ }
40
+ });
41
+ const error = cli_shared_1.getError(errors);
42
+ if (!success) {
43
+ throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
44
+ }
45
+ }
46
+ }
47
+ exports.GraphqlClient = GraphqlClient;
@@ -1,25 +1,26 @@
1
1
  /// <reference types="node" />
2
2
  import { AppConfigProvider, AppEnvironment } from '@forge/cli-shared';
3
- import { AppInstallSiteDetails } from '../installations/install-app-site';
4
3
  import { URL } from 'url';
4
+ import { AppInstallSiteDetails } from '../installations/install-app-site';
5
5
  export interface Installation {
6
6
  id: string;
7
7
  product: string;
8
8
  site: string;
9
9
  environmentKey: string;
10
+ context: string;
10
11
  version: {
11
12
  isLatest: boolean;
12
13
  };
13
14
  }
14
15
  export interface AppInstallation {
15
- name: string;
16
16
  installations: Installation[];
17
17
  }
18
- export interface AppUpgradeResult {
19
- installationId: string;
18
+ export interface AppEnvironmentVersionPermissions {
19
+ scopes: string[];
20
+ egressAddresses: string[];
20
21
  }
21
- export interface AlreadyUpgradedResult {
22
- alreadyUpdated: true;
22
+ export interface AppEnvironmentPermissions extends AppEnvironmentVersionPermissions {
23
+ addedScopes: string[];
23
24
  }
24
25
  interface InstallationFilterOptions {
25
26
  site?: string;
@@ -28,10 +29,10 @@ interface InstallationFilterOptions {
28
29
  }
29
30
  export interface ListAppInstallationsClient {
30
31
  listInstallations(appId: string): Promise<Installation[]>;
31
- getScopes(appId: string, environmentKey: string): Promise<AppEnvironment['scopes']>;
32
+ getVersions(appId: string, environmentKey: string, firstN: number): Promise<AppEnvironment['versions']>;
32
33
  }
33
34
  export interface UpgradeAppInstallationsClient {
34
- upgradeInstallation({ site, product, environmentKey, appId }: AppInstallSiteDetails): Promise<AppUpgradeResult>;
35
+ upgradeInstallation({ site, product, environmentKey, appId }: AppInstallSiteDetails): Promise<void>;
35
36
  }
36
37
  export declare class InstallationService {
37
38
  private readonly getAppConfig;
@@ -40,10 +41,11 @@ export declare class InstallationService {
40
41
  constructor(getAppConfig: AppConfigProvider, listInstallationsClient: ListAppInstallationsClient, upgradeAppInstallationsClient: UpgradeAppInstallationsClient);
41
42
  private filterInstallations;
42
43
  listAppInstallations(filter?: InstallationFilterOptions): Promise<AppInstallation>;
43
- listNonIdentityAppInstallations(filter?: InstallationFilterOptions): Promise<AppInstallation>;
44
+ listNonTechnicalAppInstallations(filter?: InstallationFilterOptions): Promise<AppInstallation>;
44
45
  hasOutdatedProductInstallation(environment: string): Promise<boolean>;
45
- upgradeInstallation(site: URL, product: string, environmentKey: string, appId: string): Promise<AppUpgradeResult | AlreadyUpgradedResult>;
46
- getScopes(appId: string, environmentKey: string): Promise<string[] | null | undefined>;
46
+ upgradeInstallation(site: URL, product: string, environmentKey: string, appId: string): Promise<boolean>;
47
+ private getPermissionsFromAppEnvironmentVersion;
48
+ getAppEnvironmentPermissions(appId: string, environmentKey: string): Promise<AppEnvironmentPermissions | undefined>;
47
49
  }
48
50
  export {};
49
51
  //# sourceMappingURL=installation-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installation-service.d.ts","sourceRoot":"","sources":["../../src/service/installation-service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EAKjB,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EA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,+BAA+B,CAAC,MAAM,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,eAAe,CAAC;IAM7F,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAOrE,mBAAmB,CAC9B,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,gBAAgB,GAAG,qBAAqB,CAAC;IAqBvC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;CAG7D"}
1
+ {"version":3,"file":"installation-service.d.ts","sourceRoot":"","sources":["../../src/service/installation-service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,EAQf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IACjF,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,UAAU,yBAAyB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAChC,WAAW,CAAC,E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