@hublo/sentinel 1.7.0-alpha.3 → 1.7.0-alpha.31

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 (70) hide show
  1. package/README.md +4 -0
  2. package/dist/bin/sentinel.js +95 -82
  3. package/dist/chunk-2DUG6GVU.js +19301 -0
  4. package/dist/chunk-F5WISUN3.js +17 -0
  5. package/dist/chunk-F5WISUN3.js.map +1 -0
  6. package/dist/{chunk-P6KTBQ2Q.js → chunk-FZLUCPST.js} +24 -15
  7. package/dist/{chunk-ZNANJEMK.js → chunk-KKHKRY7P.js} +40 -16
  8. package/dist/chunk-KKHKRY7P.js.map +1 -0
  9. package/dist/chunk-NE3IEJBN.js +59 -0
  10. package/dist/chunk-NE3IEJBN.js.map +1 -0
  11. package/dist/chunk-NGLEGAEN.js +190 -0
  12. package/dist/chunk-NGLEGAEN.js.map +1 -0
  13. package/dist/chunk-PXTU5MPW.js +9 -0
  14. package/dist/chunk-PXTU5MPW.js.map +1 -0
  15. package/dist/{chunk-4YQXLPJ5.js → chunk-QMIJ4ZGJ.js} +2 -2
  16. package/dist/chunk-TMVKYXZ3.js +18 -0
  17. package/dist/chunk-TMVKYXZ3.js.map +1 -0
  18. package/dist/chunk-U7G2Y6YC.js +15 -0
  19. package/dist/chunk-U7G2Y6YC.js.map +1 -0
  20. package/dist/chunk-VWASE6NN.js +34 -0
  21. package/dist/chunk-VWASE6NN.js.map +1 -0
  22. package/dist/{chunk-THTXP2QU.js → chunk-XMAXE2Q2.js} +10 -7
  23. package/dist/chunk-XMAXE2Q2.js.map +1 -0
  24. package/dist/chunk-XYOIXC6A.js +126 -0
  25. package/dist/chunk-XYOIXC6A.js.map +1 -0
  26. package/dist/chunk-ZZMYV576.js +297 -0
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +14 -5
  29. package/dist/{migrate-NWQ3LYER.js → migrate-X7PB2X7R.js} +237 -228
  30. package/dist/roles/arch/config.d.ts +25 -0
  31. package/dist/roles/arch/config.js +8 -0
  32. package/dist/roles/arch/config.js.map +1 -0
  33. package/dist/roles/build/nest/toolchain.js +3 -3
  34. package/dist/roles/code-churn/config.d.ts +92 -0
  35. package/dist/roles/code-churn/config.js +10 -0
  36. package/dist/roles/code-churn/config.js.map +1 -0
  37. package/dist/roles/runtime-analysis/config.d.ts +97 -0
  38. package/dist/roles/runtime-analysis/config.js +10 -0
  39. package/dist/roles/runtime-analysis/config.js.map +1 -0
  40. package/dist/roles/runtime-analysis/gateway.d.ts +2 -0
  41. package/dist/roles/runtime-analysis/gateway.js +89 -0
  42. package/dist/roles/runtime-analysis/gateway.js.map +1 -0
  43. package/dist/roles/runtime-analysis/mock-api.d.ts +2 -0
  44. package/dist/roles/runtime-analysis/mock-api.js +43 -0
  45. package/dist/roles/runtime-analysis/mock-api.js.map +1 -0
  46. package/dist/roles/sql/config.d.ts +68 -0
  47. package/dist/roles/sql/config.js +8 -0
  48. package/dist/roles/sql/config.js.map +1 -0
  49. package/dist/roles/static-analysis/config.js +2 -1
  50. package/dist/roles/test/setup/file-boundary.js +3 -3
  51. package/dist/roles/test/setup/jest-parity.js +4 -4
  52. package/dist/roles/test/setup/workspace-entry.js +2 -2
  53. package/dist/{validate-4V3EGTXN.js → validate-GTBRD2M4.js} +2 -2
  54. package/docs/arch-adoption.md +201 -0
  55. package/docs/code-churn-adoption.md +237 -0
  56. package/docs/runtime-analysis-adoption.md +198 -0
  57. package/docs/sql-adoption.md +598 -0
  58. package/docs/static-analysis-adoption.md +1 -1
  59. package/docs/static-analysis-study.md +49 -10
  60. package/docs/typescript-adoption.md +47 -6
  61. package/docs/typescript-traces.md +512 -8
  62. package/docs/using-sentinel.md +4 -2
  63. package/package.json +25 -2
  64. package/runtime-analysis-deps/load.mjs +6 -0
  65. package/runtime-analysis-deps/package-lock.json +1766 -0
  66. package/runtime-analysis-deps/package.json +11 -0
  67. package/dist/chunk-F6ART7RH.js +0 -9555
  68. package/dist/chunk-THTXP2QU.js.map +0 -1
  69. package/dist/chunk-ZNANJEMK.js.map +0 -1
  70. /package/dist/{chunk-4YQXLPJ5.js.map → chunk-QMIJ4ZGJ.js.map} +0 -0
