@lunora/config 1.0.0-alpha.279 → 1.0.0-alpha.280

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.
@@ -1,5 +1,24 @@
1
1
  import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-DvKkJ7HJ.mjs";
2
2
  import { WranglerVariableIR } from '@lunora/codegen';
3
+ /** The project coordinates the validator needs. */
4
+ interface AssertWranglerOptions {
5
+ /** Absolute path to the project root holding `wrangler.jsonc`. */
6
+ projectRoot: string;
7
+ /** The schema directory, relative to `projectRoot` (usually `"lunora"`). */
8
+ schemaDir: string;
9
+ }
10
+ /**
11
+ * Throw unless `wrangler.jsonc` satisfies the schema's binding requirements.
12
+ *
13
+ * Non-blocking validator warnings go to `warn`. `remedy` closes both error
14
+ * messages — the caller's own "and restart the dev server" / "and rebuild" —
15
+ * since that is the only part a reader acts on differently per front-end.
16
+ *
17
+ * Must run AFTER binding provisioning: the bindings this requires are largely the
18
+ * ones Lunora writes itself, so validating first fails the very first build of any
19
+ * project that declares a `.global()` table or a container.
20
+ */
21
+ declare const assertWranglerSatisfiesSchema: (options: AssertWranglerOptions, warn: (message: string) => void, remedy: string) => void;
3
22
  /**
4
23
  * Translate a `wrangler.jsonc` into an [Alchemy](https://alchemy.run) program.
5
24
  *
@@ -409,6 +428,32 @@ declare const reconcileWranglerCrons: (projectRoot: string, cronTriggers: Readon
409
428
  * had already drifted into two copies of the same sentence.
410
429
  */
411
430
  declare const describePreservedCrons: (preserved: ReadonlyArray<string>) => string | undefined;
431
+ /** The project coordinates every reconciler here needs. */
432
+ interface ReconcileProject {
433
+ /** Absolute path to the project root holding `wrangler.jsonc`. */
434
+ projectRoot: string;
435
+ /** The schema directory, relative to `projectRoot` (usually `"lunora"`). */
436
+ schemaDir: string;
437
+ }
438
+ /** The two logger methods every reconciler here needs; `info` is optional on Vite's. */
439
+ interface ReconcileLogger {
440
+ info?: (message: string) => void;
441
+ warn: (message: string) => void;
442
+ }
443
+ /**
444
+ * Infer the Cloudflare bindings the project's code implies and reconcile them
445
+ * into `wrangler.jsonc` (Durable Objects, their migration classes, and the
446
+ * `DB` D1 binding for `.global()` schemas). Best-effort and idempotent — runs
447
+ * once at startup so the user never hand-writes binding boilerplate. A failure
448
+ * here must never abort codegen; the wrangler validator reports real problems.
449
+ *
450
+ * `onExportGaps` (dev only) is invoked when a declared container/workflow isn't
451
+ * re-exported by the worker entry, so the caller can raise it in the browser
452
+ * error overlay in addition to the console warning.
453
+ */
454
+ declare const reconcileBindingsSafely: (options: ReconcileProject, logger: ReconcileLogger, onExportGaps?: (gaps: ReadonlyArray<ExportGap>) => void) => Promise<void>;
455
+ /** Reconcile cron triggers and the compatibility date into `wrangler.jsonc`. */
456
+ declare const reconcileWranglerExtras: (projectRoot: string, cronTriggers: ReadonlyArray<string>, logger: ReconcileLogger) => void;
412
457
  /**
413
458
  * The wrangler config sections Lunora can safely flip to remote mode in dev,
414
459
  * each with the human label used in logs and the structural `shape` the entry
@@ -918,39 +963,7 @@ declare const UNEXPORTED_CLASS_MARKER = "does not export it";
918
963
  * `{ problems, wranglerPath }` shape plus the structured `report`.
919
964
  */
920
965
  declare const validateWranglerProject: (options: WranglerProjectValidationOptions) => WranglerProjectValidationResult;
