@netlify/build 29.19.0 → 29.20.1

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
@@ -33,7 +33,7 @@ export const startBuild = function (flags) {
33
33
  const rootTracingContext = startTracing(tracingOpts, getSystemLogger(logs, debug, systemLogFile));
34
34
  return { ...flagsA, rootTracingContext, debug, systemLogFile, errorMonitor, logs, timers };
35
35
  };
36
- const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, packagePath, 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, }) {
36
+ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, packagePath, 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, edgeFunctionsBootstrapURL, }) {
37
37
  const configOpts = getConfigOpts({
38
38
  config,
39
39
  defaultConfig,
@@ -134,6 +134,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
134
134
  quiet,
135
135
  integrations,
136
136
  explicitSecretKeys,
137
+ edgeFunctionsBootstrapURL,
137
138
  });
138
139
  return {
139
140
  pluginsOptions: pluginsOptionsA,
@@ -148,7 +149,7 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
148
149
  };
149
150
  export const execBuild = measureDuration(tExecBuild, 'total', { parentTag: 'build_site' });
150
151
  // Runs a build then report any plugin statuses
151
- export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, 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, integrations, explicitSecretKeys, }) {
152
+ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, packagePath, 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, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
152
153
  try {
153
154
  const { stepsCount, netlifyConfig: netlifyConfigA, statuses, pluginsOptions: pluginsOptionsA, failedPlugins, timers: timersA, configMutations, metrics, } = await initAndRunBuild({
154
155
  pluginsOptions,
@@ -190,6 +191,7 @@ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig
190
191
  quiet,
191
192
  integrations,
192
193
  explicitSecretKeys,
194
+ edgeFunctionsBootstrapURL,
193
195
  });
194
196
  await Promise.all([
195
197
  reportStatuses({
@@ -250,7 +252,7 @@ export const runAndReportBuild = async function ({ pluginsOptions, netlifyConfig
250
252
  }
251
253
  };
252
254
  // Initialize plugin processes then runs a build
253
- const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, 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, integrations, explicitSecretKeys, }) {
255
+ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configOpts, siteInfo, configPath, outputConfigPath, headersPath, redirectsPath, buildDir, packagePath, 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, integrations, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
254
256
  const { pluginsOptions: pluginsOptionsA, timers: timersA } = await getPluginsOptions({
255
257
  pluginsOptions,
256
258
  netlifyConfig,
@@ -320,6 +322,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configO
320
322
  devCommand,
321
323
  quiet,
322
324
  explicitSecretKeys,
325
+ edgeFunctionsBootstrapURL,
323
326
  });
324
327
  await Promise.all([
325
328
  warnOnMissingSideFiles({ buildDir, netlifyConfig: netlifyConfigA, logs }),
@@ -347,7 +350,7 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configO
347
350
  };
348
351
  // Load plugin main files, retrieve their event handlers then runs them,
349
352
  // together with the build command
350
- const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, 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, }) {
353
+ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig, 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, }) {
351
354
  const { pluginsSteps, timers: timersA } = await loadPlugins({
352
355
  pluginsOptions,
353
356
  childProcesses,
@@ -396,6 +399,7 @@ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig
396
399
  quiet,
397
400
  userNodeVersion,
398
401
  explicitSecretKeys,
402
+ edgeFunctionsBootstrapURL,
399
403
  });
400
404
  return {
401
405
  stepsCount,
@@ -8,7 +8,7 @@ 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, packagePath, constants: { EDGE_FUNCTIONS_DIST: distDirectory, EDGE_FUNCTIONS_SRC: srcDirectory, INTERNAL_EDGE_FUNCTIONS_SRC: internalSrcDirectory, IS_LOCAL: isRunningLocally, }, debug, systemLog, featureFlags, logs, netlifyConfig, }) {
11
+ const coreStep = async function ({ buildDir, packagePath, 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
14
  const distPath = resolve(buildDir, packagePath || '', distDirectory);
@@ -42,6 +42,7 @@ const coreStep = async function ({ buildDir, packagePath, constants: { EDGE_FUNC
42
42
  importMapPaths: [userDefinedImportMap],
43
43
  systemLogger: featureFlags.edge_functions_system_logger ? systemLog : undefined,
44
44
  internalSrcFolder: internalSrcPath,
45
+ bootstrapURL: edgeFunctionsBootstrapURL,
45
46
  });
46
47
  const metrics = getMetrics(manifest);
47
48
  systemLog('Edge Functions manifest:', manifest);
@@ -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, packagePath, constants, buildbotServerSocket, events, logs, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, }) {
5
+ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, constants, buildbotServerSocket, events, logs, nodePath, childEnv, context, branch, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, debug, systemLog, saveConfig, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
6
6
  try {
7
7
  const configSideFiles = await listConfigSideFiles([headersPath, redirectsPath]);
8
8
  const childEnvA = setEnvChanges(envChanges, { ...childEnv });
@@ -30,6 +30,7 @@ export const fireCoreStep = async function ({ coreStep, coreStepId, coreStepName
30
30
  saveConfig,
31
31
  userNodeVersion,
32
32
  explicitSecretKeys,
33
+ edgeFunctionsBootstrapURL,
33
34
  });
34
35
  const { netlifyConfig: netlifyConfigA, configMutations: configMutationsA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await updateNetlifyConfig({
35
36
  configOpts,
@@ -10,7 +10,7 @@ import { firePluginStep } from './plugin.js';
10
10
  import { getStepReturn } from './return.js';
11
11
  const tracer = trace.getTracer('steps');
12
12
  // Run a step (core, build command or plugin)
13
- export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, 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, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, }) {
13
+ export const runStep = async function ({ event, childProcess, packageName, coreStep, coreStepId, coreStepName, coreStepDescription, 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, configMutations, headersPath, redirectsPath, logs, debug, systemLog, verbose, saveConfig, timers, testOpts, featureFlags, quiet, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
14
14
  // Add relevant attributes to the upcoming span context
15
15
  const attributes = {
16
16
  'build.execution.step.name': coreStepName,
@@ -90,6 +90,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
90
90
  featureFlags,
91
91
  userNodeVersion,
92
92
  explicitSecretKeys,
93
+ edgeFunctionsBootstrapURL,
93
94
  });
94
95
  const newValues = await getStepReturn({
95
96
  event,
@@ -179,7 +180,7 @@ const getFireStep = function (packageName, coreStepId, event) {
179
180
  const parentTag = normalizeTagName(packageName);
180
181
  return measureDuration(tFireStep, event, { parentTag, category: 'pluginEvent' });
181
182
  };
182
- const tFireStep = function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, explicitSecretKeys, }) {
183
+ const tFireStep = function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, coreStep, coreStepId, coreStepName, configPath, outputConfigPath, buildDir, repositoryRoot, packagePath, nodePath, childEnv, context, branch, envChanges, constants, steps, buildbotServerSocket, events, error, logs, debug, systemLog, verbose, saveConfig, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, featureFlags, userNodeVersion, explicitSecretKeys, edgeFunctionsBootstrapURL, }) {
183
184
  if (coreStep !== undefined) {
184
185
  return fireCoreStep({
185
186
  coreStep,
@@ -211,6 +212,7 @@ const tFireStep = function ({ event, childProcess, packageName, pluginPackageJso
211
212
  saveConfig,
212
213
  userNodeVersion,
213
214
  explicitSecretKeys,
215
+ edgeFunctionsBootstrapURL,
214
216
  });
215
217
  }
216
218
  return firePluginStep({
@@ -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, 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, }) {
10
+ export const runSteps = async function ({ 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, }) => {
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,
@@ -59,6 +59,7 @@ export const runSteps = async function ({ steps, buildbotServerSocket, events, c
59
59
  quiet,
60
60
  userNodeVersion,
61
61
  explicitSecretKeys,
62
+ edgeFunctionsBootstrapURL,
62
63
  });
63
64
  const statusesA = addStatus({ newStatus, statuses, event, packageName, pluginPackageJson });
64
65
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.19.0",
3
+ "version": "29.20.1",
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.8.0",
69
69
  "@netlify/edge-bundler": "8.17.1",
70
70
  "@netlify/framework-info": "^9.8.10",
71
- "@netlify/functions-utils": "^5.2.21",
71
+ "@netlify/functions-utils": "^5.2.22",
72
72
  "@netlify/git-utils": "^5.1.1",
73
73
  "@netlify/plugins-list": "^6.71.0",
74
74
  "@netlify/run-utils": "^5.1.1",
75
- "@netlify/zip-it-and-ship-it": "9.15.0",
75
+ "@netlify/zip-it-and-ship-it": "9.15.1",
76
76
  "@opentelemetry/api": "^1.4.1",
77
77
  "@sindresorhus/slugify": "^2.0.0",
78
78
  "ansi-escapes": "^6.0.0",
@@ -148,5 +148,5 @@
148
148
  "module": "commonjs"
149
149
  }
150
150
  },
151
- "gitHead": "f8f6636f9127ccb9a923b300f0588f9f48bf4d3e"
151
+ "gitHead": "b37569f9014233c7294f9e0b406cbabce76917a3"
152
152
  }