@netlify/config 25.5.2 → 25.6.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/package.json +9 -4
- package/schema.json +594 -0
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.6.0",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"exports":
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./lib/index.js",
|
|
8
|
+
"./schema.json": "./schema.json"
|
|
9
|
+
},
|
|
7
10
|
"main": "./lib/index.js",
|
|
8
11
|
"types": "./lib/index.d.ts",
|
|
9
12
|
"bin": {
|
|
@@ -12,7 +15,8 @@
|
|
|
12
15
|
"files": [
|
|
13
16
|
"bin.js",
|
|
14
17
|
"lib/**/*.js",
|
|
15
|
-
"lib/**/*.d.ts"
|
|
18
|
+
"lib/**/*.d.ts",
|
|
19
|
+
"schema.json"
|
|
16
20
|
],
|
|
17
21
|
"author": "Netlify Inc.",
|
|
18
22
|
"contributors": [
|
|
@@ -86,6 +90,7 @@
|
|
|
86
90
|
"devDependencies": {
|
|
87
91
|
"@types/node": "^22.12.0",
|
|
88
92
|
"@vitest/coverage-v8": "^3.2.6",
|
|
93
|
+
"ajv": "^8.20.0",
|
|
89
94
|
"has-ansi": "^6.0.0",
|
|
90
95
|
"is-ci": "^4.0.0",
|
|
91
96
|
"tmp-promise": "^3.0.2",
|
|
@@ -94,5 +99,5 @@
|
|
|
94
99
|
"engines": {
|
|
95
100
|
"node": ">=22.12.0"
|
|
96
101
|
},
|
|
97
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "d480b953bee0bf8af0b53ccb13a2b4bed996df03"
|
|
98
103
|
}
|
package/schema.json
ADDED
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://open-api.netlify.com/netlify.toml.json",
|
|
4
|
+
"title": "Netlify configuration",
|
|
5
|
+
"description": "Configuration for a Netlify project, set in the `netlify.toml` file, which specifies how Netlify builds and deploys your site. See https://docs.netlify.com/build/configure-builds/file-based-configuration/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "URL of the JSON schema that describes this file, which editors use to validate it and suggest properties. Netlify does not use it."
|
|
11
|
+
},
|
|
12
|
+
"build": {
|
|
13
|
+
"$ref": "#/definitions/build"
|
|
14
|
+
},
|
|
15
|
+
"context": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"description": "Settings that apply to a kind of deploy. Any property in `[context.production]`, `[context.deploy-preview]`, `[context.branch-deploy]`, or `[context.dev]` will override less specific contexts, and any property in `[context.branchname]`, for a given branchname, is the most specific. A branch name that ends in `*` matches branches by prefix. See https://docs.netlify.com/build/configure-builds/file-based-configuration/#deploy-contexts.",
|
|
18
|
+
"additionalProperties": {
|
|
19
|
+
"$ref": "#/definitions/contextConfig"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"database": {
|
|
23
|
+
"$ref": "#/definitions/database"
|
|
24
|
+
},
|
|
25
|
+
"dev": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"description": "Optional configuration for Netlify Dev, the local development environment. Note that `[dev]` doesn't run in the Bash shell, so you won't be able to use Bash-compatible syntax with the command. To set environment variables for local development, use `[context.dev.environment]` instead. See https://docs.netlify.com/build/configure-builds/file-based-configuration/#netlify-dev."
|
|
28
|
+
},
|
|
29
|
+
"edge_functions": {
|
|
30
|
+
"$ref": "#/definitions/edgeFunctions"
|
|
31
|
+
},
|
|
32
|
+
"functions": {
|
|
33
|
+
"$ref": "#/definitions/functions"
|
|
34
|
+
},
|
|
35
|
+
"headers": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"description": "Custom headers. By default, headers set in the `netlify.toml` are global for all builds and cannot be scoped for specific branches or deploy contexts. See https://docs.netlify.com/manage/routing/headers/.",
|
|
38
|
+
"items": {
|
|
39
|
+
"$ref": "#/definitions/header"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"images": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Settings for Netlify Image CDN. See https://docs.netlify.com/build/image-cdn/overview/.",
|
|
45
|
+
"properties": {
|
|
46
|
+
"remote_images": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "Allowed domains for remote source images, as an array of regex. In the regex, escape literal dots (`\\.`); forward slashes don't need escaping.",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"plugins": {
|
|
56
|
+
"$ref": "#/definitions/plugins"
|
|
57
|
+
},
|
|
58
|
+
"redirects": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"description": "Redirect and rewrite rules. Redirects are global for all builds and do not get scoped to deploy contexts. See https://docs.netlify.com/manage/routing/redirects/overview/#syntax-for-the-netlify-configuration-file.",
|
|
61
|
+
"items": {
|
|
62
|
+
"$ref": "#/definitions/redirect"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"server": {
|
|
66
|
+
"$ref": "#/definitions/server"
|
|
67
|
+
},
|
|
68
|
+
"spa_fallback": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"description": "Whether to add a catch-all rule that rewrites every path to `/index.html` with a `200` status, for single-page apps that handle routing internally. It is not added if a rule for `/*` already exists."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"definitions": {
|
|
74
|
+
"build": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"description": "Build settings. Settings for the `[build]` key are global and are applied to all deploy contexts unless overridden by a context-specific setting.",
|
|
77
|
+
"properties": {
|
|
78
|
+
"base": {
|
|
79
|
+
"$ref": "#/definitions/buildProperties/properties/base"
|
|
80
|
+
},
|
|
81
|
+
"command": {
|
|
82
|
+
"$ref": "#/definitions/buildProperties/properties/command"
|
|
83
|
+
},
|
|
84
|
+
"edge_functions": {
|
|
85
|
+
"$ref": "#/definitions/buildProperties/properties/edge_functions"
|
|
86
|
+
},
|
|
87
|
+
"environment": {
|
|
88
|
+
"$ref": "#/definitions/buildProperties/properties/environment"
|
|
89
|
+
},
|
|
90
|
+
"functions": {
|
|
91
|
+
"$ref": "#/definitions/buildProperties/properties/functions"
|
|
92
|
+
},
|
|
93
|
+
"ignore": {
|
|
94
|
+
"$ref": "#/definitions/buildProperties/properties/ignore"
|
|
95
|
+
},
|
|
96
|
+
"publish": {
|
|
97
|
+
"$ref": "#/definitions/buildProperties/properties/publish"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"buildProperties": {
|
|
102
|
+
"properties": {
|
|
103
|
+
"base": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "Directory where Netlify checks for dependency management files such as `package.json` or `.nvmrc`, installs dependencies, and runs your build command. If not set, the base directory defaults to the root of the repository."
|
|
106
|
+
},
|
|
107
|
+
"command": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "The command to run to build your site if you are using a static site generator or other build tool. For example, `npm run build`. The build command runs in the Bash shell, allowing you to add Bash-compatible syntax to the command."
|
|
110
|
+
},
|
|
111
|
+
"edge_functions": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"description": "Custom edge functions directory, as an absolute path relative to the site's base directory. The default edge functions directory is `YOUR_BASE_DIRECTORY/netlify/edge-functions`."
|
|
114
|
+
},
|
|
115
|
+
"environment": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"description": "Build environment variables. We recommend that you use the Netlify UI instead, to avoid storing sensitive values in your repository.",
|
|
118
|
+
"additionalProperties": {
|
|
119
|
+
"type": ["string", "number", "boolean"]
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"functions": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "Directory that contains function files and optional subdirectories for organizing function files. The functions directory is relative to the base directory. `functions.directory` takes precedence over this setting."
|
|
125
|
+
},
|
|
126
|
+
"ignore": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "A Node.js or Bash command that runs from the base directory and determines whether or not the site needs rebuilding. An exit code of `1` indicates the contents have changed and the build process continues as usual. An exit code of `0` indicates that there are no changes and the build should stop."
|
|
129
|
+
},
|
|
130
|
+
"publish": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Directory that contains the deploy-ready HTML files and assets generated by the build. The directory is relative to the base directory, which is root by default (`/`)."
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"contextConfig": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"description": "Settings for this deploy context or branch. Build settings can be set directly, as in `[context.production]`, or under `build`.",
|
|
139
|
+
"properties": {
|
|
140
|
+
"base": {
|
|
141
|
+
"$ref": "#/definitions/buildProperties/properties/base"
|
|
142
|
+
},
|
|
143
|
+
"build": {
|
|
144
|
+
"$ref": "#/definitions/build"
|
|
145
|
+
},
|
|
146
|
+
"command": {
|
|
147
|
+
"$ref": "#/definitions/buildProperties/properties/command"
|
|
148
|
+
},
|
|
149
|
+
"database": {
|
|
150
|
+
"$ref": "#/definitions/database"
|
|
151
|
+
},
|
|
152
|
+
"edge_functions": {
|
|
153
|
+
"anyOf": [
|
|
154
|
+
{
|
|
155
|
+
"$ref": "#/definitions/buildProperties/properties/edge_functions"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"$ref": "#/definitions/edgeFunctions"
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"description": "A string sets the edge functions directory for this context, as `build.edge_functions` does. An array of tables declares edge functions for this context, as `[[edge_functions]]` does."
|
|
162
|
+
},
|
|
163
|
+
"environment": {
|
|
164
|
+
"$ref": "#/definitions/buildProperties/properties/environment"
|
|
165
|
+
},
|
|
166
|
+
"functions": {
|
|
167
|
+
"anyOf": [
|
|
168
|
+
{
|
|
169
|
+
"$ref": "#/definitions/buildProperties/properties/functions"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$ref": "#/definitions/functions"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"description": "A string sets the functions directory for this context, as `build.functions` does. A table sets functions settings for this context, as `[functions]` does."
|
|
176
|
+
},
|
|
177
|
+
"ignore": {
|
|
178
|
+
"$ref": "#/definitions/buildProperties/properties/ignore"
|
|
179
|
+
},
|
|
180
|
+
"plugins": {
|
|
181
|
+
"$ref": "#/definitions/plugins"
|
|
182
|
+
},
|
|
183
|
+
"publish": {
|
|
184
|
+
"$ref": "#/definitions/buildProperties/properties/publish"
|
|
185
|
+
},
|
|
186
|
+
"server": {
|
|
187
|
+
"$ref": "#/definitions/server"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"database": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"description": "Settings for Netlify Database.",
|
|
194
|
+
"properties": {
|
|
195
|
+
"migrations": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"path": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"description": "Directory with the migrations that Netlify applies automatically. Defaults to `netlify/database/migrations`."
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"description": "Settings for Netlify Database's native migration system."
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"edgeFunctions": {
|
|
208
|
+
"type": "array",
|
|
209
|
+
"description": "Edge function declarations. Declaring edge functions in `netlify.toml` instead of inline in the function file lets you run multiple edge functions on the same path and customize the order they run in. See https://docs.netlify.com/build/edge-functions/declarations/#declare-edge-functions-in-netlifytoml.",
|
|
210
|
+
"items": {
|
|
211
|
+
"$ref": "#/definitions/edgeFunction"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"edgeFunction": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"properties": {
|
|
217
|
+
"cache": {
|
|
218
|
+
"enum": ["manual", "off"],
|
|
219
|
+
"description": "Optional setting to opt in to response caching, by setting it to `manual`."
|
|
220
|
+
},
|
|
221
|
+
"excludedPath": {
|
|
222
|
+
"$ref": "#/definitions/stringOrStrings",
|
|
223
|
+
"description": "Optional `URLPattern` exclusion to limit the routes matched by `path`. Accepts a single string or an array of strings."
|
|
224
|
+
},
|
|
225
|
+
"excludedPattern": {
|
|
226
|
+
"$ref": "#/definitions/stringOrStrings",
|
|
227
|
+
"description": "Optional regex exclusion to limit the routes matched by `pattern`. Accepts a single regex or an array of regex."
|
|
228
|
+
},
|
|
229
|
+
"function": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"description": "Name of the edge function you're configuring."
|
|
232
|
+
},
|
|
233
|
+
"header": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"description": "Optional conditions on HTTP headers that must be met for the edge function to run. Each key is the name of an HTTP header, and the value is `true` to match only if the header is present in the request, `false` to match only if it is not present, or a string to match only if the header value matches the regular expression represented in the string.",
|
|
236
|
+
"additionalProperties": {
|
|
237
|
+
"type": ["boolean", "string"]
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"method": {
|
|
241
|
+
"description": "Optional HTTP methods that should run the edge function. Accepts a string or an array of strings.",
|
|
242
|
+
"anyOf": [
|
|
243
|
+
{
|
|
244
|
+
"$ref": "#/definitions/httpMethod"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "array",
|
|
248
|
+
"minItems": 1,
|
|
249
|
+
"items": {
|
|
250
|
+
"$ref": "#/definitions/httpMethod"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"name": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "Human-friendly name of the edge function."
|
|
258
|
+
},
|
|
259
|
+
"path": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"pattern": "^/",
|
|
262
|
+
"description": "`URLPattern` expression on which paths to run the edge function. Must start with `/`, for example `path = \"/*\"`."
|
|
263
|
+
},
|
|
264
|
+
"pattern": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"description": "Alternative to the `path` property that allows for regex path matching."
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": ["function"],
|
|
270
|
+
"additionalProperties": false,
|
|
271
|
+
"anyOf": [
|
|
272
|
+
{
|
|
273
|
+
"required": ["path"]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"required": ["pattern"]
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"allOf": [
|
|
280
|
+
{
|
|
281
|
+
"not": {
|
|
282
|
+
"required": ["path", "pattern"]
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"not": {
|
|
287
|
+
"required": ["excludedPath", "excludedPattern"]
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"functionConfig": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"deno_import_map": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"description": "Path to an import map file for edge functions, which maps module URLs to names so you can use module names in your import statements."
|
|
298
|
+
},
|
|
299
|
+
"external_node_modules": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"description": "List of Node.js modules that are copied to the bundled artifact without adjusting their source or references during the bundling process; only applies when `node_bundler` is set to `esbuild`. This property helps handle dependencies that can't be inlined, such as modules with native add-ons.",
|
|
302
|
+
"items": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"ignored_node_modules": {
|
|
307
|
+
"type": "array",
|
|
308
|
+
"description": "List of Node.js modules to leave out of the function bundle.",
|
|
309
|
+
"items": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"included_files": {
|
|
314
|
+
"type": "array",
|
|
315
|
+
"description": "List of additional paths to include in the function bundle. Although our build system includes statically referenced files (like `require(\"./some-file.js\")`) by default, `included_files` lets you specify additional files or directories and reference them dynamically in function code. You can use `*` to match any character or prefix an entry with `!` to exclude files. Paths are absolute paths relative to the base directory.",
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "string"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"memory": {
|
|
321
|
+
"description": "Memory for the function, as a number of megabytes or a human-friendly string with a unit (`\"2gb\"`, `\"1024mb\"`, case-insensitive). Allowed range: 1024 to 4096 MB. Memory and vCPU scale together, and the two are mutually exclusive; set one, not both.",
|
|
322
|
+
"anyOf": [
|
|
323
|
+
{
|
|
324
|
+
"type": "integer",
|
|
325
|
+
"minimum": 1024,
|
|
326
|
+
"maximum": 4096
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"type": "string",
|
|
330
|
+
"pattern": "^\\s*(?:(?:102[4-9]|10[3-9]\\d|1[1-9]\\d{2}|[23]\\d{3}|40[0-8]\\d|409[0-6])(?:\\.0+)?\\s*(?:[mM][bB])?|(?:[1-3](?:\\.\\d+)?|4(?:\\.0+)?)\\s*[gG][bB])\\s*$"
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
"node_bundler": {
|
|
335
|
+
"enum": ["esbuild", "nft", "zisi", "none"],
|
|
336
|
+
"description": "Function bundling method used in @netlify/zip-it-and-ship-it. `esbuild` leverages esbuild to bundle functions, resulting in shorter bundling times and smaller artifacts, and TypeScript functions always use it. `zisi` is the default function bundling method for JavaScript functions."
|
|
337
|
+
},
|
|
338
|
+
"region": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "Region the function runs in, identified by airport code, such as `dub`. The function-level region takes precedence over the site-level region set in the UI."
|
|
341
|
+
},
|
|
342
|
+
"schedule": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"description": "Cron expression for a scheduled function, in the format used by tools like crontab, executed according to the UTC timezone. For example, `0 0 * * *` runs every day at midnight UTC, and can also be written as `@daily`. The `@reboot` and `@annually` extensions are not supported."
|
|
345
|
+
},
|
|
346
|
+
"vcpu": {
|
|
347
|
+
"type": "number",
|
|
348
|
+
"minimum": 0.5,
|
|
349
|
+
"maximum": 2,
|
|
350
|
+
"description": "vCPUs for the function, as a number between 0.5 and 2.0. Memory and vCPU scale together, and the two are mutually exclusive; set one, not both."
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"not": {
|
|
354
|
+
"required": ["memory", "vcpu"]
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"functions": {
|
|
358
|
+
"description": "Optional, custom configuration for Netlify Functions. Settings at the top of `[functions]` apply to all functions in your project, and you can filter them by function name, including using glob patterns, as in `[functions.\"api_*\"]`. If a function matches several configuration blocks containing one of these properties, the values are concatenated. See https://docs.netlify.com/build/configure-builds/file-based-configuration/#functions.",
|
|
359
|
+
"allOf": [
|
|
360
|
+
{
|
|
361
|
+
"$ref": "#/definitions/functionConfig"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"type": "object",
|
|
365
|
+
"properties": {
|
|
366
|
+
"*": {
|
|
367
|
+
"$ref": "#/definitions/functionConfig"
|
|
368
|
+
},
|
|
369
|
+
"deno_import_map": true,
|
|
370
|
+
"directory": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"description": "Custom absolute path to your functions. The default location is `YOUR_BASE_DIRECTORY/netlify/functions`."
|
|
373
|
+
},
|
|
374
|
+
"external_node_modules": true,
|
|
375
|
+
"ignored_node_modules": true,
|
|
376
|
+
"included_files": true,
|
|
377
|
+
"memory": true,
|
|
378
|
+
"node_bundler": true,
|
|
379
|
+
"region": true,
|
|
380
|
+
"schedule": true,
|
|
381
|
+
"vcpu": true
|
|
382
|
+
},
|
|
383
|
+
"additionalProperties": {
|
|
384
|
+
"allOf": [
|
|
385
|
+
{
|
|
386
|
+
"$ref": "#/definitions/functionConfig"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"not": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"required": ["directory"]
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
"header": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"properties": {
|
|
402
|
+
"for": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"description": "The path or URL where the headers will be added. Paths can contain wildcards (`*`), which match any character, and placeholders (`:placeholder`), which can only be used at the start of a path segment and match any character except `/`."
|
|
405
|
+
},
|
|
406
|
+
"values": {
|
|
407
|
+
"type": "object",
|
|
408
|
+
"description": "A map of values to add to the response headers. Multi-value headers are expressed with multi-line strings.",
|
|
409
|
+
"additionalProperties": {
|
|
410
|
+
"$ref": "#/definitions/stringOrStrings"
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"required": ["for"]
|
|
415
|
+
},
|
|
416
|
+
"httpMethod": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"pattern": "^(?:[gG][eE][tT]|[pP][oO][sS][tT]|[pP][uU][tT]|[pP][aA][tT][cC][hH]|[dD][eE][lL][eE][tT][eE]|[oO][pP][tT][iI][oO][nN][sS])$",
|
|
419
|
+
"examples": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
|
|
420
|
+
},
|
|
421
|
+
"plugins": {
|
|
422
|
+
"type": "array",
|
|
423
|
+
"description": "Build plugins, which extend the functionality of the build process. See https://docs.netlify.com/extend/install-and-use/build-plugins/#file-based-installation.",
|
|
424
|
+
"items": {
|
|
425
|
+
"type": "object",
|
|
426
|
+
"properties": {
|
|
427
|
+
"inputs": {
|
|
428
|
+
"type": "object",
|
|
429
|
+
"description": "Custom settings that the plugin author may specify as required or available for configuring the plugin."
|
|
430
|
+
},
|
|
431
|
+
"package": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "For a plugin installed from npm, the npm package name of the plugin. For a local plugin, the absolute path to a directory containing the plugin's `index.js` and `manifest.yml` files. The `package` value for a local plugin must start with `.` or `/`.",
|
|
434
|
+
"pattern": "^(?:[./].*|(?:@[^@/\\s:]+/)?[^@/\\s:]+)$"
|
|
435
|
+
},
|
|
436
|
+
"pinned_version": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"description": "Major version of the plugin to use, such as `\"1\"`. When not set, Netlify pins the major version automatically."
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"required": ["package"],
|
|
442
|
+
"additionalProperties": false
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"redirect": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {
|
|
448
|
+
"conditions": {
|
|
449
|
+
"type": "object",
|
|
450
|
+
"description": "Conditions to match the redirect, including country, role, and cookie presence conditions.",
|
|
451
|
+
"properties": {
|
|
452
|
+
"Country": {
|
|
453
|
+
"$ref": "#/definitions/stringOrStrings",
|
|
454
|
+
"description": "ISO 3166-1 alpha-2 country codes to match, based on GeoIP data."
|
|
455
|
+
},
|
|
456
|
+
"Language": {
|
|
457
|
+
"$ref": "#/definitions/stringOrStrings",
|
|
458
|
+
"description": "Standard browser language identification codes, and locale codes that combine language and country, to match against the browser's language configuration."
|
|
459
|
+
},
|
|
460
|
+
"Role": {
|
|
461
|
+
"$ref": "#/definitions/stringOrStrings",
|
|
462
|
+
"description": "Roles to match, as authorized by Netlify Identity or any authentication provider that supports JSON Web Tokens (JWT)."
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"force": {
|
|
467
|
+
"type": "boolean",
|
|
468
|
+
"description": "Whether to override any existing content in the path or not; `false` by default."
|
|
469
|
+
},
|
|
470
|
+
"from": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"description": "The case-sensitive path you want to redirect. Special characters must be url-encoded."
|
|
473
|
+
},
|
|
474
|
+
"headers": {
|
|
475
|
+
"type": "object",
|
|
476
|
+
"description": "Additional request headers to send in proxy redirects.",
|
|
477
|
+
"additionalProperties": {
|
|
478
|
+
"type": "string"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"query": {
|
|
482
|
+
"type": "object",
|
|
483
|
+
"description": "Query string parameters required to match the redirect, each mapped to a placeholder such as `:path`.",
|
|
484
|
+
"additionalProperties": {
|
|
485
|
+
"type": "string"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"rate_limit": {
|
|
489
|
+
"type": "object",
|
|
490
|
+
"description": "Rate limit for requests that match the redirect, set with `window_limit`, `window_size` (in seconds, at most 180) and `aggregate_by` (`ip`, `domain` or both). See https://docs.netlify.com/manage/security/secure-access-to-sites/rate-limiting/#set-limits-for-redirects."
|
|
491
|
+
},
|
|
492
|
+
"signed": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"description": "Name of an environment variable for signed proxy redirects."
|
|
495
|
+
},
|
|
496
|
+
"status": {
|
|
497
|
+
"type": "integer",
|
|
498
|
+
"description": "The HTTP status code you want to use in that redirect; `301` by default."
|
|
499
|
+
},
|
|
500
|
+
"to": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"description": "The URL or path you want to redirect to. Special characters must be url-encoded."
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
"anyOf": [
|
|
506
|
+
{
|
|
507
|
+
"required": ["from"]
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"required": ["origin"]
|
|
511
|
+
}
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
"server": {
|
|
515
|
+
"type": "object",
|
|
516
|
+
"description": "Settings for your project's Netlify Server. If your entry file also sets a property, the entry file takes precedence.",
|
|
517
|
+
"properties": {
|
|
518
|
+
"excludedPath": {
|
|
519
|
+
"$ref": "#/definitions/serverPaths",
|
|
520
|
+
"description": "One or more URL paths that the server doesn't handle, using the same syntax as `path`. Requests for them go on to the rest of your project as if the server didn't exist."
|
|
521
|
+
},
|
|
522
|
+
"includedFiles": {
|
|
523
|
+
"type": "array",
|
|
524
|
+
"description": "Glob patterns for additional files to include in the server's bundle, such as data files your server reads at runtime. In `netlify.toml`, they're relative to your project's base directory. If the entry file also sets `includedFiles`, its patterns replace these.",
|
|
525
|
+
"items": {
|
|
526
|
+
"type": "string"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"path": {
|
|
530
|
+
"$ref": "#/definitions/serverPaths",
|
|
531
|
+
"description": "One or more URL paths that the server handles. Paths must begin with a forward slash, and use the same syntax as function paths. Defaults to `/*`, which is every path that nothing else on your project handles."
|
|
532
|
+
},
|
|
533
|
+
"region": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Airport code of the region the server runs in: `cmh` for US East (Ohio) or `fra` for EU (Frankfurt). Defaults to `cmh`.",
|
|
536
|
+
"pattern": "^(?:[cC][mM][hH]|[fF][rR][aA])$",
|
|
537
|
+
"examples": ["cmh", "fra"]
|
|
538
|
+
},
|
|
539
|
+
"scale": {
|
|
540
|
+
"type": "object",
|
|
541
|
+
"description": "How many instances your server runs. Netlify starts and stops instances as traffic changes, within these bounds.",
|
|
542
|
+
"properties": {
|
|
543
|
+
"max": {
|
|
544
|
+
"type": "integer",
|
|
545
|
+
"minimum": 1,
|
|
546
|
+
"description": "The most instances that run at once. Defaults to the highest your plan allows."
|
|
547
|
+
},
|
|
548
|
+
"min": {
|
|
549
|
+
"type": "integer",
|
|
550
|
+
"minimum": 0,
|
|
551
|
+
"description": "The number of instances that keep running at all times, regardless of traffic. Defaults to `0`, so your server scales to zero when nothing is using it."
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
"additionalProperties": false
|
|
555
|
+
},
|
|
556
|
+
"size": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"description": "Size of the instances the server runs on: `small` (1 GB of memory, 1 shared vCPU), `medium` (2 GB, 1 vCPU) or `large` (4 GB, 2 vCPUs). Defaults to `small`.",
|
|
559
|
+
"pattern": "^(?:[sS][mM][aA][lL][lL]|[mM][eE][dD][iI][uU][mM]|[lL][aA][rR][gG][eE])$",
|
|
560
|
+
"examples": ["small", "medium", "large"]
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
"additionalProperties": false
|
|
564
|
+
},
|
|
565
|
+
"serverPaths": {
|
|
566
|
+
"anyOf": [
|
|
567
|
+
{
|
|
568
|
+
"type": "string",
|
|
569
|
+
"pattern": "^/"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"type": "array",
|
|
573
|
+
"items": {
|
|
574
|
+
"type": "string",
|
|
575
|
+
"pattern": "^/"
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
},
|
|
580
|
+
"stringOrStrings": {
|
|
581
|
+
"anyOf": [
|
|
582
|
+
{
|
|
583
|
+
"type": "string"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"type": "array",
|
|
587
|
+
"items": {
|
|
588
|
+
"type": "string"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|