@forge/cli-shared 3.16.0-next.16 → 3.16.0-next.18

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.
@@ -108,6 +108,7 @@ var ApiGroup;
108
108
  var AppContributorRole;
109
109
  (function (AppContributorRole) {
110
110
  AppContributorRole["Admin"] = "ADMIN";
111
+ AppContributorRole["Developer"] = "DEVELOPER";
111
112
  })(AppContributorRole = exports.AppContributorRole || (exports.AppContributorRole = {}));
112
113
  var AppDeploymentEventLogLevel;
113
114
  (function (AppDeploymentEventLogLevel) {
@@ -10,12 +10,14 @@ declare type FeatureFlagType = {
10
10
  'xls-do-not-automatically-add-read-me-scope': boolean;
11
11
  'xis-allow-automatic-user-consent': boolean;
12
12
  'forge-cli-enable-csuik': boolean;
13
+ 'forge-cli-enable-atlas-product-support': boolean;
13
14
  };
14
15
  export declare type FeatureFlag = keyof FeatureFlagType;
15
16
  export declare abstract class FeatureFlagReader {
16
17
  abstract readFlag<F extends FeatureFlag>(flag: F): Promise<FeatureFlagType[F] | null>;
17
18
  readMeScopeAddedByXLS(): Promise<boolean>;
18
19
  isAutoConsentAllowed(): Promise<boolean>;
20
+ isAtlasProductSupported(): Promise<boolean>;
19
21
  }
20
22
  declare type ILaunchDarkly = Pick<LDClient, 'variation' | 'waitUntilReady'>;
21
23
  declare type LaunchDarklyInitialize = (envKey: string, user: LDUser, options?: LDOptions) => ILaunchDarkly;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-flag-service.d.ts","sourceRoot":"","sources":["../../src/service/feature-flag-service.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAe,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAKtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAA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,CAAC,QAAQ,CAAC,YAAY;gBALZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,eAAe,EAAE,gBAAgB,EACjC,eAAe,EAAE,mBAAmB,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EACpD,gBAAgB,GAAE,OAAO,cAA+B,EACxD,YAAY,GAAE,sBAAgD;IASjF,OAAO,CAAC,KAAK,CAOV;IAMH,OAAO,CAAC,IAAI,CAmBT;IAEH,OAAO,CAAC,MAAM,CAUX;IAEG,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAUnF;AAED,qBAAa,qBAAsB,SAAQ,iBAAiB;IAC9C,OAAO,CAAC,YAAY;gBAAZ,YAAY,GAAE;SAAG,GAAG,IAAI,WAAW,GAAG,GAAG;KAAE,GAAG,SAAqB;IAIjF,QAAQ,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAG7F"}
@@ -18,6 +18,10 @@ class FeatureFlagReader {
18
18
  var _a;
19
19
  return (_a = (await this.readFlag('xis-allow-automatic-user-consent'))) !== null && _a !== void 0 ? _a : false;
20
20
  }
21
+ async isAtlasProductSupported() {
22
+ var _a;
23
+ return (_a = (await this.readFlag('forge-cli-enable-atlas-product-support'))) !== null && _a !== void 0 ? _a : false;
24
+ }
21
25
  }
22
26
  exports.FeatureFlagReader = FeatureFlagReader;
23
27
  var CLIENT_SIDE_ID;
@@ -1,6 +1,9 @@
1
- export declare const SUPPORTED_PRODUCTS: string[];
2
1
  export declare const WORKSPACE_PRODUCTS: string[];
3
- export declare function capitalizeProduct(product: string): string;
2
+ export declare function getSupportedProducts({ enableAtlas }?: {
3
+ enableAtlas?: boolean;
4
+ }): string[];
5
+ export declare function productDisplayName(ariResourceOwner: string): string;
6
+ export declare function ariResourceOwner(productDisplayName: string): string;
4
7
  export declare const isWorkspaceProduct: (product: string) => boolean;
5
8
  export declare const isBitbucketProduct: (product: string) => boolean;
6
9
  export declare const isSupportedProduct: (product: string) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,UAAoC,CAAC;AACpE,eAAO,MAAM,kBAAkB,UAAgB,CAAC;AAEhD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;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":"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,22 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSupportedProduct = exports.isBitbucketProduct = exports.isWorkspaceProduct = exports.capitalizeProduct = exports.WORKSPACE_PRODUCTS = exports.SUPPORTED_PRODUCTS = void 0;
3
+ exports.isSupportedProduct = exports.isBitbucketProduct = exports.isWorkspaceProduct = exports.ariResourceOwner = exports.productDisplayName = exports.getSupportedProducts = exports.WORKSPACE_PRODUCTS = void 0;
4
4
  const case_1 = require("case");
5
- exports.SUPPORTED_PRODUCTS = ['Jira', 'Confluence', 'Compass'];
5
+ const SUPPORTED_PRODUCTS = ['Jira', 'Confluence', 'Compass'];
6
6
  exports.WORKSPACE_PRODUCTS = ['Bitbucket'];
7
- function capitalizeProduct(product) {
8
- return (0, case_1.capital)(product);
7
+ const PRODUCT_ARI_MAPPING = {
8
+ Atlas: 'townsquare'
9
+ };
10
+ const PRODUCT_DISPLAY_NAME_MAPPING = {
11
+ townsquare: 'Atlas'
12
+ };
13
+ function getSupportedProducts({ enableAtlas = false } = {}) {
14
+ const result = [...SUPPORTED_PRODUCTS];
15
+ if (enableAtlas) {
16
+ result.push('Atlas');
17
+ }
18
+ return result;
19
+ }
20
+ exports.getSupportedProducts = getSupportedProducts;
21
+ function productDisplayName(ariResourceOwner) {
22
+ var _a;
23
+ return (_a = PRODUCT_DISPLAY_NAME_MAPPING[ariResourceOwner]) !== null && _a !== void 0 ? _a : (0, case_1.capital)(ariResourceOwner);
24
+ }
25
+ exports.productDisplayName = productDisplayName;
26
+ function ariResourceOwner(productDisplayName) {
27
+ var _a;
28
+ return (_a = PRODUCT_ARI_MAPPING[productDisplayName]) !== null && _a !== void 0 ? _a : productDisplayName.toLowerCase();
9
29
  }
10
- exports.capitalizeProduct = capitalizeProduct;
30
+ exports.ariResourceOwner = ariResourceOwner;
11
31
  const isWorkspaceProduct = (product) => {
12
- return exports.WORKSPACE_PRODUCTS.includes(capitalizeProduct(product));
32
+ return exports.WORKSPACE_PRODUCTS.includes(productDisplayName(product));
13
33
  };
14
34
  exports.isWorkspaceProduct = isWorkspaceProduct;
15
35
  const isBitbucketProduct = (product) => {
16
- return capitalizeProduct(product) === 'Bitbucket';
36
+ return productDisplayName(product) === 'Bitbucket';
17
37
  };
18
38
  exports.isBitbucketProduct = isBitbucketProduct;
19
39
  const isSupportedProduct = (product) => {
20
- return exports.SUPPORTED_PRODUCTS.includes(capitalizeProduct(product)) || (0, exports.isWorkspaceProduct)(product);
40
+ return SUPPORTED_PRODUCTS.includes(productDisplayName(product)) || (0, exports.isWorkspaceProduct)(product);
21
41
  };
22
42
  exports.isSupportedProduct = isSupportedProduct;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli-shared",
3
- "version": "3.16.0-next.16",
3
+ "version": "3.16.0-next.18",
4
4
  "description": "Common functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -37,7 +37,7 @@
37
37
  "keytar": "^7.9.0",
38
38
  "launchdarkly-node-client-sdk": "^2.2.2",
39
39
  "node-fetch": "2.6.12",
40
- "ora": "^4.0.3",
40
+ "ora": "^4.1.1",
41
41
  "recursive-readdir": "^2.2.3",
42
42
  "semver": "^6.3.0",
43
43
  "terminal-link": "^2.1.1",