@vite-hub/auth 0.7.0 → 0.8.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 +58 -5
- package/dist/{abilities-CfvuGrBv.d.ts → abilities-IOwpkcz4.d.ts} +1 -1
- package/dist/abilities.d.ts +1 -1
- package/dist/{ability-error-OKoyOwPM.js → ability-error-DgR91Jwc.js} +1 -1
- package/dist/{access-pages-Bej95blM.js → access-pages-C69nwa99.js} +1 -1
- package/dist/agent.js +11 -11
- package/dist/{auth-instance-5RSiFTDC.js → auth-instance-WeEK1zDd.js} +39 -17
- package/dist/cli.js +1 -1
- package/dist/client-extension-BgUlm6hy.d.ts +33 -0
- package/dist/client-request-B1DCz3a9.js +29 -0
- package/dist/{console-runtime-XcplYv4R.d.ts → console-runtime-C71weVrt.d.ts} +1 -1
- package/dist/{console-runtime-Bg_PAl7e.js → console-runtime-Dk3j4Jmz.js} +2 -2
- package/dist/console-runtime.d.ts +2 -2
- package/dist/console-runtime.js +1 -1
- package/dist/console.d.ts +1 -1
- package/dist/{database-options-DE9lMwu1.js → database-options-Cms7BI3c.js} +12 -4
- package/dist/{database-schema-options-CCQsNhjc.js → database-schema-options-IlHEeUBK.js} +1 -1
- package/dist/database.d.ts +1 -1
- package/dist/database.js +12 -7
- package/dist/{definition-DeEeqTLC.js → definition-EpeI5LUG.js} +3 -3
- package/dist/{error-diagnostics-DkzL9ltR.js → error-diagnostics-DZHuHXPP.js} +33 -1
- package/dist/{events-BUaoHFoC.js → events-Cm7Iwq47.js} +1 -1
- package/dist/extension-BWmjJhoN.d.ts +59 -0
- package/dist/extension-mCx4TrsO.js +133 -0
- package/dist/forward.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/dist/internal/server.d.ts +3 -3
- package/dist/internal/server.js +5 -5
- package/dist/{mcp-config-C7srUMIZ.js → mcp-config-Bbr8kQxm.js} +9 -1
- package/dist/{mcp-token-DgveSGEl.js → mcp-token-BleQZK6H.js} +28 -5
- package/dist/{mcp-token-DG1jmw4o.d.ts → mcp-token-CxpopXmK.d.ts} +4 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +26 -5
- package/dist/{members-CRlYyxVk.js → members-7OMdqha_.js} +2 -2
- package/dist/nuxt.d.ts +4 -14
- package/dist/nuxt.js +29 -9
- package/dist/{own-access-BvVUjaeL.d.ts → own-access-CGiai2L3.d.ts} +1 -1
- package/dist/presets.js +1 -1
- package/dist/runtime/client-request-plugin.d.ts +2 -1
- package/dist/runtime/client-request-plugin.js +8 -5
- package/dist/runtime/console.d.ts +1 -1
- package/dist/runtime/console.js +2 -2
- package/dist/runtime/empty-abilities.d.ts +1 -1
- package/dist/runtime/empty-client.d.ts +3 -0
- package/dist/runtime/empty-client.js +3 -1
- package/dist/runtime/empty-definition.d.ts +1 -1
- package/dist/runtime/server.d.ts +4 -3
- package/dist/runtime/server.js +3 -2
- package/dist/runtime/vue-nuxt.js +1 -1
- package/dist/schema.d.ts +32 -14
- package/dist/schema.js +21 -14
- package/dist/{server-iQNOXyfS.js → server-5t-HA7I1.js} +41 -316
- package/dist/{server-1G_BbfBD.d.ts → server-DyP1v-sZ.d.ts} +25 -6
- package/dist/{server-B8kTFrHP.d.ts → server-mmp8EfcE.d.ts} +3 -2
- package/dist/server.d.ts +3 -3
- package/dist/server.js +4 -4
- package/dist/{session-cookies-DN0svCKj.js → session-cookies-BNtY3hMp.js} +4 -16
- package/dist/{set-cookie-CMB3t4NF.js → set-cookie-Bva-P-_C.js} +1 -1
- package/dist/{table-specs-C3-bLOSF.js → table-specs-Bm7QJCbu.js} +1 -1
- package/dist/{table-specs-P4LvbOlX.d.ts → table-specs-BxKeFD_y.d.ts} +5 -0
- package/dist/test.d.ts +1 -1
- package/dist/test.js +2 -2
- package/dist/{types-BmRGse4l.d.ts → types-CnO5bHEF.d.ts} +20 -2
- package/dist/{vite-GRzej8Cs.js → vite-7I1bJvqA.js} +641 -240
- package/dist/vite-CZ_Z6IR3.d.ts +28 -0
- package/dist/vite.d.ts +33 -13
- package/dist/vite.js +1 -1
- package/dist/vue.d.ts +4 -3
- package/dist/vue.js +39 -4
- package/package.json +8 -8
- package/dist/client-request-BzMKtfCY.js +0 -52
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AuthPreset } from "./presets-C6AtiRdI.js";
|
|
2
|
-
import { i as AuthSchemaOptions } from "./table-specs-
|
|
2
|
+
import { i as AuthSchemaOptions } from "./table-specs-BxKeFD_y.js";
|
|
3
3
|
import { AccessAuthorizationContext, AccessAuthorize, AccessAuthorizeResult, AnonymousAccessAuthorizationContext, AnonymousAccessAuthorize, Duration } from "@vite-hub/runtime";
|
|
4
4
|
import { ViteHubContext as ViteHubContext$1 } from "@vite-hub/runtime/internal/h3";
|
|
5
5
|
import { Auth, BetterAuthOptions, DBAdapter, Session, User } from "better-auth";
|
|
@@ -561,6 +561,17 @@ type AuthDefinitionInput = AuthDefinitionOptions | AuthDefinitionResolver;
|
|
|
561
561
|
interface AuthDefinition<TOptions extends AuthDefinitionInput = AuthDefinitionInput> {
|
|
562
562
|
options: TOptions;
|
|
563
563
|
}
|
|
564
|
+
/** One file of the resolved source list, with what it adds. `vitehub inspect definitions` lists them. */
|
|
565
|
+
interface AuthSourceSummary {
|
|
566
|
+
/** The absolute path of the file. */
|
|
567
|
+
file: string;
|
|
568
|
+
/** The path from the project root, which diagnostics and `vitehub inspect definitions` show. */
|
|
569
|
+
name: string;
|
|
570
|
+
/** The entries of `plugins` as the file writes them, without arguments, such as `admin()`. */
|
|
571
|
+
plugins: string[];
|
|
572
|
+
/** The fields that the file declares, as `model.field`. */
|
|
573
|
+
fields: string[];
|
|
574
|
+
}
|
|
564
575
|
interface DiscoveredAuthDefinition {
|
|
565
576
|
handler: string;
|
|
566
577
|
name: "default";
|
|
@@ -608,6 +619,13 @@ interface ResolvedAuthViteConfig {
|
|
|
608
619
|
/** `true` when the static Definition sets no `database` or `preset`, so only a development server can run it. */
|
|
609
620
|
implicitMemory?: true;
|
|
610
621
|
definition: DiscoveredAuthDefinition;
|
|
622
|
+
/** The project root for generated Auth files, independent of the Definition discovery root. */
|
|
623
|
+
projectRoot: string;
|
|
624
|
+
/**
|
|
625
|
+
* The resolved source list: the Auth Definition first, then each `server/auth.extend.ts` in merge order, with the
|
|
626
|
+
* plugins and fields that the file adds.
|
|
627
|
+
*/
|
|
628
|
+
sources: AuthSourceSummary[];
|
|
611
629
|
rootDir: string;
|
|
612
630
|
route: false | string;
|
|
613
631
|
}
|
|
@@ -627,4 +645,4 @@ type RegisteredAuth<TRegistry = ViteHub.AuthRegistry> = TRegistry extends {
|
|
|
627
645
|
} ? AuthFor<TDefinition> : ViteHubAuth;
|
|
628
646
|
/** `false` turns Auth off. `server/auth.ts` turns it on, and `defineAuth()` holds every Auth option. */
|
|
629
647
|
type AuthOptions = false;
|
|
630
|
-
export {
|
|
648
|
+
export { AuthConsoleEvent as $, AuthRuntimeEnv as A, AuthEvent as At, AuthViteHubOptions as B, AuthEventWindow as Bt, AuthGuardedHandler as C, authConsoleEventGroups as Ct, AuthReservedOption as D, AuthRole as Dt, AuthRequestInput as E, AuthPages as Et, AuthSessionRefresh as F, AuthEventMetadata as Ft, ViteHubAuth as G, RegisteredAuth as H, createDatabaseAuthEventStore as Ht, AuthSessionRefreshContext as I, AuthEventPage as It, AuthConsoleActivityQuery as J, AuthConsoleAction as K, AuthSessionRefreshFields as L, AuthEventRetention as Lt, AuthRuntimeOption as M, AuthEventAggregates as Mt, AuthRuntimeOptions as N, AuthEventCounts as Nt, AuthResolvedDefinitionOptions as O, hasRole as Ot, AuthSessionOptions as P, AuthEventListInput as Pt, AuthConsoleDescription as Q, AuthSignInConfiguration as R, AuthEventStore as Rt, AuthFor as S, authConsoleActionNames as St, AuthRequest as T, AuthPageMode as Tt, ResolvedAuthAccessRoute as U, defaultAuthEventRetention as Ut, DiscoveredAuthDefinition as V, AuthEventsConfiguration as Vt, ResolvedAuthViteConfig as W, AuthConsoleCapability as X, AuthConsoleAgent as Y, AuthConsoleColumn as Z, AuthDefinition as _, AuthConsoleSession as _t, AuthAccessPolicy as a, AuthConsoleHostOptions as at, AuthDefinitionResolver as b, AuthConsoleUserDetail as bt, AuthAccessRouteConfiguration as c, AuthConsoleMutation as ct, AuthAnonymousGuardedHandler as d, AuthConsoleOrganizationDetail as dt, AuthConsoleEventGroup as et, AuthAppDatabase as f, AuthConsoleOverview as ft, AuthComponentsOptions as g, AuthConsoleRoles as gt, AuthBetterAuthRuntimeOptions as h, AuthConsoleQuery as ht, AuthAccessConfiguration as i, AuthConsoleFieldType as it, AuthRuntimeOnlyOptions as j, AuthEventActor as jt, AuthRuntimeContext as k, AuthDevice as kt, AuthAnonymousAuthorization as l, AuthConsoleOptions as lt, AuthBetterAuthOptions as m, AuthConsolePolicy as mt, AuthAccessAuthorize as n, AuthConsoleField as nt, AuthAccessPolicyContext as o, AuthConsoleImpersonation as ot, AuthAuthorization as p, AuthConsolePage as pt, AuthConsoleActivity as q, AuthAccessAuthorizeResult as r, AuthConsoleFieldPolicy as rt, AuthAccessRoute as s, AuthConsoleList as st, AuthAccessAuthorizationContext as t, AuthConsoleEventUser as tt, AuthAnonymousAuthorize as u, AuthConsoleOrganization as ut, AuthDefinitionInput as v, AuthConsoleSessionUser as vt, AuthOptions as w, AuthPageMeta as wt, AuthDeleteAccountOptions as x, AuthConsoleValue as xt, AuthDefinitionOptions as y, AuthConsoleUser as yt, AuthSourceSummary as z, AuthEventType as zt };
|