@sveltejs/kit 1.0.0-next.229 → 1.0.0-next.232
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/app → app}/env.js +0 -0
- package/assets/{runtime/app → app}/navigation.js +1 -1
- package/assets/{runtime/app → app}/paths.js +0 -0
- package/assets/{runtime/app → app}/stores.js +0 -0
- package/assets/{runtime/chunks → chunks}/utils.js +0 -0
- package/assets/{runtime/internal → client}/singletons.js +0 -0
- package/assets/{runtime/internal → client}/start.js +3 -5
- package/assets/{runtime/env.js → env.js} +0 -0
- package/assets/{runtime/paths.js → paths.js} +0 -0
- package/assets/{kit.js → server/index.js} +9 -3
- package/dist/chunks/build.js +658 -0
- package/dist/chunks/index.js +1978 -35
- package/dist/chunks/index2.js +13 -9
- package/dist/chunks/index3.js +27 -41
- package/dist/chunks/index5.js +9 -5
- package/dist/chunks/index6.js +8 -657
- package/dist/chunks/index7.js +1 -2
- package/dist/cli.js +69 -27
- package/dist/install-fetch.js +4 -0
- package/package.json +2 -5
- package/dist/chunks/constants.js +0 -8
- package/dist/chunks/error.js +0 -12
- package/dist/ssr.js +0 -1928
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderer, router as router$1 } from '../
|
|
1
|
+
import { renderer, router as router$1 } from '../client/singletons.js';
|
|
2
2
|
import { g as get_base_uri } from '../chunks/utils.js';
|
|
3
3
|
|
|
4
4
|
const router = /** @type {import('../client/router').Router} */ (router$1);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Root from '
|
|
2
|
-
import { fallback, routes } from '
|
|
1
|
+
import Root from '__GENERATED__/root.svelte';
|
|
2
|
+
import { fallback, routes } from '__GENERATED__/manifest.js';
|
|
3
3
|
import { onMount, tick } from 'svelte';
|
|
4
4
|
import { g as get_base_uri } from '../chunks/utils.js';
|
|
5
5
|
import { writable } from 'svelte/store';
|
|
@@ -156,7 +156,7 @@ class Router {
|
|
|
156
156
|
addEventListener('sveltekit:trigger_prefetch', trigger_prefetch);
|
|
157
157
|
|
|
158
158
|
/** @param {MouseEvent} event */
|
|
159
|
-
addEventListener('click',
|
|
159
|
+
addEventListener('click', (event) => {
|
|
160
160
|
if (!this.enabled) return;
|
|
161
161
|
|
|
162
162
|
// Adapted from https://github.com/visionmedia/page.js
|
|
@@ -1326,8 +1326,6 @@ class Renderer {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
1329
|
-
// @ts-expect-error - doesn't exist yet. generated by Rollup
|
|
1330
|
-
|
|
1331
1329
|
/**
|
|
1332
1330
|
* @param {{
|
|
1333
1331
|
* paths: {
|
|
File without changes
|
|
File without changes
|
|
@@ -1896,7 +1896,12 @@ async function respond(incoming, options, state = {}) {
|
|
|
1896
1896
|
});
|
|
1897
1897
|
}
|
|
1898
1898
|
|
|
1899
|
-
|
|
1899
|
+
let decoded = decodeURI(request.url.pathname);
|
|
1900
|
+
|
|
1901
|
+
if (options.paths.base) {
|
|
1902
|
+
if (!decoded.startsWith(options.paths.base)) return;
|
|
1903
|
+
decoded = decoded.slice(options.paths.base.length) || '/';
|
|
1904
|
+
}
|
|
1900
1905
|
|
|
1901
1906
|
for (const route of options.manifest._.routes) {
|
|
1902
1907
|
const match = route.pattern.exec(decoded);
|
|
@@ -1908,8 +1913,9 @@ async function respond(incoming, options, state = {}) {
|
|
|
1908
1913
|
: await render_page(request, route, match, options, state, ssr);
|
|
1909
1914
|
|
|
1910
1915
|
if (response) {
|
|
1911
|
-
// inject ETags for 200 responses
|
|
1912
|
-
|
|
1916
|
+
// inject ETags for 200 responses, if the endpoint
|
|
1917
|
+
// doesn't have its own ETag handling
|
|
1918
|
+
if (response.status === 200 && !response.headers.etag) {
|
|
1913
1919
|
const cache_control = get_single_valued_header(response.headers, 'cache-control');
|
|
1914
1920
|
if (!cache_control || !/(no-store|immutable)/.test(cache_control)) {
|
|
1915
1921
|
let if_none_match_value = request.headers['if-none-match'];
|