@@ -236,12 +236,12 @@ $ sentinel --report --json 2>/dev/null
236
236
  "typescript",
237
237
  "build",
238
238
  "test",
239
- "static-analysis"
240
- ],
241
- "skipped": [
242
- "runtime-analysis",
239
+ "static-analysis",
240
+ "sql",
241
+ "code-churn",
243
242
  "arch"
244
243
  ],
244
+ "skipped": [],
245
245
  "results": [
246
246
  {
247
247
  "project": "svelte-app",
@@ -319,6 +319,54 @@ $ sentinel --report --json 2>/dev/null
319
319
  "preset": null,
320
320
  "conformant": false
321
321
  },
322
+ {
323
+ "project": "svelte-app",
324
+ "target": "sql",
325
+ "flavour": "svelte",
326
+ "ok": true,
327
+ "status": "ok",
328
+ "migrations": 0,
329
+ "codeFiles": 1,
330
+ "unsafeFiles": 0,
331
+ "base": null,
332
+ "migrationsRead": 0,
333
+ "migrationsUnchanged": 0,
334
+ "migrationsUnread": 0,
335
+ "unsafeFilesRead": 0,
336
+ "unsafeCalls": 0,
337
+ "rawFragmentCalls": 0,
338
+ "unsafeUnparsed": 0,
339
+ "findings": 0,
340
+ "errors": 0,
341
+ "rulesOff": [],
342
+ "syntaxErrors": 0,
343
+ "findingsByRule": {},
344
+ "adopted": false,
345
+ "preset": null,
346
+ "conformant": false
347
+ },
348
+ {
349
+ "project": "svelte-app",
350
+ "target": "code-churn",
351
+ "flavour": "svelte",
352
+ "ok": true,
353
+ "status": "ok",
354
+ "files": 1,
355
+ "historyRead": false,
356
+ "adopted": false,
357
+ "preset": null,
358
+ "conformant": false
359
+ },
360
+ {
361
+ "project": "svelte-app",
362
+ "target": "arch",
363
+ "flavour": "svelte",
364
+ "ok": true,
365
+ "status": "ok",
366
+ "adopted": false,
367
+ "preset": null,
368
+ "conformant": false
369
+ },
322
370
  {
323
371
  "project": "bff-admin",
324
372
  "target": "lint",
@@ -395,6 +443,54 @@ $ sentinel --report --json 2>/dev/null
395
443
  "preset": null,
396
444
  "conformant": false
397
445
  },
446
+ {
447
+ "project": "bff-admin",
448
+ "target": "sql",
449
+ "flavour": "nest",
450
+ "ok": true,
451
+ "status": "ok",
452
+ "migrations": 0,
453
+ "codeFiles": 1,
454
+ "unsafeFiles": 0,
455
+ "base": null,
456
+ "migrationsRead": 0,
457
+ "migrationsUnchanged": 0,
458
+ "migrationsUnread": 0,
459
+ "unsafeFilesRead": 0,
460
+ "unsafeCalls": 0,
461
+ "rawFragmentCalls": 0,
462
+ "unsafeUnparsed": 0,
463
+ "findings": 0,
464
+ "errors": 0,
465
+ "rulesOff": [],
466
+ "syntaxErrors": 0,
467
+ "findingsByRule": {},
468
+ "adopted": false,
469
+ "preset": null,
470
+ "conformant": false
471
+ },
472
+ {
473
+ "project": "bff-admin",
474
+ "target": "code-churn",
475
+ "flavour": "nest",
476
+ "ok": true,
477
+ "status": "ok",
478
+ "files": 1,
479
+ "historyRead": false,
480
+ "adopted": false,
481
+ "preset": null,
482
+ "conformant": false
483
+ },
484
+ {
485
+ "project": "bff-admin",
486
+ "target": "arch",
487
+ "flavour": "nest",
488
+ "ok": true,
489
+ "status": "ok",
490
+ "adopted": false,
491
+ "preset": null,
492
+ "conformant": false
493
+ },
398
494
  {
399
495
  "project": "react-app",
400
496
  "target": "lint",
@@ -471,6 +567,54 @@ $ sentinel --report --json 2>/dev/null
471
567
  "preset": null,
472
568
  "conformant": false
473
569
  },
570
+ {
571
+ "project": "react-app",
572
+ "target": "sql",
573
+ "flavour": "react",
574
+ "ok": true,
575
+ "status": "ok",
576
+ "migrations": 0,
577
+ "codeFiles": 1,
578
+ "unsafeFiles": 0,
579
+ "base": null,
580
+ "migrationsRead": 0,
581
+ "migrationsUnchanged": 0,
582
+ "migrationsUnread": 0,
583
+ "unsafeFilesRead": 0,
584
+ "unsafeCalls": 0,
585
+ "rawFragmentCalls": 0,
586
+ "unsafeUnparsed": 0,
587
+ "findings": 0,
588
+ "errors": 0,
589
+ "rulesOff": [],
590
+ "syntaxErrors": 0,
591
+ "findingsByRule": {},
592
+ "adopted": false,
593
+ "preset": null,
594
+ "conformant": false
595
+ },
596
+ {
597
+ "project": "react-app",
598
+ "target": "code-churn",
599
+ "flavour": "react",
600
+ "ok": true,
601
+ "status": "ok",
602
+ "files": 1,
603
+ "historyRead": false,
604
+ "adopted": false,
605
+ "preset": null,
606
+ "conformant": false
607
+ },
608
+ {
609
+ "project": "react-app",
610
+ "target": "arch",
611
+ "flavour": "react",
612
+ "ok": true,
613
+ "status": "ok",
614
+ "adopted": false,
615
+ "preset": null,
616
+ "conformant": false
617
+ },
474
618
  {
475
619
  "project": "utils",
476
620
  "target": "lint",
@@ -534,6 +678,54 @@ $ sentinel --report --json 2>/dev/null
534
678
  "adopted": false,
535
679
  "preset": null,
536
680
  "conformant": false
681
+ },
682
+ {
683
+ "project": "utils",
684
+ "target": "sql",
685
+ "flavour": "node",
686
+ "ok": true,
687
+ "status": "ok",
688
+ "migrations": 0,
689
+ "codeFiles": 1,
690
+ "unsafeFiles": 0,
691
+ "base": null,
692
+ "migrationsRead": 0,
693
+ "migrationsUnchanged": 0,
694
+ "migrationsUnread": 0,
695
+ "unsafeFilesRead": 0,
696
+ "unsafeCalls": 0,
697
+ "rawFragmentCalls": 0,
698
+ "unsafeUnparsed": 0,
699
+ "findings": 0,
700
+ "errors": 0,
701
+ "rulesOff": [],
702
+ "syntaxErrors": 0,
703
+ "findingsByRule": {},
704
+ "adopted": false,
705
+ "preset": null,
706
+ "conformant": false
707
+ },
708
+ {
709
+ "project": "utils",
710
+ "target": "code-churn",
711
+ "flavour": "node",
712
+ "ok": true,
713
+ "status": "ok",
714
+ "files": 1,
715
+ "historyRead": false,
716
+ "adopted": false,
717
+ "preset": null,
718
+ "conformant": false
719
+ },
720
+ {
721
+ "project": "utils",
722
+ "target": "arch",
723
+ "flavour": "node",
724
+ "ok": true,
725
+ "status": "ok",
726
+ "adopted": false,
727
+ "preset": null,
728
+ "conformant": false
537
729
  }
538
730
  ]
