@sveltejs/kit 2.70.0 → 2.70.1
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 +1 -1
- package/src/exports/public.d.ts +16 -16
- package/src/runtime/server/page/load_data.js +1 -1
- package/src/runtime/server/utils.js +1 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +16 -16
package/package.json
CHANGED
package/src/exports/public.d.ts
CHANGED
|
@@ -404,7 +404,7 @@ export interface KitConfig {
|
|
|
404
404
|
*
|
|
405
405
|
* > [!NOTE] Note that most [Svelte transitions](https://svelte.dev/tutorial/svelte/transition) work by creating an inline `<style>` element. If you use these in your app, you must either leave the `style-src` directive unspecified or add `unsafe-inline`.
|
|
406
406
|
*
|
|
407
|
-
* If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
407
|
+
* If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle) to roll your own CSP.
|
|
408
408
|
*/
|
|
409
409
|
csp?: {
|
|
410
410
|
/**
|
|
@@ -485,13 +485,13 @@ export interface KitConfig {
|
|
|
485
485
|
explicitEnvironmentVariables?: boolean;
|
|
486
486
|
|
|
487
487
|
/**
|
|
488
|
-
* Options for enabling server-side [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
488
|
+
* Options for enabling server-side [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle), [`load` functions](https://svelte.dev/docs/kit/load), [form actions](https://svelte.dev/docs/kit/form-actions), and [remote functions](https://svelte.dev/docs/kit/remote-functions).
|
|
489
489
|
* @default { server: false, serverFile: false }
|
|
490
490
|
* @since 2.31.0
|
|
491
491
|
*/
|
|
492
492
|
tracing?: {
|
|
493
493
|
/**
|
|
494
|
-
* Enables server-side [OpenTelemetry](https://opentelemetry.io/) span emission for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
494
|
+
* Enables server-side [OpenTelemetry](https://opentelemetry.io/) span emission for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle), [`load` functions](https://svelte.dev/docs/kit/load), [form actions](https://svelte.dev/docs/kit/form-actions), and [remote functions](https://svelte.dev/docs/kit/remote-functions).
|
|
495
495
|
* @default false
|
|
496
496
|
* @since 2.31.0
|
|
497
497
|
*/
|
|
@@ -937,7 +937,7 @@ export interface KitConfig {
|
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
/**
|
|
940
|
-
* The [`handle`](https://svelte.dev/docs/kit/hooks#
|
|
940
|
+
* The [`handle`](https://svelte.dev/docs/kit/hooks#handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and
|
|
941
941
|
* determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response).
|
|
942
942
|
* It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`.
|
|
943
943
|
* This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example).
|
|
@@ -948,7 +948,7 @@ export type Handle = (input: {
|
|
|
948
948
|
}) => MaybePromise<Response>;
|
|
949
949
|
|
|
950
950
|
/**
|
|
951
|
-
* The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#
|
|
951
|
+
* The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#handleError) hook runs when an unexpected error is thrown while responding to a request.
|
|
952
952
|
*
|
|
953
953
|
* If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event.
|
|
954
954
|
* Make sure that this function _never_ throws an error.
|
|
@@ -961,7 +961,7 @@ export type HandleServerError = (input: {
|
|
|
961
961
|
}) => MaybePromise<void | App.Error>;
|
|
962
962
|
|
|
963
963
|
/**
|
|
964
|
-
* The [`handleValidationError`](https://svelte.dev/docs/kit/hooks#
|
|
964
|
+
* The [`handleValidationError`](https://svelte.dev/docs/kit/hooks#handleValidationError) hook runs when the argument to a remote function fails validation.
|
|
965
965
|
*
|
|
966
966
|
* It will be called with the validation issues and the event, and must return an object shape that matches `App.Error`.
|
|
967
967
|
*/
|
|
@@ -969,7 +969,7 @@ export type HandleValidationError<Issue extends StandardSchemaV1.Issue = Standar
|
|
|
969
969
|
(input: { issues: Issue[]; event: RequestEvent }) => MaybePromise<App.Error>;
|
|
970
970
|
|
|
971
971
|
/**
|
|
972
|
-
* The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#
|
|
972
|
+
* The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#handleError) hook runs when an unexpected error is thrown while navigating.
|
|
973
973
|
*
|
|
974
974
|
* If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event.
|
|
975
975
|
* Make sure that this function _never_ throws an error.
|
|
@@ -982,7 +982,7 @@ export type HandleClientError = (input: {
|
|
|
982
982
|
}) => MaybePromise<void | App.Error>;
|
|
983
983
|
|
|
984
984
|
/**
|
|
985
|
-
* The [`handleFetch`](https://svelte.dev/docs/kit/hooks#
|
|
985
|
+
* The [`handleFetch`](https://svelte.dev/docs/kit/hooks#handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`.
|
|
986
986
|
*/
|
|
987
987
|
export type HandleFetch = (input: {
|
|
988
988
|
event: RequestEvent;
|
|
@@ -991,25 +991,25 @@ export type HandleFetch = (input: {
|
|
|
991
991
|
}) => MaybePromise<Response>;
|
|
992
992
|
|
|
993
993
|
/**
|
|
994
|
-
* The [`init`](https://svelte.dev/docs/kit/hooks#
|
|
994
|
+
* The [`init`](https://svelte.dev/docs/kit/hooks#init) will be invoked before the server responds to its first request
|
|
995
995
|
* @since 2.10.0
|
|
996
996
|
*/
|
|
997
997
|
export type ServerInit = () => MaybePromise<void>;
|
|
998
998
|
|
|
999
999
|
/**
|
|
1000
|
-
* The [`init`](https://svelte.dev/docs/kit/hooks#
|
|
1000
|
+
* The [`init`](https://svelte.dev/docs/kit/hooks#init) will be invoked once the app starts in the browser
|
|
1001
1001
|
* @since 2.10.0
|
|
1002
1002
|
*/
|
|
1003
1003
|
export type ClientInit = () => MaybePromise<void>;
|
|
1004
1004
|
|
|
1005
1005
|
/**
|
|
1006
|
-
* The [`reroute`](https://svelte.dev/docs/kit/hooks#
|
|
1006
|
+
* The [`reroute`](https://svelte.dev/docs/kit/hooks#reroute) hook allows you to modify the URL before it is used to determine which route to render.
|
|
1007
1007
|
* @since 2.3.0
|
|
1008
1008
|
*/
|
|
1009
1009
|
export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise<void | string>;
|
|
1010
1010
|
|
|
1011
1011
|
/**
|
|
1012
|
-
* The [`transport`](https://svelte.dev/docs/kit/hooks#
|
|
1012
|
+
* The [`transport`](https://svelte.dev/docs/kit/hooks#transport) hook allows you to transport custom types across the server/client boundary.
|
|
1013
1013
|
*
|
|
1014
1014
|
* Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise).
|
|
1015
1015
|
*
|
|
@@ -1035,7 +1035,7 @@ export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise
|
|
|
1035
1035
|
export type Transport = Record<string, Transporter>;
|
|
1036
1036
|
|
|
1037
1037
|
/**
|
|
1038
|
-
* A member of the [`transport`](https://svelte.dev/docs/kit/hooks#
|
|
1038
|
+
* A member of the [`transport`](https://svelte.dev/docs/kit/hooks#transport) hook.
|
|
1039
1039
|
*/
|
|
1040
1040
|
export interface Transporter<
|
|
1041
1041
|
T = any,
|
|
@@ -1073,7 +1073,7 @@ export interface LoadEvent<
|
|
|
1073
1073
|
* - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
|
|
1074
1074
|
* - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
|
|
1075
1075
|
* - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
|
|
1076
|
-
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#
|
|
1076
|
+
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#handle)
|
|
1077
1077
|
* - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.
|
|
1078
1078
|
*
|
|
1079
1079
|
* You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies)
|
|
@@ -1551,7 +1551,7 @@ export interface RequestEvent<
|
|
|
1551
1551
|
* - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
|
|
1552
1552
|
* - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
|
|
1553
1553
|
* - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
|
|
1554
|
-
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#
|
|
1554
|
+
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#handle)
|
|
1555
1555
|
* - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.
|
|
1556
1556
|
*
|
|
1557
1557
|
* You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies).
|
|
@@ -1562,7 +1562,7 @@ export interface RequestEvent<
|
|
|
1562
1562
|
*/
|
|
1563
1563
|
getClientAddress: () => string;
|
|
1564
1564
|
/**
|
|
1565
|
-
* Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#
|
|
1565
|
+
* Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#handle).
|
|
1566
1566
|
*/
|
|
1567
1567
|
locals: App.Locals;
|
|
1568
1568
|
/**
|
|
@@ -465,7 +465,7 @@ export function create_universal_fetch(event, state, fetched, csr, resolve_opts)
|
|
|
465
465
|
const included = resolve_opts.filterSerializedResponseHeaders(lower, value);
|
|
466
466
|
if (!included) {
|
|
467
467
|
throw new Error(
|
|
468
|
-
`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#
|
|
468
|
+
`Failed to get response header "${lower}" — it must be included by the \`filterSerializedResponseHeaders\` option: https://svelte.dev/docs/kit/hooks#handle (at ${event.route.id})`
|
|
469
469
|
);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
@@ -139,7 +139,7 @@ export function clarify_devalue_error(event, error) {
|
|
|
139
139
|
if (error.path) {
|
|
140
140
|
return (
|
|
141
141
|
`Data returned from \`load\` while rendering ${event.route.id} is not serializable: ${error.message} (${error.path}). ` +
|
|
142
|
-
`If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#
|
|
142
|
+
`If you need to serialize/deserialize custom types, use transport hooks: https://svelte.dev/docs/kit/hooks#transport.`
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
|
package/src/version.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -377,7 +377,7 @@ declare module '@sveltejs/kit' {
|
|
|
377
377
|
*
|
|
378
378
|
* > [!NOTE] Note that most [Svelte transitions](https://svelte.dev/tutorial/svelte/transition) work by creating an inline `<style>` element. If you use these in your app, you must either leave the `style-src` directive unspecified or add `unsafe-inline`.
|
|
379
379
|
*
|
|
380
|
-
* If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
380
|
+
* If this level of configuration is insufficient and you have more dynamic requirements, you can use the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle) to roll your own CSP.
|
|
381
381
|
*/
|
|
382
382
|
csp?: {
|
|
383
383
|
/**
|
|
@@ -458,13 +458,13 @@ declare module '@sveltejs/kit' {
|
|
|
458
458
|
explicitEnvironmentVariables?: boolean;
|
|
459
459
|
|
|
460
460
|
/**
|
|
461
|
-
* Options for enabling server-side [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
461
|
+
* Options for enabling server-side [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle), [`load` functions](https://svelte.dev/docs/kit/load), [form actions](https://svelte.dev/docs/kit/form-actions), and [remote functions](https://svelte.dev/docs/kit/remote-functions).
|
|
462
462
|
* @default { server: false, serverFile: false }
|
|
463
463
|
* @since 2.31.0
|
|
464
464
|
*/
|
|
465
465
|
tracing?: {
|
|
466
466
|
/**
|
|
467
|
-
* Enables server-side [OpenTelemetry](https://opentelemetry.io/) span emission for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#
|
|
467
|
+
* Enables server-side [OpenTelemetry](https://opentelemetry.io/) span emission for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#handle), [`load` functions](https://svelte.dev/docs/kit/load), [form actions](https://svelte.dev/docs/kit/form-actions), and [remote functions](https://svelte.dev/docs/kit/remote-functions).
|
|
468
468
|
* @default false
|
|
469
469
|
* @since 2.31.0
|
|
470
470
|
*/
|
|
@@ -910,7 +910,7 @@ declare module '@sveltejs/kit' {
|
|
|
910
910
|
}
|
|
911
911
|
|
|
912
912
|
/**
|
|
913
|
-
* The [`handle`](https://svelte.dev/docs/kit/hooks#
|
|
913
|
+
* The [`handle`](https://svelte.dev/docs/kit/hooks#handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and
|
|
914
914
|
* determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response).
|
|
915
915
|
* It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`.
|
|
916
916
|
* This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example).
|
|
@@ -921,7 +921,7 @@ declare module '@sveltejs/kit' {
|
|
|
921
921
|
}) => MaybePromise<Response>;
|
|
922
922
|
|
|
923
923
|
/**
|
|
924
|
-
* The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#
|
|
924
|
+
* The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#handleError) hook runs when an unexpected error is thrown while responding to a request.
|
|
925
925
|
*
|
|
926
926
|
* If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event.
|
|
927
927
|
* Make sure that this function _never_ throws an error.
|
|
@@ -934,7 +934,7 @@ declare module '@sveltejs/kit' {
|
|
|
934
934
|
}) => MaybePromise<void | App.Error>;
|
|
935
935
|
|
|
936
936
|
/**
|
|
937
|
-
* The [`handleValidationError`](https://svelte.dev/docs/kit/hooks#
|
|
937
|
+
* The [`handleValidationError`](https://svelte.dev/docs/kit/hooks#handleValidationError) hook runs when the argument to a remote function fails validation.
|
|
938
938
|
*
|
|
939
939
|
* It will be called with the validation issues and the event, and must return an object shape that matches `App.Error`.
|
|
940
940
|
*/
|
|
@@ -942,7 +942,7 @@ declare module '@sveltejs/kit' {
|
|
|
942
942
|
(input: { issues: Issue[]; event: RequestEvent }) => MaybePromise<App.Error>;
|
|
943
943
|
|
|
944
944
|
/**
|
|
945
|
-
* The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#
|
|
945
|
+
* The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#handleError) hook runs when an unexpected error is thrown while navigating.
|
|
946
946
|
*
|
|
947
947
|
* If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event.
|
|
948
948
|
* Make sure that this function _never_ throws an error.
|
|
@@ -955,7 +955,7 @@ declare module '@sveltejs/kit' {
|
|
|
955
955
|
}) => MaybePromise<void | App.Error>;
|
|
956
956
|
|
|
957
957
|
/**
|
|
958
|
-
* The [`handleFetch`](https://svelte.dev/docs/kit/hooks#
|
|
958
|
+
* The [`handleFetch`](https://svelte.dev/docs/kit/hooks#handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`.
|
|
959
959
|
*/
|
|
960
960
|
export type HandleFetch = (input: {
|
|
961
961
|
event: RequestEvent;
|
|
@@ -964,25 +964,25 @@ declare module '@sveltejs/kit' {
|
|
|
964
964
|
}) => MaybePromise<Response>;
|
|
965
965
|
|
|
966
966
|
/**
|
|
967
|
-
* The [`init`](https://svelte.dev/docs/kit/hooks#
|
|
967
|
+
* The [`init`](https://svelte.dev/docs/kit/hooks#init) will be invoked before the server responds to its first request
|
|
968
968
|
* @since 2.10.0
|
|
969
969
|
*/
|
|
970
970
|
export type ServerInit = () => MaybePromise<void>;
|
|
971
971
|
|
|
972
972
|
/**
|
|
973
|
-
* The [`init`](https://svelte.dev/docs/kit/hooks#
|
|
973
|
+
* The [`init`](https://svelte.dev/docs/kit/hooks#init) will be invoked once the app starts in the browser
|
|
974
974
|
* @since 2.10.0
|
|
975
975
|
*/
|
|
976
976
|
export type ClientInit = () => MaybePromise<void>;
|
|
977
977
|
|
|
978
978
|
/**
|
|
979
|
-
* The [`reroute`](https://svelte.dev/docs/kit/hooks#
|
|
979
|
+
* The [`reroute`](https://svelte.dev/docs/kit/hooks#reroute) hook allows you to modify the URL before it is used to determine which route to render.
|
|
980
980
|
* @since 2.3.0
|
|
981
981
|
*/
|
|
982
982
|
export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise<void | string>;
|
|
983
983
|
|
|
984
984
|
/**
|
|
985
|
-
* The [`transport`](https://svelte.dev/docs/kit/hooks#
|
|
985
|
+
* The [`transport`](https://svelte.dev/docs/kit/hooks#transport) hook allows you to transport custom types across the server/client boundary.
|
|
986
986
|
*
|
|
987
987
|
* Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise).
|
|
988
988
|
*
|
|
@@ -1008,7 +1008,7 @@ declare module '@sveltejs/kit' {
|
|
|
1008
1008
|
export type Transport = Record<string, Transporter>;
|
|
1009
1009
|
|
|
1010
1010
|
/**
|
|
1011
|
-
* A member of the [`transport`](https://svelte.dev/docs/kit/hooks#
|
|
1011
|
+
* A member of the [`transport`](https://svelte.dev/docs/kit/hooks#transport) hook.
|
|
1012
1012
|
*/
|
|
1013
1013
|
export interface Transporter<
|
|
1014
1014
|
T = any,
|
|
@@ -1046,7 +1046,7 @@ declare module '@sveltejs/kit' {
|
|
|
1046
1046
|
* - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
|
|
1047
1047
|
* - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
|
|
1048
1048
|
* - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
|
|
1049
|
-
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#
|
|
1049
|
+
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#handle)
|
|
1050
1050
|
* - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.
|
|
1051
1051
|
*
|
|
1052
1052
|
* You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies)
|
|
@@ -1524,7 +1524,7 @@ declare module '@sveltejs/kit' {
|
|
|
1524
1524
|
* - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
|
|
1525
1525
|
* - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
|
|
1526
1526
|
* - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
|
|
1527
|
-
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#
|
|
1527
|
+
* - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#handle)
|
|
1528
1528
|
* - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.
|
|
1529
1529
|
*
|
|
1530
1530
|
* You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies).
|
|
@@ -1535,7 +1535,7 @@ declare module '@sveltejs/kit' {
|
|
|
1535
1535
|
*/
|
|
1536
1536
|
getClientAddress: () => string;
|
|
1537
1537
|
/**
|
|
1538
|
-
* Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#
|
|
1538
|
+
* Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#handle).
|
|
1539
1539
|
*/
|
|
1540
1540
|
locals: App.Locals;
|
|
1541
1541
|
/**
|