@midsummer-ai/sdk 0.1.0-staging.3753 → 0.1.0-staging.3760
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.d.mts +2 -2
- package/auth/contract.mjs +1 -1
- package/auth/index.d.mts +2 -2
- package/auth/index.mjs +1 -1
- package/auth/react.mjs +1 -1
- package/auth/stand-in.d.mts +1 -1
- package/{auth-BaGXVRYd.mjs → auth-DBNwtk0C.mjs} +1 -1
- package/{client-oAVg6vn_.d.mts → client-CJ8z954t.d.mts} +12 -0
- package/{client-_Al5bpqX.mjs → client-COAOdeE4.mjs} +206 -0
- package/database/client.d.mts +1 -1
- package/database/client.mjs +1 -1
- package/database/react.d.mts +1 -1
- package/{index-C8Ti5raa.d.mts → index-C48Pgux_.d.mts} +1 -1
- package/package.json +1 -1
- package/{store-Bx4dOx66.d.mts → store-CRXbsXpS.d.mts} +1 -1
package/auth/contract.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthStore } from "../store-
|
|
1
|
+
import { n as AuthStore } from "../store-CRXbsXpS.mjs";
|
|
2
2
|
import { SignInMail } from "./mail.mjs";
|
|
3
|
-
import { a as Auth } from "../index-
|
|
3
|
+
import { a as Auth } from "../index-C48Pgux_.mjs";
|
|
4
4
|
//#region src/auth/contract.d.ts
|
|
5
5
|
interface AuthHarness {
|
|
6
6
|
/** Sign-in over a store with no users, made with `scopes: CONTRACT_SCOPES`. */
|
package/auth/contract.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as LIMITS, l as LIMIT_WINDOW_MS, r as AuthError, u as SETTINGS_TTL_MS } from "../auth-
|
|
1
|
+
import { c as LIMITS, l as LIMIT_WINDOW_MS, r as AuthError, u as SETTINGS_TTL_MS } from "../auth-DBNwtk0C.mjs";
|
|
2
2
|
import { IMPERSONATION_TOKEN_MS, startImpersonation } from "./impersonate.mjs";
|
|
3
3
|
//#region src/auth/contract.ts
|
|
4
4
|
/**
|
package/auth/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as AuthStore, r as databaseStore, t as AuthCall } from "../store-
|
|
1
|
+
import { n as AuthStore, r as databaseStore, t as AuthCall } from "../store-CRXbsXpS.mjs";
|
|
2
2
|
import { i as SignUpPolicy, n as CaptchaProvider, r as PublicSettings, t as AuthSettings } from "../settings-Dz3irtlu.mjs";
|
|
3
3
|
import { SignInMail, SignInMailKind, checkSignInMail, signInWords } from "./mail.mjs";
|
|
4
|
-
import { _ as AuthEvent, a as Auth, b as EventSend, c as AuthOptions, d as IMPERSONATION_S, f as SESSION_CACHE_S, g as createAuth, h as auth, i as AgentKey, l as AuthUser, m as SignedInAgent, n as AUTH_ROUTES, o as AuthError, p as SignedIn, r as AgentGrant, s as AuthErrorCode, t as AUTH_PATH, u as AuthUserRecord, v as AuthEventBatch, y as AuthEventType } from "../index-
|
|
4
|
+
import { _ as AuthEvent, a as Auth, b as EventSend, c as AuthOptions, d as IMPERSONATION_S, f as SESSION_CACHE_S, g as createAuth, h as auth, i as AgentKey, l as AuthUser, m as SignedInAgent, n as AUTH_ROUTES, o as AuthError, p as SignedIn, r as AgentGrant, s as AuthErrorCode, t as AUTH_PATH, u as AuthUserRecord, v as AuthEventBatch, y as AuthEventType } from "../index-C48Pgux_.mjs";
|
|
5
5
|
import { i as authFiles } from "../files-B553U-d6.mjs";
|
|
6
6
|
export { AUTH_PATH, AUTH_ROUTES, AgentGrant, AgentKey, Auth, type AuthCall, AuthError, AuthErrorCode, type AuthEvent, type AuthEventBatch, type AuthEventType, AuthOptions, type AuthSettings, type AuthStore, AuthUser, AuthUserRecord, type CaptchaProvider, type EventSend, IMPERSONATION_S, type PublicSettings, SESSION_CACHE_S, type SignInMail, type SignInMailKind, type SignUpPolicy, SignedIn, SignedInAgent, auth, authFiles, checkSignInMail, createAuth, databaseStore, signInWords };
|
package/auth/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SESSION_CACHE_S, d as databaseStore, i as IMPERSONATION_S, n as AUTH_ROUTES, o as auth, r as AuthError, s as createAuth, t as AUTH_PATH } from "../auth-
|
|
1
|
+
import { a as SESSION_CACHE_S, d as databaseStore, i as IMPERSONATION_S, n as AUTH_ROUTES, o as auth, r as AuthError, s as createAuth, t as AUTH_PATH } from "../auth-DBNwtk0C.mjs";
|
|
2
2
|
import { checkSignInMail, signInWords } from "./mail.mjs";
|
|
3
3
|
import { n as authFiles } from "../files-DhPeWwcT.mjs";
|
|
4
4
|
export { AUTH_PATH, AUTH_ROUTES, AuthError, IMPERSONATION_S, SESSION_CACHE_S, auth, authFiles, checkSignInMail, createAuth, databaseStore, signInWords };
|
package/auth/react.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as signedInDatabase, t as DATABASE_TOKEN_PATH } from "../client-
|
|
1
|
+
import { c as signedInDatabase, t as DATABASE_TOKEN_PATH } from "../client-COAOdeE4.mjs";
|
|
2
2
|
import { DatabaseProvider } from "../database/react.mjs";
|
|
3
3
|
import { a as WORDS, c as deviceOf, i as CAPTCHA_WIDGETS, l as setupKeyOf, o as ago, r as AUTH_CSS, t as qrPath } from "../qr-Br1sOBmT.mjs";
|
|
4
4
|
import { AuthClientError, authClient } from "./client.mjs";
|
package/auth/stand-in.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as processEnv, r as platformApi, t as here } from "./here-BKjizr_N.mjs";
|
|
2
|
-
import { a as connect, l as userToken, o as databaseUrl } from "./client-
|
|
2
|
+
import { a as connect, l as userToken, o as databaseUrl } from "./client-COAOdeE4.mjs";
|
|
3
3
|
import { sendSignInMail } from "./auth/mail.mjs";
|
|
4
4
|
import "./files-DhPeWwcT.mjs";
|
|
5
5
|
import { standIn } from "./auth/stand-in.mjs";
|
|
@@ -67,6 +67,18 @@ interface DatabaseToken {
|
|
|
67
67
|
interface BoundDatabases {
|
|
68
68
|
token(binding: string): Promise<DatabaseToken>;
|
|
69
69
|
userToken?(binding: string, as: string): Promise<DatabaseToken>;
|
|
70
|
+
/**
|
|
71
|
+
* Where the app's server calls the Database bound as `binding`, with its token and when that runs out, handed in
|
|
72
|
+
* with the request, so connecting asks for nothing. Undefined where the request was handed none: `token` serves.
|
|
73
|
+
*/
|
|
74
|
+
door?(binding: string): DatabaseToken | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Has the Database bound as `binding` made again after its door answered a call sent at `since` that it has none
|
|
77
|
+
* (as after a move, its rows gone): true when that call should be sent once more.
|
|
78
|
+
*/
|
|
79
|
+
remake?(binding: string, since: number): Promise<boolean>;
|
|
80
|
+
/** Adds an entry to the request's answer's `Server-Timing`, where Midsummer turned that on for its own diagnostics. */
|
|
81
|
+
note?(entry: string): void;
|
|
70
82
|
}
|
|
71
83
|
/**
|
|
72
84
|
* A token for one signed-in user of your app, for your server to hand to that user's browser, which connects with
|
|
@@ -43,6 +43,9 @@ function devToken(subject) {
|
|
|
43
43
|
*
|
|
44
44
|
* const db = await connect({ binding: "main" })
|
|
45
45
|
*
|
|
46
|
+
* In a Deployment that waits on nothing: the request hands its server the Database's address and a token, and the
|
|
47
|
+
* calls the server makes at once go to the Database together, in one request.
|
|
48
|
+
*
|
|
46
49
|
* A server on Midsummer's own contract is also handed the handle as `context.database`:
|
|
47
50
|
*
|
|
48
51
|
* const db = await connect({ database: context.database, binding: "main" })
|
|
@@ -348,6 +351,8 @@ async function connect(options) {
|
|
|
348
351
|
let url, token, refresh;
|
|
349
352
|
const server = !("url" in options);
|
|
350
353
|
if ("database" in options) {
|
|
354
|
+
const door = options.database.door?.(options.binding);
|
|
355
|
+
if (door) return facade(doorCalls(options.database, options.binding, door));
|
|
351
356
|
const first = await options.database.token(options.binding);
|
|
352
357
|
url = first.url;
|
|
353
358
|
token = first.token;
|
|
@@ -355,6 +360,8 @@ async function connect(options) {
|
|
|
355
360
|
} else if ("binding" in options) {
|
|
356
361
|
const found = bound(options.binding);
|
|
357
362
|
if ("handle" in found) {
|
|
363
|
+
const door = found.handle.door?.(options.binding);
|
|
364
|
+
if (door) return facade(doorCalls(found.handle, options.binding, door));
|
|
358
365
|
const first = await found.handle.token(options.binding);
|
|
359
366
|
url = first.url;
|
|
360
367
|
token = first.token;
|
|
@@ -416,6 +423,205 @@ async function opened(url, token, refresh, server, key) {
|
|
|
416
423
|
} catch (error) {
|
|
417
424
|
throw await refusalAt(url, token) ?? error;
|
|
418
425
|
}
|
|
426
|
+
return facade(connection);
|
|
427
|
+
}
|
|
428
|
+
/** How long before its token runs out a door's calls renew it first. Every token a request hands has a minute or more left. */
|
|
429
|
+
const DOOR_RENEW_MS = 3e4;
|
|
430
|
+
/** The most calls one request to a door carries; more made at once go in as many requests as they need. */
|
|
431
|
+
const DOOR_BATCH = 256;
|
|
432
|
+
/** The remakes this process asked for, by door: the calls at once that found their Database gone wait on one ask. */
|
|
433
|
+
const remaking = /* @__PURE__ */ new Map();
|
|
434
|
+
/**
|
|
435
|
+
* A Deployment's server's calls to its Database, sent straight to the Database's door (`<door>/call`) with the token
|
|
436
|
+
* its request handed in: stateless HTTPS, no hop through Midsummer and no socket. The calls made in one turn go
|
|
437
|
+
* together in one request (`DOOR_BATCH` at most), each answered by its `i`, and a mutation is tagged as on a socket,
|
|
438
|
+
* so one sent again applies once. A call that gets no answer, or a 5xx, is sent again twice at most; a 401 renews the
|
|
439
|
+
* token once. A token with under `DOOR_RENEW_MS` left is renewed before it is sent: from the door the request being
|
|
440
|
+
* served was handed, else the handle's `token`. The door answering that it has no Database by its id (404
|
|
441
|
+
* `not_found`, as after a move with its rows gone) asks the handle to make it again (`remake`), once, and sends the
|
|
442
|
+
* calls once more. A watch opens a socket to the door at its first use, and only then.
|
|
443
|
+
*/
|
|
444
|
+
function doorCalls(handle, binding, first) {
|
|
445
|
+
let door = first;
|
|
446
|
+
let renewing = null;
|
|
447
|
+
/** The handle of the request being served now, where it is one, else the one connected with. */
|
|
448
|
+
const now = () => served() ?? handle;
|
|
449
|
+
const renew = (force) => renewing ??= (async () => {
|
|
450
|
+
const handed = force ? void 0 : now().door?.(binding);
|
|
451
|
+
const next = handed && handed.url === door.url && handed.expiresAt - Date.now() > DOOR_RENEW_MS ? handed : {
|
|
452
|
+
...await now().token(binding),
|
|
453
|
+
url: door.url
|
|
454
|
+
};
|
|
455
|
+
door = next;
|
|
456
|
+
return next;
|
|
457
|
+
})().finally(() => {
|
|
458
|
+
renewing = null;
|
|
459
|
+
});
|
|
460
|
+
const live = async () => (door.expiresAt - Date.now() > DOOR_RENEW_MS ? door : await renew(false)).token;
|
|
461
|
+
const client = Math.random().toString(36).slice(2, 10);
|
|
462
|
+
let tags = 0, queued = [];
|
|
463
|
+
const all = (answer) => (i) => ({
|
|
464
|
+
...answer,
|
|
465
|
+
i
|
|
466
|
+
});
|
|
467
|
+
/** One request of `ops` to the door, and how to find each one's answer by its `i`. */
|
|
468
|
+
const post = async (ops) => {
|
|
469
|
+
const body = JSON.stringify(ops), since = Date.now();
|
|
470
|
+
let remade = false;
|
|
471
|
+
for (let tries = 0;; tries += 1) {
|
|
472
|
+
let token;
|
|
473
|
+
try {
|
|
474
|
+
token = await live();
|
|
475
|
+
} catch (error) {
|
|
476
|
+
return all({
|
|
477
|
+
ok: false,
|
|
478
|
+
why: "unauthenticated",
|
|
479
|
+
error: `no new token for the database bound as ${binding} (${error instanceof Error ? error.message : String(error)})`
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
const started = performance.now();
|
|
483
|
+
let response;
|
|
484
|
+
try {
|
|
485
|
+
response = await fetchAt(`${door.url}/call`, {
|
|
486
|
+
method: "POST",
|
|
487
|
+
headers: {
|
|
488
|
+
authorization: `Bearer ${token}`,
|
|
489
|
+
"content-type": "application/json"
|
|
490
|
+
},
|
|
491
|
+
body
|
|
492
|
+
});
|
|
493
|
+
} catch (error) {
|
|
494
|
+
if (tries < 2) continue;
|
|
495
|
+
return all({
|
|
496
|
+
ok: false,
|
|
497
|
+
why: "unavailable",
|
|
498
|
+
error: `couldn't reach the database bound as ${binding} (${error instanceof Error ? error.message : String(error)})`
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
const text = await response.text();
|
|
502
|
+
now().note?.(`db-call;dur=${(performance.now() - started).toFixed(1)};desc="${response.status}, ${ops.length} call${ops.length === 1 ? "" : "s"}"`);
|
|
503
|
+
if (response.status === 401 && tries === 0) {
|
|
504
|
+
try {
|
|
505
|
+
await renew(true);
|
|
506
|
+
} catch {}
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
if (!response.ok) {
|
|
510
|
+
let refused = {};
|
|
511
|
+
try {
|
|
512
|
+
refused = JSON.parse(text);
|
|
513
|
+
} catch {}
|
|
514
|
+
const asker = now();
|
|
515
|
+
if (response.status === 404 && refused.error === "not_found" && !remade && asker.remake) {
|
|
516
|
+
remade = true;
|
|
517
|
+
const at = door.url;
|
|
518
|
+
let asking = remaking.get(at);
|
|
519
|
+
if (!asking) {
|
|
520
|
+
const made = asker.remake(binding, since).catch(() => false).finally(() => {
|
|
521
|
+
if (remaking.get(at) === made) remaking.delete(at);
|
|
522
|
+
});
|
|
523
|
+
asking = made;
|
|
524
|
+
remaking.set(at, made);
|
|
525
|
+
}
|
|
526
|
+
if (await asking) continue;
|
|
527
|
+
}
|
|
528
|
+
if (response.status >= 500 && tries < 2) continue;
|
|
529
|
+
return all({
|
|
530
|
+
ok: false,
|
|
531
|
+
why: response.status === 401 ? "denied" : typeof refused.error === "string" ? refused.error : "refused",
|
|
532
|
+
error: typeof refused.why === "string" ? refused.why : text.slice(0, 200)
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
const found = /* @__PURE__ */ new Map();
|
|
536
|
+
for (const line of text.split("\n")) try {
|
|
537
|
+
const answers = JSON.parse(line);
|
|
538
|
+
if (Array.isArray(answers)) {
|
|
539
|
+
for (const answer of answers) if (typeof answer?.i === "number") found.set(answer.i, answer);
|
|
540
|
+
}
|
|
541
|
+
} catch {}
|
|
542
|
+
return (i) => found.get(i) ?? {
|
|
543
|
+
i,
|
|
544
|
+
ok: false,
|
|
545
|
+
why: "unavailable",
|
|
546
|
+
error: "no answer in the call's reply"
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
/** Sends what this turn queued, `DOOR_BATCH` calls a request. */
|
|
551
|
+
const flush = () => {
|
|
552
|
+
const batch = queued;
|
|
553
|
+
queued = [];
|
|
554
|
+
for (let start = 0; start < batch.length; start += DOOR_BATCH) {
|
|
555
|
+
const part = batch.slice(start, start + DOOR_BATCH);
|
|
556
|
+
post(part.map((each, n) => ({
|
|
557
|
+
i: n + 1,
|
|
558
|
+
...each.op
|
|
559
|
+
}))).then((answerOf) => {
|
|
560
|
+
part.forEach((each, n) => each.done(answerOf(n + 1)));
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
const call = (op) => new Promise((done) => {
|
|
565
|
+
if (queued.length === 0) queueMicrotask(flush);
|
|
566
|
+
queued.push({
|
|
567
|
+
op,
|
|
568
|
+
done
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
let socket;
|
|
572
|
+
return {
|
|
573
|
+
async query(fn, args) {
|
|
574
|
+
const answer = await call({
|
|
575
|
+
k: "q",
|
|
576
|
+
f: fn.name,
|
|
577
|
+
a: args
|
|
578
|
+
});
|
|
579
|
+
if (!answer.ok) throw Object.assign(new Error(answer.error ?? answer.why ?? "refused"), {
|
|
580
|
+
code: answer.why ?? answer.err ?? "refused",
|
|
581
|
+
answer
|
|
582
|
+
});
|
|
583
|
+
return answer.value;
|
|
584
|
+
},
|
|
585
|
+
mutation(fn, args, { tag } = {}) {
|
|
586
|
+
return call({
|
|
587
|
+
k: "m",
|
|
588
|
+
f: fn.name,
|
|
589
|
+
a: args,
|
|
590
|
+
t: tag ?? `${client}:${tags += 1}`
|
|
591
|
+
});
|
|
592
|
+
},
|
|
593
|
+
watchQuery(fn, args, options, onValue) {
|
|
594
|
+
let stopped = false, stop = () => {};
|
|
595
|
+
if (!socket) {
|
|
596
|
+
const opening = live().then((token) => Connection.connect(door.url, {
|
|
597
|
+
token,
|
|
598
|
+
refresh: async () => (await renew(true)).token,
|
|
599
|
+
shape: "server"
|
|
600
|
+
}));
|
|
601
|
+
opening.catch(() => {
|
|
602
|
+
if (socket === opening) socket = void 0;
|
|
603
|
+
});
|
|
604
|
+
socket = opening;
|
|
605
|
+
}
|
|
606
|
+
socket.then((open) => {
|
|
607
|
+
if (!stopped) stop = open.watchQuery(fn, args, options, onValue);
|
|
608
|
+
}, (error) => {
|
|
609
|
+
if (!stopped) onValue(void 0, { error: caught(error) });
|
|
610
|
+
});
|
|
611
|
+
return () => {
|
|
612
|
+
stopped = true;
|
|
613
|
+
stop();
|
|
614
|
+
};
|
|
615
|
+
},
|
|
616
|
+
close() {
|
|
617
|
+
socket?.then((open) => open.close(), () => {});
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
/** The Database handle of the request being served, in a Deployment; undefined anywhere else. */
|
|
622
|
+
const served = () => (globalThis[Symbol.for("midsummer.context")]?.())?.database;
|
|
623
|
+
/** The `Database` over a connection, a socket's or a door's (`Calls`), as `connect` describes it. */
|
|
624
|
+
function facade(connection) {
|
|
419
625
|
const call = (fn) => ({
|
|
420
626
|
name: fn.name,
|
|
421
627
|
kind: fn.kind
|
package/database/client.d.mts
CHANGED
|
@@ -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-
|
|
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-CJ8z954t.mjs";
|
|
3
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 };
|
package/database/client.mjs
CHANGED
|
@@ -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-
|
|
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-COAOdeE4.mjs";
|
|
3
3
|
export { DATABASE_TOKEN_PATH, DatabaseClient, DatabaseError, auth0, clerk, connect, databaseUrl, oidc, signedInDatabase, userToken };
|
package/database/react.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as DatabaseError } from "../errors-CnQduDOt.mjs";
|
|
2
|
-
import { o as Database, u as Reference } from "../client-
|
|
2
|
+
import { o as Database, u as Reference } from "../client-CJ8z954t.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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AuthStore } from "./store-
|
|
1
|
+
import { n as AuthStore } from "./store-CRXbsXpS.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.
|
|
3
|
+
"version": "0.1.0-staging.3760",
|
|
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-
|
|
1
|
+
import { o as Database } from "./client-CJ8z954t.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";
|