blodemd 0.0.15 → 0.2.0
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 +26 -1
- package/dist/cli.mjs +217 -217
- package/dist/cli.mjs.map +1 -1
- package/package.json +3 -36
- package/dev-server/app/[[...slug]]/page.tsx +0 -140
- package/dev-server/app/blodemd-dev/invalidate/route.ts +0 -12
- package/dev-server/app/blodemd-dev/static/[...path]/route.ts +0 -32
- package/dev-server/app/blodemd-dev/version/route.ts +0 -14
- package/dev-server/app/blodemd-internal/proxy/route.ts +0 -86
- package/dev-server/app/error.tsx +0 -24
- package/dev-server/app/favicon.ico +0 -0
- package/dev-server/app/globals.css +0 -4
- package/dev-server/app/layout.tsx +0 -38
- package/dev-server/app/not-found.tsx +0 -18
- package/dev-server/app/search/route.ts +0 -17
- package/dev-server/components/dev-reload-script.tsx +0 -86
- package/dev-server/components/providers.tsx +0 -15
- package/dev-server/lib/dev-state.ts +0 -8
- package/dev-server/lib/local-content-source.ts +0 -103
- package/dev-server/lib/local-runtime.tsx +0 -555
- package/dev-server/next-env.d.ts +0 -5
- package/dev-server/next.config.js +0 -54
- package/dev-server/package.json +0 -61
- package/dev-server/postcss.config.mjs +0 -7
- package/dev-server/public/glide-variable.woff2 +0 -0
- package/dev-server/tsconfig.json +0 -50
- package/docs/app/globals.css +0 -471
- package/docs/components/animate-ui/primitives/buttons/button.tsx +0 -14
- package/docs/components/api/api-playground.tsx +0 -467
- package/docs/components/api/api-reference.tsx +0 -157
- package/docs/components/content/collection-index.tsx +0 -114
- package/docs/components/docs/contextual-menu.tsx +0 -495
- package/docs/components/docs/copy-page-menu.tsx +0 -364
- package/docs/components/docs/doc-header.tsx +0 -223
- package/docs/components/docs/doc-shell.tsx +0 -355
- package/docs/components/docs/doc-sidebar.tsx +0 -256
- package/docs/components/docs/doc-toc.tsx +0 -46
- package/docs/components/docs/mobile-nav.tsx +0 -195
- package/docs/components/docs/sidebar-active-highlight.tsx +0 -34
- package/docs/components/docs/sidebar-scroll-area.tsx +0 -63
- package/docs/components/git/repo-picker.tsx +0 -529
- package/docs/components/icons/doc-icon.tsx +0 -96
- package/docs/components/mdx/accordion.tsx +0 -83
- package/docs/components/mdx/agent-instructions.tsx +0 -17
- package/docs/components/mdx/badge.tsx +0 -79
- package/docs/components/mdx/callout.tsx +0 -88
- package/docs/components/mdx/card.tsx +0 -110
- package/docs/components/mdx/code-block.tsx +0 -80
- package/docs/components/mdx/code-group.tsx +0 -203
- package/docs/components/mdx/color.tsx +0 -87
- package/docs/components/mdx/columns.tsx +0 -25
- package/docs/components/mdx/expandable.tsx +0 -45
- package/docs/components/mdx/field-layout.tsx +0 -77
- package/docs/components/mdx/frame.tsx +0 -23
- package/docs/components/mdx/get-text-content.ts +0 -18
- package/docs/components/mdx/icon.tsx +0 -12
- package/docs/components/mdx/iframe.tsx +0 -62
- package/docs/components/mdx/index.tsx +0 -121
- package/docs/components/mdx/installer.tsx +0 -20
- package/docs/components/mdx/panel.tsx +0 -11
- package/docs/components/mdx/param-field.tsx +0 -56
- package/docs/components/mdx/preview.tsx +0 -36
- package/docs/components/mdx/prompt.tsx +0 -63
- package/docs/components/mdx/request-example.tsx +0 -27
- package/docs/components/mdx/response-field.tsx +0 -42
- package/docs/components/mdx/steps.tsx +0 -92
- package/docs/components/mdx/tabs.tsx +0 -193
- package/docs/components/mdx/tile.tsx +0 -43
- package/docs/components/mdx/tooltip.tsx +0 -71
- package/docs/components/mdx/tree.tsx +0 -120
- package/docs/components/mdx/type-table.tsx +0 -71
- package/docs/components/mdx/update.tsx +0 -44
- package/docs/components/mdx/video.tsx +0 -45
- package/docs/components/mdx/view.tsx +0 -66
- package/docs/components/posthog-provider.tsx +0 -42
- package/docs/components/providers.tsx +0 -15
- package/docs/components/tenant-analytics.tsx +0 -49
- package/docs/components/third-parties.tsx +0 -32
- package/docs/components/ui/badge.tsx +0 -61
- package/docs/components/ui/breadcrumb.tsx +0 -112
- package/docs/components/ui/button-group.tsx +0 -83
- package/docs/components/ui/button.tsx +0 -65
- package/docs/components/ui/card.tsx +0 -92
- package/docs/components/ui/command.tsx +0 -167
- package/docs/components/ui/copy-button.tsx +0 -129
- package/docs/components/ui/dialog.tsx +0 -146
- package/docs/components/ui/field.tsx +0 -237
- package/docs/components/ui/input.tsx +0 -23
- package/docs/components/ui/kbd.tsx +0 -98
- package/docs/components/ui/label.tsx +0 -22
- package/docs/components/ui/morph-icon.tsx +0 -79
- package/docs/components/ui/popover.tsx +0 -267
- package/docs/components/ui/search-dialog.tsx +0 -431
- package/docs/components/ui/search.tsx +0 -101
- package/docs/components/ui/separator.tsx +0 -26
- package/docs/components/ui/sheet.tsx +0 -133
- package/docs/components/ui/sidebar.tsx +0 -758
- package/docs/components/ui/skeleton.tsx +0 -11
- package/docs/components/ui/switch.tsx +0 -32
- package/docs/components/ui/tabs.tsx +0 -138
- package/docs/components/ui/theme-toggle.tsx +0 -62
- package/docs/components/ui/tooltip.tsx +0 -53
- package/docs/components/web-mcp.tsx +0 -115
- package/docs/lib/agent-skills.ts +0 -48
- package/docs/lib/api-client.ts +0 -72
- package/docs/lib/config.ts +0 -6
- package/docs/lib/content-root.ts +0 -33
- package/docs/lib/content-source.ts +0 -70
- package/docs/lib/contextual-options.ts +0 -222
- package/docs/lib/dashboard-session.ts +0 -167
- package/docs/lib/db.ts +0 -13
- package/docs/lib/docs-collection.ts +0 -7
- package/docs/lib/docs-runtime.tsx +0 -745
- package/docs/lib/edge-config.ts +0 -95
- package/docs/lib/env.ts +0 -23
- package/docs/lib/etag.ts +0 -22
- package/docs/lib/github-install.ts +0 -33
- package/docs/lib/llms-full.ts +0 -82
- package/docs/lib/marketing-markdown.ts +0 -79
- package/docs/lib/marketing-site.ts +0 -31
- package/docs/lib/mdx.ts +0 -98
- package/docs/lib/navigation.ts +0 -288
- package/docs/lib/openapi-proxy.ts +0 -88
- package/docs/lib/openapi.ts +0 -158
- package/docs/lib/platform-config.ts +0 -6
- package/docs/lib/project-authz.ts +0 -46
- package/docs/lib/routes.ts +0 -103
- package/docs/lib/server-cache.ts +0 -83
- package/docs/lib/shiki.ts +0 -44
- package/docs/lib/supabase.ts +0 -37
- package/docs/lib/tenancy.ts +0 -364
- package/docs/lib/tenant-headers.ts +0 -43
- package/docs/lib/tenant-static.ts +0 -705
- package/docs/lib/tenant-utility-context.ts +0 -62
- package/docs/lib/tenants.ts +0 -72
- package/docs/lib/theme.ts +0 -29
- package/docs/lib/time-ago.ts +0 -24
- package/docs/lib/toc.ts +0 -2
- package/docs/lib/use-mobile.ts +0 -19
- package/docs/lib/use-tab-observer.ts +0 -71
- package/docs/lib/utils.ts +0 -5
- package/packages/@repo/common/dist/index.d.ts +0 -16
- package/packages/@repo/common/dist/index.d.ts.map +0 -1
- package/packages/@repo/common/dist/index.js +0 -84
- package/packages/@repo/common/package.json +0 -34
- package/packages/@repo/common/src/index.ts +0 -101
- package/packages/@repo/contracts/dist/analytics.d.ts +0 -21
- package/packages/@repo/contracts/dist/analytics.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/analytics.js +0 -18
- package/packages/@repo/contracts/dist/dates.d.ts +0 -4
- package/packages/@repo/contracts/dist/dates.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/dates.js +0 -2
- package/packages/@repo/contracts/dist/deployment.d.ts +0 -71
- package/packages/@repo/contracts/dist/deployment.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/deployment.js +0 -46
- package/packages/@repo/contracts/dist/domain.d.ts +0 -94
- package/packages/@repo/contracts/dist/domain.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/domain.js +0 -36
- package/packages/@repo/contracts/dist/git.d.ts +0 -28
- package/packages/@repo/contracts/dist/git.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/git.js +0 -24
- package/packages/@repo/contracts/dist/ids.d.ts +0 -14
- package/packages/@repo/contracts/dist/ids.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/ids.js +0 -11
- package/packages/@repo/contracts/dist/index.d.ts +0 -11
- package/packages/@repo/contracts/dist/index.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/index.js +0 -12
- package/packages/@repo/contracts/dist/pagination.d.ts +0 -23
- package/packages/@repo/contracts/dist/pagination.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/pagination.js +0 -15
- package/packages/@repo/contracts/dist/project.d.ts +0 -42
- package/packages/@repo/contracts/dist/project.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/project.js +0 -25
- package/packages/@repo/contracts/dist/tenant.d.ts +0 -147
- package/packages/@repo/contracts/dist/tenant.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/tenant.js +0 -58
- package/packages/@repo/contracts/dist/user.d.ts +0 -9
- package/packages/@repo/contracts/dist/user.d.ts.map +0 -1
- package/packages/@repo/contracts/dist/user.js +0 -9
- package/packages/@repo/contracts/package.json +0 -37
- package/packages/@repo/contracts/src/analytics.ts +0 -33
- package/packages/@repo/contracts/src/dates.ts +0 -4
- package/packages/@repo/contracts/src/deployment.ts +0 -73
- package/packages/@repo/contracts/src/domain.ts +0 -51
- package/packages/@repo/contracts/src/git.ts +0 -31
- package/packages/@repo/contracts/src/ids.ts +0 -23
- package/packages/@repo/contracts/src/index.ts +0 -12
- package/packages/@repo/contracts/src/pagination.ts +0 -21
- package/packages/@repo/contracts/src/project.ts +0 -32
- package/packages/@repo/contracts/src/tenant.ts +0 -94
- package/packages/@repo/contracts/src/user.ts +0 -12
- package/packages/@repo/models/dist/docs-config.d.ts +0 -961
- package/packages/@repo/models/dist/docs-config.d.ts.map +0 -1
- package/packages/@repo/models/dist/docs-config.js +0 -531
- package/packages/@repo/models/dist/index.d.ts +0 -3
- package/packages/@repo/models/dist/index.d.ts.map +0 -1
- package/packages/@repo/models/dist/index.js +0 -3
- package/packages/@repo/models/dist/tenant.d.ts +0 -37
- package/packages/@repo/models/dist/tenant.d.ts.map +0 -1
- package/packages/@repo/models/dist/tenant.js +0 -1
- package/packages/@repo/models/package.json +0 -37
- package/packages/@repo/models/src/docs-config.ts +0 -629
- package/packages/@repo/models/src/index.ts +0 -3
- package/packages/@repo/models/src/tenant.ts +0 -44
- package/packages/@repo/prebuild/dist/index.d.ts +0 -2
- package/packages/@repo/prebuild/dist/index.d.ts.map +0 -1
- package/packages/@repo/prebuild/dist/index.js +0 -2
- package/packages/@repo/prebuild/dist/openapi.d.ts +0 -43
- package/packages/@repo/prebuild/dist/openapi.d.ts.map +0 -1
- package/packages/@repo/prebuild/dist/openapi.js +0 -86
- package/packages/@repo/prebuild/package.json +0 -39
- package/packages/@repo/prebuild/src/index.ts +0 -2
- package/packages/@repo/prebuild/src/openapi.ts +0 -154
- package/packages/@repo/previewing/dist/blob-source.d.ts +0 -16
- package/packages/@repo/previewing/dist/blob-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/blob-source.js +0 -128
- package/packages/@repo/previewing/dist/config-loader.d.ts +0 -134
- package/packages/@repo/previewing/dist/config-loader.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/config-loader.js +0 -231
- package/packages/@repo/previewing/dist/constants.d.ts +0 -15
- package/packages/@repo/previewing/dist/constants.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/constants.js +0 -14
- package/packages/@repo/previewing/dist/content-index.d.ts +0 -7
- package/packages/@repo/previewing/dist/content-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/content-index.js +0 -291
- package/packages/@repo/previewing/dist/content-source.d.ts +0 -12
- package/packages/@repo/previewing/dist/content-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/content-source.js +0 -1
- package/packages/@repo/previewing/dist/fs-source.d.ts +0 -11
- package/packages/@repo/previewing/dist/fs-source.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/fs-source.js +0 -71
- package/packages/@repo/previewing/dist/index.d.ts +0 -16
- package/packages/@repo/previewing/dist/index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/index.js +0 -13
- package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts +0 -3
- package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/agent-markdown.js +0 -176
- package/packages/@repo/previewing/dist/markdown/format.d.ts +0 -8
- package/packages/@repo/previewing/dist/markdown/format.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/format.js +0 -43
- package/packages/@repo/previewing/dist/markdown/links.d.ts +0 -3
- package/packages/@repo/previewing/dist/markdown/links.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/markdown/links.js +0 -31
- package/packages/@repo/previewing/dist/openapi-pages.d.ts +0 -7
- package/packages/@repo/previewing/dist/openapi-pages.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/openapi-pages.js +0 -200
- package/packages/@repo/previewing/dist/search-index.d.ts +0 -4
- package/packages/@repo/previewing/dist/search-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/search-index.js +0 -23
- package/packages/@repo/previewing/dist/serialization.d.ts +0 -13
- package/packages/@repo/previewing/dist/serialization.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/serialization.js +0 -108
- package/packages/@repo/previewing/dist/toc-index.d.ts +0 -5
- package/packages/@repo/previewing/dist/toc-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/toc-index.js +0 -53
- package/packages/@repo/previewing/dist/types.d.ts +0 -92
- package/packages/@repo/previewing/dist/types.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/types.js +0 -1
- package/packages/@repo/previewing/dist/utility-index.d.ts +0 -7
- package/packages/@repo/previewing/dist/utility-index.d.ts.map +0 -1
- package/packages/@repo/previewing/dist/utility-index.js +0 -201
- package/packages/@repo/previewing/package.json +0 -41
- package/packages/@repo/previewing/src/blob-source.ts +0 -185
- package/packages/@repo/previewing/src/config-loader.ts +0 -316
- package/packages/@repo/previewing/src/constants.ts +0 -16
- package/packages/@repo/previewing/src/content-index.ts +0 -384
- package/packages/@repo/previewing/src/content-source.ts +0 -12
- package/packages/@repo/previewing/src/fs-source.ts +0 -103
- package/packages/@repo/previewing/src/index.ts +0 -71
- package/packages/@repo/previewing/src/markdown/agent-markdown.ts +0 -254
- package/packages/@repo/previewing/src/markdown/format.ts +0 -63
- package/packages/@repo/previewing/src/markdown/links.ts +0 -46
- package/packages/@repo/previewing/src/openapi-pages.ts +0 -319
- package/packages/@repo/previewing/src/search-index.ts +0 -38
- package/packages/@repo/previewing/src/serialization.ts +0 -191
- package/packages/@repo/previewing/src/toc-index.ts +0 -72
- package/packages/@repo/previewing/src/types.ts +0 -105
- package/packages/@repo/previewing/src/utility-index.ts +0 -304
- package/packages/@repo/validation/dist/index.d.ts +0 -12
- package/packages/@repo/validation/dist/index.d.ts.map +0 -1
- package/packages/@repo/validation/dist/index.js +0 -30
- package/packages/@repo/validation/package.json +0 -38
- package/packages/@repo/validation/src/blodemd-docs-schema.json +0 -3575
- package/packages/@repo/validation/src/index.ts +0 -59
- package/scripts/prepare-package.mjs +0 -53
- package/scripts/repo-packages.mjs +0 -8
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export interface OpenApiServer {
|
|
2
|
-
url: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface OpenApiSpec {
|
|
6
|
-
openapi?: string;
|
|
7
|
-
info?: {
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
};
|
|
11
|
-
servers?: OpenApiServer[];
|
|
12
|
-
paths?: Record<string, Record<string, OpenApiOperationSpec>>;
|
|
13
|
-
components?: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export interface OpenApiOperationSpec {
|
|
16
|
-
operationId?: string;
|
|
17
|
-
summary?: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
tags?: string[];
|
|
20
|
-
parameters?: Record<string, unknown>[];
|
|
21
|
-
requestBody?: Record<string, unknown>;
|
|
22
|
-
responses?: Record<string, unknown>;
|
|
23
|
-
}
|
|
24
|
-
export interface OpenApiOperation {
|
|
25
|
-
id: string;
|
|
26
|
-
method: string;
|
|
27
|
-
path: string;
|
|
28
|
-
summary?: string;
|
|
29
|
-
description?: string;
|
|
30
|
-
tags: string[];
|
|
31
|
-
parameters: Record<string, unknown>[];
|
|
32
|
-
requestBody?: Record<string, unknown>;
|
|
33
|
-
responses?: Record<string, unknown>;
|
|
34
|
-
}
|
|
35
|
-
export declare const parseOpenApiSpec: (raw: string, sourcePath?: string) => OpenApiSpec;
|
|
36
|
-
export declare const loadOpenApiSpec: (absolutePath: string) => Promise<OpenApiSpec>;
|
|
37
|
-
export declare const openApiIdentifier: (method: string, routePath: string) => string;
|
|
38
|
-
export declare const openApiSlug: (method: string, routePath: string, directory?: string) => string;
|
|
39
|
-
export declare const extractOpenApiOperations: (spec: OpenApiSpec, directory?: string) => {
|
|
40
|
-
bySlug: Map<string, OpenApiOperation>;
|
|
41
|
-
operations: OpenApiOperation[];
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../src/openapi.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAmBD,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,mBAAe,KAAG,WAgB/D,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,cAAc,MAAM,KACnB,OAAO,CAAC,WAAW,CACmD,CAAC;AAE1E,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,WAAW,MAAM,WAC3B,CAAC;AAEzC,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,WAAW,MAAM,EACjB,kBAAiB,WAUlB,CAAC;AAgBF,eAAO,MAAM,wBAAwB,GACnC,MAAM,WAAW,EACjB,YAAY,MAAM;;;CAsCnB,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { normalizePath, slugify } from "@repo/common";
|
|
4
|
-
import YAML from "yaml";
|
|
5
|
-
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
-
// A YAML/JSON document can parse to a scalar, null, or array — none of which
|
|
7
|
-
// are usable as an OpenAPI spec. Validate the shape before the cast so callers
|
|
8
|
-
// fail with a clear message instead of crashing while iterating `paths`.
|
|
9
|
-
const asOpenApiSpec = (value, sourcePath) => {
|
|
10
|
-
const label = sourcePath ? ` (${sourcePath})` : "";
|
|
11
|
-
if (!isRecord(value)) {
|
|
12
|
-
throw new Error(`OpenAPI spec${label} must be an object.`);
|
|
13
|
-
}
|
|
14
|
-
if (value.paths !== undefined && !isRecord(value.paths)) {
|
|
15
|
-
throw new Error(`OpenAPI spec${label} has an invalid "paths" section.`);
|
|
16
|
-
}
|
|
17
|
-
return value;
|
|
18
|
-
};
|
|
19
|
-
export const parseOpenApiSpec = (raw, sourcePath = "") => {
|
|
20
|
-
const ext = path.extname(sourcePath).toLowerCase();
|
|
21
|
-
if (ext === ".json") {
|
|
22
|
-
return asOpenApiSpec(JSON.parse(raw), sourcePath);
|
|
23
|
-
}
|
|
24
|
-
if (ext === ".yaml" || ext === ".yml") {
|
|
25
|
-
return asOpenApiSpec(YAML.parse(raw), sourcePath);
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
return asOpenApiSpec(JSON.parse(raw), sourcePath);
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
return asOpenApiSpec(YAML.parse(raw), sourcePath);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
export const loadOpenApiSpec = async (absolutePath) => parseOpenApiSpec(await fs.readFile(absolutePath, "utf8"), absolutePath);
|
|
35
|
-
export const openApiIdentifier = (method, routePath) => `${method.toUpperCase()} ${routePath}`;
|
|
36
|
-
export const openApiSlug = (method, routePath, directory = "api") => {
|
|
37
|
-
const normalized = normalizePath(routePath)
|
|
38
|
-
.split("/")
|
|
39
|
-
.map((segment) => segment.replaceAll(/[{}]/g, ""))
|
|
40
|
-
.filter(Boolean)
|
|
41
|
-
.join("-");
|
|
42
|
-
const base = normalized.length ? normalized : "root";
|
|
43
|
-
const slug = slugify(`${method.toLowerCase()}-${base}`);
|
|
44
|
-
return normalizePath(path.join(directory, slug));
|
|
45
|
-
};
|
|
46
|
-
const HTTP_METHODS = new Set([
|
|
47
|
-
"delete",
|
|
48
|
-
"get",
|
|
49
|
-
"head",
|
|
50
|
-
"options",
|
|
51
|
-
"patch",
|
|
52
|
-
"post",
|
|
53
|
-
"put",
|
|
54
|
-
"trace",
|
|
55
|
-
]);
|
|
56
|
-
const isOperationObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
57
|
-
export const extractOpenApiOperations = (spec, directory) => {
|
|
58
|
-
const ops = [];
|
|
59
|
-
const paths = spec.paths ?? {};
|
|
60
|
-
for (const [routePath, methods] of Object.entries(paths)) {
|
|
61
|
-
for (const [method, operation] of Object.entries(methods)) {
|
|
62
|
-
if (!(HTTP_METHODS.has(method.toLowerCase()) && isOperationObject(operation))) {
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
const upper = method.toUpperCase();
|
|
66
|
-
const id = operation.operationId ?? openApiIdentifier(upper, routePath);
|
|
67
|
-
ops.push({
|
|
68
|
-
description: operation.description,
|
|
69
|
-
id,
|
|
70
|
-
method: upper,
|
|
71
|
-
parameters: operation.parameters ?? [],
|
|
72
|
-
path: routePath,
|
|
73
|
-
requestBody: operation.requestBody,
|
|
74
|
-
responses: operation.responses,
|
|
75
|
-
summary: operation.summary,
|
|
76
|
-
tags: operation.tags ?? [],
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
const map = new Map();
|
|
81
|
-
for (const op of ops) {
|
|
82
|
-
const slug = openApiSlug(op.method, op.path, directory);
|
|
83
|
-
map.set(slug, op);
|
|
84
|
-
}
|
|
85
|
-
return { bySlug: map, operations: ops };
|
|
86
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@repo/prebuild",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.d.ts",
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./openapi": {
|
|
14
|
-
"types": "./dist/openapi.d.d.ts",
|
|
15
|
-
"import": "./dist/openapi.js",
|
|
16
|
-
"default": "./dist/openapi.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "rm -rf dist && tsc",
|
|
21
|
-
"check-types": "tsc --noEmit",
|
|
22
|
-
"lint": "oxlint .",
|
|
23
|
-
"lint:fix": "oxlint --fix .",
|
|
24
|
-
"format": "oxfmt --write .",
|
|
25
|
-
"format:check": "oxfmt ."
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@repo/common": "*",
|
|
29
|
-
"yaml": "^2.8.3"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@repo/typescript-config": "*",
|
|
33
|
-
"@types/node": "^24.12.2",
|
|
34
|
-
"oxfmt": "^0.42.0",
|
|
35
|
-
"oxlint": "^1.57.0",
|
|
36
|
-
"typescript": "6.0.2",
|
|
37
|
-
"ultracite": "^7.3.2"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
import { normalizePath, slugify } from "@repo/common";
|
|
5
|
-
import YAML from "yaml";
|
|
6
|
-
|
|
7
|
-
export interface OpenApiServer {
|
|
8
|
-
url: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface OpenApiSpec {
|
|
13
|
-
openapi?: string;
|
|
14
|
-
info?: { title?: string; description?: string };
|
|
15
|
-
servers?: OpenApiServer[];
|
|
16
|
-
paths?: Record<string, Record<string, OpenApiOperationSpec>>;
|
|
17
|
-
components?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface OpenApiOperationSpec {
|
|
21
|
-
operationId?: string;
|
|
22
|
-
summary?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
tags?: string[];
|
|
25
|
-
parameters?: Record<string, unknown>[];
|
|
26
|
-
requestBody?: Record<string, unknown>;
|
|
27
|
-
responses?: Record<string, unknown>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface OpenApiOperation {
|
|
31
|
-
id: string;
|
|
32
|
-
method: string;
|
|
33
|
-
path: string;
|
|
34
|
-
summary?: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
tags: string[];
|
|
37
|
-
parameters: Record<string, unknown>[];
|
|
38
|
-
requestBody?: Record<string, unknown>;
|
|
39
|
-
responses?: Record<string, unknown>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const isRecord = (value: unknown): value is Record<string, unknown> =>
|
|
43
|
-
typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44
|
-
|
|
45
|
-
// A YAML/JSON document can parse to a scalar, null, or array — none of which
|
|
46
|
-
// are usable as an OpenAPI spec. Validate the shape before the cast so callers
|
|
47
|
-
// fail with a clear message instead of crashing while iterating `paths`.
|
|
48
|
-
const asOpenApiSpec = (value: unknown, sourcePath: string): OpenApiSpec => {
|
|
49
|
-
const label = sourcePath ? ` (${sourcePath})` : "";
|
|
50
|
-
if (!isRecord(value)) {
|
|
51
|
-
throw new Error(`OpenAPI spec${label} must be an object.`);
|
|
52
|
-
}
|
|
53
|
-
if (value.paths !== undefined && !isRecord(value.paths)) {
|
|
54
|
-
throw new Error(`OpenAPI spec${label} has an invalid "paths" section.`);
|
|
55
|
-
}
|
|
56
|
-
return value as OpenApiSpec;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const parseOpenApiSpec = (raw: string, sourcePath = ""): OpenApiSpec => {
|
|
60
|
-
const ext = path.extname(sourcePath).toLowerCase();
|
|
61
|
-
|
|
62
|
-
if (ext === ".json") {
|
|
63
|
-
return asOpenApiSpec(JSON.parse(raw), sourcePath);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (ext === ".yaml" || ext === ".yml") {
|
|
67
|
-
return asOpenApiSpec(YAML.parse(raw), sourcePath);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
try {
|
|
71
|
-
return asOpenApiSpec(JSON.parse(raw), sourcePath);
|
|
72
|
-
} catch {
|
|
73
|
-
return asOpenApiSpec(YAML.parse(raw), sourcePath);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const loadOpenApiSpec = async (
|
|
78
|
-
absolutePath: string
|
|
79
|
-
): Promise<OpenApiSpec> =>
|
|
80
|
-
parseOpenApiSpec(await fs.readFile(absolutePath, "utf8"), absolutePath);
|
|
81
|
-
|
|
82
|
-
export const openApiIdentifier = (method: string, routePath: string) =>
|
|
83
|
-
`${method.toUpperCase()} ${routePath}`;
|
|
84
|
-
|
|
85
|
-
export const openApiSlug = (
|
|
86
|
-
method: string,
|
|
87
|
-
routePath: string,
|
|
88
|
-
directory = "api"
|
|
89
|
-
) => {
|
|
90
|
-
const normalized = normalizePath(routePath)
|
|
91
|
-
.split("/")
|
|
92
|
-
.map((segment) => segment.replaceAll(/[{}]/g, ""))
|
|
93
|
-
.filter(Boolean)
|
|
94
|
-
.join("-");
|
|
95
|
-
const base = normalized.length ? normalized : "root";
|
|
96
|
-
const slug = slugify(`${method.toLowerCase()}-${base}`);
|
|
97
|
-
return normalizePath(path.join(directory, slug));
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const HTTP_METHODS = new Set([
|
|
101
|
-
"delete",
|
|
102
|
-
"get",
|
|
103
|
-
"head",
|
|
104
|
-
"options",
|
|
105
|
-
"patch",
|
|
106
|
-
"post",
|
|
107
|
-
"put",
|
|
108
|
-
"trace",
|
|
109
|
-
]);
|
|
110
|
-
|
|
111
|
-
const isOperationObject = (value: unknown): value is OpenApiOperationSpec =>
|
|
112
|
-
typeof value === "object" && value !== null && !Array.isArray(value);
|
|
113
|
-
|
|
114
|
-
export const extractOpenApiOperations = (
|
|
115
|
-
spec: OpenApiSpec,
|
|
116
|
-
directory?: string
|
|
117
|
-
) => {
|
|
118
|
-
const ops: OpenApiOperation[] = [];
|
|
119
|
-
const paths = spec.paths ?? {};
|
|
120
|
-
|
|
121
|
-
for (const [routePath, methods] of Object.entries(paths)) {
|
|
122
|
-
for (const [method, operation] of Object.entries(methods)) {
|
|
123
|
-
if (
|
|
124
|
-
!(
|
|
125
|
-
HTTP_METHODS.has(method.toLowerCase()) && isOperationObject(operation)
|
|
126
|
-
)
|
|
127
|
-
) {
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
const upper = method.toUpperCase();
|
|
131
|
-
const id = operation.operationId ?? openApiIdentifier(upper, routePath);
|
|
132
|
-
|
|
133
|
-
ops.push({
|
|
134
|
-
description: operation.description,
|
|
135
|
-
id,
|
|
136
|
-
method: upper,
|
|
137
|
-
parameters: operation.parameters ?? [],
|
|
138
|
-
path: routePath,
|
|
139
|
-
requestBody: operation.requestBody,
|
|
140
|
-
responses: operation.responses,
|
|
141
|
-
summary: operation.summary,
|
|
142
|
-
tags: operation.tags ?? [],
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const map = new Map<string, OpenApiOperation>();
|
|
148
|
-
for (const op of ops) {
|
|
149
|
-
const slug = openApiSlug(op.method, op.path, directory);
|
|
150
|
-
map.set(slug, op);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return { bySlug: map, operations: ops };
|
|
154
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CompiledMdxResult, ContentSource } from "./content-source.js";
|
|
2
|
-
export declare class BlobContentSource implements ContentSource {
|
|
3
|
-
private readonly manifestUrl;
|
|
4
|
-
private readonly cacheTag?;
|
|
5
|
-
private manifestPromise?;
|
|
6
|
-
constructor(manifestUrl: string, cacheTag?: string);
|
|
7
|
-
private getFetchOptions;
|
|
8
|
-
private loadManifest;
|
|
9
|
-
readFile(relativePath: string): Promise<string>;
|
|
10
|
-
listFiles(directory: string): Promise<string[]>;
|
|
11
|
-
exists(relativePath: string): Promise<boolean>;
|
|
12
|
-
resolveUrl(relativePath: string): Promise<string | null>;
|
|
13
|
-
readCompiledMdx(relativePath: string): Promise<CompiledMdxResult | null>;
|
|
14
|
-
}
|
|
15
|
-
export declare const createBlobSource: (manifestUrl: string, cacheTag?: string) => ContentSource;
|
|
16
|
-
//# sourceMappingURL=blob-source.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;IA8B/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,128 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { normalizePath, shouldIgnoreRootDocsFile } from "@repo/common";
|
|
3
|
-
const isRecord = (value) => typeof value === "object" && value !== null;
|
|
4
|
-
const isBlobManifest = (value) => {
|
|
5
|
-
if (!isRecord(value) || !Array.isArray(value.files)) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
return value.files.every((file) => {
|
|
9
|
-
if (!isRecord(file)) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
return typeof file.path === "string" && typeof file.url === "string";
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
const normalizeDirectory = (directory) => {
|
|
16
|
-
const normalized = normalizePath(path.posix.normalize(directory));
|
|
17
|
-
if (!normalized || normalized === ".") {
|
|
18
|
-
return "";
|
|
19
|
-
}
|
|
20
|
-
return normalized ? `${normalized}/` : "";
|
|
21
|
-
};
|
|
22
|
-
const normalizeRelativePath = (value) => normalizePath(path.posix.normalize(value));
|
|
23
|
-
export class BlobContentSource {
|
|
24
|
-
manifestUrl;
|
|
25
|
-
cacheTag;
|
|
26
|
-
manifestPromise;
|
|
27
|
-
constructor(manifestUrl, cacheTag) {
|
|
28
|
-
this.manifestUrl = manifestUrl;
|
|
29
|
-
this.cacheTag = cacheTag;
|
|
30
|
-
}
|
|
31
|
-
getFetchOptions() {
|
|
32
|
-
if (!this.cacheTag) {
|
|
33
|
-
return { cache: "no-store" };
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
next: {
|
|
37
|
-
revalidate: 3600,
|
|
38
|
-
tags: [this.cacheTag],
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
async loadManifest() {
|
|
43
|
-
if (!this.manifestPromise) {
|
|
44
|
-
this.manifestPromise = (async () => {
|
|
45
|
-
const response = await fetch(this.manifestUrl, this.getFetchOptions());
|
|
46
|
-
if (!response.ok) {
|
|
47
|
-
throw new Error(`Failed to load deployment manifest: ${response.status}`);
|
|
48
|
-
}
|
|
49
|
-
const manifest = (await response.json());
|
|
50
|
-
if (!isBlobManifest(manifest)) {
|
|
51
|
-
throw new Error("Deployment manifest is invalid.");
|
|
52
|
-
}
|
|
53
|
-
return new Map(manifest.files.map((file) => [
|
|
54
|
-
normalizeRelativePath(file.path),
|
|
55
|
-
file.url,
|
|
56
|
-
]));
|
|
57
|
-
})();
|
|
58
|
-
}
|
|
59
|
-
return await this.manifestPromise;
|
|
60
|
-
}
|
|
61
|
-
async readFile(relativePath) {
|
|
62
|
-
const url = await this.resolveUrl(relativePath);
|
|
63
|
-
if (!url) {
|
|
64
|
-
throw new Error(`Content file "${relativePath}" not found.`);
|
|
65
|
-
}
|
|
66
|
-
const response = await fetch(url, this.getFetchOptions());
|
|
67
|
-
if (!response.ok) {
|
|
68
|
-
throw new Error(`Failed to load content file: ${response.status}`);
|
|
69
|
-
}
|
|
70
|
-
return await response.text();
|
|
71
|
-
}
|
|
72
|
-
async listFiles(directory) {
|
|
73
|
-
const manifest = await this.loadManifest();
|
|
74
|
-
const prefix = normalizeDirectory(directory);
|
|
75
|
-
const files = [];
|
|
76
|
-
for (const file of manifest.keys()) {
|
|
77
|
-
if (prefix && !file.startsWith(prefix)) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
// Return paths relative to the listed directory, matching
|
|
81
|
-
// FsContentSource so callers can join them onto the collection root.
|
|
82
|
-
const relativePath = prefix ? file.slice(prefix.length) : file;
|
|
83
|
-
if (!relativePath) {
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
// Only top-level entries of the listed directory are subject to the
|
|
87
|
-
// root-docs-file ignore list, again matching FsContentSource.
|
|
88
|
-
if (!relativePath.includes("/") &&
|
|
89
|
-
shouldIgnoreRootDocsFile(relativePath)) {
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
files.push(relativePath);
|
|
93
|
-
}
|
|
94
|
-
// oxlint-disable-next-line eslint-plugin-unicorn/no-array-sort
|
|
95
|
-
files.sort();
|
|
96
|
-
return files;
|
|
97
|
-
}
|
|
98
|
-
async exists(relativePath) {
|
|
99
|
-
const manifest = await this.loadManifest();
|
|
100
|
-
return manifest.has(normalizeRelativePath(relativePath));
|
|
101
|
-
}
|
|
102
|
-
async resolveUrl(relativePath) {
|
|
103
|
-
const manifest = await this.loadManifest();
|
|
104
|
-
return manifest.get(normalizeRelativePath(relativePath)) ?? null;
|
|
105
|
-
}
|
|
106
|
-
async readCompiledMdx(relativePath) {
|
|
107
|
-
const compiledPath = `_compiled/${normalizeRelativePath(relativePath)}.json`;
|
|
108
|
-
const url = await this.resolveUrl(compiledPath);
|
|
109
|
-
if (!url) {
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
try {
|
|
113
|
-
const response = await fetch(url, this.getFetchOptions());
|
|
114
|
-
if (!response.ok) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
const data = (await response.json());
|
|
118
|
-
if (!data.compiledSource || data.version !== 1) {
|
|
119
|
-
return null;
|
|
120
|
-
}
|
|
121
|
-
return data;
|
|
122
|
-
}
|
|
123
|
-
catch {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
export const createBlobSource = (manifestUrl, cacheTag) => new BlobContentSource(manifestUrl, cacheTag);
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { SiteConfig } from "@repo/models";
|
|
2
|
-
import type { ContentSource } from "./content-source.js";
|
|
3
|
-
import type { SiteConfigResult } from "./types.js";
|
|
4
|
-
export declare const loadSiteConfig: (source: ContentSource) => Promise<SiteConfigResult>;
|
|
5
|
-
export declare const getDocsCollection: (config: SiteConfig) => {
|
|
6
|
-
id: string;
|
|
7
|
-
type: "site" | "blog" | "docs" | "courses" | "products" | "notes" | "forms" | "sheets" | "slides" | "todos";
|
|
8
|
-
index?: {
|
|
9
|
-
slug: string;
|
|
10
|
-
description?: string | undefined;
|
|
11
|
-
hidden?: boolean | undefined;
|
|
12
|
-
title?: string | undefined;
|
|
13
|
-
} | undefined;
|
|
14
|
-
navigation?: {
|
|
15
|
-
global?: {
|
|
16
|
-
anchors?: {
|
|
17
|
-
href: string;
|
|
18
|
-
label: string;
|
|
19
|
-
}[] | undefined;
|
|
20
|
-
links?: {
|
|
21
|
-
href: string;
|
|
22
|
-
label: string;
|
|
23
|
-
}[] | undefined;
|
|
24
|
-
} | undefined;
|
|
25
|
-
groups?: {
|
|
26
|
-
expanded?: boolean | undefined;
|
|
27
|
-
group?: string | undefined;
|
|
28
|
-
hidden?: boolean | undefined;
|
|
29
|
-
openapi?: string | {
|
|
30
|
-
source: string;
|
|
31
|
-
basePath?: string | undefined;
|
|
32
|
-
directory?: string | undefined;
|
|
33
|
-
include?: string[] | undefined;
|
|
34
|
-
} | undefined;
|
|
35
|
-
pages?: string[] | undefined;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
hidden?: string[] | undefined;
|
|
38
|
-
languages?: {
|
|
39
|
-
label: string;
|
|
40
|
-
url: string;
|
|
41
|
-
locale?: string | undefined;
|
|
42
|
-
}[] | undefined;
|
|
43
|
-
pages?: string[] | undefined;
|
|
44
|
-
tabs?: {
|
|
45
|
-
label: string;
|
|
46
|
-
groups?: {
|
|
47
|
-
expanded?: boolean | undefined;
|
|
48
|
-
group?: string | undefined;
|
|
49
|
-
hidden?: boolean | undefined;
|
|
50
|
-
openapi?: string | {
|
|
51
|
-
source: string;
|
|
52
|
-
basePath?: string | undefined;
|
|
53
|
-
directory?: string | undefined;
|
|
54
|
-
include?: string[] | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
pages?: string[] | undefined;
|
|
57
|
-
}[] | undefined;
|
|
58
|
-
href?: string | undefined;
|
|
59
|
-
icon?: string | undefined;
|
|
60
|
-
pages?: string[] | undefined;
|
|
61
|
-
}[] | undefined;
|
|
62
|
-
versions?: {
|
|
63
|
-
label: string;
|
|
64
|
-
url: string;
|
|
65
|
-
}[] | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
openapi?: string | string[] | {
|
|
68
|
-
source: string;
|
|
69
|
-
basePath?: string | undefined;
|
|
70
|
-
directory?: string | undefined;
|
|
71
|
-
include?: string[] | undefined;
|
|
72
|
-
} | undefined;
|
|
73
|
-
root?: string | undefined;
|
|
74
|
-
slugPrefix?: string | undefined;
|
|
75
|
-
sort?: {
|
|
76
|
-
direction?: "asc" | "desc" | undefined;
|
|
77
|
-
field?: "date" | "title" | "order" | "price" | undefined;
|
|
78
|
-
} | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
export declare const getDocsNavigation: (config: SiteConfig) => {
|
|
81
|
-
global?: {
|
|
82
|
-
anchors?: {
|
|
83
|
-
href: string;
|
|
84
|
-
label: string;
|
|
85
|
-
}[] | undefined;
|
|
86
|
-
links?: {
|
|
87
|
-
href: string;
|
|
88
|
-
label: string;
|
|
89
|
-
}[] | undefined;
|
|
90
|
-
} | undefined;
|
|
91
|
-
groups?: {
|
|
92
|
-
expanded?: boolean | undefined;
|
|
93
|
-
group?: string | undefined;
|
|
94
|
-
hidden?: boolean | undefined;
|
|
95
|
-
openapi?: string | {
|
|
96
|
-
source: string;
|
|
97
|
-
basePath?: string | undefined;
|
|
98
|
-
directory?: string | undefined;
|
|
99
|
-
include?: string[] | undefined;
|
|
100
|
-
} | undefined;
|
|
101
|
-
pages?: string[] | undefined;
|
|
102
|
-
}[] | undefined;
|
|
103
|
-
hidden?: string[] | undefined;
|
|
104
|
-
languages?: {
|
|
105
|
-
label: string;
|
|
106
|
-
url: string;
|
|
107
|
-
locale?: string | undefined;
|
|
108
|
-
}[] | undefined;
|
|
109
|
-
pages?: string[] | undefined;
|
|
110
|
-
tabs?: {
|
|
111
|
-
label: string;
|
|
112
|
-
groups?: {
|
|
113
|
-
expanded?: boolean | undefined;
|
|
114
|
-
group?: string | undefined;
|
|
115
|
-
hidden?: boolean | undefined;
|
|
116
|
-
openapi?: string | {
|
|
117
|
-
source: string;
|
|
118
|
-
basePath?: string | undefined;
|
|
119
|
-
directory?: string | undefined;
|
|
120
|
-
include?: string[] | undefined;
|
|
121
|
-
} | undefined;
|
|
122
|
-
pages?: string[] | undefined;
|
|
123
|
-
}[] | undefined;
|
|
124
|
-
href?: string | undefined;
|
|
125
|
-
icon?: string | undefined;
|
|
126
|
-
pages?: string[] | undefined;
|
|
127
|
-
}[] | undefined;
|
|
128
|
-
versions?: {
|
|
129
|
-
label: string;
|
|
130
|
-
url: string;
|
|
131
|
-
}[] | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
export declare const getDocsCollectionWithNavigation: (config: SiteConfig) => SiteConfig["collections"][number] | undefined;
|
|
134
|
-
//# sourceMappingURL=config-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../src/config-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,cAAc,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAoRnD,eAAO,MAAM,cAAc,GACzB,QAAQ,aAAa,KACpB,OAAO,CAAC,gBAAgB,CAU1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aACiB,CAAC;AAEtE,eAAO,MAAM,iBAAiB,GAAI,QAAQ,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aACQ,CAAC;AAE7D,eAAO,MAAM,+BAA+B,GAC1C,QAAQ,UAAU,KACjB,UAAU,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,GAAG,SAStC,CAAC"}
|