@lunora/config 1.0.0-alpha.468 → 1.0.0-alpha.469

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.
Files changed (30) hide show
  1. package/dist/celld/index.d.mts +77 -0
  2. package/dist/celld/index.d.ts +77 -0
  3. package/dist/celld/index.mjs +1 -0
  4. package/dist/celld-names/index.d.mts +57 -0
  5. package/dist/celld-names/index.d.ts +57 -0
  6. package/dist/celld-names/index.mjs +1 -0
  7. package/dist/cli/index.mjs +1 -1
  8. package/dist/cloudflare/index.d.mts +4 -592
  9. package/dist/cloudflare/index.d.ts +4 -592
  10. package/dist/cloudflare/index.mjs +1 -1
  11. package/dist/index.mjs +1 -1
  12. package/dist/packem_shared/CELLD_RELEASE_ASSETS_DIRECTORY-YBhEotjs.mjs +1 -0
  13. package/dist/packem_shared/{DEFAULT_DEPLOY_TARGET-CAJl2nEI.mjs → DEFAULT_DEPLOY_TARGET-BlvZ242-.mjs} +1 -1
  14. package/dist/packem_shared/{POLICY_SCAFFOLD_ENDPOINT-DSMpLzsw.mjs → POLICY_SCAFFOLD_ENDPOINT-BiQ1zNsR.mjs} +1 -1
  15. package/dist/packem_shared/{SCHEMA_EDIT_ENDPOINT-FM9ZC-gV.mjs → SCHEMA_EDIT_ENDPOINT-D296PlpV.mjs} +1 -1
  16. package/dist/packem_shared/{STUDIO_PATH-CWaCBuYC.mjs → STUDIO_PATH-CvVcvTbQ.mjs} +1 -1
  17. package/dist/packem_shared/{assertBuildTargetMatches-tkKAa5zl.mjs → assertBuildTargetMatches-D11J7F38.mjs} +1 -1
  18. package/dist/packem_shared/binding-manifest.d-BRdoMhGE.d.mts +593 -0
  19. package/dist/packem_shared/binding-manifest.d-BRdoMhGE.d.ts +593 -0
  20. package/dist/packem_shared/{celld-config-CpvLkAEg.mjs → celld-config-Ef1RZ02t.mjs} +1 -1
  21. package/dist/packem_shared/{emitProjectAssetHeaders-6iinmRWE.mjs → emitProjectAssetHeaders-BdqdTVN3.mjs} +1 -1
  22. package/dist/packem_shared/scanWranglerVariablesForSecrets-DmdOBmwn.mjs +1 -0
  23. package/dist/packem_shared/{startCelldDevSession-DQ7YylR_.mjs → startCelldDevSession-DfuDVsha.mjs} +1 -1
  24. package/dist/packem_shared/{wranglerCodegenInputs--ngEbVLe.mjs → wranglerCodegenInputs-B8iRZZZw.mjs} +1 -1
  25. package/dist/packem_shared/wranglerToAlchemy-ClIdvJFu.mjs +5 -0
  26. package/dist/packem_shared/{write-atomic-BzViTZCw.mjs → write-atomic-9sY2z8DB.mjs} +1 -1
  27. package/dist/studio-host/index.mjs +1 -1
  28. package/package.json +9 -1
  29. package/dist/packem_shared/scanWranglerVariablesForSecrets-BQIPpHpH.mjs +0 -1
  30. package/dist/packem_shared/wranglerToAlchemy-CBO2ucRm.mjs +0 -6
@@ -1,5 +1,7 @@
1
1
  import { G as GeneratedClassModule, I as InferredBindings, D as DiscoveryCache, S as SchemaInfo } from "../packem_shared/placeholder-ids.d-DvGHP6bl.mjs";
2
2
  export { H as HYPERDRIVE_PLACEHOLDER_ID } from "../packem_shared/placeholder-ids.d-DvGHP6bl.mjs";
