@forge/cli 5.2.1-next.0 → 6.0.0-next.3
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 +46 -0
- package/npm-shrinkwrap.json +1068 -795
- package/out/analytics-client/analytics-client.js +2 -2
- package/out/analytics-client/analytics-message-handler.d.ts.map +1 -1
- package/out/analytics-client/analytics-message-handler.js +1 -1
- package/out/autocomplete/index.js +6 -5
- package/out/autocomplete/util.js +4 -2
- package/out/bin/cli.js +1 -1
- package/out/bin/postinstall.js +3 -3
- package/out/command-line/anon-user-id.js +1 -1
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +19 -17
- package/out/command-line/controller/autocomplete-controller.js +2 -2
- package/out/command-line/controller/feedback-controller.js +1 -1
- package/out/command-line/controller/install-controller.js +8 -8
- package/out/command-line/controller/prerequisites-controller.js +4 -4
- package/out/command-line/controller/tunnel-controller.js +1 -1
- package/out/command-line/dependency-injection.d.ts +2 -2
- package/out/command-line/dependency-injection.js +8 -7
- package/out/command-line/environment.js +3 -2
- package/out/command-line/index.d.ts +1 -1
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +21 -19
- package/out/command-line/register-app-commands.js +4 -4
- package/out/command-line/register-authentication-command.js +2 -2
- package/out/command-line/register-autocomplete-commands.js +2 -1
- package/out/command-line/register-deployment-commands.js +2 -1
- package/out/command-line/register-environment-variables-commands.js +2 -1
- package/out/command-line/register-feedback-commands.js +2 -1
- package/out/command-line/register-installation-commands.js +15 -12
- package/out/command-line/register-lint-command.js +2 -1
- package/out/command-line/register-log-commands.js +9 -8
- package/out/command-line/register-providers-commands.js +2 -1
- package/out/command-line/register-settings-commands.js +2 -1
- package/out/command-line/register-tunnel-commands.js +2 -1
- package/out/command-line/register-webtrigger-commands.js +3 -2
- package/out/command-line/unique-machine-id.js +4 -3
- package/out/command-line/version-info.d.ts.map +1 -1
- package/out/command-line/version-info.js +7 -4
- package/out/command-line/view/deploy-view.js +2 -2
- package/out/command-line/view/install-view.js +7 -7
- package/out/command-line/view/lint-view.d.ts +1 -1
- package/out/command-line/view/lint-view.d.ts.map +1 -1
- package/out/command-line/view/lite-lint-view.d.ts +1 -1
- package/out/command-line/view/lite-lint-view.d.ts.map +1 -1
- package/out/command-line/view/tunnel-view.js +1 -1
- package/out/deploy/deployer/deployer.js +1 -1
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +1 -1
- package/out/deploy/package-upload-deploy.js +1 -1
- package/out/deploy/packager/archiver.js +4 -4
- package/out/deploy/packager/runtime-bundler.js +1 -1
- package/out/deploy/uploader/artifact-graphql-client.js +2 -2
- package/out/environment-variables/graphql-client.d.ts +2 -2
- package/out/environment-variables/graphql-client.d.ts.map +1 -1
- package/out/environment-variables/graphql-client.js +2 -2
- package/out/installations/graphql-client.js +6 -6
- package/out/installations/shared.d.ts.map +1 -1
- package/out/installations/shared.js +2 -1
- package/out/installations/site-translation/bitbucket.js +5 -4
- package/out/providers/graphql-client.js +1 -1
- package/out/service/command-suggestion-service.js +1 -1
- package/out/service/docker-service.js +4 -4
- package/out/service/installation-service.js +6 -6
- package/out/service/lint-service.d.ts +1 -1
- package/out/service/lint-service.d.ts.map +1 -1
- package/out/service/lint-service.js +3 -3
- package/out/service/lite-lint-service.d.ts +1 -1
- package/out/service/lite-lint-service.d.ts.map +1 -1
- package/out/service/migration-keys-service.d.ts +1 -1
- package/out/service/migration-keys-service.d.ts.map +1 -1
- package/out/service/port-finding-service.js +1 -1
- package/out/service/resource-packaging-service.js +4 -4
- package/out/service/resources-uploader-service.js +1 -1
- package/out/service/tunnel-service.js +8 -8
- package/out/storage/local-file-storage.js +1 -1
- package/out/webtrigger/get-webtrigger-url.js +2 -2
- package/out/workers/forge-cli-workers.js +1 -1
- package/out/workers/tunnel-clean-up-worker.js +1 -1
- package/out/workers/version-check-worker.js +1 -1
- package/out/workers/worker-info.js +3 -2
- package/out/workers/worker.d.ts.map +1 -1
- package/out/workers/worker.js +5 -3
- package/out/workers/workers-starter.js +1 -1
- package/package.json +8 -7
|
@@ -26,6 +26,7 @@ const registerFeedbackCommands = ({ cmd, ui, controllers: { feedbackController }
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
const registerCommands = (deps) => {
|
|
30
30
|
registerFeedbackCommands(deps);
|
|
31
31
|
};
|
|
32
|
+
exports.registerCommands = registerCommands;
|
|
@@ -36,9 +36,9 @@ const registerListInstallationsCommand = ({ cmd, ui, services: { installationsSe
|
|
|
36
36
|
['version', 'Version']
|
|
37
37
|
], installations.map(({ id, environmentKey, product, site, version: { isLatest } }) => ({
|
|
38
38
|
id,
|
|
39
|
-
environment: cli_shared_1.environmentToOption(environmentKey),
|
|
39
|
+
environment: (0, cli_shared_1.environmentToOption)(environmentKey),
|
|
40
40
|
site,
|
|
41
|
-
product: cli_shared_1.capitalizeProduct(product),
|
|
41
|
+
product: (0, cli_shared_1.capitalizeProduct)(product),
|
|
42
42
|
version: cli_shared_1.Text.install.booleanToScope(isLatest)
|
|
43
43
|
})), {
|
|
44
44
|
json,
|
|
@@ -47,13 +47,13 @@ const registerListInstallationsCommand = ({ cmd, ui, services: { installationsSe
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
const performSingleUninstall = async (installId, { ui, commands: { uninstallAppCommand } }) => {
|
|
51
51
|
const installation = await ui.displayProgress(() => uninstallAppCommand.execute(installId), cli_shared_1.Text.uninstall.cmd.start, (result) => ({
|
|
52
52
|
successful: !!result.successful,
|
|
53
53
|
message: cli_shared_1.Text.uninstall.cmd.success(false)
|
|
54
54
|
}));
|
|
55
55
|
const uninstallMessageFormat = installation.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
56
|
-
const uninstallMessage = uninstallMessageFormat(cli_shared_1.capitalizeProduct(installation.product), installation.site, installation.environmentKey, cli_shared_1.environmentToOption, false);
|
|
56
|
+
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(installation.product), installation.site, installation.environmentKey, cli_shared_1.environmentToOption, false);
|
|
57
57
|
if (installation.successful) {
|
|
58
58
|
ui.info(uninstallMessage);
|
|
59
59
|
}
|
|
@@ -61,7 +61,8 @@ exports.performSingleUninstall = async (installId, { ui, commands: { uninstallAp
|
|
|
61
61
|
ui.error(new shared_1.UninstallAppError(uninstallMessage));
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
exports.
|
|
64
|
+
exports.performSingleUninstall = performSingleUninstall;
|
|
65
|
+
const performMultipleUninstalls = async (appsToUninstall, { ui, commands: { uninstallAppCommand } }) => {
|
|
65
66
|
const filteredInstallations = appsToUninstall.filter(({ product }) => product !== 'identity');
|
|
66
67
|
const hasMultipleNonIdentityApps = filteredInstallations.length > 1;
|
|
67
68
|
const uninstalledApps = await ui.displayProgress(() => uninstallAppCommand.batchExecute([], appsToUninstall), cli_shared_1.Text.uninstall.cmd.start, (result) => {
|
|
@@ -74,7 +75,7 @@ exports.performMultipleUninstalls = async (appsToUninstall, { ui, commands: { un
|
|
|
74
75
|
const deferredErrors = [];
|
|
75
76
|
uninstalledApps.forEach((uninstall) => {
|
|
76
77
|
const uninstallMessageFormat = uninstall.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
77
|
-
const formattedMessage = uninstallMessageFormat(cli_shared_1.capitalizeProduct(uninstall.product), uninstall.site, uninstall.environmentKey, cli_shared_1.environmentToOption, hasMultipleNonIdentityApps);
|
|
78
|
+
const formattedMessage = uninstallMessageFormat((0, cli_shared_1.capitalizeProduct)(uninstall.product), uninstall.site, uninstall.environmentKey, cli_shared_1.environmentToOption, hasMultipleNonIdentityApps);
|
|
78
79
|
if (uninstall.successful && uninstall.product !== 'identity') {
|
|
79
80
|
ui.info(formattedMessage);
|
|
80
81
|
}
|
|
@@ -91,6 +92,7 @@ exports.performMultipleUninstalls = async (appsToUninstall, { ui, commands: { un
|
|
|
91
92
|
ui.info(cli_shared_1.Text.uninstall.interactive.done);
|
|
92
93
|
}
|
|
93
94
|
};
|
|
95
|
+
exports.performMultipleUninstalls = performMultipleUninstalls;
|
|
94
96
|
const registerUninstallCommand = (deps) => {
|
|
95
97
|
const { cmd, ui, services: { installationsService } } = deps;
|
|
96
98
|
cmd
|
|
@@ -108,29 +110,29 @@ const registerUninstallCommand = (deps) => {
|
|
|
108
110
|
ui.info(cli_shared_1.Text.uninstall.info);
|
|
109
111
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
110
112
|
ui.emptyLine();
|
|
111
|
-
await exports.performSingleUninstall(installId, deps);
|
|
113
|
+
await (0, exports.performSingleUninstall)(installId, deps);
|
|
112
114
|
}
|
|
113
115
|
else {
|
|
114
116
|
const filteredInstallations = installations.filter((install) => install.product !== 'identity' && install.product !== 'jira-servicedesk');
|
|
115
117
|
const selectedSitesIndexes = await ui.promptForTable(cli_shared_1.Text.uninstall.interactive.desc, cli_shared_1.Text.uninstall.interactive.progressInfo, ['Environment', 'Site', 'Product'], filteredInstallations.map(({ id, environmentKey, product, site }) => ({
|
|
116
|
-
names: [cli_shared_1.environmentToOption(environmentKey), site, cli_shared_1.capitalizeProduct(product)],
|
|
118
|
+
names: [(0, cli_shared_1.environmentToOption)(environmentKey), site, (0, cli_shared_1.capitalizeProduct)(product)],
|
|
117
119
|
value: id
|
|
118
120
|
})));
|
|
119
121
|
const appsToUninstall = filteredInstallations.filter((_, index) => selectedSitesIndexes.includes(index));
|
|
120
122
|
const selectedSites = new Set(appsToUninstall.map(({ site }) => site));
|
|
121
123
|
const remainingApps = filteredInstallations.filter((_, index) => !selectedSitesIndexes.includes(index));
|
|
122
|
-
appsToUninstall.push(...shared_1.getHangingIdentityInstallationsFromSite(installations, remainingApps, selectedSites));
|
|
124
|
+
appsToUninstall.push(...(0, shared_1.getHangingIdentityInstallationsFromSite)(installations, remainingApps, selectedSites));
|
|
123
125
|
if (appsToUninstall.length > 1) {
|
|
124
|
-
await exports.performMultipleUninstalls(appsToUninstall, deps);
|
|
126
|
+
await (0, exports.performMultipleUninstalls)(appsToUninstall, deps);
|
|
125
127
|
}
|
|
126
128
|
else {
|
|
127
|
-
await exports.performSingleUninstall(appsToUninstall[0].id, deps);
|
|
129
|
+
await (0, exports.performSingleUninstall)(appsToUninstall[0].id, deps);
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
});
|
|
131
133
|
};
|
|
132
134
|
const DEPRECATED_LIST_COMMAND = 'install:list';
|
|
133
|
-
|
|
135
|
+
const registerCommands = (_a) => {
|
|
134
136
|
var { cmd } = _a, deps = tslib_1.__rest(_a, ["cmd"]);
|
|
135
137
|
const install = cmd.command(COMMAND_NAME).description(cli_shared_1.Text.variables.description);
|
|
136
138
|
registerUninstallCommand(Object.assign({ cmd }, deps));
|
|
@@ -138,3 +140,4 @@ exports.registerCommands = (_a) => {
|
|
|
138
140
|
registerInstallAppCommand(Object.assign({ cmd: install }, deps));
|
|
139
141
|
registerListInstallationsCommand(Object.assign({ cmd: install }, deps));
|
|
140
142
|
};
|
|
143
|
+
exports.registerCommands = registerCommands;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommands = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
-
|
|
5
|
+
const registerCommands = ({ cmd, controllers: { lintController } }) => {
|
|
6
6
|
cmd
|
|
7
7
|
.command('lint')
|
|
8
8
|
.requireManifestFile()
|
|
@@ -13,3 +13,4 @@ exports.registerCommands = ({ cmd, controllers: { lintController } }) => {
|
|
|
13
13
|
await lintController.run(environment, fix);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
+
exports.registerCommands = registerCommands;
|
|
@@ -19,7 +19,7 @@ function parseSinceDateTime(dateTime) {
|
|
|
19
19
|
if (dateTime) {
|
|
20
20
|
const since = ['m', 'h', 'd'].includes(dateTime[dateTime.length - 1]);
|
|
21
21
|
if (since) {
|
|
22
|
-
parsed = dayjs_1.default().subtract(parseInt(dateTime.replace(/\D/g, ''), 10), dateTime.replace(/\d/g, ''));
|
|
22
|
+
parsed = (0, dayjs_1.default)().subtract(parseInt(dateTime.replace(/\D/g, ''), 10), dateTime.replace(/\d/g, ''));
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
parsed = dayjs_1.default.utc(dateTime);
|
|
@@ -38,13 +38,13 @@ function combineLogParts(message, other) {
|
|
|
38
38
|
}
|
|
39
39
|
function logFlat(logger, { id, appVersion, function: fn, trigger, logs }) {
|
|
40
40
|
logs.forEach(({ timestamp, level, message, other }) => {
|
|
41
|
-
logger.info(cli_shared_2.formatRuntimeLogLevel(level) +
|
|
41
|
+
logger.info((0, cli_shared_2.formatRuntimeLogLevel)(level) +
|
|
42
42
|
' ' +
|
|
43
43
|
timestamp +
|
|
44
44
|
' ' +
|
|
45
45
|
id +
|
|
46
46
|
' ' +
|
|
47
|
-
cli_shared_2.formatRuntimeLogArgs(combineLogParts(message, other)));
|
|
47
|
+
(0, cli_shared_2.formatRuntimeLogArgs)(combineLogParts(message, other)));
|
|
48
48
|
logger.debug(` App version: ${appVersion}`);
|
|
49
49
|
if (fn) {
|
|
50
50
|
logger.debug(` Function name: ${fn}`);
|
|
@@ -73,13 +73,13 @@ function logGrouped(logger, { id, appVersion, function: fn, trigger, logs }) {
|
|
|
73
73
|
}
|
|
74
74
|
logs.forEach(({ timestamp, level, message, other }) => {
|
|
75
75
|
if (logger.debugEnabled) {
|
|
76
|
-
logger.info(cli_shared_2.formatRuntimeLogLevel(level) +
|
|
76
|
+
logger.info((0, cli_shared_2.formatRuntimeLogLevel)(level) +
|
|
77
77
|
' ' +
|
|
78
78
|
timestamp +
|
|
79
79
|
' ' +
|
|
80
80
|
id +
|
|
81
81
|
' ' +
|
|
82
|
-
cli_shared_2.formatRuntimeLogArgs(combineLogParts(message, other)));
|
|
82
|
+
(0, cli_shared_2.formatRuntimeLogArgs)(combineLogParts(message, other)));
|
|
83
83
|
logger.debug(` App version: ${appVersion}`);
|
|
84
84
|
if (fn) {
|
|
85
85
|
logger.debug(` Function name: ${fn}`);
|
|
@@ -89,11 +89,11 @@ function logGrouped(logger, { id, appVersion, function: fn, trigger, logs }) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
else {
|
|
92
|
-
logger.info(cli_shared_2.formatRuntimeLogLevel(level) +
|
|
92
|
+
logger.info((0, cli_shared_2.formatRuntimeLogLevel)(level) +
|
|
93
93
|
' ' +
|
|
94
94
|
timestamp.split('T')[1] +
|
|
95
95
|
' ' +
|
|
96
|
-
cli_shared_2.formatRuntimeLogArgs(combineLogParts(message, other)));
|
|
96
|
+
(0, cli_shared_2.formatRuntimeLogArgs)(combineLogParts(message, other)));
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
logger.info('');
|
|
@@ -101,7 +101,7 @@ function logGrouped(logger, { id, appVersion, function: fn, trigger, logs }) {
|
|
|
101
101
|
function logInvocation(logger, invocation, grouped) {
|
|
102
102
|
grouped ? logGrouped(logger, invocation) : logFlat(logger, invocation);
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
const registerCommands = ({ cmd, ui, commands: { viewAppLogsCommand } }) => {
|
|
105
105
|
cmd
|
|
106
106
|
.command('logs')
|
|
107
107
|
.requireAppId()
|
|
@@ -136,3 +136,4 @@ exports.registerCommands = ({ cmd, ui, commands: { viewAppLogsCommand } }) => {
|
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
+
exports.registerCommands = registerCommands;
|
|
@@ -38,6 +38,7 @@ const registerConfigureProviderCommand = ({ cmd, ui, commands: { configureProvid
|
|
|
38
38
|
await ui.displayProgress(() => configureProviderCommand.execute({ environment, providerKey, clientSecret: oauthClientSecret }), cli_shared_1.Text.configureProvider.cmd.start, cli_shared_1.Text.configureProvider.cmd.success);
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
const registerCommands = (deps) => {
|
|
42
42
|
registerConfigureProviderCommand(deps);
|
|
43
43
|
};
|
|
44
|
+
exports.registerCommands = registerCommands;
|
|
@@ -30,9 +30,10 @@ const registerSettingsSet = ({ cmd, controllers: { settingsController } }) => {
|
|
|
30
30
|
return { analytics: {} };
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
const registerCommands = (_a) => {
|
|
34
34
|
var { cmd } = _a, deps = tslib_1.__rest(_a, ["cmd"]);
|
|
35
35
|
const preferences = cmd.command(COMMAND_NAME).requireNoAuthentication().description(cli_shared_1.Text.settings.description);
|
|
36
36
|
registerSettingsList(Object.assign({ cmd: preferences }, deps));
|
|
37
37
|
registerSettingsSet(Object.assign({ cmd: preferences }, deps));
|
|
38
38
|
};
|
|
39
|
+
exports.registerCommands = registerCommands;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerCommands = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
-
|
|
5
|
+
const registerCommands = ({ cmd, ui, controllers: { tunnelController } }) => {
|
|
6
6
|
cmd
|
|
7
7
|
.command('tunnel')
|
|
8
8
|
.requireAppId()
|
|
@@ -12,3 +12,4 @@ exports.registerCommands = ({ cmd, ui, controllers: { tunnelController } }) => {
|
|
|
12
12
|
await tunnelController.run(options, ui);
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
+
exports.registerCommands = registerCommands;
|
|
@@ -26,7 +26,7 @@ function manifestDefinesTriggers(configFile) {
|
|
|
26
26
|
await getValidWebtriggers(configFile);
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
const registerCommands = ({ cmd, ui, graphqlGateway, configFile, commands: { getWebTriggerURLCommand } }) => {
|
|
30
30
|
const validateWebtriggerKey = async (functionKey) => {
|
|
31
31
|
const availableWebTriggers = await getValidWebtriggers(configFile);
|
|
32
32
|
if (functionKey) {
|
|
@@ -48,8 +48,9 @@ exports.registerCommands = ({ cmd, ui, graphqlGateway, configFile, commands: { g
|
|
|
48
48
|
.precondition(manifestDefinesTriggers(configFile))
|
|
49
49
|
.action(async (installationId, { functionKey }) => {
|
|
50
50
|
ui.info(cli_shared_2.Text.webtrigger.overviewFuncKey);
|
|
51
|
-
const installId = await cli_shared_1.getInstallationId(ui, installationId);
|
|
51
|
+
const installId = await (0, cli_shared_1.getInstallationId)(ui, installationId);
|
|
52
52
|
const url = await getWebTriggerURLCommand.execute(installId, await validateWebtriggerKey(functionKey));
|
|
53
53
|
ui.info(cli_shared_2.Text.webtrigger.copy(url));
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
+
exports.registerCommands = registerCommands;
|
|
@@ -9,10 +9,11 @@ exports.FORGE_CLI_PACKAGE = '@forge/cli';
|
|
|
9
9
|
const MACHINE_ID_CACHE_KEY = 'machineId';
|
|
10
10
|
const generateMachineId = () => {
|
|
11
11
|
try {
|
|
12
|
-
return node_machine_id_1.machineIdSync();
|
|
12
|
+
return (0, node_machine_id_1.machineIdSync)();
|
|
13
13
|
}
|
|
14
14
|
catch (e) {
|
|
15
|
-
return uuid_1.default();
|
|
15
|
+
return (0, uuid_1.default)();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
const getMachineId = () => cli_shared_1.CachedConf.getCache(exports.FORGE_CLI_PACKAGE).cached(MACHINE_ID_CACHE_KEY, generateMachineId);
|
|
19
|
+
exports.getMachineId = getMachineId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,SAAgB,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"version-info.d.ts","sourceRoot":"","sources":["../../src/command-line/version-info.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,OAAO,EAAc,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,aAAa,QAAO,UAAU,GAAG,SAgB7C,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,SAAgB,MAAM,KAAG,QAAQ,IAAI,CAInE,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,MAAM,SAG7C,CAAC"}
|
|
@@ -6,7 +6,7 @@ const latest_version_1 = tslib_1.__importDefault(require("latest-version"));
|
|
|
6
6
|
exports.VERSION_CACHE_KEY = 'latest';
|
|
7
7
|
exports.VERSION_CACHE_INTERVAL = 1000 * 60 * 60 * 24;
|
|
8
8
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
9
|
-
|
|
9
|
+
const getCLIDetails = () => {
|
|
10
10
|
try {
|
|
11
11
|
const packageInfo = require('../../package.json');
|
|
12
12
|
const cachedConf = cli_shared_1.CachedConf.getCache(packageInfo.name);
|
|
@@ -22,13 +22,16 @@ exports.getCLIDetails = () => {
|
|
|
22
22
|
return undefined;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
+
exports.getCLIDetails = getCLIDetails;
|
|
25
26
|
exports.supportedNodeVersion = '14.x || 16.x';
|
|
26
|
-
|
|
27
|
-
const latest = await latest_version_1.default(name);
|
|
27
|
+
const cacheLatestVersion = async (name) => {
|
|
28
|
+
const latest = await (0, latest_version_1.default)(name);
|
|
28
29
|
const cachedConf = cli_shared_1.CachedConf.getCache(name);
|
|
29
30
|
cachedConf.set(exports.VERSION_CACHE_KEY, latest, exports.VERSION_CACHE_INTERVAL);
|
|
30
31
|
};
|
|
31
|
-
exports.
|
|
32
|
+
exports.cacheLatestVersion = cacheLatestVersion;
|
|
33
|
+
const clearVersionCache = (name) => {
|
|
32
34
|
const cachedConf = cli_shared_1.CachedConf.getCache(name);
|
|
33
35
|
cachedConf.delete(exports.VERSION_CACHE_KEY);
|
|
34
36
|
};
|
|
37
|
+
exports.clearVersionCache = clearVersionCache;
|
|
@@ -23,7 +23,7 @@ class DeployView {
|
|
|
23
23
|
}
|
|
24
24
|
displayLintErrors(lintResults) {
|
|
25
25
|
this.ui.info(cli_shared_1.Text.deploy.taskLint.lintError);
|
|
26
|
-
lint_1.reportLintResults(this.ui, lintResults);
|
|
26
|
+
(0, lint_1.reportLintResults)(this.ui, lintResults);
|
|
27
27
|
}
|
|
28
28
|
displayLintWarnings(warnings) {
|
|
29
29
|
this.ui.info(cli_shared_1.Text.deploy.taskLint.lintWarning(warnings) + '\n');
|
|
@@ -50,7 +50,7 @@ class DeployView {
|
|
|
50
50
|
const result = await this.ui.displayProgress(() => deployCallback(), cli_shared_1.Text.deploy.cmd.start2(environment, cli_shared_1.environmentToOption), cli_shared_1.Text.deploy.cmd.success);
|
|
51
51
|
this.ui.info(cli_shared_1.Text.deploy.cmd.successDetails(environment, cli_shared_1.environmentToOption));
|
|
52
52
|
if (environment === 'production' && showDistributionPageLink) {
|
|
53
|
-
this.ui.info(cli_shared_1.Text.deploy.cmd.distributePageLink(cs_ari_1.parseAppAri(cs_ari_1.parse(id)).appId));
|
|
53
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.distributePageLink((0, cs_ari_1.parseAppAri)((0, cs_ari_1.parse)(id)).appId));
|
|
54
54
|
}
|
|
55
55
|
return result;
|
|
56
56
|
}
|
|
@@ -20,14 +20,14 @@ class InstallView {
|
|
|
20
20
|
if (egressAddresses.length)
|
|
21
21
|
this.ui.info(text.listEgressAddresses(egressAddresses));
|
|
22
22
|
const cleanedManifestScopes = [...new Set(['read:me', ...manifestScopes])];
|
|
23
|
-
const groupedManifestEgressAddresses = egress_1.sortAndGroupEgressPermissionsByDomain(manifestEgressAddresses);
|
|
23
|
+
const groupedManifestEgressAddresses = (0, egress_1.sortAndGroupEgressPermissionsByDomain)(manifestEgressAddresses);
|
|
24
24
|
let permissionsMismatchWithManifest = false;
|
|
25
|
-
if (cli_shared_1.environmentToOption(environment) === cli_shared_1.DEFAULT_ENVIRONMENT_OPTION) {
|
|
26
|
-
const scopesMismatch = !lodash_1.isEqual([...cleanedManifestScopes].sort(), [...scopes].sort());
|
|
27
|
-
const egressAddressesMismatch = !lodash_1.isEqual([...groupedManifestEgressAddresses].sort(), [...egressAddresses].sort());
|
|
25
|
+
if ((0, cli_shared_1.environmentToOption)(environment) === cli_shared_1.DEFAULT_ENVIRONMENT_OPTION) {
|
|
26
|
+
const scopesMismatch = !(0, lodash_1.isEqual)([...cleanedManifestScopes].sort(), [...scopes].sort());
|
|
27
|
+
const egressAddressesMismatch = !(0, lodash_1.isEqual)([...groupedManifestEgressAddresses].sort(), [...egressAddresses].sort());
|
|
28
28
|
permissionsMismatchWithManifest = scopesMismatch || egressAddressesMismatch;
|
|
29
29
|
if (permissionsMismatchWithManifest) {
|
|
30
|
-
this.ui.warn(text.permissionsMismatch(cli_shared_1.environmentToOption(environment)));
|
|
30
|
+
this.ui.warn(text.permissionsMismatch((0, cli_shared_1.environmentToOption)(environment)));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (!confirmScopes && !nonInteractive) {
|
|
@@ -41,9 +41,9 @@ class InstallView {
|
|
|
41
41
|
async promptForUpgrade(installations) {
|
|
42
42
|
const installationIndex = await this.ui.promptForSingleChoiceTable(cli_shared_1.Text.upgradeContext.promptInstallation, cli_shared_1.Text.upgradeContext.overview, ['Environment', 'Site', 'Product', 'Version'], installations.map(({ id, environmentKey, product, site, version }) => ({
|
|
43
43
|
names: [
|
|
44
|
-
cli_shared_1.environmentToOption(environmentKey),
|
|
44
|
+
(0, cli_shared_1.environmentToOption)(environmentKey),
|
|
45
45
|
site,
|
|
46
|
-
cli_shared_1.capitalizeProduct(product),
|
|
46
|
+
(0, cli_shared_1.capitalizeProduct)(product),
|
|
47
47
|
cli_shared_1.Text.install.booleanToScope(version.isLatest)
|
|
48
48
|
],
|
|
49
49
|
value: id,
|
|
@@ -3,7 +3,7 @@ import { LintFixState, LintLogger, LintResult } from '@forge/lint';
|
|
|
3
3
|
export declare class LintView {
|
|
4
4
|
private readonly ui;
|
|
5
5
|
private lintResultReporter;
|
|
6
|
-
constructor(ui: UI, lintResultReporter?: (logger:
|
|
6
|
+
constructor(ui: UI, lintResultReporter?: (logger: LintLogger, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
7
|
reportLintResult(results: LintResult[]): void;
|
|
8
8
|
reportFixResult(result: LintFixState): void;
|
|
9
9
|
getLogger(): LintLogger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAEtF,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,kBAAkB;gBAAlC,EAAE,EAAE,EAAE,EAAU,kBAAkB,
|
|
1
|
+
{"version":3,"file":"lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAEtF,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,kBAAkB;gBAAlC,EAAE,EAAE,EAAE,EAAU,kBAAkB,6FAAoB;IAE5E,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI;IAI7C,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAU3C,SAAS,IAAI,UAAU;IAIvB,SAAS,IAAI,IAAI;CAGzB"}
|
|
@@ -3,7 +3,7 @@ import { LintLogger, LintResult } from '@forge/lint';
|
|
|
3
3
|
export declare class LiteLintView {
|
|
4
4
|
private readonly ui;
|
|
5
5
|
private reporter;
|
|
6
|
-
constructor(ui: UI, reporter?: (logger:
|
|
6
|
+
constructor(ui: UI, reporter?: (logger: LintLogger, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
7
|
reportErrors(report: LintResult[]): void;
|
|
8
8
|
getLogger(): LintLogger;
|
|
9
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lite-lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lite-lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAqB,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExE,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ;gBAAxB,EAAE,EAAE,EAAE,EAAU,QAAQ,
|
|
1
|
+
{"version":3,"file":"lite-lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lite-lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAqB,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExE,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ;gBAAxB,EAAE,EAAE,EAAE,EAAU,QAAQ,6FAAoB;IAElE,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAKxC,SAAS,IAAI,UAAU;CAG/B"}
|
|
@@ -76,7 +76,7 @@ class ArtifactDeployer {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
extractAllEvents(stages) {
|
|
79
|
-
return cli_shared_1.flatMap(stages, (stage) => {
|
|
79
|
+
return (0, cli_shared_1.flatMap)(stages, (stage) => {
|
|
80
80
|
const events = stage.events || [];
|
|
81
81
|
let stageHasTransitionEvent = false;
|
|
82
82
|
return events
|
|
@@ -32,7 +32,7 @@ class TriggerDeployGraphQLClient {
|
|
|
32
32
|
const { response: { createAppDeployment: { deployment, success, errors } }, requestId } = await this.graphqlClient.mutate(deployAppQuery, {
|
|
33
33
|
input: deploymentDetails
|
|
34
34
|
});
|
|
35
|
-
const error = cli_shared_1.getError(errors);
|
|
35
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
36
36
|
if (!success) {
|
|
37
37
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
38
38
|
}
|
|
@@ -10,7 +10,7 @@ class PackageUploadDeployCommand {
|
|
|
10
10
|
this.resourcePackagingService = resourcePackagingService;
|
|
11
11
|
}
|
|
12
12
|
async execute(details) {
|
|
13
|
-
const [resourcesToBeBundled, preBundledResources] = lodash_1.partition(details.resources, (res) => res.resourceType === 'nativeUI');
|
|
13
|
+
const [resourcesToBeBundled, preBundledResources] = (0, lodash_1.partition)(details.resources, (res) => res.resourceType === 'nativeUI');
|
|
14
14
|
const { runtimeArchivePath, nativeUiBundlesDetails, moduleList } = await this.packager.package(details.handlers, resourcesToBeBundled);
|
|
15
15
|
const resourcesArchives = await this.resourcePackagingService.zipResources([
|
|
16
16
|
...preBundledResources,
|
|
@@ -9,7 +9,7 @@ const tmp_1 = tslib_1.__importDefault(require("tmp"));
|
|
|
9
9
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
10
10
|
class ZipArchiver {
|
|
11
11
|
constructor() {
|
|
12
|
-
this.archive = archiver_1.default('zip');
|
|
12
|
+
this.archive = (0, archiver_1.default)('zip');
|
|
13
13
|
this.tempFile = tmp_1.default.fileSync({ postfix: '.zip' });
|
|
14
14
|
this.resolves = [];
|
|
15
15
|
this.rejects = [];
|
|
@@ -23,7 +23,7 @@ class ZipArchiver {
|
|
|
23
23
|
resolve(this.tempFile.name);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const output = fs_1.createWriteStream(this.tempFile.name);
|
|
26
|
+
const output = (0, fs_1.createWriteStream)(this.tempFile.name);
|
|
27
27
|
this.archive.pipe(output);
|
|
28
28
|
output.on('close', this.onClose);
|
|
29
29
|
this.archive.on('error', this.onArchiveError);
|
|
@@ -34,8 +34,8 @@ class ZipArchiver {
|
|
|
34
34
|
addRootDependencyFiles(fileNames, logger) {
|
|
35
35
|
const currentDirectory = process.cwd();
|
|
36
36
|
fileNames.forEach((fileName) => {
|
|
37
|
-
const filePath = path_1.join(currentDirectory, fileName);
|
|
38
|
-
if (fs_1.existsSync(filePath)) {
|
|
37
|
+
const filePath = (0, path_1.join)(currentDirectory, fileName);
|
|
38
|
+
if ((0, fs_1.existsSync)(filePath)) {
|
|
39
39
|
logger.debug(cli_shared_1.Text.deploy.taskPackage.packageFile(fileName, filePath));
|
|
40
40
|
this.archive.file(filePath, { name: fileName });
|
|
41
41
|
}
|
|
@@ -44,7 +44,7 @@ class ArtifactGraphQLClient {
|
|
|
44
44
|
appId: appDetails.id
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
const error = cli_shared_1.getError(errors);
|
|
47
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
48
48
|
if (!success) {
|
|
49
49
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
50
50
|
}
|
|
@@ -79,7 +79,7 @@ class ArtifactGraphQLClient {
|
|
|
79
79
|
resourceKeys
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
const error = cli_shared_1.getError(errors);
|
|
82
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
83
83
|
if (!success) {
|
|
84
84
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
85
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphQLClient } from '@forge/cli-shared';
|
|
1
|
+
import { AppEnvironmentVariable, GraphQLClient, Maybe } from '@forge/cli-shared';
|
|
2
2
|
import { AppEnvironmentVariableDetails as DeleteAppEnvironmentVariableDetails, DeleteEnvironmentVariableClient } from './delete-environment-variable';
|
|
3
3
|
import { AppEnvironmentVariablesDetails as ListAppEnvironmentVariablesDetails, ListEnvironmentVariablesClient } from './list-environment-variables';
|
|
4
4
|
import { AppEnvironmentVariableDetails as SetAppEnvironmentVariableDetails, SetEnvironmentVariableClient } from './set-environment-variable';
|
|
@@ -9,7 +9,7 @@ export declare class MissingAppEnvironmentError extends Error {
|
|
|
9
9
|
export declare class GraphqlClient implements SetEnvironmentVariableClient, DeleteEnvironmentVariableClient, ListEnvironmentVariablesClient {
|
|
10
10
|
private readonly graphqlClient;
|
|
11
11
|
constructor(graphqlClient: GraphQLClient);
|
|
12
|
-
listEnvironmentVariables(details: ListAppEnvironmentVariablesDetails): Promise<
|
|
12
|
+
listEnvironmentVariables(details: ListAppEnvironmentVariablesDetails): Promise<Maybe<AppEnvironmentVariable[]> | undefined>;
|
|
13
13
|
setEnvironmentVariable(details: SetAppEnvironmentVariableDetails): Promise<void>;
|
|
14
14
|
deleteEnvironmentVariable(details: DeleteAppEnvironmentVariableDetails): Promise<void>;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment-variables/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAwB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/environment-variables/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAY,aAAa,EAAwB,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEjH,OAAO,EACL,6BAA6B,IAAI,mCAAmC,EACpE,+BAA+B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,8BAA8B,IAAI,kCAAkC,EACpE,8BAA8B,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,6BAA6B,IAAI,gCAAgC,EACjE,4BAA4B,EAC7B,MAAM,4BAA4B,CAAC;AAEpC,qBAAa,eAAgB,SAAQ,KAAK;CAAG;AAC7C,qBAAa,0BAA2B,SAAQ,KAAK;CAAG;AAExD,qBAAa,aACX,YAAW,4BAA4B,EAAE,+BAA+B,EAAE,8BAA8B;IAC5F,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,wBAAwB,CACnC,OAAO,EAAE,kCAAkC,GAC1C,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,CAAC,GAAG,SAAS,CAAC;IAkC1C,sBAAsB,CAAC,OAAO,EAAE,gCAAgC;IAyChE,yBAAyB,CAAC,OAAO,EAAE,mCAAmC;CAuCpF"}
|
|
@@ -68,7 +68,7 @@ class GraphqlClient {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
const error = cli_shared_1.getError(errors);
|
|
71
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
72
72
|
if (!success) {
|
|
73
73
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
74
74
|
}
|
|
@@ -96,7 +96,7 @@ class GraphqlClient {
|
|
|
96
96
|
key: details.key
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
const error = cli_shared_1.getError(errors);
|
|
99
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
100
100
|
if (!success) {
|
|
101
101
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
102
102
|
}
|
|
@@ -77,7 +77,7 @@ class InstallationsGraphqlClient {
|
|
|
77
77
|
return ari.toString();
|
|
78
78
|
}
|
|
79
79
|
getProductTranslation(product) {
|
|
80
|
-
if (product && cli_shared_1.isBitbucketProduct(product)) {
|
|
80
|
+
if (product && (0, cli_shared_1.isBitbucketProduct)(product)) {
|
|
81
81
|
return this.bitbucketTranslator;
|
|
82
82
|
}
|
|
83
83
|
return this.cloudIdTranslator;
|
|
@@ -107,13 +107,13 @@ class InstallationsGraphqlClient {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
const { response: { installApp: { success, taskId, errors } }, requestId } = await this.graphqlClient.mutate(query, variables);
|
|
110
|
-
const error = cli_shared_1.getError(errors);
|
|
110
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
111
111
|
if (!success) {
|
|
112
112
|
if (error.code === ALREADY_INSTALLED_CODE) {
|
|
113
113
|
throw new AlreadyInstalledError();
|
|
114
114
|
}
|
|
115
115
|
if (error.code === PERMISSION_DENIED) {
|
|
116
|
-
throw new PermissionDeniedError(requestId, cs_ari_1.parse(appId).resourceId);
|
|
116
|
+
throw new PermissionDeniedError(requestId, (0, cs_ari_1.parse)(appId).resourceId);
|
|
117
117
|
}
|
|
118
118
|
throw new InstallationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
119
119
|
}
|
|
@@ -147,7 +147,7 @@ class InstallationsGraphqlClient {
|
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
const { response: { upgradeApp: { success, errors, taskId } }, requestId } = await this.graphqlClient.mutate(query, variables);
|
|
150
|
-
const error = cli_shared_1.getError(errors);
|
|
150
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
151
151
|
if (!success) {
|
|
152
152
|
throw new UpgradeError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
153
153
|
}
|
|
@@ -184,7 +184,7 @@ class InstallationsGraphqlClient {
|
|
|
184
184
|
}
|
|
185
185
|
`;
|
|
186
186
|
const { response: { uninstallApp: { success, errors, taskId } }, requestId } = await this.graphqlClient.mutate(query, { input });
|
|
187
|
-
const error = cli_shared_1.getError(errors);
|
|
187
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
188
188
|
if (!success) {
|
|
189
189
|
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, error.code);
|
|
190
190
|
}
|
|
@@ -273,7 +273,7 @@ class InstallationsGraphqlClient {
|
|
|
273
273
|
return [];
|
|
274
274
|
}
|
|
275
275
|
const installationContexts = installations.map(({ installation }) => {
|
|
276
|
-
const context = cs_ari_1.parse(installation.installationContext);
|
|
276
|
+
const context = (0, cs_ari_1.parse)(installation.installationContext);
|
|
277
277
|
const resourceId = context.resourceId;
|
|
278
278
|
if (!resourceId) {
|
|
279
279
|
throw new UnknownSiteWithoutResourceIdError();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/installations/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,eAAO,MAAM,uCAAuC,qBAChC,YAAY,EAAE,iBACjB,YAAY,EAAE,SACtB,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/installations/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,eAAO,MAAM,uCAAuC,qBAChC,YAAY,EAAE,iBACjB,YAAY,EAAE,SACtB,IAAI,MAAM,CAAC,KACjB,YAAY,EAkBd,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.getHangingIdentityInstallationsFromSite = exports.UninstallAppError = vo
|
|
|
4
4
|
class UninstallAppError extends Error {
|
|
5
5
|
}
|
|
6
6
|
exports.UninstallAppError = UninstallAppError;
|
|
7
|
-
|
|
7
|
+
const getHangingIdentityInstallationsFromSite = (allInstallations, remainingApps, sites) => {
|
|
8
8
|
const hangingIdentityInstalls = [];
|
|
9
9
|
sites.forEach((site) => {
|
|
10
10
|
const shouldUninstallIdentity = remainingApps.filter((app) => app.site === site).length === 0;
|
|
@@ -17,3 +17,4 @@ exports.getHangingIdentityInstallationsFromSite = (allInstallations, remainingAp
|
|
|
17
17
|
});
|
|
18
18
|
return hangingIdentityInstalls;
|
|
19
19
|
};
|
|
20
|
+
exports.getHangingIdentityInstallationsFromSite = getHangingIdentityInstallationsFromSite;
|