@netlify/build 27.20.4 → 27.20.6
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 +14 -7
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
// From CLI `--featureFlags=a,b,c` to programmatic `{ a: true, b: true, c: true }`
|
|
2
2
|
export const normalizeCliFeatureFlags = function (cliFeatureFlags) {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
3
|
+
return Object.assign({}, ...cliFeatureFlags.split(',').filter(isNotEmpty).map(getFeatureFlag));
|
|
4
|
+
};
|
|
6
5
|
const isNotEmpty = function (name) {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
6
|
+
return name.trim() !== '';
|
|
7
|
+
};
|
|
10
8
|
const getFeatureFlag = function (name) {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
9
|
+
return { [name]: true };
|
|
10
|
+
};
|
|
14
11
|
// Default values for feature flags
|
|
15
12
|
export const DEFAULT_FEATURE_FLAGS = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
13
|
+
buildbot_es_modules_esbuild: false,
|
|
14
|
+
buildbot_zisi_trace_nft: false,
|
|
15
|
+
buildbot_zisi_esbuild_parser: false,
|
|
16
|
+
edge_functions_cache_cli: false,
|
|
17
|
+
edge_functions_produce_eszip: false,
|
|
18
|
+
edge_functions_system_logger: false,
|
|
19
|
+
};
|
package/lib/core/flags.js
CHANGED
|
@@ -1,202 +1,201 @@
|
|
|
1
1
|
const jsonParse = function (value) {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
2
|
+
return value === undefined ? undefined : JSON.parse(value);
|
|
3
|
+
};
|
|
5
4
|
// All CLI flags
|
|
6
5
|
export const FLAGS = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
config: {
|
|
7
|
+
string: true,
|
|
8
|
+
describe: `Path to the configuration file.
|
|
10
9
|
Defaults to any netlify.toml in the git repository root directory or the base directory`,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
},
|
|
11
|
+
defaultConfig: {
|
|
12
|
+
string: true,
|
|
13
|
+
describe: `JSON configuration object containing default values.
|
|
15
14
|
Each configuration default value is used unless overriden through the main configuration file.
|
|
16
15
|
Default: none.`,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
coerce: jsonParse,
|
|
17
|
+
hidden: true,
|
|
18
|
+
},
|
|
19
|
+
cachedConfig: {
|
|
20
|
+
string: true,
|
|
21
|
+
describe: `JSON configuration object returned by @netlify/config when --output=/ is used
|
|
23
22
|
or when using @netlify/config programmatically.
|
|
24
23
|
This is done as a performance optimization to cache the configuration loading logic.
|
|
25
24
|
Default: none.`,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
coerce: jsonParse,
|
|
26
|
+
hidden: true,
|
|
27
|
+
},
|
|
28
|
+
cachedConfigPath: {
|
|
29
|
+
string: true,
|
|
30
|
+
describe: `File path to the JSON configuration object returned by @netlify/config
|
|
32
31
|
when --output=/path is used.
|
|
33
32
|
This is done as a performance optimization to cache the configuration loading logic.
|
|
34
33
|
Default: none.`,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
hidden: true,
|
|
35
|
+
},
|
|
36
|
+
cwd: {
|
|
37
|
+
string: true,
|
|
38
|
+
describe: `Current directory. Used to retrieve the configuration file.
|
|
40
39
|
Default: current directory`,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
},
|
|
41
|
+
repositoryRoot: {
|
|
42
|
+
string: true,
|
|
43
|
+
describe: `Git repository root directory. Used to retrieve the configuration file.
|
|
45
44
|
Default: automatically guessed`,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
},
|
|
46
|
+
apiHost: {
|
|
47
|
+
string: true,
|
|
48
|
+
describe: `Netlify API endpoint.
|
|
50
49
|
Default: automatically guessed`,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
},
|
|
51
|
+
token: {
|
|
52
|
+
string: true,
|
|
53
|
+
describe: `Netlify API token for authentication.
|
|
55
54
|
The NETLIFY_AUTH_TOKEN environment variable can be used as well.`,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
},
|
|
56
|
+
siteId: {
|
|
57
|
+
string: true,
|
|
58
|
+
describe: `Netlify Site ID.`,
|
|
59
|
+
},
|
|
60
|
+
deployId: {
|
|
61
|
+
string: true,
|
|
62
|
+
describe: `Netlify Deploy ID.
|
|
64
63
|
Default: automatically guessed`,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
},
|
|
65
|
+
buildId: {
|
|
66
|
+
string: true,
|
|
67
|
+
describe: `Netlify Build ID.
|
|
69
68
|
Default: automatically guessed`,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
},
|
|
70
|
+
context: {
|
|
71
|
+
string: true,
|
|
72
|
+
describe: `Build context.
|
|
74
73
|
Default: 'production'`,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
},
|
|
75
|
+
branch: {
|
|
76
|
+
string: true,
|
|
77
|
+
describe: `Repository branch.
|
|
79
78
|
Default: automatically guessed`,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
},
|
|
80
|
+
framework: {
|
|
81
|
+
string: true,
|
|
82
|
+
describe: 'Front-end framework.',
|
|
83
|
+
hidden: true,
|
|
84
|
+
},
|
|
85
|
+
baseRelDir: {
|
|
86
|
+
boolean: true,
|
|
87
|
+
describe: `Feature flag meant for backward compatibility.
|
|
89
88
|
When enabled, if the 'build.base' configuration property is defined, it is used
|
|
90
89
|
to try to retrieve a second configuration file and discard the first one.
|
|
91
90
|
Default: true`,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
hidden: true,
|
|
92
|
+
},
|
|
93
|
+
dry: {
|
|
94
|
+
alias: 'dry-run',
|
|
95
|
+
boolean: true,
|
|
96
|
+
describe: `Run in dry mode, i.e. printing steps without executing them.
|
|
98
97
|
Default: false`,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
},
|
|
99
|
+
nodePath: {
|
|
100
|
+
string: true,
|
|
101
|
+
describe: `Path to the Node.js binary to use in the build command and plugins.
|
|
103
102
|
Default: Current Node.js binary`,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
},
|
|
104
|
+
functionsDistDir: {
|
|
105
|
+
string: true,
|
|
106
|
+
describe: `Path to the directory where packaged functions are kept.
|
|
108
107
|
Default: automatically guessed`,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
hidden: true,
|
|
109
|
+
},
|
|
110
|
+
edgeFunctionsDistDir: {
|
|
111
|
+
string: true,
|
|
112
|
+
describe: `Path to the directory where packaged Edge Functions are kept.
|
|
114
113
|
Default: automatically guessed`,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
hidden: true,
|
|
115
|
+
},
|
|
116
|
+
cacheDir: {
|
|
117
|
+
string: true,
|
|
118
|
+
describe: `Path to the cache directory.
|
|
120
119
|
Default: .netlify/cache/`,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
120
|
+
hidden: true,
|
|
121
|
+
},
|
|
122
|
+
buildbotServerSocket: {
|
|
123
|
+
string: true,
|
|
124
|
+
describe: `Path to the buildbot server socket. This is used to connect to the buildbot to trigger deploys.`,
|
|
125
|
+
hidden: true,
|
|
126
|
+
},
|
|
127
|
+
telemetry: {
|
|
128
|
+
boolean: true,
|
|
129
|
+
describe: `Enable telemetry.
|
|
131
130
|
Default: false`,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
},
|
|
132
|
+
mode: {
|
|
133
|
+
string: true,
|
|
134
|
+
describe: `Environment in which this is loaded. Can be:
|
|
136
135
|
- 'buildbot': within Netlify Buildbot
|
|
137
136
|
- 'cli': within Netlify CLI
|
|
138
137
|
- 'require': through import('@netlify/build')`,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
138
|
+
hidden: true,
|
|
139
|
+
},
|
|
140
|
+
debug: {
|
|
141
|
+
boolean: true,
|
|
142
|
+
describe: 'Print user-facing debugging information',
|
|
143
|
+
hidden: true,
|
|
144
|
+
},
|
|
145
|
+
systemLogFile: {
|
|
146
|
+
type: 'number',
|
|
147
|
+
describe: 'File descriptor to where system logs should be piped',
|
|
148
|
+
hidden: true,
|
|
149
|
+
},
|
|
150
|
+
verbose: {
|
|
151
|
+
boolean: true,
|
|
152
|
+
describe: 'Print internal debugging information',
|
|
153
|
+
hidden: true,
|
|
154
|
+
},
|
|
155
|
+
sendStatus: {
|
|
156
|
+
boolean: true,
|
|
157
|
+
describe: 'Whether plugin statuses should be sent to the Netlify API',
|
|
158
|
+
hidden: true,
|
|
159
|
+
},
|
|
160
|
+
saveConfig: {
|
|
161
|
+
boolean: true,
|
|
162
|
+
describe: 'Whether configuration changes should be saved to netlify.toml',
|
|
163
|
+
hidden: true,
|
|
164
|
+
},
|
|
165
|
+
testOpts: {
|
|
166
|
+
describe: 'Options for testing only',
|
|
167
|
+
hidden: true,
|
|
168
|
+
},
|
|
169
|
+
featureFlags: {
|
|
170
|
+
describe: 'Comma-separated list of feature flags to enable unreleased features',
|
|
171
|
+
hidden: true,
|
|
172
|
+
},
|
|
173
|
+
statsd: {
|
|
174
|
+
describe: 'Statsd-related options, for performance measuring',
|
|
175
|
+
hidden: true,
|
|
176
|
+
},
|
|
177
|
+
'statsd.host': {
|
|
178
|
+
type: 'string',
|
|
179
|
+
describe: 'Statsd host',
|
|
180
|
+
hidden: true,
|
|
181
|
+
},
|
|
182
|
+
'statsd.port': {
|
|
183
|
+
type: 'number',
|
|
184
|
+
describe: 'Statsd port',
|
|
185
|
+
hidden: true,
|
|
186
|
+
},
|
|
187
|
+
offline: {
|
|
188
|
+
boolean: true,
|
|
189
|
+
describe: `Do not send requests to the Netlify API to retrieve site settings.
|
|
191
190
|
Default: false`,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
191
|
+
},
|
|
192
|
+
buffer: {
|
|
193
|
+
boolean: true,
|
|
194
|
+
describe: 'Buffer output instead of printing it',
|
|
195
|
+
},
|
|
196
|
+
timeline: {
|
|
197
|
+
string: true,
|
|
198
|
+
describe: 'The sequence of lifecycle events to run',
|
|
199
|
+
hidden: true,
|
|
200
|
+
},
|
|
201
|
+
};
|
package/lib/core/lingering.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import psList from 'ps-list'
|
|
2
|
-
|
|
3
|
-
import { logLingeringProcesses } from '../log/messages/core.js'
|
|
4
|
-
|
|
1
|
+
import psList from 'ps-list';
|
|
2
|
+
import { logLingeringProcesses } from '../log/messages/core.js';
|
|
5
3
|
// Print a warning when some build processes are still running.
|
|
6
4
|
// We cannot rely on using the process tree:
|
|
7
5
|
// - This is because it is impossible to know whether a process was a child of
|
|
@@ -18,68 +16,53 @@ import { logLingeringProcesses } from '../log/messages/core.js'
|
|
|
18
16
|
// Therefore, we run this in a controlled environment only (the buildbot) and
|
|
19
17
|
// exclude specific processes manually. This is a lesser evil, although still
|
|
20
18
|
// quite hacky.
|
|
21
|
-
export const warnOnLingeringProcesses = async function ({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const commands = processes.map(getCommand).filter(isNotIgnoredCommand)
|
|
33
|
-
|
|
34
|
-
if (commands.length === 0) {
|
|
35
|
-
return
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
logLingeringProcesses(logs, commands)
|
|
39
|
-
}
|
|
40
|
-
|
|
19
|
+
export const warnOnLingeringProcesses = async function ({ mode, logs, testOpts: { silentLingeringProcesses = false }, }) {
|
|
20
|
+
if (mode !== 'buildbot' || silentLingeringProcesses) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const processes = await psList();
|
|
24
|
+
const commands = processes.map(getCommand).filter(isNotIgnoredCommand);
|
|
25
|
+
if (commands.length === 0) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
logLingeringProcesses(logs, commands);
|
|
29
|
+
};
|
|
41
30
|
// `cmd` is only available on Unix. Unlike `name`, it includes the arguments.
|
|
42
31
|
const getCommand = function ({ name, cmd = name }) {
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
32
|
+
return cmd;
|
|
33
|
+
};
|
|
46
34
|
// We ignore any command known to be internal to the buildbot.
|
|
47
35
|
// We also ignore commands known not to complete properly in builds if they are
|
|
48
36
|
// widely used.
|
|
49
37
|
const isNotIgnoredCommand = function (command) {
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
38
|
+
return !IGNORED_COMMANDS.some((ignoredCommand) => matchesIgnoredCommand(command, ignoredCommand));
|
|
39
|
+
};
|
|
53
40
|
const matchesIgnoredCommand = function (command, ignoredCommand) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
41
|
+
if (typeof ignoredCommand === 'string') {
|
|
42
|
+
return command.includes(ignoredCommand);
|
|
43
|
+
}
|
|
44
|
+
return ignoredCommand.test(command);
|
|
45
|
+
};
|
|
61
46
|
const IGNORED_COMMANDS = [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
'broccoli-babel-transpiler',
|
|
85
|
-
]
|
|
47
|
+
// TODO: Those can most likely be removed
|
|
48
|
+
'ps',
|
|
49
|
+
'grep',
|
|
50
|
+
'bash',
|
|
51
|
+
// Internal buildbot commands
|
|
52
|
+
'[build]',
|
|
53
|
+
/buildbot.*\[node]/,
|
|
54
|
+
// buildbot's main Bash script
|
|
55
|
+
'/opt/build-bin/build',
|
|
56
|
+
// `@netlify/build` binary itself
|
|
57
|
+
'netlify-build',
|
|
58
|
+
// Plugin child processes spawned by @netlify/build
|
|
59
|
+
'@netlify/build',
|
|
60
|
+
// Shown for parent processes with currently running child processes.
|
|
61
|
+
// Happens on `ps` itself.
|
|
62
|
+
'defunct',
|
|
63
|
+
// Processes often left running. We should report those but don't because of
|
|
64
|
+
// how common those are in production builds
|
|
65
|
+
'gatsby-telemetry',
|
|
66
|
+
'jest-worker',
|
|
67
|
+
'broccoli-babel-transpiler',
|
|
68
|
+
];
|