@netlify/build 29.20.1 → 29.20.3
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/lib/core/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { relative, normalize } from 'path';
|
|
1
|
+
import { relative, normalize, join } from 'path';
|
|
2
2
|
import { getCacheDir } from '@netlify/cache-utils';
|
|
3
3
|
import mapObj from 'map-obj';
|
|
4
4
|
import { pathExists } from 'path-exists';
|
|
@@ -13,9 +13,9 @@ export const getConstants = async function ({ configPath, buildDir, packagePath,
|
|
|
13
13
|
// In monorepos this is the path that is used to point to a package that should be deployed
|
|
14
14
|
PACKAGE_PATH: packagePath,
|
|
15
15
|
// The directory where built serverless functions are placed before deployment
|
|
16
|
-
FUNCTIONS_DIST: functionsDistDir,
|
|
16
|
+
FUNCTIONS_DIST: join(packagePath || '', functionsDistDir),
|
|
17
17
|
// The directory where built Edge Functions are placed before deployment
|
|
18
|
-
EDGE_FUNCTIONS_DIST: edgeFunctionsDistDir,
|
|
18
|
+
EDGE_FUNCTIONS_DIST: join(packagePath || '', edgeFunctionsDistDir),
|
|
19
19
|
// Path to the Netlify build cache folder
|
|
20
20
|
CACHE_DIR: normalizedCacheDir,
|
|
21
21
|
// Boolean indicating whether the build was run locally (Netlify CLI) or in the production CI
|
|
@@ -30,10 +30,10 @@ export const getConstants = async function ({ configPath, buildDir, packagePath,
|
|
|
30
30
|
NETLIFY_API_HOST: apiHost,
|
|
31
31
|
// The directory where internal functions (i.e. generated programmatically
|
|
32
32
|
// via plugins or others) live
|
|
33
|
-
INTERNAL_FUNCTIONS_SRC:
|
|
33
|
+
INTERNAL_FUNCTIONS_SRC: join(buildDir, packagePath || '', INTERNAL_FUNCTIONS_SRC),
|
|
34
34
|
// The directory where internal Edge Functions (i.e. generated programmatically
|
|
35
35
|
// via plugins or others) live
|
|
36
|
-
INTERNAL_EDGE_FUNCTIONS_SRC:
|
|
36
|
+
INTERNAL_EDGE_FUNCTIONS_SRC: join(buildDir, packagePath || '', INTERNAL_EDGE_FUNCTIONS_SRC),
|
|
37
37
|
};
|
|
38
38
|
const constantsA = await addMutableConstants({ constants, buildDir, netlifyConfig });
|
|
39
39
|
return constantsA;
|
|
@@ -39,7 +39,7 @@ const getBuildSteps = function (buildSteps) {
|
|
|
39
39
|
const allSteps = getSteps([]).steps.filter(({ coreStepId }) => buildSteps.includes(coreStepId));
|
|
40
40
|
return allSteps;
|
|
41
41
|
};
|
|
42
|
-
const executeBuildStep = async function ({ config, packagePath, defaultConfig, cachedConfig, debug, nodePath, functionsDistDir, edgeFunctionsDistDir, errorMonitor, mode, logs, errorParams, featureFlags, buildSteps, repositoryRoot, systemLog, }) {
|
|
42
|
+
const executeBuildStep = async function ({ config, packagePath, defaultConfig, cachedConfig, debug, nodePath, functionsDistDir, edgeFunctionsDistDir, errorMonitor, mode, logs, errorParams, featureFlags, buildSteps, repositoryRoot, systemLog, edgeFunctionsBootstrapURL, }) {
|
|
43
43
|
const configOpts = getConfigOpts({
|
|
44
44
|
config,
|
|
45
45
|
defaultConfig,
|
|
@@ -79,6 +79,7 @@ const executeBuildStep = async function ({ config, packagePath, defaultConfig, c
|
|
|
79
79
|
buildSteps,
|
|
80
80
|
repositoryRoot: repositoryRootA,
|
|
81
81
|
systemLog,
|
|
82
|
+
edgeFunctionsBootstrapURL,
|
|
82
83
|
});
|
|
83
84
|
return {
|
|
84
85
|
netlifyConfig: netlifyConfigA,
|
|
@@ -100,7 +101,7 @@ const executeBuildStep = async function ({ config, packagePath, defaultConfig, c
|
|
|
100
101
|
throw error;
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
const runBuildStep = async function ({ netlifyConfig, buildDir, nodePath, constants, logs, debug, featureFlags, childEnv, buildSteps, repositoryRoot, systemLog, }) {
|
|
104
|
+
const runBuildStep = async function ({ netlifyConfig, buildDir, nodePath, constants, logs, debug, featureFlags, childEnv, buildSteps, repositoryRoot, systemLog, edgeFunctionsBootstrapURL, }) {
|
|
104
105
|
const { netlifyConfig: netlifyConfigA, configMutations } = await runSteps({
|
|
105
106
|
steps: getBuildSteps(buildSteps),
|
|
106
107
|
buildDir,
|
|
@@ -114,6 +115,7 @@ const runBuildStep = async function ({ netlifyConfig, buildDir, nodePath, consta
|
|
|
114
115
|
childEnv,
|
|
115
116
|
repositoryRoot,
|
|
116
117
|
systemLog,
|
|
118
|
+
edgeFunctionsBootstrapURL,
|
|
117
119
|
});
|
|
118
120
|
return { netlifyConfig: netlifyConfigA, configMutations };
|
|
119
121
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.20.
|
|
3
|
+
"version": "29.20.3",
|
|
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": "fc41c8cb9b132dbda8615408067a6618878041aa"
|
|
152
152
|
}
|
|
@@ -13,6 +13,13 @@ 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
|
+
/**
|
|
18
|
+
* the directory inside a mono repository where it collects the settings from.
|
|
19
|
+
* This is the value of the package directory field of the build settings
|
|
20
|
+
* `undefined` if none is set.
|
|
21
|
+
*/
|
|
22
|
+
PACKAGE_PATH?: string
|
|
16
23
|
/**
|
|
17
24
|
* the directory where internal Edge Functions source code lives. This is where build plugins should place auto-generated functions.
|
|
18
25
|
* `undefined` if the version of @netlify/build does not support internal Edge Functions
|