@lunora/codegen 1.0.0-alpha.410 → 1.0.0-alpha.411
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{CAPABILITY_PROBES-BuNEmlCO.mjs → CAPABILITY_PROBES-DCzOjTN7.mjs} +1 -1
- package/dist/packem_shared/{SCHEMA_SNAPSHOT_FILENAME-CbyXHjvE.mjs → SCHEMA_SNAPSHOT_FILENAME-Dmq3sFwb.mjs} +1 -1
- package/dist/packem_shared/{capabilitiesUsedBy-BwhaHK08.mjs → capabilitiesUsedBy-Dm4Of8Gw.mjs} +1 -1
- package/dist/packem_shared/{emitAgents-E9U99TB1.mjs → emitAgents-vWoT8-Yb.mjs} +1 -1
- package/dist/packem_shared/{emitApp-pPxkJ2Z-.mjs → emitApp-CBE_wZAT.mjs} +1 -1
- package/dist/packem_shared/emitServer-CGRV_uIq.mjs +1 -0
- package/dist/packem_shared/{emitShard-B0i9dfOt.mjs → emitShard-CDWgekIG.mjs} +1 -1
- package/dist/packem_shared/{server-5ph4hltf.mjs → server-Dfxmm5Zw.mjs} +1 -1
- package/dist/packem_shared/{shard-CgzAeeHn.mjs → shard-CWAD5mYy.mjs} +1 -1
- package/dist/packem_shared/{shard-runtime-DsYnnWSe.mjs → shard-runtime-G5mZQjY0.mjs} +1 -1
- package/package.json +1 -1
- package/dist/packem_shared/emitServer-CbcZN_Ug.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -3216,7 +3216,7 @@ declare const CAPABILITY_ROWS: readonly [{
|
|
|
3216
3216
|
readonly key: "scheduler";
|
|
3217
3217
|
readonly moduleSpecifier: "@lunora/scheduler";
|
|
3218
3218
|
}, {
|
|
3219
|
-
readonly bindingFreeExports: readonly ["buildPresignedUrl", "buildSignedUrl", "scopeKey", "verifySignedUrl"];
|
|
3219
|
+
readonly bindingFreeExports: readonly ["authorizeSignedGet", "buildPresignedUrl", "buildSignedUrl", "scopeKey", "verifySignedUrl"];
|
|
3220
3220
|
readonly contextProperty: "storage";
|
|
3221
3221
|
readonly key: "storage";
|
|
3222
3222
|
readonly moduleSpecifier: "@lunora/storage";
|
package/dist/index.d.ts
CHANGED
|
@@ -3216,7 +3216,7 @@ declare const CAPABILITY_ROWS: readonly [{
|
|
|
3216
3216
|
readonly key: "scheduler";
|
|
3217
3217
|
readonly moduleSpecifier: "@lunora/scheduler";
|
|
3218
3218
|
}, {
|
|
3219
|
-
readonly bindingFreeExports: readonly ["buildPresignedUrl", "buildSignedUrl", "scopeKey", "verifySignedUrl"];
|
|
3219
|
+
readonly bindingFreeExports: readonly ["authorizeSignedGet", "buildPresignedUrl", "buildSignedUrl", "scopeKey", "verifySignedUrl"];
|
|
3220
3220
|
readonly contextProperty: "storage";
|
|
3221
3221
|
readonly key: "storage";
|
|
3222
3222
|
readonly moduleSpecifier: "@lunora/storage";
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as i,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{formatAdvisories as d,lintSchema as f,toAdvisorContext as m}from"./packem_shared/formatAdvisories-BCVASH7N.mjs";import{describeErrorLevelFindings as n,errorAdvisoryNames as c,errorPlatformDiagnosticNames as l,sortedUniqueNames as S}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CAPABILITY_PROBES as E}from"./packem_shared/CAPABILITY_PROBES-
|
|
1
|
+
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as i,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{formatAdvisories as d,lintSchema as f,toAdvisorContext as m}from"./packem_shared/formatAdvisories-BCVASH7N.mjs";import{describeErrorLevelFindings as n,errorAdvisoryNames as c,errorPlatformDiagnosticNames as l,sortedUniqueNames as S}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CAPABILITY_PROBES as E}from"./packem_shared/CAPABILITY_PROBES-DCzOjTN7.mjs";import{COMPANION_BINDING as u,COMPANION_SERVICE_NAME as N}from"./packem_shared/COMPANION_BINDING-Da_v9XpC.mjs";import{CodegenDiagnosticError as g,diagnosticAt as C}from"./packem_shared/CodegenDiagnosticError-BUXlG3P-.mjs";import{AGENTS_FILENAME as I,discoverAgents as _}from"./packem_shared/AGENTS_FILENAME-D0Y0_UgB.mjs";import{isTestPath as L,listLunoraSourceFiles as M}from"./packem_shared/isTestPath-DRIdZaij.mjs";import{default as F}from"./packem_shared/discoverAuthApiCalls-ENLGem4M.mjs";import{CONTAINERS_FILENAME as P,discoverContainers as D}from"./packem_shared/CONTAINERS_FILENAME-J-e3Vanb.mjs";import{default as b}from"./packem_shared/discoverCrons-DWVXmktw.mjs";import{ENV_FILENAME as U}from"./packem_shared/ENV_FILENAME-COPIfgzp.mjs";import{capabilitiesUsedBy as H,createTargetScope as j,foldCapabilitySignals as V,mayReadCapabilityContext as k,sourceCapabilitySignals as W}from"./packem_shared/capabilitiesUsedBy-Dm4Of8Gw.mjs";import{FLAGS_FILENAME as K,discoverFlags as Q}from"./packem_shared/FLAGS_FILENAME-6RzszxVW.mjs";import{d as q}from"./packem_shared/index-BH3e-J44.mjs";import{default as J}from"./packem_shared/discoverHttpRoutes-CAoEemno.mjs";import{default as Z}from"./packem_shared/discoverHyperdriveCalls-W96s1VgA.mjs";import{default as ee}from"./packem_shared/discoverInserts-BtyJbg8A.mjs";import{d as oe}from"./packem_shared/index-D03C6Kao.mjs";import{default as ie}from"./packem_shared/discoverMigrations-Duh6HVG3.mjs";import{MUTATORS_FILENAME as se,discoverMutators as de}from"./packem_shared/MUTATORS_FILENAME-C3OImAxC.mjs";import{default as me}from"./packem_shared/discoverNondeterministicCalls-DR0S5Xb4.mjs";import{ALL_NOTIFY_CHANNELS as ne,NOTIFY_FILENAME as ce,discoverNotifyCalls as le,discoverNotifyChannels as Se,discoverNotifyConfig as xe}from"./packem_shared/ALL_NOTIFY_CHANNELS-D1LVGz6_.mjs";import{default as Ae}from"./packem_shared/readPackageDependencies-RHhGiz0k.mjs";import{default as Ne}from"./packem_shared/discoverQueries-BLyL2qzX.mjs";import{QUEUES_FILENAME as ge,discoverQueues as Ce}from"./packem_shared/QUEUES_FILENAME-Ba-sK5Ek.mjs";import{default as Ie}from"./packem_shared/discoverR2sqlCalls-Cb4AmcY8.mjs";import{default as Re}from"./packem_shared/discoverRlsProcedures-_Dh3Xb9Z.mjs";import{default as Me}from"./packem_shared/discoverRlsMetadata-Cf4gZvxW.mjs";import{discoverSandboxUsage as Fe}from"./packem_shared/discoverSandboxUsage-Ccy9n7G1.mjs";import{default as Pe}from"./packem_shared/discoverSchema-ynieYB0n.mjs";import{companionServiceBinding as ye,readBoundServiceBindings as be,readDevServiceBindings as Ge,readServiceBindings as Ue,resolveServiceBindings as Be}from"./packem_shared/companionServiceBinding-BZjm486n.mjs";import{SHAPES_FILENAME as je,discoverShapes as Ve}from"./packem_shared/SHAPES_FILENAME-BYnZ1Xw-.mjs";import{default as We}from"./packem_shared/discoverStorageRulesMetadata-ZKW6DInk.mjs";import{WORKFLOWS_FILENAME as Ke,discoverWorkflows as Qe}from"./packem_shared/WORKFLOWS_FILENAME-DfVfBum_.mjs";import{emitApp as qe}from"./packem_shared/emitApp-CBE_wZAT.mjs";import{isD1GlobalTable as Je,isHyperdriveGlobalTable as Xe}from"./packem_shared/isD1GlobalTable-udvHAAzD.mjs";import{buildOpenApiDocument as $e,emitOpenApi as er,emitOpenApiModule as rr}from"./packem_shared/buildOpenApiDocument-B8KEeeRr.mjs";import{OPENRPC_VERSION as tr,buildOpenRpcDocument as ir,emitOpenRpc as ar,emitOpenRpcModule as sr}from"./packem_shared/OPENRPC_VERSION-UNYmA7Ty.mjs";import{DEFAULT_TARGET as fr,platformMatrixIds as mr,readProjectTarget as pr,resolveCodegenTarget as nr}from"./packem_shared/DEFAULT_TARGET-CVYzxQ0y.mjs";import{b as lr,r as Sr,c as xr,d as Er}from"./packem_shared/project-config-file-DR7xrrNB.mjs";import{PROJECT_CONFIG_FILENAMES as ur,findCodegenConfigFile as Nr,findProjectConfigFile as vr,projectConfigCandidatePaths as gr}from"./packem_shared/PROJECT_CONFIG_FILENAMES-CLfsyvjA.mjs";import{SCHEMA_SNAPSHOT_FILENAME as Or,runCodegen as Ir}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-Dmq3sFwb.mjs";import{SchemaSnapshotParseError as Rr,buildSchemaSnapshot as Lr,evaluateSchemaDrift as Mr,indexReferencesOf as Tr,parseSchemaSnapshot as Fr}from"./packem_shared/SchemaSnapshotParseError-CV7mmuPi.mjs";import{default as Pr}from"./packem_shared/fingerprintSchemaSources-C8H1wOcH.mjs";import{schemaFromIr as yr}from"./packem_shared/schemaFromIr-CByOxuZb.mjs";import{LUNORA_ERROR_CODES as Gr,validatorIrToJsonSchema as Ur}from"./packem_shared/LUNORA_ERROR_CODES-D7AVT7qF.mjs";import{SDK_LANGUAGES as Hr,SDK_TARGETS as jr,generateSdk as Vr}from"./sdk/index.mjs";import{redact as Wr,secretKindOf as zr}from"./packem_shared/redact-Cy14LEnc.mjs";import{default as Qr}from"./packem_shared/emitDrizzleSchema-BzOChEYW.mjs";import{e as qr}from"./packem_shared/server-Dfxmm5Zw.mjs";import{e as Jr}from"./packem_shared/shard-CWAD5mYy.mjs";import{G as Zr}from"./packem_shared/shared-Cn7dMQ_u.mjs";import{MESSAGE_SOLUTIONS as eo,findSolutionByMessage as ro}from"@lunora/errors";import{createCodegenProject as to,findTsconfig as io,refreshCodegenProject as ao,tsconfigFingerprint as so}from"./packem_shared/createCodegenProject-Cfr1xHPC.mjs";import{t as mo,u as po,v as no}from"./packem_shared/shard-runtime-G5mZQjY0.mjs";import{emitApi as lo,emitCollections as So,emitInternalApi as xo}from"./packem_shared/emitApi-lwadq5G7.mjs";import{emitCrons as Ao,emitScheduler as uo,emitVectors as No,emitWranglerCronTriggers as vo}from"./packem_shared/emitCrons-CCRKs482.mjs";import{emitDataModel as Co}from"./packem_shared/emitDataModel-BvCZS4Yq.mjs";import{emitFunctions as Io}from"./packem_shared/emitFunctions-ppMX7E3X.mjs";import{isTypedSchema as Ro}from"./packem_shared/isTypedSchema-CDv3pJB6.mjs";const e="0.0.0";export{I as AGENTS_FILENAME,ne as ALL_NOTIFY_CHANNELS,E as CAPABILITY_PROBES,u as COMPANION_BINDING,N as COMPANION_SERVICE_NAME,P as CONTAINERS_FILENAME,g as CodegenDiagnosticError,fr as DEFAULT_TARGET,U as ENV_FILENAME,K as FLAGS_FILENAME,Zr as GENERATED_HEADER,Gr as LUNORA_ERROR_CODES,eo as LUNORA_SOLUTION_RULES,se as MUTATORS_FILENAME,ce as NOTIFY_FILENAME,tr as OPENRPC_VERSION,ur as PROJECT_CONFIG_FILENAMES,ge as QUEUES_FILENAME,Or as SCHEMA_SNAPSHOT_FILENAME,t as SCHEMA_SNAPSHOT_VERSION,Hr as SDK_LANGUAGES,jr as SDK_TARGETS,je as SHAPES_FILENAME,Rr as SchemaSnapshotParseError,e as VERSION,Ke as WORKFLOWS_FILENAME,$e as buildOpenApiDocument,ir as buildOpenRpcDocument,Lr as buildSchemaSnapshot,H as capabilitiesUsedBy,ye as companionServiceBinding,to as createCodegenProject,j as createTargetScope,n as describeErrorLevelFindings,C as diagnosticAt,i as diffSchemaSnapshots,_ as discoverAgents,F as discoverAuthApiCalls,D as discoverContainers,b as discoverCrons,Q as discoverFlags,q as discoverFunctions,J as discoverHttpRoutes,Z as discoverHyperdriveCalls,ee as discoverInserts,oe as discoverMaskProcedures,ie as discoverMigrations,de as discoverMutators,me as discoverNondeterministicCalls,le as discoverNotifyCalls,Se as discoverNotifyChannels,xe as discoverNotifyConfig,Ne as discoverQueries,Ce as discoverQueues,Ie as discoverR2sqlCalls,Me as discoverRlsMetadata,Re as discoverRlsProcedures,Fe as discoverSandboxUsage,Pe as discoverSchema,Ve as discoverShapes,We as discoverStorageRulesMetadata,Qe as discoverWorkflows,mo as emitAgents,lo as emitApi,qe as emitApp,So as emitCollections,po as emitContainers,Ao as emitCrons,Co as emitDataModel,Qr as emitDrizzleSchema,Io as emitFunctions,xo as emitInternalApi,er as emitOpenApi,rr as emitOpenApiModule,ar as emitOpenRpc,sr as emitOpenRpcModule,uo as emitScheduler,qr as emitServer,Jr as emitShard,No as emitVectors,no as emitWorkflows,vo as emitWranglerCronTriggers,c as errorAdvisoryNames,l as errorPlatformDiagnosticNames,Mr as evaluateSchemaDrift,Nr as findCodegenConfigFile,ro as findLunoraSolution,vr as findProjectConfigFile,io as findTsconfig,Pr as fingerprintSchemaSources,V as foldCapabilitySignals,d as formatAdvisories,Vr as generateSdk,Tr as indexReferencesOf,Je as isD1GlobalTable,Xe as isHyperdriveGlobalTable,L as isTestPath,Ro as isTypedSchema,f as lintSchema,M as listLunoraSourceFiles,lr as loadProjectConfig,k as mayReadCapabilityContext,Fr as parseSchemaSnapshot,mr as platformMatrixIds,gr as projectConfigCandidatePaths,be as readBoundServiceBindings,Ge as readDevServiceBindings,Ae as readPackageDependencies,Sr as readProjectConfigLiterals,xr as readProjectLazyFunctions,Er as readProjectSecurityHeaders,pr as readProjectTarget,Ue as readServiceBindings,Wr as redact,ao as refreshCodegenProject,nr as resolveCodegenTarget,Be as resolveServiceBindings,Ir as runCodegen,yr as schemaFromIr,zr as secretKindOf,a as serializeSchemaSnapshot,S as sortedUniqueNames,W as sourceCapabilitySignals,m as toAdvisorContext,so as tsconfigFingerprint,Ur as validatorIrToJsonSchema};
|
package/dist/packem_shared/{CAPABILITY_PROBES-BuNEmlCO.mjs → CAPABILITY_PROBES-DCzOjTN7.mjs}
RENAMED
|
@@ -22,4 +22,4 @@ const n=[{contextProperty:"access",key:"access",moduleSpecifier:"@lunora/cloudfl
|
|
|
22
22
|
/**
|
|
23
23
|
* R2 SQL over Apache Iceberg tables (window functions, DISTINCT, set operations). Non-deterministic — available only in actions. Reads here are NOT tracked by Lunora live queries.
|
|
24
24
|
*/
|
|
25
|
-
readonly r2sql: import("@lunora/bindings/r2sql").R2SqlClient;`,shardBinding:"bespoke",tier:"action"},{bindingFreeExports:["assertValidCronExpression","isValidCronExpression"],contextProperty:"scheduler",key:"scheduler",moduleSpecifier:"@lunora/scheduler"},{bindingFreeExports:["buildPresignedUrl","buildSignedUrl","scopeKey","verifySignedUrl"],contextProperty:"storage",key:"storage",moduleSpecifier:"@lunora/storage"},{contextProperty:"vectors",key:"vectors",moduleSpecifier:"@lunora/bindings/vectors"},{contextProperty:"workflows",key:"workflows",moduleSpecifier:"@lunora/workflow"}],a=n,r=n.flatMap(e=>"appMethod"in e?[{appMethod:e.appMethod,key:e.key}]:[]),o=Object.fromEntries(a.map(({contextProperty:e,key:i,moduleSpecifier:t})=>[i,{contextProperty:e,moduleSpecifier:t}])),s=e=>new Set(a.filter(i=>e[i.key]).map(i=>i.key));export{r as APP_METHOD_CAPABILITIES,a as CAPABILITIES,o as CAPABILITY_PROBES,s as usedCapabilities};
|
|
25
|
+
readonly r2sql: import("@lunora/bindings/r2sql").R2SqlClient;`,shardBinding:"bespoke",tier:"action"},{bindingFreeExports:["assertValidCronExpression","isValidCronExpression"],contextProperty:"scheduler",key:"scheduler",moduleSpecifier:"@lunora/scheduler"},{bindingFreeExports:["authorizeSignedGet","buildPresignedUrl","buildSignedUrl","scopeKey","verifySignedUrl"],contextProperty:"storage",key:"storage",moduleSpecifier:"@lunora/storage"},{contextProperty:"vectors",key:"vectors",moduleSpecifier:"@lunora/bindings/vectors"},{contextProperty:"workflows",key:"workflows",moduleSpecifier:"@lunora/workflow"}],a=n,r=n.flatMap(e=>"appMethod"in e?[{appMethod:e.appMethod,key:e.key}]:[]),o=Object.fromEntries(a.map(({contextProperty:e,key:i,moduleSpecifier:t})=>[i,{contextProperty:e,moduleSpecifier:t}])),s=e=>new Set(a.filter(i=>e[i.key]).map(i=>i.key));export{r as APP_METHOD_CAPABILITIES,a as CAPABILITIES,o as CAPABILITY_PROBES,s as usedCapabilities};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{existsSync as z,readFileSync as at,mkdirSync as ns,writeFileSync as Xr,rmSync as he,readdirSync as is}from"node:fs";import{dirname as ct,join as v,basename as Jr,relative as rs}from"node:path";import{performance as Ct}from"node:perf_hooks";import{runAdvisor as Zr}from"@lunora/advisor";import{LunoraError as F}from"@lunora/errors";import{serializeSchemaSnapshot as eo}from"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{toAdvisorContext as to}from"./formatAdvisories-BCVASH7N.mjs";import{Node as r,SyntaxKind as d,Project as os,ts as so,VariableDeclarationKind as as}from"ts-morph";import{listLunoraSourceFiles as y,lunoraRelativePath as P,descendantsOfKind as E,bindingKeyName as ve,collectCallRows as O,findObjectProperty as W,collectSecurityCallRows as no,propertyInitializer as _,listSecurityScanFiles as $e,objectLiteralFromCallbackBody as Qn,limitNameOf as Xn,optionsObjectLiteral as Jn,handlerOf as io,memberAccessOf as cs,chainRootOf as lt,unwrapExpression as h,collectNodeRows as oe,isConstDeclaration as ae,outermostValueWrapper as C,isWriteTarget as be,isSameNode as b,returningFunctionOf as Kt,walkChain as ro,RUN_METHODS as Zn,functionReferenceSegments as oo,isTestPath as ao,isFunctionLike as ge,functionKeyOf as ei,withSourceListMemo as co}from"./isTestPath-DRIdZaij.mjs";import{j as Z,h as Y,d as M,b as ls,c as A,a as ds,w as us,k as lo,l as uo,f as fo,m as go,g as Bt,i as po}from"./attribution-BhGR_h0Z.mjs";import{b as tn,r as Tt,a as H,e as mo,m as ti,c as dt,f as fs,E as si,C as ni,d as ho,g as vo,i as Eo}from"./context-root-DP9WbBI_.mjs";import{a as T,i as ii,c as ce,d as ri,e as oi,f as xo,g as So}from"./classify-procedure-call-n9urVsqb.mjs";import{a as S,s as gs}from"./property-name-7cBlgK_O.mjs";import{b as Ao,a as ai}from"./module-specifiers-BctA0m_p.mjs";import{r as ut,s as yo}from"./parse-validator-BisfC8bR.mjs";import bo from"./discoverAuthApiCalls-ENLGem4M.mjs";import{i as K,r as ci}from"./database-calls-Do0YbPCL.mjs";import{i as Vt,p as li,w as No,d as Po}from"./index-BH3e-J44.mjs";import wo from"./discoverHyperdriveCalls-W96s1VgA.mjs";import{PROJECT_CONFIG_FILENAMES as Io,findProjectConfigFile as di,findCodegenConfigFile as Co}from"./PROJECT_CONFIG_FILENAMES-CLfsyvjA.mjs";import{contextPropertiesRead as To,createTargetScope as Oo,fileWiresRequestSecretTool as ko,discoverFeatureUsage as Ro}from"./capabilitiesUsedBy-
|
|
1
|
+
import{existsSync as z,readFileSync as at,mkdirSync as ns,writeFileSync as Xr,rmSync as he,readdirSync as is}from"node:fs";import{dirname as ct,join as v,basename as Jr,relative as rs}from"node:path";import{performance as Ct}from"node:perf_hooks";import{runAdvisor as Zr}from"@lunora/advisor";import{LunoraError as F}from"@lunora/errors";import{serializeSchemaSnapshot as eo}from"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{toAdvisorContext as to}from"./formatAdvisories-BCVASH7N.mjs";import{Node as r,SyntaxKind as d,Project as os,ts as so,VariableDeclarationKind as as}from"ts-morph";import{listLunoraSourceFiles as y,lunoraRelativePath as P,descendantsOfKind as E,bindingKeyName as ve,collectCallRows as O,findObjectProperty as W,collectSecurityCallRows as no,propertyInitializer as _,listSecurityScanFiles as $e,objectLiteralFromCallbackBody as Qn,limitNameOf as Xn,optionsObjectLiteral as Jn,handlerOf as io,memberAccessOf as cs,chainRootOf as lt,unwrapExpression as h,collectNodeRows as oe,isConstDeclaration as ae,outermostValueWrapper as C,isWriteTarget as be,isSameNode as b,returningFunctionOf as Kt,walkChain as ro,RUN_METHODS as Zn,functionReferenceSegments as oo,isTestPath as ao,isFunctionLike as ge,functionKeyOf as ei,withSourceListMemo as co}from"./isTestPath-DRIdZaij.mjs";import{j as Z,h as Y,d as M,b as ls,c as A,a as ds,w as us,k as lo,l as uo,f as fo,m as go,g as Bt,i as po}from"./attribution-BhGR_h0Z.mjs";import{b as tn,r as Tt,a as H,e as mo,m as ti,c as dt,f as fs,E as si,C as ni,d as ho,g as vo,i as Eo}from"./context-root-DP9WbBI_.mjs";import{a as T,i as ii,c as ce,d as ri,e as oi,f as xo,g as So}from"./classify-procedure-call-n9urVsqb.mjs";import{a as S,s as gs}from"./property-name-7cBlgK_O.mjs";import{b as Ao,a as ai}from"./module-specifiers-BctA0m_p.mjs";import{r as ut,s as yo}from"./parse-validator-BisfC8bR.mjs";import bo from"./discoverAuthApiCalls-ENLGem4M.mjs";import{i as K,r as ci}from"./database-calls-Do0YbPCL.mjs";import{i as Vt,p as li,w as No,d as Po}from"./index-BH3e-J44.mjs";import wo from"./discoverHyperdriveCalls-W96s1VgA.mjs";import{PROJECT_CONFIG_FILENAMES as Io,findProjectConfigFile as di,findCodegenConfigFile as Co}from"./PROJECT_CONFIG_FILENAMES-CLfsyvjA.mjs";import{contextPropertiesRead as To,createTargetScope as Oo,fileWiresRequestSecretTool as ko,discoverFeatureUsage as Ro}from"./capabilitiesUsedBy-Dm4Of8Gw.mjs";import{diagnosticAt as Ne}from"./CodegenDiagnosticError-BUXlG3P-.mjs";import{m as ps,a as et,s as ui,d as Fo}from"./index-D03C6Kao.mjs";import{MUTATORS_FILENAME as Lo,isDefineMutatorCallee as Do,mutatorServerImplOf as _o,discoverMutators as Mo}from"./MUTATORS_FILENAME-C3OImAxC.mjs";import $o from"./discoverNondeterministicCalls-DR0S5Xb4.mjs";import{discoverNotifyConfig as zo,discoverNotifyCalls as Ko}from"./ALL_NOTIFY_CHANNELS-D1LVGz6_.mjs";import Bo from"./discoverR2sqlCalls-Cb4AmcY8.mjs";import Vo from"./discoverRlsProcedures-_Dh3Xb9Z.mjs";import{s as ms,n as Uo}from"./dispatch-namespace-DwTjD7BU.mjs";import{secretKindOf as Wo,redact as qo,isHeuristicSecretKind as jo,isSecretishName as Ho}from"./redact-Cy14LEnc.mjs";import{r as fi,p as Go,c as Yo,a as Qo,e as Xo,d as Jo}from"./project-config-file-DR7xrrNB.mjs";import{a as qe,d as Zo,r as ea}from"./modules-Qpm_zqz4.mjs";import{WORKFLOWS_FILENAME as ta,discoverWorkflows as sa}from"./WORKFLOWS_FILENAME-DfVfBum_.mjs";import{r as na}from"./json-data-Chfs2Cz5.mjs";import{a as ia,I as ra,g as oa,G as gi,d as aa,i as ca}from"./shared-Cn7dMQ_u.mjs";import{createCodegenProject as la}from"./createCodegenProject-Cfr1xHPC.mjs";import{findTsconfig as Vx,refreshCodegenProject as Ux,tsconfigFingerprint as Wx}from"./createCodegenProject-Cfr1xHPC.mjs";import{wranglerString as da,wranglerValue as ua,companionName as fa,COMPANION_FILES as ga}from"./COMPANION_BINDING-Da_v9XpC.mjs";import{CAPABILITIES as pa,usedCapabilities as ma}from"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{isD1GlobalTable as pi,isHyperdriveGlobalTable as mi}from"./isD1GlobalTable-udvHAAzD.mjs";import{discoverAgents as ha}from"./AGENTS_FILENAME-D0Y0_UgB.mjs";import{discoverContainers as va}from"./CONTAINERS_FILENAME-J-e3Vanb.mjs";import Ea from"./discoverCrons-DWVXmktw.mjs";import{discoverEnv as xa}from"./ENV_FILENAME-COPIfgzp.mjs";import hi from"./readPackageDependencies-RHhGiz0k.mjs";import{discoverQueueDeclarations as Sa}from"./QUEUES_FILENAME-Ba-sK5Ek.mjs";import{discoverSandboxUsage as Aa}from"./discoverSandboxUsage-Ccy9n7G1.mjs";import{resolveServiceBindings as ya}from"./companionServiceBinding-BZjm486n.mjs";import ba from"./discoverStorageRulesMetadata-ZKW6DInk.mjs";import{resolveCodegenTarget as je,gatePlatformFeatures as Na,readTargetDiagnostics as Pa,vectorizeDimensionDiagnostics as wa,liveStreamsDeliveryAuthorizationDiagnostic as Ia,socketRoutesDeliveryAuthorizationDiagnostic as Ca,studioPlatformFor as Ta,platformFeatureAvailable as Oa,gateAdminTokenRevocation as ka}from"./DEFAULT_TARGET-CVYzxQ0y.mjs";import{i as Ra}from"./schema-BgM8A3XV.mjs";import{b as vi,e as Fa}from"./shard-CWAD5mYy.mjs";import{e as La,a as Da}from"./server-Dfxmm5Zw.mjs";import{emitDataModel as _a}from"./emitDataModel-BvCZS4Yq.mjs";import{i as Ma,b as $a,e as za,d as Ka,f as Ba,c as Va}from"./unwrap-handler-return-DUzluwPj.mjs";import Ua from"./discoverHttpRoutes-CAoEemno.mjs";import Wa from"./discoverInserts-BtyJbg8A.mjs";import{e as Ei}from"./exported-procedure-chains-DomRzs5_.mjs";import qa from"./discoverMigrations-Duh6HVG3.mjs";import sn from"./discoverQueries-BLyL2qzX.mjs";import ja from"./discoverRlsMetadata-Cf4gZvxW.mjs";import Ha from"./discoverSchema-ynieYB0n.mjs";import{discoverShapes as Ga}from"./SHAPES_FILENAME-BYnZ1Xw-.mjs";import{i as Ya}from"./reserved-words-CW1QFbTd.mjs";import{emitAuthModule as Qa,emitApp as Xa}from"./emitApp-CBE_wZAT.mjs";import{readJsonSync as Ja}from"@visulima/fs";import{indexReferencesOf as Za,buildSchemaSnapshot as ec}from"./SchemaSnapshotParseError-CV7mmuPi.mjs";import{buildOpenApiDocument as tc,emitOpenApiModule as sc}from"./buildOpenApiDocument-B8KEeeRr.mjs";import{buildOpenRpcDocument as nc,emitOpenRpcModule as ic}from"./OPENRPC_VERSION-UNYmA7Ty.mjs";import{w as rc,u as oc,v as ac,t as cc,x as lc}from"./shard-runtime-G5mZQjY0.mjs";import{emitCollections as dc,emitSeed as uc,emitApi as fc,emitInternalApi as gc}from"./emitApi-lwadq5G7.mjs";import{emitCrons as pc,emitScheduler as mc,emitAdminRevocations as hc,emitShardRegistry as vc,emitDurableObjects as Ec,emitVectors as xc,emitWranglerCronTriggers as Sc}from"./emitCrons-CCRKs482.mjs";import Ac from"./emitDrizzleSchema-BzOChEYW.mjs";import{LAZY_FUNCTION_DIRECTORY as xi,emitFunctions as yc,emitLazyFunctionModules as bc}from"./emitFunctions-ppMX7E3X.mjs";const Nc=(e,t=!1)=>{if(e.length===0)return"";const s=aa(t),n=e.map(c=>{if(ia(c.exportName,"live stream export name"),!ra.test(c.filePath))throw new Error(`@lunora/codegen: live stream file path is not safe to import: ${JSON.stringify(c.filePath)}`);return`import type { ${c.exportName} as ${c.exportName}Stream } from "../${c.filePath}.js";`}),i=e.map(c=>{const l=c.topics.map(u=>{oa(u.name,"live topic name");const f=`(typeof ${c.exportName}Stream)["topics"]["${u.name}"]`,g=`LiveTopicRef<LiveTopicPayload<${f}>>`,m=JSON.stringify(c.id);if(u.fields.length===0)return` ${u.name}: (): ${g} => ({ __lunoraLive: ${m}, topic: ${JSON.stringify(u.name)} }),`;const x=u.fields.map(k=>`\${encodeURIComponent(key.${k})}`).join(":");return` ${u.name}: (key: LiveTopicKey<${f}>): ${g} => ({
|
|
2
2
|
__lunoraLive: ${m},
|
|
3
3
|
topic: \`${u.name}:${x}\`,
|
|
4
4
|
}),`});return` ${c.exportName}: {
|
package/dist/packem_shared/{capabilitiesUsedBy-BwhaHK08.mjs → capabilitiesUsedBy-Dm4Of8Gw.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SyntaxKind as g,Node as m,ts as D,Project as M}from"ts-morph";import{CAPABILITIES as u}from"./CAPABILITY_PROBES-
|
|
1
|
+
import{SyntaxKind as g,Node as m,ts as D,Project as M}from"ts-morph";import{CAPABILITIES as u}from"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{descendantsOfKind as l,bindingKeyName as v,listLunoraSourceFiles as P}from"./isTestPath-DRIdZaij.mjs";import{scanImportDeclaration as A,noSandboxUsage as I}from"./discoverSandboxUsage-Ccy9n7G1.mjs";const f="ctx",L=(e,t,s)=>{for(const o of l(e,g.ElementAccessExpression)){const r=o.getArgumentExpression();t(o.getExpression())&&r!==void 0&&(m.isStringLiteral(r)||m.isNoSubstitutionTemplateLiteral(r))&&s.add(r.getLiteralValue())}},C=e=>{const t=new Set,s=new Set,o=new Set(l(e,g.Parameter).map(n=>n.getName())),r=l(e,g.VariableDeclaration).some(n=>{const c=n.getInitializer();return n.getName()===f&&m.isIdentifier(c)&&o.has(c.getText())});(o.has(f)||r)&&s.add(f);const i=n=>{if(m.isObjectBindingPattern(n))for(const c of n.getElements()){const d=v(c);d&&t.add(d)}};for(const n of l(e,g.BindingElement)){if(v(n)!==f)continue;const c=n.getNameNode();m.isIdentifier(c)?s.add(c.getText()):i(c)}const a=n=>m.isIdentifier(n)&&s.has(n.getText());for(const n of l(e,g.PropertyAccessExpression))a(n.getExpression())&&t.add(n.getName());L(e,a,t);for(const n of l(e,g.VariableDeclaration)){const c=n.getInitializer();c!==void 0&&a(c)&&i(n.getNameNode())}return t},V=e=>{if(e.isTypeOnly())return!0;if(m.isExportDeclaration(e)){const s=e.getNamedExports();return!e.isNamespaceExport()&&s.length>0&&s.every(o=>o.isTypeOnly())}const t=e.getNamedImports();return e.getDefaultImport()===void 0&&e.getNamespaceImport()===void 0&&t.length>0&&t.every(s=>s.isTypeOnly())},z=new Map(u.flatMap(({bindingFreeExports:e,moduleSpecifier:t})=>e===void 0?[]:[[t,new Set(e)]])),F=(e,t)=>{const s=z.get(t);if(s===void 0||m.isImportDeclaration(e)&&(e.getDefaultImport()!==void 0||e.getNamespaceImport()!==void 0))return!1;const o=m.isExportDeclaration(e)?e.getNamedExports():e.getNamedImports();return o.length>0&&o.every(r=>r.isTypeOnly()||s.has(r.getName()))},_=e=>{const t=new Set;for(const s of l(e,g.CallExpression)){const[o]=s.getArguments();s.getExpression().getKind()===g.ImportKeyword&&(m.isStringLiteral(o)||m.isNoSubstitutionTemplateLiteral(o))&&t.add(o.getLiteralValue())}return t},T="@lunora/agent",E="requestSecretTool",b=e=>e.startsWith("./")||e.startsWith("../"),S=e=>e.getAliasNode()?.getText()??e.getNameNode().getText(),h=(e,t)=>{const s=e!==void 0&&m.isCallExpression(e)?e.getExpression():e;return s!==void 0&&m.isIdentifier(s)&&t.has(s.getText())},k=e=>{const t=new Set;for(const s of e.getImportDeclarations())if(!(s.getModuleSpecifierValue()!==T||s.isTypeOnly()))for(const o of s.getNamedImports())!o.isTypeOnly()&&o.getNameNode().getText()===E&&t.add(S(o));for(const s of e.getVariableStatements())for(const o of s.getDeclarations())h(o.getInitializer(),t)&&t.add(o.getName());return t},p=e=>({names:new Set(e),namespaces:new Map}),x=new WeakMap,y=()=>{const e=Object.freeze({});return x.set(e,{projects:new Map,origins:new Map}),e},B=(e,t)=>{const s=x.get(e);if(s.origins.has(t))return t;let o=s.projects.get(t);return o===void 0&&(o=new M({compilerOptions:{...t.getCompilerOptions(),allowJs:!0},fileSystem:t.getFileSystem(),skipAddingFilesFromTsConfig:!0,skipFileDependencyResolution:!0,skipLoadingLibFiles:!0}),s.projects.set(t,o),s.origins.set(o,t)),o},O=(e,t,s)=>{const o=t.getSourceFile(),r=o.getProject(),i=x.get(e)?.origins.get(r)??r,{resolvedModule:a}=D.resolveModuleName(s,o.getFilePath(),i.getCompilerOptions(),i.getModuleResolutionHost()),n=a?.resolvedFileName;if(n===void 0)return;const c=i.getSourceFile(n)??r.getSourceFile(n);if(c!==void 0)return c;const d=B(e,r);return d.getSourceFile(n)??d.addSourceFileAtPath(n)},K=(e,t,s)=>{const o=e.getNamespaceExport();if(o!==void 0){const r=new Set(t.names);t.namespaces.forEach((i,a)=>{i.forEach(n=>{r.add(`${a}.${n}`)})}),r.size>0&&s.namespaces.set(o.getName(),r);return}if(!e.hasNamedExports()){t.names.forEach(r=>s.names.add(r)),t.namespaces.forEach((r,i)=>s.namespaces.set(i,r));return}for(const r of e.getNamedExports()){if(r.isTypeOnly())continue;const i=r.getNameNode().getText(),a=S(r);t.names.has(i)&&s.names.add(a);const n=t.namespaces.get(i);n!==void 0&&s.namespaces.set(a,n)}},W=(e,t,s,o)=>{const r=t.getModuleSpecifierValue();if(r===void 0)return p(s);if(r===T)return p([E]);const i=b(r)?O(e,t,r):void 0;return i===void 0?p([]):o(i)},w=(e,t,s)=>{const o=p([]),r=e.getFilePath();if(t.has(r))return o;t.add(r);const i=k(e);for(const a of e.getExportDeclarations())a.isTypeOnly()||K(a,W(s,a,i,n=>w(n,t,s)),o);for(const a of e.getVariableStatements())if(a.hasExportKeyword())for(const n of a.getDeclarations())h(n.getInitializer(),i)&&o.names.add(n.getName());return t.delete(r),o},j=(e,t,s)=>{const o=e.getModuleSpecifierValue();if(o===T)return p([E]);const r=b(o)?O(s,e,o):void 0;return r===void 0?p([]):w(r,new Set([t.getFilePath()]),s)},$=e=>{const t=e.getPropertyNameNode();return t===void 0?e.getName():m.isStringLiteral(t)?t.getLiteralValue():t.getText()},N=(e,t,s)=>{const o=(n,c)=>n===t?s.has(c):n.startsWith(`${t}.`)&&s.has(`${n.slice(t.length+1)}.${c}`),r=e.getDescendantsOfKind(g.PropertyAccessExpression).some(n=>o(n.getExpression().getText(),n.getName())),i=l(e,g.ElementAccessExpression).some(n=>{const c=n.getArgumentExpression();return m.isStringLiteral(c)&&o(n.getExpression().getText(),c.getLiteralValue())}),a=l(e,g.VariableDeclaration).some(n=>{const c=n.getInitializer(),d=n.getNameNode();return c!==void 0&&m.isObjectBindingPattern(d)&&d.getElements().some(R=>o(c.getText(),$(R)))});return r||i||a},q=(e,t,s)=>{if(s.names.has(t.getNameNode().getText()))return!0;const o=s.namespaces.get(t.getNameNode().getText());return o!==void 0&&N(e,S(t),o)},U=(e,t=y())=>e.getImportDeclarations().some(s=>{if(s.isTypeOnly())return!1;const o=j(s,e,t);if(o.names.size===0&&o.namespaces.size===0)return!1;const r=s.getDefaultImport(),i=s.getNamespaceImport();return r!==void 0&&(o.names.has("default")||N(e,r.getText(),o.namespaces.get("default")??new Set))||s.getNamedImports().some(n=>!n.isTypeOnly()&&q(e,n,o))||i!==void 0&&N(e,i.getText(),o.names)}),X=(e,t=y())=>{const s=e.getImportDeclarations(),o=I();for(const r of s){const i=A(r);for(const a of Object.keys(o))o[a]||=i[a]}return{contextReads:C(e),dynamicImports:_(e),requestSecretTool:U(e,t),sandboxTools:o,valueImports:new Set([...s,...e.getExportDeclarations()].flatMap(r=>{const i=r.getModuleSpecifierValue();return i===void 0||V(r)||F(r,i)?[]:[i]}))}},G=e=>{const t=new Set,s=new Set,o=I(),r=new Set;let i=!1;for(const a of e){i||=a.requestSecretTool;for(const n of a.contextReads)t.add(n);for(const n of a.dynamicImports)s.add(n);for(const n of a.valueImports)r.add(n);for(const n of Object.keys(o))o[n]||=a.sandboxTools[n]}return{contextReads:t,dynamicImports:s,requestSecretTool:i,sandboxTools:o,valueImports:r}},H=e=>new Set(u.filter(({contextProperty:t,moduleSpecifier:s})=>e.valueImports.has(s)||t!==void 0&&e.contextReads.has(t)).map(({key:t})=>t)),J=new RegExp(String.raw`\b${f}\b`,"u"),Q=new RegExp(String.raw`\b(?:${u.flatMap(({contextProperty:e})=>e===void 0?[]:[e]).join("|")})\b`,"u"),se=e=>J.test(e)&&Q.test(e),oe=(e,t)=>{const s=y(),o=G(P(t).map(i=>X(e.getSourceFile(i)??e.addSourceFileAtPath(i),s))),r=H(o);return Object.fromEntries(u.map(({key:i})=>[i,r.has(i)]))};export{H as capabilitiesUsedBy,C as contextPropertiesRead,y as createTargetScope,oe as discoverFeatureUsage,U as fileWiresRequestSecretTool,G as foldCapabilitySignals,se as mayReadCapabilityContext,X as sourceCapabilitySignals};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./json-data-Chfs2Cz5.mjs";import{p as i,j as r,t as n,h as o,u as g,k as F,d as u,x as p,n as l,g as f,f as d,m as k,i as w,v as W,l as v,w as A}from"./shard-runtime-
|
|
1
|
+
import"./json-data-Chfs2Cz5.mjs";import{p as i,j as r,t as n,h as o,u as g,k as F,d as u,x as p,n as l,g as f,f as d,m as k,i as w,v as W,l as v,w as A}from"./shard-runtime-G5mZQjY0.mjs";import"./shared-Cn7dMQ_u.mjs";import"./platform-8oj7iXQy.mjs";export{i as buildDoTypeImports,r as emitAgentFragments,n as emitAgents,o as emitContainerFragments,g as emitContainers,F as emitPaymentFragments,u as emitQueueFragments,p as emitQueues,l as emitQueuesMetadataFragments,f as emitServiceFragments,d as emitTopicFragments,k as emitWorkflowEventFragments,w as emitWorkflowFragments,W as emitWorkflows,v as emitWorkflowsMetadataFragments,A as queueAliasFindings};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{APP_METHOD_CAPABILITIES as N}from"./CAPABILITY_PROBES-
|
|
1
|
+
import{APP_METHOD_CAPABILITIES as N}from"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{i as I}from"./schema-BgM8A3XV.mjs";import{a as L,I as j,G as y}from"./shared-Cn7dMQ_u.mjs";const $={configKey:"vectors",doc:"Wire the Vectorize index map backing `ctx.vectors`.",method:"vectors"},f=e=>[...N.filter(({key:t})=>e.capabilities.has(t)).map(({appMethod:t})=>t),...e.hasVectors?[$]:[]],w=e=>f(e).length>0,k=e=>(e.emailAgents?.length??0)>0,c=e=>e.tables.some(t=>I(t)),p=e=>e.liveStreams===!0&&(e.liveStreamDeclarations?.length??0)>0,P=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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{e}from"./server-Dfxmm5Zw.mjs";import"./shared-Cn7dMQ_u.mjs";import"./platform-8oj7iXQy.mjs";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as d}from"./shard-
|
|
1
|
+
import"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import"./isD1GlobalTable-udvHAAzD.mjs";import"./json-data-Chfs2Cz5.mjs";import{e as d}from"./shard-CWAD5mYy.mjs";import"./shard-runtime-G5mZQjY0.mjs";import"./shared-Cn7dMQ_u.mjs";import"./platform-8oj7iXQy.mjs";import"./schema-BgM8A3XV.mjs";export{d as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CAPABILITIES as ze}from"./CAPABILITY_PROBES-
|
|
1
|
+
import{CAPABILITIES as ze}from"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{existsSync as W,readdirSync as ue,readlinkSync as pe,lstatSync as Ke,statSync as Ue}from"node:fs";import{join as h,relative as y,dirname as l,sep as me,isAbsolute as Je,resolve as Ye,basename as Xe}from"node:path";import{ts as c,Project as Ze}from"ts-morph";import{G as ye,a as F,u as et,d as tt}from"./shared-Cn7dMQ_u.mjs";import{p as at}from"./platform-8oj7iXQy.mjs";const he=/(?:\.d)?\.([cm]?)tsx?$/u,rt=t=>t.replace(he,".d.$1ts"),fe=(t,o)=>{const a=y(t,o).split(me).join("/").replace(he,".$1js");return a.startsWith(".")?a:`./${a}`},be=t=>t.replaceAll("\\","/"),Z=(t,o,a)=>be(h(t,rt(y(o,a)))),ot=t=>fe(".",h("services",t.name,y(l(t.wranglerPath),t.main))),nt=t=>{const o=[],a=e=>{(c.isImportDeclaration(e)||c.isExportDeclaration(e))&&e.moduleSpecifier!==void 0&&c.isStringLiteral(e.moduleSpecifier)?o.push(e.moduleSpecifier):c.isImportTypeNode(e)&&c.isLiteralTypeNode(e.argument)&&c.isStringLiteral(e.argument.literal)&&o.push(e.argument.literal),c.forEachChild(e,a)};return a(t),o},x=t=>{const{ctimeMs:o,mtimeMs:a,size:e}=Ue(t);return`${String(a)}:${String(o)}:${String(e)}`},st=new Set([".git",".wrangler","dist","node_modules","target"]),ge=t=>ue(t,{withFileTypes:!0}).flatMap(o=>{const a=h(t,o.name);return o.isSymbolicLink()?[`${a}->${pe(a)}`]:o.isDirectory()&&o.name.startsWith("@")?[`${a}:${x(a)}`,...ge(a)]:[]}),xe=t=>[`${t}:${x(t)}`,...ge(t)],Te=t=>{const o=h(t,"node_modules"),a=W(o)?xe(o):[],e=l(t);return e===t?a:[...a,...Te(e)]},it=(t,o)=>{const a=[];try{const e=n=>{for(const s of ue(n,{withFileTypes:!0})){const d=h(n,s.name);if(d!==o)if(s.isSymbolicLink())a.push(`${d}->${pe(d)}`);else if(s.isDirectory()){if(s.name==="node_modules")a.push(...xe(d));else if(!st.has(s.name)){if(!Ke(d).isDirectory())throw new Error(`${d} changed during the scan`);e(d)}}else a.push(`${d}:${x(d)}`)}};e(t),a.push(...Te(t))}catch{return}return[...new Set(a)].toSorted((e,n)=>e.localeCompare(n)).join(`
|
|
2
2
|
`)},dt=t=>Xe(l(t)).startsWith("@")?l(l(t)):l(t),de=(t,o)=>!y(o,t).startsWith("..")&&!t.split(me).includes("node_modules"),le=(t,o)=>{const a=[];let e=t;for(;e!==l(e)&&!W(h(e,"package.json"));)a.push(e),e=l(e);if(W(h(e,"package.json"))){for(const n of[...a,e,h(e,"package.json")])o.add(n);return e}},lt=(t,o,a)=>{let e=t;for(;y(e,o).startsWith("..")&&e!==l(e);)a.add(e),e=l(e);a.add(e)},ct=(t,o)=>{const a=new Set;t.some(e=>de(e,o))&&le(o,a);for(const e of t){if(de(e,o)){for(let s=l(e);s!==o&&s!==l(s);s=l(s))a.add(s);continue}const n=le(l(e),a);n===void 0?lt(l(e),o,a):a.add(dt(n))}return[...a].map(e=>[e,x(e)])},ve=new Map,ce=([t,o])=>{try{return x(t)===o}catch{return!1}},ut=(t,o,a)=>{const e=ve.get(t);return e?.optionsKey===o&&e.stamps.every(s=>ce(s))&&e.directories.every(s=>ce(s))&&a!==void 0&&e.tree===a?e.files:void 0},pt=(t,o,a)=>{const e=[...o.stamps,...o.directories].every(([,n])=>Math.floor(Number.parseFloat(n))<=a);o.tree!==void 0&&e&&ve.set(t,{...o,tree:o.tree})},mt=(t,o)=>({directories:ct(o,t),stamps:o.map(a=>[a,x(a)])}),wt=(t,o)=>{const a=l(t.wranglerPath),e=y(a,t.main);if(e.startsWith("..")||Je(e))throw new Error(`@lunora/codegen: service "${t.name}": its entry module (${t.main}) must be inside ${a} to be typed as RPC`);const n=h(o,"services",t.name),s=c.findConfigFile(a,i=>c.sys.fileExists(i)),d=new Ze({compilerOptions:{composite:!1,declaration:!0,declarationMap:!1,emitDeclarationOnly:!0,incremental:!1,noEmit:!1,noEmitOnError:!1,outDir:n,rootDir:a},skipAddingFilesFromTsConfig:!0,...s===void 0?{}:{tsConfigFilePath:s}}),S=JSON.stringify([t.name,t.main,t.wranglerPath,o]),m=JSON.stringify(d.getCompilerOptions()),T=it(a,Ye(o)),v=ut(S,m,T);if(v!==void 0)return v;const w=Date.now();d.addSourceFileAtPath(t.main),d.resolveSourceFileDependencies();const P=d.getProgram().compilerObject.getSourceFiles().map(i=>i.fileName).filter(i=>W(i)),{directories:$,stamps:j}=mt(a,P),O={...d.getCompilerOptions(),preserveSymlinks:!0},u=new Map(d.getSourceFiles().map(i=>i.getFilePath()).filter(i=>!i.endsWith(".d.ts")&&!y(a,i).startsWith("..")).map(i=>[Z(n,a,i),i])),f={};for(const i of d.emitToMemory({emitOnlyDtsFiles:!0}).getFiles()){const R=u.get(be(i.filePath));if(R===void 0)continue;const B=c.createSourceFile(i.filePath,i.text,c.ScriptTarget.Latest,!1);let{text:b}=i;for(const g of nt(B).toReversed()){const I=c.resolveModuleName(g.text,R,O,c.sys).resolvedModule?.resolvedFileName;if(I===void 0)continue;const k=Z(n,a,I),N=u.has(k)?k:I;b=`${b.slice(0,g.getStart(B))}${JSON.stringify(fe(l(i.filePath),N))}${b.slice(g.getEnd())}`}f[y(o,i.filePath)]=`${ye}${b}`}if(f[y(o,Z(n,a,t.main))]===void 0)throw new Error(`@lunora/codegen: service "${t.name}": TypeScript emitted no declaration for its entry module ${t.main}`);return pt(S,{files:f,optionsKey:m,directories:$,stamps:j,tree:T},w),f},yt=(t,o=[])=>{const a=new Set;for(const e of t.tables)for(const n of Object.values(e.shape)){const s=et(n);s.kind==="storage"&&typeof s.bucket=="string"&&s.bucket!==""&&a.add(s.bucket)}for(const e of o)e!==""&&e!=="default"&&a.add(e);return["default",...[...a].toSorted((e,n)=>e.localeCompare(n))]},$t=({agents:t=[],authClaims:o=[],capabilities:a=new Set,containers:e=[],env:n,hasVectors:s=!0,hasFlags:d=!1,hasNotify:S=!1,identity:m,queues:T=[],schema:v,services:w=[],storageRuleBuckets:P=[],topics:$=[],useUmbrella:j=!1,workflows:O=[]}={})=>{const u=tt(j),f=yt(v??{tables:[]},P).map(r=>JSON.stringify(r)).join(" | "),i=r=>r.sandbox===!0?"SandboxContainerAccessor":"ContainerAccessor",R=[...new Set(e.map(r=>i(r)))].toSorted((r,p)=>r.localeCompare(p)),B=e.length>0?`import type { ${R.join(", ")} } from "@lunora/container";
|
|
3
3
|
`:"",b=e.length>0?`
|
|
4
4
|
readonly containers: {${e.map(r=>`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LunoraError as pe}from"@lunora/errors";import{serializeSchemaSnapshot as Zt,hashSchemaSnapshot as er}from"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{isHyperdriveGlobalTable as tr,isD1GlobalTable as rr}from"./isD1GlobalTable-udvHAAzD.mjs";import{r as nr}from"./json-data-Chfs2Cz5.mjs";import{r as q,e as ar,a as sr,b as or,c as ir,d as dr,f as cr,g as lr,h as ur,i as hr,j as pr,k as mr,l as fr,m as gr,n as br,o as yr,p as wr,q as vr,s as kr}from"./shard-runtime-
|
|
1
|
+
import{LunoraError as pe}from"@lunora/errors";import{serializeSchemaSnapshot as Zt,hashSchemaSnapshot as er}from"./SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{isHyperdriveGlobalTable as tr,isD1GlobalTable as rr}from"./isD1GlobalTable-udvHAAzD.mjs";import{r as nr}from"./json-data-Chfs2Cz5.mjs";import{r as q,e as ar,a as sr,b as or,c as ir,d as dr,f as cr,g as lr,h as ur,i as hr,j as pr,k as mr,l as fr,m as gr,n as br,o as yr,p as wr,q as vr,s as kr}from"./shard-runtime-G5mZQjY0.mjs";import{u as U,h as Sr,s as Rr,a as xr,I as Ar,c as Or,G as Tr,d as _r}from"./shared-Cn7dMQ_u.mjs";import{p as Dr}from"./platform-8oj7iXQy.mjs";import{i as Ir}from"./schema-BgM8A3XV.mjs";const m=(r,t)=>`((): (() => ${t}) => { let cached: ${t} | undefined; return () => (cached ??= JSON.parse(${JSON.stringify(JSON.stringify(r))}) as ${t}); })()`,me=["categories","description","facing","level","remediation","title"],Er=r=>{const t={};return{advisoryRows:r.map(o=>{let n=t[o.name];return n||(n=Object.fromEntries(me.filter(a=>a in o).map(a=>[a,o[a]])),t[o.name]=n),Object.fromEntries(Object.entries(o).filter(([a,i])=>!me.includes(a)||JSON.stringify(i)!==JSON.stringify(n[a])))}),advisoryRules:t}},Cr=` /**
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LunoraError as R}from"@lunora/errors";import{r as $}from"./json-data-Chfs2Cz5.mjs";import{CAPABILITIES as S}from"./CAPABILITY_PROBES-
|
|
1
|
+
import{LunoraError as R}from"@lunora/errors";import{r as $}from"./json-data-Chfs2Cz5.mjs";import{CAPABILITIES as S}from"./CAPABILITY_PROBES-DCzOjTN7.mjs";import{a as l,G as f,I as w}from"./shared-Cn7dMQ_u.mjs";import{s as L}from"./platform-8oj7iXQy.mjs";const K=e=>e?{importFragment:"serveRelationFanout, ",override:`
|
|
2
2
|
protected override async runRelationFanoutRead(functionPath: string, args: Record<string, unknown>): Promise<unknown> {
|
|
3
3
|
this.ensureServable();
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./CAPABILITY_PROBES-BuNEmlCO.mjs";import{e}from"./server-5ph4hltf.mjs";import"./shared-Cn7dMQ_u.mjs";import"./platform-8oj7iXQy.mjs";export{e as default};
|