wrangler 3.83.0 → 3.84.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "3.83.0",
3
+ "version": "3.84.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -63,7 +63,7 @@
63
63
  "resolve.exports": "^2.0.2",
64
64
  "selfsigned": "^2.0.1",
65
65
  "source-map": "^0.6.1",
66
- "unenv": "npm:unenv-nightly@2.0.0-20241018-011344-e666fcf",
66
+ "unenv": "npm:unenv-nightly@2.0.0-20241024-111401-d4156ac",
67
67
  "workerd": "1.20241022.0",
68
68
  "xxhash-wasm": "^1.0.1",
69
69
  "@cloudflare/kv-asset-handler": "0.3.4",
@@ -96,7 +96,7 @@
96
96
  "@types/supports-color": "^8.1.1",
97
97
  "@types/ws": "^8.5.7",
98
98
  "@types/yargs": "^17.0.22",
99
- "@vitest/ui": "^1.6.0",
99
+ "@vitest/ui": "~2.1.3",
100
100
  "@webcontainer/env": "^1.1.0",
101
101
  "body-parser": "^1.20.0",
102
102
  "chalk": "^5.2.0",
@@ -107,7 +107,6 @@
107
107
  "concurrently": "^8.2.2",
108
108
  "devtools-protocol": "^0.0.1182435",
109
109
  "dotenv": "^16.0.0",
110
- "es-module-lexer": "^1.3.0",
111
110
  "execa": "^6.1.0",
112
111
  "express": "^4.18.1",
113
112
  "find-up": "^6.3.0",
@@ -126,7 +125,7 @@
126
125
  "mime": "^3.0.0",
127
126
  "minimatch": "^5.1.0",
128
127
  "mock-socket": "^9.3.1",
129
- "msw": "^2.3.0",
128
+ "msw": "2.4.3",
130
129
  "open": "^8.4.0",
131
130
  "p-queue": "^7.2.0",
132
131
  "patch-console": "^1.0.0",
@@ -147,15 +146,15 @@
147
146
  "ts-json-schema-generator": "^1.5.0",
148
147
  "undici": "^5.28.4",
149
148
  "update-check": "^1.5.4",
150
- "vitest": "~2.1.1",
151
- "vitest-websocket-mock": "^0.3.0",
152
- "ws": "^8.17.1",
149
+ "vitest": "~2.1.3",
150
+ "vitest-websocket-mock": "^0.4.0",
151
+ "ws": "^8.18.0",
153
152
  "xdg-app-paths": "^8.3.0",
154
153
  "yargs": "^17.7.2",
155
154
  "yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
156
155
  "@cloudflare/cli": "1.1.1",
157
- "@cloudflare/pages-shared": "^0.11.67",
158
156
  "@cloudflare/eslint-config-worker": "1.1.0",
157
+ "@cloudflare/pages-shared": "^0.11.67",
159
158
  "@cloudflare/workers-tsconfig": "0.0.0"
160
159
  },
