@managesome/eposmatic-toolkit 0.4.53 → 0.4.54

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 (61) hide show
  1. package/esm/helpers/materialized-reports/index.js +1 -0
  2. package/esm/helpers/materialized-reports/report-platform/definition.js +508 -0
  3. package/esm/helpers/materialized-reports/report-platform/index.js +4 -0
  4. package/esm/helpers/materialized-reports/report-platform/lifecycle/budget.js +27 -0
  5. package/esm/helpers/materialized-reports/report-platform/lifecycle/cap-metadata.js +12 -0
  6. package/esm/helpers/materialized-reports/report-platform/lifecycle/entry-pages.js +121 -0
  7. package/esm/helpers/materialized-reports/report-platform/lifecycle/flat-projection.js +14 -0
  8. package/esm/helpers/materialized-reports/report-platform/lifecycle/index.js +8 -0
  9. package/esm/helpers/materialized-reports/report-platform/lifecycle/iteration-row.js +10 -0
  10. package/esm/helpers/materialized-reports/report-platform/lifecycle/run-stats.js +42 -0
  11. package/esm/helpers/materialized-reports/report-platform/lifecycle/scope-refs.js +28 -0
  12. package/esm/helpers/materialized-reports/report-platform/lifecycle/top-n.js +24 -0
  13. package/esm/helpers/materialized-reports/report-platform/registry.js +23 -0
  14. package/esm/helpers/materialized-reports/report-platform/validate-report-registry.js +214 -0
  15. package/lib/helpers/materialized-reports/index.d.ts +1 -0
  16. package/lib/helpers/materialized-reports/index.js +1 -0
  17. package/lib/helpers/materialized-reports/report-platform/definition.d.ts +133 -0
  18. package/lib/helpers/materialized-reports/report-platform/definition.js +511 -0
  19. package/lib/helpers/materialized-reports/report-platform/index.d.ts +4 -0
  20. package/lib/helpers/materialized-reports/report-platform/index.js +20 -0
  21. package/lib/helpers/materialized-reports/report-platform/lifecycle/budget.d.ts +8 -0
  22. package/lib/helpers/materialized-reports/report-platform/lifecycle/budget.js +31 -0
  23. package/lib/helpers/materialized-reports/report-platform/lifecycle/cap-metadata.d.ts +8 -0
  24. package/lib/helpers/materialized-reports/report-platform/lifecycle/cap-metadata.js +16 -0
  25. package/lib/helpers/materialized-reports/report-platform/lifecycle/entry-pages.d.ts +40 -0
  26. package/lib/helpers/materialized-reports/report-platform/lifecycle/entry-pages.js +130 -0
  27. package/lib/helpers/materialized-reports/report-platform/lifecycle/flat-projection.d.ts +22 -0
  28. package/lib/helpers/materialized-reports/report-platform/lifecycle/flat-projection.js +17 -0
  29. package/lib/helpers/materialized-reports/report-platform/lifecycle/index.d.ts +8 -0
  30. package/lib/helpers/materialized-reports/report-platform/lifecycle/index.js +24 -0
  31. package/lib/helpers/materialized-reports/report-platform/lifecycle/iteration-row.d.ts +13 -0
  32. package/lib/helpers/materialized-reports/report-platform/lifecycle/iteration-row.js +13 -0
  33. package/lib/helpers/materialized-reports/report-platform/lifecycle/run-stats.d.ts +20 -0
  34. package/lib/helpers/materialized-reports/report-platform/lifecycle/run-stats.js +47 -0
  35. package/lib/helpers/materialized-reports/report-platform/lifecycle/scope-refs.d.ts +13 -0
  36. package/lib/helpers/materialized-reports/report-platform/lifecycle/scope-refs.js +31 -0
  37. package/lib/helpers/materialized-reports/report-platform/lifecycle/top-n.d.ts +16 -0
  38. package/lib/helpers/materialized-reports/report-platform/lifecycle/top-n.js +29 -0
  39. package/lib/helpers/materialized-reports/report-platform/registry.d.ts +13 -0
  40. package/lib/helpers/materialized-reports/report-platform/registry.js +31 -0
  41. package/lib/helpers/materialized-reports/report-platform/validate-report-registry.d.ts +20 -0
  42. package/lib/helpers/materialized-reports/report-platform/validate-report-registry.js +218 -0
  43. package/lib/tests/materialized-reports/characterization/delivery.characterization.test.d.ts +1 -0
  44. package/lib/tests/materialized-reports/characterization/delivery.characterization.test.js +229 -0
  45. package/lib/tests/materialized-reports/characterization/discount.characterization.test.d.ts +1 -0
  46. package/lib/tests/materialized-reports/characterization/discount.characterization.test.js +99 -0
  47. package/lib/tests/materialized-reports/characterization/fixtures.d.ts +30 -0
  48. package/lib/tests/materialized-reports/characterization/fixtures.js +402 -0
  49. package/lib/tests/materialized-reports/characterization/golden.d.ts +18 -0
  50. package/lib/tests/materialized-reports/characterization/golden.js +127 -0
  51. package/lib/tests/materialized-reports/characterization/overview.characterization.test.d.ts +1 -0
  52. package/lib/tests/materialized-reports/characterization/overview.characterization.test.js +69 -0
  53. package/lib/tests/materialized-reports/characterization/prep-time.characterization.test.d.ts +1 -0
  54. package/lib/tests/materialized-reports/characterization/prep-time.characterization.test.js +102 -0
  55. package/lib/tests/materialized-reports/report-platform/lifecycle-primitives.test.d.ts +1 -0
  56. package/lib/tests/materialized-reports/report-platform/lifecycle-primitives.test.js +177 -0
  57. package/lib/tests/materialized-reports/report-platform/registry-conformance.test.d.ts +1 -0
  58. package/lib/tests/materialized-reports/report-platform/registry-conformance.test.js +214 -0
  59. package/lib/tests/materialized-reports/report-platform/registry-validation.test.d.ts +1 -0
  60. package/lib/tests/materialized-reports/report-platform/registry-validation.test.js +103 -0
  61. package/package.json +4 -2
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const MATERIALIZED_REPORTS_1 = require("../../../constants/MATERIALIZED_REPORTS");
4
+ const materialized_reports_1 = require("../../../helpers/materialized-reports");
5
+ const golden_1 = require("./golden");
6
+ const fixtures_1 = require("./fixtures");
7
+ /**
8
+ * PREP TIME characterization — coverage counters, entry rows, targets and
9
+ * formatter.
10
+ *
11
+ * Current behaviour captured deliberately:
12
+ * - entries are ONE DOCUMENT PER SCOPE (no page partitioning, no `#N`);
13
+ * - the item reads are month-capped (31 effective days) at the ROUTE, not here;
14
+ * - MEASURED / UNMEASURED / zero-minute rows and every target source are kept.
15
+ */
16
+ describe('characterization: Prep Time', () => {
17
+ const fixtures = (0, fixtures_1.buildCharacterizationFixtures)();
18
+ const compile = (defaultPrepMinutes, takeawayTimeMs) => (0, materialized_reports_1.compileTenantPrepTimeReports)({
19
+ tenantId: fixtures_1.CHARACTERIZATION_TENANT_ID,
20
+ brandId: fixtures_1.CHARACTERIZATION_BRAND_ID,
21
+ localDate: fixtures_1.CHARACTERIZATION_DAY,
22
+ orders: fixtures.dayOrders,
23
+ tenantDefaultMinutes: defaultPrepMinutes,
24
+ tenantTakeawayTimeMs: takeawayTimeMs,
25
+ computedAt: fixtures_1.CHARACTERIZATION_COMPUTED_AT,
26
+ });
27
+ const withDefault = compile(12, 900000);
28
+ it('compiles coverage + entries with TENANT_DEFAULT / DINE_IN_PREP targets', () => {
29
+ expect(withDefault).not.toBeNull();
30
+ (0, golden_1.expectGolden)('prep.compile.tenant-default', withDefault);
31
+ const dayEntries = withDefault.entries.filter((entry) => entry.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE && entry.scope_field === fixtures_1.CHARACTERIZATION_DAY);
32
+ // One document per scope, not per source day page.
33
+ expect(dayEntries).toHaveLength(1);
34
+ expect(dayEntries[0]).not.toHaveProperty('page');
35
+ const targetSources = new Set(dayEntries[0].prep_time_entries == null
36
+ ? []
37
+ : Object.values(dayEntries[0].prep_time_entries)
38
+ .flatMap((section) => section.rows ?? [])
39
+ .map((row) => row.target_source));
40
+ expect(targetSources.has('DINE_IN_PREP')).toBe(true);
41
+ expect(targetSources.has('TENANT_DEFAULT')).toBe(true);
42
+ });
43
+ it('captures the TAKEAWAY_TIME target when no default prep is configured', () => {
44
+ const takeaway = compile(0, 900000);
45
+ (0, golden_1.expectGolden)('prep.compile.takeaway-time', takeaway);
46
+ const rows = collectRows(takeaway);
47
+ expect(rows.some((row) => row.target_source === 'TAKEAWAY_TIME')).toBe(true);
48
+ });
49
+ it('captures the NONE target when no target source is configured', () => {
50
+ const none = compile(0, 0);
51
+ (0, golden_1.expectGolden)('prep.compile.no-target', none);
52
+ const rows = collectRows(none);
53
+ expect(rows.some((row) => row.target_source === 'NONE')).toBe(true);
54
+ expect(rows.some((row) => row.anchor === 'MEASURED')).toBe(true);
55
+ expect(rows.some((row) => row.anchor === 'UNMEASURED')).toBe(true);
56
+ });
57
+ it('builds the flat projection for every stored scope', () => {
58
+ const rows = [];
59
+ const scopes = [];
60
+ for (const entry of withDefault.entries) {
61
+ const flattened = (0, materialized_reports_1.buildMaterializedDrilldownRows)(MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_PREP_TIME_ENTRIES, entry, null);
62
+ rows.push(...flattened.rows);
63
+ const scope = (0, materialized_reports_1.buildMaterializedDrilldownScope)(MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_PREP_TIME_ENTRIES, entry, flattened.rows, null);
64
+ if (scope != null)
65
+ scopes.push(scope);
66
+ }
67
+ (0, golden_1.expectGolden)('prep.flat', { rows, scopes });
68
+ expect(rows.length).toBeGreaterThan(0);
69
+ });
70
+ it('formats the raw day documents and the aggregated read record', () => {
71
+ const dayDoc = withDefault.reports.find((report) => report.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE &&
72
+ report.scope_field === fixtures_1.CHARACTERIZATION_DAY);
73
+ (0, golden_1.expectGolden)('prep.formatted.raw-day', (0, materialized_reports_1.getFormattedTenantPrepTimeReporting)([dayDoc]));
74
+ (0, golden_1.expectGolden)('prep.formatted.raw-day-filtered', (0, materialized_reports_1.getFormattedTenantPrepTimeReporting)([dayDoc], {
75
+ platforms: ['POS_DINE-IN', 'POS_TAKE-AWAY'],
76
+ order_statuses: ['COMPLETED'],
77
+ }));
78
+ const aggregated = {
79
+ tenant_id: dayDoc.tenant_id,
80
+ brand_id: dayDoc.brand_id,
81
+ max_iteration: dayDoc.iteration ?? 1,
82
+ max_updated_at: dayDoc.updatedAt ?? null,
83
+ matched_documents: 1,
84
+ sale_type_key_filters: dayDoc.sale_type_key_filters,
85
+ prep_time_counters: dayDoc.prep_time_counters ?? {},
86
+ prep_time_counter_rows: dayDoc.prep_time_counter_rows ?? [],
87
+ schema_version: dayDoc.schema_version ?? 1,
88
+ first_scope_field: dayDoc.scope_field,
89
+ last_scope_field: dayDoc.scope_field,
90
+ };
91
+ (0, golden_1.expectGolden)('prep.formatted.aggregated', (0, materialized_reports_1.getFormattedTenantPrepTimeAggregatedReporting)([aggregated]));
92
+ });
93
+ });
94
+ function collectRows(compiled) {
95
+ const rows = [];
96
+ for (const entry of compiled.entries) {
97
+ for (const section of Object.values((entry.prep_time_entries ?? {}))) {
98
+ rows.push(...(section.rows ?? []));
99
+ }
100
+ }
101
+ return rows;
102
+ }
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const MATERIALIZED_REPORTS_1 = require("../../../constants/MATERIALIZED_REPORTS");
4
+ const materialized_reports_1 = require("../../../helpers/materialized-reports");
5
+ const budget_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/budget");
6
+ const cap_metadata_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/cap-metadata");
7
+ const entry_pages_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/entry-pages");
8
+ const flat_projection_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/flat-projection");
9
+ const iteration_row_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/iteration-row");
10
+ const run_stats_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/run-stats");
11
+ const scope_refs_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/scope-refs");
12
+ const top_n_1 = require("../../../helpers/materialized-reports/report-platform/lifecycle/top-n");
13
+ const registry_1 = require("../../../helpers/materialized-reports/report-platform/registry");
14
+ const report_contract_1 = require("../../../helpers/reporting-contract/report-contract");
15
+ const fixtures_1 = require("../characterization/fixtures");
16
+ const sortRefs = (refs) => [...refs].map((ref) => `${ref.scope_context}|${ref.scope_field}`).sort();
17
+ const fixtures = (0, fixtures_1.buildCharacterizationFixtures)();
18
+ const dayOrders = fixtures.dayOrders;
19
+ const delivery = (0, materialized_reports_1.compileTenantDeliveryReports)({
20
+ tenantId: fixtures_1.CHARACTERIZATION_TENANT_ID,
21
+ brandId: fixtures_1.CHARACTERIZATION_BRAND_ID,
22
+ localDate: fixtures_1.CHARACTERIZATION_DAY,
23
+ orders: dayOrders,
24
+ deliveries: fixtures.deliveries,
25
+ computedAt: fixtures_1.CHARACTERIZATION_COMPUTED_AT,
26
+ });
27
+ const discount = (0, materialized_reports_1.compileTenantDiscountReports)({
28
+ tenantId: fixtures_1.CHARACTERIZATION_TENANT_ID,
29
+ brandId: fixtures_1.CHARACTERIZATION_BRAND_ID,
30
+ localDate: fixtures_1.CHARACTERIZATION_DAY,
31
+ orders: dayOrders,
32
+ computedAt: fixtures_1.CHARACTERIZATION_COMPUTED_AT,
33
+ });
34
+ describe('lifecycle primitive: scope refs', () => {
35
+ it('matches the existing Overview ref builder', () => {
36
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.OVERVIEW);
37
+ expect(sortRefs((0, scope_refs_1.resolveReportScopeRefsForDay)(definition, fixtures_1.CHARACTERIZATION_DAY))).toEqual(sortRefs((0, materialized_reports_1.getMaterializedTenantSalesOverviewScopeRefsForDay)(fixtures_1.CHARACTERIZATION_DAY)));
38
+ });
39
+ it('matches the existing Discounts ref builder', () => {
40
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.DISCOUNTS);
41
+ expect(sortRefs((0, scope_refs_1.resolveReportScopeRefsForDay)(definition, fixtures_1.CHARACTERIZATION_DAY))).toEqual(sortRefs((0, materialized_reports_1.getMaterializedDiscountScopeRefsForDay)(fixtures_1.CHARACTERIZATION_DAY)));
42
+ });
43
+ it('keeps Prep/Delivery hour-free and returns all expected periods', () => {
44
+ for (const key of [report_contract_1.REPORT_KEY_ENUM.PREP_TIME, report_contract_1.REPORT_KEY_ENUM.DELIVERY]) {
45
+ const refs = (0, scope_refs_1.resolveReportScopeRefsForDay)((0, registry_1.getReportDefinition)(key), fixtures_1.CHARACTERIZATION_DAY);
46
+ expect(refs.some((ref) => ref.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_HOUR)).toBe(false);
47
+ expect(refs.length).toBe((0, registry_1.getReportDefinition)(key).reportScopes.length);
48
+ }
49
+ });
50
+ });
51
+ describe('lifecycle primitive: entry pages', () => {
52
+ it('matches the existing Delivery page identity for every entry scope', () => {
53
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.DELIVERY);
54
+ for (const scope of definition.entryScopes) {
55
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, scope, fixtures_1.CHARACTERIZATION_DAY)).toBe((0, materialized_reports_1.deliveryEntryPageOf)(scope, fixtures_1.CHARACTERIZATION_DAY));
56
+ }
57
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, 'localQuarter', fixtures_1.CHARACTERIZATION_DAY)).toBeNull();
58
+ });
59
+ it('keeps the Discounts page identity (day/hour all, period source date)', () => {
60
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.DISCOUNTS);
61
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, 'localDate', fixtures_1.CHARACTERIZATION_DAY)).toBe('all');
62
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, 'localHour', fixtures_1.CHARACTERIZATION_DAY)).toBe('all');
63
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, 'localMonth', fixtures_1.CHARACTERIZATION_DAY)).toBe(fixtures_1.CHARACTERIZATION_DAY);
64
+ });
65
+ it('keeps Prep Time page-less', () => {
66
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.PREP_TIME);
67
+ expect((0, entry_pages_1.resolveEntryPageForScope)(definition, 'localDate', fixtures_1.CHARACTERIZATION_DAY)).toBeNull();
68
+ });
69
+ it('reproduces the Delivery #N splitter byte-for-byte', () => {
70
+ const entry = delivery.entries.find((document) => document.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE);
71
+ const legacy = (0, materialized_reports_1.splitMaterializedDeliveryEntryPage)(entry, 3000);
72
+ const generic = (0, entry_pages_1.splitEntryPage)({
73
+ document: entry,
74
+ maxBytes: 3000,
75
+ pageOf: (document) => document.page,
76
+ sectionsOf: (document) => document.delivery_entries ?? null,
77
+ rebuild: (document, page, sections) => ({
78
+ ...document,
79
+ page,
80
+ delivery_entries: sections,
81
+ }),
82
+ scopeLabel: (document) => `${document.scope_context}:${document.scope_field}`,
83
+ });
84
+ expect(generic).toEqual(legacy);
85
+ expect(generic.map((page) => page.page)).toEqual(legacy.map((page) => page.page));
86
+ });
87
+ it('keeps base/sub-page identities exact', () => {
88
+ expect((0, entry_pages_1.entryPageBase)('all')).toBe('all');
89
+ expect((0, entry_pages_1.entryPageBase)('all#2')).toBe('all');
90
+ expect((0, entry_pages_1.entryPageBase)((0, materialized_reports_1.deliveryEntryPageBase)('2026-09-14#3'))).toBe('2026-09-14');
91
+ expect((0, entry_pages_1.buildEntrySubPage)('2026-09-14', 0)).toBe('2026-09-14#0');
92
+ });
93
+ });
94
+ describe('lifecycle primitive: flat projection plan', () => {
95
+ it('matches the existing row + scope builders for Delivery', () => {
96
+ const entry = delivery.entries.find((document) => document.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE);
97
+ const retargeted = { ...entry, scope_context: 'localDate', scope_field: fixtures_1.CHARACTERIZATION_DAY, day_index: null };
98
+ const directRows = (0, materialized_reports_1.buildMaterializedDrilldownRows)(MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DELIVERY_ENTRIES, retargeted, fixtures_1.CHARACTERIZATION_DAY);
99
+ const directScope = (0, materialized_reports_1.buildMaterializedDrilldownScope)(MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DELIVERY_ENTRIES, retargeted, directRows.rows, fixtures_1.CHARACTERIZATION_DAY);
100
+ const plan = (0, flat_projection_1.buildReportFlatProjectionPlan)({
101
+ reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DELIVERY_ENTRIES,
102
+ entryDocument: entry,
103
+ scopeContext: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE,
104
+ scopeField: fixtures_1.CHARACTERIZATION_DAY,
105
+ sourceLocalDate: fixtures_1.CHARACTERIZATION_DAY,
106
+ });
107
+ expect(plan.rows).toEqual(directRows.rows);
108
+ expect(plan.scope).toEqual(directScope);
109
+ });
110
+ it('matches the existing Discounts projection', () => {
111
+ const entry = discount.entries.find((document) => document.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE);
112
+ const plan = (0, flat_projection_1.buildReportFlatProjectionPlan)({
113
+ reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DISCOUNT_ENTRIES,
114
+ entryDocument: entry,
115
+ scopeContext: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE,
116
+ scopeField: fixtures_1.CHARACTERIZATION_DAY,
117
+ sourceLocalDate: fixtures_1.CHARACTERIZATION_DAY,
118
+ });
119
+ expect(plan.rows.length).toBeGreaterThan(0);
120
+ expect(plan.scope).not.toBeNull();
121
+ });
122
+ });
123
+ describe('lifecycle primitive: iteration row', () => {
124
+ it('matches the existing iteration builder', () => {
125
+ const document = discount.reports.find((report) => report.scope_context === MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_SCOPE_ENUM.LOCAL_DATE);
126
+ const direct = (0, materialized_reports_1.buildMaterializedTenantReportIteration)(document, {
127
+ reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DISCOUNT_REPORTS,
128
+ reason: 'CHARACTERIZATION',
129
+ computedAt: fixtures_1.CHARACTERIZATION_COMPUTED_AT,
130
+ });
131
+ const wrapped = (0, iteration_row_1.buildReportIterationRow)(document, {
132
+ reportType: MATERIALIZED_REPORTS_1.MATERIALIZED_REPORT_TYPE_ENUM.TENANT_DISCOUNT_REPORTS,
133
+ reason: 'CHARACTERIZATION',
134
+ computedAt: fixtures_1.CHARACTERIZATION_COMPUTED_AT,
135
+ });
136
+ expect(wrapped).toEqual(direct);
137
+ });
138
+ });
139
+ describe('lifecycle primitive: budget', () => {
140
+ it('resolves the declared report/entry/side budgets', () => {
141
+ const definition = (0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.DELIVERY);
142
+ expect((0, budget_1.getReportCollectionBudget)(definition, 'report')).toBe(15 * 1024 * 1024);
143
+ expect((0, budget_1.getReportCollectionBudget)(definition, 'entries')).toBe(15 * 1024 * 1024);
144
+ expect((0, budget_1.getReportCollectionBudget)(definition, 'side', 'materialized_tenant_delivery_geo_cells')).toBe(2 * 1024 * 1024);
145
+ });
146
+ it('throws when a document exceeds its declared budget', () => {
147
+ const definition = {
148
+ ...(0, registry_1.getReportDefinition)(report_contract_1.REPORT_KEY_ENUM.DELIVERY),
149
+ budgets: { materialized_tenant_delivery_entries: 64 },
150
+ };
151
+ expect(() => (0, budget_1.assertReportDocumentBudget)(definition, 'entries', { payload: 'x'.repeat(256) })).toThrow(/budget/i);
152
+ });
153
+ });
154
+ describe('lifecycle primitive: run stats / cap / top-N', () => {
155
+ it('builds and merges run stats', () => {
156
+ const left = (0, run_stats_1.buildReportRunStats)({ reportKey: 'A', localDate: '2026-09-14', documents: 2 });
157
+ const right = (0, run_stats_1.buildReportRunStats)({ reportKey: 'A', localDate: '2026-09-14', documents: 3, flatRows: 5 });
158
+ expect((0, run_stats_1.mergeReportRunStats)(left, right)).toMatchObject({ documents: 5, flatRows: 5 });
159
+ });
160
+ it('merges cap metadata and preserves exactness', () => {
161
+ const merged = (0, cap_metadata_1.mergeReportCapMetadata)({ cappedCellCount: 1, cappedOrderCount: 2, exact: true }, { cappedCellCount: 3, cappedOrderCount: 4, exact: false });
162
+ expect(merged).toEqual({ cappedCellCount: 4, cappedOrderCount: 6, exact: false });
163
+ expect((0, cap_metadata_1.mergeReportCapMetadata)(null, cap_metadata_1.EMPTY_REPORT_CAP_METADATA).exact).toBe(true);
164
+ });
165
+ it('selects top-N deterministically and folds the rest into __OTHER__', () => {
166
+ const entries = Array.from({ length: 51 }, (_, index) => ({
167
+ key: `City-${String(index).padStart(2, '0')}`,
168
+ count: 1,
169
+ }));
170
+ const selection = (0, top_n_1.selectReportTopN)(entries, 50);
171
+ expect(selection.kept).toHaveLength(50);
172
+ expect(selection.dropped).toEqual(['City-50']);
173
+ expect(selection.other).toBe(top_n_1.REPORT_OTHER_TOKEN);
174
+ expect((0, top_n_1.resolveReportTopNKey)(selection, 'City-50')).toBe(top_n_1.REPORT_OTHER_TOKEN);
175
+ expect((0, top_n_1.resolveReportTopNKey)(selection, 'City-00')).toBe('City-00');
176
+ });
177
+ });
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const fs_1 = __importDefault(require("fs"));
40
+ const path_1 = __importDefault(require("path"));
41
+ const MATERIALIZED_REPORTS_1 = require("../../../constants/MATERIALIZED_REPORTS");
42
+ const overviewModel = __importStar(require("../../../schemas/models/materialized_tenant_sales_overview_reports"));
43
+ const creditModel = __importStar(require("../../../schemas/models/materialized_credit_bills"));
44
+ const discountReportModel = __importStar(require("../../../schemas/models/materialized_tenant_discount_reports"));
45
+ const discountEntryModel = __importStar(require("../../../schemas/models/materialized_tenant_discount_entries"));
46
+ const discountSourceModel = __importStar(require("../../../schemas/models/materialized_tenant_discount_sources"));
47
+ const prepReportModel = __importStar(require("../../../schemas/models/materialized_tenant_prep_time_reports"));
48
+ const prepEntryModel = __importStar(require("../../../schemas/models/materialized_tenant_prep_time_entries"));
49
+ const deliveryReportModel = __importStar(require("../../../schemas/models/materialized_tenant_delivery_reports"));
50
+ const deliveryEntryModel = __importStar(require("../../../schemas/models/materialized_tenant_delivery_entries"));
51
+ const deliveryGeoModel = __importStar(require("../../../schemas/models/materialized_tenant_delivery_geo_cells"));
52
+ const flatModel = __importStar(require("../../../schemas/models/materialized_report_drilldown_rows"));
53
+ const definition_1 = require("../../../helpers/materialized-reports/report-platform/definition");
54
+ const registry_1 = require("../../../helpers/materialized-reports/report-platform/registry");
55
+ const validate_report_registry_1 = require("../../../helpers/materialized-reports/report-platform/validate-report-registry");
56
+ const report_contract_1 = require("../../../helpers/reporting-contract/report-contract");
57
+ const MODEL_BY_COLLECTION = {
58
+ materialized_tenant_sales_overview_reports: {
59
+ collectionName: overviewModel.MATERIALIZED_TENANT_SALES_OVERVIEW_REPORTS_COLLECTION_NAME,
60
+ schemaVersion: overviewModel.MATERIALIZED_TENANT_SALES_OVERVIEW_REPORTS_SCHEMA_VERSION,
61
+ indexOptions: overviewModel.MATERIALIZED_TENANT_SALES_OVERVIEW_REPORTS_INDEX_OPTIONS,
62
+ },
63
+ materialized_tenant_credit_bills: {
64
+ collectionName: creditModel.MATERIALIZED_TENANT_CREDIT_BILLS_COLLECTION_NAME,
65
+ schemaVersion: creditModel.MATERIALIZED_CREDIT_BILLS_SCHEMA_VERSION,
66
+ indexOptions: creditModel.MATERIALIZED_TENANT_CREDIT_BILLS_INDEX_OPTIONS,
67
+ },
68
+ materialized_tenant_discount_reports: {
69
+ collectionName: discountReportModel.MATERIALIZED_TENANT_DISCOUNT_REPORTS_COLLECTION_NAME,
70
+ schemaVersion: discountReportModel.MATERIALIZED_TENANT_DISCOUNT_REPORTS_SCHEMA_VERSION,
71
+ indexOptions: discountReportModel.MATERIALIZED_TENANT_DISCOUNT_REPORTS_INDEX_OPTIONS,
72
+ },
73
+ materialized_tenant_discount_entries: {
74
+ collectionName: discountEntryModel.MATERIALIZED_TENANT_DISCOUNT_ENTRIES_COLLECTION_NAME,
75
+ schemaVersion: discountEntryModel.MATERIALIZED_TENANT_DISCOUNT_ENTRIES_SCHEMA_VERSION,
76
+ indexOptions: discountEntryModel.MATERIALIZED_TENANT_DISCOUNT_ENTRIES_INDEX_OPTIONS,
77
+ },
78
+ materialized_tenant_discount_sources: {
79
+ collectionName: discountSourceModel.MATERIALIZED_TENANT_DISCOUNT_SOURCES_COLLECTION_NAME,
80
+ schemaVersion: discountSourceModel.MATERIALIZED_TENANT_DISCOUNT_SOURCES_SCHEMA_VERSION,
81
+ indexOptions: discountSourceModel.MATERIALIZED_TENANT_DISCOUNT_SOURCES_INDEX_OPTIONS,
82
+ },
83
+ materialized_tenant_prep_time_reports: {
84
+ collectionName: prepReportModel.MATERIALIZED_TENANT_PREP_TIME_REPORTS_COLLECTION_NAME,
85
+ schemaVersion: prepReportModel.MATERIALIZED_TENANT_PREP_TIME_REPORTS_SCHEMA_VERSION,
86
+ indexOptions: prepReportModel.MATERIALIZED_TENANT_PREP_TIME_REPORTS_INDEX_OPTIONS,
87
+ },
88
+ materialized_tenant_prep_time_entries: {
89
+ collectionName: prepEntryModel.MATERIALIZED_TENANT_PREP_TIME_ENTRIES_COLLECTION_NAME,
90
+ schemaVersion: prepEntryModel.MATERIALIZED_TENANT_PREP_TIME_ENTRIES_SCHEMA_VERSION,
91
+ indexOptions: prepEntryModel.MATERIALIZED_TENANT_PREP_TIME_ENTRIES_INDEX_OPTIONS,
92
+ },
93
+ materialized_tenant_delivery_reports: {
94
+ collectionName: deliveryReportModel.MATERIALIZED_TENANT_DELIVERY_REPORTS_COLLECTION_NAME,
95
+ schemaVersion: deliveryReportModel.MATERIALIZED_TENANT_DELIVERY_REPORTS_SCHEMA_VERSION,
96
+ indexOptions: deliveryReportModel.MATERIALIZED_TENANT_DELIVERY_REPORTS_INDEX_OPTIONS,
97
+ },
98
+ materialized_tenant_delivery_entries: {
99
+ collectionName: deliveryEntryModel.MATERIALIZED_TENANT_DELIVERY_ENTRIES_COLLECTION_NAME,
100
+ schemaVersion: deliveryEntryModel.MATERIALIZED_TENANT_DELIVERY_ENTRIES_SCHEMA_VERSION,
101
+ indexOptions: deliveryEntryModel.MATERIALIZED_TENANT_DELIVERY_ENTRIES_INDEX_OPTIONS,
102
+ },
103
+ materialized_tenant_delivery_geo_cells: {
104
+ collectionName: deliveryGeoModel.MATERIALIZED_TENANT_DELIVERY_GEO_CELLS_COLLECTION_NAME,
105
+ schemaVersion: MATERIALIZED_REPORTS_1.MATERIALIZED_TENANT_DELIVERY_GEO_CELLS_SCHEMA_VERSION,
106
+ indexOptions: deliveryGeoModel.MATERIALIZED_TENANT_DELIVERY_GEO_CELLS_INDEX_OPTIONS,
107
+ },
108
+ materialized_tenant_delivery_geo_scopes: {
109
+ collectionName: 'materialized_tenant_delivery_geo_scopes',
110
+ schemaVersion: MATERIALIZED_REPORTS_1.MATERIALIZED_TENANT_DELIVERY_GEO_SCOPES_SCHEMA_VERSION,
111
+ indexOptions: [],
112
+ },
113
+ materialized_report_drilldown_rows: {
114
+ collectionName: flatModel.MATERIALIZED_REPORT_DRILLDOWN_ROWS_COLLECTION_NAME,
115
+ schemaVersion: flatModel.MATERIALIZED_REPORT_DRILLDOWN_ROWS_SCHEMA_VERSION,
116
+ indexOptions: flatModel.MATERIALIZED_REPORT_DRILLDOWN_ROWS_INDEX_OPTIONS,
117
+ },
118
+ materialized_report_drilldown_scopes: {
119
+ collectionName: flatModel.MATERIALIZED_REPORT_DRILLDOWN_SCOPES_COLLECTION_NAME,
120
+ schemaVersion: flatModel.MATERIALIZED_REPORT_DRILLDOWN_ROWS_SCHEMA_VERSION,
121
+ indexOptions: flatModel.MATERIALIZED_REPORT_DRILLDOWN_SCOPES_INDEX_OPTIONS,
122
+ },
123
+ };
124
+ const definitionCollections = () => definition_1.PRODUCTION_REPORT_DEFINITIONS.flatMap((definition) => [
125
+ definition.report,
126
+ ...(definition.entries == null ? [] : [definition.entries]),
127
+ ...definition.sideCollections,
128
+ ]);
129
+ describe('report registry conformance', () => {
130
+ it('defines exactly the four production reports', () => {
131
+ expect(definition_1.PRODUCTION_REPORT_DEFINITIONS.map((definition) => definition.key)).toEqual([
132
+ report_contract_1.REPORT_KEY_ENUM.OVERVIEW,
133
+ report_contract_1.REPORT_KEY_ENUM.DISCOUNTS,
134
+ report_contract_1.REPORT_KEY_ENUM.PREP_TIME,
135
+ report_contract_1.REPORT_KEY_ENUM.DELIVERY,
136
+ ]);
137
+ expect((0, registry_1.getProductionReportDefinitions)()).toHaveLength(4);
138
+ expect(new Set(definition_1.PRODUCTION_REPORT_DEFINITIONS.map((definition) => definition.key)).size).toBe(4);
139
+ expect(definition_1.PRODUCTION_REPORT_DEFINITIONS.every((definition) => definition.status === 'PRODUCTION')).toBe(true);
140
+ });
141
+ it('covers every REPORT_KEY with a definition or an explicit exemption', () => {
142
+ for (const key of report_contract_1.ALL_REPORT_KEYS) {
143
+ const definition = (0, registry_1.getReportDefinition)(key);
144
+ const exemption = definition_1.REPORT_REGISTRY_EXEMPTIONS[key];
145
+ expect(definition != null || exemption != null).toBe(true);
146
+ expect(definition != null && exemption != null).toBe(false);
147
+ }
148
+ });
149
+ it('has no metadata validation errors', () => {
150
+ const validation = (0, validate_report_registry_1.validateReportRegistry)();
151
+ expect(validation.errors).toEqual([]);
152
+ expect(validation.ok).toBe(true);
153
+ });
154
+ it('declares a collection, schema version and index ownership that exist', () => {
155
+ for (const definition of definition_1.PRODUCTION_REPORT_DEFINITIONS) {
156
+ for (const collection of [
157
+ definition.report,
158
+ ...(definition.entries == null ? [] : [definition.entries]),
159
+ ...definition.sideCollections,
160
+ ]) {
161
+ const facts = MODEL_BY_COLLECTION[collection.name];
162
+ expect(facts).toBeDefined();
163
+ expect(facts.collectionName).toBe(collection.name);
164
+ expect(facts.schemaVersion).toBe(collection.schemaVersion);
165
+ expect(collection.indexOwner).toMatch(/^toolkit:/);
166
+ }
167
+ }
168
+ });
169
+ it('declares a positive budget for every collection', () => {
170
+ for (const definition of definition_1.PRODUCTION_REPORT_DEFINITIONS) {
171
+ for (const collection of [
172
+ definition.report,
173
+ ...(definition.entries == null ? [] : [definition.entries]),
174
+ ...definition.sideCollections,
175
+ ]) {
176
+ expect(definition.budgets[collection.name]).toBe(collection.budgetBytes);
177
+ expect(collection.budgetBytes).toBeGreaterThan(0);
178
+ }
179
+ }
180
+ });
181
+ it('keeps entry scopes inside report scopes and respects the month cap', () => {
182
+ for (const definition of definition_1.PRODUCTION_REPORT_DEFINITIONS) {
183
+ for (const scope of definition.entryScopes) {
184
+ expect(definition.reportScopes).toContain(scope);
185
+ }
186
+ if (definition.entryScopes.length > 0) {
187
+ expect(definition.maxEntryScope).toBe('localMonth');
188
+ }
189
+ }
190
+ });
191
+ it('declares every collection owner and validator ownership (file or explicit debt)', () => {
192
+ const seen = new Set();
193
+ for (const collection of definitionCollections()) {
194
+ expect(collection.indexOwner.trim().length).toBeGreaterThan(0);
195
+ if (collection.validatorFile == null) {
196
+ expect(collection.validatorDebt?.trim().length ?? 0).toBeGreaterThan(0);
197
+ }
198
+ seen.add(collection.name);
199
+ }
200
+ expect(seen.size).toBeGreaterThanOrEqual(10);
201
+ });
202
+ it('keeps metadata files free of forbidden runtime imports', () => {
203
+ const directory = path_1.default.join(process.cwd(), 'src/helpers/materialized-reports/report-platform');
204
+ for (const file of ['definition.ts', 'registry.ts', 'validate-report-registry.ts']) {
205
+ const source = fs_1.default.readFileSync(path_1.default.join(directory, file), 'utf8');
206
+ const code = source.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/.*$/gm, '');
207
+ expect(code).not.toMatch(/from ['"]mongoose['"]/);
208
+ expect(code).not.toMatch(/from ['"]express['"]/);
209
+ expect(code).not.toMatch(/from ['"][^'"]*workers-service/);
210
+ expect(code).not.toMatch(/from ['"][^'"]*operations-service/);
211
+ expect(code).not.toMatch(/from ['"][^'"]*schemas\/models/);
212
+ }
213
+ });
214
+ });
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const definition_1 = require("../../../helpers/materialized-reports/report-platform/definition");
4
+ const validate_report_registry_1 = require("../../../helpers/materialized-reports/report-platform/validate-report-registry");
5
+ const report_contract_1 = require("../../../helpers/reporting-contract/report-contract");
6
+ /**
7
+ * PHASE 2 — registry validator negative cases.
8
+ *
9
+ * Each case mutates ONE field of a valid definition and proves the validator
10
+ * fails for the reason the Phase 2 brief names.
11
+ */
12
+ const clone = (value) => JSON.parse(JSON.stringify(value));
13
+ const definitions = () => Object.fromEntries(clone(definition_1.PRODUCTION_REPORT_DEFINITIONS).map((definition) => [definition.key, definition]));
14
+ const run = (mutate) => {
15
+ const copy = definitions();
16
+ mutate(copy[report_contract_1.REPORT_KEY_ENUM.OVERVIEW]);
17
+ return (0, validate_report_registry_1.validateReportRegistry)({ definitions: copy });
18
+ };
19
+ describe('report registry validator', () => {
20
+ it('rejects a REPORT_KEY with no definition and no exemption', () => {
21
+ const copy = definitions();
22
+ delete copy[report_contract_1.REPORT_KEY_ENUM.DELIVERY];
23
+ const validation = (0, validate_report_registry_1.validateReportRegistry)({
24
+ definitions: copy,
25
+ exemptions: { ...definition_1.REPORT_REGISTRY_EXEMPTIONS },
26
+ });
27
+ expect(validation.ok).toBe(false);
28
+ expect(validation.errors.some((error) => error.includes('DELIVERY'))).toBe(true);
29
+ });
30
+ it('rejects a missing writer adapter', () => {
31
+ const validation = run((definition) => {
32
+ definition.adapters.writer = '';
33
+ });
34
+ expect(validation.errors.some((error) => error.includes('writer adapter'))).toBe(true);
35
+ });
36
+ it('rejects a missing live adapter', () => {
37
+ const validation = run((definition) => {
38
+ definition.adapters.live = '';
39
+ });
40
+ expect(validation.errors.some((error) => error.includes('live adapter'))).toBe(true);
41
+ });
42
+ it('rejects a missing historical adapter', () => {
43
+ const validation = run((definition) => {
44
+ definition.adapters.historical = '';
45
+ });
46
+ expect(validation.errors.some((error) => error.includes('historical adapter'))).toBe(true);
47
+ });
48
+ it('rejects a schema version that is not positive', () => {
49
+ const validation = run((definition) => {
50
+ definition.report.schemaVersion = 0;
51
+ });
52
+ expect(validation.errors.some((error) => error.includes('schema version'))).toBe(true);
53
+ });
54
+ it('rejects an entry scope outside report scopes', () => {
55
+ const validation = run((definition) => {
56
+ definition.entryScopes = ['localMonth'];
57
+ definition.reportScopes = ['localDate'];
58
+ });
59
+ expect(validation.errors.some((error) => error.includes('outside reportScopes'))).toBe(true);
60
+ });
61
+ it('rejects a collection without a budget declaration', () => {
62
+ const validation = run((definition) => {
63
+ delete definition.budgets[definition.report.name];
64
+ });
65
+ expect(validation.errors.some((error) => error.includes('no budget declaration'))).toBe(true);
66
+ });
67
+ it('rejects a collection without index ownership', () => {
68
+ const validation = run((definition) => {
69
+ definition.report.indexOwner = '';
70
+ });
71
+ expect(validation.errors.some((error) => error.includes('index ownership'))).toBe(true);
72
+ });
73
+ it('rejects a validator omission without an explicit debt note', () => {
74
+ const validation = run((definition) => {
75
+ definition.report.validatorFile = null;
76
+ delete definition.report.validatorDebt;
77
+ });
78
+ expect(validation.errors.some((error) => error.includes('validator'))).toBe(true);
79
+ });
80
+ it('rejects capabilities that disagree with the shared matrix', () => {
81
+ const validation = run((definition) => {
82
+ definition.capabilities.details = true;
83
+ definition.adapters.details = 'unexpected';
84
+ });
85
+ expect(validation.errors.some((error) => error.includes('REPORT_CAPABILITIES'))).toBe(true);
86
+ });
87
+ it('rejects a details capability without a details adapter', () => {
88
+ const validation = run((definition) => {
89
+ definition.key = report_contract_1.REPORT_KEY_ENUM.DISCOUNTS;
90
+ definition.segment = 'discounts';
91
+ definition.capabilities = { live: true, historical: true, details: true };
92
+ delete definition.adapters.details;
93
+ });
94
+ expect(validation.errors.some((error) => error.includes('no details adapter'))).toBe(true);
95
+ });
96
+ it('rejects #N splitting on a non-page entry strategy', () => {
97
+ const validation = run((definition) => {
98
+ definition.entryStorage = 'ONE_PER_SCOPE';
99
+ definition.entrySplit = 'DETERMINISTIC_SUBPAGES';
100
+ });
101
+ expect(validation.errors.some((error) => error.includes('#N splitting'))).toBe(true);
102
+ });
103
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.4.53",
3
+ "version": "0.4.54",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -27,7 +27,9 @@
27
27
  "fixtures:prep-time-parity": "tsx scripts/analyze-prep-time-parity.ts",
28
28
  "fixtures:delivery": "tsx scripts/analyze-delivery.ts",
29
29
  "sim:close-day": "tsx simulations/simulate-day-close.ts",
30
- "wipe:delivery": "tsx scripts/wipe-delivery-materialization.ts"
30
+ "wipe:delivery": "tsx scripts/wipe-delivery-materialization.ts",
31
+ "measure:report-scale": "npx tsx scripts/measure-report-practical-scale.ts",
32
+ "test:characterization": "jest --config jestconfig.json src/tests/materialized-reports/characterization --runInBand"
31
33
  },
32
34
  "dependencies": {
33
35
  "bson-objectid": "^2.0.4",