@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.
Files changed (88) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +443 -2
  4. package/dist/browser/constants.d.cts +14 -0
  5. package/dist/browser/constants.d.ts +14 -0
  6. package/dist/browser/index.cjs +192 -0
  7. package/dist/browser/index.cjs.map +1 -0
  8. package/dist/browser/index.d.cts +29 -0
  9. package/dist/browser/index.d.ts +29 -0
  10. package/dist/browser/index.js +187 -0
  11. package/dist/browser/index.js.map +1 -0
  12. package/dist/chunk-7ld72rnl.js +376 -0
  13. package/dist/chunk-7ld72rnl.js.map +1 -0
  14. package/dist/chunk-B-SP8Od_.js +437 -0
  15. package/dist/chunk-B-SP8Od_.js.map +1 -0
  16. package/dist/chunk-BLf-eCDO.cjs +53 -0
  17. package/dist/chunk-BLf-eCDO.cjs.map +1 -0
  18. package/dist/chunk-Bvq4tF_F.cjs +440 -0
  19. package/dist/chunk-Bvq4tF_F.cjs.map +1 -0
  20. package/dist/chunk-CEhpwtwJ.cjs +379 -0
  21. package/dist/chunk-CEhpwtwJ.cjs.map +1 -0
  22. package/dist/chunk-CSS3f4_M.js +46 -0
  23. package/dist/chunk-CSS3f4_M.js.map +1 -0
  24. package/dist/chunk-CXZYNALm.cjs +124 -0
  25. package/dist/chunk-CXZYNALm.cjs.map +1 -0
  26. package/dist/chunk-DYcNnkOV.js +50 -0
  27. package/dist/chunk-DYcNnkOV.js.map +1 -0
  28. package/dist/chunk-DqK_3eFr.cjs +53 -0
  29. package/dist/chunk-DqK_3eFr.cjs.map +1 -0
  30. package/dist/chunk-LRCHwVuE.js +110 -0
  31. package/dist/chunk-LRCHwVuE.js.map +1 -0
  32. package/dist/constants.d.cts +6 -0
  33. package/dist/constants.d.ts +6 -0
  34. package/dist/core/constants.d.cts +43 -0
  35. package/dist/core/constants.d.ts +43 -0
  36. package/dist/core/errors.d.cts +8 -0
  37. package/dist/core/errors.d.ts +8 -0
  38. package/dist/devtools/index.cjs +37 -0
  39. package/dist/devtools/index.cjs.map +1 -0
  40. package/dist/devtools/index.d.cts +11 -0
  41. package/dist/devtools/index.d.ts +11 -0
  42. package/dist/devtools/index.js +35 -0
  43. package/dist/devtools/index.js.map +1 -0
  44. package/dist/export/index.cjs +111 -0
  45. package/dist/export/index.cjs.map +1 -0
  46. package/dist/export/index.d.cts +49 -0
  47. package/dist/export/index.d.ts +49 -0
  48. package/dist/export/index.js +109 -0
  49. package/dist/export/index.js.map +1 -0
  50. package/dist/history/constants.d.cts +35 -0
  51. package/dist/history/constants.d.ts +35 -0
  52. package/dist/history/index.cjs +1196 -0
  53. package/dist/history/index.cjs.map +1 -0
  54. package/dist/history/index.d.cts +113 -0
  55. package/dist/history/index.d.ts +113 -0
  56. package/dist/history/index.js +1194 -0
  57. package/dist/history/index.js.map +1 -0
  58. package/dist/index.cjs +14 -0
  59. package/dist/index.cjs.map +1 -0
  60. package/dist/index.d.cts +158 -0
  61. package/dist/index.d.ts +158 -0
  62. package/dist/index.js +6 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/indexeddb/index.cjs +15 -0
  65. package/dist/indexeddb/index.cjs.map +1 -0
  66. package/dist/indexeddb/index.d.cts +46 -0
  67. package/dist/indexeddb/index.d.ts +46 -0
  68. package/dist/indexeddb/index.js +13 -0
  69. package/dist/indexeddb/index.js.map +1 -0
  70. package/dist/redaction/index.cjs +154 -0
  71. package/dist/redaction/index.cjs.map +1 -0
  72. package/dist/redaction/index.d.cts +70 -0
  73. package/dist/redaction/index.d.ts +70 -0
  74. package/dist/redaction/index.js +152 -0
  75. package/dist/redaction/index.js.map +1 -0
  76. package/dist/sip/constants.d.cts +5 -0
  77. package/dist/sip/constants.d.ts +5 -0
  78. package/dist/sip/index.cjs +336 -0
  79. package/dist/sip/index.cjs.map +1 -0
  80. package/dist/sip/index.d.cts +34 -0
  81. package/dist/sip/index.d.ts +34 -0
  82. package/dist/sip/index.js +333 -0
  83. package/dist/sip/index.js.map +1 -0
  84. package/dist/storage/constants.d.cts +11 -0
  85. package/dist/storage/constants.d.ts +11 -0
  86. package/dist/storage/contracts.d.cts +35 -0
  87. package/dist/storage/contracts.d.ts +35 -0
  88. package/package.json +127 -3
