@mintlify/common 1.0.958 → 1.0.959
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/dist/getDisplayDomain.js
CHANGED
|
@@ -13,18 +13,6 @@ function parseOwnerRepo(repoUrl) {
|
|
|
13
13
|
}
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
-
const CUSTOM_DEPLOYMENT_SUBDOMAINS = ['auth0', 'docs-dev', 'docs-staging'];
|
|
17
|
-
const CUSTOM_DEPLOYMENT_DOMAINS = {
|
|
18
|
-
auth0: 'auth0-mintlify.app',
|
|
19
|
-
'docs-dev': 'auth0-mintlify.app',
|
|
20
|
-
'docs-staging': 'auth0-mintlify.app',
|
|
21
|
-
};
|
|
22
|
-
function isCustomDeployment(subdomain) {
|
|
23
|
-
return CUSTOM_DEPLOYMENT_SUBDOMAINS.some((validSubdomain) => validSubdomain === subdomain);
|
|
24
|
-
}
|
|
25
|
-
function getCustomDeploymentDomain(subdomain) {
|
|
26
|
-
return CUSTOM_DEPLOYMENT_DOMAINS[subdomain];
|
|
27
|
-
}
|
|
28
16
|
function getSubdomain(deployment) {
|
|
29
17
|
var _a, _b;
|
|
30
18
|
if (deployment.auth) {
|
|
@@ -36,9 +24,6 @@ function getSubdomain(deployment) {
|
|
|
36
24
|
}
|
|
37
25
|
}
|
|
38
26
|
}
|
|
39
|
-
if (isCustomDeployment(deployment.subdomain)) {
|
|
40
|
-
return getCustomDeploymentDomain(deployment.subdomain);
|
|
41
|
-
}
|
|
42
27
|
return (_b = (_a = MANAGED_BASE_PATHS.get(deployment.basePath)) === null || _a === void 0 ? void 0 : _a.domain) !== null && _b !== void 0 ? _b : 'mintlify.app';
|
|
43
28
|
}
|
|
44
29
|
export function getDisplayDomain(deployment, isDev = false, appendBasePath = true) {
|