@socprime/logtotal-sanitizer 0.2.0-beta.2 → 0.2.1-beta.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/CHANGELOG.md +39 -0
- package/README.md +3 -1
- package/{chunk-M4CEAFAP.js → chunk-5UDGYWP3.js} +288 -73
- package/chunk-5UDGYWP3.js.map +1 -0
- package/{chunk-EUNFMCKE.cjs → chunk-VELXTD3L.cjs} +432 -18
- package/chunk-VELXTD3L.cjs.map +1 -0
- package/{chunk-VMPXBCSL.js → chunk-X2QYRBY6.js} +432 -18
- package/chunk-X2QYRBY6.js.map +1 -0
- package/{chunk-XPVOBYVK.cjs → chunk-ZCWN2P2R.cjs} +312 -97
- package/chunk-ZCWN2P2R.cjs.map +1 -0
- package/cli.js +715 -86
- package/cli.js.map +1 -1
- package/{index-BYhIh1ru.d.cts → index-BYEGdnwh.d.cts} +8 -4
- package/{index-BYhIh1ru.d.ts → index-BYEGdnwh.d.ts} +8 -4
- package/index.cjs +25 -25
- package/index.d.cts +2 -2
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/node.cjs +27 -27
- package/node.d.cts +2 -2
- package/node.d.ts +2 -2
- package/node.js +3 -3
- package/package.json +1 -1
- package/rules.cjs +5 -5
- package/rules.d.cts +1 -1
- package/rules.d.ts +1 -1
- package/rules.js +1 -1
- package/chunk-EUNFMCKE.cjs.map +0 -1
- package/chunk-M4CEAFAP.js.map +0 -1
- package/chunk-VMPXBCSL.js.map +0 -1
- package/chunk-XPVOBYVK.cjs.map +0 -1
|
@@ -65,9 +65,12 @@ interface SanitizeRule {
|
|
|
65
65
|
*/
|
|
66
66
|
validate?: (match: string) => boolean;
|
|
67
67
|
/**
|
|
68
|
-
* JSON field names whose value is redacted by name alone, regardless of its
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
* JSON field names whose string or numeric value is redacted by name alone, regardless of its
|
|
69
|
+
* shape, and without {@link SanitizeRule.validate}. Applies to JSON lines and to `"key": value`
|
|
70
|
+
* pairs inside other lines (pretty-printed records, embedded or escaped JSON, Python dict
|
|
71
|
+
* reprs). Matching ignores case, hyphens, underscores, dots and spaces, so `x-api-key`,
|
|
72
|
+
* `x_api_key` and `xApiKey` are the same key. A nested field is first tried together with its
|
|
73
|
+
* parent's name: `{"user": {"name": …}}` and `"user.name"` both match `userName`.
|
|
71
74
|
*/
|
|
72
75
|
jsonKeys?: string[];
|
|
73
76
|
/**
|
|
@@ -278,7 +281,8 @@ interface SanitizerOptions {
|
|
|
278
281
|
* How to treat lines that parse as a JSON object or array.
|
|
279
282
|
*
|
|
280
283
|
* - `'auto'` redacts values of fields named in a rule's `jsonKeys` and re-serializes the
|
|
281
|
-
* record
|
|
284
|
+
* record. A line that is not valid JSON is scanned as plain text, with `"key": value` pairs
|
|
285
|
+
* in it still redacted by name.
|
|
282
286
|
* - `false` always scans as plain text.
|
|
283
287
|
* @default 'auto'
|
|
284
288
|
*/
|
|
@@ -65,9 +65,12 @@ interface SanitizeRule {
|
|
|
65
65
|
*/
|
|
66
66
|
validate?: (match: string) => boolean;
|
|
67
67
|
/**
|
|
68
|
-
* JSON field names whose value is redacted by name alone, regardless of its
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
* JSON field names whose string or numeric value is redacted by name alone, regardless of its
|
|
69
|
+
* shape, and without {@link SanitizeRule.validate}. Applies to JSON lines and to `"key": value`
|
|
70
|
+
* pairs inside other lines (pretty-printed records, embedded or escaped JSON, Python dict
|
|
71
|
+
* reprs). Matching ignores case, hyphens, underscores, dots and spaces, so `x-api-key`,
|
|
72
|
+
* `x_api_key` and `xApiKey` are the same key. A nested field is first tried together with its
|
|
73
|
+
* parent's name: `{"user": {"name": …}}` and `"user.name"` both match `userName`.
|
|
71
74
|
*/
|
|
72
75
|
jsonKeys?: string[];
|
|
73
76
|
/**
|
|
@@ -278,7 +281,8 @@ interface SanitizerOptions {
|
|
|
278
281
|
* How to treat lines that parse as a JSON object or array.
|
|
279
282
|
*
|
|
280
283
|
* - `'auto'` redacts values of fields named in a rule's `jsonKeys` and re-serializes the
|
|
281
|
-
* record
|
|
284
|
+
* record. A line that is not valid JSON is scanned as plain text, with `"key": value` pairs
|
|
285
|
+
* in it still redacted by name.
|
|
282
286
|
* - `false` always scans as plain text.
|
|
283
287
|
* @default 'auto'
|
|
284
288
|
*/
|
package/index.cjs
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZCWN2P2R_cjs = require('./chunk-ZCWN2P2R.cjs');
|
|
4
|
+
var chunkVELXTD3L_cjs = require('./chunk-VELXTD3L.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "createSanitizer", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkZCWN2P2R_cjs.createSanitizer; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "fromBlob", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkZCWN2P2R_cjs.fromBlob; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "fromString", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkZCWN2P2R_cjs.fromString; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "fromWebStream", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkZCWN2P2R_cjs.fromWebStream; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "generateKey", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkZCWN2P2R_cjs.generateKey; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "mergeReports", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkZCWN2P2R_cjs.mergeReports; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "planLineAlignedRanges", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkZCWN2P2R_cjs.planLineAlignedRanges; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "sanitizeStream", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkZCWN2P2R_cjs.sanitizeStream; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "sanitizeText", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkZCWN2P2R_cjs.sanitizeText; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "toCallbackSink", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkZCWN2P2R_cjs.toCallbackSink; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "toNullSink", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkZCWN2P2R_cjs.toNullSink; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "toStringSink", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkZCWN2P2R_cjs.toStringSink; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "InvalidKeyError", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidKeyError; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "InvalidOptionError", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidOptionError; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "InvalidRuleError", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidRuleError; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "SanitizationAbortedError", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkVELXTD3L_cjs.SanitizationAbortedError; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "SanitizerError", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkVELXTD3L_cjs.SanitizerError; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "UnknownRuleError", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkVELXTD3L_cjs.UnknownRuleError; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "builtinRuleIds", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRuleIds; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "builtinRules", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRules; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "defineRule", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkVELXTD3L_cjs.defineRule; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "getBuiltinRule", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkVELXTD3L_cjs.getBuiltinRule; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "isSanitizerError", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkVELXTD3L_cjs.isSanitizerError; }
|
|
99
99
|
});
|
|
100
100
|
//# sourceMappingURL=index.cjs.map
|
|
101
101
|
//# sourceMappingURL=index.cjs.map
|
package/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SanitizerOptions, r as Sanitizer, T as TextSource, c as TextSink, p as SanitizeStreamOptions, b as SanitizeReport, q as SanitizeTextResult, B as BlobLike, R as ReadableStreamLike } from './index-
|
|
2
|
-
export { A as AbortSignalLike, d as AlwaysRedactOptions, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, a as SanitizeProgress, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
1
|
+
import { S as SanitizerOptions, r as Sanitizer, T as TextSource, c as TextSink, p as SanitizeStreamOptions, b as SanitizeReport, q as SanitizeTextResult, B as BlobLike, R as ReadableStreamLike } from './index-BYEGdnwh.cjs';
|
|
2
|
+
export { A as AbortSignalLike, d as AlwaysRedactOptions, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, a as SanitizeProgress, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Machine-readable cause of a {@link SanitizerError}.
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SanitizerOptions, r as Sanitizer, T as TextSource, c as TextSink, p as SanitizeStreamOptions, b as SanitizeReport, q as SanitizeTextResult, B as BlobLike, R as ReadableStreamLike } from './index-
|
|
2
|
-
export { A as AbortSignalLike, d as AlwaysRedactOptions, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, a as SanitizeProgress, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
1
|
+
import { S as SanitizerOptions, r as Sanitizer, T as TextSource, c as TextSink, p as SanitizeStreamOptions, b as SanitizeReport, q as SanitizeTextResult, B as BlobLike, R as ReadableStreamLike } from './index-BYEGdnwh.js';
|
|
2
|
+
export { A as AbortSignalLike, d as AlwaysRedactOptions, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, a as SanitizeProgress, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Machine-readable cause of a {@link SanitizerError}.
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createSanitizer, fromBlob, fromString, fromWebStream, generateKey, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './chunk-
|
|
2
|
-
export { InvalidKeyError, InvalidOptionError, InvalidRuleError, SanitizationAbortedError, SanitizerError, UnknownRuleError, builtinRuleIds, builtinRules, defineRule, getBuiltinRule, isSanitizerError } from './chunk-
|
|
1
|
+
export { createSanitizer, fromBlob, fromString, fromWebStream, generateKey, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './chunk-5UDGYWP3.js';
|
|
2
|
+
export { InvalidKeyError, InvalidOptionError, InvalidRuleError, SanitizationAbortedError, SanitizerError, UnknownRuleError, builtinRuleIds, builtinRules, defineRule, getBuiltinRule, isSanitizerError } from './chunk-X2QYRBY6.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/node.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkZCWN2P2R_cjs = require('./chunk-ZCWN2P2R.cjs');
|
|
4
|
+
var chunkVELXTD3L_cjs = require('./chunk-VELXTD3L.cjs');
|
|
5
5
|
var fs = require('fs');
|
|
6
6
|
var events = require('events');
|
|
7
7
|
var promises = require('stream/promises');
|
|
@@ -49,102 +49,102 @@ function toFile(path) {
|
|
|
49
49
|
}
|
|
50
50
|
async function sanitizeFile(options) {
|
|
51
51
|
const { input, output, chunkBytes, onProgress, signal, ...sanitizerOptions } = options;
|
|
52
|
-
const sanitizer =
|
|
53
|
-
const sink = output === void 0 ?
|
|
52
|
+
const sanitizer = chunkZCWN2P2R_cjs.createSanitizer(sanitizerOptions);
|
|
53
|
+
const sink = output === void 0 ? chunkZCWN2P2R_cjs.toNullSink() : toFile(output);
|
|
54
54
|
return sanitizer.sanitizeStream(fromFile(input, chunkBytes), sink, { onProgress, signal });
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
Object.defineProperty(exports, "createSanitizer", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkZCWN2P2R_cjs.createSanitizer; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "fromBlob", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkZCWN2P2R_cjs.fromBlob; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "fromString", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkZCWN2P2R_cjs.fromString; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "fromWebStream", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkZCWN2P2R_cjs.fromWebStream; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "generateKey", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkZCWN2P2R_cjs.generateKey; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "mergeReports", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkZCWN2P2R_cjs.mergeReports; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "planLineAlignedRanges", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkZCWN2P2R_cjs.planLineAlignedRanges; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "sanitizeStream", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkZCWN2P2R_cjs.sanitizeStream; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "sanitizeText", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkZCWN2P2R_cjs.sanitizeText; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "toCallbackSink", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkZCWN2P2R_cjs.toCallbackSink; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "toNullSink", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkZCWN2P2R_cjs.toNullSink; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "toStringSink", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkZCWN2P2R_cjs.toStringSink; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "InvalidKeyError", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidKeyError; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "InvalidOptionError", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidOptionError; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "InvalidRuleError", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkVELXTD3L_cjs.InvalidRuleError; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "SanitizationAbortedError", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkVELXTD3L_cjs.SanitizationAbortedError; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "SanitizerError", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkVELXTD3L_cjs.SanitizerError; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "UnknownRuleError", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkVELXTD3L_cjs.UnknownRuleError; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "builtinRuleIds", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRuleIds; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "builtinRules", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRules; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "defineRule", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkVELXTD3L_cjs.defineRule; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "getBuiltinRule", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkVELXTD3L_cjs.getBuiltinRule; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "isSanitizerError", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkVELXTD3L_cjs.isSanitizerError; }
|
|
148
148
|
});
|
|
149
149
|
exports.fromFile = fromFile;
|
|
150
150
|
exports.fromNodeStream = fromNodeStream;
|
package/node.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Readable, Writable } from 'node:stream';
|
|
2
|
-
import { S as SanitizerOptions, a as SanitizeProgress, A as AbortSignalLike, T as TextSource, b as SanitizeReport, c as TextSink } from './index-
|
|
3
|
-
export { d as AlwaysRedactOptions, B as BlobLike, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, R as ReadableStreamLike, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, p as SanitizeStreamOptions, q as SanitizeTextResult, r as Sanitizer, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
2
|
+
import { S as SanitizerOptions, a as SanitizeProgress, A as AbortSignalLike, T as TextSource, b as SanitizeReport, c as TextSink } from './index-BYEGdnwh.cjs';
|
|
3
|
+
export { d as AlwaysRedactOptions, B as BlobLike, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, R as ReadableStreamLike, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, p as SanitizeStreamOptions, q as SanitizeTextResult, r as Sanitizer, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.cjs';
|
|
4
4
|
export { ByteRange, InvalidKeyError, InvalidOptionError, InvalidRuleError, MergeReportsOptions, PlanLineRangesOptions, SanitizationAbortedError, SanitizerError, SanitizerErrorCode, StringSink, UnknownRuleError, createSanitizer, fromBlob, fromString, fromWebStream, generateKey, isSanitizerError, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './index.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
package/node.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Readable, Writable } from 'node:stream';
|
|
2
|
-
import { S as SanitizerOptions, a as SanitizeProgress, A as AbortSignalLike, T as TextSource, b as SanitizeReport, c as TextSink } from './index-
|
|
3
|
-
export { d as AlwaysRedactOptions, B as BlobLike, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, R as ReadableStreamLike, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, p as SanitizeStreamOptions, q as SanitizeTextResult, r as Sanitizer, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
2
|
+
import { S as SanitizerOptions, a as SanitizeProgress, A as AbortSignalLike, T as TextSource, b as SanitizeReport, c as TextSink } from './index-BYEGdnwh.js';
|
|
3
|
+
export { d as AlwaysRedactOptions, B as BlobLike, e as BuiltinRuleId, K as KeyEncoding, L as LineOptions, N as NeverRedactOptions, f as NeverRedactRuleEntry, R as ReadableStreamLike, g as RedactionMode, h as ReportOptions, i as RuleCounts, j as RuleId, k as RuleInfo, l as RuleSelector, m as SanitizeReplacement, n as SanitizeRule, o as SanitizeSegment, p as SanitizeStreamOptions, q as SanitizeTextResult, r as Sanitizer, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.js';
|
|
4
4
|
export { ByteRange, InvalidKeyError, InvalidOptionError, InvalidRuleError, MergeReportsOptions, PlanLineRangesOptions, SanitizationAbortedError, SanitizerError, SanitizerErrorCode, StringSink, UnknownRuleError, createSanitizer, fromBlob, fromString, fromWebStream, generateKey, isSanitizerError, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createSanitizer, toNullSink } from './chunk-
|
|
2
|
-
export { createSanitizer, fromBlob, fromString, fromWebStream, generateKey, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './chunk-
|
|
3
|
-
export { InvalidKeyError, InvalidOptionError, InvalidRuleError, SanitizationAbortedError, SanitizerError, UnknownRuleError, builtinRuleIds, builtinRules, defineRule, getBuiltinRule, isSanitizerError } from './chunk-
|
|
1
|
+
import { createSanitizer, toNullSink } from './chunk-5UDGYWP3.js';
|
|
2
|
+
export { createSanitizer, fromBlob, fromString, fromWebStream, generateKey, mergeReports, planLineAlignedRanges, sanitizeStream, sanitizeText, toCallbackSink, toNullSink, toStringSink } from './chunk-5UDGYWP3.js';
|
|
3
|
+
export { InvalidKeyError, InvalidOptionError, InvalidRuleError, SanitizationAbortedError, SanitizerError, UnknownRuleError, builtinRuleIds, builtinRules, defineRule, getBuiltinRule, isSanitizerError } from './chunk-X2QYRBY6.js';
|
|
4
4
|
import { createReadStream, createWriteStream } from 'fs';
|
|
5
5
|
import { once } from 'events';
|
|
6
6
|
import { finished } from 'stream/promises';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socprime/logtotal-sanitizer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1-beta.0",
|
|
4
4
|
"description": "Framework-agnostic log sanitizer that detects and pseudonymizes secrets, PII and infrastructure identifiers in log data, in the browser and in Node.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanitizer",
|
package/rules.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVELXTD3L_cjs = require('./chunk-VELXTD3L.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "builtinRuleIds", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRuleIds; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "builtinRules", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkVELXTD3L_cjs.builtinRules; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "defineRule", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkVELXTD3L_cjs.defineRule; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getBuiltinRule", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkVELXTD3L_cjs.getBuiltinRule; }
|
|
22
22
|
});
|
|
23
23
|
//# sourceMappingURL=rules.cjs.map
|
|
24
24
|
//# sourceMappingURL=rules.cjs.map
|
package/rules.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { e as BuiltinRuleId, g as RedactionMode, j as RuleId, k as RuleInfo, n as SanitizeRule, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
1
|
+
export { e as BuiltinRuleId, g as RedactionMode, j as RuleId, k as RuleInfo, n as SanitizeRule, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.cjs';
|
package/rules.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { e as BuiltinRuleId, g as RedactionMode, j as RuleId, k as RuleInfo, n as SanitizeRule, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-
|
|
1
|
+
export { e as BuiltinRuleId, g as RedactionMode, j as RuleId, k as RuleInfo, n as SanitizeRule, s as builtinRuleIds, t as builtinRules, u as defineRule, v as getBuiltinRule } from './index-BYEGdnwh.js';
|
package/rules.js
CHANGED