@lunora/codegen 1.0.0-alpha.384 → 1.0.0-alpha.385
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 +32 -6
- package/dist/index.d.ts +32 -6
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{GENERATED_HEADER-Bzf6ZJ9r.mjs → GENERATED_HEADER-B-tYRlRG.mjs} +1 -1
- package/dist/packem_shared/{MUTATORS_FILENAME-DlSftsvY.mjs → MUTATORS_FILENAME-D9WbOFm7.mjs} +1 -1
- package/dist/packem_shared/{NOTIFY_FILENAME-SKk8x0VM.mjs → NOTIFY_FILENAME-CRU_TEKs.mjs} +1 -1
- package/dist/packem_shared/{OPENRPC_VERSION-CSjT8wJW.mjs → OPENRPC_VERSION-CT_E2DcI.mjs} +1 -1
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-DXilYf6b.mjs +31 -0
- package/dist/packem_shared/SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs +2 -0
- package/dist/packem_shared/{SHAPES_FILENAME-rSSihffV.mjs → SHAPES_FILENAME-D9beIrs1.mjs} +1 -1
- package/dist/packem_shared/{SchemaSnapshotParseError-ycDz8gOB.mjs → SchemaSnapshotParseError-DnAuFdpl.mjs} +8 -8
- package/dist/packem_shared/{buildOpenApiDocument-afHH7rN5.mjs → buildOpenApiDocument-67-fasdW.mjs} +1 -1
- package/dist/packem_shared/{context-property-calls-CYaejv5r.mjs → context-property-calls-ZK1UcTQR.mjs} +1 -1
- package/dist/packem_shared/{context-root-TiLodrRO.mjs → context-root-DtpwprsY.mjs} +1 -1
- package/dist/packem_shared/{database-calls-QqsrkDMs.mjs → database-calls-Cn47SfSU.mjs} +1 -1
- package/dist/packem_shared/{discoverFunctions-DdHysjy1.mjs → discoverFunctions-DU5ylqVC.mjs} +1 -1
- package/dist/packem_shared/{discoverHttpRoutes-5iA7gI_Q.mjs → discoverHttpRoutes-D9Q0lBBb.mjs} +1 -1
- package/dist/packem_shared/discoverHyperdriveCalls-DlyCZKX3.mjs +1 -0
- package/dist/packem_shared/{discoverInserts-Dw7fvL7s.mjs → discoverInserts-7Xdawmuk.mjs} +1 -1
- package/dist/packem_shared/discoverMaskProcedures-D6kAKDZG.mjs +1 -0
- package/dist/packem_shared/{discoverQueries-DVFZJER7.mjs → discoverQueries-C75OdGHl.mjs} +1 -1
- package/dist/packem_shared/discoverR2sqlCalls-BrDIti5c.mjs +1 -0
- package/dist/packem_shared/{discoverRlsProcedures-C2lkSLPn.mjs → discoverRlsProcedures-BiyDg2ej.mjs} +1 -1
- package/dist/packem_shared/discoverSchema-Bs5JUiOE.mjs +1 -0
- package/dist/packem_shared/{emitAgents-BeM6PZv4.mjs → emitAgents-iTKWSKan.mjs} +1 -1
- package/dist/packem_shared/{emitApi-GFmStqmq.mjs → emitApi-DWJW8Vu9.mjs} +1 -1
- package/dist/packem_shared/{emitApp-D-6FIpYb.mjs → emitApp-L7PnfjJK.mjs} +1 -1
- package/dist/packem_shared/{emitCrons-Drdn8Mjn.mjs → emitCrons-BvqxeNRr.mjs} +1 -1
- package/dist/packem_shared/{emitDataModel-LTnwnhV6.mjs → emitDataModel-MjAOi3KM.mjs} +1 -1
- package/dist/packem_shared/{emitDrizzleSchema-CM9jh_F0.mjs → emitDrizzleSchema-Dszoyymv.mjs} +1 -1
- package/dist/packem_shared/{emitFunctions-DRAuiKPv.mjs → emitFunctions-CvMrX_cX.mjs} +50 -50
- package/dist/packem_shared/{emitServer-4l7MPmK0.mjs → emitServer-BgI9yXW1.mjs} +1 -1
- package/dist/packem_shared/emitShard-D4sAFu7Z.mjs +1 -0
- package/dist/packem_shared/{index-iw3axJ5Y.mjs → index-CNI4vSyc.mjs} +1 -1
- package/dist/packem_shared/index-o449rQLQ.mjs +1 -0
- package/dist/packem_shared/{ip-reads-BVXbFgzV.mjs → ip-reads-Dotjify6.mjs} +1 -1
- package/dist/packem_shared/{qualifiers-D1Q_3wo2.mjs → qualifiers-ClaCHu0X.mjs} +1 -1
- package/dist/packem_shared/{server-D69SOfX8.mjs → server-qWq5nN-R.mjs} +1 -1
- package/dist/packem_shared/{shard-L3gYZnC9.mjs → shard-BqfSKnmG.mjs} +1 -1
- package/dist/packem_shared/{shard-runtime-lkQU8trx.mjs → shard-runtime-C1P_uVye.mjs} +1 -1
- package/dist/packem_shared/{shared-A1XHcT4t.mjs → shared-DhqnD5R3.mjs} +6 -6
- package/dist/packem_shared/static-literal-BwDHHjEJ.mjs +1 -0
- package/dist/packem_shared/{unwrap-handler-return-eQRIZSOX.mjs → unwrap-handler-return-c2s2-nk9.mjs} +1 -1
- package/package.json +8 -8
- package/dist/packem_shared/SCHEMA_SNAPSHOT_FILENAME-Dle_pfr9.mjs +0 -31
- package/dist/packem_shared/SCHEMA_SNAPSHOT_VERSION-BdxZuSxk.mjs +0 -2
- package/dist/packem_shared/discoverHyperdriveCalls-BJRaIvLx.mjs +0 -1
- package/dist/packem_shared/discoverMaskProcedures-BLKjuD-A.mjs +0 -1
- package/dist/packem_shared/discoverR2sqlCalls-BEBdqXi_.mjs +0 -1
- package/dist/packem_shared/discoverSchema-Cycd1-H0.mjs +0 -1
- package/dist/packem_shared/emitShard-DqEvyZPZ.mjs +0 -1
- package/dist/packem_shared/index-BhsJzv9r.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -163,6 +163,13 @@ interface TableSnapshot {
|
|
|
163
163
|
* Always written by a current snapshot; see {@link recordsTableModifiers}.
|
|
164
164
|
*/
|
|
165
165
|
memory?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* `true` on a table a package extension contributes, from a format that
|
|
168
|
+
* records its columns' refinements. Codegen once read such a table from the
|
|
169
|
+
* package at runtime and dropped every `.min()`/`.max()`, so a baseline without
|
|
170
|
+
* this marker never recorded them — see {@link recordsPackageRefinements}.
|
|
171
|
+
*/
|
|
172
|
+
refinementsRecorded?: true;
|
|
166
173
|
/** Relation accessor name → {@link RelationSnapshot}. */
|
|
167
174
|
relations: Record<string, RelationSnapshot>;
|
|
168
175
|
/**
|
|
@@ -1613,6 +1620,20 @@ interface FunctionIR {
|
|
|
1613
1620
|
* functions.
|
|
1614
1621
|
*/
|
|
1615
1622
|
lifecycle?: "connect" | "disconnect" | "init" | "reactor" | "socket" | "whisper";
|
|
1623
|
+
/**
|
|
1624
|
+
* The chain's merged `.meta(...)`, read only for the lazy registry: its stub
|
|
1625
|
+
* stands in for the function until the module loads, so it carries the
|
|
1626
|
+
* declaration `procedureMeta(fn)` reads. `"unloaded"` when the declaration is
|
|
1627
|
+
* not a literal codegen can copy. Absent on eager builds — the registry holds
|
|
1628
|
+
* the real function there.
|
|
1629
|
+
*/
|
|
1630
|
+
meta?: Record<string, unknown> | "unloaded";
|
|
1631
|
+
/**
|
|
1632
|
+
* Serialized TS source for the handler's return type, with `Promise<T>`
|
|
1633
|
+
* unwrapped so callers see `T` directly. Defaults to `"unknown"` when
|
|
1634
|
+
* ts-morph cannot resolve the type (typically because the consuming
|
|
1635
|
+
* project lacks a tsconfig that can reach `@lunora/server`).
|
|
1636
|
+
*/
|
|
1616
1637
|
/**
|
|
1617
1638
|
* The `.output(validator)` declaration, when the chain has one.
|
|
1618
1639
|
*
|
|
@@ -1622,12 +1643,6 @@ interface FunctionIR {
|
|
|
1622
1643
|
* must agree — see the emit-side note for what went wrong when they did not.
|
|
1623
1644
|
*/
|
|
1624
1645
|
output?: ValidatorIR;
|
|
1625
|
-
/**
|
|
1626
|
-
* Serialized TS source for the handler's return type, with `Promise<T>`
|
|
1627
|
-
* unwrapped so callers see `T` directly. Defaults to `"unknown"` when
|
|
1628
|
-
* ts-morph cannot resolve the type (typically because the consuming
|
|
1629
|
-
* project lacks a tsconfig that can reach `@lunora/server`).
|
|
1630
|
-
*/
|
|
1631
1646
|
/**
|
|
1632
1647
|
* Set on a query that may read `ctx.ip`, decided statically and failing closed: the shard never resumes it
|
|
1633
1648
|
* warm, whatever fingerprint a client presents, because its rows can depend on the address the cursor was read at.
|
|
@@ -1644,6 +1659,17 @@ interface FunctionIR {
|
|
|
1644
1659
|
origin?: string;
|
|
1645
1660
|
path: string;
|
|
1646
1661
|
};
|
|
1662
|
+
/**
|
|
1663
|
+
* Set when `args` was read off a declaration-file type (a function re-exported
|
|
1664
|
+
* from a published component) rather than from `.input(...)`. The types are
|
|
1665
|
+
* exact, but bounds and refinements (`.max()`, `.check()`) are not in a type,
|
|
1666
|
+
* so no AOT validator may be compiled from them: the runtime parses through
|
|
1667
|
+
* the function's own `args`. Nor does the type say whether the function is
|
|
1668
|
+
* paid, what its `.meta()` is, or which args are `v.sensitive`, so its module
|
|
1669
|
+
* is loaded eagerly under lazy functions and its client reference is marked
|
|
1670
|
+
* sensitive.
|
|
1671
|
+
*/
|
|
1672
|
+
typeDerivedArgs?: true;
|
|
1647
1673
|
/**
|
|
1648
1674
|
* Call surface the function is exposed on. Absent (or `"public"`) means it
|
|
1649
1675
|
* lands in the generated `api`; `"internal"` routes it to the separate
|
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,13 @@ interface TableSnapshot {
|
|
|
163
163
|
* Always written by a current snapshot; see {@link recordsTableModifiers}.
|
|
164
164
|
*/
|
|
165
165
|
memory?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* `true` on a table a package extension contributes, from a format that
|
|
168
|
+
* records its columns' refinements. Codegen once read such a table from the
|
|
169
|
+
* package at runtime and dropped every `.min()`/`.max()`, so a baseline without
|
|
170
|
+
* this marker never recorded them — see {@link recordsPackageRefinements}.
|
|
171
|
+
*/
|
|
172
|
+
refinementsRecorded?: true;
|
|
166
173
|
/** Relation accessor name → {@link RelationSnapshot}. */
|
|
167
174
|
relations: Record<string, RelationSnapshot>;
|
|
168
175
|
/**
|
|
@@ -1613,6 +1620,20 @@ interface FunctionIR {
|
|
|
1613
1620
|
* functions.
|
|
1614
1621
|
*/
|
|
1615
1622
|
lifecycle?: "connect" | "disconnect" | "init" | "reactor" | "socket" | "whisper";
|
|
1623
|
+
/**
|
|
1624
|
+
* The chain's merged `.meta(...)`, read only for the lazy registry: its stub
|
|
1625
|
+
* stands in for the function until the module loads, so it carries the
|
|
1626
|
+
* declaration `procedureMeta(fn)` reads. `"unloaded"` when the declaration is
|
|
1627
|
+
* not a literal codegen can copy. Absent on eager builds — the registry holds
|
|
1628
|
+
* the real function there.
|
|
1629
|
+
*/
|
|
1630
|
+
meta?: Record<string, unknown> | "unloaded";
|
|
1631
|
+
/**
|
|
1632
|
+
* Serialized TS source for the handler's return type, with `Promise<T>`
|
|
1633
|
+
* unwrapped so callers see `T` directly. Defaults to `"unknown"` when
|
|
1634
|
+
* ts-morph cannot resolve the type (typically because the consuming
|
|
1635
|
+
* project lacks a tsconfig that can reach `@lunora/server`).
|
|
1636
|
+
*/
|
|
1616
1637
|
/**
|
|
1617
1638
|
* The `.output(validator)` declaration, when the chain has one.
|
|
1618
1639
|
*
|
|
@@ -1622,12 +1643,6 @@ interface FunctionIR {
|
|
|
1622
1643
|
* must agree — see the emit-side note for what went wrong when they did not.
|
|
1623
1644
|
*/
|
|
1624
1645
|
output?: ValidatorIR;
|
|
1625
|
-
/**
|
|
1626
|
-
* Serialized TS source for the handler's return type, with `Promise<T>`
|
|
1627
|
-
* unwrapped so callers see `T` directly. Defaults to `"unknown"` when
|
|
1628
|
-
* ts-morph cannot resolve the type (typically because the consuming
|
|
1629
|
-
* project lacks a tsconfig that can reach `@lunora/server`).
|
|
1630
|
-
*/
|
|
1631
1646
|
/**
|
|
1632
1647
|
* Set on a query that may read `ctx.ip`, decided statically and failing closed: the shard never resumes it
|
|
1633
1648
|
* warm, whatever fingerprint a client presents, because its rows can depend on the address the cursor was read at.
|
|
@@ -1644,6 +1659,17 @@ interface FunctionIR {
|
|
|
1644
1659
|
origin?: string;
|
|
1645
1660
|
path: string;
|
|
1646
1661
|
};
|
|
1662
|
+
/**
|
|
1663
|
+
* Set when `args` was read off a declaration-file type (a function re-exported
|
|
1664
|
+
* from a published component) rather than from `.input(...)`. The types are
|
|
1665
|
+
* exact, but bounds and refinements (`.max()`, `.check()`) are not in a type,
|
|
1666
|
+
* so no AOT validator may be compiled from them: the runtime parses through
|
|
1667
|
+
* the function's own `args`. Nor does the type say whether the function is
|
|
1668
|
+
* paid, what its `.meta()` is, or which args are `v.sensitive`, so its module
|
|
1669
|
+
* is loaded eagerly under lazy functions and its client reference is marked
|
|
1670
|
+
* sensitive.
|
|
1671
|
+
*/
|
|
1672
|
+
typeDerivedArgs?: true;
|
|
1647
1673
|
/**
|
|
1648
1674
|
* Call surface the function is exposed on. Absent (or `"public"`) means it
|
|
1649
1675
|
* lands in the generated `api`; `"internal"` routes it to the separate
|
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-
|
|
1
|
+
import{SCHEMA_SNAPSHOT_VERSION as t,diffSchemaSnapshots as i,serializeSchemaSnapshot as a}from"./packem_shared/SCHEMA_SNAPSHOT_VERSION-DTLoSaNn.mjs";import{formatAdvisories as f,lintSchema as m,toAdvisorContext as d}from"./packem_shared/formatAdvisories-BCVASH7N.mjs";import{describeErrorLevelFindings as n,errorAdvisoryNames as c,errorPlatformDiagnosticNames as l,sortedUniqueNames as x}from"./packem_shared/describeErrorLevelFindings-vzaGS9KL.mjs";import{CAPABILITY_PROBES as E}from"./packem_shared/CAPABILITY_PROBES-DKYJ2K4t.mjs";import{CodegenDiagnosticError as A,diagnosticAt as v}from"./packem_shared/CodegenDiagnosticError-BUXlG3P-.mjs";import{AGENTS_FILENAME as C,discoverAgents as N}from"./packem_shared/AGENTS_FILENAME-5mDMAMWy.mjs";import{isTestPath as R,listLunoraSourceFiles as T}from"./packem_shared/isTestPath-JdN4KXhV.mjs";import{default as I}from"./packem_shared/discoverAuthApiCalls-DZMYREsq.mjs";import{CONTAINERS_FILENAME as F,discoverContainers as L}from"./packem_shared/CONTAINERS_FILENAME-BJYrxnq2.mjs";import{default as P}from"./packem_shared/discoverCrons-D-vJXsgx.mjs";import{capabilitiesUsedBy as b,createTargetScope as y,foldCapabilitySignals as U,mayReadCapabilityContext as G,sourceCapabilitySignals as H}from"./packem_shared/capabilitiesUsedBy-CN8HACEL.mjs";import{FLAGS_FILENAME as B,discoverFlags as k}from"./packem_shared/FLAGS_FILENAME-BEMyglH0.mjs";import{d as K}from"./packem_shared/index-o449rQLQ.mjs";import{default as z}from"./packem_shared/discoverHttpRoutes-D9Q0lBBb.mjs";import{default as q}from"./packem_shared/discoverHyperdriveCalls-DlyCZKX3.mjs";import{default as J}from"./packem_shared/discoverInserts-7Xdawmuk.mjs";import{d as X}from"./packem_shared/index-CNI4vSyc.mjs";import{default as $}from"./packem_shared/discoverMigrations-C649uAWL.mjs";import{MUTATORS_FILENAME as re,discoverMutators as oe}from"./packem_shared/MUTATORS_FILENAME-D9WbOFm7.mjs";import{default as ie}from"./packem_shared/discoverNondeterministicCalls-DQgVTcLv.mjs";import{NOTIFY_FILENAME as se,discoverNotifyCalls as fe,discoverNotifyChannels as me,discoverNotifyConfig as de}from"./packem_shared/NOTIFY_FILENAME-CRU_TEKs.mjs";import{default as ne}from"./packem_shared/readPackageDependencies-RHhGiz0k.mjs";import{default as le}from"./packem_shared/discoverQueries-C75OdGHl.mjs";import{QUEUES_FILENAME as Se,discoverQueues as Ee}from"./packem_shared/QUEUES_FILENAME-BeGwgqcw.mjs";import{default as Ae}from"./packem_shared/discoverR2sqlCalls-BrDIti5c.mjs";import{default as ge}from"./packem_shared/discoverRlsProcedures-BiyDg2ej.mjs";import{default as Ne}from"./packem_shared/discoverRlsMetadata-DqZpiGts.mjs";import{discoverSandboxUsage as Re}from"./packem_shared/discoverSandboxUsage-CdGRnVU2.mjs";import{default as he}from"./packem_shared/discoverSchema-Bs5JUiOE.mjs";import{readServiceBindings as _e,resolveServiceBindings as Fe}from"./packem_shared/readServiceBindings-BA49C6aN.mjs";import{SHAPES_FILENAME as Me,discoverShapes as Pe}from"./packem_shared/SHAPES_FILENAME-D9beIrs1.mjs";import{default as be}from"./packem_shared/discoverStorageRulesMetadata-H3RJzkH_.mjs";import{WORKFLOWS_FILENAME as Ue,discoverWorkflows as Ge}from"./packem_shared/WORKFLOWS_FILENAME--RWiu_Vy.mjs";import{emitApp as je}from"./packem_shared/emitApp-L7PnfjJK.mjs";import{isD1GlobalTable as ke,isHyperdriveGlobalTable as We}from"./packem_shared/isD1GlobalTable-udvHAAzD.mjs";import{buildOpenApiDocument as Ve,emitOpenApi as ze,emitOpenApiModule as Qe}from"./packem_shared/buildOpenApiDocument-67-fasdW.mjs";import{OPENRPC_VERSION as we,buildOpenRpcDocument as Je,emitOpenRpc as Ye,emitOpenRpcModule as Xe}from"./packem_shared/OPENRPC_VERSION-CT_E2DcI.mjs";import{DEFAULT_TARGET as $e,platformMatrixIds as er,readProjectTarget as rr,resolveCodegenTarget as or}from"./packem_shared/DEFAULT_TARGET-3OLdJhTj.mjs";import{loadProjectConfig as ir,readProjectConfigLiterals as ar}from"./packem_shared/loadProjectConfig-B7RmxIeD.mjs";import{PROJECT_CONFIG_FILENAMES as fr,findCodegenConfigFile as mr,findProjectConfigFile as dr,projectConfigCandidatePaths as pr}from"./packem_shared/PROJECT_CONFIG_FILENAMES-CLfsyvjA.mjs";import{SCHEMA_SNAPSHOT_FILENAME as cr,runCodegen as lr}from"./packem_shared/SCHEMA_SNAPSHOT_FILENAME-DXilYf6b.mjs";import{SchemaSnapshotParseError as Sr,buildSchemaSnapshot as Er,evaluateSchemaDrift as ur,indexReferencesOf as Ar,parseSchemaSnapshot as vr}from"./packem_shared/SchemaSnapshotParseError-DnAuFdpl.mjs";import{default as Cr}from"./packem_shared/fingerprintSchemaSources-DIYx5eO0.mjs";import{schemaFromIr as Or}from"./packem_shared/schemaFromIr-CByOxuZb.mjs";import{LUNORA_ERROR_CODES as Tr,validatorIrToJsonSchema as hr}from"./packem_shared/LUNORA_ERROR_CODES-CjACC-MQ.mjs";import{SDK_LANGUAGES as _r,SDK_TARGETS as Fr,generateSdk as Lr}from"./sdk/index.mjs";import{redact as Pr,secretKindOf as Dr}from"./packem_shared/redact-Cy14LEnc.mjs";import{default as yr}from"./packem_shared/emitDrizzleSchema-Dszoyymv.mjs";import{e as Gr}from"./packem_shared/server-qWq5nN-R.mjs";import{e as jr}from"./packem_shared/shard-BqfSKnmG.mjs";import{G as kr}from"./packem_shared/shared-DhqnD5R3.mjs";import{MESSAGE_SOLUTIONS as Kr,findSolutionByMessage as Vr}from"@lunora/errors";import{createCodegenProject as Qr,findTsconfig as qr,refreshCodegenProject as wr,tsconfigFingerprint as Jr}from"./packem_shared/createCodegenProject-DmXl8m_P.mjs";import{t as Xr,u as Zr,v as $r}from"./packem_shared/shard-runtime-C1P_uVye.mjs";import{emitApi as ro,emitCollections as oo,emitInternalApi as to}from"./packem_shared/emitApi-DWJW8Vu9.mjs";import{emitCrons as ao,emitScheduler as so,emitVectors as fo,emitWranglerCronTriggers as mo}from"./packem_shared/emitCrons-BvqxeNRr.mjs";import{emitDataModel as no}from"./packem_shared/emitDataModel-MjAOi3KM.mjs";import{emitFunctions as lo}from"./packem_shared/emitFunctions-CvMrX_cX.mjs";import{isTypedSchema as So}from"./packem_shared/isTypedSchema-CDv3pJB6.mjs";const e="0.0.0";export{C as AGENTS_FILENAME,E as CAPABILITY_PROBES,F as CONTAINERS_FILENAME,A as CodegenDiagnosticError,$e as DEFAULT_TARGET,B as FLAGS_FILENAME,kr as GENERATED_HEADER,Tr as LUNORA_ERROR_CODES,Kr as LUNORA_SOLUTION_RULES,re as MUTATORS_FILENAME,se as NOTIFY_FILENAME,we as OPENRPC_VERSION,fr as PROJECT_CONFIG_FILENAMES,Se as QUEUES_FILENAME,cr as SCHEMA_SNAPSHOT_FILENAME,t as SCHEMA_SNAPSHOT_VERSION,_r as SDK_LANGUAGES,Fr as SDK_TARGETS,Me as SHAPES_FILENAME,Sr as SchemaSnapshotParseError,e as VERSION,Ue as WORKFLOWS_FILENAME,Ve as buildOpenApiDocument,Je as buildOpenRpcDocument,Er as buildSchemaSnapshot,b as capabilitiesUsedBy,Qr as createCodegenProject,y as createTargetScope,n as describeErrorLevelFindings,v as diagnosticAt,i as diffSchemaSnapshots,N as discoverAgents,I as discoverAuthApiCalls,L as discoverContainers,P as discoverCrons,k as discoverFlags,K as discoverFunctions,z as discoverHttpRoutes,q as discoverHyperdriveCalls,J as discoverInserts,X as discoverMaskProcedures,$ as discoverMigrations,oe as discoverMutators,ie as discoverNondeterministicCalls,fe as discoverNotifyCalls,me as discoverNotifyChannels,de as discoverNotifyConfig,le as discoverQueries,Ee as discoverQueues,Ae as discoverR2sqlCalls,Ne as discoverRlsMetadata,ge as discoverRlsProcedures,Re as discoverSandboxUsage,he as discoverSchema,Pe as discoverShapes,be as discoverStorageRulesMetadata,Ge as discoverWorkflows,Xr as emitAgents,ro as emitApi,je as emitApp,oo as emitCollections,Zr as emitContainers,ao as emitCrons,no as emitDataModel,yr as emitDrizzleSchema,lo as emitFunctions,to as emitInternalApi,ze as emitOpenApi,Qe as emitOpenApiModule,Ye as emitOpenRpc,Xe as emitOpenRpcModule,so as emitScheduler,Gr as emitServer,jr as emitShard,fo as emitVectors,$r as emitWorkflows,mo as emitWranglerCronTriggers,c as errorAdvisoryNames,l as errorPlatformDiagnosticNames,ur as evaluateSchemaDrift,mr as findCodegenConfigFile,Vr as findLunoraSolution,dr as findProjectConfigFile,qr as findTsconfig,Cr as fingerprintSchemaSources,U as foldCapabilitySignals,f as formatAdvisories,Lr as generateSdk,Ar as indexReferencesOf,ke as isD1GlobalTable,We as isHyperdriveGlobalTable,R as isTestPath,So as isTypedSchema,m as lintSchema,T as listLunoraSourceFiles,ir as loadProjectConfig,G as mayReadCapabilityContext,vr as parseSchemaSnapshot,er as platformMatrixIds,pr as projectConfigCandidatePaths,ne as readPackageDependencies,ar as readProjectConfigLiterals,rr as readProjectTarget,_e as readServiceBindings,Pr as redact,wr as refreshCodegenProject,or as resolveCodegenTarget,Fe as resolveServiceBindings,lr as runCodegen,Or as schemaFromIr,Dr as secretKindOf,a as serializeSchemaSnapshot,x as sortedUniqueNames,H as sourceCapabilitySignals,d as toAdvisorContext,Jr as tsconfigFingerprint,hr as validatorIrToJsonSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as n,I as p,a as o,g as d,d as c,h as f,i as m,p as I,r as T,f as y,b as E,c as O,e as A,s as l,u as v,v as P}from"./shared-
|
|
1
|
+
import{G as n,I as p,a as o,g as d,d as c,h as f,i as m,p as I,r as T,f as y,b as E,c as O,e as A,s as l,u as v,v as P}from"./shared-DhqnD5R3.mjs";import"./parse-validator-BisfC8bR.mjs";import"./reserved-words-CW1QFbTd.mjs";import"./LUNORA_ERROR_CODES-CjACC-MQ.mjs";import"./dispatch-namespace-DwTjD7BU.mjs";export{n as GENERATED_HEADER,p as IMPORT_PATH_RE,o as assertIdentifier,d as assertPropertyIdentifier,c as baseSpecifiers,f as isOptionalOnInsert,m as isSensitiveFunction,I as pascalCase,T as renderArgsType,y as renderInsertInterface,E as renderNamespaceTree,O as renderObjectKey,A as renderPropertyKey,l as sensitiveArgNamesOf,v as unwrapOptional,P as validatorToType};
|
package/dist/packem_shared/{MUTATORS_FILENAME-DlSftsvY.mjs → MUTATORS_FILENAME-D9WbOFm7.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as E}from"node:fs";import{join as y}from"node:path";import{Node as o,SyntaxKind as l}from"ts-morph";import{diagnosticAt as I}from"./CodegenDiagnosticError-BUXlG3P-.mjs";import{b as M}from"./module-specifiers-BctA0m_p.mjs";import{p as A}from"./parse-validator-BisfC8bR.mjs";import{findObjectProperty as c,unwrapExpression as d,isConstDeclaration as P}from"./isTestPath-JdN4KXhV.mjs";import{g as b,i as D,d as g,h as O}from"./attribution-CTMkuBkn.mjs";import{u as h}from"./unwrap-handler-return-
|
|
1
|
+
import{existsSync as E}from"node:fs";import{join as y}from"node:path";import{Node as o,SyntaxKind as l}from"ts-morph";import{diagnosticAt as I}from"./CodegenDiagnosticError-BUXlG3P-.mjs";import{b as M}from"./module-specifiers-BctA0m_p.mjs";import{p as A}from"./parse-validator-BisfC8bR.mjs";import{findObjectProperty as c,unwrapExpression as d,isConstDeclaration as P}from"./isTestPath-JdN4KXhV.mjs";import{g as b,i as D,d as g,h as O}from"./attribution-CTMkuBkn.mjs";import{u as h}from"./unwrap-handler-return-c2s2-nk9.mjs";const w="mutators.ts",x=M,z=r=>{const e=r.getSymbol();if(!e)return r.getText()==="defineMutator";for(const t of e.getDeclarations())if(o.isImportSpecifier(t))return x(t.getImportDeclaration().getModuleSpecifierValue())?t.getNameNode().getText()==="defineMutator":!1;return!1},C=r=>{const e=r.getSymbol();if(!e)return!1;for(const t of e.getDeclarations()){if(!o.isNamespaceImport(t))continue;const i=t.getFirstAncestorByKind(l.ImportDeclaration);return i!==void 0&&x(i.getModuleSpecifierValue())}return!1},N=r=>{if(o.isIdentifier(r))return z(r);if(o.isPropertyAccessExpression(r)){const e=r.getExpression();return r.getName()==="defineMutator"&&o.isIdentifier(e)&&C(e)}return!1},S=r=>{const e=r.getArguments()[0];return e&&o.isObjectLiteralExpression(e)?e:void 0},m=new WeakMap,p=r=>{let e=m.get(r.compilerNode);if(e===void 0){const t=r.getNameNode(),i=t?.getText();e=r.getSourceFile().getDescendantsOfKind(l.Identifier).filter(s=>s!==t&&s.getText()===i&&g(s)?.compilerNode===r.compilerNode).length===1&&O(r)===void 0,m.set(r.compilerNode,e)}return e},f=r=>{const e=o.isIdentifier(r)?g(r):void 0,t=o.isSourceFile(e?.getParent())||o.isSourceFile(e?.getParent()?.getParent()?.getParent());if(e===void 0||e.getSourceFile()!==r?.getSourceFile()||!t)return;if(o.isFunctionDeclaration(e))return e.hasBody()&&p(e)?e:void 0;const i=P(e)?d(e.getInitializer()):void 0;return(o.isArrowFunction(i)||o.isFunctionExpression(i))&&o.isVariableDeclaration(e)&&p(e)?i:void 0},G=r=>{const e=r.getInitializer();if(!o.isCallExpression(e)||!N(e.getExpression()))return;const t=c(S(e),"server");if(o.isMethodDeclaration(t))return t;if(o.isShorthandPropertyAssignment(t))return f(t.getNameNode());const i=o.isPropertyAssignment(t)?d(t.getInitializer()):void 0;return o.isArrowFunction(i)||o.isFunctionExpression(i)?i:f(i)},T=r=>{const e=c(r,"args");if(!e||!o.isPropertyAssignment(e))return{};const t=e.getInitializer();return t&&o.isObjectLiteralExpression(t)?A(t):{}},L=r=>{const e=c(r,"server");if(!e||!o.isPropertyAssignment(e))return"unknown";const t=e.getInitializer();return!t||!(o.isArrowFunction(t)||o.isFunctionExpression(t))?"unknown":h(t)},j=r=>{const e=c(r,"owner");if(!e||!o.isPropertyAssignment(e))return;const t=e.getInitializer();return t&&o.isStringLiteral(t)?t.getLiteralValue():void 0},R=r=>{const e=[];for(const t of r.getVariableDeclarations()){if(!t.isExported())continue;const i=t.getInitializer();if(i?.getKind()!==l.CallExpression)continue;const n=i,s=n.getExpression();if(!N(s))continue;const a=t.getNameNode();if(!o.isIdentifier(a))throw I(a,"defineMutator exports must be plain named exports (no destructuring)");const u=S(n);for(const v of b(t).filter(F=>D(F)))e.push({args:T(u),exportName:v,filePath:"mutators",line:n.getStartLineNumber(),owner:j(u),returnType:L(u)})}return e},J=(r,e)=>{const t=y(e,w);if(!E(t))return[];const i=r.getSourceFile(t)??r.addSourceFileAtPath(t),n=R(i);return n.sort((s,a)=>s.exportName.localeCompare(a.exportName)),n};export{w as MUTATORS_FILENAME,J as discoverMutators,N as isDefineMutatorCallee,S as mutatorLiteral,G as mutatorServerImplOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as N}from"node:fs";import{join as F}from"node:path";import{SyntaxKind as u,Node as r,VariableDeclarationKind as O}from"ts-morph";import{listLunoraSourceFiles as m,lunoraRelativePath as A,descendantsOfKind as h,findObjectProperty as g,defaultExportExpression as D,handlerOf as I}from"./isTestPath-JdN4KXhV.mjs";import{j as T,h as C}from"./attribution-CTMkuBkn.mjs";import{a as l}from"./context-root-
|
|
1
|
+
import{existsSync as N}from"node:fs";import{join as F}from"node:path";import{SyntaxKind as u,Node as r,VariableDeclarationKind as O}from"ts-morph";import{listLunoraSourceFiles as m,lunoraRelativePath as A,descendantsOfKind as h,findObjectProperty as g,defaultExportExpression as D,handlerOf as I}from"./isTestPath-JdN4KXhV.mjs";import{j as T,h as C}from"./attribution-CTMkuBkn.mjs";import{a as l}from"./context-root-DtpwprsY.mjs";import{c as k}from"./classify-procedure-call-DtqiTjPg.mjs";const L="notify.ts",M=new Set(["chat","inApp","send","webhook"]),x=new Set(["broadcast","send"]),w=e=>{const s=e.getInitializer();if(!s||!r.isCallExpression(s))return;const t=k(s);if(!t)return;const i=I(s,t.receiver);return i?{exportName:C(e)??e.getName(),handler:i,kind:t.kind}:void 0},y=e=>{const s=[];for(const t of T(e)){const i=w(t);i&&s.push(i)}return s},E=e=>l(e,["notify"])?"notify":l(e,["push"])||l(e,["notify","push"])?"push":void 0,_=e=>{if(!r.isPropertyAccessExpression(e))return;const s=e.getName(),t=E(e.getExpression());if(t==="notify"&&M.has(s))return`ctx.notify.${s}`;if(t==="push"&&x.has(s))return`ctx.push.${s}`},j=e=>r.isPropertyAccessExpression(e)?E(e.getExpression())==="push"&&x.has(e.getName()):!1,ee=(e,s)=>{const t=[];for(const i of m(s)){const o=e.getSourceFile(i)??e.addSourceFileAtPath(i),n=A(s,i);for(const c of y(o))if(!(c.kind!=="query"&&c.kind!=="mutation"))for(const a of h(c.handler,u.PropertyAccessExpression)){const f=_(a);f!==void 0&&t.push({callee:f,exportName:c.exportName,file:n,kind:c.kind,line:a.getStartLineNumber()})}}return t},R=(e,s)=>{for(const t of m(s)){const i=e.getSourceFile(t)??e.addSourceFileAtPath(t);for(const o of y(i))for(const n of h(o.handler,u.PropertyAccessExpression))if(j(n))return!0}return!1},U=new Set(["@lunora/notify"]),V=e=>{const s=e.getSymbol();if(!s)return e.getText()==="defineNotify";for(const t of s.getDeclarations())if(r.isImportSpecifier(t))return U.has(t.getImportDeclaration().getModuleSpecifierValue())?t.getNameNode().getText()==="defineNotify":!1;return!1},P=(e,s=new Set)=>{const t=D(e);if(!t)return;if(!r.isIdentifier(t))return t;const i=t.getSymbol();if(!i?.isAlias())return t;const o=i.getAliasedSymbol();if(!o)return t;const n=o.getDeclarations().find(a=>r.isExportAssignment(a));if(!n)return t;const c=n.getSourceFile();if(!s.has(c.getFilePath()))return P(c,s.add(c.getFilePath()))},z=new Set(["%=","&&=","&=","**=","+=","-=","/=","<<=","=",">>=",">>>=","??=","^=","|=","||="]),p=e=>{const s=e.getSymbol();return s?.getAliasedSymbol()?.getDeclarations()[0]??s?.getDeclarations()[0]},S=e=>{if(r.isIdentifier(e))return e;if(r.isPropertyAccessExpression(e)||r.isElementAccessExpression(e))return S(e.getExpression())},d=(e,s)=>{const t=S(e);return t!==void 0&&p(t)===s},H=(e,s)=>{const t=e.getExpression();if(!r.isPropertyAccessExpression(t))return!1;const i=t.getName(),o=t.getExpression(),n=r.isIdentifier(o)?o.getText():"";if(!((i==="assign"||i==="defineProperty"||i==="defineProperties")&&n==="Object"||i==="set"&&n==="Reflect"))return!1;const a=e.getArguments()[0];return a!==void 0&&r.isIdentifier(a)&&p(a)===s},K=(e,s)=>{if(r.isBinaryExpression(e))return z.has(e.getOperatorToken().getText())&&d(e.getLeft(),s);if(r.isDeleteExpression(e))return d(e.getExpression(),s);if(r.isPrefixUnaryExpression(e)||r.isPostfixUnaryExpression(e)){const t=e.getOperatorToken();return(t===u.PlusPlusToken||t===u.MinusMinusToken)&&d(e.getOperand(),s)}return r.isCallExpression(e)?H(e,s):!1},W=(e,s)=>{const t=p(e);return t===void 0?!0:s.some(i=>i.getDescendants().some(o=>K(o,t)))},Y=e=>{if(r.isObjectLiteralExpression(e))return e;if(!r.isIdentifier(e))return;const s=e.getSymbol(),t=s?.getAliasedSymbol()?.getDeclarations()??s?.getDeclarations()??[];for(const i of t){if(!r.isVariableDeclaration(i))continue;const o=i.getInitializer();if(!o||!r.isObjectLiteralExpression(o))continue;const n=i.getParent();if(!r.isVariableDeclarationList(n)||n.getDeclarationKind()!==O.Const)continue;const c=[i.getSourceFile(),e.getSourceFile()].filter((a,f,b)=>b.findIndex(v=>v.getFilePath()===a.getFilePath())===f);if(!W(e,c))return o}},B=(e,s)=>{const t=F(s,L);if(!N(t))return;const i=e.getSourceFile(t)??e.addSourceFileAtPath(t),o=P(i);if(!o||!r.isCallExpression(o))return{hasFcm:!0,hasWebPush:!0};const n=o.getExpression(),c=r.isIdentifier(n)&&V(n)?o.getArguments()[0]:void 0,a=c===void 0?void 0:Y(c);return!a||a.getProperties().some(f=>r.isSpreadAssignment(f))?{hasFcm:!0,hasWebPush:!0}:{hasFcm:g(a,"fcm")!==void 0,hasWebPush:g(a,"webPush")!==void 0}},te=(e,s)=>{const t=B(e,s);return t===void 0?void 0:{...t,usesPush:R(e,s)}};export{L as NOTIFY_FILENAME,ee as discoverNotifyCalls,B as discoverNotifyChannels,te as discoverNotifyConfig};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{m}from"./modules-DEBCI7Gm.mjs";import{r as u}from"./json-data-Chfs2Cz5.mjs";import{validatorIrToJsonSchema as p,objectSchema as l,LUNORA_ERROR_CODES as d}from"./LUNORA_ERROR_CODES-CjACC-MQ.mjs";import{G as h}from"./shared-
|
|
1
|
+
import{m}from"./modules-DEBCI7Gm.mjs";import{r as u}from"./json-data-Chfs2Cz5.mjs";import{validatorIrToJsonSchema as p,objectSchema as l,LUNORA_ERROR_CODES as d}from"./LUNORA_ERROR_CODES-CjACC-MQ.mjs";import{G as h}from"./shared-DhqnD5R3.mjs";import{s as i}from"./dispatch-namespace-DwTjD7BU.mjs";const R="1.3.2",g={description:"Result is TS-inferred from the function's return type (no `.output()` declared); best-effort — any JSON."},O=(e,r)=>e==="stream"?`Open the \`stream\` \`${r}\` over the Lunora WebSocket. It yields chunks rather than one result, so its \`result\` schema is a placeholder.`:`Invoke the \`${e}\` \`${r}\` over the Lunora RPC envelope (POST /_lunora/rpc, body \`{ "functionPath": "${r}", "args": { … } }\`).`,S=(e,r)=>{const o=`${i(e.filePath)}:${e.exportName}`;return{description:O(e.kind,o),errors:d.map((s,a)=>({code:-32e3-a,data:{code:s},message:s})),name:o,params:[{description:"The function's argument object (the RPC envelope's `args`).",name:"args",required:Object.keys(e.args).length>0,schema:l(e.args)}],result:{name:"result",schema:e.output&&e.kind!=="stream"?p(e.output):g},summary:`${e.kind}: ${o}`,"x-lunora-function-kind":e.kind,...e.description?{"x-lunora-description":e.description}:{},"x-tags":[{name:r}]}},v=e=>{const r=e.version??"0.0.0",n=e.functions.filter(t=>t.visibility!=="internal"),o=e.modules??[],s=n.map(t=>S(t,m(o,t.filePath))).toSorted((t,c)=>t.name.localeCompare(c.name));return{info:{description:"Auto-generated from @lunora/values-typed functions by @lunora/codegen. Do not edit — run `lunora codegen` to regenerate.",title:"Lunora RPC",version:r},methods:s,openrpc:R}},E=e=>`${JSON.stringify(v(e),void 0,2)}
|
|
2
2
|
`,N=e=>`${h}export const openRpcSpec = ${u(e,"Record<string, unknown>")};
|
|
3
3
|
`;export{R as OPENRPC_VERSION,v as buildOpenRpcDocument,E as emitOpenRpc,N as emitOpenRpcModule};
|