@hublo/sentinel 1.7.0-alpha.2 → 1.7.0-alpha.20
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 +2 -0
- package/dist/bin/sentinel.js +46 -113
- package/dist/{chunk-Z3JI7ZWX.js → chunk-AVT5FSPO.js} +232 -195
- package/dist/{chunk-EETHWJBF.js → chunk-B3Y7F7BA.js} +3533 -1074
- package/dist/{chunk-DLGBRLUU.js → chunk-EESVRILJ.js} +3 -16
- package/dist/chunk-EESVRILJ.js.map +1 -0
- package/dist/{chunk-ZNANJEMK.js → chunk-JT7ZMH44.js} +30 -16
- package/dist/chunk-JT7ZMH44.js.map +1 -0
- package/dist/{chunk-THTXP2QU.js → chunk-LX7EG6PJ.js} +5 -6
- package/dist/chunk-LX7EG6PJ.js.map +1 -0
- package/dist/chunk-NGLEGAEN.js +190 -0
- package/dist/chunk-NGLEGAEN.js.map +1 -0
- package/dist/{chunk-4YQXLPJ5.js → chunk-PMRL4MH6.js} +2 -2
- package/dist/chunk-PXTU5MPW.js +9 -0
- package/dist/chunk-PXTU5MPW.js.map +1 -0
- package/dist/{chunk-LNFGVGLE.js → chunk-SWWQ7X7B.js} +11 -23
- package/dist/{chunk-LNFGVGLE.js.map → chunk-SWWQ7X7B.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/roles/build/nest/toolchain.d.ts +1 -1
- package/dist/roles/build/nest/toolchain.js +2 -6
- package/dist/roles/build/nest/toolchain.js.map +1 -1
- package/dist/roles/sql/config.d.ts +68 -0
- package/dist/roles/sql/config.js +8 -0
- package/dist/roles/sql/config.js.map +1 -0
- package/dist/roles/static-analysis/config.js +2 -1
- package/dist/roles/test/nest/toolchain.d.ts +1 -1
- package/dist/roles/test/nest/toolchain.js +2 -3
- package/dist/roles/test/nest/toolchain.js.map +1 -1
- package/dist/roles/test/react/toolchain.js +2 -3
- package/dist/roles/test/react/toolchain.js.map +1 -1
- package/dist/roles/test/setup/jest-parity.js +2 -2
- package/dist/roles/test/setup/workspace-entry.js +2 -2
- package/dist/roles/test/shared-test-config.d.ts +1 -1
- package/dist/roles/test/shared-test-config.js +2 -3
- package/dist/tsconfig/nest.json +1 -10
- package/dist/tsconfig/node.json +1 -11
- package/dist/tsconfig/react.json +0 -3
- package/dist/{tsconfig-aliases-C_PxuZni.d.ts → tsconfig-aliases-Ce6axdJ4.d.ts} +2 -17
- package/dist/{validate-LRHF63AW.js → validate-B5567Z7X.js} +2 -4
- package/docs/build-adoption.md +0 -7
- package/docs/sql-adoption.md +552 -0
- package/docs/static-analysis-adoption.md +1 -1
- package/docs/test-adoption.md +1 -8
- package/docs/typescript-adoption.md +13 -52
- package/docs/typescript-traces.md +217 -3
- package/docs/using-sentinel.md +2 -1
- package/package.json +6 -4
- package/dist/chunk-4UUL4SEW.js +0 -50
- package/dist/chunk-DLGBRLUU.js.map +0 -1
- package/dist/chunk-H4HAFJFZ.js +0 -79
- package/dist/chunk-H4HAFJFZ.js.map +0 -1
- package/dist/chunk-THTXP2QU.js.map +0 -1
- package/dist/chunk-ZNANJEMK.js.map +0 -1
- package/dist/migrate-NI33SXZD.js +0 -517
- package/dist/tsconfig/legacy.json +0 -21
- /package/dist/{chunk-4YQXLPJ5.js.map → chunk-PMRL4MH6.js.map} +0 -0
|
@@ -33,7 +33,7 @@ pnpm install
|
|
|
33
33
|
| `--run` | dev, everyday | **yes** (tsc) | executes the check, pass/fail. This is your `typecheck` script. |
|
|
34
34
|
| `--inspect` | dev, everyday | no (reads config) | the resolved config: preset, target, and which rules are deferred |
|
|
35
35
|
| `--init` | dev, once to adopt | writes files | the tsconfig stub, the `typecheck` script, the pinned dep, + workspace prep |
|
|
36
|
-
| `--migrate` |
|
|
36
|
+
| `--migrate` | planned | not available yet | reserved for changing an already-initialized setup (later ticket) |
|
|
37
37
|
| `--report` | **deprecated** | — | use `--run --json`: same work, same envelope |
|
|
38
38
|
| `--status` | **deprecated** | — | use `--inspect`, which absorbed it |
|
|
39
39
|
|
|
@@ -43,52 +43,13 @@ pnpm install
|
|
|
43
43
|
> the two above, because they answered the same two questions in a different shape. Both still
|
|
44
44
|
> run and print a notice telling you what to use instead.
|
|
45
45
|
|
|
46
|
-
**Location** (any verb): from a module dir → that module; from the root → `--module <name>`, `--ci` (affected), or all modules. `--init`
|
|
46
|
+
**Location** (any verb): from a module dir → that module; from the root → `--module <name>`, `--ci` (affected), or all modules. `--init` writes, so it targets one module only.
|
|
47
47
|
|
|
48
48
|
**Your tsconfig extends exactly one preset.** The options every stack shares are flattened into
|
|
49
49
|
each published preset at build time, so `@hublo/sentinel/tsconfig/react` is self-contained and
|
|
50
50
|
there is nothing to stack under it. The shared layer lives in the repo as
|
|
51
51
|
`src/roles/typescript/presets/shared.json`; it is ours and is never published on its own.
|
|
52
52
|
|
|
53
|
-
The one addition is `@hublo/sentinel/typescript/legacy`, and it is not a preset: it is the debt
|
|
54
|
-
a module carried through `tsconfig.base.json` (the six strict opt-outs, `ignoreDeprecations`,
|
|
55
|
-
and for react the decorator flags, `declaration: false` and `types`). Only `--migrate
|
|
56
|
-
--typescript` adds it, LEFT of the stack preset where the base was, so the stack preset keeps
|
|
57
|
-
winning; `--init` never does, so a new module is born with the full strict set.
|
|
58
|
-
|
|
59
|
-
## Detach a module from `tsconfig.base.json`
|
|
60
|
-
|
|
61
|
-
Run from an **adopted** module's directory (its tsconfig extends a sentinel preset), once its
|
|
62
|
-
`@hublo/sentinel` is the version that ships `legacy`:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
sentinel --migrate --typescript --dry-run # prove it and write nothing
|
|
66
|
-
sentinel --migrate --typescript # prove it and keep the result
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
It replaces the base in `extends` with `legacy` (when the module has those compromises), keeps
|
|
70
|
-
the stack preset, and writes only what depends on the module: `outDir`, `rootDir`, `exclude`,
|
|
71
|
-
and the `paths` entries tsc reports having MATCHED (`--traceResolution`), the setup and config
|
|
72
|
-
files no tsconfig compiles included. Measured on 113 modules (sentinel#147), that is all that is
|
|
73
|
-
left once the presets carry the base's standards.
|
|
74
|
-
|
|
75
|
-
It keeps nothing unless tsc agrees, and restores the file otherwise:
|
|
76
|
-
|
|
77
|
-
- `--showConfig` of every tsconfig of the folder applies the same options, `paths` aside. Applied,
|
|
78
|
-
not printed: the base printed `alwaysStrict`, `allowJs: false` and `isolatedModules`, and the
|
|
79
|
-
presets leave them to `strict`, the default and `verbatimModuleSyntax`. Same compilation,
|
|
80
|
-
different output, so the comparison derives those options the way tsc does
|
|
81
|
-
(`src/roles/typescript/migrate/compare.ts`);
|
|
82
|
-
- every module and type reference tsc resolves, file by file, lands on the same file.
|
|
83
|
-
|
|
84
|
-
It refuses, and writes nothing, for a module not adopted yet (run `--init --typescript` first), a
|
|
85
|
-
tsconfig with comments, and a module whose installed sentinel has no `legacy`. A nested folder
|
|
86
|
-
that is a module of its own is named and left to its own run.
|
|
87
|
-
|
|
88
|
-
What it does not prove is tsc's view only: the Nx project graph still reads the root base's
|
|
89
|
-
`paths`, and esbuild and Vite resolve each file through its nearest tsconfig. The base stays
|
|
90
|
-
until every module is detached, and the module's own build, test and lint are its proof.
|
|
91
|
-
|
|
92
53
|
## Everyday use (developers)
|
|
93
54
|
|
|
94
55
|
```bash
|
|
@@ -107,17 +68,17 @@ sentinel --inspect --typescript # adoption + conformity coverage
|
|
|
107
68
|
|
|
108
69
|
## Options
|
|
109
70
|
|
|
110
|
-
| Option | What it does
|
|
111
|
-
| ----------------------- |
|
|
112
|
-
| `--preset <name>` | override detection (`react` / `nest` / `svelte` / `node`); recommended for `--init`
|
|
113
|
-
| `--module <name>` | from the root, scope to one module
|
|
114
|
-
| `--ci` | from the root, only affected modules; non-zero exit on failure
|
|
115
|
-
| `--json` | machine-readable envelope on stdout, for every verb; progress goes to stderr
|
|
116
|
-
| `--max-diagnostics <n>` | cap the diagnostics embedded per module in `--run --json` (`0` = no cap)
|
|
117
|
-
| `--dry-run` | preview what `--init` would write,
|
|
118
|
-
| `--rehearse` | with `--dry-run`: run the autofix passes in a copy and name the source they rewrite
|
|
119
|
-
| `--runner <tool>` | override the default runner
|
|
120
|
-
| `-- <tool options>` | `--run` only, one type named: everything after `--` goes to tsc itself (see below)
|
|
71
|
+
| Option | What it does |
|
|
72
|
+
| ----------------------- | ----------------------------------------------------------------------------------- |
|
|
73
|
+
| `--preset <name>` | override detection (`react` / `nest` / `svelte` / `node`); recommended for `--init` |
|
|
74
|
+
| `--module <name>` | from the root, scope to one module |
|
|
75
|
+
| `--ci` | from the root, only affected modules; non-zero exit on failure |
|
|
76
|
+
| `--json` | machine-readable envelope on stdout, for every verb; progress goes to stderr |
|
|
77
|
+
| `--max-diagnostics <n>` | cap the diagnostics embedded per module in `--run --json` (`0` = no cap) |
|
|
78
|
+
| `--dry-run` | preview what `--init` would write, changing nothing |
|
|
79
|
+
| `--rehearse` | with `--dry-run`: run the autofix passes in a copy and name the source they rewrite |
|
|
80
|
+
| `--runner <tool>` | override the default runner |
|
|
81
|
+
| `-- <tool options>` | `--run` only, one type named: everything after `--` goes to tsc itself (see below) |
|
|
121
82
|
|
|
122
83
|
## Measuring a deferred rule
|
|
123
84
|
|
|
@@ -236,7 +236,8 @@ $ sentinel --report --json 2>/dev/null
|
|
|
236
236
|
"typescript",
|
|
237
237
|
"build",
|
|
238
238
|
"test",
|
|
239
|
-
"static-analysis"
|
|
239
|
+
"static-analysis",
|
|
240
|
+
"sql"
|
|
240
241
|
],
|
|
241
242
|
"skipped": [
|
|
242
243
|
"runtime-analysis",
|
|
@@ -319,6 +320,32 @@ $ sentinel --report --json 2>/dev/null
|
|
|
319
320
|
"preset": null,
|
|
320
321
|
"conformant": false
|
|
321
322
|
},
|
|
323
|
+
{
|
|
324
|
+
"project": "svelte-app",
|
|
325
|
+
"target": "sql",
|
|
326
|
+
"flavour": "svelte",
|
|
327
|
+
"ok": true,
|
|
328
|
+
"status": "ok",
|
|
329
|
+
"migrations": 0,
|
|
330
|
+
"codeFiles": 1,
|
|
331
|
+
"unsafeFiles": 0,
|
|
332
|
+
"base": null,
|
|
333
|
+
"migrationsRead": 0,
|
|
334
|
+
"migrationsUnchanged": 0,
|
|
335
|
+
"migrationsUnread": 0,
|
|
336
|
+
"unsafeFilesRead": 0,
|
|
337
|
+
"unsafeCalls": 0,
|
|
338
|
+
"rawFragmentCalls": 0,
|
|
339
|
+
"unsafeUnparsed": 0,
|
|
340
|
+
"findings": 0,
|
|
341
|
+
"errors": 0,
|
|
342
|
+
"rulesOff": [],
|
|
343
|
+
"syntaxErrors": 0,
|
|
344
|
+
"findingsByRule": {},
|
|
345
|
+
"adopted": false,
|
|
346
|
+
"preset": null,
|
|
347
|
+
"conformant": false
|
|
348
|
+
},
|
|
322
349
|
{
|
|
323
350
|
"project": "bff-admin",
|
|
324
351
|
"target": "lint",
|
|
@@ -395,6 +422,32 @@ $ sentinel --report --json 2>/dev/null
|
|
|
395
422
|
"preset": null,
|
|
396
423
|
"conformant": false
|
|
397
424
|
},
|
|
425
|
+
{
|
|
426
|
+
"project": "bff-admin",
|
|
427
|
+
"target": "sql",
|
|
428
|
+
"flavour": "nest",
|
|
429
|
+
"ok": true,
|
|
430
|
+
"status": "ok",
|
|
431
|
+
"migrations": 0,
|
|
432
|
+
"codeFiles": 1,
|
|
433
|
+
"unsafeFiles": 0,
|
|
434
|
+
"base": null,
|
|
435
|
+
"migrationsRead": 0,
|
|
436
|
+
"migrationsUnchanged": 0,
|
|
437
|
+
"migrationsUnread": 0,
|
|
438
|
+
"unsafeFilesRead": 0,
|
|
439
|
+
"unsafeCalls": 0,
|
|
440
|
+
"rawFragmentCalls": 0,
|
|
441
|
+
"unsafeUnparsed": 0,
|
|
442
|
+
"findings": 0,
|
|
443
|
+
"errors": 0,
|
|
444
|
+
"rulesOff": [],
|
|
445
|
+
"syntaxErrors": 0,
|
|
446
|
+
"findingsByRule": {},
|
|
447
|
+
"adopted": false,
|
|
448
|
+
"preset": null,
|
|
449
|
+
"conformant": false
|
|
450
|
+
},
|
|
398
451
|
{
|
|
399
452
|
"project": "react-app",
|
|
400
453
|
"target": "lint",
|
|
@@ -471,6 +524,32 @@ $ sentinel --report --json 2>/dev/null
|
|
|
471
524
|
"preset": null,
|
|
472
525
|
"conformant": false
|
|
473
526
|
},
|
|
527
|
+
{
|
|
528
|
+
"project": "react-app",
|
|
529
|
+
"target": "sql",
|
|
530
|
+
"flavour": "react",
|
|
531
|
+
"ok": true,
|
|
532
|
+
"status": "ok",
|
|
533
|
+
"migrations": 0,
|
|
534
|
+
"codeFiles": 1,
|
|
535
|
+
"unsafeFiles": 0,
|
|
536
|
+
"base": null,
|
|
537
|
+
"migrationsRead": 0,
|
|
538
|
+
"migrationsUnchanged": 0,
|
|
539
|
+
"migrationsUnread": 0,
|
|
540
|
+
"unsafeFilesRead": 0,
|
|
541
|
+
"unsafeCalls": 0,
|
|
542
|
+
"rawFragmentCalls": 0,
|
|
543
|
+
"unsafeUnparsed": 0,
|
|
544
|
+
"findings": 0,
|
|
545
|
+
"errors": 0,
|
|
546
|
+
"rulesOff": [],
|
|
547
|
+
"syntaxErrors": 0,
|
|
548
|
+
"findingsByRule": {},
|
|
549
|
+
"adopted": false,
|
|
550
|
+
"preset": null,
|
|
551
|
+
"conformant": false
|
|
552
|
+
},
|
|
474
553
|
{
|
|
475
554
|
"project": "utils",
|
|
476
555
|
"target": "lint",
|
|
@@ -534,6 +613,32 @@ $ sentinel --report --json 2>/dev/null
|
|
|
534
613
|
"adopted": false,
|
|
535
614
|
"preset": null,
|
|
536
615
|
"conformant": false
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"project": "utils",
|
|
619
|
+
"target": "sql",
|
|
620
|
+
"flavour": "node",
|
|
621
|
+
"ok": true,
|
|
622
|
+
"status": "ok",
|
|
623
|
+
"migrations": 0,
|
|
624
|
+
"codeFiles": 1,
|
|
625
|
+
"unsafeFiles": 0,
|
|
626
|
+
"base": null,
|
|
627
|
+
"migrationsRead": 0,
|
|
628
|
+
"migrationsUnchanged": 0,
|
|
629
|
+
"migrationsUnread": 0,
|
|
630
|
+
"unsafeFilesRead": 0,
|
|
631
|
+
"unsafeCalls": 0,
|
|
632
|
+
"rawFragmentCalls": 0,
|
|
633
|
+
"unsafeUnparsed": 0,
|
|
634
|
+
"findings": 0,
|
|
635
|
+
"errors": 0,
|
|
636
|
+
"rulesOff": [],
|
|
637
|
+
"syntaxErrors": 0,
|
|
638
|
+
"findingsByRule": {},
|
|
639
|
+
"adopted": false,
|
|
640
|
+
"preset": null,
|
|
641
|
+
"conformant": false
|
|
537
642
|
}
|
|
538
643
|
]
|
|
539
644
|
}
|
|
@@ -566,7 +671,8 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
566
671
|
"typescript",
|
|
567
672
|
"build",
|
|
568
673
|
"test",
|
|
569
|
-
"static-analysis"
|
|
674
|
+
"static-analysis",
|
|
675
|
+
"sql"
|
|
570
676
|
],
|
|
571
677
|
"skipped": [
|
|
572
678
|
"runtime-analysis",
|
|
@@ -649,6 +755,32 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
649
755
|
"preset": null,
|
|
650
756
|
"conformant": false
|
|
651
757
|
},
|
|
758
|
+
{
|
|
759
|
+
"project": "svelte-app",
|
|
760
|
+
"target": "sql",
|
|
761
|
+
"flavour": "svelte",
|
|
762
|
+
"ok": true,
|
|
763
|
+
"status": "ok",
|
|
764
|
+
"migrations": 0,
|
|
765
|
+
"codeFiles": 1,
|
|
766
|
+
"unsafeFiles": 0,
|
|
767
|
+
"base": null,
|
|
768
|
+
"migrationsRead": 0,
|
|
769
|
+
"migrationsUnchanged": 0,
|
|
770
|
+
"migrationsUnread": 0,
|
|
771
|
+
"unsafeFilesRead": 0,
|
|
772
|
+
"unsafeCalls": 0,
|
|
773
|
+
"rawFragmentCalls": 0,
|
|
774
|
+
"unsafeUnparsed": 0,
|
|
775
|
+
"findings": 0,
|
|
776
|
+
"errors": 0,
|
|
777
|
+
"rulesOff": [],
|
|
778
|
+
"syntaxErrors": 0,
|
|
779
|
+
"findingsByRule": {},
|
|
780
|
+
"adopted": false,
|
|
781
|
+
"preset": null,
|
|
782
|
+
"conformant": false
|
|
783
|
+
},
|
|
652
784
|
{
|
|
653
785
|
"project": "bff-admin",
|
|
654
786
|
"target": "lint",
|
|
@@ -725,6 +857,32 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
725
857
|
"preset": null,
|
|
726
858
|
"conformant": false
|
|
727
859
|
},
|
|
860
|
+
{
|
|
861
|
+
"project": "bff-admin",
|
|
862
|
+
"target": "sql",
|
|
863
|
+
"flavour": "nest",
|
|
864
|
+
"ok": true,
|
|
865
|
+
"status": "ok",
|
|
866
|
+
"migrations": 0,
|
|
867
|
+
"codeFiles": 1,
|
|
868
|
+
"unsafeFiles": 0,
|
|
869
|
+
"base": null,
|
|
870
|
+
"migrationsRead": 0,
|
|
871
|
+
"migrationsUnchanged": 0,
|
|
872
|
+
"migrationsUnread": 0,
|
|
873
|
+
"unsafeFilesRead": 0,
|
|
874
|
+
"unsafeCalls": 0,
|
|
875
|
+
"rawFragmentCalls": 0,
|
|
876
|
+
"unsafeUnparsed": 0,
|
|
877
|
+
"findings": 0,
|
|
878
|
+
"errors": 0,
|
|
879
|
+
"rulesOff": [],
|
|
880
|
+
"syntaxErrors": 0,
|
|
881
|
+
"findingsByRule": {},
|
|
882
|
+
"adopted": false,
|
|
883
|
+
"preset": null,
|
|
884
|
+
"conformant": false
|
|
885
|
+
},
|
|
728
886
|
{
|
|
729
887
|
"project": "react-app",
|
|
730
888
|
"target": "lint",
|
|
@@ -801,6 +959,32 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
801
959
|
"preset": null,
|
|
802
960
|
"conformant": false
|
|
803
961
|
},
|
|
962
|
+
{
|
|
963
|
+
"project": "react-app",
|
|
964
|
+
"target": "sql",
|
|
965
|
+
"flavour": "react",
|
|
966
|
+
"ok": true,
|
|
967
|
+
"status": "ok",
|
|
968
|
+
"migrations": 0,
|
|
969
|
+
"codeFiles": 1,
|
|
970
|
+
"unsafeFiles": 0,
|
|
971
|
+
"base": null,
|
|
972
|
+
"migrationsRead": 0,
|
|
973
|
+
"migrationsUnchanged": 0,
|
|
974
|
+
"migrationsUnread": 0,
|
|
975
|
+
"unsafeFilesRead": 0,
|
|
976
|
+
"unsafeCalls": 0,
|
|
977
|
+
"rawFragmentCalls": 0,
|
|
978
|
+
"unsafeUnparsed": 0,
|
|
979
|
+
"findings": 0,
|
|
980
|
+
"errors": 0,
|
|
981
|
+
"rulesOff": [],
|
|
982
|
+
"syntaxErrors": 0,
|
|
983
|
+
"findingsByRule": {},
|
|
984
|
+
"adopted": false,
|
|
985
|
+
"preset": null,
|
|
986
|
+
"conformant": false
|
|
987
|
+
},
|
|
804
988
|
{
|
|
805
989
|
"project": "utils",
|
|
806
990
|
"target": "lint",
|
|
@@ -864,6 +1048,32 @@ $ sentinel --report --all --json 2>/dev/null
|
|
|
864
1048
|
"adopted": false,
|
|
865
1049
|
"preset": null,
|
|
866
1050
|
"conformant": false
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"project": "utils",
|
|
1054
|
+
"target": "sql",
|
|
1055
|
+
"flavour": "node",
|
|
1056
|
+
"ok": true,
|
|
1057
|
+
"status": "ok",
|
|
1058
|
+
"migrations": 0,
|
|
1059
|
+
"codeFiles": 1,
|
|
1060
|
+
"unsafeFiles": 0,
|
|
1061
|
+
"base": null,
|
|
1062
|
+
"migrationsRead": 0,
|
|
1063
|
+
"migrationsUnchanged": 0,
|
|
1064
|
+
"migrationsUnread": 0,
|
|
1065
|
+
"unsafeFilesRead": 0,
|
|
1066
|
+
"unsafeCalls": 0,
|
|
1067
|
+
"rawFragmentCalls": 0,
|
|
1068
|
+
"unsafeUnparsed": 0,
|
|
1069
|
+
"findings": 0,
|
|
1070
|
+
"errors": 0,
|
|
1071
|
+
"rulesOff": [],
|
|
1072
|
+
"syntaxErrors": 0,
|
|
1073
|
+
"findingsByRule": {},
|
|
1074
|
+
"adopted": false,
|
|
1075
|
+
"preset": null,
|
|
1076
|
+
"conformant": false
|
|
867
1077
|
}
|
|
868
1078
|
]
|
|
869
1079
|
}
|
|
@@ -1026,7 +1236,7 @@ $ sentinel --report --all --typescript
|
|
|
1026
1236
|
|
|
1027
1237
|
```console
|
|
1028
1238
|
$ sentinel --run --typescript --dry-run --module bff-admin
|
|
1029
|
-
--dry-run only applies to --init
|
|
1239
|
+
--dry-run only applies to --init (the read verbs never write).
|
|
1030
1240
|
(run "sentinel --help" for usage)
|
|
1031
1241
|
# exit: 1
|
|
1032
1242
|
```
|
|
@@ -1223,6 +1433,7 @@ $ sentinel --init --dry-run
|
|
|
1223
1433
|
+ }
|
|
1224
1434
|
+ }
|
|
1225
1435
|
+ }
|
|
1436
|
+
sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
|
|
1226
1437
|
dry run: no files written
|
|
1227
1438
|
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
1439
|
|
|
@@ -1301,6 +1512,7 @@ $ sentinel --init --dry-run
|
|
|
1301
1512
|
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
1513
|
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
1514
|
dry run: would ignore static-analysis-report/ in the root .gitignore
|
|
1515
|
+
dry run: would ignore sql-report/ in the root .gitignore
|
|
1304
1516
|
# exit: 0
|
|
1305
1517
|
```
|
|
1306
1518
|
|
|
@@ -1461,6 +1673,7 @@ $ sentinel --init --dry-run --rehearse
|
|
|
1461
1673
|
+ }
|
|
1462
1674
|
+ }
|
|
1463
1675
|
+ }
|
|
1676
|
+
sql: no migration (**/migrations/*/migration.sql) and no raw SQL call in this module: nothing for the sql role to read.
|
|
1464
1677
|
dry run: no files written
|
|
1465
1678
|
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
1679
|
|
|
@@ -1539,6 +1752,7 @@ $ sentinel --init --dry-run --rehearse
|
|
|
1539
1752
|
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
1753
|
dry run: the format autofix would rewrite 1 file beyond the ones above: project.json
|
|
1541
1754
|
dry run: would ignore static-analysis-report/ in the root .gitignore
|
|
1755
|
+
dry run: would ignore sql-report/ in the root .gitignore
|
|
1542
1756
|
# exit: 0
|
|
1543
1757
|
```
|
|
1544
1758
|
|
package/docs/using-sentinel.md
CHANGED
|
@@ -6,7 +6,8 @@ migrating a module see [`lint-adoption.md`](lint-adoption.md),
|
|
|
6
6
|
[`typescript-adoption.md`](typescript-adoption.md),
|
|
7
7
|
[`build-adoption.md`](build-adoption.md),
|
|
8
8
|
[`test-adoption.md`](test-adoption.md) and
|
|
9
|
-
[`static-analysis-adoption.md`](static-analysis-adoption.md)
|
|
9
|
+
[`static-analysis-adoption.md`](static-analysis-adoption.md); the `sql` role is in
|
|
10
|
+
[`sql-adoption.md`](sql-adoption.md). The reference gate `--test` runs a
|
|
10
11
|
migration against is in `test-adoption.md`, not the static-analysis page.
|
|
11
12
|
|
|
12
13
|
## The grid
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.7.0-alpha.
|
|
3
|
+
"version": "1.7.0-alpha.20",
|
|
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",
|
|
@@ -30,9 +30,6 @@
|
|
|
30
30
|
"./typescript/node": {
|
|
31
31
|
"default": "./dist/tsconfig/node.json"
|
|
32
32
|
},
|
|
33
|
-
"./typescript/legacy": {
|
|
34
|
-
"default": "./dist/tsconfig/legacy.json"
|
|
35
|
-
},
|
|
36
33
|
"./tsconfig/react": {
|
|
37
34
|
"default": "./dist/tsconfig/react.json"
|
|
38
35
|
},
|
|
@@ -54,6 +51,10 @@
|
|
|
54
51
|
"types": "./dist/roles/static-analysis/config.d.ts",
|
|
55
52
|
"import": "./dist/roles/static-analysis/config.js"
|
|
56
53
|
},
|
|
54
|
+
"./sql": {
|
|
55
|
+
"types": "./dist/roles/sql/config.d.ts",
|
|
56
|
+
"import": "./dist/roles/sql/config.js"
|
|
57
|
+
},
|
|
57
58
|
"./env": {
|
|
58
59
|
"types": "./dist/roles/env/config.d.ts",
|
|
59
60
|
"import": "./dist/roles/env/config.js"
|
|
@@ -171,6 +172,7 @@
|
|
|
171
172
|
"oxfmt": "0.63.0",
|
|
172
173
|
"oxlint": "1.77.0",
|
|
173
174
|
"oxlint-tsgolint": "7.0.2001",
|
|
175
|
+
"squawk-cli": "2.72.0",
|
|
174
176
|
"tinyglobby": "0.2.17",
|
|
175
177
|
"typescript": "5.9.3",
|
|
176
178
|
"vite": "8.2.2",
|
package/dist/chunk-4UUL4SEW.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// src/shared/resolve-bin.ts
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { createRequire } from "node:module";
|
|
4
|
-
import { delimiter, dirname, join } from "node:path";
|
|
5
|
-
var require2 = createRequire(import.meta.url);
|
|
6
|
-
function resolveBin(fromDir, name) {
|
|
7
|
-
let dir = fromDir;
|
|
8
|
-
for (; ; ) {
|
|
9
|
-
const candidate = join(dir, "node_modules", ".bin", name);
|
|
10
|
-
if (existsSync(candidate)) return candidate;
|
|
11
|
-
const parent = dirname(dir);
|
|
12
|
-
if (parent === dir) return void 0;
|
|
13
|
-
dir = parent;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function binFromOwnInstall(packageName, binName) {
|
|
17
|
-
try {
|
|
18
|
-
const manifest = require2.resolve(`${packageName}/package.json`);
|
|
19
|
-
const bin = require2(manifest).bin;
|
|
20
|
-
const relative = typeof bin === "string" ? bin : bin?.[binName];
|
|
21
|
-
if (!relative) return void 0;
|
|
22
|
-
const executable = join(dirname(manifest), relative);
|
|
23
|
-
return existsSync(executable) ? executable : void 0;
|
|
24
|
-
} catch {
|
|
25
|
-
return void 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function binSearchPath(cwd) {
|
|
29
|
-
return [`${cwd}${delimiter}node_modules/.bin (and parents)`, "sentinel's own install"].join(
|
|
30
|
-
" then "
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function scriptPath(cwd, path) {
|
|
34
|
-
const bins = [];
|
|
35
|
-
let dir = cwd;
|
|
36
|
-
for (; ; ) {
|
|
37
|
-
bins.push(join(dir, "node_modules", ".bin"));
|
|
38
|
-
const parent = dirname(dir);
|
|
39
|
-
if (parent === dir) break;
|
|
40
|
-
dir = parent;
|
|
41
|
-
}
|
|
42
|
-
return [...bins, path].filter(Boolean).join(delimiter);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export {
|
|
46
|
-
resolveBin,
|
|
47
|
-
binFromOwnInstall,
|
|
48
|
-
binSearchPath,
|
|
49
|
-
scriptPath
|
|
50
|
-
};
|