539
731
  }
@@ -566,12 +758,12 @@ $ sentinel --report --all --json 2>/dev/null
566
758
  "typescript",
567
759
  "build",
568
760
  "test",
569
- "static-analysis"
570
- ],
571
- "skipped": [
572
- "runtime-analysis",
761
+ "static-analysis",
762
+ "sql",
763
+ "code-churn",
573
764
  "arch"
574
765
  ],
766
+ "skipped": [],
575
767
  "results": [
576
768
  {
577
769
  "project": "svelte-app",
@@ -649,6 +841,54 @@ $ sentinel --report --all --json 2>/dev/null
649
841
  "preset": null,
650
842
  "conformant": false
651
843
  },
844
+ {
845
+ "project": "svelte-app",
846
+ "target": "sql",
847
+ "flavour": "svelte",
848
+ "ok": true,
849
+ "status": "ok",
850
+ "migrations": 0,
851
+ "codeFiles": 1,
852
+ "unsafeFiles": 0,
853
+ "base": null,
854
+ "migrationsRead": 0,
855
+ "migrationsUnchanged": 0,
856
+ "migrationsUnread": 0,
857
+ "unsafeFilesRead": 0,
858
+ "unsafeCalls": 0,
859
+ "rawFragmentCalls": 0,
860
+ "unsafeUnparsed": 0,
861
+ "findings": 0,
862
+ "errors": 0,
863
+ "rulesOff": [],
864
+ "syntaxErrors": 0,
865
+ "findingsByRule": {},
866
+ "adopted": false,
867
+ "preset": null,
868
+ "conformant": false
869
+ },
870
+ {
871
+ "project": "svelte-app",
872
+ "target": "code-churn",
873
+ "flavour": "svelte",
874
+ "ok": true,
875
+ "status": "ok",
876
+ "files": 1,
877
+ "historyRead": false,
878
+ "adopted": false,
879
+ "preset": null,
880
+ "conformant": false
881
+ },
882
+ {
883
+ "project": "svelte-app",
884
+ "target": "arch",
885
+ "flavour": "svelte",
886
+ "ok": true,
887
+ "status": "ok",
888
+ "adopted": false,
889
+ "preset": null,
890
+ "conformant": false
891
+ },
652
892
  {
653
893
  "project": "bff-admin",
654
894
  "target": "lint",
@@ -725,6 +965,54 @@ $ sentinel --report --all --json 2>/dev/null
725
965
  "preset": null,
726
966
  "conformant": false
727
967
  },
968
+ {
969
+ "project": "bff-admin",
970
+ "target": "sql",
971
+ "flavour": "nest",
972
+ "ok": true,
973
+ "status": "ok",
974
+ "migrations": 0,
975
+ "codeFiles": 1,
976
+ "unsafeFiles": 0,
977
+ "base": null,
978
+ "migrationsRead": 0,
979
+ "migrationsUnchanged": 0,
980
+ "migrationsUnread": 0,
981
+ "unsafeFilesRead": 0,
982
+ "unsafeCalls": 0,
983
+ "rawFragmentCalls": 0,
984
+ "unsafeUnparsed": 0,
985
+ "findings": 0,
986
+ "errors": 0,
987
+ "rulesOff": [],
988
+ "syntaxErrors": 0,
989
+ "findingsByRule": {},
990
+ "adopted": false,
991
+ "preset": null,
992
+ "conformant": false
993
+ },
994
+ {
995
+ "project": "bff-admin",
996
+ "target": "code-churn",
997
+ "flavour": "nest",
998
+ "ok": true,
999
+ "status": "ok",
1000
+ "files": 1,
1001
+ "historyRead": false,
1002
+ "adopted": false,
1003
+ "preset": null,
1004
+ "conformant": false
1005
+ },
1006
+ {
1007
+ "project": "bff-admin",
1008
+ "target": "arch",
1009
+ "flavour": "nest",
1010
+ "ok": true,
1011
+ "status": "ok",
1012
+ "adopted": false,
1013
+ "preset": null,
1014
+ "conformant": false
1015
+ },
728
1016
  {
729
1017
  "project": "react-app",
730
1018
  "target": "lint",
@@ -801,6 +1089,54 @@ $ sentinel --report --all --json 2>/dev/null
801
1089
  "preset": null,
802
1090
  "conformant": false
803
1091
  },
1092
+ {
1093
+ "project": "react-app",
1094
+ "target": "sql",
1095
+ "flavour": "react",
1096
+ "ok": true,
1097
+ "status": "ok",
1098
+ "migrations": 0,
1099
+ "codeFiles": 1,
1100
+ "unsafeFiles": 0,
1101
+ "base": null,
1102
+ "migrationsRead": 0,
1103
+ "migrationsUnchanged": 0,
1104
+ "migrationsUnread": 0,
1105
+ "unsafeFilesRead": 0,
1106
+ "unsafeCalls": 0,
1107
+ "rawFragmentCalls": 0,
1108
+ "unsafeUnparsed": 0,
1109
+ "findings": 0,
1110
+ "errors": 0,
1111
+ "rulesOff": [],
1112
+ "syntaxErrors": 0,
1113
+ "findingsByRule": {},
1114
+ "adopted": false,
1115
+ "preset": null,
1116
+ "conformant": false
1117
+ },
1118
+ {
1119
+ "project": "react-app",
1120
+ "target": "code-churn",
1121
+ "flavour": "react",
1122
+ "ok": true,
1123
+ "status": "ok",
1124
+ "files": 1,
1125
+ "historyRead": false,
1126
+ "adopted": false,
1127
+ "preset": null,
1128
+ "conformant": false
1129
+ },
1130
+ {
1131
+ "project": "react-app",
1132
+ "target": "arch",
1133
+ "flavour": "react",
1134
+ "ok": true,
1135
+ "status": "ok",
1136
+ "adopted": false,
1137
+ "preset": null,
1138
+ "conformant": false
1139
+ },
804
1140
  {
805
1141
  "project": "utils",
806
1142
  "target": "lint",
@@ -864,6 +1200,54 @@ $ sentinel --report --all --json 2>/dev/null
864
1200
  "adopted": false,
865
1201
  "preset": null,
866
1202
  "conformant": false
1203
+ },
1204
+ {
1205
+ "project": "utils",
1206
+ "target": "sql",
1207
+ "flavour": "node",
1208
+ "ok": true,
1209
+ "status": "ok",
1210
+ "migrations": 0,
1211
+ "codeFiles": 1,
1212
+ "unsafeFiles": 0,
1213
+ "base": null,
1214
+ "migrationsRead": 0,
1215
+ "migrationsUnchanged": 0,
1216
+ "migrationsUnread": 0,
1217
+ "unsafeFilesRead": 0,
1218
+ "unsafeCalls": 0,
1219
+ "rawFragmentCalls": 0,
1220
+ "unsafeUnparsed": 0,
1221
+ "findings": 0,
1222
+ "errors": 0,
1223
+ "rulesOff": [],
1224
+ "syntaxErrors": 0,
1225
+ "findingsByRule": {},
1226
+ "adopted": false,
1227
+ "preset": null,
1228
+ "conformant": false
1229
+ },
1230
+ {
1231
+ "project": "utils",
1232
+ "target": "code-churn",
1233
+ "flavour": "node",
1234
+ "ok": true,
1235
+ "status": "ok",
1236
+ "files": 1,
1237
+ "historyRead": false,
1238
+ "adopted": false,
1239
+ "preset": null,
1240
+ "conformant": false
1241
+ },
1242
+ {
1243
+ "project": "utils",
1244
+ "target": "arch",
1245
+ "flavour": "node",
1246
+ "ok": true,
1247
+ "status": "ok",
1248
+ "adopted": false,
1249
+ "preset": null,
1250
+ "conformant": false
867
1251
  }
868
1252
  ]
