@entro314labs/entro-auth 1.8.0-beta.11 → 1.8.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.mjs +4 -4
- package/dist/api/dispatch.d.mts +1 -1
- package/dist/api/dispatch.mjs +4 -4
- package/dist/api/index.d.mts +20 -20
- package/dist/api/index.mjs +7 -7
- package/dist/api/middlewares/authorization.mjs +1 -1
- package/dist/api/middlewares/origin-check.mjs +4 -4
- package/dist/api/rate-limiter/index.mjs +1 -1
- package/dist/api/routes/account.d.mts +2 -2
- package/dist/api/routes/account.mjs +5 -5
- package/dist/api/routes/callback.d.mts +1 -1
- package/dist/api/routes/callback.mjs +3 -3
- package/dist/api/routes/email-verification.d.mts +1 -1
- package/dist/api/routes/email-verification.mjs +6 -6
- package/dist/api/routes/error.mjs +2 -2
- package/dist/api/routes/id-token-nonce.d.mts +1 -1
- package/dist/api/routes/id-token-nonce.mjs +3 -3
- package/dist/api/routes/ok.mjs +1 -1
- package/dist/api/routes/password.mjs +4 -4
- package/dist/api/routes/session.d.mts +2 -2
- package/dist/api/routes/session.mjs +3 -3
- package/dist/api/routes/sign-in.d.mts +2 -2
- package/dist/api/routes/sign-in.mjs +5 -5
- package/dist/api/routes/sign-out.mjs +2 -2
- package/dist/api/routes/sign-up.d.mts +1 -1
- package/dist/api/routes/sign-up.mjs +6 -6
- package/dist/api/routes/update-session.d.mts +1 -1
- package/dist/api/routes/update-session.mjs +3 -3
- package/dist/api/routes/update-user.d.mts +1 -1
- package/dist/api/routes/update-user.mjs +4 -4
- package/dist/api/to-auth-endpoints.mjs +2 -2
- package/dist/auth/base.mjs +2 -2
- package/dist/auth/full.d.mts +1 -1
- package/dist/auth/minimal.d.mts +1 -1
- package/dist/auth/trusted-origins.mjs +1 -1
- package/dist/client/config.d.mts +10 -10
- package/dist/client/config.mjs +2 -2
- package/dist/client/index.d.mts +2 -2
- package/dist/client/lynx/index.d.mts +3 -3
- package/dist/client/lynx/index.mjs +1 -1
- package/dist/client/lynx/lynx-store.d.mts +1 -1
- package/dist/client/lynx/lynx-store.mjs +1 -1
- package/dist/client/path-to-object.d.mts +3 -3
- package/dist/client/proxy.mjs +2 -2
- package/dist/client/query.d.mts +2 -2
- package/dist/client/query.mjs +1 -1
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.mjs +1 -1
- package/dist/client/react/react-store.mjs +1 -1
- package/dist/client/session-atom.d.mts +2 -2
- package/dist/client/session-atom.mjs +1 -1
- package/dist/client/solid/index.d.mts +4 -4
- package/dist/client/solid/index.mjs +1 -1
- package/dist/client/svelte/index.d.mts +4 -4
- package/dist/client/svelte/index.mjs +1 -1
- package/dist/client/types.d.mts +9 -9
- package/dist/client/vanilla.d.mts +4 -4
- package/dist/client/vanilla.mjs +1 -1
- package/dist/client/vue/index.d.mts +4 -4
- package/dist/client/vue/index.mjs +1 -1
- package/dist/context/create-context.mjs +9 -9
- package/dist/context/helpers.mjs +4 -4
- package/dist/context/init-minimal.mjs +1 -1
- package/dist/context/init.mjs +1 -1
- package/dist/context/secret-utils.mjs +1 -1
- package/dist/cookies/index.d.mts +3 -3
- package/dist/cookies/index.mjs +7 -7
- package/dist/cookies/jwt.mjs +1 -1
- package/dist/cookies/session-store.mjs +3 -3
- package/dist/crypto/index.d.mts +1 -1
- package/dist/crypto/index.mjs +4 -4
- package/dist/crypto/jwt.mjs +1 -2
- package/dist/crypto/password.d.mts +10 -5
- package/dist/crypto/password.mjs +5 -5
- package/dist/db/adapter-kysely.mjs +1 -1
- package/dist/db/get-migration.d.mts +1 -1
- package/dist/db/get-migration.mjs +6 -6
- package/dist/db/get-schema.mjs +1 -1
- package/dist/db/index.mjs +1 -1
- package/dist/db/internal-adapter.d.mts +2 -2
- package/dist/db/internal-adapter.mjs +8 -8
- package/dist/db/revoke-unproven-account-access.d.mts +1 -1
- package/dist/db/schema.d.mts +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/integrations/next-js.mjs +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/svelte-kit.mjs +1 -1
- package/dist/integrations/tanstack-start-solid.mjs +1 -1
- package/dist/integrations/tanstack-start.mjs +1 -1
- package/dist/oauth2/account-key.mjs +1 -2
- package/dist/oauth2/callback.mjs +1 -1
- package/dist/oauth2/link-account.d.mts +1 -1
- package/dist/oauth2/link-account.mjs +4 -4
- package/dist/oauth2/state.d.mts +1 -1
- package/dist/oauth2/state.mjs +1 -1
- package/dist/{package.mjs → package.json.mjs} +1 -1
- package/dist/plugins/access/types.d.mts +1 -1
- package/dist/plugins/admin/admin.d.mts +6 -6
- package/dist/plugins/admin/admin.mjs +2 -2
- package/dist/plugins/admin/client.d.mts +1 -1
- package/dist/plugins/admin/error-codes.d.mts +1 -1
- package/dist/plugins/admin/routes.mjs +5 -5
- package/dist/plugins/admin/types.d.mts +1 -1
- package/dist/plugins/anonymous/index.mjs +4 -4
- package/dist/plugins/anonymous/types.d.mts +2 -2
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.mjs +11 -2
- package/dist/plugins/captcha/verify-handlers/captchafox.mjs +1 -1
- package/dist/plugins/captcha/verify-handlers/cloudflare-turnstile.mjs +1 -1
- package/dist/plugins/captcha/verify-handlers/google-recaptcha.mjs +1 -1
- package/dist/plugins/captcha/verify-handlers/h-captcha.mjs +1 -1
- package/dist/plugins/custom-session/client.d.mts +1 -1
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.mts +8 -8
- package/dist/plugins/device-authorization/index.mjs +2 -2
- package/dist/plugins/device-authorization/routes.d.mts +2 -2
- package/dist/plugins/device-authorization/routes.mjs +5 -4
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/email-otp/routes.mjs +4 -4
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/generic-oauth/index.mjs +6 -6
- package/dist/plugins/generic-oauth/providers/index.d.mts +38 -0
- package/dist/plugins/generic-oauth/providers/line.mjs +1 -1
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +4 -4
- package/dist/plugins/jwt/client.d.mts +3 -3
- package/dist/plugins/jwt/cookie-cache.mjs +2 -2
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.mjs +3 -3
- package/dist/plugins/jwt/sign.d.mts +1 -1
- package/dist/plugins/jwt/sign.mjs +2 -2
- package/dist/plugins/jwt/types.d.mts +2 -2
- package/dist/plugins/jwt/utils.d.mts +1 -1
- package/dist/plugins/jwt/utils.mjs +1 -1
- package/dist/plugins/jwt/verify.d.mts +1 -1
- package/dist/plugins/jwt/verify.mjs +4 -4
- package/dist/plugins/last-login-method/index.mjs +1 -1
- package/dist/plugins/magic-link/index.mjs +2 -2
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.mjs +2 -2
- package/dist/plugins/oauth-popup/client.d.mts +2 -2
- package/dist/plugins/oauth-popup/index.mjs +4 -4
- package/dist/plugins/oauth-proxy/index.mjs +4 -4
- package/dist/plugins/oauth-proxy/utils.mjs +1 -1
- package/dist/plugins/one-tap/client.d.mts +1 -1
- package/dist/plugins/one-tap/client.mjs +1 -1
- package/dist/plugins/one-tap/index.mjs +5 -5
- package/dist/plugins/one-time-token/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.mjs +3 -4
- package/dist/plugins/open-api/generator.d.mts +4 -4
- package/dist/plugins/open-api/generator.mjs +1 -1
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/adapter.d.mts +3 -3
- package/dist/plugins/organization/adapter.mjs +4 -4
- package/dist/plugins/organization/call.mjs +1 -1
- package/dist/plugins/organization/client.d.mts +3 -3
- package/dist/plugins/organization/client.mjs +1 -1
- package/dist/plugins/organization/has-permission.d.mts +1 -1
- package/dist/plugins/organization/has-permission.mjs +2 -2
- package/dist/plugins/organization/organization.d.mts +1 -1
- package/dist/plugins/organization/organization.mjs +3 -3
- package/dist/plugins/organization/routes/crud-access-control.d.mts +1 -1
- package/dist/plugins/organization/routes/crud-access-control.mjs +3 -3
- package/dist/plugins/organization/routes/crud-invites.d.mts +24 -24
- package/dist/plugins/organization/routes/crud-invites.mjs +4 -4
- package/dist/plugins/organization/routes/crud-members.d.mts +19 -19
- package/dist/plugins/organization/routes/crud-members.mjs +4 -4
- package/dist/plugins/organization/routes/crud-org.d.mts +16 -16
- package/dist/plugins/organization/routes/crud-org.mjs +3 -3
- package/dist/plugins/organization/routes/crud-team.d.mts +1 -1
- package/dist/plugins/organization/routes/crud-team.mjs +4 -4
- package/dist/plugins/organization/schema.d.mts +4 -4
- package/dist/plugins/organization/types.d.mts +2 -2
- package/dist/plugins/phone-number/client.d.mts +1 -1
- package/dist/plugins/phone-number/error-codes.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.mjs +2 -2
- package/dist/plugins/phone-number/routes.mjs +4 -4
- package/dist/plugins/phone-number/types.d.mts +1 -1
- package/dist/plugins/siwe/index.d.mts +1 -1
- package/dist/plugins/siwe/index.mjs +4 -4
- package/dist/plugins/test-utils/auth-helpers.mjs +1 -1
- package/dist/plugins/test-utils/cookie-builder.mjs +2 -4
- package/dist/plugins/two-factor/backup-codes/index.d.mts +1 -1
- package/dist/plugins/two-factor/backup-codes/index.mjs +4 -4
- package/dist/plugins/two-factor/claim.d.mts +1 -1
- package/dist/plugins/two-factor/claim.mjs +1 -1
- package/dist/plugins/two-factor/client.mjs +1 -1
- package/dist/plugins/two-factor/index.d.mts +4 -4
- package/dist/plugins/two-factor/index.mjs +6 -6
- package/dist/plugins/two-factor/otp/index.d.mts +1 -1
- package/dist/plugins/two-factor/otp/index.mjs +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +1 -1
- package/dist/plugins/two-factor/totp/index.mjs +10 -5
- package/dist/plugins/two-factor/types.d.mts +1 -1
- package/dist/plugins/two-factor/verify-two-factor.d.mts +1 -1
- package/dist/plugins/two-factor/verify-two-factor.mjs +2 -2
- package/dist/plugins/username/client.d.mts +1 -1
- package/dist/plugins/username/error-codes.d.mts +1 -1
- package/dist/plugins/username/index.d.mts +6 -6
- package/dist/plugins/username/index.mjs +4 -4
- package/dist/plugins/username/schema.d.mts +4 -4
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +3 -3
- package/dist/test-utils/http-test-instance.d.mts +10 -10
- package/dist/test-utils/http-test-instance.mjs +1 -1
- package/dist/test-utils/test-instance.d.mts +2 -2
- package/dist/test-utils/test-instance.mjs +4 -4
- package/dist/types/adapter.d.mts +2 -2
- package/dist/types/api.d.mts +1 -1
- package/dist/types/auth.d.mts +2 -2
- package/dist/types/index.d.mts +1 -1
- package/dist/types/models.d.mts +3 -3
- package/dist/types/plugins.d.mts +1 -1
- package/dist/utils/hashing.mjs +1 -1
- package/dist/utils/url.mjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +28 -28
package/dist/state.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GenericEndpointContext } from "@entro314labs/entro-auth-core";
|
|
2
|
-
import
|
|
3
|
-
import * as z from "zod";
|
|
2
|
+
import "@entro314labs/entro-auth-core/error";
|
|
4
3
|
import { getAuthStateVerificationIdentifier } from "@entro314labs/entro-auth-core/utils/state";
|
|
4
|
+
import * as z from "zod";
|
|
5
5
|
declare const stateDataSchema: z.ZodObject<{
|
|
6
6
|
callbackURL: z.ZodString;
|
|
7
7
|
codeVerifier: z.ZodString;
|
package/dist/state.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { EntroAuthError } from "@entro314labs/entro-auth-core/error";
|
|
2
|
+
import { getAuthStateVerificationIdentifier } from "@entro314labs/entro-auth-core/utils/state";
|
|
3
|
+
import * as z from "zod";
|
|
1
4
|
import { expireCookie } from "./cookies/index.mjs";
|
|
2
5
|
import { generateRandomString } from "./crypto/random.mjs";
|
|
3
6
|
import { symmetricDecrypt, symmetricEncrypt } from "./crypto/index.mjs";
|
|
4
7
|
import { deriveEncryptionKey } from "./crypto/purpose.mjs";
|
|
5
|
-
import { EntroAuthError } from "@entro314labs/entro-auth-core/error";
|
|
6
|
-
import * as z from "zod";
|
|
7
|
-
import { getAuthStateVerificationIdentifier } from "@entro314labs/entro-auth-core/utils/state";
|
|
8
8
|
// src/state.ts
|
|
9
9
|
const stateDataSchema = z.looseObject({
|
|
10
10
|
callbackURL: z.string(),
|
|
@@ -3,10 +3,10 @@ import { Auth } from "../types/auth.mjs";
|
|
|
3
3
|
import "../index.mjs";
|
|
4
4
|
import { setCookieToHeader } from "../cookies/cookie-utils.mjs";
|
|
5
5
|
import "../cookies/index.mjs";
|
|
6
|
-
import { getTestInstance } from "./test-instance.mjs";
|
|
7
|
-
import { EntroAuthClientOptions, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
8
6
|
import { IncomingMessage, ServerResponse, createServer } from "node:http";
|
|
9
7
|
import { AddressInfo } from "node:net";
|
|
8
|
+
import { EntroAuthClientOptions, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
9
|
+
import { getTestInstance } from "./test-instance.mjs";
|
|
10
10
|
/** A Node request handler that can be installed on an HTTP test listener. */
|
|
11
11
|
export type HttpTestRequestHandler = (req: IncomingMessage, res: ServerResponse) => unknown | Promise<unknown>;
|
|
12
12
|
/** A bound HTTP test listener whose request handler can be installed later. */
|
|
@@ -72,26 +72,26 @@ export declare function getHttpTestInstance<O extends Partial<EntroAuthOptions>,
|
|
|
72
72
|
id: string;
|
|
73
73
|
name: string;
|
|
74
74
|
hooks: {
|
|
75
|
-
onSuccess
|
|
76
|
-
onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
|
77
|
-
onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
|
78
|
-
onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
|
75
|
+
onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
|
|
79
76
|
};
|
|
80
77
|
} | {
|
|
81
78
|
id: string;
|
|
82
79
|
name: string;
|
|
83
80
|
hooks: {
|
|
84
|
-
onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>)
|
|
81
|
+
onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
82
|
+
onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
|
|
83
|
+
onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
|
|
84
|
+
onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
|
|
85
85
|
};
|
|
86
86
|
})[];
|
|
87
87
|
method: string;
|
|
88
|
-
redirect?: RequestRedirect | undefined;
|
|
89
88
|
window?: null | undefined;
|
|
89
|
+
redirect?: RequestRedirect | undefined;
|
|
90
|
+
mode?: RequestMode | undefined;
|
|
90
91
|
cache?: RequestCache | undefined;
|
|
91
92
|
credentials?: RequestCredentials;
|
|
92
93
|
integrity?: string | undefined;
|
|
93
94
|
keepalive?: boolean | undefined;
|
|
94
|
-
mode?: RequestMode | undefined;
|
|
95
95
|
priority?: RequestPriority | undefined;
|
|
96
96
|
referrer?: string | undefined;
|
|
97
97
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
@@ -119,7 +119,7 @@ export declare function getHttpTestInstance<O extends Partial<EntroAuthOptions>,
|
|
|
119
119
|
headers?: {} | {
|
|
120
120
|
[x: string]: string | undefined;
|
|
121
121
|
accept?: ((string & {}) | "application/json" | "text/plain" | "application/octet-stream") | undefined;
|
|
122
|
-
"content-type"?: ((string & {}) | "application/x-www-form-urlencoded" | "
|
|
122
|
+
"content-type"?: ((string & {}) | "application/json" | "application/x-www-form-urlencoded" | "text/plain" | "application/octet-stream" | "multipart/form-data") | undefined;
|
|
123
123
|
authorization?: ((string & {}) | `Bearer ${string}` | `Basic ${string}`) | undefined;
|
|
124
124
|
} | undefined;
|
|
125
125
|
body?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { createServer } from "node:http";
|
|
1
2
|
import { toNodeHandler } from "../integrations/node.mjs";
|
|
2
3
|
import { getTestInstance } from "./test-instance.mjs";
|
|
3
|
-
import { createServer } from "node:http";
|
|
4
4
|
// src/test-utils/http-test-instance.ts
|
|
5
5
|
const closeHttpServer = (server) => new Promise((resolve, reject) => {
|
|
6
6
|
server.close((error) => {
|
|
@@ -3,11 +3,11 @@ import { Auth } from "../types/auth.mjs";
|
|
|
3
3
|
import "../index.mjs";
|
|
4
4
|
import "../client/index.mjs";
|
|
5
5
|
import { AuthClient } from "../client/vanilla.mjs";
|
|
6
|
+
import { SuccessContext } from "@better-fetch/fetch";
|
|
7
|
+
import { Awaitable, EntroAuthClientOptions, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
6
8
|
import "../cookies/index.mjs";
|
|
7
9
|
import { setCookieToHeader } from "../cookies/cookie-utils.mjs";
|
|
8
10
|
import "../types/index.mjs";
|
|
9
|
-
import { Awaitable, EntroAuthClientOptions, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
10
|
-
import { SuccessContext } from "@better-fetch/fetch";
|
|
11
11
|
export declare function getTestInstance<O extends Partial<EntroAuthOptions>, C extends EntroAuthClientOptions>(options?: O | undefined, config?: {
|
|
12
12
|
clientOptions?: C;
|
|
13
13
|
port?: number;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
+
import { sql } from "kysely";
|
|
4
|
+
import { afterAll } from "vitest";
|
|
1
5
|
import { entroAuth } from "../auth/full.mjs";
|
|
2
6
|
import { createAuthClient } from "../client/vanilla.mjs";
|
|
3
7
|
import { parseSetCookieHeader, setCookieToHeader } from "../cookies/cookie-utils.mjs";
|
|
@@ -5,10 +9,6 @@ import { getAdapter } from "../db/adapter-kysely.mjs";
|
|
|
5
9
|
import { getMigrations } from "../db/get-migration.mjs";
|
|
6
10
|
import { bearer } from "../plugins/bearer/index.mjs";
|
|
7
11
|
import { getBaseURL, isDynamicBaseURLConfig } from "../utils/url.mjs";
|
|
8
|
-
import { sql } from "kysely";
|
|
9
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
11
|
-
import { afterAll } from "vitest";
|
|
12
12
|
// src/test-utils/test-instance.ts
|
|
13
13
|
const cleanupSet = /* @__PURE__ */ new Set();
|
|
14
14
|
const currentUserContextStorage = new AsyncLocalStorage();
|
package/dist/types/adapter.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DBAdapter
|
|
2
|
-
export type { DBAdapter
|
|
1
|
+
import { DBAdapter, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where } from "@entro314labs/entro-auth-core/db/adapter";
|
|
2
|
+
export type { DBAdapter, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where };
|
package/dist/types/api.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrettifyDeep, UnionToIntersection } from "./helper.mjs";
|
|
2
1
|
import { Endpoint } from "better-call";
|
|
2
|
+
import { PrettifyDeep, UnionToIntersection } from "./helper.mjs";
|
|
3
3
|
export type FilteredAPI<API> = Omit<API, API extends { [key in infer K]: Endpoint; } ? K extends string ? K extends "getSession" ? never : API[K]["options"]["metadata"] extends {
|
|
4
4
|
isAction: false;
|
|
5
5
|
} | {
|
package/dist/types/auth.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { AuthContext, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
2
|
+
import { BASE_ERROR_CODES } from "@entro314labs/entro-auth-core/error";
|
|
1
3
|
import { router } from "../api/index.mjs";
|
|
2
4
|
import { InferAPI } from "./api.mjs";
|
|
3
5
|
import { InferPluginTypes, Session, User } from "./models.mjs";
|
|
4
6
|
import { InferPluginContext, InferPluginErrorCodes } from "./plugins.mjs";
|
|
5
|
-
import { AuthContext, EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
6
|
-
import { BASE_ERROR_CODES } from "@entro314labs/entro-auth-core/error";
|
|
7
7
|
export type Auth<Options extends EntroAuthOptions = EntroAuthOptions> = {
|
|
8
8
|
handler: (request: Request) => Promise<Response>;
|
|
9
9
|
/**
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EntroAuthAdvancedOptions, EntroAuthCookies, EntroAuthOptions, EntroAuthPlugin, EntroAuthRateLimitOptions, StoreIdentifierOption, UserProvisioningSource, ValidateUserInfoAction, ValidateUserInfoMethod, ValidateUserInfoOAuthInfo, ValidateUserInfoResult, ValidateUserInfoSSOInfo, ValidateUserInfoSource } from "@entro314labs/entro-auth-core";
|
|
1
2
|
import { ClientAtomListener, ClientStore, EntroAuthClientOptions, EntroAuthClientPlugin, InferActions, InferAdditionalFromClient, InferClientAPI, InferErrorCodes, InferSessionFromClient, InferUserFromClient, IsSignal, SessionQueryParams } from "../client/types.mjs";
|
|
2
3
|
import { DBAdapter, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where } from "./adapter.mjs";
|
|
3
4
|
import { FilteredAPI, InferAPI, InferSessionAPI } from "./api.mjs";
|
|
@@ -5,6 +6,5 @@ import { Auth } from "./auth.mjs";
|
|
|
5
6
|
import { ExtractPluginField, HasRequiredKeys, InferPluginFieldFromTuple, IsAny, OverrideMerge, Prettify, PrettifyDeep, RequiredKeysOf, StripEmptyObjects, UnionToIntersection } from "./helper.mjs";
|
|
6
7
|
import { Account, AdditionalSessionFieldsInput, AdditionalUserFieldsInput, InferPluginTypes, RateLimit, Session, User, Verification } from "./models.mjs";
|
|
7
8
|
import { InferOptionSchema, InferPluginContext, InferPluginErrorCodes, InferPluginIDs } from "./plugins.mjs";
|
|
8
|
-
import { EntroAuthAdvancedOptions, EntroAuthCookies, EntroAuthOptions, EntroAuthPlugin, EntroAuthRateLimitOptions, StoreIdentifierOption, UserProvisioningSource, ValidateUserInfoAction, ValidateUserInfoMethod, ValidateUserInfoOAuthInfo, ValidateUserInfoResult, ValidateUserInfoSSOInfo, ValidateUserInfoSource } from "@entro314labs/entro-auth-core";
|
|
9
9
|
export type * from "@entro314labs/entro-auth-core/social-providers";
|
|
10
10
|
export { type Account, type AdditionalSessionFieldsInput, type AdditionalUserFieldsInput, type Auth, type ClientAtomListener, type ClientStore, type DBAdapter, type DBAdapterInstance, type DBAdapterSchemaCreation, type DBTransactionAdapter, type EntroAuthAdvancedOptions, type EntroAuthClientOptions, type EntroAuthClientPlugin, type EntroAuthCookies, type EntroAuthOptions, type EntroAuthPlugin, type EntroAuthRateLimitOptions, type ExtractPluginField, FilteredAPI, type HasRequiredKeys, InferAPI, InferActions, InferAdditionalFromClient, InferClientAPI, InferErrorCodes, type InferOptionSchema, type InferPluginContext, type InferPluginErrorCodes, type InferPluginFieldFromTuple, type InferPluginIDs, type InferPluginTypes, InferSessionAPI, InferSessionFromClient, InferUserFromClient, type IsAny, IsSignal, type JoinConfig, type JoinOption, type OverrideMerge, type Prettify, type PrettifyDeep, type RateLimit, type RequiredKeysOf, type Session, SessionQueryParams, type StoreIdentifierOption, type StripEmptyObjects, type UnionToIntersection, type User, type UserProvisioningSource, type ValidateUserInfoAction, type ValidateUserInfoMethod, type ValidateUserInfoOAuthInfo, type ValidateUserInfoResult, type ValidateUserInfoSSOInfo, type ValidateUserInfoSource, type Verification, type Where };
|
package/dist/types/models.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ExtractPluginField, InferPluginFieldFromTuple, UnionToIntersection } from "./helper.mjs";
|
|
2
1
|
import { EntroAuthOptions } from "@entro314labs/entro-auth-core";
|
|
3
|
-
import { Account, InferDBFieldsFromOptionsInput, InferDBFieldsFromPluginsInput, RateLimit, Session
|
|
2
|
+
import { Account, InferDBFieldsFromOptionsInput, InferDBFieldsFromPluginsInput, RateLimit, Session, User, Verification } from "@entro314labs/entro-auth-core/db";
|
|
3
|
+
import { ExtractPluginField, InferPluginFieldFromTuple, UnionToIntersection } from "./helper.mjs";
|
|
4
4
|
export type AdditionalUserFieldsInput<Options extends EntroAuthOptions> = InferDBFieldsFromPluginsInput<"user", Options["plugins"]> & InferDBFieldsFromOptionsInput<Options["user"]>;
|
|
5
5
|
export type AdditionalSessionFieldsInput<Options extends EntroAuthOptions> = InferDBFieldsFromPluginsInput<"session", Options["plugins"]> & InferDBFieldsFromOptionsInput<Options["session"]>;
|
|
6
6
|
export type InferPluginTypes<O extends EntroAuthOptions> = O["plugins"] extends readonly [unknown, ...unknown[]] ? InferPluginFieldFromTuple<O["plugins"], "$Infer"> : O["plugins"] extends Array<infer P> ? UnionToIntersection<ExtractPluginField<P, "$Infer">> : {};
|
|
7
|
-
export type { Account, RateLimit, Session
|
|
7
|
+
export type { Account, RateLimit, Session, User, Verification };
|
package/dist/types/plugins.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExtractPluginField, InferPluginFieldFromTuple, UnionToIntersection } from "./helper.mjs";
|
|
2
1
|
import { AuthContext, EntroAuthOptions, EntroAuthPlugin } from "@entro314labs/entro-auth-core";
|
|
3
2
|
import { EntroAuthPluginDBSchema } from "@entro314labs/entro-auth-core/db";
|
|
3
|
+
import { ExtractPluginField, InferPluginFieldFromTuple, UnionToIntersection } from "./helper.mjs";
|
|
4
4
|
export type InferOptionSchema<S extends EntroAuthPluginDBSchema> = S extends Record<string, {
|
|
5
5
|
fields: infer Fields;
|
|
6
6
|
}> ? { [K in keyof S]?: {
|
package/dist/utils/hashing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { utf8ToBytes } from "@noble/hashes/utils.js";
|
|
2
1
|
import { keccak_256 } from "@noble/hashes/sha3.js";
|
|
2
|
+
import { utf8ToBytes } from "@noble/hashes/utils.js";
|
|
3
3
|
// src/utils/hashing.ts
|
|
4
4
|
/**
|
|
5
5
|
* TS implementation of ERC-55 ("Mixed-case checksum address encoding") using @noble/hashes
|
package/dist/utils/url.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { wildcardMatch } from "./wildcard.mjs";
|
|
2
1
|
import { env } from "@entro314labs/entro-auth-core/env";
|
|
3
2
|
import { EntroAuthError } from "@entro314labs/entro-auth-core/error";
|
|
3
|
+
import { wildcardMatch } from "./wildcard.mjs";
|
|
4
4
|
// src/utils/url.ts
|
|
5
5
|
const SLASH_CHAR_CODE = "/".charCodeAt(0);
|
|
6
6
|
/**
|
package/dist/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entro314labs/entro-auth",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.13",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -485,47 +485,47 @@
|
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
"dependencies": {
|
|
488
|
-
"@entro314labs/entro-auth-core": "1.8.0-beta.
|
|
489
|
-
"@entro314labs/entro-auth-drizzle-adapter": "1.8.0-beta.
|
|
490
|
-
"@entro314labs/entro-auth-kysely-adapter": "1.8.0-beta.
|
|
491
|
-
"@entro314labs/entro-auth-memory-adapter": "1.8.0-beta.
|
|
488
|
+
"@entro314labs/entro-auth-core": "1.8.0-beta.13",
|
|
489
|
+
"@entro314labs/entro-auth-drizzle-adapter": "1.8.0-beta.13",
|
|
490
|
+
"@entro314labs/entro-auth-kysely-adapter": "1.8.0-beta.13",
|
|
491
|
+
"@entro314labs/entro-auth-memory-adapter": "1.8.0-beta.13",
|
|
492
492
|
"@better-auth/utils": "0.5.1",
|
|
493
493
|
"@better-fetch/fetch": "1.3.3",
|
|
494
|
-
"@noble/ciphers": "^2.
|
|
495
|
-
"@noble/hashes": "^2.
|
|
494
|
+
"@noble/ciphers": "^2.4.0",
|
|
495
|
+
"@noble/hashes": "^2.4.0",
|
|
496
496
|
"better-call": "1.4.6",
|
|
497
|
-
"defu": "^6.1.
|
|
498
|
-
"jose": "^6.2.
|
|
499
|
-
"kysely": "^0.28.17 || ^0.29.
|
|
500
|
-
"nanostores": "^1.
|
|
497
|
+
"defu": "^6.1.7",
|
|
498
|
+
"jose": "^6.2.18",
|
|
499
|
+
"kysely": "^0.28.17 || ^0.29.9",
|
|
500
|
+
"nanostores": "^1.5.5",
|
|
501
501
|
"zod": "^4.5.4"
|
|
502
502
|
},
|
|
503
503
|
"devDependencies": {
|
|
504
|
-
"@lynx-js/react": "^0.
|
|
505
|
-
"@opentelemetry/api": "^1.
|
|
506
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
507
|
-
"@opentelemetry/sdk-trace-node": "^2.
|
|
508
|
-
"@sveltejs/kit": "^3.
|
|
509
|
-
"@tanstack/react-start": "^1.
|
|
510
|
-
"@tanstack/solid-start": "^1.
|
|
511
|
-
"@types/bun": "^1.
|
|
504
|
+
"@lynx-js/react": "^0.129.4",
|
|
505
|
+
"@opentelemetry/api": "^1.10.0",
|
|
506
|
+
"@opentelemetry/sdk-trace-base": "^2.12.0",
|
|
507
|
+
"@opentelemetry/sdk-trace-node": "^2.12.0",
|
|
508
|
+
"@sveltejs/kit": "^3.4.0",
|
|
509
|
+
"@tanstack/react-start": "^1.169.7",
|
|
510
|
+
"@tanstack/solid-start": "^1.169.7",
|
|
511
|
+
"@types/bun": "^1.4.5",
|
|
512
512
|
"@types/google.accounts": "^0.0.18",
|
|
513
|
-
"@types/pg": "^8.
|
|
514
|
-
"@types/react": "^19.
|
|
515
|
-
"@types/react-dom": "^19.
|
|
516
|
-
"botid": "^1.5.
|
|
513
|
+
"@types/pg": "^8.23.1",
|
|
514
|
+
"@types/react": "^19.3.1",
|
|
515
|
+
"@types/react-dom": "^19.3.0",
|
|
516
|
+
"botid": "^1.5.13",
|
|
517
517
|
"happy-dom": "^21.0.4",
|
|
518
|
-
"msw": "^
|
|
518
|
+
"msw": "^3.0.7",
|
|
519
519
|
"next": "^16.4.6",
|
|
520
|
-
"oauth2-mock-server": "^9.
|
|
520
|
+
"oauth2-mock-server": "^9.3.0",
|
|
521
521
|
"react": "^19.3.1",
|
|
522
522
|
"react-dom": "^19.3.1",
|
|
523
523
|
"solid-js": "^1.9.11",
|
|
524
|
-
"tsdown": "0.23.
|
|
524
|
+
"tsdown": "0.23.7",
|
|
525
525
|
"type-fest": "^5.7.0",
|
|
526
526
|
"typescript": "^6.0.3",
|
|
527
|
-
"vitest": "^5.1.
|
|
528
|
-
"vue": "^3.5.
|
|
527
|
+
"vitest": "^5.1.1",
|
|
528
|
+
"vue": "^3.5.46"
|
|
529
529
|
},
|
|
530
530
|
"peerDependencies": {
|
|
531
531
|
"@lynx-js/react": "*",
|