@netlify/config 20.1.0 → 20.3.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/files.js
CHANGED
|
@@ -14,7 +14,12 @@ export const resolveConfigPaths = async function ({ config, repositoryRoot, buil
|
|
|
14
14
|
};
|
|
15
15
|
// All file paths in the configuration file are are relative to `buildDir`
|
|
16
16
|
// (if `baseRelDir` is `true`).
|
|
17
|
-
const FILE_PATH_CONFIG_PROPS = [
|
|
17
|
+
const FILE_PATH_CONFIG_PROPS = [
|
|
18
|
+
'functionsDirectory',
|
|
19
|
+
'functions.*.deno_import_map',
|
|
20
|
+
'build.publish',
|
|
21
|
+
'build.edge_functions',
|
|
22
|
+
];
|
|
18
23
|
const resolvePaths = function (config, propNames, baseRel, repositoryRoot) {
|
|
19
24
|
return propNames.reduce((configA, propName) => resolvePathProp(configA, propName, baseRel, repositoryRoot), config);
|
|
20
25
|
};
|
package/lib/functions_config.js
CHANGED
|
@@ -36,6 +36,7 @@ const normalizeFunctionsProp = (functions, [propName, propValue]) => isConfigPro
|
|
|
36
36
|
const isConfigLeaf = (functionConfig) => isPlainObj(functionConfig) && Object.keys(functionConfig).every(isConfigProperty);
|
|
37
37
|
const isConfigProperty = (propName) => FUNCTION_CONFIG_PROPERTIES.has(propName);
|
|
38
38
|
export const FUNCTION_CONFIG_PROPERTIES = new Set([
|
|
39
|
+
'deno_import_map',
|
|
39
40
|
'directory',
|
|
40
41
|
'external_node_modules',
|
|
41
42
|
'ignored_node_modules',
|
package/lib/mutations/update.js
CHANGED
|
@@ -10,7 +10,7 @@ import { serializeToml } from '../utils/toml.js';
|
|
|
10
10
|
import { applyMutations } from './apply.js';
|
|
11
11
|
// Persist configuration changes to `netlify.toml`.
|
|
12
12
|
// If `netlify.toml` does not exist, creates it. Otherwise, merges the changes.
|
|
13
|
-
export const updateConfig = async function (configMutations, { buildDir, configPath, headersPath, redirectsPath, context, branch, logs, featureFlags }) {
|
|
13
|
+
export const updateConfig = async function (configMutations, { buildDir, configPath, headersPath, outputConfigPath = configPath, redirectsPath, context, branch, logs, featureFlags, }) {
|
|
14
14
|
if (configMutations.length === 0) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
@@ -22,7 +22,7 @@ export const updateConfig = async function (configMutations, { buildDir, configP
|
|
|
22
22
|
const simplifiedConfig = simplifyConfig(finalConfig);
|
|
23
23
|
await backupConfig({ buildDir, configPath, headersPath, redirectsPath });
|
|
24
24
|
await Promise.all([
|
|
25
|
-
saveConfig(
|
|
25
|
+
saveConfig(outputConfigPath, simplifiedConfig),
|
|
26
26
|
deleteSideFile(headersPath),
|
|
27
27
|
deleteSideFile(redirectsPath),
|
|
28
28
|
]);
|
|
@@ -181,6 +181,14 @@ export const POST_NORMALIZE_VALIDATIONS = [
|
|
|
181
181
|
functions: { [prevPath[1]]: { external_node_modules: ['module-one', 'module-two'] } },
|
|
182
182
|
}),
|
|
183
183
|
},
|
|
184
|
+
{
|
|
185
|
+
property: 'functions.*.deno_import_map',
|
|
186
|
+
check: isString,
|
|
187
|
+
message: 'must be a string.',
|
|
188
|
+
example: (value, key, prevPath) => ({
|
|
189
|
+
functions: { [prevPath[1]]: { deno_import_map: 'path/to/import_map.json' } },
|
|
190
|
+
}),
|
|
191
|
+
},
|
|
184
192
|
{
|
|
185
193
|
property: 'functions.*.external_node_modules',
|
|
186
194
|
check: isArrayOfStrings,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/main.js",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"engines": {
|
|
96
96
|
"node": "^14.16.0 || >=16.0.0"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "87d6d9344ac37b4c40b70c582958347c0f7fd8eb"
|
|
99
99
|
}
|