@sveltejs/kit 3.0.0-next.2 → 3.0.0-next.21
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 +62 -36
- package/src/cli.js +15 -12
- package/src/constants.js +6 -1
- package/src/core/adapt/builder.js +66 -72
- package/src/core/adapt/index.js +17 -6
- package/src/core/config/index.js +134 -80
- package/src/core/config/options.js +295 -273
- package/src/core/config/types.d.ts +1 -1
- package/src/core/env.js +146 -16
- package/src/core/generate_manifest/index.js +18 -15
- package/src/core/postbuild/analyse.js +8 -20
- package/src/core/postbuild/crawl.js +22 -6
- package/src/core/postbuild/entities.js +8 -2
- package/src/core/postbuild/fallback.js +4 -2
- package/src/core/postbuild/prerender.js +222 -70
- package/src/core/postbuild/queue.js +2 -1
- package/src/core/sync/create_manifest_data/conflict.js +1 -1
- package/src/core/sync/create_manifest_data/index.js +82 -62
- package/src/core/sync/sync.js +40 -31
- package/src/core/sync/ts.js +1 -1
- package/src/core/sync/utils.js +22 -2
- package/src/core/sync/{write_non_ambient.js → write_app_types.js} +107 -58
- package/src/core/sync/write_client_manifest.js +14 -29
- package/src/core/sync/write_env.js +7 -5
- package/src/core/sync/write_server.js +37 -45
- package/src/core/sync/write_tsconfig/index.js +274 -0
- package/src/core/sync/write_tsconfig/test-app/package.json +7 -0
- package/src/core/sync/write_tsconfig/utils.js +77 -0
- package/src/core/sync/write_tsconfig/validate.js +128 -0
- package/src/core/sync/write_types/index.js +127 -123
- package/src/core/utils.js +30 -5
- package/src/exports/env/index.js +77 -0
- package/src/exports/env/public.d.ts +55 -0
- package/src/exports/hooks/index.js +3 -9
- package/src/exports/hooks/public.d.ts +195 -0
- package/src/exports/hooks/sequence.js +9 -6
- package/src/exports/index.js +52 -29
- package/src/exports/internal/client.js +5 -0
- package/src/exports/internal/env.js +8 -5
- package/src/exports/internal/index.js +1 -90
- package/src/exports/internal/{event.js → server/event.js} +2 -3
- package/src/exports/internal/server/index.js +37 -0
- package/src/exports/internal/server/telemetry.js +95 -0
- package/src/exports/internal/shared.js +90 -0
- package/src/exports/node/index.js +64 -22
- package/src/exports/params/index.js +70 -0
- package/src/exports/params/public.d.ts +63 -0
- package/src/exports/public.d.ts +50 -1733
- package/src/exports/remote/index.js +11 -0
- package/src/exports/remote/public.d.ts +519 -0
- package/src/exports/url.js +86 -0
- package/src/exports/vite/build/build_server.js +54 -65
- package/src/exports/vite/build/remote.js +24 -19
- package/src/exports/vite/build/utils.js +0 -8
- package/src/exports/vite/dev/index.js +218 -146
- package/src/exports/vite/index.js +1590 -858
- package/src/exports/vite/module_ids.js +2 -2
- package/src/exports/vite/preview/index.js +40 -32
- package/src/exports/vite/public.d.ts +588 -0
- package/src/exports/vite/utils.js +84 -46
- package/src/pathname.js +55 -0
- package/src/runner.js +15 -0
- package/src/runtime/app/env/internal.js +4 -4
- package/src/runtime/app/env/types.d.ts +1 -1
- package/src/runtime/app/environment/index.js +3 -3
- package/src/runtime/app/{forms.js → forms/index.js} +73 -42
- package/src/runtime/app/forms/public.d.ts +2 -0
- package/src/runtime/app/forms/types.d.ts +56 -0
- package/src/runtime/app/internal/transport.js +53 -0
- package/src/runtime/app/manifest/index.js +1 -0
- package/src/runtime/app/{navigation.js → navigation/index.js} +2 -1
- package/src/runtime/app/navigation/public.d.ts +237 -0
- package/src/runtime/app/paths/client.js +37 -37
- package/src/runtime/app/paths/index.js +1 -1
- package/src/runtime/app/paths/internal/client.js +34 -2
- package/src/runtime/app/paths/internal/server.js +6 -23
- package/src/runtime/app/paths/internal.d.ts +3 -0
- package/src/runtime/app/paths/public.d.ts +1 -29
- package/src/runtime/app/paths/server.js +36 -17
- package/src/runtime/app/paths/types.d.ts +11 -19
- package/src/runtime/app/server/index.js +2 -2
- package/src/runtime/app/server/public.d.ts +201 -0
- package/src/runtime/app/server/remote/command.js +13 -11
- package/src/runtime/app/server/remote/form.js +61 -39
- package/src/runtime/app/server/remote/prerender.js +45 -45
- package/src/runtime/app/server/remote/query.js +106 -108
- package/src/runtime/app/server/remote/requested.js +27 -19
- package/src/runtime/app/server/remote/shared.js +76 -76
- package/src/runtime/app/service-worker/index.js +24 -0
- package/src/runtime/app/state/client.js +4 -2
- package/src/runtime/app/state/index.js +7 -5
- package/src/runtime/app/state/public.d.ts +72 -0
- package/src/runtime/app/state/server.js +3 -0
- package/src/runtime/app/stores.js +15 -78
- package/src/runtime/client/bundle.js +1 -1
- package/src/runtime/client/client-entry.js +3 -0
- package/src/runtime/client/client.js +1336 -648
- package/src/runtime/client/constants.js +3 -6
- package/src/runtime/client/entry.js +24 -3
- package/src/runtime/client/fetcher.js +25 -25
- package/src/runtime/client/ndjson.js +1 -1
- package/src/runtime/client/parse.js +1 -1
- package/src/runtime/client/payload.js +17 -0
- package/src/runtime/client/remote-functions/cache.svelte.js +3 -1
- package/src/runtime/client/remote-functions/command.svelte.js +37 -61
- package/src/runtime/client/remote-functions/form.svelte.js +267 -178
- package/src/runtime/client/remote-functions/prerender.svelte.js +32 -11
- package/src/runtime/client/remote-functions/query/index.js +10 -17
- package/src/runtime/client/remote-functions/query/instance.svelte.js +64 -18
- package/src/runtime/client/remote-functions/query/proxy.js +5 -5
- package/src/runtime/client/remote-functions/query-batch.svelte.js +61 -70
- package/src/runtime/client/remote-functions/query-live/index.js +1 -1
- package/src/runtime/client/remote-functions/query-live/instance.svelte.js +63 -21
- package/src/runtime/client/remote-functions/query-live/iterator.js +15 -12
- package/src/runtime/client/remote-functions/query-live/proxy.js +2 -12
- package/src/runtime/client/remote-functions/shared.svelte.js +90 -65
- package/src/runtime/client/snapshots.js +147 -0
- package/src/runtime/client/state.svelte.js +94 -55
- package/src/runtime/client/stream.js +3 -2
- package/src/runtime/client/types.d.ts +13 -9
- package/src/runtime/client/utils.js +22 -110
- package/src/runtime/components/root.svelte +56 -0
- package/src/runtime/env/dynamic/private.js +7 -0
- package/src/runtime/env/dynamic/public.js +7 -0
- package/src/runtime/env/static/private.js +6 -0
- package/src/runtime/env/static/public.js +6 -0
- package/src/runtime/form-utils.js +172 -61
- package/src/runtime/pathname.js +20 -32
- package/src/runtime/props.svelte.js +72 -0
- package/src/runtime/server/constants.js +0 -3
- package/src/runtime/server/cookie.js +72 -55
- package/src/runtime/server/csrf.js +65 -0
- package/src/runtime/server/data/index.js +49 -53
- package/src/runtime/server/dev.js +22 -0
- package/src/runtime/server/endpoint.js +6 -7
- package/src/runtime/server/env_module.js +0 -5
- package/src/runtime/server/errors.js +160 -0
- package/src/runtime/server/fetch.js +32 -39
- package/src/runtime/server/index.js +90 -64
- package/src/runtime/server/internal.js +71 -0
- package/src/runtime/server/page/actions.js +85 -64
- package/src/runtime/server/page/crypto.js +2 -2
- package/src/runtime/server/page/csp.js +88 -104
- package/src/runtime/server/page/data_serializer.js +24 -25
- package/src/runtime/server/page/index.js +36 -53
- package/src/runtime/server/page/load_data.js +50 -57
- package/src/runtime/server/page/render.js +173 -239
- package/src/runtime/server/page/respond_with_error.js +17 -31
- package/src/runtime/server/page/serialize_data.js +2 -13
- package/src/runtime/server/page/server_routing.js +85 -26
- package/src/runtime/server/remote-functions.js +640 -0
- package/src/runtime/server/respond.js +190 -131
- package/src/runtime/server/sourcemaps.js +183 -0
- package/src/runtime/server/state.js +53 -0
- package/src/runtime/server/utils.js +13 -155
- package/src/runtime/shared.js +20 -40
- package/src/runtime/utils.js +3 -0
- package/src/types/ambient-private.d.ts +11 -1
- package/src/types/ambient.d.ts +87 -36
- package/src/types/global-private.d.ts +25 -25
- package/src/types/internal.d.ts +163 -157
- package/src/types/private.d.ts +41 -1
- package/src/utils/error.js +28 -4
- package/src/utils/escape.js +9 -25
- package/src/utils/features.js +1 -1
- package/src/utils/filesystem.js +1 -23
- package/src/utils/fork.js +7 -2
- package/src/utils/hash.js +21 -0
- package/src/utils/http.js +8 -7
- package/src/utils/import.js +9 -2
- package/src/utils/imports.js +83 -0
- package/src/utils/mime.js +9 -0
- package/src/utils/page_nodes.js +6 -7
- package/src/utils/params.js +67 -0
- package/src/utils/regex.js +9 -0
- package/src/utils/routing.js +145 -73
- package/src/utils/shared-iterator.js +5 -0
- package/src/utils/streaming.js +14 -4
- package/src/utils/url.js +33 -2
- package/src/version.js +1 -1
- package/types/index.d.ts +2616 -2433
- package/types/index.d.ts.map +120 -106
- package/src/core/sync/write_ambient.js +0 -18
- package/src/core/sync/write_root.js +0 -148
- package/src/core/sync/write_tsconfig.js +0 -250
- package/src/exports/internal/server.js +0 -22
- package/src/exports/node/polyfills.js +0 -30
- package/src/runtime/server/app.js +0 -9
- package/src/runtime/server/remote.js +0 -457
- package/src/runtime/shared-server.js +0 -7
- package/src/runtime/telemetry/otel.js +0 -21
- package/src/runtime/telemetry/record_span.js +0 -65
- package/src/types/synthetic/$lib.md +0 -5
- /package/src/exports/internal/{remote-functions.js → server/remote-functions.js} +0 -0
- /package/src/{runtime/telemetry/noop.js → telemetry.js} +0 -0
package/src/types/ambient.d.ts
CHANGED
|
@@ -22,62 +22,97 @@
|
|
|
22
22
|
*/
|
|
23
23
|
declare namespace App {
|
|
24
24
|
/**
|
|
25
|
-
* Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function.
|
|
25
|
+
* Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function. Every error passes through the `handleError` hooks, which must return this shape (with `status` and `message` optional, since they default to those of the caught error).
|
|
26
26
|
*/
|
|
27
27
|
export interface Error {
|
|
28
|
+
status: number;
|
|
28
29
|
message: string;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files.
|
|
33
34
|
*/
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
34
36
|
export interface Locals {}
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
|
-
* Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page)
|
|
39
|
+
* Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page) - that is, the data that is shared between all pages.
|
|
38
40
|
* The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly.
|
|
39
41
|
* Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`).
|
|
40
42
|
*/
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
41
44
|
export interface PageData {}
|
|
42
45
|
|
|
43
46
|
/**
|
|
44
|
-
* The shape of the `page.state` object, which can be manipulated using
|
|
47
|
+
* The shape of the `page.state` object, which can be manipulated using [`goto`](https://svelte.dev/docs/kit/$app-navigation#goto).
|
|
45
48
|
*/
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
46
50
|
export interface PageState {}
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here.
|
|
50
54
|
*/
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
51
56
|
export interface Platform {}
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
/**
|
|
55
|
-
* This module is
|
|
60
|
+
* This module is available to [service workers](https://svelte.dev/docs/kit/service-workers) and other contexts.
|
|
61
|
+
* It exports information about the build output, static files, prerendered pages, and routes.
|
|
56
62
|
*/
|
|
57
|
-
declare module '$
|
|
63
|
+
declare module '$app/manifest' {
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
export const base: string;
|
|
63
|
-
/**
|
|
64
|
-
* An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`.
|
|
65
|
+
* An array of `{ path: string }` objects representing the files generated by Vite.
|
|
66
|
+
* The path is relative to the [base path](https://svelte.dev/docs/kit/configuration#paths), and is intended for use with `cache.add(...)` inside a [service worker](https://svelte.dev/docs/kit/service-workers).
|
|
65
67
|
* During development, this is an empty array.
|
|
66
68
|
*/
|
|
67
|
-
export const
|
|
69
|
+
export const immutable: Array<{ path: string }>;
|
|
68
70
|
/**
|
|
69
|
-
* An array of
|
|
71
|
+
* An array of `{ path: AssetPath }` objects representing the files in your `static` directory, or whatever directory is specified by `config.files.assets`.
|
|
72
|
+
* The path is relative to the [base path](https://svelte.dev/docs/kit/configuration#paths), and can be used with [`asset(...)`](https://svelte.dev/docs/kit/$app-paths#asset).
|
|
70
73
|
*/
|
|
71
|
-
export const
|
|
74
|
+
export const assets: Array<{ path: import('$app/types').AssetPath }>;
|
|
72
75
|
/**
|
|
73
|
-
* An array of
|
|
76
|
+
* An array of `{ path: Path }` objects representing prerendered pages and endpoints, relative to the [base path](https://svelte.dev/docs/kit/configuration#paths).
|
|
74
77
|
* During development, this is an empty array.
|
|
75
78
|
*/
|
|
76
|
-
export const prerendered:
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
export const prerendered: Array<{ path: import('$app/types').Path }>;
|
|
80
|
+
/**
|
|
81
|
+
* A route in your app, along with its capabilities. `page` indicates the presence of a `+page`,
|
|
82
|
+
* while `endpoint` indicates the presence of a `+server`. Both are `true` when both files exist.
|
|
83
|
+
*/
|
|
84
|
+
export type ManifestRoute =
|
|
85
|
+
| {
|
|
86
|
+
id: Exclude<import('$app/types').PageRouteId, import('$app/types').EndpointRouteId>;
|
|
87
|
+
page: true;
|
|
88
|
+
endpoint: false;
|
|
89
|
+
}
|
|
90
|
+
| {
|
|
91
|
+
id: Exclude<import('$app/types').EndpointRouteId, import('$app/types').PageRouteId>;
|
|
92
|
+
page: false;
|
|
93
|
+
endpoint: true;
|
|
94
|
+
}
|
|
95
|
+
| {
|
|
96
|
+
id: Extract<import('$app/types').PageRouteId, import('$app/types').EndpointRouteId>;
|
|
97
|
+
page: true;
|
|
98
|
+
endpoint: true;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* An array of objects representing the routes in your app. Only routes that the router can match
|
|
102
|
+
* are included — directories that merely hold a `+layout` are not routes of their own.
|
|
103
|
+
*
|
|
104
|
+
* Each object has an `id`, plus `page` and `endpoint` booleans describing whether the route has a
|
|
105
|
+
* `+page` and/or a `+server`. Both are `true` for a route that has both, so the capabilities can
|
|
106
|
+
* be filtered independently:
|
|
107
|
+
*
|
|
108
|
+
* ```js
|
|
109
|
+
* import { routes } from '$app/manifest';
|
|
110
|
+
*
|
|
111
|
+
* const pages = routes.filter((route) => route.page);
|
|
112
|
+
* const endpoints = routes.filter((route) => route.endpoint);
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export const routes: ManifestRoute[];
|
|
81
116
|
}
|
|
82
117
|
|
|
83
118
|
/**
|
|
@@ -91,16 +126,32 @@ declare module '$app/types' {
|
|
|
91
126
|
// These are all functions so that we can leverage function overloads to get the correct type.
|
|
92
127
|
// Using the return types directly would error with a "not the same type" error.
|
|
93
128
|
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces
|
|
129
|
+
PageRouteId(): string;
|
|
130
|
+
EndpointRouteId(): string;
|
|
94
131
|
RouteId(): string;
|
|
95
132
|
RouteParams(): Record<string, Record<string, string>>;
|
|
96
133
|
LayoutParams(): Record<string, Record<string, string>>;
|
|
97
|
-
|
|
134
|
+
Path(): string;
|
|
98
135
|
ResolvedPathname(): string;
|
|
99
|
-
|
|
136
|
+
AssetPath(): string;
|
|
100
137
|
}
|
|
101
138
|
|
|
102
139
|
/**
|
|
103
|
-
* A union of
|
|
140
|
+
* A union of the route IDs in your app that have a `+page`.
|
|
141
|
+
*
|
|
142
|
+
* A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`.
|
|
143
|
+
*/
|
|
144
|
+
export type PageRouteId = ReturnType<AppTypes['PageRouteId']>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A union of the route IDs in your app that have a `+server`.
|
|
148
|
+
*
|
|
149
|
+
* A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`.
|
|
150
|
+
*/
|
|
151
|
+
export type EndpointRouteId = ReturnType<AppTypes['EndpointRouteId']>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* A union of all the route IDs in your app — the union of `PageRouteId` and `EndpointRouteId`. Used for `page.route.id` and `event.route.id`.
|
|
104
155
|
*/
|
|
105
156
|
export type RouteId = ReturnType<AppTypes['RouteId']>;
|
|
106
157
|
|
|
@@ -116,33 +167,33 @@ declare module '$app/types' {
|
|
|
116
167
|
? ReturnType<AppTypes['RouteParams']>[T]
|
|
117
168
|
: Record<string, never>;
|
|
118
169
|
|
|
170
|
+
/**
|
|
171
|
+
* The route IDs accepted by `LayoutParams`. Like `RouteId`, these preserve route groups and `[param]` syntax, but they identify directories containing layouts rather than matchable routes.
|
|
172
|
+
*/
|
|
173
|
+
type LayoutParamsId = keyof ReturnType<AppTypes['LayoutParams']>;
|
|
174
|
+
|
|
119
175
|
/**
|
|
120
176
|
* 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.
|
|
121
177
|
*/
|
|
122
|
-
export type LayoutParams<T extends
|
|
123
|
-
? ReturnType<AppTypes['LayoutParams']>[T]
|
|
124
|
-
: Record<string, never>;
|
|
178
|
+
export type LayoutParams<T extends LayoutParamsId> = ReturnType<AppTypes['LayoutParams']>[T];
|
|
125
179
|
|
|
126
180
|
/**
|
|
127
|
-
* A union of all valid
|
|
181
|
+
* A union of all valid paths in your app, relative to the `base` path.
|
|
128
182
|
*/
|
|
129
|
-
export type
|
|
183
|
+
export type Path = ReturnType<AppTypes['Path']>;
|
|
130
184
|
|
|
131
185
|
/**
|
|
132
|
-
* `
|
|
186
|
+
* `Path`, but possibly suffixed with a search string and/or hash.
|
|
133
187
|
*/
|
|
134
|
-
export type PathnameWithSearchOrHash =
|
|
135
|
-
| Pathname
|
|
136
|
-
| `${Pathname}?${string}`
|
|
137
|
-
| `${Pathname}#${string}`;
|
|
188
|
+
export type PathnameWithSearchOrHash = Path | `${Path}?${string}` | `${Path}#${string}`;
|
|
138
189
|
|
|
139
190
|
/**
|
|
140
|
-
* `
|
|
191
|
+
* `Path`, but prefixed with a base path. Used for `page.url.pathname`.
|
|
141
192
|
*/
|
|
142
193
|
export type ResolvedPathname = ReturnType<AppTypes['ResolvedPathname']>;
|
|
143
194
|
|
|
144
195
|
/**
|
|
145
|
-
* A union of all the filenames of assets contained in your `static` directory.
|
|
196
|
+
* A union of all the filenames of assets contained in your `static` directory, relative to the `base` path.
|
|
146
197
|
*/
|
|
147
|
-
export type
|
|
198
|
+
export type AssetPath = ReturnType<AppTypes['AssetPath']>;
|
|
148
199
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { SvelteKitPayload } from 'types';
|
|
2
|
+
|
|
1
3
|
declare global {
|
|
2
4
|
const __SVELTEKIT_ADAPTER_NAME__: string;
|
|
3
5
|
const __SVELTEKIT_APP_DIR__: string;
|
|
4
6
|
const __SVELTEKIT_APP_VERSION__: string;
|
|
5
7
|
const __SVELTEKIT_APP_VERSION_FILE__: string;
|
|
6
8
|
const __SVELTEKIT_APP_VERSION_POLL_INTERVAL__: number;
|
|
9
|
+
/** True if version checks are enabled (i.e. `bundleStrategy !== 'inline'`) */
|
|
10
|
+
const __SVELTEKIT_APP_VERSION_CHECKS_ENABLED__: boolean;
|
|
7
11
|
/**
|
|
8
12
|
* True if the user ran `vite dev`. This is different from `esm-env` because
|
|
9
13
|
* it is influenced by `NODE_ENV` which can still be true during `vite preview`
|
|
@@ -13,13 +17,13 @@ declare global {
|
|
|
13
17
|
const __SVELTEKIT_PATHS_ASSETS__: string;
|
|
14
18
|
const __SVELTEKIT_PATHS_BASE__: string;
|
|
15
19
|
const __SVELTEKIT_PATHS_RELATIVE__: boolean;
|
|
16
|
-
/** True if `config.
|
|
20
|
+
/** True if `config.tracing.server` is `true` */
|
|
17
21
|
const __SVELTEKIT_SERVER_TRACING_ENABLED__: boolean;
|
|
18
|
-
/** True if `config.
|
|
22
|
+
/** True if `config.experimental.forkPreloads` is `true` */
|
|
19
23
|
const __SVELTEKIT_FORK_PRELOADS__: boolean;
|
|
20
|
-
/** True if `config.
|
|
24
|
+
/** True if `config.router.resolution === 'client'` */
|
|
21
25
|
const __SVELTEKIT_CLIENT_ROUTING__: boolean;
|
|
22
|
-
/** True if `config.
|
|
26
|
+
/** True if `config.router.type === 'hash'` */
|
|
23
27
|
const __SVELTEKIT_HASH_ROUTING__: boolean;
|
|
24
28
|
/**
|
|
25
29
|
* True if any node in the manifest has a server load function.
|
|
@@ -31,28 +35,25 @@ declare global {
|
|
|
31
35
|
* Used for treeshaking universal load code from client bundles when no universal loads exist.
|
|
32
36
|
*/
|
|
33
37
|
const __SVELTEKIT_HAS_UNIVERSAL_LOAD__: boolean;
|
|
34
|
-
/** The `__sveltekit_abc123` object in the init `<script>` */
|
|
35
|
-
const __SVELTEKIT_PAYLOAD__: {
|
|
36
|
-
/** The basepath, usually relative to the current page */
|
|
37
|
-
base: string;
|
|
38
|
-
/** Path to externally-hosted assets */
|
|
39
|
-
assets?: string;
|
|
40
|
-
/** Public environment variables */
|
|
41
|
-
env?: Record<string, string>;
|
|
42
|
-
/** Serialized data from query/form/command functions */
|
|
43
|
-
query?: Record<string, any>;
|
|
44
|
-
/** Serialized data from prerender functions */
|
|
45
|
-
prerender?: Record<string, any>;
|
|
46
|
-
/** Create a placeholder promise */
|
|
47
|
-
defer?: (id: number) => Promise<any>;
|
|
48
|
-
/** Resolve a placeholder promise */
|
|
49
|
-
resolve?: (data: { id: number; data: any; error: any }) => void;
|
|
50
|
-
};
|
|
51
38
|
/**
|
|
52
|
-
* The
|
|
53
|
-
*
|
|
39
|
+
* The `__sveltekit_abc123` object in the init `<script>`.
|
|
40
|
+
* Should only be used when bundleStrategy !== 'inline' to avoid SvelteKit runtime changing on every build, preventing cacheability.
|
|
41
|
+
*/
|
|
42
|
+
const __SVELTEKIT_PAYLOAD__: SvelteKitPayload;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the `experimental.async` flag is applied
|
|
45
|
+
*/
|
|
46
|
+
const __SVELTEKIT_SUPPORTS_ASYNC__: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Manifest data placeholders used by `$app/manifest`. During build, these
|
|
49
|
+
* are bare identifiers (fake globals) that the bundler leaves as unresolved
|
|
50
|
+
* references. They are replaced with real values by scanning the output
|
|
51
|
+
* chunks after each build completes.
|
|
54
52
|
*/
|
|
55
|
-
const
|
|
53
|
+
const __SVELTEKIT_MANIFEST_IMMUTABLE__: string[];
|
|
54
|
+
const __SVELTEKIT_MANIFEST_ASSETS__: string[];
|
|
55
|
+
const __SVELTEKIT_MANIFEST_PRERENDERED__: string[];
|
|
56
|
+
const __SVELTEKIT_MANIFEST_ROUTES__: Array<{ id: string }>;
|
|
56
57
|
/**
|
|
57
58
|
* This makes the use of specific features visible at both dev and build time, in such a
|
|
58
59
|
* way that we can error when they are not supported by the target platform.
|
|
@@ -68,7 +69,6 @@ declare global {
|
|
|
68
69
|
* to throw an error if the feature would fail in production.
|
|
69
70
|
*/
|
|
70
71
|
var __SVELTEKIT_TRACK__: (label: string) => void;
|
|
71
|
-
var __SVELTEKIT_EXPERIMENTAL_USE_TRANSFORM_ERROR__: boolean;
|
|
72
72
|
var Bun: object;
|
|
73
73
|
var Deno: object;
|
|
74
74
|
}
|