3
+ import { W as WranglerConfig, T as TailConsumer, a as WranglerValidationReport } from "../packem_shared/binding-manifest.d-BRdoMhGE.mjs";
4
+ export { type A as AlchemyTranslation, b as BINDING_MANIFEST_VERSION, type c as BindingManifest, type B as BindingRequirement, D as DEFAULT_OBSERVABILITY, type M as ManifestConfigShape, type O as ObservabilitySignalSampling, type d as WranglerConfigShape, type e as WranglerContainerEntry, type f as WranglerObservability, type g as WranglerObservabilityLogs, type h as WranglerObservabilityTraces, type i as WranglerWorkflowEntry, j as buildBindingManifest, r as resolveObservabilitySampling, w as wranglerToAlchemy } from "../packem_shared/binding-manifest.d-BRdoMhGE.mjs";
3
5
  import { D as DeployDriver } from "../packem_shared/deploy-driver.d-CHVNQFV2.mjs";
4
6
  import { WranglerQueueProducerIR, WranglerVariableIR } from '@lunora/codegen';
5
7
  /** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
@@ -32,318 +34,6 @@ declare const readManifest: (projectRoot: string) => Manifest | undefined;
32
34
  * nothing recorded keeps an unmarked manifest.
33
35
  */
34
36
  declare const recordManifestKey: (manifest: Manifest, key: string, value: unknown) => void;
