@withwiz/toolkit 0.2.1 → 0.2.2

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.
Files changed (83) hide show
  1. package/dist/auth/index.js +6 -6
  2. package/dist/{chunk-6JZQE7ZQ.js → chunk-GSUQE3SZ.js} +8 -8
  3. package/dist/{chunk-FH6E36YZ.js → chunk-SLG26KHZ.js} +1 -1
  4. package/dist/components/ui/DataTable.js +6 -6
  5. package/dist/components/ui/data-table/DataTable.js +6 -6
  6. package/dist/components/ui/data-table/DataTableFilters.js +2 -2
  7. package/dist/components/ui/data-table/DataTableSearch.js +2 -2
  8. package/dist/constants/index.js +13 -13
  9. package/dist/error/index.d.ts +0 -4
  10. package/dist/error/index.js +12 -80
  11. package/dist/geolocation/index.js +4 -4
  12. package/dist/geolocation/providers/index.js +4 -4
  13. package/dist/middleware/error-handler.js +2 -2
  14. package/dist/middleware/index.js +3 -3
  15. package/dist/middleware/wrappers.js +3 -3
  16. package/dist/utils/format-number.js +30 -4
  17. package/dist/utils/short-code-generator.js +36 -4
  18. package/dist/utils/url-normalizer.js +194 -10
  19. package/package.json +1 -2
  20. package/dist/chunk-5ATB5D6S.js +0 -40
  21. package/dist/chunk-6C7HQIX4.js +0 -13
  22. package/dist/chunk-6UAYU5NU.js +0 -102
  23. package/dist/chunk-7VJNLGAS.js +0 -110
  24. package/dist/chunk-7XFHGAJP.js +0 -0
  25. package/dist/chunk-A6EAAWMK.js +0 -50
  26. package/dist/chunk-COK4ZXNG.js +0 -0
  27. package/dist/chunk-EQYTE7WD.js +0 -139
  28. package/dist/chunk-FW3IEJ7H.js +0 -71
  29. package/dist/chunk-HGC4CCKB.js +0 -29
  30. package/dist/chunk-JS5VI3OW.js +0 -143
  31. package/dist/chunk-MYLGYX4K.js +0 -57
  32. package/dist/chunk-TDZJ6SAI.js +0 -34
  33. package/dist/chunk-TEIYA7U4.js +0 -72
  34. package/dist/chunk-ULF5RDDX.js +0 -0
  35. package/dist/chunk-VWODEQ5C.js +0 -204
  36. package/dist/chunk-Y2TUZFCP.js +0 -0
  37. package/dist/chunk-YJ3TLEW3.js +0 -100
  38. package/dist/chunk-ZHVUK5OY.js +0 -314
  39. package/dist/chunk-ZZIKRBJU.js +0 -96
  40. package/dist/error/components/EmptyState.d.ts +0 -50
  41. package/dist/error/components/ErrorAlert.d.ts +0 -50
  42. package/dist/error/components/ErrorPage.d.ts +0 -39
  43. package/dist/error/components/LoadingState.d.ts +0 -37
  44. package/dist/error/components/index.d.ts +0 -13
  45. package/dist/error/components/index.js +0 -18
  46. package/dist/error/hooks/index.d.ts +0 -7
  47. package/dist/error/hooks/index.js +0 -14
  48. package/dist/error/hooks/useErrorHandler.d.ts +0 -67
  49. package/dist/error/hooks/useErrorHandler.js +0 -14
  50. package/dist/error/logging/error-logger.d.ts +0 -77
  51. package/dist/error/logging/error-logger.js +0 -10
  52. package/dist/error/logging/index.d.ts +0 -9
  53. package/dist/error/logging/index.js +0 -35
  54. package/dist/error/logging/transports/base.d.ts +0 -30
  55. package/dist/error/logging/transports/base.js +0 -7
  56. package/dist/error/logging/transports/console.d.ts +0 -40
  57. package/dist/error/logging/transports/console.js +0 -9
  58. package/dist/error/logging/transports/file.d.ts +0 -49
  59. package/dist/error/logging/transports/file.js +0 -8
  60. package/dist/error/logging/transports/index.d.ts +0 -12
  61. package/dist/error/logging/transports/index.js +0 -25
  62. package/dist/error/logging/transports/sentry.d.ts +0 -44
  63. package/dist/error/logging/transports/sentry.js +0 -9
  64. package/dist/error/logging/transports/slack.d.ts +0 -51
  65. package/dist/error/logging/transports/slack.js +0 -9
  66. package/dist/error/logging/types.d.ts +0 -83
  67. package/dist/error/logging/types.js +0 -7
  68. package/dist/error/recovery/circuit-breaker.d.ts +0 -85
  69. package/dist/error/recovery/circuit-breaker.js +0 -9
  70. package/dist/error/recovery/degradation.d.ts +0 -56
  71. package/dist/error/recovery/degradation.js +0 -7
  72. package/dist/error/recovery/fallback.d.ts +0 -55
  73. package/dist/error/recovery/fallback.js +0 -11
  74. package/dist/error/recovery/index.d.ts +0 -12
  75. package/dist/error/recovery/index.js +0 -26
  76. package/dist/error/recovery/retry.d.ts +0 -44
  77. package/dist/error/recovery/retry.js +0 -7
  78. package/dist/utils/shared-utils.d.ts +0 -25
  79. package/dist/utils/shared-utils.js +0 -43
  80. package/dist/{chunk-SEZJN4TC.js → chunk-LJEGM4OO.js} +3 -3
  81. package/dist/{chunk-S73334QY.js → chunk-QF6FH4GZ.js} +3 -3
  82. package/dist/{chunk-KHYY4KCV.js → chunk-TH45RVP7.js} +3 -3
  83. package/dist/{chunk-5OWZKYWQ.js → chunk-TMVS4F7E.js} +3 -3
