@mks2508/better-logger 0.0.2-alpha.2 → 0.11.0-alpha.1
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/.github/workflows/ci-quality.yml +357 -0
- package/.github/workflows/docs-demo.yml +119 -0
- package/.github/workflows/releases-core.yml +512 -0
- package/.github/workflows/releases-full.yml +582 -0
- package/.github/{workflows → workflows-backup}/ci.yml +12 -110
- package/.github/workflows-backup/nightly.yml +196 -0
- package/.github/workflows-backup/release-optimized.yml +373 -0
- package/.release-notes-0.2.0.md +129 -0
- package/.yamllint +28 -0
- package/CHANGELOG.json +749 -0
- package/CLAUDE.md +92 -1
- package/README.md +142 -498
- package/bun.lock +323 -0
- package/demo.html +9 -2
- package/dist/Logger.d.ts +176 -0
- package/dist/Logger.d.ts.map +1 -0
- package/dist/Logger.js +498 -0
- package/dist/chunks/Logger-C2-cR3No.js +2 -0
- package/dist/chunks/Logger-C2-cR3No.js.map +1 -0
- package/dist/chunks/Logger-CVwk8cgA.js +2159 -0
- package/dist/chunks/Logger-CVwk8cgA.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
- package/dist/chunks/StyleBuilder-BoJTmskd.js +361 -0
- package/dist/chunks/StyleBuilder-BoJTmskd.js.map +1 -0
- package/dist/chunks/StyleBuilder-LPLzsoHY.js +4 -0
- package/dist/chunks/StyleBuilder-LPLzsoHY.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +103 -0
- package/dist/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/cli/CommandProcessor.js +184 -0
- package/dist/cli/commands/ConfigCommand.d.ts +17 -0
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/cli/commands/ConfigCommand.js +88 -0
- package/dist/cli/commands/ExportCommand.d.ts +51 -0
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/cli/commands/ExportCommand.js +243 -0
- package/dist/cli/commands/HistoryCommand.d.ts +50 -0
- package/dist/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/cli/commands/HistoryCommand.js +96 -0
- package/dist/cli/commands/StatusCommand.d.ts +33 -0
- package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/cli/commands/StatusCommand.js +93 -0
- package/dist/cli/commands/ThemeCommand.d.ts +33 -0
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/cli/commands/ThemeCommand.js +79 -0
- package/dist/cli/help.d.ts +15 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +118 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +46 -0
- package/dist/constants.d.ts +91 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +80 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +130 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +258 -242
- package/dist/core.js.map +1 -1
- package/dist/example.d.ts +18 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +154 -0
- package/dist/exports-module.d.ts +203 -0
- package/dist/exports-module.d.ts.map +1 -0
- package/dist/exports-module.js +260 -0
- package/dist/exports.cjs +1 -1
- package/dist/exports.cjs.map +1 -1
- package/dist/exports.js +2 -2
- package/dist/handlers/AnalyticsLogHandler.d.ts +11 -0
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/handlers/AnalyticsLogHandler.js +19 -0
- package/dist/handlers/ExportLogHandler.d.ts +103 -0
- package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/handlers/ExportLogHandler.js +516 -0
- package/dist/handlers/FileLogHandler.d.ts +13 -0
- package/dist/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/handlers/FileLogHandler.js +24 -0
- package/dist/handlers/RemoteLogHandler.d.ts +14 -0
- package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/handlers/RemoteLogHandler.js +37 -0
- package/dist/handlers/index.d.ts +8 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +86 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -103
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +139 -0
- package/dist/styling/StyleBuilder.d.ts +132 -0
- package/dist/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/styling/StyleBuilder.js +268 -0
- package/dist/styling/banners.d.ts +45 -0
- package/dist/styling/banners.d.ts.map +1 -0
- package/dist/styling/banners.js +155 -0
- package/dist/styling/index.d.ts +7 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/index.js +6 -0
- package/dist/styling/themes.d.ts +10 -0
- package/dist/styling/themes.d.ts.map +1 -0
- package/dist/styling/themes.js +231 -0
- package/dist/styling-module.d.ts +185 -0
- package/dist/styling-module.d.ts.map +1 -0
- package/dist/styling-module.js +199 -0
- package/dist/styling.cjs +1 -1
- package/dist/styling.cjs.map +1 -1
- package/dist/styling.js +4 -4
- package/dist/types/Logger.d.ts +172 -0
- package/dist/types/Logger.d.ts.map +1 -0
- package/dist/types/cli/CommandProcessor.d.ts +100 -0
- package/dist/types/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts +14 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ExportCommand.d.ts +48 -0
- package/dist/types/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts +47 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/StatusCommand.d.ts +30 -0
- package/dist/types/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts +30 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/types/cli/help.d.ts +12 -0
- package/dist/types/cli/help.d.ts.map +1 -0
- package/dist/types/cli/index.d.ts +15 -0
- package/dist/types/cli/index.d.ts.map +1 -0
- package/dist/types/constants.d.ts +88 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/core.d.ts +71 -211
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +13 -0
- package/dist/types/example.d.ts +18 -0
- package/dist/types/example.d.ts.map +1 -0
- package/dist/types/exports-module.d.ts +196 -0
- package/dist/types/exports-module.d.ts.map +1 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts +8 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/ExportLogHandler.d.ts +100 -0
- package/dist/types/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/FileLogHandler.d.ts +10 -0
- package/dist/types/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts +11 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/index.d.ts +8 -0
- package/dist/types/handlers/index.d.ts.map +1 -0
- package/dist/types/handlers.d.ts +88 -0
- package/dist/types/handlers.d.ts.map +1 -0
- package/dist/types/handlers.js +4 -0
- package/dist/types/index.d.ts +7 -675
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/styling/StyleBuilder.d.ts +132 -0
- package/dist/types/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/types/styling/banners.d.ts +42 -0
- package/dist/types/styling/banners.d.ts.map +1 -0
- package/dist/types/styling/index.d.ts +7 -0
- package/dist/types/styling/index.d.ts.map +1 -0
- package/dist/types/styling/themes.d.ts +7 -0
- package/dist/types/styling/themes.d.ts.map +1 -0
- package/dist/types/styling-module.d.ts +178 -0
- package/dist/types/styling-module.d.ts.map +1 -0
- package/dist/types/types/core.d.ts +71 -0
- package/dist/types/types/core.d.ts.map +1 -0
- package/dist/types/types/handlers.d.ts +85 -0
- package/dist/types/types/handlers.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/output.d.ts +29 -0
- package/dist/types/utils/output.d.ts.map +1 -0
- package/dist/types/utils/stackTrace.d.ts +6 -0
- package/dist/types/utils/stackTrace.d.ts.map +1 -0
- package/dist/types/utils/timestamps.d.ts +20 -0
- package/dist/types/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/output.d.ts +32 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +97 -0
- package/dist/utils/stackTrace.d.ts +9 -0
- package/dist/utils/stackTrace.d.ts.map +1 -0
- package/dist/utils/stackTrace.js +81 -0
- package/dist/utils/timestamps.d.ts +20 -0
- package/dist/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/timestamps.js +71 -0
- package/docs/API.md +691 -0
- package/docs/DEVELOPMENT.md +731 -0
- package/docs/PACKAGES.md +244 -0
- package/docs/_config.yml +36 -0
- package/docs/index.md +179 -0
- package/examples/README.md +208 -0
- package/examples/basic-logging.js +75 -0
- package/examples/data-export.js +234 -0
- package/examples/package.json +16 -0
- package/examples/performance-timing.js +170 -0
- package/examples/styling-themes.js +207 -0
- package/package.json +32 -21
- package/packages/core/package.json +35 -0
- package/packages/exports/package.json +41 -0
- package/packages/styling/package.json +41 -0
- package/project-utils/README.md +172 -0
- package/project-utils/auto-release-gemini.ts +1193 -0
- package/project-utils/commit-generator.ts +1385 -0
- package/project-utils/commit-ui.ts +264 -0
- package/project-utils/git-utils.ts +199 -0
- package/project-utils/github-release-manager.ts +466 -0
- package/project-utils/prompt-templates.js +345 -0
- package/project-utils/prompt-templates.ts +422 -0
- package/project-utils/version-manager.ts +1078 -0
- package/src/Logger.ts +2 -1
- package/src/cli/CommandProcessor.ts +173 -2
- package/src/cli/commands/HistoryCommand.ts +117 -0
- package/src/cli/index.ts +12 -0
- package/src/handlers/ExportLogHandler.ts +141 -0
- package/tests/test-conflict-resolution.ts +391 -0
- package/tests/validate-workflows.sh +131 -0
- package/tests/yaml-autofix.sh +146 -0
- package/vite.config.ts +152 -50
- package/.claude/settings.local.json +0 -22
- package/.npmrc.bak +0 -1
- package/dist/chunks/Logger-BQhMKy_T.js +0 -2
- package/dist/chunks/Logger-BQhMKy_T.js.map +0 -1
- package/dist/chunks/Logger-BrFKFZcD.js +0 -978
- package/dist/chunks/Logger-BrFKFZcD.js.map +0 -1
- package/dist/chunks/core-2opW4Pi3.js +0 -194
- package/dist/chunks/core-2opW4Pi3.js.map +0 -1
- package/dist/chunks/core-DyugwSYZ.js +0 -4
- package/dist/chunks/core-DyugwSYZ.js.map +0 -1
- package/dist/chunks/exports-BNP3R7dp.js +0 -421
- package/dist/chunks/exports-BNP3R7dp.js.map +0 -1
- package/dist/chunks/exports-U1xLBXrY.js +0 -2
- package/dist/chunks/exports-U1xLBXrY.js.map +0 -1
- package/dist/chunks/styling-DhUDzwlE.js +0 -654
- package/dist/chunks/styling-DhUDzwlE.js.map +0 -1
- package/dist/chunks/styling-tmRDI28D.js +0 -2
- package/dist/chunks/styling-tmRDI28D.js.map +0 -1
- package/dist/types/exports.d.ts +0 -600
- package/dist/types/styling.d.ts +0 -751
- /package/.github/{workflows → workflows-backup}/release.yml +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview StyleBuilder class for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Utility class for creating dynamic console styles with method chaining
|
|
6
|
+
*/
|
|
7
|
+
export declare class StyleBuilder {
|
|
8
|
+
private styles;
|
|
9
|
+
constructor(baseStyle?: string);
|
|
10
|
+
/**
|
|
11
|
+
* Add background color or gradient
|
|
12
|
+
*/
|
|
13
|
+
bg(background: string): StyleBuilder;
|
|
14
|
+
/**
|
|
15
|
+
* Add text color
|
|
16
|
+
*/
|
|
17
|
+
color(color: string): StyleBuilder;
|
|
18
|
+
/**
|
|
19
|
+
* Add border styling
|
|
20
|
+
*/
|
|
21
|
+
border(border: string): StyleBuilder;
|
|
22
|
+
/**
|
|
23
|
+
* Add box shadow
|
|
24
|
+
*/
|
|
25
|
+
shadow(shadow: string): StyleBuilder;
|
|
26
|
+
/**
|
|
27
|
+
* Add padding
|
|
28
|
+
*/
|
|
29
|
+
padding(padding: string): StyleBuilder;
|
|
30
|
+
/**
|
|
31
|
+
* Add margin
|
|
32
|
+
*/
|
|
33
|
+
margin(margin: string): StyleBuilder;
|
|
34
|
+
/**
|
|
35
|
+
* Add border radius
|
|
36
|
+
*/
|
|
37
|
+
rounded(radius?: string): StyleBuilder;
|
|
38
|
+
/**
|
|
39
|
+
* Add font weight
|
|
40
|
+
*/
|
|
41
|
+
bold(): StyleBuilder;
|
|
42
|
+
/**
|
|
43
|
+
* Add font styling
|
|
44
|
+
*/
|
|
45
|
+
font(font: string): StyleBuilder;
|
|
46
|
+
/**
|
|
47
|
+
* Add font size
|
|
48
|
+
*/
|
|
49
|
+
size(size: string): StyleBuilder;
|
|
50
|
+
/**
|
|
51
|
+
* Add line height
|
|
52
|
+
*/
|
|
53
|
+
lineHeight(height: string): StyleBuilder;
|
|
54
|
+
/**
|
|
55
|
+
* Add text decoration
|
|
56
|
+
*/
|
|
57
|
+
underline(): StyleBuilder;
|
|
58
|
+
/**
|
|
59
|
+
* Add text transform
|
|
60
|
+
*/
|
|
61
|
+
uppercase(): StyleBuilder;
|
|
62
|
+
/**
|
|
63
|
+
* Add opacity
|
|
64
|
+
*/
|
|
65
|
+
opacity(value: number): StyleBuilder;
|
|
66
|
+
/**
|
|
67
|
+
* Add display property
|
|
68
|
+
*/
|
|
69
|
+
display(value: string): StyleBuilder;
|
|
70
|
+
/**
|
|
71
|
+
* Add position property
|
|
72
|
+
*/
|
|
73
|
+
position(value: string): StyleBuilder;
|
|
74
|
+
/**
|
|
75
|
+
* Add transform property
|
|
76
|
+
*/
|
|
77
|
+
transform(value: string): StyleBuilder;
|
|
78
|
+
/**
|
|
79
|
+
* Add animation property
|
|
80
|
+
*/
|
|
81
|
+
animation(value: string): StyleBuilder;
|
|
82
|
+
/**
|
|
83
|
+
* Add transition property
|
|
84
|
+
*/
|
|
85
|
+
transition(value: string): StyleBuilder;
|
|
86
|
+
/**
|
|
87
|
+
* Add cursor property
|
|
88
|
+
*/
|
|
89
|
+
cursor(value: string): StyleBuilder;
|
|
90
|
+
/**
|
|
91
|
+
* Add any custom CSS property
|
|
92
|
+
*/
|
|
93
|
+
custom(property: string, value: string): StyleBuilder;
|
|
94
|
+
/**
|
|
95
|
+
* Add any CSS property (alias for custom)
|
|
96
|
+
*/
|
|
97
|
+
css(property: string, value: string): StyleBuilder;
|
|
98
|
+
/**
|
|
99
|
+
* Build the final CSS string
|
|
100
|
+
*/
|
|
101
|
+
build(): string;
|
|
102
|
+
/**
|
|
103
|
+
* Clear all styles and start fresh
|
|
104
|
+
*/
|
|
105
|
+
clear(): StyleBuilder;
|
|
106
|
+
/**
|
|
107
|
+
* Clone this StyleBuilder with the same styles
|
|
108
|
+
*/
|
|
109
|
+
clone(): StyleBuilder;
|
|
110
|
+
/**
|
|
111
|
+
* Merge another StyleBuilder's styles into this one
|
|
112
|
+
*/
|
|
113
|
+
merge(other: StyleBuilder): StyleBuilder;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Dynamic styler instance for external use
|
|
117
|
+
*/
|
|
118
|
+
export declare const $: any;
|
|
119
|
+
/**
|
|
120
|
+
* Pre-defined style presets for common use cases
|
|
121
|
+
*/
|
|
122
|
+
export declare const StylePresets: {
|
|
123
|
+
success: () => StyleBuilder;
|
|
124
|
+
error: () => StyleBuilder;
|
|
125
|
+
warning: () => StyleBuilder;
|
|
126
|
+
info: () => StyleBuilder;
|
|
127
|
+
debug: () => StyleBuilder;
|
|
128
|
+
muted: () => StyleBuilder;
|
|
129
|
+
accent: () => StyleBuilder;
|
|
130
|
+
neon: () => StyleBuilder;
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=StyleBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyleBuilder.d.ts","sourceRoot":"","sources":["../../../src/styling/StyleBuilder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,CAAgB;gBAElB,SAAS,SAAK;IAI1B;;OAEG;IACH,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKlC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY;IAKtC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,OAAO,CAAC,MAAM,GAAE,MAAc,GAAG,YAAY;IAK7C;;OAEG;IACH,IAAI,IAAI,YAAY;IAKpB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAKhC;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAKhC;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAKxC;;OAEG;IACH,SAAS,IAAI,YAAY;IAKzB;;OAEG;IACH,SAAS,IAAI,YAAY;IAKzB;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKpC;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKrC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKtC;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKtC;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKvC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAKnC;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY;IAKrD;;OAEG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY;IAIlD;;OAEG;IACH,KAAK,IAAI,MAAM;IAIf;;OAEG;IACH,KAAK,IAAI,YAAY;IAKrB;;OAEG;IACH,KAAK,IAAI,YAAY;IAMrB;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY;CAI3C;AAqBD;;GAEG;AACH,eAAO,MAAM,CAAC,KAAiB,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;CAuDxB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BannerType, ThemeVariant } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Banner variants for different display capabilities
|
|
4
|
+
*/
|
|
5
|
+
export declare const BANNER_VARIANTS: {
|
|
6
|
+
simple: {
|
|
7
|
+
text: string;
|
|
8
|
+
style: string;
|
|
9
|
+
};
|
|
10
|
+
ascii: {
|
|
11
|
+
text: string;
|
|
12
|
+
style: string;
|
|
13
|
+
};
|
|
14
|
+
unicode: {
|
|
15
|
+
text: string;
|
|
16
|
+
style: string;
|
|
17
|
+
};
|
|
18
|
+
svg: {
|
|
19
|
+
text: string;
|
|
20
|
+
style: string;
|
|
21
|
+
};
|
|
22
|
+
animated: {
|
|
23
|
+
text: string;
|
|
24
|
+
style: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Theme-specific banners for enhanced visual theming
|
|
29
|
+
*/
|
|
30
|
+
export declare const THEME_BANNERS: Record<ThemeVariant, {
|
|
31
|
+
simple: string;
|
|
32
|
+
style: string;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Feature detection for banner capabilities
|
|
36
|
+
*/
|
|
37
|
+
export declare function detectBannerCapabilities(): BannerType;
|
|
38
|
+
/**
|
|
39
|
+
* Display initialization banner with advanced styling
|
|
40
|
+
*/
|
|
41
|
+
export declare function displayInitBanner(bannerType?: BannerType): void;
|
|
42
|
+
//# sourceMappingURL=banners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"banners.d.ts","sourceRoot":"","sources":["../../../src/styling/banners.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAoD3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,YAAY,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAyBjF,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,UAAU,CA2BrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAuC/D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Styling system exports for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
export { StyleBuilder, $, StylePresets } from './StyleBuilder.js';
|
|
5
|
+
export { THEME_PRESETS } from './themes.js';
|
|
6
|
+
export { BANNER_VARIANTS, THEME_BANNERS, detectBannerCapabilities, displayInitBanner } from './banners.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styling/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACH,eAAe,EACf,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACpB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThemeVariant } from '../types/index.js';
|
|
2
|
+
import { LevelStyleConfig } from '../utils/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Theme configurations for different visual styles
|
|
5
|
+
*/
|
|
6
|
+
export declare const THEME_PRESETS: Record<ThemeVariant, Record<string, LevelStyleConfig>>;
|
|
7
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/styling/themes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAgOhF,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { Logger } from './Logger.js';
|
|
2
|
+
import { StyleBuilder } from './styling/index.js';
|
|
3
|
+
import { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Enhanced Logger with advanced styling capabilities
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { StyledLogger } from '@mks2508/better-logger/styling';
|
|
10
|
+
*
|
|
11
|
+
* const logger = new StyledLogger();
|
|
12
|
+
* logger.setTheme('neon');
|
|
13
|
+
* logger.logAnimated('🌟 Animated message!');
|
|
14
|
+
* logger.logWithSVG('Custom SVG Logo', svgContent);
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class StyledLogger extends Logger {
|
|
18
|
+
/**
|
|
19
|
+
* Log with SVG background image
|
|
20
|
+
*
|
|
21
|
+
* @param message - The message to log
|
|
22
|
+
* @param svgContent - SVG content as string (optional)
|
|
23
|
+
* @param options - Styling options
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* logger.logWithSVG('My App', '<svg>...</svg>', {
|
|
28
|
+
* width: 400,
|
|
29
|
+
* height: 80,
|
|
30
|
+
* padding: '40px 200px'
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
logWithSVG(message: string, svgContent?: string, options?: StyleOptions): void;
|
|
35
|
+
/**
|
|
36
|
+
* Log with animated background gradient
|
|
37
|
+
*
|
|
38
|
+
* @param message - The message to log
|
|
39
|
+
* @param duration - Animation duration in seconds
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* logger.logAnimated('🚀 Loading...', 2);
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
logAnimated(message: string, duration?: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Display banner with specified type
|
|
49
|
+
*
|
|
50
|
+
* @param bannerType - Type of banner to display
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* logger.showBanner('animated');
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
showBanner(bannerType?: BannerType): void;
|
|
58
|
+
/**
|
|
59
|
+
* Set banner type for initialization display
|
|
60
|
+
*
|
|
61
|
+
* @param bannerType - Type of banner to display
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* logger.setBannerType('svg');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
setBannerType(bannerType: BannerType): void;
|
|
69
|
+
/**
|
|
70
|
+
* Sets the logger theme with visual banner
|
|
71
|
+
*
|
|
72
|
+
* @param theme - Theme variant to apply
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* logger.setTheme('cyberpunk'); // Shows themed banner
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
setTheme(theme: ThemeVariant): void;
|
|
80
|
+
}
|
|
81
|
+
declare const styledLogger: StyledLogger;
|
|
82
|
+
/**
|
|
83
|
+
* Utility functions for creating custom styles
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';
|
|
88
|
+
*
|
|
89
|
+
* const myStyle = createStyle()
|
|
90
|
+
* .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
|
|
91
|
+
* .color('white')
|
|
92
|
+
* .padding('10px')
|
|
93
|
+
* .build();
|
|
94
|
+
*
|
|
95
|
+
* console.log('%cCustom Message', myStyle);
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare const createStyle: () => StyleBuilder;
|
|
99
|
+
/**
|
|
100
|
+
* Pre-built style presets
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* import { stylePresets } from '@mks2508/better-logger/styling';
|
|
105
|
+
*
|
|
106
|
+
* console.log('%cSuccess!', stylePresets.success);
|
|
107
|
+
* console.log('%cError!', stylePresets.error);
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
export declare const stylePresets: {
|
|
111
|
+
success: string;
|
|
112
|
+
error: string;
|
|
113
|
+
warning: string;
|
|
114
|
+
info: string;
|
|
115
|
+
accent: string;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Available themes for the logger
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```typescript
|
|
122
|
+
* import { themes } from '@mks2508/better-logger/styling';
|
|
123
|
+
*
|
|
124
|
+
* console.log('Available themes:', Object.keys(themes));
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export declare const themes: string[];
|
|
128
|
+
/**
|
|
129
|
+
* Available banner types
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* import { bannerTypes } from '@mks2508/better-logger/styling';
|
|
134
|
+
*
|
|
135
|
+
* console.log('Available banners:', bannerTypes);
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
export declare const bannerTypes: string[];
|
|
139
|
+
/**
|
|
140
|
+
* Display initialization banner
|
|
141
|
+
*
|
|
142
|
+
* @param bannerType - Type of banner to display
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* import { showInitBanner } from '@mks2508/better-logger/styling';
|
|
147
|
+
*
|
|
148
|
+
* showInitBanner('animated');
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
export declare const showInitBanner: (bannerType?: BannerType) => void;
|
|
152
|
+
/**
|
|
153
|
+
* Export individual styled logging methods
|
|
154
|
+
*/
|
|
155
|
+
export declare const debug: (...args: any[]) => void;
|
|
156
|
+
export declare const info: (...args: any[]) => void;
|
|
157
|
+
export declare const warn: (...args: any[]) => void;
|
|
158
|
+
export declare const error: (...args: any[]) => void;
|
|
159
|
+
export declare const success: (...args: any[]) => void;
|
|
160
|
+
export declare const critical: (...args: any[]) => void;
|
|
161
|
+
export declare const trace: (...args: any[]) => void;
|
|
162
|
+
export declare const table: (data: any, columns?: string[]) => void;
|
|
163
|
+
export declare const group: (label: string, collapsed?: boolean) => void;
|
|
164
|
+
export declare const groupEnd: () => void;
|
|
165
|
+
export declare const time: (label: string) => void;
|
|
166
|
+
export declare const timeEnd: (label: string) => void;
|
|
167
|
+
export declare const setGlobalPrefix: (prefix: string) => void;
|
|
168
|
+
export declare const createScopedLogger: (prefix: string) => Logger;
|
|
169
|
+
export declare const setVerbosity: (level: any) => void;
|
|
170
|
+
export declare const setTheme: (theme: ThemeVariant) => void;
|
|
171
|
+
export declare const setBannerType: (bannerType: BannerType) => void;
|
|
172
|
+
export declare const showBanner: (bannerType?: BannerType) => void;
|
|
173
|
+
export declare const logWithSVG: (message: string, svgContent?: string, options?: StyleOptions) => void;
|
|
174
|
+
export declare const logAnimated: (message: string, duration?: number) => void;
|
|
175
|
+
export default styledLogger;
|
|
176
|
+
export { StyleBuilder, StylePresets, THEME_PRESETS, THEME_BANNERS, BANNER_VARIANTS } from './styling/index.js';
|
|
177
|
+
export type { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
|
|
178
|
+
//# sourceMappingURL=styling-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styling-module.d.ts","sourceRoot":"","sources":["../../src/styling-module.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Core type definitions for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Supported log levels in hierarchical order (debug < info < warn < error < critical)
|
|
6
|
+
*/
|
|
7
|
+
export declare const LOG_LEVELS: {
|
|
8
|
+
readonly debug: 0;
|
|
9
|
+
readonly info: 1;
|
|
10
|
+
readonly warn: 2;
|
|
11
|
+
readonly error: 3;
|
|
12
|
+
readonly critical: 4;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Log level type derived from LOG_LEVELS keys
|
|
16
|
+
*/
|
|
17
|
+
export type LogLevel = keyof typeof LOG_LEVELS;
|
|
18
|
+
/**
|
|
19
|
+
* Verbosity level type for filtering logs
|
|
20
|
+
*/
|
|
21
|
+
export type Verbosity = LogLevel | 'silent';
|
|
22
|
+
/**
|
|
23
|
+
* Theme variants for different visual styles
|
|
24
|
+
*/
|
|
25
|
+
export type ThemeVariant = 'default' | 'dark' | 'light' | 'neon' | 'minimal' | 'cyberpunk';
|
|
26
|
+
/**
|
|
27
|
+
* Banner types for different visual approaches
|
|
28
|
+
*/
|
|
29
|
+
export type BannerType = 'simple' | 'ascii' | 'unicode' | 'svg' | 'animated';
|
|
30
|
+
/**
|
|
31
|
+
* Export formats for log data
|
|
32
|
+
*/
|
|
33
|
+
export type ExportFormat = 'json' | 'csv' | 'markdown' | 'plain' | 'html';
|
|
34
|
+
/**
|
|
35
|
+
* Configuration interface for logger instances
|
|
36
|
+
*/
|
|
37
|
+
export interface LoggerConfig {
|
|
38
|
+
globalPrefix?: string;
|
|
39
|
+
verbosity: Verbosity;
|
|
40
|
+
enableColors: boolean;
|
|
41
|
+
enableTimestamps: boolean;
|
|
42
|
+
enableStackTrace: boolean;
|
|
43
|
+
theme?: ThemeVariant;
|
|
44
|
+
bannerType?: BannerType;
|
|
45
|
+
bufferSize?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parsed stack trace information
|
|
49
|
+
*/
|
|
50
|
+
export interface StackInfo {
|
|
51
|
+
file: string;
|
|
52
|
+
line: number;
|
|
53
|
+
column: number;
|
|
54
|
+
function?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Timer entry for performance measurement
|
|
58
|
+
*/
|
|
59
|
+
export interface TimerEntry {
|
|
60
|
+
label: string;
|
|
61
|
+
startTime: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Options for styling components
|
|
65
|
+
*/
|
|
66
|
+
export interface StyleOptions {
|
|
67
|
+
width?: number;
|
|
68
|
+
height?: number;
|
|
69
|
+
padding?: string;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/types/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,UAAU,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LogLevel, StackInfo } from './core.js';
|
|
2
|
+
/**
|
|
3
|
+
* Metadata associated with each log entry
|
|
4
|
+
*/
|
|
5
|
+
export interface LogMetadata {
|
|
6
|
+
timestamp: string;
|
|
7
|
+
level: LogLevel;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
stackInfo?: StackInfo;
|
|
10
|
+
group?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Interface for custom log handlers (extensibility)
|
|
14
|
+
*/
|
|
15
|
+
export interface ILogHandler {
|
|
16
|
+
handle(level: LogLevel, message: string, args: any[], metadata: LogMetadata): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Stored log entry for export functionality
|
|
20
|
+
*/
|
|
21
|
+
export interface LogEntry {
|
|
22
|
+
id: string;
|
|
23
|
+
timestamp: string;
|
|
24
|
+
level: LogLevel;
|
|
25
|
+
prefix?: string;
|
|
26
|
+
message: string;
|
|
27
|
+
args: any[];
|
|
28
|
+
location?: StackInfo;
|
|
29
|
+
groupInfo?: {
|
|
30
|
+
depth: number;
|
|
31
|
+
groupName?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Export filter options
|
|
36
|
+
*/
|
|
37
|
+
export interface ExportFilters {
|
|
38
|
+
levels?: LogLevel[];
|
|
39
|
+
since?: Date | string | number;
|
|
40
|
+
until?: Date | string | number;
|
|
41
|
+
prefixes?: string[];
|
|
42
|
+
excludePrefixes?: string[];
|
|
43
|
+
withStackTrace?: boolean;
|
|
44
|
+
errorsOnly?: boolean;
|
|
45
|
+
last?: number;
|
|
46
|
+
first?: number;
|
|
47
|
+
search?: string;
|
|
48
|
+
groupBy?: 'level' | 'prefix' | 'hour' | 'date';
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Export options for different formats
|
|
52
|
+
*/
|
|
53
|
+
export interface ExportOptions {
|
|
54
|
+
minimal?: boolean;
|
|
55
|
+
compact?: boolean;
|
|
56
|
+
styled?: boolean;
|
|
57
|
+
includeMetadata?: boolean;
|
|
58
|
+
groupBy?: ExportFilters['groupBy'];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Export result with metadata
|
|
62
|
+
*/
|
|
63
|
+
export interface ExportResult {
|
|
64
|
+
format: string;
|
|
65
|
+
data: string;
|
|
66
|
+
metadata: {
|
|
67
|
+
totalLogs: number;
|
|
68
|
+
filteredLogs: number;
|
|
69
|
+
exportedAt: string;
|
|
70
|
+
filters?: ExportFilters;
|
|
71
|
+
options?: ExportOptions;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Buffer statistics for log management
|
|
76
|
+
*/
|
|
77
|
+
export interface BufferStats {
|
|
78
|
+
size: number;
|
|
79
|
+
maxSize: number;
|
|
80
|
+
usage: number;
|
|
81
|
+
oldestLog?: Date;
|
|
82
|
+
newestLog?: Date;
|
|
83
|
+
levelCounts: Record<LogLevel, number>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/types/handlers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;CACtF;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,OAAO,CAAC,EAAE,aAAa,CAAC;KAC3B,CAAC;CACL;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions exports for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
export type { LogLevel, Verbosity, ThemeVariant, BannerType, ExportFormat, LoggerConfig, StackInfo, TimerEntry, StyleOptions, } from './core.js';
|
|
5
|
+
export { LOG_LEVELS } from './core.js';
|
|
6
|
+
export type { LogMetadata, ILogHandler, LogEntry, ExportFilters, ExportOptions, ExportResult, BufferStats, } from './handlers.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,YAAY,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,UAAU,EACV,YAAY,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,YAAY,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,GACd,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Utility functions exports for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
export { parseStackTrace } from './stackTrace.js';
|
|
5
|
+
export { formatTimestamp, parseRelativeTime, parseTimeInput, formatDisplayTime } from './timestamps.js';
|
|
6
|
+
export { createStyledOutput, generateLogId, escapeHtml, safeStringify, type LevelStyleConfig } from './output.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACH,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,aAAa,EACb,KAAK,gBAAgB,EACxB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LogLevel, StackInfo } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Style configuration for each log level
|
|
4
|
+
*/
|
|
5
|
+
export interface LevelStyleConfig {
|
|
6
|
+
emoji: string;
|
|
7
|
+
label: string;
|
|
8
|
+
background: string;
|
|
9
|
+
color: string;
|
|
10
|
+
border: string;
|
|
11
|
+
shadow: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates styled console output with multiple %c formatters
|
|
15
|
+
*/
|
|
16
|
+
export declare function createStyledOutput(level: LogLevel, levelStyles: Record<LogLevel | 'success', LevelStyleConfig>, prefix: string | undefined, message: string, stackInfo: StackInfo | null): [string, ...string[]];
|
|
17
|
+
/**
|
|
18
|
+
* Create a unique ID for log entries
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateLogId(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Escape HTML entities for safe HTML output
|
|
23
|
+
*/
|
|
24
|
+
export declare function escapeHtml(text: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Convert objects to safe string representation for logging
|
|
27
|
+
*/
|
|
28
|
+
export declare function safeStringify(obj: any, _maxDepth?: number): string;
|
|
29
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/utils/output.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAClB;AAGD;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,EAAE,gBAAgB,CAAC,EAC3D,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,GAAG,IAAI,GAC5B,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CA+DvB;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI/C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,MAAM,CAY7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stackTrace.d.ts","sourceRoot":"","sources":["../../../src/utils/stackTrace.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,GAAG,IAAI,CAqFlD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Timestamp utilities for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Formats the timestamp using modern Date API
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatTimestamp(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Parse relative time strings like "2h", "30m", "1d" into milliseconds
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseRelativeTime(timeStr: string): number;
|
|
12
|
+
/**
|
|
13
|
+
* Parse time input which can be Date, ISO string, or relative time
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseTimeInput(input: Date | string | number): Date;
|
|
16
|
+
/**
|
|
17
|
+
* Format timestamp for display in different contexts
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatDisplayTime(date: Date, format?: 'short' | 'full' | 'time-only'): string;
|
|
20
|
+
//# sourceMappingURL=timestamps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamps.d.ts","sourceRoot":"","sources":["../../../src/utils/timestamps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAQxC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUzD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CA2BlE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,GAAE,OAAO,GAAG,MAAM,GAAG,WAAqB,GAAG,MAAM,CAUtG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Utility functions exports for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
export { parseStackTrace } from './stackTrace.js';
|
|
5
|
+
export { formatTimestamp, parseRelativeTime, parseTimeInput, formatDisplayTime } from './timestamps.js';
|
|
6
|
+
export { createStyledOutput, generateLogId, escapeHtml, safeStringify, type LevelStyleConfig } from './output.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACH,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,aAAa,EACb,KAAK,gBAAgB,EACxB,MAAM,aAAa,CAAC"}
|