869
1253
  }
@@ -1223,6 +1607,64 @@ $ sentinel --init --dry-run
1223
1607
  + }
1224
1608
  + }
1225
1609
  + }
1610
+ sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
1611
+ dry run: no files written
1612
+ added code-churn.config.mjs; added the 3 `code-churn` scripts; the role reports and never fails a run
1613
+
1614
+ create code-churn.config.mjs
1615
+ + import { defineCodeChurn } from '@hublo/sentinel/code-churn'
1616
+ +
1617
+ + export default defineCodeChurn({
1618
+ + root: import.meta.dirname,
1619
+ +
1620
+ + // ---------------------------------------------------------------------------------------------
1621
+ + // What this module can move, with the role's value today. A setting you leave out keeps that
1622
+ + // value; a setting you write REPLACES it, including inside a list. Anything you set is printed in
1623
+ + // the report and marked `(module)`, because two modules measured differently no longer compare.
1624
+ + //
1625
+ + // window.reworkDays 21
1626
+ + // window.periodDays 90
1627
+ + // maxFilesPerCommit 100
1628
+ + // levels {"minimumAdded":500,"low":3,"above":11,"watch":16}
1629
+ + // include ["**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,svelte,vue}"]
1630
+ + // includeTests false
1631
+ + // tests ["**/{test,tests,__tests__,e2e,fixtures,mocks,__mocks__,test-utils}/**","**/*.{spec,test,integration-spec,e2e-spec,steps,test-util,mock}.{ts,tsx,mts,cts,js,jsx}"]
1632
+ + // ignore ["**/node_modules/**","**/dist/**","**/build/**","**/coverage/**","**/*.d.{ts,mts,cts}","**/*.generated.*","**/*.gen.*","**/generated/**"]
1633
+ + // listed 10
1634
+ + //
1635
+ + // Read the values in full with:
1636
+ + //
1637
+ + // pnpm exec sentinel --inspect --code-churn --json
1638
+ + //
1639
+ + // overrides: {
1640
+ + // window: { periodDays: 180 },
1641
+ + // },
1642
+ + })
1643
+
1644
+ update package.json
1645
+ - { "name": "bff-admin", "dependencies": { "@nestjs/core": "^10" } }
1646
+ + {
1647
+ + "name": "bff-admin",
1648
+ + "dependencies": {
1649
+ + "@nestjs/core": "^10"
1650
+ + },
1651
+ + "scripts": {
1652
+ + "code-churn": "sentinel --run --code-churn",
1653
+ + "code-churn:json": "sentinel --run --code-churn --output json",
1654
+ + "code-churn:html": "sentinel --run --code-churn --output html"
1655
+ + },
1656
+ + "devDependencies": {
1657
+ + "@hublo/sentinel": "<version>"
1658
+ + },
1659
+ + "nx": {
1660
+ + "targets": {
1661
+ + "code-churn": {
1662
+ + "cache": false
1663
+ + }
1664
+ + }
1665
+ + }
1666
+ + }
1667
+ arch: no sentinel.arch.json at the workspace root: the repository has not said which decision applies where.
1226
1668
  dry run: no files written
