@sveltejs/kit 2.36.1 → 2.36.3
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/package.json +6 -4
- package/src/core/config/options.js +7 -2
- package/src/core/sync/write_server.js +1 -1
- package/src/exports/public.d.ts +5 -2
- package/src/exports/vite/index.js +0 -2
- package/src/runtime/app/state/server.js +9 -9
- package/src/runtime/app/stores.js +4 -4
- package/src/runtime/client/remote-functions/form.svelte.js +2 -2
- package/src/runtime/server/cookie.js +3 -2
- package/src/runtime/server/page/actions.js +2 -2
- package/src/runtime/server/page/csp.js +4 -3
- package/src/runtime/server/page/load_data.js +2 -2
- package/src/runtime/server/page/render.js +5 -5
- package/src/runtime/server/respond.js +1 -2
- package/src/runtime/server/utils.js +4 -4
- package/src/types/ambient.d.ts +1 -1
- package/src/types/global-private.d.ts +0 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +6 -3
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/kit",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.3",
|
|
4
4
|
"description": "SvelteKit is the fastest way to build Svelte apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/cookie": "^0.6.0",
|
|
24
24
|
"acorn": "^8.14.1",
|
|
25
25
|
"cookie": "^0.6.0",
|
|
26
|
-
"devalue": "^5.
|
|
26
|
+
"devalue": "^5.3.2",
|
|
27
27
|
"esm-env": "^1.2.2",
|
|
28
28
|
"kleur": "^4.1.5",
|
|
29
29
|
"magic-string": "^0.30.5",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@types/set-cookie-parser": "^2.4.7",
|
|
42
42
|
"dts-buddy": "^0.6.2",
|
|
43
43
|
"rollup": "^4.14.2",
|
|
44
|
-
"svelte": "^5.
|
|
44
|
+
"svelte": "^5.38.5",
|
|
45
45
|
"svelte-preprocess": "^6.0.0",
|
|
46
46
|
"typescript": "^5.3.3",
|
|
47
47
|
"vite": "^6.3.5",
|
|
@@ -115,7 +115,9 @@
|
|
|
115
115
|
"test:cross-platform:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:cross-platform:build",
|
|
116
116
|
"test:server-side-route-resolution:dev": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:dev",
|
|
117
117
|
"test:server-side-route-resolution:build": "pnpm test:unit && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test:server-side-route-resolution:build",
|
|
118
|
-
"test:unit": "vitest --config kit.vitest.config.js run",
|
|
118
|
+
"test:unit:dev": "vitest --config kit.vitest.config.js run",
|
|
119
|
+
"test:unit:prod": "NODE_ENV=production vitest --config kit.vitest.config.js run csp.spec.js cookie.spec.js",
|
|
120
|
+
"test:unit": "pnpm test:unit:dev && pnpm test:unit:prod",
|
|
119
121
|
"generate:version": "node scripts/generate-version.js",
|
|
120
122
|
"generate:types": "node scripts/generate-dts.js"
|
|
121
123
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
|
+
import colors from 'kleur';
|
|
2
3
|
|
|
3
4
|
/** @typedef {import('./types.js').Validator} Validator */
|
|
4
5
|
|
|
@@ -108,7 +109,11 @@ const options = object(
|
|
|
108
109
|
}),
|
|
109
110
|
|
|
110
111
|
csrf: object({
|
|
111
|
-
checkOrigin:
|
|
112
|
+
checkOrigin: deprecate(
|
|
113
|
+
boolean(true),
|
|
114
|
+
(keypath) =>
|
|
115
|
+
`\`${keypath}\` has been deprecated in favour of \`csrf.trustedOrigins\`. It will be removed in a future version`
|
|
116
|
+
),
|
|
112
117
|
trustedOrigins: string_array([])
|
|
113
118
|
}),
|
|
114
119
|
|
|
@@ -323,7 +328,7 @@ function deprecate(
|
|
|
323
328
|
) {
|
|
324
329
|
return (input, keypath) => {
|
|
325
330
|
if (input !== undefined) {
|
|
326
|
-
console.warn(get_message(keypath));
|
|
331
|
+
console.warn(colors.bold().yellow(get_message(keypath)));
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
return fn(input, keypath);
|
|
@@ -37,7 +37,7 @@ import { set_private_env, set_public_env } from '${runtime_directory}/shared-ser
|
|
|
37
37
|
export const options = {
|
|
38
38
|
app_template_contains_nonce: ${template.includes('%sveltekit.nonce%')},
|
|
39
39
|
csp: ${s(config.kit.csp)},
|
|
40
|
-
csrf_check_origin: ${s(config.kit.csrf.checkOrigin)},
|
|
40
|
+
csrf_check_origin: ${s(config.kit.csrf.checkOrigin && !config.kit.csrf.trustedOrigins.includes('*'))},
|
|
41
41
|
csrf_trusted_origins: ${s(config.kit.csrf.trustedOrigins)},
|
|
42
42
|
embedded: ${config.kit.embedded},
|
|
43
43
|
env_public_prefix: '${config.kit.env.publicPrefix}',
|
package/src/exports/public.d.ts
CHANGED
|
@@ -426,14 +426,17 @@ export interface KitConfig {
|
|
|
426
426
|
*
|
|
427
427
|
* To allow people to make `POST`, `PUT`, `PATCH`, or `DELETE` requests with a `Content-Type` of `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain` to your app from other origins, you will need to disable this option. Be careful!
|
|
428
428
|
* @default true
|
|
429
|
+
* @deprecated Use `trustedOrigins: ['*']` instead
|
|
429
430
|
*/
|
|
430
431
|
checkOrigin?: boolean;
|
|
431
432
|
/**
|
|
432
|
-
* An array of origins that are allowed to make cross-origin form submissions to your app
|
|
433
|
+
* An array of origins that are allowed to make cross-origin form submissions to your app.
|
|
433
434
|
*
|
|
434
435
|
* Each origin should be a complete origin including protocol (e.g., `https://payment-gateway.com`).
|
|
435
436
|
* This is useful for allowing trusted third-party services like payment gateways or authentication providers to submit forms to your app.
|
|
436
437
|
*
|
|
438
|
+
* If the array contains `'*'`, all origins will be trusted. This is generally not recommended!
|
|
439
|
+
*
|
|
437
440
|
* **Warning**: Only add origins you completely trust, as this bypasses CSRF protection for those origins.
|
|
438
441
|
* @default []
|
|
439
442
|
* @example ['https://checkout.stripe.com', 'https://accounts.google.com']
|
|
@@ -1819,7 +1822,7 @@ export type RemoteQuery<T> = RemoteResource<T> & {
|
|
|
1819
1822
|
* await submit().updates(
|
|
1820
1823
|
* todos.withOverride((todos) => [...todos, { text: data.get('text') }])
|
|
1821
1824
|
* );
|
|
1822
|
-
* }}>
|
|
1825
|
+
* })}>
|
|
1823
1826
|
* <input type="text" name="text" />
|
|
1824
1827
|
* <button type="submit">Add Todo</button>
|
|
1825
1828
|
* </form>
|
|
@@ -335,7 +335,6 @@ async function kit({ svelte_config }) {
|
|
|
335
335
|
__SVELTEKIT_ADAPTER_NAME__: s(kit.adapter?.name),
|
|
336
336
|
__SVELTEKIT_APP_VERSION_FILE__: s(`${kit.appDir}/version.json`),
|
|
337
337
|
__SVELTEKIT_APP_VERSION_POLL_INTERVAL__: s(kit.version.pollInterval),
|
|
338
|
-
__SVELTEKIT_DEV__: 'false',
|
|
339
338
|
__SVELTEKIT_EMBEDDED__: s(kit.embedded),
|
|
340
339
|
__SVELTEKIT_EXPERIMENTAL__REMOTE_FUNCTIONS__: s(kit.experimental.remoteFunctions),
|
|
341
340
|
__SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'),
|
|
@@ -351,7 +350,6 @@ async function kit({ svelte_config }) {
|
|
|
351
350
|
} else {
|
|
352
351
|
new_config.define = {
|
|
353
352
|
__SVELTEKIT_APP_VERSION_POLL_INTERVAL__: '0',
|
|
354
|
-
__SVELTEKIT_DEV__: 'true',
|
|
355
353
|
__SVELTEKIT_EMBEDDED__: s(kit.embedded),
|
|
356
354
|
__SVELTEKIT_EXPERIMENTAL__REMOTE_FUNCTIONS__: s(kit.experimental.remoteFunctions),
|
|
357
355
|
__SVELTEKIT_CLIENT_ROUTING__: s(kit.router.resolution === 'client'),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEV } from 'esm-env';
|
|
1
2
|
import { getContext } from 'svelte';
|
|
2
3
|
|
|
3
4
|
function context() {
|
|
@@ -16,31 +17,30 @@ function context_dev(name) {
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
// TODO we're using DEV in some places and __SVELTEKIT_DEV__ in others - why? Can we consolidate?
|
|
20
20
|
export const page = {
|
|
21
21
|
get data() {
|
|
22
|
-
return (
|
|
22
|
+
return (DEV ? context_dev('page.data') : context()).page.data;
|
|
23
23
|
},
|
|
24
24
|
get error() {
|
|
25
|
-
return (
|
|
25
|
+
return (DEV ? context_dev('page.error') : context()).page.error;
|
|
26
26
|
},
|
|
27
27
|
get form() {
|
|
28
|
-
return (
|
|
28
|
+
return (DEV ? context_dev('page.form') : context()).page.form;
|
|
29
29
|
},
|
|
30
30
|
get params() {
|
|
31
|
-
return (
|
|
31
|
+
return (DEV ? context_dev('page.params') : context()).page.params;
|
|
32
32
|
},
|
|
33
33
|
get route() {
|
|
34
|
-
return (
|
|
34
|
+
return (DEV ? context_dev('page.route') : context()).page.route;
|
|
35
35
|
},
|
|
36
36
|
get state() {
|
|
37
|
-
return (
|
|
37
|
+
return (DEV ? context_dev('page.state') : context()).page.state;
|
|
38
38
|
},
|
|
39
39
|
get status() {
|
|
40
|
-
return (
|
|
40
|
+
return (DEV ? context_dev('page.status') : context()).page.status;
|
|
41
41
|
},
|
|
42
42
|
get url() {
|
|
43
|
-
return (
|
|
43
|
+
return (DEV ? context_dev('page.url') : context()).page.url;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getContext } from 'svelte';
|
|
2
|
-
import { BROWSER } from 'esm-env';
|
|
2
|
+
import { BROWSER, DEV } from 'esm-env';
|
|
3
3
|
import { stores as browser_stores } from '../client/client.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -35,7 +35,7 @@ export const getStores = () => {
|
|
|
35
35
|
*/
|
|
36
36
|
export const page = {
|
|
37
37
|
subscribe(fn) {
|
|
38
|
-
const store =
|
|
38
|
+
const store = DEV ? get_store('page') : getStores().page;
|
|
39
39
|
return store.subscribe(fn);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -52,7 +52,7 @@ export const page = {
|
|
|
52
52
|
*/
|
|
53
53
|
export const navigating = {
|
|
54
54
|
subscribe(fn) {
|
|
55
|
-
const store =
|
|
55
|
+
const store = DEV ? get_store('navigating') : getStores().navigating;
|
|
56
56
|
return store.subscribe(fn);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
@@ -67,7 +67,7 @@ export const navigating = {
|
|
|
67
67
|
*/
|
|
68
68
|
export const updated = {
|
|
69
69
|
subscribe(fn) {
|
|
70
|
-
const store =
|
|
70
|
+
const store = DEV ? get_store('updated') : getStores().updated;
|
|
71
71
|
|
|
72
72
|
if (BROWSER) {
|
|
73
73
|
updated.check = store.check;
|
|
@@ -210,7 +210,7 @@ export function form(id) {
|
|
|
210
210
|
};
|
|
211
211
|
};
|
|
212
212
|
|
|
213
|
-
instance.onsubmit = form_onsubmit(({ submit }) => submit());
|
|
213
|
+
instance.onsubmit = form_onsubmit(({ submit, form }) => submit().then(() => form.reset()));
|
|
214
214
|
|
|
215
215
|
/** @param {Parameters<RemoteForm<any>['buttonProps']['enhance']>[0]} callback */
|
|
216
216
|
const form_action_onclick = (callback) => {
|
|
@@ -247,7 +247,7 @@ export function form(id) {
|
|
|
247
247
|
type: 'submit',
|
|
248
248
|
formmethod: 'POST',
|
|
249
249
|
formaction: action,
|
|
250
|
-
onclick: form_action_onclick(({ submit }) => submit())
|
|
250
|
+
onclick: form_action_onclick(({ submit, form }) => submit().then(() => form.reset()))
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
Object.defineProperty(button_props, 'enhance', {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parse, serialize } from 'cookie';
|
|
2
|
+
import { DEV } from 'esm-env';
|
|
2
3
|
import { normalize_path, resolve } from '../../utils/url.js';
|
|
3
4
|
import { add_data_suffix } from '../pathname.js';
|
|
4
5
|
import { text_encoder } from '../utils.js';
|
|
@@ -96,7 +97,7 @@ export function get_cookies(request, url) {
|
|
|
96
97
|
// in development, if the cookie was set during this session with `cookies.set`,
|
|
97
98
|
// but at a different path, warn the user. (ignore cookies from request headers,
|
|
98
99
|
// since we don't know which path they were set at)
|
|
99
|
-
if (
|
|
100
|
+
if (DEV && !cookie) {
|
|
100
101
|
const paths = Array.from(cookie_paths[name] ?? []).filter((path) => {
|
|
101
102
|
// we only care about paths that are _more_ specific than the current path
|
|
102
103
|
return path_matches(path, url.pathname) && path !== url.pathname;
|
|
@@ -252,7 +253,7 @@ export function get_cookies(request, url) {
|
|
|
252
253
|
const cookie = { name, value, options: { ...options, path } };
|
|
253
254
|
new_cookies.set(cookie_key, cookie);
|
|
254
255
|
|
|
255
|
-
if (
|
|
256
|
+
if (DEV) {
|
|
256
257
|
const serialized = serialize(name, value, cookie.options);
|
|
257
258
|
if (text_encoder.encode(serialized).byteLength > MAX_COOKIE_SIZE) {
|
|
258
259
|
throw new Error(`Cookie "${name}" is too large, and will be discarded by the browser`);
|
|
@@ -57,7 +57,7 @@ export async function handle_action_json_request(event, event_state, options, se
|
|
|
57
57
|
try {
|
|
58
58
|
const data = await call_action(event, event_state, actions);
|
|
59
59
|
|
|
60
|
-
if (
|
|
60
|
+
if (DEV) {
|
|
61
61
|
validate_action_return(data);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -176,7 +176,7 @@ export async function handle_action_request(event, event_state, server) {
|
|
|
176
176
|
try {
|
|
177
177
|
const data = await call_action(event, event_state, actions);
|
|
178
178
|
|
|
179
|
-
if (
|
|
179
|
+
if (DEV) {
|
|
180
180
|
validate_action_return(data);
|
|
181
181
|
}
|
|
182
182
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEV } from 'esm-env';
|
|
1
2
|
import { escape_html } from '../../../utils/escape.js';
|
|
2
3
|
import { sha256 } from './crypto.js';
|
|
3
4
|
|
|
@@ -77,7 +78,7 @@ class BaseProvider {
|
|
|
77
78
|
*/
|
|
78
79
|
constructor(use_hashes, directives, nonce) {
|
|
79
80
|
this.#use_hashes = use_hashes;
|
|
80
|
-
this.#directives =
|
|
81
|
+
this.#directives = DEV ? { ...directives } : directives; // clone in dev so we can safely mutate
|
|
81
82
|
|
|
82
83
|
const d = this.#directives;
|
|
83
84
|
|
|
@@ -93,7 +94,7 @@ class BaseProvider {
|
|
|
93
94
|
const style_src_attr = d['style-src-attr'];
|
|
94
95
|
const style_src_elem = d['style-src-elem'];
|
|
95
96
|
|
|
96
|
-
if (
|
|
97
|
+
if (DEV) {
|
|
97
98
|
// remove strict-dynamic in dev...
|
|
98
99
|
// TODO reinstate this if we can figure out how to make strict-dynamic work
|
|
99
100
|
// if (d['default-src']) {
|
|
@@ -148,7 +149,7 @@ class BaseProvider {
|
|
|
148
149
|
|
|
149
150
|
this.#script_needs_csp = this.#script_src_needs_csp || this.#script_src_elem_needs_csp;
|
|
150
151
|
this.#style_needs_csp =
|
|
151
|
-
!
|
|
152
|
+
!DEV &&
|
|
152
153
|
(this.#style_src_needs_csp ||
|
|
153
154
|
this.#style_src_attr_needs_csp ||
|
|
154
155
|
this.#style_src_elem_needs_csp);
|
|
@@ -176,7 +176,7 @@ export async function load_server_data({ event, event_state, state, node, parent
|
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
if (
|
|
179
|
+
if (DEV) {
|
|
180
180
|
validate_load_response(result, `in ${node.server_id}`);
|
|
181
181
|
}
|
|
182
182
|
|
|
@@ -278,7 +278,7 @@ export async function load_data({
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
|
|
281
|
-
if (
|
|
281
|
+
if (DEV) {
|
|
282
282
|
validate_load_response(result, `in ${node.universal_id}`);
|
|
283
283
|
}
|
|
284
284
|
|
|
@@ -182,7 +182,7 @@ export async function render_response({
|
|
|
182
182
|
])
|
|
183
183
|
};
|
|
184
184
|
|
|
185
|
-
if (
|
|
185
|
+
if (DEV) {
|
|
186
186
|
const fetch = globalThis.fetch;
|
|
187
187
|
let warned = false;
|
|
188
188
|
globalThis.fetch = (info, init) => {
|
|
@@ -255,7 +255,7 @@ export async function render_response({
|
|
|
255
255
|
: Array.from(inline_styles.values()).join('\n');
|
|
256
256
|
|
|
257
257
|
if (style) {
|
|
258
|
-
const attributes =
|
|
258
|
+
const attributes = DEV ? [' data-sveltekit'] : [];
|
|
259
259
|
if (csp.style_needs_nonce) attributes.push(` nonce="${csp.nonce}"`);
|
|
260
260
|
|
|
261
261
|
csp.add_style(style);
|
|
@@ -295,7 +295,7 @@ export async function render_response({
|
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
const global =
|
|
298
|
+
const global = DEV ? '__sveltekit_dev' : `__sveltekit_${options.version_hash}`;
|
|
299
299
|
|
|
300
300
|
const { data, chunks } = get_data(
|
|
301
301
|
event,
|
|
@@ -516,10 +516,10 @@ export async function render_response({
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
if (options.service_worker) {
|
|
519
|
-
let opts =
|
|
519
|
+
let opts = DEV ? ", { type: 'module' }" : '';
|
|
520
520
|
if (options.service_worker_options != null) {
|
|
521
521
|
const service_worker_options = { ...options.service_worker_options };
|
|
522
|
-
if (
|
|
522
|
+
if (DEV) {
|
|
523
523
|
service_worker_options.type = 'module';
|
|
524
524
|
}
|
|
525
525
|
opts = `, ${s(service_worker_options)}`;
|
|
@@ -40,7 +40,6 @@ import { record_span } from '../telemetry/record_span.js';
|
|
|
40
40
|
import { otel } from '../telemetry/otel.js';
|
|
41
41
|
|
|
42
42
|
/* global __SVELTEKIT_ADAPTER_NAME__ */
|
|
43
|
-
/* global __SVELTEKIT_DEV__ */
|
|
44
43
|
|
|
45
44
|
/** @type {import('types').RequiredResolveOptions['transformPageChunk']} */
|
|
46
45
|
const default_transform = ({ html }) => html;
|
|
@@ -167,7 +166,7 @@ export async function internal_respond(request, options, manifest, state) {
|
|
|
167
166
|
request,
|
|
168
167
|
route: { id: null },
|
|
169
168
|
setHeaders: (new_headers) => {
|
|
170
|
-
if (
|
|
169
|
+
if (DEV) {
|
|
171
170
|
validateHeaders(new_headers);
|
|
172
171
|
}
|
|
173
172
|
|
|
@@ -104,7 +104,7 @@ export async function handle_error_and_jsonify(event, state, options, error) {
|
|
|
104
104
|
return { message: 'Unknown Error', ...error.body };
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
if (
|
|
107
|
+
if (DEV && typeof error == 'object') {
|
|
108
108
|
fix_stack_trace(error);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -194,13 +194,13 @@ export function has_prerendered_path(manifest, pathname) {
|
|
|
194
194
|
* @param {import('@sveltejs/kit').RequestEvent} event
|
|
195
195
|
*/
|
|
196
196
|
export function format_server_error(status, error, event) {
|
|
197
|
-
const formatted_text = `\n\x1b[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1b[0m
|
|
197
|
+
const formatted_text = `\n\x1b[1;31m[${status}] ${event.request.method} ${event.url.pathname}\x1b[0m`;
|
|
198
198
|
|
|
199
199
|
if (status === 404) {
|
|
200
|
-
return formatted_text
|
|
200
|
+
return formatted_text;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
return formatted_text
|
|
203
|
+
return `${formatted_text}\n${DEV ? clean_up_stack_trace(error) : error.stack}`;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
/**
|
package/src/types/ambient.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare module '$service-worker' {
|
|
|
66
66
|
*/
|
|
67
67
|
export const build: string[];
|
|
68
68
|
/**
|
|
69
|
-
* An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration)
|
|
69
|
+
* An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration#serviceWorker)
|
|
70
70
|
*/
|
|
71
71
|
export const files: string[];
|
|
72
72
|
/**
|
|
@@ -2,7 +2,6 @@ declare global {
|
|
|
2
2
|
const __SVELTEKIT_ADAPTER_NAME__: string;
|
|
3
3
|
const __SVELTEKIT_APP_VERSION_FILE__: string;
|
|
4
4
|
const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number;
|
|
5
|
-
const __SVELTEKIT_DEV__: boolean;
|
|
6
5
|
const __SVELTEKIT_EMBEDDED__: boolean;
|
|
7
6
|
/** True if `config.kit.experimental.instrumentation.server` is `true` */
|
|
8
7
|
const __SVELTEKIT_SERVER_TRACING_ENABLED__: boolean;
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -402,14 +402,17 @@ declare module '@sveltejs/kit' {
|
|
|
402
402
|
*
|
|
403
403
|
* To allow people to make `POST`, `PUT`, `PATCH`, or `DELETE` requests with a `Content-Type` of `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain` to your app from other origins, you will need to disable this option. Be careful!
|
|
404
404
|
* @default true
|
|
405
|
+
* @deprecated Use `trustedOrigins: ['*']` instead
|
|
405
406
|
*/
|
|
406
407
|
checkOrigin?: boolean;
|
|
407
408
|
/**
|
|
408
|
-
* An array of origins that are allowed to make cross-origin form submissions to your app
|
|
409
|
+
* An array of origins that are allowed to make cross-origin form submissions to your app.
|
|
409
410
|
*
|
|
410
411
|
* Each origin should be a complete origin including protocol (e.g., `https://payment-gateway.com`).
|
|
411
412
|
* This is useful for allowing trusted third-party services like payment gateways or authentication providers to submit forms to your app.
|
|
412
413
|
*
|
|
414
|
+
* If the array contains `'*'`, all origins will be trusted. This is generally not recommended!
|
|
415
|
+
*
|
|
413
416
|
* **Warning**: Only add origins you completely trust, as this bypasses CSRF protection for those origins.
|
|
414
417
|
* @default []
|
|
415
418
|
* @example ['https://checkout.stripe.com', 'https://accounts.google.com']
|
|
@@ -1795,7 +1798,7 @@ declare module '@sveltejs/kit' {
|
|
|
1795
1798
|
* await submit().updates(
|
|
1796
1799
|
* todos.withOverride((todos) => [...todos, { text: data.get('text') }])
|
|
1797
1800
|
* );
|
|
1798
|
-
* }}>
|
|
1801
|
+
* })}>
|
|
1799
1802
|
* <input type="text" name="text" />
|
|
1800
1803
|
* <button type="submit">Add Todo</button>
|
|
1801
1804
|
* </form>
|
|
@@ -3084,7 +3087,7 @@ declare module '$service-worker' {
|
|
|
3084
3087
|
*/
|
|
3085
3088
|
export const build: string[];
|
|
3086
3089
|
/**
|
|
3087
|
-
* An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration)
|
|
3090
|
+
* An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration#serviceWorker)
|
|
3088
3091
|
*/
|
|
3089
3092
|
export const files: string[];
|
|
3090
3093
|
/**
|
package/types/index.d.ts.map
CHANGED
|
@@ -187,6 +187,6 @@
|
|
|
187
187
|
null,
|
|
188
188
|
null
|
|
189
189
|
],
|
|
190
|
-
"mappings": ";;;;;;;;;;;kBAkCiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8IPC,MAAMA;;;;;;;;;;;kBAWNC,OAAOA;;;;;;;;;;;;;;;;;;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