feat: add color to log

This commit is contained in:
huzibaca
2024-10-04 22:38:06 +08:00
parent 591c1cb454
commit d8c85007d4
4 changed files with 211 additions and 18 deletions

180
pnpm-lock.yaml generated
View File

@@ -73,6 +73,9 @@ importers:
axios:
specifier: ^1.7.2
version: 1.7.2
cli-color:
specifier: ^2.0.4
version: 2.0.4
dayjs:
specifier: 1.11.5
version: 1.11.5
@@ -2624,6 +2627,13 @@ packages:
}
engines: { node: ">=10" }
cli-color@2.0.4:
resolution:
{
integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==,
}
engines: { node: ">=0.10" }
client-only@0.0.1:
resolution:
{
@@ -2739,6 +2749,13 @@ packages:
integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==,
}
d@1.0.2:
resolution:
{
integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==,
}
engines: { node: ">=0.12" }
data-uri-to-buffer@4.0.1:
resolution:
{
@@ -2833,6 +2850,32 @@ packages:
integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==,
}
es5-ext@0.10.64:
resolution:
{
integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==,
}
engines: { node: ">=0.10" }
es6-iterator@2.0.3:
resolution:
{
integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==,
}
es6-symbol@3.1.4:
resolution:
{
integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==,
}
engines: { node: ">=0.12" }
es6-weak-map@2.0.3:
resolution:
{
integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==,
}
esbuild@0.21.5:
resolution:
{
@@ -2862,6 +2905,13 @@ packages:
}
engines: { node: ">=10" }
esniff@2.0.1:
resolution:
{
integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==,
}
engines: { node: ">=0.10" }
estree-util-is-identifier-name@3.0.0:
resolution:
{
@@ -2881,6 +2931,12 @@ packages:
}
engines: { node: ">=0.10.0" }
event-emitter@0.3.5:
resolution:
{
integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==,
}
execa@4.1.0:
resolution:
{
@@ -2888,6 +2944,12 @@ packages:
}
engines: { node: ">=10" }
ext@1.7.0:
resolution:
{
integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==,
}
extend@3.0.2:
resolution:
{
@@ -3190,6 +3252,12 @@ packages:
}
engines: { node: ">=0.10.0" }
is-promise@2.2.2:
resolution:
{
integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==,
}
is-stream@2.0.1:
resolution:
{
@@ -3326,6 +3394,12 @@ packages:
}
engines: { node: ">=10" }
lru-queue@0.1.0:
resolution:
{
integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==,
}
magic-string@0.30.10:
resolution:
{
@@ -3380,6 +3454,13 @@ packages:
integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==,
}
memoizee@0.4.17:
resolution:
{
integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==,
}
engines: { node: ">=0.12" }
meow@13.2.0:
resolution:
{
@@ -3644,6 +3725,12 @@ packages:
engines: { node: ^18 || >=20 }
hasBin: true
next-tick@1.1.0:
resolution:
{
integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==,
}
no-case@3.0.4:
resolution:
{
@@ -4278,6 +4365,13 @@ packages:
engines: { node: ">=10" }
hasBin: true
timers-ext@0.1.8:
resolution:
{
integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==,
}
engines: { node: ">=0.12" }
to-fast-properties@2.0.0:
resolution:
{
@@ -4323,6 +4417,12 @@ packages:
}
engines: { node: ">=0.6.11 <=0.7.0 || >=0.7.3" }
type@2.7.3:
resolution:
{
integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==,
}
types-pac@1.0.2:
resolution:
{
@@ -6310,6 +6410,14 @@ snapshots:
chownr@2.0.0: {}
cli-color@2.0.4:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
es6-iterator: 2.0.3
memoizee: 0.4.17
timers-ext: 0.1.8
client-only@0.0.1: {}
clsx@2.1.1: {}
@@ -6369,6 +6477,11 @@ snapshots:
csstype@3.1.3: {}
d@1.0.2:
dependencies:
es5-ext: 0.10.64
type: 2.7.3
data-uri-to-buffer@4.0.1: {}
dayjs@1.11.5: {}
@@ -6413,6 +6526,31 @@ snapshots:
dependencies:
is-arrayish: 0.2.1
es5-ext@0.10.64:
dependencies:
es6-iterator: 2.0.3
es6-symbol: 3.1.4
esniff: 2.0.1
next-tick: 1.1.0
es6-iterator@2.0.3:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
es6-symbol: 3.1.4
es6-symbol@3.1.4:
dependencies:
d: 1.0.2
ext: 1.7.0
es6-weak-map@2.0.3:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
es6-iterator: 2.0.3
es6-symbol: 3.1.4
esbuild@0.21.5:
optionalDependencies:
"@esbuild/aix-ppc64": 0.21.5
@@ -6445,12 +6583,24 @@ snapshots:
escape-string-regexp@4.0.0: {}
esniff@2.0.1:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
event-emitter: 0.3.5
type: 2.7.3
estree-util-is-identifier-name@3.0.0: {}
estree-walker@2.0.2: {}
esutils@2.0.3: {}
event-emitter@0.3.5:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
execa@4.1.0:
dependencies:
cross-spawn: 7.0.3
@@ -6463,6 +6613,10 @@ snapshots:
signal-exit: 3.0.7
strip-final-newline: 2.0.0
ext@1.7.0:
dependencies:
type: 2.7.3
extend@3.0.2: {}
fetch-blob@3.2.0:
@@ -6622,6 +6776,8 @@ snapshots:
is-plain-object@5.0.0: {}
is-promise@2.2.2: {}
is-stream@2.0.1: {}
isexe@2.0.0: {}
@@ -6676,6 +6832,10 @@ snapshots:
dependencies:
yallist: 4.0.0
lru-queue@0.1.0:
dependencies:
es5-ext: 0.10.64
magic-string@0.30.10:
dependencies:
"@jridgewell/sourcemap-codec": 1.4.15
@@ -6769,6 +6929,17 @@ snapshots:
dependencies:
"@types/mdast": 4.0.4
memoizee@0.4.17:
dependencies:
d: 1.0.2
es5-ext: 0.10.64
es6-weak-map: 2.0.3
event-emitter: 0.3.5
is-promise: 2.2.2
lru-queue: 0.1.0
next-tick: 1.1.0
timers-ext: 0.1.8
meow@13.2.0: {}
merge-stream@2.0.0: {}
@@ -6971,6 +7142,8 @@ snapshots:
nanoid@5.0.7: {}
next-tick@1.1.0: {}
no-case@3.0.4:
dependencies:
lower-case: 2.0.2
@@ -7355,6 +7528,11 @@ snapshots:
commander: 2.20.3
source-map-support: 0.5.21
timers-ext@0.1.8:
dependencies:
es5-ext: 0.10.64
next-tick: 1.1.0
to-fast-properties@2.0.0: {}
to-regex-range@5.0.1:
@@ -7371,6 +7549,8 @@ snapshots:
tunnel@0.0.6: {}
type@2.7.3: {}
types-pac@1.0.2: {}
typescript@5.5.3: {}