@@ -0,0 +1,49 @@
1
+ import type {
2
+ LoggingScheduler,
3
+ LogQuery,
4
+ LogRecord,
5
+ LogSource,
6
+ LogValue,
7
+ Redactor,
8
+ } from "../index.cjs";
9
+
10
+ export type BundleRenderResult =
11
+ | string
12
+ | Readonly<{ content: string; warnings?: readonly string[] }>;
13
+ export type BundleFile<TArea extends string = string> = Readonly<{
14
+ name: string;
15
+ areas: readonly TArea[];
16
+ render?: (records: readonly LogRecord[]) => BundleRenderResult;
17
+ }>;
18
+ export type CreateLogBundleOptions<TArea extends string = string> = Readonly<{
19
+ source: Readonly<{
20
+ query: (query: LogQuery) => Promise<readonly LogRecord[]>;
21
+ getStatus?: LogSource['getStatus'];
22
+ }>;
23
+ redactor: Redactor;
24
+ files: readonly BundleFile<TArea>[];
25
+ from?: number;
26
+ to?: number;
27
+ manifest?: Readonly<Record<string, LogValue>>;
28
+ fileName?: string;
29
+ maxInputSize?: number;
30
+ scheduler?: LoggingScheduler;
31
+ now?: () => number;
32
+ }>;
33
+ export type LogBundle = Readonly<{
34
+ blob: Blob;
35
+ fileName: string;
36
+ files: readonly Readonly<{ name: string; records: number }>[];
37
+ }>;
38
+ export type ArchiveCapabilities = Readonly<{
39
+ balingZip: (
40
+ files: readonly Readonly<{ name: string; content: string }>[],
41
+ options: Readonly<{ maxInputSize: number }>,
42
+ ) => Promise<Blob>;
43
+ validateFileNames: (names: readonly string[]) => void;
44
+ validateZipOptions: (options: CreateLogBundleOptions) => number;
45
+ }>;
46
+ export declare function createLogBundle<TArea extends string>(
47
+ options: CreateLogBundleOptions<TArea>,
48
+ archive: ArchiveCapabilities,
49
+ ): Promise<LogBundle>;
@@ -0,0 +1,49 @@
1
+ import type {
2
+ LoggingScheduler,
3
+ LogQuery,
4
+ LogRecord,
5
+ LogSource,
6
+ LogValue,
7
+ Redactor,
8
+ } from '../index.js';
9
+
10
+ export type BundleRenderResult =
11
+ | string
12
+ | Readonly<{ content: string; warnings?: readonly string[] }>;
13
+ export type BundleFile<TArea extends string = string> = Readonly<{
14
+ name: string;
15
+ areas: readonly TArea[];
16
+ render?: (records: readonly LogRecord[]) => BundleRenderResult;
17
+ }>;
18
+ export type CreateLogBundleOptions<TArea extends string = string> = Readonly<{
19
+ source: Readonly<{
20
+ query: (query: LogQuery) => Promise<readonly LogRecord[]>;
21
+ getStatus?: LogSource['getStatus'];
22
+ }>;
23
+ redactor: Redactor;
24
+ files: readonly BundleFile<TArea>[];
25
+ from?: number;
26
+ to?: number;
27
+ manifest?: Readonly<Record<string, LogValue>>;
28
+ fileName?: string;
29
+ maxInputSize?: number;
30
+ scheduler?: LoggingScheduler;
31
+ now?: () => number;
32
+ }>;
33
+ export type LogBundle = Readonly<{
34
+ blob: Blob;
35
+ fileName: string;
36
+ files: readonly Readonly<{ name: string; records: number }>[];
37
+ }>;
38
+ export type ArchiveCapabilities = Readonly<{
39
+ balingZip: (
40
+ files: readonly Readonly<{ name: string; content: string }>[],
41
+ options: Readonly<{ maxInputSize: number }>,
42
+ ) => Promise<Blob>;
43
+ validateFileNames: (names: readonly string[]) => void;
44
+ validateZipOptions: (options: CreateLogBundleOptions) => number;
45
+ }>;
46
+ export declare function createLogBundle<TArea extends string>(
47
+ options: CreateLogBundleOptions<TArea>,
48
+ archive: ArchiveCapabilities,
49
+ ): Promise<LogBundle>;
@@ -0,0 +1,109 @@
1
+ import { s as scheduler, v as validateQuery } from '../chunk-LRCHwVuE.js';
2
+ import { o as ownJson } from '../chunk-7ld72rnl.js';
3
+ import { f as formatRecord } from '../chunk-DYcNnkOV.js';
4
+ import '../chunk-CSS3f4_M.js';
5
+
6
+ const EXPORT_LIMITS = /* @__PURE__ */ Object.freeze({ YIELD_RECORDS: 100 });
7
+
8
+ async function createLogBundle(options, archive) {
9
+ if (
10
+ !archive ||
11
+ typeof archive.balingZip !== 'function' ||
12
+ typeof archive.validateFileNames !== 'function' ||
13
+ typeof archive.validateZipOptions !== 'function'
14
+ )
15
+ throw new TypeError('Archive capabilities are required');
16
+ const {
17
+ source,
18
+ redactor,
19
+ files,
20
+ from,
21
+ to,
22
+ now = Date.now,
23
+ scheduler: scheduler$1 = scheduler,
24
+ } = options;
25
+ const maxInputSize = archive.validateZipOptions(options);
26
+ validateQuery({ from, to });
27
+ if (!Array.isArray(files))
28
+ throw new TypeError('Bundle files must be an array');
29
+ for (const file of files) {
30
+ if (!file || !Array.isArray(file.areas))
31
+ throw new TypeError('Bundle file areas must be an array');
32
+ validateQuery({ areas: file.areas });
33
+ }
34
+ archive.validateFileNames([
35
+ 'manifest.json',
36
+ ...files.map(({ name }) => name),
37
+ ]);
38
+ const fileName =
39
+ options.fileName ??
40
+ `logs-${new Date(now()).toISOString().replaceAll(':', '-')}.zip`;
41
+ archive.validateFileNames([fileName]);
42
+ const areas = Array.from(new Set(files.flatMap((file) => file.areas)));
43
+ const records = await source.query({ areas, from, to });
44
+ const status = source.getStatus?.();
45
+ const contents = [];
46
+ const summaries = [];
47
+ const warnings = [];
48
+ for (const file of files) {
49
+ const selected = records.filter((record) =>
50
+ file.areas.includes(record.area),
51
+ );
52
+ summaries.push({ name: file.name, records: selected.length });
53
+ if (!selected.length) continue;
54
+ let content;
55
+ if (file.render) {
56
+ const result = file.render(selected);
57
+ content = typeof result === 'string' ? result : result?.content;
58
+ if (typeof content !== 'string' || result?.then)
59
+ throw new TypeError('Bundle renderers must return text synchronously');
60
+ for (const warning of result?.warnings ?? []) {
61
+ if (warnings.length >= redactor.limits.maxArrayLength) break;
62
+ if (typeof warning !== 'string')
63
+ throw new TypeError('Renderer warnings must be strings');
64
+ warnings.push(ownJson(redactor.redactText(warning), redactor.limits));
65
+ }
66
+ } else {
67
+ const lines = [];
68
+ for (let index = 0; index < selected.length; index++) {
69
+ lines.push(formatRecord(selected[index]));
70
+ if ((index + 1) % EXPORT_LIMITS.YIELD_RECORDS === 0)
71
+ await new Promise((resolve) => scheduler$1.setTimeout(resolve, 0));
72
+ }
73
+ content = `${lines.join('\n')}\n`;
74
+ }
75
+ contents.push({ name: file.name, content });
76
+ }
77
+ const manifest = {
78
+ schemaVersion: 1,
79
+ builtAt: new Date(now()).toISOString(),
80
+ requestedRange: { from: from ?? null, to: to ?? null },
81
+ actualRange: {
82
+ from: records[0]?.at ?? null,
83
+ to: records.at(-1)?.at ?? null,
84
+ },
85
+ files: summaries,
86
+ truncatedRecords: records.filter((record) => record.truncated).length,
87
+ warnings,
88
+ ...(status ? { store: status } : {}),
89
+ redactionVersions: Array.from(
90
+ new Set(records.map((record) => record.redactionVersion)),
91
+ ),
92
+ application: ownJson(
93
+ redactor.redactValue(options.manifest ?? {}),
94
+ redactor.limits,
95
+ ),
96
+ };
97
+ contents.push({
98
+ name: 'manifest.json',
99
+ content: JSON.stringify(manifest, null, 2),
100
+ });
101
+ return Object.freeze({
102
+ blob: await archive.balingZip(contents, { maxInputSize }),
103
+ fileName,
104
+ files: Object.freeze(summaries.map(Object.freeze)),
105
+ });
106
+ }
107
+
108
+ export { createLogBundle };
109
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","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":["scheduler","hostScheduler"],"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,eAAIA,WAAS,GAAGC,SAAa;AAC7B,GAAG,GAAG,OAAO;AACb,EAAE,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC;AAC1D,EAAE,aAAa,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,CAA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AE,QAAQ,CAAC,IAAI,CAAC;AAChB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9C,GAAG,CAAC;AACJ,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,YAAY,EAAE,CAAC;AAC7D,IAAI,QAAQ;AACZ,IAAI,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AACtD,GAAG,CAAC;AACJ;;"}
@@ -0,0 +1,35 @@
1
+ export const HISTORY_MODES: Readonly<{
2
+ OFF: "off";
3
+ MEMORY: "memory";
4
+ PERSISTENT: "persistent";
5
+ }>;
6
+ export const HISTORY_STATES: Readonly<{
7
+ IDLE: "idle";
8
+ ACTIVE: "active";
9
+ TRANSITIONING: "transitioning";
10
+ BLOCKED: "blocked";
11
+ STALE: "stale";
12
+ STOPPED: "stopped";
13
+ }>;
14
+ export const HISTORY_ERROR_CODES: Readonly<{
15
+ METADATA: "metadata";
16
+ CLEANUP: "cleanup";
17
+ STALE: "stale";
18
+ SETUP: "setup";
19
+ MIGRATION: "migration";
20
+ STOPPED: "stopped";
21
+ ROTATION: "rotation";
22
+ }>;
23
+ export const HISTORY_ERRORS: Readonly<{
24
+ metadata: "Log history metadata failed";
25
+ cleanup: "Log history cleanup failed";
26
+ stale: "Log history stale failed";
27
+ setup: "Log history setup failed";
28
+ migration: "Log history migration failed";
29
+ stopped: "Log history stopped failed";
30
+ rotation: "Log history rotation failed";
31
+ }>;
32
+ export const HISTORY_LIMITS: Readonly<{
33
+ STARTUP_DEFAULT_MAX_SIZE_PER_AREA: 250000;
34
+ STARTUP_MAX_TOTAL_SIZE: 1000000;
35
+ }>;
@@ -0,0 +1,35 @@
1
+ export const HISTORY_MODES: Readonly<{
2
+ OFF: "off";
3
+ MEMORY: "memory";
4
+ PERSISTENT: "persistent";
5
+ }>;
6
+ export const HISTORY_STATES: Readonly<{
7
+ IDLE: "idle";
8
+ ACTIVE: "active";
9
+ TRANSITIONING: "transitioning";
10
+ BLOCKED: "blocked";
11
+ STALE: "stale";
12
+ STOPPED: "stopped";
13
+ }>;
14
+ export const HISTORY_ERROR_CODES: Readonly<{
15
+ METADATA: "metadata";
16
+ CLEANUP: "cleanup";
17
+ STALE: "stale";
18
+ SETUP: "setup";
19
+ MIGRATION: "migration";
20
+ STOPPED: "stopped";
21
+ ROTATION: "rotation";
22
+ }>;
23
+ export const HISTORY_ERRORS: Readonly<{
24
+ metadata: "Log history metadata failed";
25
+ cleanup: "Log history cleanup failed";
26
+ stale: "Log history stale failed";
27
+ setup: "Log history setup failed";
28
+ migration: "Log history migration failed";
29
+ stopped: "Log history stopped failed";
30
+ rotation: "Log history rotation failed";
31
+ }>;
32
+ export const HISTORY_LIMITS: Readonly<{
33
+ STARTUP_DEFAULT_MAX_SIZE_PER_AREA: 250000;
34
+ STARTUP_MAX_TOTAL_SIZE: 1000000;
35
+ }>;