@forge/cli-shared 6.5.5-next.1 → 6.6.0-next.3

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.
@@ -1,10 +1,13 @@
1
- export declare const WORKSPACE_PRODUCTS: string[];
1
+ declare const SUPPORTED_PRODUCTS: readonly ["Jira", "Confluence", "Compass"];
2
+ export declare const WORKSPACE_PRODUCTS: readonly ["Bitbucket"];
3
+ export declare type SupportedProduct = (typeof SUPPORTED_PRODUCTS)[number] | (typeof WORKSPACE_PRODUCTS)[number];
2
4
  export declare function getSupportedProducts({ enableAtlas }?: {
3
5
  enableAtlas?: boolean;
4
- }): string[];
6
+ }): (SupportedProduct | "Atlas")[];
5
7
  export declare function productDisplayName(ariResourceOwner: string): string;
6
8
  export declare function ariResourceOwner(productDisplayName: string): string;
7
- export declare const isWorkspaceProduct: (product: string) => boolean;
9
+ export declare const isWorkspaceProduct: (product: string) => product is "Bitbucket";
8
10
  export declare const isBitbucketProduct: (product: string) => boolean;
9
- export declare const isSupportedProduct: (product: string) => boolean;
11
+ export declare const isSupportedProduct: (product: string) => product is SupportedProduct;
12
+ export {};
10
13
  //# sourceMappingURL=product.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,UAAgB,CAAC;AAUhD,wBAAgB,oBAAoB,CAAC,EAAE,WAAmB,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,YAO3F;AAED,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC"}
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,kBAAkB,4CAA6C,CAAC;AACtE,eAAO,MAAM,kBAAkB,wBAAyB,CAAC;AACzD,oBAAY,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAUzG,wBAAgB,oBAAoB,CAAC,EAAE,WAAmB,EAAE,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,kCAQ3F;AAED,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,eAAO,MAAM,kBAAkB,YAAa,MAAM,2BAEjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,gCAEjD,CAAC"}
@@ -27,7 +27,7 @@ function ariResourceOwner(productDisplayName) {
27
27
  }
28
28
  exports.ariResourceOwner = ariResourceOwner;
29
29
  const isWorkspaceProduct = (product) => {
30
- return exports.WORKSPACE_PRODUCTS.includes(productDisplayName(product));
30
+ return isSupported(exports.WORKSPACE_PRODUCTS, productDisplayName(product));
31
31
  };
32
32
  exports.isWorkspaceProduct = isWorkspaceProduct;
33
33
  const isBitbucketProduct = (product) => {
@@ -35,6 +35,9 @@ const isBitbucketProduct = (product) => {
35
35
  };
36
36
  exports.isBitbucketProduct = isBitbucketProduct;
37
37
  const isSupportedProduct = (product) => {
38
- return SUPPORTED_PRODUCTS.includes(productDisplayName(product)) || (0, exports.isWorkspaceProduct)(product);
38
+ return isSupported(SUPPORTED_PRODUCTS, productDisplayName(product)) || (0, exports.isWorkspaceProduct)(product);
39
39
  };
40
40
  exports.isSupportedProduct = isSupportedProduct;
41
+ function isSupported(arr, e) {
42
+ return arr.includes(e);
43
+ }
package/out/ui/text.d.ts CHANGED
@@ -21,6 +21,7 @@ export declare const Text: {
21
21
  invalidProduct: string;
22
22
  invalidSite: string;
23
23
  invalidWorkspace: string;
24
+ invalidInstallationContext: string;
24
25
  invalidTokenInKeytar: string;
25
26
  invalidTokenInEnv: (instructionsUrl: string, emailVar: string, tokenVar: string) => string;
26
27
  promptInputRequired: string;
@@ -47,6 +48,7 @@ export declare const Text: {
47
48
  countSize: (maxSizeOfUsersWithAccess: number) => string;
48
49
  licenseModeRequired: string;
49
50
  };
51
+ multipleMatchingInstallations: string;
50
52
  };
51
53
  warning: {
52
54
  plaintextCredentialsFound: (url: string) => string;
@@ -386,6 +388,137 @@ export declare const Text: {
386
388
  };
387
389
  };
388
390
  };
