@sveltejs/kit 3.0.0-next.13 → 3.0.0-next.16
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 +7 -4
- package/src/cli.js +8 -5
- package/src/core/adapt/builder.js +20 -10
- package/src/core/config/index.js +4 -5
- package/src/core/env.js +3 -3
- package/src/core/generate_manifest/index.js +6 -0
- package/src/core/postbuild/entities.js +8 -2
- package/src/core/postbuild/fallback.js +2 -1
- package/src/core/postbuild/prerender.js +18 -13
- package/src/core/sync/create_manifest_data/conflict.js +1 -1
- package/src/core/sync/create_manifest_data/index.js +33 -2
- package/src/core/sync/sync.js +3 -2
- package/src/core/sync/utils.js +2 -2
- package/src/core/sync/write_app_types.js +72 -27
- package/src/core/sync/write_tsconfig/index.js +73 -54
- package/src/core/sync/write_tsconfig/utils.js +0 -61
- package/src/core/sync/write_tsconfig/validate.js +128 -0
- package/src/core/sync/write_types/index.js +7 -4
- package/src/exports/node/index.js +2 -7
- package/src/exports/public.d.ts +25 -18
- package/src/exports/vite/build/build_server.js +2 -3
- package/src/exports/vite/dev/index.js +44 -36
- package/src/exports/vite/index.js +91 -16
- package/src/exports/vite/utils.js +62 -15
- package/src/runner.js +4 -2
- package/src/runtime/app/forms.js +4 -7
- package/src/runtime/app/internal/transport.js +53 -0
- package/src/runtime/app/paths/client.js +2 -2
- package/src/runtime/app/paths/internal/client.js +2 -2
- package/src/runtime/app/server/remote/prerender.js +6 -10
- package/src/runtime/app/server/remote/query.js +3 -9
- package/src/runtime/app/server/remote/requested.js +2 -2
- package/src/runtime/app/server/remote/shared.js +1 -16
- package/src/runtime/client/client.js +177 -63
- package/src/runtime/client/fetcher.js +2 -13
- package/src/runtime/client/parse.js +1 -1
- package/src/runtime/client/remote-functions/command.svelte.js +1 -2
- package/src/runtime/client/remote-functions/form.svelte.js +3 -7
- package/src/runtime/client/remote-functions/prerender.svelte.js +2 -2
- package/src/runtime/client/remote-functions/query/index.js +1 -1
- package/src/runtime/client/remote-functions/query/proxy.js +2 -2
- package/src/runtime/client/remote-functions/query-batch.svelte.js +1 -1
- package/src/runtime/client/remote-functions/query-live/proxy.js +2 -12
- package/src/runtime/client/remote-functions/shared.svelte.js +1 -1
- package/src/runtime/client/utils.js +1 -0
- package/src/runtime/form-utils.js +4 -6
- package/src/runtime/pathname.js +44 -1
- package/src/runtime/server/data/index.js +5 -8
- package/src/runtime/server/dev.js +22 -0
- package/src/runtime/server/endpoint.js +3 -4
- package/src/runtime/server/fetch.js +25 -30
- package/src/runtime/server/index.js +64 -46
- package/src/runtime/server/internal.js +12 -5
- package/src/runtime/server/page/actions.js +18 -43
- package/src/runtime/server/page/crypto.js +2 -2
- package/src/runtime/server/page/csp.js +2 -1
- package/src/runtime/server/page/data_serializer.js +12 -13
- package/src/runtime/server/page/index.js +16 -32
- package/src/runtime/server/page/load_data.js +28 -44
- package/src/runtime/server/page/render.js +28 -12
- package/src/runtime/server/page/respond_with_error.js +8 -20
- package/src/runtime/server/page/serialize_data.js +2 -13
- package/src/runtime/server/page/server_routing.js +58 -9
- package/src/runtime/server/remote-functions.js +11 -15
- package/src/runtime/server/respond.js +44 -56
- package/src/runtime/server/state.js +60 -0
- package/src/runtime/server/utils.js +0 -20
- package/src/runtime/shared.js +20 -40
- package/src/runtime/utils.js +3 -0
- package/src/types/ambient-private.d.ts +1 -1
- package/src/types/ambient.d.ts +58 -7
- package/src/types/global-private.d.ts +1 -1
- package/src/types/internal.d.ts +47 -53
- package/src/utils/filesystem.js +1 -23
- package/src/utils/hash.js +21 -0
- package/src/utils/http.js +8 -7
- package/src/utils/import.js +2 -1
- package/src/utils/params.js +1 -1
- package/src/utils/regex.js +9 -0
- package/src/utils/routing.js +52 -27
- package/src/utils/url.js +1 -0
- package/src/version.js +1 -1
- package/types/index.d.ts +98 -28
- package/types/index.d.ts.map +1 -1
- package/src/exports/node/polyfills.js +0 -30
- package/src/runtime/server/app.js +0 -9
package/types/index.d.ts
CHANGED
|
@@ -95,9 +95,15 @@ declare module '@sveltejs/kit' {
|
|
|
95
95
|
export interface Builder {
|
|
96
96
|
/** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */
|
|
97
97
|
log: Logger;
|
|
98
|
-
/**
|
|
98
|
+
/**
|
|
99
|
+
* Remove `dir` and all its contents.
|
|
100
|
+
* @deprecated Use `fs.rmSync(dir, { force: true, recursive: true })` instead
|
|
101
|
+
*/
|
|
99
102
|
rimraf: (dir: string) => void;
|
|
100
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Create `dir` and any required parent directories.
|
|
105
|
+
* @deprecated Use `fs.mkdirSync(dir, { recursive: true })` instead
|
|
106
|
+
*/
|
|
101
107
|
mkdirp: (dir: string) => void;
|
|
102
108
|
|
|
103
109
|
/** The fully resolved SvelteKit config. */
|
|
@@ -225,8 +231,9 @@ declare module '@sveltejs/kit' {
|
|
|
225
231
|
/**
|
|
226
232
|
* Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals.
|
|
227
233
|
* @param directory The directory containing the files to be compressed
|
|
234
|
+
* @returns an array of the files in `directory` that were compressed
|
|
228
235
|
*/
|
|
229
|
-
compress: (directory: string) => Promise<
|
|
236
|
+
compress: (directory: string) => Promise<string[]>;
|
|
230
237
|
}
|
|
231
238
|
|
|
232
239
|
/**
|
|
@@ -834,7 +841,7 @@ declare module '@sveltejs/kit' {
|
|
|
834
841
|
* A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one.
|
|
835
842
|
* This is useful for extending a shared `tsconfig.json` in a monorepo root, for example.
|
|
836
843
|
*
|
|
837
|
-
* Note that any paths configured here should be relative to the generated config file, which is written to `node_modules/$app/tsconfig
|
|
844
|
+
* Note that any paths configured here should be relative to the generated config file, which is written to `node_modules/$app/tsconfig.json`.
|
|
838
845
|
*
|
|
839
846
|
* @default (config) => config
|
|
840
847
|
* @since 1.3.0
|
|
@@ -1583,7 +1590,7 @@ declare module '@sveltejs/kit' {
|
|
|
1583
1590
|
/**
|
|
1584
1591
|
* Get or set cookies related to the current request
|
|
1585
1592
|
*/
|
|
1586
|
-
cookies: Cookies;
|
|
1593
|
+
readonly cookies: Cookies;
|
|
1587
1594
|
/**
|
|
1588
1595
|
* `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features:
|
|
1589
1596
|
*
|
|
@@ -1595,15 +1602,15 @@ declare module '@sveltejs/kit' {
|
|
|
1595
1602
|
*
|
|
1596
1603
|
* You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies).
|
|
1597
1604
|
*/
|
|
1598
|
-
fetch: typeof fetch;
|
|
1605
|
+
readonly fetch: typeof fetch;
|
|
1599
1606
|
/**
|
|
1600
1607
|
* The client's IP address, set by the adapter.
|
|
1601
1608
|
*/
|
|
1602
|
-
getClientAddress: () => string;
|
|
1609
|
+
readonly getClientAddress: () => string;
|
|
1603
1610
|
/**
|
|
1604
1611
|
* Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#handle).
|
|
1605
1612
|
*/
|
|
1606
|
-
locals: App.Locals;
|
|
1613
|
+
readonly locals: App.Locals;
|
|
1607
1614
|
/**
|
|
1608
1615
|
* The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object.
|
|
1609
1616
|
*
|
|
@@ -1612,19 +1619,19 @@ declare module '@sveltejs/kit' {
|
|
|
1612
1619
|
* the remote function was called from, _not_ the URL of the endpoint SvelteKit creates for the remote function. Never use it
|
|
1613
1620
|
* 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.
|
|
1614
1621
|
*/
|
|
1615
|
-
params: Params;
|
|
1622
|
+
readonly params: Params;
|
|
1616
1623
|
/**
|
|
1617
1624
|
* Additional data made available through the adapter.
|
|
1618
1625
|
*/
|
|
1619
|
-
platform: Readonly<App.Platform> | undefined;
|
|
1626
|
+
readonly platform: Readonly<App.Platform> | undefined;
|
|
1620
1627
|
/**
|
|
1621
1628
|
* The original request object.
|
|
1622
1629
|
*/
|
|
1623
|
-
request: Request;
|
|
1630
|
+
readonly request: Request;
|
|
1624
1631
|
/**
|
|
1625
1632
|
* Info about the current route.
|
|
1626
1633
|
*/
|
|
1627
|
-
route: {
|
|
1634
|
+
readonly route: {
|
|
1628
1635
|
/**
|
|
1629
1636
|
* 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.
|
|
1630
1637
|
*
|
|
@@ -1657,7 +1664,7 @@ declare module '@sveltejs/kit' {
|
|
|
1657
1664
|
*
|
|
1658
1665
|
* You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead.
|
|
1659
1666
|
*/
|
|
1660
|
-
setHeaders: (headers: Record<string, string>) => void;
|
|
1667
|
+
readonly setHeaders: (headers: Record<string, string>) => void;
|
|
1661
1668
|
/**
|
|
1662
1669
|
* The requested URL.
|
|
1663
1670
|
*
|
|
@@ -1666,22 +1673,22 @@ declare module '@sveltejs/kit' {
|
|
|
1666
1673
|
* the remote function was called from, _not_ the URL of the endpoint SvelteKit creates for the remote function. Never use it
|
|
1667
1674
|
* 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.
|
|
1668
1675
|
*/
|
|
1669
|
-
url: URL;
|
|
1676
|
+
readonly url: URL;
|
|
1670
1677
|
/**
|
|
1671
1678
|
* `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information
|
|
1672
1679
|
* related to the data request in this case. Use this property instead if the distinction is important to you.
|
|
1673
1680
|
*/
|
|
1674
|
-
isDataRequest: boolean;
|
|
1681
|
+
readonly isDataRequest: boolean;
|
|
1675
1682
|
/**
|
|
1676
1683
|
* `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.
|
|
1677
1684
|
*/
|
|
1678
|
-
isSubRequest: boolean;
|
|
1685
|
+
readonly isSubRequest: boolean;
|
|
1679
1686
|
|
|
1680
1687
|
/**
|
|
1681
1688
|
* Access to spans for tracing. If tracing is not enabled, these spans will do nothing.
|
|
1682
1689
|
* @since 2.31.0
|
|
1683
1690
|
*/
|
|
1684
|
-
tracing: {
|
|
1691
|
+
readonly tracing: {
|
|
1685
1692
|
/** Whether tracing is enabled. */
|
|
1686
1693
|
enabled: boolean;
|
|
1687
1694
|
/** The root span for the request. This span is named `sveltekit.handle.root`. */
|
|
@@ -1694,7 +1701,7 @@ declare module '@sveltejs/kit' {
|
|
|
1694
1701
|
* `true` if the request comes from the client via a remote function. The `url` property will be stripped of the internal information
|
|
1695
1702
|
* related to the data request in this case. Use this property instead if the distinction is important to you.
|
|
1696
1703
|
*/
|
|
1697
|
-
isRemoteRequest: boolean;
|
|
1704
|
+
readonly isRemoteRequest: boolean;
|
|
1698
1705
|
}
|
|
1699
1706
|
|
|
1700
1707
|
/**
|
|
@@ -3132,6 +3139,7 @@ declare module '$app/forms' {
|
|
|
3132
3139
|
}
|
|
3133
3140
|
|
|
3134
3141
|
declare module '$app/navigation' {
|
|
3142
|
+
import type { RouteId } from '$app/types';
|
|
3135
3143
|
/**
|
|
3136
3144
|
* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL.
|
|
3137
3145
|
*
|
|
@@ -3237,13 +3245,24 @@ declare module '$app/navigation' {
|
|
|
3237
3245
|
* Programmatically imports the code for routes that haven't yet been fetched.
|
|
3238
3246
|
* Typically, you might call this to speed up subsequent navigation.
|
|
3239
3247
|
*
|
|
3240
|
-
*
|
|
3248
|
+
* Takes a route ID such as `/about` or `/blog/[slug]`. Unlike pathnames, route IDs
|
|
3249
|
+
* are never prefixed with the app's [base path](https://svelte.dev/docs/kit/configuration#paths).
|
|
3250
|
+
* If you have a pathname rather than a route ID, you can convert it with
|
|
3251
|
+
* [`match`](https://svelte.dev/docs/kit/$app-paths#match) from `$app/paths`:
|
|
3252
|
+
*
|
|
3253
|
+
* ```js
|
|
3254
|
+
* import { match } from '$app/paths';
|
|
3255
|
+
* import { preloadCode } from '$app/navigation';
|
|
3256
|
+
*
|
|
3257
|
+
* const matched = await match('/blog/hello-world');
|
|
3258
|
+
* if (matched) await preloadCode(matched.id);
|
|
3259
|
+
* ```
|
|
3241
3260
|
*
|
|
3242
3261
|
* Unlike `preloadData`, this won't call `load` functions.
|
|
3243
3262
|
* Returns a Promise that resolves when the modules have been imported.
|
|
3244
3263
|
*
|
|
3245
3264
|
* */
|
|
3246
|
-
export function preloadCode(
|
|
3265
|
+
export function preloadCode(id: RouteId): Promise<void>;
|
|
3247
3266
|
/**
|
|
3248
3267
|
* Programmatically create a new history entry with the given `page.state`. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing).
|
|
3249
3268
|
*
|
|
@@ -3262,7 +3281,7 @@ declare module '$app/navigation' {
|
|
|
3262
3281
|
}
|
|
3263
3282
|
|
|
3264
3283
|
declare module '$app/paths' {
|
|
3265
|
-
import type { AssetPath, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname,
|
|
3284
|
+
import type { AssetPath, RouteIdWithSearchOrHash, PathnameWithSearchOrHash, ResolvedPathname, RouteId, RouteParams } from '$app/types';
|
|
3266
3285
|
/**
|
|
3267
3286
|
* 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.
|
|
3268
3287
|
*
|
|
@@ -3319,7 +3338,7 @@ declare module '$app/paths' {
|
|
|
3319
3338
|
* @since 2.52.0
|
|
3320
3339
|
*
|
|
3321
3340
|
* */
|
|
3322
|
-
export function match(url:
|
|
3341
|
+
export function match(url: URL | string): Promise<{ [K in RouteId]: {
|
|
3323
3342
|
id: K;
|
|
3324
3343
|
params: RouteParams<K>;
|
|
3325
3344
|
}; }[RouteId] | null>;
|
|
@@ -3753,9 +3772,41 @@ declare module '$app/manifest' {
|
|
|
3753
3772
|
*/
|
|
3754
3773
|
export const prerendered: Array<{ path: import('$app/types').Path }>;
|
|
3755
3774
|
/**
|
|
3756
|
-
*
|
|
3775
|
+
* A route in your app, along with its capabilities. `page` indicates the presence of a `+page`,
|
|
3776
|
+
* while `endpoint` indicates the presence of a `+server`. Both are `true` when both files exist.
|
|
3777
|
+
*/
|
|
3778
|
+
export type ManifestRoute =
|
|
3779
|
+
| {
|
|
3780
|
+
id: Exclude<import('$app/types').PageRouteId, import('$app/types').EndpointRouteId>;
|
|
3781
|
+
page: true;
|
|
3782
|
+
endpoint: false;
|
|
3783
|
+
}
|
|
3784
|
+
| {
|
|
3785
|
+
id: Exclude<import('$app/types').EndpointRouteId, import('$app/types').PageRouteId>;
|
|
3786
|
+
page: false;
|
|
3787
|
+
endpoint: true;
|
|
3788
|
+
}
|
|
3789
|
+
| {
|
|
3790
|
+
id: Extract<import('$app/types').PageRouteId, import('$app/types').EndpointRouteId>;
|
|
3791
|
+
page: true;
|
|
3792
|
+
endpoint: true;
|
|
3793
|
+
};
|
|
3794
|
+
/**
|
|
3795
|
+
* An array of objects representing the routes in your app. Only routes that the router can match
|
|
3796
|
+
* are included — directories that merely hold a `+layout` are not routes of their own.
|
|
3797
|
+
*
|
|
3798
|
+
* Each object has an `id`, plus `page` and `endpoint` booleans describing whether the route has a
|
|
3799
|
+
* `+page` and/or a `+server`. Both are `true` for a route that has both, so the capabilities can
|
|
3800
|
+
* be filtered independently:
|
|
3801
|
+
*
|
|
3802
|
+
* ```js
|
|
3803
|
+
* import { routes } from '$app/manifest';
|
|
3804
|
+
*
|
|
3805
|
+
* const pages = routes.filter((route) => route.page);
|
|
3806
|
+
* const endpoints = routes.filter((route) => route.endpoint);
|
|
3807
|
+
* ```
|
|
3757
3808
|
*/
|
|
3758
|
-
export const routes:
|
|
3809
|
+
export const routes: ManifestRoute[];
|
|
3759
3810
|
}
|
|
3760
3811
|
|
|
3761
3812
|
/**
|
|
@@ -3769,6 +3820,8 @@ declare module '$app/types' {
|
|
|
3769
3820
|
// These are all functions so that we can leverage function overloads to get the correct type.
|
|
3770
3821
|
// Using the return types directly would error with a "not the same type" error.
|
|
3771
3822
|
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces
|
|
3823
|
+
PageRouteId(): string;
|
|
3824
|
+
EndpointRouteId(): string;
|
|
3772
3825
|
RouteId(): string;
|
|
3773
3826
|
RouteParams(): Record<string, Record<string, string>>;
|
|
3774
3827
|
LayoutParams(): Record<string, Record<string, string>>;
|
|
@@ -3778,7 +3831,21 @@ declare module '$app/types' {
|
|
|
3778
3831
|
}
|
|
3779
3832
|
|
|
3780
3833
|
/**
|
|
3781
|
-
* A union of
|
|
3834
|
+
* A union of the route IDs in your app that have a `+page`.
|
|
3835
|
+
*
|
|
3836
|
+
* A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`.
|
|
3837
|
+
*/
|
|
3838
|
+
export type PageRouteId = ReturnType<AppTypes['PageRouteId']>;
|
|
3839
|
+
|
|
3840
|
+
/**
|
|
3841
|
+
* A union of the route IDs in your app that have a `+server`.
|
|
3842
|
+
*
|
|
3843
|
+
* A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`.
|
|
3844
|
+
*/
|
|
3845
|
+
export type EndpointRouteId = ReturnType<AppTypes['EndpointRouteId']>;
|
|
3846
|
+
|
|
3847
|
+
/**
|
|
3848
|
+
* 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`.
|
|
3782
3849
|
*/
|
|
3783
3850
|
export type RouteId = ReturnType<AppTypes['RouteId']>;
|
|
3784
3851
|
|
|
@@ -3794,12 +3861,15 @@ declare module '$app/types' {
|
|
|
3794
3861
|
? ReturnType<AppTypes['RouteParams']>[T]
|
|
3795
3862
|
: Record<string, never>;
|
|
3796
3863
|
|
|
3864
|
+
/**
|
|
3865
|
+
* 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.
|
|
3866
|
+
*/
|
|
3867
|
+
type LayoutParamsId = keyof ReturnType<AppTypes['LayoutParams']>;
|
|
3868
|
+
|
|
3797
3869
|
/**
|
|
3798
3870
|
* 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.
|
|
3799
3871
|
*/
|
|
3800
|
-
export type LayoutParams<T extends
|
|
3801
|
-
? ReturnType<AppTypes['LayoutParams']>[T]
|
|
3802
|
-
: Record<string, never>;
|
|
3872
|
+
export type LayoutParams<T extends LayoutParamsId> = ReturnType<AppTypes['LayoutParams']>[T];
|
|
3803
3873
|
|
|
3804
3874
|
/**
|
|
3805
3875
|
* A union of all valid paths in your app, relative to the `base` path.
|
package/types/index.d.ts.map
CHANGED
|
@@ -226,6 +226,6 @@
|
|
|
226
226
|
null,
|
|
227
227
|
null
|
|
228
228
|
],
|
|
229
|
-
"mappings": ";;;;;;;;;MAmCKA,IAAIA;;MAEJC,0BAA0BA;;;;;kBAKdC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;MAQrBC,aAAaA;;;;;OAKJC,YAAYA;;kBAETC,aAAaA;;;;;;MAMzBC,qBAAqBA;;;;;;;;;;;kBAWTC,OAAOA
|
|
229
|
+
"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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;iBWvJRuD,KAAKA;;;;;;;;;;;;;;;;;;;;;iBAsCLC,OAAOA;;;;;;;;;;;;;;;;;;;iBAmCPC,KAAKA;;;;MC/FhBC,iBAAiBA;;;;;;MAMVC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;;;iBCUPC,IAAIA;;;;;;;;iBCSJC,eAAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Mb8TnBC,qCAAqCA;;;;;;;;MAqKrCC,8BAA8BA;MD/U9B/D,YAAYA;;MAkGZgB,KAAKA;;MAELgD,qBAAqBA;;;;;;;;;;;;;;;;;;;;;cevQpBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCqCJC,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA",
|
|
230
230
|
"ignoreList": []
|
|
231
231
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import buffer from 'node:buffer';
|
|
2
|
-
import { webcrypto as crypto } from 'node:crypto';
|
|
3
|
-
|
|
4
|
-
// `buffer.File` was added in Node 18.13.0 while the `File` global was added in Node 20.0.0
|
|
5
|
-
const File = /** @type {import('node:buffer') & { File?: File}} */ (buffer).File;
|
|
6
|
-
|
|
7
|
-
/** @type {Record<string, any>} */
|
|
8
|
-
const globals = {
|
|
9
|
-
crypto,
|
|
10
|
-
File
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
// exported for dev/preview and node environments
|
|
14
|
-
/**
|
|
15
|
-
* Make various web APIs available as globals:
|
|
16
|
-
* - `crypto`
|
|
17
|
-
* - `File`
|
|
18
|
-
*/
|
|
19
|
-
export function installPolyfills() {
|
|
20
|
-
for (const name in globals) {
|
|
21
|
-
if (name in globalThis) continue;
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(globalThis, name, {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
configurable: true,
|
|
26
|
-
writable: true,
|
|
27
|
-
value: globals[name]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|