921
- export { type AlchemyTranslation, BINDING_MANIFEST_VERSION,
922
- /**
923
- * `@lunora/config/cloudflare` — the wrangler layer.
924
- *
925
- * Everything here speaks `wrangler.jsonc`: validating it, reconciling inferred
926
- * bindings/crons/compatibility-date into it, resolving remote bindings, and the
927
- * `DeployDriver` that ties them together for `--target cloudflare`.
928
- *
929
- * Split out from the package root so `@lunora/config` itself stays
930
- * provider-neutral. The root keeps what any target needs — the `DeployDriver`
931
- * contract, the driver registry, project config and target resolution,
932
- * `.dev.vars` grammar, binding *inference* — while emission and validation,
933
- * which are wrangler-shaped by definition, live behind this subpath.
934
- * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
935
- * subpath rather than relocating wholesale.
936
- */
937
- type BindingManifest,
938
- /**
939
- * `@lunora/config/cloudflare` — the wrangler layer.
940
- *
941
- * Everything here speaks `wrangler.jsonc`: validating it, reconciling inferred
942
- * bindings/crons/compatibility-date into it, resolving remote bindings, and the
943
- * `DeployDriver` that ties them together for `--target cloudflare`.
944
- *
945
- * Split out from the package root so `@lunora/config` itself stays
946
- * provider-neutral. The root keeps what any target needs — the `DeployDriver`
947
- * contract, the driver registry, project config and target resolution,
948
- * `.dev.vars` grammar, binding *inference* — while emission and validation,
949
- * which are wrangler-shaped by definition, live behind this subpath.
950
- * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
951
- * subpath rather than relocating wholesale.
952
- */
953
- type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap,
966
+ export { type AlchemyTranslation,
954
967
  /**
955
968
  * `@lunora/config/cloudflare` — the wrangler layer.
956
969
  *
@@ -966,4 +979,4 @@ type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap,
966
979
  * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
967
980
  * subpath rather than relocating wholesale.
968
981
  */
969
- 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 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, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
982
+ 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, 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 };
@@ -1,5 +1,24 @@
1
1
  import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-DvKkJ7HJ.js";
2
2
  import { WranglerVariableIR } from '@lunora/codegen';
3
+ /** The project coordinates the validator needs. */
4
+ interface AssertWranglerOptions {
5
+ /** Absolute path to the project root holding `wrangler.jsonc`. */
6
+ projectRoot: string;
7
+ /** The schema directory, relative to `projectRoot` (usually `"lunora"`). */
8
+ schemaDir: string;
9
+ }
10
+ /**
11
+ * Throw unless `wrangler.jsonc` satisfies the schema's binding requirements.
12
+ *
13
+ * Non-blocking validator warnings go to `warn`. `remedy` closes both error
14
+ * messages — the caller's own "and restart the dev server" / "and rebuild" —
15
+ * since that is the only part a reader acts on differently per front-end.
16
+ *
17
+ * Must run AFTER binding provisioning: the bindings this requires are largely the
18
+ * ones Lunora writes itself, so validating first fails the very first build of any
19
+ * project that declares a `.global()` table or a container.
20
+ */
21
+ declare const assertWranglerSatisfiesSchema: (options: AssertWranglerOptions, warn: (message: string) => void, remedy: string) => void;
3
22
  /**
4
23
  * Translate a `wrangler.jsonc` into an [Alchemy](https://alchemy.run) program.
5
24
  *
@@ -409,6 +428,32 @@ declare const reconcileWranglerCrons: (projectRoot: string, cronTriggers: Readon
409
428
  * had already drifted into two copies of the same sentence.
410
429
  */
411
430
  declare const describePreservedCrons: (preserved: ReadonlyArray<string>) => string | undefined;
431
+ /** The project coordinates every reconciler here needs. */
432
+ interface ReconcileProject {
433
+ /** Absolute path to the project root holding `wrangler.jsonc`. */
434
+ projectRoot: string;
435
+ /** The schema directory, relative to `projectRoot` (usually `"lunora"`). */
436
+ schemaDir: string;
437
+ }
438
+ /** The two logger methods every reconciler here needs; `info` is optional on Vite's. */
439
+ interface ReconcileLogger {
440
+ info?: (message: string) => void;
441
+ warn: (message: string) => void;
442
+ }
443
+ /**
444
+ * Infer the Cloudflare bindings the project's code implies and reconcile them
445
+ * into `wrangler.jsonc` (Durable Objects, their migration classes, and the
446
+ * `DB` D1 binding for `.global()` schemas). Best-effort and idempotent — runs
447
+ * once at startup so the user never hand-writes binding boilerplate. A failure
448
+ * here must never abort codegen; the wrangler validator reports real problems.
449
+ *
450
+ * `onExportGaps` (dev only) is invoked when a declared container/workflow isn't
451
+ * re-exported by the worker entry, so the caller can raise it in the browser
452
+ * error overlay in addition to the console warning.
453
+ */
454
+ declare const reconcileBindingsSafely: (options: ReconcileProject, logger: ReconcileLogger, onExportGaps?: (gaps: ReadonlyArray<ExportGap>) => void) => Promise<void>;
455
+ /** Reconcile cron triggers and the compatibility date into `wrangler.jsonc`. */
456
+ declare const reconcileWranglerExtras: (projectRoot: string, cronTriggers: ReadonlyArray<string>, logger: ReconcileLogger) => void;
412
457
  /**
413
458
  * The wrangler config sections Lunora can safely flip to remote mode in dev,
414
459
  * each with the human label used in logs and the structural `shape` the entry
@@ -918,39 +963,7 @@ declare const UNEXPORTED_CLASS_MARKER = "does not export it";
918
963
  * `{ problems, wranglerPath }` shape plus the structured `report`.
919
964
  */
920
965
  declare const validateWranglerProject: (options: WranglerProjectValidationOptions) => WranglerProjectValidationResult;
921
- export { type AlchemyTranslation, BINDING_MANIFEST_VERSION,
922
- /**
923
- * `@lunora/config/cloudflare` — the wrangler layer.
924
- *
925
- * Everything here speaks `wrangler.jsonc`: validating it, reconciling inferred
926
- * bindings/crons/compatibility-date into it, resolving remote bindings, and the
927
- * `DeployDriver` that ties them together for `--target cloudflare`.
928
- *
929
- * Split out from the package root so `@lunora/config` itself stays
930
- * provider-neutral. The root keeps what any target needs — the `DeployDriver`
931
- * contract, the driver registry, project config and target resolution,
932
- * `.dev.vars` grammar, binding *inference* — while emission and validation,
933
- * which are wrangler-shaped by definition, live behind this subpath.
934
- * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
935
- * subpath rather than relocating wholesale.
936
- */
937
- type BindingManifest,
938
- /**
939
- * `@lunora/config/cloudflare` — the wrangler layer.
940
- *
941
- * Everything here speaks `wrangler.jsonc`: validating it, reconciling inferred
942
- * bindings/crons/compatibility-date into it, resolving remote bindings, and the
943
- * `DeployDriver` that ties them together for `--target cloudflare`.
944
- *
945
- * Split out from the package root so `@lunora/config` itself stays
946
- * provider-neutral. The root keeps what any target needs — the `DeployDriver`
947
- * contract, the driver registry, project config and target resolution,
948
- * `.dev.vars` grammar, binding *inference* — while emission and validation,
949
- * which are wrangler-shaped by definition, live behind this subpath.
950
- * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
951
- * subpath rather than relocating wholesale.
952
- */
953
- type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap,
966
+ export { type AlchemyTranslation,
954
967
  /**
955
968
  * `@lunora/config/cloudflare` — the wrangler layer.
956
969
  *
@@ -966,4 +979,4 @@ type BindingRequirement, CLOUDFLARE_DRIVER, type ExportGap,
966
979
  * Plan 114 §5.3 (D6): a package carrying real provider code isolates it behind a
967
980
  * subpath rather than relocating wholesale.
968
981
  */
969
- 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 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, buildBindingManifest, collectExportGaps, collectWranglerSecretVariables, describePreservedCrons, findWranglerFile, injectRemoteFlags, isCacheEnabled, isRemoteEnvEnabled, materializeRemoteWranglerConfig, mergeWranglerEnvironment, planRemoteBindings, readWranglerJsonc, reconcileWranglerBindings, reconcileWranglerCompatibilityDate, reconcileWranglerCrons, resolveRemoteEnabled, scanWranglerVariablesForSecrets, validateWrangler, validateWranglerConfig, validateWranglerProject, withTailConsumer, wranglerToAlchemy };
982
+ 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, 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 };
@@ -1 +1 @@
1
- import{BINDING_MANIFEST_VERSION as o,buildBindingManifest as a}from"../packem_shared/BINDING_MANIFEST_VERSION-B8dwEKLn.mjs";import{default as l}from"../packem_shared/CLOUDFLARE_DRIVER-Ci9oJMYb.mjs";import{collectExportGaps as i,reconcileWranglerBindings as E}from"../packem_shared/collectExportGaps-BJw9LdRV.mjs";import{reconcileWranglerCompatibilityDate as R}from"../packem_shared/reconcileWranglerCompatibilityDate-7OO_xaKR.mjs";import{describePreservedCrons as c,reconcileWranglerCrons as s}from"../packem_shared/describePreservedCrons-Ci5r2aph.mjs";import{REMOTE_ELIGIBLE_KEYS as d,injectRemoteFlags as p,isRemoteEnvEnabled as I,materializeRemoteWranglerConfig as W,planRemoteBindings as _,resolveRemoteEnabled as x}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-D-edJjVY.mjs";import{WORKERS_CACHE_MIN_DATE as A,isCacheEnabled as D}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{WRANGLER_FILES as S,findWranglerFile as T,readWranglerJsonc as b}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{collectWranglerSecretVariables as F,scanWranglerVariablesForSecrets as N}from"../packem_shared/collectWranglerSecretVariables-D-usPfT8.mjs";import{wranglerToAlchemy as M}from"../packem_shared/wranglerToAlchemy-SDoS_XY0.mjs";import{REQUIRED_COMPATIBILITY_DATE as G,REQUIRED_FLAG as P,UNEXPORTED_CLASS_MARKER as U,mergeWranglerEnvironment as V,validateWrangler as h,validateWranglerConfig as u,validateWranglerProject as K,withTailConsumer as j}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-SdRHaUwh.mjs";export{o as BINDING_MANIFEST_VERSION,l as CLOUDFLARE_DRIVER,d as REMOTE_ELIGIBLE_KEYS,G as REQUIRED_COMPATIBILITY_DATE,P as REQUIRED_FLAG,U as UNEXPORTED_CLASS_MARKER,A as WORKERS_CACHE_MIN_DATE,S as WRANGLER_FILES,a as buildBindingManifest,i as collectExportGaps,F as collectWranglerSecretVariables,c as describePreservedCrons,T as findWranglerFile,p as injectRemoteFlags,D as isCacheEnabled,I as isRemoteEnvEnabled,W as materializeRemoteWranglerConfig,V as mergeWranglerEnvironment,_ as planRemoteBindings,b as readWranglerJsonc,E as reconcileWranglerBindings,R as reconcileWranglerCompatibilityDate,s as reconcileWranglerCrons,x as resolveRemoteEnabled,N as scanWranglerVariablesForSecrets,h as validateWrangler,u as validateWranglerConfig,K as validateWranglerProject,j as withTailConsumer,M as wranglerToAlchemy};
1
+ import{assertWranglerSatisfiesSchema as o}from"../packem_shared/assertWranglerSatisfiesSchema-DHITzU7H.mjs";import{BINDING_MANIFEST_VERSION as n,buildBindingManifest as l}from"../packem_shared/BINDING_MANIFEST_VERSION-B8dwEKLn.mjs";import{default as i}from"../packem_shared/CLOUDFLARE_DRIVER-Ci9oJMYb.mjs";import{collectExportGaps as m,reconcileWranglerBindings as s}from"../packem_shared/collectExportGaps-BJw9LdRV.mjs";import{reconcileWranglerCompatibilityDate as g}from"../packem_shared/reconcileWranglerCompatibilityDate-7OO_xaKR.mjs";import{describePreservedCrons as f,reconcileWranglerCrons as p}from"../packem_shared/describePreservedCrons-Ci5r2aph.mjs";import{reconcileBindingsSafely as W,reconcileWranglerExtras as x}from"../packem_shared/reconcileBindingsSafely-Ds107djO.mjs";import{REMOTE_ELIGIBLE_KEYS as _,injectRemoteFlags as C,isRemoteEnvEnabled as S,materializeRemoteWranglerConfig as A,planRemoteBindings as D,resolveRemoteEnabled as L}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-D-edJjVY.mjs";import{WORKERS_CACHE_MIN_DATE as b,isCacheEnabled as v}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{WRANGLER_FILES as F,findWranglerFile as N,readWranglerJsonc as M}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{collectWranglerSecretVariables as G,scanWranglerVariablesForSecrets as h}from"../packem_shared/collectWranglerSecretVariables-D-usPfT8.mjs";import{wranglerToAlchemy as U}from"../packem_shared/wranglerToAlchemy-SDoS_XY0.mjs";import{REQUIRED_COMPATIBILITY_DATE as u,REQUIRED_FLAG as y,UNEXPORTED_CLASS_MARKER as K,mergeWranglerEnvironment as j,validateWrangler as w,validateWranglerConfig as Q,validateWranglerProject as Y,withTailConsumer as z}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-SdRHaUwh.mjs";export{n as BINDING_MANIFEST_VERSION,i as CLOUDFLARE_DRIVER,_ as REMOTE_ELIGIBLE_KEYS,u as REQUIRED_COMPATIBILITY_DATE,y as REQUIRED_FLAG,K as UNEXPORTED_CLASS_MARKER,b as WORKERS_CACHE_MIN_DATE,F as WRANGLER_FILES,o as assertWranglerSatisfiesSchema,l as buildBindingManifest,m as collectExportGaps,G as collectWranglerSecretVariables,f as describePreservedCrons,N as findWranglerFile,C as injectRemoteFlags,v as isCacheEnabled,S as isRemoteEnvEnabled,A as materializeRemoteWranglerConfig,j as mergeWranglerEnvironment,D as planRemoteBindings,M as readWranglerJsonc,W as reconcileBindingsSafely,s as reconcileWranglerBindings,g as reconcileWranglerCompatibilityDate,p as reconcileWranglerCrons,x as reconcileWranglerExtras,L as resolveRemoteEnabled,h as scanWranglerVariablesForSecrets,w as validateWrangler,Q as validateWranglerConfig,Y as validateWranglerProject,z as withTailConsumer,U as wranglerToAlchemy};
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
1
+ import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen';
2
2
  export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
3
3
  import { Writable } from 'node:stream';
4
4
  import { D as DeployDriver } from "./packem_shared/schema-info.d-DvKkJ7HJ.mjs";
@@ -480,6 +480,20 @@ declare const upsertDevVariableLine: (content: string, key: string, value: strin
480
480
  * Backs `lunora env unset`.
481
481
  */
482
482
  declare const removeDevVariableLine: (content: string, key: string) => string;
483
+ /**
484
+ * Worker env var the dev tooling sets so the Lunora runtime recognises a
485
+ * development deployment (`@lunora/do`'s `isDevEnvironment`) and therefore
486
+ * streams every RPC dispatch summary to the terminal, keeps argument/error
487
+ * detail unredacted, and runs the studio security audit with `dev: true`.
488
+ */
489
+ declare const DEV_WORKER_ENV_VAR = "WORKER_ENV";
490
+ /** The value that flags a dev deployment. */
491
+ declare const DEV_WORKER_ENV_VALUE = "development";
492
+ /**
493
+ * Top up `.dev.vars` with the dev-environment flag unless the project already
494
+ * declares it (in `.dev.vars` itself, or in the wrangler config's `vars`).
495
+ */
496
+ declare const ensureDevWorkerEnv: (projectRoot: string, info: (message: string) => void) => void;
483
497
  /** The default deploy target — today's behavior for every project. */
484
498
  declare const DEFAULT_DEPLOY_TARGET = "cloudflare";
485
499
  /** The ids a caller may select, for error messages and `--target` help text. */
@@ -594,6 +608,51 @@ declare const detectLintTools: (projectRoot: string) => LintTool[];
594
608
  * @returns one outcome per tool, in the order given.
595
609
  */
596
610
  declare const applyLintIgnores: (projectRoot: string, tools: ReadonlyArray<LintTool>) => LintIgnoreOutcome[];
611
+ /** The painted ` lunora ` badge, prepended to the plugin's branded log lines. */
612
+ declare const LUNORA_TAG: string;
613
+ /** Prefix a message with the Lunora badge (e.g. `lunoraLine("codegen done")`). */
614
+ declare const lunoraLine: (message: string) => string;
615
+ /**
616
+ * A branded schema-advisory line: the level-coloured badge (`warn`/`error`/`info`)
617
+ * — same badges the CLI reporter uses, so the dev server reads as one tool — then
618
+ * the rule name, the detail, and the remediation. Replaces the old dense
619
+ * `lunora-badge … schema advisory [WARN] …` line with the level-appropriate badge.
620
+ */
621
+ declare const advisoryLine: (level: "ERROR" | "INFO" | "WARN", name: string, detail: string, remediation: string) => string;
622
+ /** The three channels a bundler plugin reports through; `console` satisfies it, as does Rspack's `Logger`. */
623
+ interface FindingLogger {
624
+ error: (message: string) => void;
625
+ warn: (message: string) => void;
626
+ }
627
+ /**
628
+ * Print every schema advisory and platform-portability diagnostic a codegen run
629
+ * produced, each on its own level-appropriate channel.
630
+ *
631
+ * Codegen returns these without printing — each caller presents them through its
632
+ * own channel. Both bundler plugins present them identically, so this is that one
633
+ * presentation: severity → logger method, rendered by {@link advisoryLine}. It
634
+ * lives here rather than in either plugin because the loops were copied verbatim
635
+ * between them, and a copy is how `vite build` and `rspack build` start
636
+ * disagreeing about what a schema problem looks like.
637
+ *
638
+ * Reporting only — {@link blockingFindingsMessage} decides what BLOCKS.
639
+ */
640
+ declare const reportCodegenFindings: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">, logger: FindingLogger) => void;
641
+ /**
642
+ * The one aggregated line a bundler plugin fails a production build with, or
643
+ * `undefined` when nothing is ERROR-level.
644
+ *
645
+ * An ERROR advisory says a call throws at runtime; an `error` platform
646
+ * diagnostic says the emitted surface does not match the declared target. Both
647
+ * are wrong output, not style, so `vite build` / `rspack build` / `lunora deploy`
648
+ * all refuse them.
649
+ *
650
+ * The filter+dedup+sort behind it stays in `@lunora/codegen` (shared with the CLI
651
+ * gates); only the wording and the fold of the two categories live here, which is
652
+ * presentation — and presentation is what this module owns, which is also why
653
+ * this needs no `tag` parameter: {@link LUNORA_TAG} is right above it.
654
+ */
655
+ declare const blockingFindingsMessage: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">) => string | undefined;
597
656
  /** Severity a formatted line should be surfaced at, mapped onto the three logger channels. */
598
657
  type LunoraLineLevel = "error" | "info" | "warn";
599
658
  /** A formatted lunora event: the channel to surface it on, the display text, and which event produced it. */
@@ -1262,4 +1321,4 @@ declare const badgeWidth: (_spec: BadgeSpec) => number;
1262
1321
  declare const paintBadge: (spec: BadgeSpec) => string;
1263
1322
  /** Dim continuation text (a step's chosen answer, shown under the question). */
1264
1323
  declare const paintAnswer: (text: string) => string;
1265
- export { ACCENT, AGENT_MODE_ENV, AGENT_RULES_DIR, AGENT_RULES_HINT, AGENT_RULES_HINT_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type AgentRulesStatus, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BADGES, BADGE_COLUMN_WIDTH, type BadgeName, type BadgeSpec, CODEGEN_ENV, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_DEPLOY_TARGET, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, type DeployDriver, type DestructiveEdit, type DetectedFramework, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNA_ART, LUNA_BUNNY, LUNA_NAME, LUNA_SIGNOFF, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, LUNORA_SKILL_NAMES, type LevelBadgeName, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, LunoraReporter, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type PackageManager, type PackageManagerProbe, type ParseSchemaResult, type PostCodegenHookResult, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, addArgsFor, applyAdditiveEdit, applyLintIgnores, badgeLead, badgeWidth, buildPackageSecretsBlock, claimAgentRulesHint, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, deployTargetIds, detectAgentRules, detectAiAgent, detectFramework, detectInstalledManagers, detectLintTools, detectPackageManager, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, escapeRegExp, execArgsFor, fillDevSecrets, formatLunoraEvent, generateSecretValue, installArgsFor, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, isRunnableTarget, padBadge, paintAnswer, paintBadge, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
1324
+ export { ACCENT, AGENT_MODE_ENV, AGENT_RULES_DIR, AGENT_RULES_HINT, AGENT_RULES_HINT_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type AgentRulesStatus, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BADGES, BADGE_COLUMN_WIDTH, type BadgeName, type BadgeSpec, CODEGEN_ENV, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_DEPLOY_TARGET, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DeployDriver, type DestructiveEdit, type DetectedFramework, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNA_ART, LUNA_BUNNY, LUNA_NAME, LUNA_SIGNOFF, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, LUNORA_SKILL_NAMES, LUNORA_TAG, type LevelBadgeName, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, LunoraReporter, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type PackageManager, type PackageManagerProbe, type ParseSchemaResult, type PostCodegenHookResult, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, addArgsFor, advisoryLine, applyAdditiveEdit, applyLintIgnores, badgeLead, badgeWidth, blockingFindingsMessage, buildPackageSecretsBlock, claimAgentRulesHint, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, deployTargetIds, detectAgentRules, detectAiAgent, detectFramework, detectInstalledManagers, detectLintTools, detectPackageManager, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, execArgsFor, fillDevSecrets, formatLunoraEvent, generateSecretValue, installArgsFor, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, isRunnableTarget, lunoraLine, padBadge, paintAnswer, paintBadge, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
1
+ import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen';
2
2
  export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
3
3
  import { Writable } from 'node:stream';
4
4
  import { D as DeployDriver } from "./packem_shared/schema-info.d-DvKkJ7HJ.js";
@@ -480,6 +480,20 @@ declare const upsertDevVariableLine: (content: string, key: string, value: strin
480
480
  * Backs `lunora env unset`.
481
481
  */
482
482
  declare const removeDevVariableLine: (content: string, key: string) => string;
483
+ /**
484
+ * Worker env var the dev tooling sets so the Lunora runtime recognises a
485
+ * development deployment (`@lunora/do`'s `isDevEnvironment`) and therefore
486
+ * streams every RPC dispatch summary to the terminal, keeps argument/error
487
+ * detail unredacted, and runs the studio security audit with `dev: true`.
488
+ */
489
+ declare const DEV_WORKER_ENV_VAR = "WORKER_ENV";
490
+ /** The value that flags a dev deployment. */
491
+ declare const DEV_WORKER_ENV_VALUE = "development";
492
+ /**
493
+ * Top up `.dev.vars` with the dev-environment flag unless the project already
494
+ * declares it (in `.dev.vars` itself, or in the wrangler config's `vars`).
495
+ */
496
+ declare const ensureDevWorkerEnv: (projectRoot: string, info: (message: string) => void) => void;
483
497
  /** The default deploy target — today's behavior for every project. */
484
498
  declare const DEFAULT_DEPLOY_TARGET = "cloudflare";
485
499
  /** The ids a caller may select, for error messages and `--target` help text. */
@@ -594,6 +608,51 @@ declare const detectLintTools: (projectRoot: string) => LintTool[];
594
608
  * @returns one outcome per tool, in the order given.
595
609
  */
596
610
  declare const applyLintIgnores: (projectRoot: string, tools: ReadonlyArray<LintTool>) => LintIgnoreOutcome[];
611
+ /** The painted ` lunora ` badge, prepended to the plugin's branded log lines. */
612
+ declare const LUNORA_TAG: string;
613
+ /** Prefix a message with the Lunora badge (e.g. `lunoraLine("codegen done")`). */
614
+ declare const lunoraLine: (message: string) => string;
615
+ /**
616
+ * A branded schema-advisory line: the level-coloured badge (`warn`/`error`/`info`)
617
+ * — same badges the CLI reporter uses, so the dev server reads as one tool — then
618
+ * the rule name, the detail, and the remediation. Replaces the old dense
619
+ * `lunora-badge … schema advisory [WARN] …` line with the level-appropriate badge.
620
+ */
621
+ declare const advisoryLine: (level: "ERROR" | "INFO" | "WARN", name: string, detail: string, remediation: string) => string;
622
+ /** The three channels a bundler plugin reports through; `console` satisfies it, as does Rspack's `Logger`. */
623
+ interface FindingLogger {
624
+ error: (message: string) => void;
625
+ warn: (message: string) => void;
626
+ }
627
+ /**
628
+ * Print every schema advisory and platform-portability diagnostic a codegen run
629
+ * produced, each on its own level-appropriate channel.
630
+ *
631
+ * Codegen returns these without printing — each caller presents them through its
632
+ * own channel. Both bundler plugins present them identically, so this is that one
633
+ * presentation: severity → logger method, rendered by {@link advisoryLine}. It
634
+ * lives here rather than in either plugin because the loops were copied verbatim
635
+ * between them, and a copy is how `vite build` and `rspack build` start
636
+ * disagreeing about what a schema problem looks like.
637
+ *
638
+ * Reporting only — {@link blockingFindingsMessage} decides what BLOCKS.
639
+ */
640
+ declare const reportCodegenFindings: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">, logger: FindingLogger) => void;
641
+ /**
642
+ * The one aggregated line a bundler plugin fails a production build with, or
643
+ * `undefined` when nothing is ERROR-level.
644
+ *
645
+ * An ERROR advisory says a call throws at runtime; an `error` platform
646
+ * diagnostic says the emitted surface does not match the declared target. Both
647
+ * are wrong output, not style, so `vite build` / `rspack build` / `lunora deploy`
648
+ * all refuse them.
649
+ *
650
+ * The filter+dedup+sort behind it stays in `@lunora/codegen` (shared with the CLI
651
+ * gates); only the wording and the fold of the two categories live here, which is
652
+ * presentation — and presentation is what this module owns, which is also why
653
+ * this needs no `tag` parameter: {@link LUNORA_TAG} is right above it.
654
+ */
655
+ declare const blockingFindingsMessage: (result: Pick<CodegenResult, "advisories" | "platformDiagnostics">) => string | undefined;
597
656
  /** Severity a formatted line should be surfaced at, mapped onto the three logger channels. */
598
657
  type LunoraLineLevel = "error" | "info" | "warn";
599
658
  /** A formatted lunora event: the channel to surface it on, the display text, and which event produced it. */
@@ -1262,4 +1321,4 @@ declare const badgeWidth: (_spec: BadgeSpec) => number;
1262
1321
  declare const paintBadge: (spec: BadgeSpec) => string;
1263
1322
  /** Dim continuation text (a step's chosen answer, shown under the question). */
1264
1323
  declare const paintAnswer: (text: string) => string;
1265
- export { ACCENT, AGENT_MODE_ENV, AGENT_RULES_DIR, AGENT_RULES_HINT, AGENT_RULES_HINT_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type AgentRulesStatus, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BADGES, BADGE_COLUMN_WIDTH, type BadgeName, type BadgeSpec, CODEGEN_ENV, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_DEPLOY_TARGET, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, type DeployDriver, type DestructiveEdit, type DetectedFramework, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNA_ART, LUNA_BUNNY, LUNA_NAME, LUNA_SIGNOFF, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, LUNORA_SKILL_NAMES, type LevelBadgeName, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, LunoraReporter, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type PackageManager, type PackageManagerProbe, type ParseSchemaResult, type PostCodegenHookResult, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, addArgsFor, applyAdditiveEdit, applyLintIgnores, badgeLead, badgeWidth, buildPackageSecretsBlock, claimAgentRulesHint, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, deployTargetIds, detectAgentRules, detectAiAgent, detectFramework, detectInstalledManagers, detectLintTools, detectPackageManager, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, escapeRegExp, execArgsFor, fillDevSecrets, formatLunoraEvent, generateSecretValue, installArgsFor, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, isRunnableTarget, padBadge, paintAnswer, paintBadge, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
1324
+ export { ACCENT, AGENT_MODE_ENV, AGENT_RULES_DIR, AGENT_RULES_HINT, AGENT_RULES_HINT_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type AgentRulesStatus, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BADGES, BADGE_COLUMN_WIDTH, type BadgeName, type BadgeSpec, CODEGEN_ENV, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_DEPLOY_TARGET, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DeployDriver, type DestructiveEdit, type DetectedFramework, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNA_ART, LUNA_BUNNY, LUNA_NAME, LUNA_SIGNOFF, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, LUNORA_SKILL_NAMES, LUNORA_TAG, type LevelBadgeName, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, LunoraReporter, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type PackageManager, type PackageManagerProbe, type ParseSchemaResult, type PostCodegenHookResult, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, addArgsFor, advisoryLine, applyAdditiveEdit, applyLintIgnores, badgeLead, badgeWidth, blockingFindingsMessage, buildPackageSecretsBlock, claimAgentRulesHint, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, deployTargetIds, detectAgentRules, detectAiAgent, detectFramework, detectInstalledManagers, detectLintTools, detectPackageManager, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, execArgsFor, fillDevSecrets, formatLunoraEvent, generateSecretValue, installArgsFor, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, isRunnableTarget, lunoraLine, padBadge, paintAnswer, paintBadge, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
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 E}from"./packem_shared/discoverAgentInfo-CTdCSfYM.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as l,AGENT_RULES_HINT_ENV as n,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{CODEGEN_ENV as m,isCodegenDisabled as D}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as f}from"./packem_shared/discoverContainerInfo-EhZtEBQs.mjs";import{streamContainerLogs as N}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as R,projectUsesUmbrella as T,readProjectDependencyNames as g}from"./packem_shared/detectFramework-CUiVEHDQ.mjs";import{DEV_BINDINGS_FILE as x,DEV_DAEMON_ENV as V,DEV_HANDOFF_ENV as P,DEV_LOG_FILE as u,DEV_LOG_FILE_ENV as O,DEV_STATE_DIR as F,DEV_STATE_FILE as C,claimDevServerState as G,clearDevServerState as U,isDevServerReady as b,isProcessAlive as M,isRecordedProcessCurrent as y,readDevServerState as k,readLiveDevServerState as B,updateDevServerState as w,writeDevServerState as K}from"./packem_shared/DEV_BINDINGS_FILE-pyOiNLP4.mjs";import{DEV_VARS_EXAMPLE_FILE as H,DEV_VARS_FILE as Y,DEV_VARS_KEY_PATTERN as h,escapeRegExp as W,parseDevVariableEntries as J,removeDevVariableLine as q,upsertDevVariableLine as X}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEFAULT_DEPLOY_TARGET as Q,deployTargetIds as Z,isRunnableTarget as $,resolveDeployDriver as ee,runnableTargetIds as re}from"./packem_shared/DEFAULT_DEPLOY_TARGET-B-e9mqgX.mjs";import{COMPOSED_WORKER_ENTRY as te,GENERATED_CLASS_MODULES as ae,inferLunoraBindings as Ee,packageNamesFromBindings as se}from"./packem_shared/COMPOSED_WORKER_ENTRY-Bj793dir.mjs";import{LINKED_PROJECT_DIR as le,LINKED_PROJECT_FILE as ne,readLinkedProject as pe,writeLinkedProject as _e}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as de,applyLintIgnores as Se,detectLintTools as me}from"./packem_shared/LUNORA_IGNORED_PATHS-BHABA9u-.mjs";import{LUNORA_EVENT_SOURCE as Ae,formatLunoraEvent as fe}from"./packem_shared/LUNORA_EVENT_SOURCE-DYdcDU9G.mjs";import{default as Ne}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as Re,detectInstalledManagers as Te,detectPackageManager as ge,execArgsFor as Ie,installArgsFor as xe,runScriptArgsFor as Ve,runScriptCommand as Pe}from"./packem_shared/addArgsFor-CWb4cPij.mjs";import{P as Oe,s as Fe}from"./packem_shared/package-secrets-registry-DvtTiK4b.mjs";import{runPostCodegenHook as Ge}from"./packem_shared/runPostCodegenHook-CVrOTiGB.mjs";import{interpretRemote as be,readProjectRemotePreference as Me,readProjectTarget as ye,resolveProjectTarget as ke,resolveTargetOrThrow as Be}from"./packem_shared/interpretRemote-CQ06qpjM.mjs";import{createConfirm as Ke,isInteractive as je,promptMultiSelect as He,promptSelect as Ye,promptText as he,promptYesNo as We}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{buildPackageSecretsBlock as qe,ensureDevVariables as Xe,ensureDevVarsExample as ze,fillDevSecrets as Qe,generateSecretValue as Ze,isMintableSecretKey as $e,isPlaceholderValue as er,planDevSecretsFill as rr,planDevVariablesAugment as or,planDevVariablesScaffold as tr,requiredSecrets as ar,writeDevVariablesFileAtomically as Er}from"./packem_shared/buildPackageSecretsBlock-yv9mjKEW.mjs";import{applyAdditiveEdit as ir,classifyEdit as lr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as pr}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as cr,resolveServerModule as dr,scaffoldPolicyFile as Sr,wireRlsIntoProcedure as mr}from"./packem_shared/classifyPolicyEdit-D8NwrHxR.mjs";import{discoverSchemaInfo as Ar}from"./packem_shared/discoverSchemaInfo-DJvevsCm.mjs";import{ACCENT as Lr,BADGES as Nr,BADGE_COLUMN_WIDTH as vr,LUNA_ART as Rr,LUNA_BUNNY as Tr,LUNA_NAME as gr,LUNA_SIGNOFF as Ir,STEP_BADGE_NAMES as xr,badgeLead as Vr,badgeWidth as Pr,padBadge as ur,paintAnswer as Or,paintBadge as Fr}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{discoverWorkflowInfo as Gr}from"./packem_shared/discoverWorkflowInfo-BsPvlo6O.mjs";export{Lr as ACCENT,o as AGENT_MODE_ENV,i as AGENT_RULES_DIR,l as AGENT_RULES_HINT,n as AGENT_RULES_HINT_ENV,Nr as BADGES,vr as BADGE_COLUMN_WIDTH,m as CODEGEN_ENV,te as COMPOSED_WORKER_ENTRY,Q as DEFAULT_DEPLOY_TARGET,x as DEV_BINDINGS_FILE,V as DEV_DAEMON_ENV,P as DEV_HANDOFF_ENV,u as DEV_LOG_FILE,O as DEV_LOG_FILE_ENV,F as DEV_STATE_DIR,C as DEV_STATE_FILE,H as DEV_VARS_EXAMPLE_FILE,Y as DEV_VARS_FILE,h as DEV_VARS_KEY_PATTERN,ae as GENERATED_CLASS_MODULES,le as LINKED_PROJECT_DIR,ne as LINKED_PROJECT_FILE,Rr as LUNA_ART,Tr as LUNA_BUNNY,gr as LUNA_NAME,Ir as LUNA_SIGNOFF,Ae as LUNORA_EVENT_SOURCE,de as LUNORA_IGNORED_PATHS,p as LUNORA_SKILL_NAMES,Ne as LunoraReporter,Oe as PACKAGE_SECRETS_REGISTRY,_ as ROOT_SKILL_NAME,xr as STEP_BADGE_NAMES,Re as addArgsFor,ir as applyAdditiveEdit,Se as applyLintIgnores,Vr as badgeLead,Pr as badgeWidth,qe as buildPackageSecretsBlock,c as claimAgentRulesHint,G as claimDevServerState,lr as classifyEdit,cr as classifyPolicyEdit,U as clearDevServerState,Ke as createConfirm,Z as deployTargetIds,d as detectAgentRules,t as detectAiAgent,R as detectFramework,Te as detectInstalledManagers,me as detectLintTools,ge as detectPackageManager,E as discoverAgentInfo,f as discoverContainerInfo,Ar as discoverSchemaInfo,Gr as discoverWorkflowInfo,Xe as ensureDevVariables,ze as ensureDevVarsExample,W as escapeRegExp,Ie as execArgsFor,Qe as fillDevSecrets,fe as formatLunoraEvent,Ze as generateSecretValue,Ee as inferLunoraBindings,xe as installArgsFor,be as interpretRemote,D as isCodegenDisabled,b as isDevServerReady,je as isInteractive,$e as isMintableSecretKey,er as isPlaceholderValue,M as isProcessAlive,y as isRecordedProcessCurrent,$ as isRunnableTarget,se as packageNamesFromBindings,ur as padBadge,Or as paintAnswer,Fr as paintBadge,J as parseDevVariableEntries,pr as parseSchema,rr as planDevSecretsFill,or as planDevVariablesAugment,tr as planDevVariablesScaffold,T as projectUsesUmbrella,He as promptMultiSelect,Ye as promptSelect,he as promptText,We as promptYesNo,k as readDevServerState,pe as readLinkedProject,B as readLiveDevServerState,g as readProjectDependencyNames,Me as readProjectRemotePreference,ye as readProjectTarget,q as removeDevVariableLine,ar as requiredSecrets,ee as resolveDeployDriver,ke as resolveProjectTarget,dr as resolveServerModule,Be as resolveTargetOrThrow,Ge as runPostCodegenHook,Ve as runScriptArgsFor,Pe as runScriptCommand,re as runnableTargetIds,Sr as scaffoldPolicyFile,Fe as secretsForPackages,N as streamContainerLogs,w as updateDevServerState,X as upsertDevVariableLine,mr as wireRlsIntoProcedure,K as writeDevServerState,Er as writeDevVariablesFileAtomically,_e as writeLinkedProject};
1
+ import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as E}from"./packem_shared/discoverAgentInfo-CTdCSfYM.mjs";import{AGENT_RULES_DIR as s,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as _,LUNORA_SKILL_NAMES as l,ROOT_SKILL_NAME as p,claimAgentRulesHint as d,detectAgentRules as c}from"./packem_shared/AGENT_RULES_DIR-C54Ta_vz.mjs";import{CODEGEN_ENV as D,isCodegenDisabled as m}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as L}from"./packem_shared/discoverContainerInfo-EhZtEBQs.mjs";import{streamContainerLogs as N}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as R,projectUsesUmbrella as g,readProjectDependencyNames as T}from"./packem_shared/detectFramework-CUiVEHDQ.mjs";import{DEV_BINDINGS_FILE as x,DEV_DAEMON_ENV as I,DEV_HANDOFF_ENV as P,DEV_LOG_FILE as u,DEV_LOG_FILE_ENV as O,DEV_STATE_DIR as F,DEV_STATE_FILE as C,claimDevServerState as U,clearDevServerState as G,isDevServerReady as b,isProcessAlive as M,isRecordedProcessCurrent as y,readDevServerState as k,readLiveDevServerState as B,updateDevServerState as K,writeDevServerState as w}from"./packem_shared/DEV_BINDINGS_FILE-pyOiNLP4.mjs";import{DEV_VARS_EXAMPLE_FILE as H,DEV_VARS_FILE as W,DEV_VARS_KEY_PATTERN as Y,escapeRegExp as h,parseDevVariableEntries as J,removeDevVariableLine as q,upsertDevVariableLine as X}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as Q,DEV_WORKER_ENV_VAR as Z,ensureDevWorkerEnv as $}from"./packem_shared/DEV_WORKER_ENV_VALUE-DwGANZVw.mjs";import{DEFAULT_DEPLOY_TARGET as re,deployTargetIds as oe,isRunnableTarget as te,resolveDeployDriver as ae,runnableTargetIds as Ee}from"./packem_shared/DEFAULT_DEPLOY_TARGET-B-e9mqgX.mjs";import{COMPOSED_WORKER_ENTRY as se,GENERATED_CLASS_MODULES as ne,inferLunoraBindings as _e,packageNamesFromBindings as le}from"./packem_shared/COMPOSED_WORKER_ENTRY-Bj793dir.mjs";import{LINKED_PROJECT_DIR as de,LINKED_PROJECT_FILE as ce,readLinkedProject as Ae,writeLinkedProject as De}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as Se,applyLintIgnores as Le,detectLintTools as fe}from"./packem_shared/LUNORA_IGNORED_PATHS-BHABA9u-.mjs";import{LUNORA_TAG as ve,advisoryLine as Re,blockingFindingsMessage as ge,lunoraLine as Te,reportCodegenFindings as Ve}from"./packem_shared/LUNORA_TAG-CiQM3BkI.mjs";import{LUNORA_EVENT_SOURCE as Ie,formatLunoraEvent as Pe}from"./packem_shared/LUNORA_EVENT_SOURCE-DYdcDU9G.mjs";import{default as Oe}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as Ce,detectInstalledManagers as Ue,detectPackageManager as Ge,execArgsFor as be,installArgsFor as Me,runScriptArgsFor as ye,runScriptCommand as ke}from"./packem_shared/addArgsFor-CWb4cPij.mjs";import{P as Ke,s as we}from"./packem_shared/package-secrets-registry-DvtTiK4b.mjs";import{runPostCodegenHook as He}from"./packem_shared/runPostCodegenHook-CVrOTiGB.mjs";import{interpretRemote as Ye,readProjectRemotePreference as he,readProjectTarget as Je,resolveProjectTarget as qe,resolveTargetOrThrow as Xe}from"./packem_shared/interpretRemote-CQ06qpjM.mjs";import{createConfirm as Qe,isInteractive as Ze,promptMultiSelect as $e,promptSelect as er,promptText as rr,promptYesNo as or}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{buildPackageSecretsBlock as ar,ensureDevVariables as Er,ensureDevVarsExample as ir,fillDevSecrets as sr,generateSecretValue as nr,isMintableSecretKey as _r,isPlaceholderValue as lr,planDevSecretsFill as pr,planDevVariablesAugment as dr,planDevVariablesScaffold as cr,requiredSecrets as Ar,writeDevVariablesFileAtomically as Dr}from"./packem_shared/buildPackageSecretsBlock-yv9mjKEW.mjs";import{applyAdditiveEdit as Sr,classifyEdit as Lr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as Nr}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as Rr,resolveServerModule as gr,scaffoldPolicyFile as Tr,wireRlsIntoProcedure as Vr}from"./packem_shared/classifyPolicyEdit-D8NwrHxR.mjs";import{discoverSchemaInfo as Ir}from"./packem_shared/discoverSchemaInfo-DJvevsCm.mjs";import{ACCENT as ur,BADGES as Or,BADGE_COLUMN_WIDTH as Fr,LUNA_ART as Cr,LUNA_BUNNY as Ur,LUNA_NAME as Gr,LUNA_SIGNOFF as br,STEP_BADGE_NAMES as Mr,badgeLead as yr,badgeWidth as kr,padBadge as Br,paintAnswer as Kr,paintBadge as wr}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{discoverWorkflowInfo as Hr}from"./packem_shared/discoverWorkflowInfo-BsPvlo6O.mjs";export{ur as ACCENT,o as AGENT_MODE_ENV,s as AGENT_RULES_DIR,n as AGENT_RULES_HINT,_ as AGENT_RULES_HINT_ENV,Or as BADGES,Fr as BADGE_COLUMN_WIDTH,D as CODEGEN_ENV,se as COMPOSED_WORKER_ENTRY,re as DEFAULT_DEPLOY_TARGET,x as DEV_BINDINGS_FILE,I as DEV_DAEMON_ENV,P as DEV_HANDOFF_ENV,u as DEV_LOG_FILE,O as DEV_LOG_FILE_ENV,F as DEV_STATE_DIR,C as DEV_STATE_FILE,H as DEV_VARS_EXAMPLE_FILE,W as DEV_VARS_FILE,Y as DEV_VARS_KEY_PATTERN,Q as DEV_WORKER_ENV_VALUE,Z as DEV_WORKER_ENV_VAR,ne as GENERATED_CLASS_MODULES,de as LINKED_PROJECT_DIR,ce as LINKED_PROJECT_FILE,Cr as LUNA_ART,Ur as LUNA_BUNNY,Gr as LUNA_NAME,br as LUNA_SIGNOFF,Ie as LUNORA_EVENT_SOURCE,Se as LUNORA_IGNORED_PATHS,l as LUNORA_SKILL_NAMES,ve as LUNORA_TAG,Oe as LunoraReporter,Ke as PACKAGE_SECRETS_REGISTRY,p as ROOT_SKILL_NAME,Mr as STEP_BADGE_NAMES,Ce as addArgsFor,Re as advisoryLine,Sr as applyAdditiveEdit,Le as applyLintIgnores,yr as badgeLead,kr as badgeWidth,ge as blockingFindingsMessage,ar as buildPackageSecretsBlock,d as claimAgentRulesHint,U as claimDevServerState,Lr as classifyEdit,Rr as classifyPolicyEdit,G as clearDevServerState,Qe as createConfirm,oe as deployTargetIds,c as detectAgentRules,t as detectAiAgent,R as detectFramework,Ue as detectInstalledManagers,fe as detectLintTools,Ge as detectPackageManager,E as discoverAgentInfo,L as discoverContainerInfo,Ir as discoverSchemaInfo,Hr as discoverWorkflowInfo,Er as ensureDevVariables,ir as ensureDevVarsExample,$ as ensureDevWorkerEnv,h as escapeRegExp,be as execArgsFor,sr as fillDevSecrets,Pe as formatLunoraEvent,nr as generateSecretValue,_e as inferLunoraBindings,Me as installArgsFor,Ye as interpretRemote,m as isCodegenDisabled,b as isDevServerReady,Ze as isInteractive,_r as isMintableSecretKey,lr as isPlaceholderValue,M as isProcessAlive,y as isRecordedProcessCurrent,te as isRunnableTarget,Te as lunoraLine,le as packageNamesFromBindings,Br as padBadge,Kr as paintAnswer,wr as paintBadge,J as parseDevVariableEntries,Nr as parseSchema,pr as planDevSecretsFill,dr as planDevVariablesAugment,cr as planDevVariablesScaffold,g as projectUsesUmbrella,$e as promptMultiSelect,er as promptSelect,rr as promptText,or as promptYesNo,k as readDevServerState,Ae as readLinkedProject,B as readLiveDevServerState,T as readProjectDependencyNames,he as readProjectRemotePreference,Je as readProjectTarget,q as removeDevVariableLine,Ve as reportCodegenFindings,Ar as requiredSecrets,ae as resolveDeployDriver,qe as resolveProjectTarget,gr as resolveServerModule,Xe as resolveTargetOrThrow,He as runPostCodegenHook,ye as runScriptArgsFor,ke as runScriptCommand,Ee as runnableTargetIds,Tr as scaffoldPolicyFile,we as secretsForPackages,N as streamContainerLogs,K as updateDevServerState,X as upsertDevVariableLine,Vr as wireRlsIntoProcedure,w as writeDevServerState,Dr as writeDevVariablesFileAtomically,De as writeLinkedProject};
@@ -0,0 +1 @@
1
+ import{readFileSync as l}from"node:fs";import{findWranglerFile as m,readWranglerJsonc as E}from"./WRANGLER_FILES-UNW-xY5u.mjs";import{DEV_VARS_FILE as i,parseDevVariableEntries as V,upsertDevVariableLine as c}from"./DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{writeDevVariablesFileAtomically as p}from"./buildPackageSecretsBlock-yv9mjKEW.mjs";import{join as v}from"node:path";const n="WORKER_ENV",a="development",d=e=>{const r=m(e);return r===void 0?{}:E(r).parsed?.vars??{}},W=(e,r)=>{const o=v(e,i);let t;try{t=l(o,"utf8")}catch{return}V(t).some(s=>s.key===n)||n in d(e)||(p(o,c(t,n,a)),r(`set ${n}=${a} in ${i} so the dev worker runs in development mode`))};export{a as DEV_WORKER_ENV_VALUE,n as DEV_WORKER_ENV_VAR,W as ensureDevWorkerEnv};
@@ -0,0 +1 @@
1
+ import{describeErrorLevelFindings as c,sortedUniqueNames as d}from"@lunora/codegen";import{paintBadge as t,BADGES as r}from"./ACCENT-CotPTfv7.mjs";const a=t(r.lunora),v=n=>`${a} ${n}`,m={ERROR:r.error,INFO:r.info,WARN:r.warn},s=(n,i,e,o)=>`${t(m[n])} ${i}: ${e} — ${o}`,g=(n,i)=>{for(const e of n.advisories){const o=s(e.level,e.name,e.detail,e.remediation);e.level==="ERROR"?i.error(o):i.warn(o)}for(const e of n.platformDiagnostics){const o=s(e.level==="error"?"ERROR":"WARN",e.name,e.message,e.remediation);e.level==="error"?i.error(o):i.warn(o)}},$=n=>{const{advisoryNames:i,platformDiagnosticNames:e}=c(n),o=d([...i,...e]);if(o.length===0)return;const l=o.length===1?"advisory/platform diagnostic":"advisories/platform diagnostics";return`${a} ${String(o.length)} ERROR-level ${l} (${o.join(", ")}) — see the log above for detail.`};export{a as LUNORA_TAG,s as advisoryLine,$ as blockingFindingsMessage,v as lunoraLine,g as reportCodegenFindings};
@@ -0,0 +1,3 @@
1
+ import{LunoraError as n}from"@lunora/errors";import{lunoraLine as i}from"./LUNORA_TAG-CiQM3BkI.mjs";import{validateWranglerProject as l}from"./REQUIRED_COMPATIBILITY_DATE-SdRHaUwh.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
+ `));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
+ `))};export{m as assertWranglerSatisfiesSchema};
@@ -0,0 +1 @@
1
+ import{inferLunoraBindings as d}from"./COMPOSED_WORKER_ENTRY-Bj793dir.mjs";import{LUNORA_TAG as r}from"./LUNORA_TAG-CiQM3BkI.mjs";import{reconcileWranglerBindings as f}from"./collectExportGaps-BJw9LdRV.mjs";import{reconcileWranglerCompatibilityDate as p}from"./reconcileWranglerCompatibilityDate-7OO_xaKR.mjs";import{reconcileWranglerCrons as g,describePreservedCrons as $}from"./describePreservedCrons-Ci5r2aph.mjs";const b=async(i,a,t)=>{try{const n=await d({projectRoot:i.projectRoot,schemaDir:i.schemaDir}),e=f(i.projectRoot,n),o=e.wranglerPath??"wrangler.jsonc";e.added.length>0&&a.info?.(`${r} inferred bindings → ${e.added.join(", ")} (written to ${o})`),e.updated.length>0&&a.info?.(`${r} updated bindings → ${e.updated.join(", ")} (written to ${o})`);for(const s of e.warnings)a.warn(`${r} ${s}`);e.exportGaps.length>0&&t?.(e.exportGaps)}catch(n){const e=n instanceof Error?n.message:String(n);a.warn(`${r} binding inference skipped: ${e}`)}},c=new Map,j=(i,a,t)=>{try{const n=g(i,a);n.changed&&t.info?.(`${r} synced ${a.length.toFixed(0)} cron trigger(s) into ${n.wranglerPath??"wrangler.jsonc"}`);for(const s of n.warnings)t.warn(`${r} ${s}`);const e=n.preserved.join("\0"),o=$(n.preserved);o!==void 0&&(n.changed||c.get(i)!==e)&&t.info?.(`${r} ${o}`),c.set(i,e)}catch(n){const e=n instanceof Error?n.message:String(n);t.warn(`${r} cron trigger sync skipped: ${e}`)}try{const n=p(i);n.changed&&t.info?.(`${r} bumped compatibility_date to ${n.date??"unknown"} (Workers Cache enabled) → ${n.wranglerPath??"wrangler.jsonc"}`)}catch(n){const e=n instanceof Error?n.message:String(n);t.warn(`${r} compatibility date sync skipped: ${e}`)}};export{b as reconcileBindingsSafely,j as reconcileWranglerExtras};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/config",
3
- "version": "1.0.0-alpha.279",
3
+ "version": "1.0.0-alpha.280",
4
4
  "description": "Internal shared CLI + Vite config layer for Lunora: wrangler.jsonc validation, binding inference, and .dev.vars scaffolding",
5
5
  "keywords": [
6
6
  "bindings",
@@ -54,7 +54,7 @@
54
54
  "access": "public"
55
55
  },
56
56
  "dependencies": {
57
- "@lunora/codegen": "1.0.0-alpha.235",
57
+ "@lunora/codegen": "1.0.0-alpha.236",
58
58
  "@lunora/container": "1.0.0-alpha.63",
59
59
  "@lunora/errors": "1.0.0-alpha.47",
60
60
  "@lunora/seed": "1.0.0-alpha.167",