@taicode/common-base 1.7.3 → 1.7.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.
@@ -1,85 +1,122 @@
1
1
  /**
2
2
  * 错误类型模块
3
- * key 为错误的类型
4
- * value 为错误的上下文类型
5
- * 错误的上下文可以帮助系统更好的理解和处理错误
6
- * 一般存放的是错误发生时的关键信息,例如请求的路径,参数等等
7
- * 输入错误时输入的字段信息,校验规则等等
8
- * 可以通过模块声明合并来定义全局错误类型:
9
3
  *
10
- * @example
11
- * ```typescript
12
- * declare module '@taicode/common-base/error' {
13
- * interface UserErrorTypes {
14
- * 'validation-failed': { field?: string; value?: unknown; rule?: string }
15
- * 'permission-denied': { resource?: string; action?: string; userId?: string }
16
- * 'not-found': { id?: string; type?: string; query?: Record<string, unknown> }
17
- * }
4
+ * 提供两种错误类型:
5
+ * - UserError: 用户可见的错误(如验证失败、权限不足等)
6
+ * - SystemError: 系统内部错误(如数据库错误、网络错误等)
18
7
  *
19
- * interface SystemErrorTypes {
20
- * 'database-error': { query?: string; table?: string; operation?: string }
21
- * 'network-error': { url?: string; method?: string; status?: number }
22
- * 'service-unavailable': { service?: string; endpoint?: string; retryAfter?: number }
23
- * }
24
- * }
8
+ * **错误类型命名规范**:推荐使用全大写、下划线分割的风格(如 `VALIDATION_FAILED`)
25
9
  *
26
- * // 然后可以这样使用:
27
- * const userError = new UserError('validation-failed', '邮箱格式无效', {
28
- * field: 'email',
29
- * value: 'invalid-email',
30
- * rule: 'email-format'
10
+ * @example
11
+ * ```typescript
12
+ * // 1. 使用 define 方法定义类型安全的错误类
13
+ * const MyUserError = UserError.define({
14
+ * 'VALIDATION_FAILED': {} as { field?: string; value?: unknown },
15
+ * 'PERMISSION_DENIED': {} as { resource?: string; action?: string },
16
+ * 'NOT_FOUND': {} as { id?: string; type?: string }
31
17
  * })
32
- * // 或者省略 message,直接使用 type 作为消息
33
- * const userError2 = new UserError('validation-failed', undefined, {
18
+ *
19
+ * // type 会被自动推导和限制
20
+ * const error = new MyUserError('VALIDATION_FAILED', {
34
21
  * field: 'email',
35
- * value: 'invalid-email',
36
- * rule: 'email-format'
37
- * })
38
- * const systemError = new SystemError('database-error', '数据库连接失败', {
39
- * table: 'users',
40
- * query: 'SELECT * FROM users',
41
- * operation: 'select'
42
- * })
43
- * // 或者省略 message
44
- * const systemError2 = new SystemError('database-error', undefined, {
45
- * table: 'users',
46
- * query: 'SELECT * FROM users',
47
- * operation: 'select'
48
- * })
22
+ * value: 'invalid@'
23
+ * }, '验证失败')
24
+ *
25
+ * // 获取所有定义的错误类型
26
+ * console.log(MyUserError.types) // ['VALIDATION_FAILED', 'PERMISSION_DENIED', 'NOT_FOUND']
27
+ *
28
+ * // 2. 直接使用基础错误类
29
+ * const error2 = new UserError('CUSTOM_ERROR', undefined, '自定义错误')
30
+ * const error3 = new SystemError('DATABASE_ERROR', undefined, '数据库错误')
31
+ *
32
+ * // 3. 使用类型守卫检查错误
33
+ * if (MyUserError.is(error)) {
34
+ * console.log(error.type, error.context)
35
+ * }
49
36
  * ```
50
37
  */
