@forge/cli-shared 9.7.0-next.14-experimental-fd0ebbc → 9.7.0-next.15-experimental-554d417

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 (52) hide show
  1. package/CHANGELOG.md +11 -3
  2. package/out/app-logs/graphql-client.d.ts.map +1 -1
  3. package/out/app-logs/graphql-client.js +27 -29
  4. package/out/apps/create-app-graphql-client.d.ts.map +1 -1
  5. package/out/apps/create-app-graphql-client.js +3 -4
  6. package/out/apps/get-app-owner.d.ts +2 -17
  7. package/out/apps/get-app-owner.d.ts.map +1 -1
  8. package/out/apps/get-app-owner.js +12 -12
  9. package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
  10. package/out/auth/personal/me-graphql-client.js +2 -4
  11. package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
  12. package/out/graphql/app-environment-graphql-client.js +5 -6
  13. package/out/graphql/app-oauth-client-id-graphql-client.d.ts.map +1 -1
  14. package/out/graphql/app-oauth-client-id-graphql-client.js +2 -3
  15. package/out/graphql/get-mutation-error.d.ts +2 -11
  16. package/out/graphql/get-mutation-error.d.ts.map +1 -1
  17. package/out/graphql/get-mutation-error.js +0 -8
  18. package/out/graphql/graphql-client.d.ts +8 -5
  19. package/out/graphql/graphql-client.d.ts.map +1 -1
  20. package/out/graphql/graphql-types.d.ts +262772 -0
  21. package/out/graphql/graphql-types.d.ts.map +1 -0
  22. package/out/graphql/graphql-types.js +21740 -0
  23. package/out/graphql/index.d.ts +1 -3
  24. package/out/graphql/index.d.ts.map +1 -1
  25. package/out/graphql/index.js +1 -5
  26. package/out/graphql/mutation-aware-graphql-client.d.ts +9 -4
  27. package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
  28. package/out/graphql/mutation-aware-graphql-client.js +10 -6
  29. package/out/shared/environment.d.ts +1 -1
  30. package/out/shared/environment.d.ts.map +1 -1
  31. package/out/shared/environment.js +4 -4
  32. package/out/ui/command-line-ui.d.ts.map +1 -1
  33. package/out/ui/command-line-ui.js +1 -0
  34. package/out/ui/text.d.ts +2 -1
  35. package/out/ui/text.d.ts.map +1 -1
  36. package/out/ui/text.js +3 -2
  37. package/package.json +4 -6
  38. package/out/graphql/gql/gql.d.ts +0 -78
  39. package/out/graphql/gql/gql.d.ts.map +0 -1
  40. package/out/graphql/gql/gql.js +0 -87
  41. package/out/graphql/gql/graphql.d.ts +0 -47392
  42. package/out/graphql/gql/graphql.d.ts.map +0 -1
  43. package/out/graphql/gql/graphql.js +0 -1457
  44. package/out/graphql/gql/index.d.ts +0 -2
  45. package/out/graphql/gql/index.d.ts.map +0 -1
  46. package/out/graphql/gql/index.js +0 -4
  47. package/out/graphql/graphql-domain-types.d.ts +0 -111
  48. package/out/graphql/graphql-domain-types.d.ts.map +0 -1
  49. package/out/graphql/graphql-domain-types.js +0 -2
  50. package/out/graphql/graphql-runtime-enums.d.ts +0 -82
  51. package/out/graphql/graphql-runtime-enums.d.ts.map +0 -1
  52. package/out/graphql/graphql-runtime-enums.js +0 -72
package/CHANGELOG.md CHANGED
@@ -1,11 +1,12 @@
1
1
  # @forge/cli-shared
2
2
 
3
- ## 9.7.0-next.14-experimental-fd0ebbc
3
+ ## 9.7.0-next.15-experimental-554d417
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - 82730f2: Added container services to version details tables, interactive property selection, version summaries, and comparison tables.
8
8
  - 9f27f8a: Update uninstall flow to improve user experience and support global apps
9
+ - cf81630: Wire up global apps installer into existing flow for EAP
9
10
  - a384019: Add identity client for listing orgs and units
