@sveltejs/kit 2.0.2 → 2.0.4
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/README.md +2 -2
- package/package.json +1 -1
- package/src/exports/vite/build/build_service_worker.js +5 -1
- package/src/exports/vite/index.js +7 -56
- package/src/exports/vite/preview/index.js +126 -50
- package/src/runtime/app/navigation.js +2 -1
- package/src/runtime/client/client.js +5 -10
- package/src/types/synthetic/$env+dynamic+private.md +1 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is the [SvelteKit](https://kit.svelte.dev) framework and CLI.
|
|
4
4
|
|
|
5
|
-
The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/
|
|
5
|
+
The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/main/packages/create-svelte) package:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm create svelte@latest my-app
|
|
@@ -15,4 +15,4 @@ See the [documentation](https://kit.svelte.dev/docs) to learn more.
|
|
|
15
15
|
|
|
16
16
|
## Changelog
|
|
17
17
|
|
|
18
|
-
[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/
|
|
18
|
+
[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md).
|
package/package.json
CHANGED
|
@@ -70,7 +70,8 @@ export async function build_service_worker(
|
|
|
70
70
|
'service-worker': service_worker_entry_file
|
|
71
71
|
},
|
|
72
72
|
output: {
|
|
73
|
-
|
|
73
|
+
// .mjs so that esbuild doesn't incorrectly inject `export` https://github.com/vitejs/vite/issues/15379
|
|
74
|
+
entryFileNames: 'service-worker.mjs',
|
|
74
75
|
assetFileNames: `${kit.appDir}/immutable/assets/[name].[hash][extname]`,
|
|
75
76
|
inlineDynamicImports: true
|
|
76
77
|
}
|
|
@@ -92,4 +93,7 @@ export async function build_service_worker(
|
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
});
|
|
96
|
+
|
|
97
|
+
// rename .mjs to .js to avoid incorrect MIME types with ancient webservers
|
|
98
|
+
fs.renameSync(`${out}/client/service-worker.mjs`, `${out}/client/service-worker.js`);
|
|
95
99
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
-
import path
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
5
5
|
import colors from 'kleur';
|
|
@@ -19,14 +19,12 @@ import { dev } from './dev/index.js';
|
|
|
19
19
|
import { is_illegal, module_guard, normalize_id } from './graph_analysis/index.js';
|
|
20
20
|
import { preview } from './preview/index.js';
|
|
21
21
|
import { get_config_aliases, get_env, strip_virtual_prefix } from './utils.js';
|
|
22
|
-
import { SVELTE_KIT_ASSETS } from '../../constants.js';
|
|
23
22
|
import { write_client_manifest } from '../../core/sync/write_client_manifest.js';
|
|
24
23
|
import prerender from '../../core/postbuild/prerender.js';
|
|
25
24
|
import analyse from '../../core/postbuild/analyse.js';
|
|
26
25
|
import { s } from '../../utils/misc.js';
|
|
27
26
|
import { hash } from '../../runtime/hash.js';
|
|
28
27
|
import { dedent, isSvelte5Plus } from '../../core/sync/utils.js';
|
|
29
|
-
import sirv from 'sirv';
|
|
30
28
|
import {
|
|
31
29
|
env_dynamic_private,
|
|
32
30
|
env_dynamic_public,
|
|
@@ -107,10 +105,14 @@ const warning_preprocessor = {
|
|
|
107
105
|
if (!filename) return;
|
|
108
106
|
|
|
109
107
|
const basename = path.basename(filename);
|
|
110
|
-
|
|
108
|
+
const has_children =
|
|
109
|
+
content.includes('<slot') || (isSvelte5Plus() && content.includes('{@render'));
|
|
110
|
+
|
|
111
|
+
if (basename.startsWith('+layout.') && !has_children) {
|
|
111
112
|
const message =
|
|
112
113
|
`\n${colors.bold().red(path.relative('.', filename))}\n` +
|
|
113
|
-
|
|
114
|
+
`\`<slot />\`${isSvelte5Plus() ? ' or `{@render ...}` tag' : ''}` +
|
|
115
|
+
' missing — inner content will not be rendered';
|
|
114
116
|
|
|
115
117
|
if (!warned.has(message)) {
|
|
116
118
|
console.log(message);
|
|
@@ -331,10 +333,6 @@ function kit({ svelte_config }) {
|
|
|
331
333
|
*/
|
|
332
334
|
configResolved(config) {
|
|
333
335
|
vite_config = config;
|
|
334
|
-
|
|
335
|
-
// This is a hack to prevent Vite from nuking useful logs,
|
|
336
|
-
// pending https://github.com/vitejs/vite/issues/9378
|
|
337
|
-
config.logger.warn('');
|
|
338
336
|
}
|
|
339
337
|
};
|
|
340
338
|
|
|
@@ -626,31 +624,6 @@ function kit({ svelte_config }) {
|
|
|
626
624
|
* @see https://vitejs.dev/guide/api-plugin.html#configurepreviewserver
|
|
627
625
|
*/
|
|
628
626
|
configurePreviewServer(vite) {
|
|
629
|
-
// generated client assets and the contents of `static`
|
|
630
|
-
// should we use Vite's built-in asset server for this?
|
|
631
|
-
// we would need to set the outDir to do so
|
|
632
|
-
const { paths } = svelte_config.kit;
|
|
633
|
-
const assets = paths.assets ? SVELTE_KIT_ASSETS : paths.base;
|
|
634
|
-
vite.middlewares.use(
|
|
635
|
-
scoped(
|
|
636
|
-
assets,
|
|
637
|
-
sirv(join(svelte_config.kit.outDir, 'output/client'), {
|
|
638
|
-
setHeaders: (res, pathname) => {
|
|
639
|
-
if (pathname.startsWith(`/${svelte_config.kit.appDir}/immutable`)) {
|
|
640
|
-
res.setHeader('cache-control', 'public,max-age=31536000,immutable');
|
|
641
|
-
}
|
|
642
|
-
if (vite_config.preview.cors) {
|
|
643
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
644
|
-
res.setHeader(
|
|
645
|
-
'Access-Control-Allow-Headers',
|
|
646
|
-
'Origin, Content-Type, Accept, Range'
|
|
647
|
-
);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
})
|
|
651
|
-
)
|
|
652
|
-
);
|
|
653
|
-
|
|
654
627
|
return preview(vite, vite_config, svelte_config);
|
|
655
628
|
},
|
|
656
629
|
|
|
@@ -943,25 +916,3 @@ const create_service_worker_module = (config) => dedent`
|
|
|
943
916
|
export const prerendered = [];
|
|
944
917
|
export const version = ${s(config.kit.version.name)};
|
|
945
918
|
`;
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* @param {string} scope
|
|
949
|
-
* @param {(req: import('http').IncomingMessage, res: import('http').ServerResponse, next: () => void) => void} handler
|
|
950
|
-
* @returns {(req: import('http').IncomingMessage, res: import('http').ServerResponse, next: () => void) => void}
|
|
951
|
-
*/
|
|
952
|
-
function scoped(scope, handler) {
|
|
953
|
-
if (scope === '') return handler;
|
|
954
|
-
|
|
955
|
-
return (req, res, next) => {
|
|
956
|
-
if (req.url?.startsWith(scope)) {
|
|
957
|
-
const original_url = req.url;
|
|
958
|
-
req.url = req.url.slice(scope.length);
|
|
959
|
-
handler(req, res, () => {
|
|
960
|
-
req.url = original_url;
|
|
961
|
-
next();
|
|
962
|
-
});
|
|
963
|
-
} else {
|
|
964
|
-
next();
|
|
965
|
-
}
|
|
966
|
-
};
|
|
967
|
-
}
|
|
@@ -7,6 +7,7 @@ import { loadEnv, normalizePath } from 'vite';
|
|
|
7
7
|
import { getRequest, setResponse } from '../../../exports/node/index.js';
|
|
8
8
|
import { installPolyfills } from '../../../exports/node/polyfills.js';
|
|
9
9
|
import { SVELTE_KIT_ASSETS } from '../../../constants.js';
|
|
10
|
+
import { not_found } from '../utils.js';
|
|
10
11
|
|
|
11
12
|
/** @typedef {import('http').IncomingMessage} Req */
|
|
12
13
|
/** @typedef {import('http').ServerResponse} Res */
|
|
@@ -21,6 +22,7 @@ export async function preview(vite, vite_config, svelte_config) {
|
|
|
21
22
|
installPolyfills();
|
|
22
23
|
|
|
23
24
|
const { paths } = svelte_config.kit;
|
|
25
|
+
const base = paths.base;
|
|
24
26
|
const assets = paths.assets ? SVELTE_KIT_ASSETS : paths.base;
|
|
25
27
|
|
|
26
28
|
const protocol = vite_config.preview.https ? 'https' : 'http';
|
|
@@ -49,79 +51,131 @@ export async function preview(vite, vite_config, svelte_config) {
|
|
|
49
51
|
});
|
|
50
52
|
|
|
51
53
|
return () => {
|
|
52
|
-
//
|
|
54
|
+
// Remove the base middleware. It screws with the URL.
|
|
55
|
+
// It also only lets through requests beginning with the base path, so that requests beginning
|
|
56
|
+
// with the assets URL never reach us. We could serve assets separately before the base
|
|
57
|
+
// middleware, but we'd need that to occur after the compression and cors middlewares, so would
|
|
58
|
+
// need to insert it manually into the stack, which would be at least as bad as doing this.
|
|
59
|
+
for (let i = vite.middlewares.stack.length - 1; i > 0; i--) {
|
|
60
|
+
// @ts-expect-error using internals
|
|
61
|
+
if (vite.middlewares.stack[i].handle.name === 'viteBaseMiddleware') {
|
|
62
|
+
vite.middlewares.stack.splice(i, 1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// generated client assets and the contents of `static`
|
|
53
67
|
vite.middlewares.use(
|
|
54
|
-
|
|
68
|
+
scoped(
|
|
69
|
+
assets,
|
|
70
|
+
sirv(join(svelte_config.kit.outDir, 'output/client'), {
|
|
71
|
+
setHeaders: (res, pathname) => {
|
|
72
|
+
// only apply to immutable directory, not e.g. version.json
|
|
73
|
+
if (pathname.startsWith(`/${svelte_config.kit.appDir}/immutable`)) {
|
|
74
|
+
res.setHeader('cache-control', 'public,max-age=31536000,immutable');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
)
|
|
55
79
|
);
|
|
56
80
|
|
|
57
|
-
// prerendered pages (we can't just use sirv because we need to
|
|
58
|
-
// preserve the correct trailingSlash behaviour)
|
|
59
81
|
vite.middlewares.use((req, res, next) => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
82
|
+
const original_url = /** @type {string} */ (req.url);
|
|
83
|
+
const { pathname, search } = new URL(original_url, 'http://dummy');
|
|
84
|
+
|
|
85
|
+
// if `paths.base === '/a/b/c`, then the root route is `/a/b/c/`,
|
|
86
|
+
// regardless of the `trailingSlash` route option
|
|
87
|
+
if (base.length > 1 && pathname === base) {
|
|
88
|
+
let location = base + '/';
|
|
89
|
+
if (search) location += search;
|
|
90
|
+
res.writeHead(307, {
|
|
91
|
+
location
|
|
92
|
+
});
|
|
68
93
|
res.end();
|
|
69
94
|
return;
|
|
70
95
|
}
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
if (pathname.startsWith(base)) {
|
|
98
|
+
next();
|
|
99
|
+
} else {
|
|
100
|
+
res.statusCode = 404;
|
|
101
|
+
not_found(req, res, base);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
73
104
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
)
|
|
77
|
-
|
|
105
|
+
// prerendered dependencies
|
|
106
|
+
vite.middlewares.use(
|
|
107
|
+
scoped(base, mutable(join(svelte_config.kit.outDir, 'output/prerendered/dependencies')))
|
|
108
|
+
);
|
|
78
109
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
110
|
+
// prerendered pages (we can't just use sirv because we need to
|
|
111
|
+
// preserve the correct trailingSlash behaviour)
|
|
112
|
+
vite.middlewares.use(
|
|
113
|
+
scoped(base, (req, res, next) => {
|
|
114
|
+
let if_none_match_value = req.headers['if-none-match'];
|
|
82
115
|
|
|
83
|
-
|
|
84
|
-
|
|
116
|
+
if (if_none_match_value?.startsWith('W/"')) {
|
|
117
|
+
if_none_match_value = if_none_match_value.substring(2);
|
|
118
|
+
}
|
|
85
119
|
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (is_file(filename.slice(0, -1) + '.html')) {
|
|
91
|
-
redirect = pathname.slice(0, -1);
|
|
92
|
-
}
|
|
93
|
-
} else if (is_file(filename + '/index.html')) {
|
|
94
|
-
redirect = pathname + '/';
|
|
120
|
+
if (if_none_match_value === etag) {
|
|
121
|
+
res.statusCode = 304;
|
|
122
|
+
res.end();
|
|
123
|
+
return;
|
|
95
124
|
}
|
|
96
125
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
126
|
+
const { pathname, search } = new URL(/** @type {string} */ (req.url), 'http://dummy');
|
|
127
|
+
|
|
128
|
+
let filename = normalizePath(
|
|
129
|
+
join(svelte_config.kit.outDir, 'output/prerendered/pages' + pathname)
|
|
130
|
+
);
|
|
131
|
+
let prerendered = is_file(filename);
|
|
132
|
+
|
|
133
|
+
if (!prerendered) {
|
|
134
|
+
const has_trailing_slash = pathname.endsWith('/');
|
|
135
|
+
const html_filename = `${filename}${has_trailing_slash ? 'index.html' : '.html'}`;
|
|
136
|
+
|
|
137
|
+
/** @type {string | undefined} */
|
|
138
|
+
let redirect;
|
|
139
|
+
|
|
140
|
+
if (is_file(html_filename)) {
|
|
141
|
+
filename = html_filename;
|
|
142
|
+
prerendered = true;
|
|
143
|
+
} else if (has_trailing_slash) {
|
|
144
|
+
if (is_file(filename.slice(0, -1) + '.html')) {
|
|
145
|
+
redirect = pathname.slice(0, -1);
|
|
146
|
+
}
|
|
147
|
+
} else if (is_file(filename + '/index.html')) {
|
|
148
|
+
redirect = pathname + '/';
|
|
149
|
+
}
|
|
102
150
|
|
|
103
|
-
|
|
151
|
+
if (redirect) {
|
|
152
|
+
if (search) redirect += search;
|
|
153
|
+
res.writeHead(307, {
|
|
154
|
+
location: redirect
|
|
155
|
+
});
|
|
104
156
|
|
|
105
|
-
|
|
157
|
+
res.end();
|
|
158
|
+
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
106
161
|
}
|
|
107
|
-
}
|
|
108
162
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
163
|
+
if (prerendered) {
|
|
164
|
+
res.writeHead(200, {
|
|
165
|
+
'content-type': lookup(pathname) || 'text/html',
|
|
166
|
+
etag
|
|
167
|
+
});
|
|
114
168
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
169
|
+
fs.createReadStream(filename).pipe(res);
|
|
170
|
+
} else {
|
|
171
|
+
next();
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
);
|
|
120
175
|
|
|
121
176
|
// SSR
|
|
122
177
|
vite.middlewares.use(async (req, res) => {
|
|
123
178
|
const host = req.headers['host'];
|
|
124
|
-
req.url = req.originalUrl;
|
|
125
179
|
|
|
126
180
|
const request = await getRequest({
|
|
127
181
|
base: `${protocol}://${host}`,
|
|
@@ -155,6 +209,28 @@ const mutable = (dir) =>
|
|
|
155
209
|
})
|
|
156
210
|
: (_req, _res, next) => next();
|
|
157
211
|
|
|
212
|
+
/**
|
|
213
|
+
* @param {string} scope
|
|
214
|
+
* @param {Handler} handler
|
|
215
|
+
* @returns {Handler}
|
|
216
|
+
*/
|
|
217
|
+
function scoped(scope, handler) {
|
|
218
|
+
if (scope === '') return handler;
|
|
219
|
+
|
|
220
|
+
return (req, res, next) => {
|
|
221
|
+
if (req.url?.startsWith(scope)) {
|
|
222
|
+
const original_url = req.url;
|
|
223
|
+
req.url = req.url.slice(scope.length);
|
|
224
|
+
handler(req, res, () => {
|
|
225
|
+
req.url = original_url;
|
|
226
|
+
next();
|
|
227
|
+
});
|
|
228
|
+
} else {
|
|
229
|
+
next();
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
|
|
158
234
|
/** @param {string} path */
|
|
159
235
|
function is_file(path) {
|
|
160
236
|
return fs.existsSync(path) && !fs.statSync(path).isDirectory();
|
|
@@ -11,13 +11,14 @@ export const disableScrollHandling = /* @__PURE__ */ client_method('disable_scro
|
|
|
11
11
|
* Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.
|
|
12
12
|
* For external URLs, use `window.location = url` instead of calling `goto(url)`.
|
|
13
13
|
*
|
|
14
|
-
* @type {(url: string | URL, opts?: { replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; }) => Promise<void>}
|
|
14
|
+
* @type {(url: string | URL, opts?: { replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; state?: App.PageState }) => Promise<void>}
|
|
15
15
|
* @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://kit.svelte.dev/docs/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.
|
|
16
16
|
* @param {Object} [opts] Options related to the navigation
|
|
17
17
|
* @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`
|
|
18
18
|
* @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation
|
|
19
19
|
* @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body
|
|
20
20
|
* @param {boolean} [opts.invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://kit.svelte.dev/docs/load#rerunning-load-functions for more info on invalidation.
|
|
21
|
+
* @param {App.PageState} [opts.state] An optional object that will be available on the `$page.state` store
|
|
21
22
|
* @returns {Promise<void>}
|
|
22
23
|
*/
|
|
23
24
|
export const goto = /* @__PURE__ */ client_method('goto');
|
|
@@ -302,7 +302,7 @@ export function create_client(app, target) {
|
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
* @param {string | URL} url
|
|
305
|
-
* @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; }} options
|
|
305
|
+
* @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; state?: Record<string, any> }} options
|
|
306
306
|
* @param {number} redirect_count
|
|
307
307
|
* @param {{}} [nav_token]
|
|
308
308
|
*/
|
|
@@ -314,6 +314,7 @@ export function create_client(app, target) {
|
|
|
314
314
|
noscroll: options.noScroll,
|
|
315
315
|
replace_state: options.replaceState,
|
|
316
316
|
redirect_count,
|
|
317
|
+
state: options.state,
|
|
317
318
|
nav_token,
|
|
318
319
|
accept: () => {
|
|
319
320
|
if (options.invalidateAll) {
|
|
@@ -1107,6 +1108,7 @@ export function create_client(app, target) {
|
|
|
1107
1108
|
* keepfocus?: boolean;
|
|
1108
1109
|
* noscroll?: boolean;
|
|
1109
1110
|
* replace_state?: boolean;
|
|
1111
|
+
* state?: Record<string, any>;
|
|
1110
1112
|
* redirect_count?: number;
|
|
1111
1113
|
* nav_token?: {};
|
|
1112
1114
|
* accept?: () => void;
|
|
@@ -1120,6 +1122,7 @@ export function create_client(app, target) {
|
|
|
1120
1122
|
keepfocus,
|
|
1121
1123
|
noscroll,
|
|
1122
1124
|
replace_state,
|
|
1125
|
+
state = {},
|
|
1123
1126
|
redirect_count = 0,
|
|
1124
1127
|
nav_token = {},
|
|
1125
1128
|
accept = noop,
|
|
@@ -1213,7 +1216,7 @@ export function create_client(app, target) {
|
|
|
1213
1216
|
url.pathname = navigation_result.props.page.url.pathname;
|
|
1214
1217
|
}
|
|
1215
1218
|
|
|
1216
|
-
|
|
1219
|
+
state = popped ? popped.state : state;
|
|
1217
1220
|
|
|
1218
1221
|
if (!popped) {
|
|
1219
1222
|
// this is a new navigation, rather than a popstate
|
|
@@ -1533,14 +1536,6 @@ export function create_client(app, target) {
|
|
|
1533
1536
|
goto: (url, opts = {}) => {
|
|
1534
1537
|
url = resolve_url(url);
|
|
1535
1538
|
|
|
1536
|
-
// @ts-expect-error
|
|
1537
|
-
if (DEV && opts.state) {
|
|
1538
|
-
// TOOD 3.0 remove
|
|
1539
|
-
throw new Error(
|
|
1540
|
-
'Passing `state` to `goto` is no longer supported. Use `pushState` and `replaceState` from `$app/navigation` instead.'
|
|
1541
|
-
);
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
1539
|
if (url.origin !== origin) {
|
|
1545
1540
|
return Promise.reject(
|
|
1546
1541
|
new Error(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/
|
|
1
|
+
This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured).
|
|
2
2
|
|
|
3
3
|
This module cannot be imported into client-side code.
|
|
4
4
|
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1959,6 +1959,7 @@ declare module '$app/navigation' {
|
|
|
1959
1959
|
noScroll?: boolean;
|
|
1960
1960
|
keepFocus?: boolean;
|
|
1961
1961
|
invalidateAll?: boolean;
|
|
1962
|
+
state?: App.PageState;
|
|
1962
1963
|
}) => Promise<void>;
|
|
1963
1964
|
/**
|
|
1964
1965
|
* Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated.
|
package/types/index.d.ts.map
CHANGED
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
null,
|
|
144
144
|
null
|
|
145
145
|
],
|
|
146
|
-
"mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;aAYZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;;;;;;;;kBAeTC,aAAaA;;;;;;;;;;;;;;;;kBAgBbC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4FPC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6BNC,OAAOA;;;;;;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