@lunora/codegen 1.0.0-alpha.363 → 1.0.0-alpha.365
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/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-CVAC4R90.mjs +31 -0
- package/dist/packem_shared/emitAgents-BIvfaobb.mjs +1 -0
- package/dist/packem_shared/{emitApp-CT7iAjam.mjs → emitApp-CFkLyCIO.mjs} +119 -53
- package/dist/packem_shared/{emitShard-DdB1N32N.mjs → emitShard-tyWbUrjj.mjs} +1 -1
- package/dist/packem_shared/{shard-wyX4XRYk.mjs → shard-DOqocTdL.mjs} +130 -126
- package/dist/packem_shared/{shard-runtime-DXlpfT3P.mjs → shard-runtime-Dad_kcaX.mjs} +54 -44
- package/package.json +8 -8
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-Bmny8aw5.mjs +0 -31
- package/dist/packem_shared/emitAgents-CwwzVPZe.mjs +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{APP_METHOD_CAPABILITIES as
|
|
1
|
+
import{APP_METHOD_CAPABILITIES as T}from"./CAPABILITY_PROBES-brcmKenl.mjs";import{i as q}from"./schema-BgM8A3XV.mjs";import{a as N,I,G as y}from"./shared-Br_OnErI.mjs";const L={configKey:"vectors",doc:"Wire the Vectorize index map backing `ctx.vectors`.",method:"vectors"},f=e=>[...T.filter(({key:t})=>e.capabilities.has(t)).map(({appMethod:t})=>t),...e.hasVectors?[L]:[]],w=e=>f(e).length>0,k=e=>(e.emailAgents?.length??0)>0,c=e=>e.tables.some(t=>q(t)),p=e=>e.liveStreams===!0&&(e.liveStreamDeclarations?.length??0)>0,j=e=>e.hasScheduler?`
|
|
2
2
|
/** Resolve the \`SchedulerDO\`-backed scheduler for this env; \`undefined\` until the namespace is wired. */
|
|
3
3
|
private resolveScheduler(env: Env): ReturnType<typeof createScheduler> | undefined {
|
|
4
4
|
const namespace = this.schedulerDeclaration?.namespace(env);
|
|
5
5
|
|
|
6
6
|
return namespace ? createScheduler({${e.jurisdiction?` jurisdiction: ${JSON.stringify(e.jurisdiction)},`:""} namespace }) : undefined;
|
|
7
7
|
}
|
|
8
|
-
`:"",
|
|
8
|
+
`:"",G=e=>e?`
|
|
9
9
|
/**
|
|
10
10
|
* One bucket's \`Storage\`, signing under the name it is registered as.
|
|
11
11
|
*
|
|
@@ -114,7 +114,7 @@ import{APP_METHOD_CAPABILITIES as E}from"./CAPABILITY_PROBES-brcmKenl.mjs";impor
|
|
|
114
114
|
storageUpload: (key: string, body: ArrayBuffer, opts?: { bucket?: string; contentType?: string; sha256?: string }) => pick(opts?.bucket).upload(key, body, opts),
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
`:"",
|
|
117
|
+
`:"",P=e=>e?`
|
|
118
118
|
/**
|
|
119
119
|
* Adapt the raw D1 binding to \`@lunora/d1\`'s \`D1Exec\` (reads via \`all\`, writes via \`run\`, and — when the binding exposes it — several writes in one round trip via \`batch\`).
|
|
120
120
|
*
|
|
@@ -249,11 +249,12 @@ const buildGlobalIntrospector = (database: D1DatabaseLike): GlobalIntrospector =
|
|
|
249
249
|
* shard-local ones it filtered out before calling here — a single
|
|
250
250
|
* \`startLine\` plus positional counting would mis-attribute every row after
|
|
251
251
|
* the first gap. \`importGlobalRows\` prefers \`row.line\` when present and
|
|
252
|
-
* falls back to the position-derived count otherwise. A dry run is passed through and writes nothing
|
|
252
|
+
* falls back to the position-derived count otherwise. A dry run is passed through and writes nothing;
|
|
253
|
+
* \`onConflict: "replace"\` overwrites a row whose \`_id\` already exists instead of reporting a conflict.
|
|
253
254
|
*/
|
|
254
255
|
const buildGlobalImporter =
|
|
255
256
|
(database: D1DatabaseLike, cdc: boolean) =>
|
|
256
|
-
(request: { dryRun?: boolean; rows: ReadonlyArray<{ doc: Record<string, unknown>; line: number; table: string }>; startLine?: number }) => {
|
|
257
|
+
(request: { dryRun?: boolean; onConflict?: "replace" | "skip"; rows: ReadonlyArray<{ doc: Record<string, unknown>; line: number; table: string }>; startLine?: number }) => {
|
|
257
258
|
const exec = buildExec(database);
|
|
258
259
|
// Same reason the PITR applier carries it: a bulk import that skips the
|
|
259
260
|
// changelog restores rows no downstream consumer is ever told about.
|
|
@@ -262,6 +263,7 @@ const buildGlobalImporter =
|
|
|
262
263
|
return importGlobalRows(writer, schema as unknown as D1CtxDbOptions["schema"], {
|
|
263
264
|
dryRun: request.dryRun === true,
|
|
264
265
|
exec,
|
|
266
|
+
onConflict: request.onConflict ?? "skip",
|
|
265
267
|
rows: request.rows.map((row) => ({ doc: row.doc, line: row.line, table: row.table })),
|
|
266
268
|
...(request.startLine === undefined ? {} : { startLine: request.startLine }),
|
|
267
269
|
});
|
|
@@ -337,12 +339,12 @@ const buildGlobalCdcApplier =
|
|
|
337
339
|
|
|
338
340
|
return request.changes.length;
|
|
339
341
|
};
|
|
340
|
-
`:""
|
|
342
|
+
`:"",$=e=>[...e.hasStorage?["/** `.storage(...)` declaration — one bucket (required) plus optional extra named buckets and signed-URL config. Backs `ctx.storage` AND the studio file browser. */\ninterface StorageDeclaration<Env> {\n /** The default R2 bucket binding (the bare `ctx.storage`). */\n bucket: Selector<Env, R2BucketLike>;\n /** Extra named buckets, reached via `ctx.storage.bucket(\"name\")` and the studio's bucket picker. */\n buckets?: Record<string, Selector<Env, R2BucketLike>>;\n /** Public base URL signed/public object URLs resolve against. Omit it and `ctx.storage` in a mutation, action or HTTP handler (and the studio's copy-URL) signs against the origin the request reached the worker on — no per-environment value to ship. Queries get no such fallback (a live query re-runs with no request behind it), so a query that signs URLs needs this set. */\n publicBaseUrl?: Selector<Env, string>;\n /** R2 S3-API credentials (`{ accountId, accessKeyId, secretAccessKey, bucket, jurisdiction? }`) enabling `ctx.storage.getPresignedUrl` — native S3 presigned URLs that hit R2 directly, bypassing the worker. Omit to use only the worker-signed `getSignedUrl` path. */\n s3?: Selector<Env, R2S3Credentials>;\n /** HMAC secret for signed URLs. */\n signingSecret?: Selector<Env, string>;\n}"]:[],...e.hasScheduler?["/** `.scheduler(...)` declaration — the `SchedulerDO` namespace. Backs `ctx.scheduler` AND the studio's scheduled-jobs view. The origin its callbacks dispatch back to is not declared here: the DO reads `env.LUNORA_ORIGIN_URL` at fire time, because a caller-supplied dispatch target would be an SSRF vector. */\ninterface SchedulerDeclaration<Env> {\n /** The `SchedulerDO` namespace binding (typically `env.SCHEDULER`). */\n namespace: Selector<Env, DurableObjectNamespaceLike & ShardNamespaceLike>;\n}"]:[],...e.hasGlobal?["/** `.global(...)` declaration — the D1 binding backing `.global()` tables. Backs cross-tenant `ctx.db` reads/writes AND the studio's global data browser. */\ninterface GlobalDeclaration<Env> {\n /** The D1 binding (typically `env.DB`). */\n d1: Selector<Env, D1DatabaseLike>;\n /** The worker origin used to fan reverse cross-backend relations across shards. Without it, such a relation throws a clear error. */\n origin?: Selector<Env, string>;\n}"]:[],...e.hasHyperdriveGlobal?['/** `.hyperdriveGlobal(...)` declaration — backs `.global({ backend: "hyperdrive" })` tables on a Postgres/MySQL database via Hyperdrive. Stays reactive: the writer is injected as `globalDb` and the broadcast hook drives live queries. */\ninterface HyperdriveGlobalDeclaration<Env> {\n /** The Hyperdrive engine — selects the Postgres or MySQL dialect. */\n engine: HyperdriveEngine;\n /** Build the `SqlExec` from `env` — e.g. `buildPgExec(fromPostgresJs(postgres(env.HYPERDRIVE.connectionString)))`. Called per request, by the shard and by the stateless worker\'s admin plane, so return an exec on a connection opened for that call: never cache a driver or socket at module scope, since Workers refuse I/O across requests. */\n exec: (env: Env) => SqlExec;\n /** The worker origin used to fan reverse cross-backend relations across shards. Without it, such a relation throws a clear error. */\n origin?: Selector<Env, string>;\n}']:[],...e.hasAuth?['/** `.auth(...)` declaration — better-auth options plus the storage the adapter reads. Give it `d1` (the default) or `namespace` (a Durable Object that hosts the auth tables), never both. The builder owns the lazy build + `ensureMigrated` dance and wires `authHandler` / `resolveIdentity` / `authAdmin`. */\ninterface AuthDeclaration<Env> {\n /** The D1 binding the auth SQL adapter is wired over (via `lunoraD1Adapter`). Omit only when using `namespace`. */\n d1?: Selector<Env, unknown>;\n /** Shared secret the worker presents on the object\'s internal session route. REQUIRED with `namespace`: the binding is reachable from any worker bound to it, so the secret — not the binding — is the authorization boundary. Without it identity resolution fails closed. */\n internalSecret?: Selector<Env, string>;\n /** Name of the Durable Object instance holding the auth tables. Defaults to `"auth"`. Set it to run separate auth objects (per deployment, per tenant) off one namespace. */\n objectName?: Selector<Env, string>;\n /** The auth Durable Object namespace — the DO-backed mode. Needed for `@better-auth/scim`, which requires native transactions that D1 has none of. The object owns the auth tables, so `/api/auth/*` and identity resolution both go through it. Typed as `AuthNamespaceLike` because `createDoAuthWiring` resolves through `idFromName` + `get` and has no `getByName` fallback — both members are load-bearing here, and `ShardNamespaceLike` leaves both optional. */\n namespace?: Selector<Env, AuthNamespaceLike>;\n /** Build the better-auth options from `env` (secret, plugins, email/password, …). */\n options: (env: Env) => LunoraAuthOptions;\n}']:[]],M=e=>[...e.hasAccess?[" private accessSelector?: Selector<Env, CreateAccessResolverOptions | undefined>;"]:[]," private adminToken?: Selector<Env, string>;",...e.hasAuth?[" private authDeclaration?: AuthDeclaration<Env>;"]:[]," private cdcEnabled = false;",...e.hasDeliveryAuthorization===!1?[]:[' private deliveryAuthorizationSelector?: ShardConfig["deliveryAuthorization"];']," private reactiveCacheConfig: boolean | { maxBytes?: number; maxEntries?: number } = false;",' private maxRelationKeysLimit?: ShardConfig["maxRelationKeys"];',' private observabilitySink?: ShardConfig["observability"];',' private relationExistsPushDownMode?: ShardConfig["relationExistsPushDown"];'," private readonly extendFns: ((env: Env, derived: Readonly<WorkerOptions>) => Partial<WorkerOptions>)[] = [];",...e.hasGlobal?[" private globalDeclaration?: GlobalDeclaration<Env>;"]:[],...e.hasHyperdriveGlobal?[" private hyperdriveGlobalDeclaration?: HyperdriveGlobalDeclaration<Env>;"]:[]," private httpRouterApp?: HttpRouterLike;"," private readonly routeMap: Record<string, Route> = {};",...e.hasScheduler?[" private schedulerDeclaration?: SchedulerDeclaration<Env>;"]:[],...w(e)?[" private readonly shardExtras: Partial<ShardConfig> = {};"]:[],...c(e)?[" private shardRegistrySelector?: Selector<Env, ShardNamespaceLike | ShardRegistryRpc>;"]:[]," private shardSelector?: Selector<Env, ShardNamespaceLike>;",...e.hasSourcedTables?[' private sourceClientFactory?: NonNullable<ShardConfig["sourceClient"]>;']:[],...e.hasStorage?[" private storageDeclaration?: StorageDeclaration<Env>;"]:[]],B=e=>f(e).map(({configKey:t,doc:r,method:a})=>` /** ${r} */
|
|
341
343
|
public ${a}(factory: (env: Env) => ReturnType<NonNullable<ShardConfig["${t}"]>>): this {
|
|
342
344
|
this.shardExtras.${t} = factory as NonNullable<ShardConfig["${t}"]>;
|
|
343
345
|
|
|
344
346
|
return this;
|
|
345
|
-
}`),
|
|
347
|
+
}`),_=e=>[...e.hasAccess?[" /** Wire Cloudflare Access (Zero Trust) — feeds the verified Access identity into `ctx.auth` / RLS via `resolveIdentity`. Call it with no argument when the Access policy is attached to the Worker (the identity arrives on the execution context; nothing to configure); pass `teamDomain` + `aud` for a hostname-scoped Access application, whose `Cf-Access-Jwt-Assertion` JWT is verified against your team JWKS. When `.auth(...)` is also configured, Access is composed ahead of it (Access wins when it authenticated the caller; everyone else falls through to the app session). */\n public access(selector?: Selector<Env, CreateAccessResolverOptions>): this {\n this.accessSelector = selector ?? (() => undefined);\n\n return this;\n }"]:[],` /** Bearer token gating the \`/_lunora/admin/*\` endpoints the studio calls. */
|
|
346
348
|
public admin(selector: Selector<Env, string>): this {
|
|
347
349
|
this.adminToken = selector;
|
|
348
350
|
|
|
@@ -396,7 +398,7 @@ const buildGlobalCdcApplier =
|
|
|
396
398
|
this.shardSelector = selector;
|
|
397
399
|
|
|
398
400
|
return this;
|
|
399
|
-
}`,...
|
|
401
|
+
}`,...c(e)?[" /** The `ShardRegistryDO` namespace (typically `env.SHARD_REGISTRY`). Each shard registers itself for the `.shardBy()` tables it writes, and cross-shard export, CDC sync and migrations fan out to the shards it lists. Without it they refuse a `.shardBy()` table. */\n public shardRegistry(selector: Selector<Env, ShardNamespaceLike | ShardRegistryRpc>): this {\n this.shardRegistrySelector = selector;\n\n return this;\n }"]:[],...e.hasSourcedTables?[` /** Resolve the SQL client a \`.source(...)\` table's ingest poll reads from, given the wrangler Hyperdrive binding it named. Build it with \`@lunora/hyperdrive\`'s \`createHyperdrive\` plus your driver adapter. REQUIRED for a sourced table: without it every poll tick records "no sourceClient resolved for binding" and the table stays empty. */
|
|
400
402
|
public sourceClient(factory: (env: Env, binding: string) => ReturnType<NonNullable<ShardConfig["sourceClient"]>>): this {
|
|
401
403
|
this.sourceClientFactory = factory as NonNullable<ShardConfig["sourceClient"]>;
|
|
402
404
|
|
|
@@ -406,7 +408,7 @@ const buildGlobalCdcApplier =
|
|
|
406
408
|
this.storageDeclaration = declaration;
|
|
407
409
|
|
|
408
410
|
return this;
|
|
409
|
-
}`]:[],...
|
|
411
|
+
}`]:[],...B(e)],W=e=>{const t=a=>e.hasScheduler?`
|
|
410
412
|
...(this.schedulerDeclaration ? { scheduler: this.resolveScheduler(env) as unknown as ${a}["scheduler"] } : {}),`:"",r=[" cdc: this.cdcEnabled,"," reactiveCache: this.reactiveCacheConfig,"," ...(this.maxRelationKeysLimit === undefined ? {} : { maxRelationKeys: this.maxRelationKeysLimit }),"," ...(this.observabilitySink === undefined ? {} : { observability: this.observabilitySink }),",...e.hasDeliveryAuthorization===!1?[]:[" ...(this.deliveryAuthorizationSelector === undefined ? {} : { deliveryAuthorization: this.deliveryAuthorizationSelector }),"]," ...(this.relationExistsPushDownMode === undefined ? {} : { relationExistsPushDown: this.relationExistsPushDownMode }),",...e.hasGlobal?[` ...(this.globalDeclaration
|
|
411
413
|
? {
|
|
412
414
|
d1: (rawEnv: Record<string, unknown>, request?: { bookmark?: string; cdc?: boolean; cdcRetentionMs?: number; identity?: Record<string, unknown>; onBookmark?: (bookmark: string | undefined) => void; userId?: string | null }) => {
|
|
@@ -486,25 +488,25 @@ const buildGlobalCdcApplier =
|
|
|
486
488
|
? {
|
|
487
489
|
scheduler: (rawEnv: Record<string, unknown>) => this.resolveScheduler(rawEnv as Env),
|
|
488
490
|
}
|
|
489
|
-
: {}),`]:[],...
|
|
491
|
+
: {}),`]:[],...c(e)?[" ...(this.shardRegistrySelector ? { shardRegistry: (rawEnv: Record<string, unknown>) => this.shardRegistrySelector?.(rawEnv as Env) } : {}),"]:[],...e.hasSourcedTables?[" ...(this.sourceClientFactory === undefined ? {} : { sourceClient: this.sourceClientFactory }),"]:[],...e.hasStorage?[" ...(this.storageDeclaration ? { storage: (rawEnv: Record<string, unknown>, origin?: string) => this.resolveStorage(rawEnv as Env, origin) } : {}),"]:[],...w(e)?[" ...this.shardExtras,"]:[]];return r.length>0?`
|
|
490
492
|
${r.join(`
|
|
491
493
|
`)}
|
|
492
|
-
`:""},
|
|
494
|
+
`:""},H=e=>e?['import * as lunoraIdentityContract from "../identity.js";']:[],U=(e,t)=>e?['import type { CreateAccessResolverOptions } from "@lunora/cloudflare-access";',`import { createAccessResolver${t?", composeResolvers":""} } from "@lunora/cloudflare-access";`]:[],F=e=>e?['import { createKvIntrospectorFromEnv } from "@lunora/bindings/kv";']:[],Q=e=>e?['import { createVectorAdminIntrospector } from "@lunora/bindings/vectors";']:[],J=e=>e?['import type { D1CtxDbOptions, D1DatabaseLike, D1Exec } from "@lunora/d1";','import { applyCdcChanges, createD1CtxDb, emitD1QueryCost, exportGlobalRows, facetGlobalColumn, importGlobalRows, listGlobalTables, readD1CdcChanges, readGlobalTablePage, retryingExec } from "@lunora/d1";']:[],z=e=>e?['import notifyConfig from "../notify.js";']:[],K=e=>k(e)?['import { dispatchAgentEmail } from "@lunora/agent/inbound";']:[],V=e=>k(e)?['import * as lunoraAgentDefinitions from "../agents.js";']:[],Y=e=>{const{hasFramework:t,hasGlobal:r,hasHyperdriveGlobal:a,hasQueue:n,useUmbrella:o}=e,i=o?"lunorash/runtime":"@lunora/runtime",d=["ExecutionContextLike","HttpRouterLike","LunoraWorker","Route","ScheduledControllerLike","ShardNamespaceLike",...c(e)?["ShardRegistryRpc"]:[],"WorkerOptions",...n?["TriggerTrace"]:[],...r?["GlobalIntrospector"]:[],...e.tables.length>0?["ShardingInfo"]:[],...t?["FrameworkHostHandler"]:[]],l=[...r||a?["createCrossShardRelationCapabilities"]:[],...c(e)?["createDynamicShardRegistry","createQueryCoordinator"]:[],"createWorker",...e.jurisdiction?["declareAppJurisdiction"]:[],"resolveLogArchiveFromEnv",...e.hasAuth?["memoizeIdentity"]:[],...t?["withFrameworkWorker"]:[]].join(", ");return[`import type { ${[...d].toSorted((s,u)=>s.localeCompare(u)).join(", ")} } from "${i}";`,`import { ${l} } from "${i}";`]},X=e=>{const{hasAccess:t,hasAuth:r,hasGlobal:a,hasHyperdriveGlobal:n,hasKvIntrospector:o,hasQueue:i,hasScheduler:d,hasStorage:l,hasWorkflow:s}=e;return[...r?['import type { AuthNamespaceLike, LunoraAuth, LunoraAuthOptions } from "@lunora/auth";','import type * as LunoraAuthModule from "./authModule.js";']:[],...U(t,r),...J(a),...n?['import type { HyperdriveEngine } from "@lunora/hyperdrive/global";','import { applyHyperdriveGlobalCdc, createHyperdriveGlobalCtxDb, createHyperdriveGlobalIntrospector, exportHyperdriveGlobalRows, importHyperdriveGlobalRows, readHyperdriveGlobalCdc } from "@lunora/hyperdrive/global";','import type { SqlCtxDbOptions, SqlExec } from "@lunora/sql-store";']:[],...F(o),...Q(e.hasVectors),...d?['import type { DurableObjectNamespaceLike } from "@lunora/scheduler";','import { createScheduler } from "@lunora/scheduler";']:[],...l?['import type { R2BucketLike, R2S3Credentials, Storage } from "@lunora/storage";','import { createBucketStorage, createStorage } from "@lunora/storage";']:[],...s?['import { createWorkflowsRestClient } from "@lunora/workflow";']:[],...K(e),...Y(e),"",...H(e.identity),...V(e),...a||n?['import schema from "../schema.js";']:[],...z(e.hasNotify),'import { LUNORA_CRONS } from "./crons.js";','import { LUNORA_FUNCTIONS } from "./functions.js";',...i?['import { createQueueCaptureSink, dispatchQueueBatch, shouldCaptureQueue } from "@lunora/queue";','import { LUNORA_QUEUE_REGISTRY } from "./queues.js";']:[],'import { createShardDO } from "./shard.js";',...p(e)?[`import { liveStreamRouter } from "${e.useUmbrella?"lunorash/server":"@lunora/server"}";`]:[],...e.hasVectors?['import { LUNORA_VECTOR_INDEXES } from "./vectors.js";']:[]]},Z=e=>e.jurisdiction&&e.jurisdictionPinsAuth===!0?`
|
|
493
495
|
// The schema's jurisdiction pins the auth object like every other DO.
|
|
494
|
-
jurisdiction: ${JSON.stringify(e.jurisdiction)},`:"",
|
|
495
|
-
${e.tables.map(t=>` [${JSON.stringify(t.name)}, ${
|
|
496
|
+
jurisdiction: ${JSON.stringify(e.jurisdiction)},`:"",ee=e=>typeof e=="string"?`{ mode: { kind: ${JSON.stringify(e)} } }`:`{ mode: { field: ${JSON.stringify(e.field)}, kind: "shardBy" } }`,te=e=>[...e.tables.length>0?[` const tableSharding = new Map<string, ShardingInfo>([
|
|
497
|
+
${e.tables.map(t=>` [${JSON.stringify(t.name)}, ${ee(t.shardMode)}],`).join(`
|
|
496
498
|
`)}
|
|
497
499
|
]);
|
|
498
500
|
|
|
499
501
|
options.listSchemaTables = () => [...tableSharding.keys()];
|
|
500
|
-
options.resolveTableSharding = (table) => tableSharding.get(table);`]:[],...
|
|
502
|
+
options.resolveTableSharding = (table) => tableSharding.get(table);`]:[],...c(e)?[` const shardRegistry = this.shardRegistrySelector?.(env);
|
|
501
503
|
|
|
502
504
|
if (shardRegistry) {
|
|
503
505
|
options.queryCoordinator = createQueryCoordinator({ registry: createDynamicShardRegistry({ ${e.jurisdiction?`jurisdiction: ${JSON.stringify(e.jurisdiction)}, `:""}env, namespace: shardRegistry }) });
|
|
504
|
-
}`]:[]],
|
|
505
|
-
${
|
|
506
|
+
}`]:[]],S=e=>(e.liveStreamDeclarations??[]).map(t=>{if(N(t.exportName,"live stream export name"),!I.test(t.filePath))throw new Error(`@lunora/codegen: live stream file path is not safe to import: ${JSON.stringify(t.filePath)}`);return` { id: ${JSON.stringify(t.id)}, load: () => import("../${t.filePath}.js").then((m) => m.${t.exportName}) },`}),re=e=>p(e)?[" httpRouter: liveStreamRouter([",...S(e)," ], this.httpRouterApp),"]:[" ...(this.httpRouterApp ? { httpRouter: this.httpRouterApp } : {}),"],ae=e=>p(e)?[" liveStreamRoutes: [",...(e.liveStreamDeclarations??[]).flatMap(t=>[` ${JSON.stringify(`GET /live/${t.id}/connect`)},`,` ${JSON.stringify(`POST /live/${t.id}/control`)},`])," ],"]:[],ne=e=>p(e)?`liveStreamRouter([
|
|
507
|
+
${S(e).join(`
|
|
506
508
|
`)}
|
|
507
|
-
], host)`:"host",
|
|
509
|
+
], host)`:"host",se=e=>[...te(e),...e.hasScheduler?[` if (this.schedulerDeclaration) {
|
|
508
510
|
options.schedulerDO = this.schedulerDeclaration.namespace(env);
|
|
509
511
|
}`]:[],...e.hasWorkflow?[` options.workflowsClient = (workflowEnv) => {
|
|
510
512
|
const source = workflowEnv as Record<string, unknown>;
|
|
@@ -523,8 +525,10 @@ ${f(e).join(`
|
|
|
523
525
|
// plane: the rows \`resolveTableSharding\` classifies as \`.global()\`
|
|
524
526
|
// land here, and without it they are reported, not written.
|
|
525
527
|
options.importGlobals = buildGlobalImporter(database, this.cdcEnabled);
|
|
526
|
-
// The importer above skips the write for a dry run
|
|
528
|
+
// The importer above skips the write for a dry run, and
|
|
529
|
+
// overwrites an existing \`_id\` under \`onConflict: "replace"\`.
|
|
527
530
|
options.importGlobalsSupportsDryRun = true;
|
|
531
|
+
options.importGlobalsSupportsReplace = true;
|
|
528
532
|
// The read/replay half of the same admin plane. Each one is the
|
|
529
533
|
// only reason its endpoint can see the global storage plane at
|
|
530
534
|
// all, and every one of them fails SILENTLY when unset — export
|
|
@@ -537,6 +541,47 @@ ${f(e).join(`
|
|
|
537
541
|
options.syncGlobals = buildGlobalCdcSync(database);
|
|
538
542
|
options.applyGlobals = buildGlobalCdcApplier(database, this.cdcEnabled);
|
|
539
543
|
}
|
|
544
|
+
}`]:[],...e.hasHyperdriveGlobal?[` const hyperdriveDeclaration = this.hyperdriveGlobalDeclaration;
|
|
545
|
+
|
|
546
|
+
if (hyperdriveDeclaration) {
|
|
547
|
+
const engine = hyperdriveDeclaration.engine;
|
|
548
|
+
const hyperdriveSchema = schema as unknown as SqlCtxDbOptions["schema"];
|
|
549
|
+
const exec = (): SqlExec => hyperdriveDeclaration.exec(env);
|
|
550
|
+
const cdc = this.cdcEnabled;
|
|
551
|
+
|
|
552
|
+
options.globalIntrospector = {
|
|
553
|
+
facetColumn: (request) => createHyperdriveGlobalIntrospector(engine, exec(), hyperdriveSchema).facetColumn(request),
|
|
554
|
+
listTables: () => createHyperdriveGlobalIntrospector(engine, exec(), hyperdriveSchema).listTables(),
|
|
555
|
+
readTablePage: (request) => createHyperdriveGlobalIntrospector(engine, exec(), hyperdriveSchema).readTablePage(request),
|
|
556
|
+
};
|
|
557
|
+
options.importGlobals = (request) =>
|
|
558
|
+
importHyperdriveGlobalRows({
|
|
559
|
+
cdc,
|
|
560
|
+
dryRun: request.dryRun === true,
|
|
561
|
+
engine,
|
|
562
|
+
exec: exec(),
|
|
563
|
+
onConflict: request.onConflict ?? "skip",
|
|
564
|
+
rows: request.rows,
|
|
565
|
+
schema: hyperdriveSchema,
|
|
566
|
+
...(request.startLine === undefined ? {} : { startLine: request.startLine }),
|
|
567
|
+
});
|
|
568
|
+
options.importGlobalsSupportsDryRun = true;
|
|
569
|
+
options.importGlobalsSupportsReplace = true;
|
|
570
|
+
options.exportGlobals = (request) => exportHyperdriveGlobalRows({ engine, exec: exec(), schema: hyperdriveSchema, tables: request.tables });
|
|
571
|
+
options.syncGlobals = async (request) => {
|
|
572
|
+
const page = await readHyperdriveGlobalCdc(engine, exec(), request);
|
|
573
|
+
|
|
574
|
+
// \`as unknown as\`: \`CdcChange\` is an interface, which carries no implicit index signature.
|
|
575
|
+
return { changes: page.changes as unknown as ReadonlyArray<Record<string, unknown>>, cursor: page.cursor };
|
|
576
|
+
};
|
|
577
|
+
options.applyGlobals = (request) =>
|
|
578
|
+
applyHyperdriveGlobalCdc({
|
|
579
|
+
cdc,
|
|
580
|
+
changes: request.changes as unknown as Parameters<typeof applyHyperdriveGlobalCdc>[0]["changes"],
|
|
581
|
+
engine,
|
|
582
|
+
exec: exec(),
|
|
583
|
+
schema: hyperdriveSchema,
|
|
584
|
+
});
|
|
540
585
|
}`]:[],...e.hasStorage?[` if (this.storageDeclaration) {
|
|
541
586
|
Object.assign(options, this.buildStorageAdmin(env));
|
|
542
587
|
options.storage = (rawEnv: unknown, origin?: string) => this.resolveStorage(rawEnv as Env, origin);
|
|
@@ -564,6 +609,7 @@ ${f(e).join(`
|
|
|
564
609
|
}`,...e.hasAuth?[` // Captured before the branch so the narrowing survives — reading
|
|
565
610
|
// \`this.authDeclaration.namespace\` again below would be optional all over again.
|
|
566
611
|
const authDeclaration = this.authDeclaration;
|
|
612
|
+
const { authDiscoveryPathsFor, createAuthAdmin, createAuthAuditReader, createDoAuthWiring, d1Executor, handleAuthDiscoveryRequest, handleAuthRequest } = deferred.auth;
|
|
567
613
|
const authNamespace = authDeclaration?.namespace;
|
|
568
614
|
const authD1 = authDeclaration?.d1;
|
|
569
615
|
|
|
@@ -584,7 +630,7 @@ ${f(e).join(`
|
|
|
584
630
|
// Memoised on the declaration: a framework-hosted worker rebuilds these
|
|
585
631
|
// options per request, and \`options(env)\` rebuilds every plugin.
|
|
586
632
|
discoveryPaths,
|
|
587
|
-
internalSecret,${
|
|
633
|
+
internalSecret,${Z(e)}
|
|
588
634
|
namespace,
|
|
589
635
|
...(objectName === undefined ? {} : { objectName }),
|
|
590
636
|
});
|
|
@@ -754,15 +800,34 @@ ${f(e).join(`
|
|
|
754
800
|
}`]:[],...e.voiceAgents&&e.voiceAgents.length>0?[` options.voiceAgents = {
|
|
755
801
|
${e.voiceAgents.map(t=>` ${JSON.stringify(t.exportName)}: (env as Record<string, unknown>)[${JSON.stringify(t.bindingName)}] as ShardNamespaceLike,`).join(`
|
|
756
802
|
`)}
|
|
757
|
-
};`]:[]],
|
|
803
|
+
};`]:[]],oe=e=>[" cronJobs: LUNORA_CRONS,"," functions: LUNORA_FUNCTIONS,",...e.identity?[` identity: lunoraIdentityContract.${e.identity.exportName},`]:[],...e.jurisdiction?[` jurisdiction: ${JSON.stringify(e.jurisdiction)},`]:[],...e.wantsArchitecture?[" architecture: deferred.architecture,"]:[],...e.wantsOpenApi?[" openApiSpec: deferred.openApiSpec,"]:[],...e.wantsOpenRpc?[" openRpcSpec: deferred.openRpcSpec,"]:[],...e.hasQueue?[` queue: (batch: unknown, queueEnv: unknown, _context: ExecutionContextLike, trigger: TriggerTrace, ${e.liveStreams?"queueLive":"_live"}: Parameters<typeof dispatchQueueBatch>[2]["live"], queueFetch: Parameters<typeof dispatchQueueBatch>[2]["fetchImpl"]): Promise<void> =>`," dispatchQueueBatch(batch as Parameters<typeof dispatchQueueBatch>[0], LUNORA_QUEUE_REGISTRY, {"," capture: shouldCaptureQueue(queueEnv as Record<string, unknown>)",` ? createQueueCaptureSink(queueEnv as Record<string, unknown>${e.jurisdiction?`, { jurisdiction: ${JSON.stringify(e.jurisdiction)} }`:""})`," : undefined,"," env: queueEnv as Record<string, unknown>,"," traceparent: trigger.traceparent,"," fetchImpl: queueFetch,",...e.liveStreams?[" live: queueLive,"]:[]," }),"]:[],...re(e),...ae(e)," routes: this.routeMap,",...e.liveStreamsWithheld?[" liveStreams: false,"]:[]," shardDO: this.shardSelector?.(env) ?? (undefined as unknown as ShardNamespaceLike),"],ie=e=>e?`
|
|
758
804
|
/** The identity memo per \`env\` object, owned by one assembled worker. */
|
|
759
805
|
type IdentityMemoStore = WeakMap<object, ReturnType<typeof memoizeIdentity>>;
|
|
760
|
-
`:"",
|
|
806
|
+
`:"",E=e=>e.hasAuth||e.wantsArchitecture||e.wantsOpenApi||e.wantsOpenRpc,le=e=>{if(!E(e))return"";const r=[[e.wantsArchitecture,"architecture","unknown",'(await import("./architecture.js")).architecture'],[e.hasAuth,"auth","typeof LunoraAuthModule",'await import("./authModule.js")'],[e.wantsOpenApi,"openApiSpec","unknown",'(await import("./openapi.js")).openApiSpec'],[e.wantsOpenRpc,"openRpcSpec","unknown",'(await import("./openrpc.js")).openRpcSpec']].filter(([a])=>a).map(([,a,n,o])=>[a,n,o]);return`
|
|
807
|
+
/** What the worker reads only once a request arrives: loaded then, not at isolate startup (Cloudflare caps startup at 1 s of CPU). */
|
|
808
|
+
interface DeferredModules {
|
|
809
|
+
${r.map(([a,n])=>` ${a}: ${n};`).join(`
|
|
810
|
+
`)}
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
let deferredModules: Promise<DeferredModules> | undefined;
|
|
814
|
+
|
|
815
|
+
/** Loads {@link DeferredModules} once per isolate; every entry that builds the worker awaits it first. */
|
|
816
|
+
const loadDeferredModules = (): Promise<DeferredModules> =>
|
|
817
|
+
(deferredModules ??= (async (): Promise<DeferredModules> => {
|
|
818
|
+
return {
|
|
819
|
+
${r.map(([a,,n])=>` ${a}: ${n},`).join(`
|
|
820
|
+
`)}
|
|
821
|
+
};
|
|
822
|
+
})());
|
|
823
|
+
`},ce=e=>E(e)?{asyncIfDeferred:"async ",deferredArgument:", deferred",deferredParameter:", deferred: DeferredModules",loadDeferredLine:`
|
|
824
|
+
const deferred = await loadDeferredModules();`}:{asyncIfDeferred:"",deferredArgument:"",deferredParameter:"",loadDeferredLine:""},be=e=>e?`${y}export { authDiscoveryPathsFor, createAuth, createAuthAdmin, createAuthAuditReader, createDoAuthWiring, d1Executor, handleAuthDiscoveryRequest, handleAuthRequest, lunoraD1Adapter } from "@lunora/auth/worker";
|
|
825
|
+
`:"",de=e=>[...e.hasAuth?["AuthDeclaration"]:[],"ComposedApp",...e.hasGlobal?["GlobalDeclaration"]:[],"LunoraConfig",...e.hasScheduler?["SchedulerDeclaration"]:[],"Selector",...e.hasStorage?["StorageDeclaration"]:[]].toSorted((t,r)=>t.localeCompare(r)).join(", "),me=e=>{const t=(e.hasVectors??!0)&&(e.vectorIndexCount??0)>0,r={...e,hasVectors:t},{hasAuth:a}=r,n=$(r),o=se(r),i=a?` let auth: LunoraAuth | null = null;
|
|
761
826
|
let authInit: Promise<void> | null = null;
|
|
762
827
|
// One memo per env for THIS assembled worker: a framework-hosted worker rebuilds its options per
|
|
763
828
|
// request and must reuse it, but a second \`assemble()\` has its own auth closure and must not share.
|
|
764
829
|
const identityMemos: IdentityMemoStore = new WeakMap();
|
|
765
|
-
`:"",
|
|
830
|
+
`:"",d=a?`
|
|
766
831
|
const initAuth = async (env: Env): Promise<void> => {
|
|
767
832
|
if (!this.authDeclaration) {
|
|
768
833
|
return;
|
|
@@ -792,6 +857,7 @@ type IdentityMemoStore = WeakMap<object, ReturnType<typeof memoizeIdentity>>;
|
|
|
792
857
|
// On a first boot against an unmigrated database this means better-auth's
|
|
793
858
|
// eager schema check runs BEFORE the migration, so one
|
|
794
859
|
// "the auth tables do not match…" line on a cold start is expected.
|
|
860
|
+
const { createAuth, lunoraD1Adapter } = (await loadDeferredModules()).auth;
|
|
795
861
|
const requestAuth = createAuth({ ...this.authDeclaration.options(env), database: lunoraD1Adapter(d1(env) as never) });
|
|
796
862
|
|
|
797
863
|
// Loaded on first request, not at module evaluation: the migrator pulls in kysely and
|
|
@@ -814,17 +880,17 @@ type IdentityMemoStore = WeakMap<object, ReturnType<typeof memoizeIdentity>>;
|
|
|
814
880
|
authInit = null;
|
|
815
881
|
throw error;
|
|
816
882
|
}));
|
|
817
|
-
`:"",h=a?`
|
|
818
|
-
await ensureAuth(env);`:"",
|
|
819
|
-
host ? withFrameworkWorker(${
|
|
820
|
-
${
|
|
883
|
+
`:"",{asyncIfDeferred:l,deferredArgument:s,deferredParameter:u,loadDeferredLine:h}=ce(r),D=a?`
|
|
884
|
+
await ensureAuth(env);`:"",b=`${a?"() => auth, identityMemos":"() => null"}${s}`,R=`${a?"getAuth: () => LunoraAuth | null, identityMemos: IdentityMemoStore":"_getAuth: () => null"}${u}`,m=`env: Env${u}`,A=r.hasFramework?` const buildWorker = (${m}): LunoraWorker =>
|
|
885
|
+
host ? withFrameworkWorker(${ne(r)}, (hostEnv) => this.buildWorkerOptions(hostEnv as Env, ${b})) : createWorker(this.buildWorkerOptions(env, ${b}));`:` const buildWorker = (${m}): LunoraWorker => createWorker(this.buildWorkerOptions(env, ${b}));`,x=r.hasFramework?"host?: FrameworkHostHandler":"",g=r.emailAgents??[],C=g.length>0?` composed.email = dispatchAgentEmail([
|
|
886
|
+
${g.map(v=>` { agent: lunoraAgentDefinitions.${v.exportName}, className: ${JSON.stringify(v.className)} },`).join(`
|
|
821
887
|
`)}
|
|
822
888
|
]);
|
|
823
889
|
|
|
824
|
-
`:"",
|
|
890
|
+
`:"",O=` /** Materialise the standalone Cloudflare worker + \`ShardDO\` class. */
|
|
825
891
|
public build(): ComposedApp {
|
|
826
892
|
return this.assemble();
|
|
827
|
-
}${r.hasFramework?"\n\n /** Compose Lunora's realtime plane INTO a meta-framework's Cloudflare handler (SvelteKit/Astro/Nuxt). The framework `host` serves everything except the reserved `/_lunora/*` endpoints; pass the adapter-emitted worker (e.g. SvelteKit's `_worker.js`, Astro's `handle`). */\n public buildFrameworkWorker(host: FrameworkHostHandler): ComposedApp {\n return this.assemble(host);\n }":""}`;return`${
|
|
893
|
+
}${r.hasFramework?"\n\n /** Compose Lunora's realtime plane INTO a meta-framework's Cloudflare handler (SvelteKit/Astro/Nuxt). The framework `host` serves everything except the reserved `/_lunora/*` endpoints; pass the adapter-emitted worker (e.g. SvelteKit's `_worker.js`, Astro's `handle`). */\n public buildFrameworkWorker(host: FrameworkHostHandler): ComposedApp {\n return this.assemble(host);\n }":""}`;return`${y}${X(r).join(`
|
|
828
894
|
`)}
|
|
829
895
|
|
|
830
896
|
/** Read a value off the per-request \`env\`. Returns \`undefined\` to leave the capability unconfigured (its \`ctx.*\`/admin surface stays a clear-error stub). */
|
|
@@ -832,7 +898,7 @@ type Selector<Env, T> = (env: Env) => T | undefined;
|
|
|
832
898
|
|
|
833
899
|
/** The generated \`createShardDO\` config — \`.observability()\`, \`.maxRelationKeys()\` and the long-tail \`.ai()\` / \`.kv()\` / … methods pass straight through to it. */
|
|
834
900
|
type ShardConfig = NonNullable<Parameters<typeof createShardDO>[0]>;
|
|
835
|
-
${
|
|
901
|
+
${ie(a)}${le(r)}${r.jurisdiction?`
|
|
836
902
|
// Module scope, so every isolate loading this script (the worker and each Durable
|
|
837
903
|
// Object class it exports) knows the schema's jurisdiction before a request runs.
|
|
838
904
|
// \`@lunora/mail\` reads it to pin its shard RPC like every other DO path.
|
|
@@ -857,54 +923,54 @@ interface ComposedApp extends LunoraWorker {
|
|
|
857
923
|
* first request so per-isolate singletons are built once.
|
|
858
924
|
*/
|
|
859
925
|
class AppBuilder<Env extends object> {
|
|
860
|
-
${
|
|
926
|
+
${M(r).join(`
|
|
861
927
|
`)}
|
|
862
928
|
|
|
863
929
|
private emailHandler?: (env: Env) => (message: unknown, env: unknown, context: ExecutionContextLike) => Promise<void>;
|
|
864
930
|
|
|
865
|
-
${
|
|
931
|
+
${_(r).join(`
|
|
866
932
|
|
|
867
933
|
`)}
|
|
868
934
|
|
|
869
|
-
${
|
|
935
|
+
${O}
|
|
870
936
|
|
|
871
937
|
/** Build the shard DO + compose the worker (standalone or framework-hosted), wrapping the lazy per-isolate singletons + auth init. */
|
|
872
|
-
private assemble(${
|
|
873
|
-
const ShardDO = createShardDO({${
|
|
938
|
+
private assemble(${x}): ComposedApp {
|
|
939
|
+
const ShardDO = createShardDO({${W(r)}});
|
|
874
940
|
|
|
875
941
|
// Per-isolate singletons: the worker (and auth instance) are expensive to
|
|
876
942
|
// build, so the first request constructs them and every later request on
|
|
877
943
|
// the same isolate reuses them.
|
|
878
944
|
let worker: LunoraWorker | null = null;
|
|
879
|
-
${i}${
|
|
880
|
-
${
|
|
945
|
+
${i}${d}
|
|
946
|
+
${A}
|
|
881
947
|
|
|
882
948
|
const composed: ComposedApp = {
|
|
883
949
|
ShardDO,
|
|
884
950
|
fetch: async (request: Request, rawEnv: unknown, context: ExecutionContextLike): Promise<Response> => {
|
|
885
|
-
const env = rawEnv as Env;${h}
|
|
886
|
-
worker ??= buildWorker(env);
|
|
951
|
+
const env = rawEnv as Env;${h}${D}
|
|
952
|
+
worker ??= buildWorker(env${s});
|
|
887
953
|
|
|
888
954
|
return worker.fetch(request, rawEnv, context);
|
|
889
955
|
},
|
|
890
|
-
scheduled: async (controller: ScheduledControllerLike, rawEnv: unknown, context: ExecutionContextLike): Promise<void> => {
|
|
891
|
-
worker ??= buildWorker(rawEnv as Env);
|
|
956
|
+
scheduled: async (controller: ScheduledControllerLike, rawEnv: unknown, context: ExecutionContextLike): Promise<void> => {${h}
|
|
957
|
+
worker ??= buildWorker(rawEnv as Env${s});
|
|
892
958
|
|
|
893
959
|
return worker.scheduled(controller, rawEnv, context);
|
|
894
960
|
},
|
|
895
|
-
serverQuery: (request, rawEnv, reference, args, options) => {
|
|
896
|
-
worker ??= buildWorker(rawEnv as Env);
|
|
961
|
+
serverQuery: ${l}(request, rawEnv, reference, args, options) => {${h}
|
|
962
|
+
worker ??= buildWorker(rawEnv as Env${s});
|
|
897
963
|
|
|
898
964
|
return worker.serverQuery(request, rawEnv, reference, args, options);
|
|
899
965
|
},${r.hasQueue||r.hasFramework?`
|
|
900
|
-
queue: async (batch: unknown, rawEnv: unknown, context: ExecutionContextLike): Promise<void> => {
|
|
901
|
-
worker ??= buildWorker(rawEnv as Env);
|
|
966
|
+
queue: async (batch: unknown, rawEnv: unknown, context: ExecutionContextLike): Promise<void> => {${h}
|
|
967
|
+
worker ??= buildWorker(rawEnv as Env${s});
|
|
902
968
|
|
|
903
969
|
return worker.queue?.(batch, rawEnv, context);
|
|
904
970
|
},`:""}
|
|
905
971
|
};
|
|
906
972
|
|
|
907
|
-
${
|
|
973
|
+
${C} if (this.emailHandler) {
|
|
908
974
|
const handler = this.emailHandler;
|
|
909
975
|
|
|
910
976
|
composed.email = (message, rawEnv, context) => handler(rawEnv as Env)(message, rawEnv, context);
|
|
@@ -915,8 +981,8 @@ ${r.hasFramework?`
|
|
|
915
981
|
// of its own the host's is the only one there is — forward to it rather than
|
|
916
982
|
// dropping the entry.
|
|
917
983
|
if (!composed.email && host && typeof host === "object" && typeof host.email === "function") {
|
|
918
|
-
composed.email = (message, rawEnv, context) => {
|
|
919
|
-
worker ??= buildWorker(rawEnv as Env);
|
|
984
|
+
composed.email = ${l}(message, rawEnv, context) => {${h}
|
|
985
|
+
worker ??= buildWorker(rawEnv as Env${s});
|
|
920
986
|
|
|
921
987
|
return worker.email?.(message, rawEnv, context) ?? Promise.resolve();
|
|
922
988
|
};
|
|
@@ -924,11 +990,11 @@ ${r.hasFramework?`
|
|
|
924
990
|
`:""}
|
|
925
991
|
return composed;
|
|
926
992
|
}
|
|
927
|
-
${
|
|
993
|
+
${j(r)}${G(r.hasStorage)}
|
|
928
994
|
/** Fan the recorded declarations into the worker-side \`createWorker\` options. */
|
|
929
|
-
private buildWorkerOptions(env: Env, ${
|
|
995
|
+
private buildWorkerOptions(env: Env, ${R}): WorkerOptions {
|
|
930
996
|
const options: WorkerOptions = {
|
|
931
|
-
${
|
|
997
|
+
${oe(r).join(`
|
|
932
998
|
`)}
|
|
933
999
|
};
|
|
934
1000
|
|
|
@@ -949,7 +1015,7 @@ ${o.join(`
|
|
|
949
1015
|
return options;
|
|
950
1016
|
}
|
|
951
1017
|
}
|
|
952
|
-
${
|
|
1018
|
+
${P(r.hasGlobal)}
|
|
953
1019
|
/**
|
|
954
1020
|
* Shape of the project's root \`lunora.config.*\`.
|
|
955
1021
|
*
|
|
@@ -988,5 +1054,5 @@ interface LunoraConfig<Env extends object = object> {
|
|
|
988
1054
|
const defineApp = <Env extends object>(): AppBuilder<Env> => new AppBuilder<Env>();
|
|
989
1055
|
|
|
990
1056
|
export { AppBuilder, defineApp };
|
|
991
|
-
export type { ${
|
|
992
|
-
`};export{
|
|
1057
|
+
export type { ${de(r)} };
|
|
1058
|
+
`};export{me as emitApp,be as emitAuthModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./SCHEMA_SNAPSHOT_VERSION-SplX7j_9.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as d}from"./shard-
|
|
1
|
+
import"./SCHEMA_SNAPSHOT_VERSION-SplX7j_9.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as d}from"./shard-DOqocTdL.mjs";import"./shard-runtime-Dad_kcaX.mjs";import"./shared-Br_OnErI.mjs";import"./platform-8oj7iXQy.mjs";import"./schema-BgM8A3XV.mjs";export{d as default};
|