@sveltejs/kit 2.15.2 → 2.16.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/types/index.d.ts CHANGED
@@ -16,7 +16,7 @@ declare module '@sveltejs/kit' {
16
16
  * This function is called after SvelteKit has built your app.
17
17
  * @param builder An object provided by SvelteKit that contains methods for adapting the app
18
18
  */
19
- adapt(builder: Builder): MaybePromise<void>;
19
+ adapt: (builder: Builder) => MaybePromise<void>;
20
20
  /**
21
21
  * Checks called during dev and build to determine whether specific features will work in production with this adapter
22
22
  */
@@ -31,7 +31,7 @@ declare module '@sveltejs/kit' {
31
31
  * Creates an `Emulator`, which allows the adapter to influence the environment
32
32
  * during dev, build and prerendering
33
33
  */
34
- emulate?(): MaybePromise<Emulator>;
34
+ emulate?: () => MaybePromise<Emulator>;
35
35
  }
36
36
 
37
37
  export type LoadProperties<input extends Record<string, any> | void> = input extends void
@@ -76,9 +76,9 @@ declare module '@sveltejs/kit' {
76
76
  /** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */
77
77
  log: Logger;
78
78
  /** Remove `dir` and all its contents. */
79
- rimraf(dir: string): void;
79
+ rimraf: (dir: string) => void;
80
80
  /** Create `dir` and any required parent directories. */
81
- mkdirp(dir: string): void;
81
+ mkdirp: (dir: string) => void;
82
82
 
83
83
  /** The fully resolved `svelte.config.js`. */
84
84
  config: ValidatedConfig;
@@ -93,59 +93,59 @@ declare module '@sveltejs/kit' {
93
93
  * @param fn A function that groups a set of routes into an entry point
94
94
  * @deprecated Use `builder.routes` instead
95
95
  */
96
- createEntries(fn: (route: RouteDefinition) => AdapterEntry): Promise<void>;
96
+ createEntries: (fn: (route: RouteDefinition) => AdapterEntry) => Promise<void>;
97
97
 
98
98
  /**
99
99
  * Find all the assets imported by server files belonging to `routes`
100
100
  */
101
- findServerAssets(routes: RouteDefinition[]): string[];
101
+ findServerAssets: (routes: RouteDefinition[]) => string[];
102
102
 
103
103
  /**
104
104
  * Generate a fallback page for a static webserver to use when no route is matched. Useful for single-page apps.
105
105
  */
106
- generateFallback(dest: string): Promise<void>;
106
+ generateFallback: (dest: string) => Promise<void>;
107
107
 
108
108
  /**
109
109
  * Generate a module exposing build-time environment variables as `$env/dynamic/public`.
110
110
  */
111
- generateEnvModule(): void;
111
+ generateEnvModule: () => void;
112
112
 
113
113
  /**
114
114
  * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with.
115
115
  * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated
116
116
  */
117
- generateManifest(opts: { relativePath: string; routes?: RouteDefinition[] }): string;
117
+ generateManifest: (opts: { relativePath: string; routes?: RouteDefinition[] }) => string;
118
118
 
119
119
  /**
120
120
  * Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`.
121
121
  * @param name path to the file, relative to the build directory
122
122
  */
123
- getBuildDirectory(name: string): string;
123
+ getBuildDirectory: (name: string) => string;
124
124
  /** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */
125
- getClientDirectory(): string;
125
+ getClientDirectory: () => string;
126
126
  /** Get the fully resolved path to the directory containing server-side code. */
127
- getServerDirectory(): string;
127
+ getServerDirectory: () => string;
128
128
  /** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */
129
- getAppPath(): string;
129
+ getAppPath: () => string;
130
130
 
131
131
  /**
132
132
  * Write client assets to `dest`.
133
133
  * @param dest the destination folder
134
134
  * @returns an array of files written to `dest`
135
135
  */
136
- writeClient(dest: string): string[];
136
+ writeClient: (dest: string) => string[];
137
137
  /**
138
138
  * Write prerendered files to `dest`.
139
139
  * @param dest the destination folder
140
140
  * @returns an array of files written to `dest`
141
141
  */
142
- writePrerendered(dest: string): string[];
142
+ writePrerendered: (dest: string) => string[];
143
143
  /**
144
144
  * Write server-side code to `dest`.
145
145
  * @param dest the destination folder
146
146
  * @returns an array of files written to `dest`
147
147
  */
148
- writeServer(dest: string): string[];
148
+ writeServer: (dest: string) => string[];
149
149
  /**
150
150
  * Copy a file or directory.
151
151
  * @param from the source file or directory
@@ -154,20 +154,20 @@ declare module '@sveltejs/kit' {
154
154
  * @param opts.replace a map of strings to replace
155
155
  * @returns an array of files that were copied
156
156
  */
157
- copy(
157
+ copy: (
158
158
  from: string,
159
159
  to: string,
160
160
  opts?: {
161
161
  filter?(basename: string): boolean;
162
162
  replace?: Record<string, string>;
163
163
  }
164
- ): string[];
164
+ ) => string[];
165
165
 
166
166
  /**
167
167
  * Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals.
168
168
  * @param directory The directory containing the files to be compressed
169
169
  */
170
- compress(directory: string): Promise<void>;
170
+ compress: (directory: string) => Promise<void>;
171
171
  }
172
172
 
173
173
  export interface Config {
@@ -197,13 +197,13 @@ declare module '@sveltejs/kit' {
197
197
  * @param name the name of the cookie
198
198
  * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options)
199
199
  */
200
- get(name: string, opts?: import('cookie').CookieParseOptions): string | undefined;
200
+ get: (name: string, opts?: import('cookie').CookieParseOptions) => string | undefined;
201
201
 
202
202
  /**
203
203
  * Gets all cookies that were previously set with `cookies.set`, or from the request headers.
204
204
  * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options)
205
205
  */
206
- getAll(opts?: import('cookie').CookieParseOptions): Array<{ name: string; value: string }>;
206
+ getAll: (opts?: import('cookie').CookieParseOptions) => Array<{ name: string; value: string }>;
207
207
 
208
208
  /**
209
209
  * 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.
@@ -215,11 +215,11 @@ declare module '@sveltejs/kit' {
215
215
  * @param value the cookie value
216
216
  * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
217
217
  */
218
- set(
218
+ set: (
219
219
  name: string,
220
220
  value: string,
221
221
  opts: import('cookie').CookieSerializeOptions & { path: string }
222
- ): void;
222
+ ) => void;
223
223
 
224
224
  /**
225
225
  * Deletes a cookie by setting its value to an empty string and setting the expiry date in the past.
@@ -228,7 +228,7 @@ declare module '@sveltejs/kit' {
228
228
  * @param name the name of the cookie
229
229
  * @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
230
230
  */
231
- delete(name: string, opts: import('cookie').CookieSerializeOptions & { path: string }): void;
231
+ delete: (name: string, opts: import('cookie').CookieSerializeOptions & { path: string }) => void;
232
232
 
233
233
  /**
234
234
  * Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response.
@@ -241,11 +241,11 @@ declare module '@sveltejs/kit' {
241
241
  * @param value the cookie value
242
242
  * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options)
243
243
  */
244
- serialize(
244
+ serialize: (
245
245
  name: string,
246
246
  value: string,
247
247
  opts: import('cookie').CookieSerializeOptions & { path: string }
248
- ): string;
248
+ ) => string;
249
249
  }
250
250
 
251
251
  /**
@@ -481,11 +481,41 @@ declare module '@sveltejs/kit' {
481
481
  */
482
482
  preloadStrategy?: 'modulepreload' | 'preload-js' | 'preload-mjs';
483
483
  /**
484
+ * The bundle strategy option affects how your app's JavaScript and CSS files are loaded.
484
485
  * - If `'split'`, splits the app up into multiple .js/.css files so that they are loaded lazily as the user navigates around the app. This is the default, and is recommended for most scenarios.
485
486
  * - If `'single'`, creates just one .js bundle and one .css file containing code for the entire app.
486
487
  * - If `'inline'`, inlines all JavaScript and CSS of the entire app into the HTML. The result is usable without a server (i.e. you can just open the file in your browser).
487
488
  *
488
- * When using `'split'`, you can also adjust the bundling behaviour by setting [`output.experimentalMinChunkSize`](https://rollupjs.org/configuration-options/#output-experimentalminchunksize) and [`output.manualChunks`](https://rollupjs.org/configuration-options/#output-manualchunks)inside your Vite config's [`build.rollupOptions`](https://vite.dev/config/build-options.html#build-rollupoptions).
489
+ * When using `'split'`, you can also adjust the bundling behaviour by setting [`output.experimentalMinChunkSize`](https://rollupjs.org/configuration-options/#output-experimentalminchunksize) and [`output.manualChunks`](https://rollupjs.org/configuration-options/#output-manualchunks) inside your Vite config's [`build.rollupOptions`](https://vite.dev/config/build-options.html#build-rollupoptions).
490
+ *
491
+ * If you want to inline your assets, you'll need to set Vite's [`build.assetsInlineLimit`](https://vite.dev/config/build-options.html#build-assetsinlinelimit) option to an appropriate size then import your assets through Vite.
492
+ *
493
+ * ```js
494
+ * /// file: vite.config.js
495
+ * import { sveltekit } from '@sveltejs/kit/vite';
496
+ * import { defineConfig } from 'vite';
497
+ *
498
+ * export default defineConfig({
499
+ * plugins: [sveltekit()],
500
+ * build: {
501
+ * // inline all imported assets
502
+ * assetsInlineLimit: Infinity
503
+ * }
504
+ * });
505
+ * ```
506
+ *
507
+ * ```svelte
508
+ * /// file: src/routes/+layout.svelte
509
+ * <script>
510
+ * // import the asset through Vite
511
+ * import favicon from './favicon.png';
512
+ * </script>
513
+ *
514
+ * <svelte:head>
515
+ * <!-- this asset will be inlined as a base64 URL -->
516
+ * <link rel="icon" href={favicon} />
517
+ * </svelte:head>
518
+ * ```
489
519
  * @default 'split'
490
520
  * @since 2.13.0
491
521
  */
@@ -605,7 +635,7 @@ declare module '@sveltejs/kit' {
605
635
  * What type of client-side router to use.
606
636
  * - `'pathname'` is the default and means the current URL pathname determines the route
607
637
  * - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed.
608
- * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with /#/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app.
638
+ * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with #/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app.
609
639
  *
610
640
  * @default "pathname"
611
641
  * @since 2.14.0
@@ -690,7 +720,7 @@ declare module '@sveltejs/kit' {
690
720
  */
691
721
  export type Handle = (input: {
692
722
  event: RequestEvent;
693
- resolve(event: RequestEvent, opts?: ResolveOptions): MaybePromise<Response>;
723
+ resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise<Response>;
694
724
  }) => MaybePromise<Response>;
695
725
 
696
726
  /**
@@ -845,14 +875,14 @@ declare module '@sveltejs/kit' {
845
875
  *
846
876
  * `setHeaders` has no effect when a `load` function runs in the browser.
847
877
  */
848
- setHeaders(headers: Record<string, string>): void;
878
+ setHeaders: (headers: Record<string, string>) => void;
849
879
  /**
850
880
  * `await parent()` returns data from parent `+layout.js` `load` functions.
851
881
  * Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files.
852
882
  *
853
883
  * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data.
854
884
  */
855
- parent(): Promise<ParentData>;
885
+ parent: () => Promise<ParentData>;
856
886
  /**
857
887
  * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
858
888
  *
@@ -890,7 +920,7 @@ declare module '@sveltejs/kit' {
890
920
  * <button on:click={increase}>Increase Count</button>
891
921
  * ```
892
922
  */
893
- depends(...deps: Array<`${string}:${string}`>): void;
923
+ depends: (...deps: Array<`${string}:${string}`>) => void;
894
924
  /**
895
925
  * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
896
926
  *
@@ -904,7 +934,7 @@ declare module '@sveltejs/kit' {
904
934
  * }
905
935
  * ```
906
936
  */
907
- untrack<T>(fn: () => T): T;
937
+ untrack: <T>(fn: () => T) => T;
908
938
  }
909
939
 
910
940
  export interface NavigationEvent<
@@ -999,7 +1029,7 @@ declare module '@sveltejs/kit' {
999
1029
  /**
1000
1030
  * Call this to prevent the navigation from starting.
1001
1031
  */
1002
- cancel(): void;
1032
+ cancel: () => void;
1003
1033
  }
1004
1034
 
1005
1035
  /**
@@ -1113,7 +1143,7 @@ declare module '@sveltejs/kit' {
1113
1143
  /**
1114
1144
  * The client's IP address, set by the adapter.
1115
1145
  */
1116
- getClientAddress(): string;
1146
+ getClientAddress: () => string;
1117
1147
  /**
1118
1148
  * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle).
1119
1149
  */
@@ -1161,7 +1191,7 @@ declare module '@sveltejs/kit' {
1161
1191
  *
1162
1192
  * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead.
1163
1193
  */
1164
- setHeaders(headers: Record<string, string>): void;
1194
+ setHeaders: (headers: Record<string, string>) => void;
1165
1195
  /**
1166
1196
  * The requested URL.
1167
1197
  */
@@ -1194,20 +1224,20 @@ declare module '@sveltejs/kit' {
1194
1224
  * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components.
1195
1225
  * @param input the html chunk and the info if this is the last chunk
1196
1226
  */
1197
- transformPageChunk?(input: { html: string; done: boolean }): MaybePromise<string | undefined>;
1227
+ transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise<string | undefined>;
1198
1228
  /**
1199
1229
  * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`.
1200
1230
  * By default, none will be included.
1201
1231
  * @param name header name
1202
1232
  * @param value header value
1203
1233
  */
1204
- filterSerializedResponseHeaders?(name: string, value: string): boolean;
1234
+ filterSerializedResponseHeaders?: (name: string, value: string) => boolean;
1205
1235
  /**
1206
1236
  * Determines what should be added to the `<head>` tag to preload it.
1207
1237
  * By default, `js` and `css` files will be preloaded.
1208
1238
  * @param input the type of the file and its path
1209
1239
  */
1210
- preload?(input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }): boolean;
1240
+ preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean;
1211
1241
  }
1212
1242
 
1213
1243
  export interface RouteDefinition<Config = any> {
@@ -1249,7 +1279,7 @@ declare module '@sveltejs/kit' {
1249
1279
  client: NonNullable<BuildData['client']>;
1250
1280
  nodes: SSRNodeLoader[];
1251
1281
  routes: SSRRoute[];
1252
- matchers(): Promise<Record<string, ParamMatcher>>;
1282
+ matchers: () => Promise<Record<string, ParamMatcher>>;
1253
1283
  /** A `[file]: size` map of all assets imported by server code */
1254
1284
  server_assets: Record<string, number>;
1255
1285
  };
@@ -1276,7 +1306,7 @@ declare module '@sveltejs/kit' {
1276
1306
  *
1277
1307
  * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data.
1278
1308
  */
1279
- parent(): Promise<ParentData>;
1309
+ parent: () => Promise<ParentData>;
1280
1310
  /**
1281
1311
  * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun.
1282
1312
  *
@@ -1314,7 +1344,7 @@ declare module '@sveltejs/kit' {
1314
1344
  * <button on:click={increase}>Increase Count</button>
1315
1345
  * ```
1316
1346
  */
1317
- depends(...deps: string[]): void;
1347
+ depends: (...deps: string[]) => void;
1318
1348
  /**
1319
1349
  * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
1320
1350
  *
@@ -1328,7 +1358,7 @@ declare module '@sveltejs/kit' {
1328
1358
  * }
1329
1359
  * ```
1330
1360
  */
1331
- untrack<T>(fn: () => T): T;
1361
+ untrack: <T>(fn: () => T) => T;
1332
1362
  }
1333
1363
 
1334
1364
  /**
@@ -1399,7 +1429,7 @@ declare module '@sveltejs/kit' {
1399
1429
  formElement: HTMLFormElement;
1400
1430
  controller: AbortController;
1401
1431
  submitter: HTMLElement | null;
1402
- cancel(): void;
1432
+ cancel: () => void;
1403
1433
  }) => MaybePromise<
1404
1434
  | void
1405
1435
  | ((opts: {
@@ -1412,7 +1442,7 @@ declare module '@sveltejs/kit' {
1412
1442
  * @param options Set `reset: false` if you don't want the `<form>` values to be reset after a successful submission.
1413
1443
  * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission.
1414
1444
  */
1415
- update(options?: { reset?: boolean; invalidateAll?: boolean }): Promise<void>;
1445
+ update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise<void>;
1416
1446
  }) => void)
1417
1447
  >;
1418
1448
 
@@ -1871,6 +1901,14 @@ declare module '@sveltejs/kit' {
1871
1901
  /**
1872
1902
  * Redirect a request. When called during request handling, SvelteKit will return a redirect response.
1873
1903
  * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.
1904
+ *
1905
+ * Most common status codes:
1906
+ * * `303 See Other`: redirect as a GET request (often used after a form POST request)
1907
+ * * `307 Temporary Redirect`: redirect will keep the request method
1908
+ * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page
1909
+ *
1910
+ * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages)
1911
+ *
1874
1912
  * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308.
1875
1913
  * @param location The location to redirect to.
1876
1914
  * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.
@@ -2106,6 +2144,9 @@ declare module '$app/forms' {
2106
2144
  * - redirects to the nearest error page in case of an unexpected error
2107
2145
  *
2108
2146
  * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback.
2147
+ * It accepts an options object
2148
+ * - `reset: false` if you don't want the `<form>` values to be reset after a successful submission
2149
+ * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission
2109
2150
  * @param form_element The form element
2110
2151
  * @param submit Submit callback
2111
2152
  */
@@ -2169,6 +2210,7 @@ declare module '$app/navigation' {
2169
2210
  noScroll?: boolean | undefined;
2170
2211
  keepFocus?: boolean | undefined;
2171
2212
  invalidateAll?: boolean | undefined;
2213
+ invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;
2172
2214
  state?: App.PageState | undefined;
2173
2215
  } | undefined): Promise<void>;
2174
2216
  /**
@@ -159,6 +159,6 @@
159
159
  null,
160
160
  null
161
161
  ],
162
- "mappings": ";;;;;;;;;kBA2BiBA,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;aA2BZC,cAAcA;;;;;;aAMdC,cAAcA;;;;;;;;;;;;;;;kBAeTC,aAAaA;;;;;;;;;;;;;;;;;kBAiBbC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkGPC,MAAMA;;;;;;;;;;;;;;;;;;;;;kBAqBNC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4DPC,QAAQA;;;;;;;;kBAQRC,SAASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6adC,MAAMA;;;;;;;;;;;aAWNC,iBAAi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;;;;;;;;;;;;;;;;;;;;;;;;;iBCoEJC,QAAQA;;;;;;iBCoCFC,UAAUA;;;;;;iBAkCVC,WAAWA;;;;;iBAgFjBC,oBAAoBA;;;;;;;;;;;iBC3MpBC,gBAAgBA;;;;;;;;;iBC+GVC,SAASA;;;;;;;;;cC9HlBC,OAAOA;;;;;cAKPC,GAAGA;;;;;cAKHC,QAAQA;;;;;cAKRC,OAAOA;;;;;;;;;;;;;;;;;;;;;;;;iBCWJC,WAAWA;;;;;;;;;;;;;;;;;;;;;;;;iBA8CXC,OAAOA;;;;;;;iBCs9DDC,WAAWA;;;;;;;;;;;iBA7TjBC,aAAaA;;;;;;;;;;;;iBAiBbC,cAAcA;;;;;;;;;;iBAedC,UAAUA;;;;;iBASVC,qBAAqBA;;;;;;;;;;iBA8BrBC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCJC,UAAUA;;;;iBA0BVC,aAAaA;;;;;;;;;;;;iBAqBPC,WAAWA;;;;;;;;;;;;;;;;;;iBAoCjBC,WAAWA;;;;;iBAoCXC,SAASA;;;;;iBA+CTC,YAAYA;MV51DhB3D,YAAYA;;;;;;;;;;;YWtJb4D,IAAIA;;;;;;;YAOJC,MAAMA;;;;;;;;;;;;;;;;;iBAiBDC,YAAYA;;;;;;;;;;;;;;;;;;iBCVZC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCmBPC,IAAIA;;;;;cAQJC,UAAUA;;;;;;;;;;;cAMVC,OAAOA;;;;;;;;;iBC1CPC,SAASA;;;;;;;;;;;;;;;cAyBTH,IAAIA;;;;;;;;;;cAiBJC,UAAUA;;;;;;;;cAeVC,OAAOA",
163
163
  "ignoreList": []
164
164
  }
package/postinstall.js DELETED
@@ -1,55 +0,0 @@
1
- import { load_config } from './src/core/config/index.js';
2
- import glob from 'tiny-glob/sync.js';
3
- import fs from 'node:fs';
4
- import process from 'node:process';
5
-
6
- try {
7
- const cwd = process.env.INIT_CWD ?? process.cwd();
8
- process.chdir(cwd);
9
-
10
- if (fs.existsSync('package.json')) {
11
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
12
-
13
- const workspaces = [];
14
-
15
- if (pkg.workspaces) {
16
- // Find all npm and Yarn workspace glob patterns
17
- // https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
18
- // https://docs.npmjs.com/cli/v9/configuring-npm/package-json#workspaces
19
- const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces.packages;
20
-
21
- for (const pattern of patterns) {
22
- workspaces.push(
23
- ...glob(pattern, { cwd, absolute: true }).filter((path) =>
24
- fs.statSync(path).isDirectory()
25
- )
26
- );
27
- }
28
- } else {
29
- workspaces.push(cwd);
30
- }
31
-
32
- for (const cwd of workspaces) {
33
- process.chdir(cwd);
34
-
35
- if (!fs.existsSync('package.json')) continue;
36
- if (!fs.existsSync('svelte.config.js')) continue;
37
-
38
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
39
- if (!pkg.dependencies?.['@sveltejs/kit'] && !pkg.devDependencies?.['@sveltejs/kit']) continue;
40
-
41
- // defer import until after the chdir so that peer dependency resolves correctly
42
- const sync = await import('./src/core/sync/sync.js');
43
-
44
- try {
45
- const config = await load_config();
46
- sync.all(config, 'development');
47
- } catch (error) {
48
- console.error('Error while trying to sync SvelteKit config');
49
- console.error(error);
50
- }
51
- }
52
- }
53
- } catch (error) {
54
- console.error(error);
55
- }