@protobase/server 0.46.11 → 0.46.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.
@@ -0,0 +1,11 @@
1
+ import { createLogger } from "better-auth";
2
+ //#region src/better-auth/auth-logger.ts
3
+ const schemaReports = [/^Database schema mismatch/, /^Could not validate the database schema/];
4
+ const output = createLogger();
5
+ /** Better Auth's logger, without its reports on the store's schema. */
6
+ const authLogger = { log: (level, message, ...args) => {
7
+ if (schemaReports.some((report) => report.test(message))) return;
8
+ output[level](message, ...args);
9
+ } };
10
+ //#endregion
11
+ export { authLogger };
@@ -1705,17 +1705,7 @@ export declare const createAuth: (options: CreateAuthOptions) => import("better-
1705
1705
  email: string;
1706
1706
  emailVerified: boolean;
1707
1707
  name: string;
1708
- image?
1709
- /**
1710
- * Refuses a new password that appears in a known data breach, by Have I Been Pwned's password list: at sign-up, from
1711
- * an invitation, and when a password is set, changed, reset or given by an admin. Only the first five characters of
1712
- * the password's SHA-1 hash leave the server. While the list cannot be reached, setting a password fails. Default off.
1713
- */
1714
- /**
1715
- * Refuses a new password that appears in a known data breach, by Have I Been Pwned's password list: at sign-up, from
1716
- * an invitation, and when a password is set, changed, reset or given by an admin. Only the first five characters of
1717
- * the password's SHA-1 hash leave the server. While the list cannot be reached, setting a password fails. Default off.
1718
- */ : string | null | undefined;
1708
+ image?: string | null | undefined;
1719
1709
  }) | import("better-auth/plugins").UserWithTwoFactor;
1720
1710
  }>;
1721
1711
  generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
@@ -3781,15 +3771,7 @@ export declare const createAuth: (options: CreateAuthOptions) => import("better-
3781
3771
  userId: string;
3782
3772
  expiresAt: Date;
3783
3773
  token: string;
3784
- ipAddress?
3785
- /**
3786
- * What runs when a user is deleted: `set` a named listener that removes what the app keeps of the user elsewhere,
3787
- * such as their devices; `run` is for a deletion outside Better Auth's endpoints (`deleteUser`).
3788
- */
3789
- /**
3790
- * What runs when a user is deleted: `set` a named listener that removes what the app keeps of the user elsewhere,
3791
- * such as their devices; `run` is for a deletion outside Better Auth's endpoints (`deleteUser`).
3792
- */ : string | null | undefined;
3774
+ ipAddress?: string | null | undefined;
3793
3775
  userAgent?: string | null | undefined;
3794
3776
  };
3795
3777
  user: Record<string, any> & {
@@ -8778,6 +8760,7 @@ export declare const createAuth: (options: CreateAuthOptions) => import("better-
8778
8760
  socialProviders?: import("better-auth").SocialProviders | undefined;
8779
8761
  appName: string;
8780
8762
  database: any;
8763
+ logger: import("better-auth").Logger;
8781
8764
  baseURL: string | {
8782
8765
  allowedHosts: string[];
8783
8766
  fallback: string;
@@ -7,6 +7,7 @@ import { signInPolicyPlugin } from "./policy-plugin.js";
7
7
  import { goTrueSessionsPlugin } from "../gotrue/sessions-plugin.js";
8
8
  import { endReplacedSession } from "./end-replaced-session.js";
9
9
  import { authBasePath } from "./auth-base-path.js";
10
+ import { authLogger } from "./auth-logger.js";
10
11
  import { cookiePrefixOf } from "./cookie-prefix.js";
11
12
  import { mobileRequests } from "./mobile-requests.js";
12
13
  import { passwordLength } from "./new-account-password.js";
@@ -133,6 +134,7 @@ const betterAuthOptions = (options, { origins = [], passkeyDomain, roles, defini
133
134
  return {
134
135
  appName,
135
136
  database: options.database,
137
+ logger: authLogger,
136
138
  baseURL: multiHostBaseURL(options.baseURL, origins),
137
139
  basePath: authBasePath,
138
140
  secret: options.secret,
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.46.11";
2
+ var version = "0.46.13";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/server",
3
- "version": "0.46.11",
3
+ "version": "0.46.13",
4
4
  "description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  "@better-auth/passkey": "^1.7.12",
37
37
  "@better-auth/sso": "^1.7.12",
38
38
  "@modelcontextprotocol/server": "^2.3.1",
39
- "@protobase/layout": "0.46.11",
40
- "@protobase/query": "0.46.11",
41
- "@protobase/schema": "0.46.11",
39
+ "@protobase/layout": "0.46.13",
40
+ "@protobase/query": "0.46.13",
41
+ "@protobase/schema": "0.46.13",
42
42
  "@react-email/render": "^2.1.0",
43
43
  "@scalar/hono-api-reference": "^0.12.10",
44
44
  "@sentry/core": "^11.7.0",