@netlify/build 29.58.6 → 29.58.7
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/error/types.d.ts
CHANGED
|
@@ -22,42 +22,39 @@ export type BasicErrorInfo = {
|
|
|
22
22
|
/**
|
|
23
23
|
* Error severity groups the errors emitted by build and used to translate to exit code via SEVERITY_MAP
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
25
|
+
type ErrorSeverity =
|
|
26
|
+
/**
|
|
27
|
+
* build success
|
|
28
|
+
*/
|
|
29
|
+
'success'
|
|
30
|
+
/**
|
|
31
|
+
* not an error, e.g. build cancellation
|
|
32
|
+
*/
|
|
33
|
+
| 'none'
|
|
34
|
+
/**
|
|
35
|
+
* user error
|
|
36
|
+
*/
|
|
37
|
+
| 'info'
|
|
38
|
+
/**
|
|
39
|
+
* community plugin error
|
|
40
|
+
*/
|
|
41
|
+
| 'warning'
|
|
42
|
+
/**
|
|
43
|
+
* system error, including core plugin error
|
|
44
|
+
*/
|
|
45
|
+
| 'error';
|
|
47
46
|
/**
|
|
48
47
|
* How the stack trace should appear in the build error logs
|
|
49
48
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
message = "message"
|
|
60
|
-
}
|
|
49
|
+
type StackType =
|
|
50
|
+
/**
|
|
51
|
+
* not printed
|
|
52
|
+
*/
|
|
53
|
+
'none' | 'stack'
|
|
54
|
+
/**
|
|
55
|
+
* printed as is, but taken from `error.message`. Used when `error.stack` is not being correct due to the error being passed between different processes.
|
|
56
|
+
*/
|
|
57
|
+
| 'message';
|
|
61
58
|
type GroupFunction = ({ location }: {
|
|
62
59
|
location: ErrorLocation;
|
|
63
60
|
}) => string;
|
|
@@ -156,37 +153,16 @@ export interface ErrorType {
|
|
|
156
153
|
/**
|
|
157
154
|
* error severity (also used by Bugsnag)
|
|
158
155
|
*/
|
|
159
|
-
severity:
|
|
156
|
+
severity: ErrorSeverity;
|
|
160
157
|
/**
|
|
161
158
|
* how the stack trace should appear in build error logs
|
|
162
159
|
*/
|
|
163
|
-
stackType:
|
|
160
|
+
stackType: StackType;
|
|
164
161
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
readonly dependencies: "dependencies";
|
|
172
|
-
readonly pluginInput: "pluginInput";
|
|
173
|
-
readonly pluginUnsupportedVersion: "pluginUnsupportedVersion";
|
|
174
|
-
readonly buildCommand: "buildCommand";
|
|
175
|
-
readonly functionsBundling: "functionsBundling";
|
|
176
|
-
readonly secretScanningFoundSecrets: "secretScanningFoundSecrets";
|
|
177
|
-
readonly failPlugin: "failPlugin";
|
|
178
|
-
readonly failBuild: "failBuild";
|
|
179
|
-
readonly pluginValidation: "pluginValidation";
|
|
180
|
-
readonly pluginInternal: "pluginInternal";
|
|
181
|
-
readonly ipc: "ipc";
|
|
182
|
-
readonly corePlugin: "corePlugin";
|
|
183
|
-
readonly trustedPlugin: "trustedPlugin";
|
|
184
|
-
readonly coreStep: "coreStep";
|
|
185
|
-
readonly api: "api";
|
|
186
|
-
readonly deploy: "deploy";
|
|
187
|
-
readonly deployInternal: "deployInternal";
|
|
188
|
-
readonly exception: "exception";
|
|
189
|
-
readonly telemetry: "telemetry";
|
|
190
|
-
};
|
|
191
|
-
export type ErrorTypes = keyof typeof ErrorTypeMap;
|
|
162
|
+
type ErrorTypeMap =
|
|
163
|
+
/**
|
|
164
|
+
* Plugin called `utils.build.cancelBuild()`
|
|
165
|
+
*/
|
|
166
|
+
'cancelBuild' | 'resolveConfig' | 'dependencies' | 'pluginInput' | 'pluginUnsupportedVersion' | 'buildCommand' | 'functionsBundling' | 'secretScanningFoundSecrets' | 'failPlugin' | 'failBuild' | 'pluginValidation' | 'pluginInternal' | 'ipc' | 'corePlugin' | 'trustedPlugin' | 'coreStep' | 'api' | 'deploy' | 'deployInternal' | 'exception' | 'telemetry';
|
|
167
|
+
export type ErrorTypes = ErrorTypeMap;
|
|
192
168
|
export {};
|
package/lib/error/types.js
CHANGED
|
@@ -1,47 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error severity groups the errors emitted by build and used to translate to exit code via SEVERITY_MAP
|
|
3
|
-
*/
|
|
4
|
-
var ErrorSeverity;
|
|
5
|
-
(function (ErrorSeverity) {
|
|
6
|
-
/**
|
|
7
|
-
* build success
|
|
8
|
-
*/
|
|
9
|
-
ErrorSeverity["success"] = "success";
|
|
10
|
-
/**
|
|
11
|
-
* not an error, e.g. build cancellation
|
|
12
|
-
*/
|
|
13
|
-
ErrorSeverity["none"] = "none";
|
|
14
|
-
/**
|
|
15
|
-
* user error
|
|
16
|
-
*/
|
|
17
|
-
ErrorSeverity["info"] = "info";
|
|
18
|
-
/**
|
|
19
|
-
* community plugin error
|
|
20
|
-
*/
|
|
21
|
-
ErrorSeverity["warning"] = "warning";
|
|
22
|
-
/**
|
|
23
|
-
* system error, including core plugin error
|
|
24
|
-
*/
|
|
25
|
-
ErrorSeverity["error"] = "Error";
|
|
26
|
-
})(ErrorSeverity || (ErrorSeverity = {}));
|
|
27
|
-
/**
|
|
28
|
-
* How the stack trace should appear in the build error logs
|
|
29
|
-
*/
|
|
30
|
-
var StackType;
|
|
31
|
-
(function (StackType) {
|
|
32
|
-
/**
|
|
33
|
-
* not printed
|
|
34
|
-
*/
|
|
35
|
-
StackType["none"] = "none";
|
|
36
|
-
/*
|
|
37
|
-
* printed as is
|
|
38
|
-
*/
|
|
39
|
-
StackType["stack"] = "stack";
|
|
40
|
-
/**
|
|
41
|
-
* printed as is, but taken from `error.message`. Used when `error.stack` is not being correct due to the error being passed between different processes.
|
|
42
|
-
*/
|
|
43
|
-
StackType["message"] = "message";
|
|
44
|
-
})(StackType || (StackType = {}));
|
|
45
1
|
export const isBuildCommandLocation = function (location) {
|
|
46
2
|
const buildLocation = location;
|
|
47
3
|
return typeof buildLocation?.buildCommand === 'string' && typeof buildLocation?.buildCommandOrigin === 'string';
|
|
@@ -143,32 +99,6 @@ export const getTypeInfo = function ({ type }) {
|
|
|
143
99
|
const typeA = TYPES[type] === undefined ? DEFAULT_TYPE : type;
|
|
144
100
|
return { type: typeA, ...TYPES[typeA] };
|
|
145
101
|
};
|
|
146
|
-
const ErrorTypeMap = {
|
|
147
|
-
/**
|
|
148
|
-
* Plugin called `utils.build.cancelBuild()`
|
|
149
|
-
*/
|
|
150
|
-
cancelBuild: 'cancelBuild',
|
|
151
|
-
resolveConfig: 'resolveConfig',
|
|
152
|
-
dependencies: 'dependencies',
|
|
153
|
-
pluginInput: 'pluginInput',
|
|
154
|
-
pluginUnsupportedVersion: 'pluginUnsupportedVersion',
|
|
155
|
-
buildCommand: 'buildCommand',
|
|
156
|
-
functionsBundling: 'functionsBundling',
|
|
157
|
-
secretScanningFoundSecrets: 'secretScanningFoundSecrets',
|
|
158
|
-
failPlugin: 'failPlugin',
|
|
159
|
-
failBuild: 'failBuild',
|
|
160
|
-
pluginValidation: 'pluginValidation',
|
|
161
|
-
pluginInternal: 'pluginInternal',
|
|
162
|
-
ipc: 'ipc',
|
|
163
|
-
corePlugin: 'corePlugin',
|
|
164
|
-
trustedPlugin: 'trustedPlugin',
|
|
165
|
-
coreStep: 'coreStep',
|
|
166
|
-
api: 'api',
|
|
167
|
-
deploy: 'deploy',
|
|
168
|
-
deployInternal: 'deployInternal',
|
|
169
|
-
exception: 'exception',
|
|
170
|
-
telemetry: 'telemetry',
|
|
171
|
-
};
|
|
172
102
|
/**
|
|
173
103
|
* List of error types, and their related properties
|
|
174
104
|
* New error types should be added to Bugsnag since we use it for automated
|
package/lib/plugins/options.js
CHANGED
|
@@ -61,7 +61,6 @@ const isNotRedundantCorePlugin = function (pluginOptionsA, _index, pluginsOption
|
|
|
61
61
|
*/
|
|
62
62
|
export const getSpawnInfo = () => {
|
|
63
63
|
// we know that this package.json has a name as it's ours
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
65
64
|
const packageName = ROOT_PACKAGE_JSON.name;
|
|
66
65
|
return {
|
|
67
66
|
plugin: { packageName, pluginPackageJson: ROOT_PACKAGE_JSON },
|
|
@@ -4,6 +4,10 @@ import type { Many } from '../utils/many.js';
|
|
|
4
4
|
*/
|
|
5
5
|
export type NetlifyPluginCacheUtil = {
|
|
6
6
|
save(path: Many<string>, options?: {
|
|
7
|
+
/**
|
|
8
|
+
* @default `false`
|
|
9
|
+
*/
|
|
10
|
+
move?: boolean;
|
|
7
11
|
ttl?: number;
|
|
8
12
|
digests?: string[];
|
|
9
13
|
/**
|
|
@@ -11,6 +15,16 @@ export type NetlifyPluginCacheUtil = {
|
|
|
11
15
|
*/
|
|
12
16
|
cwd?: string;
|
|
13
17
|
}): Promise<boolean>;
|
|
18
|
+
restore(path: Many<string>, options?: {
|
|
19
|
+
/**
|
|
20
|
+
* @default `false`
|
|
21
|
+
*/
|
|
22
|
+
move?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @default `process.cwd()`
|
|
25
|
+
*/
|
|
26
|
+
cwd?: string;
|
|
27
|
+
}): Promise<boolean>;
|
|
14
28
|
list(options?: {
|
|
15
29
|
/**
|
|
16
30
|
* @default `process.cwd()`
|
|
@@ -21,7 +35,7 @@ export type NetlifyPluginCacheUtil = {
|
|
|
21
35
|
*/
|
|
22
36
|
depth?: number;
|
|
23
37
|
}): Promise<string[]>;
|
|
24
|
-
} & Record<'
|
|
38
|
+
} & Record<'remove' | 'has', (path: Many<string>, options?: {
|
|
25
39
|
/**
|
|
26
40
|
* @default `process.cwd()`
|
|
27
41
|
*/
|
package/lib/utils/resolve.js
CHANGED
|
@@ -21,7 +21,7 @@ export const resolvePath = async function (path, basedir) {
|
|
|
21
21
|
// `resolve` sometimes gives unhelpful error messages.
|
|
22
22
|
// https://github.com/browserify/resolve/issues/223
|
|
23
23
|
}
|
|
24
|
-
catch
|
|
24
|
+
catch {
|
|
25
25
|
return require.resolve(path, { paths: [basedir] });
|
|
26
26
|
}
|
|
27
27
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "29.58.
|
|
3
|
+
"version": "29.58.7",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"@netlify/config": "^20.21.6",
|
|
73
73
|
"@netlify/edge-bundler": "12.3.2",
|
|
74
74
|
"@netlify/framework-info": "^9.9.1",
|
|
75
|
-
"@netlify/functions-utils": "^5.3.
|
|
75
|
+
"@netlify/functions-utils": "^5.3.4",
|
|
76
76
|
"@netlify/git-utils": "^5.2.0",
|
|
77
77
|
"@netlify/opentelemetry-utils": "^1.3.0",
|
|
78
78
|
"@netlify/plugins-list": "^6.80.0",
|
|
79
79
|
"@netlify/run-utils": "^5.2.0",
|
|
80
|
-
"@netlify/zip-it-and-ship-it": "9.42.
|
|
80
|
+
"@netlify/zip-it-and-ship-it": "9.42.4",
|
|
81
81
|
"@sindresorhus/slugify": "^2.0.0",
|
|
82
82
|
"ansi-escapes": "^6.0.0",
|
|
83
83
|
"chalk": "^5.0.0",
|
|
@@ -164,5 +164,5 @@
|
|
|
164
164
|
"engines": {
|
|
165
165
|
"node": "^14.16.0 || >=16.0.0"
|
|
166
166
|
},
|
|
167
|
-
"gitHead": "
|
|
167
|
+
"gitHead": "a21bd09d429d1cf2b3cba00262149ddb36687960"
|
|
168
168
|
}
|