@netlify/build 27.20.3 → 27.20.5
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/bin.js +42 -59
- package/lib/core/build.js +333 -536
- package/lib/core/config.js +94 -159
- package/lib/core/constants.js +95 -135
- package/lib/core/dev.js +26 -30
- package/lib/core/dry.js +18 -36
- package/lib/core/feature_flags.js +13 -16
- package/lib/core/flags.js +168 -169
- package/lib/core/lingering.js +44 -61
- package/lib/core/main.js +94 -136
- package/lib/core/missing_side_file.js +12 -24
- package/lib/core/normalize_flags.js +52 -63
- package/lib/core/severity.js +13 -15
- package/lib/core/user_node_version.js +26 -35
- package/lib/env/changes.js +29 -37
- package/lib/env/main.js +10 -15
- package/lib/env/metadata.js +63 -76
- package/lib/error/api.js +31 -40
- package/lib/error/build.js +27 -38
- package/lib/error/cancel.js +5 -6
- package/lib/error/colors.js +7 -9
- package/lib/error/handle.js +38 -49
- package/lib/error/info.js +26 -35
- package/lib/error/monitor/location.js +12 -17
- package/lib/error/monitor/normalize.js +75 -85
- package/lib/error/monitor/print.js +19 -41
- package/lib/error/monitor/report.js +102 -121
- package/lib/error/monitor/start.js +43 -56
- package/lib/error/parse/clean_stack.js +52 -69
- package/lib/error/parse/location.js +40 -52
- package/lib/error/parse/normalize.js +18 -23
- package/lib/error/parse/parse.js +59 -93
- package/lib/error/parse/plugin.js +42 -57
- package/lib/error/parse/properties.js +13 -20
- package/lib/error/parse/serialize_log.js +29 -37
- package/lib/error/parse/serialize_status.js +15 -23
- package/lib/error/parse/stack.js +29 -38
- package/lib/error/type.js +132 -150
- package/lib/install/functions.js +16 -24
- package/lib/install/local.js +31 -48
- package/lib/install/main.js +52 -66
- package/lib/install/missing.js +40 -53
- package/lib/log/colors.js +15 -22
- package/lib/log/description.js +16 -21
- package/lib/log/header.js +11 -13
- package/lib/log/header_func.js +11 -15
- package/lib/log/logger.js +88 -119
- package/lib/log/messages/compatibility.js +100 -158
- package/lib/log/messages/config.js +76 -92
- package/lib/log/messages/core.js +40 -60
- package/lib/log/messages/core_steps.js +63 -92
- package/lib/log/messages/dry.js +31 -53
- package/lib/log/messages/install.js +21 -28
- package/lib/log/messages/ipc.js +21 -30
- package/lib/log/messages/mutations.js +51 -71
- package/lib/log/messages/plugins.js +18 -31
- package/lib/log/messages/status.js +12 -14
- package/lib/log/messages/steps.js +14 -18
- package/lib/log/old_version.js +23 -32
- package/lib/log/serialize.js +7 -10
- package/lib/log/stream.js +48 -65
- package/lib/log/theme.js +22 -23
- package/lib/plugins/child/diff.js +31 -40
- package/lib/plugins/child/error.js +20 -26
- package/lib/plugins/child/lazy.js +11 -14
- package/lib/plugins/child/load.js +15 -22
- package/lib/plugins/child/logic.js +51 -58
- package/lib/plugins/child/main.js +32 -46
- package/lib/plugins/child/run.js +18 -27
- package/lib/plugins/child/status.js +52 -63
- package/lib/plugins/child/typescript.js +19 -36
- package/lib/plugins/child/utils.js +36 -49
- package/lib/plugins/child/validate.js +25 -28
- package/lib/plugins/compatibility.js +64 -92
- package/lib/plugins/error.js +29 -35
- package/lib/plugins/events.js +7 -12
- package/lib/plugins/expected_version.js +61 -99
- package/lib/plugins/ipc.js +79 -102
- package/lib/plugins/list.js +49 -62
- package/lib/plugins/load.js +44 -64
- package/lib/plugins/manifest/check.js +64 -85
- package/lib/plugins/manifest/load.js +34 -37
- package/lib/plugins/manifest/main.js +16 -21
- package/lib/plugins/manifest/path.js +18 -25
- package/lib/plugins/manifest/validate.js +77 -94
- package/lib/plugins/node_version.js +22 -42
- package/lib/plugins/options.js +45 -78
- package/lib/plugins/pinned_version.js +58 -106
- package/lib/plugins/resolve.js +91 -133
- package/lib/plugins/spawn.js +43 -61
- package/lib/plugins_core/add.js +26 -40
- package/lib/plugins_core/build_command.js +47 -72
- package/lib/plugins_core/deploy/buildbot_client.js +61 -87
- package/lib/plugins_core/deploy/index.js +47 -71
- package/lib/plugins_core/edge_functions/index.js +73 -116
- package/lib/plugins_core/edge_functions/lib/error.js +13 -17
- package/lib/plugins_core/edge_functions/lib/internal_manifest.js +45 -55
- package/lib/plugins_core/edge_functions/validate_manifest/validate_edge_functions_manifest.js +65 -80
- package/lib/plugins_core/functions/error.js +88 -128
- package/lib/plugins_core/functions/feature_flags.js +5 -5
- package/lib/plugins_core/functions/index.js +98 -145
- package/lib/plugins_core/functions/utils.js +36 -57
- package/lib/plugins_core/functions/zisi.js +35 -52
- package/lib/plugins_core/functions_install/index.js +8 -11
- package/lib/plugins_core/list.js +15 -22
- package/lib/status/add.js +26 -32
- package/lib/status/colors.js +14 -19
- package/lib/status/load_error.js +8 -9
- package/lib/status/report.js +72 -126
- package/lib/status/success.js +10 -14
- package/lib/steps/core_step.js +54 -89
- package/lib/steps/error.js +50 -87
- package/lib/steps/get.js +33 -41
- package/lib/steps/plugin.js +53 -83
- package/lib/steps/return.js +24 -51
- package/lib/steps/run_core_steps.js +119 -171
- package/lib/steps/run_step.js +154 -270
- package/lib/steps/run_steps.js +91 -174
- package/lib/steps/update_config.js +45 -72
- package/lib/telemetry/main.js +89 -128
- package/lib/time/aggregate.js +84 -110
- package/lib/time/main.js +23 -34
- package/lib/time/measure.js +11 -15
- package/lib/time/report.js +32 -44
- package/lib/utils/errors.js +10 -9
- package/lib/utils/json.js +11 -15
- package/lib/utils/omit.js +3 -4
- package/lib/utils/package.js +19 -22
- package/lib/utils/remove_falsy.js +5 -7
- package/lib/utils/resolve.js +30 -34
- package/lib/utils/runtime.js +4 -4
- package/lib/utils/semver.js +19 -25
- package/package.json +15 -8
package/lib/steps/plugin.js
CHANGED
|
@@ -1,85 +1,55 @@
|
|
|
1
|
-
import { addErrorInfo } from '../error/info.js'
|
|
2
|
-
import { logStepCompleted } from '../log/messages/ipc.js'
|
|
3
|
-
import { pipePluginOutput, unpipePluginOutput } from '../log/stream.js'
|
|
4
|
-
import { callChild } from '../plugins/ipc.js'
|
|
5
|
-
import { getSuccessStatus } from '../status/success.js'
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js'
|
|
9
|
-
|
|
1
|
+
import { addErrorInfo } from '../error/info.js';
|
|
2
|
+
import { logStepCompleted } from '../log/messages/ipc.js';
|
|
3
|
+
import { pipePluginOutput, unpipePluginOutput } from '../log/stream.js';
|
|
4
|
+
import { callChild } from '../plugins/ipc.js';
|
|
5
|
+
import { getSuccessStatus } from '../status/success.js';
|
|
6
|
+
import { getPluginErrorType } from './error.js';
|
|
7
|
+
import { updateNetlifyConfig, listConfigSideFiles } from './update_config.js';
|
|
10
8
|
// Fire a plugin step
|
|
11
|
-
export const firePluginStep = async function ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
payload: { event, error, envChanges, netlifyConfig, constants },
|
|
44
|
-
logs,
|
|
45
|
-
verbose,
|
|
46
|
-
})
|
|
47
|
-
const {
|
|
48
|
-
netlifyConfig: netlifyConfigA,
|
|
49
|
-
configMutations: configMutationsA,
|
|
50
|
-
headersPath: headersPathA,
|
|
51
|
-
redirectsPath: redirectsPathA,
|
|
52
|
-
} = await updateNetlifyConfig({
|
|
53
|
-
configOpts,
|
|
54
|
-
netlifyConfig,
|
|
55
|
-
headersPath,
|
|
56
|
-
redirectsPath,
|
|
57
|
-
configMutations,
|
|
58
|
-
newConfigMutations,
|
|
59
|
-
configSideFiles,
|
|
60
|
-
errorParams,
|
|
61
|
-
logs,
|
|
62
|
-
debug,
|
|
63
|
-
})
|
|
64
|
-
const newStatus = getSuccessStatus(status, { steps, event, packageName })
|
|
65
|
-
return {
|
|
66
|
-
newEnvChanges,
|
|
67
|
-
netlifyConfig: netlifyConfigA,
|
|
68
|
-
configMutations: configMutationsA,
|
|
69
|
-
headersPath: headersPathA,
|
|
70
|
-
redirectsPath: redirectsPathA,
|
|
71
|
-
newStatus,
|
|
9
|
+
export const firePluginStep = async function ({ event, childProcess, packageName, pluginPackageJson, loadedFrom, origin, envChanges, errorParams, configOpts, netlifyConfig, configMutations, headersPath, redirectsPath, constants, steps, error, logs, debug, verbose, }) {
|
|
10
|
+
const listeners = pipePluginOutput(childProcess, logs);
|
|
11
|
+
try {
|
|
12
|
+
const configSideFiles = await listConfigSideFiles([headersPath, redirectsPath]);
|
|
13
|
+
const { newEnvChanges, configMutations: newConfigMutations, status, } = await callChild({
|
|
14
|
+
childProcess,
|
|
15
|
+
eventName: 'run',
|
|
16
|
+
payload: { event, error, envChanges, netlifyConfig, constants },
|
|
17
|
+
logs,
|
|
18
|
+
verbose,
|
|
19
|
+
});
|
|
20
|
+
const { netlifyConfig: netlifyConfigA, configMutations: configMutationsA, headersPath: headersPathA, redirectsPath: redirectsPathA, } = await updateNetlifyConfig({
|
|
21
|
+
configOpts,
|
|
22
|
+
netlifyConfig,
|
|
23
|
+
headersPath,
|
|
24
|
+
redirectsPath,
|
|
25
|
+
configMutations,
|
|
26
|
+
newConfigMutations,
|
|
27
|
+
configSideFiles,
|
|
28
|
+
errorParams,
|
|
29
|
+
logs,
|
|
30
|
+
debug,
|
|
31
|
+
});
|
|
32
|
+
const newStatus = getSuccessStatus(status, { steps, event, packageName });
|
|
33
|
+
return {
|
|
34
|
+
newEnvChanges,
|
|
35
|
+
netlifyConfig: netlifyConfigA,
|
|
36
|
+
configMutations: configMutationsA,
|
|
37
|
+
headersPath: headersPathA,
|
|
38
|
+
redirectsPath: redirectsPathA,
|
|
39
|
+
newStatus,
|
|
40
|
+
};
|
|
72
41
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
42
|
+
catch (newError) {
|
|
43
|
+
const errorType = getPluginErrorType(newError, loadedFrom);
|
|
44
|
+
addErrorInfo(newError, {
|
|
45
|
+
...errorType,
|
|
46
|
+
plugin: { pluginPackageJson, packageName },
|
|
47
|
+
location: { event, packageName, loadedFrom, origin },
|
|
48
|
+
});
|
|
49
|
+
return { newError };
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
await unpipePluginOutput(childProcess, logs, listeners);
|
|
53
|
+
logStepCompleted(logs, verbose);
|
|
54
|
+
}
|
|
55
|
+
};
|
package/lib/steps/return.js
CHANGED
|
@@ -1,52 +1,25 @@
|
|
|
1
|
-
import { logTimer } from '../log/messages/core.js'
|
|
2
|
-
import { logStepSuccess } from '../log/messages/steps.js'
|
|
3
|
-
|
|
4
|
-
import { handleStepError } from './error.js'
|
|
5
|
-
|
|
1
|
+
import { logTimer } from '../log/messages/core.js';
|
|
2
|
+
import { logStepSuccess } from '../log/messages/steps.js';
|
|
3
|
+
import { handleStepError } from './error.js';
|
|
6
4
|
// Retrieve the return value of a step
|
|
7
|
-
export const getStepReturn = function ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
testOpts,
|
|
29
|
-
}) {
|
|
30
|
-
if (newError !== undefined) {
|
|
31
|
-
return handleStepError({
|
|
32
|
-
event,
|
|
33
|
-
newError,
|
|
34
|
-
childEnv,
|
|
35
|
-
mode,
|
|
36
|
-
api,
|
|
37
|
-
errorMonitor,
|
|
38
|
-
deployId,
|
|
39
|
-
coreStep,
|
|
40
|
-
netlifyConfig,
|
|
41
|
-
logs,
|
|
42
|
-
debug,
|
|
43
|
-
testOpts,
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
logStepSuccess(logs)
|
|
48
|
-
|
|
49
|
-
logTimer(logs, durationNs, timerName)
|
|
50
|
-
|
|
51
|
-
return { newEnvChanges, netlifyConfig, configMutations, headersPath, redirectsPath, newStatus, timers }
|
|
52
|
-
}
|
|
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
|
+
if (newError !== undefined) {
|
|
7
|
+
return handleStepError({
|
|
8
|
+
event,
|
|
9
|
+
newError,
|
|
10
|
+
childEnv,
|
|
11
|
+
mode,
|
|
12
|
+
api,
|
|
13
|
+
errorMonitor,
|
|
14
|
+
deployId,
|
|
15
|
+
coreStep,
|
|
16
|
+
netlifyConfig,
|
|
17
|
+
logs,
|
|
18
|
+
debug,
|
|
19
|
+
testOpts,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
logStepSuccess(logs);
|
|
23
|
+
logTimer(logs, durationNs, timerName);
|
|
24
|
+
return { newEnvChanges, netlifyConfig, configMutations, headersPath, redirectsPath, newStatus, timers };
|
|
25
|
+
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { getConfigOpts, loadConfig } from '../core/config.js'
|
|
2
|
-
import { getConstants } from '../core/constants.js'
|
|
3
|
-
import { normalizeFlags } from '../core/normalize_flags.js'
|
|
4
|
-
import { getSeverity } from '../core/severity.js'
|
|
5
|
-
import { handleBuildError } from '../error/handle.js'
|
|
6
|
-
import { getErrorInfo } from '../error/info.js'
|
|
7
|
-
import { startErrorMonitor } from '../error/monitor/start.js'
|
|
8
|
-
import { getBufferLogs, getSystemLogger } from '../log/logger.js'
|
|
9
|
-
import { logBuildStart } from '../log/messages/core.js'
|
|
10
|
-
import { reportStatuses } from '../status/report.js'
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import { runSteps } from './run_steps.js'
|
|
14
|
-
|
|
1
|
+
import { getConfigOpts, loadConfig } from '../core/config.js';
|
|
2
|
+
import { getConstants } from '../core/constants.js';
|
|
3
|
+
import { normalizeFlags } from '../core/normalize_flags.js';
|
|
4
|
+
import { getSeverity } from '../core/severity.js';
|
|
5
|
+
import { handleBuildError } from '../error/handle.js';
|
|
6
|
+
import { getErrorInfo } from '../error/info.js';
|
|
7
|
+
import { startErrorMonitor } from '../error/monitor/start.js';
|
|
8
|
+
import { getBufferLogs, getSystemLogger } from '../log/logger.js';
|
|
9
|
+
import { logBuildStart } from '../log/messages/core.js';
|
|
10
|
+
import { reportStatuses } from '../status/report.js';
|
|
11
|
+
import { getSteps } from './get.js';
|
|
12
|
+
import { runSteps } from './run_steps.js';
|
|
15
13
|
/**
|
|
16
14
|
* Runs specific core steps for a build and returns whether it succeeded or not.
|
|
17
15
|
*
|
|
@@ -37,163 +35,113 @@ import { runSteps } from './run_steps.js'
|
|
|
37
35
|
* @returns {string[]} buildResult.logs - When using the `buffer` option, all log messages
|
|
38
36
|
*/
|
|
39
37
|
export const runCoreSteps = async (buildSteps, flags = {}) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
38
|
+
const { errorMonitor, mode, logs, debug, ...flagsA } = startBuild(flags);
|
|
39
|
+
const errorParams = { errorMonitor, mode, logs, debug };
|
|
40
|
+
const systemLog = getSystemLogger(logs, debug);
|
|
41
|
+
try {
|
|
42
|
+
const { netlifyConfig: netlifyConfigA, configMutations } = await executeBuildStep({
|
|
43
|
+
...flagsA,
|
|
44
|
+
errorMonitor,
|
|
45
|
+
mode,
|
|
46
|
+
logs,
|
|
47
|
+
debug,
|
|
48
|
+
errorParams,
|
|
49
|
+
buildSteps,
|
|
50
|
+
systemLog,
|
|
51
|
+
});
|
|
52
|
+
const { success, severityCode } = getSeverity('success');
|
|
53
|
+
return { success, severityCode, netlifyConfig: netlifyConfigA, configMutations, logs };
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
const { severity } = await handleBuildError(error, errorParams);
|
|
57
|
+
const { success, severityCode } = getSeverity(severity);
|
|
58
|
+
return { success, severityCode, logs };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
66
61
|
const startBuild = function (flags) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return { ...flagsA, errorMonitor, logs }
|
|
75
|
-
}
|
|
76
|
-
|
|
62
|
+
const logs = getBufferLogs(flags);
|
|
63
|
+
logBuildStart(logs);
|
|
64
|
+
const { bugsnagKey, ...flagsA } = normalizeFlags(flags, logs);
|
|
65
|
+
const errorMonitor = startErrorMonitor({ flags: flagsA, logs, bugsnagKey });
|
|
66
|
+
return { ...flagsA, errorMonitor, logs };
|
|
67
|
+
};
|
|
77
68
|
const getBuildSteps = function (buildSteps) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
logs,
|
|
139
|
-
debug,
|
|
140
|
-
constants,
|
|
141
|
-
featureFlags,
|
|
142
|
-
childEnv,
|
|
143
|
-
buildSteps,
|
|
144
|
-
repositoryRoot: repositoryRootA,
|
|
145
|
-
systemLog,
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
return {
|
|
149
|
-
netlifyConfig: netlifyConfigA,
|
|
150
|
-
configMutations,
|
|
69
|
+
const allSteps = getSteps([]).steps.filter(({ coreStepId }) => buildSteps.includes(coreStepId));
|
|
70
|
+
return allSteps;
|
|
71
|
+
};
|
|
72
|
+
const executeBuildStep = async function ({ config, defaultConfig, cachedConfig, debug, nodePath, functionsDistDir, edgeFunctionsDistDir, errorMonitor, mode, logs, errorParams, featureFlags, buildSteps, repositoryRoot, systemLog, }) {
|
|
73
|
+
const configOpts = getConfigOpts({
|
|
74
|
+
config,
|
|
75
|
+
defaultConfig,
|
|
76
|
+
featureFlags,
|
|
77
|
+
mode,
|
|
78
|
+
repositoryRoot,
|
|
79
|
+
});
|
|
80
|
+
const { netlifyConfig, buildDir, siteInfo, childEnv, userNodeVersion, repositoryRoot: repositoryRootA, } = await loadConfig({
|
|
81
|
+
configOpts,
|
|
82
|
+
cachedConfig,
|
|
83
|
+
debug,
|
|
84
|
+
logs,
|
|
85
|
+
nodePath,
|
|
86
|
+
timers: [],
|
|
87
|
+
});
|
|
88
|
+
const constants = await getConstants({
|
|
89
|
+
buildDir,
|
|
90
|
+
functionsDistDir,
|
|
91
|
+
edgeFunctionsDistDir,
|
|
92
|
+
netlifyConfig,
|
|
93
|
+
siteInfo,
|
|
94
|
+
mode,
|
|
95
|
+
});
|
|
96
|
+
Object.assign(errorParams, { netlifyConfig, siteInfo, childEnv, userNodeVersion });
|
|
97
|
+
try {
|
|
98
|
+
const { netlifyConfig: netlifyConfigA, configMutations } = await runBuildStep({
|
|
99
|
+
netlifyConfig,
|
|
100
|
+
buildDir,
|
|
101
|
+
nodePath,
|
|
102
|
+
logs,
|
|
103
|
+
debug,
|
|
104
|
+
constants,
|
|
105
|
+
featureFlags,
|
|
106
|
+
childEnv,
|
|
107
|
+
buildSteps,
|
|
108
|
+
repositoryRoot: repositoryRootA,
|
|
109
|
+
systemLog,
|
|
110
|
+
});
|
|
111
|
+
return {
|
|
112
|
+
netlifyConfig: netlifyConfigA,
|
|
113
|
+
configMutations,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
const [{ statuses }] = getErrorInfo(error);
|
|
118
|
+
await reportStatuses({
|
|
119
|
+
statuses,
|
|
120
|
+
childEnv,
|
|
121
|
+
mode,
|
|
122
|
+
netlifyConfig,
|
|
123
|
+
errorMonitor,
|
|
124
|
+
logs,
|
|
125
|
+
debug,
|
|
126
|
+
pluginsOptions: [],
|
|
127
|
+
});
|
|
128
|
+
throw error;
|
|
151
129
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const runBuildStep = async function ({
|
|
171
|
-
netlifyConfig,
|
|
172
|
-
buildDir,
|
|
173
|
-
nodePath,
|
|
174
|
-
constants,
|
|
175
|
-
logs,
|
|
176
|
-
debug,
|
|
177
|
-
featureFlags,
|
|
178
|
-
childEnv,
|
|
179
|
-
buildSteps,
|
|
180
|
-
repositoryRoot,
|
|
181
|
-
systemLog,
|
|
182
|
-
}) {
|
|
183
|
-
const { netlifyConfig: netlifyConfigA, configMutations } = await runSteps({
|
|
184
|
-
steps: getBuildSteps(buildSteps),
|
|
185
|
-
buildDir,
|
|
186
|
-
nodePath,
|
|
187
|
-
constants,
|
|
188
|
-
netlifyConfig,
|
|
189
|
-
logs,
|
|
190
|
-
debug,
|
|
191
|
-
timers: [],
|
|
192
|
-
featureFlags,
|
|
193
|
-
childEnv,
|
|
194
|
-
repositoryRoot,
|
|
195
|
-
systemLog,
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
return { netlifyConfig: netlifyConfigA, configMutations }
|
|
199
|
-
}
|
|
130
|
+
};
|
|
131
|
+
const runBuildStep = async function ({ netlifyConfig, buildDir, nodePath, constants, logs, debug, featureFlags, childEnv, buildSteps, repositoryRoot, systemLog, }) {
|
|
132
|
+
const { netlifyConfig: netlifyConfigA, configMutations } = await runSteps({
|
|
133
|
+
steps: getBuildSteps(buildSteps),
|
|
134
|
+
buildDir,
|
|
135
|
+
nodePath,
|
|
136
|
+
constants,
|
|
137
|
+
netlifyConfig,
|
|
138
|
+
logs,
|
|
139
|
+
debug,
|
|
140
|
+
timers: [],
|
|
141
|
+
featureFlags,
|
|
142
|
+
childEnv,
|
|
143
|
+
repositoryRoot,
|
|
144
|
+
systemLog,
|
|
145
|
+
});
|
|
146
|
+
return { netlifyConfig: netlifyConfigA, configMutations };
|
|
147
|
+
};
|