@hublo/sentinel 1.4.0-alpha.12 → 1.4.0-alpha.13

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.
@@ -16,7 +16,7 @@ import {
16
16
  registerAdapters,
17
17
  resolve,
18
18
  resolveBin
19
- } from "../chunk-KGI2F2QK.js";
19
+ } from "../chunk-YHGCBMKJ.js";
20
20
  import {
21
21
  WORKSPACE_ROOT_MARKER,
22
22
  ensureWorkspacePrep,
@@ -8211,13 +8211,14 @@ function specTypesOperation(cwd) {
8211
8211
  function mockExtendedTypesPath(cwd) {
8212
8212
  try {
8213
8213
  const manifest = createRequire6(join35(cwd, "noop.cjs")).resolve("@hublo/sentinel/package.json");
8214
- const file = join35(dirname7(manifest), "types", "mock-extended.d.ts");
8215
- if (!existsSync29(file)) return void 0;
8216
- const path = relative7(cwd, file);
8217
- return path.startsWith(".") ? path : `./${path}`;
8214
+ const file = join35(dirname7(manifest), MOCK_EXTENDED_TYPES);
8215
+ if (existsSync29(file)) {
8216
+ const path = relative7(cwd, file);
8217
+ return path.startsWith(".") ? path : `./${path}`;
8218
+ }
8218
8219
  } catch {
8219
- return void 0;
8220
8220
  }
8221
+ return `./node_modules/@hublo/sentinel/${MOCK_EXTENDED_TYPES}`;
8221
8222
  }
8222
8223
  function tsconfigFileListOperations(cwd) {
8223
8224
  const operations = [];
@@ -8239,14 +8240,17 @@ function tsconfigFileListOperations(cwd) {
8239
8240
  }
8240
8241
  const include = Array.isArray(config?.include) ? rewriteFileList(config.include) : void 0;
8241
8242
  const exclude = Array.isArray(config?.exclude) ? rewriteFileList(config.exclude) : void 0;
8242
- const withTypes = name === SPEC_TSCONFIG ? withMockExtendedTypes(cwd, include ?? config?.include) : void 0;
8243
- if (include === void 0 && exclude === void 0 && withTypes === void 0) continue;
8243
+ const files = Array.isArray(config?.files) ? rewriteFileList(config.files) : void 0;
8244
+ const withTypes = name === SPEC_TSCONFIG ? withMockExtendedTypes(cwd, files ?? config?.files) : void 0;
8245
+ if (include === void 0 && exclude === void 0 && files === void 0 && withTypes === void 0)
8246
+ continue;
8244
8247
  operations.push({
8245
8248
  kind: "merge-json",
8246
8249
  path: name,
8247
8250
  value: {
8248
- ...withTypes === void 0 ? include === void 0 ? {} : { include } : { include: withTypes },
8249
- ...exclude === void 0 ? {} : { exclude }
8251
+ ...include === void 0 ? {} : { include },
8252
+ ...exclude === void 0 ? {} : { exclude },
8253
+ ...withTypes === void 0 ? files === void 0 ? {} : { files } : { files: withTypes }
8250
8254
  }
8251
8255
  });
8252
8256
  }
@@ -8257,13 +8261,12 @@ function rewriteFileList(entries) {
8257
8261
  const unchanged = rewritten.length === entries.length && rewritten.every((entry, index) => entry === entries[index]);
8258
8262
  return unchanged ? void 0 : rewritten;
8259
8263
  }
8260
- function withMockExtendedTypes(cwd, include) {
8261
- const path = mockExtendedTypesPath(cwd);
8262
- if (path === void 0 || !Array.isArray(include)) return void 0;
8263
- const entries = include;
8264
- if (entries.some((entry) => entry.endsWith("types/mock-extended.d.ts"))) return void 0;
8265
- return [...entries, path];
8264
+ function withMockExtendedTypes(cwd, files) {
8265
+ const entries = Array.isArray(files) ? files : [];
8266
+ if (entries.some((entry) => entry.endsWith(MOCK_EXTENDED_TYPES))) return void 0;
8267
+ return [...entries, mockExtendedTypesPath(cwd)];
8266
8268
  }
8269
+ var MOCK_EXTENDED_TYPES = "types/mock-extended.d.ts";
8267
8270
  var JEST_CONFIG_ENTRY = /(^|\/)jest\.[\w.-]*config\.[cm]?[jt]s$/;
8268
8271
  var TSCONFIG_FILE = /^tsconfig[\w.-]*\.json$/;
8269
8272
  function siblingScriptRewrites(cwd) {
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  registerAdapters,
8
8
  resolve,
9
9
  setDefaultRunner
10
- } from "./chunk-KGI2F2QK.js";
10
+ } from "./chunk-YHGCBMKJ.js";
11
11
  import "./chunk-WLFE5RUU.js";
12
12
  export {
13
13
  BaseAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.4.0-alpha.12",
3
+ "version": "1.4.0-alpha.13",
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",