@sveltejs/kit 2.15.3 → 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
  /**
@@ -635,7 +635,7 @@ declare module '@sveltejs/kit' {
635
635
  * What type of client-side router to use.
636
636
  * - `'pathname'` is the default and means the current URL pathname determines the route
637
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.
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.
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.
639
639
  *
640
640
  * @default "pathname"
641
641
  * @since 2.14.0
@@ -720,7 +720,7 @@ declare module '@sveltejs/kit' {
720
720
  */
721
721
  export type Handle = (input: {
722
722
  event: RequestEvent;
723
- resolve(event: RequestEvent, opts?: ResolveOptions): MaybePromise<Response>;
723
+ resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise<Response>;
724
724
  }) => MaybePromise<Response>;
725
725
 
726
726
  /**
@@ -875,14 +875,14 @@ declare module '@sveltejs/kit' {
875
875
  *
876
876
  * `setHeaders` has no effect when a `load` function runs in the browser.
877
877
  */
878
- setHeaders(headers: Record<string, string>): void;
878
+ setHeaders: (headers: Record<string, string>) => void;
879
879
  /**
880
880
  * `await parent()` returns data from parent `+layout.js` `load` functions.
881
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.
882
882
  *
883
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.
884
884
  */
885
- parent(): Promise<ParentData>;
885
+ parent: () => Promise<ParentData>;
886
886
  /**
887
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.
888
888
  *
@@ -920,7 +920,7 @@ declare module '@sveltejs/kit' {
920
920
  * <button on:click={increase}>Increase Count</button>
921
921
  * ```
922
922
  */
923
- depends(...deps: Array<`${string}:${string}`>): void;
923
+ depends: (...deps: Array<`${string}:${string}`>) => void;
924
924
  /**
925
925
  * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
926
926
  *
@@ -934,7 +934,7 @@ declare module '@sveltejs/kit' {
934
934
  * }
935
935
  * ```
936
936
  */
937
- untrack<T>(fn: () => T): T;
937
+ untrack: <T>(fn: () => T) => T;
938
938
  }
939
939
 
940
940
  export interface NavigationEvent<
@@ -1029,7 +1029,7 @@ declare module '@sveltejs/kit' {
1029
1029
  /**
1030
1030
  * Call this to prevent the navigation from starting.
1031
1031
  */
1032
- cancel(): void;
1032
+ cancel: () => void;
1033
1033
  }
1034
1034
 
1035
1035
  /**
@@ -1143,7 +1143,7 @@ declare module '@sveltejs/kit' {
1143
1143
  /**
1144
1144
  * The client's IP address, set by the adapter.
1145
1145
  */
1146
- getClientAddress(): string;
1146
+ getClientAddress: () => string;
1147
1147
  /**
1148
1148
  * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle).
1149
1149
  */
@@ -1191,7 +1191,7 @@ declare module '@sveltejs/kit' {
1191
1191
  *
1192
1192
  * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead.
1193
1193
  */
1194
- setHeaders(headers: Record<string, string>): void;
1194
+ setHeaders: (headers: Record<string, string>) => void;
1195
1195
  /**
1196
1196
  * The requested URL.
1197
1197
  */
@@ -1224,20 +1224,20 @@ declare module '@sveltejs/kit' {
1224
1224
  * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components.
1225
1225
  * @param input the html chunk and the info if this is the last chunk
1226
1226
  */
1227
- transformPageChunk?(input: { html: string; done: boolean }): MaybePromise<string | undefined>;
1227
+ transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise<string | undefined>;
1228
1228
  /**
1229
1229
  * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`.
1230
1230
  * By default, none will be included.
1231
1231
  * @param name header name
1232
1232
  * @param value header value
1233
1233
  */
1234
- filterSerializedResponseHeaders?(name: string, value: string): boolean;
1234
+ filterSerializedResponseHeaders?: (name: string, value: string) => boolean;
1235
1235
  /**
1236
1236
  * Determines what should be added to the `<head>` tag to preload it.
1237
1237
  * By default, `js` and `css` files will be preloaded.
1238
1238
  * @param input the type of the file and its path
1239
1239
  */
1240
- preload?(input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }): boolean;
1240
+ preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean;
1241
1241
  }
1242
1242
 
1243
1243
  export interface RouteDefinition<Config = any> {
@@ -1279,7 +1279,7 @@ declare module '@sveltejs/kit' {
1279
1279
  client: NonNullable<BuildData['client']>;
1280
1280
  nodes: SSRNodeLoader[];
1281
1281
  routes: SSRRoute[];
1282
- matchers(): Promise<Record<string, ParamMatcher>>;
1282
+ matchers: () => Promise<Record<string, ParamMatcher>>;
1283
1283
  /** A `[file]: size` map of all assets imported by server code */
1284
1284
  server_assets: Record<string, number>;
1285
1285
  };
@@ -1306,7 +1306,7 @@ declare module '@sveltejs/kit' {
1306
1306
  *
1307
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.
1308
1308
  */
1309
- parent(): Promise<ParentData>;
1309
+ parent: () => Promise<ParentData>;
1310
1310
  /**
1311
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.
1312
1312
  *
@@ -1344,7 +1344,7 @@ declare module '@sveltejs/kit' {
1344
1344
  * <button on:click={increase}>Increase Count</button>
1345
1345
  * ```
1346
1346
  */
1347
- depends(...deps: string[]): void;
1347
+ depends: (...deps: string[]) => void;
1348
1348
  /**
1349
1349
  * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
1350
1350
  *
@@ -1358,7 +1358,7 @@ declare module '@sveltejs/kit' {
1358
1358
  * }
1359
1359
  * ```
1360
1360
  */
1361
- untrack<T>(fn: () => T): T;
1361
+ untrack: <T>(fn: () => T) => T;
1362
1362
  }
1363
1363
 
1364
1364
  /**
@@ -1429,7 +1429,7 @@ declare module '@sveltejs/kit' {
1429
1429
  formElement: HTMLFormElement;
1430
1430
  controller: AbortController;
1431
1431
  submitter: HTMLElement | null;
1432
- cancel(): void;
1432
+ cancel: () => void;
1433
1433
  }) => MaybePromise<
1434
1434
  | void
1435
1435
  | ((opts: {
@@ -1442,7 +1442,7 @@ declare module '@sveltejs/kit' {
1442
1442
  * @param options Set `reset: false` if you don't want the `<form>` values to be reset after a successful submission.
1443
1443
  * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission.
1444
1444
  */
1445
- update(options?: { reset?: boolean; invalidateAll?: boolean }): Promise<void>;
1445
+ update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise<void>;
1446
1446
  }) => void)
1447
1447
  >;
1448
1448
 
@@ -1901,6 +1901,14 @@ declare module '@sveltejs/kit' {
1901
1901
  /**
1902
1902
  * Redirect a request. When called during request handling, SvelteKit will return a redirect response.
1903
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
+ *
1904
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.
1905
1913
  * @param location The location to redirect to.
1906
1914
  * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location.
@@ -2136,6 +2144,9 @@ declare module '$app/forms' {
2136
2144
  * - redirects to the nearest error page in case of an unexpected error
2137
2145
  *
2138
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
2139
2150
  * @param form_element The form element
2140
2151
  * @param submit Submit callback
2141
2152
  */
@@ -2199,6 +2210,7 @@ declare module '$app/navigation' {
2199
2210
  noScroll?: boolean | undefined;
2200
2211
  keepFocus?: boolean | undefined;
2201
2212
  invalidateAll?: boolean | undefined;
2213
+ invalidate?: (string | URL | ((url: URL) => bool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CFC,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
- }