@netlify/config 17.0.12 → 17.0.13
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 +1 -1
- package/src/log/cleanup.js +14 -1
package/package.json
CHANGED
package/src/log/cleanup.js
CHANGED
|
@@ -48,7 +48,9 @@ export const cleanupConfig = function ({
|
|
|
48
48
|
functions,
|
|
49
49
|
functionsDirectory,
|
|
50
50
|
})
|
|
51
|
-
|
|
51
|
+
const netlifyConfigA = truncateArray(netlifyConfig, 'headers')
|
|
52
|
+
const netlifyConfigB = truncateArray(netlifyConfigA, 'redirects')
|
|
53
|
+
return netlifyConfigB
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export const cleanupEnvironment = function (environment) {
|
|
@@ -77,3 +79,14 @@ const cleanupPlugin = function ({ package: packageName, origin, inputs = {} }) {
|
|
|
77
79
|
const isPublicInput = function (key, input) {
|
|
78
80
|
return typeof input === 'boolean'
|
|
79
81
|
}
|
|
82
|
+
|
|
83
|
+
// `headers` and `redirects` can be very long, which can take several minutes
|
|
84
|
+
// to print in the build logs. We truncate them before logging.
|
|
85
|
+
const truncateArray = function (netlifyConfig, propName) {
|
|
86
|
+
const array = netlifyConfig[propName]
|
|
87
|
+
return Array.isArray(array) && array.length > MAX_ARRAY_LENGTH
|
|
88
|
+
? { ...netlifyConfig, [propName]: array.slice(0, MAX_ARRAY_LENGTH) }
|
|
89
|
+
: netlifyConfig
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const MAX_ARRAY_LENGTH = 100
|