35
- /** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
36
- interface WranglerDurableObjectBinding$1 {
37
- class_name?: string;
38
- name?: string;
39
- /** Present when the class lives in ANOTHER Worker — then it is that script's to export, not this entry's. */
40
- script_name?: string;
41
- }
42
- /**
43
- * A `tail_consumers` entry: a Worker that receives this Worker's tail events
44
- * (logs, exceptions, fetch metadata) for forwarding to an external sink. See
45
- * `withTailConsumer` for the wiring helper.
46
- */
47
- interface TailConsumer {
48
- /** Optional Cloudflare environment of the consumer Worker. */
49
- environment?: string;
50
- /** Name of the Worker that consumes tail events. */
51
- service?: string;
52
- }
53
- /**
54
- * `observability.traces` — Workers Traces. `destinations` names OpenTelemetry
55
- * export destinations configured in the dashboard; `persist: false` exports
56
- * without also storing in Cloudflare (default `true`).
57
- * https://developers.cloudflare.com/workers/observability/opentelemetry-export/
58
- */
59
- interface WranglerObservabilityTraces {
60
- destinations?: ReadonlyArray<string>;
61
- enabled?: boolean;
62
- /** Fraction of requests traced, 0–1. */
63
- head_sampling_rate?: number;
64
- persist?: boolean;
65
- }
66
- /**
67
- * `observability.logs` — Workers Logs. Same export knobs as traces, plus
68
- * `invocation_logs` (the per-invocation summary line; default `true`).
69
- */
70
- interface WranglerObservabilityLogs extends WranglerObservabilityTraces {
71
- invocation_logs?: boolean;
72
- }
73
- /** The wrangler `observability` block (Workers Logs + Traces). */
74
- interface WranglerObservability {
75
- enabled?: boolean;
76
- /** Fraction of requests logged, 0–1 (wrangler's default is 1: every request). */
77
- head_sampling_rate?: number;
78
- /** Workers Issues — detects and groups production failures. */
79
- issues?: {
80
- enabled?: boolean;
81
- };
82
- logs?: WranglerObservabilityLogs;
83
- /** Strip query strings from request URLs in logs and traces (wrangler's default is `false`). */
84
- redact_query_string?: boolean;
85
- traces?: WranglerObservabilityTraces;
86
- }
87
- /**
88
- * The `observability` block Lunora writes when a project has none — by
89
- * `lunora dev`'s binding reconcile and by `lunora init`'s scaffold. Logs on,
90
- * every request sampled: the right default while an app is small, and what
91
- * `lunora doctor`'s `observability-full-sampling` advisory then flags once
92
- * Workers Observability is billed. One constant so the writers and the doctor
93
- * cannot drift apart.
94
- */
95
- declare const DEFAULT_OBSERVABILITY: Readonly<{
96
- enabled: true;
97
- head_sampling_rate: 1;
98
- redact_query_string: true;
99
- }>;
100
- /** One signal's effective sampling, as {@link resolveObservabilitySampling} resolves it. */
101
- interface ObservabilitySignalSampling {
102
- enabled: boolean;
103
- /** Fraction of requests sampled, 0–1. */
104
- headSamplingRate: number;
105
- }
106
- /**
107
- * The effective logs / traces sampling an `observability` block deploys with,
108
- * defaults applied. An absent block is {@link DEFAULT_OBSERVABILITY}, which is
109
- * what Lunora reconciles it to. Inside a present block, logs are on unless the
110
- * block (or its `logs` sub-block) turns them off; traces are opt-in
111
- * (`traces.enabled: true`); and an unset rate is wrangler's own default of 1.
112
- * `logs.*` overrides the top-level switch and rate.
113
- */
114
- declare const resolveObservabilitySampling: (block: WranglerObservability | undefined) => {
115
- logs: ObservabilitySignalSampling;
116
- traces: ObservabilitySignalSampling;
117
- };
118
- /** A wrangler `containers[]` entry (parsed from untrusted JSONC). */
119
- interface WranglerContainerEntry {
120
- class_name?: string;
121
- image?: string;
122
- /** Named images under the `durable_object` scheduling policy. */
123
- images?: Record<string, {
124
- build_context?: string;
125
- build_vars?: Record<string, string>;
126
- dockerfile?: string;
127
- image?: string;
128
- } | null | undefined>;
129
- instance_type?: string | {
130
- disk_mb?: number;
131
- memory_mib?: number;
132
- vcpu?: number;
133
- };
134
- max_instances?: number;
135
- scheduling_policy?: string;
136
- }
137
- /**
138
- * A wrangler `workflows[]` entry (parsed from untrusted JSONC). Unlike
139
- * containers, workflows are NOT Durable Objects — the entry stands alone (no
140
- * `durable_objects` binding, no migration class).
141
- */
142
- interface WranglerWorkflowEntry {
143
- binding?: string;
144
- class_name?: string;
145
- /** `{ success_retention?, error_retention? }` durations; shape-checked by `validateWorkflowSettings`. */
146
- default_retention?: unknown;
147
- /** `{ steps? }`; shape-checked by `validateWorkflowSettings`. */
148
- limits?: unknown;
149
- name?: string;
150
- /** Cron strings that each start an instance; shape-checked by `validateWorkflowSettings`. */
151
- schedules?: unknown;
152
- /** Present when the class lives in ANOTHER Worker — then it is that script's to export. */
153
- script_name?: string;
154
- }
155
- /** A wrangler `queues.producers[]` entry — a `Queue` binding sending to `queue`. */
156
- interface WranglerQueueProducer {
157
- binding?: string;
158
- delivery_delay?: number;
159
- queue?: string;
160
- }
161
- /** A wrangler `queues.consumers[]` entry — push (worker) or `type: "http_pull"`. */
162
- interface WranglerQueueConsumer {
163
- dead_letter_queue?: string;
164
- max_batch_size?: number;
165
- max_batch_timeout?: number;
166
- max_concurrency?: number;
167
- max_retries?: number;
168
- queue?: string;
169
- retry_delay?: number;
170
- type?: string;
171
- }
172
- interface WranglerConfig {
173
- account_id?: unknown;
174
- ai?: {
175
- binding?: unknown;
176
- } | null;
177
- ai_search?: ReadonlyArray<{
178
- binding?: string;
179
- instance_name?: string;
180
- remote?: boolean;
181
- } | null | undefined>;
182
- ai_search_namespaces?: ReadonlyArray<{
183
- binding?: string;
184
- namespace?: string;
185
- remote?: boolean;
186
- } | null | undefined>;
187
- analytics?: {
188
- binding?: unknown;
189
- remote?: boolean;
190
- } | null;
191
- analytics_engine_datasets?: ReadonlyArray<{
192
- binding?: string;
193
- dataset?: string;
194
- } | null | undefined>;
195
- artifacts?: ReadonlyArray<{
196
- binding?: string;
197
- namespace?: string;
198
- remote?: boolean;
199
- } | null | undefined>;
200
- assets?: {
201
- binding?: string;
202
- directory?: string;
203
- html_handling?: string;
204
- not_found_handling?: string;
205
- run_worker_first?: boolean | ReadonlyArray<string>;
206
- };
207
- browser?: {
208
- binding?: string;
209
- };
210
- cache?: {
211
- enabled?: boolean;
212
- } | null;
213
- compatibility_date?: string;
214
- compatibility_flags?: ReadonlyArray<string>;
215
- containers?: ReadonlyArray<WranglerContainerEntry | null | undefined>;
216
- d1_databases?: ReadonlyArray<{
217
- binding?: string;
218
- database_id?: string;
219
- database_name?: string;
220
- migrations_dir?: string;
221
- migrations_pattern?: string;
222
- } | null | undefined>;
223
- dispatch_namespaces?: ReadonlyArray<{
224
- binding?: string;
225
- namespace?: string;
226
- outbound?: unknown;
227
- } | null | undefined>;
228
- durable_objects?: {
229
- bindings?: ReadonlyArray<WranglerDurableObjectBinding$1>;
230
- };
231
- env?: Record<string, WranglerConfig>;
232
- exports?: Record<string, {
233
- cache?: {
234
- enabled?: boolean;
235
- } | null;
236
- default_retention?: unknown;
237
- limits?: unknown;
238
- name?: unknown;
239
- schedules?: unknown;
240
- type?: string;
241
- } | null> | null;
242
- flagship?: ReadonlyArray<{
243
- app_id?: string;
244
- binding?: string;
245
- } | null | undefined>;
246
- hyperdrive?: ReadonlyArray<{
247
- binding?: string;
248
- id?: string;
249
- localConnectionString?: string;
250
- } | null | undefined>;
251
- images?: {
252
- binding?: string;
253
- };
254
- k2?: ReadonlyArray<unknown>;
255
- kv_namespaces?: ReadonlyArray<{
256
- binding?: string;
257
- id?: string;
258
- } | null | undefined>;
259
- limits?: {
260
- cpu_ms?: number;
261
- };
262
- logpush?: boolean;
263
- main?: string;
264
- media?: {
265
- binding?: string;
266
- };
267
- migrations?: ReadonlyArray<{
268
- deleted_classes?: ReadonlyArray<string>;
269
- new_classes?: ReadonlyArray<string>;
270
- new_sqlite_classes?: ReadonlyArray<string>;
271
- renamed_classes?: ReadonlyArray<{
272
- from?: string;
273
- to?: string;
274
- } | null | undefined>;
275
- } | null | undefined>;
276
- mtls_certificates?: ReadonlyArray<{
277
- binding?: string;
278
- certificate_id?: string;
279
- } | null | undefined>;
280
- observability?: WranglerObservability;
281
- pipelines?: ReadonlyArray<{
282
- binding?: string;
283
- pipeline?: string;
284
- stream?: string;
285
- } | null | undefined>;
286
- placement?: {
287
- host?: string;
288
- hostname?: string;
289
- mode?: string;
290
- region?: string;
291
- };
292
- queues?: {
293
- consumers?: ReadonlyArray<WranglerQueueConsumer | null | undefined>;
294
- producers?: ReadonlyArray<WranglerQueueProducer | null | undefined>;
295
- };
296
- r2_buckets?: ReadonlyArray<{
297
- binding?: string;
298
- bucket_name?: string;
299
- jurisdiction?: string;
300
- } | null | undefined>;
301
- secrets?: {
302
- required?: unknown;
303
- } | null;
304
- secrets_store_secrets?: ReadonlyArray<{
305
- binding?: string;
306
- secret_name?: string;
307
- store_id?: string;
308
- } | null | undefined>;
309
- send_email?: ReadonlyArray<{
310
- allowed_destination_addresses?: ReadonlyArray<string>;
311
- destination_address?: string;
312
- name?: string;
313
- } | null | undefined>;
314
- services?: ReadonlyArray<{
315
- binding?: string;
316
- entrypoint?: string;
317
- environment?: string;
318
- service?: string;
319
- } | null | undefined>;
320
- stream?: {
321
- binding?: string;
322
- };
323
- tail_consumers?: ReadonlyArray<TailConsumer | null | undefined>;
324
- vars?: Record<string, unknown>;
325
- vectorize?: ReadonlyArray<{
326
- binding?: string;
327
- index_name?: string;
328
- } | null | undefined>;
329
- vpc_networks?: ReadonlyArray<{
330
- binding?: string;
331
- network_id?: string;
332
- remote?: boolean;
333
- tunnel_id?: string;
334
- } | null | undefined>;
335
- vpc_services?: ReadonlyArray<{
336
- binding?: string;
337
- remote?: boolean;
338
- service_id?: string;
339
- } | null | undefined>;
340
- workflows?: ReadonlyArray<WranglerWorkflowEntry | null | undefined>;
341
- }
342
- interface WranglerValidationReport {
343
- errors: string[];
344
- valid: boolean;
345
- warnings: string[];
346
- }
347
37
  /**
348
38
  * A container/workflow that is declared (so codegen emits its class) but the
349
39
  * worker entry never re-exports — the one wiring step the generators can't always
@@ -503,284 +193,6 @@ interface AssetHeadersResult {
503
193
  }
504
194
  /** Rewrite `<directory>/_headers` with the managed block; a file left holding nothing is removed. */
