@forge/cli-shared 6.6.1-next.2 → 6.6.1-next.21
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 +128 -0
- package/out/graphql/graphql-types.d.ts +2956 -343
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +247 -49
- 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 +104 -73
- package/out/shared/error-handling.d.ts +3 -0
- package/out/shared/error-handling.d.ts.map +1 -1
- package/out/shared/error-handling.js +7 -1
- package/out/shared/product.d.ts +1 -1
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +5 -5
- package/out/ui/command-line-ui.d.ts +2 -1
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +6 -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 +9 -2
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +17 -7
- package/out/ui/ui.d.ts +5 -4
- package/out/ui/ui.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -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 supportedProductEntriesHolder;
|
|
24
|
+
constructor(supportedProductEntries?: SupportedProductEntry[]);
|
|
25
|
+
initializeWithSupportedProducts(statsigService: StatsigService): Promise<void>;
|
|
26
|
+
private getFilteredSupportedProducts;
|
|
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;AA2BD,qBAAa,wBAAwB;IACnC,OAAO,CAAC,6BAA6B,CAAgC;gBAMzD,uBAAuB,CAAC,EAAE,qBAAqB,EAAE;IAIhD,+BAA+B,CAAC,cAAc,EAAE,cAAc;IAM3E,OAAO,CAAC,4BAA4B;IAO7B,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,131 @@
|
|
|
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
|
+
}
|
|
29
57
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
});
|
|
70
|
+
}
|
|
71
|
+
class SupportedProductEntriesHolder {
|
|
72
|
+
value;
|
|
73
|
+
constructor(value) {
|
|
74
|
+
this.value = value;
|
|
35
75
|
}
|
|
36
|
-
async
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
76
|
+
async initialize(valueProvider) {
|
|
77
|
+
if (this.value) {
|
|
78
|
+
throw new Error('SupportedProductsService was already initialized - is initialization called multiple times?');
|
|
79
|
+
}
|
|
80
|
+
this.value = await valueProvider();
|
|
42
81
|
}
|
|
43
|
-
|
|
44
|
-
if (this.
|
|
45
|
-
|
|
46
|
-
this.buildFeatureGatedProduct('Teamwork Graph', 'sited', this.statsigService.isTeamworkGraphProductSupported()),
|
|
47
|
-
this.buildFeatureGatedProduct('Atlas', 'sited', this.statsigService.isAtlasProductSupported())
|
|
48
|
-
]);
|
|
82
|
+
get() {
|
|
83
|
+
if (!this.value) {
|
|
84
|
+
throw new Error('SupportedProductsService is not initialized - are you calling it from some constructor?');
|
|
49
85
|
}
|
|
50
|
-
return this.
|
|
86
|
+
return this.value;
|
|
51
87
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
88
|
+
}
|
|
89
|
+
class SupportedProductsService {
|
|
90
|
+
supportedProductEntriesHolder;
|
|
91
|
+
constructor(supportedProductEntries) {
|
|
92
|
+
this.supportedProductEntriesHolder = new SupportedProductEntriesHolder(supportedProductEntries);
|
|
57
93
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return product;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return (0, shared_1.productDisplayName)(product);
|
|
64
|
-
}
|
|
94
|
+
async initializeWithSupportedProducts(statsigService) {
|
|
95
|
+
await this.supportedProductEntriesHolder.initialize(async () => await resolveEnabledProducts(statsigService));
|
|
65
96
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
];
|
|
97
|
+
getFilteredSupportedProducts(filter) {
|
|
98
|
+
return this.supportedProductEntriesHolder
|
|
99
|
+
.get()
|
|
100
|
+
.filter((p) => filter(p))
|
|
101
|
+
.map((p) => p.productName);
|
|
102
|
+
}
|
|
103
|
+
getSupportedProducts() {
|
|
104
|
+
return this.supportedProductEntriesHolder.get().map((p) => p.productName);
|
|
75
105
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
...(await this.getProductsEnabledByFeatureGate((product) => product.productType == 'workspace'))
|
|
80
|
-
];
|
|
106
|
+
getSupportedSecondaryProductsForXPA(requiredProducts) {
|
|
107
|
+
const requiredProductsNames = requiredProducts.map((p) => (0, shared_1.productDisplayName)(p));
|
|
108
|
+
return this.getFilteredSupportedProducts((p) => p.supportedByCrossProductApps && !requiredProductsNames.includes(p.productName));
|
|
81
109
|
}
|
|
82
|
-
|
|
110
|
+
validateSupportedProduct(productNameInput) {
|
|
83
111
|
const productName = (0, shared_1.productDisplayName)(productNameInput);
|
|
84
|
-
const supportedProducts =
|
|
85
|
-
if (
|
|
112
|
+
const supportedProducts = this.getSupportedProducts();
|
|
113
|
+
if (supportedProducts.includes(productName)) {
|
|
86
114
|
return productName;
|
|
87
115
|
}
|
|
88
116
|
else {
|
|
89
117
|
throw new shared_1.ValidationError(ui_1.Text.error.invalidProduct);
|
|
90
118
|
}
|
|
91
119
|
}
|
|
92
|
-
|
|
93
|
-
return
|
|
120
|
+
isWorkspaceProduct(product) {
|
|
121
|
+
return this.getFilteredSupportedProducts((p) => p.productType === 'workspace').includes((0, shared_1.productDisplayName)(product));
|
|
94
122
|
}
|
|
95
|
-
|
|
123
|
+
validateSite(site, product) {
|
|
96
124
|
const trySites = [site, `https://${site}`];
|
|
97
125
|
for (const trySite of trySites) {
|
|
98
126
|
try {
|
|
99
127
|
const urlObj = new url_1.URL(trySite);
|
|
100
|
-
if (product &&
|
|
128
|
+
if (product && this.isWorkspaceProduct(product)) {
|
|
101
129
|
return urlObj;
|
|
102
130
|
}
|
|
103
131
|
urlObj.pathname = '/';
|
|
@@ -114,3 +142,6 @@ const isBitbucketProduct = (product) => {
|
|
|
114
142
|
return (0, shared_1.productDisplayName)(product) === 'Bitbucket';
|
|
115
143
|
};
|
|
116
144
|
exports.isBitbucketProduct = isBitbucketProduct;
|
|
145
|
+
exports.TEST_ONLY_EXPORTS = {
|
|
146
|
+
resolveEnabledProducts
|
|
147
|
+
};
|
|
@@ -40,4 +40,7 @@ export declare class UIPromptError extends BaseError {
|
|
|
40
40
|
constructor(message?: string, isTtyError?: boolean);
|
|
41
41
|
isUserError(): boolean;
|
|
42
42
|
}
|
|
43
|
+
export declare class PartialInstallationError extends UserError {
|
|
44
|
+
constructor(message?: string);
|
|
45
|
+
}
|
|
43
46
|
//# sourceMappingURL=error-handling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/shared/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAI/B,oBAAY,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAAC,GAAG;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAKF,MAAM,WAAW,kBAAkB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,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,KAIhE,CAAC;AAEF,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AAEjD,qBAAa,cAAe,SAAQ,SAAS;CAAG;AAEhD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,qBAAa,uBAAwB,SAAQ,SAAS;CAAG;AAEzD,qBAAa,aAAc,SAAQ,SAAS;IAGxC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAD3B,OAAO,CAAC,EAAE,MAAM,EACC,UAAU,GAAE,OAAe;IAKvC,WAAW;CAGnB;AAUD,qBAAa,wBAAyB,SAAQ,SAAS;gBAMzC,OAAO,CAAC,EAAE,MAAM;CAG7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIPromptError = exports.ApplicationCompileError = exports.BundlerTSError = exports.ValidationError = exports.assertIsError = exports.wrapError = exports.exitOnError = exports.HiddenError = exports.UserError = exports.BaseError = exports.getErrorAttributes = exports.isUserError = void 0;
|
|
3
|
+
exports.PartialInstallationError = exports.UIPromptError = exports.ApplicationCompileError = exports.BundlerTSError = exports.ValidationError = exports.assertIsError = exports.wrapError = exports.exitOnError = exports.HiddenError = exports.UserError = exports.BaseError = exports.getErrorAttributes = exports.isUserError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ui_1 = require("../ui");
|
|
6
6
|
const Sentry = tslib_1.__importStar(require("@sentry/node"));
|
|
@@ -121,3 +121,9 @@ class UIPromptError extends BaseError {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
exports.UIPromptError = UIPromptError;
|
|
124
|
+
class PartialInstallationError extends UserError {
|
|
125
|
+
constructor(message) {
|
|
126
|
+
super(message);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.PartialInstallationError = PartialInstallationError;
|
package/out/shared/product.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type ProductDisplayName = string;
|
|
2
|
-
export declare function productsDisplayName(
|
|
2
|
+
export declare function productsDisplayName(requiredResourceOwner: string, optionalResourceOwners?: string[]): string;
|
|
3
3
|
export declare function productDisplayName(ariResourceOwnerOrUserProvidedProductName: string): ProductDisplayName;
|
|
4
4
|
export declare function ariResourceOwner(productDisplayName: string): string;
|
|
5
5
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB,GAAG,MAAM,CAAC;AAiBxC,wBAAgB,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB,GAAG,MAAM,CAAC;AAiBxC,wBAAgB,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,EAAE,sBAAsB,GAAE,MAAM,EAAO,GAAG,MAAM,CAOhH;AAED,wBAAgB,kBAAkB,CAAC,yCAAyC,EAAE,MAAM,GAAG,kBAAkB,CAGxG;AAED,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAEnE"}
|
package/out/shared/product.js
CHANGED
|
@@ -10,12 +10,12 @@ const PRODUCT_DISPLAY_NAME_TO_RESOURCE_OWNER = Object.entries(RESOURCE_OWNER_TO_
|
|
|
10
10
|
acc[value] = key;
|
|
11
11
|
return acc;
|
|
12
12
|
}, {});
|
|
13
|
-
function productsDisplayName(
|
|
14
|
-
if (
|
|
15
|
-
return productDisplayName(
|
|
13
|
+
function productsDisplayName(requiredResourceOwner, optionalResourceOwners = []) {
|
|
14
|
+
if (optionalResourceOwners.length === 0) {
|
|
15
|
+
return productDisplayName(requiredResourceOwner);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
return [
|
|
17
|
+
const requiredProduct = `${productDisplayName(requiredResourceOwner)} (Required)`;
|
|
18
|
+
return [requiredProduct, ...optionalResourceOwners.map(productDisplayName)].join(', ');
|
|
19
19
|
}
|
|
20
20
|
exports.productsDisplayName = productsDisplayName;
|
|
21
21
|
function productDisplayName(ariResourceOwnerOrUserProvidedProductName) {
|
|
@@ -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;
|
|
@@ -44,6 +44,7 @@ export declare class CommandLineUI implements UI {
|
|
|
44
44
|
private stopProgressSpinner;
|
|
45
45
|
private replaceStartTextOnSuccess;
|
|
46
46
|
private stopWaitSpinner;
|
|
47
|
+
clearSpinner(): void;
|
|
47
48
|
private promptForString;
|
|
48
49
|
private registerCustomUIElements;
|
|
49
50
|
}
|
|
@@ -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;IAC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AAC;IAeP,0BAA0B,CACrC,OAAO,EAAE,MAAM,EACf,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;IAahB,YAAY;YAIL,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;
|
|
@@ -325,6 +326,9 @@ class CommandLineUI {
|
|
|
325
326
|
this.spinner.stopAndPersist();
|
|
326
327
|
}
|
|
327
328
|
}
|
|
329
|
+
clearSpinner() {
|
|
330
|
+
this.spinner.text = '';
|
|
331
|
+
}
|
|
328
332
|
async promptForString(message, secret, defaultValue) {
|
|
329
333
|
const { text } = await this.prompt([
|
|
330
334
|
{
|
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;I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QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAEhE,OAAO,CAAC,QAAQ;IAMhB,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAE9D,OAAO,CAAC,MAAM;IAad,SAAS,CAAC,WAAW,CACnB,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,gBAAgB,EACpD,YAAY,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
|
@@ -49,6 +49,7 @@ export declare const Text: {
|
|
|
49
49
|
licenseModeRequired: string;
|
|
50
50
|
};
|
|
51
51
|
multipleMatchingInstallations: string;
|
|
52
|
+
partialInstallation: (failedProductInstallations: string[]) => string;
|
|
52
53
|
};
|
|
53
54
|
warning: {
|
|
54
55
|
plaintextCredentialsFound: (url: string) => string;
|
|
@@ -63,6 +64,7 @@ export declare const Text: {
|
|
|
63
64
|
installationContext: {
|
|
64
65
|
overviewProduct: string;
|
|
65
66
|
promptProduct: string;
|
|
67
|
+
promptOptionalProducts: string;
|
|
66
68
|
overviewSite: string;
|
|
67
69
|
overviewWorkspace: string;
|
|
68
70
|
promptSite: string;
|
|
@@ -585,10 +587,14 @@ export declare const Text: {
|
|
|
585
587
|
install: {
|
|
586
588
|
cmd: {
|
|
587
589
|
description: string;
|
|
588
|
-
start: (envKey: string, envType: AppEnvironmentType) => string;
|
|
589
|
-
end: (displayTick: boolean) => string;
|
|
590
|
+
start: (envKey: string, envType: AppEnvironmentType, product: string) => string;
|
|
591
|
+
end: (displayTick: boolean, product: string) => string;
|
|
590
592
|
};
|
|
591
593
|
booleanToScope: (isLatest: boolean) => string;
|
|
594
|
+
alreadyInstalledInRequiredProduct: (product: string) => string;
|
|
595
|
+
installingToRequiredProduct: (product: string) => string;
|
|
596
|
+
installingToOptionalProduct: (product: string) => string;
|
|
597
|
+
installConfirmation: (product: string, site: string) => string;
|
|
592
598
|
bannerSite: string;
|
|
593
599
|
bannerWorkspace: string;
|
|
594
600
|
optionConfirmScopes: string;
|
|
@@ -615,6 +621,7 @@ export declare const Text: {
|
|
|
615
621
|
noDeploymentFound: (environment: string) => string;
|
|
616
622
|
permissionsDeniedInstructions: (requestId: string, appId: string) => string;
|
|
617
623
|
};
|
|
624
|
+
failedAll: (site: URL, environment: string) => string;
|
|
618
625
|
security: {
|
|
619
626
|
banner: (site: string) => string;
|
|
620
627
|
questions: 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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