@netlify/build 28.1.99-test2 → 28.1.99-test4
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 +2 -5
- package/lib/error/type.js +2 -0
- package/lib/log/messages/core.js +1 -2
- package/lib/steps/return.js +2 -2
- package/lib/steps/run_step.js +0 -1
- package/package.json +4 -4
package/lib/core/main.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { handleBuildError } from '../error/handle.js';
|
|
2
2
|
import { reportError } from '../error/report.js';
|
|
3
|
-
import { getSystemLogger } from '../log/logger.js';
|
|
4
3
|
import { logTimer, logBuildSuccess } from '../log/messages/core.js';
|
|
5
4
|
import { trackBuildComplete } from '../telemetry/main.js';
|
|
6
5
|
import { reportTimers } from '../time/report.js';
|
|
@@ -17,7 +16,6 @@ export { runCoreSteps } from '../steps/run_core_steps.js';
|
|
|
17
16
|
export default async function buildSite(flags = {}) {
|
|
18
17
|
const { errorMonitor, framework, mode, logs, debug, systemLogFile, testOpts, statsdOpts, dry, telemetry, buildId, deployId, ...flagsA } = startBuild(flags);
|
|
19
18
|
const errorParams = { errorMonitor, mode, logs, debug, testOpts };
|
|
20
|
-
const systemLog = getSystemLogger(logs, debug, systemLogFile);
|
|
21
19
|
try {
|
|
22
20
|
const { pluginsOptions, netlifyConfig: netlifyConfigA, siteInfo, userNodeVersion, stepsCount, timers, durationNs, configMutations, } = await execBuild({
|
|
23
21
|
...flagsA,
|
|
@@ -39,7 +37,6 @@ export default async function buildSite(flags = {}) {
|
|
|
39
37
|
timers,
|
|
40
38
|
durationNs,
|
|
41
39
|
statsdOpts,
|
|
42
|
-
systemLog,
|
|
43
40
|
});
|
|
44
41
|
const { success, severityCode, status } = getSeverity('success');
|
|
45
42
|
await telemetryReport({
|
|
@@ -79,12 +76,12 @@ export default async function buildSite(flags = {}) {
|
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
// Logs and reports that a build successfully ended
|
|
82
|
-
const handleBuildSuccess = async function ({ framework, dry, logs, timers, durationNs, statsdOpts
|
|
79
|
+
const handleBuildSuccess = async function ({ framework, dry, logs, timers, durationNs, statsdOpts }) {
|
|
83
80
|
if (dry) {
|
|
84
81
|
return;
|
|
85
82
|
}
|
|
86
83
|
logBuildSuccess(logs);
|
|
87
|
-
logTimer(logs, durationNs, 'Netlify Build'
|
|
84
|
+
logTimer(logs, durationNs, 'Netlify Build');
|
|
88
85
|
await reportTimers({ timers, statsdOpts, framework });
|
|
89
86
|
};
|
|
90
87
|
// Handles the calls and errors of telemetry reports
|
package/lib/error/type.js
CHANGED
|
@@ -110,6 +110,7 @@ const TYPES = {
|
|
|
110
110
|
pluginValidation: {
|
|
111
111
|
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
112
112
|
stackType: 'stack',
|
|
113
|
+
showErrorProps: true,
|
|
113
114
|
locationType: 'buildFail',
|
|
114
115
|
severity: 'warning',
|
|
115
116
|
},
|
|
@@ -126,6 +127,7 @@ const TYPES = {
|
|
|
126
127
|
ipc: {
|
|
127
128
|
title: ({ location: { packageName } }) => `Plugin "${packageName}" internal error`,
|
|
128
129
|
stackType: 'none',
|
|
130
|
+
showErrorProps: true,
|
|
129
131
|
locationType: 'buildFail',
|
|
130
132
|
severity: 'warning',
|
|
131
133
|
},
|
package/lib/log/messages/core.js
CHANGED
|
@@ -28,11 +28,10 @@ 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) {
|
|
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`);
|
|
36
35
|
};
|
|
37
36
|
export const logMissingSideFile = function (logs, sideFile, publish) {
|
|
38
37
|
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, }) {
|
|
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);
|
|
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.99-
|
|
3
|
+
"version": "28.1.99-test4",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/core/main.js",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@bugsnag/js": "^7.0.0",
|
|
67
67
|
"@netlify/cache-utils": "^5.0.1",
|
|
68
|
-
"@netlify/config": "^
|
|
69
|
-
"@netlify/edge-bundler": "^
|
|
70
|
-
"@netlify/functions-utils": "^5.0.
|
|
68
|
+
"@netlify/config": "^19.1.2",
|
|
69
|
+
"@netlify/edge-bundler": "^3.1.1",
|
|
70
|
+
"@netlify/functions-utils": "^5.0.2",
|
|
71
71
|
"@netlify/git-utils": "^5.0.1",
|
|
72
72
|
"@netlify/plugins-list": "^6.54.0",
|
|
73
73
|
"@netlify/run-utils": "^5.0.1",
|