@lunora/codegen 1.0.0-alpha.89 → 1.0.0-alpha.90
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 +94 -94
- package/dist/index.d.ts +94 -94
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -393,7 +393,7 @@ interface FunctionIR {
|
|
|
393
393
|
/**
|
|
394
394
|
* Set by the `.expose({ rest: true })` builder modifier (plan 167). When
|
|
395
395
|
* `rest` is `true` the function is published on the public REST surface, so the
|
|
396
|
-
* OpenAPI emitter describes it as a real `/_lunora/rest
|
|
396
|
+
* OpenAPI emitter describes it as a real `/_lunora/rest/<namespace>/<fn>` path
|
|
397
397
|
* (the single source of truth the runtime router also derives from). Absent →
|
|
398
398
|
* RPC-only (the default; not on the REST surface).
|
|
399
399
|
*
|
|
@@ -406,7 +406,7 @@ interface FunctionIR {
|
|
|
406
406
|
cache?: ExposeCacheIR;
|
|
407
407
|
rest?: boolean;
|
|
408
408
|
};
|
|
409
|
-
/** Path relative to
|
|
409
|
+
/** Path relative to `<projectRoot>/lunora/` without extension, e.g. "messages". */
|
|
410
410
|
filePath: string;
|
|
411
411
|
kind: "action" | "mutation" | "query" | "stream";
|
|
412
412
|
/**
|
|
@@ -427,7 +427,7 @@ interface FunctionIR {
|
|
|
427
427
|
*/
|
|
428
428
|
output?: ValidatorIR;
|
|
429
429
|
/**
|
|
430
|
-
* Serialized TS source for the handler's return type, with `Promise
|
|
430
|
+
* Serialized TS source for the handler's return type, with `Promise<T>`
|
|
431
431
|
* unwrapped so callers see `T` directly. Defaults to `"unknown"` when
|
|
432
432
|
* ts-morph cannot resolve the type (typically because the consuming
|
|
433
433
|
* project lacks a tsconfig that can reach `@lunora/server`).
|
|
@@ -449,7 +449,7 @@ interface FunctionIR {
|
|
|
449
449
|
interface MigrationIR {
|
|
450
450
|
/** Export binding name, used to reference the module member in generated imports. */
|
|
451
451
|
exportName: string;
|
|
452
|
-
/** Path relative to
|
|
452
|
+
/** Path relative to `<projectRoot>/lunora/` without extension, e.g. "migrations". */
|
|
453
453
|
filePath: string;
|
|
454
454
|
/** Stable migration id — the registry key and per-shard run-state key. */
|
|
455
455
|
id: string;
|
|
@@ -468,12 +468,12 @@ interface ShapeIR {
|
|
|
468
468
|
/**
|
|
469
469
|
* The shape's `args` validator map — its partition selector. Lifted so
|
|
470
470
|
* `_generated/collections.ts` can type the selector a caller passes instead of
|
|
471
|
-
* widening it to `Record
|
|
471
|
+
* widening it to `Record<string, unknown>`. `{}` for a parameterless shape.
|
|
472
472
|
*/
|
|
473
473
|
args: Record<string, ValidatorIR>;
|
|
474
474
|
/** Export binding name — the shape's registry key and import member. */
|
|
475
475
|
exportName: string;
|
|
476
|
-
/** Path relative to
|
|
476
|
+
/** Path relative to `<projectRoot>/lunora/` without extension — always `"shapes"`. */
|
|
477
477
|
filePath: string;
|
|
478
478
|
/**
|
|
479
479
|
* The `table` string literal from the `defineShape({ table })` call, lifted
|
|
@@ -519,18 +519,18 @@ interface EnvIR {
|
|
|
519
519
|
interface MutatorIR {
|
|
520
520
|
/**
|
|
521
521
|
* The mutator's `args` validator map, parsed exactly as a procedure's is, so
|
|
522
|
-
* the emitted `api.mutators
|
|
522
|
+
* the emitted `api.mutators.<name>` reference carries the arg type a client
|
|
523
523
|
* `defineMutator` infers instead of restating. `{}` for a parameterless
|
|
524
524
|
* mutator (or one whose `args` isn't an inline object literal).
|
|
525
525
|
*/
|
|
526
526
|
args: Record<string, ValidatorIR>;
|
|
527
527
|
/** Export binding name — the mutator's registry key and import member. */
|
|
528
528
|
exportName: string;
|
|
529
|
-
/** Path relative to
|
|
529
|
+
/** Path relative to `<projectRoot>/lunora/` without extension — always `"mutators"`. */
|
|
530
530
|
filePath: string;
|
|
531
531
|
/**
|
|
532
532
|
* Serialized TS source for the authoritative `server` impl's return type,
|
|
533
|
-
* `Promise
|
|
533
|
+
* `Promise<T>` unwrapped. `"unknown"` when ts-morph can't resolve it — same
|
|
534
534
|
* contract as {@link FunctionIR.returnType}.
|
|
535
535
|
*/
|
|
536
536
|
returnType: string;
|
|
@@ -807,7 +807,7 @@ interface FlagsIR {
|
|
|
807
807
|
interface WorkflowCallIR {
|
|
808
808
|
/** Export binding name of the function performing the call, e.g. `create`. */
|
|
809
809
|
exportName: string;
|
|
810
|
-
/** Source file relative to
|
|
810
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension (the api namespace). */
|
|
811
811
|
file: string;
|
|
812
812
|
/** 1-based line of the `get(...)` call. */
|
|
813
813
|
line: number;
|
|
@@ -823,7 +823,7 @@ interface WorkflowCallIR {
|
|
|
823
823
|
interface QueryReadIR {
|
|
824
824
|
/** Exported procedure the read sits in, or `""` at module scope. */
|
|
825
825
|
exportName: string;
|
|
826
|
-
/** Source file relative to
|
|
826
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
827
827
|
file: string;
|
|
828
828
|
/**
|
|
829
829
|
* True when the chain's `.filter()` predicate compares `_id`
|
|
@@ -842,7 +842,7 @@ interface QueryReadIR {
|
|
|
842
842
|
table: string;
|
|
843
843
|
}
|
|
844
844
|
/**
|
|
845
|
-
* A `ctx.authApi
|
|
845
|
+
* A `ctx.authApi.<method>(...)` call discovered in a function body, attributed
|
|
846
846
|
* to the exported function (and its file = api namespace) that performs it.
|
|
847
847
|
* Structurally identical to `AdvisorAuthApiCall` so it passes straight through
|
|
848
848
|
* to the advisor lint without conversion, exactly as `InsertWriteIR` does for
|
|
@@ -851,7 +851,7 @@ interface QueryReadIR {
|
|
|
851
851
|
interface AuthApiCallIR {
|
|
852
852
|
/** Export binding name of the function performing the call, e.g. "createOrg". */
|
|
853
853
|
exportName: string;
|
|
854
|
-
/** Source file relative to
|
|
854
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
855
855
|
file: string;
|
|
856
856
|
/** True when the call's argument object includes a `headers` property. */
|
|
857
857
|
hasHeaders: boolean;
|
|
@@ -870,7 +870,7 @@ interface AuthApiCallIR {
|
|
|
870
870
|
interface InsertWriteIR {
|
|
871
871
|
/** Export binding name of the function performing the insert, e.g. "send". */
|
|
872
872
|
exportName: string;
|
|
873
|
-
/** Source file relative to
|
|
873
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension (the api namespace). */
|
|
874
874
|
file: string;
|
|
875
875
|
/** 1-based line of the `insert(...)` call. */
|
|
876
876
|
line: number;
|
|
@@ -891,7 +891,7 @@ interface NondeterministicCallIR {
|
|
|
891
891
|
callee: string;
|
|
892
892
|
/** Export binding name of the function performing the call, e.g. `sendMessage`. */
|
|
893
893
|
exportName: string;
|
|
894
|
-
/** Source file relative to
|
|
894
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension (the api namespace). */
|
|
895
895
|
file: string;
|
|
896
896
|
/** Which procedure kind the call lives in — only `query`/`mutation` handlers are recorded. */
|
|
897
897
|
kind: "mutation" | "query";
|
|
@@ -928,7 +928,7 @@ interface R2sqlCallIR {
|
|
|
928
928
|
interface RlsProcedureIR {
|
|
929
929
|
/** Export binding name of the procedure (e.g. `listDocuments`). */
|
|
930
930
|
exportName: string;
|
|
931
|
-
/** Source file relative to
|
|
931
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
932
932
|
file: string;
|
|
933
933
|
/**
|
|
934
934
|
* Table names extracted from the `rls(policies)` array literal. Empty when the
|
|
@@ -954,7 +954,7 @@ interface RlsProcedureIR {
|
|
|
954
954
|
interface MaskProcedureIR {
|
|
955
955
|
/** Export binding name of the procedure (e.g. `listUsers`). */
|
|
956
956
|
exportName: string;
|
|
957
|
-
/** Source file relative to
|
|
957
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
958
958
|
file: string;
|
|
959
959
|
/**
|
|
960
960
|
* `(table, column)` pairs this procedure's `mask(policies)` object literal
|
|
@@ -1015,9 +1015,9 @@ interface MaskMetadataIR {
|
|
|
1015
1015
|
interface MaskStrategyIR {
|
|
1016
1016
|
/** Masked column name. */
|
|
1017
1017
|
column: string;
|
|
1018
|
-
/** Export binding name of the procedure whose `.use(mask(...))` chain declared this column, or `"
|
|
1018
|
+
/** Export binding name of the procedure whose `.use(mask(...))` chain declared this column, or `"<module>"` when declared at file scope. */
|
|
1019
1019
|
exportName: string;
|
|
1020
|
-
/** Source file relative to
|
|
1020
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1021
1021
|
file: string;
|
|
1022
1022
|
/** 1-based line of the masked column's strategy property. */
|
|
1023
1023
|
line: number;
|
|
@@ -1092,7 +1092,7 @@ interface StorageRulesMetadataIR {
|
|
|
1092
1092
|
rules: StorageRuleIR[];
|
|
1093
1093
|
}
|
|
1094
1094
|
/**
|
|
1095
|
-
* A typed REST route declared with the `httpRoute
|
|
1095
|
+
* A typed REST route declared with the `httpRoute.<verb>("/path")…` builder in
|
|
1096
1096
|
* `@lunora/server` and mounted on `httpRouter()`. Captured statically from the
|
|
1097
1097
|
* builder chain so the OpenAPI emitter can render a real `paths` entry: the verb
|
|
1098
1098
|
* + path become the operation's method + URL, and the accumulated validator maps
|
|
@@ -1106,13 +1106,13 @@ interface HttpRouteIR {
|
|
|
1106
1106
|
* handler yields — inferred from the handler via the type checker. Present
|
|
1107
1107
|
* only when {@link HttpRouteIR.stream} is `true`; `"unknown"` when the
|
|
1108
1108
|
* checker can't resolve enough context. Feeds the emitted
|
|
1109
|
-
* `HttpStreamRef
|
|
1109
|
+
* `HttpStreamRef<Chunk, …>` so the chunk type flows to the client.
|
|
1110
1110
|
* @experimental Part of the HTTP-SSE stream surface (the `httpStreams.*` emission).
|
|
1111
1111
|
*/
|
|
1112
1112
|
chunkType?: string;
|
|
1113
1113
|
/** Export binding name of the route handler (used only for diagnostics / dedupe). */
|
|
1114
1114
|
exportName: string;
|
|
1115
|
-
/** Path relative to
|
|
1115
|
+
/** Path relative to `<projectRoot>/lunora/` without extension, e.g. "http". */
|
|
1116
1116
|
filePath: string;
|
|
1117
1117
|
/** HTTP verb the route binds to (uppercased), e.g. `"GET"`. */
|
|
1118
1118
|
method: string;
|
|
@@ -1120,7 +1120,7 @@ interface HttpRouteIR {
|
|
|
1120
1120
|
output?: ValidatorIR;
|
|
1121
1121
|
/** `v.*` validators decoding the hono path params (`.params({...})`), keyed by `:name`. */
|
|
1122
1122
|
params: Record<string, ValidatorIR>;
|
|
1123
|
-
/** The route path passed to `httpRoute
|
|
1123
|
+
/** The route path passed to `httpRoute.<verb>(path)`, e.g. `/api/todos/:id`. */
|
|
1124
1124
|
path: string;
|
|
1125
1125
|
/** `v.*` validators decoding the URL query string (`.searchParams({...})`), keyed by name. */
|
|
1126
1126
|
searchParams: Record<string, ValidatorIR>;
|
|
@@ -1161,7 +1161,7 @@ interface ProcedureMiddlewareIR {
|
|
|
1161
1161
|
exportName: string;
|
|
1162
1162
|
/** `true` when the handler fans work out to a privileged, cost-bearing dispatch surface (scheduler `runAfter`/`runAt`, a queue producer send, or a workflow create). Feeds the privileged-fanout lint. `undefined` when `analyzableBody` is `false`. */
|
|
1163
1163
|
fanOut?: boolean;
|
|
1164
|
-
/** Source file relative to
|
|
1164
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1165
1165
|
file: string;
|
|
1166
1166
|
/** `true` when the handler wraps work in `try`/`catch`. */
|
|
1167
1167
|
handlesErrors?: boolean;
|
|
@@ -1215,7 +1215,7 @@ interface ArgumentValidatorIR {
|
|
|
1215
1215
|
anyArgs: string[];
|
|
1216
1216
|
/** Export binding name of the procedure (e.g. `updateProfile`). */
|
|
1217
1217
|
exportName: string;
|
|
1218
|
-
/** Source file relative to
|
|
1218
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1219
1219
|
file: string;
|
|
1220
1220
|
/** 1-based line of the registration call, or `0` when unknown. */
|
|
1221
1221
|
line: number;
|
|
@@ -1234,7 +1234,7 @@ interface ConfigCallIR {
|
|
|
1234
1234
|
analyzable: boolean;
|
|
1235
1235
|
/** The factory function or constructor name at the call site, e.g. `createPayment` / `RateLimiter`. */
|
|
1236
1236
|
callee: string;
|
|
1237
|
-
/** Source file relative to
|
|
1237
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1238
1238
|
file: string;
|
|
1239
1239
|
/** 1-based line of the call site, or `0` when unknown. */
|
|
1240
1240
|
line: number;
|
|
@@ -1250,7 +1250,7 @@ interface ConfigCallIR {
|
|
|
1250
1250
|
* Structurally identical to `AdvisorSecretLiteral`.
|
|
1251
1251
|
*/
|
|
1252
1252
|
interface SecretLiteralIR {
|
|
1253
|
-
/** Source file relative to
|
|
1253
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1254
1254
|
file: string;
|
|
1255
1255
|
/** Heuristic that matched, e.g. `stripe_live_key` / `aws_access_key` / `pem_private_key` / `high_entropy`. */
|
|
1256
1256
|
kind: string;
|
|
@@ -1271,7 +1271,7 @@ interface SecretLiteralIR {
|
|
|
1271
1271
|
interface SqlInterpolationIR {
|
|
1272
1272
|
/** Export binding name of the procedure performing the `ctx.sql` call. */
|
|
1273
1273
|
exportName: string;
|
|
1274
|
-
/** Source file relative to
|
|
1274
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1275
1275
|
file: string;
|
|
1276
1276
|
/** 1-based line of the interpolation, or `0` when unknown. */
|
|
1277
1277
|
line: number;
|
|
@@ -1288,13 +1288,13 @@ interface SqlInterpolationIR {
|
|
|
1288
1288
|
interface ArgumentDerivedFetchIR {
|
|
1289
1289
|
/** Export binding name of the action performing the `ctx.fetch` call. */
|
|
1290
1290
|
exportName: string;
|
|
1291
|
-
/** Source file relative to
|
|
1291
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1292
1292
|
file: string;
|
|
1293
1293
|
/** 1-based line of the `ctx.fetch` call, or `0` when unknown. */
|
|
1294
1294
|
line: number;
|
|
1295
1295
|
}
|
|
1296
1296
|
/**
|
|
1297
|
-
* One `ctx.kv
|
|
1297
|
+
* One `ctx.kv.<method>(key, …)` call whose namespace key is derived from the
|
|
1298
1298
|
* handler's `args` with no server-side scoping — the `kv_unscoped_user_key_idor`
|
|
1299
1299
|
* lint input. Workers KV is a single flat namespace, so a key taken straight from
|
|
1300
1300
|
* request input lets any caller read, overwrite, or delete another user's entry
|
|
@@ -1306,7 +1306,7 @@ interface ArgumentDerivedFetchIR {
|
|
|
1306
1306
|
interface KvKeyAccessIR {
|
|
1307
1307
|
/** Export binding name of the procedure performing the `ctx.kv` access. */
|
|
1308
1308
|
exportName: string;
|
|
1309
|
-
/** Source file relative to
|
|
1309
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1310
1310
|
file: string;
|
|
1311
1311
|
/** 1-based line of the `ctx.kv` call, or `0` when unknown. */
|
|
1312
1312
|
line: number;
|
|
@@ -1333,7 +1333,7 @@ interface KvKeyAccessIR {
|
|
|
1333
1333
|
interface UnrestrictedWhereBranchIR {
|
|
1334
1334
|
/** Export binding name of the shape / policy the predicate belongs to. */
|
|
1335
1335
|
exportName: string;
|
|
1336
|
-
/** Source file relative to
|
|
1336
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1337
1337
|
file: string;
|
|
1338
1338
|
/** Which unrestricted form was returned. */
|
|
1339
1339
|
form: "empty-object" | "undefined";
|
|
@@ -1349,7 +1349,7 @@ interface OwnerFieldWriteIR {
|
|
|
1349
1349
|
exportName: string;
|
|
1350
1350
|
/** The identity column being written from `args` (e.g. `userId`). */
|
|
1351
1351
|
field: string;
|
|
1352
|
-
/** Source file relative to
|
|
1352
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1353
1353
|
file: string;
|
|
1354
1354
|
/** 1-based line of the `ctx.db` write call, or `0` when unknown. */
|
|
1355
1355
|
line: number;
|
|
@@ -1365,7 +1365,7 @@ interface OwnerFieldWriteIR {
|
|
|
1365
1365
|
visibility?: "internal" | "public";
|
|
1366
1366
|
}
|
|
1367
1367
|
/**
|
|
1368
|
-
* One `ctx.storage
|
|
1368
|
+
* One `ctx.storage.<bucket>.<method>(key, …)` call whose R2 object key is derived
|
|
1369
1369
|
* from the handler's `args` with no server-side scoping — the
|
|
1370
1370
|
* `storage_key_from_user_args` lint input. The bucket read/write/URL/delete methods
|
|
1371
1371
|
* key by their first argument, so an object key taken straight from request input is
|
|
@@ -1377,7 +1377,7 @@ interface OwnerFieldWriteIR {
|
|
|
1377
1377
|
interface StorageKeyAccessIR {
|
|
1378
1378
|
/** Export binding name of the procedure performing the storage call. */
|
|
1379
1379
|
exportName: string;
|
|
1380
|
-
/** Source file relative to
|
|
1380
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1381
1381
|
file: string;
|
|
1382
1382
|
/** 1-based line of the storage call, or `0` when unknown. */
|
|
1383
1383
|
line: number;
|
|
@@ -1393,7 +1393,7 @@ interface StorageKeyAccessIR {
|
|
|
1393
1393
|
visibility?: "internal" | "public";
|
|
1394
1394
|
}
|
|
1395
1395
|
/**
|
|
1396
|
-
* One `ctx.containers
|
|
1396
|
+
* One `ctx.containers.<exportName>.get(name, …)` call whose instance key is derived
|
|
1397
1397
|
* from the handler's `args` with no server-side scoping — the
|
|
1398
1398
|
* `container_instance_key_from_user_input` lint input. Each container definition's
|
|
1399
1399
|
* `.get(name)` accessor routes to one instance per `name`, so a key taken straight from
|
|
@@ -1406,7 +1406,7 @@ interface StorageKeyAccessIR {
|
|
|
1406
1406
|
interface ContainerKeyAccessIR {
|
|
1407
1407
|
/** Export binding name of the procedure performing the `ctx.containers` access. */
|
|
1408
1408
|
exportName: string;
|
|
1409
|
-
/** Source file relative to
|
|
1409
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1410
1410
|
file: string;
|
|
1411
1411
|
/** 1-based line of the `ctx.containers.*.get` call, or `0` when unknown. */
|
|
1412
1412
|
line: number;
|
|
@@ -1426,13 +1426,13 @@ interface ContainerKeyAccessIR {
|
|
|
1426
1426
|
interface AiRawRunIR {
|
|
1427
1427
|
/** Export binding name of the procedure performing the `ctx.ai.run` call. */
|
|
1428
1428
|
exportName: string;
|
|
1429
|
-
/** Source file relative to
|
|
1429
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1430
1430
|
file: string;
|
|
1431
1431
|
/** 1-based line of the `ctx.ai.run` call, or `0` when unknown. */
|
|
1432
1432
|
line: number;
|
|
1433
1433
|
}
|
|
1434
1434
|
/**
|
|
1435
|
-
* One `ctx.vectors
|
|
1435
|
+
* One `ctx.vectors.<method>(indexName, input)` call whose `input.namespace` is derived
|
|
1436
1436
|
* from the handler's `args` with no server-side scoping — the
|
|
1437
1437
|
* `vectors_namespace_from_user_input` lint input. A Vectorize namespace partitions one
|
|
1438
1438
|
* index into isolated sub-collections, so a namespace taken straight from request input
|
|
@@ -1444,7 +1444,7 @@ interface AiRawRunIR {
|
|
|
1444
1444
|
interface VectorNamespaceAccessIR {
|
|
1445
1445
|
/** Export binding name of the procedure performing the `ctx.vectors` access. */
|
|
1446
1446
|
exportName: string;
|
|
1447
|
-
/** Source file relative to
|
|
1447
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1448
1448
|
file: string;
|
|
1449
1449
|
/** 1-based line of the `ctx.vectors` call, or `0` when unknown. */
|
|
1450
1450
|
line: number;
|
|
@@ -1464,7 +1464,7 @@ interface VectorNamespaceAccessIR {
|
|
|
1464
1464
|
interface MailRecipientAccessIR {
|
|
1465
1465
|
/** Export binding name of the procedure performing the `ctx.mail`/`ctx.email` call. */
|
|
1466
1466
|
exportName: string;
|
|
1467
|
-
/** Source file relative to
|
|
1467
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1468
1468
|
file: string;
|
|
1469
1469
|
/** 1-based line of the `ctx.mail`/`ctx.email` call, or `0` when unknown. */
|
|
1470
1470
|
line: number;
|
|
@@ -1472,7 +1472,7 @@ interface MailRecipientAccessIR {
|
|
|
1472
1472
|
method: string;
|
|
1473
1473
|
}
|
|
1474
1474
|
/**
|
|
1475
|
-
* One `ctx.browser
|
|
1475
|
+
* One `ctx.browser.<method>(url, …)` call whose navigation URL (`arguments[0]`)
|
|
1476
1476
|
* is derived from the handler's `args` with no server-side scoping — the
|
|
1477
1477
|
* `browser_user_url_without_allowlist` lint input. The lint additionally
|
|
1478
1478
|
* cross-references `createBrowser` config-call evidence to suppress findings
|
|
@@ -1482,7 +1482,7 @@ interface MailRecipientAccessIR {
|
|
|
1482
1482
|
interface BrowserUrlAccessIR {
|
|
1483
1483
|
/** Export binding name of the procedure performing the `ctx.browser` call. */
|
|
1484
1484
|
exportName: string;
|
|
1485
|
-
/** Source file relative to
|
|
1485
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1486
1486
|
file: string;
|
|
1487
1487
|
/** 1-based line of the `ctx.browser` call, or `0` when unknown. */
|
|
1488
1488
|
line: number;
|
|
@@ -1490,8 +1490,8 @@ interface BrowserUrlAccessIR {
|
|
|
1490
1490
|
method: string;
|
|
1491
1491
|
}
|
|
1492
1492
|
/**
|
|
1493
|
-
* One runtime container-override call: a
|
|
1494
|
-
* launch override, or a
|
|
1493
|
+
* One runtime container-override call: a `<handle>.start({ enableInternet: true, … })`
|
|
1494
|
+
* launch override, or a `<handle>.egress.<method>(...)` runtime firewall mutation
|
|
1495
1495
|
* (`allow` / `deny` / `setAllowed`) — the `container_start_enable_internet_override`
|
|
1496
1496
|
* and `container_runtime_egress_relaxation` lint input. Both shapes re-open network
|
|
1497
1497
|
* access the static `defineContainer` declaration (and its `container_public_internet`
|
|
@@ -1503,7 +1503,7 @@ interface ContainerOverrideIR {
|
|
|
1503
1503
|
detail: string;
|
|
1504
1504
|
/** Export binding name of the procedure performing the call. */
|
|
1505
1505
|
exportName: string;
|
|
1506
|
-
/** Source file relative to
|
|
1506
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1507
1507
|
file: string;
|
|
1508
1508
|
/** Which override shape matched. */
|
|
1509
1509
|
kind: "egress_relaxation" | "enable_internet";
|
|
@@ -1526,7 +1526,7 @@ interface ContainerOverrideIR {
|
|
|
1526
1526
|
interface ImageDeliveryUrlAccessIR {
|
|
1527
1527
|
/** Export binding name of the procedure performing the `buildImageDeliveryUrl` call. */
|
|
1528
1528
|
exportName: string;
|
|
1529
|
-
/** Source file relative to
|
|
1529
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1530
1530
|
file: string;
|
|
1531
1531
|
/** 1-based line of the `buildImageDeliveryUrl` call, or `0` when unknown. */
|
|
1532
1532
|
line: number;
|
|
@@ -1552,7 +1552,7 @@ interface AuthConfigIR {
|
|
|
1552
1552
|
emailPasswordEnabled: boolean;
|
|
1553
1553
|
/** Export binding name enclosing the `createAuth(...)` call. */
|
|
1554
1554
|
exportName: string;
|
|
1555
|
-
/** Source file relative to
|
|
1555
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1556
1556
|
file: string;
|
|
1557
1557
|
/** 1-based line of the `createAuth(...)` call, or `0` when unknown. */
|
|
1558
1558
|
line: number;
|
|
@@ -1584,7 +1584,7 @@ interface RatelimitKeySelectorIR {
|
|
|
1584
1584
|
callee: string;
|
|
1585
1585
|
/** Export binding name of the procedure whose `.use(...)` chain carries the call. */
|
|
1586
1586
|
exportName: string;
|
|
1587
|
-
/** Source file relative to
|
|
1587
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1588
1588
|
file: string;
|
|
1589
1589
|
/** The rate limit's `name` argument (the second positional argument), or `""` when not a string literal. */
|
|
1590
1590
|
limitName: string;
|
|
@@ -1605,7 +1605,7 @@ interface RatelimitKeySelectorIR {
|
|
|
1605
1605
|
interface PrivilegedDispatchIR {
|
|
1606
1606
|
/** `"queue"` for a `defineQueue` handler, `"workflow"` for a `defineWorkflow` handler. */
|
|
1607
1607
|
dispatchKind: "queue" | "workflow";
|
|
1608
|
-
/** Source file relative to
|
|
1608
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1609
1609
|
file: string;
|
|
1610
1610
|
/** Export binding name of the handler performing the dispatch. */
|
|
1611
1611
|
handlerExport: string;
|
|
@@ -1617,7 +1617,7 @@ interface PrivilegedDispatchIR {
|
|
|
1617
1617
|
targetFile: string;
|
|
1618
1618
|
}
|
|
1619
1619
|
/**
|
|
1620
|
-
* One discovered `httpRoute
|
|
1620
|
+
* One discovered `httpRoute.<verb>("/admin/…")` route on an admin/privileged-looking
|
|
1621
1621
|
* path, with whether its builder chain references an auth/admin guard — the
|
|
1622
1622
|
* `admin_route_without_guard` lint input. Structurally identical to
|
|
1623
1623
|
* `AdvisorAdminRoute`.
|
|
@@ -1625,7 +1625,7 @@ interface PrivilegedDispatchIR {
|
|
|
1625
1625
|
interface AdminRouteIR {
|
|
1626
1626
|
/** Export binding name of the route handler. */
|
|
1627
1627
|
exportName: string;
|
|
1628
|
-
/** Source file relative to
|
|
1628
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1629
1629
|
file: string;
|
|
1630
1630
|
/** HTTP verb the route binds to (uppercased), e.g. `"POST"`. */
|
|
1631
1631
|
method: string;
|
|
@@ -1635,7 +1635,7 @@ interface AdminRouteIR {
|
|
|
1635
1635
|
usesGuard: boolean;
|
|
1636
1636
|
}
|
|
1637
1637
|
/**
|
|
1638
|
-
* One tracked `ctx.storage
|
|
1638
|
+
* One tracked `ctx.storage.<bucket>.<method>(...)` upload/signing call — the
|
|
1639
1639
|
* shared input for the storage config-hygiene security lints
|
|
1640
1640
|
* (`storage_upload_without_content_type_allowlist`, `storage_upload_without_max_size`,
|
|
1641
1641
|
* `storage_generate_upload_url_no_content_type_pin`, `storage_presigned_url_for_private_content`).
|
|
@@ -1653,7 +1653,7 @@ interface StorageUploadIR {
|
|
|
1653
1653
|
expiresInSeconds?: number;
|
|
1654
1654
|
/** Export binding name of the procedure performing the call. */
|
|
1655
1655
|
exportName: string;
|
|
1656
|
-
/** Source file relative to
|
|
1656
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1657
1657
|
file: string;
|
|
1658
1658
|
/** 1-based line of the call, or `0` when unknown. */
|
|
1659
1659
|
line: number;
|
|
@@ -1674,9 +1674,9 @@ interface StorageUploadIR {
|
|
|
1674
1674
|
* `AdvisorHttpActionGuard`.
|
|
1675
1675
|
*/
|
|
1676
1676
|
interface HttpActionGuardIR {
|
|
1677
|
-
/** Export binding name of the handler (or `"
|
|
1677
|
+
/** Export binding name of the handler (or `"<module>"` when mounted inline / not a named binding). */
|
|
1678
1678
|
exportName: string;
|
|
1679
|
-
/** Source file relative to
|
|
1679
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1680
1680
|
file: string;
|
|
1681
1681
|
/** Which HTTP surface the handler is: a raw `httpAction` or a typed `httpRoute` route. */
|
|
1682
1682
|
kind: "httpAction" | "httpRoute";
|
|
@@ -1686,7 +1686,7 @@ interface HttpActionGuardIR {
|
|
|
1686
1686
|
method?: string;
|
|
1687
1687
|
/** `true` when the handler reads `ctx.auth` (a direct member access or a `const { auth } = ctx` destructure). */
|
|
1688
1688
|
readsAuth: boolean;
|
|
1689
|
-
/** The first side effect found, as a stable label: `runMutation`, `runAction`, or `db
|
|
1689
|
+
/** The first side effect found, as a stable label: `runMutation`, `runAction`, or `db.<method>`. */
|
|
1690
1690
|
sideEffect: string;
|
|
1691
1691
|
}
|
|
1692
1692
|
/**
|
|
@@ -1704,9 +1704,9 @@ interface HttpActionGuardIR {
|
|
|
1704
1704
|
* identical to `AdvisorHttpHeaderWrite`.
|
|
1705
1705
|
*/
|
|
1706
1706
|
interface HttpHeaderWriteIR {
|
|
1707
|
-
/** Export binding name of the enclosing handler, or `"
|
|
1707
|
+
/** Export binding name of the enclosing handler, or `"<module>"` when mounted inline. */
|
|
1708
1708
|
exportName: string;
|
|
1709
|
-
/** Source file relative to
|
|
1709
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1710
1710
|
file: string;
|
|
1711
1711
|
/** The header name being written (`"location"`), or `""` when the key is not a string literal. */
|
|
1712
1712
|
headerName: string;
|
|
@@ -1729,11 +1729,11 @@ interface HttpHeaderWriteIR {
|
|
|
1729
1729
|
interface FailOpenGuardIR {
|
|
1730
1730
|
/** The middleware factory at the call site: `rateLimit` / `dbRateLimit` / `verifyTurnstileMiddleware`. */
|
|
1731
1731
|
callee: string;
|
|
1732
|
-
/** Export binding name of the procedure the guard is attached to, or `"
|
|
1732
|
+
/** Export binding name of the procedure the guard is attached to, or `"<module>"` at file scope. */
|
|
1733
1733
|
exportName: string;
|
|
1734
1734
|
/** `true` only when the options literal set `failOpen: true` as a boolean literal; a non-literal or absent option is treated as fail-closed. */
|
|
1735
1735
|
failOpen: boolean;
|
|
1736
|
-
/** Source file relative to
|
|
1736
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1737
1737
|
file: string;
|
|
1738
1738
|
/** The rate-limit `name` (second string argument) for `rateLimit`/`dbRateLimit`; `""` for `verifyTurnstileMiddleware`. */
|
|
1739
1739
|
limitName: string;
|
|
@@ -1741,7 +1741,7 @@ interface FailOpenGuardIR {
|
|
|
1741
1741
|
line: number;
|
|
1742
1742
|
}
|
|
1743
1743
|
/**
|
|
1744
|
-
* One `ctx.flags.boolean("key",
|
|
1744
|
+
* One `ctx.flags.boolean("key", <boolean-literal>)` read in `lunora/` — the
|
|
1745
1745
|
* `flag_gates_security_with_unsafe_default` lint input. OpenFeature returns the
|
|
1746
1746
|
* `defaultValue` when the provider errors, so a fail-open default on a
|
|
1747
1747
|
* security-shaped key silently opens access during an outage. Only reads with a
|
|
@@ -1752,9 +1752,9 @@ interface FailOpenGuardIR {
|
|
|
1752
1752
|
interface FlagSecurityDefaultIR {
|
|
1753
1753
|
/** The boolean-literal default returned on a provider outage (fail-open value). */
|
|
1754
1754
|
defaultValue: boolean;
|
|
1755
|
-
/** Export binding name of the procedure performing the flag read, or `"
|
|
1755
|
+
/** Export binding name of the procedure performing the flag read, or `"<module>"` at file scope. */
|
|
1756
1756
|
exportName: string;
|
|
1757
|
-
/** Source file relative to
|
|
1757
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1758
1758
|
file: string;
|
|
1759
1759
|
/** The flag key — the first string-literal argument of `ctx.flags.boolean`. */
|
|
1760
1760
|
key: string;
|
|
@@ -1772,7 +1772,7 @@ interface FlagSecurityDefaultIR {
|
|
|
1772
1772
|
interface AiToolSideEffectIR {
|
|
1773
1773
|
/** Export binding name of the procedure performing the call. */
|
|
1774
1774
|
exportName: string;
|
|
1775
|
-
/** Source file relative to
|
|
1775
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1776
1776
|
file: string;
|
|
1777
1777
|
/** 1-based line of the generation call, or `0` when unknown. */
|
|
1778
1778
|
line: number;
|
|
@@ -1784,9 +1784,9 @@ interface AiToolSideEffectIR {
|
|
|
1784
1784
|
userInputDerived: boolean;
|
|
1785
1785
|
}
|
|
1786
1786
|
/**
|
|
1787
|
-
* One
|
|
1787
|
+
* One `<receiver>.identity.<key>` claim read in `lunora/`, where `<receiver>` is
|
|
1788
1788
|
* an RLS/mask policy `auth` (or `ctx.auth`/`context.auth`). `declared` records
|
|
1789
|
-
* whether
|
|
1789
|
+
* whether `<key>` is in the app's `defineIdentity({ ... })` contract (or the
|
|
1790
1790
|
* always-present `userId`); the `identity_undeclared_claim_trusted` lint fires on
|
|
1791
1791
|
* the undeclared reads. Emitted only when a resolvable identity contract exists.
|
|
1792
1792
|
* Structurally identical to `AdvisorIdentityClaimRead`.
|
|
@@ -1794,9 +1794,9 @@ interface AiToolSideEffectIR {
|
|
|
1794
1794
|
interface IdentityClaimReadIR {
|
|
1795
1795
|
/** `true` when `key` is a declared claim (in the `defineIdentity` contract, or the always-present `userId`). */
|
|
1796
1796
|
declared: boolean;
|
|
1797
|
-
/** Export binding name of the enclosing declaration (
|
|
1797
|
+
/** Export binding name of the enclosing declaration (`<module>` at file scope). */
|
|
1798
1798
|
exportName: string;
|
|
1799
|
-
/** Source file relative to
|
|
1799
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1800
1800
|
file: string;
|
|
1801
1801
|
/** The claim key read off the identity bag. */
|
|
1802
1802
|
key: string;
|
|
@@ -1814,9 +1814,9 @@ interface IdentityClaimReadIR {
|
|
|
1814
1814
|
interface PaymentWebhookIR {
|
|
1815
1815
|
/** The adapter factory invoked. */
|
|
1816
1816
|
callee: "createAutumnAdapter" | "createDodoPaymentsAdapter" | "createPolarAdapter" | "createStripeAdapter";
|
|
1817
|
-
/** Export binding name of the enclosing declaration (
|
|
1817
|
+
/** Export binding name of the enclosing declaration (`<module>` at file scope). */
|
|
1818
1818
|
exportName: string;
|
|
1819
|
-
/** Source file relative to
|
|
1819
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1820
1820
|
file: string;
|
|
1821
1821
|
/** 1-based line of the construction, or `0` when unknown. */
|
|
1822
1822
|
line: number;
|
|
@@ -1824,7 +1824,7 @@ interface PaymentWebhookIR {
|
|
|
1824
1824
|
toleranceSeconds?: number;
|
|
1825
1825
|
}
|
|
1826
1826
|
/**
|
|
1827
|
-
* One `ctx.db
|
|
1827
|
+
* One `ctx.db.<table>.findMany({ includeDeleted })` list read whose
|
|
1828
1828
|
* `includeDeleted` is either a hardcoded `true` or derived from the handler's
|
|
1829
1829
|
* `args` — the `soft_delete_include_deleted_from_args` lint input. The lint joins
|
|
1830
1830
|
* `table` against the schema's soft-delete tables and `visibility` against
|
|
@@ -1834,7 +1834,7 @@ interface PaymentWebhookIR {
|
|
|
1834
1834
|
interface SoftDeleteReadIR {
|
|
1835
1835
|
/** Export binding name of the procedure performing the read. */
|
|
1836
1836
|
exportName: string;
|
|
1837
|
-
/** Source file relative to
|
|
1837
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1838
1838
|
file: string;
|
|
1839
1839
|
/** `true` when `includeDeleted` was derived from the handler's `args` (any caller can flip it). */
|
|
1840
1840
|
fromArgs: boolean;
|
|
@@ -1848,7 +1848,7 @@ interface SoftDeleteReadIR {
|
|
|
1848
1848
|
visibility: "internal" | "public";
|
|
1849
1849
|
}
|
|
1850
1850
|
/**
|
|
1851
|
-
* One `ctx.db
|
|
1851
|
+
* One `ctx.db.<table>.findMany({ with: { <rel> } })` relation-hydrating list read
|
|
1852
1852
|
* — the `masked_relation_leak_via_with` lint input. Column masking does not
|
|
1853
1853
|
* descend into `with`-hydrated relations, so a masked table surfaced only through
|
|
1854
1854
|
* a `with` on an unprotected parent read is returned in the clear. The lint
|
|
@@ -1859,7 +1859,7 @@ interface SoftDeleteReadIR {
|
|
|
1859
1859
|
interface RelationLoadIR {
|
|
1860
1860
|
/** Export binding name of the procedure performing the read. */
|
|
1861
1861
|
exportName: string;
|
|
1862
|
-
/** Source file relative to
|
|
1862
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1863
1863
|
file: string;
|
|
1864
1864
|
/** 1-based line of the read call. */
|
|
1865
1865
|
line: number;
|
|
@@ -1872,8 +1872,8 @@ interface RelationLoadIR {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
/**
|
|
1874
1874
|
* One `query` handler whose `return` hands back the raw rows of a table — the
|
|
1875
|
-
* result of a `ctx.db
|
|
1876
|
-
* `ctx.db.query("
|
|
1875
|
+
* result of a `ctx.db.<table>.findMany()` / `.findFirst()` / `.get()` read, or a
|
|
1876
|
+
* `ctx.db.query("<table>")…collect()` fluent chain — returned directly (or through
|
|
1877
1877
|
* one local `const` hop) with no hand-built projection. The
|
|
1878
1878
|
* `output_projection_missing_on_public_read` lint keeps only `visibility ===
|
|
1879
1879
|
* "public"` rows with no `.output(...)` / `.use(mask(...))` on the chain, then
|
|
@@ -1884,7 +1884,7 @@ interface RelationLoadIR {
|
|
|
1884
1884
|
interface RawRowReturnIR {
|
|
1885
1885
|
/** Export binding name of the query returning the raw rows. */
|
|
1886
1886
|
exportName: string;
|
|
1887
|
-
/** Source file relative to
|
|
1887
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1888
1888
|
file: string;
|
|
1889
1889
|
/** 1-based line of the `return` (or concise-body) expression. */
|
|
1890
1890
|
line: number;
|
|
@@ -1911,7 +1911,7 @@ interface RawRowReturnIR {
|
|
|
1911
1911
|
interface NormalizeIdAuthorizationIR {
|
|
1912
1912
|
/** Export binding name of the procedure performing the normalize-then-access. */
|
|
1913
1913
|
exportName: string;
|
|
1914
|
-
/** Source file relative to
|
|
1914
|
+
/** Source file relative to `<projectRoot>/lunora/`, without extension. */
|
|
1915
1915
|
file: string;
|
|
1916
1916
|
/** 1-based line of the `ctx.db.normalizeId(...)` call the access is gated on. */
|
|
1917
1917
|
line: number;
|
|
@@ -1948,7 +1948,7 @@ interface WranglerVariableIR {
|
|
|
1948
1948
|
interface ProjectIR {
|
|
1949
1949
|
crons: ReadonlyArray<CronJobIR>;
|
|
1950
1950
|
functions: ReadonlyArray<FunctionIR>;
|
|
1951
|
-
/** Typed REST routes discovered from `httpRoute
|
|
1951
|
+
/** Typed REST routes discovered from `httpRoute.<verb>(...)` builder chains. */
|
|
1952
1952
|
httpRoutes: ReadonlyArray<HttpRouteIR>;
|
|
1953
1953
|
migrations: ReadonlyArray<MigrationIR>;
|
|
1954
1954
|
schema: SchemaIR;
|
|
@@ -2223,7 +2223,7 @@ type CapabilityKey = (typeof CAPABILITY_ROWS)[number]["key"];
|
|
|
2223
2223
|
/** The default codegen target — today's behavior, byte-identical goldens. */
|
|
2224
2224
|
declare const DEFAULT_TARGET = "cloudflare";
|
|
2225
2225
|
/**
|
|
2226
|
-
* Read `target` from
|
|
2226
|
+
* Read `target` from `<projectRoot>/lunora.json`.
|
|
2227
2227
|
*
|
|
2228
2228
|
* This lives in `@lunora/codegen` rather than `@lunora/config` — where the rest
|
|
2229
2229
|
* of the `lunora.json` reading lives — because `@lunora/config` depends on
|
|
@@ -2317,8 +2317,8 @@ declare const createCodegenProject: (lunoraDirectory: string) => Project;
|
|
|
2317
2317
|
*/
|
|
2318
2318
|
declare const refreshCodegenProject: (project: Project, lunoraDirectory: string) => void;
|
|
2319
2319
|
/**
|
|
2320
|
-
* Top-level codegen entry. Parses
|
|
2321
|
-
* function file under
|
|
2320
|
+
* Top-level codegen entry. Parses `<projectRoot>/lunora/schema.ts` and every
|
|
2321
|
+
* function file under `<projectRoot>/lunora/`, then writes
|
|
2322
2322
|
* `_generated/{api,server,dataModel}.ts` next to them.
|
|
2323
2323
|
*
|
|
2324
2324
|
* When `LUNORA_CODEGEN_TIMING` is set (truthy), a single diagnostic summary
|
|
@@ -2545,7 +2545,7 @@ declare class CodegenDiagnosticError extends LunoraError {
|
|
|
2545
2545
|
* location and whose `file`/`line`/`column` properties are set from the
|
|
2546
2546
|
* ts-morph `Node`'s position in its source file.
|
|
2547
2547
|
*
|
|
2548
|
-
* Message format: `@lunora/codegen:
|
|
2548
|
+
* Message format: `@lunora/codegen: <detail> (<file>:<line>:<column>)`
|
|
2549
2549
|
*
|
|
2550
2550
|
* `meta` is merged onto the returned error for callers that also carry the
|
|
2551
2551
|
* project-wide `LunoraError` envelope (`code`/`name`/`status`) — it never
|
|
@@ -2568,7 +2568,7 @@ declare const AGENTS_FILENAME = "agents.ts";
|
|
|
2568
2568
|
*/
|
|
2569
2569
|
declare const discoverAgents: (project: Project, lunoraDirectory: string) => AgentIR[];
|
|
2570
2570
|
/**
|
|
2571
|
-
* Discover `ctx.authApi
|
|
2571
|
+
* Discover `ctx.authApi.<method>(...)` (and bare `authApi.<method>(...)`) calls
|
|
2572
2572
|
* under the lunora source directory and attribute each to the exported function
|
|
2573
2573
|
* (and file) performing it. Calls outside an exported declaration are dropped.
|
|
2574
2574
|
*/
|
|
@@ -2613,7 +2613,7 @@ declare const discoverFlags: (project: Project, lunoraDirectory: string) => Flag
|
|
|
2613
2613
|
declare const discoverFunctions: (project: Project, lunoraDirectory: string) => FunctionIR[];
|
|
2614
2614
|
/**
|
|
2615
2615
|
* Scan all `.ts` files under `lunoraDir` (skipping `_generated/` and `schema.ts`)
|
|
2616
|
-
* for `export const x = httpRoute
|
|
2616
|
+
* for `export const x = httpRoute.<verb>(...)…handler(...)` typed REST routes.
|
|
2617
2617
|
* These are the headline OpenAPI target: each becomes a real `paths` entry.
|
|
2618
2618
|
*/
|
|
2619
2619
|
declare const discoverHttpRoutes: (project: Project, lunoraDirectory: string) => HttpRouteIR[];
|
|
@@ -2645,7 +2645,7 @@ declare const MUTATORS_FILENAME = "mutators.ts";
|
|
|
2645
2645
|
* Discover every custom mutator the project declares: exported
|
|
2646
2646
|
* `defineMutator()` calls in `lunora/mutators.ts`. Returns `[]` when the file
|
|
2647
2647
|
* doesn't exist. The export binding plus the declared `args` / `server` return
|
|
2648
|
-
* type are lifted — enough to emit a typed `api.mutators
|
|
2648
|
+
* type are lifted — enough to emit a typed `api.mutators.<name>` reference —
|
|
2649
2649
|
* while the runtime object still carries the authoritative `server` impl +
|
|
2650
2650
|
* `handler`, so codegen never evaluates the body. The client `client` impl is
|
|
2651
2651
|
* split into the browser bundle separately.
|
|
@@ -2761,7 +2761,7 @@ interface SandboxUsage {
|
|
|
2761
2761
|
}
|
|
2762
2762
|
declare const discoverSandboxUsage: (project: Project, lunoraDirectory: string) => SandboxUsage;
|
|
2763
2763
|
/**
|
|
2764
|
-
* Load
|
|
2764
|
+
* Load `<projectRoot>/lunora/schema.ts`, find `defineSchema({...})`, and
|
|
2765
2765
|
* return a structural IR. Throws if the file or call cannot be found.
|
|
2766
2766
|
*/
|
|
2767
2767
|
declare const discoverSchema: (project: Project, schemaPath: string, projectRoot?: string) => SchemaIR;
|
|
@@ -2792,7 +2792,7 @@ declare const WORKFLOWS_FILENAME = "workflows.ts";
|
|
|
2792
2792
|
*/
|
|
2793
2793
|
declare const discoverWorkflows: (project: Project, lunoraDirectory: string) => WorkflowIR[];
|
|
2794
2794
|
declare const GENERATED_HEADER = "// GENERATED by @lunora/codegen — do not edit.\n// Run `lunora codegen` to regenerate.\n\n";
|
|
2795
|
-
/** Emit `_generated/dataModel.ts` — `Doc
|
|
2795
|
+
/** Emit `_generated/dataModel.ts` — `Doc<"name">` + `Id<"name">` for every table. */
|
|
2796
2796
|
declare const emitDataModel: (schema: SchemaIR) => string;
|
|
2797
2797
|
/**
|
|
2798
2798
|
* Emit `_generated/api.ts` — the typed `api.*` registry (public functions), the
|
|
@@ -2819,19 +2819,19 @@ declare const emitApi: (options: EmitApiOptions) => string;
|
|
|
2819
2819
|
*
|
|
2820
2820
|
* Each shape emits **two** entry points.
|
|
2821
2821
|
*
|
|
2822
|
-
*
|
|
2822
|
+
* `<shape>CollectionOptions(options)` is the composable form: it returns the full
|
|
2823
2823
|
* `LunoraCollectionOptions` — `config` for `createCollection`, plus `checkpoints`
|
|
2824
2824
|
* (which `bindMutators` gates optimistic overlays on) and `scope`. This is what an app
|
|
2825
2825
|
* with custom mutators needs, and what the old single-factory form made impossible: it
|
|
2826
2826
|
* built the collection internally and dropped `checkpoints` on the floor, so there was
|
|
2827
2827
|
* no way to wire mutators to the collection codegen produced.
|
|
2828
2828
|
*
|
|
2829
|
-
*
|
|
2829
|
+
* `<shape>Collection(options)` is the convenience form for a read-only collection: it
|
|
2830
2830
|
* returns `{ checkpoints, collection, scope }` rather than a bare `Collection`, so the
|
|
2831
2831
|
* sync controls stay reachable even from the short path.
|
|
2832
2832
|
*
|
|
2833
2833
|
* Both are typed: `args` comes from the shape's own validators (a parameterless
|
|
2834
|
-
* shape takes none), rows resolve to `Doc
|
|
2834
|
+
* shape takes none), rows resolve to `Doc<"table">` when the shape names its table
|
|
2835
2835
|
* with a literal, and `shardKey` / `getKey` / `load` / `onError` / `checkpoints` are
|
|
2836
2836
|
* all threadable — a sharded table needs `shardKey` for its watermark to land in the
|
|
2837
2837
|
* right bucket, and a server-minted `_id` that differs from the app's natural key
|
|
@@ -2951,7 +2951,7 @@ interface EmitShardOptions {
|
|
|
2951
2951
|
containers?: ReadonlyArray<ContainerIR>;
|
|
2952
2952
|
/** The single `defineEnv(...)` contract declared in `lunora/env.ts` — applies the accessor to the worker `env` to populate `ctx.env`. */
|
|
2953
2953
|
env?: EnvIR;
|
|
2954
|
-
/** Statically-discovered `ctx.flags
|
|
2954
|
+
/** Statically-discovered `ctx.flags.<type>("key")` reads — the studio Flags page + reactive evaluation iterate these. */
|
|
2955
2955
|
flagKeys?: ReadonlyArray<{
|
|
2956
2956
|
key: string;
|
|
2957
2957
|
type: "boolean" | "number" | "object" | "string";
|
|
@@ -3123,7 +3123,7 @@ interface EmitAppOptions {
|
|
|
3123
3123
|
* Voice-enabled agents (`defineAgent({ voice: … })`) → wire
|
|
3124
3124
|
* `options.voiceAgents`, mapping each agent's export name to its `VOICE_*`
|
|
3125
3125
|
* Durable Object namespace binding so the runtime exposes
|
|
3126
|
-
* `/_lunora/voice
|
|
3126
|
+
* `/_lunora/voice/<exportName>`. Empty/absent ⇒ no wiring, byte-identical
|
|
3127
3127
|
* output for voice-free (and agent-free) projects.
|
|
3128
3128
|
*/
|
|
3129
3129
|
voiceAgents?: ReadonlyArray<{
|