@thi.ng/rstream-log 5.1.17 → 5.1.19
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/CHANGELOG.md +1 -1
- package/README.md +2 -2
- package/format.d.ts +7 -5
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 193 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -78,7 +78,7 @@ For Node.js REPL:
|
|
|
78
78
|
const rslog = await import("@thi.ng/rstream-log");
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Package sizes (brotli'd, pre-treeshake): ESM:
|
|
81
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 766 bytes
|
|
82
82
|
|
|
83
83
|
## Dependencies
|
|
84
84
|
|
package/format.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const isoDate: (dt: number) => string;
|
|
|
16
16
|
* @param bodyFmt
|
|
17
17
|
* @param wrap
|
|
18
18
|
*/
|
|
19
|
-
export declare const formatString: (dateFmt?: DateFormat, bodyFmt?: BodyFormat, wrap?: (
|
|
19
|
+
export declare const formatString: (dateFmt?: DateFormat, bodyFmt?: BodyFormat, wrap?: (msg: string, entry: LogEntry) => string) => Transducer<LogEntry, string>;
|
|
20
20
|
/**
|
|
21
21
|
* Takes an array of regex patterns and optional `mask` string. Returns
|
|
22
22
|
* transducer which replaces all found pattern occurrences with `mask`.
|
|
@@ -25,12 +25,14 @@ export declare const formatString: (dateFmt?: DateFormat, bodyFmt?: BodyFormat,
|
|
|
25
25
|
*
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* import {
|
|
28
|
+
* ```ts tangle:../export/mask-secrets.ts
|
|
29
|
+
* import {
|
|
30
|
+
* Logger, formatString, maskSecrets, writeConsole
|
|
31
|
+
* } from "@thi.ng/rstream-log";
|
|
30
32
|
*
|
|
31
33
|
* const logger = new Logger();
|
|
32
34
|
*
|
|
33
|
-
* logger.transform(
|
|
35
|
+
* logger.stream.transform(
|
|
34
36
|
* formatString(),
|
|
35
37
|
* maskSecrets([/(?<=[A-Z0-9_]\=)\w+/g])
|
|
36
38
|
* ).subscribe(
|
|
@@ -38,7 +40,7 @@ export declare const formatString: (dateFmt?: DateFormat, bodyFmt?: BodyFormat,
|
|
|
38
40
|
* );
|
|
39
41
|
*
|
|
40
42
|
* logger.info("logged in USER=toxi, using TOKEN=123456");
|
|
41
|
-
* // [INFO] logger-0: logged in USER=****, using TOKEN=****
|
|
43
|
+
* // [INFO] logger-0: 2024-06-21T12:22:58.004Z logged in USER=****, using TOKEN=****
|
|
42
44
|
* ```
|
|
43
45
|
*
|
|
44
46
|
* @param patterns -
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream-log",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.19",
|
|
4
4
|
"description": "Structured, multilevel & hierarchical loggers based on @thi.ng/rstream",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://
|
|
13
|
+
"homepage": "https://thi.ng/rstream-log",
|
|
14
14
|
"funding": [
|
|
15
15
|
{
|
|
16
16
|
"type": "github",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/checks": "^3.6.
|
|
41
|
-
"@thi.ng/logger": "^3.0.
|
|
42
|
-
"@thi.ng/rstream": "^8.
|
|
43
|
-
"@thi.ng/strings": "^3.7.
|
|
44
|
-
"@thi.ng/transducers": "^9.0.
|
|
39
|
+
"@thi.ng/api": "^8.11.3",
|
|
40
|
+
"@thi.ng/checks": "^3.6.5",
|
|
41
|
+
"@thi.ng/logger": "^3.0.13",
|
|
42
|
+
"@thi.ng/rstream": "^8.5.1",
|
|
43
|
+
"@thi.ng/strings": "^3.7.34",
|
|
44
|
+
"@thi.ng/transducers": "^9.0.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@microsoft/api-extractor": "^7.
|
|
48
|
-
"esbuild": "^0.
|
|
49
|
-
"typedoc": "^0.25.
|
|
50
|
-
"typescript": "^5.
|
|
47
|
+
"@microsoft/api-extractor": "^7.47.0",
|
|
48
|
+
"esbuild": "^0.21.5",
|
|
49
|
+
"typedoc": "^0.25.13",
|
|
50
|
+
"typescript": "^5.5.2"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"datastructure",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
],
|
|
99
99
|
"year": 2017
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "154c95cf9d6bab32174498ec3b5b5d87e42be7f9\n"
|
|
102
102
|
}
|