Outlook_Addin_LLM/node_modules/@microsoft/dev-tunnels-contracts/tunnelServicePropertiesStatics.js

56 lines
2.1 KiB
JavaScript
Raw Normal View History

"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.environment = exports.development = exports.staging = exports.production = void 0;
const tunnelServiceProperties_1 = require("./tunnelServiceProperties");
/**
* Gets production service properties.
*/
exports.production = {
serviceUri: `https://${tunnelServiceProperties_1.prodDnsName}/`,
serviceAppId: tunnelServiceProperties_1.prodFirstPartyAppId,
serviceInternalAppId: tunnelServiceProperties_1.prodThirdPartyAppId,
gitHubAppClientId: tunnelServiceProperties_1.prodGitHubAppClientId,
};
/**
* Gets properties for the service in the staging environment (PPE).
*/
exports.staging = {
serviceUri: `https://${tunnelServiceProperties_1.ppeDnsName}/`,
serviceAppId: tunnelServiceProperties_1.nonProdFirstPartyAppId,
serviceInternalAppId: tunnelServiceProperties_1.ppeThirdPartyAppId,
gitHubAppClientId: tunnelServiceProperties_1.nonProdGitHubAppClientId,
};
/**
* Gets properties for the service in the development environment.
*/
exports.development = {
serviceUri: `https://${tunnelServiceProperties_1.devDnsName}/`,
serviceAppId: tunnelServiceProperties_1.nonProdFirstPartyAppId,
serviceInternalAppId: tunnelServiceProperties_1.devThirdPartyAppId,
gitHubAppClientId: tunnelServiceProperties_1.nonProdGitHubAppClientId,
};
/**
* Gets properties for the service in the specified environment.
*/
function environment(environmentName) {
if (!environmentName) {
throw new Error(`Invalid argument: ${environmentName}`);
}
switch (environmentName.toLowerCase()) {
case 'prod':
case 'production':
return exports.production;
case 'ppe':
case 'preprod':
return exports.staging;
case 'dev':
case 'development':
return exports.development;
default:
throw new Error(`Invalid service environment: ${environmentName}`);
}
}
exports.environment = environment;
//# sourceMappingURL=tunnelServicePropertiesStatics.js.map