@forge/cli
12.22.0-experimental-04cc2b912.23.0-next.7-experimental-44b7a12
out/installations/installation-helper.js~
out/installations/installation-helper.jsModified+4−3
Index: package/out/installations/installation-helper.js
===================================================================
--- package/out/installations/installation-helper.js
+++ package/out/installations/installation-helper.js
@@ -1,9 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.validateInstallationId = validateInstallationId;
-exports.buildInstallationContextFromId = buildInstallationContextFromId;
-exports.selectSingleInstallation = selectSingleInstallation;
+exports.selectSingleInstallation = exports.buildInstallationContextFromId = exports.validateInstallationId = void 0;
const semver_1 = require("semver");
const cli_shared_1 = require("@forge/cli-shared");
const ari_1 = require("@forge/util/packages/ari");
function validateInstallationId(installationId) {
@@ -15,15 +13,17 @@
throw new cli_shared_1.ValidationError(cli_shared_1.Text.installationId.errors.invalid);
}
return trimmedId;
}
+exports.validateInstallationId = validateInstallationId;
function buildInstallationContextFromId(installationId) {
return ari_1.AnyAri.create({
resourceOwner: 'ecosystem',
resourceType: 'installation',
resourceId: installationId
}).toString();
}
+exports.buildInstallationContextFromId = buildInstallationContextFromId;
async function selectSingleInstallation(ui, installations, installationTablePrompt, installationTableOverview) {
const installationIndex = await ui.promptForSingleChoiceTable(installationTablePrompt, installationTableOverview, ['Environment', 'Site', 'Atlassian apps', 'Major Version'], installations.map(({ id, environmentKey, product, secondaryProducts, site, version }) => ({
names: [
(0, cli_shared_1.environmentToOption)(environmentKey),
@@ -35,5 +35,6 @@
primary: site
})));
return installations[installationIndex];
}
+exports.selectSingleInstallation = selectSingleInstallation;
//# sourceMappingURL=installation-helper.js.map
\ No newline at end of file