@forge/cli 11.3.0-next.27 → 11.3.0-next.32

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,56 @@
1
1
  # @forge/cli
2
2
 
3
+ ## 11.3.0-next.32
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7f46df4]
8
+ - @forge/bundler@4.22.0-next.29
9
+ - @forge/tunnel@5.10.1-next.30
10
+
11
+ ## 11.3.0-next.31
12
+
13
+ ### Patch Changes
14
+
15
+ - d0cb567: License Decoupling: removed agent license mode, added support for user-access license mode in cli
16
+ - Updated dependencies [d0cb567]
17
+ - @forge/cli-shared@6.8.0-next.27
18
+ - @forge/bundler@4.22.0-next.28
19
+ - @forge/lint@5.7.3-next.28
20
+ - @forge/tunnel@5.10.1-next.29
21
+
22
+ ## 11.3.0-next.30
23
+
24
+ ### Patch Changes
25
+
26
+ - 30779a6: Clean up shrinkwrap to support npm remote cache
27
+
28
+ ## 11.3.0-next.29
29
+
30
+ ### Minor Changes
31
+
32
+ - 2c0e151: Added new 'containers' command
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [2c0e151]
37
+ - @forge/cli-shared@6.8.0-next.26
38
+ - @forge/bundler@4.22.0-next.27
39
+ - @forge/lint@5.7.3-next.27
40
+ - @forge/tunnel@5.10.1-next.28
41
+
42
+ ## 11.3.0-next.28
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [2d5a0e6]
47
+ - Updated dependencies [99739ec]
48
+ - @forge/manifest@9.0.0-next.13
49
+ - @forge/bundler@4.22.0-next.26
50
+ - @forge/cli-shared@6.8.0-next.25
51
+ - @forge/lint@5.7.3-next.26
52
+ - @forge/tunnel@5.10.1-next.27
53
+
3
54
  ## 11.3.0-next.27
4
55
 
5
56
  ### Minor Changes
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "11.3.0-next.27",
3
+ "version": "11.3.0-next.32",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "11.3.0-next.27",
9
+ "version": "11.3.0-next.32",
10
10
  "hasInstallScript": true,
11
11
  "license": "SEE LICENSE IN LICENSE.txt",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.22.0-next.25",
14
- "@forge/cli-shared": "6.8.0-next.24",
13
+ "@forge/bundler": "4.22.0-next.29",
14
+ "@forge/cli-shared": "6.8.0-next.27",
15
15
  "@forge/egress": "1.4.0",
16
16
  "@forge/i18n": "0.0.5-next.1",
17
- "@forge/lint": "5.7.3-next.25",
18
- "@forge/manifest": "8.9.0-next.12",
17
+ "@forge/lint": "5.7.3-next.28",
18
+ "@forge/manifest": "9.0.0-next.13",
19
19
  "@forge/runtime": "5.10.7",
20
- "@forge/tunnel": "5.10.1-next.26",
20
+ "@forge/tunnel": "5.10.1-next.30",
21
21
  "@forge/util": "1.4.8",
22
22
  "@sentry/node": "7.106.0",
23
23
  "ajv": "^8.12.0",
@@ -834,9 +834,9 @@
834
834
  "license": "SEE LICENSE IN LICENSE.txt"
835
835
  },
