@actiondock/builder 2.0.11 → 2.2.0

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/src/errors.ts DELETED
@@ -1,67 +0,0 @@
1
- /**
2
- * Builder 模块基础错误类。
3
- */
4
- export class BuilderError extends Error {
5
- constructor(message: string) {
6
- super(message);
7
- this.name = "BuilderError";
8
- }
9
- }
10
-
11
- /**
12
- * 构建规划阶段抛出的错误。
13
- */
14
- export class PlannerError extends BuilderError {
15
- public readonly code: string;
16
-
17
- constructor(message: string, code = "PLANNER_ERROR") {
18
- super(message);
19
- this.name = "PlannerError";
20
- this.code = code;
21
- }
22
- }
23
-
24
- /**
25
- * 编译器参数与目标平台校验错误。
26
- */
27
- export class CompilerValidationError extends BuilderError {
28
- public readonly code: string;
29
- public readonly target?: string;
30
-
31
- constructor(message: string, options: { code?: string; target?: string } = {}) {
32
- super(message);
33
- this.name = "CompilerValidationError";
34
- this.code = options.code || "COMPILER_VALIDATION_ERROR";
35
- this.target = options.target;
36
- }
37
- }
38
-
39
- /**
40
- * 编译器调用执行失败错误。包含标准化错误码与详情。
41
- */
42
- export class CompilerError extends BuilderError {
43
- public readonly code: string;
44
- public readonly exitCode: number;
45
- public readonly rawError: string;
46
- public readonly details: string[];
47
- public readonly target?: string;
48
-
49
- constructor(
50
- message: string,
51
- options: {
52
- code: string;
53
- exitCode: number;
54
- rawError: string;
55
- details?: string[];
56
- target?: string;
57
- }
58
- ) {
59
- super(message);
60
- this.name = "CompilerError";
61
- this.code = options.code;
62
- this.exitCode = options.exitCode;
63
- this.rawError = options.rawError;
64
- this.details = options.details || [];
65
- this.target = options.target;
66
- }
67
- }