@happyvertical/smrt-reports 0.40.70 → 0.42.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/README.md CHANGED
@@ -4,8 +4,10 @@ Materialized aggregate reports for s-m-r-t. Define a report as a decorated class
4
4
  compile it to a portable aggregate query, and refresh its normal s-m-r-t table
5
5
  manually, on a schedule, after source changes, or when a TTL expires.
6
6
 
7
- Runtime refresh verifies schema but does not create report or system tables.
8
- Include report models in normal manifest-driven migrations before refreshing.
7
+ Runtime refresh checks that its tables exist (existence only, not columns or
8
+ indexes) and fails clearly if they do not; it does not create report or system
9
+ tables. Include report models in normal manifest-driven migrations before
10
+ refreshing.
9
11
 
10
12
  ## Installation
11
13
 
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-reports",
5
- "packageVersion": "0.40.70",
5
+ "packageVersion": "0.42.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-reports:SmrtReport": {
8
8
  "name": "smrtreport",
@@ -198,7 +198,12 @@
198
198
  "mcp": false,
199
199
  "tenantScoped": {
200
200
  "mode": "optional"
201
- }
201
+ },
202
+ "conflictColumns": [
203
+ "tenant_id",
204
+ "slug",
205
+ "context"
206
+ ]
202
207
  },
203
208
  "extends": "SmrtObject",
204
209
  "exportName": "SmrtReportRefreshTask",
@@ -277,24 +282,20 @@
277
282
  }
278
283
  },
279
284
  "indexes": [
280
- {
281
- "name": "_smrt_report_refresh_tasks_id_idx",
282
- "columns": [
283
- "id"
284
- ]
285
- },
286
285
  {
287
286
  "name": "_smrt_report_refresh_tasks_slug_context_idx",
288
287
  "columns": [
288
+ "tenant_id",
289
289
  "slug",
290
290
  "context"
291
291
  ],
292
292
  "unique": true
293
293
  },
294
294
  {
295
- "name": "_smrt_report_refresh_tasks_tenant_id_idx",
295
+ "name": "_smrt_report_refresh_tasks_tenant_id_created_at_idx",
296
296
  "columns": [
297
- "tenant_id"
297
+ "tenant_id",
298
+ "created_at"
298
299
  ]
299
300
  }
300
301
  ],
@@ -439,7 +440,12 @@
439
440
  "mcp": false,
440
441
  "tenantScoped": {
441
442
  "mode": "optional"
442
- }
443
+ },
444
+ "conflictColumns": [
445
+ "tenant_id",
446
+ "slug",
447
+ "context"
448
+ ]
443
449
  },
444
450
  "extends": "SmrtObject",
445
451
  "exportName": "SmrtReportRun",
@@ -598,24 +604,20 @@
598
604
  }
599
605
  },
600
606
  "indexes": [
601
- {
602
- "name": "_smrt_report_runs_id_idx",
603
- "columns": [
604
- "id"
605
- ]
606
- },
607
607
  {
608
608
  "name": "_smrt_report_runs_slug_context_idx",
609
609
  "columns": [
610
+ "tenant_id",
610
611
  "slug",
611
612
  "context"
612
613
  ],
613
614
  "unique": true
614
615
  },
615
616
  {
616
- "name": "_smrt_report_runs_tenant_id_idx",
617
+ "name": "_smrt_report_runs_tenant_id_created_at_idx",
617
618
  "columns": [
618
- "tenant_id"
619
+ "tenant_id",
620
+ "created_at"
619
621
  ]
620
622
  }
621
623
  ],
@@ -669,12 +671,6 @@
669
671
  }
670
672
  },
671
673
  "indexes": [
672
- {
673
- "name": "_smrt_report_runs_id_idx",
674
- "columns": [
675
- "id"
676
- ]
677
- },
678
674
  {
679
675
  "name": "_smrt_report_runs_slug_context_idx",
680
676
  "columns": [
@@ -682,6 +678,12 @@
682
678
  "context"
683
679
  ],
684
680
  "unique": true
681
+ },
682
+ {
683
+ "name": "_smrt_report_runs_created_at_idx",
684
+ "columns": [
685
+ "created_at"
686
+ ]
685
687
  }
686
688
  ],
