@sveltejs/kit 1.0.0-next.392 → 1.0.0-next.395
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/client/start.js +9 -2
- package/assets/env/dynamic/private.js +1 -0
- package/assets/env/dynamic/public.js +1 -0
- package/assets/env-private.js +9 -0
- package/assets/env-public.js +9 -0
- package/assets/server/index.js +4 -1
- package/dist/chunks/error.js +1 -671
- package/dist/chunks/filesystem.js +110 -0
- package/dist/chunks/index.js +574 -15643
- package/dist/chunks/index2.js +15705 -177
- package/dist/chunks/index3.js +218 -0
- package/dist/chunks/sync.js +377 -70
- package/dist/chunks/utils.js +66 -0
- package/dist/chunks/write_tsconfig.js +64 -121
- package/dist/cli.js +8 -6
- package/dist/prerender.js +788 -0
- package/dist/vite.js +194 -971
- package/package.json +1 -1
- package/types/ambient.d.ts +58 -12
- package/types/index.d.ts +8 -0
- package/types/internal.d.ts +8 -0
package/assets/client/start.js
CHANGED
|
@@ -4,6 +4,7 @@ import { assets, set_paths } from '../paths.js';
|
|
|
4
4
|
import Root from '__GENERATED__/root.svelte';
|
|
5
5
|
import { components, dictionary, matchers } from '__GENERATED__/client-manifest.js';
|
|
6
6
|
import { init } from './singletons.js';
|
|
7
|
+
export { set_public_env } from '../env-public.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @param {unknown} err
|
|
@@ -569,6 +570,9 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
569
570
|
if (!ready) return;
|
|
570
571
|
session_id += 1;
|
|
571
572
|
|
|
573
|
+
const current_load_uses_session = current.branch.some((node) => node?.uses.session);
|
|
574
|
+
if (!current_load_uses_session) return;
|
|
575
|
+
|
|
572
576
|
update(new URL(location.href), [], true);
|
|
573
577
|
});
|
|
574
578
|
ready = true;
|
|
@@ -876,8 +880,11 @@ function create_client({ target, session, base, trailing_slash }) {
|
|
|
876
880
|
};
|
|
877
881
|
|
|
878
882
|
for (let i = 0; i < filtered.length; i += 1) {
|
|
879
|
-
|
|
880
|
-
|
|
883
|
+
// Only set props if the node actually updated. This prevents needless rerenders.
|
|
884
|
+
if (!current.branch.some((node) => node === filtered[i])) {
|
|
885
|
+
const loaded = filtered[i].loaded;
|
|
886
|
+
result.props[`props_${i}`] = loaded ? await loaded.props : null;
|
|
887
|
+
}
|
|
881
888
|
}
|
|
882
889
|
|
|
883
890
|
const page_changed =
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { env } from '../../env-private.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { env } from '../../env-public.js';
|
package/assets/server/index.js
CHANGED
|
@@ -1474,7 +1474,10 @@ async function render_response({
|
|
|
1474
1474
|
|
|
1475
1475
|
// prettier-ignore
|
|
1476
1476
|
const init_app = `
|
|
1477
|
-
import { start } from ${s(options.prefix + entry.file)};
|
|
1477
|
+
import { set_public_env, start } from ${s(options.prefix + entry.file)};
|
|
1478
|
+
|
|
1479
|
+
set_public_env(${s(options.public_env)});
|
|
1480
|
+
|
|
1478
1481
|
start({
|
|
1479
1482
|
target: document.querySelector('[data-sveltekit-hydrate="${target}"]').parentNode,
|
|
1480
1483
|
paths: ${s(options.paths)},
|