@cloudflare/config 0.8.0 → 0.10.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 +16 -9
- package/dist/index.mjs +29 -2457
- package/dist/{public-C3uXDKsB.d.mts → public-DZgNmLyp.d.mts} +26 -20
- package/dist/public.d.mts +1 -1
- package/package.json +3 -3
|
@@ -141,7 +141,7 @@ interface DispatchNamespaceBindingOptions {
|
|
|
141
141
|
/** Details about the outbound Worker which will handle outbound requests from your namespace. */
|
|
142
142
|
outbound?: {
|
|
143
143
|
/** Name of the Worker handling the outbound requests. */
|
|
144
|
-
|
|
144
|
+
worker: string;
|
|
145
145
|
/** (Optional) List of parameter names, for sending context from your dispatch Worker to the outbound handler. */
|
|
146
146
|
parameters?: string[];
|
|
147
147
|
};
|
|
@@ -158,12 +158,12 @@ interface DispatchNamespaceBinding extends DispatchNamespaceBindingOptions {
|
|
|
158
158
|
}
|
|
159
159
|
interface DurableObjectBindingOptions {
|
|
160
160
|
/** The name of the Worker that defines the Durable Object class. */
|
|
161
|
-
|
|
161
|
+
worker: string;
|
|
162
162
|
/** The exported class name of the Durable Object. */
|
|
163
163
|
exportName: string;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* Binding to a Durable Object class. `
|
|
166
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
167
167
|
* that defines the class; `exportName` is the exported class name.
|
|
168
168
|
*
|
|
169
169
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
@@ -172,13 +172,13 @@ interface DurableObjectBinding extends DurableObjectBindingOptions {
|
|
|
172
172
|
type: "durable-object";
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
|
-
* Binding to a Durable Object class. `
|
|
175
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
176
176
|
* that defines the class; `exportName` is the exported class name.
|
|
177
177
|
*
|
|
178
178
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
179
179
|
*/
|
|
180
180
|
interface TypedDurableObjectBinding<TConfig$1, TExportName$1 extends string> extends DurableObjectBinding {
|
|
181
|
-
|
|
181
|
+
worker: string;
|
|
182
182
|
exportName: TExportName$1;
|
|
183
183
|
/** @internal Carries the config type for inference */
|
|
184
184
|
__config: TConfig$1;
|
|
@@ -508,7 +508,7 @@ interface WebSearchBinding extends WebSearchBindingOptions {
|
|
|
508
508
|
}
|
|
509
509
|
interface WorkerBindingOptions {
|
|
510
510
|
/** The name of the bound Worker. */
|
|
511
|
-
|
|
511
|
+
worker: string;
|
|
512
512
|
/** The named export to bind to (defaults to the default export). */
|
|
513
513
|
exportName?: string;
|
|
514
514
|
/** Optional properties that will be made available to the service via `ctx.props`. */
|
|
@@ -517,7 +517,7 @@ interface WorkerBindingOptions {
|
|
|
517
517
|
dev?: BindingDevOptions;
|
|
518
518
|
}
|
|
519
519
|
/**
|
|
520
|
-
* Service binding (Worker-to-Worker). `
|
|
520
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
521
521
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
522
522
|
* the default export).
|
|
523
523
|
*
|
|
@@ -527,14 +527,14 @@ interface WorkerBinding extends WorkerBindingOptions {
|
|
|
527
527
|
type: "worker";
|
|
528
528
|
}
|
|
529
529
|
/**
|
|
530
|
-
* Service binding (Worker-to-Worker). `
|
|
530
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
531
531
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
532
532
|
* the default export).
|
|
533
533
|
*
|
|
534
534
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
535
535
|
*/
|
|
536
536
|
interface TypedWorkerBinding<TConfig$1, TExportName$1 extends string> extends WorkerBinding {
|
|
537
|
-
|
|
537
|
+
worker: string;
|
|
538
538
|
exportName: TExportName$1;
|
|
539
539
|
/** @internal Carries the config type for inference */
|
|
540
540
|
__config: TConfig$1;
|
|
@@ -545,23 +545,23 @@ interface WorkerLoaderBinding {
|
|
|
545
545
|
}
|
|
546
546
|
interface WorkflowBindingOptions {
|
|
547
547
|
/** The name of the Worker that defines the Workflow. */
|
|
548
|
-
|
|
548
|
+
worker: string;
|
|
549
549
|
/** The exported class name of the Workflow. */
|
|
550
550
|
exportName: string;
|
|
551
551
|
}
|
|
552
552
|
/**
|
|
553
|
-
* Binding to a Workflow. `
|
|
553
|
+
* Binding to a Workflow. `worker` is the name of the Worker that defines
|
|
554
554
|
* the Workflow; `exportName` is the exported `WorkflowEntrypoint` class name.
|
|
555
555
|
*/
|
|
556
556
|
interface WorkflowBinding extends WorkflowBindingOptions {
|
|
557
557
|
type: "workflow";
|
|
558
558
|
}
|
|
559
559
|
/**
|
|
560
|
-
* Binding to a Workflow. `
|
|
560
|
+
* Binding to a Workflow. `worker` is the name of the Worker that defines
|
|
561
561
|
* the Workflow; `exportName` is the exported `WorkflowEntrypoint` class name.
|
|
562
562
|
*/
|
|
563
563
|
interface TypedWorkflowBinding<TConfig$1, TExportName$1 extends string> extends WorkflowBinding {
|
|
564
|
-
|
|
564
|
+
worker: string;
|
|
565
565
|
exportName: TExportName$1;
|
|
566
566
|
/** @internal Carries the config type for inference */
|
|
567
567
|
__config: TConfig$1;
|
|
@@ -624,7 +624,7 @@ interface Bindings {
|
|
|
624
624
|
*/
|
|
625
625
|
dispatchNamespace(options?: DispatchNamespaceBindingOptions): DispatchNamespaceBinding;
|
|
626
626
|
/**
|
|
627
|
-
* Binding to a Durable Object class. `
|
|
627
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
628
628
|
* that defines the class; `exportName` is the exported class name.
|
|
629
629
|
*
|
|
630
630
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
@@ -727,7 +727,7 @@ interface Bindings {
|
|
|
727
727
|
*/
|
|
728
728
|
webSearch(options?: WebSearchBindingOptions): WebSearchBinding;
|
|
729
729
|
/**
|
|
730
|
-
* Service binding (Worker-to-Worker). `
|
|
730
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
731
731
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
732
732
|
* the default export).
|
|
733
733
|
*
|
|
@@ -1198,7 +1198,7 @@ interface WorkerConfig {
|
|
|
1198
1198
|
*/
|
|
1199
1199
|
tailConsumers?: Array<{
|
|
1200
1200
|
/** The name of the service tail events will be forwarded to. */
|
|
1201
|
-
|
|
1201
|
+
worker: string;
|
|
1202
1202
|
/** Whether to stream tail events in real time. */
|
|
1203
1203
|
streaming?: boolean;
|
|
1204
1204
|
}>;
|
|
@@ -1260,6 +1260,12 @@ interface WorkerConfig {
|
|
|
1260
1260
|
enabled?: boolean;
|
|
1261
1261
|
/** The sampling rate. */
|
|
1262
1262
|
headSamplingRate?: number;
|
|
1263
|
+
/**
|
|
1264
|
+
* Whether query strings are removed from request URLs in logs and traces.
|
|
1265
|
+
*
|
|
1266
|
+
* @default false
|
|
1267
|
+
*/
|
|
1268
|
+
redactQueryString?: boolean;
|
|
1263
1269
|
logs?: {
|
|
1264
1270
|
enabled?: boolean;
|
|
1265
1271
|
/** The sampling rate. */
|
|
@@ -1410,24 +1416,24 @@ interface WorkerDefinition<TConfig$1 extends WorkerConfig = WorkerConfig> extend
|
|
|
1410
1416
|
*/
|
|
1411
1417
|
interface TypedWorkerDefinition<TConfig$1 extends WorkerConfig, TWorkerName extends string = InferWorkerName<TConfig$1>> extends WorkerDefinition<TConfig$1> {
|
|
1412
1418
|
/**
|
|
1413
|
-
* Binding to a Durable Object class. `
|
|
1419
|
+
* Binding to a Durable Object class. `worker` is the name of the Worker
|
|
1414
1420
|
* that defines the class; `exportName` is the exported class name.
|
|
1415
1421
|
*
|
|
1416
1422
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
1417
1423
|
*/
|
|
1418
1424
|
durableObject<TExportName$1 extends InferDurableNamespaces<TConfig$1>>(options: {
|
|
1419
|
-
|
|
1425
|
+
worker: TWorkerName;
|
|
1420
1426
|
exportName: TExportName$1;
|
|
1421
1427
|
}): TypedDurableObjectBinding<TConfig$1, TExportName$1>;
|
|
1422
1428
|
/**
|
|
1423
|
-
* Service binding (Worker-to-Worker). `
|
|
1429
|
+
* Service binding (Worker-to-Worker). `worker` is the name of the bound
|
|
1424
1430
|
* Worker; `exportName` selects a named `WorkerEntrypoint` export (defaults to
|
|
1425
1431
|
* the default export).
|
|
1426
1432
|
*
|
|
1427
1433
|
* For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
|
1428
1434
|
*/
|
|
1429
1435
|
worker<TExportName$1 extends InferWorkerEntrypointExports<TConfig$1> | undefined = undefined>(options: {
|
|
1430
|
-
|
|
1436
|
+
worker: TWorkerName;
|
|
1431
1437
|
exportName?: TExportName$1;
|
|
1432
1438
|
props?: Record<string, unknown>;
|
|
1433
1439
|
dev?: BindingDevOptions;
|
package/dist/public.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PipelineBinding, A as Triggers, B as Bindings, C as WorkerEntrypointExportOptions, Ct as WorkflowBinding, D as FetchTrigger, E as EmailTrigger, F as AiSearchNamespaceBinding, G as FlagshipBinding, H as D1Binding, I as AnalyticsEngineDatasetBinding, J as JsonBinding, K as HyperdriveBinding, L as ArtifactsBinding, M as AgentMemoryBinding, N as AiBinding, O as QueueConsumerTrigger, P as AiSearchBinding, Q as MtlsCertificateBinding, R as AssetsBinding, S as WorkerEntrypointExport, St as WorkerLoaderBinding, T as ConnectTrigger, U as DispatchNamespaceBinding, V as BrowserBinding, W as DurableObjectBinding, X as LogfwdrBinding, Y as KvBinding, Z as MediaBinding, _ as DurableObjectDeletedExport, _t as VersionMetadataBinding, a as InferEnv, at as SendEmailBinding, b as DurableObjectTransferredExport, bt as WebSearchBinding, c as TypedWorkerDefinition, ct as TypedAiBinding, d as defineWorker, dt as TypedPipelineBinding, et as QueueBinding, f as SettingsConfig, ft as TypedQueueBinding, g as DurableObjectCreatedExport, gt as VectorizeBinding, ht as UnsafeBinding, i as InferDurableNamespaces, it as SecretsStoreSecretBinding, j as triggers, k as ScheduledTrigger, l as WorkerConfigExport, lt as TypedDurableObjectBinding, m as ConfigContext, mt as TypedWorkflowBinding, n as SettingsDefinition, nt as RateLimitBinding, o as InferMainModule, ot as StreamBinding, p as WorkerConfig, pt as TypedWorkerBinding, q as ImagesBinding, r as defineSettings, rt as SecretBinding, s as UnwrapConfig, st as TextBinding, t as SettingsConfigInput, tt as R2Binding, u as WorkerConfigInput, ut as TypedKvBinding, v as DurableObjectExpectingTransferExport, vt as VpcNetworkBinding, w as exports, wt as bindings, x as Exports, xt as WorkerBinding, y as DurableObjectRenamedExport, yt as VpcServiceBinding, z as BindingDevOptions } from "./public-
|
|
1
|
+
import { $ as PipelineBinding, A as Triggers, B as Bindings, C as WorkerEntrypointExportOptions, Ct as WorkflowBinding, D as FetchTrigger, E as EmailTrigger, F as AiSearchNamespaceBinding, G as FlagshipBinding, H as D1Binding, I as AnalyticsEngineDatasetBinding, J as JsonBinding, K as HyperdriveBinding, L as ArtifactsBinding, M as AgentMemoryBinding, N as AiBinding, O as QueueConsumerTrigger, P as AiSearchBinding, Q as MtlsCertificateBinding, R as AssetsBinding, S as WorkerEntrypointExport, St as WorkerLoaderBinding, T as ConnectTrigger, U as DispatchNamespaceBinding, V as BrowserBinding, W as DurableObjectBinding, X as LogfwdrBinding, Y as KvBinding, Z as MediaBinding, _ as DurableObjectDeletedExport, _t as VersionMetadataBinding, a as InferEnv, at as SendEmailBinding, b as DurableObjectTransferredExport, bt as WebSearchBinding, c as TypedWorkerDefinition, ct as TypedAiBinding, d as defineWorker, dt as TypedPipelineBinding, et as QueueBinding, f as SettingsConfig, ft as TypedQueueBinding, g as DurableObjectCreatedExport, gt as VectorizeBinding, ht as UnsafeBinding, i as InferDurableNamespaces, it as SecretsStoreSecretBinding, j as triggers, k as ScheduledTrigger, l as WorkerConfigExport, lt as TypedDurableObjectBinding, m as ConfigContext, mt as TypedWorkflowBinding, n as SettingsDefinition, nt as RateLimitBinding, o as InferMainModule, ot as StreamBinding, p as WorkerConfig, pt as TypedWorkerBinding, q as ImagesBinding, r as defineSettings, rt as SecretBinding, s as UnwrapConfig, st as TextBinding, t as SettingsConfigInput, tt as R2Binding, u as WorkerConfigInput, ut as TypedKvBinding, v as DurableObjectExpectingTransferExport, vt as VpcNetworkBinding, w as exports, wt as bindings, x as Exports, xt as WorkerBinding, y as DurableObjectRenamedExport, yt as VpcServiceBinding, z as BindingDevOptions } from "./public-DZgNmLyp.mjs";
|
|
2
2
|
export { AgentMemoryBinding, AiBinding, AiSearchBinding, AiSearchNamespaceBinding, AnalyticsEngineDatasetBinding, ArtifactsBinding, AssetsBinding, BindingDevOptions, Bindings, BrowserBinding, ConfigContext, ConnectTrigger, D1Binding, DispatchNamespaceBinding, DurableObjectBinding, DurableObjectCreatedExport, DurableObjectDeletedExport, DurableObjectExpectingTransferExport, DurableObjectRenamedExport, DurableObjectTransferredExport, EmailTrigger, Exports, FetchTrigger, FlagshipBinding, HyperdriveBinding, ImagesBinding, InferDurableNamespaces, InferEnv, InferMainModule, JsonBinding, KvBinding, LogfwdrBinding, MediaBinding, MtlsCertificateBinding, PipelineBinding, QueueBinding, QueueConsumerTrigger, R2Binding, RateLimitBinding, ScheduledTrigger, SecretBinding, SecretsStoreSecretBinding, SendEmailBinding, SettingsConfig, SettingsConfigInput, SettingsDefinition, 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, defineSettings, defineWorker, exports, triggers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Definitions and utilities for configuring Cloudflare Workers and related products. This is not yet stable enough for external use — APIs may change without notice.",
|
|
5
5
|
"homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/config#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"zod": "4.4.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@cloudflare/workers-types": "^5.
|
|
34
|
+
"@cloudflare/workers-types": "^5.20260831.1",
|
|
35
35
|
"ts-dedent": "^2.2.0",
|
|
36
36
|
"tsdown": "0.16.3",
|
|
37
37
|
"typescript": "5.8.3",
|
|
38
38
|
"vitest": "4.1.0",
|
|
39
39
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
40
|
-
"@cloudflare/workers-utils": "0.
|
|
40
|
+
"@cloudflare/workers-utils": "0.35.0"
|
|
41
41
|
},
|
|
42
42
|
"workers-sdk": {
|
|
43
43
|
"prerelease": true
|