zudoku 0.0.0-df0b125 → 0.0.0-eff6f9b
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/config/config.d.ts +0 -5
- package/dist/config/validators/validate.d.ts +151 -37
- package/dist/config/validators/validate.js +14 -11
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +1 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js +8 -6
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/lib/plugins/markdown/index.js +2 -2
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +3 -3
- package/dist/lib/plugins/openapi/index.js +1 -2
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
- package/dist/vite/plugin-docs.js +7 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-gtf8JS3V.js} +2 -2
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-gtf8JS3V.js.map} +1 -1
- package/lib/{Input-BR5ia3Yq.js → Input-B1kkVL1R.js} +3 -3
- package/lib/{Input-BR5ia3Yq.js.map → Input-B1kkVL1R.js.map} +1 -1
- package/lib/{MdxPage-BZyQsH8Z.js → MdxPage-BcftTg5g.js} +2 -2
- package/lib/{MdxPage-BZyQsH8Z.js.map → MdxPage-BcftTg5g.js.map} +1 -1
- package/lib/{OperationList-BAOaUAni.js → OperationList-Da36LrGl.js} +5 -5
- package/lib/{OperationList-BAOaUAni.js.map → OperationList-Da36LrGl.js.map} +1 -1
- package/lib/{Route-KYwufmmO.js → Route-CWj1ECzh.js} +2 -2
- package/lib/{Route-KYwufmmO.js.map → Route-CWj1ECzh.js.map} +1 -1
- package/lib/{SidebarBadge-BaUICQiz.js → SidebarBadge-DdvT2qep.js} +2 -2
- package/lib/{SidebarBadge-BaUICQiz.js.map → SidebarBadge-DdvT2qep.js.map} +1 -1
- package/lib/{ZudokuContext-cr-pTRY1.js → ZudokuContext-em1gHkIY.js} +4 -4
- package/lib/{ZudokuContext-cr-pTRY1.js.map → ZudokuContext-em1gHkIY.js.map} +1 -1
- package/lib/assets/{worker-BvD7B6MG.js → worker-TYRbYl6N.js} +2 -2
- package/lib/assets/{worker-BvD7B6MG.js.map → worker-TYRbYl6N.js.map} +1 -1
- package/lib/{index-WPT1ueCM.js → index-B_9xr661.js} +3 -3
- package/lib/{index-WPT1ueCM.js.map → index-B_9xr661.js.map} +1 -1
- package/lib/{index-CTNlSS40.js → index-BoXX7LeD.js} +2 -2
- package/lib/{index-CTNlSS40.js.map → index-BoXX7LeD.js.map} +1 -1
- package/lib/{index-Czh7v7RH.js → index-DIkaYL-l.js} +415 -416
- package/lib/index-DIkaYL-l.js.map +1 -0
- package/lib/{utils-ByIc_KIM.js → utils-DtEHoAvg.js} +103 -100
- package/lib/utils-DtEHoAvg.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +39 -40
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +246 -246
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +3 -3
- package/lib/zudoku.plugin-markdown.js +18 -15
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -5
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/oas/graphql/index.ts +1 -1
- package/src/lib/plugins/markdown/generateRoutes.tsx +8 -5
- package/src/lib/plugins/markdown/index.tsx +3 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -3
- package/src/lib/plugins/openapi/index.tsx +1 -2
- package/src/lib/plugins/openapi/interfaces.ts +4 -1
- package/lib/index-Czh7v7RH.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
2
|
import { S as x, R as f } from "./SlotletProvider-DJMaOUDs.js";
|
|
3
|
-
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-
|
|
3
|
+
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-B1kkVL1R.js";
|
|
4
4
|
import { a as N, L as u, O as I } from "./index-BG0g4WW0.js";
|
|
5
|
-
import { u as h, a as E, b as S } from "./ZudokuContext-
|
|
6
|
-
import { B as l, m as A } from "./index-
|
|
5
|
+
import { u as h, a as E, b as S } from "./ZudokuContext-em1gHkIY.js";
|
|
6
|
+
import { B as l, m as A } from "./index-BoXX7LeD.js";
|
|
7
7
|
import { D as C } from "./DeveloperHint-FBb2uXJe.js";
|
|
8
8
|
import { RotateCwIcon as P, TrashIcon as D, EyeOffIcon as R, EyeIcon as q, CheckIcon as O, CopyIcon as z } from "lucide-react";
|
|
9
9
|
import { useState as p } from "react";
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { j as u } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
const x = (t, e, n) => Object.entries(t).flatMap(([a, p]) => {
|
|
3
|
+
let o = e.split("**")[0];
|
|
4
|
+
o = o.replace("/**", "/");
|
|
5
|
+
const c = new RegExp(`^${o}(.*).mdx?`), r = a.match(c), s = r == null ? void 0 : r.at(1);
|
|
6
|
+
return s ? {
|
|
7
|
+
path: s,
|
|
6
8
|
lazy: async () => {
|
|
7
|
-
const { MdxPage:
|
|
9
|
+
const { MdxPage: i } = await import("./MdxPage-BcftTg5g.js"), { default: m, ...l } = await p();
|
|
8
10
|
return {
|
|
9
|
-
element: /* @__PURE__ */
|
|
10
|
-
|
|
11
|
+
element: /* @__PURE__ */ u.jsx(
|
|
12
|
+
i,
|
|
11
13
|
{
|
|
12
|
-
mdxComponent:
|
|
13
|
-
...
|
|
14
|
-
defaultOptions:
|
|
14
|
+
mdxComponent: m,
|
|
15
|
+
...l,
|
|
16
|
+
defaultOptions: n
|
|
15
17
|
}
|
|
16
18
|
)
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
} : [];
|
|
20
|
-
}),
|
|
22
|
+
}), f = ({
|
|
21
23
|
markdownFiles: t,
|
|
22
|
-
defaultOptions: e
|
|
24
|
+
defaultOptions: e,
|
|
25
|
+
filesPath: n
|
|
23
26
|
}) => ({
|
|
24
|
-
getRoutes: () =>
|
|
27
|
+
getRoutes: () => x(t, n, e)
|
|
25
28
|
});
|
|
26
29
|
export {
|
|
27
|
-
|
|
30
|
+
f as markdownPlugin
|
|
28
31
|
};
|
|
29
32
|
//# sourceMappingURL=zudoku.plugin-markdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-markdown.js","sources":["../src/lib/plugins/markdown/generateRoutes.tsx","../src/lib/plugins/markdown/index.tsx"],"sourcesContent":["import { type RouteObject } from \"react-router-dom\";\n\nimport {\n MarkdownPluginDefaultOptions,\n MarkdownPluginOptions,\n} from \"./index.js\";\n\nexport const generateRoutes = (\n markdownFiles: MarkdownPluginOptions[\"markdownFiles\"],\n defaultOptions?: MarkdownPluginDefaultOptions,\n): RouteObject[] =>\n Object.entries(markdownFiles).flatMap(([file, importPromise]) => {\n
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-markdown.js","sources":["../src/lib/plugins/markdown/generateRoutes.tsx","../src/lib/plugins/markdown/index.tsx"],"sourcesContent":["import { type RouteObject } from \"react-router-dom\";\n\nimport {\n MarkdownPluginDefaultOptions,\n MarkdownPluginOptions,\n} from \"./index.js\";\n\nexport const generateRoutes = (\n markdownFiles: MarkdownPluginOptions[\"markdownFiles\"],\n filesPath: string,\n defaultOptions?: MarkdownPluginDefaultOptions,\n): RouteObject[] =>\n Object.entries(markdownFiles).flatMap(([file, importPromise]) => {\n let rootDir = filesPath.split(\"**\")[0];\n rootDir = rootDir.replace(\"/**\", \"/\");\n const re = new RegExp(`^${rootDir}(.*).mdx?`);\n const match = file.match(re);\n const fsPath = match?.at(1);\n\n if (!fsPath) return [];\n\n return {\n path: fsPath,\n lazy: async () => {\n const { MdxPage } = await import(\"./MdxPage.js\");\n const { default: Component, ...props } = await importPromise();\n return {\n element: (\n <MdxPage\n mdxComponent={Component}\n {...props}\n defaultOptions={defaultOptions}\n />\n ),\n };\n },\n } satisfies RouteObject;\n });\n","import type { Toc } from \"@stefanprobst/rehype-extract-toc\";\nimport type { MDXProps } from \"mdx/types.js\";\nimport type { DevPortalPlugin } from \"../../core/plugins.js\";\nimport { generateRoutes } from \"./generateRoutes.js\";\n\nexport type MarkdownPluginOptions = {\n markdownFiles: Record<string, () => Promise<MDXImport>>;\n defaultOptions?: MarkdownPluginDefaultOptions;\n filesPath: string;\n};\nexport type MarkdownPluginDefaultOptions = Pick<\n Frontmatter,\n \"toc\" | \"disablePager\"\n>;\n\nexport type Frontmatter = {\n title?: string;\n description?: string;\n category?: string;\n toc?: boolean;\n disablePager?: boolean;\n};\n\nexport type MDXImport = {\n tableOfContents: Toc;\n frontmatter: Frontmatter;\n default: (props: MDXProps) => JSX.Element;\n};\n\nexport const markdownPlugin = ({\n markdownFiles,\n defaultOptions,\n filesPath,\n}: MarkdownPluginOptions): DevPortalPlugin => ({\n getRoutes: () => generateRoutes(markdownFiles, filesPath, defaultOptions),\n});\n"],"names":["generateRoutes","markdownFiles","filesPath","defaultOptions","file","importPromise","rootDir","re","match","fsPath","MdxPage","Component","props","jsx","markdownPlugin"],"mappings":";AAOO,MAAMA,IAAiB,CAC5BC,GACAC,GACAC,MAEA,OAAO,QAAQF,CAAa,EAAE,QAAQ,CAAC,CAACG,GAAMC,CAAa,MAAM;AAC/D,MAAIC,IAAUJ,EAAU,MAAM,IAAI,EAAE,CAAC;AAC3B,EAAAI,IAAAA,EAAQ,QAAQ,OAAO,GAAG;AACpC,QAAMC,IAAK,IAAI,OAAO,IAAID,CAAO,WAAW,GACtCE,IAAQJ,EAAK,MAAMG,CAAE,GACrBE,IAASD,KAAA,gBAAAA,EAAO,GAAG;AAErB,SAACC,IAEE;AAAA,IACL,MAAMA;AAAA,IACN,MAAM,YAAY;AAChB,YAAM,EAAE,SAAAC,EAAA,IAAY,MAAM,OAAO,uBAAc,GACzC,EAAE,SAASC,GAAW,GAAGC,EAAM,IAAI,MAAMP;AACxC,aAAA;AAAA,QACL,SACEQ,gBAAAA,EAAA;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,cAAcC;AAAA,YACb,GAAGC;AAAA,YACJ,gBAAAT;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAGN;AAAA,EAAA,IAhBkB;AAkBtB,CAAC,GCRUW,IAAiB,CAAC;AAAA,EAC7B,eAAAb;AAAA,EACA,gBAAAE;AAAA,EACA,WAAAD;AACF,OAA+C;AAAA,EAC7C,WAAW,MAAMF,EAAeC,GAAeC,GAAWC,CAAc;AAC1E;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { o as
|
|
2
|
+
import { o as s } from "./index-DIkaYL-l.js";
|
|
3
3
|
import "./urql-YhcsXYy8.js";
|
|
4
|
-
import "./ZudokuContext-
|
|
4
|
+
import "./ZudokuContext-em1gHkIY.js";
|
|
5
5
|
import "lucide-react";
|
|
6
6
|
import "zudoku/openapi-worker";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-BoXX7LeD.js";
|
|
8
8
|
import "./ErrorPage-knunPbKI.js";
|
|
9
9
|
import "./Markdown-B4aR03g6.js";
|
|
10
|
-
import "./joinPath-B7kNnUX4.js";
|
|
11
10
|
import "./router-D2p7Olpn.js";
|
|
12
11
|
import "./index-BG0g4WW0.js";
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
s as openApiPlugin
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=zudoku.plugin-openapi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-openapi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -422,7 +422,7 @@ const loadOpenAPISchema = async (input: NonNullable<unknown>) => {
|
|
|
422
422
|
};
|
|
423
423
|
|
|
424
424
|
const SchemaSource = builder.enumType("SchemaType", {
|
|
425
|
-
values: ["url", "file"] as const,
|
|
425
|
+
values: ["url", "file", "raw"] as const,
|
|
426
426
|
});
|
|
427
427
|
|
|
428
428
|
builder.queryType({
|
|
@@ -7,17 +7,20 @@ import {
|
|
|
7
7
|
|
|
8
8
|
export const generateRoutes = (
|
|
9
9
|
markdownFiles: MarkdownPluginOptions["markdownFiles"],
|
|
10
|
+
filesPath: string,
|
|
10
11
|
defaultOptions?: MarkdownPluginDefaultOptions,
|
|
11
12
|
): RouteObject[] =>
|
|
12
13
|
Object.entries(markdownFiles).flatMap(([file, importPromise]) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
14
|
+
let rootDir = filesPath.split("**")[0];
|
|
15
|
+
rootDir = rootDir.replace("/**", "/");
|
|
16
|
+
const re = new RegExp(`^${rootDir}(.*).mdx?`);
|
|
17
|
+
const match = file.match(re);
|
|
18
|
+
const fsPath = match?.at(1);
|
|
16
19
|
|
|
17
|
-
if (!
|
|
20
|
+
if (!fsPath) return [];
|
|
18
21
|
|
|
19
22
|
return {
|
|
20
|
-
path,
|
|
23
|
+
path: fsPath,
|
|
21
24
|
lazy: async () => {
|
|
22
25
|
const { MdxPage } = await import("./MdxPage.js");
|
|
23
26
|
const { default: Component, ...props } = await importPromise();
|
|
@@ -6,6 +6,7 @@ import { generateRoutes } from "./generateRoutes.js";
|
|
|
6
6
|
export type MarkdownPluginOptions = {
|
|
7
7
|
markdownFiles: Record<string, () => Promise<MDXImport>>;
|
|
8
8
|
defaultOptions?: MarkdownPluginDefaultOptions;
|
|
9
|
+
filesPath: string;
|
|
9
10
|
};
|
|
10
11
|
export type MarkdownPluginDefaultOptions = Pick<
|
|
11
12
|
Frontmatter,
|
|
@@ -29,6 +30,7 @@ export type MDXImport = {
|
|
|
29
30
|
export const markdownPlugin = ({
|
|
30
31
|
markdownFiles,
|
|
31
32
|
defaultOptions,
|
|
33
|
+
filesPath,
|
|
32
34
|
}: MarkdownPluginOptions): DevPortalPlugin => ({
|
|
33
|
-
getRoutes: () => generateRoutes(markdownFiles, defaultOptions),
|
|
35
|
+
getRoutes: () => generateRoutes(markdownFiles, filesPath, defaultOptions),
|
|
34
36
|
});
|
|
@@ -119,7 +119,7 @@ export type RequestBodyObject = {
|
|
|
119
119
|
export type ResponseItem = {
|
|
120
120
|
__typename?: "ResponseItem";
|
|
121
121
|
content?: Maybe<Array<MediaTypeObject>>;
|
|
122
|
-
description
|
|
122
|
+
description?: Maybe<Scalars["String"]["output"]>;
|
|
123
123
|
headers?: Maybe<Scalars["JSON"]["output"]>;
|
|
124
124
|
links?: Maybe<Scalars["JSON"]["output"]>;
|
|
125
125
|
statusCode: Scalars["String"]["output"];
|
|
@@ -155,7 +155,7 @@ export type SchemaTag = {
|
|
|
155
155
|
operations: Array<OperationItem>;
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
export type SchemaType = "file" | "url";
|
|
158
|
+
export type SchemaType = "file" | "raw" | "url";
|
|
159
159
|
|
|
160
160
|
export type TagItem = {
|
|
161
161
|
__typename?: "TagItem";
|
|
@@ -204,7 +204,7 @@ export type OperationsFragmentFragment = {
|
|
|
204
204
|
__typename?: "ResponseItem";
|
|
205
205
|
statusCode: string;
|
|
206
206
|
links?: any | null;
|
|
207
|
-
description
|
|
207
|
+
description?: string | null;
|
|
208
208
|
content?: Array<{
|
|
209
209
|
__typename?: "MediaTypeObject";
|
|
210
210
|
mediaType: string;
|
|
@@ -16,7 +16,6 @@ import { ErrorPage } from "../../components/ErrorPage.js";
|
|
|
16
16
|
import { ColorMap } from "../../components/navigation/SidebarBadge.js";
|
|
17
17
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
18
18
|
import { Button } from "../../ui/Button.js";
|
|
19
|
-
import { joinPath } from "../../util/joinPath.js";
|
|
20
19
|
import { OasPluginConfig } from "./interfaces.js";
|
|
21
20
|
import type { PlaygroundContentProps } from "./playground/Playground.js";
|
|
22
21
|
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
@@ -73,7 +72,7 @@ export type OpenApiPluginOptions = OasPluginConfig & InternalOasPluginConfig;
|
|
|
73
72
|
export const openApiPlugin = (
|
|
74
73
|
config: OpenApiPluginOptions,
|
|
75
74
|
): DevPortalPlugin => {
|
|
76
|
-
const basePath =
|
|
75
|
+
const basePath = "/reference";
|
|
77
76
|
|
|
78
77
|
const client = config.server
|
|
79
78
|
? new UrqlClient({
|