@netlify/build 29.50.6 → 29.51.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.
@@ -32,10 +32,10 @@ export declare const startBuild: (flags: Partial<BuildFlags>) => {
32
32
  };
33
33
  };
34
34
  export declare const execBuild: any;
35
- export declare const runAndReportBuild: ({ pluginsOptions, netlifyConfig, cachedConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }: {
35
+ export declare const runAndReportBuild: ({ pluginsOptions, netlifyConfig, defaultConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }: {
36
36
  pluginsOptions: any;
37
37
  netlifyConfig: any;
38
- cachedConfig: any;
38
+ defaultConfig: any;
39
39
  configOpts: any;
40
40
  siteInfo: any;
41
41
  configPath: any;
package/lib/core/build.js CHANGED
@@ -57,6 +57,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
57
57
  const { netlifyConfig, configPath, headersPath, redirectsPath, buildDir, repositoryRoot: repositoryRootA, packageJson, userNodeVersion, childEnv, context: contextA, branch: branchA, token: tokenA, api, siteInfo, timers: timersA, integrations, } = await loadConfig({
58
58
  configOpts,
59
59
  cachedConfig,
60
+ defaultConfig,
60
61
  cachedConfigPath,
61
62
  envOpt,
62
63
  debug,
@@ -97,7 +98,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
97
98
  const { pluginsOptions: pluginsOptionsA, netlifyConfig: netlifyConfigA, stepsCount, timers: timersB, configMutations, metrics, } = await runAndReportBuild({
98
99
  pluginsOptions,
99
100
  netlifyConfig,
100
- cachedConfig,
101
+ defaultConfig,
101
102
  configOpts,
102
103
  siteInfo,
103
104
  configPath,
@@ -153,12 +154,12 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
153
154
  };
154
155
  export const execBuild = measureDuration(tExecBuild, 'total', { parentTag: 'build_site' });
155
156
  // Runs a build then report any plugin statuses
156
- export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, cachedConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
157
+ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, defaultConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, buildDir, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, buildbotServerSocket, constants, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, timers, sendStatus, saveConfig, testOpts, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
157
158
  try {
158
159
  const { stepsCount, netlifyConfig: netlifyConfigA, statuses, pluginsOptions: pluginsOptionsA, failedPlugins, timers: timersA, configMutations, metrics, } = await initAndRunBuild({
159
160
  pluginsOptions,
160
161
  netlifyConfig,
161
- cachedConfig,
162
+ defaultConfig,
162
163
  configOpts,
163
164
  siteInfo,
164
165
  configPath,
@@ -260,7 +261,7 @@ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig
260
261
  }
261
262
  };
262
263
  // Initialize plugin processes then runs a build
263
- const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, cachedConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, sendStatus, saveConfig, timers, testOpts, buildbotServerSocket, constants, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
264
+ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, defaultConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, packageJson, userNodeVersion, childEnv, context, branch, dry, mode, api, token, errorMonitor, deployId, errorParams, logs, debug, systemLog, systemLogFile, verbose, sendStatus, saveConfig, timers, testOpts, buildbotServerSocket, constants, featureFlags, timeline, devCommand, quiet, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
264
265
  const { pluginsOptions: pluginsOptionsA, timers: timersA } = await getPluginsOptions({
265
266
  pluginsOptions,
266
267
  netlifyConfig,
@@ -313,7 +314,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, cachedC
313
314
  childProcesses,
314
315
  pluginsOptions: pluginsOptionsA,
315
316
  netlifyConfig,
316
- cachedConfig,
317
+ defaultConfig,
317
318
  configOpts,
318
319
  packageJson,
319
320
  configPath,
@@ -383,7 +384,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, cachedC
383
384
  };
384
385
  // Load plugin main files, retrieve their event handlers then runs them,
385
386
  // together with the build command
386
- const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, cachedConfig, configOpts, packageJson, configPath, outputConfigPath, userNodeVersion, headersPath, redirectsPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, dry, buildbotServerSocket, constants, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, timeline, devCommand, quiet, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
387
+ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, defaultConfig, configOpts, packageJson, configPath, outputConfigPath, userNodeVersion, headersPath, redirectsPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, dry, buildbotServerSocket, constants, mode, api, errorMonitor, deployId, errorParams, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, timeline, devCommand, quiet, explicitSecretKeys, edgeFunctionsBootstrapURL, eventHandlers, }) {
387
388
  const { pluginsSteps, timers: timersA } = await loadPlugins({
388
389
  pluginsOptions,
389
390
  childProcesses,
@@ -423,7 +424,7 @@ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig
423
424
  deployId,
424
425
  errorParams,
425
426
  netlifyConfig,
426
- cachedConfig,
427
+ defaultConfig,
427
428
  configOpts,
428
429
  logs,
429
430
  debug,
@@ -38,7 +38,7 @@ export function getConfigOpts({ config, defaultConfig, cwd, repositoryRoot, pack
38
38
  featureFlags: any;
39
39
  };
40
40
  export const loadConfig: any;
41
- export function resolveUpdatedConfig(configOpts: any, configMutations: any, cachedConfig: any): Promise<any>;
41
+ export function resolveUpdatedConfig(configOpts: any, configMutations: any, defaultConfig: any): Promise<any>;
42
42
  export function saveUpdatedConfig({ configMutations, buildDir, repositoryRoot, configPath, outputConfigPath, headersPath, redirectsPath, logs, featureFlags, context, branch, debug, saveConfig, }: {
43
43
  configMutations: any;
44
44
  buildDir: any;
@@ -38,8 +38,8 @@ export const getConfigOpts = function ({ config, defaultConfig, cwd, repositoryR
38
38
  };
39
39
  };
40
40
  // Retrieve configuration object
41
- const tLoadConfig = async function ({ configOpts, cachedConfig, cachedConfigPath, envOpt, debug, logs, nodePath, quiet, featureFlags, }) {
42
- const { configPath, headersPath, redirectsPath, buildDir, repositoryRoot, config: netlifyConfig, context: contextA, branch: branchA, token: tokenA, api, siteInfo, env, integrations, } = await resolveInitialConfig(configOpts, cachedConfig, cachedConfigPath, featureFlags);
41
+ const tLoadConfig = async function ({ configOpts, cachedConfig, defaultConfig, cachedConfigPath, envOpt, debug, logs, nodePath, quiet, featureFlags, }) {
42
+ const { configPath, headersPath, redirectsPath, buildDir, repositoryRoot, config: netlifyConfig, context: contextA, branch: branchA, token: tokenA, api, siteInfo, env, integrations, } = await resolveInitialConfig(configOpts, cachedConfig, defaultConfig, cachedConfigPath, featureFlags);
43
43
  if (!quiet) {
44
44
  logConfigInfo({ logs, configPath, buildDir, netlifyConfig, context: contextA, debug });
45
45
  }
@@ -69,8 +69,8 @@ export const loadConfig = measureDuration(tLoadConfig, 'resolve_config');
69
69
  // Retrieve initial configuration.
70
70
  // In the buildbot and CLI, we re-use the already parsed `@netlify/config`
71
71
  // return value which is passed as `cachedConfig`/`cachedConfigPath`.
72
- const resolveInitialConfig = async function (configOpts, cachedConfig, cachedConfigPath, featureFlags) {
73
- return await resolveConfig({ ...configOpts, cachedConfig, cachedConfigPath, featureFlags });
72
+ const resolveInitialConfig = async function (configOpts, cachedConfig, defaultConfig, cachedConfigPath, featureFlags) {
73
+ return await resolveConfig({ ...configOpts, cachedConfig, defaultConfig, cachedConfigPath, featureFlags });
74
74
  };
75
75
  const logConfigInfo = function ({ logs, configPath, buildDir, netlifyConfig, context, debug }) {
76
76
  logBuildDir(logs, buildDir);
@@ -85,17 +85,15 @@ const logConfigInfo = function ({ logs, configPath, buildDir, netlifyConfig, con
85
85
  // change would create debug logs which would be too verbose.
86
86
  // Errors are propagated and assigned to the specific plugin or core step
87
87
  // which changed the configuration.
88
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
89
- export const resolveUpdatedConfig = async function (configOpts, configMutations, cachedConfig) {
88
+ export const resolveUpdatedConfig = async function (configOpts, configMutations, defaultConfig) {
90
89
  try {
91
- return await resolveConfig({
90
+ const resolved = await resolveConfig({
92
91
  ...configOpts,
93
92
  configMutations,
94
- // TODO: remove cached Config here again as this causes tests to fail in the CLI
95
- // Currently investigating the root cause.
96
- // cachedConfig,
93
+ defaultConfig,
97
94
  debug: false,
98
95
  });
96
+ return resolved;
99
97
  }
100
98
  catch (error) {
101
99
  changeErrorType(error, 'resolveConfig', 'pluginValidation');
@@ -1,4 +1,4 @@
1
- export declare const fireCoreStep: ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, constants, buildbotServerSocket, events, logs, quiet, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, outputFlusher, }: {
1
+ export declare const fireCoreStep: ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, constants, buildbotServerSocket, events, logs, quiet, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, outputFlusher, }: {
2
2
  coreStep: any;
3
3
  coreStepId: any;
4
4
  coreStepName: any;
@@ -20,7 +20,7 @@ export declare const fireCoreStep: ({ coreStep, coreStepId, coreStepName, config
20
20
  errorParams: any;
21
21
  configOpts: any;
22
22
  netlifyConfig: any;
23
- cachedConfig: any;
23
+ defaultConfig: any;
24
24
  configMutations: any;
25
25
  headersPath: any;
26
26
  redirectsPath: any;
@@ -3,7 +3,7 @@ import { addErrorInfo, isBuildError } from '../error/info.js';
3
3
  import { addOutputFlusher } from '../log/logger.js';
4
4
  import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js';
5
5
  // Fire a core step
6
- export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, constants, buildbotServerSocket, events, logs, quiet, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, outputFlusher, }) {
6
+ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, constants, buildbotServerSocket, events, logs, quiet, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, outputFlusher, }) {
7
7
  const logsA = outputFlusher ? addOutputFlusher(logs, outputFlusher) : logs;
8
8
  try {
9
9
  const configSideFiles = await listConfigSideFiles([headersPath, redirectsPath]);
@@ -23,7 +23,7 @@ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName
23
23
  branch,
24
24
  childEnv: childEnvA,
25
25
  netlifyConfig,
26
- cachedConfig,
26
+ defaultConfig,
27
27
  nodePath,
28
28
  configMutations,
29
29
  headersPath,
@@ -40,7 +40,7 @@ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName
40
40
  const { netlifyConfig: netlifyConfigA, configMutations: configMutationsA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await updateNetlifyConfig({
41
41
  configOpts,
42
42
  netlifyConfig,
43
- cachedConfig,
43
+ defaultConfig,
44
44
  headersPath,
45
45
  redirectsPath,
46
46
  configMutations,
@@ -1,5 +1,5 @@
1
1
  export function isTrustedPlugin(packageName: any): any;
2
- export function firePluginStep({ event, childProcess, packageName, packagePath, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, outputFlusher, systemLog, featureFlags, debug, verbose, }: {
2
+ export function firePluginStep({ event, childProcess, packageName, packagePath, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, outputFlusher, systemLog, featureFlags, debug, verbose, }: {
3
3
  event: any;
4
4
  childProcess: any;
5
5
  packageName: any;
@@ -11,7 +11,7 @@ export function firePluginStep({ event, childProcess, packageName, packagePath,
11
11
  errorParams: any;
12
12
  configOpts: any;
13
13
  netlifyConfig: any;
14
- cachedConfig: any;
14
+ defaultConfig: any;
15
15
  configMutations: any;
16
16
  headersPath: any;
17
17
  redirectsPath: any;
@@ -10,7 +10,7 @@ import { getPluginErrorType } from './error.js';
10
10
  import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js';
11
11
  export const isTrustedPlugin = (packageName) => packageName?.startsWith('@netlify/');
12
12
  // Fire a plugin step
13
- export const firePluginStep = async function ({ event, childProcess, packageName, packagePath, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, outputFlusher, systemLog, featureFlags, debug, verbose, }) {
13
+ export const firePluginStep = async function ({ event, childProcess, packageName, packagePath, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, outputFlusher, systemLog, featureFlags, debug, verbose, }) {
14
14
  const standardStreams = getStandardStreams(outputFlusher);
15
15
  const listeners = pipePluginOutput(childProcess, logs, standardStreams);
16
16
  const otelCarrier = {};
@@ -36,7 +36,7 @@ export const firePluginStep = async function ({ event, childProcess, packageName
36
36
  const { netlifyConfig: netlifyConfigA, configMutations: configMutationsA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await updateNetlifyConfig({
37
37
  configOpts,
38
38
  netlifyConfig,
39
- cachedConfig,
39
+ defaultConfig,
40
40
  headersPath,
41
41
  packagePath,
42
42
  redirectsPath,
@@ -70,7 +70,7 @@ const executeBuildStep = async function ({ config, packagePath, defaultConfig, c
70
70
  Object.assign(errorParams, { netlifyConfig, siteInfo, childEnv, userNodeVersion });
71
71
  try {
72
72
  const { netlifyConfig: netlifyConfigA, configMutations } = await runBuildStep({
73
- cachedConfig,
73
+ defaultConfig,
74
74
  netlifyConfig,
75
75
  buildDir,
76
76
  nodePath,
@@ -107,14 +107,14 @@ const executeBuildStep = async function ({ config, packagePath, defaultConfig, c
107
107
  throw error;
108
108
  }
109
109
  };
110
- const runBuildStep = async function ({ cachedConfig, netlifyConfig, buildDir, nodePath, constants, logs, debug, featureFlags, packagePath, childEnv, buildSteps, repositoryRoot, systemLog, edgeFunctionsBootstrapURL, deployId, quiet, }) {
110
+ const runBuildStep = async function ({ defaultConfig, netlifyConfig, buildDir, nodePath, constants, logs, debug, featureFlags, packagePath, childEnv, buildSteps, repositoryRoot, systemLog, edgeFunctionsBootstrapURL, deployId, quiet, }) {
111
111
  const { netlifyConfig: netlifyConfigA, configMutations } = await runSteps({
112
112
  steps: getBuildSteps(buildSteps),
113
113
  buildDir,
114
114
  nodePath,
115
115
  constants,
116
116
  netlifyConfig,
117
- cachedConfig,
117
+ defaultConfig,
118
118
  logs,
119
119
  debug,
120
120
  timers: [],
@@ -1,4 +1,4 @@
1
- export declare const runStep: ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, coreStepQuiet, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, packagePath, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }: {
1
+ export declare const runStep: ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, coreStepQuiet, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, packagePath, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }: {
2
2
  event: any;
3
3
  childProcess: any;
4
4
  packageName: any;
@@ -35,7 +35,7 @@ export declare const runStep: ({ event, childProcess, packageName, coreStep, cor
35
35
  failedPlugins: any;
36
36
  configOpts: any;
37
37
  netlifyConfig: any;
38
- cachedConfig: any;
38
+ defaultConfig: any;
39
39
  configMutations: any;
40
40
  headersPath: any;
41
41
  redirectsPath: any;
@@ -11,7 +11,7 @@ import { firePluginStep } from './plugin.js';
11
11
  import { getStepReturn } from './return.js';
12
12
  const tracer = trace.getTracer('steps');
13
13
  // Run a step (core, build command or plugin)
14
- export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, coreStepQuiet, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, packagePath, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, cachedConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
14
+ export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, coreStepQuiet, pluginPackageJson, loadedFrom, origin, condition, configPath, outputConfigPath, buildDir, packagePath, repositoryRoot, nodePath, index, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, mode, api, errorMonitor, deployId, errorParams, error, failedPlugins, configOpts, netlifyConfig, defaultConfig, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
15
15
  // Add relevant attributes to the upcoming span context
16
16
  const attributes = {
17
17
  'build.execution.step.name': coreStepName,
@@ -67,7 +67,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
67
67
  }
68
68
  const fireStep = getFireStep(packageName, coreStepId, event);
69
69
  const { newEnvChanges, netlifyConfig: netlifyConfigA = netlifyConfig, configMutations: configMutationsA = configMutations, headersPath: headersPathA = headersPath, redirectsPath: redirectsPathA = redirectsPath, newError, newStatus, timers: timersA, durationNs, metrics, } = await fireStep({
70
- cachedConfig,
70
+ defaultConfig,
71
71
  event,
72
72
  childProcess,
73
73
  packageName,
@@ -203,7 +203,7 @@ const getFireStep = function (packageName, coreStepId, event) {
203
203
  const parentTag = normalizeTagName(packageName);
204
204
  return measureDuration(tFireStep, event, { parentTag, category: 'pluginEvent' });
205
205
  };
206
- const tFireStep = function ({ cachedConfig, event, childProcess, packageName, pluginPackageJson, loadedFrom, outputFlusher, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, quiet, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, }) {
206
+ const tFireStep = function ({ defaultConfig, event, childProcess, packageName, pluginPackageJson, loadedFrom, outputFlusher, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, quiet, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, deployId, }) {
207
207
  if (coreStep !== undefined) {
208
208
  return fireCoreStep({
209
209
  coreStep,
@@ -228,7 +228,7 @@ const tFireStep = function ({ cachedConfig, event, childProcess, packageName, pl
228
228
  errorParams,
229
229
  configOpts,
230
230
  netlifyConfig,
231
- cachedConfig,
231
+ defaultConfig,
232
232
  configMutations,
233
233
  headersPath,
234
234
  redirectsPath,
@@ -255,7 +255,7 @@ const tFireStep = function ({ cachedConfig, event, childProcess, packageName, pl
255
255
  errorParams,
256
256
  configOpts,
257
257
  netlifyConfig,
258
- cachedConfig,
258
+ defaultConfig,
259
259
  configMutations,
260
260
  headersPath,
261
261
  redirectsPath,
@@ -1,5 +1,5 @@
1
- export function runSteps({ cachedConfig, steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }: {
2
- cachedConfig: any;
1
+ export function runSteps({ defaultConfig, steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }: {
2
+ defaultConfig: any;
3
3
  steps: any;
4
4
  buildbotServerSocket: any;
5
5
  events: any;
@@ -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 ({ cachedConfig, steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
10
+ export const runSteps = async function ({ defaultConfig, steps, buildbotServerSocket, events, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, repositoryRoot, nodePath, childEnv, context, branch, constants, mode, api, errorMonitor, deployId, errorParams, netlifyConfig, configOpts, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
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, quiet: coreStepQuiet, }) => {
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,
@@ -45,7 +45,7 @@ export const runSteps = async function ({ cachedConfig, steps, buildbotServerSoc
45
45
  error,
46
46
  failedPlugins,
47
47
  configOpts,
48
- cachedConfig,
48
+ defaultConfig,
49
49
  netlifyConfig: netlifyConfigA,
50
50
  configMutations,
51
51
  headersPath: headersPathA,
@@ -1,7 +1,7 @@
1
- export function updateNetlifyConfig({ configOpts, netlifyConfig, cachedConfig, headersPath, redirectsPath, configMutations, newConfigMutations, configSideFiles, errorParams, logs, systemLog, debug, source, }: {
1
+ export function updateNetlifyConfig({ configOpts, netlifyConfig, defaultConfig, headersPath, redirectsPath, configMutations, newConfigMutations, configSideFiles, errorParams, logs, systemLog, debug, source, }: {
2
2
  configOpts: any;
3
3
  netlifyConfig: any;
4
- cachedConfig: any;
4
+ defaultConfig: any;
5
5
  headersPath: any;
6
6
  redirectsPath: any;
7
7
  configMutations: any;
@@ -7,7 +7,7 @@ import { logConfigOnUpdate } from '../log/messages/config.js';
7
7
  import { logConfigMutations, systemLogConfigMutations } from '../log/messages/mutations.js';
8
8
  // If `netlifyConfig` was updated or `_redirects` was created, the configuration
9
9
  // is updated by calling `@netlify/config` again.
10
- export const updateNetlifyConfig = async function ({ configOpts, netlifyConfig, cachedConfig, headersPath, redirectsPath, configMutations, newConfigMutations, configSideFiles, errorParams, logs, systemLog, debug, source = '', }) {
10
+ export const updateNetlifyConfig = async function ({ configOpts, netlifyConfig, defaultConfig, headersPath, redirectsPath, configMutations, newConfigMutations, configSideFiles, errorParams, logs, systemLog, debug, source = '', }) {
11
11
  if (!(await shouldUpdateConfig({ newConfigMutations, configSideFiles, headersPath, redirectsPath }))) {
12
12
  return { netlifyConfig, configMutations };
13
13
  }
@@ -24,7 +24,7 @@ export const updateNetlifyConfig = async function ({ configOpts, netlifyConfig,
24
24
  systemLogConfigMutations(systemLog, newConfigMutations);
25
25
  }
26
26
  const mergedConfigMutations = [...configMutations, ...newConfigMutations];
27
- const { config: netlifyConfigA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await resolveUpdatedConfig(configOpts, mergedConfigMutations, cachedConfig);
27
+ const { config: netlifyConfigA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await resolveUpdatedConfig(configOpts, mergedConfigMutations, defaultConfig);
28
28
  logConfigOnUpdate({ logs, netlifyConfig: netlifyConfigA, debug });
29
29
  errorParams.netlifyConfig = netlifyConfigA;
30
30
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.50.6",
3
+ "version": "29.51.0",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -70,7 +70,7 @@
70
70
  "@bugsnag/js": "^7.0.0",
71
71
  "@netlify/blobs": "^7.4.0",
72
72
  "@netlify/cache-utils": "^5.1.5",
73
- "@netlify/config": "^20.16.0",
73
+ "@netlify/config": "^20.17.0",
74
74
  "@netlify/edge-bundler": "12.2.1",
75
75
  "@netlify/framework-info": "^9.8.13",
76
76
  "@netlify/functions-utils": "^5.2.73",
@@ -165,5 +165,5 @@
165
165
  "engines": {
166
166
  "node": "^14.16.0 || >=16.0.0"
167
167
  },
168
- "gitHead": "3a237a7c2582fd9b48f18c482d26d0566dd6d4f0"
168
+ "gitHead": "0f0dfefdc7df94b4083dbb827751d015cb2c8c88"
169
169
  }