@forge/cli-shared 10.0.0-next.13 → 10.0.0-next.15
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 +13 -0
- package/out/app-logs/graphql-client.d.ts +2 -2
- package/out/app-logs/graphql-client.d.ts.map +1 -1
- package/out/app-logs/graphql-client.js +9 -17
- package/out/app-logs/index.d.ts +2 -2
- package/out/app-logs/index.d.ts.map +1 -1
- package/out/app-logs/index.js +2 -5
- package/out/app-logs/view-logs.d.ts +4 -4
- package/out/app-logs/view-logs.d.ts.map +1 -1
- package/out/app-logs/view-logs.js +8 -12
- package/out/apps/app-config.d.ts +2 -2
- package/out/apps/app-config.d.ts.map +1 -1
- package/out/apps/app-config.js +13 -20
- package/out/apps/create-an-app.d.ts +4 -4
- package/out/apps/create-an-app.d.ts.map +1 -1
- package/out/apps/create-an-app.js +6 -11
- package/out/apps/create-app-graphql-client.d.ts +2 -2
- package/out/apps/create-app-graphql-client.d.ts.map +1 -1
- package/out/apps/create-app-graphql-client.js +9 -14
- package/out/apps/get-app-owner.d.ts +4 -4
- package/out/apps/get-app-owner.d.ts.map +1 -1
- package/out/apps/get-app-owner.js +8 -13
- package/out/apps/index.d.ts +9 -9
- package/out/apps/index.d.ts.map +1 -1
- package/out/apps/index.js +9 -12
- package/out/apps/package-installer.d.ts +1 -1
- package/out/apps/package-installer.d.ts.map +1 -1
- package/out/apps/package-installer.js +9 -14
- package/out/apps/register-app.d.ts +4 -4
- package/out/apps/register-app.d.ts.map +1 -1
- package/out/apps/register-app.js +9 -13
- package/out/apps/sites.js +1 -4
- package/out/apps/template-module.js +27 -33
- package/out/apps/template.d.ts +3 -3
- package/out/apps/template.d.ts.map +1 -1
- package/out/apps/template.js +36 -47
- package/out/ari/ari.js +48 -63
- package/out/ari/index.d.ts +1 -1
- package/out/ari/index.d.ts.map +1 -1
- package/out/ari/index.js +1 -4
- package/out/auth/authenticator.js +2 -6
- package/out/auth/index.d.ts +3 -3
- package/out/auth/index.d.ts.map +1 -1
- package/out/auth/index.js +3 -6
- package/out/auth/instruction.js +3 -6
- package/out/auth/personal/credential-store.d.ts +2 -2
- package/out/auth/personal/credential-store.d.ts.map +1 -1
- package/out/auth/personal/credential-store.js +48 -57
- package/out/auth/personal/index.d.ts +6 -6
- package/out/auth/personal/index.d.ts.map +1 -1
- package/out/auth/personal/index.js +6 -9
- package/out/auth/personal/login.d.ts +3 -3
- package/out/auth/personal/login.d.ts.map +1 -1
- package/out/auth/personal/login.js +1 -5
- package/out/auth/personal/logout.d.ts +1 -1
- package/out/auth/personal/logout.d.ts.map +1 -1
- package/out/auth/personal/logout.js +1 -5
- package/out/auth/personal/me-graphql-client.d.ts +3 -3
- package/out/auth/personal/me-graphql-client.d.ts.map +1 -1
- package/out/auth/personal/me-graphql-client.js +7 -12
- package/out/auth/personal/token-authenticator.d.ts +3 -3
- package/out/auth/personal/token-authenticator.d.ts.map +1 -1
- package/out/auth/personal/token-authenticator.js +10 -14
- package/out/auth/personal/user-repository.d.ts +4 -4
- package/out/auth/personal/user-repository.d.ts.map +1 -1
- package/out/auth/personal/user-repository.js +5 -9
- package/out/cache/cached-conf.d.ts.map +1 -1
- package/out/cache/cached-conf.js +5 -10
- package/out/cache/index.d.ts +1 -1
- package/out/cache/index.d.ts.map +1 -1
- package/out/cache/index.js +1 -4
- package/out/config/config-codec-types.js +1 -2
- package/out/config/config-file-section-reader.d.ts +3 -3
- package/out/config/config-file-section-reader.d.ts.map +1 -1
- package/out/config/config-file-section-reader.js +4 -10
- package/out/config/config-file-section-writer.d.ts +3 -3
- package/out/config/config-file-section-writer.d.ts.map +1 -1
- package/out/config/config-file-section-writer.js +2 -7
- package/out/config/config-file.d.ts +3 -3
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +40 -49
- package/out/config/config-section.js +4 -11
- package/out/config/config.d.ts +1 -1
- package/out/config/config.d.ts.map +1 -1
- package/out/config/config.js +7 -13
- package/out/config/index.d.ts +6 -6
- package/out/config/index.d.ts.map +1 -1
- package/out/config/index.js +6 -9
- package/out/file-system/archiver.d.ts +2 -2
- package/out/file-system/archiver.d.ts.map +1 -1
- package/out/file-system/archiver.js +20 -29
- package/out/file-system/file-system-reader.d.ts.map +1 -1
- package/out/file-system/file-system-reader.js +21 -26
- package/out/file-system/file-system-writer.js +5 -10
- package/out/file-system/index.d.ts +5 -5
- package/out/file-system/index.d.ts.map +1 -1
- package/out/file-system/index.js +5 -8
- package/out/file-system/util.js +1 -4
- package/out/file-system/zip-accessor.js +3 -8
- package/out/graphql/app-environment-graphql-client.d.ts +2 -2
- package/out/graphql/app-environment-graphql-client.d.ts.map +1 -1
- package/out/graphql/app-environment-graphql-client.js +10 -16
- package/out/graphql/app-oauth-client-id-graphql-client.d.ts +1 -1
- package/out/graphql/app-oauth-client-id-graphql-client.d.ts.map +1 -1
- package/out/graphql/app-oauth-client-id-graphql-client.js +6 -10
- package/out/graphql/debugging-graphql-runner.d.ts +2 -2
- package/out/graphql/debugging-graphql-runner.d.ts.map +1 -1
- package/out/graphql/debugging-graphql-runner.js +5 -10
- package/out/graphql/gateway.js +15 -23
- package/out/graphql/get-mutation-error.js +4 -8
- package/out/graphql/gql/gql.d.ts +82 -82
- package/out/graphql/gql/gql.d.ts.map +1 -1
- package/out/graphql/gql/gql.js +2 -6
- package/out/graphql/gql/graphql.d.ts +214 -12
- package/out/graphql/gql/graphql.d.ts.map +1 -1
- package/out/graphql/gql/graphql.js +83 -88
- package/out/graphql/gql/index.d.ts +1 -1
- package/out/graphql/gql/index.d.ts.map +1 -1
- package/out/graphql/gql/index.js +1 -4
- package/out/graphql/graphql-client.js +1 -2
- package/out/graphql/graphql-domain-types.d.ts +1 -1
- package/out/graphql/graphql-domain-types.d.ts.map +1 -1
- package/out/graphql/graphql-domain-types.js +1 -2
- package/out/graphql/graphql-runtime-enums.js +16 -19
- package/out/graphql/index.d.ts +12 -12
- package/out/graphql/index.d.ts.map +1 -1
- package/out/graphql/index.js +12 -17
- package/out/graphql/minimal-graphql-runner.d.ts +4 -4
- package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
- package/out/graphql/minimal-graphql-runner.js +31 -40
- package/out/graphql/mutation-aware-graphql-client.d.ts +2 -2
- package/out/graphql/mutation-aware-graphql-client.d.ts.map +1 -1
- package/out/graphql/mutation-aware-graphql-client.js +4 -10
- package/out/graphql/path-based-graphql-client-resolver.d.ts +1 -1
- package/out/graphql/path-based-graphql-client-resolver.d.ts.map +1 -1
- package/out/graphql/path-based-graphql-client-resolver.js +3 -7
- package/out/http-client/feedback-post-client.js +1 -5
- package/out/http-client/file-uploader.d.ts +1 -1
- package/out/http-client/file-uploader.d.ts.map +1 -1
- package/out/http-client/file-uploader.js +11 -18
- package/out/http-client/global-edge-http-client.js +8 -14
- package/out/http-client/index.d.ts +5 -5
- package/out/http-client/index.d.ts.map +1 -1
- package/out/http-client/index.js +5 -8
- package/out/http-client/node-request.js +10 -16
- package/out/http-client/trace.js +1 -4
- package/out/index.d.ts +13 -13
- package/out/index.d.ts.map +1 -1
- package/out/index.js +13 -16
- package/out/service/bridge-script-service.js +5 -9
- package/out/service/i18n-resource-bundling-service.js +24 -30
- package/out/service/iframe-resizer-script-service.js +5 -9
- package/out/service/index.d.ts +5 -5
- package/out/service/index.d.ts.map +1 -1
- package/out/service/index.js +5 -8
- package/out/service/statsig-service.d.ts +1 -1
- package/out/service/statsig-service.d.ts.map +1 -1
- package/out/service/statsig-service.js +9 -15
- package/out/service/supported-products-service.d.ts +2 -2
- package/out/service/supported-products-service.d.ts.map +1 -1
- package/out/service/supported-products-service.js +13 -18
- package/out/shared/assertUnreachable.js +1 -4
- package/out/shared/assistant-cli.d.ts +1 -1
- package/out/shared/assistant-cli.d.ts.map +1 -1
- package/out/shared/assistant-cli.js +15 -24
- package/out/shared/cli-details.js +6 -11
- package/out/shared/developer-console.js +12 -18
- package/out/shared/directories.js +4 -8
- package/out/shared/environment.d.ts +1 -1
- package/out/shared/environment.d.ts.map +1 -1
- package/out/shared/environment.js +19 -25
- package/out/shared/error-handling.d.ts +1 -1
- package/out/shared/error-handling.d.ts.map +1 -1
- package/out/shared/error-handling.js +24 -44
- package/out/shared/forge-cli-attribution.js +6 -11
- package/out/shared/index.d.ts +13 -13
- package/out/shared/index.d.ts.map +1 -1
- package/out/shared/index.js +13 -16
- package/out/shared/installations.js +1 -4
- package/out/shared/pause.js +1 -5
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +5 -10
- package/out/shared/read-app-config-files.d.ts +1 -1
- package/out/shared/read-app-config-files.d.ts.map +1 -1
- package/out/shared/read-app-config-files.js +6 -12
- package/out/shared/runner-signals.js +1 -5
- package/out/shared/test.d.ts +1 -1
- package/out/shared/test.d.ts.map +1 -1
- package/out/shared/test.js +24 -29
- package/out/tunnel/docker-compose-lifecycle.d.ts +3 -3
- package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
- package/out/tunnel/docker-compose-lifecycle.js +53 -70
- package/out/tunnel/index.d.ts +2 -2
- package/out/tunnel/index.d.ts.map +1 -1
- package/out/tunnel/index.js +2 -5
- package/out/tunnel/tunnel-options.js +13 -18
- package/out/ui/command-line-ui.d.ts +2 -2
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +53 -58
- package/out/ui/hint-rotation.d.ts +2 -2
- package/out/ui/hint-rotation.d.ts.map +1 -1
- package/out/ui/hint-rotation.js +2 -6
- package/out/ui/index.d.ts +8 -8
- package/out/ui/index.d.ts.map +1 -1
- package/out/ui/index.js +8 -11
- package/out/ui/log-color.js +16 -20
- package/out/ui/log-symbols.js +10 -13
- package/out/ui/logger.js +2 -6
- package/out/ui/multiple-table-prompt.d.ts +1 -1
- package/out/ui/multiple-table-prompt.d.ts.map +1 -1
- package/out/ui/multiple-table-prompt.js +13 -20
- package/out/ui/runtime-log.js +12 -16
- package/out/ui/single-table-prompt.d.ts +1 -1
- package/out/ui/single-table-prompt.d.ts.map +1 -1
- package/out/ui/single-table-prompt.js +12 -19
- package/out/ui/table-prompt.d.ts +1 -1
- package/out/ui/table-prompt.d.ts.map +1 -1
- package/out/ui/table-prompt.js +11 -16
- package/out/ui/table.d.ts.map +1 -1
- package/out/ui/table.js +4 -7
- package/out/ui/text.d.ts +1 -1
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +208 -214
- package/out/ui/ui.d.ts +2 -2
- package/out/ui/ui.d.ts.map +1 -1
- package/out/ui/ui.js +1 -2
- package/package.json +3 -2
package/out/ui/text.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const environment_1 = require("../shared/environment");
|
|
14
|
-
const developer_console_1 = require("../shared/developer-console");
|
|
15
|
-
const installations_1 = require("../shared/installations");
|
|
16
|
-
const log_color_1 = require("./log-color");
|
|
17
|
-
const log_symbols_1 = tslib_1.__importDefault(require("./log-symbols"));
|
|
1
|
+
import { MANIFEST_FILE } from '@forge/manifest';
|
|
2
|
+
import Case from 'case';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { major } from 'semver';
|
|
5
|
+
import terminalLink from 'terminal-link';
|
|
6
|
+
import { AppEnvironmentType, AppPlacementType, AppVersionDeploymentStatus, AppVersionDeploymentStep } from '../graphql/graphql-runtime-enums.js';
|
|
7
|
+
import { FORGE_CLI_PACKAGE } from '../shared/cli-details.js';
|
|
8
|
+
import { DEFAULT_ENVIRONMENT_KEY, DEFAULT_ENVIRONMENT_OPTION, environmentToOption } from '../shared/environment.js';
|
|
9
|
+
import { getDevConsoleUrl } from '../shared/developer-console.js';
|
|
10
|
+
import { MAX_BATCH_UNINSTALLS } from '../shared/installations.js';
|
|
11
|
+
import { LogColor } from './log-color.js';
|
|
12
|
+
import logSymbols from './log-symbols.js';
|
|
18
13
|
const ctrlC = 'Press Ctrl+C to cancel.';
|
|
19
14
|
const encryptedValue = '****';
|
|
20
15
|
var FrontendLogSourceDisplay;
|
|
@@ -23,29 +18,28 @@ var FrontendLogSourceDisplay;
|
|
|
23
18
|
FrontendLogSourceDisplay["UNCAUGHT_EXCEPTION"] = "uncaught exception";
|
|
24
19
|
FrontendLogSourceDisplay["UNHANDLED_REJECTION"] = "unhandled rejection";
|
|
25
20
|
})(FrontendLogSourceDisplay || (FrontendLogSourceDisplay = {}));
|
|
26
|
-
const greenTick = `${
|
|
27
|
-
const buildTerminalLink = (text) => (
|
|
28
|
-
const buildTerminalLabeledLink = (label, link) => (
|
|
21
|
+
const greenTick = `${chalk.bold(chalk.green('✔'))}`;
|
|
22
|
+
const buildTerminalLink = (text) => terminalLink(chalk.bold(text), text, { fallback: () => chalk.underline.bold(text) });
|
|
23
|
+
const buildTerminalLabeledLink = (label, link) => terminalLink(chalk.bold(label), link, { fallback: () => chalk.underline.bold(label) });
|
|
29
24
|
const go = (link) => buildTerminalLink(`https://go.atlassian.com/${link}`);
|
|
30
25
|
const gettingStartedDACLink = go('dac/platform/forge/getting-started/#log-in-with-an-atlassian-api-token');
|
|
31
|
-
const command = (...args) =>
|
|
26
|
+
const command = (...args) => chalk.bold(args.join(' '));
|
|
32
27
|
const forge = (...args) => command('forge', ...args);
|
|
33
|
-
const deployCommand = (subcommand, envKey, majorVersion) => forge(`deploy ${subcommand}`, '-e',
|
|
28
|
+
const deployCommand = (subcommand, envKey, majorVersion) => forge(`deploy ${subcommand}`, '-e', environmentToOption(envKey), ...(majorVersion ? ['-v', String(majorVersion)] : []));
|
|
34
29
|
const deployedDetails = (appName, envKey, envType, buildTag, numApprovals) => {
|
|
35
30
|
const buildTagText = buildTag ? ` using build with tag ${buildTag}` : '';
|
|
36
31
|
const approvalsText = numApprovals && numApprovals > 0
|
|
37
32
|
? ` with ${numApprovals} ${numApprovals === 1 ? 'approval' : 'approvals'} acknowledged`
|
|
38
33
|
: '';
|
|
39
|
-
return `${appName}${buildTagText} to the ${
|
|
34
|
+
return `${appName}${buildTagText} to the ${Text.env.displayEnvironment(envKey, envType)} environment${approvalsText}.`;
|
|
40
35
|
};
|
|
41
|
-
function itemList(items, indent) {
|
|
36
|
+
export function itemList(items, indent) {
|
|
42
37
|
return items.map((item) => `${indent ?? ' '}- ${item}`).join(`\n${indent ?? ''}`);
|
|
43
38
|
}
|
|
44
|
-
const fatalError = (message) =>
|
|
39
|
+
const fatalError = (message) => chalk.bold(chalk.red(message));
|
|
45
40
|
const approveRuleDescription = 'list of validation rules to approve';
|
|
46
|
-
const capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
47
|
-
|
|
48
|
-
const getLintMessage = (line, column, message, level, colourFunction, reference) => `${chalk_1.default.dim(`${line}:${column}`.padEnd(7))} ${colourFunction(level.padEnd(8))} ${message} ${chalk_1.default.dim(reference)}\n`;
|
|
41
|
+
export const capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
42
|
+
const getLintMessage = (line, column, message, level, colourFunction, reference) => `${chalk.dim(`${line}:${column}`.padEnd(7))} ${colourFunction(level.padEnd(8))} ${message} ${chalk.dim(reference)}\n`;
|
|
49
43
|
const checkLintTotalPlurals = (numErrors, numWarnings, numApprovals, numFixableErrors, numFixableWarnings) => ({
|
|
50
44
|
pluralCheckedErrors: `${numErrors} ${numErrors === 1 ? 'error' : 'errors'}`,
|
|
51
45
|
pluralCheckedWarnings: `${numWarnings} ${numWarnings === 1 ? 'warning' : 'warnings'}`,
|
|
@@ -55,11 +49,11 @@ const checkLintTotalPlurals = (numErrors, numWarnings, numApprovals, numFixableE
|
|
|
55
49
|
pluralCheckedFixableWarnings: `${numFixableWarnings} ${numFixableWarnings === 1 ? 'warning' : 'warnings'}`
|
|
56
50
|
});
|
|
57
51
|
const globalTargetLocation = ({ unit, org }) => unit && org
|
|
58
|
-
? `in unit ${
|
|
52
|
+
? `in unit ${chalk.bold(unit)} in organization ${chalk.bold(org)}`
|
|
59
53
|
: unit
|
|
60
|
-
? `in unit ${
|
|
61
|
-
: `in organization ${
|
|
62
|
-
|
|
54
|
+
? `in unit ${chalk.bold(unit)}`
|
|
55
|
+
: `in organization ${chalk.bold(org ?? '')}`;
|
|
56
|
+
export const Text = {
|
|
63
57
|
buildTerminalLink,
|
|
64
58
|
go,
|
|
65
59
|
error: {
|
|
@@ -67,11 +61,11 @@ exports.Text = {
|
|
|
67
61
|
credentialsFilePermissions: `The CLI couldn't securely store your login credentials in the local credentials file. ` +
|
|
68
62
|
`Set the FORGE_EMAIL and FORGE_API_TOKEN environment variables instead. See ${gettingStartedDACLink} for more.`,
|
|
69
63
|
outdatedCLIVersion: (installed, latest) => `Warning: Your version of Forge CLI is out of date. We recommend you update to the latest version to get the latest features and bug fixes.` +
|
|
70
|
-
`\nRun ${command('npm', 'install', '-g', `${
|
|
64
|
+
`\nRun ${command('npm', 'install', '-g', `${FORGE_CLI_PACKAGE}@latest`)} to update from version ${chalk.bold(installed)} to ${chalk.bold(latest)}.` +
|
|
71
65
|
`\n`,
|
|
72
66
|
outdatedNodeVersion: (compatibleNodeVersion, currentNodeVersion) => fatalError(`Unsupported Node.js version. The CLI requires Node.js ${compatibleNodeVersion}, but you're using Node.js ${currentNodeVersion}.`),
|
|
73
67
|
missingProductNameValue: 'Parameter requires an Atlassian app name. Rerun the command with a valid Atlassian app name.',
|
|
74
|
-
invalidContext: (validContexts) => `Invalid Atlassian app. Rerun ${
|
|
68
|
+
invalidContext: (validContexts) => `Invalid Atlassian app. Rerun ${chalk.bold('forge install')} with ${validContexts.length > 0
|
|
75
69
|
? `one of the following valid Atlassian apps: ${validContexts.join(', ')}`
|
|
76
70
|
: 'a valid Atlassian app'}.`,
|
|
77
71
|
missingSiteUrlValue: 'Site parameter requires a site URL. Rerun the command with a valid site URL.',
|
|
@@ -106,18 +100,18 @@ exports.Text = {
|
|
|
106
100
|
countSize: (maxSizeOfUsersWithAccess) => `User limit exceeded. The --users-with-access option allows a maximum of ${maxSizeOfUsersWithAccess} users.`
|
|
107
101
|
},
|
|
108
102
|
multipleMatchingInstallations: 'Multiple matching installations found for the provided Atlassian app when only one was expected',
|
|
109
|
-
partialInstallation: (failedProductInstallations) => `Failed to install into the following Atlassian apps: ${failedProductInstallations.join(', ')}. Run ${
|
|
103
|
+
partialInstallation: (failedProductInstallations) => `Failed to install into the following Atlassian apps: ${failedProductInstallations.join(', ')}. Run ${chalk.bold('forge install')} again to reattempt this installation.`,
|
|
110
104
|
invalidServicePort: (serviceKey) => `Invalid tunnel port value for service ${serviceKey}. The 'tunnel:port' must be an integer between 1024 and 49152. Update your manifest.yml and try again. See ${buildTerminalLink('https://developer.atlassian.com/platform/forge/containers-reference/ref-manifest/#tunnel')} for more information.`,
|
|
111
|
-
environmentIsNotDefined: (envKey) => `Environment with name ${envKey} not defined. Create this environment with ${
|
|
105
|
+
environmentIsNotDefined: (envKey) => `Environment with name ${envKey} not defined. Create this environment with ${chalk.bold(`forge environments create -e ${envKey}`)} before proceeding.`
|
|
112
106
|
},
|
|
113
107
|
warning: {
|
|
114
|
-
unsupportedNodeVersion: (_userNodeVersion, supportedNodeVersions) =>
|
|
108
|
+
unsupportedNodeVersion: (_userNodeVersion, supportedNodeVersions) => LogColor.warn(`Warning: Forge CLI supports Node.js ${supportedNodeVersions}.` +
|
|
115
109
|
`\nUnsupported Node.js versions are not guaranteed to work correctly.\n`),
|
|
116
110
|
deprecation: {
|
|
117
111
|
uikit: (modules) => {
|
|
118
|
-
return `${
|
|
112
|
+
return `${chalk.bold('Warning')}: Your app is currently using deprecated UI Kit 1 modules: ${modules.join(', ')}. ${chalk.bold('UI Kit 1')} has been deprecated on February 28, 2025. Please refer to the ${terminalLink('documentation', 'https://developer.atlassian.com/platform/forge/ui-kit/upgrade-to-ui-kit-latest/#upgrade-from-ui-kit-1-to-ui-kit-latest-version')} to upgrade your modules.`;
|
|
119
113
|
},
|
|
120
|
-
fullPage: (modules) => `${
|
|
114
|
+
fullPage: (modules) => `${chalk.bold('Warning')}: Your app is currently using deprecated modules: ${modules.join(', ')}. Please use ${chalk.bold('global:fullPage')} instead.`
|
|
121
115
|
},
|
|
122
116
|
statsigFetchFailed: (type) => `Failed to fetch Forge ${type}. Some preview features may be unavailable. Rerun the command to retry.`
|
|
123
117
|
},
|
|
@@ -130,7 +124,7 @@ exports.Text = {
|
|
|
130
124
|
overviewWorkspace: '\nEnter your workspace. For example, bitbucket.org/your-workspace\n',
|
|
131
125
|
promptSite: 'Enter the site URL:',
|
|
132
126
|
promptWorkspace: 'Enter the workspace URL:',
|
|
133
|
-
noSiteHint: `${
|
|
127
|
+
noSiteHint: `${chalk.green(`You don't have an active demo site. Run`)} ${forge('site', 'provision')} ${chalk.green(`to create a free demo site for development and testing, then install to it with`)} ${forge('install', '--demo-site')}${chalk.green('.')}\n`
|
|
134
128
|
},
|
|
135
129
|
upgradeContext: {
|
|
136
130
|
overview: (isCodeUpgrade, version, isLatest) => {
|
|
@@ -159,7 +153,7 @@ exports.Text = {
|
|
|
159
153
|
response: (result, requestId) => `◀️ GraphQL\nRequest ID: ${requestId || 'unknown'}\nResult: ${result}`,
|
|
160
154
|
error: 'Server error',
|
|
161
155
|
outdatedClientVersion: `Your version of Forge CLI is no longer supported.` +
|
|
162
|
-
`\nRun ${command('npm', 'uninstall', '-g',
|
|
156
|
+
`\nRun ${command('npm', 'uninstall', '-g', FORGE_CLI_PACKAGE)} followed by ${command('npm', 'install', '-g', FORGE_CLI_PACKAGE)} to update to the latest version.` +
|
|
163
157
|
`\n`,
|
|
164
158
|
insufficientScopes: (instructionsUrl) => `You need a token with the right authorisation scopes to access this field. To create a new token with the required scopes, visit: ${buildTerminalLink(instructionsUrl)}`
|
|
165
159
|
},
|
|
@@ -194,7 +188,7 @@ exports.Text = {
|
|
|
194
188
|
confirmInstalling: "This appends a line to your shell's config file. Would you like to continue?",
|
|
195
189
|
installing: 'Installing autocomplete. Restart your shell when installation is completed.',
|
|
196
190
|
uninstalling: 'Uninstalling autocomplete.',
|
|
197
|
-
postinstall: `\n${
|
|
191
|
+
postinstall: `\n${chalk.cyan('ℹ')} To install autocompletion for Forge, run ${forge('autocomplete', 'install')}.\n`,
|
|
198
192
|
error: {
|
|
199
193
|
badArg: (arg) => `${arg ? `Invalid argument detected: "${arg}"` : 'Missing argument'}. Expected: "install" or "uninstall".`,
|
|
200
194
|
unsupportedShell: 'Unsupported shell detected. Autocomplete functionality is only available on bash, fish, and zsh shells.',
|
|
@@ -256,11 +250,11 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
256
250
|
startPersonal: 'Creating personal app...',
|
|
257
251
|
success: (appName) => `Created ${appName}`,
|
|
258
252
|
successDetails: (directory, validEnvironmentOptions) => `\nYour app is ready to work on, deploy, and install. We created ${validEnvironmentOptions.length} environments you can deploy to: ${validEnvironmentOptions
|
|
259
|
-
.map(
|
|
260
|
-
.join(', ')}.\n\nChange to directory ${
|
|
253
|
+
.map(environmentToOption)
|
|
254
|
+
.join(', ')}.\n\nChange to directory ${chalk.bold(directory)} to see your app files.\n`
|
|
261
255
|
},
|
|
262
|
-
intro: (givenDirectory) => `Creating an app in directory ${
|
|
263
|
-
introWithCurrentDirectory: (currentDirectory) => `Creating an app in your current directory:\n\n ${
|
|
256
|
+
intro: (givenDirectory) => `Creating an app in directory ${chalk.bold(givenDirectory)}.\n`,
|
|
257
|
+
introWithCurrentDirectory: (currentDirectory) => `Creating an app in your current directory:\n\n ${chalk.bold(currentDirectory)}\n`,
|
|
264
258
|
optionTemplate: 'specify the template to use',
|
|
265
259
|
optionDirectory: 'specify the directory to create (uses the app name by default)',
|
|
266
260
|
optionSpace: `specify the Developer Space id to use (see your Developer Spaces by running ${forge('developer-spaces', 'list')})`,
|
|
@@ -333,7 +327,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
333
327
|
}
|
|
334
328
|
},
|
|
335
329
|
contributors: {
|
|
336
|
-
consoleHint: (appId) => `Building with a team? Add contributors to your app from the Developer Console: ${buildTerminalLink(
|
|
330
|
+
consoleHint: (appId) => `Building with a team? Add contributors to your app from the Developer Console: ${buildTerminalLink(getDevConsoleUrl('appContributors', appId, {
|
|
337
331
|
utmCampaign: 'app-create'
|
|
338
332
|
}))}\n`
|
|
339
333
|
}
|
|
@@ -373,13 +367,13 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
373
367
|
selectedNotFound: 'Selected Developer Space not found'
|
|
374
368
|
},
|
|
375
369
|
appEnforcementsWarnings: {
|
|
376
|
-
appNotAssignedToDeveloperSpaceWarning: `${
|
|
370
|
+
appNotAssignedToDeveloperSpaceWarning: `${chalk.bold('Warning:')} This app is not assigned to a Developer Space. ${buildTerminalLabeledLink('Assign it now', 'https://developer.atlassian.com/platform/forge/developer-space/developer-space-apps/')} to avoid ${buildTerminalLabeledLink('functionality limits', 'https://developer.atlassian.com/platform/forge/developer-space/create-developer-space/#developer-space-setup-and-app-limits')}.\n`,
|
|
377
371
|
developerSpaceSetupIncomplete: (command) => {
|
|
378
372
|
void command;
|
|
379
|
-
return `${
|
|
373
|
+
return `${chalk.bold('Warning:')} Marketplace admin action required: Complete the ${buildTerminalLabeledLink('Developer Space setup', 'https://developer.atlassian.com/platform/forge/developer-space/create-developer-space/#who-can-create-a-developer-space')} to avoid ${buildTerminalLabeledLink('functionality limits', 'https://developer.atlassian.com/platform/forge/developer-space/create-developer-space/#developer-space-setup-and-app-limits')}.\n`;
|
|
380
374
|
},
|
|
381
|
-
developerSpaceSetupIncompleteLink: (developerSpaceId) =>
|
|
382
|
-
` - Developer Space: ${buildTerminalLink(
|
|
375
|
+
developerSpaceSetupIncompleteLink: (developerSpaceId) => chalk.yellow(`Share this link with a Marketplace admin so they can finish setup:\n` +
|
|
376
|
+
` - Developer Space: ${buildTerminalLink(getDevConsoleUrl('developerSpace', developerSpaceId))}`)
|
|
383
377
|
},
|
|
384
378
|
terms: {
|
|
385
379
|
agreement: 'Please review the following agreement before continuing:\n',
|
|
@@ -389,7 +383,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
389
383
|
privacy: ` - Privacy Policy: ${buildTerminalLink('https://www.atlassian.com/legal/privacy-policy')}`,
|
|
390
384
|
pricing: ` - Pricing: ${buildTerminalLink('https://developer.atlassian.com/platform/forge/forge-platform-pricing/')}`
|
|
391
385
|
},
|
|
392
|
-
pricing: (appName) => `\nIf ${
|
|
386
|
+
pricing: (appName) => `\nIf ${chalk.cyan(appName)} exceeds the free usage allowance, I agree to be charged monthly for any excess usage based the then-current price above threshold.\n${Text.devSpace.terms.links.pricing}`,
|
|
393
387
|
acceptPrompt: 'Do you accept?',
|
|
394
388
|
accepted: (command) => `\n${greenTick} Terms accepted. Continuing with app ${command}...`,
|
|
395
389
|
notAcceptedError: 'You must accept the terms and conditions'
|
|
@@ -441,7 +435,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
441
435
|
start: `Registering app...`,
|
|
442
436
|
success: (appName) => `Registered ${appName}`,
|
|
443
437
|
successDetails: (validEnvironmentOptions) => `\nYour app is ready to work on, deploy, and install. We created ${validEnvironmentOptions.length} environments you can deploy to: ${validEnvironmentOptions
|
|
444
|
-
.map(
|
|
438
|
+
.map(environmentToOption)
|
|
445
439
|
.join(', ')}.\n\nUse ${forge('deploy')} to deploy your app to an environment.`
|
|
446
440
|
},
|
|
447
441
|
confirmQuestion: 'Are you sure you want to overwrite the existing app details?'
|
|
@@ -460,22 +454,22 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
460
454
|
env: {
|
|
461
455
|
option: `specify the environment (see your default environment by running ${forge('settings', 'list')})`,
|
|
462
456
|
invalid: 'Invalid environment name',
|
|
463
|
-
developmentOnly: (envKey) => `${
|
|
457
|
+
developmentOnly: (envKey) => `${environmentToOption(envKey)} cannot be set as default environment. Only development environments can be used.`,
|
|
464
458
|
error: {
|
|
465
459
|
appOwnerNotExist: 'Missing app owner details',
|
|
466
460
|
appNotExist: `Your app could not be found. Make sure the app details in the manifest.yml file are correct before trying again.`,
|
|
467
|
-
envNotExist: (envKey) => `Environment ${
|
|
461
|
+
envNotExist: (envKey) => `Environment ${chalk.bold(environmentToOption(envKey))} does not exist. Check the environment name and try again.`
|
|
468
462
|
},
|
|
469
463
|
displayEnvironment: (envKey, envType) => {
|
|
470
|
-
if (envType ===
|
|
471
|
-
envKey !==
|
|
472
|
-
envKey !==
|
|
473
|
-
return `${
|
|
464
|
+
if (envType === AppEnvironmentType.Development &&
|
|
465
|
+
envKey !== DEFAULT_ENVIRONMENT_KEY &&
|
|
466
|
+
envKey !== DEFAULT_ENVIRONMENT_OPTION) {
|
|
467
|
+
return `${chalk.gray('DEV')} ${environmentToOption(envKey)}`;
|
|
474
468
|
}
|
|
475
|
-
return
|
|
469
|
+
return environmentToOption(envKey);
|
|
476
470
|
},
|
|
477
471
|
warn: {
|
|
478
|
-
envWillBeCreated: (envKey) => `${
|
|
472
|
+
envWillBeCreated: (envKey) => `${chalk.bold('Warning:')} Environment ${chalk.bold(environmentToOption(envKey))} does not exist. If you continue, this development environment will be created for you.`
|
|
479
473
|
},
|
|
480
474
|
confirm: 'Do you want to continue?'
|
|
481
475
|
},
|
|
@@ -483,10 +477,10 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
483
477
|
info: 'You do not have a default development environment set. This is required to run commands without specifying an environment. Make sure not to use sensitive information when naming your default development environment.',
|
|
484
478
|
prompt: 'Enter a name for your default development environment:',
|
|
485
479
|
notSetNonInteractive: `No environment was given and you don't have a default development environment. Pass --environment, or set a default with ${forge('settings', 'set', 'default-environment', '<environment>')}.`,
|
|
486
|
-
warn: `${
|
|
480
|
+
warn: `${chalk.bold('Warning:')} A development environment with this name already exists. If you continue, you may be using the same environment as another contributor.`,
|
|
487
481
|
confirm: 'Do you want to continue?',
|
|
488
|
-
setSuccess: (envKey, envType) => `${
|
|
489
|
-
createAndSetSuccess: (envKey, envType) => `${
|
|
482
|
+
setSuccess: (envKey, envType) => `${Text.env.displayEnvironment(envKey, envType)} has been set as your default development environment`,
|
|
483
|
+
createAndSetSuccess: (envKey, envType) => `${Text.env.displayEnvironment(envKey, envType)} has been created and set as your default development environment`,
|
|
490
484
|
settingsInfo: `You can change your default development environment later by running ${forge('settings', 'set')}.`
|
|
491
485
|
},
|
|
492
486
|
varsSet: {
|
|
@@ -497,7 +491,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
497
491
|
deployTip: (environmentOption) => 'Tip: Changes to environment variables will not apply to existing deployments. ' +
|
|
498
492
|
`Please run ${environmentOption ? forge('deploy', '-e', environmentOption) : forge('deploy')} for your changes to take effect.`
|
|
499
493
|
},
|
|
500
|
-
overview: (environment, environmentType) => `Setting the value of a variable in the ${
|
|
494
|
+
overview: (environment, environmentType) => `Setting the value of a variable in the ${Text.env.displayEnvironment(environment, environmentType)} environment.`,
|
|
501
495
|
encryptInfo: 'Encrypting a variable means that the value will not be shown in the terminal.',
|
|
502
496
|
promptEncrypt: `Select if you want the value encrypted:`,
|
|
503
497
|
keyInfo: 'Use a new key to create a variable, or use an existing key to override a variable.',
|
|
@@ -510,16 +504,16 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
510
504
|
varsUnset: {
|
|
511
505
|
cmd: {
|
|
512
506
|
desc: 'remove an environment variable',
|
|
513
|
-
start: (environment, envType) => `Unsetting the variable in the ${
|
|
507
|
+
start: (environment, envType) => `Unsetting the variable in the ${Text.env.displayEnvironment(environment, envType)} environment.`,
|
|
514
508
|
success: (key) => `\n${greenTick} ${key} variable removed.`
|
|
515
509
|
}
|
|
516
510
|
},
|
|
517
511
|
varsList: {
|
|
518
512
|
hint: `\nRun ${forge('variables', 'list')} to see your environment variables.\n`,
|
|
519
513
|
cmd: 'list the environment variables',
|
|
520
|
-
empty: (environment, envType) => `There are no variables in the ${
|
|
514
|
+
empty: (environment, envType) => `There are no variables in the ${Text.env.displayEnvironment(environment, envType)} environment.\n\nUse ${forge('variables', 'set')} to create a variable.\n`,
|
|
521
515
|
encryptedValue,
|
|
522
|
-
overview: (environment, envType) => `Showing variables from the ${
|
|
516
|
+
overview: (environment, envType) => `Showing variables from the ${Text.env.displayEnvironment(environment, envType)} environment:\n`,
|
|
523
517
|
postfix: `\nNote, the values of encrypted variables are shown as ${encryptedValue}.\n`
|
|
524
518
|
},
|
|
525
519
|
providers: {
|
|
@@ -531,7 +525,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
531
525
|
start: 'Configuring provider credentials...',
|
|
532
526
|
success: 'oauth provider credentials configuration is finished.'
|
|
533
527
|
},
|
|
534
|
-
overview: (environment) => `Configuring provider in the ${
|
|
528
|
+
overview: (environment) => `Configuring provider in the ${environmentToOption(environment)} environment.`,
|
|
535
529
|
providerKeyInfo: 'Use a provider key from the list for configuration.',
|
|
536
530
|
noProviders: "Count't find providers in the manifest file. Add one.",
|
|
537
531
|
promptProviderKey: 'Select provider to configure:',
|
|
@@ -547,7 +541,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
547
541
|
cmd: {
|
|
548
542
|
desc: 'create a new development environment',
|
|
549
543
|
start: 'Creating environment...',
|
|
550
|
-
success: (envKey, envType) => `Created ${
|
|
544
|
+
success: (envKey, envType) => `Created ${Text.env.displayEnvironment(envKey, envType)}`
|
|
551
545
|
},
|
|
552
546
|
overview: 'Create a new development environment.',
|
|
553
547
|
promptEnvironmentKey: 'Enter a name for your environment:',
|
|
@@ -573,12 +567,12 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
573
567
|
prompt: 'Select development environment:',
|
|
574
568
|
confirmationInfo: 'You are deleting the following environment(s):',
|
|
575
569
|
promptConfirmation: 'Do you want to continue?',
|
|
576
|
-
individualSuccessMessage: (envKey, envType) => `${
|
|
570
|
+
individualSuccessMessage: (envKey, envType) => `${logSymbols.info} ${Text.env.displayEnvironment(envKey, envType)} deleted successfully.`,
|
|
577
571
|
successMessage: 'Environment(s) deleted.',
|
|
578
572
|
optionEnvironmentKey: 'specify the environment to delete',
|
|
579
|
-
warningMessage: `${
|
|
573
|
+
warningMessage: `${chalk.bold('Warning:')} When deleting a development environment, you may impact in progress deployments or tunnels.`,
|
|
580
574
|
noEnvironmentMessage: 'There are no development environments to delete.',
|
|
581
|
-
hasInstallationError: (envKey) => `${
|
|
575
|
+
hasInstallationError: (envKey) => `${environmentToOption(envKey)} cannot be deleted because the environment is installed on a site. You can show all the current installations of your app by running ${forge('install', 'list')}.`
|
|
582
576
|
},
|
|
583
577
|
storage: {
|
|
584
578
|
cmd: {
|
|
@@ -628,8 +622,8 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
628
622
|
start: 'Checking eligibility...',
|
|
629
623
|
end: 'Checking eligibility...',
|
|
630
624
|
status: {
|
|
631
|
-
notEligible: (envKey, envType, version, reason) => `${
|
|
632
|
-
eligible: (envKey, envType, version) => `${
|
|
625
|
+
notEligible: (envKey, envType, version, reason) => `${logSymbols.info} The version of your app [${version}] that's deployed to [${Text.env.displayEnvironment(envKey, envType)}] is not eligible for the Runs on Atlassian program.\n${LogColor.warn(itemList(reason))}`,
|
|
626
|
+
eligible: (envKey, envType, version) => `${logSymbols.info} The version of your app [${version}] that's deployed to [${Text.env.displayEnvironment(envKey, envType)}] is eligible for the Runs on Atlassian program.`
|
|
633
627
|
},
|
|
634
628
|
rule: {
|
|
635
629
|
conversion: (rule) => {
|
|
@@ -688,12 +682,12 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
688
682
|
end: 'Comparing app versions...',
|
|
689
683
|
details: {
|
|
690
684
|
banner: (input) => {
|
|
691
|
-
const env1Display =
|
|
692
|
-
const env2Display = input.env2Key && input.env2Type ?
|
|
685
|
+
const env1Display = Text.env.displayEnvironment(input.env1Key, input.env1Type);
|
|
686
|
+
const env2Display = input.env2Key && input.env2Type ? Text.env.displayEnvironment(input.env2Key, input.env2Type) : '';
|
|
693
687
|
if (env2Display) {
|
|
694
|
-
return `${
|
|
688
|
+
return `${logSymbols.info} Comparison between app versions [${chalk.bold(input.version1)} in ${env1Display}] and [${chalk.bold(input.version2)} in ${env2Display}] is shown below:`;
|
|
695
689
|
}
|
|
696
|
-
return `${
|
|
690
|
+
return `${logSymbols.info} Comparison between app versions [${chalk.bold(input.version1)} and ${chalk.bold(input.version2)}] in [${env1Display}] is shown below:`;
|
|
697
691
|
}
|
|
698
692
|
}
|
|
699
693
|
},
|
|
@@ -725,8 +719,8 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
725
719
|
end: 'Getting app version details...',
|
|
726
720
|
details: {
|
|
727
721
|
banner: (envKey, envType, version) => {
|
|
728
|
-
const envDisplay =
|
|
729
|
-
return `${
|
|
722
|
+
const envDisplay = Text.env.displayEnvironment(envKey, envType);
|
|
723
|
+
return `${logSymbols.info} App [${version}] in [${envDisplay}] includes the following:`;
|
|
730
724
|
},
|
|
731
725
|
prompt: {
|
|
732
726
|
options: {
|
|
@@ -781,8 +775,8 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
781
775
|
end: 'Getting app version list...',
|
|
782
776
|
details: {
|
|
783
777
|
banner: (envKey, envType, versions) => {
|
|
784
|
-
const envDisplay =
|
|
785
|
-
return `${
|
|
778
|
+
const envDisplay = Text.env.displayEnvironment(envKey, envType);
|
|
779
|
+
return `${logSymbols.info} Details of a total of [${versions} major versions] in [${envDisplay}] can be seen below:`;
|
|
786
780
|
}
|
|
787
781
|
}
|
|
788
782
|
},
|
|
@@ -820,9 +814,9 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
820
814
|
appVersionRolloutSuccess(appRolloutVersionId) {
|
|
821
815
|
return `Your upgrade has been queued with upgrade ID ${appRolloutVersionId}. To view that status of your update please use the \`forge version bulk-upgrade list\` command.`;
|
|
822
816
|
},
|
|
823
|
-
limitWarningUserLimit: (expectedRemaining, totalEligible, userLimit) => `${
|
|
824
|
-
limitWarningAdjustedLimit: (expectedRemaining, totalEligible, userLimit, appliedLimit) => `${
|
|
825
|
-
limitWarningSystemLimit: (expectedRemaining, totalEligible, systemLimit) => `${
|
|
817
|
+
limitWarningUserLimit: (expectedRemaining, totalEligible, userLimit) => `${chalk.yellow('Warning:')} Due to the limit you specified (${userLimit}), ${expectedRemaining} out of the eligible ${totalEligible} upgrades will remain unprocessed.`,
|
|
818
|
+
limitWarningAdjustedLimit: (expectedRemaining, totalEligible, userLimit, appliedLimit) => `${chalk.yellow('Warning:')} The limit you supplied (${userLimit}) could not be honored and a limit of ${appliedLimit} has been applied. Due to this limit ${expectedRemaining} out of the eligible ${totalEligible} upgrades will remain unprocessed.`,
|
|
819
|
+
limitWarningSystemLimit: (expectedRemaining, totalEligible, systemLimit) => `${chalk.yellow('Warning:')} The number of eligible installations exceeded the per-workflow maximum (${systemLimit}). Due to this maximum ${expectedRemaining} out of the eligible ${totalEligible} upgrades will remain unprocessed.`,
|
|
826
820
|
limitWarningFollowUp: 'These unprocessed installations can be processed by starting a new workflow after the completion of this one.',
|
|
827
821
|
warningMessage: (sourceVersionId, targetVersionId, installations, limit, enforcedSystemLimit, userProvidedLimit) => {
|
|
828
822
|
const effectiveInstallations = limit !== undefined && limit < (installations || 0) ? limit : installations;
|
|
@@ -831,7 +825,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
831
825
|
if (enforcedSystemLimit !== undefined && userProvidedLimit !== undefined) {
|
|
832
826
|
limitNote = `. Provided limit (${userProvidedLimit}) not honored due to system limit`;
|
|
833
827
|
}
|
|
834
|
-
return `${
|
|
828
|
+
return `${chalk.bold('Warning:')} You are planning to move ${effectiveInstallations} ${installationText} from version ${sourceVersionId} to version ${targetVersionId}${limitNote}.`;
|
|
835
829
|
},
|
|
836
830
|
promptConfirmation: 'Do you want to continue?',
|
|
837
831
|
promptLimit: (installations) => `How many installations to upgrade? (${installations} eligible):`,
|
|
@@ -866,10 +860,10 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
866
860
|
details: {
|
|
867
861
|
banner: (envKey, envType, updates) => {
|
|
868
862
|
if (!envType) {
|
|
869
|
-
return `${
|
|
863
|
+
return `${logSymbols.info} Details of a total of [${updates} updates] can be seen below. Records may not be available indefinitely.`;
|
|
870
864
|
}
|
|
871
|
-
const envDisplay =
|
|
872
|
-
return `${
|
|
865
|
+
const envDisplay = Text.env.displayEnvironment(envKey, envType);
|
|
866
|
+
return `${logSymbols.info} Details of a total of [${updates} updates] in [${envDisplay}] can be seen below. Records may not be available indefinitely.`;
|
|
873
867
|
}
|
|
874
868
|
}
|
|
875
869
|
},
|
|
@@ -893,7 +887,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
893
887
|
appVersionRolloutCancelSuccess(appRolloutVersionId) {
|
|
894
888
|
return `Your upgrade with upgrade ID ${appRolloutVersionId} has been cancelled.`;
|
|
895
889
|
},
|
|
896
|
-
warningMessage: (appRolloutVersionId, sourceVersionId, targetVersionId, installationComplete, totalInstallations) => `${
|
|
890
|
+
warningMessage: (appRolloutVersionId, sourceVersionId, targetVersionId, installationComplete, totalInstallations) => `${chalk.bold('Warning:')} You are planning to cancel the upgrade with upgrade ID ${appRolloutVersionId} from version ${sourceVersionId} to version ${targetVersionId} that is in progress. ${installationComplete} of ${totalInstallations} installations have already been upgraded.`,
|
|
897
891
|
promptConfirmation: 'Do you want to continue?'
|
|
898
892
|
}
|
|
899
893
|
}
|
|
@@ -917,7 +911,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
917
911
|
const limitNote = limit === undefined
|
|
918
912
|
? ''
|
|
919
913
|
: ` The rollout will stop after ${limit} ${limit === 1 ? 'installation' : 'installations'}.`;
|
|
920
|
-
return `${
|
|
914
|
+
return `${chalk.bold('Warning:')} You are about to roll out the latest version of your app to installations in the ${Text.env.displayEnvironment(envKey, envType)} environment.${limitNote}`;
|
|
921
915
|
},
|
|
922
916
|
promptConfirmation: 'Do you want to continue?',
|
|
923
917
|
cancelled: 'Rollout cancelled.',
|
|
@@ -956,7 +950,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
956
950
|
}
|
|
957
951
|
},
|
|
958
952
|
manifestVariables: {
|
|
959
|
-
error:
|
|
953
|
+
error: LogColor.error(`Error: Manifest environment variables are not supported for builds. Please remove the environment variables from your manifest.yml before rerunning ${forge('build')}.\n`)
|
|
960
954
|
}
|
|
961
955
|
},
|
|
962
956
|
buildDeploy: {
|
|
@@ -964,10 +958,10 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
964
958
|
description: 'save application bundle for inspection'
|
|
965
959
|
},
|
|
966
960
|
taskLint: {
|
|
967
|
-
lintError: (cmd) =>
|
|
961
|
+
lintError: (cmd) => LogColor.error(`Error: The ${cmd} failed due to errors in the app code. Fix the errors before rerunning ${forge(cmd)}, or run ${forge(cmd, '--no-verify')} to skip the linter.\n`),
|
|
968
962
|
lintWarning: (numWarnings) => {
|
|
969
963
|
const { pluralCheckedTotal } = checkLintTotalPlurals(0, numWarnings, 0, 0, 0);
|
|
970
|
-
return
|
|
964
|
+
return LogColor.warn(`${pluralCheckedTotal} found. Run ${forge('lint')} to review the warnings.`);
|
|
971
965
|
}
|
|
972
966
|
}
|
|
973
967
|
},
|
|
@@ -976,43 +970,43 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
976
970
|
desc: 'deploy your app to an environment',
|
|
977
971
|
start1: (envKey, envType, buildTag) => {
|
|
978
972
|
const buildTagText = buildTag ? ` using build with tag ${buildTag}` : '';
|
|
979
|
-
return `Deploying your app${buildTagText} to the ${
|
|
973
|
+
return `Deploying your app${buildTagText} to the ${Text.env.displayEnvironment(envKey, envType)} environment.\n${ctrlC}\n`;
|
|
980
974
|
},
|
|
981
975
|
start2: (appName, envKey, envType, buildTag) => {
|
|
982
976
|
const buildTagText = buildTag ? ` using build with tag ${buildTag}` : '';
|
|
983
|
-
return `Deploying ${appName}${buildTagText} to ${
|
|
977
|
+
return `Deploying ${appName}${buildTagText} to ${Text.env.displayEnvironment(envKey, envType)}...`;
|
|
984
978
|
},
|
|
985
979
|
success: 'Deployed\n',
|
|
986
980
|
successDetails: (appName, envKey, envType, buildTag, numApprovals) => `Deployed ${deployedDetails(appName, envKey, envType, buildTag, numApprovals)}`,
|
|
987
981
|
artifactUploaded: 'App artifact uploaded\n',
|
|
988
982
|
artifactUploadedDetails: (appName, envKey, envType, buildTag, numApprovals) => `Uploaded ${deployedDetails(appName, envKey, envType, buildTag, numApprovals)}`,
|
|
989
|
-
placementsDeployingInBackground: (envKey, majorVersion) => `${
|
|
983
|
+
placementsDeployingInBackground: (envKey, majorVersion) => `${logSymbols.info} Deployment is running in the background. New deployments to this environment are blocked until it finishes.\nRun ${deployCommand('status', envKey, majorVersion)} to check for updates.`,
|
|
990
984
|
distributePageLink: (appId) => `To install on a site that you're an admin of, run ${forge('install')}.\n` +
|
|
991
985
|
'To install on any other site, generate an installation link in the developer console and share it with the site admin: ' +
|
|
992
|
-
buildTerminalLink(
|
|
986
|
+
buildTerminalLink(getDevConsoleUrl('appDistribution', appId))
|
|
993
987
|
},
|
|
994
988
|
taskLint: {
|
|
995
|
-
lintError:
|
|
989
|
+
lintError: LogColor.error(`Error: The deploy failed due to errors in the app code. Fix the errors before rerunning ${forge('deploy')}, or run ${forge('deploy', '--no-verify')} to skip the linter.\n`),
|
|
996
990
|
lintWarning: (numWarnings) => {
|
|
997
991
|
const { pluralCheckedTotal } = checkLintTotalPlurals(0, numWarnings, 0, 0, 0);
|
|
998
|
-
return
|
|
992
|
+
return LogColor.warn(`${pluralCheckedTotal} found. Run ${forge('lint')} to review the warnings.`);
|
|
999
993
|
},
|
|
1000
994
|
lintApproval: (numApprovals, ruleNames) => {
|
|
1001
995
|
const { pluralCheckedApprovals } = checkLintTotalPlurals(0, 0, numApprovals, 0, 0);
|
|
1002
996
|
const rulesArg = ruleNames && ruleNames.length > 0 ? ruleNames.join(' ') : '[ruleName]';
|
|
1003
|
-
return
|
|
997
|
+
return LogColor.approval(`The deploy failed due to ${pluralCheckedApprovals} requested. Run ${forge('deploy', `--approve ${rulesArg}`)} to acknowledge and proceed.\n`);
|
|
1004
998
|
},
|
|
1005
|
-
lintErrorsWithApprovals:
|
|
999
|
+
lintErrorsWithApprovals: LogColor.error(`Fix the error above before approving deployment rules.\n`)
|
|
1006
1000
|
},
|
|
1007
1001
|
hasNoAppInstallationsForEnv: {
|
|
1008
|
-
hasNoAppInstallationsForEnvError:
|
|
1002
|
+
hasNoAppInstallationsForEnvError: LogColor.error(`Error: The deployment failed due to errors while trying to determine if the app has any installations for the deployed environment.`)
|
|
1009
1003
|
},
|
|
1010
1004
|
environmentKey: {
|
|
1011
|
-
missingEnvironmentKeyError:
|
|
1005
|
+
missingEnvironmentKeyError: LogColor.error('Environment must be specified when deploying your app.')
|
|
1012
1006
|
},
|
|
1013
1007
|
majorVersion: {
|
|
1014
1008
|
description: 'specify a major version to update (Preview)',
|
|
1015
|
-
warning: (majorVersion) => `${
|
|
1009
|
+
warning: (majorVersion) => `${chalk.bold('Warning:')} You\'re about to deploy changes to major version ${majorVersion} of your app. All sites using version ${majorVersion} will automatically apply these changes.\n`,
|
|
1016
1010
|
confirm: `Continue?`,
|
|
1017
1011
|
invalidMajorVersionError: 'Invalid major version number'
|
|
1018
1012
|
},
|
|
@@ -1029,19 +1023,19 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1029
1023
|
continueChange: `Do you wish to continue with changing the Connect key?`,
|
|
1030
1024
|
continueDelete: `Do you wish to continue with deleting the Connect key?`,
|
|
1031
1025
|
mpacAppConnectKeyChangeAnalyticsError: 'Cannot change app.connect.key for an app with an Atlassian Marketplace listing.',
|
|
1032
|
-
mpacAppConnectKeyChangeError: (mpacAppKey, connectKey) =>
|
|
1033
|
-
connectKeyChangeWarning: (environment, migrationKey, connectKey) => `WARNING: Changing the app.connect.key in ${
|
|
1026
|
+
mpacAppConnectKeyChangeError: (mpacAppKey, connectKey) => LogColor.error(`Cannot change the app.connect.key from \'${mpacAppKey}\' to \'${connectKey}\'. The app's Connect key must match the Atlassian Marketplace key.\n`),
|
|
1027
|
+
connectKeyChangeWarning: (environment, migrationKey, connectKey) => `WARNING: Changing the app.connect.key in ${environmentToOption(environment)} from \'${migrationKey}\' to \'${connectKey}\' affects features using the Connect key as an identifier. ` +
|
|
1034
1028
|
`\nLearn more about the impact of this change at ${go('forge-connect-key-changes')}.\n`,
|
|
1035
|
-
connectKeyDeleteWarning: (environment) => `WARNING: You're about to delete the app.connect.key of the app in ${
|
|
1029
|
+
connectKeyDeleteWarning: (environment) => `WARNING: You're about to delete the app.connect.key of the app in ${environmentToOption(environment)}. ` +
|
|
1036
1030
|
`\nIf you proceed, non-Forge Connect installations using the Connect key will no longer be replaced by future Forge installations of the app, and will co-exist. ` +
|
|
1037
1031
|
`\nLearn more at ${go('forge-connect-key-deletion')}.\n`,
|
|
1038
|
-
connectKeyMutationInProductionError: (migrationKey, connectKey) =>
|
|
1032
|
+
connectKeyMutationInProductionError: (migrationKey, connectKey) => LogColor.error(`Cannot change the app.connect.key from \'${migrationKey}\' to \'${connectKey}\'. The app's Connect key cannot be mutated in production after deployment.\n`),
|
|
1039
1033
|
connectKeyMutationInProductionAnalyticsError: 'Cannot mutate app.connect.key for an app in production.'
|
|
1040
1034
|
},
|
|
1041
1035
|
taskPackage: {
|
|
1042
1036
|
title: 'Packaging app files',
|
|
1043
1037
|
packageBundledFiles: 'Packaging bundled files',
|
|
1044
|
-
inspectOutputPath: (inspectDirectory) => `Application bundle has been copied to ${
|
|
1038
|
+
inspectOutputPath: (inspectDirectory) => `Application bundle has been copied to ${chalk.bold(inspectDirectory)} for inspection`,
|
|
1045
1039
|
packageFile: (fileName, filePath) => `File added to archive: ${fileName || '.'}${filePath ? `, from ${filePath}` : ''}`,
|
|
1046
1040
|
archiveCreated: (archivePath) => `Archive created: ${archivePath}`,
|
|
1047
1041
|
invalidArchivePath: (fileName) => `Invalid archive path "${fileName}"`
|
|
@@ -1086,14 +1080,14 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1086
1080
|
marketplaceApp: (developerSpaceId) => `Deployment blocked - This app's Developer Space setup is incomplete.\n\n` +
|
|
1087
1081
|
`Your Marketplace admin must complete the Developer Space setup to unblock deployment for this app and prevent further app limitations.\n\n` +
|
|
1088
1082
|
`What to do: Share this setup link with your Marketplace admin:\n` +
|
|
1089
|
-
buildTerminalLink(
|
|
1083
|
+
buildTerminalLink(getDevConsoleUrl('developerSpace', developerSpaceId))
|
|
1090
1084
|
},
|
|
1091
1085
|
outdatedInstallations: `We've detected new scopes or egress URLs in your app.\n` +
|
|
1092
1086
|
`Run ${forge('install', '--upgrade')} and restart your tunnel to put them into effect.`,
|
|
1093
|
-
postDeploymentChecksFailed:
|
|
1094
|
-
postDeploymentRoaEligibilityFailure: (appVersion, envKey, envType) => `${
|
|
1095
|
-
postDeploymentRoaEligibilitySuccess: (appVersion, envKey, envType) => `${
|
|
1096
|
-
listIndexes: (environment) => `Run ${forge('storage', 'entities', 'indexes', 'list', '-e',
|
|
1087
|
+
postDeploymentChecksFailed: chalk.yellow(`We could not run some final checks, however your deployment still succeeded. Contact support if this issue persists.`),
|
|
1088
|
+
postDeploymentRoaEligibilityFailure: (appVersion, envKey, envType) => `${logSymbols.info} The version of your app [${appVersion}] that was just deployed to [${Text.env.displayEnvironment(envKey, envType)}] is not eligible for the Runs on Atlassian program. Run ${forge('eligibility')} to know more.\n\nTo know more about Runs on Atlassian, go to ${go('runs-on-atlassian')}.`,
|
|
1089
|
+
postDeploymentRoaEligibilitySuccess: (appVersion, envKey, envType) => `${logSymbols.info} The version of your app [${appVersion}] that was just deployed to [${Text.env.displayEnvironment(envKey, envType)}] is eligible for the Runs on Atlassian program.\n\nTo know more about Runs on Atlassian, go to ${go('runs-on-atlassian')}.`,
|
|
1090
|
+
listIndexes: (environment) => `Run ${forge('storage', 'entities', 'indexes', 'list', '-e', environmentToOption(environment))} to check the status of the indexes.`,
|
|
1097
1091
|
reindexingInProgress: {
|
|
1098
1092
|
continueDeployment: 'Reindexing is currently in progress. Are you sure you want to deploy?',
|
|
1099
1093
|
successfulDeployment: 'Deployment successful. Please note - indexing currently in progress.'
|
|
@@ -1104,8 +1098,8 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1104
1098
|
}
|
|
1105
1099
|
},
|
|
1106
1100
|
crossContext: {
|
|
1107
|
-
enableError: `Unable to deploy an app to an environment with an existing installation in an Atlassian app that is not the required Atlassian app.\nRun ${
|
|
1108
|
-
modifyError: `Unable to modify the required Atlassian app for an environment with existing installations.\nRun ${
|
|
1101
|
+
enableError: `Unable to deploy an app to an environment with an existing installation in an Atlassian app that is not the required Atlassian app.\nRun ${chalk.bold('forge uninstall')} to uninstall your app from any non-required Atlassian apps in this environment before retrying ${chalk.bold('forge deploy')}.`,
|
|
1102
|
+
modifyError: `Unable to modify the required Atlassian app for an environment with existing installations.\nRun ${chalk.bold('forge uninstall')} to uninstall your app from all Atlassian apps in this environment before retrying ${chalk.bold('forge deploy')}.`
|
|
1109
1103
|
}
|
|
1110
1104
|
},
|
|
1111
1105
|
install: {
|
|
@@ -1113,18 +1107,18 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1113
1107
|
description: 'manage app installations',
|
|
1114
1108
|
start: (envKey, envType, product) => {
|
|
1115
1109
|
const productText = product ? `in ${product} ` : '';
|
|
1116
|
-
return `Installing your app ${productText}on to ${
|
|
1110
|
+
return `Installing your app ${productText}on to ${Text.env.displayEnvironment(envKey, envType)}...`;
|
|
1117
1111
|
},
|
|
1118
1112
|
end: (displayTick, product) => `${displayTick ? greenTick + ' ' : ''}Install in ${product} complete!`
|
|
1119
1113
|
},
|
|
1120
1114
|
booleanToScope: (isLatest) => (isLatest ? `(Latest)` : `(Out-of-date)`),
|
|
1121
|
-
alreadyInstalledInRequiredProduct: (product) => `\nYou have already installed this app into ${
|
|
1122
|
-
installingToRequiredProduct: (product) => `\nYour app will be installed into ${
|
|
1123
|
-
installingToOptionalProduct: (product) => `\nThis app will be installed into ${
|
|
1115
|
+
alreadyInstalledInRequiredProduct: (product) => `\nYou have already installed this app into ${chalk.bold(product)}.`,
|
|
1116
|
+
installingToRequiredProduct: (product) => `\nYour app will be installed into ${chalk.bold(product)}. Once this is done, you can install your app into any other Atlassian apps.\n`,
|
|
1117
|
+
installingToOptionalProduct: (product) => `\nThis app will be installed into ${chalk.bold(product)}.\n`,
|
|
1124
1118
|
installConfirmation: (product, site) => `Installing your app onto ${product} on ${site}.\n${ctrlC}\n`,
|
|
1125
1119
|
bannerSite: `\nInstalling your app onto an Atlassian site.\n${ctrlC}\n`,
|
|
1126
1120
|
bannerWorkspace: `\nInstalling your app onto the selected workspace.\n${ctrlC}\n`,
|
|
1127
|
-
devAppInstallWarning: `${
|
|
1121
|
+
devAppInstallWarning: `${chalk.bold('WARNING:')} You are about to install a development app to a production site. If you do not intend to test your app, we strongly recommend that you deploy your app to production and install the production version instead.`,
|
|
1128
1122
|
majorVersionIsNotLatest: (versionToInstall) => `WARNING: You are about to install a previous version of the app. (${versionToInstall})`,
|
|
1129
1123
|
devAppInstallConfirm: `Are you sure you want to proceed?`,
|
|
1130
1124
|
optionConfirmScopes: 'skip confirmation of scopes for the app before installing or upgrading the app',
|
|
@@ -1138,10 +1132,10 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1138
1132
|
.map(({ name, requiresInteractiveConsent }) => `- ${name}${requiresInteractiveConsent ? ' (requires user consent)' : ''}`)
|
|
1139
1133
|
.join('\n')}\n`,
|
|
1140
1134
|
listEgressAddresses: (egressAddresses) => `Your app will exchange data with the following urls:\n${egressAddresses.map(({ address }) => `- ${address}`).join('\n')}\n`,
|
|
1141
|
-
permissionsMismatch: (environment) => `The scopes or egress URLs in the manifest are different from the scopes in your most recent deployment to ${
|
|
1135
|
+
permissionsMismatch: (environment) => `The scopes or egress URLs in the manifest are different from the scopes in your most recent deployment to ${environmentToOption(environment)}. Try running ${forge('deploy', '-e', environmentToOption(environment))} before installing.\n`,
|
|
1142
1136
|
multiProductScopesDetected: (productsToInstall, productsToUpgrade, site, environment) => `\nWe detected your app requires scopes across multiple Atlassian apps.\nRun ${forge('install')} for each of the following:\n${itemList([
|
|
1143
|
-
...productsToUpgrade.map((product) => forge('install', '--upgrade', '-p',
|
|
1144
|
-
...productsToInstall.map((product) => forge('install', '-p',
|
|
1137
|
+
...productsToUpgrade.map((product) => forge('install', '--upgrade', '-p', Case.capital(product), '-s', site, '-e', environmentToOption(environment))),
|
|
1138
|
+
...productsToInstall.map((product) => forge('install', '-p', Case.capital(product), '-s', site, '-e', environmentToOption(environment)))
|
|
1145
1139
|
])}`,
|
|
1146
1140
|
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment) => permissionsMismatchInDevelopment
|
|
1147
1141
|
? 'Are you sure you want to continue installing the app?'
|
|
@@ -1149,7 +1143,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1149
1143
|
installationLimitWarning: 'Warning: Site exceeds recommended app limit\n' +
|
|
1150
1144
|
'This site has more than 100 apps installed. Exceeding this limit may cause future installations to fail.',
|
|
1151
1145
|
success: {
|
|
1152
|
-
banner: (envKey, envType, product, site) => `Your app in the ${
|
|
1146
|
+
banner: (envKey, envType, product, site) => `Your app in the ${Text.env.displayEnvironment(envKey, envType)} environment is now installed in ${product} on ${buildTerminalLink(site)}. You can install the app into other Atlassian apps by running the ${chalk.bold('forge install')} command again.`,
|
|
1153
1147
|
deeplinks: (links) => {
|
|
1154
1148
|
if (links.length === 1) {
|
|
1155
1149
|
return `\nCheck it out here: ${buildTerminalLink(links[0].url)}`;
|
|
@@ -1171,13 +1165,13 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1171
1165
|
url: (url) => `Site URL is invalid: ${url}`,
|
|
1172
1166
|
site: (url) => `Site is invalid: ${url}`,
|
|
1173
1167
|
alreadyInstalledError: `Installation error: App is already installed.\nIf you're trying to upgrade your app, use the ${forge('install', '--upgrade')} command.`,
|
|
1174
|
-
alreadyInstalledErrorWithMajorVersion: (envKey, envType) => `The app in the ${
|
|
1168
|
+
alreadyInstalledErrorWithMajorVersion: (envKey, envType) => `The app in the ${Text.env.displayEnvironment(envKey, envType)} environment is already installed on this site. Uninstall the app before trying again.`,
|
|
1175
1169
|
serverSideInstallationError: (message) => `Installation error: ${message}`,
|
|
1176
|
-
noDeploymentFound: (environment) => `Forge apps must be deployed before installation. Deploy your app by running ${forge('deploy', '-e',
|
|
1170
|
+
noDeploymentFound: (environment) => `Forge apps must be deployed before installation. Deploy your app by running ${forge('deploy', '-e', environmentToOption(environment))}.`,
|
|
1177
1171
|
permissionsDeniedInstructions: (requestId, appId) => `Insufficient permissions to install app (requestId: ${requestId})` +
|
|
1178
1172
|
'\n\nTo install the app on this site, generate an installation link ' +
|
|
1179
1173
|
'in the developer console and share it with the site admin: ' +
|
|
1180
|
-
buildTerminalLink(
|
|
1174
|
+
buildTerminalLink(getDevConsoleUrl('appDistribution', appId)),
|
|
1181
1175
|
appendRequestIdToErrorMessage: (message, requestId) => `${message} For more help on this issue, please reach out to support (${buildTerminalLink('https://developer.atlassian.com/support')}) and provide them the following request ID: ${requestId}`,
|
|
1182
1176
|
majorVersionNotFound: 'The major version you specified does not exist. Check the version number and try again.',
|
|
1183
1177
|
installationLimitReached: 'Installation error: The target site already has the maximum number of apps installed. To install this app there, uninstall any unused apps first.',
|
|
@@ -1188,9 +1182,9 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
1188
1182
|
debug: {
|
|
1189
1183
|
ccpEntitlementQueryFailed: `Non-essential request failed. Continuing installation.`
|
|
1190
1184
|
},
|
|
1191
|
-
failedAll: (site, environment) => `Your app in ${
|
|
1185
|
+
failedAll: (site, environment) => `Your app in ${environmentToOption(environment)} was not installed on any Atlassian apps on ${chalk.bold(site)}.`,
|
|
1192
1186
|
security: {
|
|
1193
|
-
banner: (site) => `\n${
|
|
1187
|
+
banner: (site) => `\n${chalk.gray('=== ')}Security questions\n
|
|
1194
1188
|
Forge apps installed on ${site} must comply with our corporate security guidelines.
|
|
1195
1189
|
Read the guidelines on the page below before answering the required security questions:
|
|
1196
1190
|
${buildTerminalLink('https://hello.atlassian.net/wiki/x/iIC1Hg')}\n`,
|
|
@@ -1201,7 +1195,7 @@ ${buildTerminalLink('https://hello.atlassian.net/wiki/x/iIC1Hg')}\n`,
|
|
|
1201
1195
|
'Does the app make administrative changes to Atlassian products or services?'
|
|
1202
1196
|
],
|
|
1203
1197
|
notTrustedApp: {
|
|
1204
|
-
warn: (site) => `\nYou answered ${
|
|
1198
|
+
warn: (site) => `\nYou answered ${chalk.bold('yes')} to one or more of the questions. Corporate security needs to review your app before you install it on ${site}.\n`,
|
|
1205
1199
|
confirmApproval: `Has corporate security approved your app?`,
|
|
1206
1200
|
corpSecurityHelpdesk: `\nCreate a legal ticket to request an app review here:\n
|
|
1207
1201
|
${buildTerminalLink('https://jira.sec.internal.atlassian.com/servicedesk/customer/portal/8/create/88')}
|
|
@@ -1210,7 +1204,7 @@ When corporate security has approved the app, you can proceed with the installat
|
|
|
1210
1204
|
}
|
|
1211
1205
|
},
|
|
1212
1206
|
authorization: {
|
|
1213
|
-
banner: `\n${
|
|
1207
|
+
banner: `\n${chalk.gray('=== ')}Authorize your app\n`,
|
|
1214
1208
|
link: (link) => `Follow the prompts at this URL to authorize your app:
|
|
1215
1209
|
${buildTerminalLink(link)}\n`,
|
|
1216
1210
|
openBrowser: `Press any key to open the URL in your default browser.`
|
|
@@ -1232,9 +1226,9 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1232
1226
|
promptUnitUpgrade: 'Select the unit to upgrade:',
|
|
1233
1227
|
unitUpgradeOverview: 'To upgrade your app to the latest code and scopes, select a unit installation from the list.',
|
|
1234
1228
|
unitUpgradeTableHeaders: ['Environment', 'Unit', 'Atlassian apps', 'Major Version'],
|
|
1235
|
-
installSuccess: (environment, target) => `Your app in the ${
|
|
1229
|
+
installSuccess: (environment, target) => `Your app in the ${environmentToOption(environment)} environment is installed ${globalTargetLocation(target)}.`,
|
|
1236
1230
|
alreadyInstalled: (target) => `Your app is already installed ${globalTargetLocation(target)}.`,
|
|
1237
|
-
upgradeSuccess: (environment, target) => `Your app in the ${
|
|
1231
|
+
upgradeSuccess: (environment, target) => `Your app in the ${environmentToOption(environment)} environment is upgraded ${globalTargetLocation(target)}.`,
|
|
1238
1232
|
promptConnect: 'Do you want to connect the app to other Atlassian apps or platform tools?',
|
|
1239
1233
|
promptConnectAnother: 'Do you want to connect the app to another Atlassian app or platform tool?',
|
|
1240
1234
|
promptContinueConnect: 'Do you want to continue connecting the app?',
|
|
@@ -1243,13 +1237,13 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1243
1237
|
promptSiteUrl: 'Enter the site URL:',
|
|
1244
1238
|
enterWorkspaceOverview: 'Enter the Bitbucket workspace you want to connect your app to (for example, https://bitbucket.org/my-workspace/ or my-workspace).',
|
|
1245
1239
|
promptWorkspace: 'Enter the workspace:',
|
|
1246
|
-
connectConfirmationSite: (product) => `Connecting your app to ${
|
|
1247
|
-
connectConfirmationWorkspace: (product) => `Connecting your app to ${
|
|
1240
|
+
connectConfirmationSite: (product) => `Connecting your app to ${chalk.bold(product)} in an Atlassian site.\n${ctrlC}\n`,
|
|
1241
|
+
connectConfirmationWorkspace: (product) => `Connecting your app to ${chalk.bold(product)} in a Bitbucket workspace.\n${ctrlC}\n`,
|
|
1248
1242
|
connect: {
|
|
1249
1243
|
start: 'Connecting',
|
|
1250
1244
|
end: 'Connection complete!'
|
|
1251
1245
|
},
|
|
1252
|
-
connectionSuccess: (environment, product, site) => `Your app in the ${
|
|
1246
|
+
connectionSuccess: (environment, product, site) => `Your app in the ${environmentToOption(environment)} environment is connected to ${chalk.bold(product)} in ${chalk.bold(site)}. You can install the app in other Atlassian apps by running the ${forge('install')} command again.`,
|
|
1253
1247
|
optionUnit: 'the unit id to install the global app into',
|
|
1254
1248
|
error: {
|
|
1255
1249
|
identityRequestFailed: (status) => `Failed to fetch your organizations and units from the Identity API (status ${status}).`,
|
|
@@ -1279,7 +1273,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1279
1273
|
bannerSite: `\nUpgrading your app on the Atlassian site.\n`,
|
|
1280
1274
|
bannerWorkspace: `\nUpgrading your app on the selected workspace.\n`,
|
|
1281
1275
|
cmd: {
|
|
1282
|
-
start: (envKey, envType) => `Upgrading your app in ${
|
|
1276
|
+
start: (envKey, envType) => `Upgrading your app in ${Text.env.displayEnvironment(envKey, envType)}...`,
|
|
1283
1277
|
end: (displayTick) => `${displayTick ? greenTick + ' ' : ''}Upgrade complete!`,
|
|
1284
1278
|
error: `Upgrade failed`
|
|
1285
1279
|
},
|
|
@@ -1287,22 +1281,22 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1287
1281
|
.map(({ name, requiresInteractiveConsent }) => `- ${name}${requiresInteractiveConsent ? ' (requires user consent)' : ''}`)
|
|
1288
1282
|
.join('\n')}\n`,
|
|
1289
1283
|
listEgressAddresses: (egressAddresses, isCodeUpgrade) => `Your app will${isCodeUpgrade ? ' not' : ' be upgraded and additionally'} exchange data with the following urls:\n${egressAddresses.map(({ address }) => `- ${address}`).join('\n')}\n`,
|
|
1290
|
-
permissionsMismatch: (environment) => `The scopes or egress URLs in the manifest are different from the scopes in your most recent deployment to ${
|
|
1284
|
+
permissionsMismatch: (environment) => `The scopes or egress URLs in the manifest are different from the scopes in your most recent deployment to ${environmentToOption(environment)}. Try running ${forge('deploy', '-e', environmentToOption(environment))} before upgrading.\n`,
|
|
1291
1285
|
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment) => permissionsMismatchInDevelopment
|
|
1292
1286
|
? 'Are you sure you want to continue upgrading the app?'
|
|
1293
1287
|
: 'Do you want to continue?',
|
|
1294
1288
|
success: {
|
|
1295
|
-
banner: (envKey, envType, product, site, isLatest = true, version, isCodeUpgrade = false) => `Your app${isCodeUpgrade ? "'s code" : ''} in the ${
|
|
1289
|
+
banner: (envKey, envType, product, site, isLatest = true, version, isCodeUpgrade = false) => `Your app${isCodeUpgrade ? "'s code" : ''} in the ${Text.env.displayEnvironment(envKey, envType)} environment is now ${version && !isLatest ? `version ${version}` : 'the latest'} in ${product} on ${buildTerminalLink(site)}.`
|
|
1296
1290
|
},
|
|
1297
1291
|
alreadyUpdated: {
|
|
1298
1292
|
spinnerSite: 'Site is already at the latest version',
|
|
1299
1293
|
spinnerWorkspace: 'Workspace is already at the latest version',
|
|
1300
|
-
banner: (environment, product, site) => `\nYour app in the ${
|
|
1294
|
+
banner: (environment, product, site) => `\nYour app in the ${environmentToOption(environment)} environment is at the latest in ${product} on ${buildTerminalLink(site)}.`
|
|
1301
1295
|
},
|
|
1302
1296
|
error: {
|
|
1303
1297
|
reason: {
|
|
1304
1298
|
hasVersionDecreaseErrorReason: (targetVersion, currentVersion) => `The permissions version (${currentVersion}) cannot be greater than the app's code version (${targetVersion}). Ensure that you are not downgrading your app's code version after upgrading permissions.`,
|
|
1305
|
-
missingAppManagedPermissionsErrorReason: (targetVersion) => `The major version (${targetVersion}) you are upgrading to does not support using permissions from a different version. Ensure you have permission enforcement set as ${
|
|
1299
|
+
missingAppManagedPermissionsErrorReason: (targetVersion) => `The major version (${targetVersion}) you are upgrading to does not support using permissions from a different version. Ensure you have permission enforcement set as ${chalk.bold('app-managed')} in the manifest.yml file.`,
|
|
1306
1300
|
decoupledStateNotEnabledErrorReason: () => `The specified version is not eligible for a code-only upgrade.`
|
|
1307
1301
|
},
|
|
1308
1302
|
serverSideInstallationError: (message) => `Upgrade error: ${message}`,
|
|
@@ -1312,7 +1306,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1312
1306
|
installList: {
|
|
1313
1307
|
cmd: 'list app installations',
|
|
1314
1308
|
header: `\nShowing all the current installations and connections for your app.`,
|
|
1315
|
-
footer: (appId) => `\nView the full list in the developer console: ${buildTerminalLink(
|
|
1309
|
+
footer: (appId) => `\nView the full list in the developer console: ${buildTerminalLink(getDevConsoleUrl('appInstallations', appId))}`,
|
|
1316
1310
|
noResourceId: 'Unknown site with no resource ID',
|
|
1317
1311
|
noCloudId: 'Unknown workspace with no cloud ID',
|
|
1318
1312
|
noResourceIdInWorkspace: 'Unknown workspace with no resource ID',
|
|
@@ -1340,15 +1334,15 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1340
1334
|
deployStatus: {
|
|
1341
1335
|
cmd: 'show the placement deployment status of an app version in an environment',
|
|
1342
1336
|
majorVersionOption: 'specify the major version to show (defaults to the latest deployed version)',
|
|
1343
|
-
banner: (envKey, envType, version) => `${
|
|
1337
|
+
banner: (envKey, envType, version) => `${logSymbols.info} Environment: ${Text.env.displayEnvironment(envKey, envType)} (Version: ${major(version)})`,
|
|
1344
1338
|
artifactUploaded: (createdAt, buildTag) => {
|
|
1345
1339
|
const buildTagText = buildTag ? ` from build with tag ${buildTag}` : '';
|
|
1346
|
-
return `${
|
|
1340
|
+
return `${logSymbols.success} App artifact uploaded${buildTagText} at ${createdAt}`;
|
|
1347
1341
|
},
|
|
1348
1342
|
overall: {
|
|
1349
|
-
succeeded: (succeeded, total) => `${
|
|
1350
|
-
failed: (succeeded, total) => `${
|
|
1351
|
-
inProgress: (succeeded, total, inProgress) => `${
|
|
1343
|
+
succeeded: (succeeded, total) => `${logSymbols.success} Deployment succeeded (${succeeded}/${total} placements)`,
|
|
1344
|
+
failed: (succeeded, total) => `${logSymbols.error} Deployment failed (${succeeded}/${total} placements succeeded)`,
|
|
1345
|
+
inProgress: (succeeded, total, inProgress) => `${logSymbols.info} Deployment still in progress (${succeeded}/${total} placements succeeded, ${inProgress} in progress)`
|
|
1352
1346
|
},
|
|
1353
1347
|
checkAgain: (envKey, majorVersion) => `Run ${deployCommand('status', envKey, majorVersion)} again to check for updates.`,
|
|
1354
1348
|
retryHint: (envKey, majorVersion) => `Run ${deployCommand('retry', envKey, majorVersion)} to retry the failed placements.`,
|
|
@@ -1360,47 +1354,47 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1360
1354
|
lastUpdated: 'Last updated'
|
|
1361
1355
|
},
|
|
1362
1356
|
placementTypeLabel: (placementType) => ({
|
|
1363
|
-
[
|
|
1364
|
-
[
|
|
1365
|
-
[
|
|
1357
|
+
[AppPlacementType.Region]: 'Region',
|
|
1358
|
+
[AppPlacementType.CustomerDataPlane]: 'Customer data plane',
|
|
1359
|
+
[AppPlacementType.IsolationContext]: 'Isolation context'
|
|
1366
1360
|
})[placementType] ?? placementType,
|
|
1367
1361
|
groupLabel: (placementTypeLabel, succeeded, total) => `${placementTypeLabel} (${succeeded}/${total})`,
|
|
1368
1362
|
statusLabel: (status) => ({
|
|
1369
|
-
[
|
|
1370
|
-
[
|
|
1371
|
-
[
|
|
1363
|
+
[AppVersionDeploymentStatus.Succeeded]: chalk.green('Succeeded'),
|
|
1364
|
+
[AppVersionDeploymentStatus.Failed]: chalk.red('Failed'),
|
|
1365
|
+
[AppVersionDeploymentStatus.InProgress]: chalk.yellow('In progress')
|
|
1372
1366
|
})[status] ?? status,
|
|
1373
1367
|
stepLabel: (step) => ({
|
|
1374
|
-
[
|
|
1375
|
-
[
|
|
1376
|
-
[
|
|
1377
|
-
[
|
|
1378
|
-
[
|
|
1379
|
-
[
|
|
1380
|
-
[
|
|
1368
|
+
[AppVersionDeploymentStep.Artifact]: 'Artifact',
|
|
1369
|
+
[AppVersionDeploymentStep.Function]: 'Function',
|
|
1370
|
+
[AppVersionDeploymentStep.Containers]: 'Containers',
|
|
1371
|
+
[AppVersionDeploymentStep.HostedResources]: 'Hosted resources',
|
|
1372
|
+
[AppVersionDeploymentStep.CustomScopes]: 'Custom scopes',
|
|
1373
|
+
[AppVersionDeploymentStep.OauthClient]: 'OAuth client',
|
|
1374
|
+
[AppVersionDeploymentStep.ScheduledTriggers]: 'Scheduled triggers'
|
|
1381
1375
|
})[step] ?? step,
|
|
1382
1376
|
noPlacements: `No placements found for this version. Placements are added when your app is installed.\nRun ${forge('install')} to install your app.`,
|
|
1383
|
-
noVersion: (envKey, envType) => `No deployed version found in the ${
|
|
1384
|
-
noStatus: (version, envKey, envType) => `No deployment status is available for version ${
|
|
1377
|
+
noVersion: (envKey, envType) => `No deployed version found in the ${Text.env.displayEnvironment(envKey, envType)} environment. Run ${forge('deploy')} to deploy your app first.`,
|
|
1378
|
+
noStatus: (version, envKey, envType) => `No deployment status is available for version ${major(version)} in the ${Text.env.displayEnvironment(envKey, envType)} environment yet.`
|
|
1385
1379
|
},
|
|
1386
1380
|
deployRetry: {
|
|
1387
1381
|
cmd: 'retry the failed placements of an existing app version deployment in an environment, without a new deployment',
|
|
1388
1382
|
majorVersionOption: 'specify the major version to retry (defaults to the latest deployed version)',
|
|
1389
1383
|
placementOption: 'placement IDs to retry, separated by spaces (defaults to every failed placement)',
|
|
1390
|
-
started: (started, total) => `${
|
|
1384
|
+
started: (started, total) => `${logSymbols.success} Retry started for ${started}/${total} failed placements`,
|
|
1391
1385
|
failed: (started, total) => total
|
|
1392
|
-
? `${
|
|
1393
|
-
: `${
|
|
1386
|
+
? `${logSymbols.error} Retry could not be started for all failed placements (${started}/${total} started)`
|
|
1387
|
+
: `${logSymbols.error} Retry could not be started.`,
|
|
1394
1388
|
unknownFailure: 'A placement could not be retried.',
|
|
1395
1389
|
rejectedByGateway: (message, requestId) => `${message ?? 'Unable to retry the deployment.'} (requestId: ${requestId || 'unknown'})`,
|
|
1396
1390
|
showingSelected: 'Showing only placements selected for retry.',
|
|
1397
|
-
retryRemaining: (envKey, majorVersion) => `${
|
|
1398
|
-
nothingRetried: (envKey, majorVersion) => `${
|
|
1399
|
-
runningInBackground: (envKey, majorVersion) => `${
|
|
1400
|
-
rejected: (envKey, envType, version, majorVersion, message) => `Unable to retry the deployment of version ${
|
|
1391
|
+
retryRemaining: (envKey, majorVersion) => `${logSymbols.info} Run ${deployCommand('retry', envKey, majorVersion)} to retry the remaining failed placements.`,
|
|
1392
|
+
nothingRetried: (envKey, majorVersion) => `${logSymbols.info} No placements were retried. Run ${deployCommand('status', envKey, majorVersion)} to check the deployment status.`,
|
|
1393
|
+
runningInBackground: (envKey, majorVersion) => `${logSymbols.info} Deployment is running in the background. Run ${deployCommand('status', envKey, majorVersion)} to check for updates.`,
|
|
1394
|
+
rejected: (envKey, envType, version, majorVersion, message) => `Unable to retry the deployment of version ${major(version)} in the ${Text.env.displayEnvironment(envKey, envType)} environment${message ? `: ${message}` : '.'}\nRun ${deployCommand('status', envKey, majorVersion)} to check the deployment status.`,
|
|
1401
1395
|
nothingToRetry: (envKey, envType, version, majorVersion, requestedPlacements = false) => `${requestedPlacements
|
|
1402
|
-
? `None of the requested placements have failed for version ${
|
|
1403
|
-
: `No failed placements found for version ${
|
|
1396
|
+
? `None of the requested placements have failed for version ${major(version)} in the ${Text.env.displayEnvironment(envKey, envType)} environment.`
|
|
1397
|
+
: `No failed placements found for version ${major(version)} in the ${Text.env.displayEnvironment(envKey, envType)} environment.`} Nothing was retried. Run ${deployCommand('status', envKey, majorVersion)} to check the deployment status.`
|
|
1404
1398
|
},
|
|
1405
1399
|
tunnel: {
|
|
1406
1400
|
cmd: 'start a tunnel to connect your local code with the app running in the development environment',
|
|
@@ -1409,7 +1403,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1409
1403
|
debuggerHost: 'host to bind the Node runtime debuggers to, default is 127.0.0.1',
|
|
1410
1404
|
functionHandlers: 'list of function handlers declared on manifest to debug, separated by space. This option must be specified if debug mode is enabled. It is only used for Node runtime debugger',
|
|
1411
1405
|
preamble: 'Tunnel redirects requests you make to your local machine. This occurs for any Atlassian site where your app is installed in the specific development environment. You will not see requests from other users.',
|
|
1412
|
-
startingTunnel: (environmentKey, envType) => `Tunnelling to: ${
|
|
1406
|
+
startingTunnel: (environmentKey, envType) => `Tunnelling to: ${Text.env.displayEnvironment(environmentKey, envType)}`,
|
|
1413
1407
|
startedServer: (port) => `Listening for requests on local port ${port}...`,
|
|
1414
1408
|
selfManagedTunnel: (tunnelUrl, port) => `Warning: You are currently using a self-managed tunnel. Please bind your tunnel (${tunnelUrl}) to the local host on port ${port}.`,
|
|
1415
1409
|
startedTunnel: (tunnelUrl) => `Started tunnel at address: ${tunnelUrl}.`,
|
|
@@ -1418,10 +1412,10 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1418
1412
|
tunnelStatusChange: (status) => `Tunnel connection status changed: ${status}.`,
|
|
1419
1413
|
authenticatingDocker: `Authenticating and starting docker containers...`,
|
|
1420
1414
|
startingContainerService: (serviceKey) => `Starting containers for service: ${serviceKey}`,
|
|
1421
|
-
functionHandlersMustBeDefined: `${
|
|
1422
|
-
debugArgumentNameMismatch: (arg) => `Arguments of ${
|
|
1423
|
-
invalidDebugStartingPortNumber: (port) => `${
|
|
1424
|
-
invalidDebugHost: (host) => `${
|
|
1415
|
+
functionHandlersMustBeDefined: `${chalk.bold('--debugFunctionHandlers')} flag must be defined in debug mode.`,
|
|
1416
|
+
debugArgumentNameMismatch: (arg) => `Arguments of ${chalk.bold('--debugFunctionHandlers')}, namely '${arg}', must be function handlers defined in the manifest.`,
|
|
1417
|
+
invalidDebugStartingPortNumber: (port) => `${chalk.bold('--debugStartingPort')} ${port} must be a valid port number.`,
|
|
1418
|
+
invalidDebugHost: (host) => `${chalk.bold('--debugHost')} ${host} must be a valid IPv4 or IPv6 address.`,
|
|
1425
1419
|
unableToAuthenticateDocker: (errCode) => `Docker authentication process exited with code: ${errCode}.`,
|
|
1426
1420
|
unableToPullProxySidecarImage: (errMessage) => `Unable to pull the proxy sidecar image. Make sure to run 'forge containers docker-login' first. Full error: ${errMessage}`,
|
|
1427
1421
|
unableToStartDockerComposeStack: (errMessage) => `Cannot start Docker Compose stack. This usually happens when Docker isn't running or the provided manifest config is incorrect (e.g. configured Docker image doesn't exist). To fix this: Start a Docker engine, ensure the manifest config is correct, then retry the command. Full error: ${errMessage}`,
|
|
@@ -1433,7 +1427,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1433
1427
|
invocationTimeout: (timeout) => `Function result will not be returned to the Forge platform, as the function did not complete within ${timeout} seconds. In invocations outside tunnel, functions that exceed the time limit are terminated.`,
|
|
1434
1428
|
customUI: {
|
|
1435
1429
|
fileServed: (filename, resourceKey) => `Serving file ${filename} for resource ${resourceKey}`,
|
|
1436
|
-
fileProxied: (filename, resourceKey, tunnelPort) => `Received proxy request. ${
|
|
1430
|
+
fileProxied: (filename, resourceKey, tunnelPort) => `Received proxy request. ${Text.tunnel.customUI.fileServed(filename, resourceKey)} from specified address http://localhost:${tunnelPort}`,
|
|
1437
1431
|
warning: {
|
|
1438
1432
|
cspViolation: (localUrl, violation) => `CSP violation detected for '${violation}' while serving content at ${localUrl}\nFor an app to share data with external resources or use custom CSP, follow the steps in: ${go('forge-content-security-and-egress-controls')}\n`
|
|
1439
1433
|
}
|
|
@@ -1442,8 +1436,8 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1442
1436
|
invoke: (req, port) => `Proxying request to service ${req.method} http://${req.host}:${port}${req.path}`,
|
|
1443
1437
|
error: (cause) => `Failed to proxy request: ${cause}`
|
|
1444
1438
|
},
|
|
1445
|
-
preBundleTask: (title) => `${
|
|
1446
|
-
lintFailed:
|
|
1439
|
+
preBundleTask: (title) => `${LogColor.trace('===')} ${title}`,
|
|
1440
|
+
lintFailed: chalk.red(`${chalk.bold('Error:')} Linting failed due to errors in the app code.`),
|
|
1447
1441
|
bundlingHeader: 'Bundling code...',
|
|
1448
1442
|
bundlingSucceeded: 'App code bundled.',
|
|
1449
1443
|
resourcesBundlingSucceeded: `${greenTick} Resources bundled.`,
|
|
@@ -1459,7 +1453,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1459
1453
|
handler: {
|
|
1460
1454
|
notFound: (handler) => `Function with handler "${handler}" was not found`
|
|
1461
1455
|
},
|
|
1462
|
-
manifestChangeDetected: `Changes to ${
|
|
1456
|
+
manifestChangeDetected: `Changes to ${MANIFEST_FILE} have been detected. You will need to deploy your forge app to apply these changes.`,
|
|
1463
1457
|
dockerNotInstalled: (dockerDownloadLink) => 'Cannot find Docker. This command requires Docker to run your app locally. ' +
|
|
1464
1458
|
`Get Docker at the following URL before rerunning the command:\n\n${dockerDownloadLink}`,
|
|
1465
1459
|
dockerDaemonNotRunning: (err, isVerbose) => `Docker is not running. This command requires Docker to run your app locally. Open Docker before rerunning the command.` +
|
|
@@ -1469,7 +1463,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1469
1463
|
cloudflaredExit: (code) => code
|
|
1470
1464
|
? `Cloudflared exited. Rerunning the command with --verbose may give more details.`
|
|
1471
1465
|
: `Cloudflared exited with code: ${code}. Rerunning the command with --verbose may give more details.`,
|
|
1472
|
-
cloudflaredUnavailableError: `Please check for any network restrictions that may be blocking the ${
|
|
1466
|
+
cloudflaredUnavailableError: `Please check for any network restrictions that may be blocking the ${chalk.bold('cloudflared')} package installation, and then reinstall the Forge CLI.\n` +
|
|
1473
1467
|
`See ${buildTerminalLink('https://developer.atlassian.com/platform/forge/enterprise/use-forge-cli-on-corporate-network/#use-the-forge-cli-on-a-corporate-network')}. \n` +
|
|
1474
1468
|
'Alternatively, you can install cloudflared on your machine.',
|
|
1475
1469
|
invalidSelfManagedTunnelUrl: (url) => `Invalid self-managed tunnel URL: ${url}.`,
|
|
@@ -1499,24 +1493,24 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1499
1493
|
desc: 'Select where to uninstall the app:',
|
|
1500
1494
|
progressInfo: `To uninstall your app from a site or workspace, select it from the list.\nSelect a connection to remove just that link.\nPress Ctrl+C to cancel.`,
|
|
1501
1495
|
columns: ['Installation ID', 'Environment', 'Installed in', 'Connected to', 'Version', 'Status'],
|
|
1502
|
-
done: `\n${
|
|
1496
|
+
done: `\n${logSymbols.success} Apps uninstalled`,
|
|
1503
1497
|
confirmOptionalContexts: (scope = 'site') => `This will uninstall the app from all Atlassian apps and platform tools in this ${scope}. Are you sure you want to continue?`,
|
|
1504
1498
|
confirmAllInstallations: 'This will uninstall the app from the listed contexts. Are you sure you want to continue?'
|
|
1505
1499
|
},
|
|
1506
1500
|
info: 'Uninstalling...',
|
|
1507
1501
|
done: ({ product, domain, environment, isMulti, installedInUnit, unitId, hadConnections }) => installedInUnit
|
|
1508
|
-
? `${isMulti ?
|
|
1502
|
+
? `${isMulti ? logSymbols.info : logSymbols.success} Uninstalled the app${unitId ? ` from unit ${unitId}` : ''}${hadConnections ? ' and unlinked from all connections' : ''}.`
|
|
1509
1503
|
: product === 'Ecosystem'
|
|
1510
|
-
? `${isMulti ?
|
|
1511
|
-
: `${isMulti ?
|
|
1504
|
+
? `${isMulti ? logSymbols.info : logSymbols.success} Uninstalled.`
|
|
1505
|
+
: `${isMulti ? logSymbols.info : logSymbols.success} Uninstalled from the ${environmentToOption(environment)} environment in ${product} on ${buildTerminalLink(domain)}.`,
|
|
1512
1506
|
failed: ({ product, domain, environment, installedInUnit, unitId }) => installedInUnit
|
|
1513
1507
|
? `Failed to uninstall the app${unitId ? ` from unit ${unitId}` : ''}. Try rerunning the command, or ask for help if you continue to see this error.`
|
|
1514
1508
|
: product === 'Ecosystem'
|
|
1515
1509
|
? `Failed to uninstall the app. Try rerunning the command, or ask for help if you continue to see this error.`
|
|
1516
|
-
: `Failed to uninstall the app from the ${
|
|
1510
|
+
: `Failed to uninstall the app from the ${environmentToOption(environment)} environment in ${product} on ${buildTerminalLink(domain)}. Try rerunning the command, or ask for help if you continue to see this error.`,
|
|
1517
1511
|
missingUninstallTask: `Cannot uninstall the app: something went wrong with starting the uninstall task.`,
|
|
1518
|
-
uninstallBatchBanner: (remainingInstallations) =>
|
|
1519
|
-
uninstallBatchProductionError: `${
|
|
1512
|
+
uninstallBatchBanner: (remainingInstallations) => LogColor.warn(`${logSymbols.info} ${chalk.bold(`Batch uninstallations are limited to ${MAX_BATCH_UNINSTALLS} per request and there ${remainingInstallations > 1 ? `are ${remainingInstallations} installations` : 'is 1 installation'} remaining. Run the command multiple times to perform more uninstallations`)}`),
|
|
1513
|
+
uninstallBatchProductionError: `${logSymbols.error} ${chalk.bold('Batch uninstallations are not supported in production environments.')}`
|
|
1520
1514
|
},
|
|
1521
1515
|
webtrigger: {
|
|
1522
1516
|
cmd: 'manage webtriggers',
|
|
@@ -1544,7 +1538,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1544
1538
|
tablePreMessage: '\nShowing all webtrigger URLs:',
|
|
1545
1539
|
noWebtriggerURLs: 'No webtrigger URLs created.',
|
|
1546
1540
|
overviewInstallationTable: `\nListing web trigger URLs by an app installation.\n\nPress Ctrl+C to cancel.\n`,
|
|
1547
|
-
listUrlsForKey: (key) => `\nShowing all webtrigger URLs for module ${
|
|
1541
|
+
listUrlsForKey: (key) => `\nShowing all webtrigger URLs for module ${chalk.bold(key)}:`
|
|
1548
1542
|
},
|
|
1549
1543
|
delete: {
|
|
1550
1544
|
cmd: 'delete a webtrigger URL',
|
|
@@ -1611,32 +1605,32 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1611
1605
|
running: `Running ${forge('lint')}...`,
|
|
1612
1606
|
noProblems: 'No issues found.',
|
|
1613
1607
|
teamworkGraphScopes: 'Teamwork Graph API usage detected, but no graph scopes are declared in your manifest. To resolve this, review https://go.atlassian.com/forge-permissions and add the required scopes to your manifest.',
|
|
1614
|
-
approvalRequired:
|
|
1615
|
-
noFixableProblem:
|
|
1616
|
-
noFixableProblems:
|
|
1617
|
-
filename:
|
|
1608
|
+
approvalRequired: chalk.cyan(` Approval required, fixable with ${forge('deploy', '--approve <ruleName..>')}.`),
|
|
1609
|
+
noFixableProblem: chalk.red(` Issue found is not automatically fixable with ${forge('lint')}.`),
|
|
1610
|
+
noFixableProblems: chalk.red(` Issues found are not automatically fixable with ${forge('lint')}.`),
|
|
1611
|
+
filename: chalk.underline,
|
|
1618
1612
|
errorMissingManifest: `Missing manifest`,
|
|
1619
1613
|
errorInvalidManifest: `Invalid manifest`,
|
|
1620
|
-
linterFailed: (linterClass, failure) =>
|
|
1614
|
+
linterFailed: (linterClass, failure) => chalk.yellow(`${chalk.bold('Warning:')} Could not perform some linting actions for ${chalk.bold(linterClass)} due to unhandled error "${failure}".\n`),
|
|
1621
1615
|
fixed: (numFixableErrors, numFixableWarnings) => {
|
|
1622
1616
|
const { pluralCheckedFixableErrors, pluralCheckedFixableWarnings } = checkLintTotalPlurals(0, 0, 0, numFixableErrors, numFixableWarnings);
|
|
1623
1617
|
return `${greenTick} Fixed ${pluralCheckedFixableErrors} and ${pluralCheckedFixableWarnings}`;
|
|
1624
1618
|
},
|
|
1625
1619
|
fixFollowUp: `Run ${forge('lint')} to review outstanding errors and warnings`,
|
|
1626
|
-
error: (line, column, message, reference) => getLintMessage(line, column, message, 'error',
|
|
1620
|
+
error: (line, column, message, reference) => getLintMessage(line, column, message, 'error', LogColor.error, reference),
|
|
1627
1621
|
summary: (numErrors, numWarnings, numApprovals, numFixableErrors, numFixableWarnings) => {
|
|
1628
1622
|
const { pluralCheckedErrors, pluralCheckedWarnings, pluralCheckedApprovals, pluralCheckedTotal } = checkLintTotalPlurals(numErrors, numWarnings, numApprovals, numFixableErrors, numFixableWarnings);
|
|
1629
|
-
const colourFunction = numErrors ?
|
|
1623
|
+
const colourFunction = numErrors ? LogColor.error : numWarnings ? LogColor.warn : LogColor.approval;
|
|
1630
1624
|
const warningCharacter = numErrors ? 'X' : '⚠';
|
|
1631
1625
|
return colourFunction(`${warningCharacter} ${pluralCheckedTotal} (${pluralCheckedErrors}, ${pluralCheckedWarnings}, ${pluralCheckedApprovals})`);
|
|
1632
1626
|
},
|
|
1633
1627
|
fixSummary: (numErrors, numFixableErrors, numFixableWarnings) => {
|
|
1634
1628
|
const { pluralCheckedFixableErrors, pluralCheckedFixableWarnings } = checkLintTotalPlurals(0, 0, 0, numFixableErrors, numFixableWarnings);
|
|
1635
|
-
const colourFunction = numErrors ?
|
|
1629
|
+
const colourFunction = numErrors ? LogColor.error : LogColor.warn;
|
|
1636
1630
|
return colourFunction(` Run ${forge('lint', '--fix')} to automatically fix ${pluralCheckedFixableErrors} and ${pluralCheckedFixableWarnings}.\n`);
|
|
1637
1631
|
},
|
|
1638
|
-
warning: (line, column, message, reference) => getLintMessage(line, column, message, 'warning',
|
|
1639
|
-
approval: (line, column, message, reference) => getLintMessage(line, column, message, 'approval',
|
|
1632
|
+
warning: (line, column, message, reference) => getLintMessage(line, column, message, 'warning', LogColor.warn, reference),
|
|
1633
|
+
approval: (line, column, message, reference) => getLintMessage(line, column, message, 'approval', LogColor.approval, reference)
|
|
1640
1634
|
},
|
|
1641
1635
|
repositories: {
|
|
1642
1636
|
cmd: {
|
|
@@ -1708,7 +1702,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1708
1702
|
interactive: {
|
|
1709
1703
|
desc: 'Select container to delete:',
|
|
1710
1704
|
progressInfo: `To delete a container, select it from the list.\nPress Ctrl+C to cancel.`,
|
|
1711
|
-
noContainersFound: `This app does not have any containers.\nRun ${
|
|
1705
|
+
noContainersFound: `This app does not have any containers.\nRun ${chalk.bold('forge containers create')} to create a container for your app.`
|
|
1712
1706
|
},
|
|
1713
1707
|
deletingContainer: (key) => `Deleting container definition with key '${key}'.`,
|
|
1714
1708
|
warning: 'Deleting container is irreversible and will delete all images associated with it.',
|
|
@@ -1746,7 +1740,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1746
1740
|
cmd: {
|
|
1747
1741
|
desc: "display information about the deployed app's containers and services"
|
|
1748
1742
|
},
|
|
1749
|
-
specifyPlacement: (placement) => `Placement: ${
|
|
1743
|
+
specifyPlacement: (placement) => `Placement: ${chalk.bold(placement)}`,
|
|
1750
1744
|
fetchingServices: 'Fetching deployed services',
|
|
1751
1745
|
fetchingContainers: 'Fetching deployed service containers',
|
|
1752
1746
|
services: {
|
|
@@ -1756,7 +1750,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1756
1750
|
watchOption: 'watch for changes to selected services'
|
|
1757
1751
|
},
|
|
1758
1752
|
overview: 'Showing service information.',
|
|
1759
|
-
specificService: (serviceKey, environment) => `Showing service: ${
|
|
1753
|
+
specificService: (serviceKey, environment) => `Showing service: ${chalk.bold(serviceKey)} deployed in the '${environment}' environment.`,
|
|
1760
1754
|
allServices: (environment) => `Showing all services defined and deployed in the '${environment}' environment:`,
|
|
1761
1755
|
noServicesFound: (environment) => `No services found in the '${environment}' environment.`
|
|
1762
1756
|
},
|
|
@@ -1775,9 +1769,9 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1775
1769
|
specifiedServiceNotFound: (service, environment) => `No service '${service}' found in the '${environment}' environment.`,
|
|
1776
1770
|
specifiedContainerNotFound: (service, container, environment) => `No container '${container}' found for the service '${service}' in the '${environment}' environment.`,
|
|
1777
1771
|
noContainersFoundForService: (service, environment) => `No containers found for the service '${service}' in the '${environment}' environment.`,
|
|
1778
|
-
specificContainer: (containerKey) => `Container: ${
|
|
1772
|
+
specificContainer: (containerKey) => `Container: ${chalk.bold(containerKey)}`,
|
|
1779
1773
|
noInstancesFoundForContainer: (containerKey, service, environment) => `No instances found for the container '${containerKey}' for the service '${service}' in the '${environment}' environment.`,
|
|
1780
|
-
specifyImageRepository: (imageRepo) => `Image repository: ${
|
|
1774
|
+
specifyImageRepository: (imageRepo) => `Image repository: ${chalk.bold(imageRepo)}`
|
|
1781
1775
|
}
|
|
1782
1776
|
},
|
|
1783
1777
|
stub: {
|
|
@@ -1785,12 +1779,12 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1785
1779
|
},
|
|
1786
1780
|
customPrompts: {
|
|
1787
1781
|
table: {
|
|
1788
|
-
promptMessage: (message) => `${
|
|
1789
|
-
headerMessage: (message, singleOption) => `${
|
|
1782
|
+
promptMessage: (message) => `${chalk.green('?')} ${message}`,
|
|
1783
|
+
headerMessage: (message, singleOption) => `${chalk.bold(message)} ${chalk.dim(singleOption ? ' (Use the Enter key to select)' : ' (Use the spacebar to select multiple)')}`
|
|
1790
1784
|
},
|
|
1791
1785
|
singleSelectionTable: {
|
|
1792
|
-
doneHeaderMessage: (message) => `${
|
|
1793
|
-
decorateSelected: (site) => `${
|
|
1786
|
+
doneHeaderMessage: (message) => `${chalk.bold(message)}`,
|
|
1787
|
+
decorateSelected: (site) => `${chalk.cyan(site)}`
|
|
1794
1788
|
}
|
|
1795
1789
|
},
|
|
1796
1790
|
variables: {
|
|
@@ -1799,7 +1793,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1799
1793
|
settings: {
|
|
1800
1794
|
description: 'manage Forge CLI settings',
|
|
1801
1795
|
analytics: {
|
|
1802
|
-
banner: `We are continuously working to improve the developer experience in Forge. CLI usage helps us do just that. Select ${
|
|
1796
|
+
banner: `We are continuously working to improve the developer experience in Forge. CLI usage helps us do just that. Select ${chalk.bold('yes')} below to agree to our collection of analytics data through our tools. You can use ${forge('settings')} to manage your settings at any time.`,
|
|
1803
1797
|
promptMessage: 'Allow Forge to collect CLI usage and error reporting information?'
|
|
1804
1798
|
},
|
|
1805
1799
|
set: {
|
|
@@ -1829,7 +1823,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
1829
1823
|
},
|
|
1830
1824
|
customEffects: {
|
|
1831
1825
|
description: 'Enable custom spinner effects',
|
|
1832
|
-
setupError:
|
|
1826
|
+
setupError: chalk.yellow('Failed to fetch custom spinner config. Custom spinner effects can be disabled via forge settings')
|
|
1833
1827
|
},
|
|
1834
1828
|
proxy: {
|
|
1835
1829
|
description: 'Configure proxy for all Forge CLI network requests',
|
|
@@ -1913,7 +1907,7 @@ When errors occur during Forge command execution, error details will be sent to
|
|
|
1913
1907
|
pipeIn: (secretName) => `Pipe the ${secretName} in on stdin.`,
|
|
1914
1908
|
passFlagAndPipeIn: (readFlag, secretName) => `Pass ${readFlag} and pipe the ${secretName} in on stdin.`,
|
|
1915
1909
|
flagAndArgv: (readFlag, argvOption) => `Use either ${readFlag} or ${argvOption}, not both.`,
|
|
1916
|
-
argvDeprecated: (argvOption, readFlag) => `${
|
|
1910
|
+
argvDeprecated: (argvOption, readFlag) => `${chalk.bold('Warning')}: ${argvOption} is deprecated, because a value passed as an argument is visible in the process list and shell history. Use ${readFlag} and pipe the value in on stdin instead.`
|
|
1917
1911
|
},
|
|
1918
1912
|
customScopes: {
|
|
1919
1913
|
deploy: {
|