@netlify/build 35.1.6 → 35.1.8
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.
|
@@ -28,7 +28,23 @@ const coreStep = async function ({ buildDir, packagePath, constants: { EDGE_FUNC
|
|
|
28
28
|
importMapPaths.push(frameworkImportMap);
|
|
29
29
|
}
|
|
30
30
|
const sourcePaths = [...generatedFunctionPaths, srcPath].filter(Boolean);
|
|
31
|
-
|
|
31
|
+
const [userFunctionsSrcExists, userFunctions, internalFunctions, frameworkFunctions] = await Promise.all([
|
|
32
|
+
srcPath ? pathExists(srcPath) : Promise.resolve(false),
|
|
33
|
+
srcPath ? find([srcPath]) : Promise.resolve([]),
|
|
34
|
+
find([internalSrcPath]),
|
|
35
|
+
frameworksAPISrcPath ? find([frameworksAPISrcPath]) : Promise.resolve([]),
|
|
36
|
+
]);
|
|
37
|
+
logFunctionsToBundle({
|
|
38
|
+
logs,
|
|
39
|
+
userFunctions: userFunctions.map(({ name }) => name),
|
|
40
|
+
userFunctionsSrc: srcDirectory,
|
|
41
|
+
userFunctionsSrcExists,
|
|
42
|
+
internalFunctions: internalFunctions.map(({ name }) => name),
|
|
43
|
+
internalFunctionsSrc: internalSrcDirectory,
|
|
44
|
+
frameworkFunctions: frameworkFunctions.map(({ name }) => name),
|
|
45
|
+
type: 'Edge Functions',
|
|
46
|
+
generatedFunctions: {},
|
|
47
|
+
});
|
|
32
48
|
// If we're running in buildbot, we set the Deno cache dir to a directory
|
|
33
49
|
// that is persisted between builds.
|
|
34
50
|
const cacheDirectory = !isRunningLocally ? resolve(buildDir, DENO_CLI_CACHE_DIRECTORY) : undefined;
|
|
@@ -40,6 +56,9 @@ const coreStep = async function ({ buildDir, packagePath, constants: { EDGE_FUNC
|
|
|
40
56
|
catch {
|
|
41
57
|
// no-op
|
|
42
58
|
}
|
|
59
|
+
if (userFunctions.length === 0 && internalFunctions.length === 0 && frameworkFunctions.length === 0) {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
43
62
|
let vendorDirectory;
|
|
44
63
|
// If we're building locally, set a vendor directory in `internalSrcPath`.
|
|
45
64
|
// This makes Edge Bundler keep the vendor files around after the build,
|
|
@@ -107,25 +126,6 @@ const hasEdgeFunctionsDirectories = async function ({ buildDir, constants: { INT
|
|
|
107
126
|
const frameworkFunctionsSrc = resolve(buildDir, packagePath || '', FRAMEWORKS_API_EDGE_FUNCTIONS_PATH);
|
|
108
127
|
return await pathExists(frameworkFunctionsSrc);
|
|
109
128
|
};
|
|
110
|
-
const logFunctions = async ({ frameworksAPISrcPath, internalSrcDirectory, internalSrcPath, logs, srcDirectory: userFunctionsSrc, srcPath, }) => {
|
|
111
|
-
const [userFunctionsSrcExists, userFunctions, internalFunctions, frameworkFunctions] = await Promise.all([
|
|
112
|
-
srcPath ? pathExists(srcPath) : Promise.resolve(false),
|
|
113
|
-
srcPath ? find([srcPath]) : Promise.resolve([]),
|
|
114
|
-
find([internalSrcPath]),
|
|
115
|
-
frameworksAPISrcPath ? find([frameworksAPISrcPath]) : Promise.resolve([]),
|
|
116
|
-
]);
|
|
117
|
-
logFunctionsToBundle({
|
|
118
|
-
logs,
|
|
119
|
-
userFunctions: userFunctions.map(({ name }) => name),
|
|
120
|
-
userFunctionsSrc,
|
|
121
|
-
userFunctionsSrcExists,
|
|
122
|
-
internalFunctions: internalFunctions.map(({ name }) => name),
|
|
123
|
-
internalFunctionsSrc: internalSrcDirectory,
|
|
124
|
-
frameworkFunctions: frameworkFunctions.map(({ name }) => name),
|
|
125
|
-
type: 'Edge Functions',
|
|
126
|
-
generatedFunctions: {},
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
129
|
export const bundleEdgeFunctions = {
|
|
130
130
|
event: 'onBuild',
|
|
131
131
|
coreStep,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "35.1.
|
|
3
|
+
"version": "35.1.8",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
"license": "MIT",
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@bugsnag/js": "^8.0.0",
|
|
70
|
-
"@netlify/blobs": "^10.0.
|
|
70
|
+
"@netlify/blobs": "^10.0.11",
|
|
71
71
|
"@netlify/cache-utils": "^6.0.4",
|
|
72
|
-
"@netlify/config": "^24.0.
|
|
73
|
-
"@netlify/edge-bundler": "14.5.
|
|
74
|
-
"@netlify/functions-utils": "^6.2.
|
|
72
|
+
"@netlify/config": "^24.0.4",
|
|
73
|
+
"@netlify/edge-bundler": "14.5.6",
|
|
74
|
+
"@netlify/functions-utils": "^6.2.8",
|
|
75
75
|
"@netlify/git-utils": "^6.0.2",
|
|
76
76
|
"@netlify/opentelemetry-utils": "^2.0.1",
|
|
77
77
|
"@netlify/plugins-list": "^6.80.0",
|
|
78
78
|
"@netlify/run-utils": "^6.0.2",
|
|
79
|
-
"@netlify/zip-it-and-ship-it": "14.1.
|
|
79
|
+
"@netlify/zip-it-and-ship-it": "14.1.8",
|
|
80
80
|
"@sindresorhus/slugify": "^2.0.0",
|
|
81
81
|
"ansi-escapes": "^7.0.0",
|
|
82
82
|
"ansis": "^4.1.0",
|
|
@@ -152,5 +152,5 @@
|
|
|
152
152
|
"engines": {
|
|
153
153
|
"node": ">=18.14.0"
|
|
154
154
|
},
|
|
155
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "ce591ef6a6fb974be2a38812a1e0abc98c3c14f6"
|
|
156
156
|
}
|