10
11
  - 9d391ab: `forge show services` and `forge show containers` now read every placement the app is deployed to, by paginating the `appContainerServices` query instead of reading only the first placement. Both commands report which placement each service and container runs in, so a service deployed to more than one placement is no longer collapsed into a single row.
11
12
  - 988dff5: Replace the `--shard` option on the `forge show` commands with `--placement`, which takes a bare placement ID such as `ic-dr6` or `us-east-1`. The `appContainerServices` query now filters on `PLACEMENT` using a fully qualified `EcosystemAppPlacementAri`, with the placement type derived from the ID.
@@ -23,10 +24,17 @@
23
24
  - 93f4631: Improved artifact too large error messages to include limits
24
25
  - b77e195: Improved rendering performance for multiline tables, including `forge version compare`.
25
26
  - ea3b2ba: Implement error message for deployment failure due to exceededing file size for skill directory
26
- - 3e160b1: Generate GraphQL types from CLI `graphql()` documents with `@graphql-codegen/client-preset` and `onlyOperationTypes`. Stop star-exporting the 27MB gateway dump from `@forge/cli-shared`.
27
27
  - Updated dependencies [dc2caec]
28
+ - Updated dependencies [2d36913]
28
29
  - Updated dependencies [ce74751]
29
- - @forge/manifest@13.5.1-next.1-experimental-fd0ebbc
30
+ - @forge/manifest@13.6.0-next.2-experimental-554d417
31
+
32
+ ## 9.7.0-next.15
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [2d36913]
37
+ - @forge/manifest@13.6.0-next.2
30
38
 
31
39
  ## 9.7.0-next.14
