@netlify/build 29.12.7 → 29.13.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.
package/lib/core/build.js
CHANGED
|
@@ -31,7 +31,7 @@ export const startBuild = function (flags) {
|
|
|
31
31
|
const errorMonitor = startErrorMonitor({ flags: flagsA, logs, bugsnagKey });
|
|
32
32
|
return { ...flagsA, errorMonitor, logs, timers };
|
|
33
33
|
};
|
|
34
|
-
const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, framework, }) {
|
|
34
|
+
const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, framework, explicitSecretKeys, }) {
|
|
35
35
|
const configOpts = getConfigOpts({
|
|
36
36
|
config,
|
|
37
37
|
defaultConfig,
|
|
@@ -126,6 +126,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
|
|
|
126
126
|
timeline,
|
|
127
127
|
devCommand,
|
|
128
128
|
quiet,
|
|
129
|
+
explicitSecretKeys,
|
|
129
130
|
});
|
|
130
131
|
return {
|
|
131
132
|
pluginsOptions: pluginsOptionsA,
|
|
@@ -140,7 +141,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
|
|
|
140
141
|
};
|
|
141
142
|
export const execBuild = measureDuration(tExecBuild, 'total', { parentTag: 'build_site' });
|
|
142
143
|
// Runs a build then report any plugin statuses
|
|
143
|
-
export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, }) {
|
|
144
|
+
export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, explicitSecretKeys, }) {
|
|
144
145
|
try {
|
|
145
146
|
const { stepsCount, netlifyConfig: netlifyConfigA, statuses, pluginsOptions: pluginsOptionsA, failedPlugins, timers: timersA, configMutations, metrics, } = await initAndRunBuild({
|
|
146
147
|
pluginsOptions,
|
|
@@ -179,6 +180,7 @@ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig
|
|
|
179
180
|
timeline,
|
|
180
181
|
devCommand,
|
|
181
182
|
quiet,
|
|
183
|
+
explicitSecretKeys,
|
|
182
184
|
});
|
|
183
185
|
await Promise.all([
|
|
184
186
|
reportStatuses({
|
|
@@ -239,7 +241,7 @@ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig
|
|
|
239
241
|
}
|
|
240
242
|
};
|
|
241
243
|
// Initialize plugin processes then runs a build
|
|
242
|
-
const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, dry, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, sendStatus, saveConfig, timers, testOpts, buildbotServerSocket, constants, featureFlags, timeline, devCommand, quiet, }) {
|
|
244
|
+
const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, dry, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, sendStatus, saveConfig, timers, testOpts, buildbotServerSocket, constants, featureFlags, timeline, devCommand, quiet, explicitSecretKeys, }) {
|
|
243
245
|
const { pluginsOptions: pluginsOptionsA, timers: timersA } = await getPluginsOptions({
|
|
244
246
|
pluginsOptions,
|
|
245
247
|
netlifyConfig,
|
|
@@ -305,6 +307,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configO
|
|
|
305
307
|
timeline,
|
|
306
308
|
devCommand,
|
|
307
309
|
quiet,
|
|
310
|
+
explicitSecretKeys,
|
|
308
311
|
});
|
|
309
312
|
await Promise.all([
|
|
310
313
|
warnOnMissingSideFiles({ buildDir, netlifyConfig: netlifyConfigA, logs }),
|
|
@@ -332,7 +335,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configO
|
|
|
332
335
|
};
|
|
333
336
|
// Load plugin main files, retrieve their event handlers then runs them,
|
|
334
337
|
// together with the build command
|
|
335
|
-
const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, configOpts, packageJson, configPath, outputConfigPath, userNodeVersion, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, dry, buildbotServerSocket, constants, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, timeline, devCommand, quiet, }) {
|
|
338
|
+
const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, configOpts, packageJson, configPath, outputConfigPath, userNodeVersion, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, dry, buildbotServerSocket, constants, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, timeline, devCommand, quiet, explicitSecretKeys, }) {
|
|
336
339
|
const { pluginsSteps, timers: timersA } = await loadPlugins({
|
|
337
340
|
pluginsOptions,
|
|
338
341
|
childProcesses,
|
|
@@ -379,6 +382,7 @@ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig
|
|
|
379
382
|
featureFlags,
|
|
380
383
|
quiet,
|
|
381
384
|
userNodeVersion,
|
|
385
|
+
explicitSecretKeys,
|
|
382
386
|
});
|
|
383
387
|
return {
|
|
384
388
|
stepsCount,
|
package/lib/core/flags.js
CHANGED
package/lib/steps/core_step.js
CHANGED
|
@@ -2,7 +2,7 @@ import { setEnvChanges } from '../env/changes.js';
|
|
|
2
2
|
import { addErrorInfo, isBuildError } from '../error/info.js';
|
|
3
3
|
import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js';
|
|
4
4
|
// Fire a core step
|
|
5
|
-
export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, constants, buildbotServerSocket, events, logs, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, }) {
|
|
5
|
+
export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, constants, buildbotServerSocket, events, logs, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, }) {
|
|
6
6
|
try {
|
|
7
7
|
const configSideFiles = await listConfigSideFiles([headersPath, redirectsPath]);
|
|
8
8
|
const childEnvA = setEnvChanges(envChanges, { ...childEnv });
|
|
@@ -28,6 +28,7 @@ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName
|
|
|
28
28
|
systemLog,
|
|
29
29
|
saveConfig,
|
|
30
30
|
userNodeVersion,
|
|
31
|
+
explicitSecretKeys,
|
|
31
32
|
});
|
|
32
33
|
const { netlifyConfig: netlifyConfigA, configMutations: configMutationsA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await updateNetlifyConfig({
|
|
33
34
|
configOpts,
|
package/lib/steps/run_step.js
CHANGED
|
@@ -7,7 +7,7 @@ import { fireCoreStep } from './core_step.js';
|
|
|
7
7
|
import { firePluginStep } from './plugin.js';
|
|
8
8
|
import { getStepReturn } from './return.js';
|
|
9
9
|
// Run a step (core, build command or plugin)
|
|
10
|
-
export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, }) {
|
|
10
|
+
export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, }) {
|
|
11
11
|
const constantsA = await addMutableConstants({ constants, buildDir, netlifyConfig });
|
|
12
12
|
if (!(await shouldRunStep({
|
|
13
13
|
event,
|
|
@@ -20,6 +20,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
|
|
|
20
20
|
buildbotServerSocket,
|
|
21
21
|
buildDir,
|
|
22
22
|
saveConfig,
|
|
23
|
+
explicitSecretKeys,
|
|
23
24
|
}))) {
|
|
24
25
|
return {};
|
|
25
26
|
}
|
|
@@ -65,6 +66,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
|
|
|
65
66
|
redirectsPath,
|
|
66
67
|
featureFlags,
|
|
67
68
|
userNodeVersion,
|
|
69
|
+
explicitSecretKeys,
|
|
68
70
|
});
|
|
69
71
|
const newValues = await getStepReturn({
|
|
70
72
|
event,
|
|
@@ -125,10 +127,10 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
|
|
|
125
127
|
// or available. However, one might be created by a build plugin, in which case,
|
|
126
128
|
// those core plugins should be triggered. We use a dynamic `condition()` to
|
|
127
129
|
// model this behavior.
|
|
128
|
-
const shouldRunStep = async function ({ event, packageName, error, failedPlugins, netlifyConfig, condition, constants, buildbotServerSocket, buildDir, saveConfig, }) {
|
|
130
|
+
const shouldRunStep = async function ({ event, packageName, error, failedPlugins, netlifyConfig, condition, constants, buildbotServerSocket, buildDir, saveConfig, explicitSecretKeys, }) {
|
|
129
131
|
if (failedPlugins.includes(packageName) ||
|
|
130
132
|
(condition !== undefined &&
|
|
131
|
-
!(await condition({ buildDir, constants, buildbotServerSocket, netlifyConfig, saveConfig })))) {
|
|
133
|
+
!(await condition({ buildDir, constants, buildbotServerSocket, netlifyConfig, saveConfig, explicitSecretKeys })))) {
|
|
132
134
|
return false;
|
|
133
135
|
}
|
|
134
136
|
if (error !== undefined) {
|
|
@@ -144,7 +146,7 @@ const getFireStep = function (packageName, coreStepId, event) {
|
|
|
144
146
|
const parentTag = normalizeTagName(packageName);
|
|
145
147
|
return measureDuration(tFireStep, event, { parentTag, category: 'pluginEvent' });
|
|
146
148
|
};
|
|
147
|
-
const tFireStep = function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, }) {
|
|
149
|
+
const tFireStep = function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, explicitSecretKeys, }) {
|
|
148
150
|
if (coreStep !== undefined) {
|
|
149
151
|
return fireCoreStep({
|
|
150
152
|
coreStep,
|
|
@@ -174,6 +176,7 @@ const tFireStep = function ({ event, childProcess, packageName, pluginPackageJso
|
|
|
174
176
|
systemLog,
|
|
175
177
|
saveConfig,
|
|
176
178
|
userNodeVersion,
|
|
179
|
+
explicitSecretKeys,
|
|
177
180
|
});
|
|
178
181
|
}
|
|
179
182
|
return firePluginStep({
|
package/lib/steps/run_steps.js
CHANGED
|
@@ -7,7 +7,7 @@ import { runStep } from './run_step.js';
|
|
|
7
7
|
// list of `failedPlugins` (that ran `utils.build.failPlugin()`).
|
|
8
8
|
// If an error arises, runs `onError` events.
|
|
9
9
|
// Runs `onEnd` events at the end, whether an error was thrown or not.
|
|
10
|
-
export const runSteps = async function ({ steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, }) {
|
|
10
|
+
export const runSteps = async function ({ steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, }) {
|
|
11
11
|
const { index: stepsCount, error: errorA, netlifyConfig: netlifyConfigC, statuses: statusesB, failedPlugins: failedPluginsA, timers: timersC, configMutations: configMutationsB, metrics: metricsC, } = await pReduce(steps, async ({ index, error, failedPlugins, envChanges, netlifyConfig: netlifyConfigA, configMutations, headersPath: headersPathA, redirectsPath: redirectsPathA, statuses, timers: timersA, metrics: metricsA, }, { event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, pluginPackageJson, loadedFrom, origin, condition, }) => {
|
|
12
12
|
const { newIndex = index, newError = error, failedPlugin = [], newEnvChanges = {}, netlifyConfig: netlifyConfigB = netlifyConfigA, configMutations: configMutationsA = configMutations, headersPath: headersPathB = headersPathA, redirectsPath: redirectsPathB = redirectsPathA, newStatus, timers: timersB = timersA, metrics: metricsB = [], } = await runStep({
|
|
13
13
|
event,
|
|
@@ -57,6 +57,7 @@ export const runSteps = async function ({ steps, buildbotServerSocket, events, c
|
|
|
57
57
|
featureFlags,
|
|
58
58
|
quiet,
|
|
59
59
|
userNodeVersion,
|
|
60
|
+
explicitSecretKeys,
|
|
60
61
|
});
|
|
61
62
|
const statusesA = addStatus({ newStatus, statuses, event, packageName, pluginPackageJson });
|
|
62
63
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.13.0",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"@netlify/config": "^20.5.1",
|
|
69
69
|
"@netlify/edge-bundler": "8.16.2",
|
|
70
70
|
"@netlify/framework-info": "^9.8.10",
|
|
71
|
-
"@netlify/functions-utils": "^5.2.
|
|
71
|
+
"@netlify/functions-utils": "^5.2.13",
|
|
72
72
|
"@netlify/git-utils": "^5.1.1",
|
|
73
73
|
"@netlify/plugins-list": "^6.68.0",
|
|
74
74
|
"@netlify/run-utils": "^5.1.1",
|
|
75
|
-
"@netlify/zip-it-and-ship-it": "9.
|
|
75
|
+
"@netlify/zip-it-and-ship-it": "9.10.0",
|
|
76
76
|
"@sindresorhus/slugify": "^2.0.0",
|
|
77
77
|
"ansi-escapes": "^6.0.0",
|
|
78
78
|
"chalk": "^5.0.0",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"module": "commonjs"
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "3e5ee219f4ea545f7f1ed379fc658ef0a5860387"
|
|
150
150
|
}
|