blodemd 0.0.8 → 0.0.9
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/README.md +25 -9
- package/dev-server/app/[[...slug]]/page.tsx +1 -0
- package/dev-server/next.config.js +11 -13
- package/dev-server/package.json +1 -1
- package/dev-server/tsconfig.json +3 -0
- package/dist/cli.mjs +869 -184
- package/dist/cli.mjs.map +1 -1
- package/docs/components/api/api-playground.tsx +255 -80
- package/docs/components/api/api-reference.tsx +11 -1
- package/docs/components/docs/contextual-menu.tsx +227 -142
- package/docs/components/docs/copy-page-menu.tsx +132 -85
- package/docs/components/docs/doc-header.tsx +13 -3
- package/docs/components/docs/doc-shell.tsx +22 -11
- package/docs/components/docs/mobile-nav.tsx +0 -6
- package/docs/components/mdx/code-group.tsx +171 -62
- package/docs/components/mdx/tabs.tsx +131 -26
- package/docs/components/ui/input.tsx +0 -1
- package/docs/components/ui/search.tsx +241 -132
- package/docs/lib/content-root.ts +33 -0
- package/docs/lib/content-source.ts +70 -0
- package/docs/lib/contextual-options.ts +20 -0
- package/docs/lib/docs-runtime.tsx +595 -0
- package/docs/lib/edge-config.ts +95 -0
- package/docs/lib/env.ts +22 -0
- package/docs/lib/openapi-proxy.ts +88 -0
- package/docs/lib/platform-config.ts +6 -0
- package/docs/lib/routes.ts +39 -0
- package/docs/lib/supabase.ts +13 -0
- package/docs/lib/tenancy.ts +322 -0
- package/docs/lib/tenant-headers.ts +14 -0
- package/docs/lib/tenant-static.ts +529 -0
- package/docs/lib/tenant-utility-context.ts +62 -0
- package/docs/lib/tenants.ts +68 -0
- package/docs/lib/use-mobile.ts +19 -0
- package/package.json +3 -2
- package/packages/@repo/common/dist/index.d.ts +7 -0
- package/packages/@repo/common/dist/index.d.ts.map +1 -1
- package/packages/@repo/common/dist/index.js +42 -0
- package/packages/@repo/common/src/index.ts +50 -0
- package/packages/@repo/contracts/dist/project.d.ts +1 -1
- package/packages/@repo/contracts/dist/project.js +1 -1
- package/packages/@repo/contracts/src/project.ts +1 -1
- package/packages/@repo/models/dist/docs-config.d.ts +194 -29
- package/packages/@repo/models/dist/docs-config.d.ts.map +1 -1
- package/packages/@repo/models/dist/docs-config.js +3 -28
- package/packages/@repo/models/src/docs-config.ts +5 -31
- package/packages/@repo/previewing/dist/blob-source.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/blob-source.js +7 -2
- package/packages/@repo/previewing/dist/fs-source.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/fs-source.js +2 -3
- package/packages/@repo/previewing/dist/index.d.ts.map +1 -1
- package/packages/@repo/previewing/dist/index.js +1 -41
- package/packages/@repo/previewing/src/blob-source.ts +7 -4
- package/packages/@repo/previewing/src/fs-source.ts +2 -3
- package/packages/@repo/previewing/src/index.ts +3 -55
- package/packages/@repo/validation/dist/index.d.ts +2 -2
- package/packages/@repo/validation/dist/index.d.ts.map +1 -1
- package/packages/@repo/validation/dist/index.js +2 -2
- package/packages/@repo/validation/package.json +1 -0
- package/packages/@repo/validation/src/{mintlify-docs-schema.json → blodemd-docs-schema.json} +346 -1794
- package/packages/@repo/validation/src/index.ts +4 -4
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
type EnvLike = Record<string, string | undefined>;
|
|
2
|
+
export declare const LOCAL_ROOT_HOSTS: readonly ["localhost", "127.0.0.1", "docs.localhost"];
|
|
1
3
|
export declare const normalizePath: (value: string) => string;
|
|
4
|
+
export declare const normalizeHost: (value: string) => string;
|
|
5
|
+
export declare const getPortlessHostFromEnv: (env: EnvLike) => string | null;
|
|
6
|
+
export declare const getLocalRootHostsFromEnv: (env: EnvLike) => Set<string>;
|
|
2
7
|
export declare const withLeadingSlash: (value: string) => string;
|
|
3
8
|
export declare const withoutLeadingSlash: (value: string) => string;
|
|
4
9
|
export declare const slugify: (value: string) => string;
|
|
10
|
+
export declare const shouldIgnoreRootDocsFile: (value: string) => boolean;
|
|
5
11
|
export declare const ensureArray: <T>(value?: T | T[]) => T[];
|
|
6
12
|
export declare const uniq: <T>(values: T[]) => T[];
|
|
7
13
|
export declare const safeJsonParse: <T>(value: string) => T | null;
|
|
8
14
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
15
|
+
export {};
|
|
9
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,WAK1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,WAK7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,WAKhD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,WAKL,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,gBAAgB,uDAInB,CAAC;AAEX,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,WAK1C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,WACS,CAAC;AAErD,eAAO,MAAM,sBAAsB,GAAI,KAAK,OAAO,kBAWlD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,KAAK,OAAO,gBAOpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,WAK7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,WAKhD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,WAKL,CAAC;AAWjC,eAAO,MAAM,wBAAwB,GAAI,OAAO,MAAM,YAMrD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,QAK7C,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAyB,CAAC;AAE7D,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,OAAO,MAAM,KAAG,CAAC,GAAG,IAMpD,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,WACxB,CAAC"}
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
const BACKSLASH_TO_SLASH_REGEX = /\\/g;
|
|
2
2
|
const TRAILING_SLASHES_REGEX = /\/+$/g;
|
|
3
3
|
const LEADING_SLASHES_REGEX = /^\/+/;
|
|
4
|
+
const PORT_REGEX = /:\d+$/;
|
|
5
|
+
export const LOCAL_ROOT_HOSTS = [
|
|
6
|
+
"localhost",
|
|
7
|
+
"127.0.0.1",
|
|
8
|
+
"docs.localhost",
|
|
9
|
+
];
|
|
4
10
|
export const normalizePath = (value) => {
|
|
5
11
|
const trimmed = value
|
|
6
12
|
.replace(BACKSLASH_TO_SLASH_REGEX, "/")
|
|
7
13
|
.replace(TRAILING_SLASHES_REGEX, "");
|
|
8
14
|
return trimmed.replace(LEADING_SLASHES_REGEX, "");
|
|
9
15
|
};
|
|
16
|
+
export const normalizeHost = (value) => value.trim().replace(PORT_REGEX, "").toLowerCase();
|
|
17
|
+
export const getPortlessHostFromEnv = (env) => {
|
|
18
|
+
const portlessUrl = env.PORTLESS_URL?.trim();
|
|
19
|
+
if (!portlessUrl) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
try {
|
|
23
|
+
return normalizeHost(new URL(portlessUrl).host);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return normalizeHost(portlessUrl);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const getLocalRootHostsFromEnv = (env) => {
|
|
30
|
+
const hosts = new Set(LOCAL_ROOT_HOSTS);
|
|
31
|
+
const portlessHost = getPortlessHostFromEnv(env);
|
|
32
|
+
if (portlessHost) {
|
|
33
|
+
hosts.add(portlessHost);
|
|
34
|
+
}
|
|
35
|
+
return hosts;
|
|
36
|
+
};
|
|
10
37
|
export const withLeadingSlash = (value) => {
|
|
11
38
|
if (!value) {
|
|
12
39
|
return "/";
|
|
@@ -24,6 +51,21 @@ export const slugify = (value) => value
|
|
|
24
51
|
.trim()
|
|
25
52
|
.replaceAll(/[^a-z0-9]+/g, "-")
|
|
26
53
|
.replaceAll(/(^-|-$)+/g, "");
|
|
54
|
+
const IGNORED_ROOT_DOCS_FILES = new Set([
|
|
55
|
+
".gitignore",
|
|
56
|
+
"AGENTS.md",
|
|
57
|
+
"CLAUDE.md",
|
|
58
|
+
"LICENSE",
|
|
59
|
+
"LICENSE.md",
|
|
60
|
+
"README.md",
|
|
61
|
+
]);
|
|
62
|
+
export const shouldIgnoreRootDocsFile = (value) => {
|
|
63
|
+
const normalized = normalizePath(value);
|
|
64
|
+
if (!normalized || normalized.includes("/")) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return IGNORED_ROOT_DOCS_FILES.has(normalized);
|
|
68
|
+
};
|
|
27
69
|
export const ensureArray = (value) => {
|
|
28
70
|
if (value === undefined) {
|
|
29
71
|
return [];
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
const BACKSLASH_TO_SLASH_REGEX = /\\/g;
|
|
2
2
|
const TRAILING_SLASHES_REGEX = /\/+$/g;
|
|
3
3
|
const LEADING_SLASHES_REGEX = /^\/+/;
|
|
4
|
+
const PORT_REGEX = /:\d+$/;
|
|
5
|
+
type EnvLike = Record<string, string | undefined>;
|
|
6
|
+
|
|
7
|
+
export const LOCAL_ROOT_HOSTS = [
|
|
8
|
+
"localhost",
|
|
9
|
+
"127.0.0.1",
|
|
10
|
+
"docs.localhost",
|
|
11
|
+
] as const;
|
|
4
12
|
|
|
5
13
|
export const normalizePath = (value: string) => {
|
|
6
14
|
const trimmed = value
|
|
@@ -9,6 +17,31 @@ export const normalizePath = (value: string) => {
|
|
|
9
17
|
return trimmed.replace(LEADING_SLASHES_REGEX, "");
|
|
10
18
|
};
|
|
11
19
|
|
|
20
|
+
export const normalizeHost = (value: string) =>
|
|
21
|
+
value.trim().replace(PORT_REGEX, "").toLowerCase();
|
|
22
|
+
|
|
23
|
+
export const getPortlessHostFromEnv = (env: EnvLike) => {
|
|
24
|
+
const portlessUrl = env.PORTLESS_URL?.trim();
|
|
25
|
+
if (!portlessUrl) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
return normalizeHost(new URL(portlessUrl).host);
|
|
31
|
+
} catch {
|
|
32
|
+
return normalizeHost(portlessUrl);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const getLocalRootHostsFromEnv = (env: EnvLike) => {
|
|
37
|
+
const hosts = new Set<string>(LOCAL_ROOT_HOSTS);
|
|
38
|
+
const portlessHost = getPortlessHostFromEnv(env);
|
|
39
|
+
if (portlessHost) {
|
|
40
|
+
hosts.add(portlessHost);
|
|
41
|
+
}
|
|
42
|
+
return hosts;
|
|
43
|
+
};
|
|
44
|
+
|
|
12
45
|
export const withLeadingSlash = (value: string) => {
|
|
13
46
|
if (!value) {
|
|
14
47
|
return "/";
|
|
@@ -30,6 +63,23 @@ export const slugify = (value: string) =>
|
|
|
30
63
|
.replaceAll(/[^a-z0-9]+/g, "-")
|
|
31
64
|
.replaceAll(/(^-|-$)+/g, "");
|
|
32
65
|
|
|
66
|
+
const IGNORED_ROOT_DOCS_FILES = new Set([
|
|
67
|
+
".gitignore",
|
|
68
|
+
"AGENTS.md",
|
|
69
|
+
"CLAUDE.md",
|
|
70
|
+
"LICENSE",
|
|
71
|
+
"LICENSE.md",
|
|
72
|
+
"README.md",
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
export const shouldIgnoreRootDocsFile = (value: string) => {
|
|
76
|
+
const normalized = normalizePath(value);
|
|
77
|
+
if (!normalized || normalized.includes("/")) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return IGNORED_ROOT_DOCS_FILES.has(normalized);
|
|
81
|
+
};
|
|
82
|
+
|
|
33
83
|
export const ensureArray = <T>(value?: T | T[]) => {
|
|
34
84
|
if (value === undefined) {
|
|
35
85
|
return [] as T[];
|
|
@@ -18,7 +18,7 @@ export declare const ProjectCreateSchema: z.ZodObject<{
|
|
|
18
18
|
export type ProjectCreateInput = z.infer<typeof ProjectCreateSchema>;
|
|
19
19
|
export declare const ProjectUpdateSchema: z.ZodObject<{
|
|
20
20
|
deploymentName: z.ZodOptional<z.ZodString>;
|
|
21
|
-
description: z.ZodOptional<z.ZodString
|
|
21
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
22
|
name: z.ZodOptional<z.ZodString>;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
export type ProjectUpdateInput = z.infer<typeof ProjectUpdateSchema>;
|
|
@@ -18,6 +18,6 @@ export const ProjectCreateSchema = z.object({
|
|
|
18
18
|
});
|
|
19
19
|
export const ProjectUpdateSchema = z.object({
|
|
20
20
|
deploymentName: z.string().min(1).optional(),
|
|
21
|
-
description: z.string().optional(),
|
|
21
|
+
description: z.string().nullable().optional(),
|
|
22
22
|
name: z.string().min(1).optional(),
|
|
23
23
|
});
|
|
@@ -24,7 +24,7 @@ export type ProjectCreateInput = z.infer<typeof ProjectCreateSchema>;
|
|
|
24
24
|
|
|
25
25
|
export const ProjectUpdateSchema = z.object({
|
|
26
26
|
deploymentName: z.string().min(1).optional(),
|
|
27
|
-
description: z.string().optional(),
|
|
27
|
+
description: z.string().nullable().optional(),
|
|
28
28
|
name: z.string().min(1).optional(),
|
|
29
29
|
});
|
|
30
30
|
export type ProjectUpdateInput = z.infer<typeof ProjectUpdateSchema>;
|
|
@@ -22,6 +22,7 @@ export declare const DocsFontsSchema: z.ZodObject<{
|
|
|
22
22
|
export declare const DocsLogoSchema: z.ZodObject<{
|
|
23
23
|
alt: z.ZodOptional<z.ZodString>;
|
|
24
24
|
dark: z.ZodOptional<z.ZodString>;
|
|
25
|
+
href: z.ZodOptional<z.ZodString>;
|
|
25
26
|
light: z.ZodOptional<z.ZodString>;
|
|
26
27
|
}, z.core.$strict>;
|
|
27
28
|
export declare const DocsNavLinkSchema: z.ZodObject<{
|
|
@@ -248,7 +249,7 @@ export type ContextualBuiltinOption = z.infer<typeof ContextualBuiltinOptionSche
|
|
|
248
249
|
export type ContextualCustomOption = z.infer<typeof ContextualCustomOptionSchema>;
|
|
249
250
|
export type ContextualOption = z.infer<typeof ContextualOptionSchema>;
|
|
250
251
|
export type DocsContextual = z.infer<typeof DocsContextualSchema>;
|
|
251
|
-
export declare const
|
|
252
|
+
export declare const DocsConfigSchema: z.ZodObject<{
|
|
252
253
|
$schema: z.ZodOptional<z.ZodString>;
|
|
253
254
|
api: z.ZodOptional<z.ZodObject<{
|
|
254
255
|
asyncapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
@@ -310,11 +311,6 @@ export declare const MintlifyDocsConfigSchema: z.ZodObject<{
|
|
|
310
311
|
}>>;
|
|
311
312
|
strict: z.ZodOptional<z.ZodBoolean>;
|
|
312
313
|
}, z.core.$strict>>;
|
|
313
|
-
colors: z.ZodObject<{
|
|
314
|
-
dark: z.ZodOptional<z.ZodString>;
|
|
315
|
-
light: z.ZodOptional<z.ZodString>;
|
|
316
|
-
primary: z.ZodString;
|
|
317
|
-
}, z.core.$strict>;
|
|
318
314
|
contextual: z.ZodOptional<z.ZodObject<{
|
|
319
315
|
display: z.ZodOptional<z.ZodEnum<{
|
|
320
316
|
toc: "toc";
|
|
@@ -355,33 +351,202 @@ export declare const MintlifyDocsConfigSchema: z.ZodObject<{
|
|
|
355
351
|
dark: z.ZodString;
|
|
356
352
|
light: z.ZodString;
|
|
357
353
|
}, z.core.$strict>]>>;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
354
|
+
logo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
355
|
+
dark: z.ZodString;
|
|
356
|
+
href: z.ZodOptional<z.ZodString>;
|
|
357
|
+
light: z.ZodString;
|
|
358
|
+
}, z.core.$strict>]>>;
|
|
359
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
timestamp: z.ZodOptional<z.ZodBoolean>;
|
|
361
|
+
}, z.core.$strict>>;
|
|
362
|
+
name: z.ZodString;
|
|
363
|
+
navbar: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
365
|
+
href: z.ZodString;
|
|
366
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
367
|
+
iconType: z.ZodOptional<z.ZodString>;
|
|
368
|
+
label: z.ZodOptional<z.ZodString>;
|
|
369
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
370
|
+
discord: "discord";
|
|
371
|
+
github: "github";
|
|
364
372
|
}>>;
|
|
365
|
-
|
|
366
|
-
|
|
373
|
+
}, z.core.$strict>>>;
|
|
374
|
+
primary: z.ZodOptional<z.ZodObject<{
|
|
375
|
+
href: z.ZodString;
|
|
376
|
+
label: z.ZodOptional<z.ZodString>;
|
|
377
|
+
type: z.ZodEnum<{
|
|
378
|
+
discord: "discord";
|
|
379
|
+
github: "github";
|
|
380
|
+
button: "button";
|
|
381
|
+
}>;
|
|
367
382
|
}, z.core.$strict>>;
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
navigation: z.ZodObject<{
|
|
385
|
+
global: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
anchors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
+
anchor: z.ZodString;
|
|
388
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
389
|
+
dark: z.ZodOptional<z.ZodString>;
|
|
390
|
+
light: z.ZodOptional<z.ZodString>;
|
|
391
|
+
}, z.core.$strict>>;
|
|
392
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
href: z.ZodString;
|
|
394
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
395
|
+
iconType: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, z.core.$strict>>>;
|
|
397
|
+
}, z.core.$strict>>;
|
|
398
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
399
|
+
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
400
|
+
group: z.ZodString;
|
|
401
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
403
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
404
|
+
root: z.ZodOptional<z.ZodString>;
|
|
405
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
406
|
+
}, z.core.$strict>>>;
|
|
407
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
408
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
+
href: z.ZodString;
|
|
411
|
+
language: z.ZodString;
|
|
412
|
+
}, z.core.$strict>>>;
|
|
413
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
414
|
+
tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
415
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
416
|
+
expanded: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
+
group: z.ZodString;
|
|
418
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
419
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
420
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
421
|
+
root: z.ZodOptional<z.ZodString>;
|
|
422
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, z.core.$strict>>>;
|
|
424
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
425
|
+
href: z.ZodOptional<z.ZodString>;
|
|
426
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
427
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
428
|
+
tab: z.ZodString;
|
|
429
|
+
}, z.core.$strict>>>;
|
|
430
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
431
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
433
|
+
href: z.ZodString;
|
|
434
|
+
version: z.ZodString;
|
|
435
|
+
}, z.core.$strict>>>;
|
|
436
|
+
}, z.core.$strict>;
|
|
437
|
+
search: z.ZodOptional<z.ZodObject<{
|
|
438
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
439
|
+
}, z.core.$strict>>;
|
|
440
|
+
seo: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
indexing: z.ZodOptional<z.ZodEnum<{
|
|
442
|
+
default: "default";
|
|
443
|
+
all: "all";
|
|
372
444
|
}>>;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
445
|
+
}, z.core.$strict>>;
|
|
446
|
+
}, z.core.$strict>;
|
|
447
|
+
export type DocsConfig = z.infer<typeof DocsConfigSchema>;
|
|
448
|
+
export declare const MintlifyDocsConfigSchema: z.ZodObject<{
|
|
449
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
450
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
451
|
+
asyncapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
452
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
453
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
454
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
455
|
+
source: z.ZodString;
|
|
456
|
+
}, z.core.$strict>]>>;
|
|
457
|
+
examples: z.ZodOptional<z.ZodObject<{
|
|
458
|
+
autogenerate: z.ZodOptional<z.ZodBoolean>;
|
|
459
|
+
defaults: z.ZodOptional<z.ZodEnum<{
|
|
460
|
+
all: "all";
|
|
461
|
+
required: "required";
|
|
378
462
|
}>>;
|
|
379
|
-
|
|
380
|
-
|
|
463
|
+
languages: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
464
|
+
prefill: z.ZodOptional<z.ZodBoolean>;
|
|
381
465
|
}, z.core.$strict>>;
|
|
382
|
-
|
|
383
|
-
|
|
466
|
+
mdx: z.ZodOptional<z.ZodObject<{
|
|
467
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
468
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
469
|
+
basic: "basic";
|
|
470
|
+
bearer: "bearer";
|
|
471
|
+
cobo: "cobo";
|
|
472
|
+
key: "key";
|
|
473
|
+
}>>;
|
|
474
|
+
name: z.ZodOptional<z.ZodString>;
|
|
475
|
+
}, z.core.$strict>>;
|
|
476
|
+
server: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
477
|
+
}, z.core.$strict>>;
|
|
478
|
+
openapi: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
479
|
+
basePath: z.ZodOptional<z.ZodString>;
|
|
480
|
+
directory: z.ZodOptional<z.ZodString>;
|
|
481
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
|
+
source: z.ZodString;
|
|
483
|
+
}, z.core.$strict>]>>;
|
|
484
|
+
params: z.ZodOptional<z.ZodObject<{
|
|
485
|
+
expanded: z.ZodOptional<z.ZodEnum<{
|
|
486
|
+
all: "all";
|
|
487
|
+
closed: "closed";
|
|
488
|
+
}>>;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
playground: z.ZodOptional<z.ZodObject<{
|
|
491
|
+
credentials: z.ZodOptional<z.ZodBoolean>;
|
|
492
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
493
|
+
auth: "auth";
|
|
494
|
+
interactive: "interactive";
|
|
495
|
+
none: "none";
|
|
496
|
+
simple: "simple";
|
|
497
|
+
}>>;
|
|
498
|
+
proxy: z.ZodOptional<z.ZodBoolean>;
|
|
499
|
+
}, z.core.$strict>>;
|
|
500
|
+
url: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
384
501
|
}, z.core.$strict>>;
|
|
502
|
+
appearance: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
default: z.ZodOptional<z.ZodEnum<{
|
|
504
|
+
dark: "dark";
|
|
505
|
+
light: "light";
|
|
506
|
+
system: "system";
|
|
507
|
+
}>>;
|
|
508
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
509
|
+
}, z.core.$strict>>;
|
|
510
|
+
contextual: z.ZodOptional<z.ZodObject<{
|
|
511
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
512
|
+
toc: "toc";
|
|
513
|
+
header: "header";
|
|
514
|
+
}>>;
|
|
515
|
+
options: z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
516
|
+
"add-mcp": "add-mcp";
|
|
517
|
+
aistudio: "aistudio";
|
|
518
|
+
assistant: "assistant";
|
|
519
|
+
chatgpt: "chatgpt";
|
|
520
|
+
claude: "claude";
|
|
521
|
+
copy: "copy";
|
|
522
|
+
cursor: "cursor";
|
|
523
|
+
devin: "devin";
|
|
524
|
+
"devin-mcp": "devin-mcp";
|
|
525
|
+
grok: "grok";
|
|
526
|
+
mcp: "mcp";
|
|
527
|
+
perplexity: "perplexity";
|
|
528
|
+
view: "view";
|
|
529
|
+
vscode: "vscode";
|
|
530
|
+
windsurf: "windsurf";
|
|
531
|
+
}>, z.ZodObject<{
|
|
532
|
+
description: z.ZodString;
|
|
533
|
+
href: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
534
|
+
base: z.ZodString;
|
|
535
|
+
query: z.ZodArray<z.ZodObject<{
|
|
536
|
+
key: z.ZodString;
|
|
537
|
+
value: z.ZodString;
|
|
538
|
+
}, z.core.$strict>>;
|
|
539
|
+
}, z.core.$strict>]>;
|
|
540
|
+
icon: z.ZodString;
|
|
541
|
+
iconType: z.ZodOptional<z.ZodString>;
|
|
542
|
+
title: z.ZodString;
|
|
543
|
+
}, z.core.$strict>]>>;
|
|
544
|
+
}, z.core.$strict>>;
|
|
545
|
+
description: z.ZodOptional<z.ZodString>;
|
|
546
|
+
favicon: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
547
|
+
dark: z.ZodString;
|
|
548
|
+
light: z.ZodString;
|
|
549
|
+
}, z.core.$strict>]>>;
|
|
385
550
|
logo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
386
551
|
dark: z.ZodString;
|
|
387
552
|
href: z.ZodOptional<z.ZodString>;
|
|
@@ -474,9 +639,8 @@ export declare const MintlifyDocsConfigSchema: z.ZodObject<{
|
|
|
474
639
|
all: "all";
|
|
475
640
|
}>>;
|
|
476
641
|
}, z.core.$strict>>;
|
|
477
|
-
theme: z.ZodString;
|
|
478
642
|
}, z.core.$strict>;
|
|
479
|
-
export type MintlifyDocsConfig =
|
|
643
|
+
export type MintlifyDocsConfig = DocsConfig;
|
|
480
644
|
export declare const ContentTypeSchema: z.ZodEnum<{
|
|
481
645
|
site: "site";
|
|
482
646
|
blog: "blog";
|
|
@@ -898,6 +1062,7 @@ export declare const SiteConfigSchema: z.ZodObject<{
|
|
|
898
1062
|
logo: z.ZodOptional<z.ZodObject<{
|
|
899
1063
|
alt: z.ZodOptional<z.ZodString>;
|
|
900
1064
|
dark: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
href: z.ZodOptional<z.ZodString>;
|
|
901
1066
|
light: z.ZodOptional<z.ZodString>;
|
|
902
1067
|
}, z.core.$strict>>;
|
|
903
1068
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-config.d.ts","sourceRoot":"","sources":["../src/docs-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,gBAAgB;;;;;;;;kBAUlB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;kBAQjB,CAAC;AAEZ,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"docs-config.d.ts","sourceRoot":"","sources":["../src/docs-config.ts"],"names":[],"mappings":"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"}
|
|
@@ -24,6 +24,7 @@ export const DocsLogoSchema = z
|
|
|
24
24
|
.object({
|
|
25
25
|
alt: z.string().optional(),
|
|
26
26
|
dark: UrlOrPathSchema.optional(),
|
|
27
|
+
href: z.string().min(1).optional(),
|
|
27
28
|
light: UrlOrPathSchema.optional(),
|
|
28
29
|
})
|
|
29
30
|
.strict();
|
|
@@ -121,24 +122,6 @@ export const DocsOpenApiProxySchema = z
|
|
|
121
122
|
enabled: z.boolean().optional(),
|
|
122
123
|
})
|
|
123
124
|
.strict();
|
|
124
|
-
const MintlifyFontSchema = z
|
|
125
|
-
.object({
|
|
126
|
-
family: z.string().min(1),
|
|
127
|
-
format: z.enum(["woff", "woff2"]).optional(),
|
|
128
|
-
source: z.string().min(1).optional(),
|
|
129
|
-
weight: z.number().optional(),
|
|
130
|
-
})
|
|
131
|
-
.strict();
|
|
132
|
-
const MintlifyFontsSchema = z
|
|
133
|
-
.object({
|
|
134
|
-
body: MintlifyFontSchema.optional(),
|
|
135
|
-
family: z.string().min(1).optional(),
|
|
136
|
-
format: z.enum(["woff", "woff2"]).optional(),
|
|
137
|
-
heading: MintlifyFontSchema.optional(),
|
|
138
|
-
source: z.string().min(1).optional(),
|
|
139
|
-
weight: z.number().optional(),
|
|
140
|
-
})
|
|
141
|
-
.strict();
|
|
142
125
|
const MintlifyLogoSchema = z.union([
|
|
143
126
|
UrlOrPathSchema,
|
|
144
127
|
z
|
|
@@ -372,22 +355,14 @@ export const DocsContextualSchema = z
|
|
|
372
355
|
options: z.array(ContextualOptionSchema),
|
|
373
356
|
})
|
|
374
357
|
.strict();
|
|
375
|
-
export const
|
|
358
|
+
export const DocsConfigSchema = z
|
|
376
359
|
.object({
|
|
377
360
|
$schema: z.string().optional(),
|
|
378
361
|
api: MintlifyApiSchema.optional(),
|
|
379
362
|
appearance: MintlifyAppearanceSchema.optional(),
|
|
380
|
-
colors: z
|
|
381
|
-
.object({
|
|
382
|
-
dark: z.string().optional(),
|
|
383
|
-
light: z.string().optional(),
|
|
384
|
-
primary: z.string().min(1),
|
|
385
|
-
})
|
|
386
|
-
.strict(),
|
|
387
363
|
contextual: DocsContextualSchema.optional(),
|
|
388
364
|
description: z.string().optional(),
|
|
389
365
|
favicon: MintlifyFaviconSchema.optional(),
|
|
390
|
-
fonts: MintlifyFontsSchema.optional(),
|
|
391
366
|
logo: MintlifyLogoSchema.optional(),
|
|
392
367
|
metadata: MintlifyMetadataSchema.optional(),
|
|
393
368
|
name: z.string().min(1),
|
|
@@ -395,9 +370,9 @@ export const MintlifyDocsConfigSchema = z
|
|
|
395
370
|
navigation: MintlifyNavigationSchema,
|
|
396
371
|
search: MintlifySearchSchema.optional(),
|
|
397
372
|
seo: DocsSeoSchema.optional(),
|
|
398
|
-
theme: z.string().min(1),
|
|
399
373
|
})
|
|
400
374
|
.strict();
|
|
375
|
+
export const MintlifyDocsConfigSchema = DocsConfigSchema;
|
|
401
376
|
export const ContentTypeSchema = z.enum([
|
|
402
377
|
"site",
|
|
403
378
|
"blog",
|
|
@@ -28,6 +28,7 @@ export const DocsLogoSchema = z
|
|
|
28
28
|
.object({
|
|
29
29
|
alt: z.string().optional(),
|
|
30
30
|
dark: UrlOrPathSchema.optional(),
|
|
31
|
+
href: z.string().min(1).optional(),
|
|
31
32
|
light: UrlOrPathSchema.optional(),
|
|
32
33
|
})
|
|
33
34
|
.strict();
|
|
@@ -142,26 +143,6 @@ export const DocsOpenApiProxySchema = z
|
|
|
142
143
|
})
|
|
143
144
|
.strict();
|
|
144
145
|
|
|
145
|
-
const MintlifyFontSchema = z
|
|
146
|
-
.object({
|
|
147
|
-
family: z.string().min(1),
|
|
148
|
-
format: z.enum(["woff", "woff2"]).optional(),
|
|
149
|
-
source: z.string().min(1).optional(),
|
|
150
|
-
weight: z.number().optional(),
|
|
151
|
-
})
|
|
152
|
-
.strict();
|
|
153
|
-
|
|
154
|
-
const MintlifyFontsSchema = z
|
|
155
|
-
.object({
|
|
156
|
-
body: MintlifyFontSchema.optional(),
|
|
157
|
-
family: z.string().min(1).optional(),
|
|
158
|
-
format: z.enum(["woff", "woff2"]).optional(),
|
|
159
|
-
heading: MintlifyFontSchema.optional(),
|
|
160
|
-
source: z.string().min(1).optional(),
|
|
161
|
-
weight: z.number().optional(),
|
|
162
|
-
})
|
|
163
|
-
.strict();
|
|
164
|
-
|
|
165
146
|
const MintlifyLogoSchema = z.union([
|
|
166
147
|
UrlOrPathSchema,
|
|
167
148
|
z
|
|
@@ -436,22 +417,14 @@ export type ContextualCustomOption = z.infer<
|
|
|
436
417
|
export type ContextualOption = z.infer<typeof ContextualOptionSchema>;
|
|
437
418
|
export type DocsContextual = z.infer<typeof DocsContextualSchema>;
|
|
438
419
|
|
|
439
|
-
export const
|
|
420
|
+
export const DocsConfigSchema = z
|
|
440
421
|
.object({
|
|
441
422
|
$schema: z.string().optional(),
|
|
442
423
|
api: MintlifyApiSchema.optional(),
|
|
443
424
|
appearance: MintlifyAppearanceSchema.optional(),
|
|
444
|
-
colors: z
|
|
445
|
-
.object({
|
|
446
|
-
dark: z.string().optional(),
|
|
447
|
-
light: z.string().optional(),
|
|
448
|
-
primary: z.string().min(1),
|
|
449
|
-
})
|
|
450
|
-
.strict(),
|
|
451
425
|
contextual: DocsContextualSchema.optional(),
|
|
452
426
|
description: z.string().optional(),
|
|
453
427
|
favicon: MintlifyFaviconSchema.optional(),
|
|
454
|
-
fonts: MintlifyFontsSchema.optional(),
|
|
455
428
|
logo: MintlifyLogoSchema.optional(),
|
|
456
429
|
metadata: MintlifyMetadataSchema.optional(),
|
|
457
430
|
name: z.string().min(1),
|
|
@@ -459,11 +432,12 @@ export const MintlifyDocsConfigSchema = z
|
|
|
459
432
|
navigation: MintlifyNavigationSchema,
|
|
460
433
|
search: MintlifySearchSchema.optional(),
|
|
461
434
|
seo: DocsSeoSchema.optional(),
|
|
462
|
-
theme: z.string().min(1),
|
|
463
435
|
})
|
|
464
436
|
.strict();
|
|
465
437
|
|
|
466
|
-
export type
|
|
438
|
+
export type DocsConfig = z.infer<typeof DocsConfigSchema>;
|
|
439
|
+
export const MintlifyDocsConfigSchema = DocsConfigSchema;
|
|
440
|
+
export type MintlifyDocsConfig = DocsConfig;
|
|
467
441
|
|
|
468
442
|
export const ContentTypeSchema = z.enum([
|
|
469
443
|
"site",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blob-source.d.ts","sourceRoot":"","sources":["../src/blob-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA8C5E,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,eAAe,CAAC,CAA+B;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAKlD,OAAO,CAAC,eAAe;YAaT,YAAY;IA2BpB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAc/C,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"blob-source.d.ts","sourceRoot":"","sources":["../src/blob-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA8C5E,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,eAAe,CAAC,CAA+B;gBAE3C,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAKlD,OAAO,CAAC,eAAe;YAaT,YAAY;IA2BpB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAc/C,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAe/C,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9C,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAKxD,eAAe,CACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;CAuBrC;AAED,eAAO,MAAM,gBAAgB,GAC3B,aAAa,MAAM,EACnB,WAAW,MAAM,KAChB,aAA6D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { normalizePath } from "@repo/common";
|
|
2
|
+
import { normalizePath, shouldIgnoreRootDocsFile } from "@repo/common";
|
|
3
3
|
const isRecord = (value) => typeof value === "object" && value !== null;
|
|
4
4
|
const isBlobManifest = (value) => {
|
|
5
5
|
if (!isRecord(value) || !Array.isArray(value.files)) {
|
|
@@ -72,7 +72,12 @@ export class BlobContentSource {
|
|
|
72
72
|
async listFiles(directory) {
|
|
73
73
|
const manifest = await this.loadManifest();
|
|
74
74
|
const prefix = normalizeDirectory(directory);
|
|
75
|
-
const files = [...manifest.keys()].filter((file) =>
|
|
75
|
+
const files = [...manifest.keys()].filter((file) => {
|
|
76
|
+
if (shouldIgnoreRootDocsFile(file)) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
return prefix ? file.startsWith(prefix) : true;
|
|
80
|
+
});
|
|
76
81
|
// oxlint-disable-next-line eslint-plugin-unicorn/no-array-sort
|
|
77
82
|
files.sort();
|
|
78
83
|
return files;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-source.d.ts","sourceRoot":"","sources":["../src/fs-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"fs-source.d.ts","sourceRoot":"","sources":["../src/fs-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4DzD,qBAAa,eAAgB,YAAW,aAAa;IACnD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;gBAElB,IAAI,EAAE,MAAM;IAIlB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAO/C,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAI/C,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAapD,UAAU,IAAI,MAAM,GAAG,IAAI;CAG5B;AAED,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,KAAG,aACnB,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { normalizePath } from "@repo/common";
|
|
3
|
+
import { normalizePath, shouldIgnoreRootDocsFile } from "@repo/common";
|
|
4
4
|
const IGNORED_DIRECTORIES = new Set(["app", "lib", "node_modules", "public"]);
|
|
5
|
-
const IGNORED_ROOT_FILES = new Set(["AGENTS.md", "README.md"]);
|
|
6
5
|
const isNotFoundError = (error) => Boolean(error &&
|
|
7
6
|
typeof error === "object" &&
|
|
8
7
|
"code" in error &&
|
|
@@ -33,7 +32,7 @@ const walkFiles = async (directory, prefix) => {
|
|
|
33
32
|
continue;
|
|
34
33
|
}
|
|
35
34
|
if (entry.isFile()) {
|
|
36
|
-
if (!prefix &&
|
|
35
|
+
if (!prefix && shouldIgnoreRootDocsFile(entry.name)) {
|
|
37
36
|
continue;
|
|
38
37
|
}
|
|
39
38
|
files.push(normalizePath(relativePath));
|