@darthcav/ts-utils 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -23,6 +23,30 @@ npm install @darthcav/ts-utils
23
23
 
24
24
  ## Usage
25
25
 
26
+ ### `getConsoleLogger`
27
+
28
+ Configures logging and returns a `Logger` for the given category name. Records
29
+ at or above `lowestLevel` are written to the console using an ANSI color
30
+ formatter with RFC 3339 timestamps. The internal `logtape/meta` logger is
31
+ silenced.
32
+
33
+ ```ts
34
+ import { getConsoleLogger, main } from "@darthcav/ts-utils"
35
+
36
+ const logger = await getConsoleLogger("my-app")
37
+
38
+ main("my-app", logger, (logger) => {
39
+ logger.info(`Application is running`)
40
+ // start servers, connect to databases, etc.
41
+ })
42
+ ```
43
+
44
+ Pass a second argument to change the minimum log level (defaults to `"info"`):
45
+
46
+ ```ts
47
+ const logger = await getConsoleLogger("my-app", "debug")
48
+ ```
49
+
26
50
  ### `main`
27
51
 
28
52
  Bootstraps an application process: logs startup information, registers handlers
@@ -33,8 +57,8 @@ delegates to an optional launcher function.
33
57
  import { getLogger } from "@logtape/logtape"
34
58
  import { main } from "@darthcav/ts-utils"
35
59
 