1227
1669
  materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
1228
1670
 
@@ -1301,6 +1743,8 @@ $ sentinel --init --dry-run
1301
1743
  dry run: the lint autofix runs on adoption and can rewrite source, as moving to another linter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
1302
1744
  dry run: the format autofix runs on adoption and can rewrite source, as moving to another formatter does; add --rehearse to name the files (it runs the pass in a throwaway copy, as long as the real one)
1303
1745
  dry run: would ignore static-analysis-report/ in the root .gitignore
1746
+ dry run: would ignore sql-report/ in the root .gitignore
1747
+ dry run: would ignore code-churn-report/ in the root .gitignore
1304
1748
  # exit: 0
1305
1749
  ```
1306
1750
 
@@ -1461,6 +1905,64 @@ $ sentinel --init --dry-run --rehearse
1461
1905
  + }
1462
1906
  + }
1463
1907
  + }
1908
+ sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
1909
+ dry run: no files written
1910
+ added code-churn.config.mjs; added the 3 `code-churn` scripts; the role reports and never fails a run
1911
+
1912
+ create code-churn.config.mjs
1913
+ + import { defineCodeChurn } from '@hublo/sentinel/code-churn'
1914
+ +
1915
+ + export default defineCodeChurn({
1916
+ + root: import.meta.dirname,
1917
+ +
1918
+ + // ---------------------------------------------------------------------------------------------
1919
+ + // What this module can move, with the role's value today. A setting you leave out keeps that
1920
+ + // value; a setting you write REPLACES it, including inside a list. Anything you set is printed in
1921
+ + // the report and marked `(module)`, because two modules measured differently no longer compare.
1922
+ + //
1923
+ + // window.reworkDays 21
1924
+ + // window.periodDays 90
1925
+ + // maxFilesPerCommit 100
1926
+ + // levels {"minimumAdded":500,"low":3,"above":11,"watch":16}
1927
+ + // include ["**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,svelte,vue}"]
1928
+ + // includeTests false
1929
+ + // tests ["**/{test,tests,__tests__,e2e,fixtures,mocks,__mocks__,test-utils}/**","**/*.{spec,test,integration-spec,e2e-spec,steps,test-util,mock}.{ts,tsx,mts,cts,js,jsx}"]
1930
+ + // ignore ["**/node_modules/**","**/dist/**","**/build/**","**/coverage/**","**/*.d.{ts,mts,cts}","**/*.generated.*","**/*.gen.*","**/generated/**"]
1931
+ + // listed 10
1932
+ + //
1933
+ + // Read the values in full with:
1934
+ + //
1935
+ + // pnpm exec sentinel --inspect --code-churn --json
1936
+ + //
1937
+ + // overrides: {
1938
+ + // window: { periodDays: 180 },
1939
+ + // },
1940
+ + })
1941
+
1942
+ update package.json
1943
+ - { "name": "bff-admin", "dependencies": { "@nestjs/core": "^10" } }
1944
+ + {
1945
+ + "name": "bff-admin",
1946
+ + "dependencies": {
1947
+ + "@nestjs/core": "^10"
1948
+ + },
1949
+ + "scripts": {
1950
+ + "code-churn": "sentinel --run --code-churn",
1951
+ + "code-churn:json": "sentinel --run --code-churn --output json",
1952
+ + "code-churn:html": "sentinel --run --code-churn --output html"
1953
+ + },
1954
+ + "devDependencies": {
1955
+ + "@hublo/sentinel": "<version>"
1956
+ + },
1957
+ + "nx": {
1958
+ + "targets": {
1959
+ + "code-churn": {
1960
+ + "cache": false
1961
+ + }
1962
+ + }
1963
+ + }
1964
+ + }
1965
+ arch: no sentinel.arch.json at the workspace root: the repository has not said which decision applies where.
1464
1966
  dry run: no files written
1465
1967
  materialized the nest format preset into .oxfmtrc.json (@hublo/sentinel@<version>). oxfmt has no `extends`, so the values live here; `sentinel --status --format` reports modules left behind by a preset change
1466
1968
 
@@ -1539,6 +2041,8 @@ $ sentinel --init --dry-run --rehearse
1539
2041
  dry run: the lint autofix cannot be rehearsed yet: its preset is not installed in this module, which is expected before the first `pnpm install`. After it, this dry-run names what it rewrites
1540
2042
  dry run: the format autofix would rewrite 1 file beyond the ones above: project.json
1541
2043
  dry run: would ignore static-analysis-report/ in the root .gitignore
2044
+ dry run: would ignore sql-report/ in the root .gitignore
2045
+ dry run: would ignore code-churn-report/ in the root .gitignore
1542
2046
  # exit: 0
1543
2047
  ```