391
+ version: {
392
+ cmd: {
393
+ cmdName: string;
394
+ desc: string;
395
+ };
396
+ diff: {
397
+ cmdName: string;
398
+ error: {
399
+ noVersionProvided: string;
400
+ };
401
+ option: {
402
+ version1: string;
403
+ version2: string;
404
+ outFile: string;
405
+ };
406
+ desc: string;
407
+ start: string;
408
+ end: string;
409
+ details: {
410
+ banner: (envKey: string, envType: AppEnvironmentType, version1: number, version2: number) => string;
411
+ };
412
+ };
413
+ check: {
414
+ cmdName: string;
415
+ option: {
416
+ majorVersion: string;
417
+ json: string;
418
+ outFile: string;
419
+ };
420
+ error: {
421
+ invalidMajorVersion: (property?: string) => string;
422
+ };
423
+ desc: string;
424
+ start: string;
425
+ end: string;
426
+ details: {
427
+ banner: (envKey: string, envType: AppEnvironmentType, version: number) => string;
428
+ prompt: {
429
+ options: {
430
+ banner: string;
431
+ choices: {
432
+ all: string;
433
+ manual: string;
434
+ };
435
+ };
436
+ properties: {
437
+ banner: string;
438
+ info: string;
439
+ headers: string[];
440
+ descriptions: {
441
+ scopes: string;
442
+ egress: string;
443
+ policies: string;
444
+ functions: string;
445
+ modules: string;
446
+ remotes: string;
447
+ connectKeys: string;
448
+ license: string;
449
+ };
450
+ };
451
+ };
452
+ writeToFile: (file: string) => string;
453
+ deploymentDate: (date: Date) => string;
454
+ scopes: (scopes: string[]) => string;
455
+ egress: (egresses: {
456
+ type: string;
457
+ addresses: string[];
458
+ }[]) => string;
459
+ securityPolicies: (policies: {
460
+ type: string;
461
+ policies: string[];
462
+ }[]) => string;
463
+ license: (requiresLicense: boolean) => string;
464
+ connectKeys: (keys: {
465
+ product: string;
466
+ key: string;
467
+ }[]) => string;
468
+ storage: (storages: {
469
+ type: string;
470
+ store: {
471
+ baseUrl: string;
472
+ locations: string[];
473
+ }[];
474
+ }[]) => string;
475
+ functions: (functions: {
476
+ key: string;
477
+ runtimeName: string;
478
+ regions: string[];
479
+ handler: string;
480
+ }[]) => string;
481
+ modules: (modules: {
482
+ type: string;
483
+ items: {
484
+ key: string;
485
+ properties: any;
486
+ }[];
487
+ }[]) => string;
488
+ remotes: (remotes: {
489
+ key: string;
490
+ baseUrl: string;
491
+ operations: string[];
492
+ }[]) => string;
493
+ };
494
+ };
495
+ list: {
496
+ cmdName: string;
497
+ option: {
498
+ json: string;
499
+ outFile: string;
500
+ };
501
+ desc: string;
502
+ start: string;
503
+ end: string;
504
+ details: {
505
+ banner: (envKey: string, envType: AppEnvironmentType, versions: number) => string;
506
+ deploymentDate: (date: Date) => string;
507
+ egresses: (egresses: {
508
+ type: string;
509
+ count: number;
510
+ }[]) => string;
511
+ policies: (policies: {
512
+ type: string;
513
+ count: number;
514
+ }[]) => string;
515
+ modules: (modules: {
516
+ type: string;
517
+ count: number;
518
+ }[]) => string;
519
+ };
520
+ };
521
+ };
389
522
  deploy: {
390
523
  cmd: {
391
524
  desc: string;
@@ -620,7 +753,6 @@ export declare const Text: {
620
753
  cmd: string;
621
754
  copy: (url: string) => string;
622
755
  optionFuncKey: string;
623
- installationId: string;
624
756
  overviewFuncKey: string;
625
757
  promptFuncKey: string;
626
758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AAc,MAAM;;yCAM5C,MAAM,aAAa,MAAM;;;+CAKf,MAAM;;+BAGtB,MAAM,KAAG,MAAM;;;;;;+BAOf,MAAM;;;8BAIT,MAAM;8BACN,MAAM;;oCAGF,MAAM;;;;;qDAOa,MAAM;0CAGjB,MAAM,aAAa,OAAO;;iDAInB,MAAM;;oCAInB,MAAM,GAAG,IAAI;;;;;;;;uCAeV,MAAM;;;;;;;+BAQd,OAAO;;;;;;;;wBAQZ,MAAM,UAAU,MAAM,eAAe,MAAM,WAAW,OAAO;0BAI3D,MAAM,UAAU,MAAM,eAAe,MAAM;;;;;oBAYjD,MAAM;;;;;;;;;qCAYS,MAAM;;;;;;;;;oCAWL,MAAM;;;;;;;;;;oCAYN,MAAM,WAAW,MAAM;kCAMzB,MAAM,sBAAsB,MAAM,KAAG,MAAM;;sBAUvD,MAAM,UAAU,MAAM,WAAW,MAAM,aAAa,MAAM,KAAG,MAAM;6BAE5D,MAAM,eAAe,MAAM,oBAAoB,MAAM,sBAAsB,MAAM,KAAG,MAAM;gCAevF,MAAM,oBAAoB,MAAM,sBAAsB,MAAM,KAAG,MAAM;wBAe7E,MAAM,UAAU,MAAM,WAAW,MAAM,aAAa,MAAM,KAAG,MAAM;;;yBAKlE,MAAM,WAAW,MAAM;;;;qCAMb,MAAM;qCACN,MAAM,gBAAgB,OAAO;;;yCAMzB,MAAM;qCACV,MAAM;;;;;;;;;;;;;;;;+BAwBZ,MAAM,SAAS,MAAM;;;;;;;;;;;;;;;;6CAiBP,MAAM,mBAAmB,MAAM,EAAE;;;;CAUvE,CAAC"}
package/out/ui/text.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Text = exports.capitalise = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const yaml_1 = tslib_1.__importDefault(require("yaml"));
6
7
  const terminal_link_1 = tslib_1.__importDefault(require("terminal-link"));
7
8
  const case_1 = require("case");
8
9
  const log_symbols_1 = tslib_1.__importDefault(require("./log-symbols"));
@@ -21,8 +22,8 @@ const forge = (...args) => command('forge', ...args);
21
22
  const autoSpaceSentences = (...sentences) => sentences
22
23
  .filter((sentence) => sentence.length > 0)
23
24
  .join(' ');
24
- function itemList(items) {
25
- return items.map((item) => ` - ${item}`).join('\n');
25
+ function itemList(items, indent) {
26
+ return items.map((item) => `${indent ?? ' '}- ${item}`).join(`\n${indent ?? ''}`);
26
27
  }
27
28
  const fatalError = (message) => chalk_1.default.bold(chalk_1.default.red(message));
28
29
  const keytarAccessErrorBase = (message) => `Keytar error detected: ${message}`;
@@ -64,6 +65,7 @@ exports.Text = {
64
65
  invalidProduct: 'Invalid product. Rerun the command with a valid product.',
65
66
  invalidSite: 'The site you entered is not an Atlassian site. Rerun the command with the URL to an Atlassian site to install the app.',
66
67
  invalidWorkspace: 'The workspace you entered is not a valid workspace. Rerun the command with the URL to a valid workspace to install the app.',
68
+ invalidInstallationContext: 'Could not find an installation for the provided context',
67
69
  invalidTokenInKeytar: `Your API token is no longer valid. Run ${forge('login')} to reset your login credentials.`,
68
70
  invalidTokenInEnv: (instructionsUrl, emailVar, tokenVar) => `The API token on your machine is no longer valid.` +
69
71
  `\n 1) Get a new API token: ${instructionsUrl}` +
@@ -91,7 +93,8 @@ exports.Text = {
91
93
  empty: '--users-with-access option list is empty. Provide a space-separated list of Atlassian Account IDs(aaid). \nFor example: install --license-modes user_access --users-with-access aaid1 aaid2',
92
94
  countSize: (maxSizeOfUsersWithAccess) => `User limit exceeded. The --users-with-access option allows a maximum of ${maxSizeOfUsersWithAccess} users.`,
93
95
  licenseModeRequired: '--license-modes option is required when specifying --users-with-access option'
94
- }
96
+ },
97
+ multipleMatchingInstallations: 'Multiple matching installations found for the provided context when only one was expected'
95
98
  },
96
99
  warning: {
97
100
  plaintextCredentialsFound: (url) => `Your credentials were stored in plaintext by a previous version of the Forge CLI. For additional security, revoke your existing API token by visting this URL ${buildTerminalLink(url)}.`,
@@ -473,6 +476,144 @@ What do you like or don't like about Forge? Share your feedback below or press C
473
476
  }
474
477
  }
475
478
  },
479
+ version: {
480
+ cmd: {
481
+ cmdName: 'version',
482
+ desc: 'app version information'
483
+ },
484
+ diff: {
485
+ cmdName: 'compare',
486
+ error: {
487
+ noVersionProvided: 'Please provide 2 versions to compare'
488
+ },
489
+ option: {
490
+ version1: '1st version to compare',
491
+ version2: '2nd version to compare',
492
+ outFile: 'specify a file to output the results'
493
+ },
494
+ desc: `returns the details of two versions of the app for comparison. Details include:\n${itemList([
495
+ 'deployment date',
496
+ 'egress',
497
+ 'policies',
498
+ 'scopes',
499
+ 'connect keys',
500
+ 'functions',
501
+ 'remotes',
502
+ 'modules',
503
+ 'license'
504
+ ])}`,
505
+ start: 'Comparing app versions...',
506
+ end: 'Comparing app versions...',
507
+ details: {
508
+ banner: (envKey, envType, version1, version2) => `${log_symbols_1.default.info} Comparison between app versions [${chalk_1.default.bold(version1)} and ${chalk_1.default.bold(version2)}] in [${exports.Text.env.displayEnvironment(envKey, envType)}] is shown below:`
509
+ }
510
+ },
511
+ check: {
512
+ cmdName: 'details',
513
+ option: {
514
+ majorVersion: 'specify a major version',
515
+ json: 'output results in JSON format',
516
+ outFile: 'specify a file to output the results'
517
+ },
518
+ error: {
519
+ invalidMajorVersion: (property) => `Invalid major version number${property ? ` for ${property}` : ''}`
520
+ },
521
+ desc: `returns the details of a specific version of the app. Details include:\n${itemList([
522
+ 'egress',
523
+ 'policies',
524
+ 'scopes',
525
+ 'connect keys',
526
+ 'functions',
527
+ 'remotes',
528
+ 'modules',
529
+ 'license'
530
+ ])}`,
531
+ start: 'Getting app version details...',
532
+ end: 'Getting app version details...',
533
+ details: {
534
+ banner: (envKey, envType, version) => `${log_symbols_1.default.info} App [${version}] in [${exports.Text.env.displayEnvironment(envKey, envType)}] includes the following:`,
535
+ prompt: {
536
+ options: {
537
+ banner: 'Select option:',
538
+ choices: {
539
+ all: 'Show all properties',
540
+ manual: 'Manual selection'
541
+ }
542
+ },
543
+ properties: {
544
+ banner: 'Select properties that you are interested in:',
545
+ info: 'Note: Changes to the properties below may trigger major version updates in Atlassian systems.\n',
546
+ headers: ['Property', 'Description'],
547
+ descriptions: {
548
+ scopes: 'Product scopes that the app has access to',
549
+ egress: 'Network permissions',
550
+ policies: 'Content security policies (Custom UI)',
551
+ functions: 'Function modules used by the app',
552
+ modules: 'Modules used by the app (other than functions & remotes)',
553
+ remotes: 'Remote modules used by the app (Remote backend, Connect or External Auth)',
554
+ connectKeys: 'Connect on Forge',
555
+ license: 'Does the app require a license?'
556
+ }
557
+ }
558
+ },
559
+ writeToFile: (file) => `Writing to file: ${file}`,
560
+ deploymentDate: (date) => `${date.toISOString()}`,
561
+ scopes: (scopes) => `${itemList(scopes, '')}`,
562
+ egress: (egresses) => `${itemList(egresses.map((egress) => `[${chalk_1.default.cyan(egress.type)}]: \n ${itemList(egress.addresses, ' ')}`), '')}`,
563
+ securityPolicies: (policies) => `${itemList(policies.map((policy) => `[${chalk_1.default.cyan(policy.type)}]: ${policy.policies.join(', ')}`))}`,
564
+ license: (requiresLicense) => `${requiresLicense ? 'Yes' : 'No'}`,
565
+ connectKeys: (keys) => `${itemList(keys.map((key) => `[${chalk_1.default.cyan(key.product)}]: ${key.key}`), '')}`,
566
+ storage: (storages) => `${itemList(storages.map((storage) => `[${chalk_1.default.cyan(storage.type)}]: ${storage.store.map((store) => `${store.baseUrl} (${store.locations.join(', ')})`).join(', ')}`))}`,
567
+ functions: (functions) => `${itemList(functions.map((func) => `[${chalk_1.default.cyan(func.key)}]: is configured with the following properties: \n ${yaml_1.default.stringify({
568
+ runtime: `${func.runtimeName}`,
569
+ handler: `${func.handler}`
570
+ }, undefined, ' ').replaceAll('\n', '\n ')}`), '')}`,
571
+ modules: (modules) => {
572
+ return `${modules
573
+ .map((mod) => `${chalk_1.default.bold(mod.type)}\n${itemList(mod.items.map((item) => `[${chalk_1.default.cyan(item.key)}]: is configured with the following properties:\n ${yaml_1.default.stringify(item.properties, undefined, ' ').replaceAll('\n', '\n ')}`), '')}`)
574
+ .join('\n')}`;
575
+ },
576
+ remotes: (remotes) => `${itemList(remotes.map((remote) => `[${chalk_1.default.cyan(remote.key)}]: is configured with the following properties: \n ${yaml_1.default.stringify({
577
+ baseUrl: remote.baseUrl,
578
+ operations: remote.operations
579
+ }, undefined, ' ').replaceAll('\n', '\n ')}`), '')}`
580
+ }
581
+ },
582
+ list: {
583
+ cmdName: 'list',
584
+ option: {
585
+ json: 'output results in JSON format',
586
+ outFile: 'specify a file to output the results'
587
+ },
588
+ desc: `returns a summary of all major versions of the app. Summary includes:\n${itemList([
589
+ 'version number',
590
+ 'deployment date',
591
+ 'egress',
592
+ 'policies',
593
+ 'scopes',
594
+ 'connect keys',
595
+ 'functions',
596
+ 'remotes',
597
+ 'modules',
598
+ 'license'
599
+ ])}`,
600
+ start: 'Getting app version list...',
601
+ end: 'Getting app version list...',
602
+ details: {
603
+ banner: (envKey, envType, versions) => `${log_symbols_1.default.info} Details of a total of [${versions} major versions] in [${exports.Text.env.displayEnvironment(envKey, envType)}] can be seen below:`,
604
+ deploymentDate: (date) => exports.Text.version.check.details.deploymentDate(date),
605
+ egresses: (egresses) => {
606
+ return egresses.map((egress) => `${egress.type}: ${egress.count}`).join('\n');
607
+ },
608
+ policies: (policies) => {
609
+ return policies.map((policy) => `${policy.type}: ${policy.count}`).join('\n');
610
+ },
611
+ modules: (modules) => {
612
+ return modules.map((module) => `${module.type}: ${module.count}`).join('\n');
613
+ }
614
+ }
615
+ }
616
+ },
476
617
  deploy: {
477
618
  cmd: {
478
619
  desc: 'deploy your app to an environment',
@@ -750,7 +891,7 @@ Debugging in Google Chrome:
750
891
  progressInfo: `To uninstall your app from a site or workspace, select it from the list.\nPress Ctrl+C to cancel.`,
751
892
  done: `\n${log_symbols_1.default.success} Apps uninstalled`
752
893
  },
753
- info: 'Uninstalling the app by installation ID.',
894
+ info: 'Uninstalling the app from the provided context.',
754
895
  done: (product, domain, environment, isMulti) => `${isMulti ? log_symbols_1.default.info : log_symbols_1.default.success} Uninstalled from the ${(0, environment_1.environmentToOption)(environment)} environment in ${product} on ${buildTerminalLink(domain)}.`,
755
896
  failed: (product, domain, environment) => `Failed to uninstall the app from the ${(0, environment_1.environmentToOption)(environment)} environment in ${product} on ${buildTerminalLink(domain)}. Try rerunning the command, or ask for help if you continue to see this error.`,
756
897
  missingUninstallTask: `Cannot uninstall the app: something went wrong with starting the uninstall task.`
@@ -759,8 +900,7 @@ Debugging in Google Chrome:
759
900
  cmd: 'get a web trigger URL',
760
901
  copy: (url) => `\nCopy your web trigger URL below to start using it:\n\n${buildTerminalLink(url)}`,
761
902
  optionFuncKey: 'web trigger key from the manifest.yml file',
762
- installationId: 'web trigger installation ID',
763
- overviewFuncKey: `\nGetting the web trigger URL by installation ID.\n\nPress Ctrl+C to cancel.\n`,
903
+ overviewFuncKey: `\nGetting the web trigger URL for the provided context.\n\nPress Ctrl+C to cancel.\n`,
764
904
  promptFuncKey: 'Select a web trigger:',
765
905
  overViewInstallationTable: `\nGetting the web trigger URL by an app installation.\n\nPress Ctrl+C to cancel.\n`,
766
906
  promptInstallationTable: 'Select an installation:',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli-shared",
3
- "version": "6.5.5-next.1",
3
+ "version": "6.6.0-next.3",
4
4
  "description": "Common functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",