36
- main("my-app", getLogger(["my-app"]), (name, logger) => {
37
- logger.info(`${name} is running`)
60
+ main("my-app", getLogger(["my-app"]), (logger) => {
61
+ logger.info(`Application is running`)
38
62
  // start servers, connect to databases, etc.
39
63
  })
40
64
  ```
@@ -70,6 +94,7 @@ npm run doc
70
94
  src/
71
95
  index.ts # Public API entry point
72
96
  main.ts # Main module
97
+ loggers/ # Logger utilities
73
98
  __tests__/ # Test files
74
99
  dist/ # Compiled output (generated)
75
100
  public/ # Documentation output (generated)
@@ -80,7 +105,7 @@ public/ # Documentation output (generated)
80
105
  [Apache-2.0](LICENSE)
81
106
 
82
107
  [node-version]: https://img.shields.io/badge/node-%3E%3D25-orange.svg?style=flat-square
83
- [version-image]: https://img.shields.io/badge/version-0.2.0-blue.svg?style=flat-square
108
+ [version-image]: https://img.shields.io/badge/version-0.3.0-blue.svg?style=flat-square
84
109
  [ci-badge]: https://github.com/darthcav/ts-utils/actions/workflows/tests.yml/badge.svg
85
110
  [coverage-badge]: https://img.shields.io/badge/coverage-check%20CI-yellow.svg?style=flat-square
86
111
  [pages-url]: https://darthcav.github.io/ts-utils/
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
+ import getConsoleLogger from "./loggers/getConsoleLogger.ts";
6
7
  import { type LauncherFunction, main } from "./main.ts";
7
- export { type LauncherFunction, main };
8
+ export { getConsoleLogger, main, type LauncherFunction };
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,gBAAgB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,gBAAgB,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,KAAK,gBAAgB,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,KAAK,gBAAgB,EAAE,CAAA"}
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
+ import getConsoleLogger from "./loggers/getConsoleLogger.js";
6
7
  import { main } from "./main.js";
7
- export { main };
8
+ export { getConsoleLogger, main };
8
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAyB,IAAI,EAAE,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAyB,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,gBAAgB,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAyB,IAAI,EAAE,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAyB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { type Logger, type LogLevel } from "@logtape/logtape";
2
+ /**
3
+ * Configures logging and returns a {@link Logger} for the given category name.
4
+ *
5
+ * Records at or above `lowestLevel` are written to the console using an ANSI
6
+ * color formatter with RFC 3339 timestamps. The internal `logtape/meta` logger
7
+ * is silenced.
8
+ *
9
+ * @param name - The top-level category name (typically the application name).
10
+ * @param lowestLevel - The minimum log level to output. Defaults to `"info"`.
11
+ * @returns A promise resolving to a logger scoped to the given category.
12
+ */
13
+ export default function getConsoleLogger(name: string, lowestLevel?: LogLevel): Promise<Logger>;
14
+ //# sourceMappingURL=getConsoleLogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsoleLogger.d.ts","sourceRoot":"","sources":["../../src/loggers/getConsoleLogger.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,MAAM,EACX,KAAK,QAAQ,EAChB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;;;;;GAUG;AACH,wBAA8B,gBAAgB,CAC1C,IAAI,EAAE,MAAM,EACZ,WAAW,GAAE,QAAiB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
@@ -0,0 +1,34 @@
1
+ import { configure, getAnsiColorFormatter, getConsoleSink, getLogger, } from "@logtape/logtape";
2
+ /**
3
+ * Configures logging and returns a {@link Logger} for the given category name.
4
+ *
5
+ * Records at or above `lowestLevel` are written to the console using an ANSI
6
+ * color formatter with RFC 3339 timestamps. The internal `logtape/meta` logger
7
+ * is silenced.
8
+ *
9
+ * @param name - The top-level category name (typically the application name).
10
+ * @param lowestLevel - The minimum log level to output. Defaults to `"info"`.
11
+ * @returns A promise resolving to a logger scoped to the given category.
12
+ */
13
+ export default async function getConsoleLogger(name, lowestLevel = "info") {
14
+ await configure({
15
+ sinks: {
16
+ console: getConsoleSink({
17
+ formatter: getAnsiColorFormatter({
18
+ timestamp: "rfc3339",
19
+ level: "FULL",
20
+ }),
21
+ }),
22
+ },
23
+ loggers: [
24
+ { category: [], sinks: ["console"], lowestLevel },
25
+ {
26
+ category: ["logtape", "meta"],
27
+ sinks: [],
28
+ parentSinks: "override",
29
+ },
30
+ ],
31
+ });
32
+ return getLogger([name]);
33
+ }
34
+ //# sourceMappingURL=getConsoleLogger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsoleLogger.js","sourceRoot":"","sources":["../../src/loggers/getConsoleLogger.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,SAAS,GAGZ,MAAM,kBAAkB,CAAA;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,gBAAgB,CAC1C,IAAY,EACZ,cAAwB,MAAM;IAE9B,MAAM,SAAS,CAAC;QACZ,KAAK,EAAE;YACH,OAAO,EAAE,cAAc,CAAC;gBACpB,SAAS,EAAE,qBAAqB,CAAC;oBAC7B,SAAS,EAAE,SAAS;oBACpB,KAAK,EAAE,MAAM;iBAChB,CAAC;aACL,CAAC;SACL;QACD,OAAO,EAAE;YACL,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE;YACjD;gBACI,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;gBAC7B,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,UAAU;aAC1B;SACJ;KACJ,CAAC,CAAA;IACF,OAAO,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAC5B,CAAC"}
package/dist/main.d.ts CHANGED
@@ -3,11 +3,10 @@ import type { Logger } from "@logtape/logtape";
3
3
  * A function that performs the actual application launch after process
4
4
  * lifecycle handlers have been set up by {@link main}.
5
5
  *
6
- * @param name - Application name, forwarded from {@link main}.
7
6
  * @param logger - Logger instance, forwarded from {@link main}.
8
7
  * @param args - Additional arguments forwarded from the {@link main} call.
9
8
  */
10
- export type LauncherFunction = (name: string, logger: Logger, ...args: unknown[]) => void;
9
+ export type LauncherFunction = (logger: Logger, ...args: unknown[]) => void;
11
10
  /**
12
11
  * Bootstraps an application process: logs startup information, registers
13
12
  * handlers for `SIGINT`, `SIGTERM`, `uncaughtException`, and
@@ -24,8 +23,8 @@ export type LauncherFunction = (name: string, logger: Logger, ...args: unknown[]
24
23
  * import { getLogger } from "@logtape/logtape"
25
24
  * import { main } from "@darthcav/ts-utils"
26
25
  *
27
- * main("my-app", getLogger(["my-app"]), (name, logger) => {
28
- * logger.info(`${name} is running`)
26
+ * main("my-app", getLogger(["my-app"]), (logger) => {
27
+ * logger.info(`Application is running`)
29
28
  * // start servers, connect to databases, etc.
30
29
  * })
31
30
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC3B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,OAAO,EAAE,KACjB,IAAI,CAAA;AAET;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,OAAO,EAAE,CAAC,GAC/C,IAAI,CAiCN"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;AAE3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,IAAI,EAAE,EAAE,GAAG,CAAC,gBAAgB,EAAE,GAAG,OAAO,EAAE,CAAC,GAC/C,IAAI,CAiCN"}
package/dist/main.js CHANGED
@@ -15,8 +15,8 @@ import process, { env, execArgv, pid, title } from "node:process";
15
15
  * import { getLogger } from "@logtape/logtape"
16
16
  * import { main } from "@darthcav/ts-utils"
17
17
  *
18
- * main("my-app", getLogger(["my-app"]), (name, logger) => {
19
- * logger.info(`${name} is running`)
18
+ * main("my-app", getLogger(["my-app"]), (logger) => {
19
+ * logger.info(`Application is running`)
20
20
  * // start servers, connect to databases, etc.
21
21
  * })
22
22
  * ```
@@ -44,6 +44,6 @@ export function main(name, logger, ...args) {
44
44
  __logger.error(`Reason:\n${reason}`);
45
45
  process.exit(1);
46
46
  });
47
- __f?.(name, logger, ...parts);
47
+ __f?.(logger, ...parts);
48
48
  }
