@netlify/build 26.4.0 → 26.5.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.5.1",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./src/core/main.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@netlify/functions-utils": "^4.0.0",
|
|
62
62
|
"@netlify/git-utils": "^4.0.0",
|
|
63
63
|
"@netlify/plugin-edge-handlers": "^3.0.7",
|
|
64
|
-
"@netlify/plugins-list": "^6.
|
|
64
|
+
"@netlify/plugins-list": "^6.17.0",
|
|
65
65
|
"@netlify/run-utils": "^4.0.0",
|
|
66
66
|
"@netlify/zip-it-and-ship-it": "5.9.0",
|
|
67
67
|
"@sindresorhus/slugify": "^2.0.0",
|
package/src/core/constants.js
CHANGED
|
@@ -44,11 +44,15 @@ export const getConstants = async function ({
|
|
|
44
44
|
// The directory where internal functions (i.e. generated programmatically
|
|
45
45
|
// via plugins or others) live
|
|
46
46
|
INTERNAL_FUNCTIONS_SRC: `${buildDir}/${INTERNAL_FUNCTIONS_SRC}`,
|
|
47
|
+
// The directory where internal Edge Handlers (i.e. generated programmatically
|
|
48
|
+
// via plugins or others) live
|
|
49
|
+
INTERNAL_EDGE_HANDLERS_SRC: `${buildDir}/${INTERNAL_EDGE_HANDLERS_SRC}`,
|
|
47
50
|
}
|
|
48
51
|
const constantsA = await addMutableConstants({ constants, buildDir, netlifyConfig })
|
|
49
52
|
return constantsA
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
const INTERNAL_EDGE_HANDLERS_SRC = '.netlify/edge-handlers'
|
|
52
56
|
const INTERNAL_FUNCTIONS_SRC = '.netlify/functions-internal'
|
|
53
57
|
|
|
54
58
|
// Retrieve constants which might change during the build if a plugin modifies
|
|
@@ -144,6 +148,7 @@ const CONSTANT_PATHS = new Set([
|
|
|
144
148
|
'PUBLISH_DIR',
|
|
145
149
|
'FUNCTIONS_SRC',
|
|
146
150
|
'FUNCTIONS_DIST',
|
|
151
|
+
'INTERNAL_EDGE_HANDLERS_SRC',
|
|
147
152
|
'INTERNAL_FUNCTIONS_SRC',
|
|
148
153
|
'EDGE_HANDLERS_DIST',
|
|
149
154
|
'EDGE_HANDLERS_SRC',
|
|
@@ -89,7 +89,10 @@ const getApp = function () {
|
|
|
89
89
|
// But we change it back after Bugsnag is done reporting.
|
|
90
90
|
const updateErrorName = function (error, type) {
|
|
91
91
|
const { name } = error
|
|
92
|
-
|
|
92
|
+
// This might fail if `name` is a getter or is non-writable.
|
|
93
|
+
try {
|
|
94
|
+
error.name = type
|
|
95
|
+
} catch {}
|
|
93
96
|
return name
|
|
94
97
|
}
|
|
95
98
|
|
package/src/plugins/error.js
CHANGED
|
@@ -36,7 +36,10 @@ const normalizeError = function (type, func, message, { error } = {}) {
|
|
|
36
36
|
|
|
37
37
|
const getError = function (error, message, func) {
|
|
38
38
|
if (error instanceof Error) {
|
|
39
|
-
|
|
39
|
+
// This might fail if `name` is a getter or is non-writable.
|
|
40
|
+
try {
|
|
41
|
+
error.message = `${message}\n${error.message}`
|
|
42
|
+
} catch {}
|
|
40
43
|
return error
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -13,6 +13,11 @@ export interface NetlifyPluginConstants {
|
|
|
13
13
|
* `undefined` if no `netlify/functions` directory exists in the base directory and if not specified by the user.
|
|
14
14
|
*/
|
|
15
15
|
FUNCTIONS_SRC?: string
|
|
16
|
+
/**
|
|
17
|
+
* the directory where internal Edge Handlers source code lives. This is where build plugins should place auto-generated handlers.
|
|
18
|
+
* `undefined` if the version of @netlify/build does not support internal Edge Handlers
|
|
19
|
+
*/
|
|
20
|
+
INTERNAL_EDGE_HANDLERS_SRC?: string
|
|
16
21
|
/**
|
|
17
22
|
* the directory where internal function source code lives. This is where build plugins should place auto-generated functions.
|
|
18
23
|
* `undefined` if the version of @netlify/build does not support internal functions
|