505
195
  declare const writeAssetHeaders: (directory: string, options: AssetHeadersOptions) => AssetHeadersResult;
506
- /**
507
- * Translate a `wrangler.jsonc` into an [Alchemy](https://alchemy.run) program.
508
- *
509
- * # Why translate rather than ask for a second config
510
- *
511
- * `wrangler.jsonc` is already the source of truth for what an app needs, and
512
- * Lunora already infers and reconciles it — `inferLunoraBindings` decides that
513
- * a project needs a shard namespace and a bucket, `reconcileWranglerBindings`
514
- * writes them. Asking a developer to restate all of that in an
515
- * `alchemy.run.ts` would give the project two sources of truth that drift, and
516
- * the drift would surface as a deploy that provisions something the app does
517
- * not bind.
518
- *
519
- * So Alchemy is an implementation detail of `deploy`, not a thing to configure:
520
- * read the config, emit the program, run it.
521
- *
522
- * # Why this emits source rather than calling Alchemy
523
- *
524
- * `alchemy@0.93` has thirty dependencies, nine of them Node-shaped —
525
- * `wrangler`, `miniflare`, `esbuild`, `execa`, `find-process`, `glob`, `open`,
526
- * `proper-lockfile`, `signal-exit`. `@lunora/config` is imported by
527
- * `@lunora/vite`, so importing Alchemy here would push that tree into every
528
- * project that merely wanted to read `lunora.config.*`, and into any bundle
529
- * targeting workerd — where none of it survives.
530
- *
531
- * Emitting text keeps this module pure and dependency-free. Alchemy is invoked
532
- * as a CLI against the generated file, so it only has to exist on the machine
533
- * that deploys.
534
- *
535
- * # Adoption, not re-creation
536
- *
537
- * Every resource is emitted with `adopt: true`. A project translated from an
538
- * existing `wrangler.jsonc` already *has* its D1 database and its bucket, with
539
- * data in them. Without adoption Alchemy would treat them as new and try to
540
- * create alongside — the one outcome a deploy must never have.
541
- */
542
- /** A Durable Object binding as `wrangler.jsonc` spells it. */
543
- interface WranglerDurableObjectBinding {
544
- class_name?: string;
545
- name?: string;
546
- script_name?: string;
547
- }
548
- /** The slice of `wrangler.jsonc` that translates into Alchemy resources. */
549
- interface WranglerConfigShape {
550
- compatibility_date?: string;
551
- compatibility_flags?: ReadonlyArray<string>;
552
- d1_databases?: ReadonlyArray<{
553
- binding?: string;
554
- database_id?: string;
555
- database_name?: string;
556
- }>;
557
- durable_objects?: {
558
- bindings?: ReadonlyArray<WranglerDurableObjectBinding>;
559
- };
560
- kv_namespaces?: ReadonlyArray<{
561
- binding?: string;
562
- id?: string;
563
- }>;
564
- main?: string;
565
- /** `new_sqlite_classes` marks which DO classes get SQLite storage — Alchemy needs that per namespace. */
566
- migrations?: ReadonlyArray<{
567
- new_classes?: ReadonlyArray<string>;
568
- new_sqlite_classes?: ReadonlyArray<string>;
569
- }>;
570
- name?: string;
571
- /** Only `producers` translate; a `consumers` entry is dropped and reported as `queues.consumers`. */
572
- queues?: {
573
- consumers?: ReadonlyArray<{
574
- queue?: string;
575
- }>;
576
- producers?: ReadonlyArray<{
577
- binding?: string;
578
- queue?: string;
579
- }>;
580
- };
581
- r2_buckets?: ReadonlyArray<{
582
- binding?: string;
583
- bucket_name?: string;
584
- }>;
585
- triggers?: {
586
- crons?: ReadonlyArray<string>;
587
- };
588
- vars?: Readonly<Record<string, unknown>>;
589
- }
590
- /** What the translation could not carry over, so the caller can say so out loud. */
591
- interface AlchemyTranslation {
592
- /** The emitted program source. */
593
- source: string;
594
- /**
595
- * Bindings present in `wrangler.jsonc` that this translation drops.
596
- *
597
- * Reported rather than silently omitted: a deploy that quietly loses a
598
- * Vectorize index produces a worker whose `env.POSTS_SEARCH` is undefined
599
- * at runtime, and nothing in the build says why.
600
- */
601
- unsupported: ReadonlyArray<string>;
602
- }
603
- /**
604
- * Translate a parsed `wrangler.jsonc` into an Alchemy program.
605
- *
606
- * Pure: it reads nothing and writes nothing, so the caller decides where the
607
- * source lands and the whole thing stays testable as a string comparison.
608
- * @param config The parsed `wrangler.jsonc`.
609
- * @returns the program source, plus whatever could not be carried over.
610
- */
611
- declare const wranglerToAlchemy: (config: WranglerConfigShape) => AlchemyTranslation;
612
- /** Schema version of the emitted document, so a consumer can gate on shape changes. */
613
- declare const BINDING_MANIFEST_VERSION = 1;
614
- /**
615
- * One resource the built Worker expects to be bound to. `binding` is the name the
616
- * Worker reads off `env`; the remaining fields are whatever identifies the
617
- * resource for that type, omitted when the config does not carry them (an id
618
- * Lunora could not mint is absent here exactly as it is absent from the config).
619
- */
620
- interface BindingRequirement {
621
- /** The `env` property name the Worker reads. */
622
- binding: string;
623
- /**
624
- * Durable Object / Workflow / Container class the Worker must export. Present
625
- * for the class-backed binding types, so a deployer can assert the bundle
626
- * exports it before publishing.
627
- */
628
- className?: string;
629
- /** Bucket name (`r2`), database name (`d1`), dataset (`analytics_engine`), queue name (`queue`), index (`vectorize`), stream (`pipeline`), namespace (`artifacts`, `ai_search_namespace`), instance (`ai_search`), Worker name (`service`). */
630
- resource?: string;
631
- /** Remote resource id, when the config declares one (`d1`, `kv`, `hyperdrive`, `vpc_service`, `vpc_network`). */
632
- resourceId?: string;
633
- /** For `durable_object`: whether the class uses SQLite storage (`new_sqlite_classes`). */
634
- sqlite?: boolean;
635
- /** The kind of resource, keyed to the wrangler section it came from. */
636
- type: "ai" | "ai_search" | "ai_search_namespace" | "analytics_engine" | "analytics_sql" | "artifacts" | "assets" | "browser" | "container" | "d1" | "durable_object" | "hyperdrive" | "images" | "kv" | "media" | "pipeline" | "queue_consumer" | "queue_producer" | "r2" | "service" | "stream" | "vectorize" | "vpc_network" | "vpc_service" | "workflow";
637
- }
638
- /** The document the `lunora build --emit-bindings` flag writes. */
639
- interface BindingManifest {
640
- /** Every resource the Worker expects, sorted by `type` then `binding` so the file is diff-stable. */
641
- bindings: ReadonlyArray<BindingRequirement>;
642
- /** `compatibility_date`, when declared. */
643
- compatibilityDate?: string;
644
- /** `compatibility_flags`, when declared. */
645
- compatibilityFlags?: ReadonlyArray<string>;
646
- /** Cron expressions the Worker must be triggered on (`triggers.crons`). */
647
- crons: ReadonlyArray<string>;
648
- /**
649
- * Config keys whose value is not the shape wrangler expects — `kv_namespaces`
650
- * as an object, a `null` entry in `queues.producers` — sorted. Whatever they
651
- * held is left out of `bindings`: the builder reads a hand-edited config
652
- * during `lunora dev`, where throwing would abort the start, and wrangler
653
- * reports the bad key itself when it loads the file.
654
- */
655
- malformed: ReadonlyArray<string>;
656
- /** Worker name from `wrangler.jsonc`. */
657
- name?: string;
658
- /**
659
- * Wrangler sections present in the config that this version does not model,
660
- * by field name. Empty for a fully-understood config; non-empty is a prompt to
661
- * extend the collector, and is surfaced to the user rather than silently
662
- * dropped.
663
- */
664
- unknown: ReadonlyArray<string>;
665
- /** Names of `vars` entries. Values are deliberately excluded — a manifest is committed and read by CI, and a `vars` entry can hold a value a project would rather not publish. */
666
- vars: ReadonlyArray<string>;
667
- /** Schema version — {@link BINDING_MANIFEST_VERSION}. */
668
- version: number;
669
- }
670
- /**
671
- * The wider config this reads. {@link WranglerConfigShape} covers what the
672
- * Alchemy translation models; a manifest additionally reports the sections that
673
- * translation lists as unsupported, so those are declared here.
674
- */
675
- interface ManifestConfigShape extends WranglerConfigShape {
676
- ai?: {
677
- binding?: string;
678
- };
679
- ai_search?: ReadonlyArray<{
680
- binding?: string;
681
- instance_name?: string;
682
- }>;
683
- ai_search_namespaces?: ReadonlyArray<{
684
- binding?: string;
685
- namespace?: string;
686
- }>;
687
- /** The Analytics SQL binding — a parameterless `{ binding }`, distinct from `analytics_engine_datasets`. */
688
- analytics?: {
689
- binding?: string;
690
- };
691
- analytics_engine_datasets?: ReadonlyArray<{
692
- binding?: string;
693
- dataset?: string;
694
- }>;
695
- artifacts?: ReadonlyArray<{
696
- binding?: string;
697
- namespace?: string;
698
- }>;
699
- /** Static assets carry a real `binding` the Worker reads (`env.ASSETS`). */
700
- assets?: {
701
- binding?: string;
702
- directory?: string;
703
- };
704
- browser?: {
705
- binding?: string;
706
- };
707
- containers?: ReadonlyArray<{
708
- class_name?: string;
709
- image?: string;
710
- max_instances?: number;
711
- }>;
712
- /** Top-level exports; only `type: "workflow"` entries map to a binding requirement (see {@link collectWorkflowExports}). */
713
- exports?: Record<string, {
714
- name?: string;
715
- type?: string;
716
- } | null | undefined>;
717
- hyperdrive?: ReadonlyArray<{
718
- binding?: string;
719
- id?: string;
720
- }>;
721
- images?: {
722
- binding?: string;
723
- };
724
- media?: {
725
- binding?: string;
726
- };
727
- /** `pipeline` is wrangler's deprecated spelling of `stream`; both are read. */
728
- pipelines?: ReadonlyArray<{
729
- binding?: string;
730
- pipeline?: string;
731
- stream?: string;
732
- }>;
733
- /** Adds `consumers` — the Alchemy translation models producers only. */
734
- queues?: {
735
- consumers?: ReadonlyArray<{
736
- queue?: string;
737
- }>;
738
- producers?: ReadonlyArray<{
739
- binding?: string;
740
- queue?: string;
741
- }>;
742
- };
743
- /** Service bindings to sibling Workers; `service` is the Worker name. */
744
- services?: ReadonlyArray<{
745
- binding?: string;
746
- entrypoint?: string;
747
- service?: string;
748
- }>;
749
- stream?: {
750
- binding?: string;
751
- };
752
- vectorize?: ReadonlyArray<{
753
- binding?: string;
754
- index_name?: string;
755
- }>;
756
- vpc_networks?: ReadonlyArray<{
757
- binding?: string;
758
- network_id?: string;
759
- tunnel_id?: string;
760
- }>;
761
- vpc_services?: ReadonlyArray<{
762
- binding?: string;
763
- service_id?: string;
764
- }>;
765
- workflows?: ReadonlyArray<{
766
- binding?: string;
767
- class_name?: string;
768
- name?: string;
769
- }>;
770
- }
771
- /**
772
- * Build the manifest for a parsed `wrangler.jsonc`.
773
- *
774
- * Pure: reads nothing and writes nothing, so the caller decides where the
775
- * document lands and the mapping stays testable as a plain object comparison.
776
- *
777
- * Total over any parsed JSON: the config is user-edited and read on every
778
- * `lunora dev` start, so a section of the wrong shape lands in
779
- * {@link BindingManifest.malformed} instead of throwing.
780
- * @param config The parsed, already-reconciled `wrangler.jsonc`.
781
- * @returns the requirements document.
782
- */
783
- declare const buildBindingManifest: (config: ManifestConfigShape) => BindingManifest;
784
196
  /** Env var the once-per-process-tree guard behind {@link warnCloudflareCliConfigOnce} sets. */