1544
2048
 
@@ -5,8 +5,10 @@ migrating a module see [`lint-adoption.md`](lint-adoption.md),
5
5
  [`format-adoption.md`](format-adoption.md),
6
6
  [`typescript-adoption.md`](typescript-adoption.md),
7
7
  [`build-adoption.md`](build-adoption.md),
8
- [`test-adoption.md`](test-adoption.md) and
9
- [`static-analysis-adoption.md`](static-analysis-adoption.md). The reference gate `--test` runs a
8
+ [`test-adoption.md`](test-adoption.md),
9
+ [`static-analysis-adoption.md`](static-analysis-adoption.md) and
10
+ [`arch-adoption.md`](arch-adoption.md); the `sql` role is in
11
+ [`sql-adoption.md`](sql-adoption.md). The reference gate `--test` runs a
10
12
  migration against is in `test-adoption.md`, not the static-analysis page.
11
13
 
12
14
  ## The grid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.7.0-alpha.3",
3
+ "version": "1.7.0-alpha.31",
4
4
  "description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -54,6 +54,22 @@
54
54
  "types": "./dist/roles/static-analysis/config.d.ts",
55
55
  "import": "./dist/roles/static-analysis/config.js"
56
56
  },
57
+ "./arch": {
58
+ "types": "./dist/roles/arch/config.d.ts",
59
+ "import": "./dist/roles/arch/config.js"
60
+ },
61
+ "./sql": {
62
+ "types": "./dist/roles/sql/config.d.ts",
63
+ "import": "./dist/roles/sql/config.js"
64
+ },
65
+ "./code-churn": {
66
+ "types": "./dist/roles/code-churn/config.d.ts",
67
+ "import": "./dist/roles/code-churn/config.js"
68
+ },
69
+ "./runtime-analysis": {
70
+ "types": "./dist/roles/runtime-analysis/config.d.ts",
71
+ "import": "./dist/roles/runtime-analysis/config.js"
72
+ },
57
73
  "./env": {
58
74
  "types": "./dist/roles/env/config.d.ts",
59
75
  "import": "./dist/roles/env/config.js"
@@ -113,7 +129,8 @@
113
129
  "docs",
114
130
  "lint",
115
131
  "oxlint",
116
- "plugins"
132
+ "plugins",
133
+ "runtime-analysis-deps"
117
134
  ],
