zudoku 0.41.3 → 0.41.4
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/app/main.js +3 -1
- package/dist/app/main.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +18 -3
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/lib/{MdxPage-B7MyVLV5.js → MdxPage-OSMru6r8.js} +3 -3
- package/lib/{MdxPage-B7MyVLV5.js.map → MdxPage-OSMru6r8.js.map} +1 -1
- package/lib/{OasProvider-C15HpDwF.js → OasProvider-CHYfqkG3.js} +2 -2
- package/lib/{OasProvider-C15HpDwF.js.map → OasProvider-CHYfqkG3.js.map} +1 -1
- package/lib/{OperationList-j4pFeiTb.js → OperationList-jzJUa4hl.js} +4 -4
- package/lib/{OperationList-j4pFeiTb.js.map → OperationList-jzJUa4hl.js.map} +1 -1
- package/lib/{Pagination-9TA5cwCh.js → Pagination-BcY_siMl.js} +2 -2
- package/lib/{Pagination-9TA5cwCh.js.map → Pagination-BcY_siMl.js.map} +1 -1
- package/lib/{SchemaList-DRck1myS.js → SchemaList-DcWTacAj.js} +2 -2
- package/lib/{SchemaList-DRck1myS.js.map → SchemaList-DcWTacAj.js.map} +1 -1
- package/lib/index-DMYbZ3i6.js +5031 -0
- package/lib/index-DMYbZ3i6.js.map +1 -0
- package/lib/{index-Dk7l9To6.js → index-DNFEg0uU.js} +4 -4
- package/lib/{index-Dk7l9To6.js.map → index-DNFEg0uU.js.map} +1 -1
- package/lib/zudoku.components.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.tsx +7 -3
- package/src/lib/components/BuildCheck.tsx +20 -7
- package/lib/index-BPmAnNGI.js +0 -2054
- package/lib/index-BPmAnNGI.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -3,7 +3,7 @@ import "./index-DwT-v3zK.js";
|
|
|
3
3
|
import "./chunk-KNED5TY2-BUPjb3LQ.js";
|
|
4
4
|
import "./hook-pPrHCB6G.js";
|
|
5
5
|
import "./SlotletProvider-p4XaFFOh.js";
|
|
6
|
-
import { e as d, f as k, n as l, B as S, C as h, j as B, l as c, H as E, d as H, L, M, g as R, R as Z, S as f, k as g, i as y, Z as A, a as b, h as j, c as v, m as w, b as x } from "./index-
|
|
6
|
+
import { e as d, f as k, n as l, B as S, C as h, j as B, l as c, H as E, d as H, L, M, g as R, R as Z, S as f, k as g, i as y, Z as A, a as b, h as j, c as v, m as w, b as x } from "./index-DMYbZ3i6.js";
|
|
7
7
|
import "./ui/Button.js";
|
|
8
8
|
import "./ui/Callout.js";
|
|
9
9
|
import "./ClientOnly-E7hGysn1.js";
|
|
@@ -3,7 +3,7 @@ import { s as h } from "./index-LNp6rxyU.js";
|
|
|
3
3
|
import { d as b, m as x } from "./chunk-KNED5TY2-BUPjb3LQ.js";
|
|
4
4
|
import { u as j, d as y, f as p } from "./hook-pPrHCB6G.js";
|
|
5
5
|
import { H as v } from "./RouteGuard-BZ_VsiXc.js";
|
|
6
|
-
import { L as N } from "./index-
|
|
6
|
+
import { L as N } from "./index-DMYbZ3i6.js";
|
|
7
7
|
import { H as S, M as w } from "./Markdown-DqDbGCj2.js";
|
|
8
8
|
const H = ({
|
|
9
9
|
items: r,
|
|
@@ -53,7 +53,7 @@ const P = (e) => ({
|
|
|
53
53
|
const u = {
|
|
54
54
|
path: r,
|
|
55
55
|
lazy: async () => {
|
|
56
|
-
const { MdxPage: p } = await import("./MdxPage-
|
|
56
|
+
const { MdxPage: p } = await import("./MdxPage-OSMru6r8.js"), { default: f, ...l } = await i();
|
|
57
57
|
return {
|
|
58
58
|
element: /* @__PURE__ */ d.jsx(
|
|
59
59
|
p,
|
|
@@ -3,7 +3,7 @@ import "lucide-react";
|
|
|
3
3
|
import "./chunk-KNED5TY2-BUPjb3LQ.js";
|
|
4
4
|
import "./hook-pPrHCB6G.js";
|
|
5
5
|
import "./ui/Button.js";
|
|
6
|
-
import { U as a, o as e } from "./index-
|
|
6
|
+
import { U as a, o as e } from "./index-DNFEg0uU.js";
|
|
7
7
|
export {
|
|
8
8
|
a as UNTAGGED_PATH,
|
|
9
9
|
e as openApiPlugin
|
package/package.json
CHANGED
package/src/app/main.tsx
CHANGED
|
@@ -129,9 +129,13 @@ export const getRoutesByConfig = (config: ZudokuConfig): RouteObject[] => {
|
|
|
129
129
|
{
|
|
130
130
|
element: (
|
|
131
131
|
<Zudoku {...options}>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
<BuildCheck
|
|
133
|
+
buildId={
|
|
134
|
+
import.meta.env.IS_ZUPLO && import.meta.env.ZUPLO_BUILD_ID
|
|
135
|
+
? import.meta.env.ZUPLO_BUILD_ID
|
|
136
|
+
: undefined
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
135
139
|
<Layout />
|
|
136
140
|
</Zudoku>
|
|
137
141
|
),
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { useQuery } from "@tanstack/react-query";
|
|
2
2
|
import { CircleFadingArrowUpIcon, LoaderCircleIcon } from "lucide-react";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
import { Button } from "../ui/Button.js";
|
|
4
5
|
|
|
6
|
+
const BuildStatusSchema = z.object({
|
|
7
|
+
buildId: z.string(),
|
|
8
|
+
timestamp: z.string(),
|
|
9
|
+
status: z.enum(["in-progress", "completed", "failed"]),
|
|
10
|
+
});
|
|
11
|
+
|
|
5
12
|
export const BuildCheck = ({
|
|
6
13
|
buildId,
|
|
7
14
|
endpoint = "/__zuplo/docs",
|
|
@@ -13,19 +20,25 @@ export const BuildCheck = ({
|
|
|
13
20
|
queryKey: ["zuplo-build-check", buildId, endpoint],
|
|
14
21
|
refetchInterval: 2000,
|
|
15
22
|
enabled: !!buildId,
|
|
23
|
+
retry: false,
|
|
16
24
|
queryFn: () =>
|
|
17
|
-
fetch(endpoint
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
fetch(endpoint, { signal: AbortSignal.timeout(2000) })
|
|
26
|
+
.then((res) => {
|
|
27
|
+
if (!res.ok) throw new Error("Failed to fetch build status");
|
|
28
|
+
return res.json();
|
|
29
|
+
})
|
|
30
|
+
.then((data) => BuildStatusSchema.parse(data)),
|
|
22
31
|
});
|
|
23
32
|
|
|
24
|
-
if (
|
|
33
|
+
if (
|
|
34
|
+
buildStatusQuery.isError ||
|
|
35
|
+
!buildStatusQuery.data ||
|
|
36
|
+
buildStatusQuery.data.buildId === buildId
|
|
37
|
+
) {
|
|
25
38
|
return null;
|
|
26
39
|
}
|
|
27
40
|
|
|
28
|
-
const isCompleted = buildStatusQuery.data
|
|
41
|
+
const isCompleted = buildStatusQuery.data.status === "completed";
|
|
29
42
|
|
|
30
43
|
return (
|
|
31
44
|
<div className="fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg">
|