49
49
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAiBjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,IAAI,CAChB,IAAY,EACZ,MAAc,EACd,GAAG,IAA2C;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E;YAC1B,QAAQ,CAAC,KAAK,CAAC,oBAAoB,MAAM,EAAE,CAAC,CAAA;YAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QAC9C,QAAQ,CAAC,KAAK,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAA;QAC9C,QAAQ,CAAC,KAAK,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAA;QAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,QAAQ,CAAC,KAAK,CACV,2CAA2C,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CACjE,CAAA;QACD,QAAQ,CAAC,KAAK,CAAC,YAAY,MAAM,EAAE,CAAC,CAAA;QACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,CAAA;AAC3B,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@darthcav/ts-utils",
3
3
  "description": "A collection of utility functions for TypeScript applications and modules",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "author": {
6
6
  "name": "darthcav"
7
7
  },
@@ -18,7 +18,6 @@
18
18
  },
19
19
  "files": [
20
20
  "package.json",
21
- "package-lock.json",
22
21
  "README.md",
23
22
  "LICENSE",
24
23
  "src/**/*.ts",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
+ import getConsoleLogger from "./loggers/getConsoleLogger.ts"
7
8
  import { type LauncherFunction, main } from "./main.ts"
8
9
 
9
- export { type LauncherFunction, main }
10
+ export { getConsoleLogger, main, type LauncherFunction }
@@ -0,0 +1,44 @@
1
+ import {
2
+ configure,
3
+ getAnsiColorFormatter,
4
+ getConsoleSink,
5
+ getLogger,
6
+ type Logger,
7
+ type LogLevel,
8
+ } from "@logtape/logtape"
9
+
10
+ /**
11
+ * Configures logging and returns a {@link Logger} for the given category name.
12
+ *
13
+ * Records at or above `lowestLevel` are written to the console using an ANSI
14
+ * color formatter with RFC 3339 timestamps. The internal `logtape/meta` logger
15
+ * is silenced.
16
+ *
17
+ * @param name - The top-level category name (typically the application name).
18
+ * @param lowestLevel - The minimum log level to output. Defaults to `"info"`.
19
+ * @returns A promise resolving to a logger scoped to the given category.
20
+ */
21
+ export default async function getConsoleLogger(
22
+ name: string,
23
+ lowestLevel: LogLevel = "info",
24
+ ): Promise<Logger> {
25
+ await configure({
26
+ sinks: {
27
+ console: getConsoleSink({
28
+ formatter: getAnsiColorFormatter({
29
+ timestamp: "rfc3339",
30
+ level: "FULL",
31
+ }),
32
+ }),
33
+ },
34
+ loggers: [
35
+ { category: [], sinks: ["console"], lowestLevel },
36
+ {
37
+ category: ["logtape", "meta"],
38
+ sinks: [],
39
+ parentSinks: "override",
40
+ },
41
+ ],
42
+ })
43
+ return getLogger([name])
44
+ }
package/src/main.ts CHANGED
@@ -5,15 +5,10 @@ import type { Logger } from "@logtape/logtape"
5
5
  * A function that performs the actual application launch after process
6
6
  * lifecycle handlers have been set up by {@link main}.
7
7
  *
8
- * @param name - Application name, forwarded from {@link main}.
9
8
  * @param logger - Logger instance, forwarded from {@link main}.
10
9
  * @param args - Additional arguments forwarded from the {@link main} call.
11
10
  */
12
- export type LauncherFunction = (
13
- name: string,
14
- logger: Logger,
15
- ...args: unknown[]
16
- ) => void
11
+ export type LauncherFunction = (logger: Logger, ...args: unknown[]) => void
17
12
 
18
13
  /**
19
14
  * Bootstraps an application process: logs startup information, registers
@@ -31,8 +26,8 @@ export type LauncherFunction = (
31
26
  * import { getLogger } from "@logtape/logtape"
32
27
  * import { main } from "@darthcav/ts-utils"
33
28
  *
34
- * main("my-app", getLogger(["my-app"]), (name, logger) => {
35
- * logger.info(`${name} is running`)
29
+ * main("my-app", getLogger(["my-app"]), (logger) => {
30
+ * logger.info(`Application is running`)
36
31
  * // start servers, connect to databases, etc.
37
32
  * })
38
33
  * ```
@@ -73,5 +68,5 @@ export function main(
73
68
  process.exit(1)
74
69
  })
75
70
 
76
- __f?.(name, logger, ...parts)
71
+ __f?.(logger, ...parts)
77
72
  }