@cloudflare/workers-types 5.20261112.1 → 5.20261113.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/experimental/index.d.ts +124 -111
- package/experimental/index.ts +124 -111
- package/index.d.ts +117 -110
- package/index.ts +117 -110
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -813,7 +813,10 @@ interface DurableObjectStorage {
|
|
|
813
813
|
snapshot(
|
|
814
814
|
options?: DurableObjectSnapshotOptions,
|
|
815
815
|
): Promise<DurableObjectSnapshot>;
|
|
816
|
-
onNextSessionRestore(
|
|
816
|
+
onNextSessionRestore(
|
|
817
|
+
target: DurableObjectSnapshot | string,
|
|
818
|
+
options?: DurableObjectRestoreOptions,
|
|
819
|
+
): Promise<string>;
|
|
817
820
|
/** @deprecated Use `ctx.configureReadReplication()` instead. */
|
|
818
821
|
ensureReplicas(): void;
|
|
819
822
|
/** @deprecated Use `ctx.configureReadReplication()` instead. */
|
|
@@ -828,6 +831,9 @@ interface DurableObjectReadReplicationOptions {
|
|
|
828
831
|
interface DurableObjectSnapshotOptions {
|
|
829
832
|
bookmark?: string;
|
|
830
833
|
}
|
|
834
|
+
interface DurableObjectRestoreOptions {
|
|
835
|
+
kvData?: Record<string, any>;
|
|
836
|
+
}
|
|
831
837
|
interface DurableObjectListOptions {
|
|
832
838
|
start?: string;
|
|
833
839
|
startAfter?: string;
|
|
@@ -3568,116 +3574,6 @@ interface TraceMetrics {
|
|
|
3568
3574
|
interface UnsafeTraceMetrics {
|
|
3569
3575
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3570
3576
|
}
|
|
3571
|
-
/**
|
|
3572
|
-
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3573
|
-
*
|
|
3574
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3575
|
-
*/
|
|
3576
|
-
declare class URLPattern {
|
|
3577
|
-
constructor(
|
|
3578
|
-
input?: string | URLPatternInit,
|
|
3579
|
-
baseURL?: string | URLPatternOptions,
|
|
3580
|
-
patternOptions?: URLPatternOptions,
|
|
3581
|
-
);
|
|
3582
|
-
/**
|
|
3583
|
-
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3584
|
-
*
|
|
3585
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3586
|
-
*/
|
|
3587
|
-
get protocol(): string;
|
|
3588
|
-
/**
|
|
3589
|
-
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3590
|
-
*
|
|
3591
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3592
|
-
*/
|
|
3593
|
-
get username(): string;
|
|
3594
|
-
/**
|
|
3595
|
-
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3596
|
-
*
|
|
3597
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3598
|
-
*/
|
|
3599
|
-
get password(): string;
|
|
3600
|
-
/**
|
|
3601
|
-
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3602
|
-
*
|
|
3603
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3604
|
-
*/
|
|
3605
|
-
get hostname(): string;
|
|
3606
|
-
/**
|
|
3607
|
-
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3608
|
-
*
|
|
3609
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3610
|
-
*/
|
|
3611
|
-
get port(): string;
|
|
3612
|
-
/**
|
|
3613
|
-
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3614
|
-
*
|
|
3615
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3616
|
-
*/
|
|
3617
|
-
get pathname(): string;
|
|
3618
|
-
/**
|
|
3619
|
-
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3620
|
-
*
|
|
3621
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3622
|
-
*/
|
|
3623
|
-
get search(): string;
|
|
3624
|
-
/**
|
|
3625
|
-
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3626
|
-
*
|
|
3627
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3628
|
-
*/
|
|
3629
|
-
get hash(): string;
|
|
3630
|
-
/**
|
|
3631
|
-
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3632
|
-
*
|
|
3633
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3634
|
-
*/
|
|
3635
|
-
get hasRegExpGroups(): boolean;
|
|
3636
|
-
/**
|
|
3637
|
-
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3638
|
-
*
|
|
3639
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3640
|
-
*/
|
|
3641
|
-
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3642
|
-
/**
|
|
3643
|
-
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3644
|
-
*
|
|
3645
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3646
|
-
*/
|
|
3647
|
-
exec(
|
|
3648
|
-
input?: string | URLPatternInit,
|
|
3649
|
-
baseURL?: string,
|
|
3650
|
-
): URLPatternResult | null;
|
|
3651
|
-
}
|
|
3652
|
-
interface URLPatternInit {
|
|
3653
|
-
protocol?: string;
|
|
3654
|
-
username?: string;
|
|
3655
|
-
password?: string;
|
|
3656
|
-
hostname?: string;
|
|
3657
|
-
port?: string;
|
|
3658
|
-
pathname?: string;
|
|
3659
|
-
search?: string;
|
|
3660
|
-
hash?: string;
|
|
3661
|
-
baseURL?: string;
|
|
3662
|
-
}
|
|
3663
|
-
interface URLPatternComponentResult {
|
|
3664
|
-
input: string;
|
|
3665
|
-
groups: Record<string, string>;
|
|
3666
|
-
}
|
|
3667
|
-
interface URLPatternResult {
|
|
3668
|
-
inputs: (string | URLPatternInit)[];
|
|
3669
|
-
protocol: URLPatternComponentResult;
|
|
3670
|
-
username: URLPatternComponentResult;
|
|
3671
|
-
password: URLPatternComponentResult;
|
|
3672
|
-
hostname: URLPatternComponentResult;
|
|
3673
|
-
port: URLPatternComponentResult;
|
|
3674
|
-
pathname: URLPatternComponentResult;
|
|
3675
|
-
search: URLPatternComponentResult;
|
|
3676
|
-
hash: URLPatternComponentResult;
|
|
3677
|
-
}
|
|
3678
|
-
interface URLPatternOptions {
|
|
3679
|
-
ignoreCase?: boolean;
|
|
3680
|
-
}
|
|
3681
3577
|
type WebSocketEventMap = {
|
|
3682
3578
|
close: CloseEvent;
|
|
3683
3579
|
message: MessageEvent;
|
|
@@ -15271,6 +15167,10 @@ interface ForwardableEmailMessage extends EmailMessage {
|
|
|
15271
15167
|
* Size of the email message content.
|
|
15272
15168
|
*/
|
|
15273
15169
|
readonly rawSize: number;
|
|
15170
|
+
/**
|
|
15171
|
+
* Whether this email message can be forwarded with `forward()`.
|
|
15172
|
+
*/
|
|
15173
|
+
readonly canBeForwarded: boolean;
|
|
15274
15174
|
/**
|
|
15275
15175
|
* Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.
|
|
15276
15176
|
* @param reason The reject reason.
|
|
@@ -18173,6 +18073,119 @@ declare class URLSearchParams {
|
|
|
18173
18073
|
toString(): string;
|
|
18174
18074
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
18175
18075
|
}
|
|
18076
|
+
// URLPattern, as the URLPattern standard declares it, for both parsers.
|
|
18077
|
+
// The legacy parser (the urlpattern_original compatibility flag, the
|
|
18078
|
+
// default before 2025-05-01) has no hasRegExpGroups.
|
|
18079
|
+
/**
|
|
18080
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
18081
|
+
*
|
|
18082
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
18083
|
+
*/
|
|
18084
|
+
declare class URLPattern {
|
|
18085
|
+
constructor(
|
|
18086
|
+
input?: string | URLPatternInit,
|
|
18087
|
+
baseURL?: string | URLPatternOptions,
|
|
18088
|
+
patternOptions?: URLPatternOptions,
|
|
18089
|
+
);
|
|
18090
|
+
/**
|
|
18091
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
18092
|
+
*
|
|
18093
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
18094
|
+
*/
|
|
18095
|
+
get protocol(): string;
|
|
18096
|
+
/**
|
|
18097
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
18098
|
+
*
|
|
18099
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
18100
|
+
*/
|
|
18101
|
+
get username(): string;
|
|
18102
|
+
/**
|
|
18103
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
18104
|
+
*
|
|
18105
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
18106
|
+
*/
|
|
18107
|
+
get password(): string;
|
|
18108
|
+
/**
|
|
18109
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
18110
|
+
*
|
|
18111
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
18112
|
+
*/
|
|
18113
|
+
get hostname(): string;
|
|
18114
|
+
/**
|
|
18115
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
18116
|
+
*
|
|
18117
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
18118
|
+
*/
|
|
18119
|
+
get port(): string;
|
|
18120
|
+
/**
|
|
18121
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
18122
|
+
*
|
|
18123
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
18124
|
+
*/
|
|
18125
|
+
get pathname(): string;
|
|
18126
|
+
/**
|
|
18127
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
18128
|
+
*
|
|
18129
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
18130
|
+
*/
|
|
18131
|
+
get search(): string;
|
|
18132
|
+
/**
|
|
18133
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
18134
|
+
*
|
|
18135
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
18136
|
+
*/
|
|
18137
|
+
get hash(): string;
|
|
18138
|
+
/**
|
|
18139
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
18140
|
+
*
|
|
18141
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
18142
|
+
*/
|
|
18143
|
+
get hasRegExpGroups(): boolean;
|
|
18144
|
+
/**
|
|
18145
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
18146
|
+
*
|
|
18147
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
18148
|
+
*/
|
|
18149
|
+
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
18150
|
+
/**
|
|
18151
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
18152
|
+
*
|
|
18153
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
18154
|
+
*/
|
|
18155
|
+
exec(
|
|
18156
|
+
input?: string | URLPatternInit,
|
|
18157
|
+
baseURL?: string,
|
|
18158
|
+
): URLPatternResult | null;
|
|
18159
|
+
}
|
|
18160
|
+
interface URLPatternInit {
|
|
18161
|
+
protocol?: string;
|
|
18162
|
+
username?: string;
|
|
18163
|
+
password?: string;
|
|
18164
|
+
hostname?: string;
|
|
18165
|
+
port?: string;
|
|
18166
|
+
pathname?: string;
|
|
18167
|
+
search?: string;
|
|
18168
|
+
hash?: string;
|
|
18169
|
+
baseURL?: string;
|
|
18170
|
+
}
|
|
18171
|
+
interface URLPatternComponentResult {
|
|
18172
|
+
input: string;
|
|
18173
|
+
groups: Record<string, string | undefined>;
|
|
18174
|
+
}
|
|
18175
|
+
interface URLPatternResult {
|
|
18176
|
+
inputs: (string | URLPatternInit)[];
|
|
18177
|
+
protocol: URLPatternComponentResult;
|
|
18178
|
+
username: URLPatternComponentResult;
|
|
18179
|
+
password: URLPatternComponentResult;
|
|
18180
|
+
hostname: URLPatternComponentResult;
|
|
18181
|
+
port: URLPatternComponentResult;
|
|
18182
|
+
pathname: URLPatternComponentResult;
|
|
18183
|
+
search: URLPatternComponentResult;
|
|
18184
|
+
hash: URLPatternComponentResult;
|
|
18185
|
+
}
|
|
18186
|
+
interface URLPatternOptions {
|
|
18187
|
+
ignoreCase?: boolean;
|
|
18188
|
+
}
|
|
18176
18189
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
18177
18190
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
18178
18191
|
// https://opensource.org/licenses/Apache-2.0
|
package/experimental/index.ts
CHANGED
|
@@ -813,7 +813,10 @@ export interface DurableObjectStorage {
|
|
|
813
813
|
snapshot(
|
|
814
814
|
options?: DurableObjectSnapshotOptions,
|
|
815
815
|
): Promise<DurableObjectSnapshot>;
|
|
816
|
-
onNextSessionRestore(
|
|
816
|
+
onNextSessionRestore(
|
|
817
|
+
target: DurableObjectSnapshot | string,
|
|
818
|
+
options?: DurableObjectRestoreOptions,
|
|
819
|
+
): Promise<string>;
|
|
817
820
|
/** @deprecated Use `ctx.configureReadReplication()` instead. */
|
|
818
821
|
ensureReplicas(): void;
|
|
819
822
|
/** @deprecated Use `ctx.configureReadReplication()` instead. */
|
|
@@ -828,6 +831,9 @@ export interface DurableObjectReadReplicationOptions {
|
|
|
828
831
|
export interface DurableObjectSnapshotOptions {
|
|
829
832
|
bookmark?: string;
|
|
830
833
|
}
|
|
834
|
+
export interface DurableObjectRestoreOptions {
|
|
835
|
+
kvData?: Record<string, any>;
|
|
836
|
+
}
|
|
831
837
|
export interface DurableObjectListOptions {
|
|
832
838
|
start?: string;
|
|
833
839
|
startAfter?: string;
|
|
@@ -3574,116 +3580,6 @@ export interface TraceMetrics {
|
|
|
3574
3580
|
export interface UnsafeTraceMetrics {
|
|
3575
3581
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3576
3582
|
}
|
|
3577
|
-
/**
|
|
3578
|
-
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3579
|
-
*
|
|
3580
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3581
|
-
*/
|
|
3582
|
-
export declare class URLPattern {
|
|
3583
|
-
constructor(
|
|
3584
|
-
input?: string | URLPatternInit,
|
|
3585
|
-
baseURL?: string | URLPatternOptions,
|
|
3586
|
-
patternOptions?: URLPatternOptions,
|
|
3587
|
-
);
|
|
3588
|
-
/**
|
|
3589
|
-
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3590
|
-
*
|
|
3591
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3592
|
-
*/
|
|
3593
|
-
get protocol(): string;
|
|
3594
|
-
/**
|
|
3595
|
-
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3596
|
-
*
|
|
3597
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3598
|
-
*/
|
|
3599
|
-
get username(): string;
|
|
3600
|
-
/**
|
|
3601
|
-
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3602
|
-
*
|
|
3603
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3604
|
-
*/
|
|
3605
|
-
get password(): string;
|
|
3606
|
-
/**
|
|
3607
|
-
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3608
|
-
*
|
|
3609
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3610
|
-
*/
|
|
3611
|
-
get hostname(): string;
|
|
3612
|
-
/**
|
|
3613
|
-
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3614
|
-
*
|
|
3615
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3616
|
-
*/
|
|
3617
|
-
get port(): string;
|
|
3618
|
-
/**
|
|
3619
|
-
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3620
|
-
*
|
|
3621
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3622
|
-
*/
|
|
3623
|
-
get pathname(): string;
|
|
3624
|
-
/**
|
|
3625
|
-
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3626
|
-
*
|
|
3627
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3628
|
-
*/
|
|
3629
|
-
get search(): string;
|
|
3630
|
-
/**
|
|
3631
|
-
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3632
|
-
*
|
|
3633
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3634
|
-
*/
|
|
3635
|
-
get hash(): string;
|
|
3636
|
-
/**
|
|
3637
|
-
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3638
|
-
*
|
|
3639
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3640
|
-
*/
|
|
3641
|
-
get hasRegExpGroups(): boolean;
|
|
3642
|
-
/**
|
|
3643
|
-
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3644
|
-
*
|
|
3645
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3646
|
-
*/
|
|
3647
|
-
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3648
|
-
/**
|
|
3649
|
-
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3650
|
-
*
|
|
3651
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3652
|
-
*/
|
|
3653
|
-
exec(
|
|
3654
|
-
input?: string | URLPatternInit,
|
|
3655
|
-
baseURL?: string,
|
|
3656
|
-
): URLPatternResult | null;
|
|
3657
|
-
}
|
|
3658
|
-
export interface URLPatternInit {
|
|
3659
|
-
protocol?: string;
|
|
3660
|
-
username?: string;
|
|
3661
|
-
password?: string;
|
|
3662
|
-
hostname?: string;
|
|
3663
|
-
port?: string;
|
|
3664
|
-
pathname?: string;
|
|
3665
|
-
search?: string;
|
|
3666
|
-
hash?: string;
|
|
3667
|
-
baseURL?: string;
|
|
3668
|
-
}
|
|
3669
|
-
export interface URLPatternComponentResult {
|
|
3670
|
-
input: string;
|
|
3671
|
-
groups: Record<string, string>;
|
|
3672
|
-
}
|
|
3673
|
-
export interface URLPatternResult {
|
|
3674
|
-
inputs: (string | URLPatternInit)[];
|
|
3675
|
-
protocol: URLPatternComponentResult;
|
|
3676
|
-
username: URLPatternComponentResult;
|
|
3677
|
-
password: URLPatternComponentResult;
|
|
3678
|
-
hostname: URLPatternComponentResult;
|
|
3679
|
-
port: URLPatternComponentResult;
|
|
3680
|
-
pathname: URLPatternComponentResult;
|
|
3681
|
-
search: URLPatternComponentResult;
|
|
3682
|
-
hash: URLPatternComponentResult;
|
|
3683
|
-
}
|
|
3684
|
-
export interface URLPatternOptions {
|
|
3685
|
-
ignoreCase?: boolean;
|
|
3686
|
-
}
|
|
3687
3583
|
export type WebSocketEventMap = {
|
|
3688
3584
|
close: CloseEvent;
|
|
3689
3585
|
message: MessageEvent;
|
|
@@ -15264,6 +15160,10 @@ export interface ForwardableEmailMessage extends EmailMessage {
|
|
|
15264
15160
|
* Size of the email message content.
|
|
15265
15161
|
*/
|
|
15266
15162
|
readonly rawSize: number;
|
|
15163
|
+
/**
|
|
15164
|
+
* Whether this email message can be forwarded with `forward()`.
|
|
15165
|
+
*/
|
|
15166
|
+
readonly canBeForwarded: boolean;
|
|
15267
15167
|
/**
|
|
15268
15168
|
* Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.
|
|
15269
15169
|
* @param reason The reject reason.
|
|
@@ -18073,6 +17973,119 @@ export declare class URLSearchParams {
|
|
|
18073
17973
|
toString(): string;
|
|
18074
17974
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
18075
17975
|
}
|
|
17976
|
+
// URLPattern, as the URLPattern standard declares it, for both parsers.
|
|
17977
|
+
// The legacy parser (the urlpattern_original compatibility flag, the
|
|
17978
|
+
// default before 2025-05-01) has no hasRegExpGroups.
|
|
17979
|
+
/**
|
|
17980
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
17981
|
+
*
|
|
17982
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
17983
|
+
*/
|
|
17984
|
+
export declare class URLPattern {
|
|
17985
|
+
constructor(
|
|
17986
|
+
input?: string | URLPatternInit,
|
|
17987
|
+
baseURL?: string | URLPatternOptions,
|
|
17988
|
+
patternOptions?: URLPatternOptions,
|
|
17989
|
+
);
|
|
17990
|
+
/**
|
|
17991
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
17992
|
+
*
|
|
17993
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
17994
|
+
*/
|
|
17995
|
+
get protocol(): string;
|
|
17996
|
+
/**
|
|
17997
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
17998
|
+
*
|
|
17999
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
18000
|
+
*/
|
|
18001
|
+
get username(): string;
|
|
18002
|
+
/**
|
|
18003
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
18004
|
+
*
|
|
18005
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
18006
|
+
*/
|
|
18007
|
+
get password(): string;
|
|
18008
|
+
/**
|
|
18009
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
18010
|
+
*
|
|
18011
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
18012
|
+
*/
|
|
18013
|
+
get hostname(): string;
|
|
18014
|
+
/**
|
|
18015
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
18016
|
+
*
|
|
18017
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
18018
|
+
*/
|
|
18019
|
+
get port(): string;
|
|
18020
|
+
/**
|
|
18021
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
18022
|
+
*
|
|
18023
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
18024
|
+
*/
|
|
18025
|
+
get pathname(): string;
|
|
18026
|
+
/**
|
|
18027
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
18028
|
+
*
|
|
18029
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
18030
|
+
*/
|
|
18031
|
+
get search(): string;
|
|
18032
|
+
/**
|
|
18033
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
18034
|
+
*
|
|
18035
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
18036
|
+
*/
|
|
18037
|
+
get hash(): string;
|
|
18038
|
+
/**
|
|
18039
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
18040
|
+
*
|
|
18041
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
18042
|
+
*/
|
|
18043
|
+
get hasRegExpGroups(): boolean;
|
|
18044
|
+
/**
|
|
18045
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
18046
|
+
*
|
|
18047
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
18048
|
+
*/
|
|
18049
|
+
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
18050
|
+
/**
|
|
18051
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
18052
|
+
*
|
|
18053
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
18054
|
+
*/
|
|
18055
|
+
exec(
|
|
18056
|
+
input?: string | URLPatternInit,
|
|
18057
|
+
baseURL?: string,
|
|
18058
|
+
): URLPatternResult | null;
|
|
18059
|
+
}
|
|
18060
|
+
export interface URLPatternInit {
|
|
18061
|
+
protocol?: string;
|
|
18062
|
+
username?: string;
|
|
18063
|
+
password?: string;
|
|
18064
|
+
hostname?: string;
|
|
18065
|
+
port?: string;
|
|
18066
|
+
pathname?: string;
|
|
18067
|
+
search?: string;
|
|
18068
|
+
hash?: string;
|
|
18069
|
+
baseURL?: string;
|
|
18070
|
+
}
|
|
18071
|
+
export interface URLPatternComponentResult {
|
|
18072
|
+
input: string;
|
|
18073
|
+
groups: Record<string, string | undefined>;
|
|
18074
|
+
}
|
|
18075
|
+
export interface URLPatternResult {
|
|
18076
|
+
inputs: (string | URLPatternInit)[];
|
|
18077
|
+
protocol: URLPatternComponentResult;
|
|
18078
|
+
username: URLPatternComponentResult;
|
|
18079
|
+
password: URLPatternComponentResult;
|
|
18080
|
+
hostname: URLPatternComponentResult;
|
|
18081
|
+
port: URLPatternComponentResult;
|
|
18082
|
+
pathname: URLPatternComponentResult;
|
|
18083
|
+
search: URLPatternComponentResult;
|
|
18084
|
+
hash: URLPatternComponentResult;
|
|
18085
|
+
}
|
|
18086
|
+
export interface URLPatternOptions {
|
|
18087
|
+
ignoreCase?: boolean;
|
|
18088
|
+
}
|
|
18076
18089
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
18077
18090
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
18078
18091
|
// https://opensource.org/licenses/Apache-2.0
|
package/index.d.ts
CHANGED
|
@@ -3413,116 +3413,6 @@ interface TraceMetrics {
|
|
|
3413
3413
|
interface UnsafeTraceMetrics {
|
|
3414
3414
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3415
3415
|
}
|
|
3416
|
-
/**
|
|
3417
|
-
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3418
|
-
*
|
|
3419
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3420
|
-
*/
|
|
3421
|
-
declare class URLPattern {
|
|
3422
|
-
constructor(
|
|
3423
|
-
input?: string | URLPatternInit,
|
|
3424
|
-
baseURL?: string | URLPatternOptions,
|
|
3425
|
-
patternOptions?: URLPatternOptions,
|
|
3426
|
-
);
|
|
3427
|
-
/**
|
|
3428
|
-
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3429
|
-
*
|
|
3430
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3431
|
-
*/
|
|
3432
|
-
get protocol(): string;
|
|
3433
|
-
/**
|
|
3434
|
-
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3435
|
-
*
|
|
3436
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3437
|
-
*/
|
|
3438
|
-
get username(): string;
|
|
3439
|
-
/**
|
|
3440
|
-
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3441
|
-
*
|
|
3442
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3443
|
-
*/
|
|
3444
|
-
get password(): string;
|
|
3445
|
-
/**
|
|
3446
|
-
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3447
|
-
*
|
|
3448
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3449
|
-
*/
|
|
3450
|
-
get hostname(): string;
|
|
3451
|
-
/**
|
|
3452
|
-
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3453
|
-
*
|
|
3454
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3455
|
-
*/
|
|
3456
|
-
get port(): string;
|
|
3457
|
-
/**
|
|
3458
|
-
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3459
|
-
*
|
|
3460
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3461
|
-
*/
|
|
3462
|
-
get pathname(): string;
|
|
3463
|
-
/**
|
|
3464
|
-
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3465
|
-
*
|
|
3466
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3467
|
-
*/
|
|
3468
|
-
get search(): string;
|
|
3469
|
-
/**
|
|
3470
|
-
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3471
|
-
*
|
|
3472
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3473
|
-
*/
|
|
3474
|
-
get hash(): string;
|
|
3475
|
-
/**
|
|
3476
|
-
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3477
|
-
*
|
|
3478
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3479
|
-
*/
|
|
3480
|
-
get hasRegExpGroups(): boolean;
|
|
3481
|
-
/**
|
|
3482
|
-
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3483
|
-
*
|
|
3484
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3485
|
-
*/
|
|
3486
|
-
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3487
|
-
/**
|
|
3488
|
-
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3489
|
-
*
|
|
3490
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3491
|
-
*/
|
|
3492
|
-
exec(
|
|
3493
|
-
input?: string | URLPatternInit,
|
|
3494
|
-
baseURL?: string,
|
|
3495
|
-
): URLPatternResult | null;
|
|
3496
|
-
}
|
|
3497
|
-
interface URLPatternInit {
|
|
3498
|
-
protocol?: string;
|
|
3499
|
-
username?: string;
|
|
3500
|
-
password?: string;
|
|
3501
|
-
hostname?: string;
|
|
3502
|
-
port?: string;
|
|
3503
|
-
pathname?: string;
|
|
3504
|
-
search?: string;
|
|
3505
|
-
hash?: string;
|
|
3506
|
-
baseURL?: string;
|
|
3507
|
-
}
|
|
3508
|
-
interface URLPatternComponentResult {
|
|
3509
|
-
input: string;
|
|
3510
|
-
groups: Record<string, string>;
|
|
3511
|
-
}
|
|
3512
|
-
interface URLPatternResult {
|
|
3513
|
-
inputs: (string | URLPatternInit)[];
|
|
3514
|
-
protocol: URLPatternComponentResult;
|
|
3515
|
-
username: URLPatternComponentResult;
|
|
3516
|
-
password: URLPatternComponentResult;
|
|
3517
|
-
hostname: URLPatternComponentResult;
|
|
3518
|
-
port: URLPatternComponentResult;
|
|
3519
|
-
pathname: URLPatternComponentResult;
|
|
3520
|
-
search: URLPatternComponentResult;
|
|
3521
|
-
hash: URLPatternComponentResult;
|
|
3522
|
-
}
|
|
3523
|
-
interface URLPatternOptions {
|
|
3524
|
-
ignoreCase?: boolean;
|
|
3525
|
-
}
|
|
3526
3416
|
type WebSocketEventMap = {
|
|
3527
3417
|
close: CloseEvent;
|
|
3528
3418
|
message: MessageEvent;
|
|
@@ -14910,6 +14800,10 @@ interface ForwardableEmailMessage extends EmailMessage {
|
|
|
14910
14800
|
* Size of the email message content.
|
|
14911
14801
|
*/
|
|
14912
14802
|
readonly rawSize: number;
|
|
14803
|
+
/**
|
|
14804
|
+
* Whether this email message can be forwarded with `forward()`.
|
|
14805
|
+
*/
|
|
14806
|
+
readonly canBeForwarded: boolean;
|
|
14913
14807
|
/**
|
|
14914
14808
|
* Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.
|
|
14915
14809
|
* @param reason The reject reason.
|
|
@@ -17812,6 +17706,119 @@ declare class URLSearchParams {
|
|
|
17812
17706
|
toString(): string;
|
|
17813
17707
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
17814
17708
|
}
|
|
17709
|
+
// URLPattern, as the URLPattern standard declares it, for both parsers.
|
|
17710
|
+
// The legacy parser (the urlpattern_original compatibility flag, the
|
|
17711
|
+
// default before 2025-05-01) has no hasRegExpGroups.
|
|
17712
|
+
/**
|
|
17713
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
17714
|
+
*
|
|
17715
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
17716
|
+
*/
|
|
17717
|
+
declare class URLPattern {
|
|
17718
|
+
constructor(
|
|
17719
|
+
input?: string | URLPatternInit,
|
|
17720
|
+
baseURL?: string | URLPatternOptions,
|
|
17721
|
+
patternOptions?: URLPatternOptions,
|
|
17722
|
+
);
|
|
17723
|
+
/**
|
|
17724
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
17725
|
+
*
|
|
17726
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
17727
|
+
*/
|
|
17728
|
+
get protocol(): string;
|
|
17729
|
+
/**
|
|
17730
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
17731
|
+
*
|
|
17732
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
17733
|
+
*/
|
|
17734
|
+
get username(): string;
|
|
17735
|
+
/**
|
|
17736
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
17737
|
+
*
|
|
17738
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
17739
|
+
*/
|
|
17740
|
+
get password(): string;
|
|
17741
|
+
/**
|
|
17742
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
17743
|
+
*
|
|
17744
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
17745
|
+
*/
|
|
17746
|
+
get hostname(): string;
|
|
17747
|
+
/**
|
|
17748
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
17749
|
+
*
|
|
17750
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
17751
|
+
*/
|
|
17752
|
+
get port(): string;
|
|
17753
|
+
/**
|
|
17754
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
17755
|
+
*
|
|
17756
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
17757
|
+
*/
|
|
17758
|
+
get pathname(): string;
|
|
17759
|
+
/**
|
|
17760
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
17761
|
+
*
|
|
17762
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
17763
|
+
*/
|
|
17764
|
+
get search(): string;
|
|
17765
|
+
/**
|
|
17766
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
17767
|
+
*
|
|
17768
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
17769
|
+
*/
|
|
17770
|
+
get hash(): string;
|
|
17771
|
+
/**
|
|
17772
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
17773
|
+
*
|
|
17774
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
17775
|
+
*/
|
|
17776
|
+
get hasRegExpGroups(): boolean;
|
|
17777
|
+
/**
|
|
17778
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
17779
|
+
*
|
|
17780
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
17781
|
+
*/
|
|
17782
|
+
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
17783
|
+
/**
|
|
17784
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
17785
|
+
*
|
|
17786
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
17787
|
+
*/
|
|
17788
|
+
exec(
|
|
17789
|
+
input?: string | URLPatternInit,
|
|
17790
|
+
baseURL?: string,
|
|
17791
|
+
): URLPatternResult | null;
|
|
17792
|
+
}
|
|
17793
|
+
interface URLPatternInit {
|
|
17794
|
+
protocol?: string;
|
|
17795
|
+
username?: string;
|
|
17796
|
+
password?: string;
|
|
17797
|
+
hostname?: string;
|
|
17798
|
+
port?: string;
|
|
17799
|
+
pathname?: string;
|
|
17800
|
+
search?: string;
|
|
17801
|
+
hash?: string;
|
|
17802
|
+
baseURL?: string;
|
|
17803
|
+
}
|
|
17804
|
+
interface URLPatternComponentResult {
|
|
17805
|
+
input: string;
|
|
17806
|
+
groups: Record<string, string | undefined>;
|
|
17807
|
+
}
|
|
17808
|
+
interface URLPatternResult {
|
|
17809
|
+
inputs: (string | URLPatternInit)[];
|
|
17810
|
+
protocol: URLPatternComponentResult;
|
|
17811
|
+
username: URLPatternComponentResult;
|
|
17812
|
+
password: URLPatternComponentResult;
|
|
17813
|
+
hostname: URLPatternComponentResult;
|
|
17814
|
+
port: URLPatternComponentResult;
|
|
17815
|
+
pathname: URLPatternComponentResult;
|
|
17816
|
+
search: URLPatternComponentResult;
|
|
17817
|
+
hash: URLPatternComponentResult;
|
|
17818
|
+
}
|
|
17819
|
+
interface URLPatternOptions {
|
|
17820
|
+
ignoreCase?: boolean;
|
|
17821
|
+
}
|
|
17815
17822
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
17816
17823
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
17817
17824
|
// https://opensource.org/licenses/Apache-2.0
|
package/index.ts
CHANGED
|
@@ -3422,116 +3422,6 @@ export interface TraceMetrics {
|
|
|
3422
3422
|
export interface UnsafeTraceMetrics {
|
|
3423
3423
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3424
3424
|
}
|
|
3425
|
-
/**
|
|
3426
|
-
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
3427
|
-
*
|
|
3428
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
3429
|
-
*/
|
|
3430
|
-
export declare class URLPattern {
|
|
3431
|
-
constructor(
|
|
3432
|
-
input?: string | URLPatternInit,
|
|
3433
|
-
baseURL?: string | URLPatternOptions,
|
|
3434
|
-
patternOptions?: URLPatternOptions,
|
|
3435
|
-
);
|
|
3436
|
-
/**
|
|
3437
|
-
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3438
|
-
*
|
|
3439
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3440
|
-
*/
|
|
3441
|
-
get protocol(): string;
|
|
3442
|
-
/**
|
|
3443
|
-
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3444
|
-
*
|
|
3445
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3446
|
-
*/
|
|
3447
|
-
get username(): string;
|
|
3448
|
-
/**
|
|
3449
|
-
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3450
|
-
*
|
|
3451
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3452
|
-
*/
|
|
3453
|
-
get password(): string;
|
|
3454
|
-
/**
|
|
3455
|
-
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3456
|
-
*
|
|
3457
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3458
|
-
*/
|
|
3459
|
-
get hostname(): string;
|
|
3460
|
-
/**
|
|
3461
|
-
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
3462
|
-
*
|
|
3463
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
3464
|
-
*/
|
|
3465
|
-
get port(): string;
|
|
3466
|
-
/**
|
|
3467
|
-
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
3468
|
-
*
|
|
3469
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
3470
|
-
*/
|
|
3471
|
-
get pathname(): string;
|
|
3472
|
-
/**
|
|
3473
|
-
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3474
|
-
*
|
|
3475
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3476
|
-
*/
|
|
3477
|
-
get search(): string;
|
|
3478
|
-
/**
|
|
3479
|
-
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3480
|
-
*
|
|
3481
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3482
|
-
*/
|
|
3483
|
-
get hash(): string;
|
|
3484
|
-
/**
|
|
3485
|
-
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3486
|
-
*
|
|
3487
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3488
|
-
*/
|
|
3489
|
-
get hasRegExpGroups(): boolean;
|
|
3490
|
-
/**
|
|
3491
|
-
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3492
|
-
*
|
|
3493
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3494
|
-
*/
|
|
3495
|
-
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3496
|
-
/**
|
|
3497
|
-
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3498
|
-
*
|
|
3499
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3500
|
-
*/
|
|
3501
|
-
exec(
|
|
3502
|
-
input?: string | URLPatternInit,
|
|
3503
|
-
baseURL?: string,
|
|
3504
|
-
): URLPatternResult | null;
|
|
3505
|
-
}
|
|
3506
|
-
export interface URLPatternInit {
|
|
3507
|
-
protocol?: string;
|
|
3508
|
-
username?: string;
|
|
3509
|
-
password?: string;
|
|
3510
|
-
hostname?: string;
|
|
3511
|
-
port?: string;
|
|
3512
|
-
pathname?: string;
|
|
3513
|
-
search?: string;
|
|
3514
|
-
hash?: string;
|
|
3515
|
-
baseURL?: string;
|
|
3516
|
-
}
|
|
3517
|
-
export interface URLPatternComponentResult {
|
|
3518
|
-
input: string;
|
|
3519
|
-
groups: Record<string, string>;
|
|
3520
|
-
}
|
|
3521
|
-
export interface URLPatternResult {
|
|
3522
|
-
inputs: (string | URLPatternInit)[];
|
|
3523
|
-
protocol: URLPatternComponentResult;
|
|
3524
|
-
username: URLPatternComponentResult;
|
|
3525
|
-
password: URLPatternComponentResult;
|
|
3526
|
-
hostname: URLPatternComponentResult;
|
|
3527
|
-
port: URLPatternComponentResult;
|
|
3528
|
-
pathname: URLPatternComponentResult;
|
|
3529
|
-
search: URLPatternComponentResult;
|
|
3530
|
-
hash: URLPatternComponentResult;
|
|
3531
|
-
}
|
|
3532
|
-
export interface URLPatternOptions {
|
|
3533
|
-
ignoreCase?: boolean;
|
|
3534
|
-
}
|
|
3535
3425
|
export type WebSocketEventMap = {
|
|
3536
3426
|
close: CloseEvent;
|
|
3537
3427
|
message: MessageEvent;
|
|
@@ -14906,6 +14796,10 @@ export interface ForwardableEmailMessage extends EmailMessage {
|
|
|
14906
14796
|
* Size of the email message content.
|
|
14907
14797
|
*/
|
|
14908
14798
|
readonly rawSize: number;
|
|
14799
|
+
/**
|
|
14800
|
+
* Whether this email message can be forwarded with `forward()`.
|
|
14801
|
+
*/
|
|
14802
|
+
readonly canBeForwarded: boolean;
|
|
14909
14803
|
/**
|
|
14910
14804
|
* Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.
|
|
14911
14805
|
* @param reason The reject reason.
|
|
@@ -17715,6 +17609,119 @@ export declare class URLSearchParams {
|
|
|
17715
17609
|
toString(): string;
|
|
17716
17610
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
17717
17611
|
}
|
|
17612
|
+
// URLPattern, as the URLPattern standard declares it, for both parsers.
|
|
17613
|
+
// The legacy parser (the urlpattern_original compatibility flag, the
|
|
17614
|
+
// default before 2025-05-01) has no hasRegExpGroups.
|
|
17615
|
+
/**
|
|
17616
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
17617
|
+
*
|
|
17618
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
17619
|
+
*/
|
|
17620
|
+
export declare class URLPattern {
|
|
17621
|
+
constructor(
|
|
17622
|
+
input?: string | URLPatternInit,
|
|
17623
|
+
baseURL?: string | URLPatternOptions,
|
|
17624
|
+
patternOptions?: URLPatternOptions,
|
|
17625
|
+
);
|
|
17626
|
+
/**
|
|
17627
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
17628
|
+
*
|
|
17629
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
17630
|
+
*/
|
|
17631
|
+
get protocol(): string;
|
|
17632
|
+
/**
|
|
17633
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
17634
|
+
*
|
|
17635
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
17636
|
+
*/
|
|
17637
|
+
get username(): string;
|
|
17638
|
+
/**
|
|
17639
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
17640
|
+
*
|
|
17641
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
17642
|
+
*/
|
|
17643
|
+
get password(): string;
|
|
17644
|
+
/**
|
|
17645
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
17646
|
+
*
|
|
17647
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
17648
|
+
*/
|
|
17649
|
+
get hostname(): string;
|
|
17650
|
+
/**
|
|
17651
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
17652
|
+
*
|
|
17653
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
17654
|
+
*/
|
|
17655
|
+
get port(): string;
|
|
17656
|
+
/**
|
|
17657
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
17658
|
+
*
|
|
17659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
17660
|
+
*/
|
|
17661
|
+
get pathname(): string;
|
|
17662
|
+
/**
|
|
17663
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
17664
|
+
*
|
|
17665
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
17666
|
+
*/
|
|
17667
|
+
get search(): string;
|
|
17668
|
+
/**
|
|
17669
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
17670
|
+
*
|
|
17671
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
17672
|
+
*/
|
|
17673
|
+
get hash(): string;
|
|
17674
|
+
/**
|
|
17675
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
17676
|
+
*
|
|
17677
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
17678
|
+
*/
|
|
17679
|
+
get hasRegExpGroups(): boolean;
|
|
17680
|
+
/**
|
|
17681
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
17682
|
+
*
|
|
17683
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
17684
|
+
*/
|
|
17685
|
+
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
17686
|
+
/**
|
|
17687
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
17688
|
+
*
|
|
17689
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
17690
|
+
*/
|
|
17691
|
+
exec(
|
|
17692
|
+
input?: string | URLPatternInit,
|
|
17693
|
+
baseURL?: string,
|
|
17694
|
+
): URLPatternResult | null;
|
|
17695
|
+
}
|
|
17696
|
+
export interface URLPatternInit {
|
|
17697
|
+
protocol?: string;
|
|
17698
|
+
username?: string;
|
|
17699
|
+
password?: string;
|
|
17700
|
+
hostname?: string;
|
|
17701
|
+
port?: string;
|
|
17702
|
+
pathname?: string;
|
|
17703
|
+
search?: string;
|
|
17704
|
+
hash?: string;
|
|
17705
|
+
baseURL?: string;
|
|
17706
|
+
}
|
|
17707
|
+
export interface URLPatternComponentResult {
|
|
17708
|
+
input: string;
|
|
17709
|
+
groups: Record<string, string | undefined>;
|
|
17710
|
+
}
|
|
17711
|
+
export interface URLPatternResult {
|
|
17712
|
+
inputs: (string | URLPatternInit)[];
|
|
17713
|
+
protocol: URLPatternComponentResult;
|
|
17714
|
+
username: URLPatternComponentResult;
|
|
17715
|
+
password: URLPatternComponentResult;
|
|
17716
|
+
hostname: URLPatternComponentResult;
|
|
17717
|
+
port: URLPatternComponentResult;
|
|
17718
|
+
pathname: URLPatternComponentResult;
|
|
17719
|
+
search: URLPatternComponentResult;
|
|
17720
|
+
hash: URLPatternComponentResult;
|
|
17721
|
+
}
|
|
17722
|
+
export interface URLPatternOptions {
|
|
17723
|
+
ignoreCase?: boolean;
|
|
17724
|
+
}
|
|
17718
17725
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
17719
17726
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
17720
17727
|
// https://opensource.org/licenses/Apache-2.0
|
package/package.json
CHANGED