@forge/cli 6.3.0-next.4 → 6.3.0-next.6

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,25 @@
1
1
  # @forge/cli
2
2
 
3
+ ## 6.3.0-next.6
4
+
5
+ ### Minor Changes
6
+
7
+ - 814c1f16: Add 'contributors list' command to forge-cli for MUAO EAP Participants
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [814c1f16]
12
+ - @forge/cli-shared@3.4.0-next.3
13
+ - @forge/bundler@4.1.0-next.5
14
+ - @forge/lint@3.2.11-next.3
15
+
16
+ ## 6.3.0-next.5
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [05fb30c1]
21
+ - @forge/bundler@4.1.0-next.4
22
+
3
23
  ## 6.3.0-next.4
4
24
 
5
25
  ### Patch Changes
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "6.3.0-next.4",
3
+ "version": "6.3.0-next.6",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "6.3.0-next.4",
9
+ "version": "6.3.0-next.6",
10
10
  "hasInstallScript": true,
11
11
  "license": "UNLICENSED",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.1.0-next.3",
14
- "@forge/cli-shared": "3.4.0-next.2",
13
+ "@forge/bundler": "4.1.0-next.5",
14
+ "@forge/cli-shared": "3.4.0-next.3",
15
15
  "@forge/egress": "^1.1.1",
16
- "@forge/lint": "3.2.11-next.2",
16
+ "@forge/lint": "3.2.11-next.3",
17
17
  "@forge/manifest": "4.5.2-next.0",
18
18
  "@forge/util": "1.2.0",
19
19
  "ajv": "^6.12.5",
@@ -653,9 +653,9 @@
653
653
  "integrity": "sha512-+GFtFqBhFzwKaKmeEfw1jWQgZJNX4q11CCx1fSPFJB49Fdjb7k3lx74jAyzHlX0UWnm6DMK+/cYT7j5t6G9LfA=="
654
654
  },
655
655
  "node_modules/@forge/bundler": {
656
- "version": "4.1.0-next.3",
657
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.1.0-next.3.tgz",
658
- "integrity": "sha512-OhnIZTmkRWU+agMJz8D3XT1rDpZt64iWs6nq063mDjPk0t52T8fHal9ZjM2H0lnALvE5I+xSKGPKo0f9KRSznw==",
656
+ "version": "4.1.0-next.5",
657
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.1.0-next.5.tgz",
658
+ "integrity": "sha512-UeVKEi2JJOkAgSznrrSA70k9ingKN45IogeKSTBdOHZ19NnN4K4zC4g6BZbeswRNnCX7m8EJzGldvvqROlukoQ==",
659
659
  "dependencies": {
660
660
  "@babel/core": "^7.16.7",
661
661
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -665,8 +665,8 @@
665
665
  "@babel/preset-typescript": "^7.16.7",
666
666
  "@forge/api": "2.9.0-next.0",
667
667
  "@forge/babel-plugin-transform-ui": "1.1.0",
668
- "@forge/cli-shared": "3.4.0-next.2",
669
- "@forge/lint": "3.2.11-next.2",
668
+ "@forge/cli-shared": "3.4.0-next.3",
669
+ "@forge/lint": "3.2.11-next.3",
670
670
  "assert": "^1.1.1",
671
671
  "babel-loader": "^8.2.3",
672
672
  "browserify-zlib": "^0.2.0",
@@ -711,9 +711,9 @@
711
711
  }
712
712
  },
713
713
  "node_modules/@forge/cli-shared": {
714
- "version": "3.4.0-next.2",
715
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.4.0-next.2.tgz",
716
- "integrity": "sha512-n1y+NafT2mKZVaclPcbkPA2+r2DqEtOO4P8jI5g3qykDVYy4plDR48UwIEtRr/o1Buz7c3jPIWEW/WEtuKclxg==",
714
+ "version": "3.4.0-next.3",
715
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.4.0-next.3.tgz",
716
+ "integrity": "sha512-/OmyBPl7Fvdd+1yZ5jP2EYyFnzoUcPs7sheuHS6b/fsmr7Mgz/kTWTNMxhRDhO4OiZF/qKkaV2BRCzXPBl8awA==",
717
717
  "dependencies": {
718
718
  "@forge/manifest": "4.5.2-next.0",
719
719
  "@forge/util": "1.2.0",
@@ -756,11 +756,11 @@
756
756
  }
757
757
  },
