zudoku 0.0.0-fb7d300 → 0.0.0-fc5c03b
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/client.d.ts +7 -0
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +13 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +1 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/logger.js +9 -0
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4911 -0
- package/dist/config/validators/common.js +276 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +777 -521
- package/dist/config/validators/validate.js +9 -228
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +7 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +0 -4
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +3 -4
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +5 -10
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
- package/dist/lib/oas/parser/upgrade/index.js +3 -20
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +6 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +29 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +23 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
- package/dist/lib/plugins/markdown/MdxPage.js +15 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +47 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +12 -0
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +4 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
- package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +2 -0
- package/dist/lib/util/traverse.js +18 -0
- package/dist/lib/util/traverse.js.map +1 -0
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +54 -15
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +7 -5
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +12 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +39 -10
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +67 -20
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +15 -19
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +15 -23
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-mdx.js +58 -4
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +3 -0
- package/dist/zuplo/with-zuplo.js +28 -0
- package/dist/zuplo/with-zuplo.js.map +1 -0
- package/lib/AnchorLink-BR0MvI7n.js +35 -0
- package/lib/AnchorLink-BR0MvI7n.js.map +1 -0
- package/lib/{Markdown-ievDDhFT.js → Markdown-CRsmPPfY.js} +13084 -13096
- package/lib/Markdown-CRsmPPfY.js.map +1 -0
- package/lib/MdxPage-Wp8QU0-q.js +188 -0
- package/lib/MdxPage-Wp8QU0-q.js.map +1 -0
- package/lib/{OperationList-BwBl1xrD.js → OperationList-u8xHU9-b.js} +1031 -1016
- package/lib/OperationList-u8xHU9-b.js.map +1 -0
- package/lib/{SlotletProvider-DyomlzGx.js → SlotletProvider-BgvYIPQe.js} +2 -2
- package/lib/{SlotletProvider-DyomlzGx.js.map → SlotletProvider-BgvYIPQe.js.map} +1 -1
- package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-C31iouiO.js} +1 -3
- package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-C31iouiO.js.map} +1 -1
- package/lib/assets/{worker-CPsGZsve.js → worker-C_2va8B8.js} +8 -9
- package/lib/assets/worker-C_2va8B8.js.map +1 -0
- package/lib/{createServer-DK-g7kbB.js → createServer-BCAHdrpE.js} +4461 -5248
- package/lib/createServer-BCAHdrpE.js.map +1 -0
- package/lib/{index-DNxQ_rCt.js → index-CmdLGbbk.js} +53 -47
- package/lib/index-CmdLGbbk.js.map +1 -0
- package/lib/{AnchorLink-CDlhr8gL.js → index.esm-Bm8pj-bc.js} +223 -254
- package/lib/index.esm-Bm8pj-bc.js.map +1 -0
- package/lib/object_hash-CvlLgU-M.js +785 -0
- package/lib/object_hash-CvlLgU-M.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +11 -0
- package/lib/post-processors/removeExtensions.js.map +1 -0
- package/lib/post-processors/removePaths.js +28 -0
- package/lib/post-processors/removePaths.js.map +1 -0
- package/lib/post-processors/traverse.js +12 -0
- package/lib/post-processors/traverse.js.map +1 -0
- package/lib/ui/Drawer.js +79 -79
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/zudoku.auth-openid.js +42 -37
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +386 -367
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +121 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +15 -14
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/package.json +32 -9
- package/src/app/entry.client.tsx +15 -0
- package/src/app/entry.server.tsx +1 -0
- package/src/app/main.tsx +5 -1
- package/src/app/sentry.ts +24 -0
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/providers/openid.tsx +7 -2
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +8 -3
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +18 -18
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SyntaxHighlight.tsx +0 -4
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarCategory.tsx +10 -9
- package/src/lib/components/navigation/SidebarItem.tsx +10 -13
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/oas/parser/upgrade/index.ts +4 -27
- package/src/lib/plugins/api-catalog/Catalog.tsx +124 -0
- package/src/lib/plugins/api-catalog/index.tsx +50 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +27 -1
- package/src/lib/plugins/markdown/index.tsx +3 -1
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/OperationList.tsx +64 -3
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +17 -0
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +5 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/interfaces.ts +1 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
- package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
- package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
- package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -5
- package/src/lib/util/traverse.ts +25 -0
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/Markdown-ievDDhFT.js.map +0 -1
- package/lib/MdxPage-Bwn-VSsH.js +0 -174
- package/lib/MdxPage-Bwn-VSsH.js.map +0 -1
- package/lib/OperationList-BwBl1xrD.js.map +0 -1
- package/lib/assets/worker-CPsGZsve.js.map +0 -1
- package/lib/createServer-DK-g7kbB.js.map +0 -1
- package/lib/index-DNxQ_rCt.js.map +0 -1
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { A as ze } from "./AuthenticationPlugin-D0Em0SwR.js";
|
|
|
7
7
|
import { g as De } from "./utils-DcpDOncX.js";
|
|
8
8
|
import { Z as Ne } from "./invariant-Caa8-XvF.js";
|
|
9
9
|
import { l as Ke } from "./index-Czzd9rjU.js";
|
|
10
|
-
import { u as
|
|
10
|
+
import { u as C } from "./state-tsXBLONe.js";
|
|
11
11
|
var pe = { exports: {} };
|
|
12
12
|
(function(t) {
|
|
13
13
|
(function(e, n) {
|
|
@@ -56,7 +56,7 @@ var pe = { exports: {} };
|
|
|
56
56
|
return _(l) || y.apply(this, arguments);
|
|
57
57
|
}
|
|
58
58
|
function h(l, m) {
|
|
59
|
-
var u = this,
|
|
59
|
+
var u = this, O, F, R, v = "loglevel";
|
|
60
60
|
typeof l == "string" ? v += ":" + l : typeof l == "symbol" && (v = void 0);
|
|
61
61
|
function Ce(d) {
|
|
62
62
|
var g = (a[d] || "silent").toUpperCase();
|
|
@@ -81,9 +81,9 @@ var pe = { exports: {} };
|
|
|
81
81
|
}
|
|
82
82
|
if (typeof d === n)
|
|
83
83
|
try {
|
|
84
|
-
var g = window.document.cookie,
|
|
84
|
+
var g = window.document.cookie, z = encodeURIComponent(v), re = g.indexOf(z + "=");
|
|
85
85
|
re !== -1 && (d = /^([^;]+)/.exec(
|
|
86
|
-
g.slice(re +
|
|
86
|
+
g.slice(re + z.length + 1)
|
|
87
87
|
)[1]);
|
|
88
88
|
} catch {
|
|
89
89
|
}
|
|
@@ -116,7 +116,7 @@ var pe = { exports: {} };
|
|
|
116
116
|
ERROR: 4,
|
|
117
117
|
SILENT: 5
|
|
118
118
|
}, u.methodFactory = m || T, u.getLevel = function() {
|
|
119
|
-
return R ?? F ??
|
|
119
|
+
return R ?? F ?? O;
|
|
120
120
|
}, u.setLevel = function(d, g) {
|
|
121
121
|
return R = U(d), g !== !1 && Ce(R), f.call(u);
|
|
122
122
|
}, u.setDefaultLevel = function(d) {
|
|
@@ -128,10 +128,10 @@ var pe = { exports: {} };
|
|
|
128
128
|
}, u.disableAll = function(d) {
|
|
129
129
|
u.setLevel(u.levels.SILENT, d);
|
|
130
130
|
}, u.rebuild = function() {
|
|
131
|
-
if (i !== u && (
|
|
131
|
+
if (i !== u && (O = U(i.getLevel())), f.call(u), i === u)
|
|
132
132
|
for (var d in r)
|
|
133
133
|
r[d].rebuild();
|
|
134
|
-
},
|
|
134
|
+
}, O = U(
|
|
135
135
|
i ? i.getLevel() : "WARN"
|
|
136
136
|
);
|
|
137
137
|
var ne = te();
|
|
@@ -146,9 +146,9 @@ var pe = { exports: {} };
|
|
|
146
146
|
i.methodFactory
|
|
147
147
|
)), u;
|
|
148
148
|
};
|
|
149
|
-
var
|
|
149
|
+
var J = typeof window !== n ? window.log : void 0;
|
|
150
150
|
return i.noConflict = function() {
|
|
151
|
-
return typeof window !== n && window.log === i && (window.log =
|
|
151
|
+
return typeof window !== n && window.log === i && (window.log = J), i;
|
|
152
152
|
}, i.getLoggers = function() {
|
|
153
153
|
return r;
|
|
154
154
|
}, i.default = i, i;
|
|
@@ -247,7 +247,7 @@ function Q(t) {
|
|
|
247
247
|
}
|
|
248
248
|
return t;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function L(t) {
|
|
251
251
|
return !(t === null || typeof t != "object" || Array.isArray(t));
|
|
252
252
|
}
|
|
253
253
|
function W(t) {
|
|
@@ -306,7 +306,7 @@ async function Xe(t, e) {
|
|
|
306
306
|
} catch (o) {
|
|
307
307
|
throw new s('failed to parse "response" body as JSON', { cause: o });
|
|
308
308
|
}
|
|
309
|
-
if (!
|
|
309
|
+
if (!L(n))
|
|
310
310
|
throw new s('"response" body must be a top level object');
|
|
311
311
|
if (!w(n.issuer))
|
|
312
312
|
throw new s('"response" body "issuer" property must be a non-empty string');
|
|
@@ -399,7 +399,7 @@ function be(t) {
|
|
|
399
399
|
throw new S("unsupported CryptoKey algorithm name");
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function x(t) {
|
|
403
403
|
const e = t == null ? void 0 : t[K];
|
|
404
404
|
return typeof e == "number" && Number.isFinite(e) ? e : 0;
|
|
405
405
|
}
|
|
@@ -411,7 +411,7 @@ function $() {
|
|
|
411
411
|
return Math.floor(Date.now() / 1e3);
|
|
412
412
|
}
|
|
413
413
|
function ct(t, e) {
|
|
414
|
-
const n = $() +
|
|
414
|
+
const n = $() + x(e);
|
|
415
415
|
return {
|
|
416
416
|
jti: H(),
|
|
417
417
|
aud: [t.issuer, t.token_endpoint],
|
|
@@ -426,14 +426,14 @@ async function ut(t, e, n, o, a) {
|
|
|
426
426
|
const r = { alg: be(n), kid: o }, i = ct(t, e);
|
|
427
427
|
return a == null || a(r, i), ve(r, i, n);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function I(t) {
|
|
430
430
|
if (typeof t != "object" || t === null)
|
|
431
431
|
throw new TypeError('"as" must be an object');
|
|
432
432
|
if (!w(t.issuer))
|
|
433
433
|
throw new TypeError('"as.issuer" property must be a non-empty string');
|
|
434
434
|
return !0;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function j(t) {
|
|
437
437
|
if (typeof t != "object" || t === null)
|
|
438
438
|
throw new TypeError('"client" must be an object');
|
|
439
439
|
if (!w(t.client_id))
|
|
@@ -542,7 +542,7 @@ async function pt(t, e, n, o, a, r) {
|
|
|
542
542
|
throw new TypeError('"accessToken" must be a non-empty string');
|
|
543
543
|
if (!(n instanceof URL))
|
|
544
544
|
throw new TypeError('"url" must be an instance of URL');
|
|
545
|
-
return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(),
|
|
545
|
+
return o = W(o), (r == null ? void 0 : r.DPoP) === void 0 ? o.set("authorization", `Bearer ${t}`) : (await dt(o, r.DPoP, n, e.toUpperCase(), x({ [K]: r == null ? void 0 : r[K] }), t), o.set("authorization", `DPoP ${t}`)), ((r == null ? void 0 : r[Y]) || fetch)(n.href, {
|
|
546
546
|
body: a,
|
|
547
547
|
headers: Object.fromEntries(o.entries()),
|
|
548
548
|
method: e,
|
|
@@ -551,11 +551,11 @@ async function pt(t, e, n, o, a, r) {
|
|
|
551
551
|
}).then(Q);
|
|
552
552
|
}
|
|
553
553
|
async function wt(t, e, n, o) {
|
|
554
|
-
|
|
554
|
+
I(t), j(e);
|
|
555
555
|
const a = Se(t, "userinfo_endpoint", Te(e, o)), r = W(o == null ? void 0 : o.headers);
|
|
556
556
|
return e.userinfo_signed_response_alg ? r.set("accept", "application/jwt") : (r.set("accept", "application/json"), r.append("accept", "application/jwt")), pt(n, "GET", a, r, null, {
|
|
557
557
|
...o,
|
|
558
|
-
[K]:
|
|
558
|
+
[K]: x(e)
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
561
|
async function mt(t, e, n, o, a, r, i) {
|
|
@@ -574,7 +574,7 @@ async function ke(t, e, n, o, a) {
|
|
|
574
574
|
return i.set("accept", "application/json"), mt(t, e, "POST", r, o, i, a);
|
|
575
575
|
}
|
|
576
576
|
async function gt(t, e, n, o) {
|
|
577
|
-
if (
|
|
577
|
+
if (I(t), j(e), !w(n))
|
|
578
578
|
throw new TypeError('"refreshToken" must be a non-empty string');
|
|
579
579
|
const a = new URLSearchParams(o == null ? void 0 : o.additionalParameters);
|
|
580
580
|
return a.set("refresh_token", n), ke(t, e, "refresh_token", a, o);
|
|
@@ -589,7 +589,7 @@ function yt(t) {
|
|
|
589
589
|
return e[0];
|
|
590
590
|
}
|
|
591
591
|
async function Ee(t, e, n, o = !1, a = !1) {
|
|
592
|
-
if (
|
|
592
|
+
if (I(t), j(e), !Z(n, Response))
|
|
593
593
|
throw new TypeError('"response" must be an instance of Response');
|
|
594
594
|
if (n.status !== 200) {
|
|
595
595
|
let i;
|
|
@@ -604,7 +604,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
604
604
|
} catch (i) {
|
|
605
605
|
throw new s('failed to parse "response" body as JSON', { cause: i });
|
|
606
606
|
}
|
|
607
|
-
if (!
|
|
607
|
+
if (!L(r))
|
|
608
608
|
throw new s('"response" body must be a top level object');
|
|
609
609
|
if (!w(r.access_token))
|
|
610
610
|
throw new s('"response" body "access_token" property must be a non-empty string');
|
|
@@ -622,7 +622,7 @@ async function Ee(t, e, n, o = !1, a = !1) {
|
|
|
622
622
|
if (r.id_token !== void 0 && !w(r.id_token))
|
|
623
623
|
throw new s('"response" body "id_token" property must be a non-empty string');
|
|
624
624
|
if (r.id_token) {
|
|
625
|
-
const { claims: i, jwt: c } = await Lt(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue,
|
|
625
|
+
const { claims: i, jwt: c } = await Lt(r.id_token, xt.bind(void 0, e.id_token_signed_response_alg, t.id_token_signing_alg_values_supported), Ue, x(e), _e(e), e[$e]).then(At.bind(void 0, ["aud", "exp", "iat", "iss", "sub"])).then(vt.bind(void 0, t.issuer)).then(_t.bind(void 0, e.client_id));
|
|
626
626
|
if (Array.isArray(i.aud) && i.aud.length !== 1) {
|
|
627
627
|
if (i.azp === void 0)
|
|
628
628
|
throw new s('ID Token "aud" (audience) claim includes additional untrusted audiences');
|
|
@@ -657,7 +657,7 @@ function St(t) {
|
|
|
657
657
|
return Re.add(t), t;
|
|
658
658
|
}
|
|
659
659
|
async function Tt(t, e, n, o, a, r) {
|
|
660
|
-
if (
|
|
660
|
+
if (I(t), j(e), !Re.has(n))
|
|
661
661
|
throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');
|
|
662
662
|
if (!w(o))
|
|
663
663
|
throw new TypeError('"redirectUri" must be a non-empty string');
|
|
@@ -705,7 +705,7 @@ async function Rt(t, e, n, o, a) {
|
|
|
705
705
|
if (a !== B) {
|
|
706
706
|
if (typeof a != "number" || a < 0)
|
|
707
707
|
throw new TypeError('"maxAge" must be a non-negative number');
|
|
708
|
-
const c = $() +
|
|
708
|
+
const c = $() + x(e), p = _e(e);
|
|
709
709
|
if (i.auth_time + a < c - p)
|
|
710
710
|
throw new s("too much time has elapsed since the last End-User authentication");
|
|
711
711
|
}
|
|
@@ -734,7 +734,7 @@ async function Pt(t) {
|
|
|
734
734
|
ee(t);
|
|
735
735
|
try {
|
|
736
736
|
const e = await t.json();
|
|
737
|
-
if (
|
|
737
|
+
if (L(e) && typeof e.error == "string" && e.error.length)
|
|
738
738
|
return e.error_description !== void 0 && typeof e.error_description != "string" && delete e.error_description, e.error_uri !== void 0 && typeof e.error_uri != "string" && delete e.error_uri, e.algs !== void 0 && typeof e.algs != "string" && delete e.algs, e.scope !== void 0 && typeof e.scope != "string" && delete e.scope, e;
|
|
739
739
|
} catch {
|
|
740
740
|
}
|
|
@@ -804,7 +804,7 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
804
804
|
} catch (l) {
|
|
805
805
|
throw new s("failed to parse JWT Header body as base64url encoded JSON", { cause: l });
|
|
806
806
|
}
|
|
807
|
-
if (!
|
|
807
|
+
if (!L(f))
|
|
808
808
|
throw new s("JWT Header must be a top level object");
|
|
809
809
|
if (e(f), f.crit !== void 0)
|
|
810
810
|
throw new s('unexpected JWT "crit" header parameter');
|
|
@@ -817,13 +817,13 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
817
817
|
} catch (l) {
|
|
818
818
|
throw new s("failed to parse JWT Payload body as base64url encoded JSON", { cause: l });
|
|
819
819
|
}
|
|
820
|
-
if (!
|
|
820
|
+
if (!L(h))
|
|
821
821
|
throw new s("JWT Payload must be a top level object");
|
|
822
|
-
const
|
|
822
|
+
const J = $() + o;
|
|
823
823
|
if (h.exp !== void 0) {
|
|
824
824
|
if (typeof h.exp != "number")
|
|
825
825
|
throw new s('unexpected JWT "exp" (expiration time) claim type');
|
|
826
|
-
if (h.exp <=
|
|
826
|
+
if (h.exp <= J - a)
|
|
827
827
|
throw new s('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()');
|
|
828
828
|
}
|
|
829
829
|
if (h.iat !== void 0 && typeof h.iat != "number")
|
|
@@ -833,7 +833,7 @@ async function Lt(t, e, n, o, a, r) {
|
|
|
833
833
|
if (h.nbf !== void 0) {
|
|
834
834
|
if (typeof h.nbf != "number")
|
|
835
835
|
throw new s('unexpected JWT "nbf" (not before) claim type');
|
|
836
|
-
if (h.nbf >
|
|
836
|
+
if (h.nbf > J + a)
|
|
837
837
|
throw new s('unexpected JWT "nbf" (not before) claim value, timestamp is > now()');
|
|
838
838
|
}
|
|
839
839
|
if (h.aud !== void 0 && typeof h.aud != "string" && !Array.isArray(h.aud))
|
|
@@ -862,7 +862,7 @@ function k(t, e) {
|
|
|
862
862
|
}
|
|
863
863
|
const It = Symbol(), jt = Symbol();
|
|
864
864
|
function Jt(t, e, n, o) {
|
|
865
|
-
if (
|
|
865
|
+
if (I(t), j(e), n instanceof URL && (n = n.searchParams), !(n instanceof URLSearchParams))
|
|
866
866
|
throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');
|
|
867
867
|
if (k(n, "response"))
|
|
868
868
|
throw new s('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');
|
|
@@ -961,7 +961,7 @@ class Dt {
|
|
|
961
961
|
b(this, "redirectToAfterSignOut");
|
|
962
962
|
b(this, "audience");
|
|
963
963
|
b(this, "signOut", async () => {
|
|
964
|
-
|
|
964
|
+
C.setState({
|
|
965
965
|
isAuthenticated: !1,
|
|
966
966
|
isPending: !1,
|
|
967
967
|
profile: void 0,
|
|
@@ -1017,7 +1017,7 @@ class Dt {
|
|
|
1017
1017
|
emailVerified: y.email_verified ?? !1,
|
|
1018
1018
|
pictureUrl: y.picture
|
|
1019
1019
|
};
|
|
1020
|
-
|
|
1020
|
+
C.setState({
|
|
1021
1021
|
isAuthenticated: !0,
|
|
1022
1022
|
isPending: !1,
|
|
1023
1023
|
profile: T
|
|
@@ -1055,7 +1055,7 @@ class Dt {
|
|
|
1055
1055
|
expiresOn: new Date(Date.now() + e.expires_in * 1e3),
|
|
1056
1056
|
tokenType: e.token_type
|
|
1057
1057
|
};
|
|
1058
|
-
|
|
1058
|
+
C.setState({
|
|
1059
1059
|
providerData: n
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
@@ -1098,13 +1098,18 @@ class Dt {
|
|
|
1098
1098
|
location.href = c.href;
|
|
1099
1099
|
}
|
|
1100
1100
|
async getAccessToken() {
|
|
1101
|
-
const e = await this.getAuthServer(), { providerData: n } =
|
|
1101
|
+
const e = await this.getAuthServer(), { providerData: n } = C.getState();
|
|
1102
1102
|
if (!n)
|
|
1103
1103
|
throw new P("User is not authenticated");
|
|
1104
1104
|
const o = n;
|
|
1105
|
-
if (o.expiresOn < /* @__PURE__ */ new Date()) {
|
|
1105
|
+
if (new Date(o.expiresOn) < /* @__PURE__ */ new Date()) {
|
|
1106
1106
|
if (!o.refreshToken)
|
|
1107
|
-
return
|
|
1107
|
+
return C.setState({
|
|
1108
|
+
isAuthenticated: !1,
|
|
1109
|
+
isPending: !1,
|
|
1110
|
+
profile: null,
|
|
1111
|
+
providerData: null
|
|
1112
|
+
}), "";
|
|
1108
1113
|
const a = await gt(
|
|
1109
1114
|
e,
|
|
1110
1115
|
this.client,
|