32
40
 
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/app-logs/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,aAAa,EAEd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAwCrB,qBAAa,mBAAoB,SAAQ,KAAK;CAAG;AACjD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AACrD,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,qBAAa,iBAAkB,YAAW,iBAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,kBAAkB,CAAC,OAAO,EAAE,wBAAwB;;;;;;;IAapD,aAAa,CACxB,OAAO,EAAE,gBAAgB,EACzB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,sBAAsB,EAAE,UAAU,EAAE,EACpC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,UAAU,EAAE,CAAC;IA4IX,WAAW,CAAC,OAAO,EAAE,cAAc;IA4EhD,OAAO,CAAC,qBAAqB;IAe7B,OAAO,CAAC,eAAe;YAcT,iBAAiB;CAkDhC"}
1
+ {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/app-logs/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAwCrB,qBAAa,mBAAoB,SAAQ,KAAK;CAAG;AACjD,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AACrD,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,qBAAa,iBAAkB,YAAW,iBAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,kBAAkB,CAAC,OAAO,EAAE,wBAAwB;;;;;;;IAapD,aAAa,CACxB,OAAO,EAAE,gBAAgB,EACzB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACtC,sBAAsB,EAAE,UAAU,EAAE,EACpC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,UAAU,EAAE,CAAC;IA4IX,WAAW,CAAC,OAAO,EAAE,cAAc;IAwEhD,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,eAAe;YAcT,iBAAiB;CAqDhC"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LogsGraphQLClient = exports.MissingMetadataError = exports.MissingInvocationError = exports.MissingAppLogLinesError = exports.MissingAppLogsError = void 0;
4
- const graphql_1 = require("../graphql");
5
4
  const sanitizeLogLine = (line) => ({
6
5
  timestamp: line.timestamp,
7
6
  level: line.level || undefined,
@@ -51,14 +50,14 @@ class LogsGraphQLClient {
51
50
  };
52
51
  }
53
52
  async viewAppLogsV2(details, invocationMap, logLinesWithInvocation, totalRecieved) {
54
- const query = (0, graphql_1.graphql)(`
53
+ const query = `
55
54
  query forge_cli_getApplicationLogsV2(
56
- $appId: String!
57
- $environmentId: String!
58
- $dateSearchInput: DateSearchInput
59
- $offset: Int!
60
- $limit: Int!
61
- $queryStartTime: String!
55
+ $appId: String!,
56
+ $environmentId: String!,
57
+ $dateSearchInput: DateSearchInput,
58
+ $offset: Int!,
59
+ $limit: Int!,
60
+ $queryStartTime: String!,
62
61
  $runtime: String
63
62
  $functionKeys: [String]
64
63
  $containers: [String]
@@ -124,7 +123,7 @@ class LogsGraphQLClient {
124
123
  __typename
125
124
  }
126
125
  }
127
- `);
126
+ `;
128
127
  const result = await this.graphqlClient.query(query, details);
129
128
  if (!result || !result.appLogsWithMetaData || !result.appLogsWithMetaData.appLogs) {
130
129
  throw new MissingAppLogsError();
@@ -173,19 +172,18 @@ class LogsGraphQLClient {
173
172
  return details.grouped ? invocations : logLinesWithInvocation;
174
173
  }
175
174
  async viewAppLogs(details) {
176
- const query = (0, graphql_1.graphql)(`
177
- query forge_cli_getApplicationLogs(
178
- $appId: ID!
179
- $environmentId: [ID!]!
180
- $limit: Int!
181
- $contextAri: [ID!]
182
- $startTime: String
183
- ) {
175
+ const query = `
176
+ query forge_cli_getApplicationLogs($appId: ID!, $environmentId: [ID!]!, $limit: Int!, $contextAri: [ID!], $startTime: String) {
184
177
  appLogs(
185
- appId: $appId
186
- environmentId: $environmentId
187
- last: $limit
188
- query: { installationContexts: $contextAri, dates: { earliestStart: $startTime } }
178
+ appId: $appId,
179
+ environmentId: $environmentId,
180
+ last: $limit,
181
+ query: {
182
+ installationContexts: $contextAri,
183
+ dates: {
184
+ earliestStart: $startTime
185
+ }
186
+ }
189
187
  ) {
190
188
  nodes {
191
189
  id
@@ -213,11 +211,8 @@ class LogsGraphQLClient {
213
211
  }
214
212
  }
215
213
  }
216
- `);
217
- const result = await this.graphqlClient.query(query, {
218
- ...details,
219
- contextAri: details.contextAri?.map((ari) => String(ari))
220
- });
214
+ `;
215
+ const result = await this.graphqlClient.query(query, details);
221
216
  if (!result.appLogs || !result.appLogs.nodes) {
222
217
  throw new MissingAppLogsError();
223
218
  }
@@ -262,9 +257,12 @@ class LogsGraphQLClient {
262
257
  return { cursor, lines };
263
258
  }
264
259
  async getInvocationLogs(filter) {
265
- const query = (0, graphql_1.graphql)(`
260
+ const query = `
266
261
  query forge_cli_getInvocationLogs($invocationId: ID!, $after: String) {
267
- appLogLines(after: $after, invocation: $invocationId) {
262
+ appLogLines(
263
+ after: $after,
264
+ invocation: $invocationId
265
+ ) {
268
266
  metadata {
269
267
  id
270
268
  function {
@@ -289,7 +287,7 @@ class LogsGraphQLClient {
289
287
  }
290
288
  }
291
289
  }
292
- `);
290
+ `;
293
291
  const result = await this.graphqlClient.query(query, filter);
294
292
  if (!result.appLogLines) {
295
293
  throw new MissingAppLogLinesError();
@@ -1 +1 @@
1
- {"version":3,"file":"create-app-graphql-client.d.ts","sourceRoot":"","sources":["../../src/apps/create-app-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAyD,MAAM,YAAY,CAAC;AAG5G,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExF,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,qBAAa,sBAAuB,YAAW,eAAe;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,SAAS,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;CA0C9E"}
1
+ {"version":3,"file":"create-app-graphql-client.d.ts","sourceRoot":"","sources":["../../src/apps/create-app-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAA+C,MAAM,YAAY,CAAC;AAGlG,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAExF,qBAAa,oBAAqB,SAAQ,KAAK;CAAG;AAElD,qBAAa,sBAAuB,YAAW,eAAe;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,SAAS,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;CA8C9E"}
@@ -12,7 +12,7 @@ class CreateAppGraphQLClient {
12
12
  this.graphqlClient = graphqlClient;
13
13
  }
14
14
  async createApp(input) {
15
- const createAppQuery = (0, graphql_1.graphql)(`
15
+ const createAppQuery = `
16
16
  mutation forge_cli_createApplication($input: CreateAppInput!) {
17
17
  createApp(input: $input) {
18
18
  success
@@ -31,11 +31,10 @@ class CreateAppGraphQLClient {
31
31
  }
32
32
  }
33
33
  }
34
- `);
35
- const { response, requestId } = await this.graphqlClient.mutate(createAppQuery, {
34
+ `;
35
+ const { response: { createApp: { success, errors, app } }, requestId } = await this.graphqlClient.mutate(createAppQuery, {
36
36
  input
37
37
  });
38
- const { success, errors, app } = (0, graphql_1.requireMutationPayload)(response.createApp, requestId);
39
38
  const error = (0, graphql_1.getError)(errors);
40
39
  if (!success) {
41
40
  throw new graphql_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
@@ -1,28 +1,13 @@
1
- import { GraphQLClient } from '../graphql';
1
+ import { GraphQLClient, User } from '../graphql';
2
2
  import { AppConfigProvider } from './app-config';
3
3
  export declare class MissingAppOwnerError extends Error {
4
4
  constructor();
5
5
  }
6
- export declare const GET_APP_OWNER: import("../graphql/gql/graphql").TypedDocumentString<import("../graphql/gql/graphql").Forge_Cli_GetAppOwnerQuery, import("../graphql/gql/graphql").Exact<{
7
- id: import("../graphql/gql/graphql").Scalars["ID"]["input"];
8
- }>>;
9
6
  export declare class GetAppOwnerQuery {
10
7
  private readonly graphqlClient;
11
8
  private readonly getAppConfig;
12
9
  constructor(graphqlClient: GraphQLClient, getAppConfig: AppConfigProvider);
13
- execute(): Promise<{
14
- __typename?: "AppUser";
15
- name: string;
16
- accountId: string;
17
- } | {
18
- __typename?: "AtlassianAccountUser";
19
- name: string;
20
- accountId: string;
21
- } | {
22
- __typename?: "CustomerUser";
23
- name: string;
24
- accountId: string;
25
- }>;
10
+ execute(): Promise<User>;
26
11
  private getAppOwner;
27
12
  }
28
13
  //# sourceMappingURL=get-app-owner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-app-owner.d.ts","sourceRoot":"","sources":["../../src/apps/get-app-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,eAAO,MAAM,aAAa;QAuCw0qrG,8CAAc;GA9B92qrG,CAAC;AAEH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,iBAAiB;IAGrC,OAAO;;;;;;;;;;;;;YAMN,WAAW;CAe1B"}
1
+ {"version":3,"file":"get-app-owner.d.ts","sourceRoot":"","sources":["../../src/apps/get-app-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAiC,IAAI,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,iBAAiB;IAGrC,OAAO;YAMN,WAAW;CA0B1B"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetAppOwnerQuery = exports.GET_APP_OWNER = exports.MissingAppOwnerError = void 0;
3
+ exports.GetAppOwnerQuery = exports.MissingAppOwnerError = void 0;
4
4
  const graphql_1 = require("../graphql");
5
5
  const ui_1 = require("../ui");
6
6
  class MissingAppOwnerError extends Error {
@@ -9,16 +9,6 @@ class MissingAppOwnerError extends Error {
9
9
  }
10
10
  }
11
11
  exports.MissingAppOwnerError = MissingAppOwnerError;
12
- exports.GET_APP_OWNER = (0, graphql_1.graphql)(`
13
- query forge_cli_getAppOwner($id: ID!) {
14
- app(id: $id) {
15
- createdBy {
16
- name
17
- accountId
18
- }
19
- }
20
- }
21
- `);
22
12
  class GetAppOwnerQuery {
23
13
  graphqlClient;
24
14
  getAppConfig;
@@ -31,7 +21,17 @@ class GetAppOwnerQuery {
31
21
  return this.getAppOwner(appId);
32
22
  }
33
23
  async getAppOwner(appId) {
34
- const { app } = await this.graphqlClient.query(exports.GET_APP_OWNER, {
24
+ const query = `
25
+ query forge_cli_getAppOwner($id: ID!) {
26
+ app(id: $id) {
27
+ createdBy {
28
+ name
29
+ accountId
30
+ }
31
+ }
32
+ }
33
+ `;
34
+ const { app } = await this.graphqlClient.query(query, {
35
35
  id: appId
36
36
  });
37
37
  if (!app) {
@@ -1 +1 @@
1
- {"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAW,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AAEnD,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM;IAGpB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBtC"}
1
+ {"version":3,"file":"me-graphql-client.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/me-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,qBAAa,iBAAkB,SAAQ,SAAS;CAAG;AAEnD,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM;IAGpB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAwBtC"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MeGraphqlClient = exports.UserNotFoundError = void 0;
4
- const graphql_1 = require("../../graphql");
5
4
  const shared_1 = require("../../shared");
6
5
  const ui_1 = require("../../ui");
7
6
  class UserNotFoundError extends shared_1.UserError {
@@ -16,7 +15,7 @@ class MeGraphqlClient {
16
15
  }
17
16
  async getUser() {
18
17
  try {
19
- const query = (0, graphql_1.graphql)(`
18
+ const query = `
20
19
  query forge_cli_getUserDetails {
21
20
  me {
22
21
  user {
@@ -25,8 +24,7 @@ class MeGraphqlClient {
25
24
  accountId
26
25
  }
27
26
  }
28
- }
29
- `);
27
+ }`;
30
28
  const result = await this.graphqlClient.query(query, {});
31
29
  if (result.me.user && result.me.user.accountStatus === 'active') {
32
30
  return result.me.user;
@@ -1 +1 @@
1
- {"version":3,"file":"app-environment-graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/app-environment-graphql-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,qBAAa,eAAgB,SAAQ,SAAS;;CAI7C;AAED,qBAAa,0BAA2B,SAAQ,SAAS;gBAC3C,MAAM,EAAE,MAAM;CAG3B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,kBAAkB,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChF,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrG;AAED,qBAAa,4BAA6B,YAAW,oBAAoB;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA2B3E,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAiC9G"}
1
+ {"version":3,"file":"app-environment-graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/app-environment-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,qBAAa,eAAgB,SAAQ,SAAS;;CAI7C;AAED,qBAAa,0BAA2B,SAAQ,SAAS;gBAC3C,MAAM,EAAE,MAAM;CAG3B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,kBAAkB,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChF,wBAAwB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACrG;AAED,qBAAa,4BAA6B,YAAW,oBAAoB;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA2B3E,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAiC9G"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppEnvironmentsGraphqlClient = exports.MissingAppEnvironmentError = exports.MissingAppError = void 0;
4
- const gql_1 = require("./gql/gql");
5
4
  const ui_1 = require("../ui");
6
5
  const error_handling_1 = require("../shared/error-handling");
7
6
  class MissingAppError extends error_handling_1.UserError {
@@ -22,7 +21,7 @@ class AppEnvironmentsGraphqlClient {
22
21
  this.graphqlClient = graphqlClient;
23
22
  }
24
23
  async getAppEnvironmentId(appId, environmentKey) {
25
- const query = (0, gql_1.graphql)(`
24
+ const query = `
26
25
  query forge_cli_getApplicationEnvironmentId($id: ID!, $key: String!) {
27
26
  app(id: $id) {
28
27
  environmentByKey(key: $key) {
@@ -30,7 +29,7 @@ class AppEnvironmentsGraphqlClient {
30
29
  }
31
30
  }
32
31
  }
33
- `);
32
+ `;
34
33
  const result = await this.graphqlClient.query(query, {
35
34
  id: appId,
36
35
  key: environmentKey
@@ -44,8 +43,8 @@ class AppEnvironmentsGraphqlClient {
44
43
  return result.app.environmentByKey.id;
45
44
  }
46
45
  async getAppEnvironmentDetails(appAri, environmentKey) {
47
- const query = (0, gql_1.graphql)(`
48
- query forge_cli_getApplicationEnvironmentDetails($id: ID!, $key: String!) {
46
+ const query = `
47
+ query forge_cli_getApplicationEnvironmentId($id: ID!, $key: String!) {
49
48
  app(id: $id) {
50
49
  name
51
50
  environmentByKey(key: $key) {
@@ -54,7 +53,7 @@ class AppEnvironmentsGraphqlClient {
54
53
  }
55
54
  }
56
55
  }
57
- `);
56
+ `;
58
57
  const result = await this.graphqlClient.query(query, {
59
58
  id: appAri,
60
59
  key: environmentKey
@@ -1 +1 @@
1
- {"version":3,"file":"app-oauth-client-id-graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/app-oauth-client-id-graphql-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAA+C,MAAM,SAAS,CAAC;AAEzG,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,kBAAkB,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,0BAA0B,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACvG;AAED,qBAAa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAsChH"}
1
+ {"version":3,"file":"app-oauth-client-id-graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/app-oauth-client-id-graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAA+C,MAAM,SAAS,CAAC;AAEzG,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,kBAAkB,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,0BAA0B,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACvG;AAED,qBAAa,2BAA4B,YAAW,sBAAsB;IAC5D,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAsChH"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppOauthClientGraphqlClient = void 0;
4
- const gql_1 = require("./gql/gql");
5
4
  const index_1 = require("./index");
6
5
  class AppOauthClientGraphqlClient {
7
6
  graphqlClient;
@@ -9,7 +8,7 @@ class AppOauthClientGraphqlClient {
9
8
  this.graphqlClient = graphqlClient;
10
9
  }
11
10
  async getAppOauthClientIdDetails(appAri, environmentKey) {
12
- const query = (0, gql_1.graphql)(`
11
+ const query = `
13
12
  query forge_cli_getAppOauthClientIdDetails($id: ID!, $key: String!) {
14
13
  app(id: $id) {
15
14
  name
@@ -22,7 +21,7 @@ class AppOauthClientGraphqlClient {
22
21
  }
23
22
  }
24
23
  }
25
- `);
24
+ `;
26
25
  const result = await this.graphqlClient.query(query, {
27
26
  id: appAri,
28
27
  key: environmentKey
@@ -1,14 +1,5 @@
1
- export type MutationErrorExtension = {
2
- errorType?: string | null;
3
- statusCode?: number | null;
4
- };
5
- export type MutationError = {
6
- __typename?: 'MutationError';
7
- extensions?: MutationErrorExtension | null;
8
- message?: string | null;
9
- };
10
- export declare function requireMutationPayload<T>(value: T | null | undefined, requestId?: string): NonNullable<T>;
11
- export declare function getError(errors: MutationError[] | null | undefined): {
1
+ import { Maybe, MutationError } from './graphql-types';
2
+ export declare function getError(errors: Maybe<MutationError[]> | undefined): {
12
3
  code: string | undefined;
13
4
  message: string | undefined;
14
5
  statusCode: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"get-mutation-error.d.ts","sourceRoot":"","sources":["../../src/graphql/get-mutation-error.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,UAAU,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAKzG;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,GAAG,SAAS;;;;EAQlE"}
1
+ {"version":3,"file":"get-mutation-error.d.ts","sourceRoot":"","sources":["../../src/graphql/get-mutation-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEvD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,EAAE,CAAC,GAAG,SAAS;;;;EAQlE"}
@@ -1,14 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.requireMutationPayload = requireMutationPayload;
4
3
  exports.getError = getError;
5
- const mutation_aware_graphql_client_1 = require("./mutation-aware-graphql-client");
6
- function requireMutationPayload(value, requestId) {
7
- if (value == null) {
8
- throw new mutation_aware_graphql_client_1.GraphQlMutationError(`Unable to get a response (requestId: ${requestId || 'unknown'})`, { requestId });
9
- }
10
- return value;
11
- }
12
4
  function getError(errors) {
13
5
  const error = errors?.[0];
14
6
  return {
@@ -1,6 +1,8 @@
1
- import { TypedDocumentString, Variables } from 'graphql-request';
2
- export { TypedDocumentString, Variables };
3
- export type DocumentVariables<TDocument> = TDocument extends TypedDocumentString<unknown, infer TVariables> ? TVariables : never;
1
+ import { Variables } from 'graphql-request';
2
+ import { Mutation, Query } from './graphql-types';
3
+ export { Variables };
4
+ export type AvailableMutations = Omit<Mutation, '__typename'>;
5
+ export type AvailableQueries = Omit<Query, '__typename'>;
4
6
  export interface GatewayRequestIdGraphQLExtensions {
5
7
  gateway?: {
6
8
  request_id: string;
@@ -11,11 +13,12 @@ export interface RunnerResponse<TResponse, TExtensions = GatewayRequestIdGraphQL
11
13
  requestId?: string;
12
14
  extensions?: TExtensions;
13
15
  }
16
+ export type MutationResult<TLabel extends keyof AvailableMutations> = Record<TLabel, NonNullable<Required<AvailableMutations>[TLabel]>>;
14
17
  export interface GraphQLClient {
15
- query<TResult, TVariables extends Variables>(document: TypedDocumentString<TResult, TVariables>, variables: NoInfer<TVariables>): Promise<TResult & {
18
+ query<TLabel extends keyof AvailableQueries, TVariables extends Variables, TExtensions = GatewayRequestIdGraphQLExtensions>(query: string, variables: TVariables): Promise<Record<TLabel, AvailableQueries[TLabel]> & {
16
19
  requestId: string;
17
20
  }>;
18
- mutate<TResult, TVariables extends Variables, TExtensions = GatewayRequestIdGraphQLExtensions>(document: TypedDocumentString<TResult, TVariables>, variables: NoInfer<TVariables>): Promise<RunnerResponse<TResult, TExtensions>>;
21
+ mutate<TLabel extends keyof AvailableMutations, TVariables extends Variables, TExtensions = GatewayRequestIdGraphQLExtensions>(query: string, variables: TVariables): Promise<RunnerResponse<MutationResult<TLabel>, TExtensions>>;
19
22
  }
20
23
  export interface GraphQLRunner {
21
24
  run<TVariables extends Variables, TResponse, TExtensions = GatewayRequestIdGraphQLExtensions>(operation: string, variables: TVariables): Promise<RunnerResponse<TResponse, TExtensions>>;
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC;AAE1C,MAAM,MAAM,iBAAiB,CAAC,SAAS,IACrC,SAAS,SAAS,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAAU,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC;AAExF,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,cAAc,CAAC,SAAS,EAAE,WAAW,GAAG,iCAAiC;IACxF,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,OAAO,EAAE,UAAU,SAAS,SAAS,EACzC,QAAQ,EAAE,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,EAClD,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,GAC7B,OAAO,CAAC,OAAO,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5C,MAAM,CAAC,OAAO,EAAE,UAAU,SAAS,SAAS,EAAE,WAAW,GAAG,iCAAiC,EAC3F,QAAQ,EAAE,mBAAmB,CAAC,OAAO,EAAE,UAAU,CAAC,EAClD,SAAS,EAAE,OAAO,CAAC,UAAU,CAAC,GAC7B,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,UAAU,SAAS,SAAS,EAAE,SAAS,EAAE,WAAW,GAAG,iCAAiC,EAC1F,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;CACpD"}
1
+ {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/graphql/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AAEzD,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,cAAc,CAAC,SAAS,EAAE,WAAW,GAAG,iCAAiC;IACxF,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,MAAM,kBAAkB,IAAI,MAAM,CAC1E,MAAM,EACN,WAAW,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAClD,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,KAAK,CACH,MAAM,SAAS,MAAM,gBAAgB,EACrC,UAAU,SAAS,SAAS,EAC5B,WAAW,GAAG,iCAAiC,EAE/C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7E,MAAM,CACJ,MAAM,SAAS,MAAM,kBAAkB,EACvC,UAAU,SAAS,SAAS,EAC5B,WAAW,GAAG,iCAAiC,EAE/C,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,UAAU,SAAS,SAAS,EAAE,SAAS,EAAE,WAAW,GAAG,iCAAiC,EAC1F,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;CACpD"}