687
689
  "version": "f7804285"
@@ -871,12 +873,6 @@
871
873
  }
872
874
  },
873
875
  "indexes": [
874
- {
875
- "name": "_smrt_report_watermarks_id_idx",
876
- "columns": [
877
- "id"
878
- ]
879
- },
880
876
  {
881
877
  "name": "_smrt_report_watermarks_report_class_scope_key_idx",
882
878
  "columns": [
@@ -888,9 +884,17 @@
888
884
  "unique": true
889
885
  },
890
886
  {
891
- "name": "_smrt_report_watermarks_tenant_id_idx",
887
+ "name": "_smrt_report_watermarks_slug_context_idx",
888
+ "columns": [
889
+ "slug",
890
+ "context"
891
+ ]
892
+ },
893
+ {
894
+ "name": "_smrt_report_watermarks_tenant_id_created_at_idx",
892
895
  "columns": [
893
- "tenant_id"
896
+ "tenant_id",
897
+ "created_at"
894
898
  ]
895
899
  }
896
900
  ],
@@ -944,12 +948,6 @@
944
948
  }
945
949
  },
946
950
  "indexes": [
947
- {
948
- "name": "_smrt_report_watermarks_id_idx",
949
- "columns": [
950
- "id"
951
- ]
952
- },
953
951
  {
954
952
  "name": "_smrt_report_watermarks_slug_context_idx",
955
953
  "columns": [
@@ -957,6 +955,12 @@
957
955
  "context"
958
956
  ],
959
957
  "unique": true
958
+ },
959
+ {
960
+ "name": "_smrt_report_watermarks_created_at_idx",
961
+ "columns": [
962
+ "created_at"
963
+ ]
960
964
  }
961
965
  ],
962
966
  "version": "f334c521"
@@ -1134,12 +1138,6 @@
1134
1138
  }
1135
1139
  },
1136
1140
  "indexes": [
1137
- {
1138
- "name": "_smrt_report_locks_id_idx",
1139
- "columns": [
1140
- "id"
1141
- ]
1142
- },
1143
1141
  {
1144
1142
  "name": "_smrt_report_locks_report_class_scope_key_idx",
1145
1143
  "columns": [
@@ -1149,9 +1147,17 @@
1149
1147
  "unique": true
1150
1148
  },
1151
1149
  {
1152
- "name": "_smrt_report_locks_tenant_id_idx",
1150
+ "name": "_smrt_report_locks_slug_context_idx",
1151
+ "columns": [
1152
+ "slug",
1153
+ "context"
1154
+ ]
1155
+ },
1156
+ {
1157
+ "name": "_smrt_report_locks_tenant_id_created_at_idx",
1153
1158
  "columns": [
1154
- "tenant_id"
1159
+ "tenant_id",
1160
+ "created_at"
1155
1161
  ]
1156
1162
  }
1157
1163
  ],
@@ -1205,12 +1211,6 @@
1205
1211
  }
1206
1212
  },
1207
1213
  "indexes": [
1208
- {
1209
- "name": "_smrt_report_locks_id_idx",
1210
- "columns": [
1211
- "id"
1212
- ]
1213
- },
1214
1214
  {
1215
1215
  "name": "_smrt_report_locks_slug_context_idx",
1216
1216
  "columns": [
@@ -1218,6 +1218,12 @@
1218
1218
  "context"
1219
1219
  ],
1220
1220
  "unique": true
1221
+ },
1222
+ {
1223
+ "name": "_smrt_report_locks_created_at_idx",
1224
+ "columns": [
1225
+ "created_at"
1226
+ ]
1221
1227
  }
1222
1228
  ],
1223
1229
  "version": "31c32d3d"
@@ -1618,12 +1624,6 @@
1618
1624
  }
1619
1625
  },
