@lunora/config 1.0.0-alpha.292 → 1.0.0-alpha.294
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/cloudflare/index.d.mts +92 -14
- package/dist/cloudflare/index.d.ts +92 -14
- package/dist/cloudflare/index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/BINDING_MANIFEST_VERSION-CFVuo3vP.mjs +1 -0
- package/dist/packem_shared/GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG-f8CnJha3.mjs +1 -0
- package/dist/packem_shared/REMOTE_ELIGIBLE_KEYS-BYnYe4el.mjs +1 -0
- package/dist/packem_shared/REQUIRED_COMPATIBILITY_DATE-lONKS1B6.mjs +1 -0
- package/dist/packem_shared/{UNEXPORTED_CLASS_MARKER-CugcZbPf.mjs → UNEXPORTED_CLASS_MARKER-D9ZP8mPA.mjs} +1 -1
- package/dist/packem_shared/{assertWranglerSatisfiesSchema-BiABHeMv.mjs → assertWranglerSatisfiesSchema-B-hQPnhP.mjs} +1 -1
- package/dist/packem_shared/collectExportGaps-BRITqV5h.mjs +2 -0
- package/dist/packem_shared/discoverSchemaInfo-BguahM6z.mjs +1 -0
- package/dist/packem_shared/infer-bindings-B3rsAmY_.mjs +1 -0
- package/dist/packem_shared/{schema-info.d-fEhxTb9k.d.mts → infer-bindings.d-Bay0cm0d.d.mts} +76 -54
- package/dist/packem_shared/{schema-info.d-fEhxTb9k.d.ts → infer-bindings.d-Bay0cm0d.d.ts} +76 -54
- package/dist/packem_shared/inferLunoraBindings-QvG5WKjF.mjs +1 -0
- package/dist/packem_shared/materializeServiceDevConfigs-BYuEQ5X3.mjs +1 -0
- package/dist/packem_shared/mergeWranglerEnvironment-CTh4zkEL.mjs +1 -0
- package/dist/packem_shared/reconcileBindingsSafely-DJgj_7Pl.mjs +1 -0
- package/dist/packem_shared/validate-bindings-TA4ZqC4j.mjs +1 -0
- package/dist/packem_shared/withTailConsumer-BK5uzf1W.mjs +1 -0
- package/dist/packem_shared/wranglerToAlchemy-D8bWeHhd.mjs +6 -0
- package/package.json +5 -5
- package/dist/packem_shared/BINDING_MANIFEST_VERSION-vItUTnHk.mjs +0 -1
- package/dist/packem_shared/REMOTE_ELIGIBLE_KEYS-ikHvqvS5.mjs +0 -1
- package/dist/packem_shared/REQUIRED_COMPATIBILITY_DATE-jTnj2MPJ.mjs +0 -1
- package/dist/packem_shared/collectExportGaps-CIYe_DRY.mjs +0 -2
- package/dist/packem_shared/discoverSchemaInfo-DJvevsCm.mjs +0 -1
- package/dist/packem_shared/inferLunoraBindings-DXLEJY9w.mjs +0 -1
- package/dist/packem_shared/mergeWranglerEnvironment-DOKJUNH8.mjs +0 -1
- package/dist/packem_shared/reconcileBindingsSafely-VBbLYoAx.mjs +0 -1
- package/dist/packem_shared/validate-bindings-Dnf1t0SY.mjs +0 -1
- package/dist/packem_shared/withTailConsumer-B1NoKIsj.mjs +0 -1
- package/dist/packem_shared/wranglerToAlchemy-BMOQYRyw.mjs +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/
|
|
1
|
+
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-Bay0cm0d.mjs";
|
|
2
2
|
import { WranglerVariableIR } from '@lunora/codegen';
|
|
3
3
|
/** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
|
|
4
4
|
declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
|
|
@@ -144,14 +144,14 @@ interface BindingRequirement {
|
|
|
144
144
|
* exports it before publishing.
|
|
145
145
|
*/
|
|
146
146
|
className?: string;
|
|
147
|
-
/** Bucket name (`r2`), database name (`d1`), dataset (`analytics_engine`), queue name (`queue`), index (`vectorize`), stream (`pipeline`), namespace (`artifacts`). */
|
|
147
|
+
/** 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`). */
|
|
148
148
|
resource?: string;
|
|
149
149
|
/** Remote resource id, when the config declares one (`d1`, `kv`, `hyperdrive`, `vpc_service`, `vpc_network`). */
|
|
150
150
|
resourceId?: string;
|
|
151
151
|
/** For `durable_object`: whether the class uses SQLite storage (`new_sqlite_classes`). */
|
|
152
152
|
sqlite?: boolean;
|
|
153
153
|
/** The kind of resource, keyed to the wrangler section it came from. */
|
|
154
|
-
type: "ai" | "analytics_engine" | "artifacts" | "assets" | "browser" | "container" | "d1" | "durable_object" | "hyperdrive" | "images" | "kv" | "media" | "pipeline" | "queue_consumer" | "queue_producer" | "r2" | "stream" | "vectorize" | "vpc_network" | "vpc_service" | "workflow";
|
|
154
|
+
type: "ai" | "ai_search" | "ai_search_namespace" | "analytics_engine" | "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";
|
|
155
155
|
}
|
|
156
156
|
/** The document the `lunora build --emit-bindings` flag writes. */
|
|
157
157
|
interface BindingManifest {
|
|
@@ -186,6 +186,14 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
186
186
|
ai?: {
|
|
187
187
|
binding?: string;
|
|
188
188
|
};
|
|
189
|
+
ai_search?: ReadonlyArray<{
|
|
190
|
+
binding?: string;
|
|
191
|
+
instance_name?: string;
|
|
192
|
+
}>;
|
|
193
|
+
ai_search_namespaces?: ReadonlyArray<{
|
|
194
|
+
binding?: string;
|
|
195
|
+
namespace?: string;
|
|
196
|
+
}>;
|
|
189
197
|
analytics_engine_datasets?: ReadonlyArray<{
|
|
190
198
|
binding?: string;
|
|
191
199
|
dataset?: string;
|
|
@@ -238,6 +246,12 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
238
246
|
queue?: string;
|
|
239
247
|
}>;
|
|
240
248
|
};
|
|
249
|
+
/** Service bindings to sibling Workers; `service` is the Worker name. */
|
|
250
|
+
services?: ReadonlyArray<{
|
|
251
|
+
binding?: string;
|
|
252
|
+
entrypoint?: string;
|
|
253
|
+
service?: string;
|
|
254
|
+
}>;
|
|
241
255
|
stream?: {
|
|
242
256
|
binding?: string;
|
|
243
257
|
};
|
|
@@ -271,6 +285,13 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
271
285
|
declare const buildBindingManifest: (config: ManifestConfigShape) => BindingManifest;
|
|
272
286
|
/** The Cloudflare deploy driver. */
|
|
273
287
|
declare const CLOUDFLARE_DRIVER: DeployDriver;
|
|
288
|
+
/**
|
|
289
|
+
* The `global_fetch_strictly_public` compatibility flag: every global `fetch` from
|
|
290
|
+
* the Worker goes out to the public internet, never to a private or special-use
|
|
291
|
+
* address. `workersCimdFetch()` from `@lunora/auth/cimd/workers` refuses to build
|
|
292
|
+
* without it, and `lunora doctor` checks for it wherever that transport is imported.
|
|
293
|
+
*/
|
|
294
|
+
declare const GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG = "global_fetch_strictly_public";
|
|
274
295
|
/**
|
|
275
296
|
* A container/workflow that is declared (so codegen emits its class) but the
|
|
276
297
|
* worker entry never re-exports — the one wiring step the generators can't always
|
|
@@ -511,6 +532,14 @@ declare const REMOTE_ELIGIBLE_KEYS: {
|
|
|
511
532
|
readonly label: "AI";
|
|
512
533
|
readonly shape: "object";
|
|
513
534
|
};
|
|
535
|
+
readonly ai_search: {
|
|
536
|
+
readonly label: "AI Search";
|
|
537
|
+
readonly shape: "array";
|
|
538
|
+
};
|
|
539
|
+
readonly ai_search_namespaces: {
|
|
540
|
+
readonly label: "AI Search namespace";
|
|
541
|
+
readonly shape: "array";
|
|
542
|
+
};
|
|
514
543
|
readonly d1_databases: {
|
|
515
544
|
readonly label: "D1";
|
|
516
545
|
readonly shape: "array";
|
|
@@ -561,6 +590,8 @@ interface RemoteBindingPlan {
|
|
|
561
590
|
/** The structural slice of a wrangler config the remote planner reads. */
|
|
562
591
|
interface RemoteWranglerShape {
|
|
563
592
|
ai?: BindingEntry | null;
|
|
593
|
+
ai_search?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
594
|
+
ai_search_namespaces?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
564
595
|
d1_databases?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
565
596
|
kv_namespaces?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
566
597
|
queues?: {
|
|
@@ -659,6 +690,18 @@ interface RemoteEnableInputs {
|
|
|
659
690
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
660
691
|
*/
|
|
661
692
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
693
|
+
/** The configs to pass as `--config`, in input order, and a disposer for the copies written. */
|
|
694
|
+
interface ServiceDevConfigs {
|
|
695
|
+
/** Unlinks every copy written. Idempotent, never throws — a no-op when none was. */
|
|
696
|
+
cleanup: () => void;
|
|
697
|
+
configPaths: string[];
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Resolve the `--config` path of each service the shared `wrangler dev` session
|
|
701
|
+
* runs, writing a copy only for a service whose custom build would otherwise run
|
|
702
|
+
* in the app's folder (see the module doc).
|
|
703
|
+
*/
|
|
704
|
+
declare const materializeServiceDevConfigs: (wranglerPaths: ReadonlyArray<string>) => ServiceDevConfigs;
|
|
662
705
|
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
663
706
|
interface WranglerDurableObjectBinding {
|
|
664
707
|
class_name?: string;
|
|
@@ -677,6 +720,38 @@ interface TailConsumer {
|
|
|
677
720
|
/** Name of the Worker that consumes tail events. */
|
|
678
721
|
service?: string;
|
|
679
722
|
}
|
|
723
|
+
/**
|
|
724
|
+
* `observability.traces` — Workers Traces. `destinations` names OpenTelemetry
|
|
725
|
+
* export destinations configured in the dashboard; `persist: false` exports
|
|
726
|
+
* without also storing in Cloudflare (default `true`).
|
|
727
|
+
* https://developers.cloudflare.com/workers/observability/opentelemetry-export/
|
|
728
|
+
*/
|
|
729
|
+
interface WranglerObservabilityTraces {
|
|
730
|
+
destinations?: ReadonlyArray<string>;
|
|
731
|
+
enabled?: boolean;
|
|
732
|
+
/** Fraction of requests traced, 0–1. */
|
|
733
|
+
head_sampling_rate?: number;
|
|
734
|
+
persist?: boolean;
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* `observability.logs` — Workers Logs. Same export knobs as traces, plus
|
|
738
|
+
* `invocation_logs` (the per-invocation summary line; default `true`).
|
|
739
|
+
*/
|
|
740
|
+
interface WranglerObservabilityLogs extends WranglerObservabilityTraces {
|
|
741
|
+
invocation_logs?: boolean;
|
|
742
|
+
}
|
|
743
|
+
/** The wrangler `observability` block (Workers Logs + Traces). */
|
|
744
|
+
interface WranglerObservability {
|
|
745
|
+
enabled?: boolean;
|
|
746
|
+
/** Fraction of requests logged, 0–1 (wrangler's default is 1: every request). */
|
|
747
|
+
head_sampling_rate?: number;
|
|
748
|
+
/** Workers Issues — detects and groups production failures. */
|
|
749
|
+
issues?: {
|
|
750
|
+
enabled?: boolean;
|
|
751
|
+
};
|
|
752
|
+
logs?: WranglerObservabilityLogs;
|
|
753
|
+
traces?: WranglerObservabilityTraces;
|
|
754
|
+
}
|
|
680
755
|
/** A wrangler `containers[]` entry (parsed from untrusted JSONC). */
|
|
681
756
|
interface WranglerContainerEntry {
|
|
682
757
|
class_name?: string;
|
|
@@ -734,6 +809,16 @@ interface WranglerConfig {
|
|
|
734
809
|
ai?: {
|
|
735
810
|
binding?: unknown;
|
|
736
811
|
} | null;
|
|
812
|
+
ai_search?: ReadonlyArray<{
|
|
813
|
+
binding?: string;
|
|
814
|
+
instance_name?: string;
|
|
815
|
+
remote?: boolean;
|
|
816
|
+
} | null | undefined>;
|
|
817
|
+
ai_search_namespaces?: ReadonlyArray<{
|
|
818
|
+
binding?: string;
|
|
819
|
+
namespace?: string;
|
|
820
|
+
remote?: boolean;
|
|
821
|
+
} | null | undefined>;
|
|
737
822
|
analytics_engine_datasets?: ReadonlyArray<{
|
|
738
823
|
binding?: string;
|
|
739
824
|
dataset?: string;
|
|
@@ -821,15 +906,7 @@ interface WranglerConfig {
|
|
|
821
906
|
binding?: string;
|
|
822
907
|
certificate_id?: string;
|
|
823
908
|
} | null | undefined>;
|
|
824
|
-
observability?:
|
|
825
|
-
enabled?: boolean;
|
|
826
|
-
head_sampling_rate?: number;
|
|
827
|
-
logs?: {
|
|
828
|
-
enabled?: boolean;
|
|
829
|
-
head_sampling_rate?: number;
|
|
830
|
-
invocation_logs?: boolean;
|
|
831
|
-
};
|
|
832
|
-
};
|
|
909
|
+
observability?: WranglerObservability;
|
|
833
910
|
pipelines?: ReadonlyArray<{
|
|
834
911
|
binding?: string;
|
|
835
912
|
pipeline?: string;
|
|
@@ -848,6 +925,7 @@ interface WranglerConfig {
|
|
|
848
925
|
r2_buckets?: ReadonlyArray<{
|
|
849
926
|
binding?: string;
|
|
850
927
|
bucket_name?: string;
|
|
928
|
+
jurisdiction?: string;
|
|
851
929
|
} | null | undefined>;
|
|
852
930
|
secrets?: {
|
|
853
931
|
required?: unknown;
|
|
@@ -1046,7 +1124,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
|
|
|
1046
1124
|
* `{ valid, errors, warnings }`.
|
|
1047
1125
|
*/
|
|
1048
1126
|
declare const validateWrangler: typeof validateWranglerConfig;
|
|
1049
|
-
export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap, type ManifestConfigShape, type MaterializeOptions, type MaterializeResult, 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 RemoteWranglerShape, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WranglerCacheShape, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
|
|
1127
|
+
export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type ManifestConfigShape, type MaterializeOptions, type MaterializeResult, 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 RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WranglerCacheShape, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
|
|
1050
1128
|
/**
|
|
1051
1129
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
1052
1130
|
*
|
|
@@ -1062,4 +1140,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
|
|
|
1062
1140
|
* Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
|
|
1063
1141
|
* subpath rather than relocating wholesale.
|
|
1064
1142
|
*/
|
|
1065
|
-
applyModify, assertWranglerSatisfiesSchema, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
|
|
1143
|
+
applyModify, assertWranglerSatisfiesSchema, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/
|
|
1
|
+
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-Bay0cm0d.js";
|
|
2
2
|
import { WranglerVariableIR } from '@lunora/codegen';
|
|
3
3
|
/** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
|
|
4
4
|
declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
|
|
@@ -144,14 +144,14 @@ interface BindingRequirement {
|
|
|
144
144
|
* exports it before publishing.
|
|
145
145
|
*/
|
|
146
146
|
className?: string;
|
|
147
|
-
/** Bucket name (`r2`), database name (`d1`), dataset (`analytics_engine`), queue name (`queue`), index (`vectorize`), stream (`pipeline`), namespace (`artifacts`). */
|
|
147
|
+
/** 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`). */
|
|
148
148
|
resource?: string;
|
|
149
149
|
/** Remote resource id, when the config declares one (`d1`, `kv`, `hyperdrive`, `vpc_service`, `vpc_network`). */
|
|
150
150
|
resourceId?: string;
|
|
151
151
|
/** For `durable_object`: whether the class uses SQLite storage (`new_sqlite_classes`). */
|
|
152
152
|
sqlite?: boolean;
|
|
153
153
|
/** The kind of resource, keyed to the wrangler section it came from. */
|
|
154
|
-
type: "ai" | "analytics_engine" | "artifacts" | "assets" | "browser" | "container" | "d1" | "durable_object" | "hyperdrive" | "images" | "kv" | "media" | "pipeline" | "queue_consumer" | "queue_producer" | "r2" | "stream" | "vectorize" | "vpc_network" | "vpc_service" | "workflow";
|
|
154
|
+
type: "ai" | "ai_search" | "ai_search_namespace" | "analytics_engine" | "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";
|
|
155
155
|
}
|
|
156
156
|
/** The document the `lunora build --emit-bindings` flag writes. */
|
|
157
157
|
interface BindingManifest {
|
|
@@ -186,6 +186,14 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
186
186
|
ai?: {
|
|
187
187
|
binding?: string;
|
|
188
188
|
};
|
|
189
|
+
ai_search?: ReadonlyArray<{
|
|
190
|
+
binding?: string;
|
|
191
|
+
instance_name?: string;
|
|
192
|
+
}>;
|
|
193
|
+
ai_search_namespaces?: ReadonlyArray<{
|
|
194
|
+
binding?: string;
|
|
195
|
+
namespace?: string;
|
|
196
|
+
}>;
|
|
189
197
|
analytics_engine_datasets?: ReadonlyArray<{
|
|
190
198
|
binding?: string;
|
|
191
199
|
dataset?: string;
|
|
@@ -238,6 +246,12 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
238
246
|
queue?: string;
|
|
239
247
|
}>;
|
|
240
248
|
};
|
|
249
|
+
/** Service bindings to sibling Workers; `service` is the Worker name. */
|
|
250
|
+
services?: ReadonlyArray<{
|
|
251
|
+
binding?: string;
|
|
252
|
+
entrypoint?: string;
|
|
253
|
+
service?: string;
|
|
254
|
+
}>;
|
|
241
255
|
stream?: {
|
|
242
256
|
binding?: string;
|
|
243
257
|
};
|
|
@@ -271,6 +285,13 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
271
285
|
declare const buildBindingManifest: (config: ManifestConfigShape) => BindingManifest;
|
|
272
286
|
/** The Cloudflare deploy driver. */
|
|
273
287
|
declare const CLOUDFLARE_DRIVER: DeployDriver;
|
|
288
|
+
/**
|
|
289
|
+
* The `global_fetch_strictly_public` compatibility flag: every global `fetch` from
|
|
290
|
+
* the Worker goes out to the public internet, never to a private or special-use
|
|
291
|
+
* address. `workersCimdFetch()` from `@lunora/auth/cimd/workers` refuses to build
|
|
292
|
+
* without it, and `lunora doctor` checks for it wherever that transport is imported.
|
|
293
|
+
*/
|
|
294
|
+
declare const GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG = "global_fetch_strictly_public";
|
|
274
295
|
/**
|
|
275
296
|
* A container/workflow that is declared (so codegen emits its class) but the
|
|
276
297
|
* worker entry never re-exports — the one wiring step the generators can't always
|
|
@@ -511,6 +532,14 @@ declare const REMOTE_ELIGIBLE_KEYS: {
|
|
|
511
532
|
readonly label: "AI";
|
|
512
533
|
readonly shape: "object";
|
|
513
534
|
};
|
|
535
|
+
readonly ai_search: {
|
|
536
|
+
readonly label: "AI Search";
|
|
537
|
+
readonly shape: "array";
|
|
538
|
+
};
|
|
539
|
+
readonly ai_search_namespaces: {
|
|
540
|
+
readonly label: "AI Search namespace";
|
|
541
|
+
readonly shape: "array";
|
|
542
|
+
};
|
|
514
543
|
readonly d1_databases: {
|
|
515
544
|
readonly label: "D1";
|
|
516
545
|
readonly shape: "array";
|
|
@@ -561,6 +590,8 @@ interface RemoteBindingPlan {
|
|
|
561
590
|
/** The structural slice of a wrangler config the remote planner reads. */
|
|
562
591
|
interface RemoteWranglerShape {
|
|
563
592
|
ai?: BindingEntry | null;
|
|
593
|
+
ai_search?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
594
|
+
ai_search_namespaces?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
564
595
|
d1_databases?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
565
596
|
kv_namespaces?: ReadonlyArray<BindingEntry | null | undefined>;
|
|
566
597
|
queues?: {
|
|
@@ -659,6 +690,18 @@ interface RemoteEnableInputs {
|
|
|
659
690
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
660
691
|
*/
|
|
661
692
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
693
|
+
/** The configs to pass as `--config`, in input order, and a disposer for the copies written. */
|
|
694
|
+
interface ServiceDevConfigs {
|
|
695
|
+
/** Unlinks every copy written. Idempotent, never throws — a no-op when none was. */
|
|
696
|
+
cleanup: () => void;
|
|
697
|
+
configPaths: string[];
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Resolve the `--config` path of each service the shared `wrangler dev` session
|
|
701
|
+
* runs, writing a copy only for a service whose custom build would otherwise run
|
|
702
|
+
* in the app's folder (see the module doc).
|
|
703
|
+
*/
|
|
704
|
+
declare const materializeServiceDevConfigs: (wranglerPaths: ReadonlyArray<string>) => ServiceDevConfigs;
|
|
662
705
|
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
663
706
|
interface WranglerDurableObjectBinding {
|
|
664
707
|
class_name?: string;
|
|
@@ -677,6 +720,38 @@ interface TailConsumer {
|
|
|
677
720
|
/** Name of the Worker that consumes tail events. */
|
|
678
721
|
service?: string;
|
|
679
722
|
}
|
|
723
|
+
/**
|
|
724
|
+
* `observability.traces` — Workers Traces. `destinations` names OpenTelemetry
|
|
725
|
+
* export destinations configured in the dashboard; `persist: false` exports
|
|
726
|
+
* without also storing in Cloudflare (default `true`).
|
|
727
|
+
* https://developers.cloudflare.com/workers/observability/opentelemetry-export/
|
|
728
|
+
*/
|
|
729
|
+
interface WranglerObservabilityTraces {
|
|
730
|
+
destinations?: ReadonlyArray<string>;
|
|
731
|
+
enabled?: boolean;
|
|
732
|
+
/** Fraction of requests traced, 0–1. */
|
|
733
|
+
head_sampling_rate?: number;
|
|
734
|
+
persist?: boolean;
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* `observability.logs` — Workers Logs. Same export knobs as traces, plus
|
|
738
|
+
* `invocation_logs` (the per-invocation summary line; default `true`).
|
|
739
|
+
*/
|
|
740
|
+
interface WranglerObservabilityLogs extends WranglerObservabilityTraces {
|
|
741
|
+
invocation_logs?: boolean;
|
|
742
|
+
}
|
|
743
|
+
/** The wrangler `observability` block (Workers Logs + Traces). */
|
|
744
|
+
interface WranglerObservability {
|
|
745
|
+
enabled?: boolean;
|
|
746
|
+
/** Fraction of requests logged, 0–1 (wrangler's default is 1: every request). */
|
|
747
|
+
head_sampling_rate?: number;
|
|
748
|
+
/** Workers Issues — detects and groups production failures. */
|
|
749
|
+
issues?: {
|
|
750
|
+
enabled?: boolean;
|
|
751
|
+
};
|
|
752
|
+
logs?: WranglerObservabilityLogs;
|
|
753
|
+
traces?: WranglerObservabilityTraces;
|
|
754
|
+
}
|
|
680
755
|
/** A wrangler `containers[]` entry (parsed from untrusted JSONC). */
|
|
681
756
|
interface WranglerContainerEntry {
|
|
682
757
|
class_name?: string;
|
|
@@ -734,6 +809,16 @@ interface WranglerConfig {
|
|
|
734
809
|
ai?: {
|
|
735
810
|
binding?: unknown;
|
|
736
811
|
} | null;
|
|
812
|
+
ai_search?: ReadonlyArray<{
|
|
813
|
+
binding?: string;
|
|
814
|
+
instance_name?: string;
|
|
815
|
+
remote?: boolean;
|
|
816
|
+
} | null | undefined>;
|
|
817
|
+
ai_search_namespaces?: ReadonlyArray<{
|
|
818
|
+
binding?: string;
|
|
819
|
+
namespace?: string;
|
|
820
|
+
remote?: boolean;
|
|
821
|
+
} | null | undefined>;
|
|
737
822
|
analytics_engine_datasets?: ReadonlyArray<{
|
|
738
823
|
binding?: string;
|
|
739
824
|
dataset?: string;
|
|
@@ -821,15 +906,7 @@ interface WranglerConfig {
|
|
|
821
906
|
binding?: string;
|
|
822
907
|
certificate_id?: string;
|
|
823
908
|
} | null | undefined>;
|
|
824
|
-
observability?:
|
|
825
|
-
enabled?: boolean;
|
|
826
|
-
head_sampling_rate?: number;
|
|
827
|
-
logs?: {
|
|
828
|
-
enabled?: boolean;
|
|
829
|
-
head_sampling_rate?: number;
|
|
830
|
-
invocation_logs?: boolean;
|
|
831
|
-
};
|
|
832
|
-
};
|
|
909
|
+
observability?: WranglerObservability;
|
|
833
910
|
pipelines?: ReadonlyArray<{
|
|
834
911
|
binding?: string;
|
|
835
912
|
pipeline?: string;
|
|
@@ -848,6 +925,7 @@ interface WranglerConfig {
|
|
|
848
925
|
r2_buckets?: ReadonlyArray<{
|
|
849
926
|
binding?: string;
|
|
850
927
|
bucket_name?: string;
|
|
928
|
+
jurisdiction?: string;
|
|
851
929
|
} | null | undefined>;
|
|
852
930
|
secrets?: {
|
|
853
931
|
required?: unknown;
|
|
@@ -1046,7 +1124,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
|
|
|
1046
1124
|
* `{ valid, errors, warnings }`.
|
|
1047
1125
|
*/
|
|
1048
1126
|
declare const validateWrangler: typeof validateWranglerConfig;
|
|
1049
|
-
export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap, type ManifestConfigShape, type MaterializeOptions, type MaterializeResult, 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 RemoteWranglerShape, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WranglerCacheShape, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
|
|
1127
|
+
export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_VERSION, type BindingManifest, type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap, GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG, type ManifestConfigShape, type MaterializeOptions, type MaterializeResult, 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 RemoteWranglerShape, type ServiceDevConfigs, type TailConsumer, UNEXPORTED_CLASS_MARKER, WORKERS_CACHE_MIN_DATE, WRANGLER_FILES, type WranglerCacheShape, type WranglerConfig, type WranglerConfigShape, type WranglerContainerEntry, type WranglerEnvironmentMerge, type WranglerObservability, type WranglerObservabilityLogs, type WranglerObservabilityTraces, type WranglerProjectValidationOptions, type WranglerProjectValidationResult, type WranglerValidationReport, type WranglerWorkflowEntry,
|
|
1050
1128
|
/**
|
|
1051
1129
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
1052
1130
|
*
|
|
@@ -1062,4 +1140,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
|
|
|
1062
1140
|
* Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
|
|
1063
1141
|
* subpath rather than relocating wholesale.
|
|
1064
1142
|
*/
|
|
1065
|
-
applyModify, assertWranglerSatisfiesSchema, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
|
|
1143
|
+
applyModify, assertWranglerSatisfiesSchema, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, materializeServiceDevConfigs, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileBindingsSafely, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, reconcileWranglerExtras, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as n}from"../packem_shared/assertWranglerSatisfiesSchema-
|
|
1
|
+
import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as n}from"../packem_shared/assertWranglerSatisfiesSchema-B-hQPnhP.mjs";import{BINDING_MANIFEST_VERSION as l,buildBindingManifest as i}from"../packem_shared/BINDING_MANIFEST_VERSION-CFVuo3vP.mjs";import{default as E}from"../packem_shared/CLOUDFLARE_DRIVER-Ci3VIqnk.mjs";import{default as s}from"../packem_shared/GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG-f8CnJha3.mjs";import{collectExportGaps as p,reconcileWranglerBindings as g}from"../packem_shared/collectExportGaps-BRITqV5h.mjs";import{reconcileWranglerCompatibilityDate as x}from"../packem_shared/reconcileWranglerCompatibilityDate-hocXEuRA.mjs";import{describePreservedCrons as _,reconcileWranglerCrons as C}from"../packem_shared/describePreservedCrons-7gaDLxWx.mjs";import{reconcileBindingsSafely as W,reconcileWranglerExtras as L}from"../packem_shared/reconcileBindingsSafely-DJgj_7Pl.mjs";import{REMOTE_ELIGIBLE_KEYS as A,injectRemoteFlags as T,isRemoteEnvEnabled as D,materializeRemoteWranglerConfig as v,planRemoteBindings as B,resolveRemoteEnabled as F}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-BYnYe4el.mjs";import{materializeServiceDevConfigs as G}from"../packem_shared/materializeServiceDevConfigs-BYuEQ5X3.mjs";import{withTailConsumer as N}from"../packem_shared/withTailConsumer-BK5uzf1W.mjs";import{WORKERS_CACHE_MIN_DATE as y,isCacheEnabled as P}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{mergeWranglerEnvironment as h}from"../packem_shared/mergeWranglerEnvironment-CTh4zkEL.mjs";import{WRANGLER_FILES as V,findWranglerFile as K,readWranglerJsonc as Y}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as w,validateWranglerProject as z}from"../packem_shared/UNEXPORTED_CLASS_MARKER-D9ZP8mPA.mjs";import{collectWranglerSecretVariables as Q,scanWranglerVariablesForSecrets as J}from"../packem_shared/collectWranglerSecretVariables-D-usPfT8.mjs";import{wranglerToAlchemy as k}from"../packem_shared/wranglerToAlchemy-D8bWeHhd.mjs";import{REQUIRED_COMPATIBILITY_DATE as Z,REQUIRED_FLAG as $,validateWrangler as ee,validateWranglerConfig as re}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-lONKS1B6.mjs";export{l as BINDING_MANIFEST_VERSION,E as CLOUDFLARE_DRIVER,s as GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG,A as REMOTE_ELIGIBLE_KEYS,Z as REQUIRED_COMPATIBILITY_DATE,$ as REQUIRED_FLAG,w as UNEXPORTED_CLASS_MARKER,y as WORKERS_CACHE_MIN_DATE,V as WRANGLER_FILES,o as applyModify,n as assertWranglerSatisfiesSchema,i as buildBindingManifest,p as collectExportGaps,Q as collectWranglerSecretVariables,_ as describePreservedCrons,K as findWranglerFile,T as injectRemoteFlags,P as isCacheEnabled,D as isRemoteEnvEnabled,v as materializeRemoteWranglerConfig,G as materializeServiceDevConfigs,h as mergeWranglerEnvironment,B as planRemoteBindings,Y as readWranglerJsonc,W as reconcileBindingsSafely,g as reconcileWranglerBindings,x as reconcileWranglerCompatibilityDate,C as reconcileWranglerCrons,L as reconcileWranglerExtras,F as resolveRemoteEnabled,J as scanWranglerVariablesForSecrets,ee as validateWrangler,re as validateWranglerConfig,z as validateWranglerProject,N as withTailConsumer,k as wranglerToAlchemy};
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen
|
|
|
2
2
|
export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
|
|
3
3
|
import { ChildProcess } from 'node:child_process';
|
|
4
4
|
import { Writable } from 'node:stream';
|
|
5
|
-
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/
|
|
6
|
-
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/
|
|
5
|
+
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/infer-bindings.d-Bay0cm0d.mjs";
|
|
6
|
+
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/infer-bindings.d-Bay0cm0d.mjs";
|
|
7
7
|
export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.mjs";
|
|
8
8
|
interface DiscoverAgentInfoResult {
|
|
9
9
|
/** Discovered agent definitions; `[]` when none are declared or parsing failed. */
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen
|
|
|
2
2
|
export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
|
|
3
3
|
import { ChildProcess } from 'node:child_process';
|
|
4
4
|
import { Writable } from 'node:stream';
|
|
5
|
-
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/
|
|
6
|
-
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/
|
|
5
|
+
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/infer-bindings.d-Bay0cm0d.js";
|
|
6
|
+
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/infer-bindings.d-Bay0cm0d.js";
|
|
7
7
|
export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.js";
|
|
8
8
|
interface DiscoverAgentInfoResult {
|
|
9
9
|
/** Discovered agent definitions; `[]` when none are declared or parsing failed. */
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as s}from"./packem_shared/discoverAgentInfo-CTdCSfYM.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as l,LUNORA_SKILL_NAMES as p,ROOT_SKILL_NAME as _,claimAgentRulesHint as c,detectAgentRules as d}from"./packem_shared/AGENT_RULES_DIR-C54Ta_vz.mjs";import{startCelldDevSession as m}from"./packem_shared/startCelldDevSession-BLFsd6jG.mjs";import{CODEGEN_ENV as S,isCodegenDisabled as f}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as L}from"./packem_shared/discoverContainerInfo-EhZtEBQs.mjs";import{streamContainerLogs as R}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as T,projectUsesUmbrella as x,readProjectDependencyNames as V}from"./packem_shared/detectFramework-CUiVEHDQ.mjs";import{acceptsConnection as P,startDevProcess as u}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as F,DEV_DAEMON_ENV as C,DEV_HANDOFF_ENV as U,DEV_LOG_FILE as G,DEV_LOG_FILE_ENV as b,DEV_STATE_DIR as M,DEV_STATE_FILE as y,claimDevServerState as k,clearDevServerState as B,isDevServerReady as K,isProcessAlive as w,isRecordedProcessCurrent as h,readDevServerState as j,readLiveDevServerState as H,updateDevServerState as W,writeDevServerState as Y}from"./packem_shared/DEV_BINDINGS_FILE-pyOiNLP4.mjs";import{DEV_VARS_EXAMPLE_FILE as q,DEV_VARS_FILE as X,DEV_VARS_KEY_PATTERN as z,escapeRegExp as Q,parseDevVariableEntries as Z,removeDevVariableLine as $,upsertDevVariableLine as ee}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as oe,DEV_WORKER_ENV_VAR as te,ensureDevWorkerEnv as ae}from"./packem_shared/DEV_WORKER_ENV_VALUE-DwGANZVw.mjs";import{DEFAULT_DEPLOY_TARGET as Ee,deployTargetIds as ie,isRunnableTarget as ne,planToolchainInvocation as le,resolveDeployDriver as pe,runnableTargetIds as _e,targetRunsOwnDevServer as ce}from"./packem_shared/DEFAULT_DEPLOY_TARGET-CfoV0tDu.mjs";import{
|
|
1
|
+
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as s}from"./packem_shared/discoverAgentInfo-CTdCSfYM.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as l,LUNORA_SKILL_NAMES as p,ROOT_SKILL_NAME as _,claimAgentRulesHint as c,detectAgentRules as d}from"./packem_shared/AGENT_RULES_DIR-C54Ta_vz.mjs";import{startCelldDevSession as m}from"./packem_shared/startCelldDevSession-BLFsd6jG.mjs";import{CODEGEN_ENV as S,isCodegenDisabled as f}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as L}from"./packem_shared/discoverContainerInfo-EhZtEBQs.mjs";import{streamContainerLogs as R}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as T,projectUsesUmbrella as x,readProjectDependencyNames as V}from"./packem_shared/detectFramework-CUiVEHDQ.mjs";import{acceptsConnection as P,startDevProcess as u}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as F,DEV_DAEMON_ENV as C,DEV_HANDOFF_ENV as U,DEV_LOG_FILE as G,DEV_LOG_FILE_ENV as b,DEV_STATE_DIR as M,DEV_STATE_FILE as y,claimDevServerState as k,clearDevServerState as B,isDevServerReady as K,isProcessAlive as w,isRecordedProcessCurrent as h,readDevServerState as j,readLiveDevServerState as H,updateDevServerState as W,writeDevServerState as Y}from"./packem_shared/DEV_BINDINGS_FILE-pyOiNLP4.mjs";import{DEV_VARS_EXAMPLE_FILE as q,DEV_VARS_FILE as X,DEV_VARS_KEY_PATTERN as z,escapeRegExp as Q,parseDevVariableEntries as Z,removeDevVariableLine as $,upsertDevVariableLine as ee}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as oe,DEV_WORKER_ENV_VAR as te,ensureDevWorkerEnv as ae}from"./packem_shared/DEV_WORKER_ENV_VALUE-DwGANZVw.mjs";import{DEFAULT_DEPLOY_TARGET as Ee,deployTargetIds as ie,isRunnableTarget as ne,planToolchainInvocation as le,resolveDeployDriver as pe,runnableTargetIds as _e,targetRunsOwnDevServer as ce}from"./packem_shared/DEFAULT_DEPLOY_TARGET-CfoV0tDu.mjs";import{i as De,p as me}from"./packem_shared/infer-bindings-B3rsAmY_.mjs";import{LINKED_PROJECT_DIR as Se,LINKED_PROJECT_FILE as fe,readLinkedProject as ve,writeLinkedProject as Le}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as Re,applyLintIgnores as ge,detectLintTools as Te}from"./packem_shared/LUNORA_IGNORED_PATHS-B0-PPvRp.mjs";import{LUNORA_TAG as Ve,advisoryLine as Ie,blockingFindingsMessage as Pe,lunoraLine as ue,reportCodegenFindings as Oe}from"./packem_shared/LUNORA_TAG-CiQM3BkI.mjs";import{LUNORA_EVENT_SOURCE as Ce,formatLunoraEvent as Ue}from"./packem_shared/LUNORA_EVENT_SOURCE-DYdcDU9G.mjs";import{default as be}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as ye,detectInstalledManagers as ke,detectPackageManager as Be,execArgsFor as Ke,installArgsFor as we,runScriptArgsFor as he,runScriptCommand as je,toolchainExecArgs as He}from"./packem_shared/addArgsFor-CYZKhNIo.mjs";import{P as Ye,s as Je}from"./packem_shared/package-secrets-registry-DvtTiK4b.mjs";import{runPostCodegenHook as Xe}from"./packem_shared/runPostCodegenHook-B0T1q2YI.mjs";import{interpretRemote as Qe,readProjectRemotePreference as Ze,readProjectTarget as $e,resolveProjectTarget as er,resolveTargetOrThrow as rr}from"./packem_shared/interpretRemote-C9yJC_ZK.mjs";import{createConfirm as tr,isInteractive as ar,promptMultiSelect as sr,promptSelect as Er,promptText as ir,promptYesNo as nr}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{buildPackageSecretsBlock as pr,ensureDevVariables as _r,ensureDevVarsExample as cr,fillDevSecrets as dr,generateSecretValue as Dr,isMintableSecretKey as mr,isPlaceholderValue as Ar,planDevSecretsFill as Sr,planDevVariablesAugment as fr,planDevVariablesScaffold as vr,requiredSecrets as Lr,writeDevVariablesFileAtomically as Nr}from"./packem_shared/buildPackageSecretsBlock-yv9mjKEW.mjs";import{applyAdditiveEdit as gr,classifyEdit as Tr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as Vr}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as Pr,resolveServerModule as ur,scaffoldPolicyFile as Or,wireRlsIntoProcedure as Fr}from"./packem_shared/classifyPolicyEdit-D8NwrHxR.mjs";import{discoverSchemaInfo as Ur}from"./packem_shared/discoverSchemaInfo-BguahM6z.mjs";import{ACCENT as br,BADGES as Mr,BADGE_COLUMN_WIDTH as yr,LUNA_ART as kr,LUNA_BUNNY as Br,LUNA_NAME as Kr,LUNA_SIGNOFF as wr,STEP_BADGE_NAMES as hr,badgeLead as jr,badgeWidth as Hr,padBadge as Wr,paintAnswer as Yr,paintBadge as Jr}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{COMPOSED_WORKER_ENTRY as Xr,GENERATED_CLASS_MODULES as zr}from"./packem_shared/COMPOSED_WORKER_ENTRY-C69wqbSP.mjs";import{discoverWorkflowInfo as Zr}from"./packem_shared/discoverWorkflowInfo-BsPvlo6O.mjs";export{br as ACCENT,o as AGENT_MODE_ENV,i as AGENT_RULES_DIR,n as AGENT_RULES_HINT,l as AGENT_RULES_HINT_ENV,Mr as BADGES,yr as BADGE_COLUMN_WIDTH,S as CODEGEN_ENV,Xr as COMPOSED_WORKER_ENTRY,Ee as DEFAULT_DEPLOY_TARGET,F as DEV_BINDINGS_FILE,C as DEV_DAEMON_ENV,U as DEV_HANDOFF_ENV,G as DEV_LOG_FILE,b as DEV_LOG_FILE_ENV,M as DEV_STATE_DIR,y as DEV_STATE_FILE,q as DEV_VARS_EXAMPLE_FILE,X as DEV_VARS_FILE,z as DEV_VARS_KEY_PATTERN,oe as DEV_WORKER_ENV_VALUE,te as DEV_WORKER_ENV_VAR,zr as GENERATED_CLASS_MODULES,Se as LINKED_PROJECT_DIR,fe as LINKED_PROJECT_FILE,kr as LUNA_ART,Br as LUNA_BUNNY,Kr as LUNA_NAME,wr as LUNA_SIGNOFF,Ce as LUNORA_EVENT_SOURCE,Re as LUNORA_IGNORED_PATHS,p as LUNORA_SKILL_NAMES,Ve as LUNORA_TAG,be as LunoraReporter,Ye as PACKAGE_SECRETS_REGISTRY,_ as ROOT_SKILL_NAME,hr as STEP_BADGE_NAMES,P as acceptsConnection,ye as addArgsFor,Ie as advisoryLine,gr as applyAdditiveEdit,ge as applyLintIgnores,jr as badgeLead,Hr as badgeWidth,Pe as blockingFindingsMessage,pr as buildPackageSecretsBlock,c as claimAgentRulesHint,k as claimDevServerState,Tr as classifyEdit,Pr as classifyPolicyEdit,B as clearDevServerState,tr as createConfirm,ie as deployTargetIds,d as detectAgentRules,t as detectAiAgent,T as detectFramework,ke as detectInstalledManagers,Te as detectLintTools,Be as detectPackageManager,s as discoverAgentInfo,L as discoverContainerInfo,Ur as discoverSchemaInfo,Zr as discoverWorkflowInfo,_r as ensureDevVariables,cr as ensureDevVarsExample,ae as ensureDevWorkerEnv,Q as escapeRegExp,Ke as execArgsFor,dr as fillDevSecrets,Ue as formatLunoraEvent,Dr as generateSecretValue,De as inferLunoraBindings,we as installArgsFor,Qe as interpretRemote,f as isCodegenDisabled,K as isDevServerReady,ar as isInteractive,mr as isMintableSecretKey,Ar as isPlaceholderValue,w as isProcessAlive,h as isRecordedProcessCurrent,ne as isRunnableTarget,ue as lunoraLine,me as packageNamesFromBindings,Wr as padBadge,Yr as paintAnswer,Jr as paintBadge,Z as parseDevVariableEntries,Vr as parseSchema,Sr as planDevSecretsFill,fr as planDevVariablesAugment,vr as planDevVariablesScaffold,le as planToolchainInvocation,x as projectUsesUmbrella,sr as promptMultiSelect,Er as promptSelect,ir as promptText,nr as promptYesNo,j as readDevServerState,ve as readLinkedProject,H as readLiveDevServerState,V as readProjectDependencyNames,Ze as readProjectRemotePreference,$e as readProjectTarget,$ as removeDevVariableLine,Oe as reportCodegenFindings,Lr as requiredSecrets,pe as resolveDeployDriver,er as resolveProjectTarget,ur as resolveServerModule,rr as resolveTargetOrThrow,Xe as runPostCodegenHook,he as runScriptArgsFor,je as runScriptCommand,_e as runnableTargetIds,Or as scaffoldPolicyFile,Je as secretsForPackages,m as startCelldDevSession,u as startDevProcess,R as streamContainerLogs,ce as targetRunsOwnDevServer,He as toolchainExecArgs,W as updateDevServerState,ee as upsertDevVariableLine,Fr as wireRlsIntoProcedure,Y as writeDevServerState,Nr as writeDevVariablesFileAtomically,Le as writeLinkedProject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sqliteClasses as u}from"./wranglerToAlchemy-D8bWeHhd.mjs";const l=1,p=new Set(["$schema","account_id","compatibility_date","compatibility_flags","keep_vars","main","migrations","minify","name","observability","placement","routes","rules","secrets","triggers","upload_source_maps","vars","workers_dev"]),y=e=>Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0)),d=[{bindingKey:"binding",field:"ai_search",resourceKey:"instance_name",type:"ai_search"},{bindingKey:"binding",field:"ai_search_namespaces",resourceKey:"namespace",type:"ai_search_namespace"},{bindingKey:"binding",field:"analytics_engine_datasets",resourceKey:"dataset",type:"analytics_engine"},{bindingKey:"binding",field:"artifacts",resourceKey:"namespace",type:"artifacts"},{bindingKey:"class_name",field:"containers",resourceKey:"image",type:"container"},{bindingKey:"binding",field:"d1_databases",resourceIdKey:"database_id",resourceKey:"database_name",type:"d1"},{bindingKey:"binding",field:"hyperdrive",resourceIdKey:"id",type:"hyperdrive"},{bindingKey:"binding",field:"kv_namespaces",resourceIdKey:"id",type:"kv"},{bindingKey:"binding",field:"pipelines",resourceKey:["stream","pipeline"],type:"pipeline"},{bindingKey:"binding",field:"r2_buckets",resourceKey:"bucket_name",type:"r2"},{bindingKey:"binding",field:"services",resourceKey:"service",type:"service"},{bindingKey:"binding",field:"vectorize",resourceKey:"index_name",type:"vectorize"},{bindingKey:"binding",field:"vpc_networks",resourceIdKey:["tunnel_id","network_id"],type:"vpc_network"},{bindingKey:"binding",field:"vpc_services",resourceIdKey:"service_id",type:"vpc_service"},{bindingKey:"binding",field:"workflows",resourceKey:"name",type:"workflow"}],c=[{field:"ai",type:"ai"},{field:"assets",type:"assets"},{field:"browser",type:"browser"},{field:"images",type:"images"},{field:"media",type:"media"},{field:"stream",type:"stream"}],b=new Set([...d.map(e=>e.field),...c.map(e=>e.field),"durable_objects","exports","queues"]),a=(e,n)=>(typeof n=="string"?[n]:n??[]).map(i=>e[i]).find(i=>typeof i=="string"&&i!==""),m=(e,n)=>{const s=[];for(const i of d)for(const r of e[i.field]??[]){const t=a(r,i.bindingKey);if(t===void 0){n.push(i.field);continue}s.push({binding:t,className:a(r,"class_name"),resource:a(r,i.resourceKey),resourceId:a(r,i.resourceIdKey),type:i.type})}return s},_=(e,n)=>{const s=u(e),i=[];for(const r of e.durable_objects?.bindings??[]){if(r.name===void 0||r.name===""){n.push("durable_objects");continue}i.push({binding:r.name,className:r.class_name,sqlite:r.script_name===void 0&&r.class_name!==void 0?s.has(r.class_name):void 0,type:"durable_object"})}return i},g=(e,n)=>{const s=[];for(const i of e.queues?.producers??[]){if(i.binding===void 0||i.binding===""){n.push("queues.producers");continue}s.push({binding:i.binding,resource:i.queue,type:"queue_producer"})}for(const i of e.queues?.consumers??[]){if(i.queue===void 0||i.queue===""){n.push("queues.consumers");continue}s.push({binding:i.queue,resource:i.queue,type:"queue_consumer"})}return s},f=(e,n)=>Object.entries(e.exports??{}).flatMap(([s,i])=>i?.type!=="workflow"?(n.push(`exports.${s}`),[]):[{binding:s,className:s,resource:i.name,type:"workflow"}]),v=(e,n,s)=>[...f(e,s),...m(e,n),..._(e,n),...g(e,n),...c.filter(i=>e[i.field]?.binding!==void 0).map(i=>({binding:e[i.field]?.binding,type:i.type}))],h=e=>{const n=[],s=[],i=v(e,n,s).map(t=>y(t)).toSorted((t,o)=>t.type.localeCompare(o.type)||t.binding.localeCompare(o.binding)),r=[...Object.keys(e).filter(t=>!p.has(t)&&!b.has(t)),...n.map(t=>`${t} (entry with no binding name)`),...s].toSorted((t,o)=>t.localeCompare(o));return{bindings:i,...e.compatibility_date===void 0?{}:{compatibilityDate:e.compatibility_date},...e.compatibility_flags===void 0?{}:{compatibilityFlags:e.compatibility_flags},crons:e.triggers?.crons??[],...e.name===void 0?{}:{name:e.name},unknown:r,vars:Object.keys(e.vars??{}).toSorted((t,o)=>t.localeCompare(o)),version:l}};export{l as BINDING_MANIFEST_VERSION,h as buildBindingManifest};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _="global_fetch_strictly_public";export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{writeFileSync as f,rmSync as m}from"node:fs";import{applyModify as g}from"./applyModify-DKP2l6S9.mjs";import{r as b}from"./lunora-manifest-v90ZUbVp.mjs";import{o as h}from"./reconcile-services-3dn35zgy.mjs";import{findWranglerFile as y,readWranglerJsonc as v}from"./WRANGLER_FILES-UNW-xY5u.mjs";import{join as E}from"node:path";const p={ai:{label:"AI",shape:"object"},ai_search:{label:"AI Search",shape:"array"},ai_search_namespaces:{label:"AI Search namespace",shape:"array"},d1_databases:{label:"D1",shape:"array"},kv_namespaces:{label:"KV",shape:"array"},queues:{label:"Queue",shape:"producers"},r2_buckets:{label:"R2",shape:"array"},services:{label:"Service",shape:"array"},vectorize:{label:"Vectorize",shape:"array"}},S=Object.keys(p),d=(e,r)=>typeof e.binding=="string"?e.binding:r,c=(e,r,n,t)=>{const a=[];for(const[o,s]of r.entries())s!=null&&a.push({binding:d(s,`#${String(o)}`),kind:n,path:[...t,o],section:e});return a},R=(e,r)=>{const{label:n,shape:t}=p[e];if(t==="array"){const o=r[e]??[];return c(e,o,n,[])}if(t==="producers")return c(e,r.queues?.producers??[],n,["producers"]);const a=r.ai;return a==null?[]:[{binding:d(a,e),kind:n,path:[],section:e}]},_=e=>S.flatMap(r=>R(r,e)),B=(e,r)=>{let n=e;for(const t of r)n=g(n,[t.section,...t.path,"remote"],!0);return n},i=()=>{},j=e=>{let r=!1;return()=>{if(!r){r=!0;try{m(e,{force:!0,recursive:!0})}catch{}}}};let u=0;const I=()=>(u+=1,`.wrangler.lunora-remote.${String(process.pid)}.${String(u)}.jsonc`),A=e=>{if(!e.enabled)return{cleanup:i,enabled:!1,remoteBindings:[]};const r=y(e.projectRoot);if(!r)return{cleanup:i,enabled:!0,reason:"wrangler.jsonc not found",remoteBindings:[]};const{parsed:n,text:t}=v(r);if(n===void 0)return{cleanup:i,enabled:!0,reason:`failed to parse ${r} as JSONC`,remoteBindings:[]};const a=h(b(e.projectRoot)),o=_(n).filter(l=>l.section!=="services"||!a.has(l.binding));if(o.length===0)return{cleanup:i,enabled:!0,reason:"no remote-eligible bindings to proxy",remoteBindings:[]};const s=E(e.projectRoot,I());return f(s,B(t,o),"utf8"),{cleanup:j(s),configPath:s,enabled:!0,remoteBindings:o}},C=e=>{if(e===void 0)return!1;const r=e.trim().toLowerCase();return r==="1"||r==="true"},O=e=>e.flag===!0||C(e.envValue)?!0:e.configPreference??!1;export{p as REMOTE_ELIGIBLE_KEYS,j as createCleanup,B as injectRemoteFlags,C as isRemoteEnvEnabled,A as materializeRemoteWranglerConfig,_ as planRemoteBindings,O as resolveRemoteEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as m,v as h,a as E,b as p,c as D,d as y,e as l,f as I,g as O,H as R,h as S,R as $,S as j,i as A,j as k,W as L,k as w}from"./validate-bindings-TA4ZqC4j.mjs";import{validateTailConsumers as B,validateSendEmail as T,validateSecretsRequired as N,validateLogpush as C,validateLimits as U,validatePlacement as P,validateObservability as G,validateAssets as K,validateCache as V,validateExports as W,validateCorsVariables as x,validateSchedulerOrigin as F}from"./withTailConsumer-BK5uzf1W.mjs";import{isCacheEnabled as H,WORKERS_CACHE_MIN_DATE as _}from"./WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{mergeWranglerEnvironment as M}from"./mergeWranglerEnvironment-CTh4zkEL.mjs";const Y=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),f=i=>Array.isArray(i)?i.flatMap((a,n)=>Y(a)?[[n,a]]:[]):[],g=i=>typeof i.binding=="string"?i.binding:"",q=(i,a,n)=>{for(const[e,s]of f(i.kv_namespaces))typeof s.id=="string"&&s.id!==""||n.push(`kv_namespaces[${String(e)}] ("${g(s)}") is not created yet and the schema pins data to "${a}" — create it with \`wrangler kv namespace create <name> --jurisdiction=${a}\`; a namespace's jurisdiction cannot be changed afterwards`)},Q=(i,a,n)=>{for(const[e,s]of f(i.r2_buckets)){const r=s.jurisdiction;if(r===a)continue;const t=typeof r=="string"?`names the "${r}" jurisdiction`:"names no jurisdiction";n.push(`r2_buckets[${String(e)}] ("${g(s)}") ${t}, but the schema pins data to "${a}" — create the bucket with \`wrangler r2 bucket create <name> --jurisdiction=${a}\` and set "jurisdiction": "${a}" on the binding`)}},J=(i,a,n)=>{const e=a?.jurisdiction;e!==void 0&&(q(i,e,n),Q(i,e,n))},b="2026-04-07",de="web_socket_auto_reply_to_close",u="2026-10-01",v="durable_object_io_tasks_prevent_eviction",z="durable_object_io_tasks_do_not_prevent_eviction",X=/^\d{4}-\d{2}-\d{2}$/,Z=(i,a,n)=>{i>=u||a.includes(v)||a.includes(z)||n.push(`compatibility_date "${i}" predates "${u}", so pending I/O (waitUntil, cross-Durable-Object RPC, service-binding calls, timers) does not keep a Durable Object alive once its last client disconnects — live-query refreshes and durable streams can be cut off mid-flight. Set compatibility_date >= "${u}" or add the "${v}" compatibility flag`)},ee=(i,a,n)=>{const{error:e,merged:s,unverifiedKeys:r}=M(i,a);return e!==void 0?{error:e,wrangler:s}:(r.length>0&&n.push(`env.${String(a)} overrides ${r.join(", ")}, which this validator doesn't have a verified inheritance rule for — validated against the TOP-LEVEL value only. Double-check ${r.length===1?"it":"them"} by hand for "${String(a)}".`),{wrangler:s})},te=(i,a,n)=>{const e=[],s=[];if(!i||typeof i!="object")return e.push("wrangler config is not a valid object"),{errors:e,valid:!1,warnings:s};const{error:r,wrangler:t}=ee(i,n,s);if(r!==void 0)return e.push(r),{errors:e,valid:!1,warnings:s};m(t.durable_objects?.bindings).find(o=>o.name==="SHARD"&&o.class_name==="ShardDO")||e.push('durable_objects.bindings must include { "name": "SHARD", "class_name": "ShardDO" } — your dev server auto-reconciles this on startup, or add the binding manually'),h(t,e);const d=t.compatibility_date??"",c=X.test(d);d&&!c?e.push(`compatibility_date must be in YYYY-MM-DD format (got "${d}")`):d<b&&e.push(`compatibility_date must be >= "${b}" (got "${d||"<missing>"}")`),H(t)&&c&&d<_&&e.push(`cache.enabled requires compatibility_date >= "${_}" (got "${d||"<missing>"}")`),c&&Z(d,t.compatibility_flags??[],s),E(t,a,e),J(t,a,s),p(t,e),D(t,a?.vectorIndexNames??[],e),B(t,e),y(t,e,s),l(t.workflows,"workflows",L,e),I(t,e),O(t,e),l(t.secrets_store_secrets,"secrets_store_secrets",w,e);for(const o of R)S(t,o,e,s);for(const o of $)l(t[o.key],o.key,o,e);for(const o of j)A(t,o,e);return k(t,e),T(t,e,s),N(t,e),C(t,e),U(t,e),P(t,e),G(t,e,s),K(t,e),V(t,e),W(t,e),x(t,e),F(t,n,s),{errors:e,valid:e.length===0,warnings:s}},ce=te;export{b as REQUIRED_COMPATIBILITY_DATE,de as REQUIRED_FLAG,ce as validateWrangler,te as validateWranglerConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as f,readFileSync as N,readdirSync as W}from"node:fs";import{join as l,dirname as y,extname as w,basename as _}from"node:path";import{discoverSchemaInfo as P}from"./discoverSchemaInfo-DJvevsCm.mjs";import{COMPOSED_WORKER_ENTRY as L,LUNORA_WORKER_VIRTUAL_ID as g,isGeneratedOutput as F,WORKER_ENTRY_FALLBACKS as M,GENERATED_DIRECTORY as U,COMPOSED_ENTRY_DURABLE_OBJECTS as D,GENERATED_CLASS_MODULES as A,SOURCE_DOT_DIRECTORIES as B,NON_SOURCE_DIRECTORIES as G,isFrameworkDurableObject as Y}from"./COMPOSED_WORKER_ENTRY-C69wqbSP.mjs";import{o as K}from"./validate-bindings-Dnf1t0SY.mjs";import{Project as X,Node as p}from"ts-morph";import{mergeWranglerEnvironment as J}from"./mergeWranglerEnvironment-DOKJUNH8.mjs";import{findWranglerFile as V,readWranglerJsonc as q}from"./WRANGLER_FILES-UNW-xY5u.mjs";import{validateWranglerConfig as z}from"./REQUIRED_COMPATIBILITY_DATE-jTnj2MPJ.mjs";const E=[".ts",".tsx",".mts",".cts"],b=new Set(E),H=new Set([".cjs",".js",".mjs"]),v="default",S={".cjs":[".cts"],".js":[".ts",".tsx"],".mjs":[".mts"]},Q=250,Z=(e,s,t)=>{const o=l(s,L);if(f(o))return{origin:"declared",path:o};if(e===g)return{origin:"composed"};const n=()=>{const a=M.map(c=>l(s,c)).find(c=>f(c));return a===void 0?void 0:{origin:"probed",path:a}};if(typeof e!="string"||e.length===0||F(e))return n();const r=l(y(t),e),i=w(r);if(!(!b.has(i)&&!H.has(i)))return f(r)?{origin:"declared",path:r}:{origin:"absent",path:r}},T=(e,s)=>{if(p.isIdentifier(e)){s.add(e.getText());return}if(p.isObjectBindingPattern(e)||p.isArrayBindingPattern(e))for(const t of e.getElements())p.isBindingElement(t)&&T(t.getNameNode(),s)},ee=(e,s)=>{const t=[];for(const o of e.getExportDeclarations())if(!o.isTypeOnly()){if(o.isNamespaceExport()){const n=o.getNamespaceExport();n===void 0?t.push(o.getModuleSpecifierValue()??""):s.add(n.getName());continue}for(const n of o.getNamedExports())n.isTypeOnly()||s.add(n.getAliasNode()?.getText()??n.getName())}return t},te=(e,s)=>{for(const t of e.getVariableStatements().filter(o=>o.getExportKeyword()!==void 0))for(const o of t.getDeclarations())T(o.getNameNode(),s);for(const t of[...e.getClasses(),...e.getFunctions(),...e.getEnums()]){if(t.getExportKeyword()===void 0)continue;const o=t.isDefaultExport()?v:t.getName();o!==void 0&&s.add(o)}e.getExportAssignments().length>0&&s.add(v)},$=(e,s)=>{const t=new X({compilerOptions:{allowJs:!0},skipFileDependencyResolution:!0,skipLoadingLibFiles:!0,useInMemoryFileSystem:!0}),o=t.createSourceFile(e,s,{overwrite:!0});return t.getProgram().compilerObject.getSyntacticDiagnostics(o.compilerNode).length>0?void 0:o},re=(e,s)=>{if(!s.startsWith("./")&&!s.startsWith("../"))return;const t=l(y(e),s),o=w(t),n=b.has(o)||S[o]!==void 0,r=n?t.slice(0,-o.length):t;return[...b.has(o)?[t]:[],...(S[o]??[]).map(a=>`${r}${a}`),...n?[]:E.map(a=>`${t}${a}`),...n||o.length===0?E.map(a=>l(r,`index${a}`)):[]].find(a=>f(a))},k=e=>{const s=new Set,t=new Set([e]),o=[e];for(;o.length>0;){if(t.size-1>Q)return;const n=o.pop();let r;try{r=N(n,"utf8")}catch{return}const i=$(_(n),r);if(i===void 0)return;const a=ee(i,s);te(i,s);for(const c of a){const d=re(n,c);if(d===void 0)return;t.has(d)||(t.add(d),o.push(d))}}return s},oe=(e,s)=>{const t={exports:void 0,kind:"composed",path:g},o=l(e,s,U);if(!f(o))return t;const n=new Set(D);for(const r of A){const i=l(o,`${r}.ts`);if(!f(i))continue;const a=k(i);if(a===void 0)return t;for(const c of a)n.add(c)}return{exports:n,kind:"composed",path:g}},se=(e,s,t)=>{if(e===void 0||e.origin==="absent")return;if(e.origin==="composed")return oe(s,t);const o=k(e.path);if(!(e.origin==="probed"&&o!==void 0&&!o.has(v)))return{exports:o,kind:"authored",path:e.path}},ne=new Set([".cjs",".cts",".js",".jsx",".mjs",".mts",".ts",".tsx"]),ie=2e3,R="defineTable",O="defineApp",ae=e=>{const s=[],t=[];let o;try{o=W(e,{withFileTypes:!0})}catch{return{files:s,subdirectories:t}}for(const n of o)n.isDirectory()?n.name.startsWith(".")&&!B.has(n.name)||G.has(n.name)||t.push(l(e,n.name)):ne.has(w(n.name))&&s.push(l(e,n.name));return{files:s,subdirectories:t}},j=(e,s)=>{const t=new Set;for(const o of e.getImportDeclarations())for(const n of o.getNamedImports())!n.isTypeOnly()&&n.getName()===s&&t.add(n.getAliasNode()?.getText()??n.getName());return t},ce=(e,s)=>{let t=!1;return e.forEachDescendant((o,n)=>{if(!p.isCallExpression(o))return;const r=o.getExpression();p.isIdentifier(r)&&s.has(r.getText())&&(t=!0,n.stop())}),t},le=e=>{let s=e;for(;p.isCallExpression(s)||p.isPropertyAccessExpression(s);)s=s.getExpression();return s},de=(e,s)=>{const t=le(e);return p.isIdentifier(t)&&s.has(t.getText())},I={global:/\.\s*global\s*\(/u,hyperdriveGlobal:/\.\s*hyperdriveGlobal\s*\(/u,vectors:/\.\s*vectors\s*\(/u},pe=e=>Object.hasOwn(I,e),fe=(e,s)=>{const t=new Set,o=new Set([R,...j(e,R)]);return e.forEachDescendant(n=>{if(!p.isCallExpression(n))return;const r=n.getExpression();if(!p.isPropertyAccessExpression(r)||de(r,o))return;const i=r.getName();pe(i)&&s.has(i)&&t.add(i)}),t},he=(e,s)=>{let t;try{t=N(e,"utf8")}catch{return}const o=new Set([...s].filter(r=>I[r].test(t)));if(o.size===0&&!t.includes(O))return;const n=$(_(e),t);return n===void 0?{chained:o,composes:!1}:{chained:fe(n,o),composes:ce(n,j(n,O))}},ue=(e,s)=>{const t=[e],o=new Set;let n=0,r;const i=a=>{if(n+=1,n>ie)return!1;const c=he(a,s);for(const d of c?.chained??[])o.add(d);return c?.composes&&(r??=a),!0};for(;t.length>0;){const a=t.pop(),{files:c,subdirectories:d}=ae(a);t.push(...d);for(const m of c){if(!i(m))return;if(r!==void 0&&o.size===s.size)return{chained:o,site:r}}}return r===void 0?void 0:{chained:o,site:r}},C=e=>Array.isArray(e)?e:[],me=(e,s,t)=>Object.entries(e?.images??{}).flatMap(([o,n])=>{const r=n?.dockerfile;return typeof r!="string"||f(r.startsWith("/")?r:l(s,r))?[]:[`containers images["${o}"] dockerfile "${r}" does not exist (resolved relative to ${t}); create the Dockerfile`]}),ge=(e,s,t)=>{const o=[];for(const n of C(e)){const r=n?.image;typeof r=="string"&&(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")||r.includes("Dockerfile"))&&!f(r.startsWith("/")?r:l(s,r))&&o.push(`containers image "${r}" does not exist (resolved relative to ${t}); create the Dockerfile or point image at a registry reference`),o.push(...me(n,s,t))}return o},Ee=(e,s)=>{const t=e?.vectorIndexNames??[],o=[];if(t.length>0&&o.push({message:r=>`schema declares vector index(es) ${t.map(i=>`"${i}"`).join(", ")} but nothing chains .vectors(...) onto defineApp() (composed in: ${r}) — \`ctx.vectors\` is then a throwing stub and buildWorkerOptions rejects EVERY request, /_lunora/health included. Add \`.vectors((env) => ({ ${String(t[0])}: env.<BINDING> }))\` to the chain.`,method:"vectors"}),e?.hasD1GlobalTable&&o.push({message:r=>`schema declares .global() table(s) but nothing chains .global(...) onto defineApp() (composed in: ${r}) — the shard then has no global writer, so every read or write of a global table throws INTERNAL ("requires a globalDb writer"). Add \`.global({ d1: (env) => env.DB })\` to the chain.`,method:"global"}),e?.hasHyperdriveGlobalTable&&o.push({message:r=>`schema declares .global({ backend: "hyperdrive" }) table(s) but nothing chains .hyperdriveGlobal(...) onto defineApp() (composed in: ${r}) — the shard then has no global writer, so every read or write of those tables throws INTERNAL. Add \`.hyperdriveGlobal({ engine: "postgres", exec: (env) => buildPgExec(fromPostgresJs(postgres(env.HYPERDRIVE.connectionString))) })\` to the chain (\`buildPgExec\` from \`@lunora/hyperdrive/global\`, \`fromPostgresJs\` from \`@lunora/hyperdrive\`).`,method:"hyperdriveGlobal"}),o.length===0)return[];const n=ue(s,new Set(o.map(r=>r.method)));return n===void 0?[]:o.filter(r=>!n.chained.has(r.method)).map(r=>r.message(n.site))},be="does not export it",ve=(e,s)=>{if(s!=="composed")return`Re-export it from the module that defines it (\`export { ${e} } from "./…";\`), or add it to the app builder's own export (\`export const { ${e} } = app;\`).`;const t=`it exports ${D.join(", ")}, SchedulerDO when its binding is declared, and every class codegen emits from your ${A.map(o=>`${o}.ts`).join(" / ")} declarations`;return Y(e)?`\`@lunora/vite\` generates that entry — ${t}, and ${e} is not among them. Class-A composition does not carry ${e}, so drop the binding; a project that needs it has to own its worker entry (add \`src/worker.ts\`, which \`lunora deploy\` bundles in place of \`main\`, and compose \`defineApp()\` there).`:`\`@lunora/vite\` generates that entry, so there is no file to add a re-export to: ${t}. Declare "${e}" in one of those and re-run \`lunora codegen\`, or drop the binding.`},ye=(e,s)=>{const t=s.exports;if(t===void 0)return[];const o=[];for(const r of K(e.durable_objects?.bindings))typeof r.class_name=="string"&&r.class_name.length>0&&r.script_name===void 0&&o.push({className:r.class_name,label:"durable_objects.bindings"});for(const r of C(e.workflows))typeof r?.class_name=="string"&&r.class_name.length>0&&r.script_name===void 0&&o.push({className:r.class_name,label:"workflows"});for(const[r,i]of Object.entries(e.exports??{}))i?.type==="workflow"&&o.push({className:r,label:"workflows"});return o.filter(r=>!t.has(r.className)).map(r=>`${r.label} declares class "${r.className}" but the ${s.kind==="composed"?"composed class-A worker entry":"worker entry"} (${s.path}) ${be} — wrangler refuses to bundle a Worker whose ${r.label==="workflows"?"Workflow":"Durable Object"} classes are not exported. ${ve(r.className,s.kind)}`)},we=e=>e?.origin!=="absent"?[]:[`main is set but no readable file is there (looked in ${e.path}) — wrangler cannot resolve the worker entry, so a deploy will fail there. Point main at the entry that composes your app, or remove it to fall back to the conventional locations.`],$e=e=>{const s=e.schemaDir??"lunora",t=V(e.projectRoot);if(!t){const h=`wrangler.jsonc not found in ${e.projectRoot}; create one declaring at least the SHARD durable object binding.`;return{problems:[h],report:{errors:[h],valid:!1,warnings:[]},wranglerPath:void 0}}const{parsed:o}=q(t);if(o===void 0){const h=`failed to parse ${t} as JSONC.`;return{problems:[h],report:{errors:[h],valid:!1,warnings:[]},wranglerPath:t}}const{error:n,merged:r}=J(o,e.environment);if(n!==void 0)return{problems:[n],report:{errors:[n],valid:!1,warnings:[]},wranglerPath:t};const{error:i,info:a}=P(e.projectRoot,s),c=z(o,a,e.environment);i!==void 0&&c.warnings.push(`schema parse failed in ${s}/schema.ts: ${i}`);const d=y(t),m=Z(r.main,e.projectRoot,t),x=se(m,e.projectRoot,s);c.errors.push(...ge(r.containers??[],d,t)),c.warnings.push(...we(m)),x!==void 0&&c.errors.push(...ye(r,x)),c.errors.push(...Ee(a,e.projectRoot));const u=r.assets?.directory;if(typeof u=="string"&&u.length>0){const h=u.startsWith("/")?u:l(d,u);f(h)||c.warnings.push(`assets.directory "${u}" does not exist yet — it is created by the client build; run the build before deploy`)}return c.valid=c.errors.length===0,{problems:c.errors,report:c,wranglerPath:t}};export{be as UNEXPORTED_CLASS_MARKER,$e as validateWranglerProject};
|
|
1
|
+
import{existsSync as f,readFileSync as N,readdirSync as W}from"node:fs";import{join as l,dirname as y,extname as w,basename as _}from"node:path";import{discoverSchemaInfo as P}from"./discoverSchemaInfo-BguahM6z.mjs";import{COMPOSED_WORKER_ENTRY as L,LUNORA_WORKER_VIRTUAL_ID as g,isGeneratedOutput as F,WORKER_ENTRY_FALLBACKS as M,GENERATED_DIRECTORY as U,COMPOSED_ENTRY_DURABLE_OBJECTS as D,GENERATED_CLASS_MODULES as A,SOURCE_DOT_DIRECTORIES as B,NON_SOURCE_DIRECTORIES as G,isFrameworkDurableObject as Y}from"./COMPOSED_WORKER_ENTRY-C69wqbSP.mjs";import{o as K}from"./validate-bindings-TA4ZqC4j.mjs";import{Project as X,Node as p}from"ts-morph";import{mergeWranglerEnvironment as J}from"./mergeWranglerEnvironment-CTh4zkEL.mjs";import{findWranglerFile as V,readWranglerJsonc as q}from"./WRANGLER_FILES-UNW-xY5u.mjs";import{validateWranglerConfig as z}from"./REQUIRED_COMPATIBILITY_DATE-lONKS1B6.mjs";const E=[".ts",".tsx",".mts",".cts"],b=new Set(E),H=new Set([".cjs",".js",".mjs"]),v="default",S={".cjs":[".cts"],".js":[".ts",".tsx"],".mjs":[".mts"]},Q=250,Z=(e,s,t)=>{const o=l(s,L);if(f(o))return{origin:"declared",path:o};if(e===g)return{origin:"composed"};const n=()=>{const a=M.map(c=>l(s,c)).find(c=>f(c));return a===void 0?void 0:{origin:"probed",path:a}};if(typeof e!="string"||e.length===0||F(e))return n();const r=l(y(t),e),i=w(r);if(!(!b.has(i)&&!H.has(i)))return f(r)?{origin:"declared",path:r}:{origin:"absent",path:r}},T=(e,s)=>{if(p.isIdentifier(e)){s.add(e.getText());return}if(p.isObjectBindingPattern(e)||p.isArrayBindingPattern(e))for(const t of e.getElements())p.isBindingElement(t)&&T(t.getNameNode(),s)},ee=(e,s)=>{const t=[];for(const o of e.getExportDeclarations())if(!o.isTypeOnly()){if(o.isNamespaceExport()){const n=o.getNamespaceExport();n===void 0?t.push(o.getModuleSpecifierValue()??""):s.add(n.getName());continue}for(const n of o.getNamedExports())n.isTypeOnly()||s.add(n.getAliasNode()?.getText()??n.getName())}return t},te=(e,s)=>{for(const t of e.getVariableStatements().filter(o=>o.getExportKeyword()!==void 0))for(const o of t.getDeclarations())T(o.getNameNode(),s);for(const t of[...e.getClasses(),...e.getFunctions(),...e.getEnums()]){if(t.getExportKeyword()===void 0)continue;const o=t.isDefaultExport()?v:t.getName();o!==void 0&&s.add(o)}e.getExportAssignments().length>0&&s.add(v)},$=(e,s)=>{const t=new X({compilerOptions:{allowJs:!0},skipFileDependencyResolution:!0,skipLoadingLibFiles:!0,useInMemoryFileSystem:!0}),o=t.createSourceFile(e,s,{overwrite:!0});return t.getProgram().compilerObject.getSyntacticDiagnostics(o.compilerNode).length>0?void 0:o},re=(e,s)=>{if(!s.startsWith("./")&&!s.startsWith("../"))return;const t=l(y(e),s),o=w(t),n=b.has(o)||S[o]!==void 0,r=n?t.slice(0,-o.length):t;return[...b.has(o)?[t]:[],...(S[o]??[]).map(a=>`${r}${a}`),...n?[]:E.map(a=>`${t}${a}`),...n||o.length===0?E.map(a=>l(r,`index${a}`)):[]].find(a=>f(a))},k=e=>{const s=new Set,t=new Set([e]),o=[e];for(;o.length>0;){if(t.size-1>Q)return;const n=o.pop();let r;try{r=N(n,"utf8")}catch{return}const i=$(_(n),r);if(i===void 0)return;const a=ee(i,s);te(i,s);for(const c of a){const d=re(n,c);if(d===void 0)return;t.has(d)||(t.add(d),o.push(d))}}return s},oe=(e,s)=>{const t={exports:void 0,kind:"composed",path:g},o=l(e,s,U);if(!f(o))return t;const n=new Set(D);for(const r of A){const i=l(o,`${r}.ts`);if(!f(i))continue;const a=k(i);if(a===void 0)return t;for(const c of a)n.add(c)}return{exports:n,kind:"composed",path:g}},se=(e,s,t)=>{if(e===void 0||e.origin==="absent")return;if(e.origin==="composed")return oe(s,t);const o=k(e.path);if(!(e.origin==="probed"&&o!==void 0&&!o.has(v)))return{exports:o,kind:"authored",path:e.path}},ne=new Set([".cjs",".cts",".js",".jsx",".mjs",".mts",".ts",".tsx"]),ie=2e3,R="defineTable",O="defineApp",ae=e=>{const s=[],t=[];let o;try{o=W(e,{withFileTypes:!0})}catch{return{files:s,subdirectories:t}}for(const n of o)n.isDirectory()?n.name.startsWith(".")&&!B.has(n.name)||G.has(n.name)||t.push(l(e,n.name)):ne.has(w(n.name))&&s.push(l(e,n.name));return{files:s,subdirectories:t}},j=(e,s)=>{const t=new Set;for(const o of e.getImportDeclarations())for(const n of o.getNamedImports())!n.isTypeOnly()&&n.getName()===s&&t.add(n.getAliasNode()?.getText()??n.getName());return t},ce=(e,s)=>{let t=!1;return e.forEachDescendant((o,n)=>{if(!p.isCallExpression(o))return;const r=o.getExpression();p.isIdentifier(r)&&s.has(r.getText())&&(t=!0,n.stop())}),t},le=e=>{let s=e;for(;p.isCallExpression(s)||p.isPropertyAccessExpression(s);)s=s.getExpression();return s},de=(e,s)=>{const t=le(e);return p.isIdentifier(t)&&s.has(t.getText())},I={global:/\.\s*global\s*\(/u,hyperdriveGlobal:/\.\s*hyperdriveGlobal\s*\(/u,vectors:/\.\s*vectors\s*\(/u},pe=e=>Object.hasOwn(I,e),fe=(e,s)=>{const t=new Set,o=new Set([R,...j(e,R)]);return e.forEachDescendant(n=>{if(!p.isCallExpression(n))return;const r=n.getExpression();if(!p.isPropertyAccessExpression(r)||de(r,o))return;const i=r.getName();pe(i)&&s.has(i)&&t.add(i)}),t},he=(e,s)=>{let t;try{t=N(e,"utf8")}catch{return}const o=new Set([...s].filter(r=>I[r].test(t)));if(o.size===0&&!t.includes(O))return;const n=$(_(e),t);return n===void 0?{chained:o,composes:!1}:{chained:fe(n,o),composes:ce(n,j(n,O))}},ue=(e,s)=>{const t=[e],o=new Set;let n=0,r;const i=a=>{if(n+=1,n>ie)return!1;const c=he(a,s);for(const d of c?.chained??[])o.add(d);return c?.composes&&(r??=a),!0};for(;t.length>0;){const a=t.pop(),{files:c,subdirectories:d}=ae(a);t.push(...d);for(const m of c){if(!i(m))return;if(r!==void 0&&o.size===s.size)return{chained:o,site:r}}}return r===void 0?void 0:{chained:o,site:r}},C=e=>Array.isArray(e)?e:[],me=(e,s,t)=>Object.entries(e?.images??{}).flatMap(([o,n])=>{const r=n?.dockerfile;return typeof r!="string"||f(r.startsWith("/")?r:l(s,r))?[]:[`containers images["${o}"] dockerfile "${r}" does not exist (resolved relative to ${t}); create the Dockerfile`]}),ge=(e,s,t)=>{const o=[];for(const n of C(e)){const r=n?.image;typeof r=="string"&&(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")||r.includes("Dockerfile"))&&!f(r.startsWith("/")?r:l(s,r))&&o.push(`containers image "${r}" does not exist (resolved relative to ${t}); create the Dockerfile or point image at a registry reference`),o.push(...me(n,s,t))}return o},Ee=(e,s)=>{const t=e?.vectorIndexNames??[],o=[];if(t.length>0&&o.push({message:r=>`schema declares vector index(es) ${t.map(i=>`"${i}"`).join(", ")} but nothing chains .vectors(...) onto defineApp() (composed in: ${r}) — \`ctx.vectors\` is then a throwing stub and buildWorkerOptions rejects EVERY request, /_lunora/health included. Add \`.vectors((env) => ({ ${String(t[0])}: env.<BINDING> }))\` to the chain.`,method:"vectors"}),e?.hasD1GlobalTable&&o.push({message:r=>`schema declares .global() table(s) but nothing chains .global(...) onto defineApp() (composed in: ${r}) — the shard then has no global writer, so every read or write of a global table throws INTERNAL ("requires a globalDb writer"). Add \`.global({ d1: (env) => env.DB })\` to the chain.`,method:"global"}),e?.hasHyperdriveGlobalTable&&o.push({message:r=>`schema declares .global({ backend: "hyperdrive" }) table(s) but nothing chains .hyperdriveGlobal(...) onto defineApp() (composed in: ${r}) — the shard then has no global writer, so every read or write of those tables throws INTERNAL. Add \`.hyperdriveGlobal({ engine: "postgres", exec: (env) => buildPgExec(fromPostgresJs(postgres(env.HYPERDRIVE.connectionString))) })\` to the chain (\`buildPgExec\` from \`@lunora/hyperdrive/global\`, \`fromPostgresJs\` from \`@lunora/hyperdrive\`).`,method:"hyperdriveGlobal"}),o.length===0)return[];const n=ue(s,new Set(o.map(r=>r.method)));return n===void 0?[]:o.filter(r=>!n.chained.has(r.method)).map(r=>r.message(n.site))},be="does not export it",ve=(e,s)=>{if(s!=="composed")return`Re-export it from the module that defines it (\`export { ${e} } from "./…";\`), or add it to the app builder's own export (\`export const { ${e} } = app;\`).`;const t=`it exports ${D.join(", ")}, SchedulerDO when its binding is declared, and every class codegen emits from your ${A.map(o=>`${o}.ts`).join(" / ")} declarations`;return Y(e)?`\`@lunora/vite\` generates that entry — ${t}, and ${e} is not among them. Class-A composition does not carry ${e}, so drop the binding; a project that needs it has to own its worker entry (add \`src/worker.ts\`, which \`lunora deploy\` bundles in place of \`main\`, and compose \`defineApp()\` there).`:`\`@lunora/vite\` generates that entry, so there is no file to add a re-export to: ${t}. Declare "${e}" in one of those and re-run \`lunora codegen\`, or drop the binding.`},ye=(e,s)=>{const t=s.exports;if(t===void 0)return[];const o=[];for(const r of K(e.durable_objects?.bindings))typeof r.class_name=="string"&&r.class_name.length>0&&r.script_name===void 0&&o.push({className:r.class_name,label:"durable_objects.bindings"});for(const r of C(e.workflows))typeof r?.class_name=="string"&&r.class_name.length>0&&r.script_name===void 0&&o.push({className:r.class_name,label:"workflows"});for(const[r,i]of Object.entries(e.exports??{}))i?.type==="workflow"&&o.push({className:r,label:"workflows"});return o.filter(r=>!t.has(r.className)).map(r=>`${r.label} declares class "${r.className}" but the ${s.kind==="composed"?"composed class-A worker entry":"worker entry"} (${s.path}) ${be} — wrangler refuses to bundle a Worker whose ${r.label==="workflows"?"Workflow":"Durable Object"} classes are not exported. ${ve(r.className,s.kind)}`)},we=e=>e?.origin!=="absent"?[]:[`main is set but no readable file is there (looked in ${e.path}) — wrangler cannot resolve the worker entry, so a deploy will fail there. Point main at the entry that composes your app, or remove it to fall back to the conventional locations.`],$e=e=>{const s=e.schemaDir??"lunora",t=V(e.projectRoot);if(!t){const h=`wrangler.jsonc not found in ${e.projectRoot}; create one declaring at least the SHARD durable object binding.`;return{problems:[h],report:{errors:[h],valid:!1,warnings:[]},wranglerPath:void 0}}const{parsed:o}=q(t);if(o===void 0){const h=`failed to parse ${t} as JSONC.`;return{problems:[h],report:{errors:[h],valid:!1,warnings:[]},wranglerPath:t}}const{error:n,merged:r}=J(o,e.environment);if(n!==void 0)return{problems:[n],report:{errors:[n],valid:!1,warnings:[]},wranglerPath:t};const{error:i,info:a}=P(e.projectRoot,s),c=z(o,a,e.environment);i!==void 0&&c.warnings.push(`schema parse failed in ${s}/schema.ts: ${i}`);const d=y(t),m=Z(r.main,e.projectRoot,t),x=se(m,e.projectRoot,s);c.errors.push(...ge(r.containers??[],d,t)),c.warnings.push(...we(m)),x!==void 0&&c.errors.push(...ye(r,x)),c.errors.push(...Ee(a,e.projectRoot));const u=r.assets?.directory;if(typeof u=="string"&&u.length>0){const h=u.startsWith("/")?u:l(d,u);f(h)||c.warnings.push(`assets.directory "${u}" does not exist yet — it is created by the client build; run the build before deploy`)}return c.valid=c.errors.length===0,{problems:c.errors,report:c,wranglerPath:t}};export{be as UNEXPORTED_CLASS_MARKER,$e as validateWranglerProject};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{LunoraError as n}from"@lunora/errors";import{lunoraLine as i}from"./LUNORA_TAG-CiQM3BkI.mjs";import{validateWranglerProject as l}from"./UNEXPORTED_CLASS_MARKER-
|
|
1
|
+
import{LunoraError as n}from"@lunora/errors";import{lunoraLine as i}from"./LUNORA_TAG-CiQM3BkI.mjs";import{validateWranglerProject as l}from"./UNEXPORTED_CLASS_MARKER-D9ZP8mPA.mjs";const m=(e,a,t)=>{const r=l({projectRoot:e.projectRoot,schemaDir:e.schemaDir});if(!r.wranglerPath)throw new n("INTERNAL",["[lunora] wrangler.jsonc not found.",` searched in: ${e.projectRoot}`," create a wrangler.jsonc declaring at least the SHARD durable object binding."].join(`
|
|
2
2
|
`));for(const o of r.report.warnings)a(i(`wrangler validator: ${o}`));if(r.problems.length>0)throw new n("INTERNAL",["[lunora] wrangler configuration is missing bindings required by your schema.",` file: ${r.wranglerPath}`,"",...r.problems.map(o=>` - ${o}`),"",` ${t}`].join(`
|
|
3
3
|
`))};export{m as assertWranglerSatisfiesSchema};
|