@pencroff-lab/kore 0.1.2 → 0.2.0

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.
@@ -0,0 +1,340 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Structured logging utility with transport DI and Err integration.
4
+ *
5
+ * This module provides a flexible, callable logger with a transport abstraction,
6
+ * built-in pretty console transport, and zero external runtime dependencies
7
+ * beyond `fast-safe-stringify`.
8
+ *
9
+ * ## Design Philosophy
10
+ *
11
+ * The logger is designed as a callable function with overloaded signatures.
12
+ * Transports are injectable, making the logger testable without streams or
13
+ * process-level side effects. The built-in pretty transport renders to stderr
14
+ * with ANSI colors and automatic Err formatting.
15
+ *
16
+ * ## Basic Usage
17
+ *
18
+ * @example Simple logging
19
+ * ```typescript
20
+ * import { log } from './utils/logger';
21
+ *
22
+ * log('Application started'); // INFO level by default
23
+ * log(log.WARN, 'Connection slow'); // Explicit level
24
+ * log(log.ERROR, 'Failed to save', { userId: '123' }); // With context
25
+ * ```
26
+ *
27
+ * @example Logging with Err instances
28
+ * ```typescript
29
+ * import { Err } from './types/err';
30
+ * import { log } from './utils/logger';
31
+ *
32
+ * const [data, err] = fetchData();
33
+ * if (err) {
34
+ * log(log.ERROR, 'Data fetch failed', err);
35
+ * return;
36
+ * }
37
+ * ```
38
+ *
39
+ * @example Child loggers with module context
40
+ * ```typescript
41
+ * const dbLogger = log.child('database', { version: '1.0' });
42
+ * dbLogger('Connected to postgres');
43
+ * // Output: [database] Connected to postgres
44
+ *
45
+ * const userLogger = dbLogger.child('users');
46
+ * userLogger('User created');
47
+ * // Output: [database] [users] User created
48
+ * ```
49
+ *
50
+ * @example Custom transport for testing
51
+ * ```typescript
52
+ * import { createLogger, lvl } from './utils/logger';
53
+ * import type { LogEntry, LogTransport } from './utils/logger';
54
+ *
55
+ * const entries: LogEntry[] = [];
56
+ * const spy: LogTransport = { write(e) { entries.push(e); } };
57
+ * const testLogger = createLogger('test', { transports: [spy], level: lvl.TRACE });
58
+ * ```
59
+ *
60
+ * ## Configuration
61
+ *
62
+ * The logger reads configuration from environment variables:
63
+ * - `LOG_LEVEL`: Minimum level to log (trace|debug|info|warn|error|fatal). Default: 'info'
64
+ *
65
+ * @module logger
66
+ */
67
+ Object.defineProperty(exports, "__esModule", { value: true });
68
+ exports.lvl = exports.log = void 0;
69
+ exports.createLogger = createLogger;
70
+ exports.prettyTransport = prettyTransport;
71
+ const fast_safe_stringify_1 = require("fast-safe-stringify");
72
+ const err_1 = require("../types/err");
73
+ /**
74
+ * Log level constants for type-safe level specification.
75
+ *
76
+ * **Level Hierarchy** (lowest to highest):
77
+ * - `TRACE`: Detailed debugging information
78
+ * - `DEBUG`: Debugging information
79
+ * - `INFO`: General informational messages
80
+ * - `WARN`: Warning messages
81
+ * - `ERROR`: Error messages for failures
82
+ * - `FATAL`: Fatal errors causing termination
83
+ */
84
+ const lvl = {
85
+ TRACE: "trace",
86
+ DEBUG: "debug",
87
+ INFO: "info",
88
+ WARN: "warn",
89
+ ERROR: "error",
90
+ FATAL: "fatal",
91
+ };
92
+ exports.lvl = lvl;
93
+ // ─── Internal constants ───────────────────────────────────────────────────────
94
+ const levelSet = new Set(Object.values(lvl));
95
+ const LEVEL_NUMBERS = {
96
+ trace: 0,
97
+ debug: 1,
98
+ info: 2,
99
+ warn: 3,
100
+ error: 4,
101
+ fatal: 5,
102
+ };
103
+ const LEVEL_TAGS = {
104
+ trace: "TRC",
105
+ debug: "DBG",
106
+ info: "INF",
107
+ warn: "WRN",
108
+ error: "ERR",
109
+ fatal: "FTL",
110
+ };
111
+ const DEFAULT_LEVEL_COLORS = {
112
+ trace: "\x1b[2m",
113
+ debug: "\x1b[36m",
114
+ info: "\x1b[32m",
115
+ warn: "\x1b[38;5;208m",
116
+ error: "\x1b[31m",
117
+ fatal: "\x1b[1m\x1b[31m",
118
+ };
119
+ const RESET = "\x1b[0m";
120
+ const DIM = "\x1b[2m";
121
+ // ─── Helpers ─────────────────────────────────────────────────────────────────
122
+ function isLevel(val) {
123
+ return (typeof val === "string" &&
124
+ levelSet.has(val.toLocaleLowerCase()));
125
+ }
126
+ function normalizeContext(ctx) {
127
+ if (err_1.Err.isErr(ctx))
128
+ return { err: ctx };
129
+ if (typeof ctx === "string")
130
+ return { detail: ctx };
131
+ if (typeof ctx === "object" && ctx !== null)
132
+ return ctx;
133
+ return {};
134
+ }
135
+ function resolveCall(...args) {
136
+ // 1 arg: [msg]
137
+ if (args.length === 1) {
138
+ return { level: lvl.INFO, message: String(args[0]), context: {} };
139
+ }
140
+ // 2 args
141
+ if (args.length === 2) {
142
+ const [first, second] = args;
143
+ if (isLevel(first)) {
144
+ return { level: first, message: String(second), context: {} };
145
+ }
146
+ return {
147
+ level: lvl.INFO,
148
+ message: String(first),
149
+ context: normalizeContext(second),
150
+ };
151
+ }
152
+ // 3+ args: [lvl, msg, ctx]
153
+ if (args.length >= 3) {
154
+ const [first, second, third] = args;
155
+ if (isLevel(first)) {
156
+ return {
157
+ level: first,
158
+ message: String(second),
159
+ context: normalizeContext(third),
160
+ };
161
+ }
162
+ }
163
+ // Fallback
164
+ return { level: lvl.INFO, message: String(args[0] ?? ""), context: {} };
165
+ }
166
+ function getLogLevel() {
167
+ const envLevel = process.env.LOG_LEVEL?.toLowerCase();
168
+ return isLevel(envLevel) ? envLevel : lvl.INFO;
169
+ }
170
+ // ─── Timestamp formatters ─────────────────────────────────────────────────────
171
+ function formatShortTimestamp(ts) {
172
+ const d = new Date(ts);
173
+ const hh = String(d.getHours()).padStart(2, "0");
174
+ const mm = String(d.getMinutes()).padStart(2, "0");
175
+ const ss = String(d.getSeconds()).padStart(2, "0");
176
+ const ms = String(d.getMilliseconds()).padStart(3, "0");
177
+ return `${hh}:${mm}:${ss}.${ms}`;
178
+ }
179
+ // ─── Pretty transport ─────────────────────────────────────────────────────────
180
+ /**
181
+ * Create a built-in pretty console transport.
182
+ *
183
+ * Renders log entries to a human-readable format with optional ANSI colors.
184
+ *
185
+ * Output format:
186
+ * ```
187
+ * {dim timestamp} {colored TAG} {[mod] [mod]} {message} {dim context}
188
+ * ```
189
+ *
190
+ * Err instances in context are rendered via `Err.toString()` on their own
191
+ * indented line below the main line.
192
+ *
193
+ * @param options - Optional configuration
194
+ */
195
+ function prettyTransport(options) {
196
+ const output = options?.output ?? process.stderr;
197
+ const colorsOpt = options?.colors ?? "auto";
198
+ const tsOpt = options?.timestamp ?? "short";
199
+ const levelColors = { ...DEFAULT_LEVEL_COLORS, ...options?.levelColors };
200
+ const isTTY = "isTTY" in output && output.isTTY === true;
201
+ const useColors = colorsOpt === "auto" ? isTTY : colorsOpt === true;
202
+ function formatTimestamp(ts) {
203
+ if (typeof tsOpt === "function")
204
+ return tsOpt(ts);
205
+ if (tsOpt === "iso")
206
+ return new Date(ts).toISOString();
207
+ return formatShortTimestamp(ts);
208
+ }
209
+ return {
210
+ write(entry) {
211
+ const ts = formatTimestamp(entry.timestamp);
212
+ const tag = LEVEL_TAGS[entry.level] ?? entry.level.toUpperCase();
213
+ const levelColor = levelColors[entry.level] ?? "";
214
+ // Module prefix
215
+ const modulePrefix = entry.modules.length > 0
216
+ ? `${entry.modules.map((m) => `[${m}]`).join(" ")} `
217
+ : "";
218
+ // Split err from rest of context
219
+ const { err: errVal, ...rest } = entry.context;
220
+ const hasErr = errVal !== undefined;
221
+ const hasRest = Object.keys(rest).length > 0;
222
+ let line;
223
+ if (useColors) {
224
+ const ctxStr = hasRest ? ` ${DIM}${(0, fast_safe_stringify_1.default)(rest)}${RESET}` : "";
225
+ line = `${DIM}${ts}${RESET} ${levelColor}${tag}${RESET} ${modulePrefix}${entry.message}${ctxStr}`;
226
+ }
227
+ else {
228
+ const ctxStr = hasRest ? ` ${(0, fast_safe_stringify_1.default)(rest)}` : "";
229
+ line = `${ts} ${tag} ${modulePrefix}${entry.message}${ctxStr}`;
230
+ }
231
+ if (hasErr) {
232
+ let errStr;
233
+ if (err_1.Err.isErr(errVal)) {
234
+ errStr = errVal.toString({ stack: 3, metadata: true });
235
+ }
236
+ else {
237
+ errStr = (0, fast_safe_stringify_1.default)(errVal);
238
+ }
239
+ const indented = errStr
240
+ .split("\n")
241
+ .map((l) => ` ${l}`)
242
+ .join("\n");
243
+ line += `\n err: ${indented.trimStart()}`;
244
+ }
245
+ output.write(`${line}\n`);
246
+ },
247
+ };
248
+ }
249
+ // ─── Core logger builder ──────────────────────────────────────────────────────
250
+ function buildLogger(modules, bindings, level, transports) {
251
+ const configNum = LEVEL_NUMBERS[level];
252
+ const logFn = (...args) => {
253
+ const { level: callLevel, message, context } = resolveCall(...args);
254
+ if ((LEVEL_NUMBERS[callLevel] ?? 0) < configNum)
255
+ return;
256
+ const entry = {
257
+ level: callLevel,
258
+ timestamp: Date.now(),
259
+ message,
260
+ context: { ...bindings, ...context },
261
+ modules,
262
+ };
263
+ for (const transport of transports) {
264
+ transport.write(entry);
265
+ }
266
+ };
267
+ // Attach level constants
268
+ const keys = Object.keys(lvl);
269
+ for (const key of keys) {
270
+ Object.defineProperty(logFn, key, {
271
+ value: lvl[key],
272
+ writable: false,
273
+ enumerable: true,
274
+ });
275
+ }
276
+ // Attach child()
277
+ logFn.child = (name, childBindings) => {
278
+ const mergedBindings = {
279
+ ...bindings,
280
+ ...childBindings,
281
+ };
282
+ return buildLogger([...modules, name], mergedBindings, level, transports);
283
+ };
284
+ return logFn;
285
+ }
286
+ // ─── Public factory ───────────────────────────────────────────────────────────
287
+ /**
288
+ * Create a logger instance with optional module name and configuration.
289
+ *
290
+ * @param module - Optional module name added as the first entry in `modules`
291
+ * @param options - Optional configuration
292
+ * @returns New Logger instance
293
+ *
294
+ * @example Basic usage
295
+ * ```typescript
296
+ * const logger = createLogger();
297
+ * logger('Application ready');
298
+ * ```
299
+ *
300
+ * @example Module-specific logger
301
+ * ```typescript
302
+ * const dbLogger = createLogger('database');
303
+ * dbLogger('Connected');
304
+ * ```
305
+ *
306
+ * @example Testing with spy transport
307
+ * ```typescript
308
+ * import type { LogEntry, LogTransport } from './utils/logger';
309
+ *
310
+ * const entries: LogEntry[] = [];
311
+ * const spy: LogTransport = { write(e) { entries.push(e); } };
312
+ * const testLogger = createLogger('test', { transports: [spy], level: lvl.TRACE });
313
+ * ```
314
+ */
315
+ function createLogger(module, options) {
316
+ const level = options?.level ?? getLogLevel();
317
+ const transports = options?.transports ?? [prettyTransport()];
318
+ const modules = module ? [module] : [];
319
+ return buildLogger(modules, {}, level, transports);
320
+ }
321
+ /**
322
+ * Default logger instance for application-wide logging.
323
+ *
324
+ * @example Basic usage
325
+ * ```typescript
326
+ * import { log } from './utils/logger';
327
+ *
328
+ * log('Application started');
329
+ * log(log.INFO, 'Server listening', { port: 3000 });
330
+ * log(log.ERROR, 'Startup failed', err);
331
+ * ```
332
+ *
333
+ * @example Module-specific logging via child
334
+ * ```typescript
335
+ * const dbLogger = log.child('database');
336
+ * dbLogger('Connection pool initialized');
337
+ * ```
338
+ */
339
+ exports.log = createLogger();
340
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/utils/logger.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;;;AA2bM,oCAAY;AAAE,0CAAe;AAzbtC,6DAAgD;AAChD,sCAAmC;AAEnC;;;;;;;;;;GAUG;AACH,MAAM,GAAG,GAAG;IACX,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACL,CAAC;AAoa6B,kBAAG;AArS3C,iFAAiF;AAEjF,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAE7C,MAAM,aAAa,GAA+B;IACjD,KAAK,EAAE,CAAC;IACR,KAAK,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iF;AAEjF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAS,YAAY,CAAC,MAAe,EAAE,OAAuB;IAC7D,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,OAAO,WAAW,CAAC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,GAAG,GAAG,YAAY,EAAE,CAAC"}
@@ -4,7 +4,6 @@
4
4
  export interface DtStampOptions {
5
5
  /**
6
6
  * Character(s) between date/time segments.
7
- * Ignored when `compact` is `true`.
8
7
  * @default "_"
9
8
  */
10
9
  delimiter?: string;
@@ -23,16 +22,18 @@ export interface DtStampOptions {
23
22
  /**
24
23
  * Which parts of the stamp to include.
25
24
  * - `"datetime"` -- full stamp (date + time)
26
- * - `"date"` -- date only (`YYYYMMDD`)
27
- * - `"time"` -- time only (`HHmmss` or `HHmmss_SSS` with `ms`)
25
+ * - `"date"` -- date only
26
+ * - `"time"` -- time only
28
27
  * @default "datetime"
29
28
  */
30
29
  parts?: "datetime" | "date" | "time";
31
30
  /**
32
- * When `true`, omits the delimiter entirely (equivalent to `delimiter: ""`).
31
+ * When `true`, formats with human-readable separators:
32
+ * dashes in date (`YYYY-MM-DD`), colons in time (`HH:MM:SS`),
33
+ * and `.` before milliseconds in time-only mode (`HH:MM:SS.mmm`).
33
34
  * @default false
34
35
  */
35
- compact?: boolean;
36
+ readable?: boolean;
36
37
  }
37
38
  /**
38
39
  * Format a `Date` into a filesystem/log-safe timestamp string.
@@ -41,7 +42,7 @@ export interface DtStampOptions {
41
42
  * and anywhere a human-readable but machine-sortable date/time is needed.
42
43
  *
43
44
  * @param date - Date to format. Defaults to `new Date()` when `null` or omitted.
44
- * @param options - Formatting options (delimiter, milliseconds, timezone, parts, compact)
45
+ * @param options - Formatting options (delimiter, milliseconds, timezone, parts, readable)
45
46
  * @returns Formatted timestamp string
46
47
  *
47
48
  * @example Default (UTC datetime with underscore delimiter)
@@ -50,22 +51,22 @@ export interface DtStampOptions {
50
51
  * // "20240315_103045"
51
52
  * ```
52
53
  *
53
- * @example Compact with milliseconds
54
+ * @example Readable datetime with milliseconds
54
55
  * ```typescript
55
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { compact: true, ms: true });
56
- * // "20240315103045123"
56
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, ms: true });
57
+ * // "2024-03-15_10:30:45_123"
57
58
  * ```
58
59
  *
59
- * @example Date only
60
+ * @example Readable date only
60
61
  * ```typescript
61
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { parts: "date" });
62
- * // "20240315"
62
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, parts: "date" });
63
+ * // "2024-03-15"
63
64
  * ```
64
65
  *
65
- * @example Time only with milliseconds
66
+ * @example Readable time with milliseconds
66
67
  * ```typescript
67
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { parts: "time", ms: true });
68
- * // "103045_123"
68
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, parts: "time", ms: true });
69
+ * // "10:30:45.123"
69
70
  * ```
70
71
  *
71
72
  * @example Custom delimiter
@@ -1 +1 @@
1
- {"version":3,"file":"format_dt.d.ts","sourceRoot":"","sources":["../../../../src/utils/format_dt.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;;;OAKG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CA8C5E"}
1
+ {"version":3,"file":"format_dt.d.ts","sourceRoot":"","sources":["../../../../src/utils/format_dt.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;;;OAKG;IACH,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAkD5E"}
@@ -5,7 +5,7 @@
5
5
  * and anywhere a human-readable but machine-sortable date/time is needed.
6
6
  *
7
7
  * @param date - Date to format. Defaults to `new Date()` when `null` or omitted.
8
- * @param options - Formatting options (delimiter, milliseconds, timezone, parts, compact)
8
+ * @param options - Formatting options (delimiter, milliseconds, timezone, parts, readable)
9
9
  * @returns Formatted timestamp string
10
10
  *
11
11
  * @example Default (UTC datetime with underscore delimiter)
@@ -14,22 +14,22 @@
14
14
  * // "20240315_103045"
15
15
  * ```
16
16
  *
17
- * @example Compact with milliseconds
17
+ * @example Readable datetime with milliseconds
18
18
  * ```typescript
19
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { compact: true, ms: true });
20
- * // "20240315103045123"
19
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, ms: true });
20
+ * // "2024-03-15_10:30:45_123"
21
21
  * ```
22
22
  *
23
- * @example Date only
23
+ * @example Readable date only
24
24
  * ```typescript
25
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { parts: "date" });
26
- * // "20240315"
25
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, parts: "date" });
26
+ * // "2024-03-15"
27
27
  * ```
28
28
  *
29
- * @example Time only with milliseconds
29
+ * @example Readable time with milliseconds
30
30
  * ```typescript
31
- * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { parts: "time", ms: true });
32
- * // "103045_123"
31
+ * dtStamp(new Date("2024-03-15T10:30:45.123Z"), { readable: true, parts: "time", ms: true });
32
+ * // "10:30:45.123"
33
33
  * ```
34
34
  *
35
35
  * @example Custom delimiter
@@ -40,8 +40,7 @@
40
40
  */
41
41
  export function dtStamp(date, options) {
42
42
  const d = date ?? new Date();
43
- const { delimiter = "_", ms = false, tz = "utc", parts = "datetime", compact = false, } = options ?? {};
44
- const sep = compact ? "" : delimiter;
43
+ const { delimiter = "_", ms = false, tz = "utc", parts = "datetime", readable = false, } = options ?? {};
45
44
  const utc = tz === "utc";
46
45
  const year = utc ? d.getUTCFullYear() : d.getFullYear();
47
46
  const month = String((utc ? d.getUTCMonth() : d.getMonth()) + 1).padStart(2, "0");
@@ -49,11 +48,16 @@ export function dtStamp(date, options) {
49
48
  const hours = String(utc ? d.getUTCHours() : d.getHours()).padStart(2, "0");
50
49
  const minutes = String(utc ? d.getUTCMinutes() : d.getMinutes()).padStart(2, "0");
51
50
  const seconds = String(utc ? d.getUTCSeconds() : d.getSeconds()).padStart(2, "0");
52
- const datePart = `${year}${month}${day}`;
53
- let timePart = `${hours}${minutes}${seconds}`;
51
+ const datePart = readable
52
+ ? `${year}-${month}-${day}`
53
+ : `${year}${month}${day}`;
54
+ let timePart = readable
55
+ ? `${hours}:${minutes}:${seconds}`
56
+ : `${hours}${minutes}${seconds}`;
54
57
  if (ms) {
55
58
  const millis = String(utc ? d.getUTCMilliseconds() : d.getMilliseconds()).padStart(3, "0");
56
- timePart = `${timePart}${sep}${millis}`;
59
+ const msSep = readable && parts === "time" ? "." : delimiter;
60
+ timePart = `${timePart}${msSep}${millis}`;
57
61
  }
58
62
  if (parts === "date") {
59
63
  return datePart;
@@ -61,6 +65,6 @@ export function dtStamp(date, options) {
61
65
  if (parts === "time") {
62
66
  return timePart;
63
67
  }
64
- return `${datePart}${sep}${timePart}`;
68
+ return `${datePart}${delimiter}${timePart}`;
65
69
  }
66
70
  //# sourceMappingURL=format_dt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format_dt.js","sourceRoot":"","sources":["../../../../src/utils/format_dt.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,OAAO,CAAC,IAAkB,EAAE,OAAwB;IACnE,MAAM,CAAC,GAAG,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;IAC7B,MAAM,EACL,SAAS,GAAG,GAAG,EACf,EAAE,GAAG,KAAK,EACV,EAAE,GAAG,KAAK,EACV,KAAK,GAAG,UAAU,EAClB,OAAO,GAAG,KAAK,GACf,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACrC,MAAM,GAAG,GAAG,EAAE,KAAK,KAAK,CAAC;IAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACxD,MAAM,KAAK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,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7D,QAAQ,GAAG,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,EAAE,CAAC;AAC7C,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./format_dt";
2
+ export * from "./logger";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./format_dt";
2
+ export * from "./logger";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}