51
- interface ErrorContext {
52
- /** 导致此错误的原因,通常是另一个错误或异常 */
38
+ /**
39
+ * 错误上下文接口
40
+ * 可以通过交叉类型扩展自定义属性
41
+ */
42
+ export interface ErrorContext {
43
+ /** 导致此错误的原因 */
53
44
  cause?: unknown;
45
+ /** 允许扩展其他属性 */
46
+ [key: string]: unknown;
54
47
  }
55
- export interface UserErrorTypes {
56
- }
57
- export interface SystemErrorTypes {
58
- }
59
- export type UserErrorType = keyof UserErrorTypes extends never ? string : Extract<keyof UserErrorTypes, string>;
60
- export type SystemErrorType = keyof SystemErrorTypes extends never ? string : Extract<keyof SystemErrorTypes, string>;
61
- export type UserErrorContext<T extends string> = T extends keyof UserErrorTypes ? UserErrorTypes[T] & ErrorContext : ErrorContext;
62
- export type SystemErrorContext<T extends string> = T extends keyof SystemErrorTypes ? SystemErrorTypes[T] & ErrorContext : ErrorContext;
63
- /** 用户可见的错误 */
64
- export declare class UserError<T extends UserErrorType = UserErrorType> extends Error {
48
+ /**
49
+ * 用户可见的错误
50
+ * 用于表示用户操作导致的错误,如验证失败、权限不足等
51
+ */
52
+ export declare class UserError<T extends string = string> extends Error {
65
53
  type: T;
54
+ context?: ErrorContext | undefined;
66
55
  message: string;
67
- context?: UserErrorContext<T> | undefined;
68
- constructor(type: T, message?: string, context?: UserErrorContext<T> | undefined);
69
- static is<T extends UserErrorType = UserErrorType>(error: unknown): error is UserError<T>;
56
+ constructor(type: T, context?: ErrorContext | undefined, message?: string);
57
+ static is<T extends string = string>(error: unknown): error is UserError<T>;
58
+ /**
59
+ * 定义一个绑定了特定错误类型的 UserError 类
60
+ * @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
61
+ * @returns 返回绑定了特定类型的 UserError 类
62
+ */
63
+ static define<Types extends Record<string, ErrorContext>>(errorTypes: Types): {
64
+ new (type: Extract<keyof Types, string>, context?: Types[Extract<keyof Types, string>], message?: string): {
65
+ readonly type: Extract<keyof Types, string>;
66
+ readonly context?: Types[Extract<keyof Types, string>];
67
+ name: string;
68
+ message: string;
69
+ stack?: string;
70
+ cause?: unknown;
71
+ };
72
+ /** 获取所有定义的错误类型 */
73
+ readonly types: Extract<keyof Types, string>[];
74
+ is(error: unknown): error is {
75
+ readonly type: Extract<keyof Types, string>;
76
+ readonly context?: Types[Extract<keyof Types, string>];
77
+ name: string;
78
+ message: string;
79
+ stack?: string;
80
+ cause?: unknown;
81
+ };
82
+ isError(error: unknown): error is Error;
83
+ };
70
84
  }
71
- /** 系统错误 */
72
- export declare class SystemError<T extends SystemErrorType = SystemErrorType> extends Error {
85
+ /**
86
+ * 系统内部错误
87
+ * 用于表示系统层面的错误,如数据库错误、网络错误等
88
+ */
89
+ export declare class SystemError<T extends string = string> extends Error {
73
90
  type: T;
74
- message: string;
75
- context?: SystemErrorContext<T> | undefined;
76
- constructor(type: T, message?: string, context?: SystemErrorContext<T> | undefined);
77
- static is<T extends SystemErrorType = SystemErrorType>(error: unknown): error is SystemError<T>;
78
- }
79
- export declare class UnknownError extends Error {
80
91
  context?: ErrorContext | undefined;
81
- constructor(message: string, context?: ErrorContext | undefined);
82
- static is(error: unknown): error is UnknownError;
92
+ message: string;
93
+ constructor(type: T, context?: ErrorContext | undefined, message?: string);
94
+ static is<T extends string = string>(error: unknown): error is SystemError<T>;
95
+ /**
96
+ * 定义一个绑定了特定错误类型的 SystemError 类
97
+ * @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
98
+ * @returns 返回绑定了特定类型的 SystemError 类
99
+ */
100
+ static define<Types extends Record<string, ErrorContext>>(errorTypes: Types): {
101
+ new (type: Extract<keyof Types, string>, context?: Types[Extract<keyof Types, string>], message?: string): {
102
+ readonly type: Extract<keyof Types, string>;
103
+ readonly context?: Types[Extract<keyof Types, string>];
104
+ name: string;
105
+ message: string;
106
+ stack?: string;
107
+ cause?: unknown;
108
+ };
109
+ /** 获取所有定义的错误类型 */
110
+ readonly types: Extract<keyof Types, string>[];
111
+ is(error: unknown): error is {
112
+ readonly type: Extract<keyof Types, string>;
113
+ readonly context?: Types[Extract<keyof Types, string>];
114
+ name: string;
115
+ message: string;
116
+ stack?: string;
117
+ cause?: unknown;
118
+ };
119
+ isError(error: unknown): error is Error;
120
+ };
83
121
  }
84
- export {};
85
122
  //# sourceMappingURL=error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../source/error/error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,UAAU,YAAY;IACpB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAID,MAAM,WAAW,cAAc;CAAG;AAClC,MAAM,WAAW,gBAAgB;CAAG;AAGpC,MAAM,MAAM,aAAa,GAAG,MAAM,cAAc,SAAS,KAAK,GAAG,MAAM,GAAG,OAAO,C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,qBAAa,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IAEtD,IAAI,EAAE,CAAC;IACP,OAAO,CAAC,EAAE,YAAY;IACtB,OAAO,EAAE,MAAM;gBAFf,IAAI,EAAE,CAAC,EACP,OAAO,CAAC,EAAE,YAAY,YAAA,EACtB,OAAO,GAAE,MAAW;IAM7B,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC;IAI7E;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,UAAU,EAAE,KAAK;2DAY3D,KAAK,8BAAW,YACjB,MAAM;;+BARS,KAAK,8BAAW;;;;;;QAE1C,kBAAkB;wBACiC,8BAAW;kBAa7C,OAAO,GAAG,KAAK;;+BAhBN,KAAK,8BAAW;;;;;SAgBU;;;CAKzD"}
@@ -1,93 +1,119 @@
1
1
  /**
2
2
  * 错误类型模块
3
- * key 为错误的类型
4
- * value 为错误的上下文类型
5
- * 错误的上下文可以帮助系统更好的理解和处理错误
6
- * 一般存放的是错误发生时的关键信息,例如请求的路径,参数等等
7
- * 输入错误时输入的字段信息,校验规则等等
8
- * 可以通过模块声明合并来定义全局错误类型:
9
3
  *
10
- * @example
11
- * ```typescript
12
- * declare module '@taicode/common-base/error' {
13
- * interface UserErrorTypes {
14
- * 'validation-failed': { field?: string; value?: unknown; rule?: string }
15
- * 'permission-denied': { resource?: string; action?: string; userId?: string }
16
- * 'not-found': { id?: string; type?: string; query?: Record<string, unknown> }
17
- * }
4
+ * 提供两种错误类型:
5
+ * - UserError: 用户可见的错误(如验证失败、权限不足等)
6
+ * - SystemError: 系统内部错误(如数据库错误、网络错误等)
18
7
  *
19
- * interface SystemErrorTypes {
20
- * 'database-error': { query?: string; table?: string; operation?: string }
21
- * 'network-error': { url?: string; method?: string; status?: number }
22
- * 'service-unavailable': { service?: string; endpoint?: string; retryAfter?: number }
23
- * }
24
- * }
8
+ * **错误类型命名规范**:推荐使用全大写、下划线分割的风格(如 `VALIDATION_FAILED`)
25
9
  *
26
- * // 然后可以这样使用:
27
- * const userError = new UserError('validation-failed', '邮箱格式无效', {
28
- * field: 'email',
29
- * value: 'invalid-email',
30
- * rule: 'email-format'
10
+ * @example
11
+ * ```typescript
12
+ * // 1. 使用 define 方法定义类型安全的错误类
13
+ * const MyUserError = UserError.define({
14
+ * 'VALIDATION_FAILED': {} as { field?: string; value?: unknown },
15
+ * 'PERMISSION_DENIED': {} as { resource?: string; action?: string },
16
+ * 'NOT_FOUND': {} as { id?: string; type?: string }
31
17
  * })
32
- * // 或者省略 message,直接使用 type 作为消息
33
- * const userError2 = new UserError('validation-failed', undefined, {
18
+ *
19
+ * // type 会被自动推导和限制
20
+ * const error = new MyUserError('VALIDATION_FAILED', {
34
21
  * field: 'email',
35
- * value: 'invalid-email',
36
- * rule: 'email-format'
37
- * })
38
- * const systemError = new SystemError('database-error', '数据库连接失败', {
39
- * table: 'users',
40
- * query: 'SELECT * FROM users',
41
- * operation: 'select'
42
- * })
43
- * // 或者省略 message
44
- * const systemError2 = new SystemError('database-error', undefined, {
45
- * table: 'users',
46
- * query: 'SELECT * FROM users',
47
- * operation: 'select'
48
- * })
22
+ * value: 'invalid@'
23
+ * }, '验证失败')
24
+ *
25
+ * // 获取所有定义的错误类型
26
+ * console.log(MyUserError.types) // ['VALIDATION_FAILED', 'PERMISSION_DENIED', 'NOT_FOUND']
27
+ *
28
+ * // 2. 直接使用基础错误类
29
+ * const error2 = new UserError('CUSTOM_ERROR', undefined, '自定义错误')
30
+ * const error3 = new SystemError('DATABASE_ERROR', undefined, '数据库错误')
31
+ *
32
+ * // 3. 使用类型守卫检查错误
33
+ * if (MyUserError.is(error)) {
34
+ * console.log(error.type, error.context)
35
+ * }
49
36
  * ```
50
37
  */
51
- /** 用户可见的错误 */
38
+ /**
39
+ * 用户可见的错误
40
+ * 用于表示用户操作导致的错误,如验证失败、权限不足等
41
+ */
52
42
  export class UserError extends Error {
53
43
  type;
54
- message;
55
44
  context;
56
- constructor(type, message = '', context) {
45
+ message;
46
+ constructor(type, context, message = '') {
57
47
  super(message, context);
58
48
  this.type = type;
59
- this.message = message;
60
49
  this.context = context;
50
+ this.message = message;
61
51
  this.name = 'UserError';
62
52
  }
63
53
  static is(error) {
64
54
  return error instanceof UserError;
65
55
  }
56
+ /**
57
+ * 定义一个绑定了特定错误类型的 UserError 类
58
+ * @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
59
+ * @returns 返回绑定了特定类型的 UserError 类
60
+ */
61
+ static define(errorTypes) {
62
+ return class BoundUserError extends Error {
63
+ type;
64
+ context;
65
+ /** 获取所有定义的错误类型 */
66
+ static types = Object.keys(errorTypes);
67
+ constructor(type, context, message = '') {
68
+ super(message, context);
69
+ this.name = 'UserError';
70
+ this.type = type;
71
+ this.context = context;
72
+ }
73
+ static is(error) {
74
+ return error instanceof BoundUserError;
75
+ }
76
+ };
77
+ }
66
78
  }
67
- /** 系统错误 */
79
+ /**
80
+ * 系统内部错误
81
+ * 用于表示系统层面的错误,如数据库错误、网络错误等
82
+ */
68
83
  export class SystemError extends Error {
69
84
  type;
70
- message;
71
85
  context;
72
- constructor(type, message = '', context) {
86
+ message;
87
+ constructor(type, context, message = '') {
73
88
  super(message, context);
74
89
  this.type = type;
75
- this.message = message;
76
90
  this.context = context;
91
+ this.message = message;
77
92
  this.name = 'SystemError';
78
93
  }
79
94
  static is(error) {
80
95
  return error instanceof SystemError;
81
96
  }
82
- }
83
- export class UnknownError extends Error {
84
- context;
85
- constructor(message, context) {
86
- super(message, context);
87
- this.context = context;
88
- this.name = 'UnknownError';
89
- }
90
- static is(error) {
91
- return error instanceof UnknownError;
97
+ /**
98
+ * 定义一个绑定了特定错误类型的 SystemError
99
+ * @param errorTypes 错误类型定义对象,key 为错误类型,value 为上下文类型
100
+ * @returns 返回绑定了特定类型的 SystemError 类
101
+ */
102
+ static define(errorTypes) {
103
+ return class BoundSystemError extends Error {
104
+ type;
105
+ context;
106
+ /** 获取所有定义的错误类型 */
107
+ static types = Object.keys(errorTypes);
108
+ constructor(type, context, message = '') {
109
+ super(message, context);
110
+ this.name = 'SystemError';
111
+ this.type = type;
112
+ this.context = context;
113
+ }
114
+ static is(error) {
115
+ return error instanceof BoundSystemError;
116
+ }
117
+ };
92
118
  }
93
119
  }
@@ -1,19 +1,2 @@
1
- declare module './error' {
2
- interface UserErrorTypes {
3
- VALIDATION_ERROR: unknown;
4
- TEST_ERROR: unknown;
5
- USER_ERROR: unknown;
6
- REQUIRED_FIELD: unknown;
7
- INVALID_FORMAT: unknown;
8
- OUT_OF_RANGE: unknown;
9
- }
10
- interface SystemErrorTypes {
11
- DATABASE_ERROR: unknown;
12
- NETWORK_ERROR: unknown;
13
- FILE_ERROR: unknown;
14
- TEST_ERROR: unknown;
15
- SYSTEM_ERROR: unknown;
16
- }
17
- }
18
1
  export {};
19
2
  //# sourceMappingURL=error.test.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.test.d.ts","sourceRoot":"","sources":["../../source/error/error.test.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,SAAS,CAAC;IACvB,UAAU,cAAc;QACtB,gBAAgB,EAAE,OAAO,CAAA;QACzB,UAAU,EAAE,OAAO,CAAA;QACnB,UAAU,EAAE,OAAO,CAAA;QACnB,cAAc,EAAE,OAAO,CAAA;QACvB,cAAc,EAAE,OAAO,CAAA;QACvB,YAAY,EAAE,OAAO,CAAA;KACtB;IAED,UAAU,gBAAgB;QACxB,cAAc,EAAE,OAAO,CAAA;QACvB,aAAa,EAAE,OAAO,CAAA;QACtB,UAAU,EAAE,OAAO,CAAA;QACnB,UAAU,EAAE,OAAO,CAAA;QACnB,YAAY,EAAE,OAAO,CAAA;KACtB;CACF"}
1
+ {"version":3,"file":"error.test.d.ts","sourceRoot":"","sources":["../../source/error/error.test.ts"],"names":[],"mappings":""}