@mintlify/common 1.0.1306 → 1.0.1308
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/apiStaticExportBasePaths.d.ts +1 -1
- package/dist/asyncapi/parser/getExamplesData.js +4 -3
- package/dist/asyncapi/parser/getMessagesData.js +6 -5
- package/dist/asyncapi/parser/getOperationsData.js +4 -3
- package/dist/colors.js +9 -8
- package/dist/css/tailwind.d.ts +1 -1
- package/dist/css/tailwindInternals.d.ts +1 -1
- package/dist/entitlements/index.d.ts +1 -5
- package/dist/entitlements/index.js +2 -20
- package/dist/getDisplayDomain.js +2 -1
- package/dist/getFileCategory.d.ts +2 -2
- package/dist/graphql/resolveGraphqlOperation.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/isAbsoluteUrl.d.ts +1 -1
- package/dist/mdx/currencyMath.js +2 -1
- package/dist/mdx/getCodeStyling.d.ts +1 -1
- package/dist/mdx/getMDXOptions.d.ts +2 -2
- package/dist/mdx/islands/extractPackageIslands.js +6 -5
- package/dist/mdx/islands/island-bindings.js +4 -3
- package/dist/mdx/islands/island-module-builder.js +12 -13
- package/dist/mdx/islands/package-page-url.js +4 -2
- package/dist/mdx/islands/package-sources.js +5 -3
- package/dist/mdx/islands/packageImports.js +4 -3
- package/dist/mdx/islands/remarkPackageIslands.js +10 -8
- package/dist/mdx/lib/mdx-utils.d.ts +1 -1
- package/dist/mdx/page-style.js +2 -1
- package/dist/mdx/plugins/rehype/rehypeCodeBlocks/index.js +4 -3
- package/dist/mdx/plugins/rehype/rehypeCodeBlocks/metaOptions.d.ts +4 -4
- package/dist/mdx/plugins/rehype/rehypeCodeBlocks/metaOptions.js +8 -6
- package/dist/mdx/plugins/rehype/rehypeDynamicTailwindCss.js +4 -3
- package/dist/mdx/plugins/remark/pureTemplateComponents.js +6 -8
- package/dist/mdx/plugins/remark/remarkComponentIds.js +6 -8
- package/dist/mdx/plugins/remark/remarkExtractTableOfContents.js +11 -9
- package/dist/mdx/plugins/remark/remarkMdxExpandExpressions.js +10 -7
- package/dist/mdx/plugins/remark/remarkMdxRemoveJs.js +7 -8
- package/dist/mdx/plugins/remark/remarkMdxRemoveUnknownJsx/index.d.ts +1 -1
- package/dist/mdx/plugins/remark/remarkPrompt.js +1 -1
- package/dist/mdx/plugins/remark/remarkVisibilityForMarkdown.d.ts +1 -1
- package/dist/mdx/plugins/remark/remarkVisibilityForMarkdown.js +10 -8
- package/dist/mdx/plugins/remark/staticEvaluator.js +4 -2
- package/dist/mdx/plugins/remark/unfoldComponentsForMarkdown.js +2 -1
- package/dist/mdx/preprocessCustomHeadingIds.js +5 -4
- package/dist/mdx/server-only/getMdx.d.ts +1 -1
- package/dist/mdx/server-only/getMdx.js +2 -1
- package/dist/mdx/snippets/constants.d.ts +1 -1
- package/dist/mdx/snippets/isBareSpecifier.d.ts +1 -1
- package/dist/mdx/snippets/resolveAllImports.js +21 -29
- package/dist/mdx/snippets/resolveImport/snippetDeclarations.js +4 -7
- package/dist/mdx/utils.d.ts +1 -1
- package/dist/navigation/filterDivisions.js +1 -2
- package/dist/navigation/scopeNavToPath.d.ts +1 -1
- package/dist/navigation/scopeNavToPath.js +4 -4
- package/dist/navigation/updateFirstHrefInDivision.d.ts +1 -1
- package/dist/openapi/additionalOperations.js +6 -5
- package/dist/openapi/encodings.js +2 -1
- package/dist/openapi/generateOpenApiPages.js +17 -16
- package/dist/openapi/getTagDisplayName.d.ts +1 -1
- package/dist/openapi/overlay/errors.d.ts +1 -1
- package/dist/openapi/overlay/overlayRegistry.d.ts +1 -1
- package/dist/openapi/tagHierarchy.js +1 -1
- package/dist/seo/resolveSeoMetatags.js +4 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/AnalyticsEvent.d.ts +2 -2
- package/package.json +3 -3
- package/dist/isOrgLessThanTwoWeeksOld.d.ts +0 -7
- package/dist/isOrgLessThanTwoWeeksOld.js +0 -11
|
@@ -297,8 +297,7 @@ function buildDivisionItem(param) {
|
|
|
297
297
|
(isAbsoluteUrl(userHref) ||
|
|
298
298
|
(!hasChildNav && userHref.startsWith('/') && !userHref.startsWith('//')));
|
|
299
299
|
if (!isUserDefinedHref && divisionKey === 'dropdowns' && !isActive && currentPath) {
|
|
300
|
-
href =
|
|
301
|
-
(_c = (_b = findCorrespondingDropdownHref(item, currentPath, userGroups !== null && userGroups !== void 0 ? userGroups : new Set(), isPreview)) !== null && _b !== void 0 ? _b : findSamePageInDropdownVersion(page === null || page === void 0 ? void 0 : page.href, findDivisionName(item), currentPath, rootNav, userGroups !== null && userGroups !== void 0 ? userGroups : new Set(), isPreview)) !== null && _c !== void 0 ? _c : '';
|
|
300
|
+
href = (_c = (_b = findCorrespondingDropdownHref(item, currentPath, userGroups !== null && userGroups !== void 0 ? userGroups : new Set(), isPreview)) !== null && _b !== void 0 ? _b : findSamePageInDropdownVersion(page === null || page === void 0 ? void 0 : page.href, findDivisionName(item), currentPath, rootNav, userGroups !== null && userGroups !== void 0 ? userGroups : new Set(), isPreview)) !== null && _c !== void 0 ? _c : '';
|
|
302
301
|
}
|
|
303
302
|
if (!href) {
|
|
304
303
|
href = isUserDefinedHref ? userHref : (page === null || page === void 0 ? void 0 : page.href) || '/';
|
|
@@ -10,7 +10,7 @@ export type ScopedNavForPath = {
|
|
|
10
10
|
currentVersion: string | undefined;
|
|
11
11
|
currentLanguage: LocaleType | undefined;
|
|
12
12
|
};
|
|
13
|
-
export declare function getScopedNavForPath({ decoratedNav, currentPath, userGroups, isPreview, includeProductVersionMetadata
|
|
13
|
+
export declare function getScopedNavForPath({ decoratedNav, currentPath, userGroups, isPreview, includeProductVersionMetadata }: {
|
|
14
14
|
decoratedNav: DecoratedNavigationConfig;
|
|
15
15
|
currentPath: string;
|
|
16
16
|
userGroups?: Set<string>;
|
|
@@ -576,7 +576,8 @@ function cachedPathToLanguageDict(decoratedNav) {
|
|
|
576
576
|
return dict;
|
|
577
577
|
}
|
|
578
578
|
export function getScopedNavForPath({ decoratedNav, currentPath, userGroups = new Set(), isPreview = false, includeProductVersionMetadata = false, }) {
|
|
579
|
-
var _a, _b, _c, _d
|
|
579
|
+
var _a, _b, _c, _d;
|
|
580
|
+
var _e, _f, _g;
|
|
580
581
|
const containingProductNames = new Set();
|
|
581
582
|
collectContainingProductNames(
|
|
582
583
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- structural nav traversal over the zod union types
|
|
@@ -607,10 +608,9 @@ export function getScopedNavForPath({ decoratedNav, currentPath, userGroups = ne
|
|
|
607
608
|
const localeFromDict = dictLanguage && isLocale(dictLanguage) ? dictLanguage : undefined;
|
|
608
609
|
currentVersion =
|
|
609
610
|
dictVersion ||
|
|
610
|
-
getVersionOrLanguageFromPath('version', decoratedNav, currentPath, defaultVersion, (
|
|
611
|
+
getVersionOrLanguageFromPath('version', decoratedNav, currentPath, defaultVersion, (_e = (_c = initial.versions[0]) === null || _c === void 0 ? void 0 : _c.name) !== null && _e !== void 0 ? _e : '') ||
|
|
611
612
|
undefined;
|
|
612
|
-
currentLanguage =
|
|
613
|
-
(_g = localeFromDict !== null && localeFromDict !== void 0 ? localeFromDict : getVersionOrLanguageFromPath('language', decoratedNav, currentPath, defaultLanguage, (_f = (_e = initial.languages[0]) === null || _e === void 0 ? void 0 : _e.language) !== null && _f !== void 0 ? _f : undefined)) !== null && _g !== void 0 ? _g : undefined;
|
|
613
|
+
currentLanguage = (_g = localeFromDict !== null && localeFromDict !== void 0 ? localeFromDict : getVersionOrLanguageFromPath('language', decoratedNav, currentPath, defaultLanguage, (_f = (_d = initial.languages[0]) === null || _d === void 0 ? void 0 : _d.language) !== null && _f !== void 0 ? _f : undefined)) !== null && _g !== void 0 ? _g : undefined;
|
|
614
614
|
}
|
|
615
615
|
const filtered = filterDivisions({
|
|
616
616
|
currentPath,
|
|
@@ -18,7 +18,7 @@ export type DivisionMatch = {
|
|
|
18
18
|
canonicalOverride?: true;
|
|
19
19
|
groups?: PageGroups;
|
|
20
20
|
};
|
|
21
|
-
export declare function updateFirstHrefInDivision({ type, currentPath, entry, parentGroups, nearestDivisionValue, isActiveGroup, inActiveDivision, currentDivisionValue, allDivisionValues, firstHrefInDivision, navigationDivisions, isHiddenPage, activeGroupNames, activeDivisionOwner, inHiddenSubtree
|
|
21
|
+
export declare function updateFirstHrefInDivision({ type, currentPath, entry, parentGroups, nearestDivisionValue, isActiveGroup, inActiveDivision, currentDivisionValue, allDivisionValues, firstHrefInDivision, navigationDivisions, isHiddenPage, activeGroupNames, activeDivisionOwner, inHiddenSubtree }: {
|
|
22
22
|
type: 'version' | 'language';
|
|
23
23
|
currentPath: string;
|
|
24
24
|
entry: DecoratedNavigationConfig | DecoratedPageOrGroupConfig;
|
|
@@ -19,18 +19,19 @@ const callbackPathItemsOf = (location, pathItem) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
const pathItemsOf = (document) => {
|
|
22
|
-
var _a, _b
|
|
22
|
+
var _a, _b;
|
|
23
|
+
var _c, _d, _e, _f;
|
|
23
24
|
const roots = [
|
|
24
|
-
...Object.entries((
|
|
25
|
-
...Object.entries((
|
|
25
|
+
...Object.entries((_c = document.paths) !== null && _c !== void 0 ? _c : {}).map(([path, item]) => [`/paths/${escapePointer(path)}`, item]),
|
|
26
|
+
...Object.entries((_d = document.webhooks) !== null && _d !== void 0 ? _d : {}).map(([name, item]) => [
|
|
26
27
|
`/webhooks/${escapePointer(name)}`,
|
|
27
28
|
item,
|
|
28
29
|
]),
|
|
29
|
-
...Object.entries((
|
|
30
|
+
...Object.entries((_e = (_a = document.components) === null || _a === void 0 ? void 0 : _a.pathItems) !== null && _e !== void 0 ? _e : {}).map(([name, item]) => [
|
|
30
31
|
`/components/pathItems/${escapePointer(name)}`,
|
|
31
32
|
item,
|
|
32
33
|
]),
|
|
33
|
-
...Object.entries((_f = (
|
|
34
|
+
...Object.entries((_f = (_b = document.components) === null || _b === void 0 ? void 0 : _b.callbacks) !== null && _f !== void 0 ? _f : {}).flatMap(([name, callback]) => {
|
|
34
35
|
if (!callback || '$ref' in callback)
|
|
35
36
|
return [];
|
|
36
37
|
return Object.entries(callback).map(([expression, item]) => [
|
|
@@ -40,7 +40,8 @@ const isNullSchema = (schema) => isObject(schema) &&
|
|
|
40
40
|
(schema.type === 'null' ||
|
|
41
41
|
(Array.isArray(schema.type) && schema.type.every((type) => type === 'null')));
|
|
42
42
|
export const validatePositionalEncodings = (document) => {
|
|
43
|
-
var _a
|
|
43
|
+
var _a;
|
|
44
|
+
var _b;
|
|
44
45
|
const errors = [];
|
|
45
46
|
const componentSchemas = (_b = (_a = document.components) === null || _a === void 0 ? void 0 : _a.schemas) !== null && _b !== void 0 ? _b : {};
|
|
46
47
|
forEachDocumentPosition(document, {
|
|
@@ -73,7 +73,8 @@ function getXMintGroups(pathObject, operationObject) {
|
|
|
73
73
|
return groups;
|
|
74
74
|
}
|
|
75
75
|
export function generateOpenApiPages(opts) {
|
|
76
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
77
|
+
var _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
77
78
|
const { spec, specFilePath, outputDirectory } = opts;
|
|
78
79
|
const outDir = outputDirectory !== null && outputDirectory !== void 0 ? outputDirectory : DEFAULT_OUTPUT_DIR;
|
|
79
80
|
const openApiFilePathFromRoot = optionallyAddLeadingSlash(specFilePath);
|
|
@@ -86,17 +87,17 @@ export function generateOpenApiPages(opts) {
|
|
|
86
87
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
87
88
|
const openApiFiles = [
|
|
88
89
|
{
|
|
89
|
-
filename: (
|
|
90
|
+
filename: (_j = specFilePath.split('/').pop()) !== null && _j !== void 0 ? _j : 'spec',
|
|
90
91
|
spec: spec,
|
|
91
92
|
originalFileLocation: openApiFilePathFromRoot,
|
|
92
93
|
},
|
|
93
94
|
];
|
|
94
95
|
// Process paths
|
|
95
|
-
for (const [apiPath, rawPathItem] of Object.entries((
|
|
96
|
+
for (const [apiPath, rawPathItem] of Object.entries((_k = spec.paths) !== null && _k !== void 0 ? _k : {})) {
|
|
96
97
|
if (!rawPathItem || typeof rawPathItem !== 'object')
|
|
97
98
|
continue;
|
|
98
99
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
99
|
-
const pathItem = ((
|
|
100
|
+
const pathItem = ((_l = resolvePathItemReference(rawPathItem, spec.components)) !== null && _l !== void 0 ? _l : rawPathItem);
|
|
100
101
|
for (const [method, pathOperation] of getPathItemOperations(pathItem)) {
|
|
101
102
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
102
103
|
const operation = pathOperation;
|
|
@@ -105,10 +106,10 @@ export function generateOpenApiPages(opts) {
|
|
|
105
106
|
const xMint = operation['x-mint'];
|
|
106
107
|
const xMintGroups = getXMintGroups(pathItem, operation);
|
|
107
108
|
const tagPath = resolveTags(operation.tags);
|
|
108
|
-
const tagName = (
|
|
109
|
-
const groupName = (
|
|
110
|
-
let title = (
|
|
111
|
-
let folder = (
|
|
109
|
+
const tagName = (_a = tagPath.at(-1)) === null || _a === void 0 ? void 0 : _a.name;
|
|
110
|
+
const groupName = (_b = tagPath.at(-1)) === null || _b === void 0 ? void 0 : _b.label;
|
|
111
|
+
let title = (_m = prepareStringToBeValidFilename(operation.summary)) !== null && _m !== void 0 ? _m : `${method.toLowerCase()}-${prepareStringToBeValidFilename(apiPath)}`;
|
|
112
|
+
let folder = (_o = prepareStringToBeValidFilename(tagName)) !== null && _o !== void 0 ? _o : '';
|
|
112
113
|
let base = posixJoin(outDir, folder, title);
|
|
113
114
|
if (xMint === null || xMint === void 0 ? void 0 : xMint.href) {
|
|
114
115
|
const href = xMint.href.startsWith('/') ? xMint.href.slice(1) : xMint.href;
|
|
@@ -133,7 +134,7 @@ export function generateOpenApiPages(opts) {
|
|
|
133
134
|
if (badge !== undefined && (xMintMetadata === null || xMintMetadata === void 0 ? void 0 : xMintMetadata.tag) === undefined) {
|
|
134
135
|
xMintMetadata = Object.assign(Object.assign({}, xMintMetadata), { tag: badge });
|
|
135
136
|
}
|
|
136
|
-
const page = Object.assign(Object.assign({ title: (
|
|
137
|
+
const page = Object.assign(Object.assign({ title: (_q = (_p = xMintMetadata === null || xMintMetadata === void 0 ? void 0 : xMintMetadata.title) !== null && _p !== void 0 ? _p : titleTag) !== null && _q !== void 0 ? _q : slugToTitle(filenameWithoutExtension), description: (_r = xMintMetadata === null || xMintMetadata === void 0 ? void 0 : xMintMetadata.description) !== null && _r !== void 0 ? _r : description, deprecated: (_s = xMintMetadata === null || xMintMetadata === void 0 ? void 0 : xMintMetadata.deprecated) !== null && _s !== void 0 ? _s : operation.deprecated, openapi: openapiMetaTag, href: posixResolve('/', filenameWithoutExtension), method, path: apiPath, tag: groupName }, (nestedTags ? { tagPath } : {})), { hidden: operation['x-hidden'] === true, xMintMetadata, xMintContent: xMint === null || xMint === void 0 ? void 0 : xMint.content, version: opts.version });
|
|
137
138
|
pages.push(page);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
@@ -147,7 +148,7 @@ export function generateOpenApiPages(opts) {
|
|
|
147
148
|
if (!webhookObject || typeof webhookObject !== 'object')
|
|
148
149
|
continue;
|
|
149
150
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
150
|
-
const pathItem = ((
|
|
151
|
+
const pathItem = ((_t = resolvePathItemReference(webhookObject, spec.components)) !== null && _t !== void 0 ? _t : webhookObject);
|
|
151
152
|
for (const [, pathOperation] of getPathItemOperations(pathItem)) {
|
|
152
153
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
153
154
|
const operation = pathOperation;
|
|
@@ -155,10 +156,10 @@ export function generateOpenApiPages(opts) {
|
|
|
155
156
|
continue;
|
|
156
157
|
const xMint = operation['x-mint'];
|
|
157
158
|
const tagPath = resolveTags(operation.tags);
|
|
158
|
-
const tagName = (
|
|
159
|
-
const groupName = (
|
|
160
|
-
let title = (
|
|
161
|
-
let folder = (
|
|
159
|
+
const tagName = (_c = tagPath.at(-1)) === null || _c === void 0 ? void 0 : _c.name;
|
|
160
|
+
const groupName = (_d = tagPath.at(-1)) === null || _d === void 0 ? void 0 : _d.label;
|
|
161
|
+
let title = (_u = prepareStringToBeValidFilename(operation.summary)) !== null && _u !== void 0 ? _u : `${prepareStringToBeValidFilename(webhook)}`;
|
|
162
|
+
let folder = (_v = prepareStringToBeValidFilename(tagName)) !== null && _v !== void 0 ? _v : '';
|
|
162
163
|
let base = posixJoin(outDir, folder, title);
|
|
163
164
|
if (xMint === null || xMint === void 0 ? void 0 : xMint.href) {
|
|
164
165
|
const href = xMint.href.startsWith('/') ? xMint.href.slice(1) : xMint.href;
|
|
@@ -175,9 +176,9 @@ export function generateOpenApiPages(opts) {
|
|
|
175
176
|
path: webhook,
|
|
176
177
|
});
|
|
177
178
|
const badge = resolveBadge(operation.tags);
|
|
178
|
-
const xMintMetadata = badge !== undefined && ((
|
|
179
|
+
const xMintMetadata = badge !== undefined && ((_e = xMint === null || xMint === void 0 ? void 0 : xMint.metadata) === null || _e === void 0 ? void 0 : _e.tag) === undefined
|
|
179
180
|
? Object.assign(Object.assign({}, xMint === null || xMint === void 0 ? void 0 : xMint.metadata), { tag: badge }) : xMint === null || xMint === void 0 ? void 0 : xMint.metadata;
|
|
180
|
-
const page = Object.assign(Object.assign({ title: (
|
|
181
|
+
const page = Object.assign(Object.assign({ title: (_w = (_f = xMint === null || xMint === void 0 ? void 0 : xMint.metadata) === null || _f === void 0 ? void 0 : _f.title) !== null && _w !== void 0 ? _w : slugToTitle(filenameWithoutExtension), description: (_x = (_g = xMint === null || xMint === void 0 ? void 0 : xMint.metadata) === null || _g === void 0 ? void 0 : _g.description) !== null && _x !== void 0 ? _x : operation.description, deprecated: (_y = (_h = xMint === null || xMint === void 0 ? void 0 : xMint.metadata) === null || _h === void 0 ? void 0 : _h.deprecated) !== null && _y !== void 0 ? _y : operation.deprecated, openapi: openapiMetaTag, href: posixResolve('/', filenameWithoutExtension), method: 'webhook', path: webhook, tag: groupName }, (nestedTags ? { tagPath } : {})), { hidden: operation['x-hidden'] === true, isWebhook: true, xMintMetadata, xMintContent: xMint === null || xMint === void 0 ? void 0 : xMint.content, version: opts.version });
|
|
181
182
|
pages.push(page);
|
|
182
183
|
}
|
|
183
184
|
}
|
|
@@ -2,4 +2,4 @@ import { OpenAPI } from 'openapi-types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Resolves the display name for a tag. Prioritizes x-group extension, falls back to tag name.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getTagDisplayName: (tagName: string | undefined, schema: Pick<OpenAPI.Document,
|
|
5
|
+
export declare const getTagDisplayName: (tagName: string | undefined, schema: Pick<OpenAPI.Document, 'tags'>) => string | undefined;
|
|
@@ -9,7 +9,7 @@ export declare class OverlayApplicationError extends Error {
|
|
|
9
9
|
actionIndex: number;
|
|
10
10
|
/** The action's `target` JSONPath expression. */
|
|
11
11
|
target: string;
|
|
12
|
-
constructor({ message, overlaySource, actionIndex, target
|
|
12
|
+
constructor({ message, overlaySource, actionIndex, target }: {
|
|
13
13
|
message: string;
|
|
14
14
|
overlaySource?: string;
|
|
15
15
|
actionIndex: number;
|
|
@@ -37,7 +37,7 @@ export type CreateOverlayRegistryOptions = {
|
|
|
37
37
|
};
|
|
38
38
|
/** Validates a parsed value as an Overlay document, JSON-normalizing YAML values. */
|
|
39
39
|
export declare function parseLoadedOverlayDocument(value: unknown, location: string): OverlayDocument;
|
|
40
|
-
export declare function createOverlayRegistry({ explicit, discovered, loadLocalDocument, localSchema, fetchRemoteDocument
|
|
40
|
+
export declare function createOverlayRegistry({ explicit, discovered, loadLocalDocument, localSchema, fetchRemoteDocument }: CreateOverlayRegistryOptions): OverlayRegistry;
|
|
41
41
|
/**
|
|
42
42
|
* Resolves the ordered list of overlays to apply to a spec:
|
|
43
43
|
* - an explicit `overlays` list in docs.json wins (an empty list disables everything)
|
|
@@ -63,7 +63,7 @@ export function createOpenApiTagResolver(schema) {
|
|
|
63
63
|
paths.set(name, path);
|
|
64
64
|
return path;
|
|
65
65
|
}
|
|
66
|
-
const kindOf = (name) => { var _a
|
|
66
|
+
const kindOf = (name) => { var _a; var _b; return byName.has(name) ? ((_b = (_a = byName.get(name)) === null || _a === void 0 ? void 0 : _a.kind) !== null && _b !== void 0 ? _b : 'none') : 'undeclared'; };
|
|
67
67
|
return (operationTags = []) => {
|
|
68
68
|
var _a, _b, _c;
|
|
69
69
|
const name = nested
|
|
@@ -6,9 +6,10 @@ function toPagePath(href) {
|
|
|
6
6
|
* Shorter paths apply first, so the most specific folder wins.
|
|
7
7
|
*/
|
|
8
8
|
export function resolveSeoMetatags(seo, href) {
|
|
9
|
-
var _a
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var _a;
|
|
10
|
+
var _b;
|
|
11
|
+
const siteMetatags = (_b = seo === null || seo === void 0 ? void 0 : seo.metatags) !== null && _b !== void 0 ? _b : {};
|
|
12
|
+
if (!((_a = seo === null || seo === void 0 ? void 0 : seo.paths) === null || _a === void 0 ? void 0 : _a.length) || !href)
|
|
12
13
|
return Object.assign({}, siteMetatags);
|
|
13
14
|
const pagePath = toPagePath(href);
|
|
14
15
|
const matches = seo.paths
|