@netlify/config 17.0.4 → 17.0.5
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 +2 -2
- package/src/bin/flags.js +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.5",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./src/main.js",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"toml": "^3.0.0",
|
|
75
75
|
"tomlify-j0.4": "^3.0.0",
|
|
76
76
|
"validate-npm-package-name": "^3.0.0",
|
|
77
|
-
"yargs": "^
|
|
77
|
+
"yargs": "^17.3.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"ava": "^3.15.0",
|
package/src/bin/flags.js
CHANGED
|
@@ -20,6 +20,10 @@ export const parseFlags = function () {
|
|
|
20
20
|
return flagsB
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const jsonParse = function (value) {
|
|
24
|
+
return value === undefined ? undefined : JSON.parse(value)
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
// List of CLI flags
|
|
24
28
|
const FLAGS = {
|
|
25
29
|
config: {
|
|
@@ -32,7 +36,7 @@ Defaults to any netlify.toml in the git repository root directory or the base di
|
|
|
32
36
|
describe: `JSON configuration object containing default values.
|
|
33
37
|
Each configuration default value is used unless overriden through the main configuration file.
|
|
34
38
|
Default: none.`,
|
|
35
|
-
coerce:
|
|
39
|
+
coerce: jsonParse,
|
|
36
40
|
hidden: true,
|
|
37
41
|
},
|
|
38
42
|
cachedConfig: {
|
|
@@ -41,7 +45,7 @@ Default: none.`,
|
|
|
41
45
|
or when using @netlify/config programmatically.
|
|
42
46
|
This is done as a performance optimization to cache the configuration loading logic.
|
|
43
47
|
Default: none.`,
|
|
44
|
-
coerce:
|
|
48
|
+
coerce: jsonParse,
|
|
45
49
|
hidden: true,
|
|
46
50
|
},
|
|
47
51
|
cachedConfigPath: {
|
|
@@ -56,7 +60,7 @@ Default: none.`,
|
|
|
56
60
|
string: true,
|
|
57
61
|
describe: `JSON configuration object overriding the configuration file and other settings.
|
|
58
62
|
Default: none.`,
|
|
59
|
-
coerce:
|
|
63
|
+
coerce: jsonParse,
|
|
60
64
|
hidden: true,
|
|
61
65
|
},
|
|
62
66
|
configMutations: {
|
|
@@ -67,7 +71,7 @@ Each change must be an object with three properties:
|
|
|
67
71
|
- "value": new value of that property
|
|
68
72
|
- "event": build event when this change was applied, e.g. "onPreBuild"
|
|
69
73
|
Default: empty array.`,
|
|
70
|
-
coerce:
|
|
74
|
+
coerce: jsonParse,
|
|
71
75
|
hidden: true,
|
|
72
76
|
},
|
|
73
77
|
cwd: {
|