@cloudflare/workers-types 5.20260820.1 → 5.20260822.1

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.
@@ -715,7 +715,7 @@ interface DurableObjectState<Props = unknown> {
715
715
  setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
716
716
  getHibernatableWebSocketEventTimeout(): number | null;
717
717
  getTags(ws: WebSocket): string[];
718
- abort(reason?: string): void;
718
+ abort(reason?: string, options?: DurableObjectAbortOptions): void;
719
719
  configureReadReplication(
720
720
  options: DurableObjectReadReplicationOptions,
721
721
  ): Promise<void>;
@@ -799,6 +799,9 @@ interface DurableObjectStorage {
799
799
  /** @deprecated Use `ctx.configureReadReplication()` instead. */
800
800
  disableReplicas(): void;
801
801
  }
802
+ interface DurableObjectAbortOptions {
803
+ retryAlarm?: boolean;
804
+ }
802
805
  interface DurableObjectReadReplicationOptions {
803
806
  mode: "auto" | "disabled";
804
807
  }
@@ -4078,10 +4081,15 @@ interface ContainerDirectorySnapshotOptions {
4078
4081
  dir: string;
4079
4082
  name?: string;
4080
4083
  }
4081
- interface ContainerDirectorySnapshotRestoreParams {
4082
- snapshot: ContainerDirectorySnapshot;
4083
- mountPoint?: string;
4084
- }
4084
+ type ContainerDirectorySnapshotRestoreParams =
4085
+ | {
4086
+ snapshot: ContainerDirectorySnapshot;
4087
+ mountPoint?: string;
4088
+ }
4089
+ | {
4090
+ snapshot?: undefined;
4091
+ mountPoint: string;
4092
+ };
4085
4093
  interface ContainerSnapshot {
4086
4094
  id: string;
4087
4095
  size: number;
@@ -4427,7 +4435,7 @@ interface WorkerLoaderModule {
4427
4435
  data?: ArrayBuffer;
4428
4436
  json?: any;
4429
4437
  py?: string;
4430
- wasm?: ArrayBuffer;
4438
+ wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
4431
4439
  }
4432
4440
  interface WorkerLoaderWorkerCode {
4433
4441
  compatibilityDate: string;
@@ -4435,7 +4443,7 @@ interface WorkerLoaderWorkerCode {
4435
4443
  allowExperimental?: boolean;
4436
4444
  limits?: workerdResourceLimits;
4437
4445
  mainModule: string;
4438
- modules: Record<string, WorkerLoaderModule | string>;
4446
+ modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
4439
4447
  env?: any;
4440
4448
  globalOutbound?: Fetcher | null;
4441
4449
  tails?: Fetcher[];
@@ -16744,7 +16752,8 @@ declare namespace TailStream {
16744
16752
  | "responseStreamDisconnected"
16745
16753
  | "scriptNotFound"
16746
16754
  | "internalError"
16747
- | "exceededWallTime";
16755
+ | "exceededWallTime"
16756
+ | "aborted";
16748
16757
  interface ScriptVersion {
16749
16758
  readonly id: string;
16750
16759
  readonly tag?: string;
@@ -718,7 +718,7 @@ export interface DurableObjectState<Props = unknown> {
718
718
  setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
719
719
  getHibernatableWebSocketEventTimeout(): number | null;
720
720
  getTags(ws: WebSocket): string[];
721
- abort(reason?: string): void;
721
+ abort(reason?: string, options?: DurableObjectAbortOptions): void;
722
722
  configureReadReplication(
723
723
  options: DurableObjectReadReplicationOptions,
724
724
  ): Promise<void>;
@@ -802,6 +802,9 @@ export interface DurableObjectStorage {
802
802
  /** @deprecated Use `ctx.configureReadReplication()` instead. */
803
803
  disableReplicas(): void;
804
804
  }
805
+ export interface DurableObjectAbortOptions {
806
+ retryAlarm?: boolean;
807
+ }
805
808
  export interface DurableObjectReadReplicationOptions {
806
809
  mode: "auto" | "disabled";
807
810
  }
@@ -4087,10 +4090,15 @@ export interface ContainerDirectorySnapshotOptions {
4087
4090
  dir: string;
4088
4091
  name?: string;
4089
4092
  }
4090
- export interface ContainerDirectorySnapshotRestoreParams {
4091
- snapshot: ContainerDirectorySnapshot;
4092
- mountPoint?: string;
4093
- }
4093
+ export type ContainerDirectorySnapshotRestoreParams =
4094
+ | {
4095
+ snapshot: ContainerDirectorySnapshot;
4096
+ mountPoint?: string;
4097
+ }
4098
+ | {
4099
+ snapshot?: undefined;
4100
+ mountPoint: string;
4101
+ };
4094
4102
  export interface ContainerSnapshot {
4095
4103
  id: string;
4096
4104
  size: number;
@@ -4436,7 +4444,7 @@ export interface WorkerLoaderModule {
4436
4444
  data?: ArrayBuffer;
4437
4445
  json?: any;
4438
4446
  py?: string;
4439
- wasm?: ArrayBuffer;
4447
+ wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
4440
4448
  }
4441
4449
  export interface WorkerLoaderWorkerCode {
4442
4450
  compatibilityDate: string;
@@ -4444,7 +4452,7 @@ export interface WorkerLoaderWorkerCode {
4444
4452
  allowExperimental?: boolean;
4445
4453
  limits?: workerdResourceLimits;
4446
4454
  mainModule: string;
4447
- modules: Record<string, WorkerLoaderModule | string>;
4455
+ modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
4448
4456
  env?: any;
4449
4457
  globalOutbound?: Fetcher | null;
4450
4458
  tails?: Fetcher[];
@@ -16702,7 +16710,8 @@ export declare namespace TailStream {
16702
16710
  | "responseStreamDisconnected"
16703
16711
  | "scriptNotFound"
16704
16712
  | "internalError"
16705
- | "exceededWallTime";
16713
+ | "exceededWallTime"
16714
+ | "aborted";
16706
16715
  interface ScriptVersion {
16707
16716
  readonly id: string;
16708
16717
  readonly tag?: string;
package/index.d.ts CHANGED
@@ -706,7 +706,7 @@ interface DurableObjectState<Props = unknown> {
706
706
  setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
707
707
  getHibernatableWebSocketEventTimeout(): number | null;
708
708
  getTags(ws: WebSocket): string[];
709
- abort(reason?: string): void;
709
+ abort(reason?: string, options?: DurableObjectAbortOptions): void;
710
710
  }
711
711
  interface DurableObjectTransaction {
712
712
  get<T = unknown>(
@@ -780,6 +780,9 @@ interface DurableObjectStorage {
780
780
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
781
781
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
782
782
  }
783
+ interface DurableObjectAbortOptions {
784
+ retryAlarm?: boolean;
785
+ }
783
786
  interface DurableObjectListOptions {
784
787
  start?: string;
785
788
  startAfter?: string;
@@ -3988,10 +3991,15 @@ interface ContainerDirectorySnapshotOptions {
3988
3991
  dir: string;
3989
3992
  name?: string;
3990
3993
  }
3991
- interface ContainerDirectorySnapshotRestoreParams {
3992
- snapshot: ContainerDirectorySnapshot;
3993
- mountPoint?: string;
3994
- }
3994
+ type ContainerDirectorySnapshotRestoreParams =
3995
+ | {
3996
+ snapshot: ContainerDirectorySnapshot;
3997
+ mountPoint?: string;
3998
+ }
3999
+ | {
4000
+ snapshot?: undefined;
4001
+ mountPoint: string;
4002
+ };
3995
4003
  interface ContainerSnapshot {
3996
4004
  id: string;
3997
4005
  size: number;
@@ -4152,7 +4160,7 @@ interface WorkerLoaderModule {
4152
4160
  data?: ArrayBuffer;
4153
4161
  json?: any;
4154
4162
  py?: string;
4155
- wasm?: ArrayBuffer;
4163
+ wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
4156
4164
  }
4157
4165
  interface WorkerLoaderWorkerCode {
4158
4166
  compatibilityDate: string;
@@ -4160,7 +4168,7 @@ interface WorkerLoaderWorkerCode {
4160
4168
  allowExperimental?: boolean;
4161
4169
  limits?: workerdResourceLimits;
4162
4170
  mainModule: string;
4163
- modules: Record<string, WorkerLoaderModule | string>;
4171
+ modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
4164
4172
  env?: any;
4165
4173
  globalOutbound?: Fetcher | null;
4166
4174
  tails?: Fetcher[];
@@ -16469,7 +16477,8 @@ declare namespace TailStream {
16469
16477
  | "responseStreamDisconnected"
16470
16478
  | "scriptNotFound"
16471
16479
  | "internalError"
16472
- | "exceededWallTime";
16480
+ | "exceededWallTime"
16481
+ | "aborted";
16473
16482
  interface ScriptVersion {
16474
16483
  readonly id: string;
16475
16484
  readonly tag?: string;
package/index.ts CHANGED
@@ -709,7 +709,7 @@ export interface DurableObjectState<Props = unknown> {
709
709
  setHibernatableWebSocketEventTimeout(timeoutMs?: number): void;
710
710
  getHibernatableWebSocketEventTimeout(): number | null;
711
711
  getTags(ws: WebSocket): string[];
712
- abort(reason?: string): void;
712
+ abort(reason?: string, options?: DurableObjectAbortOptions): void;
713
713
  }
714
714
  export interface DurableObjectTransaction {
715
715
  get<T = unknown>(
@@ -783,6 +783,9 @@ export interface DurableObjectStorage {
783
783
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
784
784
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
785
785
  }
786
+ export interface DurableObjectAbortOptions {
787
+ retryAlarm?: boolean;
788
+ }
786
789
  export interface DurableObjectListOptions {
787
790
  start?: string;
788
791
  startAfter?: string;
@@ -3997,10 +4000,15 @@ export interface ContainerDirectorySnapshotOptions {
3997
4000
  dir: string;
3998
4001
  name?: string;
3999
4002
  }
4000
- export interface ContainerDirectorySnapshotRestoreParams {
4001
- snapshot: ContainerDirectorySnapshot;
4002
- mountPoint?: string;
4003
- }
4003
+ export type ContainerDirectorySnapshotRestoreParams =
4004
+ | {
4005
+ snapshot: ContainerDirectorySnapshot;
4006
+ mountPoint?: string;
4007
+ }
4008
+ | {
4009
+ snapshot?: undefined;
4010
+ mountPoint: string;
4011
+ };
4004
4012
  export interface ContainerSnapshot {
4005
4013
  id: string;
4006
4014
  size: number;
@@ -4161,7 +4169,7 @@ export interface WorkerLoaderModule {
4161
4169
  data?: ArrayBuffer;
4162
4170
  json?: any;
4163
4171
  py?: string;
4164
- wasm?: ArrayBuffer;
4172
+ wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
4165
4173
  }
4166
4174
  export interface WorkerLoaderWorkerCode {
4167
4175
  compatibilityDate: string;
@@ -4169,7 +4177,7 @@ export interface WorkerLoaderWorkerCode {
4169
4177
  allowExperimental?: boolean;
4170
4178
  limits?: workerdResourceLimits;
4171
4179
  mainModule: string;
4172
- modules: Record<string, WorkerLoaderModule | string>;
4180
+ modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
4173
4181
  env?: any;
4174
4182
  globalOutbound?: Fetcher | null;
4175
4183
  tails?: Fetcher[];
@@ -16427,7 +16435,8 @@ export declare namespace TailStream {
16427
16435
  | "responseStreamDisconnected"
16428
16436
  | "scriptNotFound"
16429
16437
  | "internalError"
16430
- | "exceededWallTime";
16438
+ | "exceededWallTime"
16439
+ | "aborted";
16431
16440
  interface ScriptVersion {
16432
16441
  readonly id: string;
16433
16442
  readonly tag?: string;
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "5.20260820.1"
10
+ "version": "5.20260822.1"
11
11
  }