@sentropic/h2a 0.91.0 → 0.92.0
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/dist/runtime/local-files/store.d.ts.map +1 -1
- package/dist/runtime/local-files/store.js +16 -1
- package/dist/runtime/local-files/store.js.map +1 -1
- package/focus-app/client/_app/immutable/chunks/Bri_sRrN.js +2 -0
- package/focus-app/client/_app/immutable/chunks/Bri_sRrN.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Bri_sRrN.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/{app.AqxlGh9f.js → app.DZ0iZvkl.js} +2 -2
- package/focus-app/client/_app/immutable/entry/app.DZ0iZvkl.js.br +0 -0
- package/focus-app/client/_app/immutable/entry/app.DZ0iZvkl.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/start.CFOHf7d2.js +1 -0
- package/focus-app/client/_app/immutable/entry/start.CFOHf7d2.js.br +2 -0
- package/focus-app/client/_app/immutable/entry/start.CFOHf7d2.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/{1.BEBTHieI.js → 1.b1JkhQfd.js} +1 -1
- package/focus-app/client/_app/immutable/nodes/1.b1JkhQfd.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/1.b1JkhQfd.js.gz +0 -0
- package/focus-app/client/_app/version.json +1 -1
- package/focus-app/client/_app/version.json.br +0 -0
- package/focus-app/client/_app/version.json.gz +0 -0
- package/focus-app/h2a-focus.json +63 -65
- package/focus-app/handler.js +8 -9
- package/focus-app/handler.js.map +1 -1
- package/focus-app/index.js +8 -9
- package/focus-app/index.js.map +1 -1
- package/focus-app/server/chunks/chunks/{AppShell.js-6Pi87dO0.js → AppShell.js-BDEpw0ai.js} +2 -2
- package/focus-app/server/chunks/chunks/{AppShell.js-6Pi87dO0.js.map → AppShell.js-BDEpw0ai.js.map} +1 -1
- package/focus-app/server/chunks/chunks/{exports.js-CdqPbjm1.js → exports.js-BZfNcFtJ.js} +3 -3
- package/focus-app/server/chunks/chunks/{exports.js-CdqPbjm1.js.map → exports.js-BZfNcFtJ.js.map} +1 -1
- package/focus-app/server/chunks/chunks/{index.js-laGHLarB.js → index.js--xmWq8-W.js} +2 -2
- package/focus-app/server/chunks/chunks/{index.js-laGHLarB.js.map → index.js--xmWq8-W.js.map} +1 -1
- package/focus-app/server/chunks/chunks/{internal.js-CuLFYCp-.js → internal.js-7twtyNYN.js} +3 -3
- package/focus-app/server/chunks/chunks/{internal.js-CuLFYCp-.js.map → internal.js-7twtyNYN.js.map} +1 -1
- package/focus-app/server/chunks/chunks/{root.js-CtVQOgDw.js → root.js-ve7Sv8eD.js} +4 -4
- package/focus-app/server/chunks/chunks/root.js-ve7Sv8eD.js.map +1 -0
- package/focus-app/server/chunks/chunks/{utils.js-C_3_iViC.js → utils.js-h3jETFNR.js} +3 -3
- package/focus-app/server/chunks/chunks/{utils.js-C_3_iViC.js.map → utils.js-h3jETFNR.js.map} +1 -1
- package/focus-app/server/chunks/entries/endpoints/api/actions/launch/{_server.ts.js-DUQcf9xd.js → _server.ts.js-DVeNoSe-.js} +2 -2
- package/focus-app/server/chunks/entries/endpoints/api/actions/launch/{_server.ts.js-DUQcf9xd.js.map → _server.ts.js-DVeNoSe-.js.map} +1 -1
- package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/{_server.ts.js-hrbMnsV0.js → _server.ts.js-CLfZIM0I.js} +2 -2
- package/focus-app/server/chunks/entries/endpoints/api/decisions/inject/{_server.ts.js-hrbMnsV0.js.map → _server.ts.js-CLfZIM0I.js.map} +1 -1
- package/focus-app/server/chunks/entries/endpoints/api/dossiers/agent-memory/include/{_server.ts.js-Dw4odGdV.js → _server.ts.js-DNQwbxOr.js} +2 -2
- package/focus-app/server/chunks/entries/endpoints/api/dossiers/agent-memory/include/{_server.ts.js-Dw4odGdV.js.map → _server.ts.js-DNQwbxOr.js.map} +1 -1
- package/focus-app/server/chunks/entries/endpoints/api/h2a/targets/{_server.ts.js-BLjYv7vg.js → _server.ts.js-BqneXTTN.js} +2 -2
- package/focus-app/server/chunks/entries/endpoints/api/h2a/targets/{_server.ts.js-BLjYv7vg.js.map → _server.ts.js-BqneXTTN.js.map} +1 -1
- package/focus-app/server/chunks/entries/fallbacks/{error.svelte.js-RbeaNF5a.js → error.svelte.js-VpNJnNVG.js} +5 -6
- package/focus-app/server/chunks/entries/fallbacks/{error.svelte.js-RbeaNF5a.js.map → error.svelte.js-VpNJnNVG.js.map} +1 -1
- package/focus-app/server/chunks/entries/pages/{_layout.svelte.js-e1E_I04z.js → _layout.svelte.js-D_Rgb6oH.js} +3 -3
- package/focus-app/server/chunks/entries/pages/{_layout.svelte.js-e1E_I04z.js.map → _layout.svelte.js-D_Rgb6oH.js.map} +1 -1
- package/focus-app/server/chunks/entries/pages/{_page.svelte.js-DbaEG23x.js → _page.svelte.js-2a7ZxK1n.js} +4 -4
- package/focus-app/server/chunks/entries/pages/{_page.svelte.js-DbaEG23x.js.map → _page.svelte.js-2a7ZxK1n.js.map} +1 -1
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/{_page.svelte.js-BpR26NMa.js → _page.svelte.js-Bl_4XjaL.js} +4 -4
- package/focus-app/server/chunks/entries/pages/dossier/agent-memory/{_page.svelte.js-BpR26NMa.js.map → _page.svelte.js-Bl_4XjaL.js.map} +1 -1
- package/focus-app/server/chunks/{handler-Cc1mhJFj.js → handler-BegEnwAm.js} +4 -4
- package/focus-app/server/chunks/handler-BegEnwAm.js.map +1 -0
- package/focus-app/server/chunks/{index.js-D_qPV3oX.js → index.js-CAtidZ3J.js} +120 -60
- package/focus-app/server/chunks/index.js-CAtidZ3J.js.map +1 -0
- package/focus-app/server/chunks/{manifest.js-Bdra0QyV.js → manifest.js-BegmglEE.js} +10 -10
- package/focus-app/server/chunks/{manifest.js-Bdra0QyV.js.map → manifest.js-BegmglEE.js.map} +1 -1
- package/focus-app/server/chunks/nodes/{0.js-leU6sfRR.js → 0.js-tlwNtUnO.js} +2 -2
- package/focus-app/server/chunks/nodes/{0.js-leU6sfRR.js.map → 0.js-tlwNtUnO.js.map} +1 -1
- package/focus-app/server/chunks/nodes/1.js-CXnetkr0.js +9 -0
- package/focus-app/server/chunks/nodes/{1.js-urHS3uQJ.js.map → 1.js-CXnetkr0.js.map} +1 -1
- package/focus-app/server/chunks/nodes/{2.js-DAaLjh93.js → 2.js-C_y8BeMm.js} +2 -2
- package/focus-app/server/chunks/nodes/{2.js-DAaLjh93.js.map → 2.js-C_y8BeMm.js.map} +1 -1
- package/focus-app/server/chunks/nodes/{3.js-Cmgi6Uy0.js → 3.js-13r5MUAa.js} +2 -2
- package/focus-app/server/chunks/nodes/{3.js-Cmgi6Uy0.js.map → 3.js-13r5MUAa.js.map} +1 -1
- package/package.json +2 -2
- package/skills/h2a-run/SKILL.md +4 -15
- package/focus-app/client/_app/immutable/chunks/Bu0ELCga.js +0 -2
- package/focus-app/client/_app/immutable/chunks/Bu0ELCga.js.br +0 -0
- package/focus-app/client/_app/immutable/chunks/Bu0ELCga.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/app.AqxlGh9f.js.br +0 -0
- package/focus-app/client/_app/immutable/entry/app.AqxlGh9f.js.gz +0 -0
- package/focus-app/client/_app/immutable/entry/start.B0poRaV0.js +0 -1
- package/focus-app/client/_app/immutable/entry/start.B0poRaV0.js.br +0 -2
- package/focus-app/client/_app/immutable/entry/start.B0poRaV0.js.gz +0 -0
- package/focus-app/client/_app/immutable/nodes/1.BEBTHieI.js.br +0 -0
- package/focus-app/client/_app/immutable/nodes/1.BEBTHieI.js.gz +0 -0
- package/focus-app/server/chunks/chunks/false.js-B2gHlHjM.js +0 -4
- package/focus-app/server/chunks/chunks/false.js-B2gHlHjM.js.map +0 -1
- package/focus-app/server/chunks/chunks/root.js-CtVQOgDw.js.map +0 -1
- package/focus-app/server/chunks/handler-Cc1mhJFj.js.map +0 -1
- package/focus-app/server/chunks/index.js-D_qPV3oX.js.map +0 -1
- package/focus-app/server/chunks/nodes/1.js-urHS3uQJ.js +0 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as noop, f as format_server_error, j as json, i as is_form_content_type, t as text, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, h as has_prerendered_path, a as handle_fatal_error, R as Redirect, r as redirect_response, g as get_set_cookies, u as uneval, b as negotiate, w as with_request_store, p as parseString, m as merge_tracing, S as SvelteKitError, c as method_not_allowed, s as static_error_page, d as handle_error_and_jsonify, e as get_status, k as get_global_name, l as create_replacer, o as serialize_uses, q as clarify_devalue_error, v as once, H as HttpError, E as ENDPOINT_METHODS, P as PAGE_METHODS, x as normalize_error, y as get_node_type, z as isRedirect, A as escape_html, B as create_remote_key, C as error, D as parse_remote_arg, F as deserialize_binary_form, G as stringify, J as stringify$1, K as ActionFailure, L as split_remote_key, M as SVELTE_KIT_ASSETS } from './chunks/utils.js-
|
|
2
|
-
import { D as DEV } from './chunks/
|
|
1
|
+
import { n as noop, f as format_server_error, j as json, i as is_form_content_type, t as text, T as TRAILING_SLASH_PARAM, I as INVALIDATED_PARAM, h as has_prerendered_path, a as handle_fatal_error, R as Redirect, r as redirect_response, g as get_set_cookies, u as uneval, b as negotiate, w as with_request_store, p as parseString, m as merge_tracing, S as SvelteKitError, c as method_not_allowed, s as static_error_page, d as handle_error_and_jsonify, e as get_status, k as get_global_name, l as create_replacer, o as serialize_uses, q as clarify_devalue_error, v as once, H as HttpError, E as ENDPOINT_METHODS, P as PAGE_METHODS, x as normalize_error, y as get_node_type, z as isRedirect, A as escape_html, B as create_remote_key, C as error, D as parse_remote_arg, F as deserialize_binary_form, G as stringify, J as stringify$1, K as ActionFailure, L as split_remote_key, M as SVELTE_KIT_ASSETS } from './chunks/utils.js-h3jETFNR.js';
|
|
2
|
+
import { D as DEV } from './chunks/root.js-ve7Sv8eD.js';
|
|
3
3
|
import { b as base, a as app_dir, r as relative, o as override, c as assets, d as reset } from './chunks/server.js-Bf8x1V_n.js';
|
|
4
|
-
import { d as decode_pathname, n as normalize_path, a as disable_search, b as decode_params, v as validate_layout_server_exports, c as validate_layout_exports, e as validate_page_server_exports, f as validate_page_exports, r as resolve, m as make_trackable, w as writable, g as readable } from './chunks/exports.js-
|
|
4
|
+
import { d as decode_pathname, n as normalize_path, a as disable_search, b as decode_params, v as validate_layout_server_exports, c as validate_layout_exports, e as validate_page_server_exports, f as validate_page_exports, r as resolve, m as make_trackable, w as writable, g as readable } from './chunks/exports.js-BZfNcFtJ.js';
|
|
5
5
|
import { g as get_relative_path, t as text_encoder, a as base64_encode } from './chunks/utils2.js-BQzn9ikS.js';
|
|
6
|
-
import { o as options, s as set_private_env, a as set_public_env, g as get_hooks, p as public_env, r as read_implementation, b as set_read_implementation } from './chunks/internal.js-
|
|
6
|
+
import { o as options, s as set_private_env, a as set_public_env, g as get_hooks, p as public_env, r as read_implementation, b as set_read_implementation } from './chunks/internal.js-7twtyNYN.js';
|
|
7
7
|
|
|
8
8
|
var cookie = {};
|
|
9
9
|
|
|
@@ -36,14 +36,66 @@ function requireCookie () {
|
|
|
36
36
|
var __toString = Object.prototype.toString;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* RegExp to match
|
|
39
|
+
* RegExp to match cookie-name in RFC 6265 sec 4.1.1
|
|
40
|
+
* This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
|
|
41
|
+
* which has been replaced by the token definition in RFC 7230 appendix B.
|
|
40
42
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
43
|
+
* cookie-name = token
|
|
44
|
+
* token = 1*tchar
|
|
45
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" /
|
|
46
|
+
* "*" / "+" / "-" / "." / "^" / "_" /
|
|
47
|
+
* "`" / "|" / "~" / DIGIT / ALPHA
|
|
44
48
|
*/
|
|
45
49
|
|
|
46
|
-
var
|
|
50
|
+
var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* RegExp to match cookie-value in RFC 6265 sec 4.1.1
|
|
54
|
+
*
|
|
55
|
+
* cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
|
|
56
|
+
* cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
|
|
57
|
+
* ; US-ASCII characters excluding CTLs,
|
|
58
|
+
* ; whitespace DQUOTE, comma, semicolon,
|
|
59
|
+
* ; and backslash
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* RegExp to match domain-value in RFC 6265 sec 4.1.1
|
|
66
|
+
*
|
|
67
|
+
* domain-value = <subdomain>
|
|
68
|
+
* ; defined in [RFC1034], Section 3.5, as
|
|
69
|
+
* ; enhanced by [RFC1123], Section 2.1
|
|
70
|
+
* <subdomain> = <label> | <subdomain> "." <label>
|
|
71
|
+
* <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
|
|
72
|
+
* Labels must be 63 characters or less.
|
|
73
|
+
* 'let-dig' not 'letter' in the first char, per RFC1123
|
|
74
|
+
* <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
|
75
|
+
* <let-dig-hyp> = <let-dig> | "-"
|
|
76
|
+
* <let-dig> = <letter> | <digit>
|
|
77
|
+
* <letter> = any one of the 52 alphabetic characters A through Z in
|
|
78
|
+
* upper case and a through z in lower case
|
|
79
|
+
* <digit> = any one of the ten digits 0 through 9
|
|
80
|
+
*
|
|
81
|
+
* Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
|
|
82
|
+
*
|
|
83
|
+
* > (Note that a leading %x2E ("."), if present, is ignored even though that
|
|
84
|
+
* character is not permitted, but a trailing %x2E ("."), if present, will
|
|
85
|
+
* cause the user agent to ignore the attribute.)
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
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;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* RegExp to match path-value in RFC 6265 sec 4.1.1
|
|
92
|
+
*
|
|
93
|
+
* path-value = <any CHAR except CTLs or ";">
|
|
94
|
+
* CHAR = %x01-7F
|
|
95
|
+
* ; defined in RFC 5234 appendix B.1
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
|
47
99
|
|
|
48
100
|
/**
|
|
49
101
|
* Parse a cookie header.
|
|
@@ -52,107 +104,128 @@ function requireCookie () {
|
|
|
52
104
|
* The object has the various cookies as keys(names) => values
|
|
53
105
|
*
|
|
54
106
|
* @param {string} str
|
|
55
|
-
* @param {object} [
|
|
107
|
+
* @param {object} [opt]
|
|
56
108
|
* @return {object}
|
|
57
109
|
* @public
|
|
58
110
|
*/
|
|
59
111
|
|
|
60
|
-
function parse(str,
|
|
112
|
+
function parse(str, opt) {
|
|
61
113
|
if (typeof str !== 'string') {
|
|
62
114
|
throw new TypeError('argument str must be a string');
|
|
63
115
|
}
|
|
64
116
|
|
|
65
117
|
var obj = {};
|
|
66
|
-
var
|
|
67
|
-
|
|
118
|
+
var len = str.length;
|
|
119
|
+
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
|
|
120
|
+
if (len < 2) return obj;
|
|
68
121
|
|
|
122
|
+
var dec = (opt && opt.decode) || decode;
|
|
69
123
|
var index = 0;
|
|
70
|
-
|
|
71
|
-
|
|
124
|
+
var eqIdx = 0;
|
|
125
|
+
var endIdx = 0;
|
|
72
126
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
127
|
+
do {
|
|
128
|
+
eqIdx = str.indexOf('=', index);
|
|
129
|
+
if (eqIdx === -1) break; // No more cookie pairs.
|
|
77
130
|
|
|
78
|
-
|
|
131
|
+
endIdx = str.indexOf(';', index);
|
|
79
132
|
|
|
80
133
|
if (endIdx === -1) {
|
|
81
|
-
endIdx =
|
|
82
|
-
} else if (
|
|
134
|
+
endIdx = len;
|
|
135
|
+
} else if (eqIdx > endIdx) {
|
|
83
136
|
// backtrack on prior semicolon
|
|
84
137
|
index = str.lastIndexOf(';', eqIdx - 1) + 1;
|
|
85
|
-
continue
|
|
138
|
+
continue;
|
|
86
139
|
}
|
|
87
140
|
|
|
88
|
-
var
|
|
141
|
+
var keyStartIdx = startIndex(str, index, eqIdx);
|
|
142
|
+
var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
|
|
143
|
+
var key = str.slice(keyStartIdx, keyEndIdx);
|
|
89
144
|
|
|
90
145
|
// only assign once
|
|
91
|
-
if (
|
|
92
|
-
var
|
|
146
|
+
if (!obj.hasOwnProperty(key)) {
|
|
147
|
+
var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
|
|
148
|
+
var valEndIdx = endIndex(str, endIdx, valStartIdx);
|
|
93
149
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
150
|
+
if (str.charCodeAt(valStartIdx) === 0x22 /* " */ && str.charCodeAt(valEndIdx - 1) === 0x22 /* " */) {
|
|
151
|
+
valStartIdx++;
|
|
152
|
+
valEndIdx--;
|
|
97
153
|
}
|
|
98
154
|
|
|
155
|
+
var val = str.slice(valStartIdx, valEndIdx);
|
|
99
156
|
obj[key] = tryDecode(val, dec);
|
|
100
157
|
}
|
|
101
158
|
|
|
102
159
|
index = endIdx + 1;
|
|
103
|
-
}
|
|
160
|
+
} while (index < len);
|
|
104
161
|
|
|
105
162
|
return obj;
|
|
106
163
|
}
|
|
107
164
|
|
|
165
|
+
function startIndex(str, index, max) {
|
|
166
|
+
do {
|
|
167
|
+
var code = str.charCodeAt(index);
|
|
168
|
+
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index;
|
|
169
|
+
} while (++index < max);
|
|
170
|
+
return max;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function endIndex(str, index, min) {
|
|
174
|
+
while (index > min) {
|
|
175
|
+
var code = str.charCodeAt(--index);
|
|
176
|
+
if (code !== 0x20 /* */ && code !== 0x09 /* \t */) return index + 1;
|
|
177
|
+
}
|
|
178
|
+
return min;
|
|
179
|
+
}
|
|
180
|
+
|
|
108
181
|
/**
|
|
109
182
|
* Serialize data into a cookie header.
|
|
110
183
|
*
|
|
111
|
-
* Serialize
|
|
112
|
-
* http headers. An optional options object
|
|
184
|
+
* Serialize a name value pair into a cookie string suitable for
|
|
185
|
+
* http headers. An optional options object specifies cookie parameters.
|
|
113
186
|
*
|
|
114
187
|
* serialize('foo', 'bar', { httpOnly: true })
|
|
115
188
|
* => "foo=bar; httpOnly"
|
|
116
189
|
*
|
|
117
190
|
* @param {string} name
|
|
118
191
|
* @param {string} val
|
|
119
|
-
* @param {object} [
|
|
192
|
+
* @param {object} [opt]
|
|
120
193
|
* @return {string}
|
|
121
194
|
* @public
|
|
122
195
|
*/
|
|
123
196
|
|
|
124
|
-
function serialize(name, val,
|
|
125
|
-
var
|
|
126
|
-
var enc = opt.encode || encode;
|
|
197
|
+
function serialize(name, val, opt) {
|
|
198
|
+
var enc = (opt && opt.encode) || encodeURIComponent;
|
|
127
199
|
|
|
128
200
|
if (typeof enc !== 'function') {
|
|
129
201
|
throw new TypeError('option encode is invalid');
|
|
130
202
|
}
|
|
131
203
|
|
|
132
|
-
if (!
|
|
204
|
+
if (!cookieNameRegExp.test(name)) {
|
|
133
205
|
throw new TypeError('argument name is invalid');
|
|
134
206
|
}
|
|
135
207
|
|
|
136
208
|
var value = enc(val);
|
|
137
209
|
|
|
138
|
-
if (
|
|
210
|
+
if (!cookieValueRegExp.test(value)) {
|
|
139
211
|
throw new TypeError('argument val is invalid');
|
|
140
212
|
}
|
|
141
213
|
|
|
142
214
|
var str = name + '=' + value;
|
|
215
|
+
if (!opt) return str;
|
|
143
216
|
|
|
144
217
|
if (null != opt.maxAge) {
|
|
145
|
-
var maxAge = opt.maxAge
|
|
218
|
+
var maxAge = Math.floor(opt.maxAge);
|
|
146
219
|
|
|
147
|
-
if (
|
|
220
|
+
if (!isFinite(maxAge)) {
|
|
148
221
|
throw new TypeError('option maxAge is invalid')
|
|
149
222
|
}
|
|
150
223
|
|
|
151
|
-
str += '; Max-Age=' +
|
|
224
|
+
str += '; Max-Age=' + maxAge;
|
|
152
225
|
}
|
|
153
226
|
|
|
154
227
|
if (opt.domain) {
|
|
155
|
-
if (!
|
|
228
|
+
if (!domainValueRegExp.test(opt.domain)) {
|
|
156
229
|
throw new TypeError('option domain is invalid');
|
|
157
230
|
}
|
|
158
231
|
|
|
@@ -160,7 +233,7 @@ function requireCookie () {
|
|
|
160
233
|
}
|
|
161
234
|
|
|
162
235
|
if (opt.path) {
|
|
163
|
-
if (!
|
|
236
|
+
if (!pathValueRegExp.test(opt.path)) {
|
|
164
237
|
throw new TypeError('option path is invalid');
|
|
165
238
|
}
|
|
166
239
|
|
|
@@ -191,8 +264,7 @@ function requireCookie () {
|
|
|
191
264
|
|
|
192
265
|
if (opt.priority) {
|
|
193
266
|
var priority = typeof opt.priority === 'string'
|
|
194
|
-
? opt.priority.toLowerCase()
|
|
195
|
-
: opt.priority;
|
|
267
|
+
? opt.priority.toLowerCase() : opt.priority;
|
|
196
268
|
|
|
197
269
|
switch (priority) {
|
|
198
270
|
case 'low':
|
|
@@ -247,17 +319,6 @@ function requireCookie () {
|
|
|
247
319
|
: str
|
|
248
320
|
}
|
|
249
321
|
|
|
250
|
-
/**
|
|
251
|
-
* URL-encode value.
|
|
252
|
-
*
|
|
253
|
-
* @param {string} val
|
|
254
|
-
* @returns {string}
|
|
255
|
-
*/
|
|
256
|
-
|
|
257
|
-
function encode (val) {
|
|
258
|
-
return encodeURIComponent(val)
|
|
259
|
-
}
|
|
260
|
-
|
|
261
322
|
/**
|
|
262
323
|
* Determine if value is a Date.
|
|
263
324
|
*
|
|
@@ -266,8 +327,7 @@ function requireCookie () {
|
|
|
266
327
|
*/
|
|
267
328
|
|
|
268
329
|
function isDate (val) {
|
|
269
|
-
return __toString.call(val) === '[object Date]'
|
|
270
|
-
val instanceof Date
|
|
330
|
+
return __toString.call(val) === '[object Date]';
|
|
271
331
|
}
|
|
272
332
|
|
|
273
333
|
/**
|
|
@@ -1260,7 +1320,7 @@ function create_universal_fetch(event, state, fetched, csr, resolve_opts) {
|
|
|
1260
1320
|
const included = resolve_opts.filterSerializedResponseHeaders(lower, value);
|
|
1261
1321
|
if (!included) {
|
|
1262
1322
|
throw new Error(
|
|
1263
|
-
`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#
|
|
1323
|
+
`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#handle (at ${event.route.id})`
|
|
1264
1324
|
);
|
|
1265
1325
|
}
|
|
1266
1326
|
}
|
|
@@ -4239,4 +4299,4 @@ class Server {
|
|
|
4239
4299
|
}
|
|
4240
4300
|
|
|
4241
4301
|
export { Server as S };
|
|
4242
|
-
//# sourceMappingURL=index.js-
|
|
4302
|
+
//# sourceMappingURL=index.js-CAtidZ3J.js.map
|