@netlify/build 29.20.3 → 29.20.4
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.
|
@@ -8,11 +8,11 @@ import { validateEdgeFunctionsManifest } from './validate_manifest/validate_edge
|
|
|
8
8
|
// TODO: Replace this with a custom cache directory.
|
|
9
9
|
const DENO_CLI_CACHE_DIRECTORY = '.netlify/plugins/deno-cli';
|
|
10
10
|
const IMPORT_MAP_FILENAME = 'edge-functions-import-map.json';
|
|
11
|
-
const coreStep = async function ({ buildDir,
|
|
11
|
+
const coreStep = async function ({ buildDir, constants: { EDGE_FUNCTIONS_DIST: distDirectory, EDGE_FUNCTIONS_SRC: srcDirectory, INTERNAL_EDGE_FUNCTIONS_SRC: internalSrcDirectory, IS_LOCAL: isRunningLocally, }, debug, systemLog, featureFlags, logs, netlifyConfig, edgeFunctionsBootstrapURL, }) {
|
|
12
12
|
const { edge_functions: declarations = [] } = netlifyConfig;
|
|
13
13
|
const { deno_import_map: userDefinedImportMap } = netlifyConfig.functions['*'];
|
|
14
|
-
const distPath = resolve(buildDir,
|
|
15
|
-
const internalSrcPath = resolve(buildDir,
|
|
14
|
+
const distPath = resolve(buildDir, distDirectory);
|
|
15
|
+
const internalSrcPath = resolve(buildDir, internalSrcDirectory);
|
|
16
16
|
const distImportMapPath = join(dirname(internalSrcPath), IMPORT_MAP_FILENAME);
|
|
17
17
|
const srcPath = srcDirectory ? resolve(buildDir, srcDirectory) : undefined;
|
|
18
18
|
const sourcePaths = [internalSrcPath, srcPath].filter(Boolean);
|
|
@@ -73,12 +73,12 @@ const getMetrics = (manifest) => {
|
|
|
73
73
|
// one configured by the user or the internal one) exists. We use a dynamic
|
|
74
74
|
// `condition` because the directories might be created by the build command
|
|
75
75
|
// or plugins.
|
|
76
|
-
const hasEdgeFunctionsDirectories = async function ({ buildDir,
|
|
76
|
+
const hasEdgeFunctionsDirectories = async function ({ buildDir, constants: { INTERNAL_EDGE_FUNCTIONS_SRC, EDGE_FUNCTIONS_SRC }, }) {
|
|
77
77
|
const hasFunctionsSrc = EDGE_FUNCTIONS_SRC !== undefined && EDGE_FUNCTIONS_SRC !== '';
|
|
78
78
|
if (hasFunctionsSrc) {
|
|
79
79
|
return true;
|
|
80
80
|
}
|
|
81
|
-
const internalFunctionsSrc = resolve(buildDir,
|
|
81
|
+
const internalFunctionsSrc = resolve(buildDir, INTERNAL_EDGE_FUNCTIONS_SRC);
|
|
82
82
|
return await pathExists(internalFunctionsSrc);
|
|
83
83
|
};
|
|
84
84
|
const logFunctions = async ({ internalSrcDirectory, internalSrcPath, logs, srcDirectory: userFunctionsSrc, srcPath, }) => {
|
|
@@ -39,10 +39,10 @@ const zipFunctionsAndLogResults = async ({ buildDir, childEnv, featureFlags, fun
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
// Plugin to package Netlify functions with @netlify/zip-it-and-ship-it
|
|
42
|
-
const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir,
|
|
42
|
+
const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC: relativeInternalFunctionsSrc, IS_LOCAL: isRunningLocally, FUNCTIONS_SRC: relativeFunctionsSrc, FUNCTIONS_DIST: relativeFunctionsDist, }, buildDir, logs, netlifyConfig, featureFlags, repositoryRoot, userNodeVersion, systemLog, }) {
|
|
43
43
|
const functionsSrc = relativeFunctionsSrc === undefined ? undefined : resolve(buildDir, relativeFunctionsSrc);
|
|
44
|
-
const functionsDist = resolve(buildDir,
|
|
45
|
-
const internalFunctionsSrc = resolve(buildDir,
|
|
44
|
+
const functionsDist = resolve(buildDir, relativeFunctionsDist);
|
|
45
|
+
const internalFunctionsSrc = resolve(buildDir, relativeInternalFunctionsSrc);
|
|
46
46
|
const internalFunctionsSrcExists = await pathExists(internalFunctionsSrc);
|
|
47
47
|
const functionsSrcExists = await validateFunctionsSrc({ functionsSrc, relativeFunctionsSrc });
|
|
48
48
|
const [userFunctions = [], internalFunctions = []] = await getUserAndInternalFunctions({
|
|
@@ -95,12 +95,12 @@ const coreStep = async function ({ childEnv, constants: { INTERNAL_FUNCTIONS_SRC
|
|
|
95
95
|
// one configured by the user or the internal one) exists. We use a dynamic
|
|
96
96
|
// `condition` because the directories might be created by the build command
|
|
97
97
|
// or plugins.
|
|
98
|
-
const hasFunctionsDirectories = async function ({ buildDir,
|
|
98
|
+
const hasFunctionsDirectories = async function ({ buildDir, constants: { INTERNAL_FUNCTIONS_SRC, FUNCTIONS_SRC } }) {
|
|
99
99
|
const hasFunctionsSrc = FUNCTIONS_SRC !== undefined && FUNCTIONS_SRC !== '';
|
|
100
100
|
if (hasFunctionsSrc) {
|
|
101
101
|
return true;
|
|
102
102
|
}
|
|
103
|
-
const internalFunctionsSrc = resolve(buildDir,
|
|
103
|
+
const internalFunctionsSrc = resolve(buildDir, INTERNAL_FUNCTIONS_SRC);
|
|
104
104
|
return await pathExists(internalFunctionsSrc);
|
|
105
105
|
};
|
|
106
106
|
export const bundleFunctions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.20.
|
|
3
|
+
"version": "29.20.4",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -148,5 +148,5 @@
|
|
|
148
148
|
"module": "commonjs"
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
"gitHead": "
|
|
151
|
+
"gitHead": "676328d0727b74cf9bd8e263b3b2fbfcefa281ac"
|
|
152
152
|
}
|