@lunora/config 1.0.0-alpha.198 → 1.0.0-alpha.199

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.
@@ -338,15 +338,24 @@ interface ReconcileResult {
338
338
  * config `triggers.crons` array, preserving comments and formatting via
339
339
  * `jsonc-parser`'s structural edits.
340
340
  *
341
- * **This does not own the whole array.** Two runtime cron surfaces are invisible
342
- * to codegen and are documented as needing a hand-written `triggers.crons` entry:
343
- * `createWorker({ backupCron })` (the nightly NDJSON backup) and
344
- * `createWorker({ crons })` (handlers keyed by expression). Replacing the array
341
+ * **This does not own the whole array.** Two runtime cron surfaces live on
342
+ * `createWorker` rather than in `lunora/crons.ts`: `backupCron` (the nightly
343
+ * NDJSON backup) and `crons` (handlers keyed by expression). Replacing the array
345
344
  * wholesale deleted both on the next `lunora deploy` or dev-server schema save,
346
345
  * silently — the nightly backup simply stopped. So an entry this reconciler did
347
346
  * not generate is the user's, is kept, and is reported in
348
347
  * {@link ReconcileResult.preserved}.
349
348
  *
349
+ * Codegen now scans the worker entry for both, so the STATIC case arrives in
350
+ * `cronTriggers` like any declared cron — kept because it is generated, and
351
+ * cleared when the entry stops declaring it. What it cannot resolve is the
352
+ * dynamic case, and that case is supported: `.extend((env) => ({ backupCron:
353
+ * env.NIGHTLY_CRON }))` is the documented escape hatch, and its value exists
354
+ * only at runtime. That residue — plus a computed `crons` key, a spread options
355
+ * object, and anything a project put in `triggers.crons` for its own reasons —
356
+ * is what the preserve rule below is for. It is not redundant with discovery; it
357
+ * is the half discovery provably cannot reach.
358
+ *
350
359
  * Ownership is recorded in the project's `package.json` under `lunora.crons`,
351
360
  * which is why a REMOVED generated cron still gets cleared (it is in the record
352
361
  * and no longer in `cronTriggers`) while a hand-written one never is. Three
@@ -338,15 +338,24 @@ interface ReconcileResult {
338
338
  * config `triggers.crons` array, preserving comments and formatting via
339
339
  * `jsonc-parser`'s structural edits.
340
340
  *
341
- * **This does not own the whole array.** Two runtime cron surfaces are invisible
342
- * to codegen and are documented as needing a hand-written `triggers.crons` entry:
343
- * `createWorker({ backupCron })` (the nightly NDJSON backup) and
344
- * `createWorker({ crons })` (handlers keyed by expression). Replacing the array
341
+ * **This does not own the whole array.** Two runtime cron surfaces live on
342
+ * `createWorker` rather than in `lunora/crons.ts`: `backupCron` (the nightly
343
+ * NDJSON backup) and `crons` (handlers keyed by expression). Replacing the array
345
344
  * wholesale deleted both on the next `lunora deploy` or dev-server schema save,
346
345
  * silently — the nightly backup simply stopped. So an entry this reconciler did
347
346
  * not generate is the user's, is kept, and is reported in
348
347
  * {@link ReconcileResult.preserved}.
349
348
  *
349
+ * Codegen now scans the worker entry for both, so the STATIC case arrives in
350
+ * `cronTriggers` like any declared cron — kept because it is generated, and
351
+ * cleared when the entry stops declaring it. What it cannot resolve is the
352
+ * dynamic case, and that case is supported: `.extend((env) => ({ backupCron:
353
+ * env.NIGHTLY_CRON }))` is the documented escape hatch, and its value exists
354
+ * only at runtime. That residue — plus a computed `crons` key, a spread options
355
+ * object, and anything a project put in `triggers.crons` for its own reasons —
356
+ * is what the preserve rule below is for. It is not redundant with discovery; it
357
+ * is the half discovery provably cannot reach.
358
+ *
350
359
  * Ownership is recorded in the project's `package.json` under `lunora.crons`,
351
360
  * which is why a REMOVED generated cron still gets cleared (it is in the record
352
361
  * and no longer in `cronTriggers`) while a hand-written one never is. Three
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/config",
3
- "version": "1.0.0-alpha.198",
3
+ "version": "1.0.0-alpha.199",
4
4
  "description": "Internal shared CLI + Vite config layer for Lunora: wrangler.jsonc validation, binding inference, and .dev.vars scaffolding",
5
5
  "keywords": [
6
6
  "bindings",
@@ -54,7 +54,7 @@
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {
57
- "@lunora/codegen": "1.0.0-alpha.162",
57
+ "@lunora/codegen": "1.0.0-alpha.164",
58
58
  "@lunora/container": "1.0.0-alpha.47",
59
59
  "@lunora/errors": "1.0.0-alpha.34",
60
60
  "@lunora/seed": "1.0.0-alpha.112",