@sveltejs/kit 2.30.0 → 2.31.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 +12 -1
- package/src/core/adapt/builder.js +122 -13
- package/src/core/config/options.js +6 -0
- package/src/core/sync/sync.js +3 -2
- package/src/core/sync/write_non_ambient.js +78 -2
- package/src/core/sync/write_types/index.js +0 -72
- package/src/exports/hooks/sequence.js +53 -31
- package/src/{runtime/app/server → exports/internal}/event.js +24 -9
- package/src/exports/internal/server.js +22 -0
- package/src/exports/public.d.ts +117 -6
- package/src/exports/vite/dev/index.js +8 -0
- package/src/exports/vite/index.js +30 -3
- package/src/exports/vite/utils.js +44 -0
- package/src/runtime/app/paths/index.js +3 -1
- package/src/runtime/app/paths/types.d.ts +0 -1
- package/src/runtime/app/server/index.js +1 -1
- package/src/runtime/app/server/remote/command.js +4 -5
- package/src/runtime/app/server/remote/form.js +5 -7
- package/src/runtime/app/server/remote/prerender.js +5 -7
- package/src/runtime/app/server/remote/query.js +6 -8
- package/src/runtime/app/server/remote/shared.js +9 -13
- package/src/runtime/client/client.js +9 -14
- package/src/runtime/server/data/index.js +10 -5
- package/src/runtime/server/endpoint.js +4 -3
- package/src/runtime/server/page/actions.js +55 -24
- package/src/runtime/server/page/index.js +22 -5
- package/src/runtime/server/page/load_data.js +131 -121
- package/src/runtime/server/page/render.js +15 -7
- package/src/runtime/server/page/respond_with_error.js +7 -2
- package/src/runtime/server/remote.js +59 -13
- package/src/runtime/server/respond.js +110 -34
- package/src/runtime/server/utils.js +20 -5
- package/src/runtime/shared.js +20 -0
- package/src/runtime/telemetry/noop.js +81 -0
- package/src/runtime/telemetry/otel.js +21 -0
- package/src/runtime/telemetry/record_span.js +65 -0
- package/src/types/ambient.d.ts +54 -0
- package/src/types/global-private.d.ts +2 -0
- package/src/types/internal.d.ts +28 -0
- package/src/types/synthetic/$env+dynamic+private.md +1 -1
- package/src/version.js +1 -1
- package/types/index.d.ts +171 -4
- package/types/index.d.ts.map +2 -2
- package/src/runtime/server/event-state.js +0 -40
package/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare module '@sveltejs/kit' {
|
|
|
5
5
|
import type { SvelteConfig } from '@sveltejs/vite-plugin-svelte';
|
|
6
6
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
7
7
|
import type { RouteId as AppRouteId, LayoutParams as AppLayoutParams, ResolvedPathname } from '$app/types';
|
|
8
|
+
import type { Span } from '@opentelemetry/api';
|
|
8
9
|
/**
|
|
9
10
|
* [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
|
|
10
11
|
*/
|
|
@@ -27,6 +28,12 @@ declare module '@sveltejs/kit' {
|
|
|
27
28
|
* @param details.config The merged route config
|
|
28
29
|
*/
|
|
29
30
|
read?: (details: { config: any; route: { id: string } }) => boolean;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Test support for `instrumentation.server.js`. To pass, the adapter must support running `instrumentation.server.js` prior to the application code.
|
|
34
|
+
* @since 2.31.0
|
|
35
|
+
*/
|
|
36
|
+
instrumentation?: () => boolean;
|
|
30
37
|
};
|
|
31
38
|
/**
|
|
32
39
|
* Creates an `Emulator`, which allows the adapter to influence the environment
|
|
@@ -164,6 +171,46 @@ declare module '@sveltejs/kit' {
|
|
|
164
171
|
}
|
|
165
172
|
) => string[];
|
|
166
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Check if the server instrumentation file exists.
|
|
176
|
+
* @returns true if the server instrumentation file exists, false otherwise
|
|
177
|
+
* @since 2.31.0
|
|
178
|
+
*/
|
|
179
|
+
hasServerInstrumentationFile: () => boolean;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Instrument `entrypoint` with `instrumentation`.
|
|
183
|
+
*
|
|
184
|
+
* Renames `entrypoint` to `start` and creates a new module at
|
|
185
|
+
* `entrypoint` which imports `instrumentation` and then dynamically imports `start`. This allows
|
|
186
|
+
* the module hooks necessary for instrumentation libraries to be loaded prior to any application code.
|
|
187
|
+
*
|
|
188
|
+
* Caveats:
|
|
189
|
+
* - "Live exports" will not work. If your adapter uses live exports, your users will need to manually import the server instrumentation on startup.
|
|
190
|
+
* - If `tla` is `false`, OTEL auto-instrumentation may not work properly. Use it if your environment supports it.
|
|
191
|
+
* - Use `hasServerInstrumentationFile` to check if the user has a server instrumentation file; if they don't, you shouldn't do this.
|
|
192
|
+
*
|
|
193
|
+
* @param options an object containing the following properties:
|
|
194
|
+
* @param options.entrypoint the path to the entrypoint to trace.
|
|
195
|
+
* @param options.instrumentation the path to the instrumentation file.
|
|
196
|
+
* @param options.start the name of the start file. This is what `entrypoint` will be renamed to.
|
|
197
|
+
* @param options.module configuration for the resulting entrypoint module.
|
|
198
|
+
* @param options.module.generateText a function that receives the relative paths to the instrumentation and start files, and generates the text of the module to be traced. If not provided, the default implementation will be used, which uses top-level await.
|
|
199
|
+
* @since 2.31.0
|
|
200
|
+
*/
|
|
201
|
+
instrument: (args: {
|
|
202
|
+
entrypoint: string;
|
|
203
|
+
instrumentation: string;
|
|
204
|
+
start?: string;
|
|
205
|
+
module?:
|
|
206
|
+
| {
|
|
207
|
+
exports: string[];
|
|
208
|
+
}
|
|
209
|
+
| {
|
|
210
|
+
generateText: (args: { instrumentation: string; start: string }) => string;
|
|
211
|
+
};
|
|
212
|
+
}) => void;
|
|
213
|
+
|
|
167
214
|
/**
|
|
168
215
|
* Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals.
|
|
169
216
|
* @param directory The directory containing the files to be compressed
|
|
@@ -385,10 +432,34 @@ declare module '@sveltejs/kit' {
|
|
|
385
432
|
*/
|
|
386
433
|
privatePrefix?: string;
|
|
387
434
|
};
|
|
388
|
-
/**
|
|
389
|
-
* Experimental features which are exempt from semantic versioning. These features may be changed or removed at any time.
|
|
390
|
-
*/
|
|
435
|
+
/** Experimental features. Here be dragons. These are not subject to semantic versioning, so breaking changes or removal can happen in any release. */
|
|
391
436
|
experimental?: {
|
|
437
|
+
/**
|
|
438
|
+
* Options for enabling server-side [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#Server-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).
|
|
439
|
+
* @default { server: false, serverFile: false }
|
|
440
|
+
* @since 2.31.0
|
|
441
|
+
*/
|
|
442
|
+
tracing?: {
|
|
443
|
+
/**
|
|
444
|
+
* Enables server-side [OpenTelemetry](https://opentelemetry.io/) span emission for SvelteKit operations including the [`handle` hook](https://svelte.dev/docs/kit/hooks#Server-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).
|
|
445
|
+
* @default false
|
|
446
|
+
* @since 2.31.0
|
|
447
|
+
*/
|
|
448
|
+
server?: boolean;
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* @since 2.31.0
|
|
453
|
+
*/
|
|
454
|
+
instrumentation?: {
|
|
455
|
+
/**
|
|
456
|
+
* Enables `instrumentation.server.js` for tracing and observability instrumentation.
|
|
457
|
+
* @default false
|
|
458
|
+
* @since 2.31.0
|
|
459
|
+
*/
|
|
460
|
+
server?: boolean;
|
|
461
|
+
};
|
|
462
|
+
|
|
392
463
|
/**
|
|
393
464
|
* Whether to enable the experimental remote functions feature. This feature is not yet stable and may be changed or removed at any time.
|
|
394
465
|
* @default false
|
|
@@ -1004,6 +1075,19 @@ declare module '@sveltejs/kit' {
|
|
|
1004
1075
|
* ```
|
|
1005
1076
|
*/
|
|
1006
1077
|
untrack: <T>(fn: () => T) => T;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Access to spans for tracing. If tracing is not enabled or the function is being run in the browser, these spans will do nothing.
|
|
1081
|
+
* @since 2.31.0
|
|
1082
|
+
*/
|
|
1083
|
+
tracing: {
|
|
1084
|
+
/** Whether tracing is enabled. */
|
|
1085
|
+
enabled: boolean;
|
|
1086
|
+
/** The root span for the request. This span is named `sveltekit.handle.root`. */
|
|
1087
|
+
root: Span;
|
|
1088
|
+
/** The span associated with the current `load` function. */
|
|
1089
|
+
current: Span;
|
|
1090
|
+
};
|
|
1007
1091
|
}
|
|
1008
1092
|
|
|
1009
1093
|
export interface NavigationEvent<
|
|
@@ -1282,6 +1366,20 @@ declare module '@sveltejs/kit' {
|
|
|
1282
1366
|
* `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server.
|
|
1283
1367
|
*/
|
|
1284
1368
|
isSubRequest: boolean;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Access to spans for tracing. If tracing is not enabled, these spans will do nothing.
|
|
1372
|
+
* @since 2.31.0
|
|
1373
|
+
*/
|
|
1374
|
+
tracing: {
|
|
1375
|
+
/** Whether tracing is enabled. */
|
|
1376
|
+
enabled: boolean;
|
|
1377
|
+
/** The root span for the request. This span is named `sveltekit.handle.root`. */
|
|
1378
|
+
root: Span;
|
|
1379
|
+
/** The span associated with the current `handle` hook, `load` function, or form action. */
|
|
1380
|
+
current: Span;
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1285
1383
|
/**
|
|
1286
1384
|
* `true` if the request comes from the client via a remote function. The `url` property will be stripped of the internal information
|
|
1287
1385
|
* related to the data request in this case. Use this property instead if the distinction is important to you.
|
|
@@ -1445,6 +1543,19 @@ declare module '@sveltejs/kit' {
|
|
|
1445
1543
|
* ```
|
|
1446
1544
|
*/
|
|
1447
1545
|
untrack: <T>(fn: () => T) => T;
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Access to spans for tracing. If tracing is not enabled, these spans will do nothing.
|
|
1549
|
+
* @since 2.31.0
|
|
1550
|
+
*/
|
|
1551
|
+
tracing: {
|
|
1552
|
+
/** Whether tracing is enabled. */
|
|
1553
|
+
enabled: boolean;
|
|
1554
|
+
/** The root span for the request. This span is named `sveltekit.handle.root`. */
|
|
1555
|
+
root: Span;
|
|
1556
|
+
/** The span associated with the current server `load` function. */
|
|
1557
|
+
current: Span;
|
|
1558
|
+
};
|
|
1448
1559
|
}
|
|
1449
1560
|
|
|
1450
1561
|
/**
|
|
@@ -2260,6 +2371,7 @@ declare module '@sveltejs/kit' {
|
|
|
2260
2371
|
}
|
|
2261
2372
|
|
|
2262
2373
|
declare module '@sveltejs/kit/hooks' {
|
|
2374
|
+
import type { Handle } from '@sveltejs/kit';
|
|
2263
2375
|
/**
|
|
2264
2376
|
* A helper function for sequencing multiple `handle` calls in a middleware-like manner.
|
|
2265
2377
|
* The behavior for the `handle` options is as follows:
|
|
@@ -2330,7 +2442,7 @@ declare module '@sveltejs/kit/hooks' {
|
|
|
2330
2442
|
*
|
|
2331
2443
|
* @param handlers The chain of `handle` functions
|
|
2332
2444
|
* */
|
|
2333
|
-
export function sequence(...handlers:
|
|
2445
|
+
export function sequence(...handlers: Handle[]): Handle;
|
|
2334
2446
|
|
|
2335
2447
|
export {};
|
|
2336
2448
|
}
|
|
@@ -2671,6 +2783,7 @@ declare module '$app/server' {
|
|
|
2671
2783
|
*
|
|
2672
2784
|
* In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`).
|
|
2673
2785
|
* @since 2.20.0
|
|
2786
|
+
*
|
|
2674
2787
|
* */
|
|
2675
2788
|
export function getRequestEvent(): RequestEvent;
|
|
2676
2789
|
/**
|
|
@@ -2950,4 +3063,58 @@ declare module '$service-worker' {
|
|
|
2950
3063
|
export const version: string;
|
|
2951
3064
|
}
|
|
2952
3065
|
|
|
3066
|
+
/**
|
|
3067
|
+
* This module contains generated types for the routes in your app.
|
|
3068
|
+
*/
|
|
3069
|
+
declare module '$app/types' {
|
|
3070
|
+
/**
|
|
3071
|
+
* Interface for all generated app types. This gets extended via declaration merging. DO NOT USE THIS INTERFACE DIRECTLY.
|
|
3072
|
+
*/
|
|
3073
|
+
export interface AppTypes {
|
|
3074
|
+
// These are all functions so that we can leverage function overloads to get the correct type.
|
|
3075
|
+
// Using the return types directly would error with a "not the same type" error.
|
|
3076
|
+
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces
|
|
3077
|
+
RouteId(): string;
|
|
3078
|
+
RouteParams(): Record<string, Record<string, string>>;
|
|
3079
|
+
LayoutParams(): Record<string, Record<string, string>>;
|
|
3080
|
+
Pathname(): string;
|
|
3081
|
+
ResolvedPathname(): string;
|
|
3082
|
+
Asset(): string;
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
/**
|
|
3086
|
+
* A union of all the route IDs in your app. Used for `page.route.id` and `event.route.id`.
|
|
3087
|
+
*/
|
|
3088
|
+
export type RouteId = ReturnType<AppTypes['RouteId']>;
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* A utility for getting the parameters associated with a given route.
|
|
3092
|
+
*/
|
|
3093
|
+
export type RouteParams<T extends RouteId> = T extends keyof ReturnType<AppTypes['RouteParams']>
|
|
3094
|
+
? ReturnType<AppTypes['RouteParams']>[T]
|
|
3095
|
+
: Record<string, never>;
|
|
3096
|
+
|
|
3097
|
+
/**
|
|
3098
|
+
* A utility for getting the parameters associated with a given layout, which is similar to `RouteParams` but also includes optional parameters for any child route.
|
|
3099
|
+
*/
|
|
3100
|
+
export type LayoutParams<T extends RouteId> = T extends keyof ReturnType<AppTypes['LayoutParams']>
|
|
3101
|
+
? ReturnType<AppTypes['LayoutParams']>[T]
|
|
3102
|
+
: Record<string, never>;
|
|
3103
|
+
|
|
3104
|
+
/**
|
|
3105
|
+
* A union of all valid pathnames in your app.
|
|
3106
|
+
*/
|
|
3107
|
+
export type Pathname = ReturnType<AppTypes['Pathname']>;
|
|
3108
|
+
|
|
3109
|
+
/**
|
|
3110
|
+
* `Pathname`, but possibly prefixed with a base path. Used for `page.url.pathname`.
|
|
3111
|
+
*/
|
|
3112
|
+
export type ResolvedPathname = ReturnType<AppTypes['ResolvedPathname']>;
|
|
3113
|
+
|
|
3114
|
+
/**
|
|
3115
|
+
* A union of all the filenames of assets contained in your `static` directory.
|
|
3116
|
+
*/
|
|
3117
|
+
export type Asset = ReturnType<AppTypes['Asset']>;
|
|
3118
|
+
}
|
|
3119
|
+
|
|
2953
3120
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"../src/runtime/client/client.js",
|
|
160
160
|
"../src/runtime/app/paths/types.d.ts",
|
|
161
161
|
"../src/runtime/app/server/index.js",
|
|
162
|
-
"../src/
|
|
162
|
+
"../src/exports/internal/event.js",
|
|
163
163
|
"../src/runtime/app/server/remote/form.js",
|
|
164
164
|
"../src/runtime/app/state/index.js",
|
|
165
165
|
"../src/runtime/app/stores.js"
|
|
@@ -185,6 +185,6 @@
|
|
|
185
185
|
null,
|
|
186
186
|
null
|
|
187
187
|
],
|
|
188
|
-
"mappings": "
|
|
188
|
+
"mappings": ";;;;;;;;;;;kBAiCiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAiCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8IPC,MAAMA;;;;;;;;;;;kBAWNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DPC,QAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MbycRC,8BAA8BA;MD/T9B1E,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ce1GX2E,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA;;;;;;;;;iBCrDPC,SAASA;;;;;;;;;;;;;;;cAyBTH,IAAIA;;;;;;;;;;cAiBJC,UAAUA;;;;;;;;cAeVC,OAAOA",
|
|
189
189
|
"ignoreList": []
|
|
190
190
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** @import { RequestEvent } from '@sveltejs/kit' */
|
|
2
|
-
/** @import { MaybePromise, PrerenderOptions, ServerHooks, SSROptions, SSRState } from 'types' */
|
|
3
|
-
|
|
4
|
-
export const EVENT_STATE = Symbol('remote');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal state associated with the current `RequestEvent`,
|
|
8
|
-
* used for tracking things like remote function calls
|
|
9
|
-
* @typedef {{
|
|
10
|
-
* prerendering: PrerenderOptions | undefined
|
|
11
|
-
* transport: ServerHooks['transport'];
|
|
12
|
-
* handleValidationError: ServerHooks['handleValidationError'];
|
|
13
|
-
* form_instances?: Map<any, any>;
|
|
14
|
-
* remote_data?: Record<string, MaybePromise<any>>;
|
|
15
|
-
* refreshes?: Record<string, any>;
|
|
16
|
-
* }} RequestEventState
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @param {SSRState} state
|
|
21
|
-
* @param {SSROptions} options
|
|
22
|
-
* @returns {RequestEventState}
|
|
23
|
-
*/
|
|
24
|
-
export function create_event_state(state, options) {
|
|
25
|
-
return {
|
|
26
|
-
prerendering: state.prerendering,
|
|
27
|
-
transport: options.hooks.transport,
|
|
28
|
-
handleValidationError: options.hooks.handleValidationError
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Returns internal state associated with the current `RequestEvent`
|
|
34
|
-
* @param {RequestEvent} event
|
|
35
|
-
* @returns {RequestEventState}
|
|
36
|
-
*/
|
|
37
|
-
export function get_event_state(event) {
|
|
38
|
-
// @ts-expect-error the symbol isn't exposed on the public `RequestEvent` type
|
|
39
|
-
return event[EVENT_STATE];
|
|
40
|
-
}
|