@sveltejs/kit 3.0.0-next.11 → 3.0.0-next.12
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/cli.js +8 -8
- package/src/constants.js +1 -1
- package/src/core/config/options.js +43 -35
- package/src/core/env.js +25 -11
- package/src/core/sync/sync.js +11 -14
- package/src/core/sync/utils.js +21 -1
- package/src/core/sync/{write_non_ambient.js → write_app_types.js} +23 -21
- package/src/core/sync/write_client_manifest.js +4 -12
- package/src/core/sync/write_env.js +6 -4
- package/src/core/sync/write_server.js +10 -15
- package/src/core/sync/write_tsconfig/index.js +245 -0
- package/src/core/sync/write_tsconfig/utils.js +162 -0
- package/src/core/sync/write_types/index.js +80 -88
- package/src/exports/internal/server/index.js +3 -1
- package/src/exports/public.d.ts +28 -51
- package/src/exports/vite/dev/index.js +88 -76
- package/src/exports/vite/index.js +364 -144
- package/src/exports/vite/module_ids.js +3 -1
- package/src/exports/vite/utils.js +1 -10
- package/src/runner.js +13 -0
- package/src/runtime/app/forms.js +4 -0
- package/src/runtime/app/manifest/index.js +1 -0
- package/src/runtime/app/paths/client.js +30 -30
- package/src/runtime/app/paths/internal/client.js +26 -0
- package/src/runtime/app/paths/server.js +22 -9
- package/src/runtime/app/paths/types.d.ts +11 -19
- package/src/runtime/app/server/remote/command.js +12 -7
- package/src/runtime/app/server/remote/form.js +29 -26
- package/src/runtime/app/server/remote/prerender.js +9 -2
- package/src/runtime/app/server/remote/query.js +5 -4
- package/src/runtime/app/server/remote/shared.js +48 -30
- package/src/runtime/app/service-worker/index.js +24 -0
- package/src/runtime/app/state/index.js +1 -1
- package/src/runtime/client/client.js +46 -9
- package/src/runtime/client/remote-functions/form.svelte.js +43 -51
- package/src/runtime/client/remote-functions/query/index.js +2 -2
- package/src/runtime/client/remote-functions/query-batch.svelte.js +2 -3
- package/src/runtime/client/remote-functions/query-live/iterator.js +5 -2
- package/src/runtime/client/remote-functions/shared.svelte.js +4 -1
- package/src/runtime/client/state.svelte.js +54 -21
- package/src/runtime/form-utils.js +89 -54
- package/src/runtime/server/cookie.js +1 -1
- package/src/runtime/server/data/index.js +31 -28
- package/src/runtime/server/errors.js +1 -1
- package/src/runtime/server/page/actions.js +3 -3
- package/src/runtime/server/page/render.js +19 -28
- package/src/runtime/server/remote-functions.js +66 -35
- package/src/runtime/server/respond.js +56 -14
- package/src/runtime/server/utils.js +10 -0
- package/src/types/ambient-private.d.ts +8 -0
- package/src/types/ambient.d.ts +22 -27
- package/src/types/global-private.d.ts +12 -0
- package/src/types/internal.d.ts +13 -3
- package/src/utils/url.js +12 -0
- package/src/version.js +1 -1
- package/types/index.d.ts +80 -98
- package/types/index.d.ts.map +4 -1
- package/src/core/sync/write_ambient.js +0 -18
- package/src/core/sync/write_tsconfig.js +0 -258
- /package/src/core/sync/{write_tsconfig_test → write_tsconfig/test-app}/package.json +0 -0
package/types/index.d.ts
CHANGED
|
@@ -260,7 +260,7 @@ declare module '@sveltejs/kit' {
|
|
|
260
260
|
/**
|
|
261
261
|
* Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request.
|
|
262
262
|
*
|
|
263
|
-
* The `httpOnly`
|
|
263
|
+
* The `httpOnly` is `true` by default, as is `secure`, except during development, when it defaults to `false`. These must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP.
|
|
264
264
|
*
|
|
265
265
|
* The `path` option is `'/'` by default. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children.
|
|
266
266
|
* @param name the name of the cookie
|
|
@@ -272,7 +272,7 @@ declare module '@sveltejs/kit' {
|
|
|
272
272
|
/**
|
|
273
273
|
* Deletes a cookie by setting its value to an empty string and setting the expiry date in the past.
|
|
274
274
|
*
|
|
275
|
-
* The `httpOnly`
|
|
275
|
+
* The `httpOnly` is `true` by default, as is `secure`, except during development, when it defaults to `false`. These must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP.
|
|
276
276
|
*
|
|
277
277
|
* The `path` option is `'/'` by default. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children.
|
|
278
278
|
* @param name the name of the cookie
|
|
@@ -307,7 +307,7 @@ declare module '@sveltejs/kit' {
|
|
|
307
307
|
/**
|
|
308
308
|
* Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response.
|
|
309
309
|
*
|
|
310
|
-
* The `httpOnly`
|
|
310
|
+
* The `httpOnly` is `true` by default, as is `secure`, except during development, when it defaults to `false`. These must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP.
|
|
311
311
|
*
|
|
312
312
|
* The `path` option is `'/'` by default. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children.
|
|
313
313
|
* @param name the name of the cookie
|
|
@@ -337,32 +337,10 @@ declare module '@sveltejs/kit' {
|
|
|
337
337
|
/**
|
|
338
338
|
* An object containing zero or more aliases used to replace values in `import` statements. These aliases are automatically passed to Vite and TypeScript.
|
|
339
339
|
*
|
|
340
|
-
*
|
|
341
|
-
* /// file: vite.config.js
|
|
342
|
-
* import { defineConfig } from 'vite';
|
|
343
|
-
* import { sveltekit } from '@sveltejs/kit/vite';
|
|
344
|
-
*
|
|
345
|
-
* export default defineConfig({
|
|
346
|
-
* plugins: [
|
|
347
|
-
* sveltekit({
|
|
348
|
-
* alias: {
|
|
349
|
-
* // this will match a file
|
|
350
|
-
* 'my-file': 'path/to/my-file.js',
|
|
351
|
-
*
|
|
352
|
-
* // this will match a directory and its contents
|
|
353
|
-
* // (`my-directory/x` resolves to `path/to/my-directory/x`)
|
|
354
|
-
* 'my-directory': 'path/to/my-directory',
|
|
355
|
-
*
|
|
356
|
-
* // an alias ending /* will only match
|
|
357
|
-
* // the contents of a directory, not the directory itself
|
|
358
|
-
* 'my-directory/*': 'path/to/my-directory/*'
|
|
359
|
-
* }
|
|
360
|
-
* })
|
|
361
|
-
* ]
|
|
362
|
-
* });
|
|
363
|
-
* ```
|
|
340
|
+
* This option is deprecated. Use [subpath imports](https://svelte.dev/docs/kit/$lib) instead.
|
|
364
341
|
*
|
|
365
342
|
* > [!NOTE] You will need to run `npm run dev` to have SvelteKit automatically generate the required alias configuration in `jsconfig.json` or `tsconfig.json`.
|
|
343
|
+
* @deprecated
|
|
366
344
|
* @default {}
|
|
367
345
|
*/
|
|
368
346
|
alias?: Record<string, string>;
|
|
@@ -818,13 +796,7 @@ declare module '@sveltejs/kit' {
|
|
|
818
796
|
*/
|
|
819
797
|
resolution?: 'client' | 'server';
|
|
820
798
|
};
|
|
821
|
-
serviceWorker?:
|
|
822
|
-
/**
|
|
823
|
-
* Determine which files in your `static` directory will be available in `$service-worker.files`.
|
|
824
|
-
* @default (filename) => !/\.DS_Store/.test(filename)
|
|
825
|
-
*/
|
|
826
|
-
files?: (file: string) => boolean;
|
|
827
|
-
} & (
|
|
799
|
+
serviceWorker?:
|
|
828
800
|
| {
|
|
829
801
|
/**
|
|
830
802
|
* Whether to automatically register the service worker, if it exists.
|
|
@@ -842,8 +814,7 @@ declare module '@sveltejs/kit' {
|
|
|
842
814
|
* @default true
|
|
843
815
|
*/
|
|
844
816
|
register?: false;
|
|
845
|
-
}
|
|
846
|
-
);
|
|
817
|
+
};
|
|
847
818
|
/**
|
|
848
819
|
* Options for enabling [OpenTelemetry](https://opentelemetry.io/) tracing for SvelteKit operations.
|
|
849
820
|
* @default { server: false }
|
|
@@ -855,6 +826,9 @@ declare module '@sveltejs/kit' {
|
|
|
855
826
|
*/
|
|
856
827
|
server?: boolean;
|
|
857
828
|
};
|
|
829
|
+
/**
|
|
830
|
+
* @deprecated Add configuration to `tsconfig.json` directly
|
|
831
|
+
*/
|
|
858
832
|
typescript?: {
|
|
859
833
|
/**
|
|
860
834
|
* A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one.
|
|
@@ -869,9 +843,9 @@ declare module '@sveltejs/kit' {
|
|
|
869
843
|
};
|
|
870
844
|
/**
|
|
871
845
|
* Client-side navigation can be buggy if you deploy a new version of your app while people are using it. If the code for the new page is already loaded, it may have stale content; if it isn't, the app's route manifest may point to a JavaScript file that no longer exists.
|
|
872
|
-
* SvelteKit helps you solve this problem through version management.
|
|
846
|
+
* SvelteKit helps you solve this problem through version management. The current version is included in data, remote, and form action responses via the `x-sveltekit-version` header, so SvelteKit can detect new deployments without polling — for example when a navigation triggers a server `load` function, or when a remote function is called. SvelteKit also checks for new versions when the tab regains focus or becomes visible.
|
|
873
847
|
* If SvelteKit encounters an error while loading the page and detects that a new version has been deployed (using the `name` specified here, which defaults to a timestamp of the build) it will fall back to traditional full-page navigation.
|
|
874
|
-
* Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use
|
|
848
|
+
* Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use `beforeNavigate`:
|
|
875
849
|
* ```html
|
|
876
850
|
* /// file: +layout.svelte
|
|
877
851
|
* <script>
|
|
@@ -886,7 +860,7 @@ declare module '@sveltejs/kit' {
|
|
|
886
860
|
* </script>
|
|
887
861
|
* ```
|
|
888
862
|
*
|
|
889
|
-
*
|
|
863
|
+
* In addition to these checks, SvelteKit polls for new versions on an interval and sets [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) to `true` when it detects one. Set `pollInterval` to `0` to disable polling (the header- and event-based checks will still run).
|
|
890
864
|
*/
|
|
891
865
|
version?: {
|
|
892
866
|
/**
|
|
@@ -913,8 +887,8 @@ declare module '@sveltejs/kit' {
|
|
|
913
887
|
*/
|
|
914
888
|
name?: string;
|
|
915
889
|
/**
|
|
916
|
-
* The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs.
|
|
917
|
-
* @default
|
|
890
|
+
* The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs. SvelteKit also checks for new versions on server responses (via the `x-sveltekit-version` header) and when the tab regains focus or becomes visible, so polling is only needed for long-lived sessions on a single page.
|
|
891
|
+
* @default 3600000
|
|
918
892
|
*/
|
|
919
893
|
pollInterval?: number;
|
|
920
894
|
};
|
|
@@ -1585,9 +1559,10 @@ declare module '@sveltejs/kit' {
|
|
|
1585
1559
|
/**
|
|
1586
1560
|
* The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object.
|
|
1587
1561
|
*
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1562
|
+
* Inside `query` functions (including `query.batch` and `query.live`), accessing this property throws an error.
|
|
1563
|
+
* Pass values from the page as arguments to the query instead. Inside `form` and `command` functions it relates to the page
|
|
1564
|
+
* the remote function was called from, _not_ the URL of the endpoint SvelteKit creates for the remote function. Never use it
|
|
1565
|
+
* to determine whether or not a user is authorized to access certain data, as these values are part of the request which could be manipulated.
|
|
1591
1566
|
*/
|
|
1592
1567
|
params: Params;
|
|
1593
1568
|
/**
|
|
@@ -1605,9 +1580,10 @@ declare module '@sveltejs/kit' {
|
|
|
1605
1580
|
/**
|
|
1606
1581
|
* The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched.
|
|
1607
1582
|
*
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
1610
|
-
*
|
|
1583
|
+
* Inside `query` functions (including `query.batch` and `query.live`), accessing this property throws an error.
|
|
1584
|
+
* Pass values from the page as arguments to the query instead. Inside `form` and `command` functions it relates to the page
|
|
1585
|
+
* the remote function was called from, _not_ the URL of the endpoint SvelteKit creates for the remote function. Never use it
|
|
1586
|
+
* to determine whether or not a user is authorized to access certain data, as these values are part of the request which could be manipulated.
|
|
1611
1587
|
*/
|
|
1612
1588
|
id: RouteId;
|
|
1613
1589
|
};
|
|
@@ -1637,9 +1613,10 @@ declare module '@sveltejs/kit' {
|
|
|
1637
1613
|
/**
|
|
1638
1614
|
* The requested URL.
|
|
1639
1615
|
*
|
|
1640
|
-
*
|
|
1641
|
-
*
|
|
1642
|
-
*
|
|
1616
|
+
* Inside `query` functions (including `query.batch` and `query.live`), accessing this property throws an error.
|
|
1617
|
+
* Pass values from the page as arguments to the query instead. Inside `form` and `command` functions it relates to the page
|
|
1618
|
+
* the remote function was called from, _not_ the URL of the endpoint SvelteKit creates for the remote function. Never use it
|
|
1619
|
+
* to determine whether or not a user is authorized to access certain data, as these values are part of the request which could be manipulated.
|
|
1643
1620
|
*/
|
|
1644
1621
|
url: URL;
|
|
1645
1622
|
/**
|
|
@@ -2064,7 +2041,7 @@ declare module '@sveltejs/kit' {
|
|
|
2064
2041
|
? [type: Type, value: Value | (string & {})]
|
|
2065
2042
|
: Type extends 'file' | 'file multiple'
|
|
2066
2043
|
? [type: Type]
|
|
2067
|
-
: [type: Type] | [type: Type, value: Value |
|
|
2044
|
+
: [type: Type] | [type: Type, value: Value | undefined];
|
|
2068
2045
|
|
|
2069
2046
|
/**
|
|
2070
2047
|
* Form field accessor type that provides name(), value(), and issues() methods
|
|
@@ -3250,7 +3227,7 @@ declare module '$app/navigation' {
|
|
|
3250
3227
|
}
|
|
3251
3228
|
|
|
3252
3229
|
declare module '$app/paths' {
|
|
3253
|
-
import type {
|
|
3230
|
+
import type { AssetPath, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, Path, RouteId, RouteParams } from '$app/types';
|
|
3254
3231
|
/**
|
|
3255
3232
|
* Resolve the URL of an asset in your `static` directory, by prefixing it with [`config.paths.assets`](https://svelte.dev/docs/kit/configuration#paths) if configured, or otherwise by prefixing it with the base path.
|
|
3256
3233
|
*
|
|
@@ -3262,12 +3239,12 @@ declare module '$app/paths' {
|
|
|
3262
3239
|
* import { asset } from '$app/paths';
|
|
3263
3240
|
* </script>
|
|
3264
3241
|
*
|
|
3265
|
-
* <img alt="a potato" src={asset('
|
|
3242
|
+
* <img alt="a potato" src={asset('potato.jpg')} />
|
|
3266
3243
|
* ```
|
|
3267
3244
|
* @since 2.26
|
|
3268
3245
|
*
|
|
3269
3246
|
* */
|
|
3270
|
-
export function asset(file:
|
|
3247
|
+
export function asset(file: AssetPath): string;
|
|
3271
3248
|
/**
|
|
3272
3249
|
* Resolve a pathname by prefixing it with the base path, if any, or resolve a route ID by populating dynamic segments with parameters.
|
|
3273
3250
|
*
|
|
@@ -3278,7 +3255,7 @@ declare module '$app/paths' {
|
|
|
3278
3255
|
* import { resolve } from '$app/paths';
|
|
3279
3256
|
*
|
|
3280
3257
|
* // using a pathname
|
|
3281
|
-
* const resolved = resolve(
|
|
3258
|
+
* const resolved = resolve(`blog/hello-world`);
|
|
3282
3259
|
*
|
|
3283
3260
|
* // using a route ID plus parameters
|
|
3284
3261
|
* const resolved = resolve('/blog/[slug]', {
|
|
@@ -3296,7 +3273,7 @@ declare module '$app/paths' {
|
|
|
3296
3273
|
* ```js
|
|
3297
3274
|
* import { match } from '$app/paths';
|
|
3298
3275
|
*
|
|
3299
|
-
* const route = await match('
|
|
3276
|
+
* const route = await match('blog/hello-world');
|
|
3300
3277
|
*
|
|
3301
3278
|
* if (route?.id === '/blog/[slug]') {
|
|
3302
3279
|
* const slug = route.params.slug;
|
|
@@ -3307,26 +3284,23 @@ declare module '$app/paths' {
|
|
|
3307
3284
|
* @since 2.52.0
|
|
3308
3285
|
*
|
|
3309
3286
|
* */
|
|
3310
|
-
export function match(url:
|
|
3287
|
+
export function match(url: Path | URL | (string & {})): Promise<{ [K in RouteId]: {
|
|
3311
3288
|
id: K;
|
|
3312
3289
|
params: RouteParams<K>;
|
|
3313
3290
|
}; }[RouteId] | null>;
|
|
3314
|
-
type StripSearchOrHash<T extends string> = T extends `${infer
|
|
3315
|
-
?
|
|
3316
|
-
: T extends `${infer
|
|
3317
|
-
?
|
|
3291
|
+
type StripSearchOrHash<T extends string> = T extends `${infer U}?${string}`
|
|
3292
|
+
? U
|
|
3293
|
+
: T extends `${infer U}#${string}`
|
|
3294
|
+
? U
|
|
3318
3295
|
: T;
|
|
3319
3296
|
|
|
3320
|
-
type ResolveArgs<T
|
|
3321
|
-
T extends RouteId
|
|
3322
|
-
? RouteParams<
|
|
3297
|
+
type ResolveArgs<T> = T extends `/${string}`
|
|
3298
|
+
? StripSearchOrHash<T> extends infer U extends RouteId
|
|
3299
|
+
? RouteParams<U> extends Record<string, never>
|
|
3323
3300
|
? [route: T]
|
|
3324
|
-
: [route: T, params: RouteParams<
|
|
3325
|
-
:
|
|
3326
|
-
|
|
3327
|
-
? [route: T]
|
|
3328
|
-
: [route: T, params: RouteParams<U>]
|
|
3329
|
-
: [route: T];
|
|
3301
|
+
: [route: T, params: RouteParams<U>]
|
|
3302
|
+
: [never]
|
|
3303
|
+
: [pathname: T];
|
|
3330
3304
|
|
|
3331
3305
|
export {};
|
|
3332
3306
|
}
|
|
@@ -3590,6 +3564,19 @@ declare module '$app/server' {
|
|
|
3590
3564
|
export {};
|
|
3591
3565
|
}
|
|
3592
3566
|
|
|
3567
|
+
declare module '$app/service-worker' {
|
|
3568
|
+
/**
|
|
3569
|
+
* The execution context of a service worker. This export exists to make it easier to
|
|
3570
|
+
* use service workers with the correct types, provided the importing module is governed
|
|
3571
|
+
* by a `tsconfig.json` that extends [`$app/tsconfig/service-worker`](https://svelte.dev/docs/kit/$app-tsconfig-service-worker).
|
|
3572
|
+
*
|
|
3573
|
+
*/
|
|
3574
|
+
// @ts-ignore
|
|
3575
|
+
export const self: ServiceWorkerGlobalScope;
|
|
3576
|
+
|
|
3577
|
+
export {};
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3593
3580
|
declare module '$app/state' {
|
|
3594
3581
|
/**
|
|
3595
3582
|
* A read-only reactive object with information about the current page, serving several use cases:
|
|
@@ -3641,7 +3628,7 @@ declare module '$app/state' {
|
|
|
3641
3628
|
complete: null;
|
|
3642
3629
|
};
|
|
3643
3630
|
/**
|
|
3644
|
-
* A read-only reactive value that's initially `false`.
|
|
3631
|
+
* A read-only reactive value that's initially `false`. SvelteKit checks for new versions on data, remote, and form action responses (via the `x-sveltekit-version` header), when the tab regains focus or becomes visible, and on a poll interval (see [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version)). `updated.current` is set to `true` when a new version is detected. `updated.check()` will force an immediate check, regardless of polling.
|
|
3645
3632
|
* */
|
|
3646
3633
|
export const updated: {
|
|
3647
3634
|
get current(): boolean;
|
|
@@ -3710,32 +3697,30 @@ declare namespace App {
|
|
|
3710
3697
|
}
|
|
3711
3698
|
|
|
3712
3699
|
/**
|
|
3713
|
-
* This module is
|
|
3700
|
+
* This module is available to [service workers](https://svelte.dev/docs/kit/service-workers) and other contexts.
|
|
3701
|
+
* It exports information about the build output, static files, prerendered pages, and routes.
|
|
3714
3702
|
*/
|
|
3715
|
-
declare module '$
|
|
3703
|
+
declare module '$app/manifest' {
|
|
3716
3704
|
/**
|
|
3717
|
-
*
|
|
3718
|
-
*
|
|
3719
|
-
*/
|
|
3720
|
-
export const base: string;
|
|
3721
|
-
/**
|
|
3722
|
-
* An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`.
|
|
3705
|
+
* An array of `{ path: string }` objects representing the files generated by Vite.
|
|
3706
|
+
* 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).
|
|
3723
3707
|
* During development, this is an empty array.
|
|
3724
3708
|
*/
|
|
3725
|
-
export const
|
|
3709
|
+
export const immutable: Array<{ path: string }>;
|
|
3726
3710
|
/**
|
|
3727
|
-
* An array of
|
|
3711
|
+
* An array of `{ path: AssetPath }` objects representing the files in your `static` directory, or whatever directory is specified by `config.files.assets`.
|
|
3712
|
+
* 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).
|
|
3728
3713
|
*/
|
|
3729
|
-
export const
|
|
3714
|
+
export const assets: Array<{ path: import('$app/types').AssetPath }>;
|
|
3730
3715
|
/**
|
|
3731
|
-
* An array of
|
|
3716
|
+
* An array of `{ path: Path }` objects representing prerendered pages and endpoints, relative to the [base path](https://svelte.dev/docs/kit/configuration#paths).
|
|
3732
3717
|
* During development, this is an empty array.
|
|
3733
3718
|
*/
|
|
3734
|
-
export const prerendered:
|
|
3719
|
+
export const prerendered: Array<{ path: import('$app/types').Path }>;
|
|
3735
3720
|
/**
|
|
3736
|
-
*
|
|
3721
|
+
* An array of objects with an `id` property representing the routes in your app.
|
|
3737
3722
|
*/
|
|
3738
|
-
export const
|
|
3723
|
+
export const routes: Array<{ id: import('$app/types').RouteId }>;
|
|
3739
3724
|
}
|
|
3740
3725
|
|
|
3741
3726
|
/**
|
|
@@ -3752,9 +3737,9 @@ declare module '$app/types' {
|
|
|
3752
3737
|
RouteId(): string;
|
|
3753
3738
|
RouteParams(): Record<string, Record<string, string>>;
|
|
3754
3739
|
LayoutParams(): Record<string, Record<string, string>>;
|
|
3755
|
-
|
|
3740
|
+
Path(): string;
|
|
3756
3741
|
ResolvedPathname(): string;
|
|
3757
|
-
|
|
3742
|
+
AssetPath(): string;
|
|
3758
3743
|
}
|
|
3759
3744
|
|
|
3760
3745
|
/**
|
|
@@ -3782,27 +3767,24 @@ declare module '$app/types' {
|
|
|
3782
3767
|
: Record<string, never>;
|
|
3783
3768
|
|
|
3784
3769
|
/**
|
|
3785
|
-
* A union of all valid
|
|
3770
|
+
* A union of all valid paths in your app, relative to the `base` path.
|
|
3786
3771
|
*/
|
|
3787
|
-
export type
|
|
3772
|
+
export type Path = ReturnType<AppTypes['Path']>;
|
|
3788
3773
|
|
|
3789
3774
|
/**
|
|
3790
|
-
* `
|
|
3775
|
+
* `Path`, but possibly suffixed with a search string and/or hash.
|
|
3791
3776
|
*/
|
|
3792
|
-
export type PathnameWithSearchOrHash =
|
|
3793
|
-
| Pathname
|
|
3794
|
-
| `${Pathname}?${string}`
|
|
3795
|
-
| `${Pathname}#${string}`;
|
|
3777
|
+
export type PathnameWithSearchOrHash = Path | `${Path}?${string}` | `${Path}#${string}`;
|
|
3796
3778
|
|
|
3797
3779
|
/**
|
|
3798
|
-
* `
|
|
3780
|
+
* `Path`, but prefixed with a base path. Used for `page.url.pathname`.
|
|
3799
3781
|
*/
|
|
3800
3782
|
export type ResolvedPathname = ReturnType<AppTypes['ResolvedPathname']>;
|
|
3801
3783
|
|
|
3802
3784
|
/**
|
|
3803
|
-
* A union of all the filenames of assets contained in your `static` directory.
|
|
3785
|
+
* A union of all the filenames of assets contained in your `static` directory, relative to the `base` path.
|
|
3804
3786
|
*/
|
|
3805
|
-
export type
|
|
3787
|
+
export type AssetPath = ReturnType<AppTypes['AssetPath']>;
|
|
3806
3788
|
}
|
|
3807
3789
|
|
|
3808
3790
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
"RemoteLiveQueryUserFunctionReturnType",
|
|
181
181
|
"RemotePrerenderInputsGenerator",
|
|
182
182
|
"HasNonOptionalBoolean",
|
|
183
|
+
"self",
|
|
183
184
|
"page",
|
|
184
185
|
"navigating",
|
|
185
186
|
"updated"
|
|
@@ -201,6 +202,7 @@
|
|
|
201
202
|
"../src/runtime/app/paths/types.d.ts",
|
|
202
203
|
"../src/runtime/app/server/index.js",
|
|
203
204
|
"../src/exports/internal/server/event.js",
|
|
205
|
+
"../src/runtime/app/service-worker/index.js",
|
|
204
206
|
"../src/runtime/app/state/index.js"
|
|
205
207
|
],
|
|
206
208
|
"sourcesContent": [
|
|
@@ -220,8 +222,9 @@
|
|
|
220
222
|
null,
|
|
221
223
|
null,
|
|
222
224
|
null,
|
|
225
|
+
null,
|
|
223
226
|
null
|
|
224
227
|
],
|
|
225
|
-
"mappings": ";;;;;;;;;MAmCKA,IAAIA;;MAEJC,0BAA0BA;;;;;kBAKdC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA;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;;;;;;;;;cehRpBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCqCJC,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA",
|
|
226
229
|
"ignoreList": []
|
|
227
230
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { GENERATED_COMMENT } from '../../constants.js';
|
|
3
|
-
import { write_if_changed } from './utils.js';
|
|
4
|
-
|
|
5
|
-
// TODO get rid of this, it's useless
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Writes ambient declarations including types reference to @sveltejs/kit,
|
|
9
|
-
* and the existing environment variables in process.env to
|
|
10
|
-
* $env/static/private and $env/static/public
|
|
11
|
-
* @param {import('types').ValidatedKitConfig} config
|
|
12
|
-
*/
|
|
13
|
-
export function write_ambient(config) {
|
|
14
|
-
/** @type {string} */
|
|
15
|
-
const content = `${GENERATED_COMMENT}\n/// <reference types="@sveltejs/kit" />`;
|
|
16
|
-
|
|
17
|
-
write_if_changed(path.join(config.outDir, 'ambient.d.ts'), content);
|
|
18
|
-
}
|