161
160
  "peerDependencies": {
@@ -18,9 +18,9 @@ import type { ModuleRule } from 'miniflare';
18
18
  import { Mutex } from 'miniflare';
19
19
  import type { NodeJSCompatMode } from 'miniflare';
20
20
  import { Readable } from 'stream';
21
- import { ReadableStream } from 'stream/web';
22
- import type { Request as Request_2 } from 'miniflare';
23
- import { Response as Response_2 } from 'miniflare';
21
+ import { ReadableStream as ReadableStream_2 } from 'stream/web';
22
+ import type { Request as Request_3 } from 'miniflare';
23
+ import { Response as Response_3 } from 'miniflare';
24
24
  import type { Server } from 'node:http';
25
25
  import { ServerResponse } from 'http';
26
26
  import { Socket } from 'net';
@@ -216,7 +216,7 @@ declare type BodyInit =
216
216
  | string
217
217
 
218
218
  declare interface BodyMixin {
219
- readonly body: ReadableStream | null
219
+ readonly body: ReadableStream_2 | null
220
220
  readonly bodyUsed: boolean
221
221
 
222
222
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -341,13 +341,13 @@ declare type BundleStartEvent = {
341
341
  };
342
342
 
343
343
  declare interface Cache {
344
- match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
345
- matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
344
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response_2 | undefined>,
345
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response_2[]>,
346
346
  add (request: RequestInfo): Promise<undefined>,
347
347
  addAll (requests: RequestInfo[]): Promise<undefined>,
348
- put (request: RequestInfo, response: Response): Promise<undefined>,
348
+ put (request: RequestInfo, response: Response_2): Promise<undefined>,
349
349
  delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
350
- keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
350
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request_2[]>
351
351
  }
352
352
 
353
353
  /**
@@ -376,7 +376,7 @@ declare type CacheResponse = any;
376
376
  declare const caches: CacheStorage;
377
377
 
378
378
  declare interface CacheStorage {
379
- match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
379
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response_2 | undefined>,
380
380
  has (cacheName: string): Promise<boolean>,
381
381
  open (cacheName: string): Promise<Cache>,
382
382
  delete (cacheName: string): Promise<boolean>,
@@ -971,7 +971,7 @@ declare type DeferredPromise<T> = {
971
971
  };
972
972
 
973
973
  declare function deleteCookie (
974
- headers: Headers,
974
+ headers: Headers_2,
975
975
  name: string,
976
976
  attributes?: { name?: string, domain?: string }
977
977
  ): void
@@ -1421,7 +1421,7 @@ declare interface DispatchNamespaceOutbound {
1421
1421
  parameters?: string[];
1422
1422
  }
1423
1423
 
1424
- declare type DOMException = typeof globalThis extends { DOMException: infer T }
1424
+ declare type DOMException_2 = typeof globalThis extends { DOMException: infer T }
1425
1425
  ? T
1426
1426
  : any
1427
1427
 
@@ -1478,6 +1478,8 @@ declare type Entry = {
1478
1478
  * A worker's name
1479
1479
  */
1480
1480
  name?: string | undefined;
1481
+ /** Export from a Worker's entrypoint */
1482
+ exports: string[];
1481
1483
  };
1482
1484
 
1483
1485
  /**
@@ -2358,10 +2360,10 @@ declare class ExecutionContext {
2358
2360
  passThroughOnException(): void;
2359
2361
  }
2360
2362
 
2361
- declare function fetch (
2363
+ declare function fetch_2 (
2362
2364
  input: RequestInfo,
2363
- init?: RequestInit
2364
- ): Promise<Response>
2365
+ init?: RequestInit_2
2366
+ ): Promise<Response_2>
2365
2367
 
2366
2368
  declare class File extends Blob_2 {
2367
2369
  /**
@@ -2424,7 +2426,7 @@ declare class FileReader {
2424
2426
 
2425
2427
  readonly result: string | ArrayBuffer | null
2426
2428
 
2427
- readonly error: DOMException | null
2429
+ readonly error: DOMException_2 | null
2428
2430
 
2429
2431
  onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
2430
2432
  onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
@@ -2551,7 +2553,7 @@ export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfP
2551
2553
  /** Options for the `getBindingsProxy` utility */
2552
2554
  export declare type GetBindingsProxyOptions = GetPlatformProxyOptions;
2553
2555
 
2554
- declare function getCookies (headers: Headers): Record<string, string>
2556
+ declare function getCookies (headers: Headers_2): Record<string, string>
2555
2557
 
2556
2558
  declare function getGlobalDispatcher(): Dispatcher;
2557
2559
 
@@ -2607,9 +2609,9 @@ export declare type GetPlatformProxyOptions = {
2607
2609
  experimentalRegistry?: boolean;
2608
2610
  };
2609
2611
 
2610
- declare function getSetCookies (headers: Headers): Cookie[]
2612
+ declare function getSetCookies (headers: Headers_2): Cookie[]
2611
2613
 
2612
- declare class Headers implements SpecIterable<[string, string]> {
2614
+ declare class Headers_2 implements SpecIterable<[string, string]> {
2613
2615
  constructor (init?: HeadersInit)
2614
2616
  readonly append: (name: string, value: string) => void
2615
2617
  readonly delete: (name: string) => void
@@ -2618,7 +2620,7 @@ declare class Headers implements SpecIterable<[string, string]> {
2618
2620
  readonly set: (name: string, value: string) => void
2619
2621
  readonly getSetCookie: () => string[]
2620
2622
  readonly forEach: (
2621
- callbackfn: (value: string, key: string, iterable: Headers) => void,
2623
+ callbackfn: (value: string, key: string, iterable: Headers_2) => void,
2622
2624
  thisArg?: unknown
2623
2625
  ) => void
2624
2626
 
@@ -2628,7 +2630,7 @@ declare class Headers implements SpecIterable<[string, string]> {
2628
2630
  readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
2629
2631
  }
2630
2632
 
2631
- declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
2633
+ declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers_2
2632
2634
 
2633
2635
  declare type Hook<T extends HookValues, Args extends unknown[] = []> = T | ((...args: Args) => T);
2634
2636
 
@@ -2701,7 +2703,7 @@ declare type LogLevel = "debug" | "info" | "log" | "warn" | "error" | "none";
2701
2703
 
2702
2704
  declare type MaybePromise<T> = T | Promise<T>;
2703
2705
 
2704
- declare interface MessageEvent<T = any> extends Event_2 {
2706
+ declare interface MessageEvent_2<T = any> extends Event_2 {
2705
2707
  readonly data: T
2706
2708
  readonly lastEventId: string
2707
2709
  readonly origin: string
@@ -2719,9 +2721,9 @@ declare interface MessageEvent<T = any> extends Event_2 {
2719
2721
  ): void;
2720
2722
  }
2721
2723
 
2722
- declare const MessageEvent: {
2723
- prototype: MessageEvent
2724
- new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
2724
+ declare const MessageEvent_2: {
2725
+ prototype: MessageEvent_2
2726
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent_2<T>
2725
2727
  };
2726
2728
 
2727
2729
  declare interface MessageEventInit<T = any> extends EventInit {
@@ -2860,7 +2862,7 @@ declare namespace MockInterceptor {
2860
2862
  origin: string;
2861
2863
  method: string;
2862
2864
  body?: BodyInit | Dispatcher.DispatchOptions['body'];
2863
- headers: Headers | Record<string, string>;
2865
+ headers: Headers_2 | Record<string, string>;
2864
2866
  maxRedirections: number;
2865
2867
  }
2866
2868
 
@@ -25507,7 +25509,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
25507
25509
  onReloadComplete(data: ReloadCompleteEvent): void;
25508
25510
  onProxyWorkerMessage(message: ProxyWorkerOutgoingRequestBody): void;
25509
25511
  onInspectorProxyWorkerMessage(message: InspectorProxyWorkerOutgoingWebsocketMessage): void;
25510
- onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_2>;
25512
+ onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_3>;
25511
25513
  _torndown: boolean;
25512
25514
  teardown(): Promise<void>;
25513
25515
  emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL): void;
@@ -25591,13 +25593,19 @@ declare type ReloadStartEvent = {
25591
25593
  bundle: Bundle;
25592
25594
  };
25593
25595
 
25594
- declare class Request implements BodyMixin {
25595
- constructor (input: RequestInfo, init?: RequestInit)
25596
+ /** Performs an HTTP request. */
25597
+ declare function request(
25598
+ url: string | URL_2 | UrlObject,
25599
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25600
+ ): Promise<Dispatcher.ResponseData>;
25601
+
25602
+ declare class Request_2 implements BodyMixin {
25603
+ constructor (input: RequestInfo, init?: RequestInit_2)
25596
25604
 
25597
25605
  readonly cache: RequestCache
25598
25606
  readonly credentials: RequestCredentials
25599
25607
  readonly destination: RequestDestination
25600
- readonly headers: Headers
25608
+ readonly headers: Headers_2
25601
25609
  readonly integrity: string
25602
25610
  readonly method: string
25603
25611
  readonly mode: RequestMode
@@ -25609,7 +25617,7 @@ declare class Request implements BodyMixin {
25609
25617
  readonly signal: AbortSignal
25610
25618
  readonly duplex: RequestDuplex
25611
25619
 
25612
- readonly body: ReadableStream | null
25620
+ readonly body: ReadableStream_2 | null
25613
25621
  readonly bodyUsed: boolean
25614
25622
 
25615
25623
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -25618,15 +25626,9 @@ declare class Request implements BodyMixin {
25618
25626
  readonly json: () => Promise<unknown>
25619
25627
  readonly text: () => Promise<string>
25620
25628
 
25621
- readonly clone: () => Request
25629
+ readonly clone: () => Request_2
25622
25630
  }
25623
25631
 
25624
- /** Performs an HTTP request. */
25625
- declare function request(
25626
- url: string | URL_2 | UrlObject,
25627
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
25628
- ): Promise<Dispatcher.ResponseData>;
25629
-
25630
25632
  declare type RequestCache =
25631
25633
  | 'default'
25632
25634
  | 'force-cache'
@@ -25659,9 +25661,9 @@ declare type RequestDestination =
25659
25661
 
25660
25662
  declare type RequestDuplex = 'half'
25661
25663
 
25662
- declare type RequestInfo = string | URL_2 | Request
25664
+ declare type RequestInfo = string | URL_2 | Request_2
25663
25665
 
25664
- declare interface RequestInit {
25666
+ declare interface RequestInit_2 {
25665
25667
  method?: string
25666
25668
  keepalive?: boolean
25667
25669
  headers?: HeadersInit
@@ -25682,10 +25684,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
25682
25684
 
25683
25685
  declare type RequestRedirect = 'error' | 'follow' | 'manual'
25684
25686
 
25685
- declare class Response implements BodyMixin {
25686
- constructor (body?: BodyInit, init?: ResponseInit)
25687
+ declare class Response_2 implements BodyMixin {
25688
+ constructor (body?: BodyInit, init?: ResponseInit_2)
25687
25689
 
25688
- readonly headers: Headers
25690
+ readonly headers: Headers_2
25689
25691
  readonly ok: boolean
25690
25692
  readonly status: number
25691
25693
  readonly statusText: string
@@ -25693,7 +25695,7 @@ declare class Response implements BodyMixin {
25693
25695
  readonly url: string
25694
25696
  readonly redirected: boolean
25695
25697
 
25696
- readonly body: ReadableStream | null
25698
+ readonly body: ReadableStream_2 | null
25697
25699
  readonly bodyUsed: boolean
25698
25700
 
25699
25701
  readonly arrayBuffer: () => Promise<ArrayBuffer>
@@ -25702,14 +25704,14 @@ declare class Response implements BodyMixin {
25702
25704
  readonly json: () => Promise<unknown>
25703
25705
  readonly text: () => Promise<string>
25704
25706
 
25705
- readonly clone: () => Response
25707
+ readonly clone: () => Response_2
25706
25708
 
25707
- static error (): Response
25708
- static json(data: any, init?: ResponseInit): Response
25709
- static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response
25709
+ static error (): Response_2
25710
+ static json(data: any, init?: ResponseInit_2): Response_2
25711
+ static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response_2
25710
25712
  }
25711
25713
 
25712
- declare interface ResponseInit {
25714
+ declare interface ResponseInit_2 {
25713
25715
  readonly status?: number
25714
25716
  readonly statusText?: string
25715
25717
  readonly headers?: HeadersInit
@@ -25886,9 +25888,9 @@ declare type SerializedError = {
25886
25888
  cause?: unknown;
25887
25889
  };
25888
25890
 
25889
- declare type ServiceFetch = (request: Request_2) => Promise<Response_2> | Response_2;
25891
+ declare type ServiceFetch = (request: Request_3) => Promise<Response_3> | Response_3;
25890
25892
 
25891
- declare function setCookie (headers: Headers, cookie: Cookie): void
25893
+ declare function setCookie (headers: Headers_2, cookie: Cookie): void
25892
25894
 
25893
25895
  declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
25894
25896
 
@@ -26019,6 +26021,8 @@ declare interface StartDevWorkerInput {
26019
26021
  /** Describes the registry of other Workers running locally */
26020
26022
  registry?: WorkerRegistry;
26021
26023
  testScheduled?: boolean;
26024
+ /** Whether to use Vectorize mixed mode -- the worker is run locally but accesses to Vectorize are made remotely */
26025
+ bindVectorizeToProd?: boolean;
26022
26026
  };
26023
26027
  legacy?: {
26024
26028
  site?: Hook<Config["site"], [Config]>;
@@ -26039,6 +26043,7 @@ declare type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
26039
26043
  moduleRules: Rule[];
26040
26044
  define: Record<string, string>;
26041
26045
  additionalModules: CfModule[];
26046
+ exports: string[];
26042
26047
  processEntrypoint: boolean;
26043
26048
  };
26044
26049
  legacy: StartDevWorkerInput["legacy"] & {
@@ -26134,10 +26139,10 @@ declare namespace Undici {
26134
26139
  var MockPool: MockPool;
26135
26140
  var MockAgent: MockAgent;
26136
26141
  var mockErrors: MockErrors;
26137
- var fetch: fetch;
26138
- var Headers: Headers;
26139
- var Response: Response;
26140
- var Request: Request;
26142
+ var fetch: fetch_2;
26143
+ var Headers: Headers_2;
26144
+ var Response: Response_2;
26145
+ var Request: Request_2;
26141
26146
  var FormData: FormData_2;
26142
26147
  var File: File;
26143
26148
  var FileReader: FileReader;
@@ -26177,7 +26182,7 @@ declare namespace undici {
26177
26182
  getSetCookies,
26178
26183
  setCookie,
26179
26184
  Cookie,
26180
- fetch,
26185
+ fetch_2 as fetch,
26181
26186
  RequestInfo,
26182
26187
  BodyInit,
26183
26188
  BodyMixin,
@@ -26185,20 +26190,20 @@ declare namespace undici {
26185
26190
  SpecIterableIterator,
26186
26191
  SpecIterable,
26187
26192
  HeadersInit,
26188
- Headers,
26193
+ Headers_2 as Headers,
26189
26194
  RequestCache,
26190
26195
  RequestCredentials,
26191
26196
  RequestDestination,
26192
- RequestInit,
26197
+ RequestInit_2 as RequestInit,
26193
26198
  ReferrerPolicy,
26194
26199
  RequestMode,
26195
26200
  RequestRedirect,
26196
26201
  RequestDuplex,
26197
- Request,
26198
- ResponseInit,
26202
+ Request_2 as Request,
26203
+ ResponseInit_2 as ResponseInit,
26199
26204
  ResponseType,
26200
26205
  ResponseRedirectStatus,
26201
- Response,
26206
+ Response_2 as Response,
26202
26207
  BlobPropertyBag,
26203
26208
  FilePropertyBag,
26204
26209
  File,
@@ -26214,7 +26219,7 @@ declare namespace undici {
26214
26219
  CloseEventInit,
26215
26220
  CloseEvent,
26216
26221
  MessageEventInit,
26217
- MessageEvent,
26222
+ MessageEvent_2 as MessageEvent,
26218
26223
  WebSocketInit,
26219
26224
  parseMIMEType,
26220
26225
  serializeAMimeType,
@@ -26248,7 +26253,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
26248
26253
  emitErrorEvent(ev: ErrorEvent): void;
26249
26254
  }
26250
26255
 
26251
- export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_2) => Promise<Response_2>;
26256
+ export declare const unstable_generateASSETSBinding: (opts: UnstableASSETSBindingsOptions) => (request: Request_3) => Promise<Response_3>;
26252
26257
 
26253
26258
  export declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: string): {
26254
26259
  workerOptions: SourcelessWorkerOptions;
@@ -26345,6 +26350,7 @@ export declare interface UnstableDevOptions {
26345
26350
  watch?: boolean;
26346
26351
  devEnv?: boolean;
26347
26352
  fileBasedRegistry?: boolean;
26353
+ vectorizeBindToProd?: boolean;
26348
26354
  };
26349
26355
  }
26350
26356
 
@@ -26353,7 +26359,7 @@ export declare interface UnstableDevWorker {
26353
26359
  address: string;
26354
26360
  proxyData: ProxyData;
26355
26361
  stop: () => Promise<void>;
26356
- fetch: (input?: RequestInfo, init?: RequestInit) => Promise<Response>;
26362
+ fetch: (input?: RequestInfo, init?: RequestInit_2) => Promise<Response_2>;
26357
26363
  waitUntilExit: () => Promise<void>;
26358
26364
  }
26359
26365
 
@@ -26429,7 +26435,7 @@ declare const WebSocket: {
26429
26435
  declare interface WebSocketEventMap {
26430
26436
  close: CloseEvent
26431
26437
  error: Event_2
26432
- message: MessageEvent
26438
+ message: MessageEvent_2
26433
26439
  open: Event_2
26434
26440
  }
26435
26441