-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathindex.d.ts
More file actions
79 lines (72 loc) · 2.41 KB
/
Copy pathindex.d.ts
File metadata and controls
79 lines (72 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import { Adapter } from '@sveltejs/kit';
import { RuntimeKey } from './utils.js';
export default function plugin(config?: Config): Adapter;
export interface ServerlessConfig {
/**
* Which [Serverless Function](https://vercel.com/docs/concepts/functions/serverless-functions) runtime to use (`'nodejs22.x'`, `'nodejs24.x'` etc).
* @default Same as the build environment
*/
runtime?: RuntimeKey;
/**
* A list of regions to deploy the app to
* More info: https://vercel.com/docs/concepts/edge-network/regions
*/
regions?: string[];
/**
* Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
*/
maxDuration?: number;
/**
* Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
*/
memory?: number;
/**
* If `true`, this route will always be deployed as its own separate function
*/
split?: boolean;
/**
* [Incremental Static Regeneration](https://vercel.com/docs/concepts/incremental-static-regeneration/overview) configuration.
*/
isr?:
| {
/**
* Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function. Setting the value to `false` means it will never expire.
*/
expiration: number | string | false;
/**
* Random token that can be provided in the URL to bypass the cached version of the asset, by requesting the asset
* with a __prerender_bypass=<token> cookie.
*
* Making a `GET` or `HEAD` request with `x-prerender-revalidate: <token>` will force the asset to be re-validated.
*/
bypassToken?: string;
/**
* List of query string parameter names that will be cached independently. If an empty array, query values are not considered for caching. If undefined each unique query value is cached independently
*/
allowQuery?: string[] | undefined;
}
| false;
}
type ImageFormat = 'image/avif' | 'image/webp';
type RemotePattern = {
protocol?: 'http' | 'https';
hostname: string;
port?: string;
pathname?: string;
};
type ImagesConfig = {
sizes: number[];
domains: string[];
remotePatterns?: RemotePattern[];
minimumCacheTTL?: number; // seconds
formats?: ImageFormat[];
dangerouslyAllowSVG?: boolean;
contentSecurityPolicy?: string;
contentDispositionType?: string;
};
export type Config = ServerlessConfig & {
/**
* https://vercel.com/docs/build-output-api/v3/configuration#images
*/
images?: ImagesConfig;
};