@lunora/server 1.0.0-alpha.15 → 1.0.0-alpha.16

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/types.d.mts CHANGED
@@ -1044,6 +1044,14 @@ interface QueryCtx {
1044
1044
  readonly auth: AuthState;
1045
1045
  readonly db: DatabaseReader;
1046
1046
  /**
1047
+ * The validated, typed environment. Populated only when the project declares
1048
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1049
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1050
+ * coercion-aware. Absent (optional) without a contract — declare
1051
+ * `lunora/env.ts` to populate and type it.
1052
+ */
1053
+ readonly env?: Record<string, unknown>;
1054
+ /**
1047
1055
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
1048
1056
  * forwarded server-side (never read from a client header). `undefined` when
1049
1057
  * unknown: a live-subscription re-run, a server-initiated dispatch, or
@@ -1078,6 +1086,14 @@ interface MutationCtx {
1078
1086
  readonly auth: AuthState;
1079
1087
  readonly db: DatabaseWriter;
1080
1088
  /**
1089
+ * The validated, typed environment. Populated only when the project declares
1090
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1091
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1092
+ * coercion-aware. Absent (optional) without a contract — declare
1093
+ * `lunora/env.ts` to populate and type it.
1094
+ */
1095
+ readonly env?: Record<string, unknown>;
1096
+ /**
1081
1097
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
1082
1098
  * forwarded server-side (never read from a client header). `undefined` when
1083
1099
  * unknown: a live-subscription re-run, a server-initiated dispatch, or
@@ -1121,6 +1137,14 @@ interface MutationCtx {
1121
1137
  interface ActionCtx {
1122
1138
  readonly auth: AuthState;
1123
1139
  readonly db: DatabaseWriter;
1140
+ /**
1141
+ * The validated, typed environment. Populated only when the project declares
1142
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1143
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1144
+ * coercion-aware. Absent (optional) without a contract — declare
1145
+ * `lunora/env.ts` to populate and type it.
1146
+ */
1147
+ readonly env?: Record<string, unknown>;
1124
1148
  readonly fetch: typeof globalThis.fetch;
1125
1149
  /**
1126
1150
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
package/dist/types.d.ts CHANGED
@@ -1044,6 +1044,14 @@ interface QueryCtx {
1044
1044
  readonly auth: AuthState;
1045
1045
  readonly db: DatabaseReader;
1046
1046
  /**
1047
+ * The validated, typed environment. Populated only when the project declares
1048
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1049
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1050
+ * coercion-aware. Absent (optional) without a contract — declare
1051
+ * `lunora/env.ts` to populate and type it.
1052
+ */
1053
+ readonly env?: Record<string, unknown>;
1054
+ /**
1047
1055
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
1048
1056
  * forwarded server-side (never read from a client header). `undefined` when
1049
1057
  * unknown: a live-subscription re-run, a server-initiated dispatch, or
@@ -1078,6 +1086,14 @@ interface MutationCtx {
1078
1086
  readonly auth: AuthState;
1079
1087
  readonly db: DatabaseWriter;
1080
1088
  /**
1089
+ * The validated, typed environment. Populated only when the project declares
1090
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1091
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1092
+ * coercion-aware. Absent (optional) without a contract — declare
1093
+ * `lunora/env.ts` to populate and type it.
1094
+ */
1095
+ readonly env?: Record<string, unknown>;
1096
+ /**
1081
1097
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
1082
1098
  * forwarded server-side (never read from a client header). `undefined` when
1083
1099
  * unknown: a live-subscription re-run, a server-initiated dispatch, or
@@ -1121,6 +1137,14 @@ interface MutationCtx {
1121
1137
  interface ActionCtx {
1122
1138
  readonly auth: AuthState;
1123
1139
  readonly db: DatabaseWriter;
1140
+ /**
1141
+ * The validated, typed environment. Populated only when the project declares
1142
+ * a `defineEnv(...)` contract in `lunora/env.ts`; codegen then narrows this to
1143
+ * the validated `InferEnv` shape so `ctx.env.STRIPE_KEY` is parsed and
1144
+ * coercion-aware. Absent (optional) without a contract — declare
1145
+ * `lunora/env.ts` to populate and type it.
1146
+ */
1147
+ readonly env?: Record<string, unknown>;
1124
1148
  readonly fetch: typeof globalThis.fetch;
1125
1149
  /**
1126
1150
  * The caller's IP for this request — Cloudflare's trusted `CF-Connecting-IP`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/server",
3
- "version": "1.0.0-alpha.15",
3
+ "version": "1.0.0-alpha.16",
4
4
  "description": "Server primitives for Lunora: defineSchema, defineTable, query, mutation, and action",
5
5
  "keywords": [
6
6
  "backend",