@midsummer-ai/sdk 0.1.0-staging.3772 → 0.1.0-staging.3778

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.
@@ -409,8 +409,8 @@ var Connection = class Connection {
409
409
  ...options,
410
410
  shape
411
411
  };
412
- if (o.store === void 0 && typeof indexedDB !== "undefined" && typeof document !== "undefined") o.store = (await import("./store-CsBhnabU.mjs")).idbStore(new URL(url).host);
413
- if (o.tabs !== false && typeof document !== "undefined") return (await import("./tabs-gHJHkhm2.mjs")).ConnectionTabs.connect(url, o);
412
+ if (o.store === void 0 && typeof indexedDB !== "undefined" && typeof document !== "undefined") o.store = (await import("./store-Ch931wwA.mjs")).idbStore(new URL(url).host);
413
+ if (o.tabs !== false && typeof document !== "undefined") return (await import("./tabs-C4NDJzfK.mjs")).ConnectionTabs.connect(url, o);
414
414
  return Connection.open(url, o);
415
415
  }
416
416
  /** A Connection over one socket, of the shape given (default "browser"), no detection (tabs.mjs opens its own so). */
@@ -2009,4 +2009,4 @@ var Connection = class Connection {
2009
2009
  }
2010
2010
  };
2011
2011
  //#endregion
2012
- export { payloadOf as i, TAG_TTL as n, fetchAt as r, Connection as t };
2012
+ export { socketAt as a, payloadOf as i, TAG_TTL as n, fetchAt as r, Connection as t };
@@ -1,3 +1,3 @@
1
1
  import { n as DatabaseErrorCode, t as DatabaseError } from "../errors-CnQduDOt.mjs";
2
- import { _ as oidc, a as DATABASE_TOKEN_PATH, c as DatabaseToken, d as ReturnsOf, f as SignedInDatabase, g as databaseUrl, h as connect, i as ConnectOptions, l as FetchToken, m as clerk, n as AuthState, o as Database, p as auth0, r as BoundDatabases, s as DatabaseClient, t as ArgsOf, u as Reference, v as signedInDatabase, y as userToken } from "../client-DMUFrqzg.mjs";
3
- export { ArgsOf, AuthState, BoundDatabases, ConnectOptions, DATABASE_TOKEN_PATH, Database, DatabaseClient, DatabaseError, type DatabaseErrorCode, DatabaseToken, FetchToken, Reference, ReturnsOf, SignedInDatabase, auth0, clerk, connect, databaseUrl, oidc, signedInDatabase, userToken };
2
+ import { C as userToken, S as signedInDatabase, _ as clerk, a as DATABASE_TOKEN_PATH, b as oidc, c as DatabaseToken, d as PROFILE_MOST, f as Reference, g as auth0, h as UserProfile, i as ConnectOptions, l as DoorToken, m as SignedInDatabase, n as AuthState, o as Database, p as ReturnsOf, r as BoundDatabases, s as DatabaseClient, t as ArgsOf, u as FetchToken, v as connect, x as profileClaims, y as databaseUrl } from "../client-BDjPQa7G.mjs";
3
+ export { ArgsOf, AuthState, BoundDatabases, ConnectOptions, DATABASE_TOKEN_PATH, Database, DatabaseClient, DatabaseError, type DatabaseErrorCode, DatabaseToken, DoorToken, FetchToken, PROFILE_MOST, Reference, ReturnsOf, SignedInDatabase, UserProfile, auth0, clerk, connect, databaseUrl, oidc, profileClaims, signedInDatabase, userToken };
@@ -1,3 +1,3 @@
1
1
  import { DatabaseError } from "./errors.mjs";
2
- import { a as connect, c as signedInDatabase, i as clerk, l as userToken, n as DatabaseClient, o as databaseUrl, r as auth0, s as oidc, t as DATABASE_TOKEN_PATH } from "../client-D0gC0c1_.mjs";
3
- export { DATABASE_TOKEN_PATH, DatabaseClient, DatabaseError, auth0, clerk, connect, databaseUrl, oidc, signedInDatabase, userToken };
2
+ import { a as clerk, c as oidc, d as userToken, i as auth0, l as profileClaims, n as DatabaseClient, o as connect, r as PROFILE_MOST, s as databaseUrl, t as DATABASE_TOKEN_PATH, u as signedInDatabase } from "../client-CIuYlRWZ.mjs";
3
+ export { DATABASE_TOKEN_PATH, DatabaseClient, DatabaseError, PROFILE_MOST, auth0, clerk, connect, databaseUrl, oidc, profileClaims, signedInDatabase, userToken };
@@ -1,5 +1,5 @@
1
1
  import { t as DatabaseError } from "../errors-CnQduDOt.mjs";