1620
1626
  "indexes": [
1621
- {
1622
- "name": "_smrt_report_schedules_id_idx",
1623
- "columns": [
1624
- "id"
1625
- ]
1626
- },
1627
1627
  {
1628
1628
  "name": "_smrt_report_schedules_report_class_scope_key_idx",
1629
1629
  "columns": [
@@ -1635,9 +1635,17 @@
1635
1635
  "unique": true
1636
1636
  },
1637
1637
  {
1638
- "name": "_smrt_report_schedules_tenant_id_idx",
1638
+ "name": "_smrt_report_schedules_slug_context_idx",
1639
1639
  "columns": [
1640
- "tenant_id"
1640
+ "slug",
1641
+ "context"
1642
+ ]
1643
+ },
1644
+ {
1645
+ "name": "_smrt_report_schedules_tenant_id_created_at_idx",
1646
+ "columns": [
1647
+ "tenant_id",
1648
+ "created_at"
1641
1649
  ]
1642
1650
  }
1643
1651
  ],
@@ -1691,12 +1699,6 @@
1691
1699
  }
1692
1700
  },
1693
1701
  "indexes": [
1694
- {
1695
- "name": "_smrt_report_schedules_id_idx",
1696
- "columns": [
1697
- "id"
1698
- ]
1699
- },
1700
1702
  {
1701
1703
  "name": "_smrt_report_schedules_slug_context_idx",
1702
1704
  "columns": [
@@ -1704,6 +1706,12 @@
1704
1706
  "context"
1705
1707
  ],
1706
1708
  "unique": true
1709
+ },
1710
+ {
1711
+ "name": "_smrt_report_schedules_created_at_idx",
1712
+ "columns": [
1713
+ "created_at"
1714
+ ]
1707
1715
  }
1708
1716
  ],
1709
1717
  "version": "437fad71"
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-reports",
6
- "packageVersion": "0.40.70",
6
+ "packageVersion": "0.42.0",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "2ff819a4bb6c4fb6e3f7a8c55f76b84ba5fa3f1757dbfaa85c3724bfb2a48d91",
11
- "packageJson": "ff52d348167ed07ff5cf9a7fb08bf4c98dd4ad0a010e9eeae7af1ff78fcca506",
10
+ "manifest": "1bbfbbbaf1293d7cec7edcd7b9402d74913e7173e641d1b1ec93784ae1c07879",
11
+ "packageJson": "1ed6e1e4a536ee40be5e6d9de1955735896d19031436e5f6ee9183fbde4f1b6e",
12
12
  "agents": "bf851be60baab2fd98149165885f70c4f4979123ff72bf8f4b43edfae4478e87"
13
13
  },
14
14
  "exports": [
@@ -188,6 +188,11 @@
188
188
  "mode": "optional",
189
189
  "field": "tenantId"
190
190
  },
191
+ "conflictColumns": [
192
+ "tenant_id",
193
+ "slug",
194
+ "context"
195
+ ],
191
196
  "surfaces": [
192
197
  {
193
198
  "kind": "cli",
@@ -314,6 +319,11 @@
314
319
  "mode": "optional",
315
320
  "field": "tenantId"
316
321
  },
322
+ "conflictColumns": [
323
+ "tenant_id",
324
+ "slug",
325
+ "context"
326
+ ],
317
327
  "surfaces": [
318
328
  {
319
329
  "kind": "cli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-reports",
3
- "version": "0.40.70",
3
+ "version": "0.42.0",
4
4
  "description": "Materialized aggregate report models for SMRT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,16 +44,16 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@happyvertical/sql": "^0.88.0",
47
- "@happyvertical/smrt-jobs": "0.40.70",
48
- "@happyvertical/smrt-core": "0.40.70",
49
- "@happyvertical/smrt-tenancy": "0.40.70"
47
+ "@happyvertical/smrt-core": "0.42.0",
48
+ "@happyvertical/smrt-jobs": "0.42.0",
49
+ "@happyvertical/smrt-tenancy": "0.42.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "24.13.2",
53
53
  "typescript": "5.9.3",
54
54
  "vite": "8.1.4",
55
55
  "vitest": "4.1.10",
56
- "@happyvertical/smrt-vitest": "0.40.70"
56
+ "@happyvertical/smrt-vitest": "0.42.0"
57
57
  },
58
58
  "keywords": [
59
59
  "ai",