@hublo/sentinel 1.2.0-alpha.35 → 1.2.0-alpha.36
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/dist/bin/sentinel.js
CHANGED
|
@@ -5618,7 +5618,15 @@ var toolchain_default2 = {
|
|
|
5618
5618
|
var OWNED_TEST_PACKAGES = toolchain_default2.owned;
|
|
5619
5619
|
|
|
5620
5620
|
// src/roles/test/config-policy.ts
|
|
5621
|
-
var
|
|
5621
|
+
var TEST_PRESET_SPECIFIERS = {
|
|
5622
|
+
react: "@hublo/sentinel/test/react",
|
|
5623
|
+
nest: "@hublo/sentinel/test/nest"
|
|
5624
|
+
};
|
|
5625
|
+
function testPresetSpecifier(preset) {
|
|
5626
|
+
return TEST_PRESET_SPECIFIERS[preset] ?? TEST_PRESET_SPECIFIERS.react;
|
|
5627
|
+
}
|
|
5628
|
+
var ALL_TEST_PRESET_SPECIFIERS = Object.values(TEST_PRESET_SPECIFIERS);
|
|
5629
|
+
var TEST_PRESET_SPECIFIER = TEST_PRESET_SPECIFIERS.react;
|
|
5622
5630
|
var TEST_CONFIG_FILES = [
|
|
5623
5631
|
"vitest.config.ts",
|
|
5624
5632
|
"vitest.config.mts",
|
|
@@ -5629,10 +5637,9 @@ var TEST_OWNED_PACKAGES = OWNED_TEST_PACKAGES;
|
|
|
5629
5637
|
var SENTINEL_OWNED_TEST_PACKAGES = TEST_OWNED_PACKAGES.filter(
|
|
5630
5638
|
(entry) => entry.package !== "vite"
|
|
5631
5639
|
).map((entry) => entry.package);
|
|
5632
|
-
|
|
5633
|
-
presetSpecifier:
|
|
5634
|
-
|
|
5635
|
-
};
|
|
5640
|
+
function testToolchain(preset) {
|
|
5641
|
+
return { presetSpecifier: testPresetSpecifier(preset), owned: TEST_OWNED_PACKAGES };
|
|
5642
|
+
}
|
|
5636
5643
|
var TEST_SCRIPT_NAME = "test";
|
|
5637
5644
|
var SENTINEL_TEST_COMMAND = "sentinel --run --test --";
|
|
5638
5645
|
var VITEST_INVOCATION = /(^|&&\s*|\|\|\s*|;\s*)(?:npx\s+|pnpm\s+(?:exec\s+|dlx\s+)?)?vitest\b([^&|;]*)/g;
|
|
@@ -5728,8 +5735,10 @@ function readTestConfigSource(cwd, fileName) {
|
|
|
5728
5735
|
}
|
|
5729
5736
|
}
|
|
5730
5737
|
function importsPreset2(source) {
|
|
5731
|
-
|
|
5732
|
-
|
|
5738
|
+
return ALL_TEST_PRESET_SPECIFIERS.some((specifier) => {
|
|
5739
|
+
const escaped = specifier.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5740
|
+
return new RegExp(String.raw`(?:from|import)\s*\(?\s*['"]${escaped}['"]`).test(source);
|
|
5741
|
+
});
|
|
5733
5742
|
}
|
|
5734
5743
|
function readTestAdoption(cwd) {
|
|
5735
5744
|
const manifest = readProjectPackageJson(cwd);
|
|
@@ -6615,7 +6624,7 @@ function plan3(context) {
|
|
|
6615
6624
|
const operations = [];
|
|
6616
6625
|
const notes = [];
|
|
6617
6626
|
const rewrite = rewriteToolchainImports(
|
|
6618
|
-
|
|
6627
|
+
testToolchain(context.preset),
|
|
6619
6628
|
readTestConfigSource(context.cwd, configFile),
|
|
6620
6629
|
configFile
|
|
6621
6630
|
);
|
|
@@ -7912,4 +7921,4 @@ export {
|
|
|
7912
7921
|
detectFramework,
|
|
7913
7922
|
dispatch
|
|
7914
7923
|
};
|
|
7915
|
-
//# sourceMappingURL=chunk-
|
|
7924
|
+
//# sourceMappingURL=chunk-U2KUKV4C.js.map
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.36",
|
|
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",
|