2
- import { o as Database, u as Reference } from "../client-DMUFrqzg.mjs";
2
+ import { f as Reference, o as Database } from "../client-BDjPQa7G.mjs";
3
3
  import { ReactNode } from "react";
4
4
  //#region src/database/react.d.ts
5
5
  type ArgsOf<F> = F extends Reference<any, infer A, any> ? A : never;
@@ -233,7 +233,8 @@ const repairHint = {
233
233
  prisma: "Make the listed fields optional in your Prisma schema, give them defaults, or remove them."
234
234
  };
235
235
  const migrationHint = {
236
- ...applyHint,
236
+ drizzle: applyHint.drizzle,
237
+ prisma: applyHint.prisma,
237
238
  database: "Run `npx auth migrate` to add the missing tables and columns."
238
239
  };
239
240
  function formatSchemaMismatch(findings, source) {
@@ -48434,7 +48435,8 @@ function buildEngine(config) {
48434
48435
  return {
48435
48436
  handler: (request) => instance.handler(request),
48436
48437
  api: instance.api,
48437
- findUser: async (id) => await (await instance.$context).internalAdapter.findUserById(id) ?? null
48438
+ findUser: async (id) => await (await instance.$context).internalAdapter.findUserById(id) ?? null,
48439
+ ready: instance.$context.then(() => void 0)
48438
48440
  };
48439
48441
  }
48440
48442
  //#endregion
@@ -1,4 +1,4 @@
1
- import { n as AuthStore } from "./store-DXHi6LCj.mjs";
1
+ import { n as AuthStore } from "./store-CRqU5WCe.mjs";
2
2
  import { n as CaptchaProvider, t as AuthSettings } from "./settings-Dz3irtlu.mjs";
3
3
  import { SignInMail } from "./auth/mail.mjs";
4
4
  //#region src/auth/events.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midsummer-ai/sdk",
3
- "version": "0.1.0-staging.3772",
3
+ "version": "0.1.0-staging.3778",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "Midsummer's handles for an app's code: its Database, Storage, Queues, Vector DB, AI, Email and Agents, with stand-ins for tests.",
@@ -1,4 +1,4 @@
1
- import { o as Database } from "./client-DMUFrqzg.mjs";
1
+ import { o as Database } from "./client-BDjPQa7G.mjs";
2
2
  //#region src/auth/store.d.ts
3
3
  /** One of `db/auth.ts`'s functions. */
4
4
  type AuthCall = "create" | "findOne" | "findMany" | "count" | "update" | "updateMany" | "upsert" | "deleteMany" | "consume" | "increment" | "page";
@@ -9,8 +9,9 @@ interface AuthStore {
9
9
  /**
10
10
  * The app's database as sign-in's store: each call one of `db/auth.ts`'s functions. `database` gives the
11
11
  * connection a call goes over; it is asked for one each call, so it can hand out the request's own. A function
12
- * that isn't there means `db/auth.ts` was never deployed: the error says to run `midsummer auth init`.
12
+ * that isn't there means `db/auth.ts` was never deployed: the error says to run `midsummer auth init`. A call
13
+ * unanswered after `waitMs` (`STORE_CALL_MS`) throws, so a request never waits on the database for longer.
13
14
  */
14
- declare function databaseStore(database: () => Promise<Database>): AuthStore;
15
+ declare function databaseStore(database: () => Promise<Database>, waitMs?: number): AuthStore;
15
16
  //#endregion
16
17
  export { AuthStore as n, databaseStore as r, AuthCall as t };
@@ -1,4 +1,4 @@
1
- import "./connection-C_JSWUrt.mjs";
1
+ import "./connection-CpT0x1EE.mjs";
2
2
  //#region src/database/client/store.mjs
3
3
  const STORES = [
4
4
  "ops",
@@ -1,4 +1,4 @@
1
- import { t as Connection } from "./connection-C_JSWUrt.mjs";
1
+ import { t as Connection } from "./connection-CpT0x1EE.mjs";
2
2
  //#region src/database/client/tabs.mjs
3
3
  /** Argument index of the options that take a `tag` (a tab tags its own writes: the same tag after a handover). */
4
4
  const TAGGED = {