@netlify/config 25.1.1 → 25.2.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/lib/mutations/apply.js
CHANGED
|
@@ -65,6 +65,7 @@ const MUTABLE_PROPS = {
|
|
|
65
65
|
images: { lastEvent: 'onPostBuild' },
|
|
66
66
|
'images.remote_images': { lastEvent: 'onPostBuild' },
|
|
67
67
|
redirects: { lastEvent: 'onPostBuild' },
|
|
68
|
+
spa_fallback: { lastEvent: 'onPostBuild' },
|
|
68
69
|
dev: { lastEvent: 'onPreDev' },
|
|
69
70
|
'dev.processing': { lastEvent: 'onPreDev' },
|
|
70
71
|
'dev.processing.html': { lastEvent: 'onPreDev' },
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export function isArrayOfObjects(value: any): value is Record<PropertyKey, unknown>[];
|
|
2
2
|
export function isArrayOfStrings(value: any): value is string[];
|
|
3
3
|
export function isString(value: any): value is string;
|
|
4
|
+
export function isBoolean(value: any): value is boolean;
|
|
4
5
|
export function validProperties(propNames: any, legacyPropNames: any): {
|
|
5
6
|
check: (value: any) => boolean;
|
|
6
7
|
message: string;
|
package/lib/validate/helpers.js
CHANGED
|
@@ -8,6 +8,9 @@ export const isArrayOfStrings = function (value) {
|
|
|
8
8
|
export const isString = function (value) {
|
|
9
9
|
return typeof value === 'string';
|
|
10
10
|
};
|
|
11
|
+
export const isBoolean = function (value) {
|
|
12
|
+
return typeof value === 'boolean';
|
|
13
|
+
};
|
|
11
14
|
// Check an object valid properties, including legacy ones
|
|
12
15
|
export const validProperties = function (propNames, legacyPropNames) {
|
|
13
16
|
return {
|
|
@@ -215,6 +215,13 @@ export const POST_NORMALIZE_VALIDATIONS: ({
|
|
|
215
215
|
edge_functions: string;
|
|
216
216
|
};
|
|
217
217
|
};
|
|
218
|
+
} | {
|
|
219
|
+
property: string;
|
|
220
|
+
check: (value: any) => value is boolean;
|
|
221
|
+
message: string;
|
|
222
|
+
example: () => {
|
|
223
|
+
spa_fallback: boolean;
|
|
224
|
+
};
|
|
218
225
|
} | {
|
|
219
226
|
property: string;
|
|
220
227
|
check: typeof isPlainObj;
|
|
@@ -3,7 +3,7 @@ import isPlainObj from 'is-plain-obj';
|
|
|
3
3
|
import validateNpmPackageName from 'validate-npm-package-name';
|
|
4
4
|
import { validations as edgeFunctionValidations, EDGE_FUNCTIONS_PROPERTIES } from '../edge_functions.js';
|
|
5
5
|
import { bundlers, WILDCARD_ALL as FUNCTIONS_CONFIG_WILDCARD_ALL } from '../functions_config.js';
|
|
6
|
-
import { functionsDirectoryCheck, isArrayOfObjects, isArrayOfStrings, isString, validProperties } from './helpers.js';
|
|
6
|
+
import { functionsDirectoryCheck, isArrayOfObjects, isArrayOfStrings, isBoolean, isString, validProperties, } from './helpers.js';
|
|
7
7
|
/**
|
|
8
8
|
* @param {string} cron
|
|
9
9
|
* @returns {boolean}
|
|
@@ -209,6 +209,12 @@ export const POST_NORMALIZE_VALIDATIONS = [
|
|
|
209
209
|
message: 'must be a string.',
|
|
210
210
|
example: () => ({ build: { edge_functions: 'edge-functions' } }),
|
|
211
211
|
},
|
|
212
|
+
{
|
|
213
|
+
property: 'spa_fallback',
|
|
214
|
+
check: isBoolean,
|
|
215
|
+
message: 'must be a boolean.',
|
|
216
|
+
example: () => ({ spa_fallback: true }),
|
|
217
|
+
},
|
|
212
218
|
{
|
|
213
219
|
property: 'functions.*',
|
|
214
220
|
check: isPlainObj,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.2.0",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"engines": {
|
|
97
97
|
"node": ">=22.12.0"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "f34dd81fc3bc8925aabe5cf9c1cdce4e8eebc4e0"
|
|
100
100
|
}
|