zudoku 0.23.9 → 0.24.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/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +1 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/lib/components/index.d.ts +17 -13
- package/dist/lib/components/index.js +6 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -1
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.d.ts +1 -0
- package/dist/lib/oas/parser/dereference/index.js +6 -3
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +7 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
- package/dist/vite/dev-server.d.ts +1 -0
- package/dist/vite/dev-server.js +4 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/lib/{AuthenticationPlugin-fB7viE7A.js → AuthenticationPlugin-DVLEc6cm.js} +2 -2
- package/lib/{AuthenticationPlugin-fB7viE7A.js.map → AuthenticationPlugin-DVLEc6cm.js.map} +1 -1
- package/lib/{MdxPage-CPBw4_lf.js → MdxPage-DKMbBROv.js} +2 -2
- package/lib/{MdxPage-CPBw4_lf.js.map → MdxPage-DKMbBROv.js.map} +1 -1
- package/lib/{OperationList-ChQR0IcQ.js → OperationList-CqLL5P5l.js} +574 -568
- package/lib/{OperationList-ChQR0IcQ.js.map → OperationList-CqLL5P5l.js.map} +1 -1
- package/lib/{Route-Ag5MH86N.js → Route-DYwKZ_c_.js} +2 -2
- package/lib/{Route-Ag5MH86N.js.map → Route-DYwKZ_c_.js.map} +1 -1
- package/lib/{Select-D3XuKKuH.js → Select-B_IxRUUC.js} +3 -3
- package/lib/{Select-D3XuKKuH.js.map → Select-B_IxRUUC.js.map} +1 -1
- package/lib/{utils-B4O1uet5.js → ZudokuContext-hmLMUdf2.js} +37 -37
- package/lib/ZudokuContext-hmLMUdf2.js.map +1 -0
- package/lib/assets/{worker-D2kRl-cG.js → worker-DV9Ecqy9.js} +348 -346
- package/lib/assets/{worker-D2kRl-cG.js.map → worker-DV9Ecqy9.js.map} +1 -1
- package/lib/{createServer-69sLlmQA.js → createServer-C4C0OO0m.js} +1250 -1285
- package/lib/createServer-C4C0OO0m.js.map +1 -0
- package/lib/{hook-DgGeo5iL.js → hook-CHq7pFyz.js} +2 -2
- package/lib/{hook-DgGeo5iL.js.map → hook-CHq7pFyz.js.map} +1 -1
- package/lib/index-DyBL--Kz.js +826 -0
- package/lib/index-DyBL--Kz.js.map +1 -0
- package/lib/{index-DtJxZrbj.js → index-DzRORsY1.js} +7 -7
- package/lib/{index-DtJxZrbj.js.map → index-DzRORsY1.js.map} +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +173 -172
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +1 -1
- package/lib/zudoku.plugin-api-keys.js +3 -3
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/package.json +3 -3
- package/src/lib/components/index.ts +7 -3
- package/src/lib/components/navigation/SidebarItem.tsx +1 -1
- package/src/lib/oas/parser/dereference/index.ts +9 -4
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +25 -1
- package/lib/createServer-69sLlmQA.js.map +0 -1
- package/lib/object_hash-BNWPnMN9.js +0 -787
- package/lib/object_hash-BNWPnMN9.js.map +0 -1
- package/lib/utils-B4O1uet5.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-Dx-03ztt.js";
|
|
2
2
|
import { s as j } from "./index-LNp6rxyU.js";
|
|
3
|
-
import { u as b } from "./
|
|
3
|
+
import { u as b } from "./ZudokuContext-hmLMUdf2.js";
|
|
4
4
|
import { b as y } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
5
5
|
import { Head as v, Link as N } from "./zudoku.components.js";
|
|
6
6
|
import { u as w } from "./state-CFQsUZUP.js";
|
|
@@ -2,13 +2,13 @@ import { j as e } from "./jsx-runtime-Dx-03ztt.js";
|
|
|
2
2
|
import { RotateCwIcon as g, TrashIcon as f, EyeOffIcon as j, EyeIcon as v, CheckIcon as w, CopyIcon as b, FileKey2Icon as K } from "lucide-react";
|
|
3
3
|
import { D as k, S as m, R as N } from "./SlotletProvider-pfc9oejW.js";
|
|
4
4
|
import { i as c } from "./invariant-Caa8-XvF.js";
|
|
5
|
-
import { u as d, S as I, a as S, b as A, c as C, d as E, e as x } from "./Select-
|
|
5
|
+
import { u as d, S as I, a as S, b as A, c as C, d as E, e as x } from "./Select-B_IxRUUC.js";
|
|
6
6
|
import { a as P } from "./index.esm-BnnBRKJX.js";
|
|
7
7
|
import { a as D, L as u, O as R } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
8
|
-
import { a as y, e as q, u as O } from "./
|
|
8
|
+
import { a as y, e as q, u as O } from "./ZudokuContext-hmLMUdf2.js";
|
|
9
9
|
import { Button as l } from "./ui/Button.js";
|
|
10
10
|
import { Input as z } from "./ui/Input.js";
|
|
11
|
-
import { u as F } from "./hook-
|
|
11
|
+
import { u as F } from "./hook-CHq7pFyz.js";
|
|
12
12
|
import { useState as p } from "react";
|
|
13
13
|
import { c as T } from "./cn-qaFjX9_3.js";
|
|
14
14
|
const L = ({ service: t }) => {
|
|
@@ -74,7 +74,7 @@ const C = (n) => ({
|
|
|
74
74
|
const h = {
|
|
75
75
|
path: r,
|
|
76
76
|
lazy: async () => {
|
|
77
|
-
const { MdxPage: l } = await import("./MdxPage-
|
|
77
|
+
const { MdxPage: l } = await import("./MdxPage-DKMbBROv.js"), { default: p, ...g } = await a();
|
|
78
78
|
return {
|
|
79
79
|
element: /* @__PURE__ */ P.jsx(
|
|
80
80
|
l,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./jsx-runtime-Dx-03ztt.js";
|
|
2
2
|
import "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
3
|
-
import { o as a } from "./index-
|
|
4
|
-
import "./
|
|
3
|
+
import { o as a } from "./index-DzRORsY1.js";
|
|
4
|
+
import "./ZudokuContext-hmLMUdf2.js";
|
|
5
5
|
import "lucide-react";
|
|
6
|
-
import "./hook-
|
|
6
|
+
import "./hook-CHq7pFyz.js";
|
|
7
7
|
import "./ui/Button.js";
|
|
8
8
|
export {
|
|
9
9
|
a as openApiPlugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://zudoku.dev",
|
|
6
6
|
"repository": {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@mdx-js/react": "3.1.0",
|
|
123
123
|
"@mdx-js/rollup": "3.1.0",
|
|
124
124
|
"@pothos/core": "3.41.0",
|
|
125
|
-
"@radix-ui/react-accordion": "1.2.
|
|
125
|
+
"@radix-ui/react-accordion": "1.2.2",
|
|
126
126
|
"@radix-ui/react-alert-dialog": "1.1.4",
|
|
127
127
|
"@radix-ui/react-aspect-ratio": "1.1.1",
|
|
128
128
|
"@radix-ui/react-checkbox": "1.1.2",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
},
|
|
251
251
|
"optionalDependencies": {
|
|
252
252
|
"@clerk/clerk-js": "^5.43.4",
|
|
253
|
-
"@sentry/react": "^8.
|
|
253
|
+
"@sentry/react": "^8.48.0"
|
|
254
254
|
},
|
|
255
255
|
"scripts": {
|
|
256
256
|
"build": "tsc --project tsconfig.json",
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
|
|
2
2
|
import { Helmet } from "@zudoku/react-helmet-async";
|
|
3
3
|
import { Link as LinkImport } from "react-router";
|
|
4
|
-
import {
|
|
4
|
+
import { useAuth as useAuthImport } from "../authentication/hook.js";
|
|
5
5
|
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
6
6
|
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
7
7
|
import { Button as ButtonImport } from "../ui/Button.js";
|
|
8
8
|
import { Callout as CalloutImport } from "../ui/Callout.js";
|
|
9
|
+
import { Spinner as SpinnerImport } from "./Spinner.js";
|
|
10
|
+
import { Markdown as MarkdownImport } from "./Markdown.js";
|
|
9
11
|
import {
|
|
10
12
|
Bootstrap as BootstrapImport,
|
|
11
13
|
BootstrapStatic as BootstrapStaticImport,
|
|
@@ -24,10 +26,12 @@ export const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;
|
|
|
24
26
|
export const Head = /*@__PURE__*/ Helmet;
|
|
25
27
|
|
|
26
28
|
export const useZudoku = /*@__PURE__*/ useZudokuImport;
|
|
27
|
-
export const useAuth = /*@__PURE__*/
|
|
29
|
+
export const useAuth = /*@__PURE__*/ useAuthImport;
|
|
28
30
|
export const Zudoku = /*@__PURE__*/ ZudokuImport;
|
|
29
31
|
|
|
30
32
|
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
33
|
+
export const Markdown = /*@__PURE__*/ MarkdownImport;
|
|
34
|
+
export const Spinner = /*@__PURE__*/ SpinnerImport;
|
|
31
35
|
export const ClientOnly = /*@__PURE__*/ ClientOnlyImport;
|
|
32
36
|
export const Button = /*@__PURE__*/ ButtonImport;
|
|
33
|
-
export const Link
|
|
37
|
+
export const Link = /*@__PURE__*/ LinkImport;
|
|
@@ -10,7 +10,7 @@ import { SidebarBadge } from "./SidebarBadge.js";
|
|
|
10
10
|
import { SidebarCategory } from "./SidebarCategory.js";
|
|
11
11
|
|
|
12
12
|
export const navigationListItem = cva(
|
|
13
|
-
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent
|
|
13
|
+
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent",
|
|
14
14
|
{
|
|
15
15
|
variants: {
|
|
16
16
|
isActive: {
|
|
@@ -3,6 +3,8 @@ import { resolveLocalRef } from "./resolveRef.js";
|
|
|
3
3
|
|
|
4
4
|
export type JSONSchema = JSONSchema4 | JSONSchema6;
|
|
5
5
|
|
|
6
|
+
export const CIRCULAR_REF = "$[Circular Reference]";
|
|
7
|
+
|
|
6
8
|
type CustomResolver = (ref: string) => Promise<JSONSchema | undefined>;
|
|
7
9
|
|
|
8
10
|
const cache = new Map<JSONSchema, JSONSchema>();
|
|
@@ -21,12 +23,12 @@ export const dereference = async (
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
const cloned = structuredClone(schema);
|
|
24
|
-
const visited = new Set();
|
|
26
|
+
const visited = new Set<unknown>();
|
|
25
27
|
|
|
26
28
|
const resolve = async (current: unknown, path: string) => {
|
|
27
29
|
if (isIndexableObject(current)) {
|
|
28
30
|
if (visited.has(current)) {
|
|
29
|
-
return
|
|
31
|
+
return CIRCULAR_REF;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
visited.add(current);
|
|
@@ -39,15 +41,18 @@ export const dereference = async (
|
|
|
39
41
|
if ("$ref" in current && typeof current.$ref === "string") {
|
|
40
42
|
for (const resolver of resolvers) {
|
|
41
43
|
const resolved = await resolver(current.$ref);
|
|
42
|
-
if (resolved) return resolved;
|
|
44
|
+
if (resolved) return await resolve(resolved, path);
|
|
43
45
|
}
|
|
44
|
-
|
|
46
|
+
const resolved = await resolveLocalRef(cloned, current.$ref);
|
|
47
|
+
return await resolve(resolved, path);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
for (const key in current) {
|
|
48
51
|
current[key] = await resolve(current[key], `${path}/${key}`);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
54
|
+
|
|
55
|
+
visited.delete(current);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
return current;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
|
-
import { ListPlusIcon } from "lucide-react";
|
|
2
|
+
import { ListPlusIcon, RefreshCcwDotIcon } from "lucide-react";
|
|
3
3
|
import { useCallback, useState } from "react";
|
|
4
4
|
import { Markdown, ProseClasses } from "../../../components/Markdown.js";
|
|
5
|
+
import { CIRCULAR_REF } from "../../../oas/parser/dereference/index.js";
|
|
5
6
|
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
6
7
|
import { Button } from "../../../ui/Button.js";
|
|
7
8
|
import { cn } from "../../../util/cn.js";
|
|
@@ -39,6 +40,16 @@ export const SchemaLogicalGroup = ({
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
|
|
43
|
+
const isCircularRef = (schema: unknown): schema is string =>
|
|
44
|
+
schema === CIRCULAR_REF;
|
|
45
|
+
|
|
46
|
+
const RecursiveIndicator = () => (
|
|
47
|
+
<div className="flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md">
|
|
48
|
+
<RefreshCcwDotIcon size={16} />
|
|
49
|
+
<span>recursive</span>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
|
|
42
53
|
export const SchemaPropertyItem = ({
|
|
43
54
|
name,
|
|
44
55
|
schema,
|
|
@@ -56,6 +67,19 @@ export const SchemaPropertyItem = ({
|
|
|
56
67
|
}) => {
|
|
57
68
|
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
58
69
|
|
|
70
|
+
if (isCircularRef(schema)) {
|
|
71
|
+
return (
|
|
72
|
+
<li className="p-4 bg-border/20 hover:bg-border/30">
|
|
73
|
+
<div className="flex flex-col gap-1 justify-between text-sm">
|
|
74
|
+
<div className="flex gap-2 items-center">
|
|
75
|
+
<code>{name}</code>
|
|
76
|
+
<RecursiveIndicator />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</li>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
59
83
|
return (
|
|
60
84
|
<li className="p-4 bg-border/20 hover:bg-border/30">
|
|
61
85
|
<div className="flex flex-col gap-1 justify-between text-sm">
|