@forge/cli-shared 6.6.1-next.1 → 6.6.1-next.11
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 +69 -0
- package/out/graphql/graphql-types.d.ts +1939 -210
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +198 -41
- package/out/service/supported-products-service.d.ts +28 -19
- package/out/service/supported-products-service.d.ts.map +1 -1
- package/out/service/supported-products-service.js +89 -73
- package/out/ui/command-line-ui.d.ts +1 -1
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +3 -2
- package/out/ui/table-prompt.d.ts +2 -0
- package/out/ui/table-prompt.d.ts.map +1 -1
- package/out/ui/table-prompt.js +23 -2
- package/out/ui/text.d.ts +5 -1
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +8 -1
- package/out/ui/ui.d.ts +4 -4
- package/out/ui/ui.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -2,28 +2,37 @@
|
|
|
2
2
|
import { StatsigService } from './statsig-service';
|
|
3
3
|
import { URL } from 'url';
|
|
4
4
|
import { ProductDisplayName } from '../shared';
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
export declare type SupportedProduct = 'Jira' | 'Confluence' | 'Compass' | 'Teamwork Graph' | 'Atlas' | 'Bitbucket';
|
|
6
|
+
declare type ProductType = 'sited' | 'workspace';
|
|
7
|
+
export declare type ProductDefinition = {
|
|
8
|
+
name: SupportedProduct;
|
|
9
|
+
productType: ProductType;
|
|
10
|
+
special?: {
|
|
11
|
+
supportedByCrossProductApps?: boolean;
|
|
12
|
+
isEnabledByFeatureGate?: (statsigService: StatsigService) => Promise<boolean>;
|
|
13
|
+
};
|
|
11
14
|
};
|
|
12
|
-
|
|
15
|
+
declare class SupportedProductEntry {
|
|
16
|
+
productName: SupportedProduct;
|
|
17
|
+
productType: ProductType;
|
|
18
|
+
supportedByCrossProductApps: boolean;
|
|
19
|
+
constructor(productName: SupportedProduct, productType: ProductType, supportedByCrossProductApps: boolean);
|
|
20
|
+
}
|
|
21
|
+
declare function resolveEnabledProducts(statsigService: StatsigService): Promise<SupportedProductEntry[]>;
|
|
13
22
|
export declare class SupportedProductsService {
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
validateSupportedProduct(productNameInput: string): Promise<SupportedProduct>;
|
|
24
|
-
isWorkspaceProduct(product: string): Promise<boolean>;
|
|
25
|
-
validateSite(site: string, product: ProductDisplayName | undefined): Promise<URL>;
|
|
23
|
+
private supportedProducts?;
|
|
24
|
+
constructor(supportedProducts?: SupportedProductEntry[] | undefined);
|
|
25
|
+
initializeWithSupportedProducts(statsigService: StatsigService): Promise<void>;
|
|
26
|
+
private getSupportedProductsNames;
|
|
27
|
+
getSupportedProducts(): SupportedProduct[];
|
|
28
|
+
getSupportedSecondaryProductsForXPA(requiredProducts: string[]): SupportedProduct[];
|
|
29
|
+
validateSupportedProduct(productNameInput: string): SupportedProduct;
|
|
30
|
+
isWorkspaceProduct(product: string): boolean;
|
|
31
|
+
validateSite(site: string, product: ProductDisplayName | undefined): URL;
|
|
26
32
|
}
|
|
27
33
|
export declare const isBitbucketProduct: (product: string) => boolean;
|
|
34
|
+
export declare const TEST_ONLY_EXPORTS: {
|
|
35
|
+
resolveEnabledProducts: typeof resolveEnabledProducts;
|
|
36
|
+
};
|
|
28
37
|
export {};
|
|
29
38
|
//# sourceMappingURL=supported-products-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-products-service.d.ts","sourceRoot":"","sources":["../../src/service/supported-products-service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAuC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"supported-products-service.d.ts","sourceRoot":"","sources":["../../src/service/supported-products-service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAuC,MAAM,WAAW,CAAC;AAKpF,oBAAY,gBAAgB,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC;AA8C5G,aAAK,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAEzC,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE;QACR,2BAA2B,CAAC,EAAE,OAAO,CAAC;QACtC,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;KAC/E,CAAC;CACH,CAAC;AAEF,cAAM,qBAAqB;IAEhB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,WAAW;IACxB,2BAA2B,EAAE,OAAO;gBAFpC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,WAAW,EACxB,2BAA2B,EAAE,OAAO;CAE9C;AAED,iBAAe,sBAAsB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAgBtG;AAED,qBAAa,wBAAwB;IAKvB,OAAO,CAAC,iBAAiB,CAAC;gBAAlB,iBAAiB,CAAC,qCAAyB;IAElD,+BAA+B,CAAC,cAAc,EAAE,cAAc;IAS3E,OAAO,CAAC,yBAAyB;IAS1B,oBAAoB,IAAI,gBAAgB,EAAE;IAI1C,mCAAmC,CAAC,gBAAgB,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE;IAOnF,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,GAAG,gBAAgB;IAWpE,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAO5C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,GAAG;CAqBhF;AAID,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAGF,eAAO,MAAM,iBAAiB;;CAE7B,CAAC"}
|
|
@@ -1,103 +1,116 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TEST_ONLY_EXPORTS = exports.isBitbucketProduct = exports.SupportedProductsService = void 0;
|
|
4
4
|
const url_1 = require("url");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
6
|
const ui_1 = require("../ui");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
const SUPPORTED_PRODUCTS_DEFINITIONS = [
|
|
8
|
+
{
|
|
9
|
+
name: 'Jira',
|
|
10
|
+
productType: 'sited',
|
|
11
|
+
special: {
|
|
12
|
+
supportedByCrossProductApps: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Confluence',
|
|
17
|
+
productType: 'sited',
|
|
18
|
+
special: {
|
|
19
|
+
supportedByCrossProductApps: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Compass',
|
|
24
|
+
productType: 'sited',
|
|
25
|
+
special: {
|
|
26
|
+
supportedByCrossProductApps: true
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Teamwork Graph',
|
|
31
|
+
productType: 'sited',
|
|
32
|
+
special: {
|
|
33
|
+
isEnabledByFeatureGate: async (statsigService) => statsigService.isTeamworkGraphProductSupported()
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'Atlas',
|
|
38
|
+
productType: 'sited',
|
|
39
|
+
special: {
|
|
40
|
+
isEnabledByFeatureGate: async (statsigService) => statsigService.isAtlasProductSupported()
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'Bitbucket',
|
|
45
|
+
productType: 'workspace'
|
|
46
|
+
}
|
|
19
47
|
];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
class SupportedProductEntry {
|
|
49
|
+
productName;
|
|
50
|
+
productType;
|
|
51
|
+
supportedByCrossProductApps;
|
|
52
|
+
constructor(productName, productType, supportedByCrossProductApps) {
|
|
53
|
+
this.productName = productName;
|
|
54
|
+
this.productType = productType;
|
|
55
|
+
this.supportedByCrossProductApps = supportedByCrossProductApps;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function resolveEnabledProducts(statsigService) {
|
|
59
|
+
const productDefinitionWithIsEnabledResolved = await Promise.all(SUPPORTED_PRODUCTS_DEFINITIONS.map(async (pd) => {
|
|
60
|
+
const enabledByFeatureGateResolver = pd.special?.isEnabledByFeatureGate;
|
|
61
|
+
const isEnabled = enabledByFeatureGateResolver ? await enabledByFeatureGateResolver(statsigService) : true;
|
|
62
|
+
return { pd, isEnabled };
|
|
63
|
+
}));
|
|
64
|
+
const definitionsForEnabledProducts = productDefinitionWithIsEnabledResolved
|
|
65
|
+
.filter(({ isEnabled }) => isEnabled)
|
|
66
|
+
.map(({ pd }) => pd);
|
|
67
|
+
return definitionsForEnabledProducts.map((pd) => {
|
|
68
|
+
return new SupportedProductEntry(pd.name, pd.productType, pd.special?.supportedByCrossProductApps ?? false);
|
|
69
|
+
});
|
|
29
70
|
}
|
|
30
71
|
class SupportedProductsService {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.statsigService = statsigService;
|
|
35
|
-
}
|
|
36
|
-
async buildFeatureGatedProduct(productName, productType, isEnabledPromise) {
|
|
37
|
-
return {
|
|
38
|
-
productName,
|
|
39
|
-
productType,
|
|
40
|
-
isEnabled: await isEnabledPromise
|
|
41
|
-
};
|
|
72
|
+
supportedProducts;
|
|
73
|
+
constructor(supportedProducts) {
|
|
74
|
+
this.supportedProducts = supportedProducts;
|
|
42
75
|
}
|
|
43
|
-
async
|
|
44
|
-
if (this.
|
|
45
|
-
|
|
46
|
-
this.buildFeatureGatedProduct('Teamwork Graph', 'sited', this.statsigService.isTeamworkGraphProductSupported()),
|
|
47
|
-
this.buildFeatureGatedProduct('Atlas', 'sited', this.statsigService.isAtlasProductSupported())
|
|
48
|
-
]);
|
|
76
|
+
async initializeWithSupportedProducts(statsigService) {
|
|
77
|
+
if (this.supportedProducts) {
|
|
78
|
+
throw new Error('SupportedProductsService is already initialized');
|
|
49
79
|
}
|
|
50
|
-
|
|
80
|
+
this.supportedProducts = await resolveEnabledProducts(statsigService);
|
|
51
81
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.filter((gatedProductInfo) => gatedProductInfo.isEnabled && filter(gatedProductInfo))
|
|
56
|
-
.map((product) => product.productName);
|
|
57
|
-
}
|
|
58
|
-
ensureProductDisplayName(product) {
|
|
59
|
-
if (arrayContains(SUPPORTED_PRODUCTS_ALL, product)) {
|
|
60
|
-
return product;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return (0, shared_1.productDisplayName)(product);
|
|
82
|
+
getSupportedProductsNames(filter = () => true) {
|
|
83
|
+
if (!this.supportedProducts) {
|
|
84
|
+
throw new Error('SupportedProductsService is not initialized, are you calling it from some constructor?');
|
|
64
85
|
}
|
|
86
|
+
return this.supportedProducts.filter((p) => filter(p)).map((p) => p.productName);
|
|
65
87
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return [...SITED_PRODUCTS_ALWAYS_ENABLED.filter((product) => product !== primaryProduct)];
|
|
69
|
-
}
|
|
70
|
-
return [
|
|
71
|
-
...SITED_PRODUCTS_ALWAYS_ENABLED,
|
|
72
|
-
...WORKSPACE_PRODUCTS_ALWAYS_ENABLED,
|
|
73
|
-
...(await this.getProductsEnabledByFeatureGate())
|
|
74
|
-
];
|
|
88
|
+
getSupportedProducts() {
|
|
89
|
+
return this.getSupportedProductsNames();
|
|
75
90
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
...(await this.getProductsEnabledByFeatureGate((product) => product.productType == 'workspace'))
|
|
80
|
-
];
|
|
91
|
+
getSupportedSecondaryProductsForXPA(requiredProducts) {
|
|
92
|
+
const requiredProductsNames = requiredProducts.map((p) => (0, shared_1.productDisplayName)(p));
|
|
93
|
+
return this.getSupportedProductsNames((p) => p.supportedByCrossProductApps && !requiredProductsNames.includes(p.productName));
|
|
81
94
|
}
|
|
82
|
-
|
|
95
|
+
validateSupportedProduct(productNameInput) {
|
|
83
96
|
const productName = (0, shared_1.productDisplayName)(productNameInput);
|
|
84
|
-
const supportedProducts =
|
|
85
|
-
if (
|
|
97
|
+
const supportedProducts = this.getSupportedProducts();
|
|
98
|
+
if (supportedProducts.includes(productName)) {
|
|
86
99
|
return productName;
|
|
87
100
|
}
|
|
88
101
|
else {
|
|
89
102
|
throw new shared_1.ValidationError(ui_1.Text.error.invalidProduct);
|
|
90
103
|
}
|
|
91
104
|
}
|
|
92
|
-
|
|
93
|
-
return
|
|
105
|
+
isWorkspaceProduct(product) {
|
|
106
|
+
return this.getSupportedProductsNames((p) => p.productType === 'workspace').includes((0, shared_1.productDisplayName)(product));
|
|
94
107
|
}
|
|
95
|
-
|
|
108
|
+
validateSite(site, product) {
|
|
96
109
|
const trySites = [site, `https://${site}`];
|
|
97
110
|
for (const trySite of trySites) {
|
|
98
111
|
try {
|
|
99
112
|
const urlObj = new url_1.URL(trySite);
|
|
100
|
-
if (product &&
|
|
113
|
+
if (product && this.isWorkspaceProduct(product)) {
|
|
101
114
|
return urlObj;
|
|
102
115
|
}
|
|
103
116
|
urlObj.pathname = '/';
|
|
@@ -114,3 +127,6 @@ const isBitbucketProduct = (product) => {
|
|
|
114
127
|
return (0, shared_1.productDisplayName)(product) === 'Bitbucket';
|
|
115
128
|
};
|
|
116
129
|
exports.isBitbucketProduct = isBitbucketProduct;
|
|
130
|
+
exports.TEST_ONLY_EXPORTS = {
|
|
131
|
+
resolveEnabledProducts
|
|
132
|
+
};
|
|
@@ -32,7 +32,7 @@ export declare class CommandLineUI implements UI {
|
|
|
32
32
|
promptForList<T extends string>(message: string, choices: T[], config?: {
|
|
33
33
|
format?: (choice: T) => string;
|
|
34
34
|
}): Promise<T>;
|
|
35
|
-
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number[]>;
|
|
35
|
+
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[], isBorderless?: boolean): Promise<number[]>;
|
|
36
36
|
promptForSingleChoiceTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number>;
|
|
37
37
|
table<Key extends string>(head: [Key, string][], data: Record<Key, TableCell>[] | undefined | null, { json, emptyMessage, preMessage, postMessage, format, groupRows }?: TableOptions<Key>): void;
|
|
38
38
|
private formatTableValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":"AAEA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAiBnD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,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f,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC;IAeX,KAAK,CAAC,GAAG,SAAS,MAAM,EAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EACjD,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAE,YAAY,CAAC,GAAG,CAAM,GACzF,IAAI;IAsBP,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,QAAQ;IAwChB,OAAO,CAAC,GAAG;IAqBX,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,eAAe;YAaT,eAAe;IAa7B,OAAO,CAAC,wBAAwB;CAIjC"}
|
|
@@ -174,7 +174,7 @@ class CommandLineUI {
|
|
|
174
174
|
const formattedChoice = config?.format ? choices[formattedChoices.indexOf(choice)] : choice;
|
|
175
175
|
return formattedChoice;
|
|
176
176
|
}
|
|
177
|
-
async promptForTable(message, infoMessage, columns, choices) {
|
|
177
|
+
async promptForTable(message, infoMessage, columns, choices, isBorderless) {
|
|
178
178
|
const { choice } = await this.prompt([
|
|
179
179
|
{
|
|
180
180
|
type: 'multiple-choice-table',
|
|
@@ -182,7 +182,8 @@ class CommandLineUI {
|
|
|
182
182
|
message,
|
|
183
183
|
infoMessage,
|
|
184
184
|
columns,
|
|
185
|
-
choices
|
|
185
|
+
choices,
|
|
186
|
+
isBorderless
|
|
186
187
|
}
|
|
187
188
|
]);
|
|
188
189
|
return choice;
|
package/out/ui/table-prompt.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface TableRenderProps extends TablePromptShared {
|
|
|
9
9
|
isDone: boolean;
|
|
10
10
|
infoMessage: string;
|
|
11
11
|
promptMessage: string;
|
|
12
|
+
isBorderless?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export interface TablePromptState extends TablePromptShared {
|
|
14
15
|
done: (callback: any) => void;
|
|
@@ -30,6 +31,7 @@ export declare abstract class TablePrompt extends Base {
|
|
|
30
31
|
private pointer;
|
|
31
32
|
private options;
|
|
32
33
|
private hasMultipleChoices;
|
|
34
|
+
private isBorderless;
|
|
33
35
|
constructor(questions: any, readline: any, answers: any);
|
|
34
36
|
protected _run(callback: any): Base;
|
|
35
37
|
private attachEventHandlers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-prompt.d.ts","sourceRoot":"","sources":["../../src/ui/table-prompt.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"table-prompt.d.ts","sourceRoot":"","sources":["../../src/ui/table-prompt.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,2BAA2B,CAAC;AAa7C,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,IAAI,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,oBAAY,gBAAgB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAA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,EAAE,gBAAgB,EAC9B,SAAS,EAAE,kBAAkB,EAC7B,UAAU,EAAE,cAAc,GACzB,MAAM;IAoBT,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;CACzD"}
|
package/out/ui/table-prompt.js
CHANGED
|
@@ -7,6 +7,23 @@ const events_1 = tslib_1.__importDefault(require("inquirer/lib/utils/events"));
|
|
|
7
7
|
const readline_1 = tslib_1.__importDefault(require("inquirer/lib/utils/readline"));
|
|
8
8
|
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
9
9
|
const text_1 = require("./text");
|
|
10
|
+
const NO_BORDERS = {
|
|
11
|
+
top: '',
|
|
12
|
+
'top-mid': '',
|
|
13
|
+
'top-left': '',
|
|
14
|
+
'top-right': '',
|
|
15
|
+
bottom: '',
|
|
16
|
+
'bottom-mid': '',
|
|
17
|
+
'bottom-left': '',
|
|
18
|
+
'bottom-right': '',
|
|
19
|
+
left: '',
|
|
20
|
+
'left-mid': '',
|
|
21
|
+
mid: '',
|
|
22
|
+
'mid-mid': '',
|
|
23
|
+
right: '',
|
|
24
|
+
'right-mid': '',
|
|
25
|
+
middle: ' '
|
|
26
|
+
};
|
|
10
27
|
class TablePrompt extends base_1.default {
|
|
11
28
|
done;
|
|
12
29
|
columns;
|
|
@@ -16,6 +33,7 @@ class TablePrompt extends base_1.default {
|
|
|
16
33
|
pointer = 1;
|
|
17
34
|
options;
|
|
18
35
|
hasMultipleChoices;
|
|
36
|
+
isBorderless;
|
|
19
37
|
constructor(questions, readline, answers) {
|
|
20
38
|
super(questions, readline, answers);
|
|
21
39
|
this.options = this.opt;
|
|
@@ -24,6 +42,7 @@ class TablePrompt extends base_1.default {
|
|
|
24
42
|
this.columns = [...this.options.columns];
|
|
25
43
|
this.rows = [...this.options.choices.choices];
|
|
26
44
|
this.hasMultipleChoices = this.rows.length > 1;
|
|
45
|
+
this.isBorderless = this.options.isBorderless || false;
|
|
27
46
|
}
|
|
28
47
|
_run(callback) {
|
|
29
48
|
this.done = callback;
|
|
@@ -69,13 +88,15 @@ class TablePrompt extends base_1.default {
|
|
|
69
88
|
hasMultipleChoices: this.hasMultipleChoices,
|
|
70
89
|
promptMessage: this.promptMessage,
|
|
71
90
|
infoMessage: this.infoMessage,
|
|
72
|
-
isDone
|
|
91
|
+
isDone,
|
|
92
|
+
isBorderless: this.isBorderless
|
|
73
93
|
});
|
|
74
94
|
}
|
|
75
95
|
renderTable({ pointer, columns, rows, isDone }, getRowSymbol, formatRow, isSelected) {
|
|
76
96
|
const table = new cli_table3_1.default({
|
|
77
97
|
head: [...columns],
|
|
78
|
-
style: { head: [] }
|
|
98
|
+
style: { head: [] },
|
|
99
|
+
chars: this.isBorderless ? NO_BORDERS : {}
|
|
79
100
|
});
|
|
80
101
|
rows.forEach((row, rowIndex) => {
|
|
81
102
|
const isHover = pointer === rowIndex + 1;
|
package/out/ui/text.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare const Text: {
|
|
|
63
63
|
installationContext: {
|
|
64
64
|
overviewProduct: string;
|
|
65
65
|
promptProduct: string;
|
|
66
|
+
promptOptionalProducts: string;
|
|
66
67
|
overviewSite: string;
|
|
67
68
|
overviewWorkspace: string;
|
|
68
69
|
promptSite: string;
|
|
@@ -585,10 +586,13 @@ export declare const Text: {
|
|
|
585
586
|
install: {
|
|
586
587
|
cmd: {
|
|
587
588
|
description: string;
|
|
588
|
-
start: (envKey: string, envType: AppEnvironmentType) => string;
|
|
589
|
+
start: (envKey: string, envType: AppEnvironmentType, product: string) => string;
|
|
589
590
|
end: (displayTick: boolean) => string;
|
|
590
591
|
};
|
|
591
592
|
booleanToScope: (isLatest: boolean) => string;
|
|
593
|
+
alreadyInstalledInRequiredProduct: (product: string) => string;
|
|
594
|
+
installingToRequiredProduct: (product: string) => string;
|
|
595
|
+
installingToOptionalProduct: string;
|
|
592
596
|
bannerSite: string;
|
|
593
597
|
bannerWorkspace: string;
|
|
594
598
|
optionConfirmScopes: string;
|
package/out/ui/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AA2BD,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAsD,CAAC;AAoDjG,eAAO,MAAM,IAAI;;;;;6BAiBM,MAAM;2BACR,MAAM;6BAGJ,MAAM;+BAEJ,MAAM;;wCAIK,MAAM,UAAU,MAAM;qDAOT,MAAM,sBAAsB,MAAM;;;;;;6CAc1C,MAAM,YAAY,MAAM,YAAY,MAAM;;;kDAQrC,MAAM,EAAE;gDAKV,MAAM,aAAa,MAAM;8CAG3B,MAAM,aAAa,MAAM;uCAGhC,MAAM;iCAEZ,MAAM;;;;;;;;;;;;;;;kDAoBS,MAAM;;;;;;yCASb,MAAM;;;mDAYI,MAAM,yBAAyB,MAAM;;6BAM7D,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AA2BD,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAsD,CAAC;AAoDjG,eAAO,MAAM,IAAI;;;;;6BAiBM,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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
|
@@ -112,6 +112,7 @@ exports.Text = {
|
|
|
112
112
|
installationContext: {
|
|
113
113
|
overviewProduct: 'Select the product your app uses.\n',
|
|
114
114
|
promptProduct: 'Select a product:',
|
|
115
|
+
promptOptionalProducts: 'Select optional products:',
|
|
115
116
|
overviewSite: '\nEnter your site. For example, your-domain.atlassian.net\n',
|
|
116
117
|
overviewWorkspace: '\nEnter your workspace. For example, bitbucket.org/your-workspace\n',
|
|
117
118
|
promptSite: 'Enter the site URL:',
|
|
@@ -691,10 +692,16 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
691
692
|
install: {
|
|
692
693
|
cmd: {
|
|
693
694
|
description: 'manage app installations',
|
|
694
|
-
start: (envKey, envType) =>
|
|
695
|
+
start: (envKey, envType, product) => {
|
|
696
|
+
const productText = product ? `in ${product} ` : '';
|
|
697
|
+
return `Installing your app ${productText}on to ${exports.Text.env.displayEnvironment(envKey, envType)}...`;
|
|
698
|
+
},
|
|
695
699
|
end: (displayTick) => `${displayTick ? greenTick + ' ' : ''}Install complete!`
|
|
696
700
|
},
|
|
697
701
|
booleanToScope: (isLatest) => (isLatest ? `Latest` : `Out-of-date`),
|
|
702
|
+
alreadyInstalledInRequiredProduct: (product) => `\nYou have already installed this app into your required product,${chalk_1.default.reset(' ')}${chalk_1.default.bold(product)}.\n`,
|
|
703
|
+
installingToRequiredProduct: (product) => `\nYour app will be installed into your required product,${chalk_1.default.reset(' ')}${chalk_1.default.bold(product)}. Once this is done, you can install your app into any optional products.\n`,
|
|
704
|
+
installingToOptionalProduct: `This app will be installed as an optional product.`,
|
|
698
705
|
bannerSite: `\nInstalling your app onto an Atlassian site.\n${ctrlC}\n`,
|
|
699
706
|
bannerWorkspace: `\nInstalling your app onto the selected workspace.\n${ctrlC}\n`,
|
|
700
707
|
optionConfirmScopes: 'skip confirmation of scopes for the app before installing or upgrading the app',
|
package/out/ui/ui.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export interface Prompt {
|
|
|
4
4
|
confirm(message: string): Promise<boolean>;
|
|
5
5
|
promptForText(message: string, defaultValue?: string): Promise<string>;
|
|
6
6
|
promptForSecret(message: string): Promise<string>;
|
|
7
|
-
promptForList(message: string, choices:
|
|
8
|
-
format?: (
|
|
9
|
-
}): Promise<
|
|
10
|
-
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number[]>;
|
|
7
|
+
promptForList<T extends string>(message: string, choices: T[], config?: {
|
|
8
|
+
format?: (choice: T) => string;
|
|
9
|
+
}): Promise<T>;
|
|
10
|
+
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[], isBorderless?: boolean): Promise<number[]>;
|
|
11
11
|
promptForSingleChoiceTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number>;
|
|
12
12
|
}
|
|
13
13
|
export declare type TableCell = string | boolean | null | undefined;
|
package/out/ui/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvE,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACvE,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,aAAa,CAAC,CAAC,SAAS,MAAM,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,EAAE,EACZ,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,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EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpG,KAAK,CAAC,GAAG,SAAS,MAAM,EACtB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EACjD,OAAO,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,GAC1B,IAAI,CAAC;CACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "6.6.1-next.
|
|
3
|
+
"version": "6.6.1-next.11",
|
|
4
4
|
"description": "Common functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"generate-graphql-types": "graphql-codegen --config src/graphql/codegen.yml"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forge/manifest": "8.
|
|
16
|
-
"@forge/util": "1.4.
|
|
15
|
+
"@forge/manifest": "8.7.0-next.6",
|
|
16
|
+
"@forge/util": "1.4.8-next.0",
|
|
17
17
|
"@forge/i18n": "0.0.3",
|
|
18
18
|
"@sentry/node": "7.106.0",
|
|
19
19
|
"adm-zip": "^0.5.10",
|