@pandacss/logger 0.4.0 → 0.5.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/dist/index.d.mts +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { default as colors } from 'kleur';
|
|
2
|
+
|
|
3
|
+
declare const createLogScope: (scope: string) => {
|
|
4
|
+
(subScope: string): string;
|
|
5
|
+
toString(): string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare const quote: (...str: string[]) => string;
|
|
9
|
+
declare const logger: {
|
|
10
|
+
level: "debug" | "info" | "warn" | "error" | "silent";
|
|
11
|
+
warn: (type: string, data: any) => void;
|
|
12
|
+
info: (type: string, data: any) => void;
|
|
13
|
+
debug: (type: string, data: any) => void;
|
|
14
|
+
error: (type: string, data: any) => void;
|
|
15
|
+
log: (data: string) => void;
|
|
16
|
+
time: {
|
|
17
|
+
info: (msg: string) => () => void;
|
|
18
|
+
debug: (msg: string) => () => void;
|
|
19
|
+
};
|
|
20
|
+
isDebug: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { createLogScope, logger, quote };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -237,7 +237,8 @@ var createLogger = (conf = {}) => {
|
|
|
237
237
|
time: {
|
|
238
238
|
info: timing("info"),
|
|
239
239
|
debug: timing("debug")
|
|
240
|
-
}
|
|
240
|
+
},
|
|
241
|
+
isDebug: Boolean(conf.isDebug)
|
|
241
242
|
};
|
|
242
243
|
};
|
|
243
244
|
|
|
@@ -250,8 +251,10 @@ var createLogScope = (scope) => {
|
|
|
250
251
|
|
|
251
252
|
// src/index.ts
|
|
252
253
|
var quote = (...str) => import_kleur4.default.cyan(`\`${str.join("")}\``);
|
|
254
|
+
var debug = process.env.PANDA_DEBUG;
|
|
253
255
|
var logger = createLogger({
|
|
254
|
-
filter: typeof process !== "undefined" ?
|
|
256
|
+
filter: typeof process !== "undefined" ? debug : void 0,
|
|
257
|
+
isDebug: Boolean(debug)
|
|
255
258
|
});
|
|
256
259
|
// Annotate the CommonJS export names for ESM import in node:
|
|
257
260
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -200,7 +200,8 @@ var createLogger = (conf = {}) => {
|
|
|
200
200
|
time: {
|
|
201
201
|
info: timing("info"),
|
|
202
202
|
debug: timing("debug")
|
|
203
|
-
}
|
|
203
|
+
},
|
|
204
|
+
isDebug: Boolean(conf.isDebug)
|
|
204
205
|
};
|
|
205
206
|
};
|
|
206
207
|
|
|
@@ -213,8 +214,10 @@ var createLogScope = (scope) => {
|
|
|
213
214
|
|
|
214
215
|
// src/index.ts
|
|
215
216
|
var quote = (...str) => colors4.cyan(`\`${str.join("")}\``);
|
|
217
|
+
var debug = process.env.PANDA_DEBUG;
|
|
216
218
|
var logger = createLogger({
|
|
217
|
-
filter: typeof process !== "undefined" ?
|
|
219
|
+
filter: typeof process !== "undefined" ? debug : void 0,
|
|
220
|
+
isDebug: Boolean(debug)
|
|
218
221
|
});
|
|
219
222
|
export {
|
|
220
223
|
colors4 as colors,
|