wrangler 3.46.0 → 3.47.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.
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +169 -169
- package/wrangler-dist/cli.js +25 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.47.1",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
"source-map": "0.6.1",
|
|
97
97
|
"xxhash-wasm": "^1.0.1",
|
|
98
98
|
"@cloudflare/kv-asset-handler": "0.3.1",
|
|
99
|
-
"miniflare": "3.
|
|
99
|
+
"miniflare": "3.20240404.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@cloudflare/ai": "^1.0.35",
|
|
103
103
|
"@cloudflare/eslint-config-worker": "*",
|
|
104
104
|
"@cloudflare/types": "^6.18.4",
|
|
105
|
-
"@cloudflare/workers-types": "^4.
|
|
105
|
+
"@cloudflare/workers-types": "^4.20240404.0",
|
|
106
106
|
"@cspotcode/source-map-support": "0.8.1",
|
|
107
107
|
"@iarna/toml": "^3.0.0",
|
|
108
108
|
"@microsoft/api-extractor": "^7.28.3",
|
|
@@ -187,15 +187,15 @@
|
|
|
187
187
|
"xdg-app-paths": "^8.3.0",
|
|
188
188
|
"yargs": "^17.7.2",
|
|
189
189
|
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz",
|
|
190
|
-
"@cloudflare/
|
|
191
|
-
"@cloudflare/
|
|
192
|
-
"@cloudflare/
|
|
190
|
+
"@cloudflare/pages-shared": "^0.11.26",
|
|
191
|
+
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
192
|
+
"@cloudflare/cli": "1.1.1"
|
|
193
193
|
},
|
|
194
194
|
"optionalDependencies": {
|
|
195
195
|
"fsevents": "~2.3.2"
|
|
196
196
|
},
|
|
197
197
|
"peerDependencies": {
|
|
198
|
-
"@cloudflare/workers-types": "^4.
|
|
198
|
+
"@cloudflare/workers-types": "^4.20240404.0"
|
|
199
199
|
},
|
|
200
200
|
"peerDependenciesMeta": {
|
|
201
201
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Duplex } from 'stream';
|
|
|
7
7
|
import { EventEmitter } from 'events';
|
|
8
8
|
import { EventEmitter as EventEmitter_2 } from 'node:events';
|
|
9
9
|
import { IncomingMessage } from 'http';
|
|
10
|
-
import type { IncomingRequestCfProperties
|
|
10
|
+
import type { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
|
|
11
11
|
import { IpcNetConnectOpts } from 'net';
|
|
12
12
|
import type { Json } from 'miniflare';
|
|
13
13
|
import type { MessagePort as MessagePort_2 } from 'worker_threads';
|
|
@@ -17,18 +17,18 @@ import type { MiniflareOptions } from 'miniflare';
|
|
|
17
17
|
import type { ModuleRule as ModuleRule_2 } from 'miniflare';
|
|
18
18
|
import { Mutex } from 'miniflare';
|
|
19
19
|
import { Readable } from 'stream';
|
|
20
|
-
import { ReadableStream
|
|
21
|
-
import type { Request as
|
|
22
|
-
import { Response as
|
|
20
|
+
import { ReadableStream } from 'stream/web';
|
|
21
|
+
import type { Request as Request_2 } from 'miniflare';
|
|
22
|
+
import { Response as Response_2 } from 'miniflare';
|
|
23
23
|
import type { Server } from 'node:http';
|
|
24
24
|
import { ServerResponse } from 'http';
|
|
25
|
-
import { Socket
|
|
25
|
+
import { Socket } from 'net';
|
|
26
26
|
import { TcpNetConnectOpts } from 'net';
|
|
27
27
|
import { TLSSocket } from 'tls';
|
|
28
28
|
import { URL as URL_2 } from 'url';
|
|
29
29
|
import { UrlObject } from 'url';
|
|
30
30
|
import { URLSearchParams as URLSearchParams_2 } from 'url';
|
|
31
|
-
import { WebSocket as
|
|
31
|
+
import { WebSocket as WebSocket_2 } from 'miniflare';
|
|
32
32
|
import type { WorkerOptions } from 'miniflare';
|
|
33
33
|
import { Writable } from 'stream';
|
|
34
34
|
|
|
@@ -142,7 +142,7 @@ declare type Binding = {
|
|
|
142
142
|
/**
|
|
143
143
|
* Result of the `getBindingsProxy` utility
|
|
144
144
|
*/
|
|
145
|
-
export declare type BindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> =
|
|
145
|
+
export declare type BindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties> = Omit<PlatformProxy<Bindings, CfProperties>, "env"> & {
|
|
146
146
|
/**
|
|
147
147
|
* Object containing the various proxies
|
|
148
148
|
*/
|
|
@@ -154,11 +154,11 @@ declare interface BlobPropertyBag {
|
|
|
154
154
|
endings?: 'native' | 'transparent'
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
declare type
|
|
157
|
+
declare type BodyInit =
|
|
158
158
|
| ArrayBuffer
|
|
159
159
|
| AsyncIterable<Uint8Array>
|
|
160
160
|
| Blob_2
|
|
161
|
-
|
|
|
161
|
+
| FormData
|
|
162
162
|
| Iterable<Uint8Array>
|
|
163
163
|
| NodeJS.ArrayBufferView
|
|
164
164
|
| URLSearchParams_2
|
|
@@ -166,12 +166,12 @@ declare type BodyInit_2 =
|
|
|
166
166
|
| string
|
|
167
167
|
|
|
168
168
|
declare interface BodyMixin {
|
|
169
|
-
readonly body:
|
|
169
|
+
readonly body: ReadableStream | null
|
|
170
170
|
readonly bodyUsed: boolean
|
|
171
171
|
|
|
172
172
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
173
173
|
readonly blob: () => Promise<Blob_2>
|
|
174
|
-
readonly formData: () => Promise<
|
|
174
|
+
readonly formData: () => Promise<FormData>
|
|
175
175
|
readonly json: () => Promise<unknown>
|
|
176
176
|
readonly text: () => Promise<string>
|
|
177
177
|
}
|
|
@@ -253,11 +253,11 @@ declare namespace buildConnector {
|
|
|
253
253
|
port: string
|
|
254
254
|
servername?: string
|
|
255
255
|
localAddress?: string | null
|
|
256
|
-
httpSocket?:
|
|
256
|
+
httpSocket?: Socket
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
type Callback = (...args: CallbackArgs) => void
|
|
260
|
-
type CallbackArgs = [null,
|
|
260
|
+
type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
|
|
261
261
|
|
|
262
262
|
interface connector {
|
|
263
263
|
(options: buildConnector.Options, callback: buildConnector.Callback): void
|
|
@@ -277,7 +277,7 @@ declare class BundlerController extends Controller {
|
|
|
277
277
|
emitBundleCompletetEvent(data: BundleCompleteEvent): void;
|
|
278
278
|
on(event: "bundleStart", listener: (_: BundleStartEvent) => void): this;
|
|
279
279
|
on(event: "bundleComplete", listener: (_: BundleCompleteEvent) => void): this;
|
|
280
|
-
on(event: "error", listener: (_:
|
|
280
|
+
on(event: "error", listener: (_: ErrorEvent) => void): this;
|
|
281
281
|
once: typeof BundlerController.on;
|
|
282
282
|
}
|
|
283
283
|
|
|
@@ -286,32 +286,32 @@ declare type BundleStartEvent = {
|
|
|
286
286
|
config: StartDevWorkerOptions;
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
-
declare interface
|
|
290
|
-
match (request:
|
|
291
|
-
matchAll (request?:
|
|
292
|
-
add (request:
|
|
293
|
-
addAll (requests:
|
|
294
|
-
put (request:
|
|
295
|
-
delete (request:
|
|
296
|
-
keys (request?:
|
|
289
|
+
declare interface Cache {
|
|
290
|
+
match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
|
|
291
|
+
matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
|
|
292
|
+
add (request: RequestInfo): Promise<undefined>,
|
|
293
|
+
addAll (requests: RequestInfo[]): Promise<undefined>,
|
|
294
|
+
put (request: RequestInfo, response: Response): Promise<undefined>,
|
|
295
|
+
delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
|
|
296
|
+
keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* No-op implementation of Cache
|
|
301
301
|
*/
|
|
302
|
-
declare class
|
|
303
|
-
delete(request: CacheRequest, options?:
|
|
304
|
-
match(request: CacheRequest, options?:
|
|
302
|
+
declare class Cache_2 {
|
|
303
|
+
delete(request: CacheRequest, options?: CacheQueryOptions_2): Promise<boolean>;
|
|
304
|
+
match(request: CacheRequest, options?: CacheQueryOptions_2): Promise<CacheResponse | undefined>;
|
|
305
305
|
put(request: CacheRequest, response: CacheResponse): Promise<void>;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
declare interface
|
|
308
|
+
declare interface CacheQueryOptions {
|
|
309
309
|
ignoreSearch?: boolean,
|
|
310
310
|
ignoreMethod?: boolean,
|
|
311
311
|
ignoreVary?: boolean
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
declare type
|
|
314
|
+
declare type CacheQueryOptions_2 = {
|
|
315
315
|
ignoreMethod?: boolean;
|
|
316
316
|
};
|
|
317
317
|
|
|
@@ -319,19 +319,19 @@ declare type CacheRequest = any;
|
|
|
319
319
|
|
|
320
320
|
declare type CacheResponse = any;
|
|
321
321
|
|
|
322
|
-
declare const
|
|
322
|
+
declare const caches: CacheStorage;
|
|
323
323
|
|
|
324
|
-
declare interface
|
|
325
|
-
match (request:
|
|
324
|
+
declare interface CacheStorage {
|
|
325
|
+
match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
|
|
326
326
|
has (cacheName: string): Promise<boolean>,
|
|
327
|
-
open (cacheName: string): Promise<
|
|
327
|
+
open (cacheName: string): Promise<Cache>,
|
|
328
328
|
delete (cacheName: string): Promise<boolean>,
|
|
329
329
|
keys (): Promise<string[]>
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
declare const
|
|
333
|
-
prototype:
|
|
334
|
-
new():
|
|
332
|
+
declare const CacheStorage: {
|
|
333
|
+
prototype: CacheStorage
|
|
334
|
+
new(): CacheStorage
|
|
335
335
|
};
|
|
336
336
|
|
|
337
337
|
/**
|
|
@@ -356,10 +356,10 @@ declare const CacheStorage_2: {
|
|
|
356
356
|
/**
|
|
357
357
|
* No-op implementation of CacheStorage
|
|
358
358
|
*/
|
|
359
|
-
declare class
|
|
359
|
+
declare class CacheStorage_2 {
|
|
360
360
|
constructor();
|
|
361
|
-
open(cacheName: string): Promise<
|
|
362
|
-
get default():
|
|
361
|
+
open(cacheName: string): Promise<Cache_2>;
|
|
362
|
+
get default(): Cache_2;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
/**
|
|
@@ -528,18 +528,18 @@ declare namespace Client {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
-
declare interface
|
|
531
|
+
declare interface CloseEvent extends Event_2 {
|
|
532
532
|
readonly code: number
|
|
533
533
|
readonly reason: string
|
|
534
534
|
readonly wasClean: boolean
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
declare const
|
|
538
|
-
prototype:
|
|
539
|
-
new (type: string, eventInitDict?:
|
|
537
|
+
declare const CloseEvent: {
|
|
538
|
+
prototype: CloseEvent
|
|
539
|
+
new (type: string, eventInitDict?: CloseEventInit): CloseEvent
|
|
540
540
|
};
|
|
541
541
|
|
|
542
|
-
declare interface
|
|
542
|
+
declare interface CloseEventInit extends EventInit {
|
|
543
543
|
code?: number
|
|
544
544
|
reason?: string
|
|
545
545
|
wasClean?: boolean
|
|
@@ -560,7 +560,7 @@ declare class ConfigController extends EventEmitter_2 {
|
|
|
560
560
|
teardown(): Promise<void>;
|
|
561
561
|
emitConfigUpdateEvent(data: ConfigUpdateEvent): void;
|
|
562
562
|
on(event: "configUpdate", listener: (_: ConfigUpdateEvent) => void): this;
|
|
563
|
-
on(event: "error", listener: (_:
|
|
563
|
+
on(event: "error", listener: (_: ErrorEvent) => void): this;
|
|
564
564
|
once: typeof ConfigController.on;
|
|
565
565
|
}
|
|
566
566
|
|
|
@@ -746,7 +746,7 @@ declare type DeferredPromise<T> = {
|
|
|
746
746
|
};
|
|
747
747
|
|
|
748
748
|
declare function deleteCookie (
|
|
749
|
-
headers:
|
|
749
|
+
headers: Headers,
|
|
750
750
|
name: string,
|
|
751
751
|
attributes?: { name?: string, domain?: string }
|
|
752
752
|
): void
|
|
@@ -974,20 +974,20 @@ declare namespace DiagnosticsChannel {
|
|
|
974
974
|
interface ClientSendHeadersMessage {
|
|
975
975
|
request: Request;
|
|
976
976
|
headers: string;
|
|
977
|
-
socket:
|
|
977
|
+
socket: Socket;
|
|
978
978
|
}
|
|
979
979
|
interface ClientBeforeConnectMessage {
|
|
980
980
|
connectParams: ConnectParams;
|
|
981
981
|
connector: Connector;
|
|
982
982
|
}
|
|
983
983
|
interface ClientConnectedMessage {
|
|
984
|
-
socket:
|
|
984
|
+
socket: Socket;
|
|
985
985
|
connectParams: ConnectParams;
|
|
986
986
|
connector: Connector;
|
|
987
987
|
}
|
|
988
988
|
interface ClientConnectErrorMessage {
|
|
989
989
|
error: Error;
|
|
990
|
-
socket:
|
|
990
|
+
socket: Socket;
|
|
991
991
|
connectParams: ConnectParams;
|
|
992
992
|
connector: Connector;
|
|
993
993
|
}
|
|
@@ -1080,7 +1080,7 @@ declare namespace Dispatcher {
|
|
|
1080
1080
|
path: string;
|
|
1081
1081
|
method: HttpMethod;
|
|
1082
1082
|
/** Default: `null` */
|
|
1083
|
-
body?: string | Buffer | Uint8Array | Readable | null |
|
|
1083
|
+
body?: string | Buffer | Uint8Array | Readable | null | FormData;
|
|
1084
1084
|
/** Default: `null` */
|
|
1085
1085
|
headers?: IncomingHttpHeaders | string[] | null;
|
|
1086
1086
|
/** Query string params to be embedded in the request URL. Default: `null` */
|
|
@@ -1231,7 +1231,7 @@ declare interface DispatchNamespaceOutbound {
|
|
|
1231
1231
|
parameters?: string[];
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
|
-
declare type
|
|
1234
|
+
declare type DOMException = typeof globalThis extends { DOMException: infer T }
|
|
1235
1235
|
? T
|
|
1236
1236
|
: any
|
|
1237
1237
|
|
|
@@ -1910,7 +1910,7 @@ declare interface EnvironmentNonInheritable {
|
|
|
1910
1910
|
tail_consumers?: TailConsumer[];
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
|
-
declare type
|
|
1913
|
+
declare type ErrorEvent = BaseErrorEvent<"ConfigController" | "BundlerController" | "LocalRuntimeController" | "RemoteRuntimeController" | "ProxyWorker" | "InspectorProxyWorker"> | BaseErrorEvent<"ProxyController", {
|
|
1914
1914
|
config?: StartDevWorkerOptions;
|
|
1915
1915
|
bundle?: EsbuildBundle;
|
|
1916
1916
|
}>;
|
|
@@ -2072,17 +2072,17 @@ declare type Event_2 = typeof globalThis extends { Event: infer T }
|
|
|
2072
2072
|
readonly type: string
|
|
2073
2073
|
}
|
|
2074
2074
|
|
|
2075
|
-
declare interface
|
|
2075
|
+
declare interface EventInit {
|
|
2076
2076
|
bubbles?: boolean
|
|
2077
2077
|
cancelable?: boolean
|
|
2078
2078
|
composed?: boolean
|
|
2079
2079
|
}
|
|
2080
2080
|
|
|
2081
|
-
declare interface
|
|
2081
|
+
declare interface EventListener {
|
|
2082
2082
|
(evt: Event_2): void
|
|
2083
2083
|
}
|
|
2084
2084
|
|
|
2085
|
-
declare interface
|
|
2085
|
+
declare interface EventListenerObject {
|
|
2086
2086
|
handleEvent (object: Event_2): void
|
|
2087
2087
|
}
|
|
2088
2088
|
|
|
@@ -2090,7 +2090,7 @@ declare interface EventListenerOptions {
|
|
|
2090
2090
|
capture?: boolean
|
|
2091
2091
|
}
|
|
2092
2092
|
|
|
2093
|
-
declare type
|
|
2093
|
+
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject
|
|
2094
2094
|
|
|
2095
2095
|
declare type _EventMethods = keyof ProtocolMapping.Events;
|
|
2096
2096
|
|
|
@@ -2110,17 +2110,17 @@ declare type EventTarget_2 = typeof globalThis extends { EventTarget: infer T }
|
|
|
2110
2110
|
): void
|
|
2111
2111
|
}
|
|
2112
2112
|
|
|
2113
|
-
declare class
|
|
2113
|
+
declare class ExecutionContext {
|
|
2114
2114
|
waitUntil(promise: Promise<any>): void;
|
|
2115
2115
|
passThroughOnException(): void;
|
|
2116
2116
|
}
|
|
2117
2117
|
|
|
2118
|
-
declare function
|
|
2119
|
-
input:
|
|
2120
|
-
init?:
|
|
2121
|
-
): Promise<
|
|
2118
|
+
declare function fetch (
|
|
2119
|
+
input: RequestInfo,
|
|
2120
|
+
init?: RequestInit
|
|
2121
|
+
): Promise<Response>
|
|
2122
2122
|
|
|
2123
|
-
declare class
|
|
2123
|
+
declare class File extends Blob_2 {
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Creates a new File instance.
|
|
2126
2126
|
*
|
|
@@ -2143,7 +2143,7 @@ declare class File_2 extends Blob_2 {
|
|
|
2143
2143
|
readonly [Symbol.toStringTag]: string
|
|
2144
2144
|
}
|
|
2145
2145
|
|
|
2146
|
-
declare type
|
|
2146
|
+
declare type File_2<Contents = string> = {
|
|
2147
2147
|
path: string;
|
|
2148
2148
|
} | {
|
|
2149
2149
|
contents: Contents;
|
|
@@ -2181,7 +2181,7 @@ declare class FileReader {
|
|
|
2181
2181
|
|
|
2182
2182
|
readonly result: string | ArrayBuffer | null
|
|
2183
2183
|
|
|
2184
|
-
readonly error:
|
|
2184
|
+
readonly error: DOMException | null
|
|
2185
2185
|
|
|
2186
2186
|
onloadstart: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
2187
2187
|
onprogress: null | ((this: FileReader, event: ProgressEvent) => void)
|
|
@@ -2194,7 +2194,7 @@ declare class FileReader {
|
|
|
2194
2194
|
/**
|
|
2195
2195
|
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
|
|
2196
2196
|
*/
|
|
2197
|
-
declare class
|
|
2197
|
+
declare class FormData {
|
|
2198
2198
|
/**
|
|
2199
2199
|
* Appends a new value onto an existing key inside a FormData object,
|
|
2200
2200
|
* or adds the key if it does not already exist.
|
|
@@ -2259,7 +2259,7 @@ declare class FormData_2 {
|
|
|
2259
2259
|
* Executes given callback function for each field of the FormData instance
|
|
2260
2260
|
*/
|
|
2261
2261
|
forEach: (
|
|
2262
|
-
callbackfn: (value: FormDataEntryValue, key: string, iterable:
|
|
2262
|
+
callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void,
|
|
2263
2263
|
thisArg?: unknown
|
|
2264
2264
|
) => void
|
|
2265
2265
|
|
|
@@ -2292,7 +2292,7 @@ declare class FormData_2 {
|
|
|
2292
2292
|
/**
|
|
2293
2293
|
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
|
|
2294
2294
|
*/
|
|
2295
|
-
declare type FormDataEntryValue = string |
|
|
2295
|
+
declare type FormDataEntryValue = string | File
|
|
2296
2296
|
|
|
2297
2297
|
/**
|
|
2298
2298
|
* By reading from a `wrangler.toml` file this function generates proxy binding objects that can be
|
|
@@ -2303,12 +2303,12 @@ declare type FormDataEntryValue = string | File_2
|
|
|
2303
2303
|
* @param options The various options that can tweak this function's behavior
|
|
2304
2304
|
* @returns An Object containing the generated proxies alongside other related utilities
|
|
2305
2305
|
*/
|
|
2306
|
-
export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> =
|
|
2306
|
+
export declare function getBindingsProxy<Bindings = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties>(options?: GetBindingsProxyOptions): Promise<BindingsProxy<Bindings, CfProperties>>;
|
|
2307
2307
|
|
|
2308
2308
|
/** Options for the `getBindingsProxy` utility */
|
|
2309
2309
|
export declare type GetBindingsProxyOptions = GetPlatformProxyOptions;
|
|
2310
2310
|
|
|
2311
|
-
declare function getCookies (headers:
|
|
2311
|
+
declare function getCookies (headers: Headers): Record<string, string>
|
|
2312
2312
|
|
|
2313
2313
|
declare function getGlobalDispatcher(): Dispatcher;
|
|
2314
2314
|
|
|
@@ -2322,7 +2322,7 @@ declare function getGlobalOrigin(): URL | undefined;
|
|
|
2322
2322
|
* @param options The various options that can tweak this function's behavior
|
|
2323
2323
|
* @returns An Object containing the generated proxies alongside other related utilities
|
|
2324
2324
|
*/
|
|
2325
|
-
export declare function getPlatformProxy<Env = Record<string, unknown>, CfProperties extends Record<string, unknown> =
|
|
2325
|
+
export declare function getPlatformProxy<Env = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties>(options?: GetPlatformProxyOptions): Promise<PlatformProxy<Env, CfProperties>>;
|
|
2326
2326
|
|
|
2327
2327
|
/**
|
|
2328
2328
|
* Options for the `getPlatformProxy` utility
|
|
@@ -2349,10 +2349,10 @@ export declare type GetPlatformProxyOptions = {
|
|
|
2349
2349
|
};
|
|
2350
2350
|
};
|
|
2351
2351
|
|
|
2352
|
-
declare function getSetCookies (headers:
|
|
2352
|
+
declare function getSetCookies (headers: Headers): Cookie[]
|
|
2353
2353
|
|
|
2354
|
-
declare class
|
|
2355
|
-
constructor (init?:
|
|
2354
|
+
declare class Headers implements SpecIterable<[string, string]> {
|
|
2355
|
+
constructor (init?: HeadersInit)
|
|
2356
2356
|
readonly append: (name: string, value: string) => void
|
|
2357
2357
|
readonly delete: (name: string) => void
|
|
2358
2358
|
readonly get: (name: string) => string | null
|
|
@@ -2360,7 +2360,7 @@ declare class Headers_2 implements SpecIterable<[string, string]> {
|
|
|
2360
2360
|
readonly set: (name: string, value: string) => void
|
|
2361
2361
|
readonly getSetCookie: () => string[]
|
|
2362
2362
|
readonly forEach: (
|
|
2363
|
-
callbackfn: (value: string, key: string, iterable:
|
|
2363
|
+
callbackfn: (value: string, key: string, iterable: Headers) => void,
|
|
2364
2364
|
thisArg?: unknown
|
|
2365
2365
|
) => void
|
|
2366
2366
|
|
|
@@ -2370,7 +2370,7 @@ declare class Headers_2 implements SpecIterable<[string, string]> {
|
|
|
2370
2370
|
readonly [Symbol.iterator]: () => SpecIterator<[string, string]>
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
|
-
declare type
|
|
2373
|
+
declare type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers
|
|
2374
2374
|
|
|
2375
2375
|
declare type Hook<T, Args extends unknown[] = unknown[]> = T | Promise<T> | ((...args: Args) => T | Promise<T>);
|
|
2376
2376
|
|
|
@@ -2418,7 +2418,7 @@ declare type LogLevel = "debug" | "info" | "log" | "warn" | "error" | "none";
|
|
|
2418
2418
|
|
|
2419
2419
|
declare type MaybePromise<T> = T | Promise<T>;
|
|
2420
2420
|
|
|
2421
|
-
declare interface
|
|
2421
|
+
declare interface MessageEvent<T = any> extends Event_2 {
|
|
2422
2422
|
readonly data: T
|
|
2423
2423
|
readonly lastEventId: string
|
|
2424
2424
|
readonly origin: string
|
|
@@ -2436,12 +2436,12 @@ declare interface MessageEvent_2<T = any> extends Event_2 {
|
|
|
2436
2436
|
): void;
|
|
2437
2437
|
}
|
|
2438
2438
|
|
|
2439
|
-
declare const
|
|
2440
|
-
prototype:
|
|
2441
|
-
new<T>(type: string, eventInitDict?:
|
|
2439
|
+
declare const MessageEvent: {
|
|
2440
|
+
prototype: MessageEvent
|
|
2441
|
+
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
|
|
2442
2442
|
};
|
|
2443
2443
|
|
|
2444
|
-
declare interface
|
|
2444
|
+
declare interface MessageEventInit<T = any> extends EventInit {
|
|
2445
2445
|
data?: T
|
|
2446
2446
|
lastEventId?: string
|
|
2447
2447
|
origin?: string
|
|
@@ -2574,8 +2574,8 @@ declare namespace MockInterceptor {
|
|
|
2574
2574
|
path: string;
|
|
2575
2575
|
origin: string;
|
|
2576
2576
|
method: string;
|
|
2577
|
-
body?:
|
|
2578
|
-
headers:
|
|
2577
|
+
body?: BodyInit | Dispatcher.DispatchOptions['body'];
|
|
2578
|
+
headers: Headers | Record<string, string>;
|
|
2579
2579
|
maxRedirections: number;
|
|
2580
2580
|
}
|
|
2581
2581
|
|
|
@@ -2624,7 +2624,7 @@ declare interface ModuleRule {
|
|
|
2624
2624
|
fallthrough?: boolean;
|
|
2625
2625
|
}
|
|
2626
2626
|
|
|
2627
|
-
declare interface MultiCacheQueryOptions extends
|
|
2627
|
+
declare interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
2628
2628
|
cacheName?: string
|
|
2629
2629
|
}
|
|
2630
2630
|
|
|
@@ -2729,7 +2729,7 @@ handler: Dispatcher.PipelineHandler
|
|
|
2729
2729
|
/**
|
|
2730
2730
|
* Result of the `getPlatformProxy` utility
|
|
2731
2731
|
*/
|
|
2732
|
-
export declare type PlatformProxy<Env = Record<string, unknown>, CfProperties extends Record<string, unknown> =
|
|
2732
|
+
export declare type PlatformProxy<Env = Record<string, unknown>, CfProperties extends Record<string, unknown> = IncomingRequestCfProperties> = {
|
|
2733
2733
|
/**
|
|
2734
2734
|
* Environment object containing the various Cloudflare bindings
|
|
2735
2735
|
*/
|
|
@@ -2741,11 +2741,11 @@ export declare type PlatformProxy<Env = Record<string, unknown>, CfProperties ex
|
|
|
2741
2741
|
/**
|
|
2742
2742
|
* Mock of the context object that Workers received in their request handler, all the object's methods are no-op
|
|
2743
2743
|
*/
|
|
2744
|
-
ctx:
|
|
2744
|
+
ctx: ExecutionContext;
|
|
2745
2745
|
/**
|
|
2746
2746
|
* Caches object emulating the Workers Cache runtime API
|
|
2747
2747
|
*/
|
|
2748
|
-
caches:
|
|
2748
|
+
caches: CacheStorage_2;
|
|
2749
2749
|
/**
|
|
2750
2750
|
* Function used to dispose of the child process providing the bindings implementation
|
|
2751
2751
|
*/
|
|
@@ -2805,7 +2805,7 @@ declare class ProgressEvent {
|
|
|
2805
2805
|
readonly total: number
|
|
2806
2806
|
}
|
|
2807
2807
|
|
|
2808
|
-
declare interface ProgressEventInit extends
|
|
2808
|
+
declare interface ProgressEventInit extends EventInit {
|
|
2809
2809
|
lengthComputable?: boolean
|
|
2810
2810
|
loaded?: number
|
|
2811
2811
|
total?: number
|
|
@@ -23079,12 +23079,12 @@ declare class ProxyController extends EventEmitter_2 {
|
|
|
23079
23079
|
ready: DeferredPromise<ReadyEvent>;
|
|
23080
23080
|
proxyWorker?: Miniflare;
|
|
23081
23081
|
proxyWorkerOptions?: MiniflareOptions;
|
|
23082
|
-
inspectorProxyWorkerWebSocket?: DeferredPromise<
|
|
23082
|
+
inspectorProxyWorkerWebSocket?: DeferredPromise<WebSocket_2>;
|
|
23083
23083
|
protected latestConfig?: StartDevWorkerOptions;
|
|
23084
23084
|
protected latestBundle?: EsbuildBundle;
|
|
23085
23085
|
secret: `${string}-${string}-${string}-${string}-${string}`;
|
|
23086
23086
|
protected createProxyWorker(): void;
|
|
23087
|
-
reconnectInspectorProxyWorker(): Promise<
|
|
23087
|
+
reconnectInspectorProxyWorker(): Promise<WebSocket_2 | undefined>;
|
|
23088
23088
|
runtimeMessageMutex: Mutex;
|
|
23089
23089
|
sendMessageToProxyWorker(message: ProxyWorkerIncomingRequestBody, retries?: number): Promise<void>;
|
|
23090
23090
|
sendMessageToInspectorProxyWorker(message: InspectorProxyWorkerIncomingWebSocketMessage, retries?: number): Promise<void>;
|
|
@@ -23094,7 +23094,7 @@ declare class ProxyController extends EventEmitter_2 {
|
|
|
23094
23094
|
onReloadComplete(data: ReloadCompleteEvent): void;
|
|
23095
23095
|
onProxyWorkerMessage(message: ProxyWorkerOutgoingRequestBody): void;
|
|
23096
23096
|
onInspectorProxyWorkerMessage(message: InspectorProxyWorkerOutgoingWebsocketMessage): void;
|
|
23097
|
-
onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<
|
|
23097
|
+
onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response_2>;
|
|
23098
23098
|
_torndown: boolean;
|
|
23099
23099
|
teardown(): Promise<void>;
|
|
23100
23100
|
emitReadyEvent(proxyWorker: Miniflare): void;
|
|
@@ -23102,7 +23102,7 @@ declare class ProxyController extends EventEmitter_2 {
|
|
|
23102
23102
|
emitErrorEvent(reason: string, cause: Error | SerializedError): void;
|
|
23103
23103
|
on(event: "ready", listener: (_: ReadyEvent) => void): this;
|
|
23104
23104
|
on(event: "previewTokenExpired", listener: (_: PreviewTokenExpiredEvent) => void): this;
|
|
23105
|
-
on(event: "error", listener: (_:
|
|
23105
|
+
on(event: "error", listener: (_: ErrorEvent) => void): this;
|
|
23106
23106
|
once: typeof ProxyController.on;
|
|
23107
23107
|
}
|
|
23108
23108
|
|
|
@@ -23182,19 +23182,13 @@ declare type ReloadStartEvent = {
|
|
|
23182
23182
|
bundle: EsbuildBundle;
|
|
23183
23183
|
};
|
|
23184
23184
|
|
|
23185
|
-
|
|
23186
|
-
|
|
23187
|
-
url: string | URL_2 | UrlObject,
|
|
23188
|
-
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
|
|
23189
|
-
): Promise<Dispatcher.ResponseData>;
|
|
23190
|
-
|
|
23191
|
-
declare class Request_2 implements BodyMixin {
|
|
23192
|
-
constructor (input: RequestInfo_2, init?: RequestInit_2)
|
|
23185
|
+
declare class Request implements BodyMixin {
|
|
23186
|
+
constructor (input: RequestInfo, init?: RequestInit)
|
|
23193
23187
|
|
|
23194
23188
|
readonly cache: RequestCache
|
|
23195
23189
|
readonly credentials: RequestCredentials
|
|
23196
23190
|
readonly destination: RequestDestination
|
|
23197
|
-
readonly headers:
|
|
23191
|
+
readonly headers: Headers
|
|
23198
23192
|
readonly integrity: string
|
|
23199
23193
|
readonly method: string
|
|
23200
23194
|
readonly mode: RequestMode
|
|
@@ -23206,18 +23200,24 @@ declare class Request_2 implements BodyMixin {
|
|
|
23206
23200
|
readonly signal: AbortSignal
|
|
23207
23201
|
readonly duplex: RequestDuplex
|
|
23208
23202
|
|
|
23209
|
-
readonly body:
|
|
23203
|
+
readonly body: ReadableStream | null
|
|
23210
23204
|
readonly bodyUsed: boolean
|
|
23211
23205
|
|
|
23212
23206
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
23213
23207
|
readonly blob: () => Promise<Blob_2>
|
|
23214
|
-
readonly formData: () => Promise<
|
|
23208
|
+
readonly formData: () => Promise<FormData>
|
|
23215
23209
|
readonly json: () => Promise<unknown>
|
|
23216
23210
|
readonly text: () => Promise<string>
|
|
23217
23211
|
|
|
23218
|
-
readonly clone: () =>
|
|
23212
|
+
readonly clone: () => Request
|
|
23219
23213
|
}
|
|
23220
23214
|
|
|
23215
|
+
/** Performs an HTTP request. */
|
|
23216
|
+
declare function request(
|
|
23217
|
+
url: string | URL_2 | UrlObject,
|
|
23218
|
+
options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
|
|
23219
|
+
): Promise<Dispatcher.ResponseData>;
|
|
23220
|
+
|
|
23221
23221
|
declare type RequestCache =
|
|
23222
23222
|
| 'default'
|
|
23223
23223
|
| 'force-cache'
|
|
@@ -23250,13 +23250,13 @@ declare type RequestDestination =
|
|
|
23250
23250
|
|
|
23251
23251
|
declare type RequestDuplex = 'half'
|
|
23252
23252
|
|
|
23253
|
-
declare type
|
|
23253
|
+
declare type RequestInfo = string | URL_2 | Request
|
|
23254
23254
|
|
|
23255
|
-
declare interface
|
|
23255
|
+
declare interface RequestInit {
|
|
23256
23256
|
method?: string
|
|
23257
23257
|
keepalive?: boolean
|
|
23258
|
-
headers?:
|
|
23259
|
-
body?:
|
|
23258
|
+
headers?: HeadersInit
|
|
23259
|
+
body?: BodyInit
|
|
23260
23260
|
redirect?: RequestRedirect
|
|
23261
23261
|
integrity?: string
|
|
23262
23262
|
signal?: AbortSignal | null
|
|
@@ -23273,10 +23273,10 @@ declare type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin'
|
|
|
23273
23273
|
|
|
23274
23274
|
declare type RequestRedirect = 'error' | 'follow' | 'manual'
|
|
23275
23275
|
|
|
23276
|
-
declare class
|
|
23277
|
-
constructor (body?:
|
|
23276
|
+
declare class Response implements BodyMixin {
|
|
23277
|
+
constructor (body?: BodyInit, init?: ResponseInit)
|
|
23278
23278
|
|
|
23279
|
-
readonly headers:
|
|
23279
|
+
readonly headers: Headers
|
|
23280
23280
|
readonly ok: boolean
|
|
23281
23281
|
readonly status: number
|
|
23282
23282
|
readonly statusText: string
|
|
@@ -23284,26 +23284,26 @@ declare class Response_2 implements BodyMixin {
|
|
|
23284
23284
|
readonly url: string
|
|
23285
23285
|
readonly redirected: boolean
|
|
23286
23286
|
|
|
23287
|
-
readonly body:
|
|
23287
|
+
readonly body: ReadableStream | null
|
|
23288
23288
|
readonly bodyUsed: boolean
|
|
23289
23289
|
|
|
23290
23290
|
readonly arrayBuffer: () => Promise<ArrayBuffer>
|
|
23291
23291
|
readonly blob: () => Promise<Blob_2>
|
|
23292
|
-
readonly formData: () => Promise<
|
|
23292
|
+
readonly formData: () => Promise<FormData>
|
|
23293
23293
|
readonly json: () => Promise<unknown>
|
|
23294
23294
|
readonly text: () => Promise<string>
|
|
23295
23295
|
|
|
23296
|
-
readonly clone: () =>
|
|
23296
|
+
readonly clone: () => Response
|
|
23297
23297
|
|
|
23298
|
-
static error ():
|
|
23299
|
-
static json(data: any, init?:
|
|
23300
|
-
static redirect (url: string | URL_2, status: ResponseRedirectStatus):
|
|
23298
|
+
static error (): Response
|
|
23299
|
+
static json(data: any, init?: ResponseInit): Response
|
|
23300
|
+
static redirect (url: string | URL_2, status: ResponseRedirectStatus): Response
|
|
23301
23301
|
}
|
|
23302
23302
|
|
|
23303
|
-
declare interface
|
|
23303
|
+
declare interface ResponseInit {
|
|
23304
23304
|
readonly status?: number
|
|
23305
23305
|
readonly statusText?: string
|
|
23306
|
-
readonly headers?:
|
|
23306
|
+
readonly headers?: HeadersInit
|
|
23307
23307
|
}
|
|
23308
23308
|
|
|
23309
23309
|
declare type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308
|
|
@@ -23449,7 +23449,7 @@ declare abstract class RuntimeController extends Controller {
|
|
|
23449
23449
|
abstract emitReloadCompletetEvent(data: ReloadCompleteEvent): void;
|
|
23450
23450
|
on(event: "reloadStart", listener: (_: ReloadStartEvent) => void): this;
|
|
23451
23451
|
on(event: "reloadComplete", listener: (_: ReloadCompleteEvent) => void): this;
|
|
23452
|
-
on(event: "error", listener: (_:
|
|
23452
|
+
on(event: "error", listener: (_: ErrorEvent) => void): this;
|
|
23453
23453
|
once: typeof RuntimeController.on;
|
|
23454
23454
|
}
|
|
23455
23455
|
|
|
@@ -23471,9 +23471,9 @@ declare interface ServiceDesignator {
|
|
|
23471
23471
|
env?: string;
|
|
23472
23472
|
}
|
|
23473
23473
|
|
|
23474
|
-
declare type ServiceFetch = (request:
|
|
23474
|
+
declare type ServiceFetch = (request: Request_2) => Promise<Response_2>;
|
|
23475
23475
|
|
|
23476
|
-
declare function setCookie (headers:
|
|
23476
|
+
declare function setCookie (headers: Headers, cookie: Cookie): void
|
|
23477
23477
|
|
|
23478
23478
|
declare function setGlobalDispatcher<DispatcherImplementation extends Dispatcher>(dispatcher: DispatcherImplementation): void;
|
|
23479
23479
|
|
|
@@ -23514,9 +23514,9 @@ declare interface StartDevWorkerOptions {
|
|
|
23514
23514
|
* This is the `main` property of a wrangler.toml.
|
|
23515
23515
|
* You can specify a file path or provide the contents directly.
|
|
23516
23516
|
*/
|
|
23517
|
-
script:
|
|
23517
|
+
script: File_2<string>;
|
|
23518
23518
|
/** The configuration of the worker. */
|
|
23519
|
-
config?:
|
|
23519
|
+
config?: File_2<string | RawConfig> & {
|
|
23520
23520
|
env?: string;
|
|
23521
23521
|
};
|
|
23522
23522
|
/** The compatibility date for the workerd runtime. */
|
|
@@ -23662,14 +23662,14 @@ declare namespace Undici {
|
|
|
23662
23662
|
var MockPool: MockPool;
|
|
23663
23663
|
var MockAgent: MockAgent;
|
|
23664
23664
|
var mockErrors: MockErrors;
|
|
23665
|
-
var fetch:
|
|
23666
|
-
var Headers:
|
|
23667
|
-
var Response:
|
|
23668
|
-
var Request:
|
|
23669
|
-
var FormData:
|
|
23670
|
-
var File:
|
|
23665
|
+
var fetch: fetch;
|
|
23666
|
+
var Headers: Headers;
|
|
23667
|
+
var Response: Response;
|
|
23668
|
+
var Request: Request;
|
|
23669
|
+
var FormData: FormData;
|
|
23670
|
+
var File: File;
|
|
23671
23671
|
var FileReader: FileReader;
|
|
23672
|
-
var caches:
|
|
23672
|
+
var caches: caches;
|
|
23673
23673
|
}
|
|
23674
23674
|
|
|
23675
23675
|
declare namespace undici {
|
|
@@ -23705,53 +23705,53 @@ declare namespace undici {
|
|
|
23705
23705
|
getSetCookies,
|
|
23706
23706
|
setCookie,
|
|
23707
23707
|
Cookie,
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23708
|
+
fetch,
|
|
23709
|
+
RequestInfo,
|
|
23710
|
+
BodyInit,
|
|
23711
23711
|
BodyMixin,
|
|
23712
23712
|
SpecIterator,
|
|
23713
23713
|
SpecIterableIterator,
|
|
23714
23714
|
SpecIterable,
|
|
23715
|
-
|
|
23716
|
-
|
|
23715
|
+
HeadersInit,
|
|
23716
|
+
Headers,
|
|
23717
23717
|
RequestCache,
|
|
23718
23718
|
RequestCredentials,
|
|
23719
23719
|
RequestDestination,
|
|
23720
|
-
|
|
23720
|
+
RequestInit,
|
|
23721
23721
|
ReferrerPolicy,
|
|
23722
23722
|
RequestMode,
|
|
23723
23723
|
RequestRedirect,
|
|
23724
23724
|
RequestDuplex,
|
|
23725
|
-
|
|
23726
|
-
|
|
23725
|
+
Request,
|
|
23726
|
+
ResponseInit,
|
|
23727
23727
|
ResponseType,
|
|
23728
23728
|
ResponseRedirectStatus,
|
|
23729
|
-
|
|
23729
|
+
Response,
|
|
23730
23730
|
BlobPropertyBag,
|
|
23731
23731
|
FilePropertyBag,
|
|
23732
|
-
|
|
23732
|
+
File,
|
|
23733
23733
|
FileReader,
|
|
23734
23734
|
ProgressEventInit,
|
|
23735
23735
|
ProgressEvent,
|
|
23736
23736
|
FormDataEntryValue,
|
|
23737
|
-
|
|
23737
|
+
FormData,
|
|
23738
23738
|
DiagnosticsChannel,
|
|
23739
23739
|
BinaryType,
|
|
23740
|
-
|
|
23741
|
-
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23740
|
+
WebSocketEventMap,
|
|
23741
|
+
WebSocket,
|
|
23742
|
+
CloseEventInit,
|
|
23743
|
+
CloseEvent,
|
|
23744
|
+
MessageEventInit,
|
|
23745
|
+
MessageEvent,
|
|
23746
23746
|
WebSocketInit,
|
|
23747
23747
|
parseMIMEType,
|
|
23748
23748
|
serializeAMimeType,
|
|
23749
23749
|
MIMEType,
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23750
|
+
CacheStorage,
|
|
23751
|
+
Cache,
|
|
23752
|
+
CacheQueryOptions,
|
|
23753
23753
|
MultiCacheQueryOptions,
|
|
23754
|
-
|
|
23754
|
+
caches
|
|
23755
23755
|
}
|
|
23756
23756
|
}
|
|
23757
23757
|
|
|
@@ -23776,7 +23776,7 @@ export declare class unstable_DevEnv extends EventEmitter_2 {
|
|
|
23776
23776
|
proxy?: ProxyController | undefined;
|
|
23777
23777
|
});
|
|
23778
23778
|
teardown(): Promise<void>;
|
|
23779
|
-
emitErrorEvent(ev:
|
|
23779
|
+
emitErrorEvent(ev: ErrorEvent): void;
|
|
23780
23780
|
}
|
|
23781
23781
|
|
|
23782
23782
|
export declare function unstable_getMiniflareWorkerOptions(configPath: string): {
|
|
@@ -23875,7 +23875,7 @@ export declare interface UnstableDevWorker {
|
|
|
23875
23875
|
address: string;
|
|
23876
23876
|
proxyData: ProxyData;
|
|
23877
23877
|
stop: () => Promise<void>;
|
|
23878
|
-
fetch: (input?:
|
|
23878
|
+
fetch: (input?: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
23879
23879
|
waitUntilExit: () => Promise<void>;
|
|
23880
23880
|
}
|
|
23881
23881
|
|
|
@@ -23894,16 +23894,16 @@ declare interface UserLimits {
|
|
|
23894
23894
|
cpu_ms: number;
|
|
23895
23895
|
}
|
|
23896
23896
|
|
|
23897
|
-
declare interface
|
|
23897
|
+
declare interface WebSocket extends EventTarget_2 {
|
|
23898
23898
|
binaryType: BinaryType
|
|
23899
23899
|
|
|
23900
23900
|
readonly bufferedAmount: number
|
|
23901
23901
|
readonly extensions: string
|
|
23902
23902
|
|
|
23903
|
-
onclose: ((this:
|
|
23904
|
-
onerror: ((this:
|
|
23905
|
-
onmessage: ((this:
|
|
23906
|
-
onopen: ((this:
|
|
23903
|
+
onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null
|
|
23904
|
+
onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null
|
|
23905
|
+
onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null
|
|
23906
|
+
onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null
|
|
23907
23907
|
|
|
23908
23908
|
readonly protocol: string
|
|
23909
23909
|
readonly readyState: number
|
|
@@ -23917,48 +23917,48 @@ declare interface WebSocket_2 extends EventTarget_2 {
|
|
|
23917
23917
|
readonly CONNECTING: number
|
|
23918
23918
|
readonly OPEN: number
|
|
23919
23919
|
|
|
23920
|
-
addEventListener<K extends keyof
|
|
23920
|
+
addEventListener<K extends keyof WebSocketEventMap>(
|
|
23921
23921
|
type: K,
|
|
23922
|
-
listener: (this:
|
|
23922
|
+
listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
|
|
23923
23923
|
options?: boolean | AddEventListenerOptions
|
|
23924
23924
|
): void
|
|
23925
23925
|
addEventListener(
|
|
23926
23926
|
type: string,
|
|
23927
|
-
listener:
|
|
23927
|
+
listener: EventListenerOrEventListenerObject,
|
|
23928
23928
|
options?: boolean | AddEventListenerOptions
|
|
23929
23929
|
): void
|
|
23930
|
-
removeEventListener<K extends keyof
|
|
23930
|
+
removeEventListener<K extends keyof WebSocketEventMap>(
|
|
23931
23931
|
type: K,
|
|
23932
|
-
listener: (this:
|
|
23932
|
+
listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
|
|
23933
23933
|
options?: boolean | EventListenerOptions
|
|
23934
23934
|
): void
|
|
23935
23935
|
removeEventListener(
|
|
23936
23936
|
type: string,
|
|
23937
|
-
listener:
|
|
23937
|
+
listener: EventListenerOrEventListenerObject,
|
|
23938
23938
|
options?: boolean | EventListenerOptions
|
|
23939
23939
|
): void
|
|
23940
23940
|
}
|
|
23941
23941
|
|
|
23942
|
-
declare const
|
|
23943
|
-
prototype:
|
|
23944
|
-
new (url: string | URL, protocols?: string | string[] | WebSocketInit):
|
|
23942
|
+
declare const WebSocket: {
|
|
23943
|
+
prototype: WebSocket
|
|
23944
|
+
new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket
|
|
23945
23945
|
readonly CLOSED: number
|
|
23946
23946
|
readonly CLOSING: number
|
|
23947
23947
|
readonly CONNECTING: number
|
|
23948
23948
|
readonly OPEN: number
|
|
23949
23949
|
};
|
|
23950
23950
|
|
|
23951
|
-
declare interface
|
|
23952
|
-
close:
|
|
23951
|
+
declare interface WebSocketEventMap {
|
|
23952
|
+
close: CloseEvent
|
|
23953
23953
|
error: Event_2
|
|
23954
|
-
message:
|
|
23954
|
+
message: MessageEvent
|
|
23955
23955
|
open: Event_2
|
|
23956
23956
|
}
|
|
23957
23957
|
|
|
23958
23958
|
declare interface WebSocketInit {
|
|
23959
23959
|
protocols?: string | string[],
|
|
23960
23960
|
dispatcher?: Dispatcher,
|
|
23961
|
-
headers?:
|
|
23961
|
+
headers?: HeadersInit
|
|
23962
23962
|
}
|
|
23963
23963
|
|
|
23964
23964
|
declare type WorkerEntrypointsDefinition = Record<"default" | string, {
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -118533,7 +118533,7 @@ init_import_meta_url();
|
|
|
118533
118533
|
init_import_meta_url();
|
|
118534
118534
|
|
|
118535
118535
|
// package.json
|
|
118536
|
-
var version = "3.
|
|
118536
|
+
var version = "3.47.1";
|
|
118537
118537
|
var package_default = {
|
|
118538
118538
|
name: "wrangler",
|
|
118539
118539
|
version,
|
|
@@ -118659,7 +118659,7 @@ var package_default = {
|
|
|
118659
118659
|
"@cloudflare/pages-shared": "workspace:^",
|
|
118660
118660
|
"@cloudflare/types": "^6.18.4",
|
|
118661
118661
|
"@cloudflare/workers-tsconfig": "workspace:*",
|
|
118662
|
-
"@cloudflare/workers-types": "^4.
|
|
118662
|
+
"@cloudflare/workers-types": "^4.20240404.0",
|
|
118663
118663
|
"@cspotcode/source-map-support": "0.8.1",
|
|
118664
118664
|
"@iarna/toml": "^3.0.0",
|
|
118665
118665
|
"@microsoft/api-extractor": "^7.28.3",
|
|
@@ -118749,7 +118749,7 @@ var package_default = {
|
|
|
118749
118749
|
fsevents: "~2.3.2"
|
|
118750
118750
|
},
|
|
118751
118751
|
peerDependencies: {
|
|
118752
|
-
"@cloudflare/workers-types": "^4.
|
|
118752
|
+
"@cloudflare/workers-types": "^4.20240404.0"
|
|
118753
118753
|
},
|
|
118754
118754
|
peerDependenciesMeta: {
|
|
118755
118755
|
"@cloudflare/workers-types": {
|
|
@@ -151460,6 +151460,7 @@ __name(getBindingsFromArgs, "getBindingsFromArgs");
|
|
|
151460
151460
|
|
|
151461
151461
|
// src/pages/download-config.ts
|
|
151462
151462
|
init_import_meta_url();
|
|
151463
|
+
var import_fs8 = require("fs");
|
|
151463
151464
|
var import_promises18 = require("node:fs/promises");
|
|
151464
151465
|
var import_toml4 = __toESM(require_toml());
|
|
151465
151466
|
var import_chalk12 = __toESM(require_chalk());
|
|
@@ -151580,10 +151581,13 @@ function Options15(yargs) {
|
|
|
151580
151581
|
return yargs.positional("projectName", {
|
|
151581
151582
|
type: "string",
|
|
151582
151583
|
description: "The Pages project to download"
|
|
151584
|
+
}).option("force", {
|
|
151585
|
+
describe: "Overwrite an existing `wrangler.toml` file without prompting",
|
|
151586
|
+
type: "boolean"
|
|
151583
151587
|
});
|
|
151584
151588
|
}
|
|
151585
151589
|
__name(Options15, "Options");
|
|
151586
|
-
var Handler15 = /* @__PURE__ */ __name(async ({ projectName }) => {
|
|
151590
|
+
var Handler15 = /* @__PURE__ */ __name(async ({ projectName, force }) => {
|
|
151587
151591
|
void sendMetricsEvent("download pages config");
|
|
151588
151592
|
await printWranglerBanner();
|
|
151589
151593
|
const projectConfig = getConfigCache(
|
|
@@ -151595,6 +151599,15 @@ var Handler15 = /* @__PURE__ */ __name(async ({ projectName }) => {
|
|
|
151595
151599
|
throw new FatalError("Must specify a project name.", 1);
|
|
151596
151600
|
}
|
|
151597
151601
|
const config = await downloadProject(accountId, projectName);
|
|
151602
|
+
if (!force && (0, import_fs8.existsSync)("wrangler.toml")) {
|
|
151603
|
+
const overwrite = await confirm(
|
|
151604
|
+
"Your existing `wrangler.toml` file will be overwritten. Continue?",
|
|
151605
|
+
{ fallbackValue: false }
|
|
151606
|
+
);
|
|
151607
|
+
if (!overwrite) {
|
|
151608
|
+
throw new FatalError("Not overwriting existing `wrangler.toml` file");
|
|
151609
|
+
}
|
|
151610
|
+
}
|
|
151598
151611
|
await writeWranglerToml(config);
|
|
151599
151612
|
logger.info(
|
|
151600
151613
|
import_chalk12.default.green(
|
|
@@ -162018,7 +162031,7 @@ OnUnhandledRejection.__initStatic();
|
|
|
162018
162031
|
|
|
162019
162032
|
// ../../node_modules/.pnpm/@sentry+node@7.87.0_supports-color@9.2.2/node_modules/@sentry/node/esm/integrations/modules.js
|
|
162020
162033
|
init_import_meta_url();
|
|
162021
|
-
var
|
|
162034
|
+
var import_fs9 = require("fs");
|
|
162022
162035
|
var import_path14 = require("path");
|
|
162023
162036
|
var moduleCache;
|
|
162024
162037
|
function getPaths() {
|
|
@@ -162047,11 +162060,11 @@ function collectModules() {
|
|
|
162047
162060
|
}
|
|
162048
162061
|
const pkgfile = (0, import_path14.join)(orig, "package.json");
|
|
162049
162062
|
seen[orig] = true;
|
|
162050
|
-
if (!(0,
|
|
162063
|
+
if (!(0, import_fs9.existsSync)(pkgfile)) {
|
|
162051
162064
|
return updir();
|
|
162052
162065
|
}
|
|
162053
162066
|
try {
|
|
162054
|
-
const info = JSON.parse((0,
|
|
162067
|
+
const info = JSON.parse((0, import_fs9.readFileSync)(pkgfile, "utf8"));
|
|
162055
162068
|
infos[info.name] = info.version;
|
|
162056
162069
|
} catch (_oO) {
|
|
162057
162070
|
}
|
|
@@ -162107,12 +162120,12 @@ Modules.__initStatic();
|
|
|
162107
162120
|
|
|
162108
162121
|
// ../../node_modules/.pnpm/@sentry+node@7.87.0_supports-color@9.2.2/node_modules/@sentry/node/esm/integrations/contextlines.js
|
|
162109
162122
|
init_import_meta_url();
|
|
162110
|
-
var
|
|
162123
|
+
var import_fs10 = require("fs");
|
|
162111
162124
|
var FILE_CONTENT_CACHE = new LRUMap(100);
|
|
162112
162125
|
var DEFAULT_LINES_OF_CONTEXT = 7;
|
|
162113
162126
|
function readTextFileAsync(path65) {
|
|
162114
162127
|
return new Promise((resolve19, reject) => {
|
|
162115
|
-
(0,
|
|
162128
|
+
(0, import_fs10.readFile)(path65, "utf8", (err, data) => {
|
|
162116
162129
|
if (err)
|
|
162117
162130
|
reject(err);
|
|
162118
162131
|
else
|
|
@@ -162223,12 +162236,12 @@ __name(_readSourceFile, "_readSourceFile");
|
|
|
162223
162236
|
// ../../node_modules/.pnpm/@sentry+node@7.87.0_supports-color@9.2.2/node_modules/@sentry/node/esm/integrations/context.js
|
|
162224
162237
|
init_import_meta_url();
|
|
162225
162238
|
var import_child_process2 = require("child_process");
|
|
162226
|
-
var
|
|
162239
|
+
var import_fs11 = require("fs");
|
|
162227
162240
|
var os8 = __toESM(require("os"));
|
|
162228
162241
|
var import_path15 = require("path");
|
|
162229
162242
|
var import_util7 = require("util");
|
|
162230
|
-
var readFileAsync = (0, import_util7.promisify)(
|
|
162231
|
-
var readDirAsync = (0, import_util7.promisify)(
|
|
162243
|
+
var readFileAsync = (0, import_util7.promisify)(import_fs11.readFile);
|
|
162244
|
+
var readDirAsync = (0, import_util7.promisify)(import_fs11.readdir);
|
|
162232
162245
|
var Context = class {
|
|
162233
162246
|
/**
|
|
162234
162247
|
* @inheritDoc
|