785
197
  declare const CLOUDFLARE_CLI_CONFIG_WARNING_ENV = "LUNORA_CF_CONFIG_WARNING_SHOWN";
786
198
  /** A detected Cloudflare CLI config: what was found, and what to do about it. */
@@ -1510,7 +922,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
1510
922
  * `{ valid, errors, warnings }`.
1511
923
  */
1512
924
  declare const validateWrangler: typeof validateWranglerConfig;
1513
- export { type AlchemyTranslation, type AssertWranglerOptions, type AssetHeadersLogger, type AssetHeadersOptions, type AssetHeadersResult, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, DEFAULT_OBSERVABILITY, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type LocalHyperdrive, type Manifest, type ManifestConfigShape, type MaterializeDevOptions, type MaterializeDevResult, type ObservabilitySignalSampling, type ProjectAssetHeadersInput, type ProjectAssetHeadersOutcome, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileBindingsResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemotePlan, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
925
+ export { type AssertWranglerOptions, type AssetHeadersLogger, type AssetHeadersOptions, type AssetHeadersResult, CLOUDFLARE_CLI_CONFIG_WARNING_ENV, CLOUDFLARE_DRIVER, CLOUDFLARE_TOOLCHAIN_VERSIONS, type CloudflareCliConfigFinding, type CloudflareCredentialProbe, type DevConfigKind, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type LocalHyperdrive, type Manifest, type MaterializeDevOptions, type MaterializeDevResult, type ProjectAssetHeadersInput, type ProjectAssetHeadersOutcome, REMOTE_ELIGIBLE_KEYS, REQUIRED_COMPATIBILITY_DATE, REQUIRED_FLAG, type ReadWranglerResult, type ReconcileBindingsResult, type ReconcileCompatibilityDateResult, type ReconcileResult as ReconcileCronsResult, type ReconcileProject, type RemoteBindingPlan, type RemoteEnableInputs, type RemotePlan, type RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WithheldBinding, type WranglerCacheShape, type WranglerCodegenInputs, type WranglerConfig, type WranglerEnvironmentMerge, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport,
1514
926
  /**
1515
927
  * `@lunora/config/cloudflare` — the wrangler layer.
1516
928
  *
@@ -1526,4 +938,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, type AssetHeadersL
1526
938
  * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
1527
939
  * subpath rather than relocating wholesale.
1528
940
  */
1529
- applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, buildBindingManifest, collectExportGaps, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, emitProjectAssetHeaders, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isOwnedStudioAssets, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, pendingBindingChanges, planRemoteBindings, readManifest, readWranglerJsonc, reconcileBindingsSafely, reconcileStudioAssets, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, recordManifestKey, resolveObservabilitySampling, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, toRemotePlan, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, wranglerToAlchemy, writeAssetHeaders };
941
+ applyModify, assertWranglerSatisfiesSchema, bindingsNeedingDatabase, collectExportGaps, describePreservedCrons, describeWithheld, detectCloudflareCliConfig, emitProjectAssetHeaders, findWranglerFile, hasCloudflareCredentials, injectRemoteFlags, isCacheEnabled, isOwnedStudioAssets, isRemoteEnvEnabled, materializeDevWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, pendingBindingChanges, planRemoteBindings, readManifest, readWranglerJsonc, reconcileBindingsSafely, reconcileStudioAssets, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, recordManifestKey, resolveRemoteEnabled, scanWranglerVariablesForSecrets, startLocalHyperdrive, toRemotePlan, validateWrangler, validateWranglerConfig, validateWranglerProject, warnCloudflareCliConfigOnce, withTailConsumer, withheldBindings, wranglerCodegenInputs, writeAssetHeaders };