@cloudflare/config 0.3.0 → 0.4.0

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/index.d.mts CHANGED
@@ -482,8 +482,8 @@ declare const ModuleTypeSchema: z.ZodEnum<{
482
482
  }>;
483
483
  type ModuleType = z.output<typeof ModuleTypeSchema>;
484
484
  /**
485
- * Output Worker schema — the shape of `worker.config.json` in the
486
- * Build Output API. Adds an optional `manifest` field to the
485
+ * Output Worker schema — the shape of the Worker's `config.json` in the
486
+ * Build Output Specification. Adds an optional `manifest` field to the
487
487
  * base schema.
488
488
  */
489
489
  declare const OutputWorkerSchema: z.ZodObject<{
@@ -640,63 +640,6 @@ declare const OutputWorkerSchema: z.ZodObject<{
640
640
  }, z.core.$strict>;
641
641
  type ParsedOutputWorkerConfig = z.output<typeof OutputWorkerSchema>;
642
642
  //#endregion
643
- //#region src/build-output.d.ts
644
- /**
645
- * Initial draft version of the Build Output API.
646
- *
647
- * Will move to `v1` when the spec stabilises.
648
- */
649
- declare const BUILD_OUTPUT_VERSION = "v0";
650
- /**
651
- * Project-relative root.
652
- */
653
- declare const BUILD_OUTPUT_ROOT = ".cloudflare/output";
654
- /**
655
- * Filename of the top-level (root) config holding shared settings.
656
- */
657
- declare const ROOT_CONFIG_FILENAME = "config.json";
658
- /**
659
- * Filename of the per-Worker config.
660
- */
661
- declare const WORKER_CONFIG_FILENAME = "worker.config.json";
662
- /**
663
- * Absolute path to the top-level `config.json` for the current project.
664
- */
665
- declare function getRootConfigPath(root: string): string;
666
- /**
667
- * Clean the build output directory.
668
- */
669
- declare function cleanBuildOutputDir(root: string): Promise<void>;
670
- /**
671
- * Absolute path to the Workers output directory.
672
- */
673
- declare function getWorkersDir(root: string): string;
674
- /**
675
- * Absolute path to the config file for a given Worker.
676
- */
677
- declare function getWorkerConfigPath(root: string, workerName: string): string;
678
- /**
679
- * Absolute path to the bundle directory for a given Worker.
680
- */
681
- declare function getWorkerBundleDir(root: string, workerName: string): string;
682
- /**
683
- * Absolute path to the assets directory for a given Worker.
684
- */
685
- declare function getWorkerAssetsDir(root: string, workerName: string): string;
686
- /**
687
- * Write the output `worker.config.json` for a given Worker to the Build
688
- * Output API tree.
689
- *
690
- * - Workers mode: `manifest` is provided (bundle/ present on disk).
691
- * - Assets-only mode: `manifest` is omitted (no bundle/ directory).
692
- */
693
- declare function writeOutputWorkerConfig(root: string, parsedConfig: ParsedInputWorkerConfig, manifest?: ParsedOutputWorkerConfig["manifest"]): Promise<void>;
694
- /**
695
- * Write the top-level `config.json` holding shared settings to the Build
696
- * Output API tree.
697
- */
698
- declare function writeRootOutputConfig(root: string, settings: ParsedSettingsConfig): Promise<void>;
699
- //#endregion
700
643
  //#region src/generate.d.ts
701
644
  interface GenerateTypesOptions {
702
645
  /** Path to the config file (relative to the generated `.d.ts`). */
@@ -824,4 +767,4 @@ declare function loadAndValidateConfig(configPath: string, ctx: ConfigContext, o
824
767
  include?: string[];
825
768
  }): Promise<LoadAndValidateConfigResult>;
826
769
  //#endregion
827
- export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, BUILD_OUTPUT_ROOT, BUILD_OUTPUT_VERSION, Bindings, BrowserBinding, ConfigContext, ConfigExportsSchema, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, InputWorkerSchema, JsonBinding, KvBinding, type LoadAndValidateConfigResult, type LoadConfigResult, LogfwdrBinding, MediaBinding, type ModuleType, ModuleTypeSchema, MtlsCertificateBinding, OutputWorkerSchema, type ParsedConfigExports, type ParsedInputWorkerConfig, type ParsedOutputWorkerConfig, type ParsedSettingsConfig, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, ROOT_CONFIG_FILENAME, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, SettingsConfig, SettingsConfigInput, SettingsSchema, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedDurableObjectBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, TypedWorkerBinding, TypedWorkerDefinition, TypedWorkflowBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WORKER_CONFIG_FILENAME, WebSearchBinding, WorkerBinding, WorkerConfig, WorkerConfigExport, WorkerConfigInput, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkflowBinding, bindings, cleanBuildOutputDir, convertToWranglerConfig, defineSettings, defineWorker, exports, generateTypes, getRootConfigPath, getWorkerAssetsDir, getWorkerBundleDir, getWorkerConfigPath, getWorkersDir, loadAndValidateConfig, loadConfig, registerConfigHooks, resolveExportDefinition, triggers, writeOutputWorkerConfig, writeRootOutputConfig };
770
+ export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, Bindings, BrowserBinding, ConfigContext, ConfigExportsSchema, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, InputWorkerSchema, JsonBinding, KvBinding, type LoadAndValidateConfigResult, type LoadConfigResult, LogfwdrBinding, MediaBinding, type ModuleType, ModuleTypeSchema, MtlsCertificateBinding, OutputWorkerSchema, type ParsedConfigExports, type ParsedInputWorkerConfig, type ParsedOutputWorkerConfig, type ParsedSettingsConfig, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, SettingsConfig, SettingsConfigInput, SettingsSchema, StreamBinding, TextBinding, Triggers, TypedAiBinding, TypedDurableObjectBinding, TypedKvBinding, TypedPipelineBinding, TypedQueueBinding, TypedWorkerBinding, TypedWorkerDefinition, TypedWorkflowBinding, UnsafeBinding, UnwrapConfig, VectorizeBinding, VersionMetadataBinding, VpcNetworkBinding, VpcServiceBinding, WebSearchBinding, WorkerBinding, WorkerConfig, WorkerConfigExport, WorkerConfigInput, WorkerEntrypointExport, WorkerEntrypointExportOptions, WorkerLoaderBinding, WorkflowBinding, bindings, convertToWranglerConfig, defineSettings, defineWorker, exports, generateTypes, loadAndValidateConfig, loadConfig, registerConfigHooks, resolveExportDefinition, triggers };