836
836
  "node_modules/@forge/bundler": {
837
- "version": "4.22.0-next.25",
838
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.22.0-next.25.tgz",
839
- "integrity": "sha512-tZuRcnatSXUPEBdCrvt9VtNFRB8j0lUxKWDDl5UdR0C7h4WaMvJhI+9dmM6oeh9qc1ti6KmQHkNBWQwxbMotUw==",
837
+ "version": "4.22.0-next.29",
838
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.22.0-next.29.tgz",
839
+ "integrity": "sha512-ZEjvCGb74VhkIR1wsj1kmW2SI3gvLHvAeT7uSM+3I7jpMPEpEJSbvmlJnAMS2QsiRi7hjPvSU79g87k7j1PvWQ==",
840
840
  "license": "SEE LICENSE IN LICENSE.txt",
841
841
  "dependencies": {
842
842
  "@babel/core": "^7.24.0",
@@ -848,10 +848,10 @@
848
848
  "@babel/preset-typescript": "^7.23.3",
849
849
  "@forge/api": "5.2.0-next.1",
850
850
  "@forge/babel-plugin-transform-ui": "1.1.21",
851
- "@forge/cli-shared": "6.8.0-next.24",
851
+ "@forge/cli-shared": "6.8.0-next.27",
852
852
  "@forge/i18n": "0.0.5-next.1",
853
- "@forge/lint": "5.7.3-next.25",
854
- "@forge/manifest": "8.9.0-next.12",
853
+ "@forge/lint": "5.7.3-next.28",
854
+ "@forge/manifest": "9.0.0-next.13",
855
855
  "@forge/util": "1.4.8",
856
856
  "assert": "^2.1.0",
857
857
  "babel-loader": "^8.3.0",
@@ -922,13 +922,13 @@
922
922
  "license": "SEE LICENSE IN LICENSE.txt"
923
923
  },
924
924
  "node_modules/@forge/cli-shared": {
925
- "version": "6.8.0-next.24",
926
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.8.0-next.24.tgz",
927
- "integrity": "sha512-ak2vxaOJ1usjq4guFyFkFZMPvHqz/IciZMiAO67RNR0SfbXwd6ndLfWnPVfyF8VhMUxmsmjznM33GYiMe6hM1A==",
925
+ "version": "6.8.0-next.27",
926
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.8.0-next.27.tgz",
927
+ "integrity": "sha512-CIboMviwL8l6eIsKBJTbWsgrnEcIXwauNwmaxayWO5D8/URgpcvcR3HW46/fkbB/GGSBLatMVZel2/18AG//Cg==",
928
928
  "license": "SEE LICENSE IN LICENSE.txt",
929
929
  "dependencies": {
930
930
  "@forge/i18n": "0.0.5-next.1",
931
- "@forge/manifest": "8.9.0-next.12",
931
+ "@forge/manifest": "9.0.0-next.13",
932
932
  "@forge/util": "1.4.8",
933
933
  "@sentry/node": "7.106.0",
934
934
  "adm-zip": "^0.5.10",
@@ -989,15 +989,15 @@
989
989
  }
990
990
  },
991
991
  "node_modules/@forge/lint": {
992
- "version": "5.7.3-next.25",
993
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.25.tgz",
994
- "integrity": "sha512-n/cDpFjYvBalmFj6Rmqh4VGNqYTzZg0ROmHc0U3kO+NlI5+38orROGlgAn1YEIvYNvK3p2FtRH/afaAcB2sukg==",
992
+ "version": "5.7.3-next.28",
993
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.28.tgz",
994
+ "integrity": "sha512-PACJ/VbrkqLtQ1BeMK/buOJeHK3cTdtQGd8+qkuHYNGKz7G8OUkrQ9zQii6JzgsgyArZWTEOEcWqpqeOce1ZZw==",
995
995
  "license": "SEE LICENSE IN LICENSE.txt",
996
996
  "dependencies": {
997
- "@forge/cli-shared": "6.8.0-next.24",
997
+ "@forge/cli-shared": "6.8.0-next.27",
998
998
  "@forge/csp": "3.7.0-next.1",
999
999
  "@forge/egress": "1.4.0",
1000
- "@forge/manifest": "8.9.0-next.12",
1000
+ "@forge/manifest": "9.0.0-next.13",
1001
1001
  "@typescript-eslint/typescript-estree": "^5.62.0",
1002
1002
  "array.prototype.flatmap": "^1.3.2",
1003
1003
  "atlassian-openapi": "^1.0.18",
@@ -1006,9 +1006,9 @@
1006
1006
  }
1007
1007
  },
1008
1008
  "node_modules/@forge/manifest": {
1009
- "version": "8.9.0-next.12",
1010
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.9.0-next.12.tgz",
1011
- "integrity": "sha512-sJTcxxmKgojK628Q1w+iZzCOLIzUWcjBTLIqZHMyjXhKY2/oILRRbItDZt7+qEOHEbc74znUG8jyEXMPRDwf7Q==",
1009
+ "version": "9.0.0-next.13",
1010
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-9.0.0-next.13.tgz",
1011
+ "integrity": "sha512-8ObzesBSi4zm5rBPG3vqIef9X1nX+Q9OnwjLZX4ENs/oRXwLaSGU0p3MYhrCtfgNPj4Qs1wEq3EB9vbCtNjEUA==",
1012
1012
  "license": "SEE LICENSE IN LICENSE.txt",
1013
1013
  "dependencies": {
1014
1014
  "@forge/i18n": "0.0.5-next.1",
@@ -1039,13 +1039,13 @@
1039
1039
  }
1040
1040
  },
1041
1041
  "node_modules/@forge/tunnel": {
1042
- "version": "5.10.1-next.26",
1043
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.26.tgz",
1044
- "integrity": "sha512-2kbJIR0kwkjhWGtW/I4a2BdKJSV1alubMhVIo9yZbRtpzAjELL1gEvd+IVa5hGXFDsr3gqSaHOyX/op6xR7Fxg==",
1042
+ "version": "5.10.1-next.30",
1043
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.30.tgz",
1044
+ "integrity": "sha512-aC4JUQa9dK5pcZGcQ7BS5xI56biZ73YDm9/Py74Lh4uq99ksL3vmpowvqzMAnBY6XBKHpmald1VAJYce8XK7PQ==",
1045
1045
  "license": "SEE LICENSE IN LICENSE.txt",
1046
1046
  "dependencies": {
1047
- "@forge/bundler": "4.22.0-next.25",
1048
- "@forge/cli-shared": "6.8.0-next.24",
1047
+ "@forge/bundler": "4.22.0-next.29",
1048
+ "@forge/cli-shared": "6.8.0-next.27",
1049
1049
  "@forge/csp": "3.7.0-next.1",
1050
1050
  "@forge/runtime": "5.10.7",
1051
1051
  "chokidar": "^3.6.0",
@@ -326,11 +326,11 @@ class InstallController {
326
326
  }
327
327
  const ecosystemLicenseModes = new Set();
328
328
  for (const licenseMode of licenseModes) {
329
- const upperCaseLicenseMode = licenseMode.toUpperCase();
330
- if (!this.isValidLicenseMode(upperCaseLicenseMode)) {
329
+ const formattedLicenseMode = licenseMode.toUpperCase().replace('-', '_');
330
+ if (!this.isValidLicenseMode(formattedLicenseMode)) {
331
331
  throw new cli_shared_1.UserError(cli_shared_1.Text.error.licenseModesOverrideErrors.invalid);
332
332
  }
333
- ecosystemLicenseModes.add(upperCaseLicenseMode);
333
+ ecosystemLicenseModes.add(formattedLicenseMode);
334
334
  }
335
335
  return Array.from(ecosystemLicenseModes);
336
336
  }
@@ -30,6 +30,7 @@ import { PrerequisitesController } from './controller/prerequisites-controller';
30
30
  import { DefaultEnvironmentController } from './controller/default-environment-controller';
31
31
  import { EligibilityController } from './controller/eligibility-controller';
32
32
  import { VersionController } from './controller/version-controller';
33
+ import { ContainerCommand } from '../containers';
33
34
  export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Promise<{
34
35
  ui: CommandLineUI;
35
36
  cmd: Command<[], import("./command").DefaultOpts>;
@@ -58,6 +59,7 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
58
59
  viewAppLogsCommand: ViewAppLogsCommand;
59
60
  getWebTriggerURLCommand: GetWebTriggerURLCommand;
60
61
  listEntitiesIndexesCommand: ListEntitiesIndexesCommand;
62
+ containerCommand: ContainerCommand;
61
63
  };
62
64
  services: {
63
65
  installationsService: InstallationService;
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAIA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,EAKhB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAElB,kBAAkB,EAKlB,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAML,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AACtG,OAAO,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAIlG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAG3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO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MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
@@ -73,6 +73,7 @@ const version_controller_1 = require("./controller/version-controller");
73
73
  const version_service_1 = require("../service/version-service");
74
74
  const version_view_1 = require("./view/version-view");
75
75
  const graphql_client_9 = require("../version/graphql-client");
76
+ const containers_1 = require("../containers");
76
77
  const getDependencies = async (cliDetails) => {
77
78
  let cmd;
78
79
  const ui = new cli_shared_1.CommandLineUI(() => cmd.verbose);
@@ -198,6 +199,7 @@ const getDependencies = async (cliDetails) => {
198
199
  const prerequisitesController = new prerequisites_controller_1.PrerequisitesController(ui, cliDetails);
199
200
  const defaultEnvironmentController = new default_environment_controller_1.DefaultEnvironmentController(ui, credentialStore, cachedConfigService, assertiveAppConfigReader, userRepository, createEnvironmentCommand, listEnvironmentCommand, getAppOwnerQuery);
200
201
  cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, supportedProductsService);
202
+ const containerCommand = new containers_1.ContainerCommand(graphQLClient, assertiveAppConfigReader);
201
203
  await supportedProductsService.initializeWithSupportedProducts(statsigService);
202
204
  return {
203
205
  ui,
@@ -226,7 +228,8 @@ const getDependencies = async (cliDetails) => {
226
228
  deleteEnvironmentCommand,
227
229
  viewAppLogsCommand,
228
230
  getWebTriggerURLCommand,
229
- listEntitiesIndexesCommand
231
+ listEntitiesIndexesCommand,
232
+ containerCommand
230
233
  },
231
234
  services: {
232
235
  installationsService,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqBvE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAkBlD;AAQD,eAAO,MAAM,IAAI,QAAa,QAAQ,IAAI,CAUzC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAsBvE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAmBlD;AAQD,eAAO,MAAM,IAAI,QAAa,QAAQ,IAAI,CAUzC,CAAC"}
@@ -21,6 +21,7 @@ const register_environments_commands_1 = require("./register-environments-comman
21
21
  const register_storage_commands_1 = require("./register-storage-commands");
22
22
  const register_eligibility_commands_1 = require("./register-eligibility-commands");
23
23
  const register_version_commands_1 = require("./register-version-commands");
24
+ const register_containers_commands_1 = require("./register-containers-commands");
24
25
  function registerCommands(deps) {
25
26
  (0, register_autocomplete_commands_1.registerCommands)(deps);
26
27
  (0, register_authentication_command_1.registerCommands)(deps);
@@ -39,6 +40,7 @@ function registerCommands(deps) {
39
40
  (0, register_storage_commands_1.registerCommands)(deps);
40
41
  (0, register_eligibility_commands_1.registerCommands)(deps);
41
42
  (0, register_version_commands_1.registerCommands)(deps);
43
+ (0, register_containers_commands_1.registerCommands)(deps);
42
44
  }
43
45
  exports.registerCommands = registerCommands;
44
46
  const registerEvents = ({ ui }) => {
@@ -0,0 +1,3 @@
1
+ import { Dependencies } from './dependency-injection';
2
+ export declare const registerCommands: (deps: Dependencies) => void;
3
+ //# sourceMappingURL=register-containers-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-containers-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-containers-commands.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwMtD,eAAO,MAAM,gBAAgB,SAAU,YAAY,KAAG,IAQrD,CAAC"}
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerCommands = void 0;
4
+ const cli_shared_1 = require("@forge/cli-shared");
5
+ function parseContainersWithLatestTags(containers) {
6
+ return containers.map(({ key, repositoryURI, images }) => ({
7
+ key,
8
+ repositoryURI,
9
+ latestTags: images?.edges[0]?.node.tags.join(', ') || '-'
10
+ }));
11
+ }
12
+ const registerCreateContainerCommand = (parent, { ui, commands: { containerCommand } }) => {
13
+ parent
14
+ .command('create')
15
+ .description(cli_shared_1.Text.containers.create.cmd.desc)
16
+ .option('-k, --key [key]', cli_shared_1.Text.containers.create.cmd.keyOption)
17
+ .requireAppId()
18
+ .action(async ({ key }) => {
19
+ if (!key) {
20
+ ui.info(cli_shared_1.Text.containers.create.prompt.overview);
21
+ ui.emptyLine();
22
+ key = await ui.promptForText(cli_shared_1.Text.containers.create.prompt.entry);
23
+ ui.emptyLine();
24
+ }
25
+ ui.info(cli_shared_1.Text.containers.create.creatingNewContainer(key));
26
+ ui.info(cli_shared_1.Text.ctrlC);
27
+ ui.emptyLine();
28
+ const container = await ui.displayProgress(() => containerCommand.createContainer(key), cli_shared_1.Text.containers.create.start, cli_shared_1.Text.containers.create.success);
29
+ ui.emptyLine();
30
+ ui.info(cli_shared_1.Text.containers.create.createdRepositoryURI(container.repositoryURI));
31
+ });
32
+ };
33
+ const registerListContainersCommand = (parent, { ui, commands: { containerCommand } }) => {
34
+ parent
35
+ .command('list')
36
+ .description(cli_shared_1.Text.containers.list.cmd.desc)
37
+ .requireAppId()
38
+ .action(async () => {
39
+ ui.info(cli_shared_1.Text.containers.list.listingContainers);
40
+ ui.info(cli_shared_1.Text.ctrlC);
41
+ ui.emptyLine();
42
+ const containers = await containerCommand.fetchContainers();
43
+ ui.table([
44
+ ['key', 'Container Key'],
45
+ ['repositoryURI', 'Repository URI'],
46
+ ['latestTags', 'Latest Image Tag(s)']
47
+ ], parseContainersWithLatestTags(containers), { json: false, emptyMessage: cli_shared_1.Text.containers.list.noContainersFound });
48
+ });
49
+ };
50
+ const registerListImagesCommand = (parent, { ui, commands: { containerCommand } }) => {
51
+ parent
52
+ .command('images')
53
+ .requireAppId()
54
+ .description(cli_shared_1.Text.containers.images.cmd.desc)
55
+ .command('list')
56
+ .option('-k, --key [key]', cli_shared_1.Text.containers.images.list.cmd.keyOption)
57
+ .description(cli_shared_1.Text.containers.images.list.cmd.desc)
58
+ .action(async ({ key }) => {
59
+ if (!key) {
60
+ ui.info(cli_shared_1.Text.containers.images.list.prompt.overview);
61
+ ui.emptyLine();
62
+ key = await ui.promptForText(cli_shared_1.Text.containers.images.list.prompt.entry);
63
+ ui.emptyLine();
64
+ }
65
+ ui.info(cli_shared_1.Text.containers.images.list.listingImages(key));
66
+ ui.info(cli_shared_1.Text.ctrlC);
67
+ ui.emptyLine();
68
+ let startCursor;
69
+ do {
70
+ const { images, endCursor, hasNextPage } = await containerCommand.fetchImages(key, startCursor);
71
+ ui.table([
72
+ ['tags', 'Image Tags'],
73
+ ['pushedAt', 'Pushed At'],
74
+ ['lastPulledAt', 'Last Pulled At'],
75
+ ['sizeInBytes', 'Size (bytes)'],
76
+ ['digest', 'Digest']
77
+ ], images.map(({ digest, tags, pushedAt, lastPulledAt, sizeInBytes }) => ({
78
+ tags: tags.join(', '),
79
+ pushedAt,
80
+ digest,
81
+ lastPulledAt: lastPulledAt || '-',
82
+ sizeInBytes: sizeInBytes.toString()
83
+ })), { json: false, emptyMessage: cli_shared_1.Text.containers.images.list.noImagesFound });
84
+ startCursor = hasNextPage ? endCursor : undefined;
85
+ if (!startCursor) {
86
+ break;
87
+ }
88
+ ui.emptyLine();
89
+ const result = await ui.promptForText(cli_shared_1.Text.containers.images.list.promptNextPage);
90
+ if (result.toLowerCase() !== cli_shared_1.Text.containers.images.list.confirmationForNextPage) {
91
+ break;
92
+ }
93
+ } while (true);
94
+ });
95
+ };
96
+ const registerGetRepositoryLoginCommand = (parent, { ui, commands: { containerCommand } }) => {
97
+ parent
98
+ .command('get-login')
99
+ .description(cli_shared_1.Text.containers.login.cmd.desc)
100
+ .requireAppId()
101
+ .option('-pw, --password-only', cli_shared_1.Text.containers.login.cmd.onlyPassword)
102
+ .action(async (opts) => {
103
+ const login = await containerCommand.fetchLoginDetails();
104
+ if (opts.passwordOnly) {
105
+ ui.info(login.password);
106
+ }
107
+ else {
108
+ ui.table([
109
+ ['username', 'Username'],
110
+ ['password', 'Password'],
111
+ ['endpoint', 'Endpoint']
112
+ ], [
113
+ {
114
+ ...login,
115
+ password: cli_shared_1.Text.containers.login.truncatedPassword(login.password)
116
+ }
117
+ ]);
118
+ }
119
+ });
120
+ };
121
+ const registerDeleteContainerCommand = (parent, { ui, commands: { containerCommand } }) => {
122
+ parent
123
+ .command('delete')
124
+ .description(cli_shared_1.Text.containers.delete.cmd.desc)
125
+ .option('-k, --key [key]', cli_shared_1.Text.containers.delete.cmd.keyOption)
126
+ .requireAppId()
127
+ .action(async ({ key }) => {
128
+ if (!key) {
129
+ const containers = await containerCommand.fetchContainers();
130
+ if (!containers.length) {
131
+ ui.info(cli_shared_1.Text.containers.delete.interactive.noContainersFound);
132
+ return;
133
+ }
134
+ ui.info(cli_shared_1.Text.containers.delete.interactive.overview);
135
+ ui.emptyLine();
136
+ const selectedContainerIndex = await ui.promptForSingleChoiceTable(cli_shared_1.Text.containers.delete.interactive.desc, cli_shared_1.Text.containers.delete.interactive.progressInfo, ['Container Key', 'Repository URI', 'Latest Image Tag(s)'], parseContainersWithLatestTags(containers).map(({ key, repositoryURI, latestTags }) => ({
137
+ names: [key, repositoryURI, latestTags],
138
+ value: key,
139
+ primary: key
140
+ })));
141
+ key = containers[selectedContainerIndex].key;
142
+ ui.emptyLine();
143
+ }
144
+ ui.info(cli_shared_1.Text.containers.delete.deletingContainer(key));
145
+ ui.emptyLine();
146
+ ui.warn(cli_shared_1.Text.containers.delete.warning);
147
+ const confirmation = await ui.promptForText(cli_shared_1.Text.containers.delete.confirmation(key));
148
+ if (confirmation !== key) {
149
+ ui.info(cli_shared_1.Text.containers.delete.abortedDeletion);
150
+ return;
151
+ }
152
+ ui.info(cli_shared_1.Text.ctrlC);
153
+ ui.emptyLine();
154
+ await ui.displayProgress(() => containerCommand.deleteContainer(key), cli_shared_1.Text.containers.delete.start, cli_shared_1.Text.containers.delete.success);
155
+ });
156
+ };
157
+ const registerCommands = (deps) => {
158
+ const containersCmd = deps.cmd.command('containers', { hidden: true }).description(cli_shared_1.Text.containers.cmd.desc);
159
+ registerCreateContainerCommand(containersCmd, deps);
160
+ registerListContainersCommand(containersCmd, deps);
161
+ registerListImagesCommand(containersCmd, deps);
162
+ registerGetRepositoryLoginCommand(containersCmd, deps);
163
+ registerDeleteContainerCommand(containersCmd, deps);
164
+ };
165
+ exports.registerCommands = registerCommands;
@@ -0,0 +1,19 @@
1
+ import { AppConfigProvider, GraphQLClient, AppContainer, AppContainerRegistryLogin, AppContainerImage } from '@forge/cli-shared';
2
+ export declare class UnexpectedAppContainerRegistryLoginError extends Error {
3
+ constructor();
4
+ }
5
+ export declare class ContainerCommand {
6
+ private readonly client;
7
+ private readonly getAppConfig;
8
+ constructor(client: GraphQLClient, getAppConfig: AppConfigProvider);
9
+ createContainer(key: string): Promise<AppContainer>;
10
+ fetchContainers(): Promise<AppContainer[]>;
11
+ deleteContainer(key: string): Promise<void>;
12
+ fetchLoginDetails(): Promise<AppContainerRegistryLogin>;
13
+ fetchImages(key: string, startCursor?: string): Promise<{
14
+ images: AppContainerImage[];
15
+ endCursor?: string;
16
+ hasNextPage: boolean;
17
+ }>;
18
+ }
19
+ //# sourceMappingURL=container-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-command.d.ts","sourceRoot":"","sources":["../../src/containers/container-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,aAAa,EAEb,YAAY,EACZ,yBAAyB,EAKzB,iBAAiB,EAElB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,wCAAyC,SAAQ,KAAK;;CAIlE;AAED,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,iBAAiB;IAG5C,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IA2CnD,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IA4B1C,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCpC,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAyBvD,WAAW,CACtB,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC;QAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAAC;CAsCtF"}
@@ -0,0 +1,159 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContainerCommand = exports.UnexpectedAppContainerRegistryLoginError = void 0;
4
+ const cli_shared_1 = require("@forge/cli-shared");
5
+ class UnexpectedAppContainerRegistryLoginError extends Error {
6
+ constructor() {
7
+ super('Unable to retrieve app container registry login details');
8
+ }
9
+ }
10
+ exports.UnexpectedAppContainerRegistryLoginError = UnexpectedAppContainerRegistryLoginError;
11
+ class ContainerCommand {
12
+ client;
13
+ getAppConfig;
14
+ constructor(client, getAppConfig) {
15
+ this.client = client;
16
+ this.getAppConfig = getAppConfig;
17
+ }
18
+ async createContainer(key) {
19
+ const { id: appId } = await this.getAppConfig();
20
+ const mutation = `
21
+ mutation forge_cli_createAppContainer($input: AppContainerInput!) {
22
+ createAppContainer(input: $input) {
23
+ container {
24
+ repositoryURI
25
+ }
26
+ success
27
+ errors {
28
+ message
29
+ extensions {
30
+ errorType
31
+ statusCode
32
+ }
33
+ }
34
+ }
35
+ }`;
36
+ const { response: { createAppContainer: { container, success, errors } }, requestId } = await this.client.mutate(mutation, {
37
+ input: {
38
+ appId,
39
+ containerKey: key
40
+ }
41
+ });
42
+ if (!success) {
43
+ const error = (0, cli_shared_1.getError)(errors);
44
+ throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
45
+ requestId,
46
+ code: error.code,
47
+ statusCode: error.statusCode
48
+ });
49
+ }
50
+ return container;
51
+ }
52
+ async fetchContainers() {
53
+ const { id: appId } = await this.getAppConfig();
54
+ const query = `
55
+ query forge_cli_appContainers($appId: ID!) {
56
+ appContainers(appId: $appId) {
57
+ key
58
+ repositoryURI
59
+ images(first: 1) {
60
+ edges {
61
+ node {
62
+ digest
63
+ sizeInBytes
64
+ pushedAt
65
+ lastPulledAt
66
+ tags
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }`;
72
+ const { appContainers } = await this.client.query(query, {
73
+ appId
74
+ });
75
+ return appContainers ?? [];
76
+ }
77
+ async deleteContainer(key) {
78
+ const { id: appId } = await this.getAppConfig();
79
+ const mutation = `
80
+ mutation forge_cli_deleteAppContainer($input: AppContainerInput!) {
81
+ deleteAppContainer(input: $input) {
82
+ success
83
+ errors {
84
+ message
85
+ extensions {
86
+ errorType
87
+ statusCode
88
+ }
89
+ }
90
+ }
91
+ }`;
92
+ const { response: { deleteAppContainer: { success, errors } }, requestId } = await this.client.mutate(mutation, {
93
+ input: {
94
+ appId,
95
+ containerKey: key
96
+ }
97
+ });
98
+ if (!success) {
99
+ const error = (0, cli_shared_1.getError)(errors);
100
+ throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
101
+ requestId,
102
+ code: error.code,
103
+ statusCode: error.statusCode
104
+ });
105
+ }
106
+ }
107
+ async fetchLoginDetails() {
108
+ const { id: appId } = await this.getAppConfig();
109
+ const query = `
110
+ query forge_cli_appContainerRegistryLogin($appId: ID!) {
111
+ appContainerRegistryLogin(appId: $appId) {
112
+ username
113
+ password
114
+ endpoint
115
+ }
116
+ }`;
117
+ const { appContainerRegistryLogin } = await this.client.query(query, {
118
+ appId
119
+ });
120
+ if (!appContainerRegistryLogin) {
121
+ throw new UnexpectedAppContainerRegistryLoginError();
122
+ }
123
+ return appContainerRegistryLogin;
124
+ }
125
+ async fetchImages(key, startCursor) {
126
+ const { id: appId } = await this.getAppConfig();
127
+ const query = `
128
+ query forge_cli_appContainer($appId: ID!, $containerKey: String!, $after: ID) {
129
+ appContainer(appId: $appId, containerKey: $containerKey) {
130
+ images(first: 10, after: $after) {
131
+ edges {
132
+ node {
133
+ digest
134
+ sizeInBytes
135
+ pushedAt
136
+ lastPulledAt
137
+ tags
138
+ }
139
+ }
140
+ pageInfo {
141
+ hasNextPage
142
+ endCursor
143
+ }
144
+ }
145
+ }
146
+ }`;
147
+ const { appContainer } = await this.client.query(query, {
148
+ appId,
149
+ containerKey: key,
150
+ after: startCursor
151
+ });
152
+ return {
153
+ images: appContainer?.images.edges.map(({ node }) => node) ?? [],
154
+ endCursor: appContainer?.images.pageInfo.endCursor ?? undefined,
155
+ hasNextPage: appContainer?.images.pageInfo.hasNextPage ?? false
156
+ };
157
+ }
158
+ }
159
+ exports.ContainerCommand = ContainerCommand;
@@ -0,0 +1,2 @@
1
+ export * from './container-command';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/containers/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./container-command"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "11.3.0-next.27",
3
+ "version": "11.3.0-next.32",
4
4
  "description": "A command line interface for managing Atlassian-hosted apps",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -18,13 +18,13 @@
18
18
  "postinstall": "node -e \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
19
19
  },
20
20
  "dependencies": {
21
- "@forge/bundler": "4.22.0-next.25",
22
- "@forge/cli-shared": "6.8.0-next.24",
21
+ "@forge/bundler": "4.22.0-next.29",
22
+ "@forge/cli-shared": "6.8.0-next.27",
23
23
  "@forge/egress": "1.4.0",
24
- "@forge/lint": "5.7.3-next.25",
25
- "@forge/manifest": "8.9.0-next.12",
24
+ "@forge/lint": "5.7.3-next.28",
25
+ "@forge/manifest": "9.0.0-next.13",
26
26
  "@forge/runtime": "5.10.7",
27
- "@forge/tunnel": "5.10.1-next.26",
27
+ "@forge/tunnel": "5.10.1-next.30",
28
28
  "@forge/util": "1.4.8",
29
29
  "@sentry/node": "7.106.0",
30
30
  "@forge/i18n": "0.0.5-next.1",