@hublo/sentinel 1.7.0-alpha.30 → 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.
- package/README.md +2 -1
- package/dist/bin/sentinel.js +13 -7
- package/dist/{chunk-HYXFUUF5.js → chunk-2DUG6GVU.js} +3850 -2246
- package/dist/chunk-F5WISUN3.js +17 -0
- package/dist/chunk-F5WISUN3.js.map +1 -0
- package/dist/{chunk-2PRJJRJI.js → chunk-FZLUCPST.js} +1 -1
- package/dist/{chunk-YUZB4LRJ.js → chunk-KKHKRY7P.js} +6 -1
- package/dist/chunk-KKHKRY7P.js.map +1 -0
- package/dist/chunk-NE3IEJBN.js +59 -0
- package/dist/chunk-NE3IEJBN.js.map +1 -0
- package/dist/{chunk-SHF46ALB.js → chunk-NGLEGAEN.js} +1 -1
- package/dist/chunk-NGLEGAEN.js.map +1 -0
- package/dist/{chunk-LVY5NPOC.js → chunk-QMIJ4ZGJ.js} +2 -2
- package/dist/chunk-U7G2Y6YC.js +15 -0
- package/dist/chunk-U7G2Y6YC.js.map +1 -0
- package/dist/chunk-VWASE6NN.js +34 -0
- package/dist/chunk-VWASE6NN.js.map +1 -0
- package/dist/{chunk-APBEGLRI.js → chunk-XMAXE2Q2.js} +5 -2
- package/dist/chunk-XMAXE2Q2.js.map +1 -0
- package/dist/index.js +9 -5
- package/dist/roles/runtime-analysis/config.d.ts +97 -0
- package/dist/roles/runtime-analysis/config.js +10 -0
- package/dist/roles/runtime-analysis/config.js.map +1 -0
- package/dist/roles/runtime-analysis/gateway.d.ts +2 -0
- package/dist/roles/runtime-analysis/gateway.js +89 -0
- package/dist/roles/runtime-analysis/gateway.js.map +1 -0
- package/dist/roles/runtime-analysis/mock-api.d.ts +2 -0
- package/dist/roles/runtime-analysis/mock-api.js +43 -0
- package/dist/roles/runtime-analysis/mock-api.js.map +1 -0
- package/dist/roles/sql/config.js +1 -1
- package/dist/roles/static-analysis/config.js +1 -1
- package/dist/roles/test/setup/jest-parity.js +2 -2
- package/dist/roles/test/setup/workspace-entry.js +2 -2
- package/dist/{validate-4GMB32V7.js → validate-GTBRD2M4.js} +2 -2
- package/docs/runtime-analysis-adoption.md +198 -0
- package/docs/sql-adoption.md +18 -92
- package/docs/typescript-traces.md +2 -38
- package/package.json +10 -3
- package/runtime-analysis-deps/load.mjs +6 -0
- package/runtime-analysis-deps/package-lock.json +1766 -0
- package/runtime-analysis-deps/package.json +11 -0
- package/dist/chunk-APBEGLRI.js.map +0 -1
- package/dist/chunk-SHF46ALB.js.map +0 -1
- package/dist/chunk-YUZB4LRJ.js.map +0 -1
- /package/dist/{chunk-LVY5NPOC.js.map → chunk-QMIJ4ZGJ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -176,9 +176,10 @@ throwaway run wants. Once a module has adopted, nothing is fetched any more: the
|
|
|
176
176
|
- [`docs/typescript-adoption.md`](docs/typescript-adoption.md) — the adoption cheat sheet: the two adoption steps, the command model (verb x type x location), options, reading a report, and troubleshooting.
|
|
177
177
|
- [`docs/test-adoption.md`](docs/test-adoption.md) — migrating a module from jest to Vitest: the two steps, what the migration rewrites and what it refuses BY NAME, how the baseline gate proves nothing was lost, and the failures worth recognising.
|
|
178
178
|
- [`docs/static-analysis-adoption.md`](docs/static-analysis-adoption.md) — running the static analysis role on a module: the two steps, the four output shapes, how to read each row and where its threshold comes from, declaring an entry point, and the two limits worth knowing before trusting a number.
|
|
179
|
-
- [`docs/sql-adoption.md`](docs/sql-adoption.md) — checking the migrations, the `Unsafe` calls
|
|
179
|
+
- [`docs/sql-adoption.md`](docs/sql-adoption.md) — checking the migrations, the `Unsafe` calls and the `Prisma.raw` calls a branch adds or changes: the two steps, the 52 rules on by default and the 26 opt-in ones, the three levels in `sql.config.mjs` with an example, sentinel's two notes, and what the role does not read yet.
|
|
180
180
|
- [`docs/code-churn-adoption.md`](docs/code-churn-adoption.md) — the code churn role: the share of a module's new lines rewritten or deleted within 21 days, read from main's git history; adopting it, what it reads, how to read the figure, what it does not say, and how it was validated against `git blame`.
|
|
181
181
|
- [`docs/env-adoption.md`](docs/env-adoption.md) — checking a whole repository's env files, contracts and Dockerfiles from its root: the ten rules and which block, the three levels of `SENTINEL_ENV_LEVEL`, the optional `env.config.mjs`, and what changed from the monorepo's `tools/repo-env`.
|
|
182
|
+
- [`docs/runtime-analysis-adoption.md`](docs/runtime-analysis-adoption.md) — measuring a React front's Core Web Vitals on a pull request: the config key by key, the run on a machine, the CI phases, the browser packages installed only where a measure runs, and how the verdict decides what blocks.
|
|
182
183
|
- [`docs/typescript-traces.md`](docs/typescript-traces.md) — a **generated, versioned** reference of live command + output traces (every verb, option, config result and edge case) against the mock monorepo. Regenerate after CLI changes with `pnpm docs:traces`.
|
|
183
184
|
|
|
184
185
|
## Architecture: `target → runner → preset`
|
package/dist/bin/sentinel.js
CHANGED
|
@@ -13,13 +13,15 @@ import {
|
|
|
13
13
|
presetNotInstalledYet,
|
|
14
14
|
registerAdapters,
|
|
15
15
|
resolve
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-2DUG6GVU.js";
|
|
17
17
|
import "../chunk-ZZMYV576.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveContext,
|
|
20
20
|
separateToolArgs
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-FZLUCPST.js";
|
|
22
22
|
import "../chunk-ZFG6P27V.js";
|
|
23
|
+
import "../chunk-NE3IEJBN.js";
|
|
24
|
+
import "../chunk-VWASE6NN.js";
|
|
23
25
|
import "../chunk-O7REVMOC.js";
|
|
24
26
|
import "../chunk-H4HAFJFZ.js";
|
|
25
27
|
import "../chunk-QXFCZON7.js";
|
|
@@ -29,7 +31,7 @@ import {
|
|
|
29
31
|
inspectWorkspacePrep,
|
|
30
32
|
readOwnVersion,
|
|
31
33
|
readProjectPackageJson
|
|
32
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-KKHKRY7P.js";
|
|
33
35
|
import {
|
|
34
36
|
DEFAULT_ENV_LEVEL,
|
|
35
37
|
ENV_LEVELS,
|
|
@@ -37,14 +39,17 @@ import {
|
|
|
37
39
|
OUTPUT_SHAPES,
|
|
38
40
|
PRESET_NAMES,
|
|
39
41
|
REPOSITORY_TARGETS,
|
|
42
|
+
STDOUT_PHASE_TARGETS,
|
|
40
43
|
SWEEPABLE_TARGETS,
|
|
41
44
|
TARGETS,
|
|
42
45
|
VERBS
|
|
43
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-XMAXE2Q2.js";
|
|
44
47
|
import "../chunk-TMVKYXZ3.js";
|
|
45
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-NGLEGAEN.js";
|
|
46
49
|
import "../chunk-XYOIXC6A.js";
|
|
47
50
|
import "../chunk-PXTU5MPW.js";
|
|
51
|
+
import "../chunk-U7G2Y6YC.js";
|
|
52
|
+
import "../chunk-F5WISUN3.js";
|
|
48
53
|
import "../chunk-4EIY7TTR.js";
|
|
49
54
|
|
|
50
55
|
// bin/sentinel.ts
|
|
@@ -666,7 +671,7 @@ async function runValidate(ctx) {
|
|
|
666
671
|
);
|
|
667
672
|
}
|
|
668
673
|
if (!ctx.targets.includes("test")) return 1;
|
|
669
|
-
const { validateModuleTests } = await import("../validate-
|
|
674
|
+
const { validateModuleTests } = await import("../validate-GTBRD2M4.js");
|
|
670
675
|
const outcomes = modules.flatMap(
|
|
671
676
|
(module) => validateModuleTests(module.name, module.root)
|
|
672
677
|
);
|
|
@@ -912,8 +917,9 @@ async function runVerb(ctx) {
|
|
|
912
917
|
for (const item of summary.results) process.stdout.write(renderStatusRow(item, out) + "\n");
|
|
913
918
|
process.stdout.write(renderStatusSummary(summary.results, out) + "\n");
|
|
914
919
|
} else {
|
|
920
|
+
const rows = ctx.toolArgs.length > 0 && ctx.targets.every((target) => STDOUT_PHASE_TARGETS.includes(target)) ? process.stderr : process.stdout;
|
|
915
921
|
for (const item of summary.results) {
|
|
916
|
-
|
|
922
|
+
rows.write(renderSummary(item, rows === process.stdout ? out : palette(rows)) + "\n");
|
|
917
923
|
}
|
|
918
924
|
}
|
|
919
925
|
if (!ctx.json && ctx.verb === "inspect") {
|