@forge/cli-shared 3.11.3-next.3 → 3.12.0-experimental-5ec0ed7

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 3.12.0-experimental-5ec0ed7
4
+
5
+ ### Minor Changes
6
+
7
+ - 5fc7847: Use default environment from forge settings
8
+
9
+ ## 3.12.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0449769b: Add default-environment to forge settings
14
+ - d94f614e: Added UI Kit 2 option to create app CLI command behind feature flag
15
+
16
+ ### Patch Changes
17
+
18
+ - 5eff9d5f: Adding additional error message (in the case of app installations failure) during forge deploy command
19
+ - Updated dependencies [7dd1550b]
20
+ - Updated dependencies [aa9b9754]
21
+ - Updated dependencies [83eb996c]
22
+ - Updated dependencies [08c6f1a8]
23
+ - Updated dependencies [05d6c05e]
24
+ - @forge/manifest@4.13.0
25
+
26
+ ## 3.12.0-next.7
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [aa9b9754]
31
+ - @forge/manifest@4.13.0-next.4
32
+
33
+ ## 3.12.0-next.6
34
+
35
+ ### Minor Changes
36
+
37
+ - d94f614e: Added UI Kit 2 option to create app CLI command behind feature flag
38
+
39
+ ## 3.12.0-next.5
40
+
41
+ ### Minor Changes
42
+
43
+ - 0449769b: Add default-environment to forge settings
44
+
45
+ ## 3.11.3-next.4
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [83eb996c]
50
+ - @forge/manifest@4.13.0-next.3
51
+
3
52
  ## 3.11.3-next.3
4
53
 
5
54
  ### Patch Changes
@@ -0,0 +1,13 @@
1
+ import { GraphQLClient, User } from '../graphql';
2
+ import { AppConfigProvider } from './app-config';
3
+ export declare class MissingAppOwnerError extends Error {
4
+ constructor();
5
+ }
6
+ export declare class GetAppOwnerQuery {
7
+ private readonly graphqlClient;
8
+ private readonly getAppConfig;
9
+ constructor(graphqlClient: GraphQLClient, getAppConfig: AppConfigProvider);
10
+ execute(): Promise<User>;
11
+ private getAppOwner;
12
+ }
13
+ //# sourceMappingURL=get-app-owner.d.ts.map
@@ -0,0 +1 @@
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;IACf,OAAO,CAAC,QAAQ,CAAC,aAAa;IAAiB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAA3D,aAAa,EAAE,aAAa,EAAmB,YAAY,EAAE,iBAAiB;IAE9F,OAAO;YAMN,WAAW;CA0B1B"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAppOwnerQuery = exports.MissingAppOwnerError = void 0;
4
+ const graphql_1 = require("../graphql");
5
+ const ui_1 = require("../ui");
6
+ class MissingAppOwnerError extends Error {
7
+ constructor() {
8
+ super(ui_1.Text.env.error.appOwnerNotExist);
9
+ }
10
+ }
11
+ exports.MissingAppOwnerError = MissingAppOwnerError;
12
+ class GetAppOwnerQuery {
13
+ constructor(graphqlClient, getAppConfig) {
14
+ this.graphqlClient = graphqlClient;
15
+ this.getAppConfig = getAppConfig;
16
+ }
17
+ async execute() {
18
+ const { id: appId } = await this.getAppConfig();
19
+ return this.getAppOwner(appId);
20
+ }
21
+ async getAppOwner(appId) {
22
+ const query = `
23
+ query forge_cli_getAppOwner($id: ID!) {
24
+ app(id: $id) {
25
+ createdBy {
26
+ name
27
+ accountId
28
+ }
29
+ }
30
+ }
31
+ `;
32
+ const { app } = await this.graphqlClient.query(query, {
33
+ id: appId
34
+ });
35
+ if (!app) {
36
+ throw new graphql_1.MissingAppError();
37
+ }
38
+ if (!app.createdBy) {
39
+ throw new MissingAppOwnerError();
40
+ }
41
+ return app.createdBy;
42
+ }
43
+ }
44
+ exports.GetAppOwnerQuery = GetAppOwnerQuery;
@@ -5,4 +5,5 @@ export * from './package-installer';
5
5
  export * from './register-app';
6
6
  export * from './sites';
7
7
  export * from './template';
8
+ export * from './get-app-owner';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/apps/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
package/out/apps/index.js CHANGED
@@ -8,3 +8,4 @@ tslib_1.__exportStar(require("./package-installer"), exports);
8
8
  tslib_1.__exportStar(require("./register-app"), exports);
9
9
  tslib_1.__exportStar(require("./sites"), exports);
10
10
  tslib_1.__exportStar(require("./template"), exports);
11
+ tslib_1.__exportStar(require("./get-app-owner"), exports);
@@ -1 +1 @@
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;AAGrD,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;CACxB;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;CACxB;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"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppEnvironmentsGraphqlClient = exports.MissingAppEnvironmentError = exports.MissingAppError = void 0;
4
4
  const ui_1 = require("../ui");
5
5
  const error_handling_1 = require("../shared/error-handling");
6
- const environment_1 = require("../shared/environment");
7
6
  class MissingAppError extends error_handling_1.UserError {
8
7
  constructor() {
9
8
  super(ui_1.Text.env.error.appNotExist);
@@ -12,7 +11,7 @@ class MissingAppError extends error_handling_1.UserError {
12
11
  exports.MissingAppError = MissingAppError;
13
12
  class MissingAppEnvironmentError extends error_handling_1.UserError {
14
13
  constructor(envKey) {
15
- super(ui_1.Text.env.error.envNotExist(envKey, environment_1.environmentToOption));
14
+ super(ui_1.Text.env.error.envNotExist(envKey));
16
15
  }
17
16
  }
18
17
  exports.MissingAppEnvironmentError = MissingAppEnvironmentError;