claude-sessions-mcp 0.1.2 → 0.1.3
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/dist/{chunk-HK6PMHC3.js → chunk-7MUU7A32.js} +2 -2
- package/dist/chunk-7MUU7A32.js.map +1 -0
- package/dist/mcp/index.js +161 -20
- package/dist/mcp/index.js.map +1 -1
- package/dist/server.js +1 -1
- package/dist/web/client/_app/immutable/assets/0.CwJLztMb.css +1 -0
- package/dist/web/client/_app/immutable/assets/0.CwJLztMb.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.CwJLztMb.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/{ChOgyrGO.js → CkKD22Ww.js} +2 -2
- package/dist/web/client/_app/immutable/chunks/CkKD22Ww.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CkKD22Ww.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/CpHvH9sM.js +1 -0
- package/dist/web/client/_app/immutable/chunks/CpHvH9sM.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/CpHvH9sM.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/{DbCO4Be8.js → DJ2XDlZh.js} +1 -1
- package/dist/web/client/_app/immutable/chunks/DJ2XDlZh.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DJ2XDlZh.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/{B4TJWzDE.js → DUfrtY0h.js} +1 -1
- package/dist/web/client/_app/immutable/chunks/DUfrtY0h.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DUfrtY0h.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/{9luERNGW.js → DecY8Lt_.js} +1 -1
- package/dist/web/client/_app/immutable/chunks/DecY8Lt_.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DecY8Lt_.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/{app.BnwskVL-.js → app.DmZ9aown.js} +2 -2
- package/dist/web/client/_app/immutable/entry/app.DmZ9aown.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.DmZ9aown.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.CMjZY1qS.js +1 -0
- package/dist/web/client/_app/immutable/entry/start.CMjZY1qS.js.br +2 -0
- package/dist/web/client/_app/immutable/entry/start.CMjZY1qS.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.BihBXfXC.js +1 -0
- package/dist/web/client/_app/immutable/nodes/0.BihBXfXC.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.BihBXfXC.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/{1.CoCWmd0q.js → 1.Dv32GmbV.js} +1 -1
- package/dist/web/client/_app/immutable/nodes/1.Dv32GmbV.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.Dv32GmbV.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/{2.DqJoUS41.js → 2.DLDvSy-I.js} +1 -1
- package/dist/web/client/_app/immutable/nodes/2.DLDvSy-I.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.DLDvSy-I.js.gz +0 -0
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/client/_app/version.json.br +0 -0
- package/dist/web/client/_app/version.json.gz +0 -0
- package/dist/web/server/chunks/{0-D_Gx_HFy.js → 0-CfWkxQMb.js} +4 -4
- package/dist/web/server/chunks/{0-D_Gx_HFy.js.map → 0-CfWkxQMb.js.map} +1 -1
- package/dist/web/server/chunks/{1-BNMjiqhE.js → 1-CXaoNcF4.js} +2 -2
- package/dist/web/server/chunks/{1-BNMjiqhE.js.map → 1-CXaoNcF4.js.map} +1 -1
- package/dist/web/server/chunks/{2-Bx262N6m.js → 2-CbCSzfAy.js} +2 -2
- package/dist/web/server/chunks/{2-Bx262N6m.js.map → 2-CbCSzfAy.js.map} +1 -1
- package/dist/web/server/chunks/{_layout.svelte-Dqh3cdpb.js → _layout.svelte-g4K2eFdi.js} +3 -2
- package/dist/web/server/chunks/_layout.svelte-g4K2eFdi.js.map +1 -0
- package/dist/web/server/chunks/_server.ts-Bw_uJ6TN.js +11 -0
- package/dist/web/server/chunks/_server.ts-Bw_uJ6TN.js.map +1 -0
- package/dist/web/server/chunks/exports-BzHwARwz.js.map +1 -1
- package/dist/web/server/chunks/index-CoD1IJuy.js.map +1 -1
- package/dist/web/server/index.js +184 -378
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +11 -4
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-HK6PMHC3.js.map +0 -1
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css +0 -1
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css.br +0 -0
- package/dist/web/client/_app/immutable/assets/0.BNKw18IQ.css.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/9luERNGW.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/9luERNGW.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/B4TJWzDE.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/B4TJWzDE.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/ChOgyrGO.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/ChOgyrGO.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DUEukD6E.js +0 -1
- package/dist/web/client/_app/immutable/chunks/DUEukD6E.js.br +0 -0
- package/dist/web/client/_app/immutable/chunks/DUEukD6E.js.gz +0 -0
- package/dist/web/client/_app/immutable/chunks/DbCO4Be8.js.br +0 -1
- package/dist/web/client/_app/immutable/chunks/DbCO4Be8.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/app.BnwskVL-.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/app.BnwskVL-.js.gz +0 -0
- package/dist/web/client/_app/immutable/entry/start.CQ__ZoJ7.js +0 -1
- package/dist/web/client/_app/immutable/entry/start.CQ__ZoJ7.js.br +0 -0
- package/dist/web/client/_app/immutable/entry/start.CQ__ZoJ7.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js +0 -1
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/0.Cd8eOV9t.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/1.CoCWmd0q.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/1.CoCWmd0q.js.gz +0 -0
- package/dist/web/client/_app/immutable/nodes/2.DqJoUS41.js.br +0 -0
- package/dist/web/client/_app/immutable/nodes/2.DqJoUS41.js.gz +0 -0
- package/dist/web/server/chunks/_layout.svelte-Dqh3cdpb.js.map +0 -1
package/dist/web/server/index.js
CHANGED
|
@@ -3450,7 +3450,7 @@ const options = {
|
|
|
3450
3450
|
<div class="error">
|
|
3451
3451
|
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
|
3452
3452
|
},
|
|
3453
|
-
version_hash: "
|
|
3453
|
+
version_hash: "oo0yqi"
|
|
3454
3454
|
};
|
|
3455
3455
|
async function get_hooks() {
|
|
3456
3456
|
let handle;
|
|
@@ -3471,352 +3471,6 @@ async function get_hooks() {
|
|
|
3471
3471
|
};
|
|
3472
3472
|
}
|
|
3473
3473
|
|
|
3474
|
-
var cookie = {};
|
|
3475
|
-
|
|
3476
|
-
/*!
|
|
3477
|
-
* cookie
|
|
3478
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
3479
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
3480
|
-
* MIT Licensed
|
|
3481
|
-
*/
|
|
3482
|
-
|
|
3483
|
-
var hasRequiredCookie;
|
|
3484
|
-
|
|
3485
|
-
function requireCookie () {
|
|
3486
|
-
if (hasRequiredCookie) return cookie;
|
|
3487
|
-
hasRequiredCookie = 1;
|
|
3488
|
-
|
|
3489
|
-
/**
|
|
3490
|
-
* Module exports.
|
|
3491
|
-
* @public
|
|
3492
|
-
*/
|
|
3493
|
-
|
|
3494
|
-
cookie.parse = parse;
|
|
3495
|
-
cookie.serialize = serialize;
|
|
3496
|
-
|
|
3497
|
-
/**
|
|
3498
|
-
* Module variables.
|
|
3499
|
-
* @private
|
|
3500
|
-
*/
|
|
3501
|
-
|
|
3502
|
-
var __toString = Object.prototype.toString;
|
|
3503
|
-
var __hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
3504
|
-
|
|
3505
|
-
/**
|
|
3506
|
-
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
3507
|
-
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
3508
|
-
* which has been replaced by the token definition in RFC 7230 appendix B.
|
|
3509
|
-
*
|
|
3510
|
-
* cookie-name = token
|
|
3511
|
-
* token = 1*tchar
|
|
3512
|
-
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
|
3513
|
-
* "*" / "+" / "-" / "." / "^" / "_" /
|
|
3514
|
-
* "`" / "|" / "~" / DIGIT / ALPHA
|
|
3515
|
-
*/
|
|
3516
|
-
|
|
3517
|
-
var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
3518
|
-
|
|
3519
|
-
/**
|
|
3520
|
-
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
|
3521
|
-
*
|
|
3522
|
-
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
|
3523
|
-
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
|
3524
|
-
* ; US-ASCII characters excluding CTLs,
|
|
3525
|
-
* ; whitespace DQUOTE, comma, semicolon,
|
|
3526
|
-
* ; and backslash
|
|
3527
|
-
*/
|
|
3528
|
-
|
|
3529
|
-
var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
|
|
3530
|
-
|
|
3531
|
-
/**
|
|
3532
|
-
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
|
3533
|
-
*
|
|
3534
|
-
* domain-value = <subdomain>
|
|
3535
|
-
* ; defined in [RFC1034], Section 3.5, as
|
|
3536
|
-
* ; enhanced by [RFC1123], Section 2.1
|
|
3537
|
-
* <subdomain> = <label> | <subdomain> "." <label>
|
|
3538
|
-
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
3539
|
-
* Labels must be 63 characters or less.
|
|
3540
|
-
* 'let-dig' not 'letter' in the first char, per RFC1123
|
|
3541
|
-
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
3542
|
-
* <let-dig-hyp> = <let-dig> | "-"
|
|
3543
|
-
* <let-dig> = <letter> | <digit>
|
|
3544
|
-
* <letter> = any one of the 52 alphabetic characters A through Z in
|
|
3545
|
-
* upper case and a through z in lower case
|
|
3546
|
-
* <digit> = any one of the ten digits 0 through 9
|
|
3547
|
-
*
|
|
3548
|
-
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
|
3549
|
-
*
|
|
3550
|
-
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
|
3551
|
-
* character is not permitted, but a trailing %x2E ("."), if present, will
|
|
3552
|
-
* cause the user agent to ignore the attribute.)
|
|
3553
|
-
*/
|
|
3554
|
-
|
|
3555
|
-
var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
|
|
3556
|
-
|
|
3557
|
-
/**
|
|
3558
|
-
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
|
3559
|
-
*
|
|
3560
|
-
* path-value = <any CHAR except CTLs or ";">
|
|
3561
|
-
* CHAR = %x01-7F
|
|
3562
|
-
* ; defined in RFC 5234 appendix B.1
|
|
3563
|
-
*/
|
|
3564
|
-
|
|
3565
|
-
var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
3566
|
-
|
|
3567
|
-
/**
|
|
3568
|
-
* Parse a cookie header.
|
|
3569
|
-
*
|
|
3570
|
-
* Parse the given cookie header string into an object
|
|
3571
|
-
* The object has the various cookies as keys(names) => values
|
|
3572
|
-
*
|
|
3573
|
-
* @param {string} str
|
|
3574
|
-
* @param {object} [opt]
|
|
3575
|
-
* @return {object}
|
|
3576
|
-
* @public
|
|
3577
|
-
*/
|
|
3578
|
-
|
|
3579
|
-
function parse(str, opt) {
|
|
3580
|
-
if (typeof str !== 'string') {
|
|
3581
|
-
throw new TypeError('argument str must be a string');
|
|
3582
|
-
}
|
|
3583
|
-
|
|
3584
|
-
var obj = {};
|
|
3585
|
-
var len = str.length;
|
|
3586
|
-
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
|
|
3587
|
-
if (len < 2) return obj;
|
|
3588
|
-
|
|
3589
|
-
var dec = (opt && opt.decode) || decode;
|
|
3590
|
-
var index = 0;
|
|
3591
|
-
var eqIdx = 0;
|
|
3592
|
-
var endIdx = 0;
|
|
3593
|
-
|
|
3594
|
-
do {
|
|
3595
|
-
eqIdx = str.indexOf('=', index);
|
|
3596
|
-
if (eqIdx === -1) break; // No more cookie pairs.
|
|
3597
|
-
|
|
3598
|
-
endIdx = str.indexOf(';', index);
|
|
3599
|
-
|
|
3600
|
-
if (endIdx === -1) {
|
|
3601
|
-
endIdx = len;
|
|
3602
|
-
} else if (eqIdx > endIdx) {
|
|
3603
|
-
// backtrack on prior semicolon
|
|
3604
|
-
index = str.lastIndexOf(';', eqIdx - 1) + 1;
|
|
3605
|
-
continue;
|
|
3606
|
-
}
|
|
3607
|
-
|
|
3608
|
-
var keyStartIdx = startIndex(str, index, eqIdx);
|
|
3609
|
-
var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
|
|
3610
|
-
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
3611
|
-
|
|
3612
|
-
// only assign once
|
|
3613
|
-
if (!__hasOwnProperty.call(obj, key)) {
|
|
3614
|
-
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
3615
|
-
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
3616
|
-
|
|
3617
|
-
if (str.charCodeAt(valStartIdx) === 0x22 /* " */ && str.charCodeAt(valEndIdx - 1) === 0x22 /* " */) {
|
|
3618
|
-
valStartIdx++;
|
|
3619
|
-
valEndIdx--;
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
var val = str.slice(valStartIdx, valEndIdx);
|
|
3623
|
-
obj[key] = tryDecode(val, dec);
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
index = endIdx + 1;
|
|
3627
|
-
} while (index < len);
|
|
3628
|
-
|
|
3629
|
-
return obj;
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
|
-
function startIndex(str, index, max) {
|
|
3633
|
-
do {
|
|
3634
|
-
var code = str.charCodeAt(index);
|
|
3635
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index;
|
|
3636
|
-
} while (++index < max);
|
|
3637
|
-
return max;
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
function endIndex(str, index, min) {
|
|
3641
|
-
while (index > min) {
|
|
3642
|
-
var code = str.charCodeAt(--index);
|
|
3643
|
-
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index + 1;
|
|
3644
|
-
}
|
|
3645
|
-
return min;
|
|
3646
|
-
}
|
|
3647
|
-
|
|
3648
|
-
/**
|
|
3649
|
-
* Serialize data into a cookie header.
|
|
3650
|
-
*
|
|
3651
|
-
* Serialize a name value pair into a cookie string suitable for
|
|
3652
|
-
* http headers. An optional options object specifies cookie parameters.
|
|
3653
|
-
*
|
|
3654
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
3655
|
-
* => "foo=bar; httpOnly"
|
|
3656
|
-
*
|
|
3657
|
-
* @param {string} name
|
|
3658
|
-
* @param {string} val
|
|
3659
|
-
* @param {object} [opt]
|
|
3660
|
-
* @return {string}
|
|
3661
|
-
* @public
|
|
3662
|
-
*/
|
|
3663
|
-
|
|
3664
|
-
function serialize(name, val, opt) {
|
|
3665
|
-
var enc = (opt && opt.encode) || encodeURIComponent;
|
|
3666
|
-
|
|
3667
|
-
if (typeof enc !== 'function') {
|
|
3668
|
-
throw new TypeError('option encode is invalid');
|
|
3669
|
-
}
|
|
3670
|
-
|
|
3671
|
-
if (!cookieNameRegExp.test(name)) {
|
|
3672
|
-
throw new TypeError('argument name is invalid');
|
|
3673
|
-
}
|
|
3674
|
-
|
|
3675
|
-
var value = enc(val);
|
|
3676
|
-
|
|
3677
|
-
if (!cookieValueRegExp.test(value)) {
|
|
3678
|
-
throw new TypeError('argument val is invalid');
|
|
3679
|
-
}
|
|
3680
|
-
|
|
3681
|
-
var str = name + '=' + value;
|
|
3682
|
-
if (!opt) return str;
|
|
3683
|
-
|
|
3684
|
-
if (null != opt.maxAge) {
|
|
3685
|
-
var maxAge = Math.floor(opt.maxAge);
|
|
3686
|
-
|
|
3687
|
-
if (!isFinite(maxAge)) {
|
|
3688
|
-
throw new TypeError('option maxAge is invalid')
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
str += '; Max-Age=' + maxAge;
|
|
3692
|
-
}
|
|
3693
|
-
|
|
3694
|
-
if (opt.domain) {
|
|
3695
|
-
if (!domainValueRegExp.test(opt.domain)) {
|
|
3696
|
-
throw new TypeError('option domain is invalid');
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
str += '; Domain=' + opt.domain;
|
|
3700
|
-
}
|
|
3701
|
-
|
|
3702
|
-
if (opt.path) {
|
|
3703
|
-
if (!pathValueRegExp.test(opt.path)) {
|
|
3704
|
-
throw new TypeError('option path is invalid');
|
|
3705
|
-
}
|
|
3706
|
-
|
|
3707
|
-
str += '; Path=' + opt.path;
|
|
3708
|
-
}
|
|
3709
|
-
|
|
3710
|
-
if (opt.expires) {
|
|
3711
|
-
var expires = opt.expires;
|
|
3712
|
-
|
|
3713
|
-
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
3714
|
-
throw new TypeError('option expires is invalid');
|
|
3715
|
-
}
|
|
3716
|
-
|
|
3717
|
-
str += '; Expires=' + expires.toUTCString();
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
if (opt.httpOnly) {
|
|
3721
|
-
str += '; HttpOnly';
|
|
3722
|
-
}
|
|
3723
|
-
|
|
3724
|
-
if (opt.secure) {
|
|
3725
|
-
str += '; Secure';
|
|
3726
|
-
}
|
|
3727
|
-
|
|
3728
|
-
if (opt.partitioned) {
|
|
3729
|
-
str += '; Partitioned';
|
|
3730
|
-
}
|
|
3731
|
-
|
|
3732
|
-
if (opt.priority) {
|
|
3733
|
-
var priority = typeof opt.priority === 'string'
|
|
3734
|
-
? opt.priority.toLowerCase() : opt.priority;
|
|
3735
|
-
|
|
3736
|
-
switch (priority) {
|
|
3737
|
-
case 'low':
|
|
3738
|
-
str += '; Priority=Low';
|
|
3739
|
-
break
|
|
3740
|
-
case 'medium':
|
|
3741
|
-
str += '; Priority=Medium';
|
|
3742
|
-
break
|
|
3743
|
-
case 'high':
|
|
3744
|
-
str += '; Priority=High';
|
|
3745
|
-
break
|
|
3746
|
-
default:
|
|
3747
|
-
throw new TypeError('option priority is invalid')
|
|
3748
|
-
}
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3751
|
-
if (opt.sameSite) {
|
|
3752
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
3753
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
3754
|
-
|
|
3755
|
-
switch (sameSite) {
|
|
3756
|
-
case true:
|
|
3757
|
-
str += '; SameSite=Strict';
|
|
3758
|
-
break;
|
|
3759
|
-
case 'lax':
|
|
3760
|
-
str += '; SameSite=Lax';
|
|
3761
|
-
break;
|
|
3762
|
-
case 'strict':
|
|
3763
|
-
str += '; SameSite=Strict';
|
|
3764
|
-
break;
|
|
3765
|
-
case 'none':
|
|
3766
|
-
str += '; SameSite=None';
|
|
3767
|
-
break;
|
|
3768
|
-
default:
|
|
3769
|
-
throw new TypeError('option sameSite is invalid');
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
|
-
return str;
|
|
3774
|
-
}
|
|
3775
|
-
|
|
3776
|
-
/**
|
|
3777
|
-
* URL-decode string value. Optimized to skip native call when no %.
|
|
3778
|
-
*
|
|
3779
|
-
* @param {string} str
|
|
3780
|
-
* @returns {string}
|
|
3781
|
-
*/
|
|
3782
|
-
|
|
3783
|
-
function decode (str) {
|
|
3784
|
-
return str.indexOf('%') !== -1
|
|
3785
|
-
? decodeURIComponent(str)
|
|
3786
|
-
: str
|
|
3787
|
-
}
|
|
3788
|
-
|
|
3789
|
-
/**
|
|
3790
|
-
* Determine if value is a Date.
|
|
3791
|
-
*
|
|
3792
|
-
* @param {*} val
|
|
3793
|
-
* @private
|
|
3794
|
-
*/
|
|
3795
|
-
|
|
3796
|
-
function isDate (val) {
|
|
3797
|
-
return __toString.call(val) === '[object Date]';
|
|
3798
|
-
}
|
|
3799
|
-
|
|
3800
|
-
/**
|
|
3801
|
-
* Try decoding a string using a decoding function.
|
|
3802
|
-
*
|
|
3803
|
-
* @param {string} str
|
|
3804
|
-
* @param {function} decode
|
|
3805
|
-
* @private
|
|
3806
|
-
*/
|
|
3807
|
-
|
|
3808
|
-
function tryDecode(str, decode) {
|
|
3809
|
-
try {
|
|
3810
|
-
return decode(str);
|
|
3811
|
-
} catch (e) {
|
|
3812
|
-
return str;
|
|
3813
|
-
}
|
|
3814
|
-
}
|
|
3815
|
-
return cookie;
|
|
3816
|
-
}
|
|
3817
|
-
|
|
3818
|
-
var cookieExports = requireCookie();
|
|
3819
|
-
|
|
3820
3474
|
function with_resolvers() {
|
|
3821
3475
|
let resolve2;
|
|
3822
3476
|
let reject;
|
|
@@ -7008,6 +6662,158 @@ function redirect_json_response(redirect) {
|
|
|
7008
6662
|
}
|
|
7009
6663
|
);
|
|
7010
6664
|
}
|
|
6665
|
+
var cookie = {};
|
|
6666
|
+
/*!
|
|
6667
|
+
* cookie
|
|
6668
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
6669
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6670
|
+
* MIT Licensed
|
|
6671
|
+
*/
|
|
6672
|
+
var hasRequiredCookie;
|
|
6673
|
+
function requireCookie() {
|
|
6674
|
+
if (hasRequiredCookie) return cookie;
|
|
6675
|
+
hasRequiredCookie = 1;
|
|
6676
|
+
cookie.parse = parse;
|
|
6677
|
+
cookie.serialize = serialize;
|
|
6678
|
+
var __toString = Object.prototype.toString;
|
|
6679
|
+
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
6680
|
+
function parse(str, options2) {
|
|
6681
|
+
if (typeof str !== "string") {
|
|
6682
|
+
throw new TypeError("argument str must be a string");
|
|
6683
|
+
}
|
|
6684
|
+
var obj = {};
|
|
6685
|
+
var opt = options2 || {};
|
|
6686
|
+
var dec = opt.decode || decode;
|
|
6687
|
+
var index = 0;
|
|
6688
|
+
while (index < str.length) {
|
|
6689
|
+
var eqIdx = str.indexOf("=", index);
|
|
6690
|
+
if (eqIdx === -1) {
|
|
6691
|
+
break;
|
|
6692
|
+
}
|
|
6693
|
+
var endIdx = str.indexOf(";", index);
|
|
6694
|
+
if (endIdx === -1) {
|
|
6695
|
+
endIdx = str.length;
|
|
6696
|
+
} else if (endIdx < eqIdx) {
|
|
6697
|
+
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
|
6698
|
+
continue;
|
|
6699
|
+
}
|
|
6700
|
+
var key2 = str.slice(index, eqIdx).trim();
|
|
6701
|
+
if (void 0 === obj[key2]) {
|
|
6702
|
+
var val = str.slice(eqIdx + 1, endIdx).trim();
|
|
6703
|
+
if (val.charCodeAt(0) === 34) {
|
|
6704
|
+
val = val.slice(1, -1);
|
|
6705
|
+
}
|
|
6706
|
+
obj[key2] = tryDecode(val, dec);
|
|
6707
|
+
}
|
|
6708
|
+
index = endIdx + 1;
|
|
6709
|
+
}
|
|
6710
|
+
return obj;
|
|
6711
|
+
}
|
|
6712
|
+
function serialize(name, val, options2) {
|
|
6713
|
+
var opt = options2 || {};
|
|
6714
|
+
var enc = opt.encode || encode2;
|
|
6715
|
+
if (typeof enc !== "function") {
|
|
6716
|
+
throw new TypeError("option encode is invalid");
|
|
6717
|
+
}
|
|
6718
|
+
if (!fieldContentRegExp.test(name)) {
|
|
6719
|
+
throw new TypeError("argument name is invalid");
|
|
6720
|
+
}
|
|
6721
|
+
var value = enc(val);
|
|
6722
|
+
if (value && !fieldContentRegExp.test(value)) {
|
|
6723
|
+
throw new TypeError("argument val is invalid");
|
|
6724
|
+
}
|
|
6725
|
+
var str = name + "=" + value;
|
|
6726
|
+
if (null != opt.maxAge) {
|
|
6727
|
+
var maxAge = opt.maxAge - 0;
|
|
6728
|
+
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
6729
|
+
throw new TypeError("option maxAge is invalid");
|
|
6730
|
+
}
|
|
6731
|
+
str += "; Max-Age=" + Math.floor(maxAge);
|
|
6732
|
+
}
|
|
6733
|
+
if (opt.domain) {
|
|
6734
|
+
if (!fieldContentRegExp.test(opt.domain)) {
|
|
6735
|
+
throw new TypeError("option domain is invalid");
|
|
6736
|
+
}
|
|
6737
|
+
str += "; Domain=" + opt.domain;
|
|
6738
|
+
}
|
|
6739
|
+
if (opt.path) {
|
|
6740
|
+
if (!fieldContentRegExp.test(opt.path)) {
|
|
6741
|
+
throw new TypeError("option path is invalid");
|
|
6742
|
+
}
|
|
6743
|
+
str += "; Path=" + opt.path;
|
|
6744
|
+
}
|
|
6745
|
+
if (opt.expires) {
|
|
6746
|
+
var expires = opt.expires;
|
|
6747
|
+
if (!isDate(expires) || isNaN(expires.valueOf())) {
|
|
6748
|
+
throw new TypeError("option expires is invalid");
|
|
6749
|
+
}
|
|
6750
|
+
str += "; Expires=" + expires.toUTCString();
|
|
6751
|
+
}
|
|
6752
|
+
if (opt.httpOnly) {
|
|
6753
|
+
str += "; HttpOnly";
|
|
6754
|
+
}
|
|
6755
|
+
if (opt.secure) {
|
|
6756
|
+
str += "; Secure";
|
|
6757
|
+
}
|
|
6758
|
+
if (opt.partitioned) {
|
|
6759
|
+
str += "; Partitioned";
|
|
6760
|
+
}
|
|
6761
|
+
if (opt.priority) {
|
|
6762
|
+
var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
|
|
6763
|
+
switch (priority) {
|
|
6764
|
+
case "low":
|
|
6765
|
+
str += "; Priority=Low";
|
|
6766
|
+
break;
|
|
6767
|
+
case "medium":
|
|
6768
|
+
str += "; Priority=Medium";
|
|
6769
|
+
break;
|
|
6770
|
+
case "high":
|
|
6771
|
+
str += "; Priority=High";
|
|
6772
|
+
break;
|
|
6773
|
+
default:
|
|
6774
|
+
throw new TypeError("option priority is invalid");
|
|
6775
|
+
}
|
|
6776
|
+
}
|
|
6777
|
+
if (opt.sameSite) {
|
|
6778
|
+
var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
6779
|
+
switch (sameSite) {
|
|
6780
|
+
case true:
|
|
6781
|
+
str += "; SameSite=Strict";
|
|
6782
|
+
break;
|
|
6783
|
+
case "lax":
|
|
6784
|
+
str += "; SameSite=Lax";
|
|
6785
|
+
break;
|
|
6786
|
+
case "strict":
|
|
6787
|
+
str += "; SameSite=Strict";
|
|
6788
|
+
break;
|
|
6789
|
+
case "none":
|
|
6790
|
+
str += "; SameSite=None";
|
|
6791
|
+
break;
|
|
6792
|
+
default:
|
|
6793
|
+
throw new TypeError("option sameSite is invalid");
|
|
6794
|
+
}
|
|
6795
|
+
}
|
|
6796
|
+
return str;
|
|
6797
|
+
}
|
|
6798
|
+
function decode(str) {
|
|
6799
|
+
return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
|
|
6800
|
+
}
|
|
6801
|
+
function encode2(val) {
|
|
6802
|
+
return encodeURIComponent(val);
|
|
6803
|
+
}
|
|
6804
|
+
function isDate(val) {
|
|
6805
|
+
return __toString.call(val) === "[object Date]" || val instanceof Date;
|
|
6806
|
+
}
|
|
6807
|
+
function tryDecode(str, decode2) {
|
|
6808
|
+
try {
|
|
6809
|
+
return decode2(str);
|
|
6810
|
+
} catch (e) {
|
|
6811
|
+
return str;
|
|
6812
|
+
}
|
|
6813
|
+
}
|
|
6814
|
+
return cookie;
|
|
6815
|
+
}
|
|
6816
|
+
var cookieExports = requireCookie();
|
|
7011
6817
|
const INVALID_COOKIE_CHARACTER_REGEX = /[\x00-\x1F\x7F()<>@,;:"/[\]?={} \t]/;
|
|
7012
6818
|
function validate_options(options2) {
|
|
7013
6819
|
if (options2?.path === void 0) {
|
|
@@ -7044,8 +6850,8 @@ function get_cookies(request, url) {
|
|
|
7044
6850
|
return best_match.options.maxAge === 0 ? void 0 : best_match.value;
|
|
7045
6851
|
}
|
|
7046
6852
|
const req_cookies = cookieExports.parse(header, { decode: opts?.decode });
|
|
7047
|
-
const
|
|
7048
|
-
return
|
|
6853
|
+
const cookie2 = req_cookies[name];
|
|
6854
|
+
return cookie2;
|
|
7049
6855
|
},
|
|
7050
6856
|
/**
|
|
7051
6857
|
* @param {import('cookie').CookieParseOptions} [opts]
|
|
@@ -7113,11 +6919,11 @@ function get_cookies(request, url) {
|
|
|
7113
6919
|
// cookies sent by the user agent have lowest precedence
|
|
7114
6920
|
...initial_cookies
|
|
7115
6921
|
};
|
|
7116
|
-
for (const
|
|
7117
|
-
if (!domain_matches(destination.hostname,
|
|
7118
|
-
if (!path_matches(destination.pathname,
|
|
7119
|
-
const encoder =
|
|
7120
|
-
combined_cookies[
|
|
6922
|
+
for (const cookie2 of new_cookies.values()) {
|
|
6923
|
+
if (!domain_matches(destination.hostname, cookie2.options.domain)) continue;
|
|
6924
|
+
if (!path_matches(destination.pathname, cookie2.options.path)) continue;
|
|
6925
|
+
const encoder = cookie2.options.encode || encodeURIComponent;
|
|
6926
|
+
combined_cookies[cookie2.name] = encoder(cookie2.value);
|
|
7121
6927
|
}
|
|
7122
6928
|
if (header2) {
|
|
7123
6929
|
const parsed = cookieExports.parse(header2, { decode: (value) => value });
|
|
@@ -7138,8 +6944,8 @@ function get_cookies(request, url) {
|
|
|
7138
6944
|
path = resolve(normalized_url, path);
|
|
7139
6945
|
}
|
|
7140
6946
|
const cookie_key = generate_cookie_key(options2.domain, path, name);
|
|
7141
|
-
const
|
|
7142
|
-
new_cookies.set(cookie_key,
|
|
6947
|
+
const cookie2 = { name, value, options: { ...options2, path } };
|
|
6948
|
+
new_cookies.set(cookie_key, cookie2);
|
|
7143
6949
|
}
|
|
7144
6950
|
function set_trailing_slash(trailing_slash) {
|
|
7145
6951
|
normalized_url = normalize_path(url.pathname, trailing_slash);
|
|
@@ -7206,9 +7012,9 @@ function requireSetCookie() {
|
|
|
7206
7012
|
e
|
|
7207
7013
|
);
|
|
7208
7014
|
}
|
|
7209
|
-
var
|
|
7210
|
-
|
|
7211
|
-
|
|
7015
|
+
var cookie2 = createNullObj();
|
|
7016
|
+
cookie2.name = name;
|
|
7017
|
+
cookie2.value = value;
|
|
7212
7018
|
parts.forEach(function(part) {
|
|
7213
7019
|
var sides = part.split("=");
|
|
7214
7020
|
var key2 = sides.shift().trimLeft().toLowerCase();
|
|
@@ -7217,23 +7023,23 @@ function requireSetCookie() {
|
|
|
7217
7023
|
}
|
|
7218
7024
|
var value2 = sides.join("=");
|
|
7219
7025
|
if (key2 === "expires") {
|
|
7220
|
-
|
|
7026
|
+
cookie2.expires = new Date(value2);
|
|
7221
7027
|
} else if (key2 === "max-age") {
|
|
7222
7028
|
var n = parseInt(value2, 10);
|
|
7223
|
-
if (!Number.isNaN(n))
|
|
7029
|
+
if (!Number.isNaN(n)) cookie2.maxAge = n;
|
|
7224
7030
|
} else if (key2 === "secure") {
|
|
7225
|
-
|
|
7031
|
+
cookie2.secure = true;
|
|
7226
7032
|
} else if (key2 === "httponly") {
|
|
7227
|
-
|
|
7033
|
+
cookie2.httpOnly = true;
|
|
7228
7034
|
} else if (key2 === "samesite") {
|
|
7229
|
-
|
|
7035
|
+
cookie2.sameSite = value2;
|
|
7230
7036
|
} else if (key2 === "partitioned") {
|
|
7231
|
-
|
|
7037
|
+
cookie2.partitioned = true;
|
|
7232
7038
|
} else if (key2) {
|
|
7233
|
-
|
|
7039
|
+
cookie2[key2] = value2;
|
|
7234
7040
|
}
|
|
7235
7041
|
});
|
|
7236
|
-
return
|
|
7042
|
+
return cookie2;
|
|
7237
7043
|
}
|
|
7238
7044
|
function parseNameValuePair(nameValuePairStr) {
|
|
7239
7045
|
var name = "";
|
|
@@ -7247,7 +7053,7 @@ function requireSetCookie() {
|
|
|
7247
7053
|
}
|
|
7248
7054
|
return { name, value };
|
|
7249
7055
|
}
|
|
7250
|
-
function
|
|
7056
|
+
function parse(input, options2) {
|
|
7251
7057
|
options2 = options2 ? Object.assign({}, defaultParseOptions, options2) : defaultParseOptions;
|
|
7252
7058
|
if (!input) {
|
|
7253
7059
|
if (!options2.map) {
|
|
@@ -7283,9 +7089,9 @@ function requireSetCookie() {
|
|
|
7283
7089
|
} else {
|
|
7284
7090
|
var cookies = createNullObj();
|
|
7285
7091
|
return input.filter(isNonEmptyString).reduce(function(cookies2, str) {
|
|
7286
|
-
var
|
|
7287
|
-
if (
|
|
7288
|
-
cookies2[
|
|
7092
|
+
var cookie2 = parseString(str, options2);
|
|
7093
|
+
if (cookie2 && !isForbiddenKey(cookie2.name)) {
|
|
7094
|
+
cookies2[cookie2.name] = cookie2;
|
|
7289
7095
|
}
|
|
7290
7096
|
return cookies2;
|
|
7291
7097
|
}, cookies);
|
|
@@ -7346,8 +7152,8 @@ function requireSetCookie() {
|
|
|
7346
7152
|
}
|
|
7347
7153
|
return cookiesStrings;
|
|
7348
7154
|
}
|
|
7349
|
-
setCookie.exports =
|
|
7350
|
-
setCookie.exports.parse =
|
|
7155
|
+
setCookie.exports = parse;
|
|
7156
|
+
setCookie.exports.parse = parse;
|
|
7351
7157
|
setCookie.exports.parseString = parseString;
|
|
7352
7158
|
setCookie.exports.splitCookiesString = splitCookiesString;
|
|
7353
7159
|
return setCookie.exports;
|
|
@@ -7376,8 +7182,8 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
|
|
|
7376
7182
|
}
|
|
7377
7183
|
if (url.origin !== event.url.origin) {
|
|
7378
7184
|
if (`.${url.hostname}`.endsWith(`.${event.url.hostname}`) && credentials !== "omit") {
|
|
7379
|
-
const
|
|
7380
|
-
if (
|
|
7185
|
+
const cookie2 = get_cookie_header(url, request.headers.get("cookie"));
|
|
7186
|
+
if (cookie2) request.headers.set("cookie", cookie2);
|
|
7381
7187
|
}
|
|
7382
7188
|
return fetch(request);
|
|
7383
7189
|
}
|
|
@@ -7410,9 +7216,9 @@ function create_fetch({ event, options: options2, manifest, state, get_cookie_he
|
|
|
7410
7216
|
return await fetch(request);
|
|
7411
7217
|
}
|
|
7412
7218
|
if (credentials !== "omit") {
|
|
7413
|
-
const
|
|
7414
|
-
if (
|
|
7415
|
-
request.headers.set("cookie",
|
|
7219
|
+
const cookie2 = get_cookie_header(url, request.headers.get("cookie"));
|
|
7220
|
+
if (cookie2) {
|
|
7221
|
+
request.headers.set("cookie", cookie2);
|
|
7416
7222
|
}
|
|
7417
7223
|
const authorization = event.request.headers.get("authorization");
|
|
7418
7224
|
if (authorization && !request.headers.has("authorization")) {
|