@xtandard/permissions 0.1.0 → 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 +5 -3
- package/dist/{better-auth-NO40ZqSM.mjs → better-auth-BEmX8qyz.mjs} +28 -8
- package/dist/better-auth-BEmX8qyz.mjs.map +1 -0
- package/dist/{better-auth-Bp9YVyQa.d.cts → better-auth-DQET1sXa.d.mts} +24 -5
- package/dist/{better-auth-DHyW5-yt.cjs → better-auth-MR7dBtpo.cjs} +28 -8
- package/dist/better-auth-MR7dBtpo.cjs.map +1 -0
- package/dist/{better-auth-NSXgt6ZU.d.mts → better-auth-vgRYgjYK.d.cts} +24 -5
- package/dist/cli.cjs +12 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +12 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/{contract-BMiOmg2f.d.cts → contract-BAisPHBw.d.cts} +30 -2
- package/dist/{contract-Yc5AZuvv.mjs → contract-BganM0fx.mjs} +34 -2
- package/dist/contract-BganM0fx.mjs.map +1 -0
- package/dist/{contract-CPmJVoRx.cjs → contract-Brnu9XXo.cjs} +45 -1
- package/dist/contract-Brnu9XXo.cjs.map +1 -0
- package/dist/{contract-Dk6d2ylD.d.cts → contract-CXPMGuHk.d.cts} +18 -2
- package/dist/{contract-D32H1t0u.d.mts → contract-D6j-yrBL.d.mts} +30 -2
- package/dist/{contract-DUzgB-He.d.mts → contract-DhS23Pcp.d.mts} +18 -2
- package/dist/{create-fetch-handler-ojjpk1Iw.mjs → create-fetch-handler-B0twltQL.mjs} +43 -6
- package/dist/create-fetch-handler-B0twltQL.mjs.map +1 -0
- package/dist/{create-fetch-handler-BHDU4chu.d.mts → create-fetch-handler-B711wb64.d.mts} +4 -4
- package/dist/{create-fetch-handler-C-WyaRCR.cjs → create-fetch-handler-BHT4vSZs.cjs} +43 -6
- package/dist/create-fetch-handler-BHT4vSZs.cjs.map +1 -0
- package/dist/{create-fetch-handler-BtX64_rS.d.cts → create-fetch-handler-DxhvXuBA.d.cts} +4 -4
- package/dist/{elysia-shared-BUTFTeal.cjs → elysia-shared-BFcWzfc9.cjs} +3 -3
- package/dist/{elysia-shared-BUTFTeal.cjs.map → elysia-shared-BFcWzfc9.cjs.map} +1 -1
- package/dist/{elysia-shared-BM6cPoCU.mjs → elysia-shared-BwUYg0Ln.mjs} +3 -3
- package/dist/{elysia-shared-BM6cPoCU.mjs.map → elysia-shared-BwUYg0Ln.mjs.map} +1 -1
- package/dist/{elysia-shared-DtKViycb.d.cts → elysia-shared-C2LnDOj3.d.cts} +5 -5
- package/dist/{elysia-shared-g8zsb_pU.d.mts → elysia-shared-WuDr0jco.d.mts} +5 -5
- package/dist/{engine-bMoz3iW-.cjs → engine--C7zo-4M.cjs} +93 -13
- package/dist/engine--C7zo-4M.cjs.map +1 -0
- package/dist/{engine-CGGVDCqi.d.cts → engine-BTgwbHeO.d.cts} +49 -9
- package/dist/{engine-DpFIcbgh.d.mts → engine-C3xHfi3q.d.mts} +49 -9
- package/dist/{engine-Bufv0TbD.mjs → engine-CR75K253.mjs} +93 -13
- package/dist/engine-CR75K253.mjs.map +1 -0
- package/dist/entry-auth-better-auth.cjs +6 -3
- package/dist/entry-auth-better-auth.d.cts +4 -4
- package/dist/entry-auth-better-auth.d.mts +4 -4
- package/dist/entry-auth-better-auth.mjs +4 -4
- package/dist/entry-auth-jwt.cjs +6 -2
- package/dist/entry-auth-jwt.cjs.map +1 -1
- package/dist/entry-auth-jwt.d.cts +9 -3
- package/dist/entry-auth-jwt.d.mts +9 -3
- package/dist/entry-auth-jwt.mjs +4 -3
- package/dist/entry-auth-jwt.mjs.map +1 -1
- package/dist/entry-auth-session.cjs +6 -2
- package/dist/entry-auth-session.cjs.map +1 -1
- package/dist/entry-auth-session.d.cts +8 -3
- package/dist/entry-auth-session.d.mts +8 -3
- package/dist/entry-auth-session.mjs +4 -3
- package/dist/entry-auth-session.mjs.map +1 -1
- package/dist/entry-authorization-permissions.cjs +1 -1
- package/dist/entry-authorization-permissions.d.cts +1 -1
- package/dist/entry-authorization-permissions.d.mts +1 -1
- package/dist/entry-authorization-permissions.mjs +1 -1
- package/dist/entry-better-auth-client.d.cts +2 -2
- package/dist/entry-better-auth-client.d.mts +2 -2
- package/dist/entry-better-auth.cjs +1 -1
- package/dist/entry-better-auth.d.cts +2 -2
- package/dist/entry-better-auth.d.mts +2 -2
- package/dist/entry-better-auth.mjs +1 -1
- package/dist/entry-bridges-audit.d.cts +1 -1
- package/dist/entry-bridges-audit.d.mts +1 -1
- package/dist/entry-bridges-webhooks.d.cts +1 -1
- package/dist/entry-bridges-webhooks.d.mts +1 -1
- package/dist/entry-bun.cjs +2 -2
- package/dist/entry-bun.d.cts +4 -4
- package/dist/entry-bun.d.mts +4 -4
- package/dist/entry-bun.mjs +2 -2
- package/dist/entry-elysia.cjs +1 -1
- package/dist/entry-elysia.d.cts +4 -4
- package/dist/entry-elysia.d.mts +4 -4
- package/dist/entry-elysia.mjs +1 -1
- package/dist/entry-elysia2.cjs +1 -1
- package/dist/entry-elysia2.d.cts +4 -4
- package/dist/entry-elysia2.d.mts +4 -4
- package/dist/entry-elysia2.mjs +1 -1
- package/dist/entry-express.cjs +2 -2
- package/dist/entry-express.d.cts +4 -4
- package/dist/entry-express.d.mts +4 -4
- package/dist/entry-express.mjs +2 -2
- package/dist/entry-hono.cjs +2 -2
- package/dist/entry-hono.d.cts +4 -4
- package/dist/entry-hono.d.mts +4 -4
- package/dist/entry-hono.mjs +2 -2
- package/dist/entry-hooks-log.d.cts +1 -1
- package/dist/entry-hooks-log.d.mts +1 -1
- package/dist/entry-next.cjs +2 -2
- package/dist/entry-next.d.cts +5 -5
- package/dist/entry-next.d.mts +5 -5
- package/dist/entry-next.mjs +2 -2
- package/dist/entry-react.d.cts +2 -2
- package/dist/entry-react.d.mts +2 -2
- package/dist/{errors-bL3XQLfE.mjs → errors-CG_OLEEv.mjs} +12 -2
- package/dist/errors-CG_OLEEv.mjs.map +1 -0
- package/dist/{errors-vVYic8gz.cjs → errors-CjpymzFj.cjs} +17 -1
- package/dist/errors-CjpymzFj.cjs.map +1 -0
- package/dist/{guard-BOx5cnMP.mjs → guard-Bj8zk23F.mjs} +2 -2
- package/dist/{guard-BOx5cnMP.mjs.map → guard-Bj8zk23F.mjs.map} +1 -1
- package/dist/{guard-nwdOYe90.cjs → guard-DvaoUgjk.cjs} +2 -2
- package/dist/{guard-nwdOYe90.cjs.map → guard-DvaoUgjk.cjs.map} +1 -1
- package/dist/{guard-C3o7V14m.d.cts → guard-VEK0W8ug.d.cts} +4 -4
- package/dist/{guard-DCbTnqPz.d.mts → guard-k7A71SWC.d.mts} +4 -4
- package/dist/index.cjs +9 -6
- package/dist/index.d.cts +28 -10
- package/dist/index.d.mts +28 -10
- package/dist/index.mjs +7 -7
- package/dist/{kit-DMVBLBI9.d.mts → kit-51JtMxsn.d.mts} +8 -3
- package/dist/{kit-fzXHYb1l.mjs → kit-BM3uosfV.mjs} +23 -8
- package/dist/kit-BM3uosfV.mjs.map +1 -0
- package/dist/{kit-C7tepDB2.cjs → kit-BrqnCcDw.cjs} +28 -7
- package/dist/kit-BrqnCcDw.cjs.map +1 -0
- package/dist/{kit-qAROuhOI.d.cts → kit-DLF7DZrp.d.cts} +8 -3
- package/dist/{permissions-C9PjftY6.mjs → permissions-CeV6M3v7.mjs} +6 -3
- package/dist/permissions-CeV6M3v7.mjs.map +1 -0
- package/dist/{permissions-Cxri_P_k.cjs → permissions-DDEkHNvN.cjs} +6 -3
- package/dist/permissions-DDEkHNvN.cjs.map +1 -0
- package/dist/react-embed.js +1880 -1855
- package/dist/relationships-BLYEJ9tc.cjs.map +1 -1
- package/dist/relationships-BfLonEMI.mjs.map +1 -1
- package/dist/{routes-irNuuZqo.cjs → routes-B2LrYpT0.cjs} +15 -9
- package/dist/routes-B2LrYpT0.cjs.map +1 -0
- package/dist/{routes-DtRb3EO0.mjs → routes-Cx-kl4PY.mjs} +15 -9
- package/dist/routes-Cx-kl4PY.mjs.map +1 -0
- package/dist/{server-CJ7AIJpO.d.mts → server-Bn643UOy.d.mts} +4 -4
- package/dist/{server-C2F4H6bR.d.cts → server-YdH25OEA.d.cts} +4 -4
- package/dist/testing.cjs +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/types-elysia2/auth-provider/contract.d.ts +28 -0
- package/dist/types-elysia2/auth-provider/kit.d.ts +5 -0
- package/dist/types-elysia2/engine.d.ts +49 -8
- package/dist/types-elysia2/errors.d.ts +8 -0
- package/dist/types-elysia2/schema.d.ts +16 -0
- package/dist/types-elysia2/server/routes.d.ts +16 -5
- package/dist/types-react/engine.d.ts +49 -8
- package/dist/types-react/errors.d.ts +8 -0
- package/dist/types-react/schema.d.ts +16 -0
- package/dist/types-react/ui/App.d.ts +6 -1
- package/dist/types-react/ui/components/perm-bits.d.ts +5 -1
- package/dist/types-react/ui/types.d.ts +11 -2
- package/dist/ui/assets/index-DdvxpphI.js +104 -0
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/better-auth-DHyW5-yt.cjs.map +0 -1
- package/dist/better-auth-NO40ZqSM.mjs.map +0 -1
- package/dist/contract-CPmJVoRx.cjs.map +0 -1
- package/dist/contract-Yc5AZuvv.mjs.map +0 -1
- package/dist/create-fetch-handler-C-WyaRCR.cjs.map +0 -1
- package/dist/create-fetch-handler-ojjpk1Iw.mjs.map +0 -1
- package/dist/engine-Bufv0TbD.mjs.map +0 -1
- package/dist/engine-bMoz3iW-.cjs.map +0 -1
- package/dist/errors-bL3XQLfE.mjs.map +0 -1
- package/dist/errors-vVYic8gz.cjs.map +0 -1
- package/dist/kit-C7tepDB2.cjs.map +0 -1
- package/dist/kit-fzXHYb1l.mjs.map +0 -1
- package/dist/permissions-C9PjftY6.mjs.map +0 -1
- package/dist/permissions-Cxri_P_k.cjs.map +0 -1
- package/dist/routes-DtRb3EO0.mjs.map +0 -1
- package/dist/routes-irNuuZqo.cjs.map +0 -1
- package/dist/ui/assets/index-uXGOtyuj.js +0 -104
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_contract = require("./contract-
|
|
3
|
-
const require_kit = require("./kit-
|
|
2
|
+
const require_contract = require("./contract-Brnu9XXo.cjs");
|
|
3
|
+
const require_kit = require("./kit-BrqnCcDw.cjs");
|
|
4
4
|
//#region src/auth-provider/session.ts
|
|
5
5
|
/**
|
|
6
6
|
* A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the
|
|
@@ -68,10 +68,14 @@ function sessionProvider(options) {
|
|
|
68
68
|
});
|
|
69
69
|
} };
|
|
70
70
|
if (options.canManage) provider.canManage = options.canManage;
|
|
71
|
+
if (options.lookup) provider.lookupSubject = require_contract.mappedLookup(options.lookup, options.mapRole);
|
|
71
72
|
return provider;
|
|
72
73
|
}
|
|
73
74
|
//#endregion
|
|
75
|
+
exports.externalRoles = require_contract.externalRoles;
|
|
74
76
|
exports.identity = require_contract.identity;
|
|
77
|
+
exports.identityOf = require_kit.identityOf;
|
|
78
|
+
exports.mappedLookup = require_contract.mappedLookup;
|
|
75
79
|
exports.normalizeRoles = require_contract.normalizeRoles;
|
|
76
80
|
exports.sessionProvider = sessionProvider;
|
|
77
81
|
exports.splitRoles = require_contract.splitRoles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-auth-session.cjs","names":["identity","normalizeRoles"],"sources":["../src/auth-provider/session.ts"],"sourcesContent":["/**\n * A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the\n * session for a request and how to read a subject from it. Covers Auth.js, Clerk, Lucia-style\n * session tables and home-grown cookies in a few lines (recipes below and in `docs/AUTH.md`).\n *\n * @example Auth.js (Next.js) — the role exists only if your `jwt`/`session` callbacks copy it\n * ```ts\n * import { auth } from \"@/auth\";\n * sessionProvider({\n * getSession: () => auth(),\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role, name: s.user.name, email: s.user.email } : null),\n * });\n * ```\n *\n * @example Auth.js (any framework, `@auth/core`)\n * ```ts\n * import { Auth } from \"@auth/core\";\n * sessionProvider({\n * getSession: async (request) => {\n * const url = new URL(\"/auth/session\", request.url); // your Auth.js basePath\n * const res = await Auth(new Request(url, { headers: request.headers }), authConfig);\n * const data = await res.json();\n * return data && Object.keys(data).length ? data : null;\n * },\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role } : null),\n * });\n * ```\n *\n * @example Clerk (`@clerk/backend`) — `orgRole` is namespaced (`\"org:admin\"`)\n * ```ts\n * sessionProvider({\n * getSession: async (request) => {\n * const state = await clerkClient.authenticateRequest(request, { authorizedParties });\n * return state.isAuthenticated ? state.toAuth() : null;\n * },\n * map: (a) => ({ id: a.userId, role: a.orgRole ?? a.sessionClaims?.metadata?.role }),\n * mapRole: { \"org:admin\": \"admin\", \"org:member\": \"member\" },\n * });\n * ```\n *\n * @example Lucia-style session table\n * ```ts\n * sessionProvider({\n * getSession: (request) => {\n * const token = parseCookie(request.headers.get(\"cookie\"))[\"session\"];\n * return token ? validateSessionToken(token) : null; // → { session, user } | null\n * },\n * map: ({ user }) => ({ id: user.id, role: user.role, email: user.email }),\n * });\n * ```\n *\n * @module\n */\n\nimport {\n identity,\n normalizeRoles,\n type PermissionsAuthProvider,\n type ProviderRoleOptions,\n type SubjectIdentity,\n} from \"./contract.ts\";\n\n/** Options for {@link sessionProvider}. */\nexport interface SessionProviderOptions<S> extends ProviderRoleOptions {\n /** Load the session for a request. `null`/`undefined` = no session. Throwing = 500. */\n getSession(request: Request): S | null | undefined | Promise<S | null | undefined>;\n /**\n * Read the subject from a session. Return `null`/`undefined` when the session has no usable user\n * (e.g. an Auth.js session without `user.id`). `role` may be a string, a comma list or an array;\n * it is split and passed through `mapRole`.\n */\n map(session: S, request: Request): SubjectIdentity | null | undefined;\n}\n\n/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */\nexport function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider {\n const provider: PermissionsAuthProvider = {\n async getSubject(request) {\n const session = await options.getSession(request);\n if (session === null || session === undefined) return null;\n const mapped = options.map(session, request);\n if (!mapped) return null;\n return identity({ ...mapped, role: normalizeRoles(mapped.role, options.mapRole) });\n },\n };\n if (options.canManage) provider.canManage = options.canManage;\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"entry-auth-session.cjs","names":["identity","normalizeRoles","mappedLookup"],"sources":["../src/auth-provider/session.ts"],"sourcesContent":["/**\n * A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the\n * session for a request and how to read a subject from it. Covers Auth.js, Clerk, Lucia-style\n * session tables and home-grown cookies in a few lines (recipes below and in `docs/AUTH.md`).\n *\n * @example Auth.js (Next.js) — the role exists only if your `jwt`/`session` callbacks copy it\n * ```ts\n * import { auth } from \"@/auth\";\n * sessionProvider({\n * getSession: () => auth(),\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role, name: s.user.name, email: s.user.email } : null),\n * });\n * ```\n *\n * @example Auth.js (any framework, `@auth/core`)\n * ```ts\n * import { Auth } from \"@auth/core\";\n * sessionProvider({\n * getSession: async (request) => {\n * const url = new URL(\"/auth/session\", request.url); // your Auth.js basePath\n * const res = await Auth(new Request(url, { headers: request.headers }), authConfig);\n * const data = await res.json();\n * return data && Object.keys(data).length ? data : null;\n * },\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role } : null),\n * });\n * ```\n *\n * @example Clerk (`@clerk/backend`) — `orgRole` is namespaced (`\"org:admin\"`)\n * ```ts\n * sessionProvider({\n * getSession: async (request) => {\n * const state = await clerkClient.authenticateRequest(request, { authorizedParties });\n * return state.isAuthenticated ? state.toAuth() : null;\n * },\n * map: (a) => ({ id: a.userId, role: a.orgRole ?? a.sessionClaims?.metadata?.role }),\n * mapRole: { \"org:admin\": \"admin\", \"org:member\": \"member\" },\n * });\n * ```\n *\n * @example Lucia-style session table\n * ```ts\n * sessionProvider({\n * getSession: (request) => {\n * const token = parseCookie(request.headers.get(\"cookie\"))[\"session\"];\n * return token ? validateSessionToken(token) : null; // → { session, user } | null\n * },\n * map: ({ user }) => ({ id: user.id, role: user.role, email: user.email }),\n * });\n * ```\n *\n * @module\n */\n\nimport {\n identity,\n mappedLookup,\n normalizeRoles,\n type PermissionsAuthProvider,\n type ProviderRoleOptions,\n type SubjectIdentity,\n type SubjectLookupFn,\n} from \"./contract.ts\";\n\n/** Options for {@link sessionProvider}. */\nexport interface SessionProviderOptions<S> extends ProviderRoleOptions {\n /** Load the session for a request. `null`/`undefined` = no session. Throwing = 500. */\n getSession(request: Request): S | null | undefined | Promise<S | null | undefined>;\n /**\n * Read the subject from a session. Return `null`/`undefined` when the session has no usable user\n * (e.g. an Auth.js session without `user.id`). `role` may be a string, a comma list or an array;\n * it is split and passed through `mapRole`.\n */\n map(session: S, request: Request): SubjectIdentity | null | undefined;\n /**\n * Look a subject up by id without a session (your user table, your auth library's admin API).\n * Becomes the provider's `lookupSubject`; `role` is split and mapped like `map`'s. ADR 0014.\n */\n lookup?: SubjectLookupFn;\n}\n\n/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */\nexport function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider {\n const provider: PermissionsAuthProvider = {\n async getSubject(request) {\n const session = await options.getSession(request);\n if (session === null || session === undefined) return null;\n const mapped = options.map(session, request);\n if (!mapped) return null;\n return identity({ ...mapped, role: normalizeRoles(mapped.role, options.mapRole) });\n },\n };\n if (options.canManage) provider.canManage = options.canManage;\n if (options.lookup) provider.lookupSubject = mappedLookup(options.lookup, options.mapRole);\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,SAAgB,gBAAmB,SAA6D;CAC9F,MAAM,WAAoC,EACxC,MAAM,WAAW,SAAS;EACxB,MAAM,UAAU,MAAM,QAAQ,WAAW,OAAO;EAChD,IAAI,YAAY,QAAQ,YAAY,KAAA,GAAW,OAAO;EACtD,MAAM,SAAS,QAAQ,IAAI,SAAS,OAAO;EAC3C,IAAI,CAAC,QAAQ,OAAO;EACpB,OAAOA,iBAAAA,SAAS;GAAE,GAAG;GAAQ,MAAMC,iBAAAA,eAAe,OAAO,MAAM,QAAQ,OAAO;EAAE,CAAC;CACnF,EACF;CACA,IAAI,QAAQ,WAAW,SAAS,YAAY,QAAQ;CACpD,IAAI,QAAQ,QAAQ,SAAS,gBAAgBC,iBAAAA,aAAa,QAAQ,QAAQ,QAAQ,OAAO;CACzF,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as PermissionsSubject, h as SubjectIdentity } from "./catalog-DA_d1SdC.cjs";
|
|
2
|
-
import { a as normalizeRoles, i as
|
|
3
|
-
import { a as
|
|
2
|
+
import { a as externalRoles, c as normalizeRoles, i as SubjectLookupFn, l as splitRoles, n as ProviderRoleOptions, o as identity, r as RoleMapper, s as mappedLookup, t as PermissionsAuthProvider, u as stringField } from "./contract-BAisPHBw.cjs";
|
|
3
|
+
import { a as subjectOf, i as identityOf, n as KitAuthEngine, o as toKitAuth, r as ToKitAuthOptions, t as KitAuth } from "./kit-DLF7DZrp.cjs";
|
|
4
4
|
//#region src/auth-provider/session.d.ts
|
|
5
5
|
/** Options for {@link sessionProvider}. */
|
|
6
6
|
interface SessionProviderOptions<S> extends ProviderRoleOptions {
|
|
@@ -12,9 +12,14 @@ interface SessionProviderOptions<S> extends ProviderRoleOptions {
|
|
|
12
12
|
* it is split and passed through `mapRole`.
|
|
13
13
|
*/
|
|
14
14
|
map(session: S, request: Request): SubjectIdentity | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Look a subject up by id without a session (your user table, your auth library's admin API).
|
|
17
|
+
* Becomes the provider's `lookupSubject`; `role` is split and mapped like `map`'s. ADR 0014.
|
|
18
|
+
*/
|
|
19
|
+
lookup?: SubjectLookupFn;
|
|
15
20
|
}
|
|
16
21
|
/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */
|
|
17
22
|
declare function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider;
|
|
18
23
|
//#endregion
|
|
19
|
-
export { KitAuth, KitAuthEngine, PermissionsAuthProvider, type PermissionsSubject, ProviderRoleOptions, RoleMapper, type SessionProviderOptions, type SubjectIdentity, ToKitAuthOptions, identity, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
24
|
+
export { KitAuth, KitAuthEngine, PermissionsAuthProvider, type PermissionsSubject, ProviderRoleOptions, RoleMapper, type SessionProviderOptions, type SubjectIdentity, SubjectLookupFn, ToKitAuthOptions, externalRoles, identity, identityOf, mappedLookup, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
20
25
|
//# sourceMappingURL=entry-auth-session.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as PermissionsSubject, h as SubjectIdentity } from "./catalog-DJcJ3ycq.mjs";
|
|
2
|
-
import { a as normalizeRoles, i as
|
|
3
|
-
import { a as
|
|
2
|
+
import { a as externalRoles, c as normalizeRoles, i as SubjectLookupFn, l as splitRoles, n as ProviderRoleOptions, o as identity, r as RoleMapper, s as mappedLookup, t as PermissionsAuthProvider, u as stringField } from "./contract-D6j-yrBL.mjs";
|
|
3
|
+
import { a as subjectOf, i as identityOf, n as KitAuthEngine, o as toKitAuth, r as ToKitAuthOptions, t as KitAuth } from "./kit-51JtMxsn.mjs";
|
|
4
4
|
//#region src/auth-provider/session.d.ts
|
|
5
5
|
/** Options for {@link sessionProvider}. */
|
|
6
6
|
interface SessionProviderOptions<S> extends ProviderRoleOptions {
|
|
@@ -12,9 +12,14 @@ interface SessionProviderOptions<S> extends ProviderRoleOptions {
|
|
|
12
12
|
* it is split and passed through `mapRole`.
|
|
13
13
|
*/
|
|
14
14
|
map(session: S, request: Request): SubjectIdentity | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Look a subject up by id without a session (your user table, your auth library's admin API).
|
|
17
|
+
* Becomes the provider's `lookupSubject`; `role` is split and mapped like `map`'s. ADR 0014.
|
|
18
|
+
*/
|
|
19
|
+
lookup?: SubjectLookupFn;
|
|
15
20
|
}
|
|
16
21
|
/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */
|
|
17
22
|
declare function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider;
|
|
18
23
|
//#endregion
|
|
19
|
-
export { KitAuth, KitAuthEngine, PermissionsAuthProvider, type PermissionsSubject, ProviderRoleOptions, RoleMapper, type SessionProviderOptions, type SubjectIdentity, ToKitAuthOptions, identity, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
24
|
+
export { KitAuth, KitAuthEngine, PermissionsAuthProvider, type PermissionsSubject, ProviderRoleOptions, RoleMapper, type SessionProviderOptions, type SubjectIdentity, SubjectLookupFn, ToKitAuthOptions, externalRoles, identity, identityOf, mappedLookup, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
20
25
|
//# sourceMappingURL=entry-auth-session.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { n as toKitAuth, t as
|
|
1
|
+
import { a as splitRoles, i as normalizeRoles, n as identity, o as stringField, r as mappedLookup, t as externalRoles } from "./contract-BganM0fx.mjs";
|
|
2
|
+
import { n as subjectOf, r as toKitAuth, t as identityOf } from "./kit-BM3uosfV.mjs";
|
|
3
3
|
//#region src/auth-provider/session.ts
|
|
4
4
|
/**
|
|
5
5
|
* A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the
|
|
@@ -67,9 +67,10 @@ function sessionProvider(options) {
|
|
|
67
67
|
});
|
|
68
68
|
} };
|
|
69
69
|
if (options.canManage) provider.canManage = options.canManage;
|
|
70
|
+
if (options.lookup) provider.lookupSubject = mappedLookup(options.lookup, options.mapRole);
|
|
70
71
|
return provider;
|
|
71
72
|
}
|
|
72
73
|
//#endregion
|
|
73
|
-
export { identity, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
74
|
+
export { externalRoles, identity, identityOf, mappedLookup, normalizeRoles, sessionProvider, splitRoles, stringField, subjectOf, toKitAuth };
|
|
74
75
|
|
|
75
76
|
//# sourceMappingURL=entry-auth-session.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-auth-session.mjs","names":[],"sources":["../src/auth-provider/session.ts"],"sourcesContent":["/**\n * A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the\n * session for a request and how to read a subject from it. Covers Auth.js, Clerk, Lucia-style\n * session tables and home-grown cookies in a few lines (recipes below and in `docs/AUTH.md`).\n *\n * @example Auth.js (Next.js) — the role exists only if your `jwt`/`session` callbacks copy it\n * ```ts\n * import { auth } from \"@/auth\";\n * sessionProvider({\n * getSession: () => auth(),\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role, name: s.user.name, email: s.user.email } : null),\n * });\n * ```\n *\n * @example Auth.js (any framework, `@auth/core`)\n * ```ts\n * import { Auth } from \"@auth/core\";\n * sessionProvider({\n * getSession: async (request) => {\n * const url = new URL(\"/auth/session\", request.url); // your Auth.js basePath\n * const res = await Auth(new Request(url, { headers: request.headers }), authConfig);\n * const data = await res.json();\n * return data && Object.keys(data).length ? data : null;\n * },\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role } : null),\n * });\n * ```\n *\n * @example Clerk (`@clerk/backend`) — `orgRole` is namespaced (`\"org:admin\"`)\n * ```ts\n * sessionProvider({\n * getSession: async (request) => {\n * const state = await clerkClient.authenticateRequest(request, { authorizedParties });\n * return state.isAuthenticated ? state.toAuth() : null;\n * },\n * map: (a) => ({ id: a.userId, role: a.orgRole ?? a.sessionClaims?.metadata?.role }),\n * mapRole: { \"org:admin\": \"admin\", \"org:member\": \"member\" },\n * });\n * ```\n *\n * @example Lucia-style session table\n * ```ts\n * sessionProvider({\n * getSession: (request) => {\n * const token = parseCookie(request.headers.get(\"cookie\"))[\"session\"];\n * return token ? validateSessionToken(token) : null; // → { session, user } | null\n * },\n * map: ({ user }) => ({ id: user.id, role: user.role, email: user.email }),\n * });\n * ```\n *\n * @module\n */\n\nimport {\n identity,\n normalizeRoles,\n type PermissionsAuthProvider,\n type ProviderRoleOptions,\n type SubjectIdentity,\n} from \"./contract.ts\";\n\n/** Options for {@link sessionProvider}. */\nexport interface SessionProviderOptions<S> extends ProviderRoleOptions {\n /** Load the session for a request. `null`/`undefined` = no session. Throwing = 500. */\n getSession(request: Request): S | null | undefined | Promise<S | null | undefined>;\n /**\n * Read the subject from a session. Return `null`/`undefined` when the session has no usable user\n * (e.g. an Auth.js session without `user.id`). `role` may be a string, a comma list or an array;\n * it is split and passed through `mapRole`.\n */\n map(session: S, request: Request): SubjectIdentity | null | undefined;\n}\n\n/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */\nexport function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider {\n const provider: PermissionsAuthProvider = {\n async getSubject(request) {\n const session = await options.getSession(request);\n if (session === null || session === undefined) return null;\n const mapped = options.map(session, request);\n if (!mapped) return null;\n return identity({ ...mapped, role: normalizeRoles(mapped.role, options.mapRole) });\n },\n };\n if (options.canManage) provider.canManage = options.canManage;\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"entry-auth-session.mjs","names":[],"sources":["../src/auth-provider/session.ts"],"sourcesContent":["/**\n * A generic session getter as a {@link PermissionsAuthProvider} (ADR 0006): you say how to load the\n * session for a request and how to read a subject from it. Covers Auth.js, Clerk, Lucia-style\n * session tables and home-grown cookies in a few lines (recipes below and in `docs/AUTH.md`).\n *\n * @example Auth.js (Next.js) — the role exists only if your `jwt`/`session` callbacks copy it\n * ```ts\n * import { auth } from \"@/auth\";\n * sessionProvider({\n * getSession: () => auth(),\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role, name: s.user.name, email: s.user.email } : null),\n * });\n * ```\n *\n * @example Auth.js (any framework, `@auth/core`)\n * ```ts\n * import { Auth } from \"@auth/core\";\n * sessionProvider({\n * getSession: async (request) => {\n * const url = new URL(\"/auth/session\", request.url); // your Auth.js basePath\n * const res = await Auth(new Request(url, { headers: request.headers }), authConfig);\n * const data = await res.json();\n * return data && Object.keys(data).length ? data : null;\n * },\n * map: (s) => (s.user?.id ? { id: s.user.id, role: s.user.role } : null),\n * });\n * ```\n *\n * @example Clerk (`@clerk/backend`) — `orgRole` is namespaced (`\"org:admin\"`)\n * ```ts\n * sessionProvider({\n * getSession: async (request) => {\n * const state = await clerkClient.authenticateRequest(request, { authorizedParties });\n * return state.isAuthenticated ? state.toAuth() : null;\n * },\n * map: (a) => ({ id: a.userId, role: a.orgRole ?? a.sessionClaims?.metadata?.role }),\n * mapRole: { \"org:admin\": \"admin\", \"org:member\": \"member\" },\n * });\n * ```\n *\n * @example Lucia-style session table\n * ```ts\n * sessionProvider({\n * getSession: (request) => {\n * const token = parseCookie(request.headers.get(\"cookie\"))[\"session\"];\n * return token ? validateSessionToken(token) : null; // → { session, user } | null\n * },\n * map: ({ user }) => ({ id: user.id, role: user.role, email: user.email }),\n * });\n * ```\n *\n * @module\n */\n\nimport {\n identity,\n mappedLookup,\n normalizeRoles,\n type PermissionsAuthProvider,\n type ProviderRoleOptions,\n type SubjectIdentity,\n type SubjectLookupFn,\n} from \"./contract.ts\";\n\n/** Options for {@link sessionProvider}. */\nexport interface SessionProviderOptions<S> extends ProviderRoleOptions {\n /** Load the session for a request. `null`/`undefined` = no session. Throwing = 500. */\n getSession(request: Request): S | null | undefined | Promise<S | null | undefined>;\n /**\n * Read the subject from a session. Return `null`/`undefined` when the session has no usable user\n * (e.g. an Auth.js session without `user.id`). `role` may be a string, a comma list or an array;\n * it is split and passed through `mapRole`.\n */\n map(session: S, request: Request): SubjectIdentity | null | undefined;\n /**\n * Look a subject up by id without a session (your user table, your auth library's admin API).\n * Becomes the provider's `lookupSubject`; `role` is split and mapped like `map`'s. ADR 0014.\n */\n lookup?: SubjectLookupFn;\n}\n\n/** A {@link PermissionsAuthProvider} from a session getter and a mapping. */\nexport function sessionProvider<S>(options: SessionProviderOptions<S>): PermissionsAuthProvider {\n const provider: PermissionsAuthProvider = {\n async getSubject(request) {\n const session = await options.getSession(request);\n if (session === null || session === undefined) return null;\n const mapped = options.map(session, request);\n if (!mapped) return null;\n return identity({ ...mapped, role: normalizeRoles(mapped.role, options.mapRole) });\n },\n };\n if (options.canManage) provider.canManage = options.canManage;\n if (options.lookup) provider.lookupSubject = mappedLookup(options.lookup, options.mapRole);\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,SAAgB,gBAAmB,SAA6D;CAC9F,MAAM,WAAoC,EACxC,MAAM,WAAW,SAAS;EACxB,MAAM,UAAU,MAAM,QAAQ,WAAW,OAAO;EAChD,IAAI,YAAY,QAAQ,YAAY,KAAA,GAAW,OAAO;EACtD,MAAM,SAAS,QAAQ,IAAI,SAAS,OAAO;EAC3C,IAAI,CAAC,QAAQ,OAAO;EACpB,OAAO,SAAS;GAAE,GAAG;GAAQ,MAAM,eAAe,OAAO,MAAM,QAAQ,OAAO;EAAE,CAAC;CACnF,EACF;CACA,IAAI,QAAQ,WAAW,SAAS,YAAY,QAAQ;CACpD,IAAI,QAAQ,QAAQ,SAAS,gBAAgB,aAAa,QAAQ,QAAQ,QAAQ,OAAO;CACzF,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_permissions = require("./permissions-
|
|
2
|
+
const require_permissions = require("./permissions-DDEkHNvN.cjs");
|
|
3
3
|
exports.permissionsAuthorization = require_permissions.permissionsAuthorization;
|
|
4
4
|
exports.principalIdentity = require_permissions.principalIdentity;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as SubjectIdentity } from "./catalog-DA_d1SdC.cjs";
|
|
2
|
-
import { t as AnyPermissions } from "./engine-
|
|
2
|
+
import { t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
3
3
|
import { Principal } from "@xtandard/kit/auth";
|
|
4
4
|
import { AuthorizationProvider, AuthorizeInput } from "@xtandard/kit/authorization";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as SubjectIdentity } from "./catalog-DJcJ3ycq.mjs";
|
|
2
|
-
import { t as AnyPermissions } from "./engine-
|
|
2
|
+
import { t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
3
3
|
import { AuthorizationProvider, AuthorizeInput } from "@xtandard/kit/authorization";
|
|
4
4
|
import { Principal } from "@xtandard/kit/auth";
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as principalIdentity, t as permissionsAuthorization } from "./permissions-
|
|
1
|
+
import { n as principalIdentity, t as permissionsAuthorization } from "./permissions-CeV6M3v7.mjs";
|
|
2
2
|
export { permissionsAuthorization, principalIdentity };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as AnyPermissions } from "./engine-
|
|
2
|
-
import { i as PERMISSIONS_ERROR_CODES, t as PermissionsPlugin } from "./server-
|
|
1
|
+
import { t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
2
|
+
import { i as PERMISSIONS_ERROR_CODES, t as PermissionsPlugin } from "./server-YdH25OEA.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/better-auth/client.d.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as AnyPermissions } from "./engine-
|
|
2
|
-
import { i as PERMISSIONS_ERROR_CODES, t as PermissionsPlugin } from "./server-
|
|
1
|
+
import { t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
2
|
+
import { i as PERMISSIONS_ERROR_CODES, t as PermissionsPlugin } from "./server-Bn643UOy.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/better-auth/client.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-DakpK96I.cjs");
|
|
3
|
-
const require_better_auth = require("./better-auth-
|
|
3
|
+
const require_better_auth = require("./better-auth-MR7dBtpo.cjs");
|
|
4
4
|
const require_error_codes = require("./error-codes-9MRMSSMQ.cjs");
|
|
5
5
|
let valibot = require("valibot");
|
|
6
6
|
valibot = require_chunk.__toESM(valibot, 1);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as PERMISSIONS_ERROR_CODES, n as PermissionsPluginOptions, r as permissions, t as PermissionsPlugin } from "./server-
|
|
1
|
+
import { i as BetterAuthSessionLike, o as betterAuthProvider, r as BetterAuthProviderOptions, t as BetterAuthLike } from "./better-auth-vgRYgjYK.cjs";
|
|
2
|
+
import { i as PERMISSIONS_ERROR_CODES, n as PermissionsPluginOptions, r as permissions, t as PermissionsPlugin } from "./server-YdH25OEA.cjs";
|
|
3
3
|
export { type BetterAuthLike, type BetterAuthProviderOptions, type BetterAuthSessionLike, PERMISSIONS_ERROR_CODES, type PermissionsPlugin, type PermissionsPluginOptions, betterAuthProvider, permissions };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as PERMISSIONS_ERROR_CODES, n as PermissionsPluginOptions, r as permissions, t as PermissionsPlugin } from "./server-
|
|
1
|
+
import { i as BetterAuthSessionLike, o as betterAuthProvider, r as BetterAuthProviderOptions, t as BetterAuthLike } from "./better-auth-DQET1sXa.mjs";
|
|
2
|
+
import { i as PERMISSIONS_ERROR_CODES, n as PermissionsPluginOptions, r as permissions, t as PermissionsPlugin } from "./server-Bn643UOy.mjs";
|
|
3
3
|
export { type BetterAuthLike, type BetterAuthProviderOptions, type BetterAuthSessionLike, PERMISSIONS_ERROR_CODES, type PermissionsPlugin, type PermissionsPluginOptions, betterAuthProvider, permissions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as betterAuthIdentity, r as betterAuthProvider, t as asBetterAuthSession } from "./better-auth-
|
|
1
|
+
import { n as betterAuthIdentity, r as betterAuthProvider, t as asBetterAuthSession } from "./better-auth-BEmX8qyz.mjs";
|
|
2
2
|
import { t as PERMISSIONS_ERROR_CODES } from "./error-codes-CCKuDDu7.mjs";
|
|
3
3
|
import * as v from "valibot";
|
|
4
4
|
import { APIError, createAuthEndpoint, sessionMiddleware } from "better-auth/api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-CXPMGuHk.cjs";
|
|
2
2
|
import { t as PermissionsEventName } from "./events-AE4Ytqmz.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/bridges/audit.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-DhS23Pcp.mjs";
|
|
2
2
|
import { t as PermissionsEventName } from "./events-AE4Ytqmz.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/bridges/audit.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-CXPMGuHk.cjs";
|
|
2
2
|
import { t as PermissionsEventName } from "./events-AE4Ytqmz.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/bridges/webhooks.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { n as AfterEventType, s as PermissionsHooks, t as AfterEvent } from "./contract-DhS23Pcp.mjs";
|
|
2
2
|
import { t as PermissionsEventName } from "./events-AE4Ytqmz.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/bridges/webhooks.d.ts
|
package/dist/entry-bun.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_fetch_handler = require("./create-fetch-handler-
|
|
3
|
-
const require_guard = require("./guard-
|
|
2
|
+
const require_create_fetch_handler = require("./create-fetch-handler-BHT4vSZs.cjs");
|
|
3
|
+
const require_guard = require("./guard-DvaoUgjk.cjs");
|
|
4
4
|
//#region src/adapters/bun.ts
|
|
5
5
|
/** Create a Bun-ready panel handler (`fetch` + `engine` + `openapi`). */
|
|
6
6
|
function permissionsPanel(options) {
|
package/dist/entry-bun.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-CXPMGuHk.cjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-VEK0W8ug.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/adapters/bun.d.ts
|
|
8
8
|
/** Create a Bun-ready panel handler (`fetch` + `engine` + `openapi`). */
|
package/dist/entry-bun.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-DhS23Pcp.mjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-B711wb64.mjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-k7A71SWC.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/adapters/bun.d.ts
|
|
8
8
|
/** Create a Bun-ready panel handler (`fetch` + `engine` + `openapi`). */
|
package/dist/entry-bun.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createFetchHandler } from "./create-fetch-handler-
|
|
2
|
-
import { a as guardFetchRelation, i as guardFetch, r as guardEngine, s as relationGuardEngine } from "./guard-
|
|
1
|
+
import { t as createFetchHandler } from "./create-fetch-handler-B0twltQL.mjs";
|
|
2
|
+
import { a as guardFetchRelation, i as guardFetch, r as guardEngine, s as relationGuardEngine } from "./guard-Bj8zk23F.mjs";
|
|
3
3
|
//#region src/adapters/bun.ts
|
|
4
4
|
/** Create a Bun-ready panel handler (`fetch` + `engine` + `openapi`). */
|
|
5
5
|
function permissionsPanel(options) {
|
package/dist/entry-elysia.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_elysia_shared = require("./elysia-shared-
|
|
2
|
+
const require_elysia_shared = require("./elysia-shared-BFcWzfc9.cjs");
|
|
3
3
|
let elysia = require("elysia");
|
|
4
4
|
//#region src/adapters/elysia.ts
|
|
5
5
|
/**
|
package/dist/entry-elysia.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { i as Permissions } from "./engine-
|
|
3
|
-
import { n as PermissionsPanelOptions } from "./create-fetch-handler-
|
|
4
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-
|
|
5
|
-
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-
|
|
2
|
+
import { i as Permissions } from "./engine-BTgwbHeO.cjs";
|
|
3
|
+
import { n as PermissionsPanelOptions } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
4
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-VEK0W8ug.cjs";
|
|
5
|
+
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-C2LnDOj3.cjs";
|
|
6
6
|
import { Elysia } from "elysia";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/elysia.d.ts
|
package/dist/entry-elysia.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { i as Permissions } from "./engine-
|
|
3
|
-
import { n as PermissionsPanelOptions } from "./create-fetch-handler-
|
|
4
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-
|
|
5
|
-
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-
|
|
2
|
+
import { i as Permissions } from "./engine-C3xHfi3q.mjs";
|
|
3
|
+
import { n as PermissionsPanelOptions } from "./create-fetch-handler-B711wb64.mjs";
|
|
4
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-k7A71SWC.mjs";
|
|
5
|
+
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-WuDr0jco.mjs";
|
|
6
6
|
import { Elysia } from "elysia";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/elysia.d.ts
|
package/dist/entry-elysia.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as requireRelation, n as permissionsPanel, r as requirePermission, t as createPass } from "./elysia-shared-
|
|
1
|
+
import { i as requireRelation, n as permissionsPanel, r as requirePermission, t as createPass } from "./elysia-shared-BwUYg0Ln.mjs";
|
|
2
2
|
import { Elysia, t } from "elysia";
|
|
3
3
|
//#region src/adapters/elysia.ts
|
|
4
4
|
/**
|
package/dist/entry-elysia2.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_elysia_shared = require("./elysia-shared-
|
|
2
|
+
const require_elysia_shared = require("./elysia-shared-BFcWzfc9.cjs");
|
|
3
3
|
let elysia = require("elysia");
|
|
4
4
|
//#region src/adapters/elysia2.ts
|
|
5
5
|
/**
|
package/dist/entry-elysia2.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { i as Permissions } from "./engine-
|
|
3
|
-
import { n as PermissionsPanelOptions } from "./create-fetch-handler-
|
|
4
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-
|
|
5
|
-
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-
|
|
2
|
+
import { i as Permissions } from "./engine-BTgwbHeO.cjs";
|
|
3
|
+
import { n as PermissionsPanelOptions } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
4
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-VEK0W8ug.cjs";
|
|
5
|
+
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-C2LnDOj3.cjs";
|
|
6
6
|
import { Elysia } from "elysia";
|
|
7
7
|
|
|
8
8
|
//#region node_modules/@sinclair/typebox/build/cjs/type/symbols/symbols.d.ts
|
package/dist/entry-elysia2.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { i as Permissions } from "./engine-
|
|
3
|
-
import { n as PermissionsPanelOptions } from "./create-fetch-handler-
|
|
4
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-
|
|
5
|
-
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-
|
|
2
|
+
import { i as Permissions } from "./engine-C3xHfi3q.mjs";
|
|
3
|
+
import { n as PermissionsPanelOptions } from "./create-fetch-handler-B711wb64.mjs";
|
|
4
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput } from "./guard-k7A71SWC.mjs";
|
|
5
|
+
import { a as requirePermission, i as permissionsPanel, n as ElysiaPermissionsHandler, o as requireRelation, r as PermissionsElysiaOptions, t as ElysiaGuardContext } from "./elysia-shared-WuDr0jco.mjs";
|
|
6
6
|
import { Elysia } from "elysia";
|
|
7
7
|
|
|
8
8
|
//#region node_modules/@sinclair/typebox/build/cjs/type/symbols/symbols.d.ts
|
package/dist/entry-elysia2.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as requireRelation, n as permissionsPanel, r as requirePermission, t as createPass } from "./elysia-shared-
|
|
1
|
+
import { i as requireRelation, n as permissionsPanel, r as requirePermission, t as createPass } from "./elysia-shared-BwUYg0Ln.mjs";
|
|
2
2
|
import { Elysia, t } from "elysia";
|
|
3
3
|
//#region src/adapters/elysia2.ts
|
|
4
4
|
/**
|
package/dist/entry-express.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_fetch_handler = require("./create-fetch-handler-
|
|
3
|
-
const require_guard = require("./guard-
|
|
2
|
+
const require_create_fetch_handler = require("./create-fetch-handler-BHT4vSZs.cjs");
|
|
3
|
+
const require_guard = require("./guard-DvaoUgjk.cjs");
|
|
4
4
|
let _xtandard_kit_adapters_express = require("@xtandard/kit/adapters/express");
|
|
5
5
|
let _xtandard_kit_adapters_node = require("@xtandard/kit/adapters/node");
|
|
6
6
|
//#region src/adapters/express.ts
|
package/dist/entry-express.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-CXPMGuHk.cjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-VEK0W8ug.cjs";
|
|
6
6
|
import { NextFunction, Request as Request$1, Response } from "express";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/express.d.ts
|
package/dist/entry-express.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-DhS23Pcp.mjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-B711wb64.mjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-k7A71SWC.mjs";
|
|
6
6
|
import { NextFunction, Request as Request$1, Response } from "express";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/express.d.ts
|
package/dist/entry-express.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createFetchHandler } from "./create-fetch-handler-
|
|
2
|
-
import { c as relationOutcomeResponse, n as evaluateRelationGuard, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-
|
|
1
|
+
import { t as createFetchHandler } from "./create-fetch-handler-B0twltQL.mjs";
|
|
2
|
+
import { c as relationOutcomeResponse, n as evaluateRelationGuard, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-Bj8zk23F.mjs";
|
|
3
3
|
import { toExpressMiddleware } from "@xtandard/kit/adapters/express";
|
|
4
4
|
import { headersFrom, writeWebResponse } from "@xtandard/kit/adapters/node";
|
|
5
5
|
//#region src/adapters/express.ts
|
package/dist/entry-hono.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_fetch_handler = require("./create-fetch-handler-
|
|
3
|
-
const require_guard = require("./guard-
|
|
2
|
+
const require_create_fetch_handler = require("./create-fetch-handler-BHT4vSZs.cjs");
|
|
3
|
+
const require_guard = require("./guard-DvaoUgjk.cjs");
|
|
4
4
|
let _xtandard_kit_adapters_hono = require("@xtandard/kit/adapters/hono");
|
|
5
5
|
let hono = require("hono");
|
|
6
6
|
//#region src/adapters/hono.ts
|
package/dist/entry-hono.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-CXPMGuHk.cjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-VEK0W8ug.cjs";
|
|
6
6
|
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/hono.d.ts
|
package/dist/entry-hono.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { h as CheckResult } from "./contract-
|
|
3
|
-
import { t as AnyPermissions } from "./engine-
|
|
4
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
5
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { h as CheckResult } from "./contract-DhS23Pcp.mjs";
|
|
3
|
+
import { t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
4
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-B711wb64.mjs";
|
|
5
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-k7A71SWC.mjs";
|
|
6
6
|
import { Context, Hono, MiddlewareHandler } from "hono";
|
|
7
7
|
|
|
8
8
|
//#region src/adapters/hono.d.ts
|
package/dist/entry-hono.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createFetchHandler } from "./create-fetch-handler-
|
|
2
|
-
import { c as relationOutcomeResponse, n as evaluateRelationGuard, o as outcomeResponse, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-
|
|
1
|
+
import { t as createFetchHandler } from "./create-fetch-handler-B0twltQL.mjs";
|
|
2
|
+
import { c as relationOutcomeResponse, n as evaluateRelationGuard, o as outcomeResponse, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-Bj8zk23F.mjs";
|
|
3
3
|
import { mountPanel } from "@xtandard/kit/adapters/hono";
|
|
4
4
|
import { Hono } from "hono";
|
|
5
5
|
//#region src/adapters/hono.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as BeforeEvent, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { r as BeforeEvent, s as PermissionsHooks, t as AfterEvent } from "./contract-CXPMGuHk.cjs";
|
|
2
2
|
import * as kit from "@xtandard/kit/hooks/log";
|
|
3
3
|
|
|
4
4
|
//#region src/hooks/log.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as BeforeEvent, s as PermissionsHooks, t as AfterEvent } from "./contract-
|
|
1
|
+
import { r as BeforeEvent, s as PermissionsHooks, t as AfterEvent } from "./contract-DhS23Pcp.mjs";
|
|
2
2
|
import * as kit from "@xtandard/kit/hooks/log";
|
|
3
3
|
|
|
4
4
|
//#region src/hooks/log.d.ts
|
package/dist/entry-next.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_create_fetch_handler = require("./create-fetch-handler-
|
|
3
|
-
const require_guard = require("./guard-
|
|
2
|
+
const require_create_fetch_handler = require("./create-fetch-handler-BHT4vSZs.cjs");
|
|
3
|
+
const require_guard = require("./guard-DvaoUgjk.cjs");
|
|
4
4
|
let _xtandard_kit_adapters_next = require("@xtandard/kit/adapters/next");
|
|
5
5
|
//#region src/adapters/next.ts
|
|
6
6
|
/** Create the panel (a `createFetchHandler` result): pass it to {@link toNextHandler}. */
|
package/dist/entry-next.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-DFq_SYR3.cjs";
|
|
2
|
-
import { t as PermissionsAuthProvider } from "./contract-
|
|
3
|
-
import { h as CheckResult, w as PermissionsSnapshot } from "./contract-
|
|
4
|
-
import { l as SubjectInput, t as AnyPermissions } from "./engine-
|
|
5
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
6
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { t as PermissionsAuthProvider } from "./contract-BAisPHBw.cjs";
|
|
3
|
+
import { h as CheckResult, w as PermissionsSnapshot } from "./contract-CXPMGuHk.cjs";
|
|
4
|
+
import { l as SubjectInput, t as AnyPermissions } from "./engine-BTgwbHeO.cjs";
|
|
5
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-DxhvXuBA.cjs";
|
|
6
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-VEK0W8ug.cjs";
|
|
7
7
|
import { NextRouteHandler, NextRouteHandlers, toNextHandler } from "@xtandard/kit/adapters/next";
|
|
8
8
|
|
|
9
9
|
//#region src/adapters/next.d.ts
|
package/dist/entry-next.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as Definition } from "./policy-CGA6QD0a.mjs";
|
|
2
|
-
import { t as PermissionsAuthProvider } from "./contract-
|
|
3
|
-
import { h as CheckResult, w as PermissionsSnapshot } from "./contract-
|
|
4
|
-
import { l as SubjectInput, t as AnyPermissions } from "./engine-
|
|
5
|
-
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-
|
|
6
|
-
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-
|
|
2
|
+
import { t as PermissionsAuthProvider } from "./contract-D6j-yrBL.mjs";
|
|
3
|
+
import { h as CheckResult, w as PermissionsSnapshot } from "./contract-DhS23Pcp.mjs";
|
|
4
|
+
import { l as SubjectInput, t as AnyPermissions } from "./engine-C3xHfi3q.mjs";
|
|
5
|
+
import { n as PermissionsPanelOptions, t as CreateFetchHandlerResult } from "./create-fetch-handler-B711wb64.mjs";
|
|
6
|
+
import { a as RequireRelationOptions, i as RequirePermissionOptions, n as RelationDecision, r as RelationObjectInput, t as PathOf } from "./guard-k7A71SWC.mjs";
|
|
7
7
|
import { NextRouteHandler, NextRouteHandlers, toNextHandler } from "@xtandard/kit/adapters/next";
|
|
8
8
|
|
|
9
9
|
//#region src/adapters/next.d.ts
|
package/dist/entry-next.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as createFetchHandler } from "./create-fetch-handler-
|
|
2
|
-
import { c as relationOutcomeResponse, n as evaluateRelationGuard, o as outcomeResponse, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-
|
|
1
|
+
import { t as createFetchHandler } from "./create-fetch-handler-B0twltQL.mjs";
|
|
2
|
+
import { c as relationOutcomeResponse, n as evaluateRelationGuard, o as outcomeResponse, r as guardEngine, s as relationGuardEngine, t as evaluateGuard } from "./guard-Bj8zk23F.mjs";
|
|
3
3
|
import { toNextHandler } from "@xtandard/kit/adapters/next";
|
|
4
4
|
//#region src/adapters/next.ts
|
|
5
5
|
/** Create the panel (a `createFetchHandler` result): pass it to {@link toNextHandler}. */
|
package/dist/entry-react.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as CheckExplanation, s as Definition, t as Ability, y as RulesPaths } from "./policy-DFq_SYR3.cjs";
|
|
2
2
|
import { c as PermissionOf, f as PermissionsSubject, i as DefinitionOf, m as RoleOf, r as CtxOf, t as AnyPermissionsCatalog } from "./catalog-DA_d1SdC.cjs";
|
|
3
|
-
import { w as PermissionsSnapshot } from "./contract-
|
|
4
|
-
import { r as PathData } from "./engine-
|
|
3
|
+
import { w as PermissionsSnapshot } from "./contract-CXPMGuHk.cjs";
|
|
4
|
+
import { r as PathData } from "./engine-BTgwbHeO.cjs";
|
|
5
5
|
import React from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/react/index.d.ts
|
package/dist/entry-react.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as CheckExplanation, s as Definition, t as Ability, y as RulesPaths } from "./policy-CGA6QD0a.mjs";
|
|
2
2
|
import { c as PermissionOf, f as PermissionsSubject, i as DefinitionOf, m as RoleOf, r as CtxOf, t as AnyPermissionsCatalog } from "./catalog-DJcJ3ycq.mjs";
|
|
3
|
-
import { w as PermissionsSnapshot } from "./contract-
|
|
4
|
-
import { r as PathData } from "./engine-
|
|
3
|
+
import { w as PermissionsSnapshot } from "./contract-DhS23Pcp.mjs";
|
|
4
|
+
import { r as PathData } from "./engine-C3xHfi3q.mjs";
|
|
5
5
|
import React from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/react/index.d.ts
|