@sveltejs/kit 1.0.0-next.308 → 1.0.0-next.310
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/server/index.js +21 -17
- package/dist/cli.js +2 -2
- package/package.json +1 -1
package/assets/server/index.js
CHANGED
|
@@ -1161,7 +1161,14 @@ async function render_response({
|
|
|
1161
1161
|
stores: {
|
|
1162
1162
|
page: writable(null),
|
|
1163
1163
|
navigating: writable(null),
|
|
1164
|
-
|
|
1164
|
+
/** @type {import('svelte/store').Writable<App.Session>} */
|
|
1165
|
+
session: {
|
|
1166
|
+
...session,
|
|
1167
|
+
subscribe: (fn) => {
|
|
1168
|
+
is_private = true;
|
|
1169
|
+
return session.subscribe(fn);
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1165
1172
|
updated
|
|
1166
1173
|
},
|
|
1167
1174
|
/** @type {import('types').Page} */
|
|
@@ -1199,17 +1206,7 @@ async function render_response({
|
|
|
1199
1206
|
props[`props_${i}`] = await branch[i].loaded.props;
|
|
1200
1207
|
}
|
|
1201
1208
|
|
|
1202
|
-
|
|
1203
|
-
const unsubscribe = session.subscribe(() => {
|
|
1204
|
-
if (session_tracking_active) is_private = true;
|
|
1205
|
-
});
|
|
1206
|
-
session_tracking_active = true;
|
|
1207
|
-
|
|
1208
|
-
try {
|
|
1209
|
-
rendered = options.root.render(props);
|
|
1210
|
-
} finally {
|
|
1211
|
-
unsubscribe();
|
|
1212
|
-
}
|
|
1209
|
+
rendered = options.root.render(props);
|
|
1213
1210
|
} else {
|
|
1214
1211
|
rendered = { head: '', html: '', css: { code: '', map: null } };
|
|
1215
1212
|
}
|
|
@@ -1728,11 +1725,18 @@ async function load_node({
|
|
|
1728
1725
|
throw new Error('Request body must be a string');
|
|
1729
1726
|
}
|
|
1730
1727
|
|
|
1731
|
-
response = await respond(
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1728
|
+
response = await respond(
|
|
1729
|
+
// we set `credentials` to `undefined` to workaround a bug in Cloudflare
|
|
1730
|
+
// (https://github.com/sveltejs/kit/issues/3728) — which is fine, because
|
|
1731
|
+
// we only need the headers
|
|
1732
|
+
new Request(new URL(requested, event.url).href, { ...opts, credentials: undefined }),
|
|
1733
|
+
options,
|
|
1734
|
+
{
|
|
1735
|
+
getClientAddress: state.getClientAddress,
|
|
1736
|
+
initiator: route,
|
|
1737
|
+
prerender: state.prerender
|
|
1738
|
+
}
|
|
1739
|
+
);
|
|
1736
1740
|
|
|
1737
1741
|
if (state.prerender) {
|
|
1738
1742
|
dependency = { response, body: null };
|
package/dist/cli.js
CHANGED
|
@@ -870,7 +870,7 @@ async function launch(port, https, base) {
|
|
|
870
870
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}${base}`);
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
873
|
+
const prog = sade('svelte-kit').version('1.0.0-next.310');
|
|
874
874
|
|
|
875
875
|
prog
|
|
876
876
|
.command('dev')
|
|
@@ -1049,7 +1049,7 @@ async function check_port(port) {
|
|
|
1049
1049
|
function welcome({ port, host, https, open, base, loose, allow, cwd }) {
|
|
1050
1050
|
if (open) launch(port, https, base);
|
|
1051
1051
|
|
|
1052
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1052
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.310'}\n`));
|
|
1053
1053
|
|
|
1054
1054
|
const protocol = https ? 'https:' : 'http:';
|
|
1055
1055
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|