@sveltejs/kit 1.0.0-next.168 → 1.0.0-next.171
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/assets/runtime/internal/start.js +6 -5
- package/dist/chunks/cert.js +2494 -2338
- package/dist/chunks/index.js +2348 -1273
- package/dist/chunks/index2.js +44 -23
- package/dist/chunks/index3.js +604 -23
- package/dist/chunks/index4.js +303 -522
- package/dist/chunks/index5.js +328 -303
- package/dist/chunks/index6.js +19408 -296
- package/dist/cli.js +6 -6
- package/dist/ssr.js +41 -34
- package/package.json +17 -17
- package/types/internal.d.ts +1 -3
- package/dist/chunks/_commonjsHelpers.js +0 -8
- package/dist/chunks/index7.js +0 -19368
|
@@ -179,12 +179,13 @@ class Router {
|
|
|
179
179
|
if (this.owns(url)) {
|
|
180
180
|
const path = url.pathname.slice(this.base.length) || '/';
|
|
181
181
|
|
|
182
|
-
const
|
|
182
|
+
const decoded_path = decodeURI(path);
|
|
183
|
+
const routes = this.routes.filter(([pattern]) => pattern.test(decoded_path));
|
|
183
184
|
|
|
184
185
|
const query = new URLSearchParams(url.search);
|
|
185
186
|
const id = `${path}?${query}`;
|
|
186
187
|
|
|
187
|
-
return { id, routes, path, query };
|
|
188
|
+
return { id, routes, path, decoded_path, query };
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
|
|
@@ -913,8 +914,8 @@ class Renderer {
|
|
|
913
914
|
* @param {boolean} no_cache
|
|
914
915
|
* @returns {Promise<import('./types').NavigationResult | undefined>} undefined if fallthrough
|
|
915
916
|
*/
|
|
916
|
-
async _load({ route, info: { path, query } }, no_cache) {
|
|
917
|
-
const key = `${
|
|
917
|
+
async _load({ route, info: { path, decoded_path, query } }, no_cache) {
|
|
918
|
+
const key = `${decoded_path}?${query}`;
|
|
918
919
|
|
|
919
920
|
if (!no_cache) {
|
|
920
921
|
const cached = this.cache.get(key);
|
|
@@ -924,7 +925,7 @@ class Renderer {
|
|
|
924
925
|
const [pattern, a, b, get_params] = route;
|
|
925
926
|
const params = get_params
|
|
926
927
|
? // the pattern is for the route which we've already matched to this path
|
|
927
|
-
get_params(/** @type {RegExpExecArray} */ (pattern.exec(
|
|
928
|
+
get_params(/** @type {RegExpExecArray} */ (pattern.exec(decoded_path)))
|
|
928
929
|
: {};
|
|
929
930
|
|
|
930
931
|
const changed = this.current.page && {
|