@lunora/config 1.0.0-alpha.282 → 1.0.0-alpha.283
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 +94 -93
- package/dist/cloudflare/index.d.ts +94 -93
- package/dist/cloudflare/index.mjs +1 -1
- package/dist/index.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{BINDING_MANIFEST_VERSION-B8dwEKLn.mjs → BINDING_MANIFEST_VERSION-B4Tu8Ytd.mjs} +1 -1
- package/dist/packem_shared/CLOUDFLARE_DRIVER-DUE6r-Pg.mjs +1 -0
- package/dist/packem_shared/COMPOSED_WORKER_ENTRY-5R-BECOC.mjs +1 -0
- package/dist/packem_shared/DEFAULT_DEPLOY_TARGET-CtEZtsUF.mjs +2 -0
- package/dist/packem_shared/REQUIRED_COMPATIBILITY_DATE-g_1F-n2X.mjs +1 -0
- package/dist/packem_shared/UNEXPORTED_CLASS_MARKER-Bc302QS4.mjs +1 -0
- package/dist/packem_shared/addArgsFor-CYZKhNIo.mjs +1 -0
- package/dist/packem_shared/{assertWranglerSatisfiesSchema-DHITzU7H.mjs → assertWranglerSatisfiesSchema-B24XPKq7.mjs} +1 -1
- package/dist/packem_shared/collectExportGaps-BmEGzQQc.mjs +2 -0
- package/dist/packem_shared/inferLunoraBindings-GaAITuz-.mjs +1 -0
- package/dist/packem_shared/{interpretRemote-CQ06qpjM.mjs → interpretRemote-Da32GcUi.mjs} +1 -1
- package/dist/packem_shared/mergeWranglerEnvironment-BIcLqPfv.mjs +1 -0
- package/dist/packem_shared/reconcileBindingsSafely-DOqY2zb2.mjs +1 -0
- package/dist/packem_shared/{runPostCodegenHook-CVrOTiGB.mjs → runPostCodegenHook-B0T1q2YI.mjs} +1 -1
- package/dist/packem_shared/{schema-info.d-DvKkJ7HJ.d.mts → schema-info.d-C3DeuUmC.d.mts} +111 -51
- package/dist/packem_shared/{schema-info.d-DvKkJ7HJ.d.ts → schema-info.d-C3DeuUmC.d.ts} +111 -51
- package/dist/packem_shared/validate-bindings-D6-vb6if.mjs +1 -0
- package/dist/packem_shared/withTailConsumer-DaP3r6ia.mjs +1 -0
- package/dist/packem_shared/{wranglerToAlchemy-SDoS_XY0.mjs → wranglerToAlchemy-DZOim9As.mjs} +1 -1
- package/package.json +3 -3
- package/dist/packem_shared/CLOUDFLARE_DRIVER-Ci9oJMYb.mjs +0 -1
- package/dist/packem_shared/COMPOSED_WORKER_ENTRY-Bj793dir.mjs +0 -1
- package/dist/packem_shared/DEFAULT_DEPLOY_TARGET-B-e9mqgX.mjs +0 -1
- package/dist/packem_shared/REQUIRED_COMPATIBILITY_DATE-SdRHaUwh.mjs +0 -1
- package/dist/packem_shared/addArgsFor-CWb4cPij.mjs +0 -1
- package/dist/packem_shared/collectExportGaps-BJw9LdRV.mjs +0 -2
- package/dist/packem_shared/reconcileBindingsSafely-Ds107djO.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-
|
|
1
|
+
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-C3DeuUmC.mjs";
|
|
2
2
|
import { WranglerVariableIR } from '@lunora/codegen';
|
|
3
3
|
/** The project coordinates the validator needs. */
|
|
4
4
|
interface AssertWranglerOptions {
|
|
@@ -311,7 +311,7 @@ declare const collectExportGaps: (inferred: InferredBindings) => ExportGap[];
|
|
|
311
311
|
* {@link reconcileEnvQueues}, which retunes queue consumers the block already
|
|
312
312
|
* declares and adds nothing. Otherwise it is used only to emit an
|
|
313
313
|
* advisory warning, because bindings (`durable_objects`, `d1_databases`, …)
|
|
314
|
-
* are non-inheritable (see `wrangler-
|
|
314
|
+
* are non-inheritable (see `wrangler-environment.ts`'s `NON_INHERITABLE_KEYS`):
|
|
315
315
|
* a `--env production` deploy needs its OWN copy of each one, and silently
|
|
316
316
|
* writing only to the top level would leave that gap unmentioned. Extending
|
|
317
317
|
* the JSONC writer itself to target `env.<name>.*` idempotently for every
|
|
@@ -625,73 +625,7 @@ interface RemoteEnableInputs {
|
|
|
625
625
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
626
626
|
*/
|
|
627
627
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
628
|
-
/**
|
|
629
|
-
* Single source of truth for "does this wrangler config enable Workers
|
|
630
|
-
* Cache?" and "what compatibility_date does that require?".
|
|
631
|
-
*
|
|
632
|
-
* Before this module, `reconcile-compatibility-date.ts` (auto-bump) and
|
|
633
|
-
* `wrangler-validator.ts` (validation) each carried their own
|
|
634
|
-
* `WORKERS_CACHE_MIN_DATE` literal and their own top-level/`exports[]`
|
|
635
|
-
* cache-enabled walk — two copies of the same fact that could silently drift
|
|
636
|
-
* apart (a date bumped in one file without the other would either validate a
|
|
637
|
-
* config the reconciler wouldn't produce, or vice versa).
|
|
638
|
-
*/
|
|
639
|
-
/** The `compatibility_date` Workers Cache (`cache.enabled: true`) requires. */
|
|
640
|
-
declare const WORKERS_CACHE_MIN_DATE = "2026-05-01";
|
|
641
|
-
/** The subset of a parsed `wrangler.jsonc` the cache-enabled check reads. */
|
|
642
|
-
interface WranglerCacheShape {
|
|
643
|
-
cache?: {
|
|
644
|
-
enabled?: boolean;
|
|
645
|
-
} | null;
|
|
646
|
-
exports?: Record<string, {
|
|
647
|
-
cache?: {
|
|
648
|
-
enabled?: boolean;
|
|
649
|
-
} | null;
|
|
650
|
-
} | null> | null;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* Whether Workers Cache is enabled anywhere in a parsed wrangler config — the
|
|
654
|
-
* top-level `cache.enabled` toggle, or a per-export override in
|
|
655
|
-
* `exports[name].cache.enabled` (Workers can scope cache per named export).
|
|
656
|
-
* `undefined`/`null` (an unparsed or absent config) is treated as disabled.
|
|
657
|
-
*/
|
|
658
|
-
declare const isCacheEnabled: (parsed: WranglerCacheShape | null | undefined) => boolean;
|
|
659
|
-
/** Candidate wrangler config filenames, in the order every consumer probes them. */
|
|
660
|
-
declare const WRANGLER_FILES: readonly ["wrangler.jsonc", "wrangler.json"];
|
|
661
|
-
/** Locate the project's wrangler config, or `undefined` when none exists. */
|
|
662
|
-
declare const findWranglerFile: (projectRoot: string) => string | undefined;
|
|
663
|
-
interface ReadWranglerResult<T> {
|
|
664
|
-
/** Parsed config, or `undefined` when the file was not valid JSONC. */
|
|
665
|
-
parsed: T | undefined;
|
|
666
|
-
/** Raw file text — needed for comment-preserving `modify`/`applyEdits`. */
|
|
667
|
-
text: string;
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* Read and JSONC-parse a wrangler config file. Returns the raw `text` (for
|
|
671
|
-
* structural edits) alongside `parsed`, which is `undefined` when the file is
|
|
672
|
-
* not valid JSONC or does not parse to an object. Allows trailing commas, as
|
|
673
|
-
* wrangler does.
|
|
674
|
-
*/
|
|
675
|
-
declare const readWranglerJsonc: <T = unknown>(wranglerPath: string) => ReadWranglerResult<T>;
|
|
676
|
-
/**
|
|
677
|
-
* Pure scan of a `vars` map for plaintext secrets — the FS-free core, exported for
|
|
678
|
-
* unit tests. A variable is flagged when, for a **string** value that is neither a
|
|
679
|
-
* placeholder nor a public/publishable key, EITHER the value matches a known
|
|
680
|
-
* secret shape (`secretKindOf`) OR the key name strongly implies a secret and the
|
|
681
|
-
* value is long enough to plausibly be one. `kind` is the matched shape, or
|
|
682
|
-
* `secret_named_var` for the key-name path.
|
|
683
|
-
*/
|
|
684
|
-
declare const scanWranglerVariablesForSecrets: (variables: Record<string, unknown> | undefined, file: string) => WranglerVariableIR[];
|
|
685
|
-
/**
|
|
686
|
-
* Read the project's `wrangler.jsonc` and return its plaintext-secret `vars` as IR
|
|
687
|
-
* for the `plaintext_secret_in_wrangler_vars` lint. Returns `[]` when there is no
|
|
688
|
-
* wrangler config, it doesn't parse, or nothing looks like a secret. Scans the
|
|
689
|
-
* top-level `vars` block (mirroring the existing `validateCorsVariables` scope);
|
|
690
|
-
* per-environment `env.<name>.vars` overrides are out of scope for now.
|
|
691
|
-
*/
|
|
692
|
-
declare const collectWranglerSecretVariables: (projectRoot: string) => WranglerVariableIR[];
|
|
693
|
-
declare const REQUIRED_COMPATIBILITY_DATE: string;
|
|
694
|
-
declare const REQUIRED_FLAG: string;
|
|
628
|
+
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
695
629
|
interface WranglerDurableObjectBinding {
|
|
696
630
|
class_name?: string;
|
|
697
631
|
name?: string;
|
|
@@ -879,6 +813,45 @@ interface WranglerValidationReport {
|
|
|
879
813
|
valid: boolean;
|
|
880
814
|
warnings: string[];
|
|
881
815
|
}
|
|
816
|
+
/**
|
|
817
|
+
* Return a new `WranglerConfig` with `consumer` present in `tail_consumers`,
|
|
818
|
+
* wiring this Worker to forward its tail events (logs/exceptions) to another
|
|
819
|
+
* Worker that fans them out to an external sink. Pure and idempotent: an
|
|
820
|
+
* existing entry with the same `service` + `environment` is left untouched
|
|
821
|
+
* rather than duplicated, so it is safe to call on every codegen/deploy.
|
|
822
|
+
*/
|
|
823
|
+
declare const withTailConsumer: (wrangler: WranglerConfig, consumer: TailConsumer) => WranglerConfig;
|
|
824
|
+
/**
|
|
825
|
+
* Single source of truth for "does this wrangler config enable Workers
|
|
826
|
+
* Cache?" and "what compatibility_date does that require?".
|
|
827
|
+
*
|
|
828
|
+
* Before this module, `reconcile-compatibility-date.ts` (auto-bump) and
|
|
829
|
+
* `wrangler-validator.ts` (validation) each carried their own
|
|
830
|
+
* `WORKERS_CACHE_MIN_DATE` literal and their own top-level/`exports[]`
|
|
831
|
+
* cache-enabled walk — two copies of the same fact that could silently drift
|
|
832
|
+
* apart (a date bumped in one file without the other would either validate a
|
|
833
|
+
* config the reconciler wouldn't produce, or vice versa).
|
|
834
|
+
*/
|
|
835
|
+
/** The `compatibility_date` Workers Cache (`cache.enabled: true`) requires. */
|
|
836
|
+
declare const WORKERS_CACHE_MIN_DATE = "2026-05-01";
|
|
837
|
+
/** The subset of a parsed `wrangler.jsonc` the cache-enabled check reads. */
|
|
838
|
+
interface WranglerCacheShape {
|
|
839
|
+
cache?: {
|
|
840
|
+
enabled?: boolean;
|
|
841
|
+
} | null;
|
|
842
|
+
exports?: Record<string, {
|
|
843
|
+
cache?: {
|
|
844
|
+
enabled?: boolean;
|
|
845
|
+
} | null;
|
|
846
|
+
} | null> | null;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Whether Workers Cache is enabled anywhere in a parsed wrangler config — the
|
|
850
|
+
* top-level `cache.enabled` toggle, or a per-export override in
|
|
851
|
+
* `exports[name].cache.enabled` (Workers can scope cache per named export).
|
|
852
|
+
* `undefined`/`null` (an unparsed or absent config) is treated as disabled.
|
|
853
|
+
*/
|
|
854
|
+
declare const isCacheEnabled: (parsed: WranglerCacheShape | null | undefined) => boolean;
|
|
882
855
|
interface WranglerEnvironmentMerge {
|
|
883
856
|
/** Set when `environment` names no `env.<name>` block declared in the config — the caller should treat this as a hard validation failure. */
|
|
884
857
|
error?: string;
|
|
@@ -904,32 +877,23 @@ interface WranglerEnvironmentMerge {
|
|
|
904
877
|
* top-level fallback a second merge pass would no longer have access to.
|
|
905
878
|
*/
|
|
906
879
|
declare const mergeWranglerEnvironment: (wrangler: WranglerConfig, environment: string | undefined) => WranglerEnvironmentMerge;
|
|
880
|
+
/** Candidate wrangler config filenames, in the order every consumer probes them. */
|
|
881
|
+
declare const WRANGLER_FILES: readonly ["wrangler.jsonc", "wrangler.json"];
|
|
882
|
+
/** Locate the project's wrangler config, or `undefined` when none exists. */
|
|
883
|
+
declare const findWranglerFile: (projectRoot: string) => string | undefined;
|
|
884
|
+
interface ReadWranglerResult<T> {
|
|
885
|
+
/** Parsed config, or `undefined` when the file was not valid JSONC. */
|
|
886
|
+
parsed: T | undefined;
|
|
887
|
+
/** Raw file text — needed for comment-preserving `modify`/`applyEdits`. */
|
|
888
|
+
text: string;
|
|
889
|
+
}
|
|
907
890
|
/**
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
* rather than duplicated, so it is safe to call on every codegen/deploy.
|
|
913
|
-
*/
|
|
914
|
-
declare const withTailConsumer: (wrangler: WranglerConfig, consumer: TailConsumer) => WranglerConfig;
|
|
915
|
-
/**
|
|
916
|
-
* Pure validator: given a parsed `WranglerConfig` object and an optional
|
|
917
|
-
* `SchemaInfo`, produce a structured report. Performs no I/O.
|
|
918
|
-
*
|
|
919
|
-
* `environment`, when set, validates the `env.<environment>` view
|
|
920
|
-
* ({@link mergeWranglerEnvironment}) instead of the top-level config — e.g. a
|
|
921
|
-
* `durable_objects` binding present only at the top level is a validation
|
|
922
|
-
* FAILURE for `--env production` if `env.production` doesn't repeat it,
|
|
923
|
-
* because `durable_objects` is non-inheritable and wrangler will not carry it
|
|
924
|
-
* over. Omit `environment` to validate the top level only (unchanged default).
|
|
925
|
-
*/
|
|
926
|
-
declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined, schema?: SchemaInfo, environment?: string) => WranglerValidationReport;
|
|
927
|
-
/**
|
|
928
|
-
* Convenience alias matching the original task-spec signature
|
|
929
|
-
* `validateWrangler(wranglerJson, schema)` returning
|
|
930
|
-
* `{ valid, errors, warnings }`.
|
|
891
|
+
* Read and JSONC-parse a wrangler config file. Returns the raw `text` (for
|
|
892
|
+
* structural edits) alongside `parsed`, which is `undefined` when the file is
|
|
893
|
+
* not valid JSONC or does not parse to an object. Allows trailing commas, as
|
|
894
|
+
* wrangler does.
|
|
931
895
|
*/
|
|
932
|
-
declare const
|
|
896
|
+
declare const readWranglerJsonc: <T = unknown>(wranglerPath: string) => ReadWranglerResult<T>;
|
|
933
897
|
interface WranglerProjectValidationOptions {
|
|
934
898
|
/**
|
|
935
899
|
* Cloudflare environment to validate against `env.<name>` in
|
|
@@ -963,6 +927,43 @@ declare const UNEXPORTED_CLASS_MARKER = "does not export it";
|
|
|
963
927
|
* `{ problems, wranglerPath }` shape plus the structured `report`.
|
|
964
928
|
*/
|
|
965
929
|
declare const validateWranglerProject: (options: WranglerProjectValidationOptions) => WranglerProjectValidationResult;
|
|
930
|
+
/**
|
|
931
|
+
* Pure scan of a `vars` map for plaintext secrets — the FS-free core, exported for
|
|
932
|
+
* unit tests. A variable is flagged when, for a **string** value that is neither a
|
|
933
|
+
* placeholder nor a public/publishable key, EITHER the value matches a known
|
|
934
|
+
* secret shape (`secretKindOf`) OR the key name strongly implies a secret and the
|
|
935
|
+
* value is long enough to plausibly be one. `kind` is the matched shape, or
|
|
936
|
+
* `secret_named_var` for the key-name path.
|
|
937
|
+
*/
|
|
938
|
+
declare const scanWranglerVariablesForSecrets: (variables: Record<string, unknown> | undefined, file: string) => WranglerVariableIR[];
|
|
939
|
+
/**
|
|
940
|
+
* Read the project's `wrangler.jsonc` and return its plaintext-secret `vars` as IR
|
|
941
|
+
* for the `plaintext_secret_in_wrangler_vars` lint. Returns `[]` when there is no
|
|
942
|
+
* wrangler config, it doesn't parse, or nothing looks like a secret. Scans the
|
|
943
|
+
* top-level `vars` block (mirroring the existing `validateCorsVariables` scope);
|
|
944
|
+
* per-environment `env.<name>.vars` overrides are out of scope for now.
|
|
945
|
+
*/
|
|
946
|
+
declare const collectWranglerSecretVariables: (projectRoot: string) => WranglerVariableIR[];
|
|
947
|
+
declare const REQUIRED_COMPATIBILITY_DATE: string;
|
|
948
|
+
declare const REQUIRED_FLAG: string;
|
|
949
|
+
/**
|
|
950
|
+
* Pure validator: given a parsed `WranglerConfig` object and an optional
|
|
951
|
+
* `SchemaInfo`, produce a structured report. Performs no I/O.
|
|
952
|
+
*
|
|
953
|
+
* `environment`, when set, validates the `env.<environment>` view
|
|
954
|
+
* ({@link mergeWranglerEnvironment}) instead of the top-level config — e.g. a
|
|
955
|
+
* `durable_objects` binding present only at the top level is a validation
|
|
956
|
+
* FAILURE for `--env production` if `env.production` doesn't repeat it,
|
|
957
|
+
* because `durable_objects` is non-inheritable and wrangler will not carry it
|
|
958
|
+
* over. Omit `environment` to validate the top level only (unchanged default).
|
|
959
|
+
*/
|
|
960
|
+
declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined, schema?: SchemaInfo, environment?: string) => WranglerValidationReport;
|
|
961
|
+
/**
|
|
962
|
+
* Convenience alias matching the original task-spec signature
|
|
963
|
+
* `validateWrangler(wranglerJson, schema)` returning
|
|
964
|
+
* `{ valid, errors, warnings }`.
|
|
965
|
+
*/
|
|
966
|
+
declare const validateWrangler: typeof validateWranglerConfig;
|
|
966
967
|
export { type AlchemyTranslation,
|
|
967
968
|
/**
|
|
968
969
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-
|
|
1
|
+
import { D as DeployDriver, G as GeneratedClassModule, I as InferredBindings, S as SchemaInfo } from "../packem_shared/schema-info.d-C3DeuUmC.js";
|
|
2
2
|
import { WranglerVariableIR } from '@lunora/codegen';
|
|
3
3
|
/** The project coordinates the validator needs. */
|
|
4
4
|
interface AssertWranglerOptions {
|
|
@@ -311,7 +311,7 @@ declare const collectExportGaps: (inferred: InferredBindings) => ExportGap[];
|
|
|
311
311
|
* {@link reconcileEnvQueues}, which retunes queue consumers the block already
|
|
312
312
|
* declares and adds nothing. Otherwise it is used only to emit an
|
|
313
313
|
* advisory warning, because bindings (`durable_objects`, `d1_databases`, …)
|
|
314
|
-
* are non-inheritable (see `wrangler-
|
|
314
|
+
* are non-inheritable (see `wrangler-environment.ts`'s `NON_INHERITABLE_KEYS`):
|
|
315
315
|
* a `--env production` deploy needs its OWN copy of each one, and silently
|
|
316
316
|
* writing only to the top level would leave that gap unmentioned. Extending
|
|
317
317
|
* the JSONC writer itself to target `env.<name>.*` idempotently for every
|
|
@@ -625,73 +625,7 @@ interface RemoteEnableInputs {
|
|
|
625
625
|
* is still overridable per-run by `--remote` or `LUNORA_REMOTE=1`.
|
|
626
626
|
*/
|
|
627
627
|
declare const resolveRemoteEnabled: (inputs: RemoteEnableInputs) => boolean;
|
|
628
|
-
/**
|
|
629
|
-
* Single source of truth for "does this wrangler config enable Workers
|
|
630
|
-
* Cache?" and "what compatibility_date does that require?".
|
|
631
|
-
*
|
|
632
|
-
* Before this module, `reconcile-compatibility-date.ts` (auto-bump) and
|
|
633
|
-
* `wrangler-validator.ts` (validation) each carried their own
|
|
634
|
-
* `WORKERS_CACHE_MIN_DATE` literal and their own top-level/`exports[]`
|
|
635
|
-
* cache-enabled walk — two copies of the same fact that could silently drift
|
|
636
|
-
* apart (a date bumped in one file without the other would either validate a
|
|
637
|
-
* config the reconciler wouldn't produce, or vice versa).
|
|
638
|
-
*/
|
|
639
|
-
/** The `compatibility_date` Workers Cache (`cache.enabled: true`) requires. */
|
|
640
|
-
declare const WORKERS_CACHE_MIN_DATE = "2026-05-01";
|
|
641
|
-
/** The subset of a parsed `wrangler.jsonc` the cache-enabled check reads. */
|
|
642
|
-
interface WranglerCacheShape {
|
|
643
|
-
cache?: {
|
|
644
|
-
enabled?: boolean;
|
|
645
|
-
} | null;
|
|
646
|
-
exports?: Record<string, {
|
|
647
|
-
cache?: {
|
|
648
|
-
enabled?: boolean;
|
|
649
|
-
} | null;
|
|
650
|
-
} | null> | null;
|
|
651
|
-
}
|
|
652
|
-
/**
|
|
653
|
-
* Whether Workers Cache is enabled anywhere in a parsed wrangler config — the
|
|
654
|
-
* top-level `cache.enabled` toggle, or a per-export override in
|
|
655
|
-
* `exports[name].cache.enabled` (Workers can scope cache per named export).
|
|
656
|
-
* `undefined`/`null` (an unparsed or absent config) is treated as disabled.
|
|
657
|
-
*/
|
|
658
|
-
declare const isCacheEnabled: (parsed: WranglerCacheShape | null | undefined) => boolean;
|
|
659
|
-
/** Candidate wrangler config filenames, in the order every consumer probes them. */
|
|
660
|
-
declare const WRANGLER_FILES: readonly ["wrangler.jsonc", "wrangler.json"];
|
|
661
|
-
/** Locate the project's wrangler config, or `undefined` when none exists. */
|
|
662
|
-
declare const findWranglerFile: (projectRoot: string) => string | undefined;
|
|
663
|
-
interface ReadWranglerResult<T> {
|
|
664
|
-
/** Parsed config, or `undefined` when the file was not valid JSONC. */
|
|
665
|
-
parsed: T | undefined;
|
|
666
|
-
/** Raw file text — needed for comment-preserving `modify`/`applyEdits`. */
|
|
667
|
-
text: string;
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* Read and JSONC-parse a wrangler config file. Returns the raw `text` (for
|
|
671
|
-
* structural edits) alongside `parsed`, which is `undefined` when the file is
|
|
672
|
-
* not valid JSONC or does not parse to an object. Allows trailing commas, as
|
|
673
|
-
* wrangler does.
|
|
674
|
-
*/
|
|
675
|
-
declare const readWranglerJsonc: <T = unknown>(wranglerPath: string) => ReadWranglerResult<T>;
|
|
676
|
-
/**
|
|
677
|
-
* Pure scan of a `vars` map for plaintext secrets — the FS-free core, exported for
|
|
678
|
-
* unit tests. A variable is flagged when, for a **string** value that is neither a
|
|
679
|
-
* placeholder nor a public/publishable key, EITHER the value matches a known
|
|
680
|
-
* secret shape (`secretKindOf`) OR the key name strongly implies a secret and the
|
|
681
|
-
* value is long enough to plausibly be one. `kind` is the matched shape, or
|
|
682
|
-
* `secret_named_var` for the key-name path.
|
|
683
|
-
*/
|
|
684
|
-
declare const scanWranglerVariablesForSecrets: (variables: Record<string, unknown> | undefined, file: string) => WranglerVariableIR[];
|
|
685
|
-
/**
|
|
686
|
-
* Read the project's `wrangler.jsonc` and return its plaintext-secret `vars` as IR
|
|
687
|
-
* for the `plaintext_secret_in_wrangler_vars` lint. Returns `[]` when there is no
|
|
688
|
-
* wrangler config, it doesn't parse, or nothing looks like a secret. Scans the
|
|
689
|
-
* top-level `vars` block (mirroring the existing `validateCorsVariables` scope);
|
|
690
|
-
* per-environment `env.<name>.vars` overrides are out of scope for now.
|
|
691
|
-
*/
|
|
692
|
-
declare const collectWranglerSecretVariables: (projectRoot: string) => WranglerVariableIR[];
|
|
693
|
-
declare const REQUIRED_COMPATIBILITY_DATE: string;
|
|
694
|
-
declare const REQUIRED_FLAG: string;
|
|
628
|
+
/** The `wrangler.jsonc` shape the validator reads, and the report it returns. */
|
|
695
629
|
interface WranglerDurableObjectBinding {
|
|
696
630
|
class_name?: string;
|
|
697
631
|
name?: string;
|
|
@@ -879,6 +813,45 @@ interface WranglerValidationReport {
|
|
|
879
813
|
valid: boolean;
|
|
880
814
|
warnings: string[];
|
|
881
815
|
}
|
|
816
|
+
/**
|
|
817
|
+
* Return a new `WranglerConfig` with `consumer` present in `tail_consumers`,
|
|
818
|
+
* wiring this Worker to forward its tail events (logs/exceptions) to another
|
|
819
|
+
* Worker that fans them out to an external sink. Pure and idempotent: an
|
|
820
|
+
* existing entry with the same `service` + `environment` is left untouched
|
|
821
|
+
* rather than duplicated, so it is safe to call on every codegen/deploy.
|
|
822
|
+
*/
|
|
823
|
+
declare const withTailConsumer: (wrangler: WranglerConfig, consumer: TailConsumer) => WranglerConfig;
|
|
824
|
+
/**
|
|
825
|
+
* Single source of truth for "does this wrangler config enable Workers
|
|
826
|
+
* Cache?" and "what compatibility_date does that require?".
|
|
827
|
+
*
|
|
828
|
+
* Before this module, `reconcile-compatibility-date.ts` (auto-bump) and
|
|
829
|
+
* `wrangler-validator.ts` (validation) each carried their own
|
|
830
|
+
* `WORKERS_CACHE_MIN_DATE` literal and their own top-level/`exports[]`
|
|
831
|
+
* cache-enabled walk — two copies of the same fact that could silently drift
|
|
832
|
+
* apart (a date bumped in one file without the other would either validate a
|
|
833
|
+
* config the reconciler wouldn't produce, or vice versa).
|
|
834
|
+
*/
|
|
835
|
+
/** The `compatibility_date` Workers Cache (`cache.enabled: true`) requires. */
|
|
836
|
+
declare const WORKERS_CACHE_MIN_DATE = "2026-05-01";
|
|
837
|
+
/** The subset of a parsed `wrangler.jsonc` the cache-enabled check reads. */
|
|
838
|
+
interface WranglerCacheShape {
|
|
839
|
+
cache?: {
|
|
840
|
+
enabled?: boolean;
|
|
841
|
+
} | null;
|
|
842
|
+
exports?: Record<string, {
|
|
843
|
+
cache?: {
|
|
844
|
+
enabled?: boolean;
|
|
845
|
+
} | null;
|
|
846
|
+
} | null> | null;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Whether Workers Cache is enabled anywhere in a parsed wrangler config — the
|
|
850
|
+
* top-level `cache.enabled` toggle, or a per-export override in
|
|
851
|
+
* `exports[name].cache.enabled` (Workers can scope cache per named export).
|
|
852
|
+
* `undefined`/`null` (an unparsed or absent config) is treated as disabled.
|
|
853
|
+
*/
|
|
854
|
+
declare const isCacheEnabled: (parsed: WranglerCacheShape | null | undefined) => boolean;
|
|
882
855
|
interface WranglerEnvironmentMerge {
|
|
883
856
|
/** Set when `environment` names no `env.<name>` block declared in the config — the caller should treat this as a hard validation failure. */
|
|
884
857
|
error?: string;
|
|
@@ -904,32 +877,23 @@ interface WranglerEnvironmentMerge {
|
|
|
904
877
|
* top-level fallback a second merge pass would no longer have access to.
|
|
905
878
|
*/
|
|
906
879
|
declare const mergeWranglerEnvironment: (wrangler: WranglerConfig, environment: string | undefined) => WranglerEnvironmentMerge;
|
|
880
|
+
/** Candidate wrangler config filenames, in the order every consumer probes them. */
|
|
881
|
+
declare const WRANGLER_FILES: readonly ["wrangler.jsonc", "wrangler.json"];
|
|
882
|
+
/** Locate the project's wrangler config, or `undefined` when none exists. */
|
|
883
|
+
declare const findWranglerFile: (projectRoot: string) => string | undefined;
|
|
884
|
+
interface ReadWranglerResult<T> {
|
|
885
|
+
/** Parsed config, or `undefined` when the file was not valid JSONC. */
|
|
886
|
+
parsed: T | undefined;
|
|
887
|
+
/** Raw file text — needed for comment-preserving `modify`/`applyEdits`. */
|
|
888
|
+
text: string;
|
|
889
|
+
}
|
|
907
890
|
/**
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
* rather than duplicated, so it is safe to call on every codegen/deploy.
|
|
913
|
-
*/
|
|
914
|
-
declare const withTailConsumer: (wrangler: WranglerConfig, consumer: TailConsumer) => WranglerConfig;
|
|
915
|
-
/**
|
|
916
|
-
* Pure validator: given a parsed `WranglerConfig` object and an optional
|
|
917
|
-
* `SchemaInfo`, produce a structured report. Performs no I/O.
|
|
918
|
-
*
|
|
919
|
-
* `environment`, when set, validates the `env.<environment>` view
|
|
920
|
-
* ({@link mergeWranglerEnvironment}) instead of the top-level config — e.g. a
|
|
921
|
-
* `durable_objects` binding present only at the top level is a validation
|
|
922
|
-
* FAILURE for `--env production` if `env.production` doesn't repeat it,
|
|
923
|
-
* because `durable_objects` is non-inheritable and wrangler will not carry it
|
|
924
|
-
* over. Omit `environment` to validate the top level only (unchanged default).
|
|
925
|
-
*/
|
|
926
|
-
declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined, schema?: SchemaInfo, environment?: string) => WranglerValidationReport;
|
|
927
|
-
/**
|
|
928
|
-
* Convenience alias matching the original task-spec signature
|
|
929
|
-
* `validateWrangler(wranglerJson, schema)` returning
|
|
930
|
-
* `{ valid, errors, warnings }`.
|
|
891
|
+
* Read and JSONC-parse a wrangler config file. Returns the raw `text` (for
|
|
892
|
+
* structural edits) alongside `parsed`, which is `undefined` when the file is
|
|
893
|
+
* not valid JSONC or does not parse to an object. Allows trailing commas, as
|
|
894
|
+
* wrangler does.
|
|
931
895
|
*/
|
|
932
|
-
declare const
|
|
896
|
+
declare const readWranglerJsonc: <T = unknown>(wranglerPath: string) => ReadWranglerResult<T>;
|
|
933
897
|
interface WranglerProjectValidationOptions {
|
|
934
898
|
/**
|
|
935
899
|
* Cloudflare environment to validate against `env.<name>` in
|
|
@@ -963,6 +927,43 @@ declare const UNEXPORTED_CLASS_MARKER = "does not export it";
|
|
|
963
927
|
* `{ problems, wranglerPath }` shape plus the structured `report`.
|
|
964
928
|
*/
|
|
965
929
|
declare const validateWranglerProject: (options: WranglerProjectValidationOptions) => WranglerProjectValidationResult;
|
|
930
|
+
/**
|
|
931
|
+
* Pure scan of a `vars` map for plaintext secrets — the FS-free core, exported for
|
|
932
|
+
* unit tests. A variable is flagged when, for a **string** value that is neither a
|
|
933
|
+
* placeholder nor a public/publishable key, EITHER the value matches a known
|
|
934
|
+
* secret shape (`secretKindOf`) OR the key name strongly implies a secret and the
|
|
935
|
+
* value is long enough to plausibly be one. `kind` is the matched shape, or
|
|
936
|
+
* `secret_named_var` for the key-name path.
|
|
937
|
+
*/
|
|
938
|
+
declare const scanWranglerVariablesForSecrets: (variables: Record<string, unknown> | undefined, file: string) => WranglerVariableIR[];
|
|
939
|
+
/**
|
|
940
|
+
* Read the project's `wrangler.jsonc` and return its plaintext-secret `vars` as IR
|
|
941
|
+
* for the `plaintext_secret_in_wrangler_vars` lint. Returns `[]` when there is no
|
|
942
|
+
* wrangler config, it doesn't parse, or nothing looks like a secret. Scans the
|
|
943
|
+
* top-level `vars` block (mirroring the existing `validateCorsVariables` scope);
|
|
944
|
+
* per-environment `env.<name>.vars` overrides are out of scope for now.
|
|
945
|
+
*/
|
|
946
|
+
declare const collectWranglerSecretVariables: (projectRoot: string) => WranglerVariableIR[];
|
|
947
|
+
declare const REQUIRED_COMPATIBILITY_DATE: string;
|
|
948
|
+
declare const REQUIRED_FLAG: string;
|
|
949
|
+
/**
|
|
950
|
+
* Pure validator: given a parsed `WranglerConfig` object and an optional
|
|
951
|
+
* `SchemaInfo`, produce a structured report. Performs no I/O.
|
|
952
|
+
*
|
|
953
|
+
* `environment`, when set, validates the `env.<environment>` view
|
|
954
|
+
* ({@link mergeWranglerEnvironment}) instead of the top-level config — e.g. a
|
|
955
|
+
* `durable_objects` binding present only at the top level is a validation
|
|
956
|
+
* FAILURE for `--env production` if `env.production` doesn't repeat it,
|
|
957
|
+
* because `durable_objects` is non-inheritable and wrangler will not carry it
|
|
958
|
+
* over. Omit `environment` to validate the top level only (unchanged default).
|
|
959
|
+
*/
|
|
960
|
+
declare const validateWranglerConfig: (wranglerInput: WranglerConfig | undefined, schema?: SchemaInfo, environment?: string) => WranglerValidationReport;
|
|
961
|
+
/**
|
|
962
|
+
* Convenience alias matching the original task-spec signature
|
|
963
|
+
* `validateWrangler(wranglerJson, schema)` returning
|
|
964
|
+
* `{ valid, errors, warnings }`.
|
|
965
|
+
*/
|
|
966
|
+
declare const validateWrangler: typeof validateWranglerConfig;
|
|
966
967
|
export { type AlchemyTranslation,
|
|
967
968
|
/**
|
|
968
969
|
* `@lunora/config/cloudflare` — the wrangler layer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assertWranglerSatisfiesSchema as o}from"../packem_shared/assertWranglerSatisfiesSchema-
|
|
1
|
+
import{assertWranglerSatisfiesSchema as o}from"../packem_shared/assertWranglerSatisfiesSchema-B24XPKq7.mjs";import{BINDING_MANIFEST_VERSION as n,buildBindingManifest as l}from"../packem_shared/BINDING_MANIFEST_VERSION-B4Tu8Ytd.mjs";import{default as i}from"../packem_shared/CLOUDFLARE_DRIVER-DUE6r-Pg.mjs";import{collectExportGaps as m,reconcileWranglerBindings as s}from"../packem_shared/collectExportGaps-BmEGzQQc.mjs";import{reconcileWranglerCompatibilityDate as f}from"../packem_shared/reconcileWranglerCompatibilityDate-7OO_xaKR.mjs";import{describePreservedCrons as R,reconcileWranglerCrons as p}from"../packem_shared/describePreservedCrons-Ci5r2aph.mjs";import{reconcileBindingsSafely as d,reconcileWranglerExtras as W}from"../packem_shared/reconcileBindingsSafely-DOqY2zb2.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{withTailConsumer as b}from"../packem_shared/withTailConsumer-DaP3r6ia.mjs";import{WORKERS_CACHE_MIN_DATE as B,isCacheEnabled as F}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{mergeWranglerEnvironment as M}from"../packem_shared/mergeWranglerEnvironment-BIcLqPfv.mjs";import{WRANGLER_FILES as G,findWranglerFile as h,readWranglerJsonc as P}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as V,validateWranglerProject as u}from"../packem_shared/UNEXPORTED_CLASS_MARKER-Bc302QS4.mjs";import{collectWranglerSecretVariables as K,scanWranglerVariablesForSecrets as j}from"../packem_shared/collectWranglerSecretVariables-D-usPfT8.mjs";import{wranglerToAlchemy as Q}from"../packem_shared/wranglerToAlchemy-DZOim9As.mjs";import{REQUIRED_COMPATIBILITY_DATE as z,REQUIRED_FLAG as H,validateWrangler as J,validateWranglerConfig as X}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-g_1F-n2X.mjs";export{n as BINDING_MANIFEST_VERSION,i as CLOUDFLARE_DRIVER,_ as REMOTE_ELIGIBLE_KEYS,z as REQUIRED_COMPATIBILITY_DATE,H as REQUIRED_FLAG,V as UNEXPORTED_CLASS_MARKER,B as WORKERS_CACHE_MIN_DATE,G as WRANGLER_FILES,o as assertWranglerSatisfiesSchema,l as buildBindingManifest,m as collectExportGaps,K as collectWranglerSecretVariables,R as describePreservedCrons,h as findWranglerFile,C as injectRemoteFlags,F as isCacheEnabled,S as isRemoteEnvEnabled,A as materializeRemoteWranglerConfig,M as mergeWranglerEnvironment,D as planRemoteBindings,P as readWranglerJsonc,d as reconcileBindingsSafely,s as reconcileWranglerBindings,f as reconcileWranglerCompatibilityDate,p as reconcileWranglerCrons,W as reconcileWranglerExtras,L as resolveRemoteEnabled,j as scanWranglerVariablesForSecrets,J as validateWrangler,X as validateWranglerConfig,u as validateWranglerProject,b as withTailConsumer,Q as wranglerToAlchemy};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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
|
-
import { D as DeployDriver } from "./packem_shared/schema-info.d-
|
|
5
|
-
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type
|
|
4
|
+
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/schema-info.d-C3DeuUmC.mjs";
|
|
5
|
+
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/schema-info.d-C3DeuUmC.mjs";
|
|
6
6
|
export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.mjs";
|
|
7
7
|
interface DiscoverAgentInfoResult {
|
|
8
8
|
/** Discovered agent definitions; `[]` when none are declared or parsing failed. */
|
|
@@ -524,6 +524,31 @@ declare const isRunnableTarget: (target: string) => boolean;
|
|
|
524
524
|
* alternatives when one is refused.
|
|
525
525
|
*/
|
|
526
526
|
declare const runnableTargetIds: () => ReadonlyArray<string>;
|
|
527
|
+
/**
|
|
528
|
+
* Whether `lunora dev` serves `target`'s worker with the host's own dev server
|
|
529
|
+
* (`DriverToolchain.devServer === "own"`) instead of workerd. The CLI's flavor
|
|
530
|
+
* choice and the Vite plugin's warning both ask this, so it is answered once.
|
|
531
|
+
*/
|
|
532
|
+
declare const targetRunsOwnDevServer: (target: string) => boolean;
|
|
533
|
+
/** A toolchain command planned against the driver's config projection, with nothing written yet. */
|
|
534
|
+
interface ToolchainInvocation {
|
|
535
|
+
command: ToolchainCommand;
|
|
536
|
+
/** Write the projection, if the driver has one. Call only once the command is going to run. */
|
|
537
|
+
commit: () => void;
|
|
538
|
+
/** The projection the command reads, and every key it left out — `undefined` when the host reads the project config as-is. */
|
|
539
|
+
projection: {
|
|
540
|
+
configPath: string;
|
|
541
|
+
dropped: ReadonlyArray<string>;
|
|
542
|
+
} | undefined;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Plan a toolchain call in the one safe order: project the config (in memory),
|
|
546
|
+
* build the argv against the projection's path — which is where a host refuses
|
|
547
|
+
* an option it cannot honour, so a refusal throws here — and only then offer the
|
|
548
|
+
* write. A refused command therefore leaves nothing on disk, and `configPath`
|
|
549
|
+
* is set on every request whose driver projects.
|
|
550
|
+
*/
|
|
551
|
+
declare const planToolchainInvocation: (driver: DeployDriver, projectRoot: string, purpose: ProjectionPurpose, build: (configPath: string | undefined) => ToolchainCommand) => ToolchainInvocation;
|
|
527
552
|
/** Directory holding per-checkout Lunora state (gitignored by convention). */
|
|
528
553
|
declare const LINKED_PROJECT_DIR = ".lunora";
|
|
529
554
|
/** The canonical link filename, relative to the project root. */
|
|
@@ -732,6 +757,14 @@ declare const execArgsFor: (manager: PackageManager, command: string, args: Read
|
|
|
732
757
|
args: string[];
|
|
733
758
|
command: string;
|
|
734
759
|
};
|
|
760
|
+
/**
|
|
761
|
+
* The argv that runs a driver's {@link ToolchainCommand}: through the package
|
|
762
|
+
* manager for a project dependency, directly for a binary on `PATH`.
|
|
763
|
+
*/
|
|
764
|
+
declare const toolchainExecArgs: (manager: PackageManager, command: ToolchainCommand) => {
|
|
765
|
+
args: string[];
|
|
766
|
+
command: string;
|
|
767
|
+
};
|
|
735
768
|
/**
|
|
736
769
|
* The argv that runs a project SCRIPT with `manager` — the counterpart to
|
|
737
770
|
* {@link execArgsFor}, which runs a BINARY.
|
|
@@ -1321,4 +1354,4 @@ declare const badgeWidth: (_spec: BadgeSpec) => number;
|
|
|
1321
1354
|
declare const paintBadge: (spec: BadgeSpec) => string;
|
|
1322
1355
|
/** Dim continuation text (a step's chosen answer, shown under the question). */
|
|
1323
1356
|
declare const paintAnswer: (text: string) => string;
|
|
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 };
|
|
1357
|
+
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, type ProjectionPurpose, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, type ToolchainCommand, type ToolchainInvocation, 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, planToolchainInvocation, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, targetRunsOwnDevServer, toolchainExecArgs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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
|
-
import { D as DeployDriver } from "./packem_shared/schema-info.d-
|
|
5
|
-
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type
|
|
4
|
+
import { T as ToolchainCommand, D as DeployDriver, P as ProjectionPurpose } from "./packem_shared/schema-info.d-C3DeuUmC.js";
|
|
5
|
+
export { C as COMPOSED_WORKER_ENTRY, type a as DeployRequest, type b as DevRequest, type c as DiscoverSchemaInfoResult, type d as DriverToolchain, e as GENERATED_CLASS_MODULES, type G as GeneratedClassModule, type f as InferOptions, type g as InferredAgent, type I as InferredBindings, type h as InferredContainer, type i as InferredWorkflow, type j as ProjectedConfig, type S as SchemaInfo, type k as SecretRequest, type l as TailRequest, m as discoverSchemaInfo, n as inferLunoraBindings, p as packageNamesFromBindings } from "./packem_shared/schema-info.d-C3DeuUmC.js";
|
|
6
6
|
export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.js";
|
|
7
7
|
interface DiscoverAgentInfoResult {
|
|
8
8
|
/** Discovered agent definitions; `[]` when none are declared or parsing failed. */
|
|
@@ -524,6 +524,31 @@ declare const isRunnableTarget: (target: string) => boolean;
|
|
|
524
524
|
* alternatives when one is refused.
|
|
525
525
|
*/
|
|
526
526
|
declare const runnableTargetIds: () => ReadonlyArray<string>;
|
|
527
|
+
/**
|
|
528
|
+
* Whether `lunora dev` serves `target`'s worker with the host's own dev server
|
|
529
|
+
* (`DriverToolchain.devServer === "own"`) instead of workerd. The CLI's flavor
|
|
530
|
+
* choice and the Vite plugin's warning both ask this, so it is answered once.
|
|
531
|
+
*/
|
|
532
|
+
declare const targetRunsOwnDevServer: (target: string) => boolean;
|
|
533
|
+
/** A toolchain command planned against the driver's config projection, with nothing written yet. */
|
|
534
|
+
interface ToolchainInvocation {
|
|
535
|
+
command: ToolchainCommand;
|
|
536
|
+
/** Write the projection, if the driver has one. Call only once the command is going to run. */
|
|
537
|
+
commit: () => void;
|
|
538
|
+
/** The projection the command reads, and every key it left out — `undefined` when the host reads the project config as-is. */
|
|
539
|
+
projection: {
|
|
540
|
+
configPath: string;
|
|
541
|
+
dropped: ReadonlyArray<string>;
|
|
542
|
+
} | undefined;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Plan a toolchain call in the one safe order: project the config (in memory),
|
|
546
|
+
* build the argv against the projection's path — which is where a host refuses
|
|
547
|
+
* an option it cannot honour, so a refusal throws here — and only then offer the
|
|
548
|
+
* write. A refused command therefore leaves nothing on disk, and `configPath`
|
|
549
|
+
* is set on every request whose driver projects.
|
|
550
|
+
*/
|
|
551
|
+
declare const planToolchainInvocation: (driver: DeployDriver, projectRoot: string, purpose: ProjectionPurpose, build: (configPath: string | undefined) => ToolchainCommand) => ToolchainInvocation;
|
|
527
552
|
/** Directory holding per-checkout Lunora state (gitignored by convention). */
|
|
528
553
|
declare const LINKED_PROJECT_DIR = ".lunora";
|
|
529
554
|
/** The canonical link filename, relative to the project root. */
|
|
@@ -732,6 +757,14 @@ declare const execArgsFor: (manager: PackageManager, command: string, args: Read
|
|
|
732
757
|
args: string[];
|
|
733
758
|
command: string;
|
|
734
759
|
};
|
|
760
|
+
/**
|
|
761
|
+
* The argv that runs a driver's {@link ToolchainCommand}: through the package
|
|
762
|
+
* manager for a project dependency, directly for a binary on `PATH`.
|
|
763
|
+
*/
|
|
764
|
+
declare const toolchainExecArgs: (manager: PackageManager, command: ToolchainCommand) => {
|
|
765
|
+
args: string[];
|
|
766
|
+
command: string;
|
|
767
|
+
};
|
|
735
768
|
/**
|
|
736
769
|
* The argv that runs a project SCRIPT with `manager` — the counterpart to
|
|
737
770
|
* {@link execArgsFor}, which runs a BINARY.
|
|
@@ -1321,4 +1354,4 @@ declare const badgeWidth: (_spec: BadgeSpec) => number;
|
|
|
1321
1354
|
declare const paintBadge: (spec: BadgeSpec) => string;
|
|
1322
1355
|
/** Dim continuation text (a step's chosen answer, shown under the question). */
|
|
1323
1356
|
declare const paintAnswer: (text: string) => string;
|
|
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 };
|
|
1357
|
+
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, type ProjectionPurpose, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, type ToolchainCommand, type ToolchainInvocation, 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, planToolchainInvocation, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencyNames, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, streamContainerLogs, targetRunsOwnDevServer, toolchainExecArgs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|