758
758
  "node_modules/@forge/lint": {
759
- "version": "3.2.11-next.2",
760
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.11-next.2.tgz",
761
- "integrity": "sha512-ghLUd2lSdXgPFI0LIF/QZhDYR/bzi+bo8GXUW30OTuqtfdMs94+mmPOeCw44Y7FwlPNGpPqh/CEALzKj9ILqQg==",
759
+ "version": "3.2.11-next.3",
760
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.11-next.3.tgz",
761
+ "integrity": "sha512-hwxOYgx5tdMds9o46Jb4/39c+7gLMdVV+DhQUHeOPwl20TVxq5t0PeK6eyDHjEwLRvPZHtZbb3Cf1XqDJhSmzg==",
762
762
  "dependencies": {
763
- "@forge/cli-shared": "3.4.0-next.2",
763
+ "@forge/cli-shared": "3.4.0-next.3",
764
764
  "@forge/egress": "^1.1.1",
765
765
  "@forge/manifest": "4.5.2-next.0",
766
766
  "@typescript-eslint/typescript-estree": "^5.40.0",
@@ -7794,9 +7794,9 @@
7794
7794
  "integrity": "sha512-+GFtFqBhFzwKaKmeEfw1jWQgZJNX4q11CCx1fSPFJB49Fdjb7k3lx74jAyzHlX0UWnm6DMK+/cYT7j5t6G9LfA=="
7795
7795
  },
7796
7796
  "@forge/bundler": {
7797
- "version": "4.1.0-next.3",
7798
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.1.0-next.3.tgz",
7799
- "integrity": "sha512-OhnIZTmkRWU+agMJz8D3XT1rDpZt64iWs6nq063mDjPk0t52T8fHal9ZjM2H0lnALvE5I+xSKGPKo0f9KRSznw==",
7797
+ "version": "4.1.0-next.5",
7798
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.1.0-next.5.tgz",
7799
+ "integrity": "sha512-UeVKEi2JJOkAgSznrrSA70k9ingKN45IogeKSTBdOHZ19NnN4K4zC4g6BZbeswRNnCX7m8EJzGldvvqROlukoQ==",
7800
7800
  "requires": {
7801
7801
  "@babel/core": "^7.16.7",
7802
7802
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -7806,8 +7806,8 @@
7806
7806
  "@babel/preset-typescript": "^7.16.7",
7807
7807
  "@forge/api": "2.9.0-next.0",
7808
7808
  "@forge/babel-plugin-transform-ui": "1.1.0",
7809
- "@forge/cli-shared": "3.4.0-next.2",
7810
- "@forge/lint": "3.2.11-next.2",
7809
+ "@forge/cli-shared": "3.4.0-next.3",
7810
+ "@forge/lint": "3.2.11-next.3",
7811
7811
  "assert": "^1.1.1",
7812
7812
  "babel-loader": "^8.2.3",
7813
7813
  "browserify-zlib": "^0.2.0",
@@ -7851,9 +7851,9 @@
7851
7851
  }
7852
7852
  },
7853
7853
  "@forge/cli-shared": {
7854
- "version": "3.4.0-next.2",
7855
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.4.0-next.2.tgz",
7856
- "integrity": "sha512-n1y+NafT2mKZVaclPcbkPA2+r2DqEtOO4P8jI5g3qykDVYy4plDR48UwIEtRr/o1Buz7c3jPIWEW/WEtuKclxg==",
7854
+ "version": "3.4.0-next.3",
7855
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-3.4.0-next.3.tgz",
7856
+ "integrity": "sha512-/OmyBPl7Fvdd+1yZ5jP2EYyFnzoUcPs7sheuHS6b/fsmr7Mgz/kTWTNMxhRDhO4OiZF/qKkaV2BRCzXPBl8awA==",
7857
7857
  "requires": {
7858
7858
  "@forge/manifest": "4.5.2-next.0",
7859
7859
  "@forge/util": "1.2.0",
@@ -7896,11 +7896,11 @@
7896
7896
  }
7897
7897
  },
7898
7898
  "@forge/lint": {
7899
- "version": "3.2.11-next.2",
7900
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.11-next.2.tgz",
7901
- "integrity": "sha512-ghLUd2lSdXgPFI0LIF/QZhDYR/bzi+bo8GXUW30OTuqtfdMs94+mmPOeCw44Y7FwlPNGpPqh/CEALzKj9ILqQg==",
7899
+ "version": "3.2.11-next.3",
7900
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-3.2.11-next.3.tgz",
7901
+ "integrity": "sha512-hwxOYgx5tdMds9o46Jb4/39c+7gLMdVV+DhQUHeOPwl20TVxq5t0PeK6eyDHjEwLRvPZHtZbb3Cf1XqDJhSmzg==",
7902
7902
  "requires": {
7903
- "@forge/cli-shared": "3.4.0-next.2",
7903
+ "@forge/cli-shared": "3.4.0-next.3",
7904
7904
  "@forge/egress": "^1.1.1",
7905
7905
  "@forge/manifest": "4.5.2-next.0",
7906
7906
  "@typescript-eslint/typescript-estree": "^5.40.0",
@@ -6,6 +6,7 @@ import { ListEnvironmentVariablesCommand } from '../environment-variables/list-e
6
6
  import { SetEnvironmentVariableCommand } from '../environment-variables/set-environment-variable';
7
7
  import { ConfigureProviderCommand } from '../providers/configure-provider';
8
8
  import { AddContributorCommand } from '../contributors/add-contributor';
9
+ import { ListContributorsCommand } from '../contributors/list-contributors';
9
10
  import { InstallAppSiteCommand } from '../installations/install-app-site';
10
11
  import { UninstallAppCommand } from '../installations/uninstall-app';
11
12
  import { InstallationService } from '../service/installation-service';
@@ -44,6 +45,7 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
44
45
  listEnvironmentVariablesCommand: ListEnvironmentVariablesCommand;
45
46
  configureProviderCommand: ConfigureProviderCommand;
46
47
  addContributorCommand: AddContributorCommand;
48
+ listContributorCommand: ListContributorsCommand;
47
49
  viewAppLogsCommand: ViewAppLogsCommand;
48
50
  getWebTriggerURLCommand: GetWebTriggerURLCommand;
49
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency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
  const configure_provider_1 = require("../providers/configure-provider");
16
16
  const graphql_client_3 = require("../providers/graphql-client");
17
17
  const add_contributor_1 = require("../contributors/add-contributor");
18
+ const list_contributors_1 = require("../contributors/list-contributors");
18
19
  const graphql_client_4 = require("../contributors/graphql-client");
19
20
  const graphql_client_5 = require("../installations/graphql-client");
20
21
  const site_translation_1 = require("../installations/site-translation");
@@ -109,6 +110,7 @@ const getDependencies = async (cliDetails) => {
109
110
  const configureProviderCommand = new configure_provider_1.ConfigureProviderCommand(providerClient, assertiveAppConfigReader);
110
111
  const contributorClient = new graphql_client_4.GraphqlClient(graphQLClient);
111
112
  const addContributorCommand = new add_contributor_1.AddContributorCommand(contributorClient, assertiveAppConfigReader);
113
+ const listContributorCommand = new list_contributors_1.ListContributorsCommand(contributorClient, assertiveAppConfigReader);
112
114
  const migrationKeysClient = new graphql_client_2.GraphqlClient(graphQLClient);
113
115
  const migrationKeysService = new migration_keys_service_1.MigrationKeysService(migrationKeysClient, assertiveAppConfigReader);
114
116
  const appEnvironmentClient = new cli_shared_1.AppEnvironmentsGraphqlClient(graphQLClient);
@@ -177,6 +179,7 @@ const getDependencies = async (cliDetails) => {
177
179
  listEnvironmentVariablesCommand,
178
180
  configureProviderCommand,
179
181
  addContributorCommand,
182
+ listContributorCommand,
180
183
  viewAppLogsCommand,
181
184
  getWebTriggerURLCommand
182
185
  },
@@ -1 +1 @@
1
- {"version":3,"file":"register-contributors-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-contributors-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA6CtD,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAErD,CAAC"}
1
+ {"version":3,"file":"register-contributors-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-contributors-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqFtD,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAMrD,CAAC"}
@@ -2,10 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.registerCommands = void 0;
4
4
  const cli_shared_1 = require("@forge/cli-shared");
5
- const registerAddContributorCommand = ({ cmd, ui, commands: { addContributorCommand } }) => {
6
- cmd
7
- .command('contributors')
8
- .description(cli_shared_1.Text.contributors.desc)
5
+ const COMMAND_NAME = 'contributors';
6
+ const registerAddContributorCommand = (parent, { ui, commands: { addContributorCommand } }) => {
7
+ parent
9
8
  .command('add')
10
9
  .requireAppId()
11
10
  .description(cli_shared_1.Text.addContributor.cmd.desc)
@@ -37,7 +36,39 @@ const registerAddContributorCommand = ({ cmd, ui, commands: { addContributorComm
37
36
  }
38
37
  });
39
38
  };
39
+ const registerListContributorsCommand = (parent, { ui, commands: { listContributorCommand } }) => {
40
+ parent
41
+ .command('list')
42
+ .requireAppId()
43
+ .description(cli_shared_1.Text.listContributors.cmd.desc)
44
+ .action(async () => {
45
+ const contributors = await listContributorCommand.execute();
46
+ ui.table([
47
+ ['name', 'Name'],
48
+ ['email', 'Email']
49
+ ], contributors.map((contributor) => {
50
+ var _a;
51
+ const name = [contributor.publicName];
52
+ if (contributor.isOwner) {
53
+ name.push(cli_shared_1.Text.listContributors.appOwner);
54
+ }
55
+ if (contributor.accountStatus !== 'active') {
56
+ name.push(cli_shared_1.Text.listContributors.userInactive);
57
+ }
58
+ return {
59
+ name: name.join(' '),
60
+ email: (_a = contributor.email) !== null && _a !== void 0 ? _a : 'Email Not Visible'
61
+ };
62
+ }), {
63
+ emptyMessage: cli_shared_1.Text.listContributors.noContributors,
64
+ preMessage: cli_shared_1.Text.listContributors.banner
65
+ });
66
+ });
67
+ };
40
68
  const registerCommands = (deps) => {
41
- registerAddContributorCommand(deps);
69
+ const { cmd } = deps;
70
+ const contributors = cmd.command(COMMAND_NAME).description(cli_shared_1.Text.contributors.desc);
71
+ registerAddContributorCommand(contributors, deps);
72
+ registerListContributorsCommand(contributors, deps);
42
73
  };
43
74
  exports.registerCommands = registerCommands;
@@ -1,8 +1,12 @@
1
1
  import { GraphQLClient } from '@forge/cli-shared';
2
2
  import { AppContributorDetails, AddContributorClient } from './add-contributor';
3
- export declare class GraphqlClient implements AddContributorClient {
3
+ import { Contributor, ListContributorsClient } from './list-contributors';
4
+ export declare class MissingAppContributors extends Error {
5
+ }
6
+ export declare class GraphqlClient implements AddContributorClient, ListContributorsClient {
4
7
  private readonly graphqlClient;
5
8
  constructor(graphqlClient: GraphQLClient);
6
9
  addContributor(details: AppContributorDetails): Promise<void>;
10
+ listContributors(appId: string): Promise<Contributor[]>;
7
11
  }
8
12
  //# sourceMappingURL=graphql-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/contributors/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,aAAa,EAAwB,MAAM,mBAAmB,CAAC;AAEtG,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,qBAAa,aAAc,YAAW,oBAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,cAAc,CAAC,OAAO,EAAE,qBAAqB;CA2C3D"}
1
+ {"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/contributors/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,aAAa,EAA8B,MAAM,mBAAmB,CAAC;AAE5G,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,aAAc,YAAW,oBAAoB,EAAE,sBAAsB;IACpE,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,cAAc,CAAC,OAAO,EAAE,qBAAqB;IA4C7C,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CA6BrE"}
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GraphqlClient = void 0;
3
+ exports.GraphqlClient = exports.MissingAppContributors = void 0;
4
4
  const cli_shared_1 = require("@forge/cli-shared");
5
+ class MissingAppContributors extends Error {
6
+ }
7
+ exports.MissingAppContributors = MissingAppContributors;
5
8
  class GraphqlClient {
6
9
  constructor(graphqlClient) {
7
10
  this.graphqlClient = graphqlClient;
@@ -39,5 +42,31 @@ class GraphqlClient {
39
42
  throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
40
43
  }
41
44
  }
45
+ async listContributors(appId) {
46
+ const query = `
47
+ query forge_cli_listContributors($id: ID!) {
48
+ appContributors(id: $id) {
49
+ accountId
50
+ email
51
+ status
52
+ isOwner
53
+ publicName
54
+ }
55
+ }
56
+ `;
57
+ const { appContributors } = await this.graphqlClient.query(query, {
58
+ id: appId
59
+ });
60
+ if (!appContributors) {
61
+ throw new MissingAppContributors(cli_shared_1.Text.listContributors.missingAppContributors);
62
+ }
63
+ return appContributors.map((contributor) => ({
64
+ accountId: contributor.accountId,
65
+ email: contributor.email,
66
+ isOwner: contributor.isOwner,
67
+ publicName: contributor.publicName,
68
+ accountStatus: contributor.status
69
+ }));
70
+ }
42
71
  }
43
72
  exports.GraphqlClient = GraphqlClient;
@@ -0,0 +1,18 @@
1
+ import { AppConfigProvider } from '@forge/cli-shared';
2
+ export interface Contributor {
3
+ accountId: string;
4
+ email?: string | null;
5
+ accountStatus: string;
6
+ publicName: string;
7
+ isOwner?: boolean | null;
8
+ }
9
+ export interface ListContributorsClient {
10
+ listContributors(appId: string): Promise<Contributor[]>;
11
+ }
12
+ export declare class ListContributorsCommand {
13
+ private readonly client;
14
+ private readonly getAppConfig;
15
+ constructor(client: ListContributorsClient, getAppConfig: AppConfigProvider);
16
+ execute(): Promise<Contributor[]>;
17
+ }
18
+ //# sourceMappingURL=list-contributors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-contributors.d.ts","sourceRoot":"","sources":["../../src/contributors/list-contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CACzD;AAED,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA0B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAA7D,MAAM,EAAE,sBAAsB,EAAmB,YAAY,EAAE,iBAAiB;IAEhG,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;CAI/C"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListContributorsCommand = void 0;
4
+ class ListContributorsCommand {
5
+ constructor(client, getAppConfig) {
6
+ this.client = client;
7
+ this.getAppConfig = getAppConfig;
8
+ }
9
+ async execute() {
10
+ const { id: appId } = await this.getAppConfig();
11
+ return await this.client.listContributors(appId);
12
+ }
13
+ }
14
+ exports.ListContributorsCommand = ListContributorsCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "6.3.0-next.4",
3
+ "version": "6.3.0-next.6",
4
4
  "description": "A command line interface for managing Atlassian-hosted apps",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -18,10 +18,10 @@
18
18
  "postinstall": "node -e \"process.exitCode = fs.existsSync('./out/bin/postinstall.js')\" || node ./out/bin/postinstall.js"
19
19
  },
20
20
  "dependencies": {
21
- "@forge/bundler": "4.1.0-next.3",
22
- "@forge/cli-shared": "3.4.0-next.2",
21
+ "@forge/bundler": "4.1.0-next.5",
22
+ "@forge/cli-shared": "3.4.0-next.3",
23
23
  "@forge/egress": "^1.1.1",
24
- "@forge/lint": "3.2.11-next.2",
24
+ "@forge/lint": "3.2.11-next.3",
25
25
  "@forge/manifest": "4.5.2-next.0",
26
26
  "@forge/util": "1.2.0",
27
27
  "ajv": "^6.12.5",