@sveltejs/kit 1.30.2 → 2.0.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 +24 -24
- package/src/core/adapt/builder.js +8 -1
- package/src/core/config/index.js +9 -1
- package/src/core/config/options.js +1 -12
- package/src/core/postbuild/analyse.js +98 -80
- package/src/core/postbuild/prerender.js +11 -9
- package/src/core/sync/sync.js +2 -0
- package/src/core/sync/write_non_ambient.js +42 -0
- package/src/core/sync/write_server.js +3 -3
- package/src/core/sync/write_tsconfig.js +27 -78
- package/src/core/sync/write_types/index.js +1 -1
- package/src/exports/hooks/sequence.js +1 -1
- package/src/exports/index.js +88 -71
- package/src/exports/node/index.js +21 -24
- package/src/exports/node/polyfills.js +5 -34
- package/src/exports/public.d.ts +82 -61
- package/src/exports/vite/dev/index.js +11 -19
- package/src/exports/vite/graph_analysis/index.js +2 -4
- package/src/exports/vite/index.js +73 -14
- package/src/exports/vite/module_ids.js +7 -0
- package/src/exports/vite/preview/index.js +56 -130
- package/src/runtime/app/forms.js +2 -35
- package/src/runtime/app/navigation.js +33 -18
- package/src/runtime/app/paths.js +2 -29
- package/src/runtime/client/client.js +449 -199
- package/src/runtime/client/constants.js +5 -1
- package/src/runtime/client/session-storage.js +7 -5
- package/src/runtime/client/singletons.js +7 -1
- package/src/runtime/client/types.d.ts +6 -2
- package/src/runtime/client/utils.js +12 -10
- package/src/runtime/control.js +16 -8
- package/src/runtime/server/cookie.js +38 -61
- package/src/runtime/server/data/index.js +6 -4
- package/src/runtime/server/env_module.js +29 -0
- package/src/runtime/server/fetch.js +7 -6
- package/src/runtime/server/index.js +23 -20
- package/src/runtime/server/page/actions.js +24 -15
- package/src/runtime/server/page/index.js +6 -8
- package/src/runtime/server/page/load_data.js +58 -40
- package/src/runtime/server/page/render.js +12 -7
- package/src/runtime/server/page/respond_with_error.js +4 -4
- package/src/runtime/server/page/types.d.ts +1 -1
- package/src/runtime/server/respond.js +14 -12
- package/src/runtime/server/utils.js +11 -8
- package/src/runtime/shared-server.js +19 -2
- package/src/types/ambient.d.ts +7 -1
- package/src/types/internal.d.ts +4 -1
- package/src/types/synthetic/$env+dynamic+private.md +2 -0
- package/src/types/synthetic/$env+dynamic+public.md +2 -0
- package/src/utils/error.js +17 -1
- package/src/utils/routing.js +47 -1
- package/src/utils/url.js +45 -27
- package/src/version.js +1 -1
- package/types/index.d.ts +171 -118
- package/types/index.d.ts.map +9 -5
- package/src/utils/platform.js +0 -1
- package/src/utils/promises.js +0 -61
package/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="vite/client" />
|
|
3
3
|
|
|
4
4
|
declare module '@sveltejs/kit' {
|
|
5
|
-
import type { CompileOptions } from 'svelte/
|
|
5
|
+
import type { CompileOptions } from 'svelte/compiler';
|
|
6
6
|
import type { PluginOptions } from '@sveltejs/vite-plugin-svelte';
|
|
7
7
|
/**
|
|
8
8
|
* [Adapters](https://kit.svelte.dev/docs/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
|
|
@@ -19,20 +19,11 @@ declare module '@sveltejs/kit' {
|
|
|
19
19
|
adapt(builder: Builder): MaybePromise<void>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
type
|
|
22
|
+
export type LoadProperties<input extends Record<string, any> | void> = input extends void
|
|
23
23
|
? undefined // needs to be undefined, because void will break intellisense
|
|
24
24
|
: input extends Record<string, any>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
: {} extends input // handles the any case
|
|
29
|
-
? input
|
|
30
|
-
: unknown;
|
|
31
|
-
|
|
32
|
-
export type AwaitedProperties<input extends Record<string, any> | void> =
|
|
33
|
-
AwaitedPropertiesUnion<input> extends Record<string, any>
|
|
34
|
-
? OptionalUnion<AwaitedPropertiesUnion<input>>
|
|
35
|
-
: AwaitedPropertiesUnion<input>;
|
|
25
|
+
? input
|
|
26
|
+
: unknown;
|
|
36
27
|
|
|
37
28
|
export type AwaitedActions<T extends Record<string, (...args: any) => any>> = OptionalUnion<
|
|
38
29
|
{
|
|
@@ -47,11 +38,19 @@ declare module '@sveltejs/kit' {
|
|
|
47
38
|
A extends keyof U = U extends U ? keyof U : never
|
|
48
39
|
> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
|
49
40
|
|
|
41
|
+
const uniqueSymbol: unique symbol;
|
|
42
|
+
|
|
43
|
+
export interface ActionFailure<T extends Record<string, unknown> | undefined = undefined> {
|
|
44
|
+
status: number;
|
|
45
|
+
data: T;
|
|
46
|
+
[uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure
|
|
47
|
+
}
|
|
48
|
+
|
|
50
49
|
type UnpackValidationError<T> = T extends ActionFailure<infer X>
|
|
51
50
|
? X
|
|
52
51
|
: T extends void
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
? undefined // needs to be undefined, because void will corrupt union type
|
|
53
|
+
: T;
|
|
55
54
|
|
|
56
55
|
/**
|
|
57
56
|
* This object is passed to the `adapt` function of adapters.
|
|
@@ -84,6 +83,11 @@ declare module '@sveltejs/kit' {
|
|
|
84
83
|
*/
|
|
85
84
|
generateFallback(dest: string): Promise<void>;
|
|
86
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Generate a module exposing build-time environment variables as `$env/dynamic/public`.
|
|
88
|
+
*/
|
|
89
|
+
generateEnvModule(): void;
|
|
90
|
+
|
|
87
91
|
/**
|
|
88
92
|
* Generate a server-side manifest to initialise the SvelteKit [server](https://kit.svelte.dev/docs/types#public-types-server) with.
|
|
89
93
|
* @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated
|
|
@@ -192,34 +196,42 @@ declare module '@sveltejs/kit' {
|
|
|
192
196
|
*
|
|
193
197
|
* The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`.
|
|
194
198
|
*
|
|
195
|
-
*
|
|
199
|
+
* You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children
|
|
196
200
|
* @param name the name of the cookie
|
|
197
201
|
* @param value the cookie value
|
|
198
202
|
* @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
|
|
199
203
|
*/
|
|
200
|
-
set(
|
|
204
|
+
set(
|
|
205
|
+
name: string,
|
|
206
|
+
value: string,
|
|
207
|
+
opts: import('cookie').CookieSerializeOptions & { path: string }
|
|
208
|
+
): void;
|
|
201
209
|
|
|
202
210
|
/**
|
|
203
211
|
* Deletes a cookie by setting its value to an empty string and setting the expiry date in the past.
|
|
204
212
|
*
|
|
205
|
-
*
|
|
213
|
+
* You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children
|
|
206
214
|
* @param name the name of the cookie
|
|
207
215
|
* @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
|
|
208
216
|
*/
|
|
209
|
-
delete(name: string, opts
|
|
217
|
+
delete(name: string, opts: import('cookie').CookieSerializeOptions & { path: string }): void;
|
|
210
218
|
|
|
211
219
|
/**
|
|
212
220
|
* Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response.
|
|
213
221
|
*
|
|
214
222
|
* The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`.
|
|
215
223
|
*
|
|
216
|
-
*
|
|
224
|
+
* You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children
|
|
217
225
|
*
|
|
218
226
|
* @param name the name of the cookie
|
|
219
227
|
* @param value the cookie value
|
|
220
228
|
* @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
|
|
221
229
|
*/
|
|
222
|
-
serialize(
|
|
230
|
+
serialize(
|
|
231
|
+
name: string,
|
|
232
|
+
value: string,
|
|
233
|
+
opts: import('cookie').CookieSerializeOptions & { path: string }
|
|
234
|
+
): string;
|
|
223
235
|
}
|
|
224
236
|
|
|
225
237
|
export interface KitConfig {
|
|
@@ -259,7 +271,9 @@ declare module '@sveltejs/kit' {
|
|
|
259
271
|
*/
|
|
260
272
|
alias?: Record<string, string>;
|
|
261
273
|
/**
|
|
262
|
-
* The directory
|
|
274
|
+
* The directory where SvelteKit keeps its stuff, including static assets (such as JS and CSS) and internally-used routes.
|
|
275
|
+
*
|
|
276
|
+
* If `paths.assets` is specified, there will be two app directories — `${paths.assets}/${appDir}` and `${paths.base}/${appDir}`.
|
|
263
277
|
* @default "_app"
|
|
264
278
|
*/
|
|
265
279
|
appDir?: string;
|
|
@@ -323,16 +337,6 @@ declare module '@sveltejs/kit' {
|
|
|
323
337
|
*/
|
|
324
338
|
checkOrigin?: boolean;
|
|
325
339
|
};
|
|
326
|
-
/**
|
|
327
|
-
* Here be dragons. Enable at your peril.
|
|
328
|
-
*/
|
|
329
|
-
dangerZone?: {
|
|
330
|
-
/**
|
|
331
|
-
* Automatically add server-side `fetch`ed URLs to the `dependencies` map of `load` functions. This will expose secrets
|
|
332
|
-
* to the client if your URL contains them.
|
|
333
|
-
*/
|
|
334
|
-
trackServerFetches?: boolean;
|
|
335
|
-
};
|
|
336
340
|
/**
|
|
337
341
|
* Whether or not the app is embedded inside a larger app. If `true`, SvelteKit will add its event listeners related to navigation etc on the parent of `%sveltekit.body%` instead of `window`, and will pass `params` from the server rather than inferring them from `location.pathname`.
|
|
338
342
|
* @default false
|
|
@@ -453,17 +457,20 @@ declare module '@sveltejs/kit' {
|
|
|
453
457
|
*/
|
|
454
458
|
base?: '' | `/${string}`;
|
|
455
459
|
/**
|
|
456
|
-
* Whether to use relative asset paths.
|
|
460
|
+
* Whether to use relative asset paths.
|
|
457
461
|
*
|
|
458
|
-
* If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in portable HTML.
|
|
462
|
+
* If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML.
|
|
459
463
|
* If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL
|
|
460
464
|
*
|
|
461
465
|
* [Single-page app](https://kit.svelte.dev/docs/single-page-apps) fallback pages will always use absolute paths, regardless of this setting.
|
|
462
466
|
*
|
|
463
467
|
* If your app uses a `<base>` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `<base>` URL rather than the current page.
|
|
464
|
-
*
|
|
468
|
+
*
|
|
469
|
+
* In 1.0, `undefined` was a valid value, which was set by default. In that case, if `paths.assets` was not external, SvelteKit would replace `%sveltekit.assets%` with a relative path and use relative paths to reference build artifacts, but `base` and `assets` imported from `$app/paths` would be as specified in your config.
|
|
470
|
+
*
|
|
471
|
+
* @default true
|
|
465
472
|
*/
|
|
466
|
-
relative?: boolean
|
|
473
|
+
relative?: boolean;
|
|
467
474
|
};
|
|
468
475
|
/**
|
|
469
476
|
* See [Prerendering](https://kit.svelte.dev/docs/page-options#prerender).
|
|
@@ -480,7 +487,7 @@ declare module '@sveltejs/kit' {
|
|
|
480
487
|
*/
|
|
481
488
|
crawl?: boolean;
|
|
482
489
|
/**
|
|
483
|
-
* An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all
|
|
490
|
+
* An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all routes containing no required `[parameters]` with optional parameters included as being empty (since SvelteKit doesn't know what value any parameters should have).
|
|
484
491
|
* @default ["*"]
|
|
485
492
|
*/
|
|
486
493
|
entries?: Array<'*' | `/${string}`>;
|
|
@@ -632,6 +639,8 @@ declare module '@sveltejs/kit' {
|
|
|
632
639
|
export type HandleServerError = (input: {
|
|
633
640
|
error: unknown;
|
|
634
641
|
event: RequestEvent;
|
|
642
|
+
status: number;
|
|
643
|
+
message: string;
|
|
635
644
|
}) => MaybePromise<void | App.Error>;
|
|
636
645
|
|
|
637
646
|
/**
|
|
@@ -643,6 +652,8 @@ declare module '@sveltejs/kit' {
|
|
|
643
652
|
export type HandleClientError = (input: {
|
|
644
653
|
error: unknown;
|
|
645
654
|
event: NavigationEvent;
|
|
655
|
+
status: number;
|
|
656
|
+
message: string;
|
|
646
657
|
}) => MaybePromise<void | App.Error>;
|
|
647
658
|
|
|
648
659
|
/**
|
|
@@ -761,7 +772,21 @@ declare module '@sveltejs/kit' {
|
|
|
761
772
|
* <button on:click={increase}>Increase Count</button>
|
|
762
773
|
* ```
|
|
763
774
|
*/
|
|
764
|
-
depends(...deps: string
|
|
775
|
+
depends(...deps: Array<`${string}:${string}`>): void;
|
|
776
|
+
/**
|
|
777
|
+
* Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
|
|
778
|
+
*
|
|
779
|
+
* ```js
|
|
780
|
+
* /// file: src/routes/+page.server.js
|
|
781
|
+
* export async function load({ untrack, url }) {
|
|
782
|
+
* // Untrack url.pathname so that path changes don't trigger a rerun
|
|
783
|
+
* if (untrack(() => url.pathname === '/')) {
|
|
784
|
+
* return { message: 'Welcome!' };
|
|
785
|
+
* }
|
|
786
|
+
* }
|
|
787
|
+
* ```
|
|
788
|
+
*/
|
|
789
|
+
untrack<T>(fn: () => T): T;
|
|
765
790
|
}
|
|
766
791
|
|
|
767
792
|
export interface NavigationEvent<
|
|
@@ -828,7 +853,7 @@ declare module '@sveltejs/kit' {
|
|
|
828
853
|
/**
|
|
829
854
|
* The type of navigation:
|
|
830
855
|
* - `form`: The user submitted a `<form>`
|
|
831
|
-
* - `leave`: The
|
|
856
|
+
* - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring
|
|
832
857
|
* - `link`: Navigation was triggered by a link click
|
|
833
858
|
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
|
|
834
859
|
* - `popstate`: Navigation was triggered by back/forward navigation
|
|
@@ -932,6 +957,10 @@ declare module '@sveltejs/kit' {
|
|
|
932
957
|
* The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`.
|
|
933
958
|
*/
|
|
934
959
|
data: App.PageData & Record<string, any>;
|
|
960
|
+
/**
|
|
961
|
+
* The page state, which can be manipulated using the [`pushState`](https://kit.svelte.dev/docs/modules#$app-navigation-pushstate) and [`replaceState`](https://kit.svelte.dev/docs/modules#$app-navigation-replacestate) functions from `$app/navigation`.
|
|
962
|
+
*/
|
|
963
|
+
state: App.PageState;
|
|
935
964
|
/**
|
|
936
965
|
* Filled only after a form submission. See [form actions](https://kit.svelte.dev/docs/form-actions) for more info.
|
|
937
966
|
*/
|
|
@@ -1163,6 +1192,20 @@ declare module '@sveltejs/kit' {
|
|
|
1163
1192
|
* ```
|
|
1164
1193
|
*/
|
|
1165
1194
|
depends(...deps: string[]): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
|
|
1197
|
+
*
|
|
1198
|
+
* ```js
|
|
1199
|
+
* /// file: src/routes/+page.js
|
|
1200
|
+
* export async function load({ untrack, url }) {
|
|
1201
|
+
* // Untrack url.pathname so that path changes don't trigger a rerun
|
|
1202
|
+
* if (untrack(() => url.pathname === '/')) {
|
|
1203
|
+
* return { message: 'Welcome!' };
|
|
1204
|
+
* }
|
|
1205
|
+
* }
|
|
1206
|
+
* ```
|
|
1207
|
+
*/
|
|
1208
|
+
untrack<T>(fn: () => T): T;
|
|
1166
1209
|
}
|
|
1167
1210
|
|
|
1168
1211
|
/**
|
|
@@ -1229,17 +1272,7 @@ declare module '@sveltejs/kit' {
|
|
|
1229
1272
|
Failure extends Record<string, unknown> | undefined = Record<string, any>
|
|
1230
1273
|
> = (input: {
|
|
1231
1274
|
action: URL;
|
|
1232
|
-
/**
|
|
1233
|
-
* use `formData` instead of `data`
|
|
1234
|
-
* @deprecated
|
|
1235
|
-
*/
|
|
1236
|
-
data: FormData;
|
|
1237
1275
|
formData: FormData;
|
|
1238
|
-
/**
|
|
1239
|
-
* use `formElement` instead of `form`
|
|
1240
|
-
* @deprecated
|
|
1241
|
-
*/
|
|
1242
|
-
form: HTMLFormElement;
|
|
1243
1276
|
formElement: HTMLFormElement;
|
|
1244
1277
|
controller: AbortController;
|
|
1245
1278
|
submitter: HTMLElement | null;
|
|
@@ -1247,17 +1280,7 @@ declare module '@sveltejs/kit' {
|
|
|
1247
1280
|
}) => MaybePromise<
|
|
1248
1281
|
| void
|
|
1249
1282
|
| ((opts: {
|
|
1250
|
-
/**
|
|
1251
|
-
* use `formData` instead of `data`
|
|
1252
|
-
* @deprecated
|
|
1253
|
-
*/
|
|
1254
|
-
data: FormData;
|
|
1255
1283
|
formData: FormData;
|
|
1256
|
-
/**
|
|
1257
|
-
* use `formElement` instead of `form`
|
|
1258
|
-
* @deprecated
|
|
1259
|
-
*/
|
|
1260
|
-
form: HTMLFormElement;
|
|
1261
1284
|
formElement: HTMLFormElement;
|
|
1262
1285
|
action: URL;
|
|
1263
1286
|
result: ActionResult<Success, Failure>;
|
|
@@ -1504,28 +1527,6 @@ declare module '@sveltejs/kit' {
|
|
|
1504
1527
|
}
|
|
1505
1528
|
|
|
1506
1529
|
type TrailingSlash = 'never' | 'always' | 'ignore';
|
|
1507
|
-
class HttpError_1 {
|
|
1508
|
-
|
|
1509
|
-
constructor(status: number, body: {
|
|
1510
|
-
message: string;
|
|
1511
|
-
} extends App.Error ? (App.Error | string | undefined) : App.Error);
|
|
1512
|
-
status: number;
|
|
1513
|
-
body: App.Error;
|
|
1514
|
-
toString(): string;
|
|
1515
|
-
}
|
|
1516
|
-
class Redirect_1 {
|
|
1517
|
-
|
|
1518
|
-
constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string);
|
|
1519
|
-
status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308;
|
|
1520
|
-
location: string;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
export class ActionFailure<T extends Record<string, unknown> | undefined = undefined> {
|
|
1524
|
-
|
|
1525
|
-
constructor(status: number, data?: T | undefined);
|
|
1526
|
-
status: number;
|
|
1527
|
-
data: T | undefined;
|
|
1528
|
-
}
|
|
1529
1530
|
interface Asset {
|
|
1530
1531
|
file: string;
|
|
1531
1532
|
size: number;
|
|
@@ -1543,6 +1544,7 @@ declare module '@sveltejs/kit' {
|
|
|
1543
1544
|
imports: string[];
|
|
1544
1545
|
stylesheets: string[];
|
|
1545
1546
|
fonts: string[];
|
|
1547
|
+
uses_env_dynamic_public: boolean;
|
|
1546
1548
|
} | null;
|
|
1547
1549
|
server_manifest: import('vite').Manifest;
|
|
1548
1550
|
}
|
|
@@ -1692,17 +1694,51 @@ declare module '@sveltejs/kit' {
|
|
|
1692
1694
|
}
|
|
1693
1695
|
|
|
1694
1696
|
type ValidatedConfig = RecursiveRequired<Config>;
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
+
/**
|
|
1698
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
1699
|
+
* When called during request handling, this will cause SvelteKit to
|
|
1700
|
+
* return an error response without invoking `handleError`.
|
|
1701
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
1702
|
+
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1703
|
+
* @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
1704
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
1705
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
1706
|
+
*/
|
|
1707
|
+
export function error(status: NumericRange<400, 599>, body: App.Error): never;
|
|
1708
|
+
/**
|
|
1709
|
+
* Throws an error with a HTTP status code and an optional message.
|
|
1710
|
+
* When called during request handling, this will cause SvelteKit to
|
|
1711
|
+
* return an error response without invoking `handleError`.
|
|
1712
|
+
* Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
|
|
1713
|
+
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1714
|
+
* @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property.
|
|
1715
|
+
* @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling.
|
|
1716
|
+
* @throws {Error} If the provided status is invalid (not between 400 and 599).
|
|
1717
|
+
*/
|
|
1718
|
+
export function error(status: NumericRange<400, 599>, body?: {
|
|
1697
1719
|
message: string;
|
|
1698
|
-
} extends App.Error ? App.Error | string | undefined : never):
|
|
1720
|
+
} extends App.Error ? App.Error | string | undefined : never): never;
|
|
1721
|
+
/**
|
|
1722
|
+
* Checks whether this is an error thrown by {@link error}.
|
|
1723
|
+
* @param status The status to filter for.
|
|
1724
|
+
* */
|
|
1725
|
+
export function isHttpError<T extends number>(e: unknown, status?: T | undefined): e is HttpError_1 & {
|
|
1726
|
+
status: T extends undefined ? never : T;
|
|
1727
|
+
};
|
|
1699
1728
|
/**
|
|
1700
|
-
*
|
|
1729
|
+
* Redirect a request. When called during request handling, SvelteKit will return a redirect response.
|
|
1701
1730
|
* Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.
|
|
1702
1731
|
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.
|
|
1703
1732
|
* @param location The location to redirect to.
|
|
1704
|
-
|
|
1705
|
-
|
|
1733
|
+
* @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.
|
|
1734
|
+
* @throws {Error} If the provided status is invalid.
|
|
1735
|
+
* */
|
|
1736
|
+
export function redirect(status: NumericRange<300, 308>, location: string | URL): never;
|
|
1737
|
+
/**
|
|
1738
|
+
* Checks whether this is a redirect thrown by {@link redirect}.
|
|
1739
|
+
* @param e The object to check.
|
|
1740
|
+
* */
|
|
1741
|
+
export function isRedirect(e: unknown): e is Redirect_1;
|
|
1706
1742
|
/**
|
|
1707
1743
|
* Create a JSON `Response` object from the supplied data.
|
|
1708
1744
|
* @param data The value that will be serialized as JSON.
|
|
@@ -1718,26 +1754,32 @@ declare module '@sveltejs/kit' {
|
|
|
1718
1754
|
/**
|
|
1719
1755
|
* Create an `ActionFailure` object.
|
|
1720
1756
|
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1721
|
-
* @param data Data associated with the failure (e.g. validation errors)
|
|
1722
1757
|
* */
|
|
1723
|
-
export function fail
|
|
1758
|
+
export function fail(status: number): ActionFailure<undefined>;
|
|
1724
1759
|
/**
|
|
1725
|
-
*
|
|
1726
|
-
*
|
|
1727
|
-
*
|
|
1728
|
-
* @example
|
|
1729
|
-
* ```js
|
|
1730
|
-
* resolvePath(
|
|
1731
|
-
* `/blog/[slug]/[...somethingElse]`,
|
|
1732
|
-
* {
|
|
1733
|
-
* slug: 'hello-world',
|
|
1734
|
-
* somethingElse: 'something/else'
|
|
1735
|
-
* }
|
|
1736
|
-
* ); // `/blog/hello-world/something/else`
|
|
1737
|
-
* ```
|
|
1760
|
+
* Create an `ActionFailure` object.
|
|
1761
|
+
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
|
|
1762
|
+
* @param data Data associated with the failure (e.g. validation errors)
|
|
1738
1763
|
* */
|
|
1739
|
-
export function
|
|
1764
|
+
export function fail<T extends Record<string, unknown> | undefined = undefined>(status: number, data: T): ActionFailure<T>;
|
|
1765
|
+
export type LessThan<TNumber extends number, TArray extends any[] = []> = TNumber extends TArray['length'] ? TArray[number] : LessThan<TNumber, [...TArray, TArray['length']]>;
|
|
1766
|
+
export type NumericRange<TStart extends number, TEnd extends number> = Exclude<TEnd | LessThan<TEnd>, LessThan<TStart>>;
|
|
1740
1767
|
export const VERSION: string;
|
|
1768
|
+
class HttpError_1 {
|
|
1769
|
+
|
|
1770
|
+
constructor(status: number, body: {
|
|
1771
|
+
message: string;
|
|
1772
|
+
} extends App.Error ? (App.Error | string | undefined) : App.Error);
|
|
1773
|
+
status: number;
|
|
1774
|
+
body: App.Error;
|
|
1775
|
+
toString(): string;
|
|
1776
|
+
}
|
|
1777
|
+
class Redirect_1 {
|
|
1778
|
+
|
|
1779
|
+
constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string);
|
|
1780
|
+
status: 301 | 302 | 303 | 307 | 308 | 300 | 304 | 305 | 306;
|
|
1781
|
+
location: string;
|
|
1782
|
+
}
|
|
1741
1783
|
}
|
|
1742
1784
|
|
|
1743
1785
|
declare module '@sveltejs/kit/hooks' {
|
|
@@ -1825,16 +1867,12 @@ declare module '@sveltejs/kit/node/polyfills' {
|
|
|
1825
1867
|
/**
|
|
1826
1868
|
* Make various web APIs available as globals:
|
|
1827
1869
|
* - `crypto`
|
|
1828
|
-
* - `
|
|
1829
|
-
* - `Headers` (only in node < 18.11)
|
|
1830
|
-
* - `Request` (only in node < 18.11)
|
|
1831
|
-
* - `Response` (only in node < 18.11)
|
|
1870
|
+
* - `File`
|
|
1832
1871
|
*/
|
|
1833
1872
|
export function installPolyfills(): void;
|
|
1834
1873
|
}
|
|
1835
1874
|
|
|
1836
1875
|
declare module '@sveltejs/kit/vite' {
|
|
1837
|
-
export { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
1838
1876
|
/**
|
|
1839
1877
|
* Returns the SvelteKit Vite plugins.
|
|
1840
1878
|
* */
|
|
@@ -1915,15 +1953,12 @@ declare module '$app/navigation' {
|
|
|
1915
1953
|
*
|
|
1916
1954
|
* @param 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.
|
|
1917
1955
|
* @param {Object} opts Options related to the navigation
|
|
1918
|
-
* @param 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.
|
|
1919
|
-
* @param opts.state The state of the new/updated history entry
|
|
1920
1956
|
* */
|
|
1921
1957
|
export const goto: (url: string | URL, opts?: {
|
|
1922
1958
|
replaceState?: boolean;
|
|
1923
1959
|
noScroll?: boolean;
|
|
1924
1960
|
keepFocus?: boolean;
|
|
1925
1961
|
invalidateAll?: boolean;
|
|
1926
|
-
state?: any;
|
|
1927
1962
|
}) => Promise<void>;
|
|
1928
1963
|
/**
|
|
1929
1964
|
* 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.
|
|
@@ -1954,11 +1989,11 @@ declare module '$app/navigation' {
|
|
|
1954
1989
|
*
|
|
1955
1990
|
* This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `<a>` element with `data-sveltekit-preload-data`.
|
|
1956
1991
|
* If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous.
|
|
1957
|
-
* Returns a Promise that resolves
|
|
1992
|
+
* Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete.
|
|
1958
1993
|
*
|
|
1959
1994
|
* @param href Page to preload
|
|
1960
1995
|
* */
|
|
1961
|
-
export const preloadData: (href: string) => Promise<
|
|
1996
|
+
export const preloadData: (href: string) => Promise<Record<string, any>>;
|
|
1962
1997
|
/**
|
|
1963
1998
|
* Programmatically imports the code for routes that haven't yet been fetched.
|
|
1964
1999
|
* Typically, you might call this to speed up subsequent navigation.
|
|
@@ -1969,13 +2004,15 @@ declare module '$app/navigation' {
|
|
|
1969
2004
|
* Returns a Promise that resolves when the modules have been imported.
|
|
1970
2005
|
*
|
|
1971
2006
|
* */
|
|
1972
|
-
export const preloadCode: (
|
|
2007
|
+
export const preloadCode: (url: string) => Promise<void>;
|
|
1973
2008
|
/**
|
|
1974
2009
|
* A navigation interceptor that triggers before we navigate to a new URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.
|
|
1975
|
-
* Calling `cancel()` will prevent the navigation from completing. If the navigation would have directly unloaded the current page, calling `cancel` will trigger the native
|
|
1976
|
-
* browser unload confirmation dialog. In these cases, `navigation.willUnload` is `true`.
|
|
1977
2010
|
*
|
|
1978
|
-
*
|
|
2011
|
+
* Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.
|
|
2012
|
+
*
|
|
2013
|
+
* When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`.
|
|
2014
|
+
*
|
|
2015
|
+
* If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`.
|
|
1979
2016
|
*
|
|
1980
2017
|
* `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted.
|
|
1981
2018
|
* */
|
|
@@ -1996,6 +2033,16 @@ declare module '$app/navigation' {
|
|
|
1996
2033
|
* `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.
|
|
1997
2034
|
* */
|
|
1998
2035
|
export const afterNavigate: (callback: (navigation: import('@sveltejs/kit').AfterNavigate) => void) => void;
|
|
2036
|
+
/**
|
|
2037
|
+
* Programmatically create a new history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://kit.svelte.dev/docs/shallow-routing).
|
|
2038
|
+
*
|
|
2039
|
+
* */
|
|
2040
|
+
export const pushState: (url: string | URL, state: App.PageState) => void;
|
|
2041
|
+
/**
|
|
2042
|
+
* Programmatically replace the current history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://kit.svelte.dev/docs/shallow-routing).
|
|
2043
|
+
*
|
|
2044
|
+
* */
|
|
2045
|
+
export const replaceState: (url: string | URL, state: App.PageState) => void;
|
|
1999
2046
|
type MaybePromise<T> = T | Promise<T>;
|
|
2000
2047
|
}
|
|
2001
2048
|
|
|
@@ -2058,6 +2105,7 @@ declare module '$app/stores' {
|
|
|
2058
2105
|
* // interface Error {}
|
|
2059
2106
|
* // interface Locals {}
|
|
2060
2107
|
* // interface PageData {}
|
|
2108
|
+
* // interface PageState {}
|
|
2061
2109
|
* // interface Platform {}
|
|
2062
2110
|
* }
|
|
2063
2111
|
* }
|
|
@@ -2090,6 +2138,11 @@ declare namespace App {
|
|
|
2090
2138
|
*/
|
|
2091
2139
|
export interface PageData {}
|
|
2092
2140
|
|
|
2141
|
+
/**
|
|
2142
|
+
* The shape of the `$page.state` object, which can be manipulated using the [`pushState`](https://kit.svelte.dev/docs/modules#$app-navigation-pushstate) and [`replaceState`](https://kit.svelte.dev/docs/modules#$app-navigation-replacestate) functions from `$app/navigation`.
|
|
2143
|
+
*/
|
|
2144
|
+
export interface PageState {}
|
|
2145
|
+
|
|
2093
2146
|
/**
|
|
2094
2147
|
* If your adapter provides [platform-specific context](https://kit.svelte.dev/docs/adapters#platform-specific-context) via `event.platform`, you can specify it here.
|
|
2095
2148
|
*/
|
|
@@ -2152,7 +2205,7 @@ declare module '__sveltekit/paths' {
|
|
|
2152
2205
|
* > If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL.
|
|
2153
2206
|
*/
|
|
2154
2207
|
export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets';
|
|
2155
|
-
export let relative: boolean
|
|
2208
|
+
export let relative: boolean;
|
|
2156
2209
|
export function reset(): void;
|
|
2157
2210
|
export function override(paths: { base: string; assets: string }): void;
|
|
2158
2211
|
export function set_assets(path: string): void;
|
package/types/index.d.ts.map
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
"file": "index.d.ts",
|
|
4
4
|
"names": [
|
|
5
5
|
"Adapter",
|
|
6
|
-
"
|
|
6
|
+
"LoadProperties",
|
|
7
7
|
"AwaitedActions",
|
|
8
|
+
"ActionFailure",
|
|
8
9
|
"Builder",
|
|
9
10
|
"Config",
|
|
10
11
|
"Cookies",
|
|
@@ -57,7 +58,6 @@
|
|
|
57
58
|
"RequestOptions",
|
|
58
59
|
"RouteSegment",
|
|
59
60
|
"TrailingSlash",
|
|
60
|
-
"ActionFailure",
|
|
61
61
|
"Asset",
|
|
62
62
|
"BuildData",
|
|
63
63
|
"ManifestData",
|
|
@@ -74,11 +74,13 @@
|
|
|
74
74
|
"SSREndpoint",
|
|
75
75
|
"SSRRoute",
|
|
76
76
|
"ValidatedConfig",
|
|
77
|
+
"isHttpError",
|
|
77
78
|
"redirect",
|
|
79
|
+
"isRedirect",
|
|
78
80
|
"json",
|
|
79
81
|
"text",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
+
"LessThan",
|
|
83
|
+
"NumericRange",
|
|
82
84
|
"VERSION",
|
|
83
85
|
"sequence",
|
|
84
86
|
"getRequest",
|
|
@@ -99,6 +101,8 @@
|
|
|
99
101
|
"beforeNavigate",
|
|
100
102
|
"onNavigate",
|
|
101
103
|
"afterNavigate",
|
|
104
|
+
"pushState",
|
|
105
|
+
"replaceState",
|
|
102
106
|
"resolveRoute",
|
|
103
107
|
"getStores",
|
|
104
108
|
"page",
|
|
@@ -139,5 +143,5 @@
|
|
|
139
143
|
null,
|
|
140
144
|
null
|
|
141
145
|
],
|
|
142
|
-
"mappings": ";;;;;;;;;
|
|
146
|
+
"mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;aAYZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;;;;;;;;kBAeTC,aAAaA;;;;;;;;;;;;;;;;kBAgBbC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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