@lunora/codegen 1.0.0-alpha.289 → 1.0.0-alpha.290
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.mjs +1 -1
- package/dist/packem_shared/{SCHEMA_SNAPSHOT_FILENAME-Ddnww-0x.mjs → SCHEMA_SNAPSHOT_FILENAME-3FEkspbx.mjs} +1 -1
- package/dist/packem_shared/{emitShard-CngydZFL.mjs → emitShard-DguoZWGv.mjs} +1 -1
- package/dist/packem_shared/{shard-BTfJuEeP.mjs → shard-BNhX5R-a.mjs} +23 -15
- package/package.json +5 -5
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-C0oHwiJZ.mjs";import{formatAdvisories as m,lintSchema as f,toAdvisorContext as d}from"./packem_shared/formatAdvisories-DwmUKYuc.mjs";import{describeErrorLevelFindings as n,errorAdvisoryNames as l,errorPlatformDiagnosticNames as c,sortedUniqueNames as x}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CAPABILITY_PROBES as E}from"./packem_shared/CAPABILITY_PROBES-brcmKenl.mjs";import{CodegenDiagnosticError as A,diagnosticAt as v}from"./packem_shared/CodegenDiagnosticError-BUXlG3P-.mjs";import{AGENTS_FILENAME as N,discoverAgents as g}from"./packem_shared/AGENTS_FILENAME-CwwSEW6a.mjs";import{isTestPath as R,listLunoraSourceFiles as T}from"./packem_shared/isTestPath-B81lOULB.mjs";import{default as I}from"./packem_shared/discoverAuthApiCalls-DAaK0HUK.mjs";import{CONTAINERS_FILENAME as L,discoverContainers as M}from"./packem_shared/CONTAINERS_FILENAME-BtX5vWh8.mjs";import{default as P}from"./packem_shared/discoverCrons-DF7dOP9x.mjs";import{capabilitiesUsedBy as b,foldCapabilitySignals as y,mayReadCapabilityContext as U,sourceCapabilitySignals as G}from"./packem_shared/capabilitiesUsedBy-QgSZyE0T.mjs";import{FLAGS_FILENAME as j,discoverFlags as B}from"./packem_shared/FLAGS_FILENAME-Bf0MSlHH.mjs";import{default as W}from"./packem_shared/discoverFunctions-DsQwrwWq.mjs";import{default as V}from"./packem_shared/discoverHttpRoutes-Cv-h-Yuc.mjs";import{default as Q}from"./packem_shared/discoverHyperdriveCalls-xy2G6igG.mjs";import{default as w}from"./packem_shared/discoverInserts-CQsoloGk.mjs";import{d as Y}from"./packem_shared/index-BoPXSW7g.mjs";import{default as Z}from"./packem_shared/discoverMigrations-uxm9qHrr.mjs";import{MUTATORS_FILENAME as ee,discoverMutators as re}from"./packem_shared/MUTATORS_FILENAME-Dl1tElqi.mjs";import{default as te}from"./packem_shared/discoverNondeterministicCalls-Dm7_PJoA.mjs";import{NOTIFY_FILENAME as ae,discoverNotifyCalls as ie,discoverNotifyChannels as me,discoverNotifyConfig as fe}from"./packem_shared/NOTIFY_FILENAME-BeTurUSC.mjs";import{default as pe}from"./packem_shared/readPackageDependencies-RHhGiz0k.mjs";import{default as le}from"./packem_shared/discoverQueries-BqECbkm9.mjs";import{QUEUES_FILENAME as xe,discoverQueues as Se}from"./packem_shared/QUEUES_FILENAME-D588u733.mjs";import{default as ue}from"./packem_shared/discoverR2sqlCalls-I9IqJFcy.mjs";import{default as ve}from"./packem_shared/discoverRlsProcedures-Bkohn4ZR.mjs";import{default as Ne}from"./packem_shared/discoverRlsMetadata-Cu4bc5KZ.mjs";import{discoverSandboxUsage as Oe}from"./packem_shared/discoverSandboxUsage-w6Q3RvxZ.mjs";import{default as Te}from"./packem_shared/discoverSchema-BCxeD80d.mjs";import{readServiceBindings as Ie,resolveServiceBindings as _e}from"./packem_shared/readServiceBindings-DvqIThzd.mjs";import{SHAPES_FILENAME as Me,discoverShapes as Fe}from"./packem_shared/SHAPES_FILENAME-D-Q8lSEw.mjs";import{default as De}from"./packem_shared/discoverStorageRulesMetadata-D6rjgKYC.mjs";import{WORKFLOWS_FILENAME as ye,discoverWorkflows as Ue}from"./packem_shared/WORKFLOWS_FILENAME-BGMSNTDC.mjs";import{emitApp as He}from"./packem_shared/emitApp-D7G7gmV7.mjs";import{isD1GlobalTable as Be,isHyperdriveGlobalTable as ke}from"./packem_shared/isD1GlobalTable-udvHAAzD.mjs";import{buildOpenApiDocument as Ke,emitOpenApi as Ve,emitOpenApiModule as ze}from"./packem_shared/buildOpenApiDocument-DFv-RYZU.mjs";import{OPENRPC_VERSION as qe,buildOpenRpcDocument as we,emitOpenRpc as Je,emitOpenRpcModule as Ye}from"./packem_shared/OPENRPC_VERSION-CCY7xqSL.mjs";import{DEFAULT_TARGET as Ze,platformMatrixIds as $e,readProjectTarget as er,resolveCodegenTarget as rr}from"./packem_shared/DEFAULT_TARGET-3U7x981M.mjs";import{l as tr,r as sr}from"./packem_shared/project-config-file-BV7RR-l6.mjs";import{SCHEMA_SNAPSHOT_FILENAME as ir,createCodegenProject as mr,findTsconfig as fr,refreshCodegenProject as dr,runCodegen as pr}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-
|
|
1
|
+
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as s,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{formatAdvisories as m,lintSchema as f,toAdvisorContext as d}from"./packem_shared/formatAdvisories-DwmUKYuc.mjs";import{describeErrorLevelFindings as n,errorAdvisoryNames as l,errorPlatformDiagnosticNames as c,sortedUniqueNames as x}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CAPABILITY_PROBES as E}from"./packem_shared/CAPABILITY_PROBES-brcmKenl.mjs";import{CodegenDiagnosticError as A,diagnosticAt as v}from"./packem_shared/CodegenDiagnosticError-BUXlG3P-.mjs";import{AGENTS_FILENAME as N,discoverAgents as g}from"./packem_shared/AGENTS_FILENAME-CwwSEW6a.mjs";import{isTestPath as R,listLunoraSourceFiles as T}from"./packem_shared/isTestPath-B81lOULB.mjs";import{default as I}from"./packem_shared/discoverAuthApiCalls-DAaK0HUK.mjs";import{CONTAINERS_FILENAME as L,discoverContainers as M}from"./packem_shared/CONTAINERS_FILENAME-BtX5vWh8.mjs";import{default as P}from"./packem_shared/discoverCrons-DF7dOP9x.mjs";import{capabilitiesUsedBy as b,foldCapabilitySignals as y,mayReadCapabilityContext as U,sourceCapabilitySignals as G}from"./packem_shared/capabilitiesUsedBy-QgSZyE0T.mjs";import{FLAGS_FILENAME as j,discoverFlags as B}from"./packem_shared/FLAGS_FILENAME-Bf0MSlHH.mjs";import{default as W}from"./packem_shared/discoverFunctions-DsQwrwWq.mjs";import{default as V}from"./packem_shared/discoverHttpRoutes-Cv-h-Yuc.mjs";import{default as Q}from"./packem_shared/discoverHyperdriveCalls-xy2G6igG.mjs";import{default as w}from"./packem_shared/discoverInserts-CQsoloGk.mjs";import{d as Y}from"./packem_shared/index-BoPXSW7g.mjs";import{default as Z}from"./packem_shared/discoverMigrations-uxm9qHrr.mjs";import{MUTATORS_FILENAME as ee,discoverMutators as re}from"./packem_shared/MUTATORS_FILENAME-Dl1tElqi.mjs";import{default as te}from"./packem_shared/discoverNondeterministicCalls-Dm7_PJoA.mjs";import{NOTIFY_FILENAME as ae,discoverNotifyCalls as ie,discoverNotifyChannels as me,discoverNotifyConfig as fe}from"./packem_shared/NOTIFY_FILENAME-BeTurUSC.mjs";import{default as pe}from"./packem_shared/readPackageDependencies-RHhGiz0k.mjs";import{default as le}from"./packem_shared/discoverQueries-BqECbkm9.mjs";import{QUEUES_FILENAME as xe,discoverQueues as Se}from"./packem_shared/QUEUES_FILENAME-D588u733.mjs";import{default as ue}from"./packem_shared/discoverR2sqlCalls-I9IqJFcy.mjs";import{default as ve}from"./packem_shared/discoverRlsProcedures-Bkohn4ZR.mjs";import{default as Ne}from"./packem_shared/discoverRlsMetadata-Cu4bc5KZ.mjs";import{discoverSandboxUsage as Oe}from"./packem_shared/discoverSandboxUsage-w6Q3RvxZ.mjs";import{default as Te}from"./packem_shared/discoverSchema-BCxeD80d.mjs";import{readServiceBindings as Ie,resolveServiceBindings as _e}from"./packem_shared/readServiceBindings-DvqIThzd.mjs";import{SHAPES_FILENAME as Me,discoverShapes as Fe}from"./packem_shared/SHAPES_FILENAME-D-Q8lSEw.mjs";import{default as De}from"./packem_shared/discoverStorageRulesMetadata-D6rjgKYC.mjs";import{WORKFLOWS_FILENAME as ye,discoverWorkflows as Ue}from"./packem_shared/WORKFLOWS_FILENAME-BGMSNTDC.mjs";import{emitApp as He}from"./packem_shared/emitApp-D7G7gmV7.mjs";import{isD1GlobalTable as Be,isHyperdriveGlobalTable as ke}from"./packem_shared/isD1GlobalTable-udvHAAzD.mjs";import{buildOpenApiDocument as Ke,emitOpenApi as Ve,emitOpenApiModule as ze}from"./packem_shared/buildOpenApiDocument-DFv-RYZU.mjs";import{OPENRPC_VERSION as qe,buildOpenRpcDocument as we,emitOpenRpc as Je,emitOpenRpcModule as Ye}from"./packem_shared/OPENRPC_VERSION-CCY7xqSL.mjs";import{DEFAULT_TARGET as Ze,platformMatrixIds as $e,readProjectTarget as er,resolveCodegenTarget as rr}from"./packem_shared/DEFAULT_TARGET-3U7x981M.mjs";import{l as tr,r as sr}from"./packem_shared/project-config-file-BV7RR-l6.mjs";import{SCHEMA_SNAPSHOT_FILENAME as ir,createCodegenProject as mr,findTsconfig as fr,refreshCodegenProject as dr,runCodegen as pr}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-3FEkspbx.mjs";import{SchemaSnapshotParseError as lr,buildSchemaSnapshot as cr,evaluateSchemaDrift as xr,parseSchemaSnapshot as Sr}from"./packem_shared/SchemaSnapshotParseError-CPOXlFhI.mjs";import{default as ur}from"./packem_shared/fingerprintSchemaSources-eVG9aVt0.mjs";import{schemaFromIr as vr}from"./packem_shared/schemaFromIr-BWFnvCVg.mjs";import{LUNORA_ERROR_CODES as Nr,validatorIrToJsonSchema as gr}from"./packem_shared/LUNORA_ERROR_CODES-C2s0xWQD.mjs";import{SDK_LANGUAGES as Rr,SDK_TARGETS as Tr,generateSdk as hr}from"./packem_shared/SDK_LANGUAGES-Df_CnJx5.mjs";import{redact as _r,secretKindOf as Lr}from"./packem_shared/redact-Cy14LEnc.mjs";import{default as Fr}from"./packem_shared/emitDrizzleSchema-CpOGYfyl.mjs";import{default as Dr}from"./packem_shared/emitFunctions-BeKgL3dl.mjs";import{e as yr}from"./packem_shared/server-DSUfd6Tc.mjs";import{e as Gr}from"./packem_shared/shard-BNhX5R-a.mjs";import{G as jr}from"./packem_shared/shared-DnCokNcE.mjs";import{MESSAGE_SOLUTIONS as kr,findSolutionByMessage as Wr}from"@lunora/errors";import{PROJECT_CONFIG_FILENAMES as Vr,findProjectConfigFile as zr}from"./packem_shared/PROJECT_CONFIG_FILENAMES-DzOu-lSc.mjs";import{s as qr,t as wr,u as Jr}from"./packem_shared/shard-runtime-CkaEBSdL.mjs";import{emitApi as Xr,emitCollections as Zr,emitInternalApi as $r}from"./packem_shared/emitApi-Zx6VPN-7.mjs";import{emitCrons as ro,emitScheduler as oo,emitVectors as to,emitWranglerCronTriggers as so}from"./packem_shared/emitCrons-Gd8jD8jF.mjs";import{emitDataModel as io}from"./packem_shared/emitDataModel-DdtjdNg3.mjs";import{isTypedSchema as fo}from"./packem_shared/isTypedSchema-CKzc3ioR.mjs";const e="0.0.0";export{N as AGENTS_FILENAME,E as CAPABILITY_PROBES,L as CONTAINERS_FILENAME,A as CodegenDiagnosticError,Ze as DEFAULT_TARGET,j as FLAGS_FILENAME,jr as GENERATED_HEADER,Nr as LUNORA_ERROR_CODES,kr as LUNORA_SOLUTION_RULES,ee as MUTATORS_FILENAME,ae as NOTIFY_FILENAME,qe as OPENRPC_VERSION,Vr as PROJECT_CONFIG_FILENAMES,xe as QUEUES_FILENAME,ir as SCHEMA_SNAPSHOT_FILENAME,t as SCHEMA_SNAPSHOT_VERSION,Rr as SDK_LANGUAGES,Tr as SDK_TARGETS,Me as SHAPES_FILENAME,lr as SchemaSnapshotParseError,e as VERSION,ye as WORKFLOWS_FILENAME,Ke as buildOpenApiDocument,we as buildOpenRpcDocument,cr as buildSchemaSnapshot,b as capabilitiesUsedBy,mr as createCodegenProject,n as describeErrorLevelFindings,v as diagnosticAt,s as diffSchemaSnapshots,g as discoverAgents,I as discoverAuthApiCalls,M as discoverContainers,P as discoverCrons,B as discoverFlags,W as discoverFunctions,V as discoverHttpRoutes,Q as discoverHyperdriveCalls,w as discoverInserts,Y as discoverMaskProcedures,Z as discoverMigrations,re as discoverMutators,te as discoverNondeterministicCalls,ie as discoverNotifyCalls,me as discoverNotifyChannels,fe as discoverNotifyConfig,le as discoverQueries,Se as discoverQueues,ue as discoverR2sqlCalls,Ne as discoverRlsMetadata,ve as discoverRlsProcedures,Oe as discoverSandboxUsage,Te as discoverSchema,Fe as discoverShapes,De as discoverStorageRulesMetadata,Ue as discoverWorkflows,qr as emitAgents,Xr as emitApi,He as emitApp,Zr as emitCollections,wr as emitContainers,ro as emitCrons,io as emitDataModel,Fr as emitDrizzleSchema,Dr as emitFunctions,$r as emitInternalApi,Ve as emitOpenApi,ze as emitOpenApiModule,Je as emitOpenRpc,Ye as emitOpenRpcModule,oo as emitScheduler,yr as emitServer,Gr as emitShard,to as emitVectors,Jr as emitWorkflows,so as emitWranglerCronTriggers,l as errorAdvisoryNames,c as errorPlatformDiagnosticNames,xr as evaluateSchemaDrift,Wr as findLunoraSolution,zr as findProjectConfigFile,fr as findTsconfig,ur as fingerprintSchemaSources,y as foldCapabilitySignals,m as formatAdvisories,hr as generateSdk,Be as isD1GlobalTable,ke as isHyperdriveGlobalTable,R as isTestPath,fo as isTypedSchema,f as lintSchema,T as listLunoraSourceFiles,tr as loadProjectConfig,U as mayReadCapabilityContext,Sr as parseSchemaSnapshot,$e as platformMatrixIds,pe as readPackageDependencies,sr as readProjectConfigLiterals,er as readProjectTarget,Ie as readServiceBindings,_r as redact,dr as refreshCodegenProject,rr as resolveCodegenTarget,_e as resolveServiceBindings,pr as runCodegen,vr as schemaFromIr,Lr as secretKindOf,a as serializeSchemaSnapshot,x as sortedUniqueNames,G as sourceCapabilitySignals,d as toAdvisorContext,gr as validatorIrToJsonSchema};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{existsSync as k,mkdirSync as Xs,rmSync as mt,readdirSync as vr,readFileSync as Er,writeFileSync as xr}from"node:fs";import{join as v,dirname as he,relative as Sr}from"node:path";import{performance as rt}from"node:perf_hooks";import{runAdvisor as Ar}from"@lunora/advisor";import{LunoraError as J}from"@lunora/errors";import{readJsonSync as yr}from"@visulima/fs";import{SyntaxKind as d,Node as i,ts as br,Project as ls}from"ts-morph";import{serializeSchemaSnapshot as Nr}from"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{toAdvisorContext as Pr}from"./formatAdvisories-DwmUKYuc.mjs";import{r as Js,a as A,s as wr,b as Ir}from"./project-config-file-BV7RR-l6.mjs";import{a as Re,d as Cr,r as Tr}from"./modules-CjOcuQnK.mjs";import{WORKFLOWS_FILENAME as Or,discoverWorkflows as Rr}from"./WORKFLOWS_FILENAME-BGMSNTDC.mjs";import{r as kr}from"./json-data-Chfs2Cz5.mjs";import{G as Fr}from"./shared-DnCokNcE.mjs";import{n as Dr,s as Zs}from"./dispatch-namespace-DwTjD7BU.mjs";import{CAPABILITIES as Lr,usedCapabilities as Mr}from"./CAPABILITY_PROBES-brcmKenl.mjs";import{isD1GlobalTable as en,isHyperdriveGlobalTable as tn}from"./isD1GlobalTable-udvHAAzD.mjs";import{discoverAgents as _r}from"./AGENTS_FILENAME-CwwSEW6a.mjs";import{discoverContainers as Kr}from"./CONTAINERS_FILENAME-BtX5vWh8.mjs";import Br from"./discoverCrons-DF7dOP9x.mjs";import{diagnosticAt as ye}from"./CodegenDiagnosticError-BUXlG3P-.mjs";import{b as qe}from"./module-specifiers-WF8iAydP.mjs";import{a as sn,b as H,d as U,f as F,g as Ct,c as E,w as Tt,k as zr,l as $r,h as Ur,m as Vr,j as ht,i as qr}from"./attribution-BUciBs1M.mjs";import{contextPropertiesRead as Wr,discoverFeatureUsage as jr}from"./capabilitiesUsedBy-QgSZyE0T.mjs";import Hr from"./readPackageDependencies-RHhGiz0k.mjs";import{listLunoraSourceFiles as x,unwrapExpression as h,listSecurityScanFiles as We,objectLiteralFromCallbackBody as nn,propertyInitializer as C,lunoraRelativePath as T,bindingKeyName as se,collectCallRows as O,findObjectProperty as M,collectSecurityCallRows as Gr,isSameNode as y,isFunctionLike as Z,collectNodeRows as de,RUN_METHODS as rn,functionKeyOf as on,limitNameOf as an,optionsObjectLiteral as cn,handlerOf as Yr,chainRootOf as Ot,outermostValueWrapper as I,isWriteTarget as je,isConstDeclaration as ee,memberAccessOf as ln,returningFunctionOf as vt,walkChain as Qr,functionReferenceSegments as Xr,isTestPath as Jr}from"./isTestPath-B81lOULB.mjs";import{discoverQueueDeclarations as Zr}from"./QUEUES_FILENAME-D588u733.mjs";import{discoverSandboxUsage as ei}from"./discoverSandboxUsage-w6Q3RvxZ.mjs";import{resolveServiceBindings as ti}from"./readServiceBindings-DvqIThzd.mjs";import si from"./discoverStorageRulesMetadata-D6rjgKYC.mjs";import{a as b,c as G,d as dn,i as ni,e as ri}from"./classify-procedure-call-BJdf_-M6.mjs";import{i as ii}from"./ir-DBSvhNa-.mjs";import{gatePlatformFeatures as oi,resolveCodegenTarget as un,readTargetDiagnostics as ai,studioPlatformFor as ci}from"./DEFAULT_TARGET-3U7x981M.mjs";import{b as fn,e as li}from"./shard-BTfJuEeP.mjs";import{e as di,a as ui}from"./server-DSUfd6Tc.mjs";import{emitDataModel as fi}from"./emitDataModel-DdtjdNg3.mjs";import{a as ds,r as it,i as q,b as gi,m as gn,c as He,e as Rt,E as pn,C as mn,d as pi,f as mi,g as hi}from"./context-root-Dlo21ybw.mjs";import{r as Ge,s as vi}from"./parse-validator-IDBKIT7M.mjs";import Ei from"./discoverAuthApiCalls-DAaK0HUK.mjs";import{i as xi,a as Si,e as Ai,b as yi,d as bi,c as Ni}from"./unwrap-handler-return-B-jQde6M.mjs";import Pi from"./discoverFunctions-DsQwrwWq.mjs";import wi from"./discoverHttpRoutes-Cv-h-Yuc.mjs";import Ii from"./discoverHyperdriveCalls-xy2G6igG.mjs";import Ci from"./discoverInserts-CQsoloGk.mjs";import{m as kt,a as _e,s as hn,d as Ti}from"./index-BoPXSW7g.mjs";import{e as vn}from"./exported-procedure-chains-BZk1-hro.mjs";import Oi from"./discoverMigrations-uxm9qHrr.mjs";import{i as $,r as En}from"./database-calls-ONnjnkMd.mjs";import{MUTATORS_FILENAME as Ri,isDefineMutatorCallee as ki,mutatorServerImplOf as Fi,discoverMutators as Di}from"./MUTATORS_FILENAME-Dl1tElqi.mjs";import Li from"./discoverNondeterministicCalls-Dm7_PJoA.mjs";import{discoverNotifyConfig as Mi,discoverNotifyCalls as _i}from"./NOTIFY_FILENAME-BeTurUSC.mjs";import Ki from"./discoverQueries-BqECbkm9.mjs";import Bi from"./discoverR2sqlCalls-I9IqJFcy.mjs";import zi from"./discoverRlsProcedures-Bkohn4ZR.mjs";import $i from"./discoverRlsMetadata-Cu4bc5KZ.mjs";import Ui from"./discoverSchema-BCxeD80d.mjs";import{secretKindOf as Vi,redact as qi,isHeuristicSecretKind as Wi,isSecretishName as ji}from"./redact-Cy14LEnc.mjs";import{discoverShapes as Hi}from"./SHAPES_FILENAME-D-Q8lSEw.mjs";import{i as Gi}from"./reserved-words-CW1QFbTd.mjs";import{emitApp as Yi}from"./emitApp-D7G7gmV7.mjs";import{buildOpenApiDocument as Qi,emitOpenApiModule as Xi}from"./buildOpenApiDocument-DFv-RYZU.mjs";import{buildOpenRpcDocument as Ji,emitOpenRpcModule as Zi}from"./OPENRPC_VERSION-CCY7xqSL.mjs";import{buildSchemaSnapshot as eo}from"./SchemaSnapshotParseError-CPOXlFhI.mjs";import{v as to,t as so,u as no,s as ro,w as io}from"./shard-runtime-CkaEBSdL.mjs";import{emitCollections as oo,emitSeed as ao,emitApi as co,emitInternalApi as lo}from"./emitApi-Zx6VPN-7.mjs";import{emitCrons as uo,emitScheduler as fo,emitShardRegistry as go,emitDurableObjects as po,emitVectors as mo,emitWranglerCronTriggers as ho}from"./emitCrons-Gd8jD8jF.mjs";import vo from"./emitDrizzleSchema-CpOGYfyl.mjs";import Eo from"./emitFunctions-BeKgL3dl.mjs";const xo=e=>({cacheKey:`advisor_accept_unused:${e.rule}:${e.file}:${e.exportName}`,categories:["SCHEMA"],description:"`advisor.accept` in `lunora.config.*` accepts a finding the advisor does not report as an error.",detail:`No ERROR \`${e.rule}\` in \`${e.file}\` for \`${e.exportName}\` — the acceptance no longer applies.`,facing:"INTERNAL",level:"WARN",metadata:{exportName:e.exportName,file:e.file,rule:e.rule},name:"advisor_accept_unused",remediation:"Remove the entry, or correct the rule, file and export name it names.",title:"An accepted advisor finding matches no error"}),So=(e,t)=>{const s=new Set;return[...e.map(r=>{if(r.level!=="ERROR")return r;const o=t.find(a=>a.rule===r.name&&a.file===r.metadata.file&&a.exportName===r.metadata.exportName);return o===void 0?r:(s.add(o),{...r,detail:`Accepted: ${o.reason}. ${r.detail}`,level:"INFO",metadata:{...r.metadata,accepted:o.reason}})}),...t.filter(r=>!s.has(r)).map(r=>xo(r))]},Ao=()=>({cacheKey:"advisor_accept_invalid",categories:["SCHEMA"],description:"`advisor.accept` in `lunora.config.*` is read by parsing the file, so every entry must be a literal.",detail:"`advisor.accept` is not an array of literal `{ rule, file, exportName, reason }` objects with non-empty strings, so codegen ignored all of it and every ERROR still fails the gate.",facing:"INTERNAL",level:"WARN",metadata:{},name:"advisor_accept_invalid",remediation:'Write `advisor: { accept: [{ rule: "owner_field_from_args_not_auth", file: "lunora/auth/team.ts", exportName: "addTeamMember", reason: "…" }] }` as literals on the config\'s default export.',title:"`advisor.accept` is not a list codegen can read, so no acceptance applies"}),yo=e=>e.metadata.accepted!==void 0||e.name==="advisor_accept_unused"||e.name==="advisor_accept_invalid",us={error:"ERROR",info:"INFO",warn:"WARN"},fs={ERROR:2,INFO:0,WARN:1},bo=e=>({cacheKey:"advisor_min_severity_invalid",categories:["SCHEMA"],description:"`advisor.minSeverity` in `lunora.config.*` sets the lowest advisory level codegen reports and writes into `_generated/shard.ts`. Codegen reads it by parsing the file, so it has to be a string literal.",detail:e,facing:"INTERNAL",level:"WARN",metadata:{},name:"advisor_min_severity_invalid",remediation:'Set `advisor: { minSeverity: "info" | "warn" | "error" }` as a literal on the config\'s default export.',title:"`advisor.minSeverity` is not a level codegen can read, so every advisory was reported"}),No=(e,t)=>{const{advisor:s}=Js(e);if(s===void 0||s.minSeverity===void 0&&s.unreadable!==!0)return[...t];const{minSeverity:n}=s,r=n!==void 0&&Object.hasOwn(us,n)?us[n]:void 0;return r===void 0?[...t,bo(n===void 0?"`advisor.minSeverity` is not a string literal codegen can read without evaluating the config: a computed value or key, or a spread that could set or override it.":`\`advisor.minSeverity\` is "${n}", which is not one of "info", "warn" or "error".`)]:t.filter(o=>yo(o)||fs[o.level]>=fs[r])},Po=(e,t)=>{const{advisor:s}=Js(e),n=So(t,s?.accept??[]);return No(e,s?.acceptUnreadable===!0?[...n,Ao()]:n)},wo={call:"function",enqueue:"queue",invoke:"service",publish:"topic",schedule:"function"},Io="crons",Co=Or.replace(/\.ts$/u,""),le=(e,t)=>`${Zs(e)}:${t}`,ot=(e,t,s)=>t===""?{reason:`the ${s} is not a string literal`}:{to:`${e}:${t}`},To=e=>[...e.callEdges.map(t=>{const s=t.target===void 0?{reason:t.reason??"unreadable target"}:{to:`${wo[t.kind]}:${t.target}`};return{file:t.file,kind:t.kind,line:t.line,scope:t.scope,...s}}),...e.queries.map(t=>({file:t.file,kind:"read",line:t.line,scope:t.scope,...ot("table",t.table,"table name")})),...[...e.inserts,...e.tableWrites].map(t=>({file:t.file,kind:"write",line:t.line,scope:t.scope,...ot("table",t.table,"written table")})),...e.workflowCalls.map(t=>({file:t.file,kind:"start",line:t.line,scope:t.scope,...ot("workflow",t.workflow,"workflow name")}))],Oo=e=>e.untracked===!0?"inside a helper only code outside any export calls":"inside a non-exported helper",Ro=e=>{const{scope:t}=e;switch(t.kind){case"export":return[{...e,exportName:t.name}];case"helper":return t.callers.length===0?[{...e,unattributed:Oo(t)}]:t.callers.map(s=>({...e,exportName:s}));default:return[{...e,unattributed:"at module scope"}]}},ko=e=>To(e).flatMap(t=>Ro(t)),Fo=e=>[...e.queues.flatMap(t=>t.topic===void 0?[]:[{file:t.filePath,from:`topic:${t.topic}`,kind:"subscribe",line:0,to:`queue:${t.exportName}`}]),...e.crons.map(t=>{const s=t.workflow===void 0?void 0:`workflow:${t.workflow.exportName}`,n=t.functionPath===void 0?void 0:`function:${t.functionPath}`,r=s??n;return{file:Io,from:`cron:${t.name}`,kind:"trigger",line:0,...r===void 0?{reason:"the cron has no target"}:{to:r}}})],Do=e=>new Map(e.flatMap(t=>t.tables.map(s=>[s,t.name]))),me=(e,t)=>t===void 0?e:{...e,module:t},Lo=e=>{const t=new Map,s=new Map,n=Do(e.modules),r=(c,l)=>{s.set(c,[...s.get(c)??[],l])},o=(c,l)=>{t.set(c.id,c),l!==void 0&&r(l,c.id)},a=(c,l)=>{c!==void 0&&r(le(c.file,c.exportName),l)};for(const c of e.functions){const l=le(c.filePath,c.exportName),u=[...Dr(c.filePath),c.exportName].join(".");o(me({detail:c.kind,id:`function:${l}`,kind:"function",name:u},Re(e.modules,c.filePath)),l)}for(const c of e.httpRoutes){const l=le(c.filePath,c.exportName);o(me({id:`http:${l}`,kind:"http",name:`${c.method} ${c.path}`},Re(e.modules,c.filePath)),l)}for(const c of e.schema.tables)o(me({id:`table:${c.name}`,kind:"table",name:c.name},n.get(c.name)));for(const c of e.queues){const l=c.topic===void 0?{}:{detail:"subscription"};o(me({...l,id:`queue:${c.exportName}`,kind:"queue",name:c.exportName},Re(e.modules,c.filePath)),le(c.filePath,c.exportName)),a(c.handlerSite,`queue:${c.exportName}`)}for(const c of e.topics)o(me({id:`topic:${c.exportName}`,kind:"topic",name:c.exportName},Re(e.modules,c.filePath)));for(const c of e.workflows)o({id:`workflow:${c.exportName}`,kind:"workflow",name:c.exportName},le(Co,c.exportName)),a(c.handlerSite,`workflow:${c.exportName}`);for(const c of e.crons)o({detail:c.cron,id:`cron:${c.name}`,kind:"cron",name:c.name});for(const c of e.services){const l=c.rpcEntrypoint===void 0?"fetch":"rpc";o({detail:c.entrypoint===void 0?l:`${l} · ${c.entrypoint}`,id:`service:${c.name}`,kind:"service",name:c.worker})}return{nodes:t,sites:s}},Mo=e=>e==="default"?"the default export is not a registered function":`"${e}" is not a registered function`,_o=(e,t)=>"from"in e?[e.from]:"unattributed"in e?{reason:e.unattributed}:t.get(le(e.file,e.exportName))??{reason:Mo(e.exportName)},Ko=(e,t,s)=>{if("reason"in e)return{reason:e.reason};const n=_o(e,t);if("reason"in n)return n;const{to:r}=e;return s.has(r)?{drawn:n.map(o=>({from:o,kind:e.kind,to:r}))}:{reason:`${r} is not declared`}},at=e=>`${e.from}|${e.kind}|${e.to}`,Bo=e=>`${e.file}|${String(e.line)}|${e.kind}|${e.reason}`,zo=e=>{const{nodes:t,sites:s}=Lo(e),n=new Map,r=new Map;for(const o of[...Fo(e),...ko(e)]){const a=Ko(o,s,t);if("drawn"in a)for(const c of a.drawn)n.set(at(c),c);else{const c={file:o.file,kind:o.kind,line:o.line,reason:a.reason};r.set(Bo(c),c)}}return{edges:[...n.values()].toSorted((o,a)=>at(o).localeCompare(at(a))),nodes:[...t.values()].toSorted((o,a)=>o.id.localeCompare(a.id)),modules:e.modules.map(o=>({...o.description===void 0?{}:{description:o.description},...o.installed===!0?{installed:!0}:{},...o.ownsFolder===!1?{ownsFolder:!1}:{},name:o.name,tables:[...o.tables]})),unresolved:[...r.values()].toSorted((o,a)=>o.file.localeCompare(a.file)||o.line-a.line),version:1}},$o=e=>`${Fr}export const architecture = ${kr(e,"Record<string, unknown>")};
|
|
1
|
+
import{existsSync as k,mkdirSync as Xs,rmSync as mt,readdirSync as vr,readFileSync as Er,writeFileSync as xr}from"node:fs";import{join as v,dirname as he,relative as Sr}from"node:path";import{performance as rt}from"node:perf_hooks";import{runAdvisor as Ar}from"@lunora/advisor";import{LunoraError as J}from"@lunora/errors";import{readJsonSync as yr}from"@visulima/fs";import{SyntaxKind as d,Node as i,ts as br,Project as ls}from"ts-morph";import{serializeSchemaSnapshot as Nr}from"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{toAdvisorContext as Pr}from"./formatAdvisories-DwmUKYuc.mjs";import{r as Js,a as A,s as wr,b as Ir}from"./project-config-file-BV7RR-l6.mjs";import{a as Re,d as Cr,r as Tr}from"./modules-CjOcuQnK.mjs";import{WORKFLOWS_FILENAME as Or,discoverWorkflows as Rr}from"./WORKFLOWS_FILENAME-BGMSNTDC.mjs";import{r as kr}from"./json-data-Chfs2Cz5.mjs";import{G as Fr}from"./shared-DnCokNcE.mjs";import{n as Dr,s as Zs}from"./dispatch-namespace-DwTjD7BU.mjs";import{CAPABILITIES as Lr,usedCapabilities as Mr}from"./CAPABILITY_PROBES-brcmKenl.mjs";import{isD1GlobalTable as en,isHyperdriveGlobalTable as tn}from"./isD1GlobalTable-udvHAAzD.mjs";import{discoverAgents as _r}from"./AGENTS_FILENAME-CwwSEW6a.mjs";import{discoverContainers as Kr}from"./CONTAINERS_FILENAME-BtX5vWh8.mjs";import Br from"./discoverCrons-DF7dOP9x.mjs";import{diagnosticAt as ye}from"./CodegenDiagnosticError-BUXlG3P-.mjs";import{b as qe}from"./module-specifiers-WF8iAydP.mjs";import{a as sn,b as H,d as U,f as F,g as Ct,c as E,w as Tt,k as zr,l as $r,h as Ur,m as Vr,j as ht,i as qr}from"./attribution-BUciBs1M.mjs";import{contextPropertiesRead as Wr,discoverFeatureUsage as jr}from"./capabilitiesUsedBy-QgSZyE0T.mjs";import Hr from"./readPackageDependencies-RHhGiz0k.mjs";import{listLunoraSourceFiles as x,unwrapExpression as h,listSecurityScanFiles as We,objectLiteralFromCallbackBody as nn,propertyInitializer as C,lunoraRelativePath as T,bindingKeyName as se,collectCallRows as O,findObjectProperty as M,collectSecurityCallRows as Gr,isSameNode as y,isFunctionLike as Z,collectNodeRows as de,RUN_METHODS as rn,functionKeyOf as on,limitNameOf as an,optionsObjectLiteral as cn,handlerOf as Yr,chainRootOf as Ot,outermostValueWrapper as I,isWriteTarget as je,isConstDeclaration as ee,memberAccessOf as ln,returningFunctionOf as vt,walkChain as Qr,functionReferenceSegments as Xr,isTestPath as Jr}from"./isTestPath-B81lOULB.mjs";import{discoverQueueDeclarations as Zr}from"./QUEUES_FILENAME-D588u733.mjs";import{discoverSandboxUsage as ei}from"./discoverSandboxUsage-w6Q3RvxZ.mjs";import{resolveServiceBindings as ti}from"./readServiceBindings-DvqIThzd.mjs";import si from"./discoverStorageRulesMetadata-D6rjgKYC.mjs";import{a as b,c as G,d as dn,i as ni,e as ri}from"./classify-procedure-call-BJdf_-M6.mjs";import{i as ii}from"./ir-DBSvhNa-.mjs";import{gatePlatformFeatures as oi,resolveCodegenTarget as un,readTargetDiagnostics as ai,studioPlatformFor as ci}from"./DEFAULT_TARGET-3U7x981M.mjs";import{b as fn,e as li}from"./shard-BNhX5R-a.mjs";import{e as di,a as ui}from"./server-DSUfd6Tc.mjs";import{emitDataModel as fi}from"./emitDataModel-DdtjdNg3.mjs";import{a as ds,r as it,i as q,b as gi,m as gn,c as He,e as Rt,E as pn,C as mn,d as pi,f as mi,g as hi}from"./context-root-Dlo21ybw.mjs";import{r as Ge,s as vi}from"./parse-validator-IDBKIT7M.mjs";import Ei from"./discoverAuthApiCalls-DAaK0HUK.mjs";import{i as xi,a as Si,e as Ai,b as yi,d as bi,c as Ni}from"./unwrap-handler-return-B-jQde6M.mjs";import Pi from"./discoverFunctions-DsQwrwWq.mjs";import wi from"./discoverHttpRoutes-Cv-h-Yuc.mjs";import Ii from"./discoverHyperdriveCalls-xy2G6igG.mjs";import Ci from"./discoverInserts-CQsoloGk.mjs";import{m as kt,a as _e,s as hn,d as Ti}from"./index-BoPXSW7g.mjs";import{e as vn}from"./exported-procedure-chains-BZk1-hro.mjs";import Oi from"./discoverMigrations-uxm9qHrr.mjs";import{i as $,r as En}from"./database-calls-ONnjnkMd.mjs";import{MUTATORS_FILENAME as Ri,isDefineMutatorCallee as ki,mutatorServerImplOf as Fi,discoverMutators as Di}from"./MUTATORS_FILENAME-Dl1tElqi.mjs";import Li from"./discoverNondeterministicCalls-Dm7_PJoA.mjs";import{discoverNotifyConfig as Mi,discoverNotifyCalls as _i}from"./NOTIFY_FILENAME-BeTurUSC.mjs";import Ki from"./discoverQueries-BqECbkm9.mjs";import Bi from"./discoverR2sqlCalls-I9IqJFcy.mjs";import zi from"./discoverRlsProcedures-Bkohn4ZR.mjs";import $i from"./discoverRlsMetadata-Cu4bc5KZ.mjs";import Ui from"./discoverSchema-BCxeD80d.mjs";import{secretKindOf as Vi,redact as qi,isHeuristicSecretKind as Wi,isSecretishName as ji}from"./redact-Cy14LEnc.mjs";import{discoverShapes as Hi}from"./SHAPES_FILENAME-D-Q8lSEw.mjs";import{i as Gi}from"./reserved-words-CW1QFbTd.mjs";import{emitApp as Yi}from"./emitApp-D7G7gmV7.mjs";import{buildOpenApiDocument as Qi,emitOpenApiModule as Xi}from"./buildOpenApiDocument-DFv-RYZU.mjs";import{buildOpenRpcDocument as Ji,emitOpenRpcModule as Zi}from"./OPENRPC_VERSION-CCY7xqSL.mjs";import{buildSchemaSnapshot as eo}from"./SchemaSnapshotParseError-CPOXlFhI.mjs";import{v as to,t as so,u as no,s as ro,w as io}from"./shard-runtime-CkaEBSdL.mjs";import{emitCollections as oo,emitSeed as ao,emitApi as co,emitInternalApi as lo}from"./emitApi-Zx6VPN-7.mjs";import{emitCrons as uo,emitScheduler as fo,emitShardRegistry as go,emitDurableObjects as po,emitVectors as mo,emitWranglerCronTriggers as ho}from"./emitCrons-Gd8jD8jF.mjs";import vo from"./emitDrizzleSchema-CpOGYfyl.mjs";import Eo from"./emitFunctions-BeKgL3dl.mjs";const xo=e=>({cacheKey:`advisor_accept_unused:${e.rule}:${e.file}:${e.exportName}`,categories:["SCHEMA"],description:"`advisor.accept` in `lunora.config.*` accepts a finding the advisor does not report as an error.",detail:`No ERROR \`${e.rule}\` in \`${e.file}\` for \`${e.exportName}\` — the acceptance no longer applies.`,facing:"INTERNAL",level:"WARN",metadata:{exportName:e.exportName,file:e.file,rule:e.rule},name:"advisor_accept_unused",remediation:"Remove the entry, or correct the rule, file and export name it names.",title:"An accepted advisor finding matches no error"}),So=(e,t)=>{const s=new Set;return[...e.map(r=>{if(r.level!=="ERROR")return r;const o=t.find(a=>a.rule===r.name&&a.file===r.metadata.file&&a.exportName===r.metadata.exportName);return o===void 0?r:(s.add(o),{...r,detail:`Accepted: ${o.reason}. ${r.detail}`,level:"INFO",metadata:{...r.metadata,accepted:o.reason}})}),...t.filter(r=>!s.has(r)).map(r=>xo(r))]},Ao=()=>({cacheKey:"advisor_accept_invalid",categories:["SCHEMA"],description:"`advisor.accept` in `lunora.config.*` is read by parsing the file, so every entry must be a literal.",detail:"`advisor.accept` is not an array of literal `{ rule, file, exportName, reason }` objects with non-empty strings, so codegen ignored all of it and every ERROR still fails the gate.",facing:"INTERNAL",level:"WARN",metadata:{},name:"advisor_accept_invalid",remediation:'Write `advisor: { accept: [{ rule: "owner_field_from_args_not_auth", file: "lunora/auth/team.ts", exportName: "addTeamMember", reason: "…" }] }` as literals on the config\'s default export.',title:"`advisor.accept` is not a list codegen can read, so no acceptance applies"}),yo=e=>e.metadata.accepted!==void 0||e.name==="advisor_accept_unused"||e.name==="advisor_accept_invalid",us={error:"ERROR",info:"INFO",warn:"WARN"},fs={ERROR:2,INFO:0,WARN:1},bo=e=>({cacheKey:"advisor_min_severity_invalid",categories:["SCHEMA"],description:"`advisor.minSeverity` in `lunora.config.*` sets the lowest advisory level codegen reports and writes into `_generated/shard.ts`. Codegen reads it by parsing the file, so it has to be a string literal.",detail:e,facing:"INTERNAL",level:"WARN",metadata:{},name:"advisor_min_severity_invalid",remediation:'Set `advisor: { minSeverity: "info" | "warn" | "error" }` as a literal on the config\'s default export.',title:"`advisor.minSeverity` is not a level codegen can read, so every advisory was reported"}),No=(e,t)=>{const{advisor:s}=Js(e);if(s===void 0||s.minSeverity===void 0&&s.unreadable!==!0)return[...t];const{minSeverity:n}=s,r=n!==void 0&&Object.hasOwn(us,n)?us[n]:void 0;return r===void 0?[...t,bo(n===void 0?"`advisor.minSeverity` is not a string literal codegen can read without evaluating the config: a computed value or key, or a spread that could set or override it.":`\`advisor.minSeverity\` is "${n}", which is not one of "info", "warn" or "error".`)]:t.filter(o=>yo(o)||fs[o.level]>=fs[r])},Po=(e,t)=>{const{advisor:s}=Js(e),n=So(t,s?.accept??[]);return No(e,s?.acceptUnreadable===!0?[...n,Ao()]:n)},wo={call:"function",enqueue:"queue",invoke:"service",publish:"topic",schedule:"function"},Io="crons",Co=Or.replace(/\.ts$/u,""),le=(e,t)=>`${Zs(e)}:${t}`,ot=(e,t,s)=>t===""?{reason:`the ${s} is not a string literal`}:{to:`${e}:${t}`},To=e=>[...e.callEdges.map(t=>{const s=t.target===void 0?{reason:t.reason??"unreadable target"}:{to:`${wo[t.kind]}:${t.target}`};return{file:t.file,kind:t.kind,line:t.line,scope:t.scope,...s}}),...e.queries.map(t=>({file:t.file,kind:"read",line:t.line,scope:t.scope,...ot("table",t.table,"table name")})),...[...e.inserts,...e.tableWrites].map(t=>({file:t.file,kind:"write",line:t.line,scope:t.scope,...ot("table",t.table,"written table")})),...e.workflowCalls.map(t=>({file:t.file,kind:"start",line:t.line,scope:t.scope,...ot("workflow",t.workflow,"workflow name")}))],Oo=e=>e.untracked===!0?"inside a helper only code outside any export calls":"inside a non-exported helper",Ro=e=>{const{scope:t}=e;switch(t.kind){case"export":return[{...e,exportName:t.name}];case"helper":return t.callers.length===0?[{...e,unattributed:Oo(t)}]:t.callers.map(s=>({...e,exportName:s}));default:return[{...e,unattributed:"at module scope"}]}},ko=e=>To(e).flatMap(t=>Ro(t)),Fo=e=>[...e.queues.flatMap(t=>t.topic===void 0?[]:[{file:t.filePath,from:`topic:${t.topic}`,kind:"subscribe",line:0,to:`queue:${t.exportName}`}]),...e.crons.map(t=>{const s=t.workflow===void 0?void 0:`workflow:${t.workflow.exportName}`,n=t.functionPath===void 0?void 0:`function:${t.functionPath}`,r=s??n;return{file:Io,from:`cron:${t.name}`,kind:"trigger",line:0,...r===void 0?{reason:"the cron has no target"}:{to:r}}})],Do=e=>new Map(e.flatMap(t=>t.tables.map(s=>[s,t.name]))),me=(e,t)=>t===void 0?e:{...e,module:t},Lo=e=>{const t=new Map,s=new Map,n=Do(e.modules),r=(c,l)=>{s.set(c,[...s.get(c)??[],l])},o=(c,l)=>{t.set(c.id,c),l!==void 0&&r(l,c.id)},a=(c,l)=>{c!==void 0&&r(le(c.file,c.exportName),l)};for(const c of e.functions){const l=le(c.filePath,c.exportName),u=[...Dr(c.filePath),c.exportName].join(".");o(me({detail:c.kind,id:`function:${l}`,kind:"function",name:u},Re(e.modules,c.filePath)),l)}for(const c of e.httpRoutes){const l=le(c.filePath,c.exportName);o(me({id:`http:${l}`,kind:"http",name:`${c.method} ${c.path}`},Re(e.modules,c.filePath)),l)}for(const c of e.schema.tables)o(me({id:`table:${c.name}`,kind:"table",name:c.name},n.get(c.name)));for(const c of e.queues){const l=c.topic===void 0?{}:{detail:"subscription"};o(me({...l,id:`queue:${c.exportName}`,kind:"queue",name:c.exportName},Re(e.modules,c.filePath)),le(c.filePath,c.exportName)),a(c.handlerSite,`queue:${c.exportName}`)}for(const c of e.topics)o(me({id:`topic:${c.exportName}`,kind:"topic",name:c.exportName},Re(e.modules,c.filePath)));for(const c of e.workflows)o({id:`workflow:${c.exportName}`,kind:"workflow",name:c.exportName},le(Co,c.exportName)),a(c.handlerSite,`workflow:${c.exportName}`);for(const c of e.crons)o({detail:c.cron,id:`cron:${c.name}`,kind:"cron",name:c.name});for(const c of e.services){const l=c.rpcEntrypoint===void 0?"fetch":"rpc";o({detail:c.entrypoint===void 0?l:`${l} · ${c.entrypoint}`,id:`service:${c.name}`,kind:"service",name:c.worker})}return{nodes:t,sites:s}},Mo=e=>e==="default"?"the default export is not a registered function":`"${e}" is not a registered function`,_o=(e,t)=>"from"in e?[e.from]:"unattributed"in e?{reason:e.unattributed}:t.get(le(e.file,e.exportName))??{reason:Mo(e.exportName)},Ko=(e,t,s)=>{if("reason"in e)return{reason:e.reason};const n=_o(e,t);if("reason"in n)return n;const{to:r}=e;return s.has(r)?{drawn:n.map(o=>({from:o,kind:e.kind,to:r}))}:{reason:`${r} is not declared`}},at=e=>`${e.from}|${e.kind}|${e.to}`,Bo=e=>`${e.file}|${String(e.line)}|${e.kind}|${e.reason}`,zo=e=>{const{nodes:t,sites:s}=Lo(e),n=new Map,r=new Map;for(const o of[...Fo(e),...ko(e)]){const a=Ko(o,s,t);if("drawn"in a)for(const c of a.drawn)n.set(at(c),c);else{const c={file:o.file,kind:o.kind,line:o.line,reason:a.reason};r.set(Bo(c),c)}}return{edges:[...n.values()].toSorted((o,a)=>at(o).localeCompare(at(a))),nodes:[...t.values()].toSorted((o,a)=>o.id.localeCompare(a.id)),modules:e.modules.map(o=>({...o.description===void 0?{}:{description:o.description},...o.installed===!0?{installed:!0}:{},...o.ownsFolder===!1?{ownsFolder:!1}:{},name:o.name,tables:[...o.tables]})),unresolved:[...r.values()].toSorted((o,a)=>o.file.localeCompare(a.file)||o.line-a.line),version:1}},$o=e=>`${Fr}export const architecture = ${kr(e,"Record<string, unknown>")};
|
|
2
2
|
`,gs=(e,t="api")=>{const s=new Map;for(const n of e){const r=Zs(n),o=s.get(r);if(o===void 0){s.set(r,n);continue}if(o!==n){const a=t==="api"?`the generated api.ts would declare "${r}" twice and the dispatch key "${r}:<fn>" would be ambiguous`:`the generated api.ts would declare "${r}" twice in HttpStreamsRef and again in the httpStreams object literal`;throw new J("INTERNAL",`@lunora/codegen: "${o}" and "${n}" both map to the ${t} namespace "${r}" — ${a}. Rename one file so the two differ by more than a non-identifier character (\`-\`, \`.\`, \`/\` and \`_\` all sanitize to \`_\`).`,{status:500})}}},Uo=(e,t={})=>{const{hasVectors:s=!0,scheduler:n=!1,storage:r=!1,usage:o}=t,a=[];e.tables.some(c=>en(c))&&a.push({name:"@lunora/d1",reason:"`.global()` tables are D1-backed, so `_generated/app.ts` imports the D1 `ctx.db` adapter"}),e.tables.some(c=>tn(c))&&a.push({name:"@lunora/hyperdrive",reason:'`.global({ backend: "hyperdrive" })` tables route through `@lunora/hyperdrive/global`'},{name:"@lunora/sql-store",reason:'`.global({ backend: "hyperdrive" })` makes `_generated/app.ts` import the `SqlCtxDbOptions` / `SqlExec` types'}),n&&a.push({name:"@lunora/scheduler",reason:"a declared cron (or `ctx.scheduler` use) makes `_generated/app.ts` import `createScheduler`"}),r&&a.push({name:"@lunora/storage",reason:"a `v.storage()` column, a storage access rule (or `ctx.storage` use) makes `_generated/app.ts` import `createStorage`"}),e.vectorIndexes.length>0&&s&&a.push({name:"@lunora/bindings",reason:"`.vectorize()` indexes make `_generated/shard.ts` import `@lunora/bindings/vectors`"});for(const c of o===void 0?[]:Lr)c.requiredPackage!==void 0&&o?.[c.key]===!0&&a.push({name:c.requiredPackage,reason:`\`ctx.${c.contextProperty??c.key}\` usage makes \`_generated/\` import \`${c.moduleSpecifier}\``});return a.filter((c,l)=>a.findIndex(u=>u.name===c.name)===l)},Vo=(e,t,s={})=>{if(t===void 0)return;const n=Uo(e,s).filter(o=>!t.has(o.name));if(n.length===0)return;const r=n.map(o=>` - ${o.name} — ${o.reason}`).join(`
|
|
3
3
|
`);throw new J("INTERNAL",`@lunora/codegen: this schema's generated code imports packages the project does not declare:
|
|
4
4
|
${r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./ir-DBSvhNa-.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as f}from"./shard-
|
|
1
|
+
import"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./ir-DBSvhNa-.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as f}from"./shard-BNhX5R-a.mjs";import"./shard-runtime-CkaEBSdL.mjs";import"./shared-DnCokNcE.mjs";export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LunoraError as vt}from"@lunora/errors";import{serializeSchemaSnapshot as kt,hashSchemaSnapshot as St}from"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{isHyperdriveGlobalTable as Rt,isD1GlobalTable as xt}from"./isD1GlobalTable-udvHAAzD.mjs";import{p as At,i as Dt}from"./ir-DBSvhNa-.mjs";import{r as h}from"./json-data-Chfs2Cz5.mjs";import{r as C,e as
|
|
1
|
+
import{LunoraError as vt}from"@lunora/errors";import{serializeSchemaSnapshot as kt,hashSchemaSnapshot as St}from"./SCHEMA_SNAPSHOT_VERSION-C0oHwiJZ.mjs";import{isHyperdriveGlobalTable as Rt,isD1GlobalTable as xt}from"./isD1GlobalTable-udvHAAzD.mjs";import{p as At,i as Dt}from"./ir-DBSvhNa-.mjs";import{r as h}from"./json-data-Chfs2Cz5.mjs";import{r as C,e as Ot,a as Tt,b as Et,c as Ct,d as Lt,f as It,g as _t,h as Mt,i as Pt,j as Nt,k as qt,l as $t,m as Ft,n as Ut,o as Bt,p as Wt,q as jt}from"./shard-runtime-CkaEBSdL.mjs";import{u as K,i as Ht,G as Vt,d as Kt}from"./shared-DnCokNcE.mjs";const Gt=` /**
|
|
2
2
|
* The bare writer every admin/maintenance entry point writes through.
|
|
3
3
|
*
|
|
4
4
|
* Admin and maintenance writes go through the SAME reactive-cache hooks as a
|
|
@@ -225,7 +225,7 @@ ${p()}
|
|
|
225
225
|
await applyCdcChanges(writer, args.changes);
|
|
226
226
|
|
|
227
227
|
return { applied: args.changes.length };
|
|
228
|
-
}`,zt=({actionOnlyBuild:a,actionOnlyFields:r,agentsBuild:e,agentsContextField:n,containersBuild:t,containersContextField:o,databaseOptions:d,everyContextBuild:m,everyContextField:f,facadeBlock:c,globalDatabaseLine:w,notifyBuild:S,ormContextField:y,paymentsBuild:L,paymentsContextField:i,queuesBuild:g,queuesContextField:I,topicsBuild:_,topicsContextField:M,vectorsBuild:A,vectorsContextField:P,workflowsBuild:
|
|
228
|
+
}`,zt=({actionOnlyBuild:a,actionOnlyFields:r,agentsBuild:e,agentsContextField:n,containersBuild:t,containersContextField:o,databaseOptions:d,everyContextBuild:m,everyContextField:f,facadeBlock:c,globalDatabaseLine:w,notifyBuild:S,ormContextField:y,paymentsBuild:L,paymentsContextField:i,queuesBuild:g,queuesContextField:I,topicsBuild:_,topicsContextField:M,vectorsBuild:A,vectorsContextField:P,workflowsBuild:N,workflowsContextField:R})=>{const l=r.length>0,D=l?`
|
|
229
229
|
// ActionCtx-only helpers (external, non-deterministic I/O): constructed
|
|
230
230
|
// and attached only for an \`action\` so query/mutation ctx never carry them.
|
|
231
231
|
if (isAction) {
|
|
@@ -253,7 +253,7 @@ ${a.replaceAll(/^(?=.)/gmu," ")}${r.map(k=>` ctx.${k} = ${k};`
|
|
|
253
253
|
userId: this.getCurrentUserId(),
|
|
254
254
|
};
|
|
255
255
|
const { identity, ip, userId } = caller;
|
|
256
|
-
${A}${m}${t}${
|
|
256
|
+
${A}${m}${t}${N}${g}${_}${e}
|
|
257
257
|
// Which dispatch this ctx belongs to. Drives the two deferral facades
|
|
258
258
|
// below and the \`ctx.run*\` caller guard; a ctx built for an
|
|
259
259
|
// admin/lifecycle path has no registered function, and so no kind. An
|
|
@@ -394,6 +394,14 @@ ${S}
|
|
|
394
394
|
userId: userId ?? null,
|
|
395
395
|
},
|
|
396
396
|
db,
|
|
397
|
+
// \`ctx.newId()\`: a replay of the same top-level mutation gets the same ids. A nested or
|
|
398
|
+
// subscription-driven build (\`options.identity\`) is not a replay.
|
|
399
|
+
// A replay key only means something inside the caller's dedup namespace; without one the call is not
|
|
400
|
+
// deduplicated, so its ids stay random.
|
|
401
|
+
newId: createStableIdFactory(
|
|
402
|
+
options.identity === undefined && this.idempotencyNamespace() !== undefined ? this.getCurrentMutationId() : undefined,
|
|
403
|
+
JSON.stringify([this.currentShardKey(), options.functionPath ?? "", this.idempotencyNamespace() ?? "", userId ?? ""]),
|
|
404
|
+
),
|
|
397
405
|
// Instrumented \`fetch\`: a CLIENT span per outbound call plus W3C
|
|
398
406
|
// \`traceparent\` propagation, so time spent in a downstream service
|
|
399
407
|
// is visible and its spans join this trace. Degrades to the bare
|
|
@@ -1105,13 +1113,13 @@ ${o} const vectors = createContextVectors(lunora${f});
|
|
|
1105
1113
|
ordered: async (read, work) => this.runOrderedAfterWrites(read, work),
|
|
1106
1114
|
});
|
|
1107
1115
|
}
|
|
1108
|
-
`:"",vectorsBuild:c,vectorsStub:t}},kr=({advisories:a=[],advisorProcedures:r=[],agents:e=[],capabilities:n=new Set,containers:t=[],env:o,flagKeys:d=[],hasFlags:m=!1,hasNotify:f=!1,hasVectors:c=!0,maskMetadata:w,mutators:S=[],queues:y=[],rlsMetadata:L,schema:i,schemaSnapshot:g,shapes:I=[],storageRules:_,studioFeatures:M,services:A=[],topics:P=[],useUmbrella:
|
|
1116
|
+
`:"",vectorsBuild:c,vectorsStub:t}},kr=({advisories:a=[],advisorProcedures:r=[],agents:e=[],capabilities:n=new Set,containers:t=[],env:o,flagKeys:d=[],hasFlags:m=!1,hasNotify:f=!1,hasVectors:c=!0,maskMetadata:w,mutators:S=[],queues:y=[],rlsMetadata:L,schema:i,schemaSnapshot:g,shapes:I=[],storageRules:_,studioFeatures:M,services:A=[],topics:P=[],useUmbrella:N=!1,workflows:R=[]})=>{const l=Kt(N),D=S.length>0,v=I.length>0,k=g===void 0?"":kt(g),te=g===void 0?"":`
|
|
1109
1117
|
/** Structural schema snapshot + its content hash, recorded in the shard's \`__lunora_schema_history\` ledger on cold start so the studio can show a schema-version timeline and diff any two versions. */
|
|
1110
1118
|
const LUNORA_SCHEMA_SNAPSHOT: { hash: string; json: string } = { hash: ${JSON.stringify(St(g))}, json: ${JSON.stringify(k)} };
|
|
1111
|
-
`,re=g===void 0?"":", schemaSnapshot: LUNORA_SCHEMA_SNAPSHOT",b=
|
|
1119
|
+
`,re=g===void 0?"":", schemaSnapshot: LUNORA_SCHEMA_SNAPSHOT",b=Ot(n),O=Tt(m,l.flags),q=Et(d,m,l.flags),$=jt(f),F=Ct(o),{build:ae,contextField:ne,importLines:se,specs:oe}=Lt(At(y)),{build:ie,contextField:de,importLines:ce,specs:le}=It(P,y),U=_t(A,l.server),{build:he,contextField:ue,importLines:pe,specs:me}=Mt(t,i.jurisdiction),{build:ge,contextField:be,importLines:fe,specs:we}=Pt(R),{build:ye,contextField:ve,importLines:ke,specs:Se}=Nt(e),{build:Re,configField:xe,contextField:Ae,imports:De,stub:Oe}=qt(n.has("payments")),Te=a,Ee=r,G=L??{policies:[],roles:[]},Ce=w??{columns:[]},Le=_??{rules:[]},Ie=M??{analytics:!1,auth:!1,containers:!1,flags:!1,kv:!1,mail:!1,notifications:!1,payments:!1,queues:!1,scheduler:!1,storage:!1,vectors:!1,workflows:!1},{constant:_e,override:Me}=$t(R),{constant:Pe,override:Ne}=Ft(y),u=c&&i.vectorIndexes.length>0,B=new Set(i.tables.filter(s=>Dt(s)).map(s=>s.name)),Q=u&&i.vectorIndexes.some(s=>B.has(s.table)),x=i.tables.some(s=>s.shardMode==="global"),W=Ut(B),j=i.tables.some(s=>Rt(s)),z=i.tables.some(s=>xt(s)),T=i.tables.some(s=>s.externalSource!==void 0),X=i.tables.some(s=>s.memory===!0),H=i.tables.some(s=>s.shardMode!=="global"&&s.searchIndexes.length>0);if(z&&j)throw new vt("INTERNAL",'lunora codegen: mixing `.global()` (D1) and `.global({ backend: "hyperdrive" })` tables in one app is not supported yet — use a single global backend.');const V=i.tables.length>0,qe=Zt(i),$e=tr(i),Fe=sr(i),Ue=er(i),J=rr(i),Y=Bt(u,R.length>0,y.length>0,m,H);v&&Y.push("WhereInput");const Z=Wt(x),{customMutatorOverride:Be,shapeGuardImport:We,shapeReadPolicyAssertion:je,shapeReadPolicyImport:He,shapeResolveOverride:Ve}=or({hasMutators:D,hasShapes:v,rlsData:G}),E=[`import type { ${Y.join(", ")} } from "${l.do}";`,`import { applyCdcChanges, createStableIdFactory, ${H?"backfillSearchIndexes, ":""}${u?"backfillVectorIndexes, ":""}buildReprojectionMigration, ${X?"clearMemoryTables, ":""}${We}createReadFootprint, createShardCtxDb, exportShardRows, importShardRows, ${T?"isSourceDue, pullExternalSourceIncrementalTick, pullExternalSourceTick, ":""}markUnvouchableReads, ${Q?"ROOT_SHARD_NAME, ":""}runDataMigration, runShardMigrations, ${Z.importFragment}ShardDO as ShardDOBase } from "${l.do}";`,...T?[`import type { ExternalSourceLike, SourceClientLike, TraceRefLike } from "${l.do}";`]:[],v?`import { asBucketStorage, ${He}beginDeferredDeletes, beginDeferredSchedules, composeShapeReadWhere, createSecrets, flushDeferredDeletes, LunoraError, withDeferredDeletes, withDeferredSchedules } from "${l.server}";`:`import { asBucketStorage, beginDeferredDeletes, beginDeferredSchedules, createSecrets, flushDeferredDeletes, LunoraError, withDeferredDeletes, withDeferredSchedules } from "${l.server}";`];V&&E.push(`import { bindOrm, bindTableFacade } from "${l.server}";`),u&&E.push('import type { SchemaLike as VectorSchemaLike, VectorBackfillSync, VectorizeIndexLike, VectorSearchLike } from "@lunora/bindings/vectors";','import { createContextVectors, createVectorBackfillSync, createVectors, createVectorSyncHook, vectorBackfillTargets } from "@lunora/bindings/vectors";'),E.push(...b.importLines,...O.importLines,...$.importLines,...F.importLines,...pe,...fe,...se,...ce,...U.importLines,...ke,...De,"",'import schema from "../schema.js";',`import { ${["LUNORA_FUNCTIONS","LUNORA_LIFECYCLE_HOOKS","LUNORA_MIGRATIONS",...D?["LUNORA_MUTATOR_PATHS"]:[],...v?["LUNORA_SHAPES"]:[]].join(", ")} } from "./functions.js";`);const Ke=u?`
|
|
1112
1120
|
vectors?: (env: Record<string, unknown>) => Record<string, VectorizeIndexLike>;`:"",Ge=z?`
|
|
1113
1121
|
d1?: (env: Record<string, unknown>, request?: { bookmark?: string; cdc?: boolean; cdcRetentionMs?: number; identity?: Record<string, unknown>; onBookmark?: (bookmark: string | undefined) => void; userId?: string }) => DatabaseWriterLike | undefined;`:"",Qe=j?`
|
|
1114
|
-
hyperdriveGlobal?: (env: Record<string, unknown>, request?: { cdc?: boolean; cdcRetentionMs?: number; identity?: Record<string, unknown>; userId?: string }) => DatabaseWriterLike | undefined;`:"",ze=
|
|
1122
|
+
hyperdriveGlobal?: (env: Record<string, unknown>, request?: { cdc?: boolean; cdcRetentionMs?: number; identity?: Record<string, unknown>; userId?: string }) => DatabaseWriterLike | undefined;`:"",ze=T?`
|
|
1115
1123
|
sourceClient?: (env: Record<string, unknown>, binding: string) => { query: <Row = Record<string, unknown>>(text: string, params?: readonly unknown[]) => Promise<Row[]> } | undefined;`:"",Xe="ctx.db.<globalTable>: no global backend configured. Pass `d1` or `hyperdriveGlobal` to createShardDO().",Je="ctx.scheduler: no scheduler configured. Pass `scheduler` to createShardDO().",Ye="ctx.storage: no storage configured. Pass `storage` to createShardDO().",Ze=x?C("globalDbStub: DatabaseWriterLike",Xe,["aggregate","count","delete","findFirst","findFirstOrThrow","findMany","get","groupBy","insert","normalizeId","patch","query","rank","rankPage","replace"],{sync:["normalizeId","query"]}):"",{vectorSyncMethod:et,vectorsBuild:tt,vectorsStub:rt}=cr(u,Q?i.vectorIndexes.filter(s=>B.has(s.table)).map(s=>s.name):[]),at=`{
|
|
1116
1124
|
...this.ctxDbTuning(),
|
|
1117
1125
|
auth: { identity: identity ?? null, userId: userId ?? null },
|
|
@@ -1168,7 +1176,7 @@ const LUNORA_SCHEMA_SNAPSHOT: { hash: string; json: string } = { hash: ${JSON.st
|
|
|
1168
1176
|
vectors,`:"",st=V?`
|
|
1169
1177
|
orm: bindOrm(facade),`:"",ee=j?"config.hyperdriveGlobal":"config.d1",ot=x?` const globalRequest = { ...this.globalCdcOptions(config.cdc ?? false), bookmark: this.getInboundBookmark(), identity, onBookmark: (bookmarkValue: string | undefined) => { if (options.bookmarks !== undefined) { options.bookmarks.value = bookmarkValue; } }, userId };
|
|
1170
1178
|
const globalDb: DatabaseWriterLike = ${ee}?.(env, globalRequest) ?? globalDbStub;
|
|
1171
|
-
`:"",it=ir(v&&x,ee),{externalSourceOverride:dt,sourceBootstrap:ct,sourceClientCacheConst:lt}=dr(
|
|
1179
|
+
`:"",it=ir(v&&x,ee),{externalSourceOverride:dt,sourceBootstrap:ct,sourceClientCacheConst:lt}=dr(T),ht=`
|
|
1172
1180
|
protected override async runShardInit(): Promise<void> {
|
|
1173
1181
|
this.ensureMigrated();
|
|
1174
1182
|
${X?` clearMemoryTables(this.sql as SqlExec, schema as unknown as SchemaLike);
|
|
@@ -1223,9 +1231,9 @@ ${ct}${ut} }
|
|
|
1223
1231
|
const facade = db as unknown as Record<string, ReturnType<typeof bindTableFacade>>;
|
|
1224
1232
|
${i.tables.map(s=>` facade[${JSON.stringify(s.name)}] = bindTableFacade(db, ${JSON.stringify(s.name)});`).join(`
|
|
1225
1233
|
`)}
|
|
1226
|
-
`:"",gt=`${b.everyBuild}${
|
|
1234
|
+
`:"",gt=`${b.everyBuild}${O.build}${F.build}
|
|
1227
1235
|
const secrets = createSecrets(env);
|
|
1228
|
-
`,bt=`${b.everyFields}${
|
|
1236
|
+
`,bt=`${b.everyFields}${O.contextField}${$.contextField}${F.contextField}
|
|
1229
1237
|
secrets,`,ft=$.build,wt=[...b.actionFields,...A.length>0?["services"]:[]],yt=`${b.actionBuild}${U.build}`;return`${Vt}${E.join(`
|
|
1230
1238
|
`)}
|
|
1231
1239
|
|
|
@@ -1236,7 +1244,7 @@ interface FunctionReference {
|
|
|
1236
1244
|
}
|
|
1237
1245
|
|
|
1238
1246
|
/** Foreign-key columns per table (\`v.id("target")\` fields) for the data browser. */
|
|
1239
|
-
const LUNORA_TABLE_REFS = ${h(
|
|
1247
|
+
const LUNORA_TABLE_REFS = ${h(qe,"Record<string, Record<string, string>>")};
|
|
1240
1248
|
|
|
1241
1249
|
/** Declared indexes per table (secondary, search, geo, rank, vector) for the schema viewer. */
|
|
1242
1250
|
const LUNORA_TABLE_INDEXES = ${h($e,'Record<string, Array<{ fields: string[]; name: string; type: "geo" | "index" | "rank" | "search" | "vector"; unique?: boolean }>>')};
|
|
@@ -1265,7 +1273,7 @@ const LUNORA_STORAGE_COLUMNS = ${h(Ue,"Record<string, string[]>")};
|
|
|
1265
1273
|
const LUNORA_TTL_SWEEPS = ${h(J,"Array<{ after?: number; field: string; softDeleteField?: string; table: string }>")};
|
|
1266
1274
|
|
|
1267
1275
|
/** Static schema advisories (computed by @lunora/advisor at codegen time) served via \`__lunora_admin__:getAdvisories\`. */
|
|
1268
|
-
const LUNORA_ADVISORIES = ${h(
|
|
1276
|
+
const LUNORA_ADVISORIES = ${h(Te,"AdvisoryFinding[]")};
|
|
1269
1277
|
|
|
1270
1278
|
/** Every declared procedure (discovered by @lunora/codegen) served via \`__lunora_admin__:getAdvisorProcedures\` — the health map's denominator. */
|
|
1271
1279
|
const LUNORA_ADVISOR_PROCEDURES = ${h(Ee,"AdvisorProcedure[]")};
|
|
@@ -1281,7 +1289,7 @@ const LUNORA_STORAGE_RULES = ${h(Le,"StorageRulesResult")};
|
|
|
1281
1289
|
|
|
1282
1290
|
/** Which optional package-backed features this app wires up (discovered from imports / \`ctx.*\` reads / schema signals) served via \`__lunora_admin__:studioFeatures\` so the studio hides nav pages whose package isn't enabled. */
|
|
1283
1291
|
const LUNORA_STUDIO_FEATURES = ${h(Ie,"StudioFeaturesResult")};
|
|
1284
|
-
${te}${W.constant}${
|
|
1292
|
+
${te}${W.constant}${q.constant}${_e}${Pe}${me}${we}${oe}${le}${U.specs}${Se}
|
|
1285
1293
|
export interface ShardDOConfig {
|
|
1286
1294
|
/** Opt into change-data-capture: records a post-image to \`__cdc_log\` on every write (backs streaming export + replay-PITR). */
|
|
1287
1295
|
cdc?: boolean;
|
|
@@ -1296,9 +1304,9 @@ export interface ShardDOConfig {
|
|
|
1296
1304
|
/** \`unknown\` because \`@lunora/scheduler\`'s \`Scheduler\` is not assignable to \`SchedulerLike\`; the shard casts it. */
|
|
1297
1305
|
scheduler?: (env: Record<string, unknown>) => unknown;
|
|
1298
1306
|
/** \`origin\` is the origin the current \`/rpc\` request reached the worker on — the fallback base for signed object URLs when no \`publicBaseUrl\` is configured. \`undefined\` off the synchronous dispatch path. */
|
|
1299
|
-
storage?: (env: Record<string, unknown>, origin?: string) => unknown;${Ke}${b.configFields}${
|
|
1307
|
+
storage?: (env: Record<string, unknown>, origin?: string) => unknown;${Ke}${b.configFields}${O.configField}${xe}${Ge}${Qe}${ze}${W.configField}
|
|
1300
1308
|
}
|
|
1301
|
-
${C("schedulerStub",Je,["cancel","runAfter","runAt"])}${C("storageStub",Ye,["createMultipartUpload","delete","download","generateUploadUrl","getMetadata","getPresignedUrl","getSignedUrl","getUrl","head","list","resumeMultipartUpload","store","upload"],{sync:["getUrl","resumeMultipartUpload"]})}${Ze}${lt}${rt}${b.stubs}${
|
|
1309
|
+
${C("schedulerStub",Je,["cancel","runAfter","runAt"])}${C("storageStub",Ye,["createMultipartUpload","delete","download","generateUploadUrl","getMetadata","getPresignedUrl","getSignedUrl","getUrl","head","list","resumeMultipartUpload","store","upload"],{sync:["getUrl","resumeMultipartUpload"]})}${Ze}${lt}${rt}${b.stubs}${Oe}
|
|
1302
1310
|
${Xt}
|
|
1303
1311
|
|
|
1304
1312
|
/**
|
|
@@ -1404,7 +1412,7 @@ ${W.override}${ht}
|
|
|
1404
1412
|
protected override studioFeatures(): StudioFeaturesResult {
|
|
1405
1413
|
return LUNORA_STUDIO_FEATURES;
|
|
1406
1414
|
}
|
|
1407
|
-
${
|
|
1415
|
+
${q.evaluateOverride}${q.subscriptionOverride}${Me}${Ne}
|
|
1408
1416
|
protected override advisories(): AdvisoryFinding[] {
|
|
1409
1417
|
return LUNORA_ADVISORIES;
|
|
1410
1418
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/codegen",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.290",
|
|
4
4
|
"description": "Code generator for Lunora: emits _generated/{api,server,dataModel}.ts from your schema",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lunora/advisor": "1.0.0-alpha.
|
|
50
|
-
"@lunora/agent": "1.0.0-alpha.
|
|
49
|
+
"@lunora/advisor": "1.0.0-alpha.206",
|
|
50
|
+
"@lunora/agent": "1.0.0-alpha.194",
|
|
51
51
|
"@lunora/container": "1.0.0-alpha.72",
|
|
52
52
|
"@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
|
|
53
53
|
"@lunora/platform": "1.0.0-alpha.58",
|
|
54
54
|
"@lunora/queue": "1.0.0-alpha.97",
|
|
55
55
|
"@lunora/scheduler": "1.0.0-alpha.116",
|
|
56
|
-
"@lunora/values": "1.0.0-alpha.
|
|
57
|
-
"@lunora/workflow": "1.0.0-alpha.
|
|
56
|
+
"@lunora/values": "1.0.0-alpha.62",
|
|
57
|
+
"@lunora/workflow": "1.0.0-alpha.74",
|
|
58
58
|
"@visulima/fs": "6.0.29",
|
|
59
59
|
"jiti": "^2.7.0",
|
|
60
60
|
"quicktype-core": "^26.0.0",
|