@netlify/build 28.1.10 → 28.1.12

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/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { handleBuildError } from '../error/handle.js';
2
2
  import { reportError } from '../error/report.js';
3
+ import { getSystemLogger } from '../log/logger.js';
3
4
  import { logTimer, logBuildSuccess } from '../log/messages/core.js';
4
5
  import { trackBuildComplete } from '../telemetry/main.js';
5
6
  import { reportTimers } from '../time/report.js';
@@ -16,6 +17,7 @@ export { runCoreSteps } from '../steps/run_core_steps.js';
16
17
  export default async function buildSite(flags = {}) {
17
18
  const { errorMonitor, framework, mode, logs, debug, systemLogFile, testOpts, statsdOpts, dry, telemetry, buildId, deployId, ...flagsA } = startBuild(flags);
18
19
  const errorParams = { errorMonitor, mode, logs, debug, testOpts };
20
+ const systemLog = getSystemLogger(logs, debug, systemLogFile);
19
21
  try {
20
22
  const { pluginsOptions, netlifyConfig: netlifyConfigA, siteInfo, userNodeVersion, stepsCount, timers, durationNs, configMutations, } = await execBuild({
21
23
  ...flagsA,
@@ -37,6 +39,7 @@ export default async function buildSite(flags = {}) {
37
39
  timers,
38
40
  durationNs,
39
41
  statsdOpts,
42
+ systemLog,
40
43
  });
41
44
  const { success, severityCode, status } = getSeverity('success');
42
45
  await telemetryReport({
@@ -76,12 +79,12 @@ export default async function buildSite(flags = {}) {
76
79
  }
77
80
  }
78
81
  // Logs and reports that a build successfully ended
79
- const handleBuildSuccess = async function ({ framework, dry, logs, timers, durationNs, statsdOpts }) {
82
+ const handleBuildSuccess = async function ({ framework, dry, logs, timers, durationNs, statsdOpts, systemLog }) {
80
83
  if (dry) {
81
84
  return;
82
85
  }
83
86
  logBuildSuccess(logs);
84
- logTimer(logs, durationNs, 'Netlify Build');
87
+ logTimer(logs, durationNs, 'Netlify Build', systemLog);
85
88
  await reportTimers({ timers, statsdOpts, framework });
86
89
  };
87
90
  // Handles the calls and errors of telemetry reports
@@ -28,10 +28,11 @@ export const logBuildSuccess = function (logs) {
28
28
  logHeader(logs, 'Netlify Build Complete');
29
29
  logMessage(logs, '');
30
30
  };
31
- export const logTimer = function (logs, durationNs, timerName) {
31
+ export const logTimer = function (logs, durationNs, timerName, systemLog) {
32
32
  const durationMs = roundTimerToMillisecs(durationNs);
33
33
  const duration = prettyMs(durationMs);
34
34
  log(logs, THEME.dimWords(`(${timerName} completed in ${duration})`));
35
+ systemLog(`Build step duration: ${timerName} completed in ${durationMs}ms`);
35
36
  };
36
37
  export const logMissingSideFile = function (logs, sideFile, publish) {
37
38
  logWarning(logs, `
@@ -2,7 +2,7 @@ import { logTimer } from '../log/messages/core.js';
2
2
  import { logStepSuccess } from '../log/messages/steps.js';
3
3
  import { handleStepError } from './error.js';
4
4
  // Retrieve the return value of a step
5
- export const getStepReturn = function ({ event, packageName, newError, newEnvChanges, newStatus, coreStep, coreStepName: timerName = `${packageName} ${event}`, childEnv, mode, api, errorMonitor, deployId, netlifyConfig, configMutations, headersPath, redirectsPath, logs, debug, timers, durationNs, testOpts, }) {
5
+ export const getStepReturn = function ({ event, packageName, newError, newEnvChanges, newStatus, coreStep, coreStepName: timerName = `${packageName} ${event}`, childEnv, mode, api, errorMonitor, deployId, netlifyConfig, configMutations, headersPath, redirectsPath, logs, debug, timers, durationNs, testOpts, systemLog, }) {
6
6
  if (newError !== undefined) {
7
7
  return handleStepError({
8
8
  event,
@@ -20,6 +20,6 @@ export const getStepReturn = function ({ event, packageName, newError, newEnvCha
20
20
  });
21
21
  }
22
22
  logStepSuccess(logs);
23
- logTimer(logs, durationNs, timerName);
23
+ logTimer(logs, durationNs, timerName, systemLog);
24
24
  return { newEnvChanges, netlifyConfig, configMutations, headersPath, redirectsPath, newStatus, timers };
25
25
  };
@@ -83,6 +83,7 @@ export const runStep = async function ({ event, childProcess, packageName, coreS
83
83
  timers: timersA,
84
84
  durationNs,
85
85
  testOpts,
86
+ systemLog,
86
87
  });
87
88
  return { ...newValues, newIndex: index + 1 };
88
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "28.1.10",
3
+ "version": "28.1.12",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -67,11 +67,11 @@
67
67
  "@netlify/cache-utils": "^5.0.1",
68
68
  "@netlify/config": "^19.1.2",
69
69
  "@netlify/edge-bundler": "^3.1.1",
70
- "@netlify/functions-utils": "^5.0.2",
70
+ "@netlify/functions-utils": "^5.0.3",
71
71
  "@netlify/git-utils": "^5.0.1",
72
72
  "@netlify/plugins-list": "^6.54.0",
73
73
  "@netlify/run-utils": "^5.0.1",
74
- "@netlify/zip-it-and-ship-it": "^8.0.0",
74
+ "@netlify/zip-it-and-ship-it": "^7.1.2",
75
75
  "@sindresorhus/slugify": "^2.0.0",
76
76
  "ajv": "^8.11.0",
77
77
  "ajv-errors": "^3.0.0",
@@ -150,5 +150,5 @@
150
150
  "module": "commonjs"
151
151
  }
152
152
  },
153
- "gitHead": "c3144f26ba519149dee0be48b34461826ae42a66"
153
+ "gitHead": "d346cc205af2633063c0472ecb459260ef9bd18e"
154
154
  }