@sveltejs/kit 2.5.9 → 2.5.11
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/package.json +12 -5
- package/postinstall.js +1 -1
- package/src/cli.js +1 -1
- package/src/core/config/options.js +1 -1
- package/src/core/postbuild/prerender.js +11 -1
- package/src/core/sync/sync.js +8 -10
- package/src/core/sync/write_types/index.js +2 -2
- package/src/exports/node/index.js +4 -0
- package/src/exports/vite/build/build_service_worker.js +2 -2
- package/src/exports/vite/dev/index.js +4 -4
- package/src/exports/vite/index.js +12 -9
- package/src/runtime/app/stores.js +1 -1
- package/src/runtime/client/client.js +7 -15
- package/src/runtime/client/fetcher.js +1 -0
- package/src/runtime/client/utils.js +1 -0
- package/src/runtime/server/data/index.js +1 -1
- package/src/runtime/server/page/index.js +1 -1
- package/src/runtime/server/page/render.js +1 -1
- package/src/runtime/server/page/respond_with_error.js +2 -0
- package/src/runtime/server/respond.js +1 -1
- package/src/types/internal.d.ts +4 -3
- package/src/utils/fork.js +1 -1
- package/src/utils/http.js +1 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +4 -3
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.11",
|
|
4
4
|
"description": "The fastest way to build Svelte apps",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"framework",
|
|
7
|
+
"official",
|
|
8
|
+
"svelte",
|
|
9
|
+
"sveltekit",
|
|
10
|
+
"vite"
|
|
11
|
+
],
|
|
5
12
|
"repository": {
|
|
6
13
|
"type": "git",
|
|
7
14
|
"url": "https://github.com/sveltejs/kit",
|
|
@@ -15,7 +22,7 @@
|
|
|
15
22
|
"cookie": "^0.6.0",
|
|
16
23
|
"devalue": "^5.0.0",
|
|
17
24
|
"esm-env": "^1.0.0",
|
|
18
|
-
"import-meta-resolve": "^4.
|
|
25
|
+
"import-meta-resolve": "^4.1.0",
|
|
19
26
|
"kleur": "^4.1.5",
|
|
20
27
|
"magic-string": "^0.30.5",
|
|
21
28
|
"mrmime": "^2.0.0",
|
|
@@ -25,7 +32,7 @@
|
|
|
25
32
|
"tiny-glob": "^0.2.9"
|
|
26
33
|
},
|
|
27
34
|
"devDependencies": {
|
|
28
|
-
"@playwright/test": "^1.
|
|
35
|
+
"@playwright/test": "^1.44.1",
|
|
29
36
|
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
|
30
37
|
"@types/connect": "^3.4.38",
|
|
31
38
|
"@types/node": "^18.19.3",
|
|
@@ -34,10 +41,10 @@
|
|
|
34
41
|
"dts-buddy": "0.4.6",
|
|
35
42
|
"rollup": "^4.14.2",
|
|
36
43
|
"svelte": "^4.2.10",
|
|
37
|
-
"svelte-preprocess": "^
|
|
44
|
+
"svelte-preprocess": "^6.0.0",
|
|
38
45
|
"typescript": "^5.3.3",
|
|
39
46
|
"vite": "^5.2.8",
|
|
40
|
-
"vitest": "^1.
|
|
47
|
+
"vitest": "^1.6.0"
|
|
41
48
|
},
|
|
42
49
|
"peerDependencies": {
|
|
43
50
|
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
package/postinstall.js
CHANGED
package/src/cli.js
CHANGED
|
@@ -276,7 +276,17 @@ async function prerender({ out, manifest_path, metadata, verbose, env }) {
|
|
|
276
276
|
|
|
277
277
|
actual_hashlinks.set(decoded, ids);
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
/** @param {string} href */
|
|
280
|
+
const removePrerenderOrigin = (href) => {
|
|
281
|
+
if (href.startsWith(config.prerender.origin)) {
|
|
282
|
+
if (href === config.prerender.origin) return '/';
|
|
283
|
+
if (href.at(config.prerender.origin.length) !== '/') return href;
|
|
284
|
+
return href.slice(config.prerender.origin.length);
|
|
285
|
+
}
|
|
286
|
+
return href;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
for (const href of hrefs.map(removePrerenderOrigin)) {
|
|
280
290
|
if (!is_root_relative(href)) continue;
|
|
281
291
|
|
|
282
292
|
const { pathname, search, hash } = new URL(href, 'http://localhost');
|
package/src/core/sync/sync.js
CHANGED
|
@@ -23,7 +23,7 @@ export function init(config, mode) {
|
|
|
23
23
|
* Update SvelteKit's generated files
|
|
24
24
|
* @param {import('types').ValidatedConfig} config
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export function create(config) {
|
|
27
27
|
const manifest_data = create_manifest_data({ config });
|
|
28
28
|
|
|
29
29
|
const output = path.join(config.kit.outDir, 'generated');
|
|
@@ -31,7 +31,7 @@ export async function create(config) {
|
|
|
31
31
|
write_client_manifest(config.kit, manifest_data, `${output}/client`);
|
|
32
32
|
write_server(config, output);
|
|
33
33
|
write_root(manifest_data, output);
|
|
34
|
-
|
|
34
|
+
write_all_types(config, manifest_data);
|
|
35
35
|
|
|
36
36
|
return { manifest_data };
|
|
37
37
|
}
|
|
@@ -44,10 +44,8 @@ export async function create(config) {
|
|
|
44
44
|
* @param {import('types').ManifestData} manifest_data
|
|
45
45
|
* @param {string} file
|
|
46
46
|
*/
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return { manifest_data };
|
|
47
|
+
export function update(config, manifest_data, file) {
|
|
48
|
+
write_types(config, manifest_data, file);
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
/**
|
|
@@ -55,9 +53,9 @@ export async function update(config, manifest_data, file) {
|
|
|
55
53
|
* @param {import('types').ValidatedConfig} config
|
|
56
54
|
* @param {string} mode The Vite mode
|
|
57
55
|
*/
|
|
58
|
-
export
|
|
56
|
+
export function all(config, mode) {
|
|
59
57
|
init(config, mode);
|
|
60
|
-
return
|
|
58
|
+
return create(config);
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
/**
|
|
@@ -65,10 +63,10 @@ export async function all(config, mode) {
|
|
|
65
63
|
* @param {import('types').ValidatedConfig} config
|
|
66
64
|
* @param {string} mode The Vite mode
|
|
67
65
|
*/
|
|
68
|
-
export
|
|
66
|
+
export function all_types(config, mode) {
|
|
69
67
|
init(config, mode);
|
|
70
68
|
const manifest_data = create_manifest_data({ config });
|
|
71
|
-
|
|
69
|
+
write_all_types(config, manifest_data);
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
/**
|
|
@@ -28,7 +28,7 @@ const cwd = process.cwd();
|
|
|
28
28
|
* @param {import('types').ValidatedConfig} config
|
|
29
29
|
* @param {import('types').ManifestData} manifest_data
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export function write_all_types(config, manifest_data) {
|
|
32
32
|
if (!ts) return;
|
|
33
33
|
|
|
34
34
|
const types_dir = `${config.kit.outDir}/types`;
|
|
@@ -133,7 +133,7 @@ export async function write_all_types(config, manifest_data) {
|
|
|
133
133
|
* @param {import('types').ManifestData} manifest_data
|
|
134
134
|
* @param {string} file
|
|
135
135
|
*/
|
|
136
|
-
export
|
|
136
|
+
export function write_types(config, manifest_data, file) {
|
|
137
137
|
if (!ts) return;
|
|
138
138
|
|
|
139
139
|
if (!path.basename(file).startsWith('+')) {
|
|
@@ -103,6 +103,8 @@ function get_raw_body(req, body_size_limit) {
|
|
|
103
103
|
* }} options
|
|
104
104
|
* @returns {Promise<Request>}
|
|
105
105
|
*/
|
|
106
|
+
// TODO 3.0 make the signature synchronous?
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
106
108
|
export async function getRequest({ request, base, bodySizeLimit }) {
|
|
107
109
|
return new Request(base + request.url, {
|
|
108
110
|
// @ts-expect-error
|
|
@@ -121,6 +123,8 @@ export async function getRequest({ request, base, bodySizeLimit }) {
|
|
|
121
123
|
* @param {Response} response
|
|
122
124
|
* @returns {Promise<void>}
|
|
123
125
|
*/
|
|
126
|
+
// TODO 3.0 make the signature synchronous?
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
124
128
|
export async function setResponse(res, response) {
|
|
125
129
|
for (const [key, value] of response.headers) {
|
|
126
130
|
try {
|
|
@@ -66,13 +66,13 @@ export async function build_service_worker(
|
|
|
66
66
|
*/
|
|
67
67
|
const sw_virtual_modules = {
|
|
68
68
|
name: 'service-worker-build-virtual-modules',
|
|
69
|
-
|
|
69
|
+
resolveId(id) {
|
|
70
70
|
if (id.startsWith('$env/') || id.startsWith('$app/') || id === '$service-worker') {
|
|
71
71
|
return `\0virtual:${id}`;
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
load(id) {
|
|
76
76
|
if (!id.startsWith('\0virtual:')) return;
|
|
77
77
|
|
|
78
78
|
if (id === service_worker) {
|
|
@@ -97,9 +97,9 @@ export async function dev(vite, vite_config, svelte_config) {
|
|
|
97
97
|
return { module, module_node, url };
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
function update_manifest() {
|
|
101
101
|
try {
|
|
102
|
-
({ manifest_data } =
|
|
102
|
+
({ manifest_data } = sync.create(svelte_config));
|
|
103
103
|
|
|
104
104
|
if (manifest_error) {
|
|
105
105
|
manifest_error = null;
|
|
@@ -273,7 +273,7 @@ export async function dev(vite, vite_config, svelte_config) {
|
|
|
273
273
|
return error.stack;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
update_manifest();
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
279
|
* @param {string} event
|
|
@@ -389,7 +389,7 @@ export async function dev(vite, vite_config, svelte_config) {
|
|
|
389
389
|
return ws_send.apply(vite.ws, args);
|
|
390
390
|
};
|
|
391
391
|
|
|
392
|
-
vite.middlewares.use(
|
|
392
|
+
vite.middlewares.use((req, res, next) => {
|
|
393
393
|
try {
|
|
394
394
|
const base = `${vite.config.server.https ? 'https' : 'http'}://${
|
|
395
395
|
req.headers[':authority'] || req.headers.host
|
|
@@ -131,9 +131,9 @@ const warning_preprocessor = {
|
|
|
131
131
|
async function resolve_peer_dependency(dependency) {
|
|
132
132
|
try {
|
|
133
133
|
// @ts-expect-error the types are wrong
|
|
134
|
-
const resolved =
|
|
134
|
+
const resolved = imr.resolve(dependency, pathToFileURL(process.cwd() + '/dummy.js'));
|
|
135
135
|
return import(resolved);
|
|
136
|
-
} catch
|
|
136
|
+
} catch {
|
|
137
137
|
throw new Error(
|
|
138
138
|
`Could not resolve peer dependency "${dependency}" relative to your project — please install it and try again.`
|
|
139
139
|
);
|
|
@@ -242,7 +242,7 @@ async function kit({ svelte_config }) {
|
|
|
242
242
|
* Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file.
|
|
243
243
|
* @see https://vitejs.dev/guide/api-plugin.html#config
|
|
244
244
|
*/
|
|
245
|
-
|
|
245
|
+
config(config, config_env) {
|
|
246
246
|
initial_config = config;
|
|
247
247
|
vite_config_env = config_env;
|
|
248
248
|
is_build = config_env.command === 'build';
|
|
@@ -293,7 +293,10 @@ async function kit({ svelte_config }) {
|
|
|
293
293
|
cors: { preflightContinue: true }
|
|
294
294
|
},
|
|
295
295
|
optimizeDeps: {
|
|
296
|
-
entries: [
|
|
296
|
+
entries: [
|
|
297
|
+
`${kit.files.routes}/**/+*.{svelte,js,ts}`,
|
|
298
|
+
`!${kit.files.routes}/**/+*server.*`
|
|
299
|
+
],
|
|
297
300
|
exclude: [
|
|
298
301
|
'@sveltejs/kit',
|
|
299
302
|
// exclude kit features so that libraries using them work even when they are prebundled
|
|
@@ -336,7 +339,7 @@ async function kit({ svelte_config }) {
|
|
|
336
339
|
};
|
|
337
340
|
|
|
338
341
|
if (!secondary_build_started) {
|
|
339
|
-
manifest_data =
|
|
342
|
+
manifest_data = sync.all(svelte_config, config_env.mode).manifest_data;
|
|
340
343
|
}
|
|
341
344
|
} else {
|
|
342
345
|
new_config.define = {
|
|
@@ -370,7 +373,7 @@ async function kit({ svelte_config }) {
|
|
|
370
373
|
const plugin_virtual_modules = {
|
|
371
374
|
name: 'vite-plugin-sveltekit-virtual-modules',
|
|
372
375
|
|
|
373
|
-
|
|
376
|
+
resolveId(id, importer) {
|
|
374
377
|
// If importing from a service-worker, only allow $service-worker & $env/static/public, but none of the other virtual modules.
|
|
375
378
|
// This check won't catch transitive imports, but it will warn when the import comes from a service-worker directly.
|
|
376
379
|
// Transitive imports will be caught during the build.
|
|
@@ -394,7 +397,7 @@ async function kit({ svelte_config }) {
|
|
|
394
397
|
}
|
|
395
398
|
},
|
|
396
399
|
|
|
397
|
-
|
|
400
|
+
load(id, options) {
|
|
398
401
|
const browser = !options?.ssr;
|
|
399
402
|
|
|
400
403
|
const global = is_build
|
|
@@ -530,7 +533,7 @@ async function kit({ svelte_config }) {
|
|
|
530
533
|
|
|
531
534
|
writeBundle: {
|
|
532
535
|
sequential: true,
|
|
533
|
-
|
|
536
|
+
handler(_options) {
|
|
534
537
|
if (vite_config.build.ssr) return;
|
|
535
538
|
|
|
536
539
|
const guard = module_guard(this, {
|
|
@@ -557,7 +560,7 @@ async function kit({ svelte_config }) {
|
|
|
557
560
|
* Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file.
|
|
558
561
|
* @see https://vitejs.dev/guide/api-plugin.html#config
|
|
559
562
|
*/
|
|
560
|
-
|
|
563
|
+
config(config) {
|
|
561
564
|
/** @type {import('vite').UserConfig} */
|
|
562
565
|
let new_config;
|
|
563
566
|
|
|
@@ -85,7 +85,7 @@ export const updated = {
|
|
|
85
85
|
function get_store(name) {
|
|
86
86
|
try {
|
|
87
87
|
return getStores()[name];
|
|
88
|
-
} catch
|
|
88
|
+
} catch {
|
|
89
89
|
throw new Error(
|
|
90
90
|
`Cannot subscribe to '${name}' store on the server outside of a Svelte component, as it is bound to the current request via component context. This prevents state from leaking between users.` +
|
|
91
91
|
'For more information, see https://kit.svelte.dev/docs/state-management#avoid-shared-state-on-the-server'
|
|
@@ -469,15 +469,7 @@ function initialize(result, target, hydrate) {
|
|
|
469
469
|
* form?: Record<string, any> | null;
|
|
470
470
|
* }} opts
|
|
471
471
|
*/
|
|
472
|
-
|
|
473
|
-
url,
|
|
474
|
-
params,
|
|
475
|
-
branch,
|
|
476
|
-
status,
|
|
477
|
-
error,
|
|
478
|
-
route,
|
|
479
|
-
form
|
|
480
|
-
}) {
|
|
472
|
+
function get_navigation_result_from_branch({ url, params, branch, status, error, route, form }) {
|
|
481
473
|
/** @type {import('types').TrailingSlash} */
|
|
482
474
|
let slash = 'never';
|
|
483
475
|
|
|
@@ -1017,7 +1009,7 @@ async function load_route({ id, invalidating, url, params, route, preload }) {
|
|
|
1017
1009
|
|
|
1018
1010
|
const error_load = await load_nearest_error_page(i, branch, errors);
|
|
1019
1011
|
if (error_load) {
|
|
1020
|
-
return
|
|
1012
|
+
return get_navigation_result_from_branch({
|
|
1021
1013
|
url,
|
|
1022
1014
|
params,
|
|
1023
1015
|
branch: branch.slice(0, error_load.idx).concat(error_load.node),
|
|
@@ -1036,7 +1028,7 @@ async function load_route({ id, invalidating, url, params, route, preload }) {
|
|
|
1036
1028
|
}
|
|
1037
1029
|
}
|
|
1038
1030
|
|
|
1039
|
-
return
|
|
1031
|
+
return get_navigation_result_from_branch({
|
|
1040
1032
|
url,
|
|
1041
1033
|
params,
|
|
1042
1034
|
branch,
|
|
@@ -1070,7 +1062,7 @@ async function load_nearest_error_page(i, branch, errors) {
|
|
|
1070
1062
|
universal: null
|
|
1071
1063
|
}
|
|
1072
1064
|
};
|
|
1073
|
-
} catch
|
|
1065
|
+
} catch {
|
|
1074
1066
|
continue;
|
|
1075
1067
|
}
|
|
1076
1068
|
}
|
|
@@ -1136,7 +1128,7 @@ async function load_root_error_page({ status, error, url, route }) {
|
|
|
1136
1128
|
data: null
|
|
1137
1129
|
};
|
|
1138
1130
|
|
|
1139
|
-
return
|
|
1131
|
+
return get_navigation_result_from_branch({
|
|
1140
1132
|
url,
|
|
1141
1133
|
params,
|
|
1142
1134
|
branch: [root_layout, root_error],
|
|
@@ -1942,7 +1934,7 @@ export async function applyAction(result) {
|
|
|
1942
1934
|
|
|
1943
1935
|
const error_load = await load_nearest_error_page(current.branch.length, branch, route.errors);
|
|
1944
1936
|
if (error_load) {
|
|
1945
|
-
const navigation_result =
|
|
1937
|
+
const navigation_result = get_navigation_result_from_branch({
|
|
1946
1938
|
url,
|
|
1947
1939
|
params: current.params,
|
|
1948
1940
|
branch: branch.slice(0, error_load.idx).concat(error_load.node),
|
|
@@ -2364,7 +2356,7 @@ async function _hydrate(
|
|
|
2364
2356
|
}
|
|
2365
2357
|
}
|
|
2366
2358
|
|
|
2367
|
-
result =
|
|
2359
|
+
result = get_navigation_result_from_branch({
|
|
2368
2360
|
url,
|
|
2369
2361
|
params,
|
|
2370
2362
|
branch,
|
|
@@ -19,6 +19,7 @@ if (DEV && BROWSER) {
|
|
|
19
19
|
let can_inspect_stack_trace = false;
|
|
20
20
|
|
|
21
21
|
// detect whether async stack traces work
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
22
23
|
const check_stack_trace = async () => {
|
|
23
24
|
const stack = /** @type {string} */ (new Error().stack);
|
|
24
25
|
can_inspect_stack_trace = stack.includes('check_stack_trace');
|
|
@@ -146,7 +146,7 @@ export async function render_page(event, page, options, manifest, state, resolve
|
|
|
146
146
|
const data = {};
|
|
147
147
|
for (let j = 0; j < i; j += 1) {
|
|
148
148
|
const parent = await server_promises[j];
|
|
149
|
-
if (parent) Object.assign(data,
|
|
149
|
+
if (parent) Object.assign(data, parent.data);
|
|
150
150
|
}
|
|
151
151
|
return data;
|
|
152
152
|
}
|
|
@@ -50,6 +50,7 @@ export async function respond_with_error({
|
|
|
50
50
|
event,
|
|
51
51
|
state,
|
|
52
52
|
node: default_layout,
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
53
54
|
parent: async () => ({})
|
|
54
55
|
});
|
|
55
56
|
|
|
@@ -59,6 +60,7 @@ export async function respond_with_error({
|
|
|
59
60
|
event,
|
|
60
61
|
fetched,
|
|
61
62
|
node: default_layout,
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
62
64
|
parent: async () => ({}),
|
|
63
65
|
resolve_opts,
|
|
64
66
|
server_data_promise,
|
|
@@ -85,7 +85,7 @@ export async function respond(request, options, manifest, state) {
|
|
|
85
85
|
let rerouted_path;
|
|
86
86
|
try {
|
|
87
87
|
rerouted_path = options.hooks.reroute({ url: new URL(url) }) ?? url.pathname;
|
|
88
|
-
} catch
|
|
88
|
+
} catch {
|
|
89
89
|
return text('Internal Server Error', {
|
|
90
90
|
status: 500
|
|
91
91
|
});
|
package/src/types/internal.d.ts
CHANGED
|
@@ -149,14 +149,15 @@ export interface ManifestData {
|
|
|
149
149
|
|
|
150
150
|
export interface PageNode {
|
|
151
151
|
depth: number;
|
|
152
|
+
/** The +page.svelte */
|
|
152
153
|
component?: string; // TODO supply default component if it's missing (bit of an edge case)
|
|
154
|
+
/** The +page.js/.ts */
|
|
153
155
|
universal?: string;
|
|
156
|
+
/** The +page.server.js/ts */
|
|
154
157
|
server?: string;
|
|
155
158
|
parent_id?: string;
|
|
156
159
|
parent?: PageNode;
|
|
157
|
-
/**
|
|
158
|
-
* Filled with the pages that reference this layout (if this is a layout)
|
|
159
|
-
*/
|
|
160
|
+
/** Filled with the pages that reference this layout (if this is a layout) */
|
|
160
161
|
child_pages?: PageNode[];
|
|
161
162
|
}
|
|
162
163
|
|
package/src/utils/fork.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Worker, parentPort } from 'node:worker_threads';
|
|
|
7
7
|
* @template T
|
|
8
8
|
* @template U
|
|
9
9
|
* @param {string} module `import.meta.url` of the file
|
|
10
|
-
* @param {(opts: T) => U} callback The function that is invoked in the subprocess
|
|
10
|
+
* @param {(opts: T) => Promise<U>} callback The function that is invoked in the subprocess
|
|
11
11
|
* @returns {(opts: T) => Promise<U>} A function that when called starts the subprocess
|
|
12
12
|
*/
|
|
13
13
|
export function forked(module, callback) {
|
package/src/utils/http.js
CHANGED
|
@@ -9,7 +9,7 @@ export function negotiate(accept, types) {
|
|
|
9
9
|
const parts = [];
|
|
10
10
|
|
|
11
11
|
accept.split(',').forEach((str, i) => {
|
|
12
|
-
const match = /([^/]+)\/([^;]+)(?:;q=([0-9.]+))?/.exec(str);
|
|
12
|
+
const match = /([^/ \t]+)\/([^; \t]+)[ \t]*(?:;[ \t]*q=([0-9.]+))?/.exec(str);
|
|
13
13
|
|
|
14
14
|
// no match equals invalid header — ignore
|
|
15
15
|
if (match) {
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1613,14 +1613,15 @@ declare module '@sveltejs/kit' {
|
|
|
1613
1613
|
|
|
1614
1614
|
interface PageNode {
|
|
1615
1615
|
depth: number;
|
|
1616
|
+
/** The +page.svelte */
|
|
1616
1617
|
component?: string; // TODO supply default component if it's missing (bit of an edge case)
|
|
1618
|
+
/** The +page.js/.ts */
|
|
1617
1619
|
universal?: string;
|
|
1620
|
+
/** The +page.server.js/ts */
|
|
1618
1621
|
server?: string;
|
|
1619
1622
|
parent_id?: string;
|
|
1620
1623
|
parent?: PageNode;
|
|
1621
|
-
/**
|
|
1622
|
-
* Filled with the pages that reference this layout (if this is a layout)
|
|
1623
|
-
*/
|
|
1624
|
+
/** Filled with the pages that reference this layout (if this is a layout) */
|
|
1624
1625
|
child_pages?: PageNode[];
|
|
1625
1626
|
}
|
|
1626
1627
|
|
package/types/index.d.ts.map
CHANGED
|
@@ -154,6 +154,6 @@
|
|
|
154
154
|
null,
|
|
155
155
|
null
|
|
156
156
|
],
|
|
157
|
-
"mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;;;;;;;;kBAeTC,aAAaA;;;;;;;;;;;;;;;;;kBAiBbC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkGPC,MAAMA;;;;;;;;;;;;;;;;;;;;;kBAqBNC,OAAOA;;;;;;;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