kinetex 0.0.2 → 1.0.0-rc.2
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/LICENSE +16 -4
- package/README.md +2434 -701
- package/dist/browser/kinetex.esm.js +86 -0
- package/dist/browser/kinetex.js +19056 -1999
- package/dist/browser/kinetex.min.js +85 -8
- package/dist/cjs/aws-sigv4.js +903 -0
- package/dist/cjs/cache.js +1099 -0
- package/dist/cjs/circuit-breaker.js +362 -0
- package/dist/cjs/client.js +2890 -0
- package/dist/cjs/cookie-parser.js +2182 -0
- package/dist/cjs/cookie-store.js +783 -0
- package/dist/cjs/cookiejar.js +175 -0
- package/dist/cjs/core.js +1267 -0
- package/dist/cjs/dedup.js +267 -0
- package/dist/cjs/digest.js +552 -0
- package/dist/cjs/graphql.js +1086 -0
- package/dist/cjs/headers.js +2264 -0
- package/dist/cjs/interceptors.js +1115 -0
- package/dist/cjs/lifecycle.js +886 -0
- package/dist/cjs/logging.js +887 -0
- package/dist/cjs/mod.js +98 -0
- package/dist/cjs/package.json +1 -3
- package/dist/cjs/pagination.js +535 -0
- package/dist/cjs/progress.js +694 -0
- package/dist/cjs/response.js +1212 -0
- package/dist/cjs/socks5.js +681 -0
- package/dist/cjs/sse.js +827 -0
- package/dist/cjs/types.js +217 -0
- package/dist/cjs/url.js +1269 -0
- package/dist/cjs/utils.js +901 -0
- package/dist/cjs/worker.js +56 -0
- package/dist/cjs/ws.js +1099 -0
- package/dist/esm/aws-sigv4.js +904 -0
- package/dist/esm/aws-sigv4.js.map +1 -0
- package/dist/esm/cache.js +1100 -0
- package/dist/esm/cache.js.map +1 -0
- package/dist/esm/circuit-breaker.js +363 -0
- package/dist/esm/circuit-breaker.js.map +1 -0
- package/dist/esm/client.js +2891 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/cookie-parser.js +2183 -0
- package/dist/esm/cookie-parser.js.map +1 -0
- package/dist/esm/cookie-store.js +784 -0
- package/dist/esm/cookie-store.js.map +1 -0
- package/dist/esm/cookiejar.js +176 -0
- package/dist/esm/cookiejar.js.map +1 -0
- package/dist/esm/core.js +1268 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/dedup.js +268 -0
- package/dist/esm/dedup.js.map +1 -0
- package/dist/esm/digest.js +553 -0
- package/dist/esm/digest.js.map +1 -0
- package/dist/esm/graphql.js +1087 -0
- package/dist/esm/graphql.js.map +1 -0
- package/dist/esm/headers.js +2265 -0
- package/dist/esm/headers.js.map +1 -0
- package/dist/esm/interceptors.js +1116 -0
- package/dist/esm/interceptors.js.map +1 -0
- package/dist/esm/lifecycle.js +887 -0
- package/dist/esm/lifecycle.js.map +1 -0
- package/dist/esm/logging.js +888 -0
- package/dist/esm/logging.js.map +1 -0
- package/dist/esm/mod.js +99 -0
- package/dist/esm/mod.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/pagination.js +536 -0
- package/dist/esm/pagination.js.map +1 -0
- package/dist/esm/progress.js +695 -0
- package/dist/esm/progress.js.map +1 -0
- package/dist/esm/response.js +1213 -0
- package/dist/esm/response.js.map +1 -0
- package/dist/esm/socks5.js +682 -0
- package/dist/esm/socks5.js.map +1 -0
- package/dist/esm/sse.js +828 -0
- package/dist/esm/sse.js.map +1 -0
- package/dist/esm/types.js +218 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/url.js +1270 -0
- package/dist/esm/url.js.map +1 -0
- package/dist/esm/utils.js +902 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/worker.js +57 -0
- package/dist/esm/worker.js.map +1 -0
- package/dist/esm/ws.js +1100 -0
- package/dist/esm/ws.js.map +1 -0
- package/dist/types/aws-sigv4.d.ts +382 -0
- package/dist/types/aws-sigv4.d.ts.map +1 -0
- package/dist/types/cache.d.ts +397 -0
- package/dist/types/cache.d.ts.map +1 -0
- package/dist/types/circuit-breaker.d.ts +241 -0
- package/dist/types/circuit-breaker.d.ts.map +1 -0
- package/dist/types/client.d.ts +616 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/cookie-parser.d.ts +203 -0
- package/dist/types/cookie-parser.d.ts.map +1 -0
- package/dist/types/cookie-store.d.ts +316 -0
- package/dist/types/cookie-store.d.ts.map +1 -0
- package/dist/types/cookiejar.d.ts +165 -0
- package/dist/types/cookiejar.d.ts.map +1 -0
- package/dist/types/core.d.ts +297 -0
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/dedup.d.ts +164 -0
- package/dist/types/dedup.d.ts.map +1 -0
- package/dist/types/digest.d.ts +136 -0
- package/dist/types/digest.d.ts.map +1 -0
- package/dist/types/graphql.d.ts +530 -0
- package/dist/types/graphql.d.ts.map +1 -0
- package/dist/types/headers.d.ts +1119 -0
- package/dist/types/headers.d.ts.map +1 -0
- package/dist/types/interceptors.d.ts +681 -0
- package/dist/types/interceptors.d.ts.map +1 -0
- package/dist/types/lifecycle.d.ts +553 -0
- package/dist/types/lifecycle.d.ts.map +1 -0
- package/dist/types/logging.d.ts +518 -0
- package/dist/types/logging.d.ts.map +1 -0
- package/dist/types/mod.d.ts +92 -0
- package/dist/types/mod.d.ts.map +1 -0
- package/dist/types/pagination.d.ts +401 -0
- package/dist/types/pagination.d.ts.map +1 -0
- package/dist/types/progress.d.ts +344 -0
- package/dist/types/progress.d.ts.map +1 -0
- package/dist/types/response.d.ts +484 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/socks5.d.ts +218 -0
- package/dist/types/socks5.d.ts.map +1 -0
- package/dist/types/sse.d.ts +399 -0
- package/dist/types/sse.d.ts.map +1 -0
- package/dist/types/types.d.ts +967 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/url.d.ts +530 -0
- package/dist/types/url.d.ts.map +1 -0
- package/dist/types/utils.d.ts +300 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/worker.d.ts +55 -0
- package/dist/types/worker.d.ts.map +1 -0
- package/dist/types/ws.d.ts +480 -0
- package/dist/types/ws.d.ts.map +1 -0
- package/package.json +194 -127
- package/CHANGELOG.md +0 -50
- package/SECURITY.md +0 -31
- package/dist/browser/kinetex.cjs.js +0 -9
- package/dist/browser/kinetex.esm.min.js +0 -9
- package/dist/browser/kinetex.js.map +0 -7
- package/dist/cjs/auth/index.cjs +0 -333
- package/dist/cjs/auth/index.d.cts +0 -41
- package/dist/cjs/auth/index.d.ts.map +0 -1
- package/dist/cjs/auth/index.js.map +0 -1
- package/dist/cjs/core/chain.cjs +0 -127
- package/dist/cjs/core/chain.d.cts +0 -44
- package/dist/cjs/core/chain.d.ts.map +0 -1
- package/dist/cjs/core/chain.js.map +0 -1
- package/dist/cjs/core/transport.cjs +0 -544
- package/dist/cjs/core/transport.d.cts +0 -11
- package/dist/cjs/core/transport.d.ts.map +0 -1
- package/dist/cjs/core/transport.js.map +0 -1
- package/dist/cjs/core/types.cjs +0 -54
- package/dist/cjs/core/types.d.cts +0 -322
- package/dist/cjs/core/types.d.ts.map +0 -1
- package/dist/cjs/core/types.js.map +0 -1
- package/dist/cjs/index.cjs +0 -272
- package/dist/cjs/index.d.cts +0 -12
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/middleware/pipeline.cjs +0 -451
- package/dist/cjs/middleware/pipeline.d.cts +0 -32
- package/dist/cjs/middleware/pipeline.d.ts.map +0 -1
- package/dist/cjs/middleware/pipeline.js.map +0 -1
- package/dist/cjs/plugins/cookies.cjs +0 -192
- package/dist/cjs/plugins/cookies.d.cts +0 -57
- package/dist/cjs/plugins/cookies.d.ts.map +0 -1
- package/dist/cjs/plugins/cookies.js.map +0 -1
- package/dist/cjs/plugins/extras.cjs +0 -316
- package/dist/cjs/plugins/extras.d.cts +0 -87
- package/dist/cjs/plugins/extras.d.ts.map +0 -1
- package/dist/cjs/plugins/extras.js.map +0 -1
- package/dist/cjs/plugins/index.cjs +0 -18
- package/dist/cjs/plugins/index.d.cts +0 -7
- package/dist/cjs/plugins/index.d.ts.map +0 -1
- package/dist/cjs/plugins/index.js.map +0 -1
- package/dist/cjs/plugins/proxy.cjs +0 -161
- package/dist/cjs/plugins/proxy.d.cts +0 -25
- package/dist/cjs/plugins/proxy.d.ts.map +0 -1
- package/dist/cjs/plugins/proxy.js.map +0 -1
- package/dist/cjs/utils/index.cjs +0 -12
- package/dist/cjs/utils/index.d.cts +0 -6
- package/dist/cjs/utils/index.d.ts.map +0 -1
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/esm/auth/index.js +0 -324
- package/dist/esm/auth/index.js.map +0 -1
- package/dist/esm/core/chain.js +0 -123
- package/dist/esm/core/chain.js.map +0 -1
- package/dist/esm/core/transport.js +0 -536
- package/dist/esm/core/transport.js.map +0 -1
- package/dist/esm/core/types.js +0 -46
- package/dist/esm/core/types.js.map +0 -1
- package/dist/esm/index.js +0 -241
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/middleware/pipeline.js +0 -438
- package/dist/esm/middleware/pipeline.js.map +0 -1
- package/dist/esm/plugins/cookies.js +0 -187
- package/dist/esm/plugins/cookies.js.map +0 -1
- package/dist/esm/plugins/extras.js +0 -306
- package/dist/esm/plugins/extras.js.map +0 -1
- package/dist/esm/plugins/index.js +0 -4
- package/dist/esm/plugins/index.js.map +0 -1
- package/dist/esm/plugins/proxy.js +0 -124
- package/dist/esm/plugins/proxy.js.map +0 -1
- package/dist/esm/utils/index.js +0 -6
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/types/auth/index.d.ts +0 -41
- package/dist/types/auth/index.d.ts.map +0 -1
- package/dist/types/core/chain.d.ts +0 -44
- package/dist/types/core/chain.d.ts.map +0 -1
- package/dist/types/core/transport.d.ts +0 -11
- package/dist/types/core/transport.d.ts.map +0 -1
- package/dist/types/core/types.d.ts +0 -322
- package/dist/types/core/types.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/middleware/pipeline.d.ts +0 -32
- package/dist/types/middleware/pipeline.d.ts.map +0 -1
- package/dist/types/plugins/cookies.d.ts +0 -57
- package/dist/types/plugins/cookies.d.ts.map +0 -1
- package/dist/types/plugins/extras.d.ts +0 -87
- package/dist/types/plugins/extras.d.ts.map +0 -1
- package/dist/types/plugins/index.d.ts +0 -7
- package/dist/types/plugins/index.d.ts.map +0 -1
- package/dist/types/plugins/proxy.d.ts +0 -25
- package/dist/types/plugins/proxy.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -6
- package/dist/types/utils/index.d.ts.map +0 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Full RFC 6265 §5.1 + §5.2 implementation:
|
|
4
|
+
* - Cookie-date parser (§5.1.1) — handles all real-world broken formats
|
|
5
|
+
* - Domain canonicalization (§5.1.2)
|
|
6
|
+
* - Domain matching (§5.1.3)
|
|
7
|
+
* - Path computation + matching (§5.1.4)
|
|
8
|
+
* - Set-Cookie header parser (§5.2)
|
|
9
|
+
* - Public Suffix List (full algorithm + embedded rules)
|
|
10
|
+
* - IDN / punycode basic support
|
|
11
|
+
* - IPv4 + IPv6 detection
|
|
12
|
+
*/
|
|
13
|
+
/** SameSite cookie attribute value. `"Unset"` means no SameSite attribute was present. */
|
|
14
|
+
export type SameSite = "Strict" | "Lax" | "None" | "Unset";
|
|
15
|
+
/**
|
|
16
|
+
* A parsed Set-Cookie header with all attributes extracted.
|
|
17
|
+
*/
|
|
18
|
+
export interface ParsedCookie {
|
|
19
|
+
/** Cookie name */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Cookie value */
|
|
22
|
+
value: string;
|
|
23
|
+
/** Domain attribute (canonicalized, leading dot stripped), or null */
|
|
24
|
+
domain: string | null;
|
|
25
|
+
/** Path attribute, or null */
|
|
26
|
+
path: string | null;
|
|
27
|
+
/** Expires timestamp (ms), or null */
|
|
28
|
+
expires: number | null;
|
|
29
|
+
/** Max-Age in seconds, or null */
|
|
30
|
+
maxAge: number | null;
|
|
31
|
+
/** Secure flag */
|
|
32
|
+
secure: boolean;
|
|
33
|
+
/** HttpOnly flag */
|
|
34
|
+
httpOnly: boolean;
|
|
35
|
+
/** SameSite attribute value */
|
|
36
|
+
sameSite: SameSite;
|
|
37
|
+
/** Chrome Privacy Sandbox SameParty flag */
|
|
38
|
+
sameParty: boolean;
|
|
39
|
+
/** Chrome Cookie Priority value, or null */
|
|
40
|
+
priority: "Low" | "Medium" | "High" | null;
|
|
41
|
+
/** CHIPS Partitioned flag */
|
|
42
|
+
partitioned: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse a cookie date string per RFC 6265 §5.1.1
|
|
46
|
+
*
|
|
47
|
+
* @param dateStr - The date string to parse
|
|
48
|
+
* @returns Unix timestamp (ms) if valid, null otherwise
|
|
49
|
+
*
|
|
50
|
+
* Supported formats (per RFC 6265 §5.1.1 and real-world broken variants):
|
|
51
|
+
*
|
|
52
|
+
* | Format | Example |
|
|
53
|
+
* |--------------------------------|-------------------------------------------|
|
|
54
|
+
* | HTTP-date (RFC 5322) | "Thu, 01 Jan 2099 00:00:00 GMT" |
|
|
55
|
+
* | RFC 850 | "Thursday, 01-Jan-99 00:00:00 GMT" |
|
|
56
|
+
* | ANSI C asctime() | "Thu Jan 1 00:00:00 2099" |
|
|
57
|
+
* | Short numeric | "01/01/2099 00:00:00" |
|
|
58
|
+
* | Cookie spec (RFC 2109) | "Thu, 01-Jan-2099 00:00:00 GMT" |
|
|
59
|
+
* | Broken variants (lenient) | Various real-world malformed dates |
|
|
60
|
+
*
|
|
61
|
+
* Algorithm:
|
|
62
|
+
* 1. Tokenize input into time, month, day-of-month, year tokens
|
|
63
|
+
* 2. Extract time component (HH:MM:SS format)
|
|
64
|
+
* 3. Extract month (3-letter or full name)
|
|
65
|
+
* 4. Extract day-of-month (1-31)
|
|
66
|
+
* 5. Extract year (2-digit with RFC 6265 §5.1.1 step 3 mapping, or 4-digit)
|
|
67
|
+
* 6. Validate: year must be 1601-9999, day must be 1-31
|
|
68
|
+
* 7. Return UTC timestamp or null if invalid
|
|
69
|
+
*
|
|
70
|
+
* Notes:
|
|
71
|
+
* - Two-digit years are mapped: 00-69 → 2000-2069, 70-99 → 1970-1999
|
|
72
|
+
* - Lenient on whitespace and minor format variations
|
|
73
|
+
* - Returns null for dates with missing components or invalid ranges
|
|
74
|
+
*/
|
|
75
|
+
export declare function parseCookieDate(dateStr: string): number | null;
|
|
76
|
+
/**
|
|
77
|
+
* Get the public suffix (TLD or effective TLD) for a hostname.
|
|
78
|
+
* Uses an embedded Public Suffix List covering ccTLDs, common second-level
|
|
79
|
+
* registrations, wildcards, and exceptions.
|
|
80
|
+
*
|
|
81
|
+
* @param hostname - Fully qualified hostname (e.g., "www.example.co.uk")
|
|
82
|
+
* @returns The public suffix (e.g., "co.uk"), or null for empty/invalid input
|
|
83
|
+
*/
|
|
84
|
+
export declare function getPublicSuffix(hostname: string): string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Get the registrable domain (aka effective TLD + 1 label) for a hostname.
|
|
87
|
+
* Returns null for bare TLDs or invalid input.
|
|
88
|
+
* For IP addresses, returns the IP itself.
|
|
89
|
+
*/
|
|
90
|
+
export declare function getRegistrableDomain(hostname: string): string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Check whether a hostname is a public suffix (TLD or effective TLD).
|
|
93
|
+
* Returns true for exact PSL matches and wildcard-covered domains.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isPublicSuffix(hostname: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Decode an IDN label using Intl.IDN or punycode fallback.
|
|
98
|
+
* Tries Node `domainToUnicode`, then Deno `Intl.IDN`, then native RFC 3492 decoder.
|
|
99
|
+
* Available in: Node.js 12+, Deno 1.14+, Bun, modern browsers, Cloudflare Workers.
|
|
100
|
+
*
|
|
101
|
+
* @param label - The label to decode (e.g., "xn--fiqs83s")
|
|
102
|
+
* @returns Decoded label (e.g., "中国") or original if not punycode
|
|
103
|
+
*/
|
|
104
|
+
export declare function decodeIDNLabel(label: string): string;
|
|
105
|
+
/**
|
|
106
|
+
* Fully canonicalize a domain string per RFC 6265:
|
|
107
|
+
* strip leading/trailing dots, lowercase, decode IDN labels.
|
|
108
|
+
*
|
|
109
|
+
* @param domain - Domain string to canonicalize (e.g., "Example.Com" or ".EXAMPLE.com.")
|
|
110
|
+
* @returns Canonicalized domain (e.g., "example.com")
|
|
111
|
+
*/
|
|
112
|
+
export declare function canonicalizeDomainFull(domain: string): string;
|
|
113
|
+
/**
|
|
114
|
+
* Check whether a host string is an IPv4 or IPv6 address.
|
|
115
|
+
*
|
|
116
|
+
* @param host - Host string to check (may include brackets for IPv6, e.g. "[::1]")
|
|
117
|
+
* @returns true if the host is an IP address
|
|
118
|
+
*/
|
|
119
|
+
export declare function isIPAddress(host: string): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Domain matching per RFC 6265 §5.1.3
|
|
122
|
+
*
|
|
123
|
+
* @param requestHost - The request host (e.g., "example.com")
|
|
124
|
+
* @param cookieDomain - The cookie domain attribute (e.g., ".example.com")
|
|
125
|
+
* @returns true if the cookie should be sent for this request host
|
|
126
|
+
*/
|
|
127
|
+
export declare function domainMatch(requestHost: string, cookieDomain: string): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Compute the default cookie path per RFC 6265 §5.1.4.
|
|
130
|
+
* Strips the trailing segment from the request path.
|
|
131
|
+
*
|
|
132
|
+
* @param requestPath - The request URI path (e.g., "/foo/bar")
|
|
133
|
+
* @returns Default cookie path (e.g., "/foo")
|
|
134
|
+
*/
|
|
135
|
+
export declare function defaultPath(requestPath: string): string;
|
|
136
|
+
/**
|
|
137
|
+
* Normalize a URL path by resolving `.` and `..` segments.
|
|
138
|
+
* This prevents path traversal attacks via malformed cookie paths.
|
|
139
|
+
*
|
|
140
|
+
* @param path - The path to normalize (e.g., "/foo/bar/../baz")
|
|
141
|
+
* @returns Normalized path with resolved segments (e.g., "/foo/baz")
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* normalizePath("/foo/bar/../baz") // "/foo/baz"
|
|
145
|
+
* normalizePath("/foo/./bar") // "/foo/bar"
|
|
146
|
+
* normalizePath("foo") // "/foo"
|
|
147
|
+
*/
|
|
148
|
+
export declare function normalizePath(path: string): string;
|
|
149
|
+
/**
|
|
150
|
+
* Path matching per RFC 6265 §5.1.4 — checks whether a cookie path
|
|
151
|
+
* matches a request path. Both paths are normalized before comparison.
|
|
152
|
+
*
|
|
153
|
+
* @param requestPath - Request URI path (e.g., "/foo/bar/baz")
|
|
154
|
+
* @param cookiePath - Cookie Path attribute (e.g., "/foo")
|
|
155
|
+
* @returns true if the cookie path matches the request path
|
|
156
|
+
*/
|
|
157
|
+
export declare function pathMatch(requestPath: string, cookiePath: string): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Parse a single Set-Cookie header value per RFC 6265 §5.2.
|
|
160
|
+
* Returns null for empty or syntactically invalid headers.
|
|
161
|
+
*
|
|
162
|
+
* @param header - The raw Set-Cookie header value (e.g., "session=abc123; Path=/; Secure")
|
|
163
|
+
* @returns Parsed cookie, or null on failure
|
|
164
|
+
*/
|
|
165
|
+
export declare function parseSetCookieHeader(header: string): ParsedCookie | null;
|
|
166
|
+
/**
|
|
167
|
+
* Serialize a ParsedCookie back to a Set-Cookie header string.
|
|
168
|
+
*
|
|
169
|
+
* @param cookie - The parsed cookie to serialize
|
|
170
|
+
* @returns Set-Cookie header string (e.g., "name=value; Path=/; Secure")
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* const cookie: ParsedCookie = { name: "session", value: "abc123", path: "/", secure: true, ... };
|
|
174
|
+
* formatSetCookieHeader(cookie); // "session=abc123; Path=/; Secure"
|
|
175
|
+
*/
|
|
176
|
+
export declare function formatSetCookieHeader(cookie: ParsedCookie): string;
|
|
177
|
+
/**
|
|
178
|
+
* Split a raw Set-Cookie header value (or collapsed multi-value string)
|
|
179
|
+
* into individual cookie strings.
|
|
180
|
+
*
|
|
181
|
+
* This is non-trivial because:
|
|
182
|
+
* - Expires values contain commas: "Expires=Thu, 01 Jan 2099 00:00:00 GMT"
|
|
183
|
+
* - Multiple Set-Cookie headers may be collapsed with ", " by some HTTP stacks
|
|
184
|
+
*
|
|
185
|
+
* Strategy: Token-based state machine that properly handles:
|
|
186
|
+
* - Quoted values with commas inside (e.g., `foo="bar,baz"`)
|
|
187
|
+
* - Escaped quotes inside quoted values (e.g., `foo="bar\"baz"`)
|
|
188
|
+
* - Attribute values that may contain commas
|
|
189
|
+
* - Only commits a cookie when we've seen both name and value
|
|
190
|
+
*
|
|
191
|
+
* @param raw - Raw Set-Cookie header string (possibly containing multiple cookies)
|
|
192
|
+
* @returns Array of individual Set-Cookie strings
|
|
193
|
+
*/
|
|
194
|
+
export declare function splitSetCookieHeaders(raw: string): string[];
|
|
195
|
+
/**
|
|
196
|
+
* Extract all Set-Cookie header values from a Headers object or plain record.
|
|
197
|
+
* Uses Headers.getSetCookie() when available (Deno, Node 18+).
|
|
198
|
+
*
|
|
199
|
+
* @param headers - Headers object or plain key-value record
|
|
200
|
+
* @returns Array of Set-Cookie header strings
|
|
201
|
+
*/
|
|
202
|
+
export declare function extractSetCookieHeaders(headers: Headers | Record<string, string | string[]>): string[];
|
|
203
|
+
//# sourceMappingURL=cookie-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookie-parser.d.ts","sourceRoot":"","sources":["../../src/cookie-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,0FAA0F;AAC1F,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,8BAA8B;IAC9B,IAAI,E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AgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAuBlD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAc1E;AAmCD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CA0HxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAoElE;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAsG3D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GACnD,MAAM,EAAE,CAkBV"}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cookie-store.ts
|
|
3
|
+
*
|
|
4
|
+
* Full RFC 6265 §5.3 + §5.4 implementation:
|
|
5
|
+
* - Storage model (creation time, last access, persistent vs session)
|
|
6
|
+
* - Cookie retrieval algorithm (domain, path, secure, httpOnly, SameSite)
|
|
7
|
+
* - __Secure- / __Host- prefix enforcement (RFC 6265bis §4.1.3)
|
|
8
|
+
* - SameSite Strict / Lax / None enforcement (full state machine)
|
|
9
|
+
* - LRU eviction: per-domain cap (50) + global cap (3000)
|
|
10
|
+
* - Atomic update semantics (update preserves createdAt)
|
|
11
|
+
* - Full JSON serialization / deserialization with expiry filtering
|
|
12
|
+
* - clear / clearExpired / clearSession / clearForDomain / clearForUrl
|
|
13
|
+
*/
|
|
14
|
+
import { type SameSite } from "./cookie-parser.ts";
|
|
15
|
+
/**
|
|
16
|
+
* A single HTTP cookie per RFC 6265 §5.3 storage model.
|
|
17
|
+
* Tracks name, value, domain, path, expiry, security flags, SameSite policy,
|
|
18
|
+
* creation and last-access times, and host-only status.
|
|
19
|
+
*/
|
|
20
|
+
export interface Cookie {
|
|
21
|
+
/** Cookie name (may be empty string) */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Cookie value */
|
|
24
|
+
value: string;
|
|
25
|
+
/** Canonicalized domain (no leading dot, lowercased, IDN-decoded) */
|
|
26
|
+
domain: string;
|
|
27
|
+
/** Cookie path */
|
|
28
|
+
path: string;
|
|
29
|
+
/**
|
|
30
|
+
* Absolute expiry time in ms since epoch.
|
|
31
|
+
* Infinity means session cookie (no Expires/Max-Age).
|
|
32
|
+
*/
|
|
33
|
+
expires: number;
|
|
34
|
+
/** Raw Max-Age value in seconds as parsed (null if not present) */
|
|
35
|
+
maxAge: number | null;
|
|
36
|
+
/** Secure flag */
|
|
37
|
+
secure: boolean;
|
|
38
|
+
/** HttpOnly flag */
|
|
39
|
+
httpOnly: boolean;
|
|
40
|
+
/** SameSite policy */
|
|
41
|
+
sameSite: SameSite;
|
|
42
|
+
/** Creation time in ms since epoch (RFC 6265 §5.3 step 2) */
|
|
43
|
+
createdAt: number;
|
|
44
|
+
/** Last-access time in ms since epoch (RFC 6265 §5.3 step 2) */
|
|
45
|
+
lastAccessed: number;
|
|
46
|
+
/**
|
|
47
|
+
* Host-only flag (RFC 6265 §5.3 step 6):
|
|
48
|
+
* true = cookie was set without a Domain attribute → exact host match only
|
|
49
|
+
* false = cookie has a Domain attribute → subdomain matching applies
|
|
50
|
+
*/
|
|
51
|
+
hostOnly: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Serializable form of a Cookie for JSON persistence.
|
|
55
|
+
* Infinity (session) expiry is stored as null.
|
|
56
|
+
*/
|
|
57
|
+
export interface CookieJSON {
|
|
58
|
+
/** Cookie name */
|
|
59
|
+
name: string;
|
|
60
|
+
/** Cookie value */
|
|
61
|
+
value: string;
|
|
62
|
+
/** Canonicalized domain */
|
|
63
|
+
domain: string;
|
|
64
|
+
/** Cookie path */
|
|
65
|
+
path: string;
|
|
66
|
+
/** Absolute expiry time in ms since epoch, or null for session cookies */
|
|
67
|
+
expires: number | null;
|
|
68
|
+
/** Raw Max-Age value in seconds, or null if not present */
|
|
69
|
+
maxAge: number | null;
|
|
70
|
+
/** Secure flag */
|
|
71
|
+
secure: boolean;
|
|
72
|
+
/** HttpOnly flag */
|
|
73
|
+
httpOnly: boolean;
|
|
74
|
+
/** SameSite policy */
|
|
75
|
+
sameSite: SameSite;
|
|
76
|
+
/** Creation time in ms since epoch */
|
|
77
|
+
createdAt: number;
|
|
78
|
+
/** Last-access time in ms since epoch */
|
|
79
|
+
lastAccessed: number;
|
|
80
|
+
/** Host-only flag */
|
|
81
|
+
hostOnly: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* SameSite request context.
|
|
85
|
+
*
|
|
86
|
+
* "strict" = same-site, any method
|
|
87
|
+
* "lax" = cross-site, but safe method (GET/HEAD) top-level navigation
|
|
88
|
+
* "cross-site" = cross-site, non-safe or non-top-level
|
|
89
|
+
* "none" = no enforcement (e.g. direct URL bar navigation)
|
|
90
|
+
*/
|
|
91
|
+
export type SameSiteContext = "strict" | "lax" | "cross-site" | "none";
|
|
92
|
+
export interface SetCookieOptions {
|
|
93
|
+
/** Full URL the Set-Cookie header was received from */
|
|
94
|
+
url: string;
|
|
95
|
+
/**
|
|
96
|
+
* SameSite context of the request that produced this Set-Cookie response.
|
|
97
|
+
* Defaults to "none" (no restriction on setting).
|
|
98
|
+
*/
|
|
99
|
+
sameSiteContext?: SameSiteContext;
|
|
100
|
+
}
|
|
101
|
+
export interface GetCookiesOptions {
|
|
102
|
+
/** Full URL cookies are being requested for */
|
|
103
|
+
url: string;
|
|
104
|
+
/**
|
|
105
|
+
* Is this an HTTP(S) request?
|
|
106
|
+
* false = script/document context → HttpOnly cookies are withheld.
|
|
107
|
+
* Defaults to true.
|
|
108
|
+
*/
|
|
109
|
+
http?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* SameSite context for the outgoing request.
|
|
112
|
+
* Defaults to "none" (send all cookies).
|
|
113
|
+
*/
|
|
114
|
+
sameSiteContext?: SameSiteContext;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Options for creating a CookieJar instance
|
|
118
|
+
*/
|
|
119
|
+
export interface CookieJarOptions {
|
|
120
|
+
/** Maximum total cookies across all domains (default: 3000) */
|
|
121
|
+
maxTotal?: number;
|
|
122
|
+
/** Maximum cookies per domain (default: 50) */
|
|
123
|
+
maxPerDomain?: number;
|
|
124
|
+
/** Custom domain match function (default: internal domainMatch) */
|
|
125
|
+
domainMatcher?: (requestHost: string, cookieDomain: string) => boolean;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* RFC 6265 §5.3 + §5.4 cookie jar implementation.
|
|
129
|
+
*
|
|
130
|
+
* Stores cookies in a three-level map (domain → path → name) with:
|
|
131
|
+
* - LRU eviction (per-domain cap of 50, global cap of 3000)
|
|
132
|
+
* - __Secure- / __Host- prefix enforcement (RFC 6265bis §4.1.3)
|
|
133
|
+
* - SameSite Strict / Lax / None enforcement
|
|
134
|
+
* - JSON serialization / deserialization
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* const jar = new CookieJar();
|
|
138
|
+
* jar.setCookie("session=abc; Path=/; Secure", { url: "https://example.com/" });
|
|
139
|
+
* const cookies = jar.getCookies({ url: "https://example.com/page" });
|
|
140
|
+
*/
|
|
141
|
+
export declare class CookieJar {
|
|
142
|
+
private readonly dm;
|
|
143
|
+
private total;
|
|
144
|
+
private cleanupTimer;
|
|
145
|
+
private readonly maxTotal;
|
|
146
|
+
private readonly maxPerDomain;
|
|
147
|
+
private readonly domainMatcherFn;
|
|
148
|
+
/**
|
|
149
|
+
* @param options - Cookie jar limits and optional custom domain matcher
|
|
150
|
+
*/
|
|
151
|
+
constructor(options?: CookieJarOptions);
|
|
152
|
+
/**
|
|
153
|
+
* Destroy the jar — clears the periodic cleanup timer.
|
|
154
|
+
* Call this when the jar is no longer needed to prevent memory leaks.
|
|
155
|
+
*/
|
|
156
|
+
destroy(): void;
|
|
157
|
+
/**
|
|
158
|
+
* Set a cookie per RFC 6265 §5.3.
|
|
159
|
+
*
|
|
160
|
+
* Rejects cookies that exceed size limits, fail domain/path validation,
|
|
161
|
+
* violate prefix rules, or would be immediately expired (treats those as deletes).
|
|
162
|
+
*
|
|
163
|
+
* @param header - Raw Set-Cookie header value (e.g. "session=abc; Path=/; Secure")
|
|
164
|
+
* @param options - URL the cookie was received from + SameSite context
|
|
165
|
+
* @returns true if the cookie was stored, false if rejected
|
|
166
|
+
*/
|
|
167
|
+
setCookie(header: string, options: SetCookieOptions): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Retrieve matching cookies per RFC 6265 §5.4.
|
|
170
|
+
*
|
|
171
|
+
* Filters by domain, path, secure/httpOnly flags, and SameSite context.
|
|
172
|
+
* Results are sorted by longest path first, then oldest creation time.
|
|
173
|
+
* Updates lastAccessed on returned cookies.
|
|
174
|
+
*
|
|
175
|
+
* @param options - URL, protocol context, and SameSite context
|
|
176
|
+
* @returns Array of matching Cookie objects (direct references into storage)
|
|
177
|
+
*/
|
|
178
|
+
getCookies(options: GetCookiesOptions): Cookie[];
|
|
179
|
+
/**
|
|
180
|
+
* Get a Cookie header string for a request.
|
|
181
|
+
*
|
|
182
|
+
* @param options - URL and request context
|
|
183
|
+
* @returns "name=value; name=value" string suitable for a Cookie header
|
|
184
|
+
*/
|
|
185
|
+
getCookieHeader(options: GetCookiesOptions): string;
|
|
186
|
+
/**
|
|
187
|
+
* Get all cookies for a specific domain.
|
|
188
|
+
*
|
|
189
|
+
* @param domain - The domain to get cookies for (will be canonicalized)
|
|
190
|
+
* @returns Array of cookies that would be sent to this domain
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* jar.setCookie("session=abc", { url: "https://example.com/" });
|
|
194
|
+
* jar.getCookiesForDomain("example.com"); // Returns cookies for example.com
|
|
195
|
+
*/
|
|
196
|
+
getCookiesForDomain(domain: string): Cookie[];
|
|
197
|
+
/**
|
|
198
|
+
* Process Set-Cookie headers from an HTTP response.
|
|
199
|
+
* Extracts all Set-Cookie values and calls setCookie() for each.
|
|
200
|
+
*
|
|
201
|
+
* @param headers - Response headers (Headers object or plain record)
|
|
202
|
+
* @param options - URL and SameSite context for all cookies
|
|
203
|
+
*/
|
|
204
|
+
processResponseHeaders(headers: Headers | Record<string, string | string[]>, options: SetCookieOptions): void;
|
|
205
|
+
/**
|
|
206
|
+
* Remove a specific cookie by domain, path, and name.
|
|
207
|
+
*
|
|
208
|
+
* @param domain - Domain the cookie was stored under
|
|
209
|
+
* @param path - Cookie path
|
|
210
|
+
* @param name - Cookie name
|
|
211
|
+
* @returns true if a cookie was removed
|
|
212
|
+
*/
|
|
213
|
+
removeCookie(domain: string, path: string, name: string): boolean;
|
|
214
|
+
/**
|
|
215
|
+
* Remove every cookie from the jar.
|
|
216
|
+
*/
|
|
217
|
+
clear(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Remove all expired cookies from the jar.
|
|
220
|
+
*
|
|
221
|
+
* @returns Number of cookies removed
|
|
222
|
+
*/
|
|
223
|
+
clearExpired(): number;
|
|
224
|
+
/**
|
|
225
|
+
* Remove all session cookies (cookies with no expiry / Infinity).
|
|
226
|
+
*
|
|
227
|
+
* @returns Number of cookies removed
|
|
228
|
+
*/
|
|
229
|
+
clearSession(): number;
|
|
230
|
+
/**
|
|
231
|
+
* Remove all cookies for a domain and its subdomains.
|
|
232
|
+
*
|
|
233
|
+
* @param domain - Domain to clear (e.g., "example.com" clears sub.example.com too)
|
|
234
|
+
* @returns Number of cookies removed
|
|
235
|
+
*/
|
|
236
|
+
clearForDomain(domain: string): number;
|
|
237
|
+
/**
|
|
238
|
+
* Remove all cookies that would be sent to a given URL.
|
|
239
|
+
*
|
|
240
|
+
* @param url - Full URL whose hostname cookies should be cleared
|
|
241
|
+
* @returns Number of cookies removed
|
|
242
|
+
*/
|
|
243
|
+
clearForUrl(url: string): number;
|
|
244
|
+
/**
|
|
245
|
+
* Serialize all non-expired cookies to a JSON-compatible array.
|
|
246
|
+
* Session cookies (Infinity) are stored with `expires: null`.
|
|
247
|
+
*
|
|
248
|
+
* @returns Array of serialized cookies
|
|
249
|
+
*/
|
|
250
|
+
toJSON(): CookieJSON[];
|
|
251
|
+
/**
|
|
252
|
+
* Get a pretty-printed JSON string of all cookies.
|
|
253
|
+
*
|
|
254
|
+
* @returns Formatted JSON string
|
|
255
|
+
*/
|
|
256
|
+
toString(): string;
|
|
257
|
+
/**
|
|
258
|
+
* Deserialize cookies from JSON and create a new CookieJar.
|
|
259
|
+
* Expired cookies in the input are silently skipped.
|
|
260
|
+
*
|
|
261
|
+
* @param data - Array of serialized cookies or a JSON string
|
|
262
|
+
* @returns A new CookieJar populated with the deserialized cookies
|
|
263
|
+
*/
|
|
264
|
+
static fromJSON(data: CookieJSON[] | string): CookieJar;
|
|
265
|
+
/**
|
|
266
|
+
* Total number of cookies currently stored in the jar.
|
|
267
|
+
*/
|
|
268
|
+
get count(): number;
|
|
269
|
+
/**
|
|
270
|
+
* Return a snapshot of all cookies (copies, not references to internal storage).
|
|
271
|
+
*
|
|
272
|
+
* @returns Array of cloned Cookie objects
|
|
273
|
+
*/
|
|
274
|
+
getAll(): Cookie[];
|
|
275
|
+
/**
|
|
276
|
+
* Return all cookies for a given domain (exact match + subdomains).
|
|
277
|
+
*
|
|
278
|
+
* @param domain - Domain to query (e.g., "example.com")
|
|
279
|
+
* @returns Array of cloned Cookie objects for matching domains
|
|
280
|
+
*/
|
|
281
|
+
getForDomain(domain: string): Cookie[];
|
|
282
|
+
/**
|
|
283
|
+
* Store or update a cookie in the internal map.
|
|
284
|
+
* Preserves original createdAt on update per RFC 6265 §5.3 step 11.
|
|
285
|
+
*/
|
|
286
|
+
private putCookie;
|
|
287
|
+
/**
|
|
288
|
+
* Evict the least-recently-accessed cookie from a domain when
|
|
289
|
+
* the per-domain cap is exceeded. Evicts down to maxPerDomain - 1.
|
|
290
|
+
*/
|
|
291
|
+
private evictForDomain;
|
|
292
|
+
/**
|
|
293
|
+
* Evict the least-recently-accessed cookie globally when
|
|
294
|
+
* the total cap is exceeded. Evicts down to below maxTotal.
|
|
295
|
+
*/
|
|
296
|
+
private evictGlobal;
|
|
297
|
+
/**
|
|
298
|
+
* Check whether a request host matches a cookie domain.
|
|
299
|
+
* Uses custom matcher if provided, otherwise does suffix matching.
|
|
300
|
+
*/
|
|
301
|
+
private matchDomain;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Create a new empty CookieJar.
|
|
305
|
+
*
|
|
306
|
+
* @returns A new CookieJar instance
|
|
307
|
+
*/
|
|
308
|
+
export declare function createCookieJar(): CookieJar;
|
|
309
|
+
/**
|
|
310
|
+
* Load a CookieJar from previously serialized JSON data.
|
|
311
|
+
*
|
|
312
|
+
* @param data - CookieJSON array or JSON string
|
|
313
|
+
* @returns A new CookieJar populated with the deserialized cookies
|
|
314
|
+
*/
|
|
315
|
+
export declare function loadCookieJar(data: string | CookieJSON[]): CookieJar;
|
|
316
|
+
//# sourceMappingURL=cookie-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookie-store.d.ts","sourceRoot":"","sources":["../../src/cookie-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,KAAK,QAAQ,EASd,MAAM,oBAAoB,CAAC;AAM5B;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,EA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