@netlify/build 28.1.11 → 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 +5 -2
- package/lib/log/messages/core.js +2 -1
- package/lib/steps/return.js +2 -2
- package/lib/steps/run_step.js +1 -0
- package/package.json +2 -2
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
|
package/lib/log/messages/core.js
CHANGED
|
@@ -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, `
|
package/lib/steps/return.js
CHANGED
|
@@ -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
|
};
|
package/lib/steps/run_step.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "28.1.
|
|
3
|
+
"version": "28.1.12",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -150,5 +150,5 @@
|
|
|
150
150
|
"module": "commonjs"
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
-
"gitHead": "
|
|
153
|
+
"gitHead": "d346cc205af2633063c0472ecb459260ef9bd18e"
|
|
154
154
|
}
|