@bazariodev/docket 0.0.0-stage → 0.0.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 +1 -0
- package/LICENSE +21 -0
- package/README.md +443 -2
- package/dist/browser/constants.d.cts +14 -0
- package/dist/browser/constants.d.ts +14 -0
- package/dist/browser/index.cjs +192 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +29 -0
- package/dist/browser/index.d.ts +29 -0
- package/dist/browser/index.js +187 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/chunk-7ld72rnl.js +376 -0
- package/dist/chunk-7ld72rnl.js.map +1 -0
- package/dist/chunk-B-SP8Od_.js +437 -0
- package/dist/chunk-B-SP8Od_.js.map +1 -0
- package/dist/chunk-BLf-eCDO.cjs +53 -0
- package/dist/chunk-BLf-eCDO.cjs.map +1 -0
- package/dist/chunk-Bvq4tF_F.cjs +440 -0
- package/dist/chunk-Bvq4tF_F.cjs.map +1 -0
- package/dist/chunk-CEhpwtwJ.cjs +379 -0
- package/dist/chunk-CEhpwtwJ.cjs.map +1 -0
- package/dist/chunk-CSS3f4_M.js +46 -0
- package/dist/chunk-CSS3f4_M.js.map +1 -0
- package/dist/chunk-CXZYNALm.cjs +124 -0
- package/dist/chunk-CXZYNALm.cjs.map +1 -0
- package/dist/chunk-DYcNnkOV.js +50 -0
- package/dist/chunk-DYcNnkOV.js.map +1 -0
- package/dist/chunk-DqK_3eFr.cjs +53 -0
- package/dist/chunk-DqK_3eFr.cjs.map +1 -0
- package/dist/chunk-LRCHwVuE.js +110 -0
- package/dist/chunk-LRCHwVuE.js.map +1 -0
- package/dist/constants.d.cts +6 -0
- package/dist/constants.d.ts +6 -0
- package/dist/core/constants.d.cts +43 -0
- package/dist/core/constants.d.ts +43 -0
- package/dist/core/errors.d.cts +8 -0
- package/dist/core/errors.d.ts +8 -0
- package/dist/devtools/index.cjs +37 -0
- package/dist/devtools/index.cjs.map +1 -0
- package/dist/devtools/index.d.cts +11 -0
- package/dist/devtools/index.d.ts +11 -0
- package/dist/devtools/index.js +35 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/export/index.cjs +111 -0
- package/dist/export/index.cjs.map +1 -0
- package/dist/export/index.d.cts +49 -0
- package/dist/export/index.d.ts +49 -0
- package/dist/export/index.js +109 -0
- package/dist/export/index.js.map +1 -0
- package/dist/history/constants.d.cts +35 -0
- package/dist/history/constants.d.ts +35 -0
- package/dist/history/index.cjs +1196 -0
- package/dist/history/index.cjs.map +1 -0
- package/dist/history/index.d.cts +113 -0
- package/dist/history/index.d.ts +113 -0
- package/dist/history/index.js +1194 -0
- package/dist/history/index.js.map +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +158 -0
- package/dist/index.d.ts +158 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/indexeddb/index.cjs +15 -0
- package/dist/indexeddb/index.cjs.map +1 -0
- package/dist/indexeddb/index.d.cts +46 -0
- package/dist/indexeddb/index.d.ts +46 -0
- package/dist/indexeddb/index.js +13 -0
- package/dist/indexeddb/index.js.map +1 -0
- package/dist/redaction/index.cjs +154 -0
- package/dist/redaction/index.cjs.map +1 -0
- package/dist/redaction/index.d.cts +70 -0
- package/dist/redaction/index.d.ts +70 -0
- package/dist/redaction/index.js +152 -0
- package/dist/redaction/index.js.map +1 -0
- package/dist/sip/constants.d.cts +5 -0
- package/dist/sip/constants.d.ts +5 -0
- package/dist/sip/index.cjs +336 -0
- package/dist/sip/index.cjs.map +1 -0
- package/dist/sip/index.d.cts +34 -0
- package/dist/sip/index.d.ts +34 -0
- package/dist/sip/index.js +333 -0
- package/dist/sip/index.js.map +1 -0
- package/dist/storage/constants.d.cts +11 -0
- package/dist/storage/constants.d.ts +11 -0
- package/dist/storage/contracts.d.cts +35 -0
- package/dist/storage/contracts.d.ts +35 -0
- package/package.json +127 -3
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { a as assertLevel, l as levelRank } from './chunk-LRCHwVuE.js';
|
|
2
|
+
|
|
3
|
+
function escapeText(value) {
|
|
4
|
+
return String(value).replace(
|
|
5
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.
|
|
6
|
+
/[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/g,
|
|
7
|
+
(character) =>
|
|
8
|
+
`\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function quote(value) {
|
|
13
|
+
const text = escapeText(value);
|
|
14
|
+
return /[\s="\\]/.test(text) ? JSON.stringify(text) : text;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function formatRecord(record) {
|
|
18
|
+
const { at, level, area, scope, message, runId, context, fields, error } =
|
|
19
|
+
record;
|
|
20
|
+
let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;
|
|
21
|
+
for (const values of [context, fields])
|
|
22
|
+
for (const [key, value] of Object.entries(values ?? {}))
|
|
23
|
+
header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;
|
|
24
|
+
if (error)
|
|
25
|
+
header += `\n ${escapeText(error.name)}: ${escapeText(error.message)}${
|
|
26
|
+
error.stack
|
|
27
|
+
? `\n${error.stack
|
|
28
|
+
.split(/\r?\n/)
|
|
29
|
+
.map((line) => ` ${escapeText(line)}`)
|
|
30
|
+
.join('\n')}`
|
|
31
|
+
: ''
|
|
32
|
+
}${error.cause ? `\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;
|
|
33
|
+
return header;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function createConsoleSink({
|
|
37
|
+
level = 'debug',
|
|
38
|
+
console: output = globalThis.console,
|
|
39
|
+
} = {}) {
|
|
40
|
+
assertLevel(level);
|
|
41
|
+
return Object.freeze({
|
|
42
|
+
write(record) {
|
|
43
|
+
if (levelRank(record.level) >= levelRank(level))
|
|
44
|
+
output[record.level](formatRecord(record));
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { createConsoleSink as c, formatRecord as f };
|
|
50
|
+
//# sourceMappingURL=chunk-DYcNnkOV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-DYcNnkOV.js","sources":["../src/core/format.js"],"sourcesContent":["import { assertLevel, levelRank } from './common.js';\n\nfunction escapeText(value) {\n return String(value).replace(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.\n /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]/g,\n (character) =>\n `\\\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,\n );\n}\n\nfunction quote(value) {\n const text = escapeText(value);\n return /[\\s=\"\\\\]/.test(text) ? JSON.stringify(text) : text;\n}\n\nexport function formatRecord(record) {\n const { at, level, area, scope, message, runId, context, fields, error } =\n record;\n let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;\n for (const values of [context, fields])\n for (const [key, value] of Object.entries(values ?? {}))\n header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;\n if (error)\n header += `\\n ${escapeText(error.name)}: ${escapeText(error.message)}${\n error.stack\n ? `\\n${error.stack\n .split(/\\r?\\n/)\n .map((line) => ` ${escapeText(line)}`)\n .join('\\n')}`\n : ''\n }${error.cause ? `\\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;\n return header;\n}\n\nexport function createConsoleSink({\n level = 'debug',\n console: output = globalThis.console,\n} = {}) {\n assertLevel(level);\n return Object.freeze({\n write(record) {\n if (levelRank(record.level) >= levelRank(level))\n output[record.level](formatRecord(record));\n },\n });\n}\n"],"names":[],"mappings":";;AAEA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;AAC9B;AACA,IAAI,qEAAqE;AACzE,IAAI,CAAC,SAAS;AACd,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACnE,GAAG;AACH;;AAEA,SAAS,KAAK,CAAC,KAAK,EAAE;AACtB,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI;AAC5D;;AAEO,SAAS,YAAY,CAAC,MAAM,EAAE;AACrC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAC1E,IAAI,MAAM;AACV,EAAE,IAAI,MAAM,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/J,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AE,OAAO,MAAM;AACf;;AAEO,SAAS,iBAAiB,CAAC;AAClC,EAAE,KAAK,GAAG,OAAO;AACjB,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO;AACtC,CAAC,GAAG,EAAE,EAAE;AACR,EAAE,WAAW,CAAC,KAAK,CAAC;AACpB,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,KAAK,CAAC;AACrD,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAClD,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var common = require('./chunk-CXZYNALm.cjs');
|
|
4
|
+
|
|
5
|
+
function escapeText(value) {
|
|
6
|
+
return String(value).replace(
|
|
7
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.
|
|
8
|
+
/[\u0000-\u001f\u007f-\u009f\u2028\u2029\u202a-\u202e\u2066-\u2069]/g,
|
|
9
|
+
(character) =>
|
|
10
|
+
`\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function quote(value) {
|
|
15
|
+
const text = escapeText(value);
|
|
16
|
+
return /[\s="\\]/.test(text) ? JSON.stringify(text) : text;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function formatRecord(record) {
|
|
20
|
+
const { at, level, area, scope, message, runId, context, fields, error } =
|
|
21
|
+
record;
|
|
22
|
+
let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;
|
|
23
|
+
for (const values of [context, fields])
|
|
24
|
+
for (const [key, value] of Object.entries(values ?? {}))
|
|
25
|
+
header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;
|
|
26
|
+
if (error)
|
|
27
|
+
header += `\n ${escapeText(error.name)}: ${escapeText(error.message)}${
|
|
28
|
+
error.stack
|
|
29
|
+
? `\n${error.stack
|
|
30
|
+
.split(/\r?\n/)
|
|
31
|
+
.map((line) => ` ${escapeText(line)}`)
|
|
32
|
+
.join('\n')}`
|
|
33
|
+
: ''
|
|
34
|
+
}${error.cause ? `\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;
|
|
35
|
+
return header;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function createConsoleSink({
|
|
39
|
+
level = 'debug',
|
|
40
|
+
console: output = globalThis.console,
|
|
41
|
+
} = {}) {
|
|
42
|
+
common.assertLevel(level);
|
|
43
|
+
return Object.freeze({
|
|
44
|
+
write(record) {
|
|
45
|
+
if (common.levelRank(record.level) >= common.levelRank(level))
|
|
46
|
+
output[record.level](formatRecord(record));
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.createConsoleSink = createConsoleSink;
|
|
52
|
+
exports.formatRecord = formatRecord;
|
|
53
|
+
//# sourceMappingURL=chunk-DqK_3eFr.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-DqK_3eFr.cjs","sources":["../src/core/format.js"],"sourcesContent":["import { assertLevel, levelRank } from './common.js';\n\nfunction escapeText(value) {\n return String(value).replace(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.\n /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]/g,\n (character) =>\n `\\\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,\n );\n}\n\nfunction quote(value) {\n const text = escapeText(value);\n return /[\\s=\"\\\\]/.test(text) ? JSON.stringify(text) : text;\n}\n\nexport function formatRecord(record) {\n const { at, level, area, scope, message, runId, context, fields, error } =\n record;\n let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;\n for (const values of [context, fields])\n for (const [key, value] of Object.entries(values ?? {}))\n header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;\n if (error)\n header += `\\n ${escapeText(error.name)}: ${escapeText(error.message)}${\n error.stack\n ? `\\n${error.stack\n .split(/\\r?\\n/)\n .map((line) => ` ${escapeText(line)}`)\n .join('\\n')}`\n : ''\n }${error.cause ? `\\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;\n return header;\n}\n\nexport function createConsoleSink({\n level = 'debug',\n console: output = globalThis.console,\n} = {}) {\n assertLevel(level);\n return Object.freeze({\n write(record) {\n if (levelRank(record.level) >= levelRank(level))\n output[record.level](formatRecord(record));\n },\n });\n}\n"],"names":["assertLevel","levelRank"],"mappings":";;;;AAEA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;AAC9B;AACA,IAAI,qEAAqE;AACzE,IAAI,CAAC,SAAS;AACd,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACnE,GAAG;AACH;;AAEA,SAAS,KAAK,CAAC,KAAK,EAAE;AACtB,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,UAAU,CAAC,IAAI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
5
|
+
const scheduler = Object.freeze({
|
|
6
|
+
setTimeout: (callback, delay) => globalThis.setTimeout(callback, delay),
|
|
7
|
+
clearTimeout: (handle) => globalThis.clearTimeout(handle),
|
|
8
|
+
});
|
|
9
|
+
const levelRank = (level) => levelOrder.indexOf(level);
|
|
10
|
+
|
|
11
|
+
function assertLevel(level) {
|
|
12
|
+
if (levelRank(level) < 0) throw new TypeError('Invalid log level');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function assertStormLimit(value) {
|
|
16
|
+
if (
|
|
17
|
+
value !== undefined &&
|
|
18
|
+
value !== false &&
|
|
19
|
+
(!Number.isSafeInteger(value) || value < 1)
|
|
20
|
+
)
|
|
21
|
+
throw new TypeError('Invalid storm limit');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function positive(value, name) {
|
|
25
|
+
if (!Number.isSafeInteger(value) || value < 1)
|
|
26
|
+
throw new TypeError(`${name} must be a positive safe integer`);
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function resolveLimits(limits = {}) {
|
|
31
|
+
const result = {};
|
|
32
|
+
for (const [key, fallback] of Object.entries(LIMITS))
|
|
33
|
+
result[key] = positive(limits[key] ?? fallback, key);
|
|
34
|
+
return Object.freeze(result);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function report(callback, ...args) {
|
|
38
|
+
try {
|
|
39
|
+
const result = callback?.(...args);
|
|
40
|
+
if (result) Promise.resolve(result).catch(() => {});
|
|
41
|
+
} catch {
|
|
42
|
+
/* The reporter cannot interrupt cleanup. */
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function define(target, key, value) {
|
|
47
|
+
Object.defineProperty(target, key, {
|
|
48
|
+
value,
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function own(value, key) {
|
|
56
|
+
return Object.getOwnPropertyDescriptor(value, key)?.value;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function isError(value) {
|
|
60
|
+
try {
|
|
61
|
+
return Error.isError?.(value) || value instanceof Error;
|
|
62
|
+
} catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function randomHex(length) {
|
|
68
|
+
if (!globalThis.crypto?.getRandomValues)
|
|
69
|
+
throw new Error('Cryptographic randomness is unavailable');
|
|
70
|
+
return Array.from(
|
|
71
|
+
globalThis.crypto.getRandomValues(new Uint8Array(length)),
|
|
72
|
+
(byte) => byte.toString(16).padStart(2, '0'),
|
|
73
|
+
).join('');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function copyBindings(value = {}) {
|
|
77
|
+
const result = {};
|
|
78
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
79
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
80
|
+
if (
|
|
81
|
+
typeof key === 'string' &&
|
|
82
|
+
descriptor?.enumerable &&
|
|
83
|
+
Object.hasOwn(descriptor, 'value')
|
|
84
|
+
)
|
|
85
|
+
Object.defineProperty(result, key, descriptor);
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function validateQuery(query = {}) {
|
|
91
|
+
const { from, to, areas } = query;
|
|
92
|
+
if (
|
|
93
|
+
(from !== undefined && !Number.isFinite(from)) ||
|
|
94
|
+
(to !== undefined && !Number.isFinite(to)) ||
|
|
95
|
+
(from ?? -Infinity) > (to ?? Infinity)
|
|
96
|
+
)
|
|
97
|
+
throw new TypeError('Invalid record time range');
|
|
98
|
+
if (
|
|
99
|
+
areas !== undefined &&
|
|
100
|
+
(!Array.isArray(areas) || areas.some((area) => typeof area !== 'string'))
|
|
101
|
+
)
|
|
102
|
+
throw new TypeError('Invalid record areas');
|
|
103
|
+
return (record) =>
|
|
104
|
+
(!areas || areas.includes(record.area)) &&
|
|
105
|
+
record.at >= (from ?? -Infinity) &&
|
|
106
|
+
record.at <= (to ?? Infinity);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { assertLevel as a, report as b, assertStormLimit as c, define as d, randomHex as e, copyBindings as f, isError as i, levelRank as l, own as o, positive as p, resolveLimits as r, scheduler as s, validateQuery as v };
|
|
110
|
+
//# sourceMappingURL=chunk-LRCHwVuE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-LRCHwVuE.js","sources":["../src/core/common.js"],"sourcesContent":["import { LEVELS, LIMITS } from './constants.js';\n\nconst levelOrder = Object.values(LEVELS);\n\nexport const scheduler = Object.freeze({\n setTimeout: (callback, delay) => globalThis.setTimeout(callback, delay),\n clearTimeout: (handle) => globalThis.clearTimeout(handle),\n});\nexport const levelRank = (level) => levelOrder.indexOf(level);\n\nexport function assertLevel(level) {\n if (levelRank(level) < 0) throw new TypeError('Invalid log level');\n}\n\nexport function assertStormLimit(value) {\n if (\n value !== undefined &&\n value !== false &&\n (!Number.isSafeInteger(value) || value < 1)\n )\n throw new TypeError('Invalid storm limit');\n}\n\nexport function positive(value, name) {\n if (!Number.isSafeInteger(value) || value < 1)\n throw new TypeError(`${name} must be a positive safe integer`);\n return value;\n}\n\nexport function resolveLimits(limits = {}) {\n const result = {};\n for (const [key, fallback] of Object.entries(LIMITS))\n result[key] = positive(limits[key] ?? fallback, key);\n return Object.freeze(result);\n}\n\nexport function report(callback, ...args) {\n try {\n const result = callback?.(...args);\n if (result) Promise.resolve(result).catch(() => {});\n } catch {\n /* The reporter cannot interrupt cleanup. */\n }\n}\n\nexport function define(target, key, value) {\n Object.defineProperty(target, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n}\n\nexport function own(value, key) {\n return Object.getOwnPropertyDescriptor(value, key)?.value;\n}\n\nexport function isError(value) {\n try {\n return Error.isError?.(value) || value instanceof Error;\n } catch {\n return false;\n }\n}\n\nexport function randomHex(length) {\n if (!globalThis.crypto?.getRandomValues)\n throw new Error('Cryptographic randomness is unavailable');\n return Array.from(\n globalThis.crypto.getRandomValues(new Uint8Array(length)),\n (byte) => byte.toString(16).padStart(2, '0'),\n ).join('');\n}\n\nexport function copyBindings(value = {}) {\n const result = {};\n for (const key of Reflect.ownKeys(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (\n typeof key === 'string' &&\n descriptor?.enumerable &&\n Object.hasOwn(descriptor, 'value')\n )\n Object.defineProperty(result, key, descriptor);\n }\n return result;\n}\n\nexport function validateQuery(query = {}) {\n const { from, to, areas } = query;\n if (\n (from !== undefined && !Number.isFinite(from)) ||\n (to !== undefined && !Number.isFinite(to)) ||\n (from ?? -Infinity) > (to ?? Infinity)\n )\n throw new TypeError('Invalid record time range');\n if (\n areas !== undefined &&\n (!Array.isArray(areas) || areas.some((area) => typeof area !== 'string'))\n )\n throw new TypeError('Invalid record areas');\n return (record) =>\n (!areas || areas.includes(record.area)) &&\n record.at >= (from ?? -Infinity) &&\n record.at <= (to ?? Infinity);\n}\n"],"names":[],"mappings":";;AAEA,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;;AAE5B,MAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;AACvC,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,UAAU,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC;AACzE,EAAE,YAAY,EAAE,CAAC,MAAM,KAAK,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC;AAC3D,CAAC;AACW,MAAC,SAAS,GAAG,CAAC,KAAK,KAAK,UAAU,CAAC,OAAO,CAAC,KAAK;;AAErD,SAAS,WAAW,CAAC,KAAK,EAAE;AACnC,EAAE,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC;AACpE;;AAEO,SAAS,gBAAgB,CAAC,KAAK,EAAE;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./sip/constants.cjs";
|
|
4
|
+
export { LEVELS, LIMITS, LOGGING_ERROR_CODES, LOGGING_ERROR_SOURCES, LOGGING_LIMITS, MARKERS } from "./core/constants.cjs";
|
|
5
|
+
export { HISTORY_ERROR_CODES, HISTORY_ERRORS, HISTORY_LIMITS, HISTORY_MODES, HISTORY_STATES } from "./history/constants.cjs";
|
|
6
|
+
export { OVERFLOW_STRATEGIES, STORE_MODES } from "./storage/constants.cjs";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ENVIRONMENT_FIELDS } from "./browser/constants.js";
|
|
2
|
+
export { LOGGING_ERRORS } from "./core/errors.js";
|
|
3
|
+
export { SIP_ERRORS } from "./sip/constants.js";
|
|
4
|
+
export { LEVELS, LIMITS, LOGGING_ERROR_CODES, LOGGING_ERROR_SOURCES, LOGGING_LIMITS, MARKERS } from "./core/constants.js";
|
|
5
|
+
export { HISTORY_ERROR_CODES, HISTORY_ERRORS, HISTORY_LIMITS, HISTORY_MODES, HISTORY_STATES } from "./history/constants.js";
|
|
6
|
+
export { OVERFLOW_STRATEGIES, STORE_MODES } from "./storage/constants.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const LEVELS: Readonly<{
|
|
2
|
+
DEBUG: "debug";
|
|
3
|
+
INFO: "info";
|
|
4
|
+
WARN: "warn";
|
|
5
|
+
ERROR: "error";
|
|
6
|
+
}>;
|
|
7
|
+
export const LOGGING_LIMITS: Readonly<{
|
|
8
|
+
ROOT_LOGGER_CACHE_PAIRS: 1000;
|
|
9
|
+
STORM_SCOPE_PAIRS: 1000;
|
|
10
|
+
STORM_WINDOW_MS: 1000;
|
|
11
|
+
STORM_SUMMARY_DELAY_MS: 1000;
|
|
12
|
+
DEFAULT_LEVEL_OVERRIDE_MS: 86400000;
|
|
13
|
+
MAX_TIMER_DELAY_MS: 2147483647;
|
|
14
|
+
DEFAULT_STORM_LIMIT: 100;
|
|
15
|
+
}>;
|
|
16
|
+
export const LOGGING_ERROR_CODES: Readonly<{
|
|
17
|
+
RECURSIVE_LOGGING: "recursive-logging";
|
|
18
|
+
ROOT_LOGGER_CACHE_LIMIT: "root-logger-cache-limit";
|
|
19
|
+
STOPPED: "stopped";
|
|
20
|
+
}>;
|
|
21
|
+
export const LOGGING_ERROR_SOURCES: Readonly<{
|
|
22
|
+
DATA: "data";
|
|
23
|
+
REDACTOR: "redactor";
|
|
24
|
+
SINK: "sink";
|
|
25
|
+
STORAGE: "storage";
|
|
26
|
+
SCOPE: "scope";
|
|
27
|
+
REENTRY: "reentry";
|
|
28
|
+
}>;
|
|
29
|
+
export const LIMITS: Readonly<{
|
|
30
|
+
maxDepth: 6;
|
|
31
|
+
maxStringLength: 16384;
|
|
32
|
+
maxArrayLength: 100;
|
|
33
|
+
maxKeys: 100;
|
|
34
|
+
maxNodes: 1000;
|
|
35
|
+
maxRecordSize: 65536;
|
|
36
|
+
}>;
|
|
37
|
+
export const MARKERS: Readonly<{
|
|
38
|
+
LIMIT: "[truncated]";
|
|
39
|
+
CYCLE: "[circular]";
|
|
40
|
+
ACCESSOR: "[accessor]";
|
|
41
|
+
UNSUPPORTED: "[unsupported]";
|
|
42
|
+
MASK: "[redacted]";
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const LEVELS: Readonly<{
|
|
2
|
+
DEBUG: "debug";
|
|
3
|
+
INFO: "info";
|
|
4
|
+
WARN: "warn";
|
|
5
|
+
ERROR: "error";
|
|
6
|
+
}>;
|
|
7
|
+
export const LOGGING_LIMITS: Readonly<{
|
|
8
|
+
ROOT_LOGGER_CACHE_PAIRS: 1000;
|
|
9
|
+
STORM_SCOPE_PAIRS: 1000;
|
|
10
|
+
STORM_WINDOW_MS: 1000;
|
|
11
|
+
STORM_SUMMARY_DELAY_MS: 1000;
|
|
12
|
+
DEFAULT_LEVEL_OVERRIDE_MS: 86400000;
|
|
13
|
+
MAX_TIMER_DELAY_MS: 2147483647;
|
|
14
|
+
DEFAULT_STORM_LIMIT: 100;
|
|
15
|
+
}>;
|
|
16
|
+
export const LOGGING_ERROR_CODES: Readonly<{
|
|
17
|
+
RECURSIVE_LOGGING: "recursive-logging";
|
|
18
|
+
ROOT_LOGGER_CACHE_LIMIT: "root-logger-cache-limit";
|
|
19
|
+
STOPPED: "stopped";
|
|
20
|
+
}>;
|
|
21
|
+
export const LOGGING_ERROR_SOURCES: Readonly<{
|
|
22
|
+
DATA: "data";
|
|
23
|
+
REDACTOR: "redactor";
|
|
24
|
+
SINK: "sink";
|
|
25
|
+
STORAGE: "storage";
|
|
26
|
+
SCOPE: "scope";
|
|
27
|
+
REENTRY: "reentry";
|
|
28
|
+
}>;
|
|
29
|
+
export const LIMITS: Readonly<{
|
|
30
|
+
maxDepth: 6;
|
|
31
|
+
maxStringLength: 16384;
|
|
32
|
+
maxArrayLength: 100;
|
|
33
|
+
maxKeys: 100;
|
|
34
|
+
maxNodes: 1000;
|
|
35
|
+
maxRecordSize: 65536;
|
|
36
|
+
}>;
|
|
37
|
+
export const MARKERS: Readonly<{
|
|
38
|
+
LIMIT: "[truncated]";
|
|
39
|
+
CYCLE: "[circular]";
|
|
40
|
+
ACCESSOR: "[accessor]";
|
|
41
|
+
UNSUPPORTED: "[unsupported]";
|
|
42
|
+
MASK: "[redacted]";
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function loggingError(code: any): Error & {
|
|
2
|
+
code: any;
|
|
3
|
+
};
|
|
4
|
+
export const LOGGING_ERRORS: Readonly<{
|
|
5
|
+
"recursive-logging": "Recursive logging is rejected";
|
|
6
|
+
"root-logger-cache-limit": "Root logger cache exceeds 1000 pairs";
|
|
7
|
+
stopped: "Logging is stopped";
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function loggingError(code: any): Error & {
|
|
2
|
+
code: any;
|
|
3
|
+
};
|
|
4
|
+
export const LOGGING_ERRORS: Readonly<{
|
|
5
|
+
"recursive-logging": "Recursive logging is rejected";
|
|
6
|
+
"root-logger-cache-limit": "Root logger cache exceeds 1000 pairs";
|
|
7
|
+
stopped: "Logging is stopped";
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function installConsoleApi({
|
|
4
|
+
logging,
|
|
5
|
+
clear,
|
|
6
|
+
exportBundle,
|
|
7
|
+
name = '__LOGGING__',
|
|
8
|
+
target = globalThis,
|
|
9
|
+
}) {
|
|
10
|
+
if (typeof name !== 'string' || !name || name in target)
|
|
11
|
+
throw new TypeError('Console API name is unavailable');
|
|
12
|
+
const api = Object.freeze({
|
|
13
|
+
levels: () => logging.getLevels(),
|
|
14
|
+
setLevel: (...args) => logging.setLevel(...args),
|
|
15
|
+
resetLevel: (area) => logging.resetLevel(area),
|
|
16
|
+
export: async () =>
|
|
17
|
+
exportBundle
|
|
18
|
+
? exportBundle()
|
|
19
|
+
: Promise.reject(new Error('Export is not configured')),
|
|
20
|
+
clear: async () =>
|
|
21
|
+
clear ? clear() : Promise.reject(new Error('Clear is not configured')),
|
|
22
|
+
help: () =>
|
|
23
|
+
'levels(), setLevel(area, level, { durationMs }), resetLevel(area?), export(), clear()',
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(target, name, {
|
|
26
|
+
value: api,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
});
|
|
30
|
+
return () => {
|
|
31
|
+
if (Object.getOwnPropertyDescriptor(target, name)?.value === api)
|
|
32
|
+
delete target[name];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.installConsoleApi = installConsoleApi;
|
|
37
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/devtools/index.js"],"sourcesContent":["export function installConsoleApi({\n logging,\n clear,\n exportBundle,\n name = '__LOGGING__',\n target = globalThis,\n}) {\n if (typeof name !== 'string' || !name || name in target)\n throw new TypeError('Console API name is unavailable');\n const api = Object.freeze({\n levels: () => logging.getLevels(),\n setLevel: (...args) => logging.setLevel(...args),\n resetLevel: (area) => logging.resetLevel(area),\n export: async () =>\n exportBundle\n ? exportBundle()\n : Promise.reject(new Error('Export is not configured')),\n clear: async () =>\n clear ? clear() : Promise.reject(new Error('Clear is not configured')),\n help: () =>\n 'levels(), setLevel(area, level, { durationMs }), resetLevel(area?), export(), clear()',\n });\n Object.defineProperty(target, name, {\n value: api,\n configurable: true,\n writable: true,\n });\n return () => {\n if (Object.getOwnPropertyDescriptor(target, name)?.value === api)\n delete target[name];\n };\n}\n"],"names":[],"mappings":";;AAAO,SAAS,iBAAiB,CAAC;AAClC,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,YAAY;AACd,EAAE,IAAI,GAAG,aAAa;AACtB,EAAE,MAAM,GAAG,UAAU;AACrB,CAAC,EAAE;AACH,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM;AACzD,IAAI,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC;AAC1D,EAAE,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC5B,IAAI,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,EAAE;AACrC,IAAI,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;AACpD,IAAI,UAAU,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;AAClD,IAAI,MAAM,EAAE;AACZ,MAAM;AACN,UAAU,YAAY;AACtB,UAAU,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC/D,IAAI,KAAK,EAAE;AACX,MAAM,KAAK,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC5E,IAAI,IAAI,EAAE;AACV,MAAM,uFAAuF;AAC7F,GAAG,CAAC;AACJ,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE;AACtC,IAAI,KAAK,EAAE,GAAG;AACd,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,MAAM;AACf,IAAI,IAAI,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,KAAK,GAAG;AACpE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC;AACzB,EAAE,CAAC;AACH;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Logging } from "../index.cjs";
|
|
2
|
+
|
|
3
|
+
export declare function installConsoleApi<TArea extends string>(
|
|
4
|
+
options: Readonly<{
|
|
5
|
+
logging: Pick<Logging<TArea>, 'getLevels' | 'setLevel' | 'resetLevel'>;
|
|
6
|
+
clear?: () => Promise<unknown>;
|
|
7
|
+
exportBundle?: () => Promise<void>;
|
|
8
|
+
name?: string;
|
|
9
|
+
target?: object;
|
|
10
|
+
}>,
|
|
11
|
+
): () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Logging } from '../index.js';
|
|
2
|
+
|
|
3
|
+
export declare function installConsoleApi<TArea extends string>(
|
|
4
|
+
options: Readonly<{
|
|
5
|
+
logging: Pick<Logging<TArea>, 'getLevels' | 'setLevel' | 'resetLevel'>;
|
|
6
|
+
clear?: () => Promise<unknown>;
|
|
7
|
+
exportBundle?: () => Promise<void>;
|
|
8
|
+
name?: string;
|
|
9
|
+
target?: object;
|
|
10
|
+
}>,
|
|
11
|
+
): () => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function installConsoleApi({
|
|
2
|
+
logging,
|
|
3
|
+
clear,
|
|
4
|
+
exportBundle,
|
|
5
|
+
name = '__LOGGING__',
|
|
6
|
+
target = globalThis,
|
|
7
|
+
}) {
|
|
8
|
+
if (typeof name !== 'string' || !name || name in target)
|
|
9
|
+
throw new TypeError('Console API name is unavailable');
|
|
10
|
+
const api = Object.freeze({
|
|
11
|
+
levels: () => logging.getLevels(),
|
|
12
|
+
setLevel: (...args) => logging.setLevel(...args),
|
|
13
|
+
resetLevel: (area) => logging.resetLevel(area),
|
|
14
|
+
export: async () =>
|
|
15
|
+
exportBundle
|
|
16
|
+
? exportBundle()
|
|
17
|
+
: Promise.reject(new Error('Export is not configured')),
|
|
18
|
+
clear: async () =>
|
|
19
|
+
clear ? clear() : Promise.reject(new Error('Clear is not configured')),
|
|
20
|
+
help: () =>
|
|
21
|
+
'levels(), setLevel(area, level, { durationMs }), resetLevel(area?), export(), clear()',
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(target, name, {
|
|
24
|
+
value: api,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
});
|
|
28
|
+
return () => {
|
|
29
|
+
if (Object.getOwnPropertyDescriptor(target, name)?.value === api)
|
|
30
|
+
delete target[name];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { installConsoleApi };
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/devtools/index.js"],"sourcesContent":["export function installConsoleApi({\n logging,\n clear,\n exportBundle,\n name = '__LOGGING__',\n target = globalThis,\n}) {\n if (typeof name !== 'string' || !name || name in target)\n throw new TypeError('Console API name is unavailable');\n const api = Object.freeze({\n levels: () => logging.getLevels(),\n setLevel: (...args) => logging.setLevel(...args),\n resetLevel: (area) => logging.resetLevel(area),\n export: async () =>\n exportBundle\n ? exportBundle()\n : Promise.reject(new Error('Export is not configured')),\n clear: async () =>\n clear ? clear() : Promise.reject(new Error('Clear is not configured')),\n help: () =>\n 'levels(), setLevel(area, level, { durationMs }), resetLevel(area?), export(), clear()',\n });\n Object.defineProperty(target, name, {\n value: api,\n configurable: true,\n writable: true,\n });\n return () => {\n if (Object.getOwnPropertyDescriptor(target, name)?.value === api)\n delete target[name];\n };\n}\n"],"names":[],"mappings":"AAAO,SAAS,iBAAiB,CAAC;AAClC,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,YAAY;AACd,EAAE,IAAI,GAAG,aAAa;AACtB,EAAE,MAAM,GAAG,UAAU;AACrB,CAAC,EAAE;AACH,EAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM;AACzD,IAAI,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC;AAC1D,EAAE,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AAC5B,IAAI,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,EAAE;AACrC,IAAI,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;AACpD,IAAI,UAAU,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;AAClD,IAAI,MAAM,EAAE;AACZ,MAAM;AACN,UAAU,YAAY;AACtB,UAAU,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAC/D,IAAI,KAAK,EAAE;AACX,MAAM,KAAK,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC5E,IAAI,IAAI,EAAE;AACV,MAAM,uFAAuF;AAC7F,GAAG,CAAC;AACJ,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE;AACtC,IAAI,KAAK,EAAE,GAAG;AACd,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,MAAM;AACf,IAAI,IAAI,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,KAAK,GAAG;AACpE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC;AACzB,EAAE,CAAC;AACH;;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var common = require('../chunk-CXZYNALm.cjs');
|
|
4
|
+
var conversion = require('../chunk-CEhpwtwJ.cjs');
|
|
5
|
+
var format = require('../chunk-DqK_3eFr.cjs');
|
|
6
|
+
require('../chunk-BLf-eCDO.cjs');
|
|
7
|
+
|
|
8
|
+
const EXPORT_LIMITS = /* @__PURE__ */ Object.freeze({ YIELD_RECORDS: 100 });
|
|
9
|
+
|
|
10
|
+
async function createLogBundle(options, archive) {
|
|
11
|
+
if (
|
|
12
|
+
!archive ||
|
|
13
|
+
typeof archive.balingZip !== 'function' ||
|
|
14
|
+
typeof archive.validateFileNames !== 'function' ||
|
|
15
|
+
typeof archive.validateZipOptions !== 'function'
|
|
16
|
+
)
|
|
17
|
+
throw new TypeError('Archive capabilities are required');
|
|
18
|
+
const {
|
|
19
|
+
source,
|
|
20
|
+
redactor,
|
|
21
|
+
files,
|
|
22
|
+
from,
|
|
23
|
+
to,
|
|
24
|
+
now = Date.now,
|
|
25
|
+
scheduler = common.scheduler,
|
|
26
|
+
} = options;
|
|
27
|
+
const maxInputSize = archive.validateZipOptions(options);
|
|
28
|
+
common.validateQuery({ from, to });
|
|
29
|
+
if (!Array.isArray(files))
|
|
30
|
+
throw new TypeError('Bundle files must be an array');
|
|
31
|
+
for (const file of files) {
|
|
32
|
+
if (!file || !Array.isArray(file.areas))
|
|
33
|
+
throw new TypeError('Bundle file areas must be an array');
|
|
34
|
+
common.validateQuery({ areas: file.areas });
|
|
35
|
+
}
|
|
36
|
+
archive.validateFileNames([
|
|
37
|
+
'manifest.json',
|
|
38
|
+
...files.map(({ name }) => name),
|
|
39
|
+
]);
|
|
40
|
+
const fileName =
|
|
41
|
+
options.fileName ??
|
|
42
|
+
`logs-${new Date(now()).toISOString().replaceAll(':', '-')}.zip`;
|
|
43
|
+
archive.validateFileNames([fileName]);
|
|
44
|
+
const areas = Array.from(new Set(files.flatMap((file) => file.areas)));
|
|
45
|
+
const records = await source.query({ areas, from, to });
|
|
46
|
+
const status = source.getStatus?.();
|
|
47
|
+
const contents = [];
|
|
48
|
+
const summaries = [];
|
|
49
|
+
const warnings = [];
|
|
50
|
+
for (const file of files) {
|
|
51
|
+
const selected = records.filter((record) =>
|
|
52
|
+
file.areas.includes(record.area),
|
|
53
|
+
);
|
|
54
|
+
summaries.push({ name: file.name, records: selected.length });
|
|
55
|
+
if (!selected.length) continue;
|
|
56
|
+
let content;
|
|
57
|
+
if (file.render) {
|
|
58
|
+
const result = file.render(selected);
|
|
59
|
+
content = typeof result === 'string' ? result : result?.content;
|
|
60
|
+
if (typeof content !== 'string' || result?.then)
|
|
61
|
+
throw new TypeError('Bundle renderers must return text synchronously');
|
|
62
|
+
for (const warning of result?.warnings ?? []) {
|
|
63
|
+
if (warnings.length >= redactor.limits.maxArrayLength) break;
|
|
64
|
+
if (typeof warning !== 'string')
|
|
65
|
+
throw new TypeError('Renderer warnings must be strings');
|
|
66
|
+
warnings.push(conversion.ownJson(redactor.redactText(warning), redactor.limits));
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
const lines = [];
|
|
70
|
+
for (let index = 0; index < selected.length; index++) {
|
|
71
|
+
lines.push(format.formatRecord(selected[index]));
|
|
72
|
+
if ((index + 1) % EXPORT_LIMITS.YIELD_RECORDS === 0)
|
|
73
|
+
await new Promise((resolve) => scheduler.setTimeout(resolve, 0));
|
|
74
|
+
}
|
|
75
|
+
content = `${lines.join('\n')}\n`;
|
|
76
|
+
}
|
|
77
|
+
contents.push({ name: file.name, content });
|
|
78
|
+
}
|
|
79
|
+
const manifest = {
|
|
80
|
+
schemaVersion: 1,
|
|
81
|
+
builtAt: new Date(now()).toISOString(),
|
|
82
|
+
requestedRange: { from: from ?? null, to: to ?? null },
|
|
83
|
+
actualRange: {
|
|
84
|
+
from: records[0]?.at ?? null,
|
|
85
|
+
to: records.at(-1)?.at ?? null,
|
|
86
|
+
},
|
|
87
|
+
files: summaries,
|
|
88
|
+
truncatedRecords: records.filter((record) => record.truncated).length,
|
|
89
|
+
warnings,
|
|
90
|
+
...(status ? { store: status } : {}),
|
|
91
|
+
redactionVersions: Array.from(
|
|
92
|
+
new Set(records.map((record) => record.redactionVersion)),
|
|
93
|
+
),
|
|
94
|
+
application: conversion.ownJson(
|
|
95
|
+
redactor.redactValue(options.manifest ?? {}),
|
|
96
|
+
redactor.limits,
|
|
97
|
+
),
|
|
98
|
+
};
|
|
99
|
+
contents.push({
|
|
100
|
+
name: 'manifest.json',
|
|
101
|
+
content: JSON.stringify(manifest, null, 2),
|
|
102
|
+
});
|
|
103
|
+
return Object.freeze({
|
|
104
|
+
blob: await archive.balingZip(contents, { maxInputSize }),
|
|
105
|
+
fileName,
|
|
106
|
+
files: Object.freeze(summaries.map(Object.freeze)),
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
exports.createLogBundle = createLogBundle;
|
|
111
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/export/index.js"],"sourcesContent":["import { scheduler as hostScheduler, validateQuery } from '../core/common.js';\nimport { ownJson } from '../core/conversion.js';\nimport { formatRecord } from '../core/format.js';\n\nconst EXPORT_LIMITS = /* @__PURE__ */ Object.freeze({ YIELD_RECORDS: 100 });\n\nexport async function createLogBundle(options, archive) {\n if (\n !archive ||\n typeof archive.balingZip !== 'function' ||\n typeof archive.validateFileNames !== 'function' ||\n typeof archive.validateZipOptions !== 'function'\n )\n throw new TypeError('Archive capabilities are required');\n const {\n source,\n redactor,\n files,\n from,\n to,\n now = Date.now,\n scheduler = hostScheduler,\n } = options;\n const maxInputSize = archive.validateZipOptions(options);\n validateQuery({ from, to });\n if (!Array.isArray(files))\n throw new TypeError('Bundle files must be an array');\n for (const file of files) {\n if (!file || !Array.isArray(file.areas))\n throw new TypeError('Bundle file areas must be an array');\n validateQuery({ areas: file.areas });\n }\n archive.validateFileNames([\n 'manifest.json',\n ...files.map(({ name }) => name),\n ]);\n const fileName =\n options.fileName ??\n `logs-${new Date(now()).toISOString().replaceAll(':', '-')}.zip`;\n archive.validateFileNames([fileName]);\n const areas = Array.from(new Set(files.flatMap((file) => file.areas)));\n const records = await source.query({ areas, from, to });\n const status = source.getStatus?.();\n const contents = [];\n const summaries = [];\n const warnings = [];\n for (const file of files) {\n const selected = records.filter((record) =>\n file.areas.includes(record.area),\n );\n summaries.push({ name: file.name, records: selected.length });\n if (!selected.length) continue;\n let content;\n if (file.render) {\n const result = file.render(selected);\n content = typeof result === 'string' ? result : result?.content;\n if (typeof content !== 'string' || result?.then)\n throw new TypeError('Bundle renderers must return text synchronously');\n for (const warning of result?.warnings ?? []) {\n if (warnings.length >= redactor.limits.maxArrayLength) break;\n if (typeof warning !== 'string')\n throw new TypeError('Renderer warnings must be strings');\n warnings.push(ownJson(redactor.redactText(warning), redactor.limits));\n }\n } else {\n const lines = [];\n for (let index = 0; index < selected.length; index++) {\n lines.push(formatRecord(selected[index]));\n if ((index + 1) % EXPORT_LIMITS.YIELD_RECORDS === 0)\n await new Promise((resolve) => scheduler.setTimeout(resolve, 0));\n }\n content = `${lines.join('\\n')}\\n`;\n }\n contents.push({ name: file.name, content });\n }\n const manifest = {\n schemaVersion: 1,\n builtAt: new Date(now()).toISOString(),\n requestedRange: { from: from ?? null, to: to ?? null },\n actualRange: {\n from: records[0]?.at ?? null,\n to: records.at(-1)?.at ?? null,\n },\n files: summaries,\n truncatedRecords: records.filter((record) => record.truncated).length,\n warnings,\n ...(status ? { store: status } : {}),\n redactionVersions: Array.from(\n new Set(records.map((record) => record.redactionVersion)),\n ),\n application: ownJson(\n redactor.redactValue(options.manifest ?? {}),\n redactor.limits,\n ),\n };\n contents.push({\n name: 'manifest.json',\n content: JSON.stringify(manifest, null, 2),\n });\n return Object.freeze({\n blob: await archive.balingZip(contents, { maxInputSize }),\n fileName,\n files: Object.freeze(summaries.map(Object.freeze)),\n });\n}\n"],"names":["hostScheduler","validateQuery","ownJson","formatRecord"],"mappings":";;;;;;;AAIA,MAAM,aAAa,mBAAmB,MAAM,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC;;AAEpE,eAAe,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE;AACxD,EAAE;AACF,IAAI,CAAC,OAAO;AACZ,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,UAAU;AAC3C,IAAI,OAAO,OAAO,CAAC,iBAAiB,KAAK,UAAU;AACnD,IAAI,OAAO,OAAO,CAAC,kBAAkB,KAAK;AAC1C;AACA,IAAI,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC;AAC5D,EAAE,MAAM;AACR,IAAI,MAAM;AACV,IAAI,QAAQ;AACZ,IAAI,KAAK;AACT,IAAI,IAAI;AACR,IAAI,EAAE;AACN,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG;AAClB,IAAI,SAAS,GAAGA,gBAAa;AAC7B,GAAG,GAAG,OAAO;AACb,EAAE,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC;AAC1D,EAAEC,oBAAa,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAC7B,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAC3B,IAAI,MAAM,IAAI,SAAS,CAAC,+BAA+B,CAAC;AACxD,EAAE,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AAC5B,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AAC3C,MAAM,MAAM,IAAI,SAAS,CAAC,oCAAoC,CAAC;AAC/D,IAAIA,o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