@sveltejs/kit 2.49.4 → 2.50.0
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 +3 -3
- package/src/exports/public.d.ts +0 -24
- package/src/exports/vite/build/utils.js +0 -11
- package/src/exports/vite/index.js +4 -2
- package/src/runtime/app/server/remote/form.js +9 -25
- package/src/runtime/client/remote-functions/form.svelte.js +9 -60
- package/src/runtime/form-utils.js +42 -17
- package/src/runtime/server/remote.js +1 -0
- package/src/runtime/server/respond.js +20 -14
- package/src/version.js +1 -1
- package/types/index.d.ts +1 -25
- 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.
|
|
3
|
+
"version": "2.50.0",
|
|
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.6.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.46.4",
|
|
45
45
|
"svelte-preprocess": "^6.0.0",
|
|
46
46
|
"typescript": "^5.3.3",
|
|
47
47
|
"vite": "^6.3.5",
|
package/src/exports/public.d.ts
CHANGED
|
@@ -2078,30 +2078,6 @@ export type RemoteForm<Input extends RemoteFormInput | void, Output> = {
|
|
|
2078
2078
|
get pending(): number;
|
|
2079
2079
|
/** Access form fields using object notation */
|
|
2080
2080
|
fields: RemoteFormFields<Input>;
|
|
2081
|
-
/** Spread this onto a `<button>` or `<input type="submit">` */
|
|
2082
|
-
buttonProps: {
|
|
2083
|
-
type: 'submit';
|
|
2084
|
-
formmethod: 'POST';
|
|
2085
|
-
formaction: string;
|
|
2086
|
-
onclick: (event: Event) => void;
|
|
2087
|
-
/** Use the `enhance` method to influence what happens when the form is submitted. */
|
|
2088
|
-
enhance(
|
|
2089
|
-
callback: (opts: {
|
|
2090
|
-
form: HTMLFormElement;
|
|
2091
|
-
data: Input;
|
|
2092
|
-
submit: () => Promise<void> & {
|
|
2093
|
-
updates: (...queries: Array<RemoteQuery<any> | RemoteQueryOverride>) => Promise<void>;
|
|
2094
|
-
};
|
|
2095
|
-
}) => void | Promise<void>
|
|
2096
|
-
): {
|
|
2097
|
-
type: 'submit';
|
|
2098
|
-
formmethod: 'POST';
|
|
2099
|
-
formaction: string;
|
|
2100
|
-
onclick: (event: Event) => void;
|
|
2101
|
-
};
|
|
2102
|
-
/** The number of pending submissions */
|
|
2103
|
-
get pending(): number;
|
|
2104
|
-
};
|
|
2105
2081
|
};
|
|
2106
2082
|
|
|
2107
2083
|
/**
|
|
@@ -122,17 +122,6 @@ export function filter_fonts(assets) {
|
|
|
122
122
|
return assets.filter((asset) => /\.(woff2?|ttf|otf)$/.test(asset));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const method_names = new Set(['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH', 'OPTIONS']);
|
|
126
|
-
|
|
127
|
-
// If we'd written this in TypeScript, it could be easy...
|
|
128
|
-
/**
|
|
129
|
-
* @param {string} str
|
|
130
|
-
* @returns {str is import('types').HttpMethod}
|
|
131
|
-
*/
|
|
132
|
-
export function is_http_method(str) {
|
|
133
|
-
return method_names.has(str);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
125
|
/**
|
|
137
126
|
* @param {import('types').ValidatedKitConfig} config
|
|
138
127
|
* @returns {string}
|
|
@@ -803,6 +803,8 @@ async function kit({ svelte_config }) {
|
|
|
803
803
|
/** @type {import('vite').UserConfig} */
|
|
804
804
|
let new_config;
|
|
805
805
|
|
|
806
|
+
const kit_paths_base = kit.paths.base || '/';
|
|
807
|
+
|
|
806
808
|
if (is_build) {
|
|
807
809
|
const ssr = /** @type {boolean} */ (config.build?.ssr);
|
|
808
810
|
const prefix = `${kit.appDir}/immutable`;
|
|
@@ -884,7 +886,7 @@ async function kit({ svelte_config }) {
|
|
|
884
886
|
// That's larger and takes longer to run and also causes an HTML diff between SSR and client
|
|
885
887
|
// causing us to do a more expensive hydration check.
|
|
886
888
|
const client_base =
|
|
887
|
-
kit.paths.relative !== false || kit.paths.assets ? './' :
|
|
889
|
+
kit.paths.relative !== false || kit.paths.assets ? './' : kit_paths_base;
|
|
888
890
|
|
|
889
891
|
const inline = !ssr && svelte_config.kit.output.bundleStrategy === 'inline';
|
|
890
892
|
const split = ssr || svelte_config.kit.output.bundleStrategy === 'split';
|
|
@@ -943,7 +945,7 @@ async function kit({ svelte_config }) {
|
|
|
943
945
|
} else {
|
|
944
946
|
new_config = {
|
|
945
947
|
appType: 'custom',
|
|
946
|
-
base:
|
|
948
|
+
base: kit_paths_base,
|
|
947
949
|
build: {
|
|
948
950
|
rollupOptions: {
|
|
949
951
|
// Vite dependency crawler needs an explicit JS entry point
|
|
@@ -84,21 +84,6 @@ export function form(validate_or_fn, maybe_fn) {
|
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
const button_props = {
|
|
88
|
-
type: 'submit',
|
|
89
|
-
onclick: () => {}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
Object.defineProperty(button_props, 'enhance', {
|
|
93
|
-
value: () => {
|
|
94
|
-
return { type: 'submit', formaction: instance.buttonProps.formaction, onclick: () => {} };
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
Object.defineProperty(instance, 'buttonProps', {
|
|
99
|
-
value: button_props
|
|
100
|
-
});
|
|
101
|
-
|
|
102
87
|
/** @type {RemoteInfo} */
|
|
103
88
|
const __ = {
|
|
104
89
|
type: 'form',
|
|
@@ -190,11 +175,6 @@ export function form(validate_or_fn, maybe_fn) {
|
|
|
190
175
|
enumerable: true
|
|
191
176
|
});
|
|
192
177
|
|
|
193
|
-
Object.defineProperty(button_props, 'formaction', {
|
|
194
|
-
get: () => `?/remote=${__.id}`,
|
|
195
|
-
enumerable: true
|
|
196
|
-
});
|
|
197
|
-
|
|
198
178
|
Object.defineProperty(instance, 'fields', {
|
|
199
179
|
get() {
|
|
200
180
|
const data = get_cache(__)?.[''];
|
|
@@ -222,6 +202,15 @@ export function form(validate_or_fn, maybe_fn) {
|
|
|
222
202
|
// TODO 3.0 remove
|
|
223
203
|
if (DEV) {
|
|
224
204
|
throw_on_old_property_access(instance);
|
|
205
|
+
|
|
206
|
+
Object.defineProperty(instance, 'buttonProps', {
|
|
207
|
+
get() {
|
|
208
|
+
throw new Error(
|
|
209
|
+
'`form.buttonProps` has been removed: Instead of `<button {...form.buttonProps}>, use `<button {...form.fields.action.as("submit", "value")}>`.' +
|
|
210
|
+
' See the PR for more info: https://github.com/sveltejs/kit/pull/14622'
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
225
214
|
}
|
|
226
215
|
|
|
227
216
|
Object.defineProperty(instance, 'result', {
|
|
@@ -239,11 +228,6 @@ export function form(validate_or_fn, maybe_fn) {
|
|
|
239
228
|
get: () => 0
|
|
240
229
|
});
|
|
241
230
|
|
|
242
|
-
// On the server, buttonProps.pending is always 0
|
|
243
|
-
Object.defineProperty(button_props, 'pending', {
|
|
244
|
-
get: () => 0
|
|
245
|
-
});
|
|
246
|
-
|
|
247
231
|
Object.defineProperty(instance, 'preflight', {
|
|
248
232
|
// preflight is a noop on the server
|
|
249
233
|
value: () => instance
|
|
@@ -425,74 +425,23 @@ export function form(id) {
|
|
|
425
425
|
)
|
|
426
426
|
);
|
|
427
427
|
|
|
428
|
-
/** @param {Parameters<RemoteForm<any, any>['buttonProps']['enhance']>[0]} callback */
|
|
429
|
-
const form_action_onclick = (callback) => {
|
|
430
|
-
/** @param {Event} event */
|
|
431
|
-
return async (event) => {
|
|
432
|
-
const target = /** @type {HTMLButtonElement} */ (event.currentTarget);
|
|
433
|
-
const form = target.form;
|
|
434
|
-
if (!form) return;
|
|
435
|
-
|
|
436
|
-
// Prevent this from firing the form's submit event
|
|
437
|
-
event.stopPropagation();
|
|
438
|
-
event.preventDefault();
|
|
439
|
-
|
|
440
|
-
const form_data = new FormData(form, target);
|
|
441
|
-
|
|
442
|
-
if (DEV) {
|
|
443
|
-
const enctype = target.hasAttribute('formenctype')
|
|
444
|
-
? target.formEnctype
|
|
445
|
-
: clone(form).enctype;
|
|
446
|
-
|
|
447
|
-
validate_form_data(form_data, enctype);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
await handle_submit(form, form_data, callback);
|
|
451
|
-
};
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
/** @type {RemoteForm<any, any>['buttonProps']} */
|
|
455
|
-
// @ts-expect-error we gotta set enhance as a non-enumerable property
|
|
456
|
-
const button_props = {
|
|
457
|
-
type: 'submit',
|
|
458
|
-
formmethod: 'POST',
|
|
459
|
-
formaction: action,
|
|
460
|
-
onclick: form_action_onclick(({ submit, form }) =>
|
|
461
|
-
submit().then(() => {
|
|
462
|
-
if (!issues.$) {
|
|
463
|
-
form.reset();
|
|
464
|
-
}
|
|
465
|
-
})
|
|
466
|
-
)
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
Object.defineProperty(button_props, 'enhance', {
|
|
470
|
-
/** @type {RemoteForm<any, any>['buttonProps']['enhance']} */
|
|
471
|
-
value: (callback) => {
|
|
472
|
-
return {
|
|
473
|
-
type: 'submit',
|
|
474
|
-
formmethod: 'POST',
|
|
475
|
-
formaction: action,
|
|
476
|
-
onclick: form_action_onclick(callback)
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
Object.defineProperty(button_props, 'pending', {
|
|
482
|
-
get: () => pending_count
|
|
483
|
-
});
|
|
484
|
-
|
|
485
428
|
let validate_id = 0;
|
|
486
429
|
|
|
487
430
|
// TODO 3.0 remove
|
|
488
431
|
if (DEV) {
|
|
489
432
|
throw_on_old_property_access(instance);
|
|
433
|
+
|
|
434
|
+
Object.defineProperty(instance, 'buttonProps', {
|
|
435
|
+
get() {
|
|
436
|
+
throw new Error(
|
|
437
|
+
'`form.buttonProps` has been removed: Instead of `<button {...form.buttonProps}>, use `<button {...form.fields.action.as("submit", "value")}>`.' +
|
|
438
|
+
' See the PR for more info: https://github.com/sveltejs/kit/pull/14622'
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
});
|
|
490
442
|
}
|
|
491
443
|
|
|
492
444
|
Object.defineProperties(instance, {
|
|
493
|
-
buttonProps: {
|
|
494
|
-
value: button_props
|
|
495
|
-
},
|
|
496
445
|
fields: {
|
|
497
446
|
get: () =>
|
|
498
447
|
create_field_proxy(
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { DEV } from 'esm-env';
|
|
6
6
|
import * as devalue from 'devalue';
|
|
7
7
|
import { text_decoder, text_encoder } from './utils.js';
|
|
8
|
+
import { SvelteKitError } from '@sveltejs/kit/internal';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Sets a value in a nested object using a path string, mutating the original object
|
|
@@ -64,7 +65,7 @@ export function convert_formdata(data) {
|
|
|
64
65
|
|
|
65
66
|
export const BINARY_FORM_CONTENT_TYPE = 'application/x-sveltekit-formdata';
|
|
66
67
|
const BINARY_FORM_VERSION = 0;
|
|
67
|
-
|
|
68
|
+
const HEADER_BYTES = 1 + 4 + 2;
|
|
68
69
|
/**
|
|
69
70
|
* The binary format is as follows:
|
|
70
71
|
* - 1 byte: Format version
|
|
@@ -144,7 +145,11 @@ export async function deserialize_binary_form(request) {
|
|
|
144
145
|
return { data: convert_formdata(form_data), meta: {}, form_data };
|
|
145
146
|
}
|
|
146
147
|
if (!request.body) {
|
|
147
|
-
throw
|
|
148
|
+
throw deserialize_error('no body');
|
|
149
|
+
}
|
|
150
|
+
const content_length = parseInt(request.headers.get('content-length') ?? '');
|
|
151
|
+
if (Number.isNaN(content_length)) {
|
|
152
|
+
throw deserialize_error('invalid Content-Length header');
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
const reader = request.body.getReader();
|
|
@@ -156,7 +161,7 @@ export async function deserialize_binary_form(request) {
|
|
|
156
161
|
* @param {number} index
|
|
157
162
|
* @returns {Promise<Uint8Array<ArrayBuffer> | undefined>}
|
|
158
163
|
*/
|
|
159
|
-
|
|
164
|
+
function get_chunk(index) {
|
|
160
165
|
if (index in chunks) return chunks[index];
|
|
161
166
|
|
|
162
167
|
let i = chunks.length;
|
|
@@ -195,8 +200,7 @@ export async function deserialize_binary_form(request) {
|
|
|
195
200
|
return start_chunk.subarray(offset - chunk_start, offset + length - chunk_start);
|
|
196
201
|
}
|
|
197
202
|
// Otherwise, copy the data into a new buffer
|
|
198
|
-
const
|
|
199
|
-
buffer.set(start_chunk.subarray(offset - chunk_start));
|
|
203
|
+
const chunks = [start_chunk.subarray(offset - chunk_start)];
|
|
200
204
|
let cursor = start_chunk.byteLength - offset + chunk_start;
|
|
201
205
|
while (cursor < length) {
|
|
202
206
|
chunk_index++;
|
|
@@ -205,6 +209,12 @@ export async function deserialize_binary_form(request) {
|
|
|
205
209
|
if (chunk.byteLength > length - cursor) {
|
|
206
210
|
chunk = chunk.subarray(0, length - cursor);
|
|
207
211
|
}
|
|
212
|
+
chunks.push(chunk);
|
|
213
|
+
cursor += chunk.byteLength;
|
|
214
|
+
}
|
|
215
|
+
const buffer = new Uint8Array(length);
|
|
216
|
+
cursor = 0;
|
|
217
|
+
for (const chunk of chunks) {
|
|
208
218
|
buffer.set(chunk, cursor);
|
|
209
219
|
cursor += chunk.byteLength;
|
|
210
220
|
}
|
|
@@ -212,21 +222,28 @@ export async function deserialize_binary_form(request) {
|
|
|
212
222
|
return buffer;
|
|
213
223
|
}
|
|
214
224
|
|
|
215
|
-
const header = await get_buffer(0,
|
|
216
|
-
if (!header) throw
|
|
225
|
+
const header = await get_buffer(0, HEADER_BYTES);
|
|
226
|
+
if (!header) throw deserialize_error('too short');
|
|
217
227
|
|
|
218
228
|
if (header[0] !== BINARY_FORM_VERSION) {
|
|
219
|
-
throw
|
|
220
|
-
`Could not deserialize binary form: got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`
|
|
221
|
-
);
|
|
229
|
+
throw deserialize_error(`got version ${header[0]}, expected version ${BINARY_FORM_VERSION}`);
|
|
222
230
|
}
|
|
223
231
|
const header_view = new DataView(header.buffer, header.byteOffset, header.byteLength);
|
|
224
232
|
const data_length = header_view.getUint32(1, true);
|
|
233
|
+
|
|
234
|
+
if (HEADER_BYTES + data_length > content_length) {
|
|
235
|
+
throw deserialize_error('data overflow');
|
|
236
|
+
}
|
|
237
|
+
|
|
225
238
|
const file_offsets_length = header_view.getUint16(5, true);
|
|
226
239
|
|
|
240
|
+
if (HEADER_BYTES + data_length + file_offsets_length > content_length) {
|
|
241
|
+
throw deserialize_error('file offset table overflow');
|
|
242
|
+
}
|
|
243
|
+
|
|
227
244
|
// Read the form data
|
|
228
|
-
const data_buffer = await get_buffer(
|
|
229
|
-
if (!data_buffer) throw
|
|
245
|
+
const data_buffer = await get_buffer(HEADER_BYTES, data_length);
|
|
246
|
+
if (!data_buffer) throw deserialize_error('data too short');
|
|
230
247
|
|
|
231
248
|
/** @type {Array<number>} */
|
|
232
249
|
let file_offsets;
|
|
@@ -234,18 +251,20 @@ export async function deserialize_binary_form(request) {
|
|
|
234
251
|
let files_start_offset;
|
|
235
252
|
if (file_offsets_length > 0) {
|
|
236
253
|
// Read the file offset table
|
|
237
|
-
const file_offsets_buffer = await get_buffer(
|
|
238
|
-
if (!file_offsets_buffer)
|
|
239
|
-
throw new Error('Could not deserialize binary form: file offset table too short');
|
|
254
|
+
const file_offsets_buffer = await get_buffer(HEADER_BYTES + data_length, file_offsets_length);
|
|
255
|
+
if (!file_offsets_buffer) throw deserialize_error('file offset table too short');
|
|
240
256
|
|
|
241
257
|
file_offsets = /** @type {Array<number>} */ (
|
|
242
258
|
JSON.parse(text_decoder.decode(file_offsets_buffer))
|
|
243
259
|
);
|
|
244
|
-
files_start_offset =
|
|
260
|
+
files_start_offset = HEADER_BYTES + data_length + file_offsets_length;
|
|
245
261
|
}
|
|
246
262
|
|
|
247
263
|
const [data, meta] = devalue.parse(text_decoder.decode(data_buffer), {
|
|
248
264
|
File: ([name, type, size, last_modified, index]) => {
|
|
265
|
+
if (files_start_offset + file_offsets[index] + size > content_length) {
|
|
266
|
+
throw deserialize_error('file data overflow');
|
|
267
|
+
}
|
|
249
268
|
return new Proxy(
|
|
250
269
|
new LazyFile(
|
|
251
270
|
name,
|
|
@@ -276,6 +295,12 @@ export async function deserialize_binary_form(request) {
|
|
|
276
295
|
|
|
277
296
|
return { data, meta, form_data: null };
|
|
278
297
|
}
|
|
298
|
+
/**
|
|
299
|
+
* @param {string} message
|
|
300
|
+
*/
|
|
301
|
+
function deserialize_error(message) {
|
|
302
|
+
return new SvelteKitError(400, 'Bad Request', `Could not deserialize binary form: ${message}`);
|
|
303
|
+
}
|
|
279
304
|
|
|
280
305
|
/** @implements {File} */
|
|
281
306
|
class LazyFile {
|
|
@@ -380,7 +405,7 @@ class LazyFile {
|
|
|
380
405
|
chunk_index++;
|
|
381
406
|
let chunk = await this.#get_chunk(chunk_index);
|
|
382
407
|
if (!chunk) {
|
|
383
|
-
controller.error('
|
|
408
|
+
controller.error('incomplete file data');
|
|
384
409
|
controller.close();
|
|
385
410
|
return;
|
|
386
411
|
}
|
|
@@ -294,6 +294,7 @@ async function handle_remote_form_post_internal(event, state, manifest, id) {
|
|
|
294
294
|
const fn = /** @type {RemoteInfo & { type: 'form' }} */ (/** @type {any} */ (form).__).fn;
|
|
295
295
|
|
|
296
296
|
const { data, meta, form_data } = await deserialize_binary_form(event.request);
|
|
297
|
+
|
|
297
298
|
if (action_id && !('id' in data)) {
|
|
298
299
|
data.id = JSON.parse(decodeURIComponent(action_id));
|
|
299
300
|
}
|
|
@@ -247,8 +247,10 @@ export async function internal_respond(request, options, manifest, state) {
|
|
|
247
247
|
return text('Malformed URI', { status: 400 });
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
// try to serve the rerouted prerendered resource if it exists
|
|
250
251
|
if (
|
|
251
|
-
|
|
252
|
+
// the resolved path has been decoded so it should be compared to the decoded url pathname
|
|
253
|
+
resolved_path !== decode_pathname(url.pathname) &&
|
|
252
254
|
!state.prerendering?.fallback &&
|
|
253
255
|
has_prerendered_path(manifest, resolved_path)
|
|
254
256
|
) {
|
|
@@ -259,20 +261,24 @@ export async function internal_respond(request, options, manifest, state) {
|
|
|
259
261
|
? add_resolution_suffix(resolved_path)
|
|
260
262
|
: resolved_path;
|
|
261
263
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
headers.
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
try {
|
|
265
|
+
// `fetch` automatically decodes the body, so we need to delete the related headers to not break the response
|
|
266
|
+
// Also see https://github.com/sveltejs/kit/issues/12197 for more info (we should fix this more generally at some point)
|
|
267
|
+
const response = await fetch(url, request);
|
|
268
|
+
const headers = new Headers(response.headers);
|
|
269
|
+
if (headers.has('content-encoding')) {
|
|
270
|
+
headers.delete('content-encoding');
|
|
271
|
+
headers.delete('content-length');
|
|
272
|
+
}
|
|
270
273
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
return new Response(response.body, {
|
|
275
|
+
headers,
|
|
276
|
+
status: response.status,
|
|
277
|
+
statusText: response.statusText
|
|
278
|
+
});
|
|
279
|
+
} catch (error) {
|
|
280
|
+
return await handle_fatal_error(event, event_state, options, error);
|
|
281
|
+
}
|
|
276
282
|
}
|
|
277
283
|
|
|
278
284
|
/** @type {import('types').SSRRoute | null} */
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -2054,30 +2054,6 @@ declare module '@sveltejs/kit' {
|
|
|
2054
2054
|
get pending(): number;
|
|
2055
2055
|
/** Access form fields using object notation */
|
|
2056
2056
|
fields: RemoteFormFields<Input>;
|
|
2057
|
-
/** Spread this onto a `<button>` or `<input type="submit">` */
|
|
2058
|
-
buttonProps: {
|
|
2059
|
-
type: 'submit';
|
|
2060
|
-
formmethod: 'POST';
|
|
2061
|
-
formaction: string;
|
|
2062
|
-
onclick: (event: Event) => void;
|
|
2063
|
-
/** Use the `enhance` method to influence what happens when the form is submitted. */
|
|
2064
|
-
enhance(
|
|
2065
|
-
callback: (opts: {
|
|
2066
|
-
form: HTMLFormElement;
|
|
2067
|
-
data: Input;
|
|
2068
|
-
submit: () => Promise<void> & {
|
|
2069
|
-
updates: (...queries: Array<RemoteQuery<any> | RemoteQueryOverride>) => Promise<void>;
|
|
2070
|
-
};
|
|
2071
|
-
}) => void | Promise<void>
|
|
2072
|
-
): {
|
|
2073
|
-
type: 'submit';
|
|
2074
|
-
formmethod: 'POST';
|
|
2075
|
-
formaction: string;
|
|
2076
|
-
onclick: (event: Event) => void;
|
|
2077
|
-
};
|
|
2078
|
-
/** The number of pending submissions */
|
|
2079
|
-
get pending(): number;
|
|
2080
|
-
};
|
|
2081
2057
|
};
|
|
2082
2058
|
|
|
2083
2059
|
/**
|
|
@@ -2769,7 +2745,7 @@ declare module '@sveltejs/kit' {
|
|
|
2769
2745
|
class Redirect_1 {
|
|
2770
2746
|
|
|
2771
2747
|
constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string);
|
|
2772
|
-
status: 301 | 302 | 303 |
|
|
2748
|
+
status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308;
|
|
2773
2749
|
location: string;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