118
135
  "scripts": {
119
136
  "build": "tsup && tsx scripts/build-presets.ts",
@@ -171,6 +188,8 @@
171
188
  "oxfmt": "0.63.0",
172
189
  "oxlint": "1.77.0",
173
190
  "oxlint-tsgolint": "7.0.2001",
191
+ "picomatch": "4.0.5",
192
+ "squawk-cli": "2.72.0",
174
193
  "tinyglobby": "0.2.17",
175
194
  "typescript": "5.9.3",
176
195
  "vite": "8.2.2",
@@ -181,7 +200,11 @@
181
200
  "devDependencies": {
182
201
  "@hublo/sentinel": "link:.",
183
202
  "@types/node": "^24.19.2",
203
+ "@types/picomatch": "4.0.3",
204
+ "lighthouse": "13.6.0",
184
205
  "nx": "^23.1.0",
206
+ "playwright-core": "1.64.1",
207
+ "puppeteer-core": "25.16.0",
185
208
  "tsup": "^8.3.0",
186
209
  "tsx": "^4.19.0"
187
210
  },
@@ -0,0 +1,6 @@
1
+ // Imported by file path from sentinel's cache: the bare names below resolve to the node_modules
2
+ // installed next to this file, never to the workspace's.
3
+ export { startFlow } from 'lighthouse'
4
+ export { default as desktopConfig } from 'lighthouse/core/config/desktop-config.js'
5
+ export { chromium } from 'playwright-core'
6
+ export { default as puppeteer } from 'puppeteer-core'