@lunora/config 1.0.0-alpha.291 → 1.0.0-alpha.293
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 +22 -4
- package/dist/cloudflare/index.d.ts +22 -4
- package/dist/cloudflare/index.mjs +1 -1
- package/dist/packem_shared/BINDING_MANIFEST_VERSION-BHfXhS_-.mjs +1 -0
- package/dist/packem_shared/{REMOTE_ELIGIBLE_KEYS-ikHvqvS5.mjs → REMOTE_ELIGIBLE_KEYS-CBKtw0E-.mjs} +1 -1
- package/dist/packem_shared/materializeServiceDevConfigs-Cjk9uh9u.mjs +1 -0
- package/package.json +4 -4
- package/dist/packem_shared/BINDING_MANIFEST_VERSION-vItUTnHk.mjs +0 -1
|
@@ -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`), 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" | "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 {
|
|
@@ -238,6 +238,12 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
238
238
|
queue?: string;
|
|
239
239
|
}>;
|
|
240
240
|
};
|
|
241
|
+
/** Service bindings to sibling Workers; `service` is the Worker name. */
|
|
242
|
+
services?: ReadonlyArray<{
|
|
243
|
+
binding?: string;
|
|
244
|
+
entrypoint?: string;
|
|
245
|
+
service?: string;
|
|
246
|
+
}>;
|
|
241
247
|
stream?: {
|
|
242
248
|
binding?: string;
|
|
243
249
|
};
|
|
@@ -659,6 +665,18 @@ interface RemoteEnableInputs {
|
|
|
659
665
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
660
666
|
*/
|
|
661
667
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
668
|
+
/** The configs to pass as `--config`, in input order, and a disposer for the copies written. */
|
|
669
|
+
interface ServiceDevConfigs {
|
|
670
|
+
/** Unlinks every copy written. Idempotent, never throws — a no-op when none was. */
|
|
671
|
+
cleanup: () => void;
|
|
672
|
+
configPaths: string[];
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Resolve the `--config` path of each service the shared `wrangler dev` session
|
|
676
|
+
* runs, writing a copy only for a service whose custom build would otherwise run
|
|
677
|
+
* in the app's folder (see the module doc).
|
|
678
|
+
*/
|
|
679
|
+
declare const materializeServiceDevConfigs: (wranglerPaths: ReadonlyArray<string>) => ServiceDevConfigs;
|
|
662
680
|
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
663
681
|
interface WranglerDurableObjectBinding {
|
|
664
682
|
class_name?: string;
|
|
@@ -1046,7 +1064,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
|
|
|
1046
1064
|
* `{ valid, errors, warnings }`.
|
|
1047
1065
|
*/
|
|
1048
1066
|
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,
|
|
1067
|
+
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 ServiceDevConfigs, 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,
|
|
1050
1068
|
/**
|
|
1051
1069
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
1052
1070
|
*
|
|
@@ -1062,4 +1080,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
|
|
|
1062
1080
|
* Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
|
|
1063
1081
|
* subpath rather than relocating wholesale.
|
|
1064
1082
|
*/
|
|
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 };
|
|
1083
|
+
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 };
|
|
@@ -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`), 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" | "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 {
|
|
@@ -238,6 +238,12 @@ interface ManifestConfigShape extends WranglerConfigShape {
|
|
|
238
238
|
queue?: string;
|
|
239
239
|
}>;
|
|
240
240
|
};
|
|
241
|
+
/** Service bindings to sibling Workers; `service` is the Worker name. */
|
|
242
|
+
services?: ReadonlyArray<{
|
|
243
|
+
binding?: string;
|
|
244
|
+
entrypoint?: string;
|
|
245
|
+
service?: string;
|
|
246
|
+
}>;
|
|
241
247
|
stream?: {
|
|
242
248
|
binding?: string;
|
|
243
249
|
};
|
|
@@ -659,6 +665,18 @@ interface RemoteEnableInputs {
|
|
|
659
665
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
660
666
|
*/
|
|
661
667
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
668
|
+
/** The configs to pass as `--config`, in input order, and a disposer for the copies written. */
|
|
669
|
+
interface ServiceDevConfigs {
|
|
670
|
+
/** Unlinks every copy written. Idempotent, never throws — a no-op when none was. */
|
|
671
|
+
cleanup: () => void;
|
|
672
|
+
configPaths: string[];
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Resolve the `--config` path of each service the shared `wrangler dev` session
|
|
676
|
+
* runs, writing a copy only for a service whose custom build would otherwise run
|
|
677
|
+
* in the app's folder (see the module doc).
|
|
678
|
+
*/
|
|
679
|
+
declare const materializeServiceDevConfigs: (wranglerPaths: ReadonlyArray<string>) => ServiceDevConfigs;
|
|
662
680
|
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
663
681
|
interface WranglerDurableObjectBinding {
|
|
664
682
|
class_name?: string;
|
|
@@ -1046,7 +1064,7 @@ declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined
|
|
|
1046
1064
|
* `{ valid, errors, warnings }`.
|
|
1047
1065
|
*/
|
|
1048
1066
|
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,
|
|
1067
|
+
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 ServiceDevConfigs, 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,
|
|
1050
1068
|
/**
|
|
1051
1069
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
1052
1070
|
*
|
|
@@ -1062,4 +1080,4 @@ export { type AlchemyTranslation, type AssertWranglerOptions, BINDING_MANIFEST_V
|
|
|
1062
1080
|
* Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
|
|
1063
1081
|
* subpath rather than relocating wholesale.
|
|
1064
1082
|
*/
|
|
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 };
|
|
1083
|
+
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-BiABHeMv.mjs";import{BINDING_MANIFEST_VERSION as t,buildBindingManifest as i}from"../packem_shared/BINDING_MANIFEST_VERSION-
|
|
1
|
+
import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as n}from"../packem_shared/assertWranglerSatisfiesSchema-BiABHeMv.mjs";import{BINDING_MANIFEST_VERSION as t,buildBindingManifest as i}from"../packem_shared/BINDING_MANIFEST_VERSION-BHfXhS_-.mjs";import{default as E}from"../packem_shared/CLOUDFLARE_DRIVER-Ci3VIqnk.mjs";import{collectExportGaps as s,reconcileWranglerBindings as c}from"../packem_shared/collectExportGaps-CIYe_DRY.mjs";import{reconcileWranglerCompatibilityDate as p}from"../packem_shared/reconcileWranglerCompatibilityDate-hocXEuRA.mjs";import{describePreservedCrons as x,reconcileWranglerCrons as d}from"../packem_shared/describePreservedCrons-7gaDLxWx.mjs";import{reconcileBindingsSafely as I,reconcileWranglerExtras as _}from"../packem_shared/reconcileBindingsSafely-VBbLYoAx.mjs";import{REMOTE_ELIGIBLE_KEYS as S,injectRemoteFlags as A,isRemoteEnvEnabled as D,materializeRemoteWranglerConfig as v,planRemoteBindings as L,resolveRemoteEnabled as T}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-CBKtw0E-.mjs";import{materializeServiceDevConfigs as B}from"../packem_shared/materializeServiceDevConfigs-Cjk9uh9u.mjs";import{withTailConsumer as M}from"../packem_shared/withTailConsumer-B1NoKIsj.mjs";import{WORKERS_CACHE_MIN_DATE as O,isCacheEnabled as y}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{mergeWranglerEnvironment as h}from"../packem_shared/mergeWranglerEnvironment-DOKJUNH8.mjs";import{WRANGLER_FILES as U,findWranglerFile as V,readWranglerJsonc as u}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as j,validateWranglerProject as w}from"../packem_shared/UNEXPORTED_CLASS_MARKER-CugcZbPf.mjs";import{collectWranglerSecretVariables as Q,scanWranglerVariablesForSecrets as Y}from"../packem_shared/collectWranglerSecretVariables-D-usPfT8.mjs";import{wranglerToAlchemy as J}from"../packem_shared/wranglerToAlchemy-BMOQYRyw.mjs";import{REQUIRED_COMPATIBILITY_DATE as k,REQUIRED_FLAG as q,validateWrangler as Z,validateWranglerConfig as $}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-jTnj2MPJ.mjs";export{t as BINDING_MANIFEST_VERSION,E as CLOUDFLARE_DRIVER,S as REMOTE_ELIGIBLE_KEYS,k as REQUIRED_COMPATIBILITY_DATE,q as REQUIRED_FLAG,j as UNEXPORTED_CLASS_MARKER,O as WORKERS_CACHE_MIN_DATE,U as WRANGLER_FILES,o as applyModify,n as assertWranglerSatisfiesSchema,i as buildBindingManifest,s as collectExportGaps,Q as collectWranglerSecretVariables,x as describePreservedCrons,V as findWranglerFile,A as injectRemoteFlags,y as isCacheEnabled,D as isRemoteEnvEnabled,v as materializeRemoteWranglerConfig,B as materializeServiceDevConfigs,h as mergeWranglerEnvironment,L as planRemoteBindings,u as readWranglerJsonc,I as reconcileBindingsSafely,c as reconcileWranglerBindings,p as reconcileWranglerCompatibilityDate,d as reconcileWranglerCrons,_ as reconcileWranglerExtras,T as resolveRemoteEnabled,Y as scanWranglerVariablesForSecrets,Z as validateWrangler,$ as validateWranglerConfig,w as validateWranglerProject,M as withTailConsumer,J as wranglerToAlchemy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sqliteClasses as u}from"./wranglerToAlchemy-BMOQYRyw.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)),a=[{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([...a.map(e=>e.field),...c.map(e=>e.field),"durable_objects","exports","queues"]),d=(e,n)=>(typeof n=="string"?[n]:n??[]).map(i=>e[i]).find(i=>typeof i=="string"&&i!==""),m=(e,n)=>{const t=[];for(const i of a)for(const r of e[i.field]??[]){const s=d(r,i.bindingKey);if(s===void 0){n.push(i.field);continue}t.push({binding:s,className:d(r,"class_name"),resource:d(r,i.resourceKey),resourceId:d(r,i.resourceIdKey),type:i.type})}return t},g=(e,n)=>{const t=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?t.has(r.class_name):void 0,type:"durable_object"})}return i},_=(e,n)=>{const t=[];for(const i of e.queues?.producers??[]){if(i.binding===void 0||i.binding===""){n.push("queues.producers");continue}t.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}t.push({binding:i.queue,resource:i.queue,type:"queue_consumer"})}return t},f=(e,n)=>Object.entries(e.exports??{}).flatMap(([t,i])=>i?.type!=="workflow"?(n.push(`exports.${t}`),[]):[{binding:t,className:t,resource:i.name,type:"workflow"}]),v=(e,n,t)=>[...f(e,t),...m(e,n),...g(e,n),..._(e,n),...c.filter(i=>e[i.field]?.binding!==void 0).map(i=>({binding:e[i.field]?.binding,type:i.type}))],w=e=>{const n=[],t=[],i=v(e,n,t).map(s=>y(s)).toSorted((s,o)=>s.type.localeCompare(o.type)||s.binding.localeCompare(o.binding)),r=[...Object.keys(e).filter(s=>!p.has(s)&&!b.has(s)),...n.map(s=>`${s} (entry with no binding name)`),...t].toSorted((s,o)=>s.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((s,o)=>s.localeCompare(o)),version:l}};export{l as BINDING_MANIFEST_VERSION,w as buildBindingManifest};
|
package/dist/packem_shared/{REMOTE_ELIGIBLE_KEYS-ikHvqvS5.mjs → REMOTE_ELIGIBLE_KEYS-CBKtw0E-.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{writeFileSync as p,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 d={ai:{label:"AI",shape:"object"},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(d),f=(e,r)=>typeof e.binding=="string"?e.binding:r,c=(e,r,n,t)=>{const o=[];for(const[a,i]of r.entries())i!=null&&o.push({binding:f(i,`#${String(a)}`),kind:n,path:[...t,a],section:e});return o},R=(e,r)=>{const{label:n,shape:t}=d[e];if(t==="array"){const a=r[e]??[];return c(e,a,n,[])}if(t==="producers")return c(e,r.queues?.producers??[],n,["producers"]);const o=r.ai;return o==null?[]:[{binding:f(o,e),kind:n,path:[],section:e}]},B=e=>S.flatMap(r=>R(r,e)),j=(e,r)=>{let n=e;for(const t of r)n=g(n,[t.section,...t.path,"remote"],!0);return n},s=()=>{},_=e=>{let r=!1;return()=>{if(!r){r=!0;try{m(e,{force:!0,recursive:!0})}catch{}}}};let u=0;const C=()=>(u+=1,`.wrangler.lunora-remote.${String(process.pid)}.${String(u)}.jsonc`),O=e=>{if(!e.enabled)return{cleanup:s,enabled:!1,remoteBindings:[]};const r=y(e.projectRoot);if(!r)return{cleanup:s,enabled:!0,reason:"wrangler.jsonc not found",remoteBindings:[]};const{parsed:n,text:t}=v(r);if(n===void 0)return{cleanup:s,enabled:!0,reason:`failed to parse ${r} as JSONC`,remoteBindings:[]};const o=h(b(e.projectRoot)),a=B(n).filter(l=>l.section!=="services"||!o.has(l.binding));if(a.length===0)return{cleanup:s,enabled:!0,reason:"no remote-eligible bindings to proxy",remoteBindings:[]};const i=E(e.projectRoot,C());return p(i,j(t,a),"utf8"),{cleanup:_(i),configPath:i,enabled:!0,remoteBindings:a}},w=e=>{if(e===void 0)return!1;const r=e.trim().toLowerCase();return r==="1"||r==="true"},$=e=>e.flag===!0||w(e.envValue)?!0:e.configPreference??!1;export{d as REMOTE_ELIGIBLE_KEYS,j as injectRemoteFlags,w as isRemoteEnvEnabled,O as materializeRemoteWranglerConfig,B as planRemoteBindings,$ as resolveRemoteEnabled};
|
|
1
|
+
import{writeFileSync as p,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 d={ai:{label:"AI",shape:"object"},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(d),f=(e,r)=>typeof e.binding=="string"?e.binding:r,c=(e,r,n,t)=>{const o=[];for(const[a,i]of r.entries())i!=null&&o.push({binding:f(i,`#${String(a)}`),kind:n,path:[...t,a],section:e});return o},R=(e,r)=>{const{label:n,shape:t}=d[e];if(t==="array"){const a=r[e]??[];return c(e,a,n,[])}if(t==="producers")return c(e,r.queues?.producers??[],n,["producers"]);const o=r.ai;return o==null?[]:[{binding:f(o,e),kind:n,path:[],section:e}]},B=e=>S.flatMap(r=>R(r,e)),j=(e,r)=>{let n=e;for(const t of r)n=g(n,[t.section,...t.path,"remote"],!0);return n},s=()=>{},_=e=>{let r=!1;return()=>{if(!r){r=!0;try{m(e,{force:!0,recursive:!0})}catch{}}}};let u=0;const C=()=>(u+=1,`.wrangler.lunora-remote.${String(process.pid)}.${String(u)}.jsonc`),O=e=>{if(!e.enabled)return{cleanup:s,enabled:!1,remoteBindings:[]};const r=y(e.projectRoot);if(!r)return{cleanup:s,enabled:!0,reason:"wrangler.jsonc not found",remoteBindings:[]};const{parsed:n,text:t}=v(r);if(n===void 0)return{cleanup:s,enabled:!0,reason:`failed to parse ${r} as JSONC`,remoteBindings:[]};const o=h(b(e.projectRoot)),a=B(n).filter(l=>l.section!=="services"||!o.has(l.binding));if(a.length===0)return{cleanup:s,enabled:!0,reason:"no remote-eligible bindings to proxy",remoteBindings:[]};const i=E(e.projectRoot,C());return p(i,j(t,a),"utf8"),{cleanup:_(i),configPath:i,enabled:!0,remoteBindings:a}},w=e=>{if(e===void 0)return!1;const r=e.trim().toLowerCase();return r==="1"||r==="true"},$=e=>e.flag===!0||w(e.envValue)?!0:e.configPreference??!1;export{d as REMOTE_ELIGIBLE_KEYS,_ as createCleanup,j as injectRemoteFlags,w as isRemoteEnvEnabled,O as materializeRemoteWranglerConfig,B as planRemoteBindings,$ as resolveRemoteEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{writeFileSync as a}from"node:fs";import{isAbsolute as p,dirname as d,resolve as f,join as m}from"node:path";import{applyModify as l}from"./applyModify-DKP2l6S9.mjs";import{createCleanup as u}from"./REMOTE_ELIGIBLE_KEYS-CBKtw0E-.mjs";import{readWranglerJsonc as g}from"./WRANGLER_FILES-UNW-xY5u.mjs";let c=0;const v=e=>{const{parsed:t,text:r}=g(e),o=t?.build;if(typeof o?.command!="string"||o.command===""||typeof o.cwd=="string"&&p(o.cwd))return{configPath:e};const i=d(e),s=f(i,typeof o.cwd=="string"?o.cwd:".");c+=1;const n=m(i,`.wrangler.lunora-service.${String(process.pid)}.${String(c)}.jsonc`);return a(n,l(r,["build","cwd"],s),"utf8"),{cleanup:u(n),configPath:n}},j=e=>{const t=e.map(o=>v(o)),r=t.flatMap(o=>o.cleanup===void 0?[]:[o.cleanup]);return{cleanup:()=>{for(const o of r)o()},configPaths:t.map(o=>o.configPath)}};export{j as materializeServiceDevConfigs};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/config",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.293",
|
|
4
4
|
"description": "Internal shared CLI + Vite config layer for Lunora: wrangler.jsonc validation, binding inference, and .dev.vars scaffolding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bindings",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@lunora/codegen": "1.0.0-alpha.
|
|
58
|
-
"@lunora/container": "1.0.0-alpha.
|
|
57
|
+
"@lunora/codegen": "1.0.0-alpha.248",
|
|
58
|
+
"@lunora/container": "1.0.0-alpha.65",
|
|
59
59
|
"@lunora/errors": "1.0.0-alpha.48",
|
|
60
|
-
"@lunora/seed": "1.0.0-alpha.
|
|
60
|
+
"@lunora/seed": "1.0.0-alpha.178",
|
|
61
61
|
"@visulima/colorize": "2.1.1",
|
|
62
62
|
"@visulima/find-ai-runner": "1.0.2",
|
|
63
63
|
"@visulima/package": "5.0.20",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{sqliteClasses as u}from"./wranglerToAlchemy-BMOQYRyw.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)),a=[{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:"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([...a.map(e=>e.field),...c.map(e=>e.field),"durable_objects","exports","queues"]),d=(e,n)=>(typeof n=="string"?[n]:n??[]).map(i=>e[i]).find(i=>typeof i=="string"&&i!==""),m=(e,n)=>{const t=[];for(const i of a)for(const r of e[i.field]??[]){const s=d(r,i.bindingKey);if(s===void 0){n.push(i.field);continue}t.push({binding:s,className:d(r,"class_name"),resource:d(r,i.resourceKey),resourceId:d(r,i.resourceIdKey),type:i.type})}return t},_=(e,n)=>{const t=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?t.has(r.class_name):void 0,type:"durable_object"})}return i},g=(e,n)=>{const t=[];for(const i of e.queues?.producers??[]){if(i.binding===void 0||i.binding===""){n.push("queues.producers");continue}t.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}t.push({binding:i.queue,resource:i.queue,type:"queue_consumer"})}return t},f=(e,n)=>Object.entries(e.exports??{}).flatMap(([t,i])=>i?.type!=="workflow"?(n.push(`exports.${t}`),[]):[{binding:t,className:t,resource:i.name,type:"workflow"}]),v=(e,n,t)=>[...f(e,t),...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}))],w=e=>{const n=[],t=[],i=v(e,n,t).map(s=>y(s)).toSorted((s,o)=>s.type.localeCompare(o.type)||s.binding.localeCompare(o.binding)),r=[...Object.keys(e).filter(s=>!p.has(s)&&!b.has(s)),...n.map(s=>`${s} (entry with no binding name)`),...t].toSorted((s,o)=>s.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((s,o)=>s.localeCompare(o)),version:l}};export{l as BINDING_MANIFEST_VERSION,w as buildBindingManifest};
|