@cloudflare/workers-types 3.3.0 → 3.3.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/index.d.ts +411 -110
- package/package.json +6 -2
package/index.d.ts
CHANGED
|
@@ -62,7 +62,14 @@ interface BasicImageTransformations {
|
|
|
62
62
|
* preserve as much as possible around a point at 20% of the height of the
|
|
63
63
|
* source image.
|
|
64
64
|
*/
|
|
65
|
-
gravity?:
|
|
65
|
+
gravity?:
|
|
66
|
+
| "left"
|
|
67
|
+
| "right"
|
|
68
|
+
| "top"
|
|
69
|
+
| "bottom"
|
|
70
|
+
| "center"
|
|
71
|
+
| "auto"
|
|
72
|
+
| BasicImageTransformationsGravityCoordinates;
|
|
66
73
|
/**
|
|
67
74
|
* Background color to add underneath the image. Applies only to images with
|
|
68
75
|
* transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
|
|
@@ -107,7 +114,13 @@ declare abstract class Body {
|
|
|
107
114
|
blob(): Promise<Blob>;
|
|
108
115
|
}
|
|
109
116
|
|
|
110
|
-
declare type BodyInit =
|
|
117
|
+
declare type BodyInit =
|
|
118
|
+
| ReadableStream
|
|
119
|
+
| string
|
|
120
|
+
| ArrayBuffer
|
|
121
|
+
| Blob
|
|
122
|
+
| URLSearchParams
|
|
123
|
+
| FormData;
|
|
111
124
|
|
|
112
125
|
/**
|
|
113
126
|
* Back compat for code migrating to older definitions.
|
|
@@ -116,8 +129,14 @@ declare type BodyInit = ReadableStream | string | ArrayBuffer | Blob | URLSearch
|
|
|
116
129
|
declare type BodyInitializer = BodyInit;
|
|
117
130
|
|
|
118
131
|
declare abstract class Cache {
|
|
119
|
-
delete(
|
|
120
|
-
|
|
132
|
+
delete(
|
|
133
|
+
request: Request | string,
|
|
134
|
+
options?: CacheQueryOptions
|
|
135
|
+
): Promise<boolean>;
|
|
136
|
+
match(
|
|
137
|
+
request: Request | string,
|
|
138
|
+
options?: CacheQueryOptions
|
|
139
|
+
): Promise<Response | undefined>;
|
|
121
140
|
put(request: Request | string, response: Response): Promise<void>;
|
|
122
141
|
}
|
|
123
142
|
|
|
@@ -184,7 +203,15 @@ interface ContentOptions {
|
|
|
184
203
|
|
|
185
204
|
declare abstract class Crypto {
|
|
186
205
|
readonly subtle: SubtleCrypto;
|
|
187
|
-
getRandomValues<
|
|
206
|
+
getRandomValues<
|
|
207
|
+
T extends
|
|
208
|
+
| Int8Array
|
|
209
|
+
| Uint8Array
|
|
210
|
+
| Int16Array
|
|
211
|
+
| Uint16Array
|
|
212
|
+
| Int32Array
|
|
213
|
+
| Uint32Array
|
|
214
|
+
>(buffer: T): T;
|
|
188
215
|
randomUUID(): string;
|
|
189
216
|
}
|
|
190
217
|
|
|
@@ -200,7 +227,14 @@ interface CryptoKeyAesKeyAlgorithm {
|
|
|
200
227
|
length: number;
|
|
201
228
|
}
|
|
202
229
|
|
|
203
|
-
declare type CryptoKeyAlgorithmVariant =
|
|
230
|
+
declare type CryptoKeyAlgorithmVariant =
|
|
231
|
+
| CryptoKeyKeyAlgorithm
|
|
232
|
+
| CryptoKeyAesKeyAlgorithm
|
|
233
|
+
| CryptoKeyHmacKeyAlgorithm
|
|
234
|
+
| CryptoKeyRsaKeyAlgorithm
|
|
235
|
+
| CryptoKeyEllipticKeyAlgorithm
|
|
236
|
+
| CryptoKeyVoprfKeyAlgorithm
|
|
237
|
+
| CryptoKeyOprfKeyAlgorithm;
|
|
204
238
|
|
|
205
239
|
interface CryptoKeyEllipticKeyAlgorithm {
|
|
206
240
|
name: string;
|
|
@@ -311,7 +345,9 @@ interface DurableObjectListOptions {
|
|
|
311
345
|
}
|
|
312
346
|
|
|
313
347
|
interface DurableObjectNamespace {
|
|
314
|
-
newUniqueId(
|
|
348
|
+
newUniqueId(
|
|
349
|
+
options?: DurableObjectNamespaceNewUniqueIdOptions
|
|
350
|
+
): DurableObjectId;
|
|
315
351
|
idFromName(name: string): DurableObjectId;
|
|
316
352
|
idFromString(id: string): DurableObjectId;
|
|
317
353
|
get(id: DurableObjectId): DurableObjectStub;
|
|
@@ -335,31 +371,49 @@ interface DurableObjectState {
|
|
|
335
371
|
}
|
|
336
372
|
|
|
337
373
|
interface DurableObjectStorage {
|
|
338
|
-
get<T = unknown>(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
374
|
+
get<T = unknown>(
|
|
375
|
+
key: string,
|
|
376
|
+
options?: DurableObjectGetOptions
|
|
377
|
+
): Promise<T | undefined>;
|
|
378
|
+
get<T = unknown>(
|
|
379
|
+
keys: string[],
|
|
380
|
+
options?: DurableObjectGetOptions
|
|
381
|
+
): Promise<Map<string, T>>;
|
|
382
|
+
list<T = unknown>(
|
|
383
|
+
options?: DurableObjectListOptions
|
|
384
|
+
): Promise<Map<string, T>>;
|
|
385
|
+
put<T>(
|
|
386
|
+
key: string,
|
|
387
|
+
value: T,
|
|
388
|
+
options?: DurableObjectPutOptions
|
|
389
|
+
): Promise<void>;
|
|
390
|
+
put<T>(
|
|
391
|
+
entries: Record<string, T>,
|
|
392
|
+
options?: DurableObjectPutOptions
|
|
393
|
+
): Promise<void>;
|
|
343
394
|
delete(key: string, options?: DurableObjectPutOptions): Promise<boolean>;
|
|
344
395
|
delete(keys: string[], options?: DurableObjectPutOptions): Promise<number>;
|
|
345
396
|
deleteAll(options?: DurableObjectPutOptions): Promise<void>;
|
|
346
|
-
transaction<T>(
|
|
397
|
+
transaction<T>(
|
|
398
|
+
closure: (txn: DurableObjectTransaction) => Promise<T>
|
|
399
|
+
): Promise<T>;
|
|
347
400
|
}
|
|
348
401
|
|
|
349
402
|
/**
|
|
350
|
-
*
|
|
403
|
+
*
|
|
351
404
|
* @deprecated Don't use. Introduced incidentally in 3.x. Scheduled for removal.
|
|
352
405
|
*/
|
|
353
406
|
declare type DurableObjectStorageOperationsGetOptions = DurableObjectGetOptions;
|
|
354
407
|
|
|
355
408
|
/**
|
|
356
|
-
*
|
|
409
|
+
*
|
|
357
410
|
* @deprecated Don't use. Introduced incidentally in 3.x. Scheduled for removal.
|
|
358
411
|
*/
|
|
359
|
-
declare type DurableObjectStorageOperationsListOptions =
|
|
412
|
+
declare type DurableObjectStorageOperationsListOptions =
|
|
413
|
+
DurableObjectListOptions;
|
|
360
414
|
|
|
361
415
|
/**
|
|
362
|
-
*
|
|
416
|
+
*
|
|
363
417
|
* @deprecated Don't use. Introduced incidentally in 3.x. Scheduled for removal.
|
|
364
418
|
*/
|
|
365
419
|
declare type DurableObjectStorageOperationsPutOptions = DurableObjectPutOptions;
|
|
@@ -371,10 +425,22 @@ interface DurableObjectStub extends Fetcher {
|
|
|
371
425
|
|
|
372
426
|
interface DurableObjectTransaction {
|
|
373
427
|
get<T = unknown>(key: string, options?: DurableObjectGetOptions): Promise<T>;
|
|
374
|
-
get<T = unknown>(
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
428
|
+
get<T = unknown>(
|
|
429
|
+
keys: string[],
|
|
430
|
+
options?: DurableObjectGetOptions
|
|
431
|
+
): Promise<Map<string, T>>;
|
|
432
|
+
list<T = unknown>(
|
|
433
|
+
options?: DurableObjectListOptions
|
|
434
|
+
): Promise<Map<string, T>>;
|
|
435
|
+
put<T>(
|
|
436
|
+
key: string,
|
|
437
|
+
value: T,
|
|
438
|
+
options?: DurableObjectPutOptions
|
|
439
|
+
): Promise<void>;
|
|
440
|
+
put<T>(
|
|
441
|
+
entries: Record<string, T>,
|
|
442
|
+
options?: DurableObjectPutOptions
|
|
443
|
+
): Promise<void>;
|
|
378
444
|
delete(key: string, options?: DurableObjectPutOptions): Promise<boolean>;
|
|
379
445
|
delete(keys: string[], options?: DurableObjectPutOptions): Promise<number>;
|
|
380
446
|
rollback(): void;
|
|
@@ -397,6 +463,14 @@ interface Element {
|
|
|
397
463
|
remove(): Element;
|
|
398
464
|
removeAndKeepContent(): Element;
|
|
399
465
|
setInnerContent(content: Content, options?: ContentOptions): Element;
|
|
466
|
+
onEndTag(handler: Function): void;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
interface EndTag {
|
|
470
|
+
name: string;
|
|
471
|
+
before(content: Content, options?: ContentOptions): EndTag;
|
|
472
|
+
after(content: Content, options?: ContentOptions): EndTag;
|
|
473
|
+
remove(): EndTag;
|
|
400
474
|
}
|
|
401
475
|
|
|
402
476
|
declare class Event {
|
|
@@ -429,18 +503,32 @@ interface EventInit {
|
|
|
429
503
|
composed?: boolean;
|
|
430
504
|
}
|
|
431
505
|
|
|
432
|
-
declare type EventListener<EventType extends Event = Event> = (
|
|
506
|
+
declare type EventListener<EventType extends Event = Event> = (
|
|
507
|
+
event: EventType
|
|
508
|
+
) => void;
|
|
433
509
|
|
|
434
510
|
interface EventListenerObject<EventType extends Event = Event> {
|
|
435
511
|
handleEvent(event: EventType): void;
|
|
436
512
|
}
|
|
437
513
|
|
|
438
|
-
declare type EventListenerOrEventListenerObject<
|
|
514
|
+
declare type EventListenerOrEventListenerObject<
|
|
515
|
+
EventType extends Event = Event
|
|
516
|
+
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
439
517
|
|
|
440
|
-
declare class EventTarget<
|
|
518
|
+
declare class EventTarget<
|
|
519
|
+
EventMap extends Record<string, Event> = Record<string, Event>
|
|
520
|
+
> {
|
|
441
521
|
constructor();
|
|
442
|
-
addEventListener<Type extends keyof EventMap>(
|
|
443
|
-
|
|
522
|
+
addEventListener<Type extends keyof EventMap>(
|
|
523
|
+
type: Type,
|
|
524
|
+
handler: EventListenerOrEventListenerObject<EventMap[Type]>,
|
|
525
|
+
options?: EventTargetAddEventListenerOptions | boolean
|
|
526
|
+
): void;
|
|
527
|
+
removeEventListener<Type extends keyof EventMap>(
|
|
528
|
+
type: Type,
|
|
529
|
+
handler: EventListenerOrEventListenerObject<EventMap[Type]>,
|
|
530
|
+
options?: EventTargetEventListenerOptions | boolean
|
|
531
|
+
): void;
|
|
444
532
|
dispatchEvent(event: EventMap[keyof EventMap]): boolean;
|
|
445
533
|
}
|
|
446
534
|
|
|
@@ -465,9 +553,17 @@ interface ExportedHandler<Env = unknown> {
|
|
|
465
553
|
scheduled?: ExportedHandlerScheduledHandler<Env>;
|
|
466
554
|
}
|
|
467
555
|
|
|
468
|
-
declare type ExportedHandlerFetchHandler<Env = unknown> = (
|
|
556
|
+
declare type ExportedHandlerFetchHandler<Env = unknown> = (
|
|
557
|
+
request: Request,
|
|
558
|
+
env: Env,
|
|
559
|
+
ctx: ExecutionContext
|
|
560
|
+
) => Response | Promise<Response>;
|
|
469
561
|
|
|
470
|
-
declare type ExportedHandlerScheduledHandler<Env = unknown> = (
|
|
562
|
+
declare type ExportedHandlerScheduledHandler<Env = unknown> = (
|
|
563
|
+
controller: ScheduledController,
|
|
564
|
+
env: Env,
|
|
565
|
+
ctx: ExecutionContext
|
|
566
|
+
) => void | Promise<void>;
|
|
471
567
|
|
|
472
568
|
declare abstract class FetchEvent extends Event {
|
|
473
569
|
readonly request: Request;
|
|
@@ -477,7 +573,10 @@ declare abstract class FetchEvent extends Event {
|
|
|
477
573
|
}
|
|
478
574
|
|
|
479
575
|
declare abstract class Fetcher {
|
|
480
|
-
fetch(
|
|
576
|
+
fetch(
|
|
577
|
+
requestOrUrl: Request | string,
|
|
578
|
+
requestInit?: RequestInit | Request
|
|
579
|
+
): Promise<Response>;
|
|
481
580
|
}
|
|
482
581
|
|
|
483
582
|
declare class File extends Blob {
|
|
@@ -505,16 +604,27 @@ declare class FormData {
|
|
|
505
604
|
has(name: string): boolean;
|
|
506
605
|
set(name: string, value: string): void;
|
|
507
606
|
set(name: string, value: Blob, filename?: string): void;
|
|
508
|
-
entries(): IterableIterator<
|
|
607
|
+
entries(): IterableIterator<[key: string, value: File | string][]>;
|
|
509
608
|
keys(): IterableIterator<string>;
|
|
510
609
|
values(): IterableIterator<File | string>;
|
|
511
|
-
forEach<This = unknown>(
|
|
512
|
-
|
|
610
|
+
forEach<This = unknown>(
|
|
611
|
+
callback: (
|
|
612
|
+
this: This,
|
|
613
|
+
key: string,
|
|
614
|
+
value: File | string,
|
|
615
|
+
parent: FormData
|
|
616
|
+
) => void,
|
|
617
|
+
thisArg?: This
|
|
618
|
+
): void;
|
|
619
|
+
[Symbol.iterator](): IterableIterator<[key: string, value: File | string][]>;
|
|
513
620
|
}
|
|
514
621
|
|
|
515
622
|
declare class HTMLRewriter {
|
|
516
623
|
constructor();
|
|
517
|
-
on(
|
|
624
|
+
on(
|
|
625
|
+
selector: string,
|
|
626
|
+
handlers: HTMLRewriterElementContentHandlers
|
|
627
|
+
): HTMLRewriter;
|
|
518
628
|
onDocument(handlers: HTMLRewriterDocumentContentHandlers): HTMLRewriter;
|
|
519
629
|
transform(response: Response): Response;
|
|
520
630
|
}
|
|
@@ -540,14 +650,20 @@ declare class Headers {
|
|
|
540
650
|
set(name: string, value: string): void;
|
|
541
651
|
append(name: string, value: string): void;
|
|
542
652
|
delete(name: string): void;
|
|
543
|
-
forEach<This = unknown>(
|
|
653
|
+
forEach<This = unknown>(
|
|
654
|
+
callback: (this: This, key: string, value: string, parent: Headers) => void,
|
|
655
|
+
thisArg?: This
|
|
656
|
+
): void;
|
|
544
657
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
545
658
|
keys(): IterableIterator<string>;
|
|
546
659
|
values(): IterableIterator<string>;
|
|
547
660
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
548
661
|
}
|
|
549
662
|
|
|
550
|
-
declare type HeadersInit =
|
|
663
|
+
declare type HeadersInit =
|
|
664
|
+
| Headers
|
|
665
|
+
| Record<string, string>
|
|
666
|
+
| [key: string, value: string][];
|
|
551
667
|
|
|
552
668
|
/**
|
|
553
669
|
* Back compat for code migrating to older definitions.
|
|
@@ -559,7 +675,7 @@ declare type HeadersInitializer = HeadersInit;
|
|
|
559
675
|
* In addition to the properties on the standard Request object,
|
|
560
676
|
* the cf object contains extra information about the request provided
|
|
561
677
|
* by Cloudflare's edge.
|
|
562
|
-
*
|
|
678
|
+
*
|
|
563
679
|
* Note: Currently, settings in the cf object cannot be accessed in the
|
|
564
680
|
* playground.
|
|
565
681
|
*/
|
|
@@ -670,17 +786,34 @@ interface JsonWebKey {
|
|
|
670
786
|
* Workers KV is a global, low-latency, key-value data store. It supports exceptionally high read volumes with low-latency,
|
|
671
787
|
* making it possible to build highly dynamic APIs and websites which respond as quickly as a cached static file would.
|
|
672
788
|
*/
|
|
673
|
-
interface KVNamespace {
|
|
674
|
-
get(
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
get(key:
|
|
679
|
-
get
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
789
|
+
interface KVNamespace<K extends string = string> {
|
|
790
|
+
get(
|
|
791
|
+
key: K,
|
|
792
|
+
options?: Partial<KVNamespaceGetOptions<undefined>>
|
|
793
|
+
): Promise<string | null>;
|
|
794
|
+
get(key: K, type: "text"): Promise<string | null>;
|
|
795
|
+
get<ExpectedValue = unknown>(
|
|
796
|
+
key: K,
|
|
797
|
+
type: "json"
|
|
798
|
+
): Promise<ExpectedValue | null>;
|
|
799
|
+
get(key: K, type: "arrayBuffer"): Promise<ArrayBuffer | null>;
|
|
800
|
+
get(key: K, type: "stream"): Promise<ReadableStream | null>;
|
|
801
|
+
get(key: K, options: KVNamespaceGetOptions<"text">): Promise<string | null>;
|
|
802
|
+
get<ExpectedValue = unknown>(
|
|
803
|
+
key: string,
|
|
804
|
+
options: KVNamespaceGetOptions<"json">
|
|
805
|
+
): Promise<ExpectedValue | null>;
|
|
806
|
+
get(
|
|
807
|
+
key: K,
|
|
808
|
+
options: KVNamespaceGetOptions<"arrayBuffer">
|
|
809
|
+
): Promise<ArrayBuffer | null>;
|
|
810
|
+
get(
|
|
811
|
+
key: K,
|
|
812
|
+
options: KVNamespaceGetOptions<"stream">
|
|
813
|
+
): Promise<ReadableStream | null>;
|
|
814
|
+
list<Metadata = unknown>(
|
|
815
|
+
options?: KVNamespaceListOptions
|
|
816
|
+
): Promise<KVNamespaceListResult<Metadata>>;
|
|
684
817
|
/**
|
|
685
818
|
* Creates a new key-value pair, or updates the value for a particular key.
|
|
686
819
|
* @param key key to associate with the value. A key cannot be empty, `.` or `..`. All other keys are valid.
|
|
@@ -689,16 +822,47 @@ interface KVNamespace {
|
|
|
689
822
|
* @example
|
|
690
823
|
* await NAMESPACE.put(key, value)
|
|
691
824
|
*/
|
|
692
|
-
put(
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
getWithMetadata<Metadata = unknown>(
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
getWithMetadata<Metadata = unknown>(
|
|
825
|
+
put(
|
|
826
|
+
key: K,
|
|
827
|
+
value: string | ArrayBuffer | ArrayBufferView | ReadableStream,
|
|
828
|
+
options?: KVNamespacePutOptions
|
|
829
|
+
): Promise<void>;
|
|
830
|
+
getWithMetadata<Metadata = unknown>(
|
|
831
|
+
key: K,
|
|
832
|
+
options?: Partial<KVNamespaceGetOptions<undefined>>
|
|
833
|
+
): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
|
|
834
|
+
getWithMetadata<Metadata = unknown>(
|
|
835
|
+
key: K,
|
|
836
|
+
type: "text"
|
|
837
|
+
): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
|
|
838
|
+
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
839
|
+
key: K,
|
|
840
|
+
type: "json"
|
|
841
|
+
): Promise<KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>;
|
|
842
|
+
getWithMetadata<Metadata = unknown>(
|
|
843
|
+
key: K,
|
|
844
|
+
type: "arrayBuffer"
|
|
845
|
+
): Promise<KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>>;
|
|
846
|
+
getWithMetadata<Metadata = unknown>(
|
|
847
|
+
key: K,
|
|
848
|
+
type: "stream"
|
|
849
|
+
): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
|
|
850
|
+
getWithMetadata<Metadata = unknown>(
|
|
851
|
+
key: K,
|
|
852
|
+
options: KVNamespaceGetOptions<"text">
|
|
853
|
+
): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
|
|
854
|
+
getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
|
|
855
|
+
key: K,
|
|
856
|
+
options: KVNamespaceGetOptions<"json">
|
|
857
|
+
): Promise<KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>;
|
|
858
|
+
getWithMetadata<Metadata = unknown>(
|
|
859
|
+
key: K,
|
|
860
|
+
options: KVNamespaceGetOptions<"arrayBuffer">
|
|
861
|
+
): Promise<KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>>;
|
|
862
|
+
getWithMetadata<Metadata = unknown>(
|
|
863
|
+
key: K,
|
|
864
|
+
options: KVNamespaceGetOptions<"stream">
|
|
865
|
+
): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
|
|
702
866
|
delete(name: string): Promise<void>;
|
|
703
867
|
}
|
|
704
868
|
|
|
@@ -771,7 +935,7 @@ interface ReadResult {
|
|
|
771
935
|
done: boolean;
|
|
772
936
|
}
|
|
773
937
|
|
|
774
|
-
|
|
938
|
+
declare abstract class ReadableByteStreamController {
|
|
775
939
|
readonly byobRequest: ReadableStreamBYOBRequest | null;
|
|
776
940
|
readonly desiredSize: number | null;
|
|
777
941
|
close(): void;
|
|
@@ -785,28 +949,42 @@ declare class ReadableStream {
|
|
|
785
949
|
cancel(reason?: any): Promise<void>;
|
|
786
950
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
787
951
|
getReader(): ReadableStreamDefaultReader;
|
|
788
|
-
pipeThrough(
|
|
952
|
+
pipeThrough(
|
|
953
|
+
transform: ReadableStreamTransform,
|
|
954
|
+
options?: PipeToOptions
|
|
955
|
+
): ReadableStream;
|
|
789
956
|
pipeTo(destination: WritableStream, options?: PipeToOptions): Promise<void>;
|
|
790
957
|
tee(): [ReadableStream, ReadableStream];
|
|
958
|
+
values(
|
|
959
|
+
options?: ReadableStreamValuesOptions
|
|
960
|
+
): AsyncIterableIterator<ReadableStreamReadResult>;
|
|
961
|
+
[Symbol.asyncIterator](
|
|
962
|
+
options?: ReadableStreamValuesOptions
|
|
963
|
+
): AsyncIterableIterator<ReadableStreamReadResult>;
|
|
791
964
|
}
|
|
792
965
|
|
|
793
966
|
declare class ReadableStreamBYOBReader {
|
|
794
967
|
constructor(stream: ReadableStream);
|
|
795
968
|
readonly closed: Promise<void>;
|
|
796
969
|
cancel(reason?: any): Promise<void>;
|
|
797
|
-
read<T extends ArrayBufferView>(
|
|
970
|
+
read<T extends ArrayBufferView>(
|
|
971
|
+
view: T
|
|
972
|
+
): Promise<ReadableStreamReadResult<T>>;
|
|
798
973
|
releaseLock(): void;
|
|
799
|
-
readAtLeast(
|
|
974
|
+
readAtLeast(
|
|
975
|
+
minBytes: number,
|
|
976
|
+
view: Uint8Array
|
|
977
|
+
): Promise<ReadableStreamReadResult<Uint8Array>>;
|
|
800
978
|
}
|
|
801
979
|
|
|
802
|
-
|
|
980
|
+
declare abstract class ReadableStreamBYOBRequest {
|
|
803
981
|
readonly view: Uint8Array | null;
|
|
804
982
|
respond(bytesWritten: number): void;
|
|
805
983
|
respondWithNewView(view: ArrayBufferView): void;
|
|
806
984
|
readonly atLeast: number | null;
|
|
807
985
|
}
|
|
808
986
|
|
|
809
|
-
|
|
987
|
+
declare abstract class ReadableStreamDefaultController {
|
|
810
988
|
readonly desiredSize: number | null;
|
|
811
989
|
close(): void;
|
|
812
990
|
enqueue(chunk?: any): void;
|
|
@@ -831,7 +1009,9 @@ interface ReadableStreamGetReaderOptions {
|
|
|
831
1009
|
*/
|
|
832
1010
|
declare type ReadableStreamPipeToOptions = PipeToOptions;
|
|
833
1011
|
|
|
834
|
-
declare type ReadableStreamReadResult<T = any> =
|
|
1012
|
+
declare type ReadableStreamReadResult<T = any> =
|
|
1013
|
+
| { done: true; value: undefined }
|
|
1014
|
+
| { done: false; value: T };
|
|
835
1015
|
|
|
836
1016
|
/**
|
|
837
1017
|
* Back-compat alias.
|
|
@@ -843,13 +1023,18 @@ declare type ReadableStreamReadableStreamBYOBReader = ReadableStreamBYOBReader;
|
|
|
843
1023
|
* Back-compat alias.
|
|
844
1024
|
* @deprecated Use ReadableStreamDefaultReader
|
|
845
1025
|
*/
|
|
846
|
-
declare type ReadableStreamReadableStreamDefaultReader =
|
|
1026
|
+
declare type ReadableStreamReadableStreamDefaultReader =
|
|
1027
|
+
ReadableStreamDefaultReader;
|
|
847
1028
|
|
|
848
1029
|
interface ReadableStreamTransform {
|
|
849
1030
|
writable: WritableStream;
|
|
850
1031
|
readable: ReadableStream;
|
|
851
1032
|
}
|
|
852
1033
|
|
|
1034
|
+
interface ReadableStreamValuesOptions {
|
|
1035
|
+
preventCancel?: boolean;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
853
1038
|
declare class Request extends Body {
|
|
854
1039
|
constructor(input: Request | string, init?: RequestInit | Request);
|
|
855
1040
|
clone(): Request;
|
|
@@ -871,10 +1056,10 @@ interface RequestInit {
|
|
|
871
1056
|
/**
|
|
872
1057
|
* cf is a union of these two types because there are multiple
|
|
873
1058
|
* scenarios in which it might be one or the other.
|
|
874
|
-
*
|
|
1059
|
+
*
|
|
875
1060
|
* IncomingRequestCfProperties is required to allow
|
|
876
1061
|
* new Request(someUrl, event.request)
|
|
877
|
-
*
|
|
1062
|
+
*
|
|
878
1063
|
* RequestInitCfProperties is required to allow
|
|
879
1064
|
* new Request(event.request, {cf: { ... } })
|
|
880
1065
|
* fetch(someUrl, {cf: { ... } })
|
|
@@ -888,7 +1073,7 @@ interface RequestInit {
|
|
|
888
1073
|
* that you pass as an argument to the Request constructor, you can
|
|
889
1074
|
* set certain properties of a `cf` object to control how Cloudflare
|
|
890
1075
|
* features are applied to that new Request.
|
|
891
|
-
*
|
|
1076
|
+
*
|
|
892
1077
|
* Note: Currently, these properties cannot be tested in the
|
|
893
1078
|
* playground.
|
|
894
1079
|
*/
|
|
@@ -899,7 +1084,7 @@ interface RequestInitCfProperties {
|
|
|
899
1084
|
* "the same" for caching purposes. If a request has the same cache key
|
|
900
1085
|
* as some previous request, then we can serve the same cached response for
|
|
901
1086
|
* both. (e.g. 'some-key')
|
|
902
|
-
*
|
|
1087
|
+
*
|
|
903
1088
|
* Only available for Enterprise customers.
|
|
904
1089
|
*/
|
|
905
1090
|
cacheKey?: string;
|
|
@@ -917,12 +1102,12 @@ interface RequestInitCfProperties {
|
|
|
917
1102
|
image?: RequestInitCfPropertiesImage;
|
|
918
1103
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
919
1104
|
mirage?: boolean;
|
|
920
|
-
polish?:
|
|
1105
|
+
polish?: "lossy" | "lossless" | "off";
|
|
921
1106
|
/**
|
|
922
1107
|
* Redirects the request to an alternate origin server. You can use this,
|
|
923
1108
|
* for example, to implement load balancing across several origins.
|
|
924
1109
|
* (e.g.us-east.example.com)
|
|
925
|
-
*
|
|
1110
|
+
*
|
|
926
1111
|
* Note - For security reasons, the hostname set in resolveOverride must
|
|
927
1112
|
* be proxied on the same Cloudflare zone of the incoming request.
|
|
928
1113
|
* Otherwise, the setting is ignored. CNAME hosts are allowed, so to
|
|
@@ -946,7 +1131,7 @@ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
|
946
1131
|
* or cutting out a specific fragment of an image. Trimming is performed
|
|
947
1132
|
* before resizing or rotation. Takes dpr into account.
|
|
948
1133
|
*/
|
|
949
|
-
trim?: { left?: number; top?: number; right?: number; bottom?: number
|
|
1134
|
+
trim?: { left?: number; top?: number; right?: number; bottom?: number };
|
|
950
1135
|
/**
|
|
951
1136
|
* Quality setting from 1-100 (useful values are in 60-90 range). Lower values
|
|
952
1137
|
* make images look worse, but load faster. The default is 85. It applies only
|
|
@@ -1031,9 +1216,9 @@ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
|
1031
1216
|
* positions left side of the overlay 10 pixels from the left edge of the
|
|
1032
1217
|
* image it's drawn over. bottom: 0 aligns bottom of the overlay with bottom
|
|
1033
1218
|
* of the background image.
|
|
1034
|
-
*
|
|
1219
|
+
*
|
|
1035
1220
|
* Setting both left & right, or both top & bottom is an error.
|
|
1036
|
-
*
|
|
1221
|
+
*
|
|
1037
1222
|
* If no position is specified, the image will be centered.
|
|
1038
1223
|
*/
|
|
1039
1224
|
top?: number;
|
|
@@ -1113,13 +1298,27 @@ interface SchedulerWaitOptions {
|
|
|
1113
1298
|
interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
1114
1299
|
btoa(data: string): string;
|
|
1115
1300
|
atob(data: string): string;
|
|
1116
|
-
setTimeout<Args extends any[]>(
|
|
1301
|
+
setTimeout<Args extends any[]>(
|
|
1302
|
+
callback: (...args: Args) => void,
|
|
1303
|
+
msDelay?: number,
|
|
1304
|
+
...args: Args
|
|
1305
|
+
): number;
|
|
1117
1306
|
clearTimeout(timeoutId: number | null): void;
|
|
1118
|
-
setInterval<Args extends any[]>(
|
|
1307
|
+
setInterval<Args extends any[]>(
|
|
1308
|
+
callback: (...args: Args) => void,
|
|
1309
|
+
msDelay?: number,
|
|
1310
|
+
...args: Args
|
|
1311
|
+
): number;
|
|
1119
1312
|
clearInterval(timeoutId: number | null): void;
|
|
1120
1313
|
queueMicrotask(task: Function): void;
|
|
1121
|
-
structuredClone(
|
|
1122
|
-
|
|
1314
|
+
structuredClone(
|
|
1315
|
+
value: any,
|
|
1316
|
+
options?: ServiceWorkerGlobalScopeStructuredCloneOptions
|
|
1317
|
+
): any;
|
|
1318
|
+
fetch(
|
|
1319
|
+
request: Request | string,
|
|
1320
|
+
requestInitr?: RequestInit | Request
|
|
1321
|
+
): Promise<Response>;
|
|
1123
1322
|
self: ServiceWorkerGlobalScope;
|
|
1124
1323
|
crypto: Crypto;
|
|
1125
1324
|
caches: CacheStorage;
|
|
@@ -1140,18 +1339,71 @@ interface StreamQueuingStrategy {
|
|
|
1140
1339
|
}
|
|
1141
1340
|
|
|
1142
1341
|
declare abstract class SubtleCrypto {
|
|
1143
|
-
encrypt(
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1342
|
+
encrypt(
|
|
1343
|
+
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1344
|
+
key: CryptoKey,
|
|
1345
|
+
plainText: ArrayBuffer
|
|
1346
|
+
): Promise<ArrayBuffer>;
|
|
1347
|
+
decrypt(
|
|
1348
|
+
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1349
|
+
key: CryptoKey,
|
|
1350
|
+
cipherText: ArrayBuffer
|
|
1351
|
+
): Promise<ArrayBuffer>;
|
|
1352
|
+
sign(
|
|
1353
|
+
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1354
|
+
key: CryptoKey,
|
|
1355
|
+
data: ArrayBuffer
|
|
1356
|
+
): Promise<ArrayBuffer>;
|
|
1357
|
+
verify(
|
|
1358
|
+
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
1359
|
+
key: CryptoKey,
|
|
1360
|
+
signature: ArrayBuffer,
|
|
1361
|
+
data: ArrayBuffer
|
|
1362
|
+
): Promise<boolean>;
|
|
1363
|
+
digest(
|
|
1364
|
+
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1365
|
+
data: ArrayBuffer
|
|
1366
|
+
): Promise<ArrayBuffer>;
|
|
1367
|
+
generateKey(
|
|
1368
|
+
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
1369
|
+
extractable: boolean,
|
|
1370
|
+
keyUsages: string[]
|
|
1371
|
+
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1372
|
+
deriveKey(
|
|
1373
|
+
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1374
|
+
baseKey: CryptoKey,
|
|
1375
|
+
derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1376
|
+
extractable: boolean,
|
|
1377
|
+
keyUsages: string[]
|
|
1378
|
+
): Promise<CryptoKey>;
|
|
1379
|
+
deriveBits(
|
|
1380
|
+
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1381
|
+
baseKey: CryptoKey,
|
|
1382
|
+
length: number | null
|
|
1383
|
+
): Promise<ArrayBuffer>;
|
|
1384
|
+
importKey(
|
|
1385
|
+
format: string,
|
|
1386
|
+
keyData: ArrayBuffer | JsonWebKey,
|
|
1387
|
+
algorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1388
|
+
extractable: boolean,
|
|
1389
|
+
keyUsages: string[]
|
|
1390
|
+
): Promise<CryptoKey>;
|
|
1152
1391
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1153
|
-
wrapKey(
|
|
1154
|
-
|
|
1392
|
+
wrapKey(
|
|
1393
|
+
format: string,
|
|
1394
|
+
key: CryptoKey,
|
|
1395
|
+
wrappingKey: CryptoKey,
|
|
1396
|
+
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm
|
|
1397
|
+
): Promise<ArrayBuffer>;
|
|
1398
|
+
unwrapKey(
|
|
1399
|
+
format: string,
|
|
1400
|
+
wrappedKey: ArrayBuffer,
|
|
1401
|
+
unwrappingKey: CryptoKey,
|
|
1402
|
+
unwrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1403
|
+
unwrappedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1404
|
+
extractable: boolean,
|
|
1405
|
+
keyUsages: string[]
|
|
1406
|
+
): Promise<CryptoKey>;
|
|
1155
1407
|
}
|
|
1156
1408
|
|
|
1157
1409
|
interface SubtleCryptoDeriveKeyAlgorithm {
|
|
@@ -1195,13 +1447,13 @@ interface SubtleCryptoImportKeyAlgorithm {
|
|
|
1195
1447
|
}
|
|
1196
1448
|
|
|
1197
1449
|
/**
|
|
1198
|
-
*
|
|
1450
|
+
*
|
|
1199
1451
|
* @deprecated Don't use. Introduced incidentally in 3.x. Scheduled for removal.
|
|
1200
1452
|
*/
|
|
1201
1453
|
declare type SubtleCryptoJsonWebKey = JsonWebKey;
|
|
1202
1454
|
|
|
1203
1455
|
/**
|
|
1204
|
-
*
|
|
1456
|
+
*
|
|
1205
1457
|
* @deprecated Don't use. Introduced incidentally in 3.x. Scheduled for removal.
|
|
1206
1458
|
*/
|
|
1207
1459
|
declare type SubtleCryptoJsonWebKeyRsaOtherPrimesInfo = RsaOtherPrimesInfo;
|
|
@@ -1224,7 +1476,10 @@ interface Text {
|
|
|
1224
1476
|
}
|
|
1225
1477
|
|
|
1226
1478
|
declare class TextDecoder {
|
|
1227
|
-
constructor(
|
|
1479
|
+
constructor(
|
|
1480
|
+
label?: "utf-8" | "utf8" | "unicode-1-1-utf-8",
|
|
1481
|
+
options?: TextDecoderConstructorOptions
|
|
1482
|
+
);
|
|
1228
1483
|
decode(input?: ArrayBuffer, options?: TextDecoderDecodeOptions): string;
|
|
1229
1484
|
readonly encoding: string;
|
|
1230
1485
|
readonly fatal: boolean;
|
|
@@ -1288,12 +1543,24 @@ declare class URLSearchParams {
|
|
|
1288
1543
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1289
1544
|
keys(): IterableIterator<string>;
|
|
1290
1545
|
values(): IterableIterator<string>;
|
|
1291
|
-
forEach<This = unknown>(
|
|
1546
|
+
forEach<This = unknown>(
|
|
1547
|
+
callback: (
|
|
1548
|
+
this: This,
|
|
1549
|
+
key: string,
|
|
1550
|
+
value: string,
|
|
1551
|
+
parent: URLSearchParams
|
|
1552
|
+
) => void,
|
|
1553
|
+
thisArg?: This
|
|
1554
|
+
): void;
|
|
1292
1555
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1293
1556
|
toString(): string;
|
|
1294
1557
|
}
|
|
1295
1558
|
|
|
1296
|
-
declare type URLSearchParamsInit =
|
|
1559
|
+
declare type URLSearchParamsInit =
|
|
1560
|
+
| URLSearchParams
|
|
1561
|
+
| string
|
|
1562
|
+
| Record<string, string>
|
|
1563
|
+
| [key: string, value: string][];
|
|
1297
1564
|
|
|
1298
1565
|
/**
|
|
1299
1566
|
* Back compat for code migrating to older definitions.
|
|
@@ -1309,15 +1576,22 @@ declare abstract class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
1309
1576
|
close(code?: number, reason?: string): void;
|
|
1310
1577
|
}
|
|
1311
1578
|
|
|
1312
|
-
declare type WebSocketEventMap = {
|
|
1579
|
+
declare type WebSocketEventMap = {
|
|
1580
|
+
close: CloseEvent;
|
|
1581
|
+
message: MessageEvent;
|
|
1582
|
+
error: Event;
|
|
1583
|
+
};
|
|
1313
1584
|
|
|
1314
|
-
declare const WebSocketPair: { new(): { 0: WebSocket; 1: WebSocket
|
|
1585
|
+
declare const WebSocketPair: { new (): { 0: WebSocket; 1: WebSocket } };
|
|
1315
1586
|
|
|
1316
|
-
declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
|
|
1587
|
+
declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {}
|
|
1317
1588
|
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1589
|
+
declare type WorkerGlobalScopeEventMap = {
|
|
1590
|
+
fetch: FetchEvent;
|
|
1591
|
+
scheduled: ScheduledEvent;
|
|
1592
|
+
unhandledrejection: PromiseRejectionEvent;
|
|
1593
|
+
rejectionhandled: PromiseRejectionEvent;
|
|
1594
|
+
};
|
|
1321
1595
|
|
|
1322
1596
|
declare class WritableStream {
|
|
1323
1597
|
constructor(underlyingSink?: Object, queuingStrategy?: Object);
|
|
@@ -1327,7 +1601,7 @@ declare class WritableStream {
|
|
|
1327
1601
|
getWriter(): WritableStreamDefaultWriter;
|
|
1328
1602
|
}
|
|
1329
1603
|
|
|
1330
|
-
|
|
1604
|
+
declare abstract class WritableStreamDefaultController {
|
|
1331
1605
|
readonly signal: AbortSignal;
|
|
1332
1606
|
error(reason?: any): void;
|
|
1333
1607
|
}
|
|
@@ -1347,9 +1621,14 @@ declare class WritableStreamDefaultWriter {
|
|
|
1347
1621
|
* Back-compat alias.
|
|
1348
1622
|
* @deprecated Use WritableStreamDefaultWriter
|
|
1349
1623
|
*/
|
|
1350
|
-
declare type WritableStreamWritableStreamDefaultWriter =
|
|
1624
|
+
declare type WritableStreamWritableStreamDefaultWriter =
|
|
1625
|
+
WritableStreamDefaultWriter;
|
|
1351
1626
|
|
|
1352
|
-
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
1627
|
+
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
1628
|
+
type: Type,
|
|
1629
|
+
handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>,
|
|
1630
|
+
options?: EventTargetAddEventListenerOptions | boolean
|
|
1631
|
+
): void;
|
|
1353
1632
|
|
|
1354
1633
|
declare function atob(data: string): string;
|
|
1355
1634
|
|
|
@@ -1365,25 +1644,47 @@ declare const console: Console;
|
|
|
1365
1644
|
|
|
1366
1645
|
declare const crypto: Crypto;
|
|
1367
1646
|
|
|
1368
|
-
declare function dispatchEvent(
|
|
1647
|
+
declare function dispatchEvent(
|
|
1648
|
+
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap]
|
|
1649
|
+
): boolean;
|
|
1369
1650
|
|
|
1370
|
-
declare function fetch(
|
|
1651
|
+
declare function fetch(
|
|
1652
|
+
request: Request | string,
|
|
1653
|
+
requestInitr?: RequestInit | Request
|
|
1654
|
+
): Promise<Response>;
|
|
1371
1655
|
|
|
1372
1656
|
declare const origin: void;
|
|
1373
1657
|
|
|
1374
1658
|
declare function queueMicrotask(task: Function): void;
|
|
1375
1659
|
|
|
1376
|
-
declare function removeEventListener<
|
|
1660
|
+
declare function removeEventListener<
|
|
1661
|
+
Type extends keyof WorkerGlobalScopeEventMap
|
|
1662
|
+
>(
|
|
1663
|
+
type: Type,
|
|
1664
|
+
handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>,
|
|
1665
|
+
options?: EventTargetEventListenerOptions | boolean
|
|
1666
|
+
): void;
|
|
1377
1667
|
|
|
1378
1668
|
declare const scheduler: Scheduler;
|
|
1379
1669
|
|
|
1380
1670
|
declare const self: ServiceWorkerGlobalScope;
|
|
1381
1671
|
|
|
1382
|
-
declare function setInterval<Args extends any[]>(
|
|
1672
|
+
declare function setInterval<Args extends any[]>(
|
|
1673
|
+
callback: (...args: Args) => void,
|
|
1674
|
+
msDelay?: number,
|
|
1675
|
+
...args: Args
|
|
1676
|
+
): number;
|
|
1383
1677
|
|
|
1384
|
-
declare function setTimeout<Args extends any[]>(
|
|
1678
|
+
declare function setTimeout<Args extends any[]>(
|
|
1679
|
+
callback: (...args: Args) => void,
|
|
1680
|
+
msDelay?: number,
|
|
1681
|
+
...args: Args
|
|
1682
|
+
): number;
|
|
1385
1683
|
|
|
1386
|
-
declare function structuredClone(
|
|
1684
|
+
declare function structuredClone(
|
|
1685
|
+
value: any,
|
|
1686
|
+
options?: ServiceWorkerGlobalScopeStructuredCloneOptions
|
|
1687
|
+
): any;
|
|
1387
1688
|
|
|
1388
1689
|
/*** Injected pages.d.ts ***/
|
|
1389
1690
|
type Params<P extends string = any> = Record<P, string | string[]>;
|
|
@@ -1392,7 +1693,7 @@ type EventContext<Env, P extends string, Data> = {
|
|
|
1392
1693
|
request: Request;
|
|
1393
1694
|
waitUntil: (promise: Promise<any>) => void;
|
|
1394
1695
|
next: (input?: Request | string, init?: RequestInit) => Promise<Response>;
|
|
1395
|
-
env: Env & { ASSETS: { fetch: typeof fetch }};
|
|
1696
|
+
env: Env & { ASSETS: { fetch: typeof fetch } };
|
|
1396
1697
|
params: Params<P>;
|
|
1397
1698
|
data: Data;
|
|
1398
1699
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/workers-types",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "TypeScript typings for Cloudflare Workers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,17 +13,21 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"export:docs": "node -r esbuild-register export/docs.ts",
|
|
15
15
|
"export:overrides": "node -r esbuild-register export/overrides.ts",
|
|
16
|
+
"prettier:check": "prettier --check '**/*.{md,ts}'",
|
|
17
|
+
"prettier": "prettier --write '**/*.{md,ts}'",
|
|
16
18
|
"test": "tsc"
|
|
17
19
|
},
|
|
18
20
|
"author": "Cloudflare Workers Team <workers@cloudflare.com> (https://workers.cloudflare.com)",
|
|
19
21
|
"license": "BSD-3-Clause",
|
|
20
22
|
"devDependencies": {
|
|
23
|
+
"@changesets/changelog-github": "^0.4.2",
|
|
24
|
+
"@changesets/cli": "^2.18.1",
|
|
21
25
|
"@types/marked": "^3.0.0",
|
|
22
26
|
"@types/node": "^16.6.1",
|
|
23
27
|
"esbuild": "^0.12.22",
|
|
24
28
|
"esbuild-register": "^3.0.0",
|
|
25
29
|
"marked": "^3.0.2",
|
|
26
|
-
"prettier": "2.
|
|
30
|
+
"prettier": "^2.5.1",
|
|
27
31
|
"typescript": "^4.3.5"
|
|
28
32
|
}
|
|
29
33
|
}
|