@maverickcer/env-cap 0.7.1 → 0.7.3

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/build.js CHANGED
@@ -367,18 +367,21 @@ function isAlwaysSkippedDirName(name) {
367
367
  return name === "node_modules" || name === ".git";
368
368
  }
369
369
  var MAX_DISCOVERED_SCHEMA_FILES = 1e3;
370
- async function discoverSchemaFiles(options) {
370
+ async function discoverFiles(options) {
371
371
  const files = await walkDirectory(options.root, options.root, options.exclude, options.fs);
372
- const included = files.filter((file) => {
372
+ return files.filter((file) => {
373
373
  const relativePath = toPosixRelative(options.root, file);
374
374
  return matchesAnyPattern(relativePath, options.include) && !matchesAnyPattern(relativePath, options.exclude);
375
- });
375
+ }).map((file) => path.normalize(file)).sort();
376
+ }
377
+ async function discoverSchemaFiles(options) {
378
+ const included = await discoverFiles(options);
376
379
  if (included.length > MAX_DISCOVERED_SCHEMA_FILES) {
377
380
  throw new Error(
378
381
  `discoverSchemaFiles: found ${String(included.length)} files matching "include" under ${options.root} -- more than the ${String(MAX_DISCOVERED_SCHEMA_FILES)}-file sanity limit. This almost always means "root" (or "include"/"exclude") resolved more broadly than intended -- e.g. an omitted "root" falling back to an unexpectedly large process.cwd() -- rather than a real project genuinely declaring this many contracts. Narrow "root"/"include"/"exclude" to the intended project boundary.`
379
382
  );
380
383
  }
381
- return included.map((file) => path.normalize(file)).sort();
384
+ return included;
382
385
  }
383
386
  async function walkDirectory(directory, root, exclude, fs) {
384
387
  const entries = await fs.readdir(directory, { withFileTypes: true });
@@ -2919,7 +2922,7 @@ function renderUsageReport(computed) {
2919
2922
 
2920
2923
  // src/build/generate-usage.ts
2921
2924
  async function computeScanSurface(root, exclude, origins, fs) {
2922
- const localScanFiles = await discoverSchemaFiles({
2925
+ const localScanFiles = await discoverFiles({
2923
2926
  fs,
2924
2927
  root,
2925
2928
  include: ["**/*.ts", "**/*.tsx"],
@@ -2931,7 +2934,7 @@ async function computeScanSurface(root, exclude, origins, fs) {
2931
2934
  for (const origin of origins.values()) {
2932
2935
  if (seenPackageDirs.has(origin.packageDir)) continue;
2933
2936
  seenPackageDirs.add(origin.packageDir);
2934
- const packageScanFiles = await discoverSchemaFiles({
2937
+ const packageScanFiles = await discoverFiles({
2935
2938
  fs,
2936
2939
  root: origin.packageDir,
2937
2940
  include: ["**/*.ts", "**/*.tsx"],
@@ -4492,7 +4495,7 @@ function buildOwnershipModel(contracts, root) {
4492
4495
 
4493
4496
  // src/build/tool-version.ts
4494
4497
  function readToolVersion() {
4495
- return "0.7.1";
4498
+ return "0.7.3";
4496
4499
  }
4497
4500
 
4498
4501
  // src/build/generate-evidence.ts