You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Name of the queue (required for queue type)',
128
125
},
126
+
class_name: {
127
+
type: 'string',
128
+
description: 'Name of the Durable Object class (required for durable_object_namespace type)',
129
+
},
130
+
script_name: {
131
+
type: 'string',
132
+
description: 'Optional script name for external Durable Object bindings',
133
+
},
129
134
},
130
135
required: ['type','name'],
131
136
},
132
137
},
138
+
migrations: {
139
+
type: 'object',
140
+
description:
141
+
'Optional migrations object which describes the set of new/changed/deleted Durable Objects to apply when deploying this worker e.g. adding a new Durable Object for the first time requires an entry in the "new_sqlite_classes" or "new_classes" property.',
142
+
items: {
143
+
properties: {
144
+
new_tag: {
145
+
type: 'string',
146
+
description: 'The current version after applying this migration (e.g., "v1", "v2")',
147
+
},
148
+
new_classes: {
149
+
type: 'array',
150
+
items: {type: 'string'},
151
+
description: 'The new Durable Objects using legacy storage being added',
152
+
},
153
+
new_sqlite_classes: {
154
+
type: 'array',
155
+
items: {type: 'string'},
156
+
description: 'The new Durable Objects using the new, improved SQLite storage being added',
157
+
},
158
+
renamed_classes: {
159
+
type: 'array',
160
+
items: {
161
+
type: 'object',
162
+
properties: {
163
+
from: {type: 'string'},
164
+
to: {type: 'string'},
165
+
},
166
+
required: ['from','to'],
167
+
},
168
+
description: 'The Durable Objects being renamed',
169
+
},
170
+
deleted_classes: {
171
+
type: 'array',
172
+
items: {type: 'string'},
173
+
description: 'The Durable Objects being removed',
174
+
},
175
+
},
176
+
required: ['tag'],
177
+
},
178
+
},
133
179
compatibility_date: {
134
180
type: 'string',
135
181
description: 'Optional compatibility date for the Worker (e.g., "2024-01-01")',
description: `Do not deploy the Worker on your workers.dev subdomain. Should be set to true if the user already has a domain name, or doesn't want this worker to be publicly accessible..`,
193
+
},
194
+
no_observability: {
195
+
type: 'boolean',
196
+
description:
197
+
'Disable Worker Logs for this worker, which automatically ingests logs emitted from Cloudflare Workers and lets you filter, and analyze them in the Cloudflare dashboard.',
198
+
},
144
199
},
145
200
required: ['name','script'],
146
201
},
@@ -203,13 +258,105 @@ export async function handleWorkerGet(name: string) {
203
258
returndata
204
259
}
205
260
261
+
exportinterfaceObservability{
262
+
/** If observability is enabled for this Worker */
263
+
enabled: boolean
264
+
/** The sampling rate */
265
+
head_sampling_rate?: number
266
+
}
267
+
268
+
interfaceCfDurableObjectMigrations{
269
+
tag: string
270
+
new_classes?: string[]
271
+
new_sqlite_classes?: string[]
272
+
renamed_classes?: {
273
+
from: string
274
+
to: string
275
+
}[]
276
+
deleted_classes?: string[]
277
+
}
278
+
279
+
interfaceDurableObjectBinding{
280
+
type: 'durable_object_namespace'
281
+
name: string
282
+
class_name: string
283
+
script_name?: string// Optional, defaults to the current worker
284
+
}
285
+
286
+
// Update WorkerBinding to include Durable Objects
287
+
typeWorkerMetadataBinding=
288
+
|{
289
+
type: 'kv_namespace'
290
+
name: string
291
+
namespace_id: string
292
+
}
293
+
|{
294
+
type: 'r2_bucket'
295
+
name: string
296
+
bucket_name: string
297
+
}
298
+
|{
299
+
type: 'd1_database'
300
+
name: string
301
+
database_id: string
302
+
}
303
+
|{
304
+
type: 'service'
305
+
name: string
306
+
service: string
307
+
}
308
+
|{
309
+
type: 'analytics_engine'
310
+
name: string
311
+
dataset: string
312
+
}
313
+
|{
314
+
type: 'queue'
315
+
name: string
316
+
queue_name: string
317
+
}
318
+
|DurableObjectBinding
319
+
320
+
typeWorkerMetadataPut={
321
+
/** The name of the entry point module. Only exists when the worker is in the ES module format */
322
+
main_module?: string
323
+
/** The name of the entry point module. Only exists when the worker is in the service-worker format */
324
+
// body_part?: string;
325
+
compatibility_date?: string
326
+
compatibility_flags?: string[]
327
+
// usage_model?: "bundled" | "unbound";
328
+
migrations?: CfDurableObjectMigrations
329
+
// capnp_schema?: string;
330
+
bindings: WorkerMetadataBinding[]
331
+
// keep_bindings?: (
332
+
// | WorkerMetadataBinding["type"]
333
+
// | "secret_text"
334
+
// | "secret_key"
335
+
// )[];
336
+
// logpush?: boolean;
337
+
// placement?: CfPlacement;
338
+
// tail_consumers?: CfTailConsumer[];
339
+
// limits?: CfUserLimits;
340
+
341
+
// assets?: {
342
+
// jwt: string;
343
+
// config?: AssetConfig;
344
+
// };
345
+
observability?: Observability|undefined
346
+
// Allow unsafe.metadata to add arbitrary properties at runtime
0 commit comments