colorino 0.1.5 → 0.1.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/LICENSE.MD +1 -1
- package/README.md +15 -15
- package/dist/browser.d.cts +2 -1
- package/dist/browser.d.mts +2 -1
- package/dist/browser.d.ts +2 -1
- package/dist/node.d.cts +2 -1
- package/dist/node.d.mts +2 -1
- package/dist/node.d.ts +2 -1
- package/package.json +2 -2
package/LICENSE.MD
CHANGED
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Colorino automatically adapts its palette to your terminal or browser DevTools theme.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ Colorino automatically adapts its palette to your terminal or browser DevTools t
|
|
|
23
23
|
- [Contributing](#contributing)
|
|
24
24
|
- [License](#license)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
---
|
|
27
27
|
|
|
28
28
|
## Why use Colorino?
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ Plain `console.log` is colorless and inconsistent. Libraries like `chalk` let yo
|
|
|
31
31
|
|
|
32
32
|
Colorino is different: it’s a "batteries-included" logging facade with beautiful, theme-aware colors and a familiar API—no learning curve, no configuration. Instantly upgrade your logs everywhere.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
---
|
|
35
35
|
|
|
36
36
|
## Features
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ Colorino is different: it’s a "batteries-included" logging facade with beautif
|
|
|
42
42
|
- 🔒 **Robust:** Handles bad inputs and weird environments safely.
|
|
43
43
|
- 🛠️ **Customizable:** Override individual log colors for your own branding.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
---
|
|
46
46
|
|
|
47
47
|
## Installation
|
|
48
48
|
|
|
@@ -52,7 +52,7 @@ npm install colorino
|
|
|
52
52
|
yarn add colorino
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
---
|
|
56
56
|
|
|
57
57
|
## Usage
|
|
58
58
|
|
|
@@ -72,7 +72,7 @@ colorino.debug('Debug with objects:', { x: 5, y: 9 })
|
|
|
72
72
|
colorino.trace('Tracing app start...')
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
---
|
|
76
76
|
|
|
77
77
|
### Creating a Custom Logger
|
|
78
78
|
|
|
@@ -93,7 +93,7 @@ myLogger.error('Critical!')
|
|
|
93
93
|
myLogger.info('Rebranded info!')
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
---
|
|
97
97
|
|
|
98
98
|
### Options & Theme Overrides
|
|
99
99
|
|
|
@@ -120,7 +120,7 @@ forcedDarkLogger.info('This will always use dark-friendly colors.')
|
|
|
120
120
|
> **Tip:**
|
|
121
121
|
> Forcing `'dark'` or `'light'` bypasses automatic theming, ensuring predictable colors in environments with unknown or unsupported theme detection (like some CI pipelines, dumb terminals, or minimal browsers).
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
---
|
|
124
124
|
|
|
125
125
|
### Customization
|
|
126
126
|
|
|
@@ -136,7 +136,7 @@ myLogger.error('Oh no!') // Uses your custom color
|
|
|
136
136
|
myLogger.info('Still styled by theme.') // Uses the default theme color
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
---
|
|
140
140
|
|
|
141
141
|
### Supported Environment Variables
|
|
142
142
|
|
|
@@ -153,7 +153,7 @@ Colorino auto-detects your environment and color support, but you can override b
|
|
|
153
153
|
| `WT_SESSION` | Detected for Windows Terminal (enables color) | |
|
|
154
154
|
| `CI` | Many CI platforms default to *no color* | `CI=1 node app.js` |
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
---
|
|
157
157
|
|
|
158
158
|
## Colorino vs. Chalk
|
|
159
159
|
|
|
@@ -165,7 +165,7 @@ Colorino auto-detects your environment and color support, but you can override b
|
|
|
165
165
|
| CSS console logs | ✔ | ✘ |
|
|
166
166
|
| Extensible / Composable | ✔ (via factory) | ✘ |
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
---
|
|
169
169
|
|
|
170
170
|
## API Reference
|
|
171
171
|
|
|
@@ -191,7 +191,7 @@ A factory function to create your own customized logger instances.
|
|
|
191
191
|
- `disableWarnings: boolean` (default `false`): Suppress warnings on environments with no color support.
|
|
192
192
|
- `theme: 'dark' | 'light'` (default `auto`): Force a specific theme instead of auto-detecting.
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
---
|
|
195
195
|
|
|
196
196
|
## Extending Colorino
|
|
197
197
|
|
|
@@ -244,7 +244,7 @@ logger.fatal('Missing config: Exiting')
|
|
|
244
244
|
- **Clean**: No messing with `super()` or constructor parameters
|
|
245
245
|
- **Composable**: You can layer multiple extensions
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
---
|
|
248
248
|
|
|
249
249
|
## Contributing
|
|
250
250
|
|
|
@@ -256,12 +256,12 @@ PRs and issues welcome!
|
|
|
256
256
|
4. Run `npm test:all` to ensure all tests pass in both Node and browser.
|
|
257
257
|
5. Open a Pull Request.
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
---
|
|
260
260
|
|
|
261
261
|
## License
|
|
262
262
|
|
|
263
263
|
MIT
|
|
264
264
|
|
|
265
|
-
|
|
265
|
+
---
|
|
266
266
|
|
|
267
267
|
> *Note:* When running tests, browser output is simulated. Visual styling only appears in real browsers/devtools, but Colorino always routes logs correctly for every environment.
|
package/dist/browser.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/dist/browser.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/dist/browser.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/dist/node.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/dist/node.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/dist/node.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { P as Palette, C as ColorinoOptions, a as Colorino } from './shared/colo
|
|
|
2
2
|
import 'neverthrow';
|
|
3
3
|
|
|
4
4
|
declare function createColorino(palette: Palette, options?: ColorinoOptions): Colorino;
|
|
5
|
+
|
|
5
6
|
declare const colorino: Colorino;
|
|
6
7
|
|
|
7
|
-
export { colorino, createColorino };
|
|
8
|
+
export { ColorinoOptions, Palette, colorino, createColorino };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "colorino",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "A super simple colorized logger that gets the most out of your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"vitest": "^4.0.6"
|
|
75
75
|
},
|
|
76
76
|
"lint-staged": {
|
|
77
|
-
"*.{ts,json,md,yml,yaml}": [
|
|
77
|
+
"*.{ts,json,jsonc,md,yml,yaml}": [
|
|
78
78
|
"oxlint --fix",
|
|
79
79
|
"oxfmt"
|
|
80
80
|
],
|