@midsummer-ai/sdk 0.1.0-staging.3647 → 0.1.0-staging.3653
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/auth/contract.mjs +1 -1
- package/auth/index.mjs +1 -1
- package/{auth-BM6vB3XD.mjs → auth-Bf7IuulG.mjs} +1 -1
- package/{client-C7QtAX5u.mjs → client-BX56cXDt.mjs} +4 -4
- package/database/client.mjs +1 -1
- package/package.json +1 -1
- package/{store-dsVD9VnM.mjs → store-B-1coCxW.mjs} +1 -1
- package/{tabs-C85sXTwS.mjs → tabs-CDplCS02.mjs} +1 -1
package/auth/contract.mjs
CHANGED
package/auth/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as authFiles, i as auth, n as AuthError, o as createAuth, r as SESSION_CACHE_S, s as databaseStore, t as AUTH_PATH } from "../auth-
|
|
1
|
+
import { a as authFiles, i as auth, n as AuthError, o as createAuth, r as SESSION_CACHE_S, s as databaseStore, t as AUTH_PATH } from "../auth-Bf7IuulG.mjs";
|
|
2
2
|
import { checkSignInMail, signInWords } from "./mail.mjs";
|
|
3
3
|
export { AUTH_PATH, AuthError, SESSION_CACHE_S, auth, authFiles, checkSignInMail, createAuth, databaseStore, signInWords };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as processEnv, t as here } from "./here-1plIxb0D.mjs";
|
|
2
|
-
import { i as connect } from "./client-
|
|
2
|
+
import { i as connect } from "./client-BX56cXDt.mjs";
|
|
3
3
|
import { sendSignInMail } from "./auth/mail.mjs";
|
|
4
4
|
import { standIn } from "./auth/stand-in.mjs";
|
|
5
5
|
import { FUNCTIONS_FILE, authTablesOf, schemaLines, tablesFile } from "./auth/files.mjs";
|
|
@@ -412,8 +412,8 @@ var Connection = class Connection {
|
|
|
412
412
|
...options,
|
|
413
413
|
shape
|
|
414
414
|
};
|
|
415
|
-
if (o.store === void 0 && typeof indexedDB !== "undefined" && typeof document !== "undefined") o.store = (await import("./store-
|
|
416
|
-
if (o.tabs !== false && typeof document !== "undefined") return (await import("./tabs-
|
|
415
|
+
if (o.store === void 0 && typeof indexedDB !== "undefined" && typeof document !== "undefined") o.store = (await import("./store-B-1coCxW.mjs")).idbStore(new URL(url).host);
|
|
416
|
+
if (o.tabs !== false && typeof document !== "undefined") return (await import("./tabs-CDplCS02.mjs")).ConnectionTabs.connect(url, o);
|
|
417
417
|
return Connection.open(url, o);
|
|
418
418
|
}
|
|
419
419
|
/** A Connection over one socket, of the shape given (default "browser"), no detection (tabs.mjs opens its own so). */
|
|
@@ -2195,7 +2195,7 @@ async function isolation(url, key, token) {
|
|
|
2195
2195
|
return {
|
|
2196
2196
|
...own,
|
|
2197
2197
|
name,
|
|
2198
|
-
store: (await import("./store-
|
|
2198
|
+
store: (await import("./store-B-1coCxW.mjs")).idbStore(name)
|
|
2199
2199
|
};
|
|
2200
2200
|
}
|
|
2201
2201
|
const inPage = () => typeof globalThis.document !== "undefined";
|
|
@@ -2212,7 +2212,7 @@ async function connect(options) {
|
|
|
2212
2212
|
const here = globalThis[Symbol.for("midsummer.context")];
|
|
2213
2213
|
const request = here?.();
|
|
2214
2214
|
const bound = request?.database;
|
|
2215
|
-
if (request && !bound && !env.MIDSUMMER_DATABASE_URL) throw new DatabaseError("
|
|
2215
|
+
if (request && !bound && !env.MIDSUMMER_DATABASE_URL) throw new DatabaseError("unavailable", `This request reached your server without the bindings of the environment its address serves, so no database is bound to it as ${options.binding}. That's Midsummer's fault, not your code's: ship again, and if it goes on, tell Midsummer.`);
|
|
2216
2216
|
if (bound) {
|
|
2217
2217
|
const first = await bound.token(options.binding);
|
|
2218
2218
|
url = first.url;
|
package/database/client.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DatabaseError } from "./errors.mjs";
|
|
2
|
-
import { a as oidc, i as connect, n as auth0, o as userToken, r as clerk, t as DatabaseClient } from "../client-
|
|
2
|
+
import { a as oidc, i as connect, n as auth0, o as userToken, r as clerk, t as DatabaseClient } from "../client-BX56cXDt.mjs";
|
|
3
3
|
export { DatabaseClient, DatabaseError, auth0, clerk, connect, oidc, userToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midsummer-ai/sdk",
|
|
3
|
-
"version": "0.1.0-staging.
|
|
3
|
+
"version": "0.1.0-staging.3653",
|
|
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 { s as Connection } from "./client-
|
|
1
|
+
import { s as Connection } from "./client-BX56cXDt.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 = {
|