@mintlify/common 1.0.1125 → 1.0.1127
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
|
@@ -18,11 +18,11 @@ function getSubdomain(deployment) {
|
|
|
18
18
|
case '/docs':
|
|
19
19
|
return 'mintlify-auth-docs.com';
|
|
20
20
|
default: {
|
|
21
|
-
return '
|
|
21
|
+
return 'mintlify.site';
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
return '
|
|
25
|
+
return 'mintlify.site';
|
|
26
26
|
}
|
|
27
27
|
export function getDisplayDomain(deployment, isDev = false, appendBasePath = true) {
|
|
28
28
|
var _a, _b, _c, _d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { getXMintContent, registerXMintContent } from './contentRegistry.js';
|
|
3
|
+
describe('registerXMintContent', () => {
|
|
4
|
+
it('removes stale content when a later registration has no content', () => {
|
|
5
|
+
const slug = 'api/example';
|
|
6
|
+
registerXMintContent(slug, 'Existing generated content');
|
|
7
|
+
registerXMintContent(slug);
|
|
8
|
+
expect(getXMintContent(slug)).toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
const registry = new Map();
|
|
2
2
|
export function registerXMintContent(slug, content) {
|
|
3
|
-
if (content)
|
|
3
|
+
if (content) {
|
|
4
4
|
registry.set(slug, content);
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
registry.delete(slug);
|
|
8
|
+
}
|
|
5
9
|
}
|
|
6
10
|
export function getXMintContent(slug) {
|
|
7
11
|
return registry.get(slug);
|