@netlify/build 29.6.9 → 29.7.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.
|
@@ -49,7 +49,7 @@ const coreStep = async function ({ buildDir, constants: { EDGE_FUNCTIONS_DIST: d
|
|
|
49
49
|
tagBundlingError(error);
|
|
50
50
|
throw error;
|
|
51
51
|
}
|
|
52
|
-
await validateEdgeFunctionsManifest({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory } });
|
|
52
|
+
await validateEdgeFunctionsManifest({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory }, featureFlags });
|
|
53
53
|
return {};
|
|
54
54
|
};
|
|
55
55
|
// We run this core step if at least one of the functions directories (the
|
|
@@ -65,16 +65,18 @@ const hasEdgeFunctionsDirectories = async function ({ buildDir, constants: { INT
|
|
|
65
65
|
return await pathExists(internalFunctionsSrc);
|
|
66
66
|
};
|
|
67
67
|
const logFunctions = async ({ internalSrcDirectory, internalSrcPath, logs, srcDirectory: userFunctionsSrc, srcPath, }) => {
|
|
68
|
-
const [userFunctions, internalFunctions] = await Promise.all([
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const [userFunctionsSrcExists, userFunctions, internalFunctions] = await Promise.all([
|
|
69
|
+
srcPath ? pathExists(srcPath) : Promise.resolve(false),
|
|
70
|
+
srcPath ? find([srcPath]) : Promise.resolve([]),
|
|
71
|
+
find([internalSrcPath]),
|
|
72
|
+
]);
|
|
71
73
|
logFunctionsToBundle({
|
|
72
74
|
logs,
|
|
73
75
|
userFunctions: userFunctions.map(({ name }) => name),
|
|
74
76
|
userFunctionsSrc,
|
|
75
77
|
userFunctionsSrcExists,
|
|
76
78
|
internalFunctions: internalFunctions.map(({ name }) => name),
|
|
77
|
-
internalFunctionsSrc,
|
|
79
|
+
internalFunctionsSrc: internalSrcDirectory,
|
|
78
80
|
type: 'Edge Functions',
|
|
79
81
|
});
|
|
80
82
|
};
|
package/lib/plugins_core/edge_functions/validate_manifest/validate_edge_functions_manifest.js
CHANGED
|
@@ -2,14 +2,14 @@ import { promises as fs } from 'fs';
|
|
|
2
2
|
import { join, resolve } from 'path';
|
|
3
3
|
import { ManifestValidationError, validateManifest } from '@netlify/edge-bundler';
|
|
4
4
|
import { addErrorInfo } from '../../../error/info.js';
|
|
5
|
-
export const validateEdgeFunctionsManifest = async function ({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory }, }) {
|
|
5
|
+
export const validateEdgeFunctionsManifest = async function ({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory }, featureFlags, }) {
|
|
6
6
|
const edgeFunctionsDistPath = resolve(buildDir, distDirectory);
|
|
7
7
|
const manifestPath = join(edgeFunctionsDistPath, 'manifest.json');
|
|
8
8
|
const data = await fs.readFile(manifestPath);
|
|
9
9
|
// @ts-expect-error TypeScript is not aware that parse can handle Buffer
|
|
10
10
|
const manifestData = JSON.parse(data);
|
|
11
11
|
try {
|
|
12
|
-
validateManifest(manifestData);
|
|
12
|
+
validateManifest(manifestData, featureFlags);
|
|
13
13
|
}
|
|
14
14
|
catch (error) {
|
|
15
15
|
if (error instanceof ManifestValidationError) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.7.0",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -66,15 +66,15 @@
|
|
|
66
66
|
"@bugsnag/js": "^7.0.0",
|
|
67
67
|
"@netlify/cache-utils": "^5.1.3",
|
|
68
68
|
"@netlify/config": "^20.3.6",
|
|
69
|
-
"@netlify/edge-bundler": "8.
|
|
69
|
+
"@netlify/edge-bundler": "8.12.2",
|
|
70
70
|
"@netlify/framework-info": "^9.8.5",
|
|
71
71
|
"@netlify/functions-utils": "^5.2.1",
|
|
72
72
|
"@netlify/git-utils": "^5.1.1",
|
|
73
73
|
"@netlify/plugins-list": "^6.66.0",
|
|
74
74
|
"@netlify/run-utils": "^5.1.0",
|
|
75
|
-
"@netlify/zip-it-and-ship-it": "
|
|
75
|
+
"@netlify/zip-it-and-ship-it": "8.9.0",
|
|
76
76
|
"@sindresorhus/slugify": "^2.0.0",
|
|
77
|
-
"ansi-escapes": "^
|
|
77
|
+
"ansi-escapes": "^6.0.0",
|
|
78
78
|
"chalk": "^5.0.0",
|
|
79
79
|
"clean-stack": "^4.0.0",
|
|
80
80
|
"execa": "^6.0.0",
|
|
@@ -147,5 +147,5 @@
|
|
|
147
147
|
"module": "commonjs"
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "ce8bde86a58cf2878b21dcddd838fd3965a27196"
|
|
151
151
|
}
|