@lunora/codegen 1.0.0-alpha.104 → 1.0.0-alpha.106
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 +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{GENERATED_HEADER-C5Dapn_Y.mjs → GENERATED_HEADER-CtitJsDk.mjs} +1 -1
- package/dist/packem_shared/{OPENRPC_VERSION-CBWjXJgS.mjs → OPENRPC_VERSION-Bzh1vxcl.mjs} +1 -1
- package/dist/packem_shared/{SCHEMA_SNAPSHOT_FILENAME-BM6kIe4w.mjs → SCHEMA_SNAPSHOT_FILENAME-CXtgvIcd.mjs} +1 -1
- package/dist/packem_shared/{SDK_LANGUAGES-CAGhWtBh.mjs → SDK_LANGUAGES-fIqQtE14.mjs} +94 -94
- package/dist/packem_shared/{buildOpenApiDocument-CDYoRVC6.mjs → buildOpenApiDocument-B8-PH9af.mjs} +1 -1
- package/dist/packem_shared/{emit-B8FxCABN.mjs → emit-BbLyaTLJ.mjs} +71 -64
- package/dist/packem_shared/{emitApp-Dg-jOuj6.mjs → emitApp-DkO-Qvoo.mjs} +1 -1
- package/dist/packem_shared/isTypedSchema-9wiKtXr2.mjs +2 -0
- package/package.json +10 -10
- package/dist/packem_shared/isTypedSchema-C-UHYeJq.mjs +0 -2
package/dist/index.d.mts
CHANGED
|
@@ -3387,7 +3387,15 @@ interface OpenRpcDocument {
|
|
|
3387
3387
|
type RuntimeVerb = "action" | "mutation" | "query";
|
|
3388
3388
|
/** One RPC function, parsed and language-neutral. */
|
|
3389
3389
|
interface SdkMethod {
|
|
3390
|
-
/**
|
|
3390
|
+
/**
|
|
3391
|
+
* Generated args model name, or `undefined` when NO model could be named for
|
|
3392
|
+
* this function's arguments.
|
|
3393
|
+
*
|
|
3394
|
+
* `undefined` does NOT mean "takes no arguments" — see {@link SdkMethod.takesArgs}.
|
|
3395
|
+
* A schema carrying a `v.bigint()` or `v.bytes()` gets no model deliberately
|
|
3396
|
+
* (`hasUnrepresentableWireType`), and a backend that cannot name a shape leaves
|
|
3397
|
+
* it undeclared. Both still take arguments, just untyped ones.
|
|
3398
|
+
*/
|
|
3391
3399
|
argsType: string | undefined;
|
|
3392
3400
|
/** Raw exported function name (`"list"`), before any naming convention. */
|
|
3393
3401
|
functionName: string;
|
|
@@ -3399,6 +3407,16 @@ interface SdkMethod {
|
|
|
3399
3407
|
resultType: string | undefined;
|
|
3400
3408
|
/** Human summary for the doc comment. */
|
|
3401
3409
|
summary: string;
|
|
3410
|
+
/**
|
|
3411
|
+
* Whether this function declares arguments at all, independent of whether a
|
|
3412
|
+
* model could be named for them.
|
|
3413
|
+
*
|
|
3414
|
+
* A target emits three shapes from this: a TYPED parameter when `argsType` is
|
|
3415
|
+
* set, an UNTYPED wire-shaped parameter when it is not but this is true, and no
|
|
3416
|
+
* parameter at all when this is false. Collapsing the middle case into the last
|
|
3417
|
+
* is what made `v.bigint()` functions uncallable with arguments.
|
|
3418
|
+
*/
|
|
3419
|
+
takesArgs: boolean;
|
|
3402
3420
|
/** Which runtime verb this dispatches to. */
|
|
3403
3421
|
verb: RuntimeVerb;
|
|
3404
3422
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3387,7 +3387,15 @@ interface OpenRpcDocument {
|
|
|
3387
3387
|
type RuntimeVerb = "action" | "mutation" | "query";
|
|
3388
3388
|
/** One RPC function, parsed and language-neutral. */
|
|
3389
3389
|
interface SdkMethod {
|
|
3390
|
-
/**
|
|
3390
|
+
/**
|
|
3391
|
+
* Generated args model name, or `undefined` when NO model could be named for
|
|
3392
|
+
* this function's arguments.
|
|
3393
|
+
*
|
|
3394
|
+
* `undefined` does NOT mean "takes no arguments" — see {@link SdkMethod.takesArgs}.
|
|
3395
|
+
* A schema carrying a `v.bigint()` or `v.bytes()` gets no model deliberately
|
|
3396
|
+
* (`hasUnrepresentableWireType`), and a backend that cannot name a shape leaves
|
|
3397
|
+
* it undeclared. Both still take arguments, just untyped ones.
|
|
3398
|
+
*/
|
|
3391
3399
|
argsType: string | undefined;
|
|
3392
3400
|
/** Raw exported function name (`"list"`), before any naming convention. */
|
|
3393
3401
|
functionName: string;
|
|
@@ -3399,6 +3407,16 @@ interface SdkMethod {
|
|
|
3399
3407
|
resultType: string | undefined;
|
|
3400
3408
|
/** Human summary for the doc comment. */
|
|
3401
3409
|
summary: string;
|
|
3410
|
+
/**
|
|
3411
|
+
* Whether this function declares arguments at all, independent of whether a
|
|
3412
|
+
* model could be named for them.
|
|
3413
|
+
*
|
|
3414
|
+
* A target emits three shapes from this: a TYPED parameter when `argsType` is
|
|
3415
|
+
* set, an UNTYPED wire-shaped parameter when it is not but this is true, and no
|
|
3416
|
+
* parameter at all when this is false. Collapsing the middle case into the last
|
|
3417
|
+
* is what made `v.bigint()` functions uncallable with arguments.
|
|
3418
|
+
*/
|
|
3419
|
+
takesArgs: boolean;
|
|
3402
3420
|
/** Which runtime verb this dispatches to. */
|
|
3403
3421
|
verb: RuntimeVerb;
|
|
3404
3422
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as s,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{formatAdvisories as m,lintSchema as d,toAdvisorContext as p}from"./packem_shared/formatAdvisories-CQvIhQ04.mjs";import{describeErrorLevelFindings as c,errorAdvisoryNames as n,errorPlatformDiagnosticNames as S}from"./packem_shared/describeErrorLevelFindings-IhNx9gPr.mjs";import{CodegenDiagnosticError as E,diagnosticAt as x}from"./packem_shared/CodegenDiagnosticError-DPezpZTz.mjs";import{AGENTS_FILENAME as u,discoverAgents as v}from"./packem_shared/AGENTS_FILENAME-Dk-k250h.mjs";import{default as O}from"./packem_shared/discoverAuthApiCalls-XfNbxqlq.mjs";import{CONTAINERS_FILENAME as g,discoverContainers as
|
|
1
|
+
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as s,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{formatAdvisories as m,lintSchema as d,toAdvisorContext as p}from"./packem_shared/formatAdvisories-CQvIhQ04.mjs";import{describeErrorLevelFindings as c,errorAdvisoryNames as n,errorPlatformDiagnosticNames as S}from"./packem_shared/describeErrorLevelFindings-IhNx9gPr.mjs";import{CodegenDiagnosticError as E,diagnosticAt as x}from"./packem_shared/CodegenDiagnosticError-DPezpZTz.mjs";import{AGENTS_FILENAME as u,discoverAgents as v}from"./packem_shared/AGENTS_FILENAME-Dk-k250h.mjs";import{default as O}from"./packem_shared/discoverAuthApiCalls-XfNbxqlq.mjs";import{CONTAINERS_FILENAME as g,discoverContainers as M}from"./packem_shared/CONTAINERS_FILENAME-DQpyhY6c.mjs";import{default as h}from"./packem_shared/discoverCrons-RlATa0_t.mjs";import{FLAGS_FILENAME as L,discoverFlags as I}from"./packem_shared/FLAGS_FILENAME-Boqm0YCP.mjs";import{discoverFunctions as F}from"./packem_shared/discoverFunctions-4TNKUv7P.mjs";import{default as P}from"./packem_shared/discoverHttpRoutes-DQivLBqT.mjs";import{default as G}from"./packem_shared/discoverInserts-D6szWzrV.mjs";import{default as y}from"./packem_shared/discoverMaskProcedures-BBPqLXA5.mjs";import{default as k}from"./packem_shared/discoverMigrations-rbjxflR8.mjs";import{MUTATORS_FILENAME as W,discoverMutators as K}from"./packem_shared/MUTATORS_FILENAME-Cp_JxLSz.mjs";import{default as j}from"./packem_shared/discoverNondeterministicCalls-Bxr652Rz.mjs";import{NOTIFY_FILENAME as w,discoverNotifyCalls as B,discoverNotifyConfig as q}from"./packem_shared/NOTIFY_FILENAME-DwyJ5I4Q.mjs";import{default as Y}from"./packem_shared/readPackageDependencies-CogJX1Ia.mjs";import{y as X}from"./packem_shared/discover-queries-i4Vd2si7.mjs";import{QUEUES_FILENAME as ee,discoverQueues as re}from"./packem_shared/QUEUES_FILENAME-QpMZsde0.mjs";import{default as te}from"./packem_shared/discoverR2sqlCalls-DMxG6gHr.mjs";import{discoverRlsMetadata as ae,default as ie}from"./packem_shared/discoverRlsMetadata-B63ARnKG.mjs";import{discoverSandboxUsage as de}from"./packem_shared/discoverSandboxUsage-DBM98vVh.mjs";import{default as fe}from"./packem_shared/discoverSchema-BNr7PVcZ.mjs";import{SHAPES_FILENAME as ne,discoverShapes as Se}from"./packem_shared/SHAPES_FILENAME-WxXOsYfe.mjs";import{default as Ee}from"./packem_shared/discoverStorageRulesMetadata-_40MGqRX.mjs";import{WORKFLOWS_FILENAME as Ae,discoverWorkflows as ue}from"./packem_shared/WORKFLOWS_FILENAME-Dz80zqeT.mjs";import{S as Ne,h as Oe,M as Re,B as ge,p as Me,L as Ce,R as he,C as _e,V as Le,Q as Ie,$ as Te,E as Fe,m as De,F as Pe}from"./packem_shared/emit-BbLyaTLJ.mjs";import{emitApp as Ge}from"./packem_shared/emitApp-DkO-Qvoo.mjs";import{buildOpenApiDocument as ye,emitOpenApi as be,emitOpenApiModule as ke}from"./packem_shared/buildOpenApiDocument-B8-PH9af.mjs";import{OPENRPC_VERSION as We,buildOpenRpcDocument as Ke,emitOpenRpc as Qe,emitOpenRpcModule as je}from"./packem_shared/OPENRPC_VERSION-Bzh1vxcl.mjs";import{DEFAULT_TARGET as we,platformMatrixIds as Be,readProjectTarget as qe,resolveCodegenTarget as Je}from"./packem_shared/DEFAULT_TARGET-CH5disA3.mjs";import{SCHEMA_SNAPSHOT_FILENAME as $e,createCodegenProject as Xe,refreshCodegenProject as Ze,runCodegen as er}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-CXtgvIcd.mjs";import{SchemaSnapshotParseError as or,buildSchemaSnapshot as tr,evaluateSchemaDrift as sr,parseSchemaSnapshot as ar}from"./packem_shared/SchemaSnapshotParseError-BkgxjBPQ.mjs";import{schemaFromIr as mr}from"./packem_shared/schemaFromIr-R1ZFzVyy.mjs";import{LUNORA_ERROR_CODES as pr,validatorIrToJsonSchema as fr}from"./packem_shared/LUNORA_ERROR_CODES-zfAI2OFs.mjs";import{SDK_LANGUAGES as nr,SDK_TARGETS as Sr,generateSdk as lr}from"./packem_shared/SDK_LANGUAGES-fIqQtE14.mjs";import{redact as xr,secretKindOf as Ar}from"./packem_shared/redact-6jD4lAhq.mjs";import{MESSAGE_SOLUTIONS as vr,findSolutionByMessage as Nr}from"@lunora/errors";import{isTypedSchema as Rr}from"./packem_shared/isTypedSchema-9wiKtXr2.mjs";const e="0.0.0";export{u as AGENTS_FILENAME,g as CONTAINERS_FILENAME,E as CodegenDiagnosticError,we as DEFAULT_TARGET,L as FLAGS_FILENAME,Ne as GENERATED_HEADER,pr as LUNORA_ERROR_CODES,vr as LUNORA_SOLUTION_RULES,W as MUTATORS_FILENAME,w as NOTIFY_FILENAME,We as OPENRPC_VERSION,ee as QUEUES_FILENAME,$e as SCHEMA_SNAPSHOT_FILENAME,t as SCHEMA_SNAPSHOT_VERSION,nr as SDK_LANGUAGES,Sr as SDK_TARGETS,ne as SHAPES_FILENAME,or as SchemaSnapshotParseError,e as VERSION,Ae as WORKFLOWS_FILENAME,ye as buildOpenApiDocument,Ke as buildOpenRpcDocument,tr as buildSchemaSnapshot,Xe as createCodegenProject,c as describeErrorLevelFindings,x as diagnosticAt,s as diffSchemaSnapshots,v as discoverAgents,O as discoverAuthApiCalls,M as discoverContainers,h as discoverCrons,I as discoverFlags,F as discoverFunctions,P as discoverHttpRoutes,G as discoverInserts,y as discoverMaskProcedures,k as discoverMigrations,K as discoverMutators,j as discoverNondeterministicCalls,B as discoverNotifyCalls,q as discoverNotifyConfig,X as discoverQueries,re as discoverQueues,te as discoverR2sqlCalls,ae as discoverRlsMetadata,ie as discoverRlsProcedures,de as discoverSandboxUsage,fe as discoverSchema,Se as discoverShapes,Ee as discoverStorageRulesMetadata,ue as discoverWorkflows,Oe as emitAgents,Re as emitApi,Ge as emitApp,ge as emitCollections,Me as emitContainers,Ce as emitCrons,he as emitDataModel,_e as emitDrizzleSchema,Le as emitFunctions,be as emitOpenApi,ke as emitOpenApiModule,Qe as emitOpenRpc,je as emitOpenRpcModule,Ie as emitServer,Te as emitShard,Fe as emitVectors,De as emitWorkflows,Pe as emitWranglerCronTriggers,n as errorAdvisoryNames,S as errorPlatformDiagnosticNames,sr as evaluateSchemaDrift,Nr as findLunoraSolution,m as formatAdvisories,lr as generateSdk,Rr as isTypedSchema,d as lintSchema,ar as parseSchemaSnapshot,Be as platformMatrixIds,Y as readPackageDependencies,qe as readProjectTarget,xr as redact,Ze as refreshCodegenProject,Je as resolveCodegenTarget,er as runCodegen,mr as schemaFromIr,Ar as secretKindOf,a as serializeSchemaSnapshot,p as toAdvisorContext,fr as validatorIrToJsonSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@lunora/agent/component";import"@lunora/errors";import"./SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{S as r,d as o,a as n,h as E,
|
|
1
|
+
import"@lunora/agent/component";import"@lunora/errors";import"./SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{S as r,d as o,a as n,h as E,M as l,B as A,p as S,L as p,R as C,C as d,V as g,f as u,P as c,Q as D,$ as R,E as f,m as h,F as B}from"./emit-BbLyaTLJ.mjs";import"./paths-BmX5O1sG.mjs";export{r as GENERATED_HEADER,o as UMBRELLA_BASE_PACKAGES,n as buildStorageColumns,E as emitAgents,l as emitApi,A as emitCollections,S as emitContainers,p as emitCrons,C as emitDataModel,d as emitDrizzleSchema,g as emitFunctions,u as emitQueues,c as emitSeed,D as emitServer,R as emitShard,f as emitVectors,h as emitWorkflows,B as emitWranglerCronTriggers};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{S as a}from"./emit-
|
|
1
|
+
import{S as a}from"./emit-BbLyaTLJ.mjs";import{n as i}from"./paths-BmX5O1sG.mjs";import{validatorIrToJsonSchema as s,objectSchema as c,LUNORA_ERROR_CODES as u}from"./LUNORA_ERROR_CODES-zfAI2OFs.mjs";const p="1.3.2",m={description:"Result is TS-inferred from the function's return type (no `.output()` declared); best-effort — any JSON."},d=e=>{const r=i(e.filePath),t=`${r}:${e.exportName}`;return{description:`Invoke the \`${e.kind}\` \`${t}\` over the Lunora RPC envelope (POST /_lunora/rpc, body \`{ "functionPath": "${t}", "args": { … } }\`).`,errors:u.map((o,n)=>({code:-32e3-n,data:{code:o},message:o})),name:t,params:[{description:"The function's argument object (the RPC envelope's `args`).",name:"args",required:Object.keys(e.args).length>0,schema:c(e.args)}],result:{name:"result",schema:e.output?s(e.output):m},summary:`${e.kind}: ${t}`,"x-lunora-function-kind":e.kind,"x-tags":[{name:r}]}},l=e=>{const r=e.version??"0.0.0",t=e.functions.filter(o=>o.visibility!=="internal"&&o.kind!=="stream").map(o=>d(o)).toSorted((o,n)=>o.name.localeCompare(n.name));return{info:{description:"Auto-generated from @lunora/values-typed functions by @lunora/codegen. Do not edit — run `lunora codegen` to regenerate.",title:"Lunora RPC",version:r},methods:t,openrpc:p}},h=e=>`${JSON.stringify(l(e),void 0,2)}
|
|
2
2
|
`,O=e=>`${a}export const openRpcSpec: Record<string, unknown> = ${JSON.stringify(e,void 0,4)};
|
|
3
3
|
`;export{p as OPENRPC_VERSION,l as buildOpenRpcDocument,h as emitOpenRpc,O as emitOpenRpcModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{existsSync as b,mkdirSync as qt,readFileSync as dt,writeFileSync as Bt,rmSync as Ut}from"node:fs";import{join as g,dirname as le}from"node:path";import{performance as ue}from"node:perf_hooks";import{runAdvisor as Vt}from"@lunora/advisor";import{LunoraError as k}from"@lunora/errors";import{SyntaxKind as l,Node as o,Project as Ge}from"ts-morph";import{serializeSchemaSnapshot as Wt}from"./SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{toAdvisorContext as _t}from"./formatAdvisories-CQvIhQ04.mjs";import{discoverAgents as Gt}from"./AGENTS_FILENAME-Dk-k250h.mjs";import{discoverContainers as Ht}from"./CONTAINERS_FILENAME-DQpyhY6c.mjs";import{diagnosticAt as Z}from"./CodegenDiagnosticError-DPezpZTz.mjs";import{o as Y}from"./module-specifiers-8FEEiUcv.mjs";import{r as de,Q as Qt,R as Jt,a as Xt,
|
|
1
|
+
import{existsSync as b,mkdirSync as qt,readFileSync as dt,writeFileSync as Bt,rmSync as Ut}from"node:fs";import{join as g,dirname as le}from"node:path";import{performance as ue}from"node:perf_hooks";import{runAdvisor as Vt}from"@lunora/advisor";import{LunoraError as k}from"@lunora/errors";import{SyntaxKind as l,Node as o,Project as Ge}from"ts-morph";import{serializeSchemaSnapshot as Wt}from"./SCHEMA_SNAPSHOT_VERSION-CFhF_hmg.mjs";import{toAdvisorContext as _t}from"./formatAdvisories-CQvIhQ04.mjs";import{discoverAgents as Gt}from"./AGENTS_FILENAME-Dk-k250h.mjs";import{discoverContainers as Ht}from"./CONTAINERS_FILENAME-DQpyhY6c.mjs";import{diagnosticAt as Z}from"./CodegenDiagnosticError-DPezpZTz.mjs";import{o as Y}from"./module-specifiers-8FEEiUcv.mjs";import{r as de,Q as Qt,R as Jt,a as Xt,M as Zt,V as Yt,$ as es,B as ts,p as ss,m as rs,h as ns,f as is,L as os,E as as,C as cs,P as ls,F as us}from"./emit-BbLyaTLJ.mjs";import{g as h,p as E,P as N,C as $,O as gt,z as ds,R as pt,h as gs}from"./discover-ast-7ABwvTVn.mjs";import ps from"./readPackageDependencies-CogJX1Ia.mjs";import{discoverQueues as fs}from"./QUEUES_FILENAME-QpMZsde0.mjs";import{discoverSandboxUsage as ms}from"./discoverSandboxUsage-DBM98vVh.mjs";import hs from"./discoverStorageRulesMetadata-_40MGqRX.mjs";import{discoverWorkflows as xs}from"./WORKFLOWS_FILENAME-Dz80zqeT.mjs";import{gatePlatformFeatures as Es,resolveCodegenTarget as ys}from"./DEFAULT_TARGET-CH5disA3.mjs";import{i as I,a as D,e as x,c as A,r as $s,b as vs,s as ee,d as bs,f as Ns,y as Ss}from"./discover-queries-i4Vd2si7.mjs";import{classifyProcedureCall as M,inlineHandler as As,procedureHandler as ft,chainUsesWrappedCall as mt,isDatabaseAccessor as R,chainHasStep as ws,discoverFunctions as Ps,resolveStandardSchemaType as Is}from"./discoverFunctions-4TNKUv7P.mjs";import Ts from"./discoverAuthApiCalls-XfNbxqlq.mjs";import Ls from"./discoverCrons-RlATa0_t.mjs";import{discoverFlagKeys as ks}from"./FLAGS_FILENAME-Boqm0YCP.mjs";import Ds from"./discoverHttpRoutes-DQivLBqT.mjs";import Os from"./discoverInserts-D6szWzrV.mjs";import Cs,{discoverMaskStrategies as Fs,discoverMaskMetadata as Ks,discoverMaskHasNonLiteralPolicy as Rs}from"./discoverMaskProcedures-BBPqLXA5.mjs";import Ms from"./discoverMigrations-rbjxflR8.mjs";import{MUTATORS_FILENAME as js,isDefineMutatorCallee as zs,discoverMutators as qs}from"./MUTATORS_FILENAME-Cp_JxLSz.mjs";import Bs from"./discoverNondeterministicCalls-Bxr652Rz.mjs";import{discoverNotifyConfig as Us,discoverNotifyCalls as Vs}from"./NOTIFY_FILENAME-DwyJ5I4Q.mjs";import Ws from"./discoverR2sqlCalls-DMxG6gHr.mjs";import _s,{discoverRlsMetadata as Gs}from"./discoverRlsMetadata-B63ARnKG.mjs";import Hs from"./discoverSchema-BNr7PVcZ.mjs";import{secretKindOf as Qs,redact as Js,isHeuristicSecretKind as Xs,isSecretishName as Zs}from"./redact-6jD4lAhq.mjs";import{discoverShapes as Ys}from"./SHAPES_FILENAME-WxXOsYfe.mjs";import{emitApp as er}from"./emitApp-DkO-Qvoo.mjs";import{buildOpenApiDocument as tr,emitOpenApiModule as sr}from"./buildOpenApiDocument-B8-PH9af.mjs";import{buildOpenRpcDocument as rr,emitOpenRpcModule as nr}from"./OPENRPC_VERSION-Bzh1vxcl.mjs";import{y as ir}from"./parse-validator-CusS8QwU.mjs";import{buildSchemaSnapshot as or}from"./SchemaSnapshotParseError-BkgxjBPQ.mjs";const ar=e=>{const t=[],s=e.tables.filter(r=>r.shardMode==="global");return s.some(r=>r.globalBackend!=="hyperdrive")&&t.push({name:"@lunora/d1",reason:"`.global()` tables are D1-backed, so `_generated/app.ts` imports the D1 `ctx.db` adapter"}),s.some(r=>r.globalBackend==="hyperdrive")&&t.push({name:"@lunora/hyperdrive",reason:'`.global({ backend: "hyperdrive" })` tables route through `@lunora/hyperdrive/global`'}),e.vectorIndexes.length>0&&t.push({name:"@lunora/bindings",reason:"`.vectorize()` indexes make `_generated/vectors.ts` import `@lunora/bindings/vectors`"}),t},cr=(e,t)=>{if(t===void 0)return;const s=ar(e).filter(i=>!t.has(i.name));if(s.length===0)return;const r=s.map(i=>` - ${i.name} — ${i.reason}`).join(`
|
|
2
2
|
`);throw new k("INTERNAL",`@lunora/codegen: this schema's generated code imports packages the project does not declare:
|
|
3
3
|
${r}
|
|
4
4
|
|