@forge/cli-shared 6.5.5-next.1 → 6.6.0-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/LICENSE.txt +7 -0
- package/out/ari/ari.d.ts +4 -9
- package/out/ari/ari.d.ts.map +1 -1
- package/out/ari/ari.js +8 -22
- package/out/graphql/graphql-types.d.ts +1584 -9
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +82 -23
- package/out/service/index.d.ts +1 -0
- package/out/service/index.d.ts.map +1 -1
- package/out/service/index.js +1 -0
- package/out/service/statsig-service.d.ts +3 -1
- package/out/service/statsig-service.d.ts.map +1 -1
- package/out/service/statsig-service.js +6 -0
- package/out/service/supported-products-service.d.ts +28 -0
- package/out/service/supported-products-service.d.ts.map +1 -0
- package/out/service/supported-products-service.js +112 -0
- package/out/shared/index.d.ts +0 -1
- package/out/shared/index.d.ts.map +1 -1
- package/out/shared/index.js +0 -1
- package/out/shared/product.d.ts +3 -8
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +18 -29
- package/out/ui/text.d.ts +136 -4
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +149 -9
- package/package.json +5 -5
- package/out/shared/validate.d.ts +0 -3
- package/out/shared/validate.d.ts.map +0 -1
- package/out/shared/validate.js +0 -24
package/out/shared/index.js
CHANGED
|
@@ -8,7 +8,6 @@ tslib_1.__exportStar(require("./error-handling"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./mock-logger"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./pause"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./product"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./validate"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("./read-app-config-files"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("./cli-details"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./assertUnreachable"), exports);
|
package/out/shared/product.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare function
|
|
3
|
-
|
|
4
|
-
}): string[];
|
|
5
|
-
export declare function productDisplayName(ariResourceOwner: string): string;
|
|
1
|
+
export declare type ProductDisplayName = string;
|
|
2
|
+
export declare function productsDisplayName(primaryResourceOwner: string, secondaryResourceOwners?: string[]): string;
|
|
3
|
+
export declare function productDisplayName(ariResourceOwnerOrUserProvidedProductName: string): ProductDisplayName;
|
|
6
4
|
export declare function ariResourceOwner(productDisplayName: string): string;
|
|
7
|
-
export declare const isWorkspaceProduct: (product: string) => boolean;
|
|
8
|
-
export declare const isBitbucketProduct: (product: string) => boolean;
|
|
9
|
-
export declare const isSupportedProduct: (product: string) => boolean;
|
|
10
5
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"
|
|
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,oBAAoB,EAAE,MAAM,EAAE,uBAAuB,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
|
@@ -1,40 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ariResourceOwner = exports.productDisplayName = exports.productsDisplayName = void 0;
|
|
4
4
|
const case_1 = require("case");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Atlas: 'townsquare'
|
|
5
|
+
const RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME = {
|
|
6
|
+
townsquare: 'Atlas',
|
|
7
|
+
graph: 'Teamwork Graph'
|
|
9
8
|
};
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (
|
|
16
|
-
|
|
9
|
+
const PRODUCT_DISPLAY_NAME_TO_RESOURCE_OWNER = Object.entries(RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME).reduce((acc, [key, value]) => {
|
|
10
|
+
acc[value] = key;
|
|
11
|
+
return acc;
|
|
12
|
+
}, {});
|
|
13
|
+
function productsDisplayName(primaryResourceOwner, secondaryResourceOwners = []) {
|
|
14
|
+
if (secondaryResourceOwners.length === 0) {
|
|
15
|
+
return productDisplayName(primaryResourceOwner);
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
const primaryProduct = `${productDisplayName(primaryResourceOwner)} (Primary)`;
|
|
18
|
+
return [primaryProduct, ...secondaryResourceOwners.map(productDisplayName)].join(', ');
|
|
19
19
|
}
|
|
20
|
-
exports.
|
|
21
|
-
function productDisplayName(
|
|
22
|
-
|
|
20
|
+
exports.productsDisplayName = productsDisplayName;
|
|
21
|
+
function productDisplayName(ariResourceOwnerOrUserProvidedProductName) {
|
|
22
|
+
const resourceOwner = ariResourceOwnerOrUserProvidedProductName.toLowerCase();
|
|
23
|
+
return RESOURCE_OWNER_TO_PRODUCT_DISPLAY_NAME[resourceOwner] ?? (0, case_1.capital)(ariResourceOwnerOrUserProvidedProductName);
|
|
23
24
|
}
|
|
24
25
|
exports.productDisplayName = productDisplayName;
|
|
25
26
|
function ariResourceOwner(productDisplayName) {
|
|
26
|
-
return
|
|
27
|
+
return PRODUCT_DISPLAY_NAME_TO_RESOURCE_OWNER[productDisplayName] ?? productDisplayName.toLowerCase();
|
|
27
28
|
}
|
|
28
29
|
exports.ariResourceOwner = ariResourceOwner;
|
|
29
|
-
const isWorkspaceProduct = (product) => {
|
|
30
|
-
return exports.WORKSPACE_PRODUCTS.includes(productDisplayName(product));
|
|
31
|
-
};
|
|
32
|
-
exports.isWorkspaceProduct = isWorkspaceProduct;
|
|
33
|
-
const isBitbucketProduct = (product) => {
|
|
34
|
-
return productDisplayName(product) === 'Bitbucket';
|
|
35
|
-
};
|
|
36
|
-
exports.isBitbucketProduct = isBitbucketProduct;
|
|
37
|
-
const isSupportedProduct = (product) => {
|
|
38
|
-
return SUPPORTED_PRODUCTS.includes(productDisplayName(product)) || (0, exports.isWorkspaceProduct)(product);
|
|
39
|
-
};
|
|
40
|
-
exports.isSupportedProduct = isSupportedProduct;
|
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;
|
|
@@ -399,8 +532,8 @@ export declare const Text: {
|
|
|
399
532
|
lintError: string;
|
|
400
533
|
lintWarning: (numWarnings: number) => string;
|
|
401
534
|
};
|
|
402
|
-
|
|
403
|
-
|
|
535
|
+
hasNoAppInstallationsForEnv: {
|
|
536
|
+
hasNoAppInstallationsForEnvError: string;
|
|
404
537
|
};
|
|
405
538
|
majorVersion: {
|
|
406
539
|
description: string;
|
|
@@ -535,7 +668,7 @@ export declare const Text: {
|
|
|
535
668
|
banner: string;
|
|
536
669
|
noResourceId: string;
|
|
537
670
|
noCloudId: string;
|
|
538
|
-
|
|
671
|
+
noResourceIdInWorkspace: string;
|
|
539
672
|
noInstallations: string;
|
|
540
673
|
};
|
|
541
674
|
tunnel: {
|
|
@@ -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
|
overViewInstallationTable: 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;
|
|
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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AAO;;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) =>
|
|
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',
|
|
@@ -491,8 +632,8 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
491
632
|
return log_color_1.LogColor.warn(`${pluralCheckedTotal} found. Run ${forge('lint')} to review the warnings.`);
|
|
492
633
|
}
|
|
493
634
|
},
|
|
494
|
-
|
|
495
|
-
|
|
635
|
+
hasNoAppInstallationsForEnv: {
|
|
636
|
+
hasNoAppInstallationsForEnvError: log_color_1.LogColor.error(`Error: The deployment failed due to errors while trying to determine if the app has any installations for the deployed environment.`)
|
|
496
637
|
},
|
|
497
638
|
majorVersion: {
|
|
498
639
|
description: 'specify a major version to update (Preview)',
|
|
@@ -663,7 +804,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
663
804
|
banner: `\nShowing all the current installations of your app:`,
|
|
664
805
|
noResourceId: 'Unknown site with no resource ID',
|
|
665
806
|
noCloudId: 'Unknown workspace with no cloud ID',
|
|
666
|
-
|
|
807
|
+
noResourceIdInWorkspace: 'Unknown workspace with no resource ID',
|
|
667
808
|
noInstallations: `The app is not installed anywhere.\nRun ${forge('install')} to install your app on an Atlassian site.\n`
|
|
668
809
|
},
|
|
669
810
|
tunnel: {
|
|
@@ -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
|
|
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
|
-
|
|
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,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0-next.11",
|
|
4
4
|
"description": "Common functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"main": "out/index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "yarn run clean && yarn run compile",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"generate-graphql-types": "graphql-codegen --config src/graphql/codegen.yml"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forge/manifest": "8.6.1-next.
|
|
16
|
-
"@forge/util": "1.4.
|
|
17
|
-
"@forge/i18n": "0.0.3-next.
|
|
15
|
+
"@forge/manifest": "8.6.1-next.4",
|
|
16
|
+
"@forge/util": "1.4.7-next.2",
|
|
17
|
+
"@forge/i18n": "0.0.3-next.2",
|
|
18
18
|
"@sentry/node": "7.106.0",
|
|
19
19
|
"adm-zip": "^0.5.10",
|
|
20
20
|
"array.prototype.flatmap": "^1.3.2",
|
package/out/shared/validate.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK1B,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,GAkBxE,CAAC"}
|
package/out/shared/validate.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateSite = void 0;
|
|
4
|
-
const url_1 = require("url");
|
|
5
|
-
const ui_1 = require("../ui");
|
|
6
|
-
const error_handling_1 = require("./error-handling");
|
|
7
|
-
const product_1 = require("./product");
|
|
8
|
-
const validateSite = (site, product) => {
|
|
9
|
-
const trySites = [site, `https://${site}`];
|
|
10
|
-
for (const trySite of trySites) {
|
|
11
|
-
try {
|
|
12
|
-
const urlObj = new url_1.URL(trySite);
|
|
13
|
-
if (product && (0, product_1.isWorkspaceProduct)(product)) {
|
|
14
|
-
return urlObj;
|
|
15
|
-
}
|
|
16
|
-
urlObj.pathname = '/';
|
|
17
|
-
return urlObj;
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
throw new error_handling_1.ValidationError(ui_1.Text.error.invalidSite);
|
|
23
|
-
};
|
|
24
|
-
exports.validateSite = validateSite;
|