@@ -1,13 +0,0 @@
1
- /**
2
- * UI 컴포넌트
3
- *
4
- * 통합 에러 처리 시스템의 UI 컴포넌트
5
- */
6
- export { ErrorPage } from './ErrorPage';
7
- export type { IErrorPageProps } from './ErrorPage';
8
- export { ErrorAlert } from './ErrorAlert';
9
- export type { IErrorAlertProps } from './ErrorAlert';
10
- export { LoadingState } from './LoadingState';
11
- export type { ILoadingStateProps } from './LoadingState';
12
- export { EmptyState } from './EmptyState';
13
- export type { IEmptyStateProps } from './EmptyState';
@@ -1,18 +0,0 @@
1
- import {
2
- EmptyState,
3
- ErrorAlert,
4
- ErrorPage,
5
- LoadingState
6
- } from "../../chunk-ZHVUK5OY.js";
7
- import "../../chunk-POKGHK3L.js";
8
- import "../../chunk-EEUBKZV4.js";
9
- import "../../chunk-N4YGR5WH.js";
10
- import "../../chunk-KXAWBFJN.js";
11
- import "../../chunk-Y3OTJH2S.js";
12
- import "../../chunk-ORMEWXMH.js";
13
- export {
14
- EmptyState,
15
- ErrorAlert,
16
- ErrorPage,
17
- LoadingState
18
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * React Hooks
3
- *
4
- * 통합 에러 처리 시스템의 React Hooks
5
- */
6
- export { useErrorHandler } from './useErrorHandler';
7
- export type { IErrorState, IUseErrorHandler } from './useErrorHandler';
@@ -1,14 +0,0 @@
1
- import "../../chunk-Y2TUZFCP.js";
2
- import {
3
- useErrorHandler
4
- } from "../../chunk-6UAYU5NU.js";
5
- import "../../chunk-MLGO3HLS.js";
6
- import "../../chunk-POKGHK3L.js";
7
- import "../../chunk-EEUBKZV4.js";
8
- import "../../chunk-N4YGR5WH.js";
9
- import "../../chunk-KXAWBFJN.js";
10
- import "../../chunk-Y3OTJH2S.js";
11
- import "../../chunk-ORMEWXMH.js";
12
- export {
13
- useErrorHandler
14
- };
@@ -1,67 +0,0 @@
1
- /**
2
- * useErrorHandler Hook
3
- *
4
- * 에러 상태 관리 및 처리
5
- */
6
- import type { TLocale } from '@withwiz/error/messages';
7
- import type { IErrorDisplay } from '@withwiz/error/friendly-messages-v2';
8
- /**
9
- * 에러 상태
10
- */
11
- export interface IErrorState {
12
- /** 에러 발생 여부 */
13
- hasError: boolean;
14
- /** 에러 코드 */
15
- code?: number;
16
- /** 에러 메시지 */
17
- message?: string;
18
- /** 에러 표시 정보 */
19
- displayInfo?: IErrorDisplay;
20
- /** 에러 발생 시간 */
21
- timestamp?: number;
22
- }
23
- /**
24
- * useErrorHandler Hook 반환 타입
25
- */
26
- export interface IUseErrorHandler {
27
- /** 에러 상태 */
28
- errorState: IErrorState;
29
- /** 에러 처리 */
30
- handleError: (error: unknown) => void;
31
- /** 에러 초기화 */
32
- clearError: () => void;
33
- /** 인증 에러 처리 (자동 리다이렉트) */
34
- handleAuthError: (error: unknown, redirectUrl?: string) => void;
35
- /** 에러 여부 확인 */
36
- hasError: boolean;
37
- }
38
- /**
39
- * useErrorHandler Hook
40
- *
41
- * @param locale - 로케일 (기본값: 'ko')
42
- *
43
- * @example
44
- * ```tsx
45
- * function MyComponent() {
46
- * const { errorState, handleError, clearError } = useErrorHandler('ko');
47
- *
48
- * const fetchData = async () => {
49
- * try {
50
- * const res = await fetch('/api/data');
51
- * if (!res.ok) {
52
- * throw new AppError(40401);
53
- * }
54
- * } catch (error) {
55
- * handleError(error);
56
- * }
57
- * };
58
- *
59
- * if (errorState.hasError) {
60
- * return <ErrorAlert code={errorState.code!} />;
61
- * }
62
- *
63
- * return <div>...</div>;
64
- * }
65
- * ```
66
- */
67
- export declare function useErrorHandler(locale?: TLocale): IUseErrorHandler;
@@ -1,14 +0,0 @@
1
- "use client";
2
- import {
3
- useErrorHandler
4
- } from "../../chunk-6UAYU5NU.js";
5
- import "../../chunk-MLGO3HLS.js";
6
- import "../../chunk-POKGHK3L.js";
7
- import "../../chunk-EEUBKZV4.js";
8
- import "../../chunk-N4YGR5WH.js";
9
- import "../../chunk-KXAWBFJN.js";
10
- import "../../chunk-Y3OTJH2S.js";
11
- import "../../chunk-ORMEWXMH.js";
12
- export {
13
- useErrorHandler
14
- };
@@ -1,77 +0,0 @@
1
- /**
2
- * ErrorLogger 클래스
3
- *
4
- * 구조화된 에러 로깅
5
- */
6
- import { AppError } from '@withwiz/error/app-error';
7
- import type { IErrorLogContext, ITransport, IErrorLoggerOptions } from './types';
8
- /**
9
- * ErrorLogger 클래스
10
- *
11
- * @example
12
- * ```typescript
13
- * const logger = new ErrorLogger({
14
- * minLevel: ELogLevel.INFO,
15
- * environment: 'production',
16
- * transports: [consoleTransport, sentryTransport],
17
- * });
18
- *
19
- * logger.error('API Error', {
20
- * requestId: 'abc-123',
21
- * errorCode: 50001,
22
- * });
23
- * ```
24
- */
25
- export declare class ErrorLogger {
26
- private options;
27
- private transports;
28
- constructor(options?: IErrorLoggerOptions);
29
- /**
30
- * Transport 추가
31
- */
32
- addTransport(transport: ITransport): void;
33
- /**
34
- * Transport 제거
35
- */
36
- removeTransport(transportName: string): void;
37
- /**
38
- * Debug 로그
39
- */
40
- debug(message: string, context?: IErrorLogContext): void;
41
- /**
42
- * Info 로그
43
- */
44
- info(message: string, context?: IErrorLogContext): void;
45
- /**
46
- * Warning 로그
47
- */
48
- warn(message: string, context?: IErrorLogContext): void;
49
- /**
50
- * Error 로그
51
- */
52
- error(message: string, context?: IErrorLogContext, error?: AppError | Error): void;
53
- /**
54
- * Critical 로그
55
- */
56
- critical(message: string, context?: IErrorLogContext, error?: AppError | Error): void;
57
- /**
58
- * 로그 기록
59
- */
60
- private log;
61
- /**
62
- * 로그 레벨 체크
63
- */
64
- private shouldLog;
65
- /**
66
- * 컨텍스트 보강
67
- */
68
- private enrichContext;
69
- /**
70
- * Transport로 전송
71
- */
72
- private sendToTransports;
73
- /**
74
- * AppError 로깅 헬퍼
75
- */
76
- logAppError(error: AppError, context?: IErrorLogContext): void;
77
- }
@@ -1,10 +0,0 @@
1
- import {
2
- ErrorLogger
3
- } from "../../chunk-JS5VI3OW.js";
4
- import "../../chunk-6C7HQIX4.js";
5
- import "../../chunk-MLGO3HLS.js";
6
- import "../../chunk-Y3OTJH2S.js";
7
- import "../../chunk-ORMEWXMH.js";
8
- export {
9
- ErrorLogger
10
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * 로깅 시스템
3
- *
4
- * 통합 에러 처리 시스템의 로깅 레이어
5
- */
6
- export type { IErrorLogContext, ILogEntry, ITransport, IErrorLoggerOptions, } from './types';
7
- export { ELogLevel } from './types';
8
- export { ErrorLogger } from './error-logger';
9
- export * from './transports';
@@ -1,35 +0,0 @@
1
- import "../../chunk-7XFHGAJP.js";
2
- import "../../chunk-COK4ZXNG.js";
3
- import {
4
- ConsoleTransport
5
- } from "../../chunk-FW3IEJ7H.js";
6
- import {
7
- FileTransport
8
- } from "../../chunk-YJ3TLEW3.js";
9
- import {
10
- SentryTransport
11
- } from "../../chunk-ZZIKRBJU.js";
12
- import {
13
- SlackTransport
14
- } from "../../chunk-EQYTE7WD.js";
15
- import {
16
- BaseTransport
17
- } from "../../chunk-HGC4CCKB.js";
18
- import {
19
- ErrorLogger
20
- } from "../../chunk-JS5VI3OW.js";
21
- import {
22
- ELogLevel
23
- } from "../../chunk-6C7HQIX4.js";
24
- import "../../chunk-MLGO3HLS.js";
25
- import "../../chunk-Y3OTJH2S.js";
26
- import "../../chunk-ORMEWXMH.js";
27
- export {
28
- BaseTransport,
29
- ConsoleTransport,
30
- ELogLevel,
31
- ErrorLogger,
32
- FileTransport,
33
- SentryTransport,
34
- SlackTransport
35
- };
@@ -1,30 +0,0 @@
1
- /**
2
- * Base Transport
3
- *
4
- * 모든 Transport의 기본 클래스
5
- */
6
- import type { ITransport, ILogEntry } from '@withwiz/error/logging/types';
7
- /**
8
- * BaseTransport 추상 클래스
9
- */
10
- export declare abstract class BaseTransport implements ITransport {
11
- readonly name: string;
12
- protected enabled: boolean;
13
- constructor(name: string, enabled?: boolean);
14
- /**
15
- * 로그 전송 (구현 필요)
16
- */
17
- abstract log(entry: ILogEntry): Promise<void>;
18
- /**
19
- * Transport 활성화 여부
20
- */
21
- isEnabled(): boolean;
22
- /**
23
- * Transport 활성화
24
- */
25
- enable(): void;
26
- /**
27
- * Transport 비활성화
28
- */
29
- disable(): void;
30
- }
@@ -1,7 +0,0 @@
1
- import {
2
- BaseTransport
3
- } from "../../../chunk-HGC4CCKB.js";
4
- import "../../../chunk-ORMEWXMH.js";
5
- export {
6
- BaseTransport
7
- };
@@ -1,40 +0,0 @@
1
- /**
2
- * Console Transport
3
- *
4
- * 콘솔에 로그 출력
5
- */
6
- import { BaseTransport } from './base';
7
- import type { ILogEntry } from '@withwiz/error/logging/types';
8
- /**
9
- * ConsoleTransport 옵션
10
- */
11
- export interface IConsoleTransportOptions {
12
- enabled?: boolean;
13
- colorize?: boolean;
14
- includeTimestamp?: boolean;
15
- }
16
- /**
17
- * ConsoleTransport 클래스
18
- *
19
- * @example
20
- * ```typescript
21
- * const transport = new ConsoleTransport({
22
- * colorize: true,
23
- * includeTimestamp: true,
24
- * });
25
- * ```
26
- */
27
- export declare class ConsoleTransport extends BaseTransport {
28
- private colorize;
29
- private includeTimestamp;
30
- constructor(options?: IConsoleTransportOptions);
31
- log(entry: ILogEntry): Promise<void>;
32
- /**
33
- * 로그 포맷팅
34
- */
35
- private format;
36
- /**
37
- * 콘솔 출력
38
- */
39
- private output;
40
- }
@@ -1,9 +0,0 @@
1
- import {
2
- ConsoleTransport
3
- } from "../../../chunk-FW3IEJ7H.js";
4
- import "../../../chunk-HGC4CCKB.js";
5
- import "../../../chunk-6C7HQIX4.js";
6
- import "../../../chunk-ORMEWXMH.js";
7
- export {
8
- ConsoleTransport
9
- };
@@ -1,49 +0,0 @@
1
- /**
2
- * File Transport
3
- *
4
- * 파일에 로그 기록 (서버 전용)
5
- */
6
- import { BaseTransport } from './base';
7
- import type { ILogEntry } from '@withwiz/error/logging/types';
8
- /**
9
- * FileTransport 옵션
10
- */
11
- export interface IFileTransportOptions {
12
- enabled?: boolean;
13
- filePath?: string;
14
- maxSize?: number;
15
- maxFiles?: number;
16
- }
17
- /**
18
- * FileTransport 클래스
19
- *
20
- * @example
21
- * ```typescript
22
- * const transport = new FileTransport({
23
- * filePath: './logs/error.log',
24
- * maxSize: 10 * 1024 * 1024, // 10MB
25
- * maxFiles: 5,
26
- * });
27
- * ```
28
- */
29
- export declare class FileTransport extends BaseTransport {
30
- private filePath;
31
- private maxSize;
32
- private maxFiles;
33
- private fs;
34
- private path;
35
- constructor(options?: IFileTransportOptions);
36
- /**
37
- * 모듈 로드 (동적 import)
38
- */
39
- private loadModules;
40
- log(entry: ILogEntry): Promise<void>;
41
- /**
42
- * 로그 포맷팅 (JSON Lines)
43
- */
44
- private format;
45
- /**
46
- * 파일 rotation
47
- */
48
- private rotateIfNeeded;
49
- }
@@ -1,8 +0,0 @@
1
- import {
2
- FileTransport
3
- } from "../../../chunk-YJ3TLEW3.js";
4
- import "../../../chunk-HGC4CCKB.js";
5
- import "../../../chunk-ORMEWXMH.js";
6
- export {
7
- FileTransport
8
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * Transport 모듈
3
- */
4
- export { BaseTransport } from './base';
5
- export { ConsoleTransport } from './console';
6
- export type { IConsoleTransportOptions } from './console';
7
- export { FileTransport } from './file';
8
- export type { IFileTransportOptions } from './file';
9
- export { SentryTransport } from './sentry';
10
- export type { ISentryTransportOptions } from './sentry';
11
- export { SlackTransport } from './slack';
12
- export type { ISlackTransportOptions } from './slack';
@@ -1,25 +0,0 @@
1
- import "../../../chunk-COK4ZXNG.js";
2
- import {
3
- ConsoleTransport
4
- } from "../../../chunk-FW3IEJ7H.js";
5
- import {
6
- FileTransport
7
- } from "../../../chunk-YJ3TLEW3.js";
8
- import {
9
- SentryTransport
10
- } from "../../../chunk-ZZIKRBJU.js";
11
- import {
12
- SlackTransport
13
- } from "../../../chunk-EQYTE7WD.js";
14
- import {
15
- BaseTransport
16
- } from "../../../chunk-HGC4CCKB.js";
17
- import "../../../chunk-6C7HQIX4.js";
18
- import "../../../chunk-ORMEWXMH.js";
19
- export {
20
- BaseTransport,
21
- ConsoleTransport,
22
- FileTransport,
23
- SentryTransport,
24
- SlackTransport
25
- };
@@ -1,44 +0,0 @@
1
- /**
2
- * Sentry Transport
3
- *
4
- * Sentry로 에러 전송
5
- */
6
- import { BaseTransport } from './base';
7
- import type { ILogEntry, ELogLevel } from '@withwiz/error/logging/types';
8
- /**
9
- * SentryTransport 옵션
10
- */
11
- export interface ISentryTransportOptions {
12
- enabled?: boolean;
13
- dsn?: string;
14
- environment?: string;
15
- minLevel?: ELogLevel;
16
- }
17
- /**
18
- * SentryTransport 클래스
19
- *
20
- * @example
21
- * ```typescript
22
- * const transport = new SentryTransport({
23
- * dsn: process.env.SENTRY_DSN,
24
- * environment: 'production',
25
- * minLevel: ELogLevel.ERROR,
26
- * });
27
- * ```
28
- */
29
- export declare class SentryTransport extends BaseTransport {
30
- private dsn;
31
- private environment;
32
- private minLevel;
33
- private Sentry;
34
- constructor(options?: ISentryTransportOptions);
35
- /**
36
- * Sentry 초기화
37
- */
38
- private initSentry;
39
- log(entry: ILogEntry): Promise<void>;
40
- /**
41
- * 로그 레벨 체크
42
- */
43
- private shouldLog;
44
- }
@@ -1,9 +0,0 @@
1
- import {
2
- SentryTransport
3
- } from "../../../chunk-ZZIKRBJU.js";
4
- import "../../../chunk-HGC4CCKB.js";
5
- import "../../../chunk-6C7HQIX4.js";
6
- import "../../../chunk-ORMEWXMH.js";
7
- export {
8
- SentryTransport
9
- };
@@ -1,51 +0,0 @@
1
- /**
2
- * Slack Transport
3
- *
4
- * Slack Webhook으로 알림 전송
5
- */
6
- import { BaseTransport } from './base';
7
- import type { ILogEntry, ELogLevel } from '@withwiz/error/logging/types';
8
- /**
9
- * SlackTransport 옵션
10
- */
11
- export interface ISlackTransportOptions {
12
- enabled?: boolean;
13
- webhookUrl?: string;
14
- minLevel?: ELogLevel;
15
- channel?: string;
16
- username?: string;
17
- iconEmoji?: string;
18
- }
19
- /**
20
- * SlackTransport 클래스
21
- *
22
- * @example
23
- * ```typescript
24
- * const transport = new SlackTransport({
25
- * webhookUrl: process.env.SLACK_WEBHOOK_URL,
26
- * minLevel: ELogLevel.CRITICAL,
27
- * channel: '#errors',
28
- * });
29
- * ```
30
- */
31
- export declare class SlackTransport extends BaseTransport {
32
- private webhookUrl;
33
- private minLevel;
34
- private channel?;
35
- private username;
36
- private iconEmoji;
37
- constructor(options?: ISlackTransportOptions);
38
- log(entry: ILogEntry): Promise<void>;
39
- /**
40
- * Slack 메시지 페이로드 생성
41
- */
42
- private buildPayload;
43
- /**
44
- * 문자열 자르기
45
- */
46
- private truncate;
47
- /**
48
- * 로그 레벨 체크
49
- */
50
- private shouldLog;
51
- }
@@ -1,9 +0,0 @@
1
- import {
2
- SlackTransport
3
- } from "../../../chunk-EQYTE7WD.js";
4
- import "../../../chunk-HGC4CCKB.js";
5
- import "../../../chunk-6C7HQIX4.js";
6
- import "../../../chunk-ORMEWXMH.js";
7
- export {
8
- SlackTransport
9
- };
@@ -1,83 +0,0 @@
1
- /**
2
- * 로깅 시스템 타입 정의
3
- */
4
- import type { AppError } from '@withwiz/error/app-error';
5
- /**
6
- * 로그 레벨
7
- */
8
- export declare enum ELogLevel {
9
- DEBUG = "debug",
10
- INFO = "info",
11
- WARN = "warn",
12
- ERROR = "error",
13
- CRITICAL = "critical"
14
- }
15
- /**
16
- * 에러 로그 컨텍스트
17
- */
18
- export interface IErrorLogContext {
19
- requestId?: string;
20
- method?: string;
21
- path?: string;
22
- userAgent?: string;
23
- ip?: string;
24
- userId?: string;
25
- userEmail?: string;
26
- userRole?: string;
27
- errorCode?: number;
28
- errorMessage?: string;
29
- errorStack?: string;
30
- environment?: string;
31
- version?: string;
32
- timestamp?: string;
33
- metadata?: Record<string, unknown>;
34
- }
35
- /**
36
- * 로그 엔트리
37
- */
38
- export interface ILogEntry {
39
- level: ELogLevel;
40
- message: string;
41
- context: IErrorLogContext;
42
- error?: AppError | Error;
43
- timestamp: Date;
44
- }
45
- /**
46
- * Transport 인터페이스
47
- */
48
- export interface ITransport {
49
- /**
50
- * Transport 이름
51
- */
52
- name: string;
53
- /**
54
- * 로그 전송
55
- */
56
- log(entry: ILogEntry): Promise<void>;
57
- /**
58
- * Transport 활성화 여부
59
- */
60
- isEnabled(): boolean;
61
- }
62
- /**
63
- * ErrorLogger 옵션
64
- */
65
- export interface IErrorLoggerOptions {
66
- /**
67
- * 최소 로그 레벨
68
- * 이 레벨 이상의 로그만 기록
69
- */
70
- minLevel?: ELogLevel;
71
- /**
72
- * 환경 정보
73
- */
74
- environment?: string;
75
- /**
76
- * 앱 버전
77
- */
78
- version?: string;
79
- /**
80
- * Transport 목록
81
- */
82
- transports?: ITransport[];
83
- }
@@ -1,7 +0,0 @@
1
- import {
2
- ELogLevel
3
- } from "../../chunk-6C7HQIX4.js";
4
- import "../../chunk-ORMEWXMH.js";
5
- export {
6
- ELogLevel
7
- };