@r_masseater/msch 0.77.0 → 0.78.0

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.
Files changed (36) hide show
  1. package/README.md +1 -0
  2. package/dist/changed.mjs +2 -2
  3. package/dist/cli.mjs +230 -296
  4. package/dist/cli.mjs.map +1 -1
  5. package/dist/exits.mjs +2 -2
  6. package/dist/{lookup-report-Dp36RBaW.mjs → lookup-report-BdUByHMt.mjs} +2 -2
  7. package/dist/{lookup-report-Dp36RBaW.mjs.map → lookup-report-BdUByHMt.mjs.map} +1 -1
  8. package/dist/manifest-texts-C6Qjv0xy.mjs +29 -0
  9. package/dist/manifest-texts-C6Qjv0xy.mjs.map +1 -0
  10. package/dist/output-BUCq_3DP.mjs +28 -0
  11. package/dist/output-BUCq_3DP.mjs.map +1 -0
  12. package/dist/oxlint.mjs +1 -1
  13. package/dist/package-versions-G9Unih6I.mjs +91 -0
  14. package/dist/package-versions-G9Unih6I.mjs.map +1 -0
  15. package/dist/{pass-records-D5HYFQWz.mjs → pass-records-6XLhXZL3.mjs} +2 -2
  16. package/dist/{pass-records-D5HYFQWz.mjs.map → pass-records-6XLhXZL3.mjs.map} +1 -1
  17. package/dist/{syntax-CbxAKkqt.mjs → problem-OJg859cN.mjs} +54 -8
  18. package/dist/problem-OJg859cN.mjs.map +1 -0
  19. package/dist/published.mjs +3 -2
  20. package/dist/published.mjs.map +1 -1
  21. package/dist/refs.mjs +1 -1
  22. package/dist/{manifest-texts-CfnH7ifu.mjs → specifiers-D9L0OV3r.mjs} +3 -28
  23. package/dist/specifiers-D9L0OV3r.mjs.map +1 -0
  24. package/dist/unbumped.d.mts +1 -0
  25. package/dist/unbumped.mjs +19 -0
  26. package/dist/unbumped.mjs.map +1 -0
  27. package/dist/{upstream-exits-CiX81Owg.mjs → upstream-exits-CJehIR2f.mjs} +2 -2
  28. package/dist/{upstream-exits-CiX81Owg.mjs.map → upstream-exits-CJehIR2f.mjs.map} +1 -1
  29. package/package.json +4 -3
  30. package/skills/msch-checks/SKILL.md +2 -1
  31. package/dist/manifest-texts-CfnH7ifu.mjs.map +0 -1
  32. package/dist/output-DrM4OsOJ.mjs +0 -14
  33. package/dist/output-DrM4OsOJ.mjs.map +0 -1
  34. package/dist/problem-aeeiOlaz.mjs +0 -51
  35. package/dist/problem-aeeiOlaz.mjs.map +0 -1
  36. package/dist/syntax-CbxAKkqt.mjs.map +0 -1
package/dist/cli.mjs CHANGED
@@ -1,17 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as workspaceManifest } from "./workspace-manifest-CAVYfp66.mjs";
3
- import { C as valueKey, S as schemaTypeOf, _ as formatValues, a as nearestManifestDirectory, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as installedPackages, l as mentions$1, m as isObjectType, n as keepOnly, o as projectInputs, p as describeLibraryType, r as recordsIn, t as contentKey, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./pass-records-D5HYFQWz.mjs";
3
+ import { C as valueKey, S as schemaTypeOf, _ as formatValues, a as nearestManifestDirectory, b as literalValuesOf, c as listConfigFiles, d as withProject, f as declarationKey, g as finiteValuesOf, h as locationOf, i as installedPackages, l as mentions$1, m as isObjectType, n as keepOnly, o as projectInputs, p as describeLibraryType, r as recordsIn, t as contentKey, u as typeScriptCompiler, v as isSubsetOf, w as vocabularyOf, x as sameValues, y as literalUnionOf } from "./pass-records-6XLhXZL3.mjs";
4
4
  import { a as groupOf, n as RepositoryFiles, t as NODE_MODULES } from "./repository-files-C2gVviac.mjs";
5
- import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-CiX81Owg.mjs";
5
+ import { a as workspaceDeviations, c as tomlSourceComments, d as problemAtIndex, i as cargoDeviations, l as yamlSourceComments, o as collectNodes, r as WORKSPACE_SECTIONS, s as isRecord, t as checkUpstreamExits, u as positionOf } from "./upstream-exits-CJehIR2f.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName } from "./path-DUttmo2s.mjs";
7
7
  import { a as unmatchedWorkspacePatterns, i as publishedProjects, n as readManifest, o as workspaceDirectories, s as workspaceProjects } from "./dependencies-BAjtDvY4.mjs";
8
- import { a as problemAtPosition, i as problemAt$7, o as problemInFile, r as formatProblem, s as sortProblems, t as ProblemList } from "./problem-aeeiOlaz.mjs";
9
- import { A as keyName, D as workspaceConfigOf, M as nestedValues, N as propertyValue, O as KeySchema, P as stringsIn, _ as VERIFY_TASK, a as entryNameOf, d as deployEntries, g as RUN_TASKS, i as publishedWorkspaces, j as literalOf, k as childrenOf$1, l as workspaceLinks, o as isBinEntry, p as shadcnUiOf, r as packedWorkspaces, s as publicEntriesOf, u as bundledEntries, v as definesTask, y as hasVerifyTask } from "./published-C34bsbOH.mjs";
8
+ import { $ as isInterfaceDeclaration, B as isArrowFunction, C as propertyNamesOf, D as symbolAtLocation, E as symbolAt, F as getJSDocTags, G as isElementAccessExpression, H as isBlock, J as isExpressionStatement, K as isEnumDeclaration, L as getNameOfDeclaration, M as SignatureKind, N as SymbolFlags, O as uniqueByReference, P as SyntaxKind, Q as isImportDeclaration, R as getTextOfJSDocComment, S as packageOf$1, U as isCallExpression, V as isBinaryExpression, W as isClassDeclaration, X as isFunctionExpression, Y as isFunctionDeclaration, Z as isIdentifier, _ as isGenericDeclaration, _t as isUnionTypeNode, a as problemAtPosition, at as isParenthesizedExpression, b as isTypeDeclaration, bt as isVariableStatement, c as carriesTag, ct as isReturnStatement, d as contains, dt as isSourceFile, et as isModuleBlock, f as declarationsOf, ft as isSpreadElement, g as isExternalDeclaration, gt as isTypeReferenceNode, h as importedModulesOf, ht as isTypeLiteralNode, i as problemAt$7, it as isObjectLiteralExpression, l as childrenOf$1, lt as isSatisfiesExpression, m as descendantsOf, mt as isTypeAliasDeclaration, nt as isNewExpression, o as problemInFile, ot as isPropertyAccessExpression, p as declaresAType, pt as isStringLiteral, q as isExportDeclaration, rt as isNumericLiteral, s as sortProblems, st as isPropertyAssignment, t as ProblemList, tt as isModuleDeclaration, u as columnOf, ut as isSignatureDeclaration, v as isInsideAny, vt as isVariableDeclaration, w as referencedSymbols, x as lineOf$3, y as isOutsideDeclaration, yt as isVariableDeclarationList, z as isArrayLiteralExpression } from "./problem-OJg859cN.mjs";
9
+ import { A as keyName, D as workspaceConfigOf, M as nestedValues, N as propertyValue, O as KeySchema, P as stringsIn, _ as VERIFY_TASK, a as entryNameOf, d as deployEntries, g as RUN_TASKS, i as publishedWorkspaces, j as literalOf, k as childrenOf$2, l as workspaceLinks, o as isBinEntry, p as shadcnUiOf, r as packedWorkspaces, s as publicEntriesOf, u as bundledEntries, v as definesTask, y as hasVerifyTask } from "./published-C34bsbOH.mjs";
10
10
  import { t as JAPANESE } from "./config-CvPuqi4L.mjs";
11
11
  import { n as readTree, t as loadLanguage } from "./tree-sitter-BfzHNwTR.mjs";
12
- import { $ as isPropertyAccessExpression, A as getNameOfDeclaration, B as isExportDeclaration, D as SyntaxKind, E as SymbolFlags, F as isBlock, G as isImportDeclaration, H as isFunctionDeclaration, I as isCallExpression, J as isModuleDeclaration, K as isInterfaceDeclaration, L as isClassDeclaration, M as isArrayLiteralExpression, N as isArrowFunction, O as getJSDocTags, P as isBinaryExpression, Q as isParenthesizedExpression, R as isElementAccessExpression, T as SignatureKind, U as isFunctionExpression, V as isExpressionStatement, W as isIdentifier, X as isNumericLiteral, Y as isNewExpression, Z as isObjectLiteralExpression, _ as referencedSymbols, a as declarationsOf, at as isSpreadElement, b as symbolAtLocation, c as importedModulesOf, ct as isTypeLiteralNode, d as isInsideAny, dt as isVariableDeclaration, et as isPropertyAssignment, f as isOutsideDeclaration, ft as isVariableDeclarationList, g as propertyNamesOf, h as packageOf$1, i as contains, it as isSourceFile, j as getTextOfJSDocComment, l as isExternalDeclaration, lt as isTypeReferenceNode, m as lineOf$3, n as childrenOf$2, nt as isSatisfiesExpression, o as declaresAType, ot as isStringLiteral, p as isTypeDeclaration, pt as isVariableStatement, q as isModuleBlock, r as columnOf, rt as isSignatureDeclaration, s as descendantsOf, st as isTypeAliasDeclaration, t as carriesTag, tt as isReturnStatement, u as isGenericDeclaration, ut as isUnionTypeNode, x as uniqueByReference, y as symbolAt, z as isEnumDeclaration } from "./syntax-CbxAKkqt.mjs";
13
- import { a as manifestPattern, c as offsetIn$1, i as fieldsOf, l as quoted$2, n as baseName$1, o as manifestSpecifiers, r as baseRevision, s as namedCatalogsOf, t as manifestTexts, u as specifiedIn } from "./manifest-texts-CfnH7ifu.mjs";
14
- import { n as writeStdout, t as ProblemsFound } from "./output-DrM4OsOJ.mjs";
12
+ import { n as baseName$1, r as baseRevision, t as manifestTexts } from "./manifest-texts-C6Qjv0xy.mjs";
13
+ import { a as offsetIn$1, i as namedCatalogsOf, n as manifestPattern, o as quoted$2, r as manifestSpecifiers, s as specifiedIn, t as fieldsOf } from "./specifiers-D9L0OV3r.mjs";
14
+ import { t as checkPackageVersions } from "./package-versions-G9Unih6I.mjs";
15
+ import { i as writeStdout, n as failWhenAny, r as writeProblems } from "./output-BUCq_3DP.mjs";
15
16
  import { t as runCli } from "./runtime-CFZ41rB0.mjs";
16
17
  import "./cli-contract-D7btWrEu.mjs";
17
18
  import { builtinModules } from "node:module";
@@ -21,7 +22,7 @@ import { lockedGraph, lockedPackageIds, parseDependencyPath, updateWorkspaceMani
21
22
  import { ChildProcess } from "effect/process";
22
23
  import { parse, resolveConfigFromFile } from "vite-plus";
23
24
  import { DEPENDENCY_SECTIONS, PACKAGE_JSON_FILE, RUNTIME_SECTIONS, binEntriesOf, namesIn, optionalPeerNames, runtimeDependencyNames, targetsIn } from "@r_masseater/kestrion";
24
- import { decodePackageJson, decodeVersionedPackageJson } from "@r_masseater/kestrion/npm";
25
+ import { decodePackageJson } from "@r_masseater/kestrion/npm";
25
26
  import { fileURLToPath } from "node:url";
26
27
  import { getStaticTOMLValue, parseTOML } from "toml-eslint-parser";
27
28
  import { isMap, isPair, isScalar, isSeq, parse as parse$1, parseDocument, visit } from "yaml";
@@ -498,7 +499,7 @@ const checkOverrides = Effect.fn("checkOverrides")(function* checkOverrides(root
498
499
  const SCANNED_FILE = /(?:\.(?:[cm]?[jt]sx?|jsonc?|toml|ya?ml|sh|bash|zsh|fish|rs|cs|go|mk)|(?:^|\/)(?:(?:Dockerfile|Containerfile)[^/]*|Makefile|justfile|\.tool-versions|[^./][^./]*))$/u;
499
500
  const LOCKFILE$1 = /(?:^|\/)(?:[^/]*\.lock|[^/]*-lock\.(?:json|ya?ml))$/u;
500
501
  const TOOL_VERSIONS = /(?:^|\/)(?:\.?mise(?:\.[^/]+)?\.toml|\.tool-versions)$/u;
501
- const READ_CONCURRENCY$36 = 64;
502
+ const READ_CONCURRENCY$35 = 64;
502
503
  const isScannedText = ({ name }) => SCANNED_FILE.test(name) && !LOCKFILE$1.test(name);
503
504
  const isToolVersions = ({ name }) => TOOL_VERSIONS.test(name);
504
505
  /** @internal */
@@ -521,18 +522,18 @@ const scanText = Effect.fn("scanText")(function* scanText(listed, problemsIn) {
521
522
  const found = yield* Effect.forEach(listed, (entry) => files.readFile(entry.file).pipe(Effect.map(Option.match({
522
523
  onNone: () => [],
523
524
  onSome: (source) => problemsIn(entry, source)
524
- }))), { concurrency: READ_CONCURRENCY$36 });
525
+ }))), { concurrency: READ_CONCURRENCY$35 });
525
526
  return Array$1.flatten(found);
526
527
  });
527
528
  // src/features/check-overrides/model/git-subpath.ts
528
529
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
529
530
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
530
- const RULE$69 = "git-subpath-dependency";
531
+ const RULE$68 = "git-subpath-dependency";
531
532
  const WHOLE_MATCH$4 = 0;
532
533
  const problemAt$6 = ({ file }, source) => (found) => ({
533
534
  file,
534
535
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
535
- rule: RULE$69,
536
+ rule: RULE$68,
536
537
  message: `Git subpath dependencies are banned. Publish the package to npm and depend on a released version instead of \`${String$1.trim(found[WHOLE_MATCH$4])}\`.`
537
538
  });
538
539
  const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$6(entry, source)));
@@ -543,13 +544,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
543
544
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$23);
544
545
  });
545
546
  // src/features/check-overrides/model/restricted-rules.ts
546
- const RULE$68 = "unnamed-restriction";
547
+ const RULE$67 = "unnamed-restriction";
547
548
  const WHOLE_MATCH$3 = 0;
548
549
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-(?:imports|properties)\\b`, "gu");
549
550
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
550
551
  file: entry.file,
551
552
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
552
- rule: RULE$68,
553
+ rule: RULE$67,
553
554
  message: `${found[WHOLE_MATCH$3]} is not used in this repository, because its name does not say what an entry protects. Ban a package in dependencyRules.banned, and write any other restriction as a rule in msch-lint whose name states the intent.`
554
555
  })));
555
556
  /** @internal */
@@ -558,13 +559,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
558
559
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$22);
559
560
  });
560
561
  // src/features/check-overrides/model/type-exemptions.ts
561
- const RULE$67 = "named-type-exemption";
562
+ const RULE$66 = "named-type-exemption";
562
563
  const WHOLE_MATCH$2 = 0;
563
564
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
564
565
  const problemsIn$21 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
565
566
  file: entry.file,
566
567
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
567
- rule: RULE$67,
568
+ rule: RULE$66,
568
569
  message: "exempts a type from a lint rule by its name. Such a list is written by hand for every dependency and only grows. msch-lint/readonly-parameters reads where each type is declared and exempts the types of packages and of the language by itself, so remove the entry. For another rule, add a rule to msch-lint that reads the declaration."
569
570
  })));
570
571
  /** @internal */
@@ -573,7 +574,7 @@ const checkTypeExemptions = Effect.fn("checkTypeExemptions")(function* checkType
573
574
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$21);
574
575
  });
575
576
  // src/features/check-overrides/model/package-registry.ts
576
- const RULE$66 = "package-registry";
577
+ const RULE$65 = "package-registry";
577
578
  const REGISTRY = "https://npm.flatt.tech/";
578
579
  const TRAILING_SLASH = /\/$/u;
579
580
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
@@ -590,7 +591,7 @@ const offsetIn = (found) => pipe(Option.fromNullishOr(found), Option.map(({ inde
590
591
  const workspaceProblem = (file, source, registry) => ({
591
592
  file,
592
593
  ...positionOf(source)(offsetIn(WORKSPACE_REGISTRY.exec(source))),
593
- rule: RULE$66,
594
+ rule: RULE$65,
594
595
  message: Option.match(registry, {
595
596
  onNone: () => `${REASON} Set \`registry: ${REGISTRY}\` in ${WORKSPACE_FILE$5}.`,
596
597
  onSome: (value) => `${REASON} \`registry\` is ${value}. Set it to ${REGISTRY}.`
@@ -599,7 +600,7 @@ const workspaceProblem = (file, source, registry) => ({
599
600
  const npmrcProblems = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array$1.filter((found) => !Option.exists(groupOf("value")(found), isGuarded)), Array$1.map((found) => ({
600
601
  file: entry.file,
601
602
  ...positionOf(source)(found.index ?? START$28),
602
- rule: RULE$66,
603
+ rule: RULE$65,
603
604
  message: `${REASON} This .npmrc overrides it with \`${String$1.trim(found[START$28])}\`. Remove the line.`
604
605
  })));
605
606
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -2726,7 +2727,7 @@ const matcher = (patterns) => {
2726
2727
  String$1.startsWith(NEGATION$2);
2727
2728
  String$1.slice(1);
2728
2729
  // src/features/check-placement/model/colocated-git-patterns.ts
2729
- const RULE$65 = "colocated-git-patterns";
2730
+ const RULE$64 = "colocated-git-patterns";
2730
2731
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
2731
2732
  const ROOT$3 = ".";
2732
2733
  const NEGATION$1 = "!";
@@ -2737,7 +2738,7 @@ const LEADING_SLASHES = /^\/+/u;
2737
2738
  const TRAILING_SLASHES = /\/+$/u;
2738
2739
  const SPACES = /\s+/u;
2739
2740
  const FIRST$23 = 1;
2740
- const READ_CONCURRENCY$35 = 16;
2741
+ const READ_CONCURRENCY$34 = 16;
2741
2742
  const withoutPrefix = (prefix, text) => {
2742
2743
  if (String$1.startsWith(prefix)(text)) return String$1.slice(prefix.length)(text);
2743
2744
  return text;
@@ -2773,7 +2774,7 @@ const entriesIn$1 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
2773
2774
  const toEntry = entryOf$1(absolute, files.basename(file), files.dirname(file));
2774
2775
  return pipe(Option.getOrElse(text, () => ""), String$1.split("\n"), Array$1.map(toEntry), Array$1.getSomes);
2775
2776
  });
2776
- const patternProblem = (entry, message) => problemAtPosition(RULE$65)(entry.file, {
2777
+ const patternProblem = (entry, message) => problemAtPosition(RULE$64)(entry.file, {
2777
2778
  line: entry.line,
2778
2779
  column: FIRST$23
2779
2780
  }, message);
@@ -2828,10 +2829,10 @@ const repeated = (entries) => (entry) => {
2828
2829
  /** @internal */
2829
2830
  const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(function* checkColocatedGitPatterns(root) {
2830
2831
  const patternFiles = yield* (yield* RepositoryFiles).matchingFiles(root, PATTERN_FILES);
2831
- const read = yield* Effect.forEach(patternFiles, (file) => entriesIn$1(root, file), { concurrency: READ_CONCURRENCY$35 });
2832
+ const read = yield* Effect.forEach(patternFiles, (file) => entriesIn$1(root, file), { concurrency: READ_CONCURRENCY$34 });
2832
2833
  const entries = Array$1.flatten(read);
2833
2834
  const workspaces = yield* workspaceDirectories(root);
2834
- const misplacedFound = yield* Effect.forEach(entries, (entry) => misplaced(root, workspaces, entry), { concurrency: READ_CONCURRENCY$35 });
2835
+ const misplacedFound = yield* Effect.forEach(entries, (entry) => misplaced(root, workspaces, entry), { concurrency: READ_CONCURRENCY$34 });
2835
2836
  const repeatedFound = pipe(entries, Array$1.map(repeated(entries)));
2836
2837
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
2837
2838
  });
@@ -2855,9 +2856,9 @@ const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* sca
2855
2856
  })), Option.getOrElse(() => [])));
2856
2857
  });
2857
2858
  // src/features/check-placement/model/colocated-tests.ts
2858
- const RULE$64 = "colocated-test";
2859
+ const RULE$63 = "colocated-test";
2859
2860
  const FIRST$22 = 1;
2860
- const READ_CONCURRENCY$34 = 64;
2861
+ const READ_CONCURRENCY$33 = 64;
2861
2862
  const ROOT_SUBPATH$1 = ".";
2862
2863
  const NAME_GROUP = "name";
2863
2864
  const SPECIFIER_GROUP = "specifier";
@@ -2878,7 +2879,7 @@ const problemFor$9 = (test, message) => ({
2878
2879
  file: test.file,
2879
2880
  line: FIRST$22,
2880
2881
  column: FIRST$22,
2881
- rule: RULE$64,
2882
+ rule: RULE$63,
2882
2883
  message: `${test.base} ${message}`
2883
2884
  });
2884
2885
  const groupsOf$1 = (source, pattern, group) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((match) => pipe(Option.fromUndefinedOr(match.groups), Option.flatMap((groups) => Option.fromUndefinedOr(groups[group])))), Array$1.getSomes);
@@ -2941,12 +2942,12 @@ const checkColocatedTests = Effect.fn("checkColocatedTests")(function* checkColo
2941
2942
  directory: files.dirname(file)
2942
2943
  };
2943
2944
  }));
2944
- const found = yield* Effect.forEach(tests, (test) => problemIn$8(context, test), { concurrency: READ_CONCURRENCY$34 });
2945
+ const found = yield* Effect.forEach(tests, (test) => problemIn$8(context, test), { concurrency: READ_CONCURRENCY$33 });
2945
2946
  return Array$1.getSomes(found);
2946
2947
  });
2947
2948
  // src/shared/lib/agent-docs.ts
2948
2949
  const AGENT_DOC = /(?:^|\/)(?:AGENTS|CLAUDE)\.md$/u;
2949
- const READ_CONCURRENCY$33 = 16;
2950
+ const READ_CONCURRENCY$32 = 16;
2950
2951
  const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblems(root, problemIn) {
2951
2952
  const files = yield* RepositoryFiles;
2952
2953
  const listed = yield* files.listedFiles(root);
@@ -2955,13 +2956,13 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
2955
2956
  const file = files.join(root, name);
2956
2957
  const problemOf = Option.flatMap(problemIn(file));
2957
2958
  return files.readFile(file).pipe(Effect.map(problemOf));
2958
- }, { concurrency: READ_CONCURRENCY$33 });
2959
+ }, { concurrency: READ_CONCURRENCY$32 });
2959
2960
  return Array$1.getSomes(found);
2960
2961
  });
2961
2962
  // src/features/check-placement/model/agent-docs-length.ts
2962
2963
  const RECOMMENDED_LINES = 200;
2963
2964
  const FIRST$21 = 1;
2964
- const RULE$63 = "agent-docs-length";
2965
+ const RULE$62 = "agent-docs-length";
2965
2966
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
2966
2967
  const problemFor$8 = (file) => (lines) => {
2967
2968
  if (lines <= RECOMMENDED_LINES) return Option.none();
@@ -2969,18 +2970,18 @@ const problemFor$8 = (file) => (lines) => {
2969
2970
  file,
2970
2971
  line: 201,
2971
2972
  column: FIRST$21,
2972
- rule: RULE$63,
2973
+ rule: RULE$62,
2973
2974
  message: `has ${String(lines)} lines. Claude Code recommends under ${String(RECOMMENDED_LINES)} lines per file: longer files cost context and are followed less reliably. Cut what the code already tells, and move rules shared across repositories into skills.`
2974
2975
  });
2975
2976
  };
2976
2977
  /** @internal */
2977
2978
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$8(file)(lineCount(source)));
2978
2979
  // src/features/check-placement/model/claude-link.ts
2979
- const RULE$62 = "claude-md-link";
2980
+ const RULE$61 = "claude-md-link";
2980
2981
  const CLAUDE = "CLAUDE.md";
2981
2982
  const AGENTS = "AGENTS.md";
2982
2983
  const FIRST$20 = 1;
2983
- const READ_CONCURRENCY$32 = 16;
2984
+ const READ_CONCURRENCY$31 = 16;
2984
2985
  const MESSAGE$18 = "CLAUDE.md must be a symbolic link to AGENTS.md";
2985
2986
  /** @internal */
2986
2987
  const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLinks(root) {
@@ -2995,19 +2996,19 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
2995
2996
  file: path,
2996
2997
  line: FIRST$20,
2997
2998
  column: FIRST$20,
2998
- rule: RULE$62,
2999
+ rule: RULE$61,
2999
3000
  message: MESSAGE$18
3000
3001
  })));
3001
3002
  });
3002
3003
  const claude = pipe(listed, Array$1.filter((name) => files.basename(name) === CLAUDE));
3003
- const found = yield* Effect.forEach(claude, problemOf, { concurrency: READ_CONCURRENCY$32 });
3004
+ const found = yield* Effect.forEach(claude, problemOf, { concurrency: READ_CONCURRENCY$31 });
3004
3005
  return Array$1.getSomes(found);
3005
3006
  });
3006
3007
  // src/features/check-placement/model/dangling-links.ts
3007
- const RULE$61 = "dangling-link";
3008
+ const RULE$60 = "dangling-link";
3008
3009
  const SEPARATOR$21 = "/";
3009
3010
  const FIRST$19 = 1;
3010
- const READ_CONCURRENCY$31 = 16;
3011
+ const READ_CONCURRENCY$30 = 16;
3011
3012
  const holds = (target) => (name) => name === target || String$1.startsWith(`${target}${SEPARATOR$21}`)(name);
3012
3013
  /** @internal */
3013
3014
  const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDanglingLinks(root) {
@@ -3020,11 +3021,11 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3020
3021
  file,
3021
3022
  line: FIRST$19,
3022
3023
  column: FIRST$19,
3023
- rule: RULE$61,
3024
+ rule: RULE$60,
3024
3025
  message: `is a link to ${target}, where no file is tracked. A fresh checkout gets a link to nothing, and GitHub Actions fails to load the repository's actions. Track a file there, such as .gitkeep, or delete the link.`
3025
3026
  })));
3026
3027
  });
3027
- const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$31 });
3028
+ const found = yield* Effect.forEach(links, problemOf, { concurrency: READ_CONCURRENCY$30 });
3028
3029
  return Array$1.getSomes(found);
3029
3030
  });
3030
3031
  // src/features/check-placement/model/member-sources.ts
@@ -3078,9 +3079,9 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3078
3079
  }));
3079
3080
  });
3080
3081
  // src/features/check-placement/model/deployed-readme.ts
3081
- const RULE$60 = "deployed-readme";
3082
+ const RULE$59 = "deployed-readme";
3082
3083
  const ROOT_DIRECTORY$4 = "";
3083
- const READ_CONCURRENCY$30 = 16;
3084
+ const READ_CONCURRENCY$29 = 16;
3084
3085
  const MISSING_MESSAGE$2 = "is missing. This workspace has an Alchemy stack that serves an address, so give it a README.md that says what it is and links its URL.";
3085
3086
  const NO_URL_MESSAGE = "has no https:// URL. This workspace has an Alchemy stack that serves an address, so link the URL it is served at.";
3086
3087
  const ADDRESS_KEYS = [
@@ -3106,7 +3107,7 @@ const ReturnedObject = Schema.Struct({
3106
3107
  });
3107
3108
  const decodeReturnedObject = Schema.decodeUnknownOption(ReturnedObject);
3108
3109
  const returnsUrl = (node) => pipe(decodeReturnedObject(node), Option.exists(({ argument }) => pipe(argument.properties, Array$1.some(isUrlProperty))));
3109
- const servesAddress = (node) => isAddressProperty(node) || returnsUrl(node) || pipe(childrenOf$1(node), Array$1.some(servesAddress));
3110
+ const servesAddress = (node) => isAddressProperty(node) || returnsUrl(node) || pipe(childrenOf$2(node), Array$1.some(servesAddress));
3110
3111
  const deploysTo = Effect.fn("deploysTo")(function* deploysTo(root, file) {
3111
3112
  const files = yield* RepositoryFiles;
3112
3113
  const text = yield* files.readFile(files.join(root, file));
@@ -3118,14 +3119,14 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3118
3119
  const readme = yield* readReadme({
3119
3120
  root,
3120
3121
  directory,
3121
- rule: RULE$60,
3122
+ rule: RULE$59,
3122
3123
  missingMessage: MISSING_MESSAGE$2
3123
3124
  });
3124
3125
  return Result.match(readme, {
3125
3126
  onFailure: Option.some,
3126
3127
  onSuccess: ({ file, source }) => pipe(Option.liftPredicate(source, (text) => !URL_PATTERN.test(text)), Option.map(() => fileProblem$1({
3127
3128
  file,
3128
- rule: RULE$60,
3129
+ rule: RULE$59,
3129
3130
  message: NO_URL_MESSAGE
3130
3131
  })))
3131
3132
  });
@@ -3136,16 +3137,16 @@ const checkDeployedReadme = Effect.fn("checkDeployedReadme")(function* checkDepl
3136
3137
  const listed = yield* files.listedFiles(root);
3137
3138
  const directories = yield* workspaceDirectories(root);
3138
3139
  const candidates = pipe(listed, Array$1.filter((file) => STACK_FILE.test(file)));
3139
- const deploying = yield* Effect.filter(candidates, (file) => deploysTo(root, file), { concurrency: READ_CONCURRENCY$30 });
3140
+ const deploying = yield* Effect.filter(candidates, (file) => deploysTo(root, file), { concurrency: READ_CONCURRENCY$29 });
3140
3141
  const owners = pipe(deploying, Array$1.map((file) => pipe(owningWorkspace(directories)(files.dirname(file)), Option.getOrElse(() => ROOT_DIRECTORY$4))), Array$1.dedupe);
3141
- const found = yield* Effect.forEach(owners, (directory) => problemIn$7(root, directory), { concurrency: READ_CONCURRENCY$30 });
3142
+ const found = yield* Effect.forEach(owners, (directory) => problemIn$7(root, directory), { concurrency: READ_CONCURRENCY$29 });
3142
3143
  return Array$1.getSomes(found);
3143
3144
  });
3144
3145
  // src/features/check-placement/model/nested-docs.ts
3145
- const RULE$59 = "nested-docs";
3146
+ const RULE$58 = "nested-docs";
3146
3147
  const CONFIG_FILE$7 = "vite.config.ts";
3147
3148
  const SEPARATOR$19 = "/";
3148
- const READ_CONCURRENCY$29 = 64;
3149
+ const READ_CONCURRENCY$28 = 64;
3149
3150
  const AGENT_DOCS$1 = /^(?:AGENTS|CLAUDE)(?:\.[^/]+)?\.md$/iu;
3150
3151
  const WORKSPACE_AGENT_DOC = "AGENTS.md";
3151
3152
  const README = /^README(?:\.[^/]+)?$/iu;
@@ -3155,7 +3156,7 @@ const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Sc
3155
3156
  const taggedError$6 = Schema.TaggedError;
3156
3157
  var RootConfigUnreadable = class extends taggedError$6()("RootConfigUnreadable", { file: Schema.String }) {};
3157
3158
  const isNested = (name) => String$1.includes(SEPARATOR$19)(name);
3158
- const problemFor$7 = problemInFile(RULE$59);
3159
+ const problemFor$7 = problemInFile(RULE$58);
3159
3160
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3160
3161
  const WORKSPACE_AGENT_DOCS_MESSAGE = "belongs only at the repository root or as AGENTS.md directly in a workspace, the directory that holds its package.json. Move what agents need there and delete this file.";
3161
3162
  const MISSING_MESSAGE$1 = "has no AGENTS.md next to it. This repository sets msch.workspaceAgentsMd, so every workspace describes what it is for and the rules that apply only there in its own AGENTS.md.";
@@ -3202,7 +3203,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3202
3203
  workspaces: pipe(directories, Array$1.map((directory) => files.join(root, directory)), HashSet.fromIterable),
3203
3204
  workspaceAgentDocs
3204
3205
  };
3205
- const found = yield* Effect.forEach(nested, (name) => problemIn$6(root, allowed, name), { concurrency: READ_CONCURRENCY$29 });
3206
+ const found = yield* Effect.forEach(nested, (name) => problemIn$6(root, allowed, name), { concurrency: READ_CONCURRENCY$28 });
3206
3207
  const missing = missingProblems({
3207
3208
  required: workspaceAgentDocs,
3208
3209
  directories: pipe(directories, Array$1.map((directory) => files.join(root, directory))),
@@ -3212,15 +3213,15 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3212
3213
  return [...Array$1.getSomes(found), ...missing];
3213
3214
  });
3214
3215
  // src/features/check-placement/model/published-readme.ts
3215
- const RULE$58 = "published-readme";
3216
- const READ_CONCURRENCY$28 = 16;
3216
+ const RULE$57 = "published-readme";
3217
+ const READ_CONCURRENCY$27 = 16;
3217
3218
  const MESSAGE$17 = "contains Japanese. This package is published to npm, so write its README in English.";
3218
3219
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
3219
3220
  const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory }) {
3220
3221
  const readme = yield* readReadme({
3221
3222
  root,
3222
3223
  directory,
3223
- rule: RULE$58,
3224
+ rule: RULE$57,
3224
3225
  missingMessage: MISSING_MESSAGE
3225
3226
  });
3226
3227
  return Result.match(readme, {
@@ -3231,7 +3232,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3231
3232
  file,
3232
3233
  line,
3233
3234
  column,
3234
- rule: RULE$58,
3235
+ rule: RULE$57,
3235
3236
  message: MESSAGE$17
3236
3237
  };
3237
3238
  }))
@@ -3240,11 +3241,11 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3240
3241
  /** @internal */
3241
3242
  const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPublishedReadme(root) {
3242
3243
  const projects = yield* publishedProjects(root);
3243
- const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$28 });
3244
+ const found = yield* Effect.forEach(projects, (project) => problemIn$5(root, project), { concurrency: READ_CONCURRENCY$27 });
3244
3245
  return Array$1.getSomes(found);
3245
3246
  });
3246
3247
  // src/features/check-placement/model/published-tests.ts
3247
- const RULE$57 = "published-tests";
3248
+ const RULE$56 = "published-tests";
3248
3249
  const FILE_START = 1;
3249
3250
  const TEST_FILE$1 = /\.test\.[cm]?[jt]sx?$/u;
3250
3251
  const MESSAGE$16 = "belongs to a package published to npm that has no tests. Write tests for what the package offers before publishing it.";
@@ -3258,7 +3259,7 @@ const problemFor$6 = Effect.fn("problemFor")(function* problemFor(root, listed,
3258
3259
  file: files.join(absolute, PACKAGE_JSON_FILE),
3259
3260
  line: FILE_START,
3260
3261
  column: FILE_START,
3261
- rule: RULE$57,
3262
+ rule: RULE$56,
3262
3263
  message: MESSAGE$16
3263
3264
  });
3264
3265
  });
@@ -3272,7 +3273,7 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
3272
3273
  return Array$1.getSomes(found);
3273
3274
  });
3274
3275
  // src/features/check-placement/model/root-docs.ts
3275
- const RULE$56 = "root-docs";
3276
+ const RULE$55 = "root-docs";
3276
3277
  const SEPARATOR$18 = "/";
3277
3278
  const FIRST$17 = 1;
3278
3279
  const MARKDOWN$2 = /\.(?:md|mdx|markdown)$/iu;
@@ -3287,14 +3288,14 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3287
3288
  file: files.join(root, name),
3288
3289
  line: FIRST$17,
3289
3290
  column: FIRST$17,
3290
- rule: RULE$56,
3291
+ rule: RULE$55,
3291
3292
  message: `${name} ${MESSAGE$15}`
3292
3293
  })));
3293
3294
  });
3294
3295
  // src/features/check-placement/model/root-readme.ts
3295
- const RULE$55 = "root-readme";
3296
+ const RULE$54 = "root-readme";
3296
3297
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3297
- const READ_CONCURRENCY$27 = 16;
3298
+ const READ_CONCURRENCY$26 = 16;
3298
3299
  const START$27 = 0;
3299
3300
  const CHECK_POLICY = "@r_masseater/msch";
3300
3301
  const MARKETPLACE$1 = ".claude-plugin/marketplace.json";
@@ -3336,7 +3337,7 @@ const problemsIn$20 = (file, source, plugins) => (workspace) => {
3336
3337
  const message = messageFor$2(workspace.directory);
3337
3338
  const at = positionOf(source);
3338
3339
  const pattern = patternFor(plugins)(workspace);
3339
- return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$55)(file, at(found.index ?? START$27), message)));
3340
+ return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$54)(file, at(found.index ?? START$27), message)));
3340
3341
  };
3341
3342
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
3342
3343
  const text = yield* (yield* RepositoryFiles).readFile(file);
@@ -3353,7 +3354,7 @@ const checkRootReadme = Effect.fn("checkRootReadme")(function* checkRootReadme(r
3353
3354
  const named = yield* namedWorkspaces(root);
3354
3355
  const workspaces = pipe(named, Array$1.filter((workspace) => !isCheckPolicy(workspace)));
3355
3356
  const plugins = yield* marketplacePlugins(root);
3356
- const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$27 });
3357
+ const found = yield* Effect.forEach(readmes, (name) => problemsInReadme(files.join(root, name), workspaces, plugins), { concurrency: READ_CONCURRENCY$26 });
3357
3358
  return Array$1.flatten(found);
3358
3359
  });
3359
3360
  // src/features/check-placement/model/doc-placement.ts
@@ -3373,10 +3374,10 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
3373
3374
  return Array$1.flatten(found);
3374
3375
  });
3375
3376
  // src/features/check-placement/model/docs-mirror.ts
3376
- const RULE$54 = "docs-mirror";
3377
+ const RULE$53 = "docs-mirror";
3377
3378
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
3378
3379
  const MIRROR_LIMIT = 3;
3379
- const READ_CONCURRENCY$26 = 16;
3380
+ const READ_CONCURRENCY$25 = 16;
3380
3381
  const SPECIAL = /[$()*+.?[\\\]^{|}]/gu;
3381
3382
  const BEFORE = String.raw`(?<![\w@/.-])`;
3382
3383
  const AFTER = String.raw`(?![\w@.-])`;
@@ -3398,7 +3399,7 @@ const problemFor$5 = (file, source, mentions) => pipe(Array$1.head(mentions), Op
3398
3399
  file,
3399
3400
  line,
3400
3401
  column,
3401
- rule: RULE$54,
3402
+ rule: RULE$53,
3402
3403
  message: `names ${String(mentions.length)} other workspaces (${describe(mentions)}). The workspace list and each package.json already declare them, so this copy goes stale. Point at the declaration instead of listing it.`
3403
3404
  };
3404
3405
  }), Option.toArray);
@@ -3413,7 +3414,7 @@ const workspacesOf = Effect.fn("workspacesOf")(function* workspacesOf(root) {
3413
3414
  return yield* Effect.forEach(directories, (directory) => readManifest(files.join(root, directory)).pipe(Effect.map((manifest) => ({
3414
3415
  directory,
3415
3416
  names: [directory, ...pipe(manifest, Option.flatMap(({ name }) => Option.fromUndefinedOr(name)), Option.toArray)]
3416
- }))), { concurrency: READ_CONCURRENCY$26 });
3417
+ }))), { concurrency: READ_CONCURRENCY$25 });
3417
3418
  });
3418
3419
  /** @internal */
3419
3420
  const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(root) {
@@ -3426,11 +3427,11 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
3426
3427
  onNone: () => [],
3427
3428
  onSome: (text) => problemIn$4(workspaces)(doc, file, text)
3428
3429
  })));
3429
- }, { concurrency: READ_CONCURRENCY$26 });
3430
+ }, { concurrency: READ_CONCURRENCY$25 });
3430
3431
  return Array$1.flatten(found);
3431
3432
  });
3432
3433
  // src/features/check-placement/model/ignored-sources.ts
3433
- const RULE$53 = "ignored-sources";
3434
+ const RULE$52 = "ignored-sources";
3434
3435
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
3435
3436
  const FIRST$16 = 1;
3436
3437
  const MESSAGE$14 = "is under src/ but .gitignore ignores it, so verify passes here while the file never reaches the commit. Narrow the pattern in .gitignore.";
@@ -3442,7 +3443,7 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
3442
3443
  file: files.join(root, file),
3443
3444
  line: FIRST$16,
3444
3445
  column: FIRST$16,
3445
- rule: RULE$53,
3446
+ rule: RULE$52,
3446
3447
  message: MESSAGE$14
3447
3448
  })));
3448
3449
  });
@@ -12085,7 +12086,7 @@ const LAYER_ITEMS = [
12085
12086
  "attribute_item",
12086
12087
  "inner_attribute_item"
12087
12088
  ];
12088
- const READ_CONCURRENCY$25 = 64;
12089
+ const READ_CONCURRENCY$24 = 64;
12089
12090
  const EXCLUDED$5 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
12090
12091
  const NONE$1 = [];
12091
12092
  const ROOT_MESSAGE = "defines code in the crate root. Keep lib.rs and main.rs to mod declarations of layers, use, pub use and fn main, and put the code in a layer.";
@@ -12161,17 +12162,17 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12161
12162
  if (!Array$1.isReadonlyArrayNonEmpty(sources)) return NONE$1;
12162
12163
  const language = yield* loadLanguage(GRAMMAR).pipe(Effect.orDie);
12163
12164
  const parse = parsedWith(language);
12164
- const read = yield* Effect.forEach(pipe(sources, Array$1.filter(isRead)), (source) => files.readFile(source.file).pipe(Effect.map(Option.flatMap((text) => parse(source, text)))), { concurrency: READ_CONCURRENCY$25 });
12165
+ const read = yield* Effect.forEach(pipe(sources, Array$1.filter(isRead)), (source) => files.readFile(source.file).pipe(Effect.map(Option.flatMap((text) => parse(source, text)))), { concurrency: READ_CONCURRENCY$24 });
12165
12166
  return [...sliceNameProblems(root, files.join, sources), ...Array$1.flatMap(Array$1.getSomes(read), problemsOf$4)];
12166
12167
  });
12167
12168
  // src/features/check-placement/model/shadcn-ui-alias.ts
12168
- const RULE$52 = "shadcn-ui-alias";
12169
+ const RULE$51 = "shadcn-ui-alias";
12169
12170
  const FIRST$15 = 1;
12170
12171
  const problemOf$9 = (directory, { file, alias }) => ({
12171
12172
  file,
12172
12173
  line: FIRST$15,
12173
12174
  column: FIRST$15,
12174
- rule: RULE$52,
12175
+ rule: RULE$51,
12175
12176
  message: `aliases.ui "${alias}" in ${directory}/components.json does not resolve to a directory through the imports of ${directory}/package.json. shadcn lint and msch then cannot tell which files are the design-system components. Point the alias at a "#/" import, such as "#/shared/ui", and map "#/*" to "./src/*".`
12176
12177
  });
12177
12178
  /** @internal */
@@ -12234,7 +12235,7 @@ const SCRIPTS_DIRECTORY = "scripts";
12234
12235
  const WORKFLOW_DIRECTORY$1 = ".github/";
12235
12236
  const SEPARATOR$15 = "/";
12236
12237
  const CURRENT = "./";
12237
- const READ_CONCURRENCY$24 = 8;
12238
+ const READ_CONCURRENCY$23 = 8;
12238
12239
  const FIRST$14 = 1;
12239
12240
  const RUN_FILE = /(?:^|[\s;&|(])(?:node|vpx|tsx|bun|deno)\s+(?:-\S+\s+)*(?<file>[^\s;&|)]+\.[cm]?[jt]s)\b/gu;
12240
12241
  const COMMAND$1 = /^bin\/[^/]+\.[cm]?ts$/u;
@@ -12275,7 +12276,7 @@ const workflowText = Effect.fn("workflowText")(function* workflowText(root) {
12275
12276
  const files = yield* RepositoryFiles;
12276
12277
  const listed = yield* files.listedFiles(root);
12277
12278
  const workflows = pipe(listed, Array$1.filter(String$1.startsWith(WORKFLOW_DIRECTORY$1)));
12278
- const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$24 });
12279
+ const texts = yield* Effect.forEach(workflows, (file) => files.readFile(files.join(root, file)), { concurrency: READ_CONCURRENCY$23 });
12279
12280
  return pipe(Array$1.getSomes(texts), Array$1.join("\n"));
12280
12281
  });
12281
12282
  const workspacePath = (directory, path) => pipe([directory, path], Array$1.filter(String$1.isNonEmpty), Array$1.join(SEPARATOR$15));
@@ -12325,8 +12326,8 @@ const scriptsProblem = Effect.fn("scriptsProblem")(function* scriptsProblem(root
12325
12326
  const checkCommandEntries = Effect.fn("checkCommandEntries")(function* checkCommandEntries(root) {
12326
12327
  const all = ["", ...yield* workspaceDirectories(root)];
12327
12328
  const workflows = yield* workflowText(root);
12328
- const found = yield* Effect.forEach(all, (directory) => problemsIn$19(root, directory, workflows), { concurrency: READ_CONCURRENCY$24 });
12329
- const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$24 });
12329
+ const found = yield* Effect.forEach(all, (directory) => problemsIn$19(root, directory, workflows), { concurrency: READ_CONCURRENCY$23 });
12330
+ const scripts = yield* Effect.forEach(all, (directory) => scriptsProblem(root, directory), { concurrency: READ_CONCURRENCY$23 });
12330
12331
  return [...Array$1.flatten(found), ...Array$1.getSomes(scripts)];
12331
12332
  });
12332
12333
  // src/features/check-repository-layout/model/path-mention.ts
@@ -12418,7 +12419,7 @@ const JSON_EXTENSION = ".json";
12418
12419
  const isObject = (node) => Predicate.isReadonlyObject(node) && node["type"] === "ObjectExpression";
12419
12420
  const firstObject = (node) => {
12420
12421
  if (isObject(node)) return Option.some(node);
12421
- return pipe(childrenOf$1(node), Array$1.findFirst(firstObject));
12422
+ return pipe(childrenOf$2(node), Array$1.findFirst(firstObject));
12422
12423
  };
12423
12424
  const leadingDirectory = (pattern) => pipe(String$1.split(pattern, SEPARATOR$13), Array$1.takeWhile((segment) => !WILDCARD$3.test(segment)), Array$1.join(SEPARATOR$13));
12424
12425
  const listed$2 = (root) => (name, candidatesOf, valuesOf = stringsIn) => pipe(propertyValue(name)(root), Option.toArray, Array$1.flatMap(valuesOf), Array$1.map(({ text, start }) => ({
@@ -12427,7 +12428,7 @@ const listed$2 = (root) => (name, candidatesOf, valuesOf = stringsIn) => pipe(pr
12427
12428
  candidates: candidatesOf(text),
12428
12429
  index: start - WRAP_OFFSET$2
12429
12430
  })), Array$1.filter(({ candidates }) => Array$1.isReadonlyArrayNonEmpty(candidates)));
12430
- const objectsIn = (node) => [...Array$1.filter([node], isObject), ...pipe(childrenOf$1(node), Array$1.flatMap(objectsIn))];
12431
+ const objectsIn = (node) => [...Array$1.filter([node], isObject), ...pipe(childrenOf$2(node), Array$1.flatMap(objectsIn))];
12431
12432
  const referencedPaths = (references) => pipe(objectsIn(references), Array$1.flatMap((reference) => Option.toArray(propertyValue("path")(reference))), Array$1.flatMap(stringsIn));
12432
12433
  const exactly = (text) => [text];
12433
12434
  const relativeConfig = (text) => {
@@ -12447,26 +12448,26 @@ const tsconfigMentions = Effect.fn("tsconfigMentions")(function* tsconfigMention
12447
12448
  ])));
12448
12449
  });
12449
12450
  // src/features/check-repository-layout/model/config-paths.ts
12450
- const RULE$51 = "config-path";
12451
+ const RULE$50 = "config-path";
12451
12452
  const WORKSPACE_FILE$4 = "pnpm-workspace.yaml";
12452
12453
  const CARGO_MANIFEST = /(?:^|\/)Cargo\.toml$/u;
12453
12454
  const TSCONFIG = /(?:^|\/)tsconfig(?:\.[\w-]+)?\.json$/u;
12454
12455
  const OUTSIDE = "..";
12455
- const READ_CONCURRENCY$23 = 8;
12456
+ const READ_CONCURRENCY$22 = 8;
12456
12457
  const isMissing$2 = Effect.fn("isMissing")(function* isMissing(root, file, mention) {
12457
12458
  const files = yield* RepositoryFiles;
12458
12459
  const relatives = pipe(mention.candidates, Array$1.map((candidate) => files.relative(root, files.resolve(files.dirname(file), candidate))), Array$1.filter((relative) => !String$1.startsWith(OUTSIDE)(relative)));
12459
12460
  if (!Array$1.isReadonlyArrayNonEmpty(relatives)) return false;
12460
- const present = yield* Effect.forEach(relatives, (relative) => existsAt(root, relative), { concurrency: READ_CONCURRENCY$23 });
12461
+ const present = yield* Effect.forEach(relatives, (relative) => existsAt(root, relative), { concurrency: READ_CONCURRENCY$22 });
12461
12462
  if (pipe(present, Array$1.some(Boolean))) return false;
12462
- const ignored = yield* Effect.forEach(relatives, (relative) => isIgnored(root, relative), { concurrency: READ_CONCURRENCY$23 });
12463
+ const ignored = yield* Effect.forEach(relatives, (relative) => isIgnored(root, relative), { concurrency: READ_CONCURRENCY$22 });
12463
12464
  return !pipe(ignored, Array$1.some(Boolean));
12464
12465
  });
12465
12466
  const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
12466
12467
  const problemOf$8 = (file, source) => (mention) => ({
12467
12468
  file,
12468
12469
  ...positionOf(source)(mention.index),
12469
- rule: RULE$51,
12470
+ rule: RULE$50,
12470
12471
  message: `${mention.field} names ${mention.text}, which does not exist in this repository. Point it at a path that exists or remove the entry.`
12471
12472
  });
12472
12473
  const mentionsIn = Effect.fn("mentionsIn")(function* mentionsIn(file, source) {
@@ -12479,7 +12480,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(root, name) {
12479
12480
  const source = yield* files.readFile(file);
12480
12481
  if (Option.isNone(source)) return [];
12481
12482
  const mentions = yield* mentionsIn(file, source.value);
12482
- const missing = yield* Effect.filter(mentions, (mention) => isMissing$2(root, file, mention), { concurrency: READ_CONCURRENCY$23 });
12483
+ const missing = yield* Effect.filter(mentions, (mention) => isMissing$2(root, file, mention), { concurrency: READ_CONCURRENCY$22 });
12483
12484
  return pipe(Array$1.sort(missing, byIndex), Array$1.map(problemOf$8(file, source.value)));
12484
12485
  });
12485
12486
  const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatterns(root) {
@@ -12491,7 +12492,7 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
12491
12492
  return pipe(patterns, Array$1.map((pattern) => ({
12492
12493
  file,
12493
12494
  ...positionOf(source.value)(indexOfText(source.value)(pattern)),
12494
- rule: RULE$51,
12495
+ rule: RULE$50,
12495
12496
  message: `packages lists ${pattern}, which matches no workspace package. Point it at directories that have a package.json or remove the entry.`
12496
12497
  })));
12497
12498
  });
@@ -12499,23 +12500,23 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
12499
12500
  const checkConfigPaths = Effect.fn("checkConfigPaths")(function* checkConfigPaths(root) {
12500
12501
  const owned = yield* (yield* RepositoryFiles).ownedFiles(root);
12501
12502
  const configs = pipe(owned, Array$1.filter((name) => CARGO_MANIFEST.test(name) || TSCONFIG.test(name)));
12502
- const [found, patterns] = yield* Effect.all([Effect.forEach(configs, (name) => problemsIn$18(root, name), { concurrency: READ_CONCURRENCY$23 }), unmatchedPatterns(root)], { concurrency: "unbounded" });
12503
+ const [found, patterns] = yield* Effect.all([Effect.forEach(configs, (name) => problemsIn$18(root, name), { concurrency: READ_CONCURRENCY$22 }), unmatchedPatterns(root)], { concurrency: "unbounded" });
12503
12504
  return [...Array$1.flatten(found), ...patterns];
12504
12505
  });
12505
12506
  // src/features/check-repository-layout/model/crates.ts
12506
- const RULE$50 = "unverified-crate";
12507
+ const RULE$49 = "unverified-crate";
12507
12508
  const VERSION_RULE = "release-version";
12508
12509
  const APP_DIRECTORIES = ["", "src-tauri"];
12509
12510
  const CARGO_FILE$1 = "Cargo.toml";
12510
12511
  const CONFIG_FILE$6 = "vite.config.ts";
12511
12512
  const SEPARATOR$12 = "/";
12512
12513
  const FIRST$12 = 1;
12513
- const READ_CONCURRENCY$22 = 8;
12514
+ const READ_CONCURRENCY$21 = 8;
12514
12515
  const problemFor$4 = (crate, message) => ({
12515
12516
  file: crate.manifest,
12516
12517
  line: FIRST$12,
12517
12518
  column: FIRST$12,
12518
- rule: RULE$50,
12519
+ rule: RULE$49,
12519
12520
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
12520
12521
  });
12521
12522
  const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -12547,11 +12548,11 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
12547
12548
  if (!(yield* files.exists(files.join(root, CARGO_FILE$1)))) return [];
12548
12549
  const directories = yield* workspaceDirectories(root);
12549
12550
  const crates = yield* cratesIn(root);
12550
- const found = yield* Effect.forEach(crates, (crate) => Effect.all([problemIn$3(root, directories, crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$22 });
12551
+ const found = yield* Effect.forEach(crates, (crate) => Effect.all([problemIn$3(root, directories, crate), versionProblemIn(root, directories, crate)], { concurrency: "unbounded" }), { concurrency: READ_CONCURRENCY$21 });
12551
12552
  return Array$1.getSomes(Array$1.flatten(found));
12552
12553
  });
12553
12554
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
12554
- const RULE$49 = "deploy-entry-pattern";
12555
+ const RULE$48 = "deploy-entry-pattern";
12555
12556
  const FALLOW_KEYS = [
12556
12557
  "entry",
12557
12558
  "entryPoints",
@@ -12569,7 +12570,7 @@ const NEGATED = "!";
12569
12570
  const ROOT_WORKSPACE = ".";
12570
12571
  const WRAP_OFFSET$1 = 1;
12571
12572
  const NO_OFFSET = 0;
12572
- const READ_CONCURRENCY$21 = 8;
12573
+ const READ_CONCURRENCY$20 = 8;
12573
12574
  const MESSAGE$13 = "selects deploy entries by their name or location. A deploy entry is the file that an Alchemy resource names in main, and its name and place change with the code. Use workspaceSettings().lint.deployEntries in lint settings; fallow reads main from the stack by itself.";
12574
12575
  const decodeKey$1 = Schema.decodeUnknownOption(KeySchema);
12575
12576
  const FALLOW = {
@@ -12587,7 +12588,7 @@ const VITE = {
12587
12588
  const isPatternProperty = (keys) => (node) => node["type"] === "Property" && pipe(decodeKey$1(node["key"]), Option.exists((key) => Array$1.contains(keys, keyName(key))));
12588
12589
  const patternsIn = (keys) => (node) => {
12589
12590
  if (Predicate.isReadonlyObject(node) && isPatternProperty(keys)(node)) return stringsIn(node["value"]);
12590
- return pipe(childrenOf$1(node), Array$1.flatMap(patternsIn(keys)));
12591
+ return pipe(childrenOf$2(node), Array$1.flatMap(patternsIn(keys)));
12591
12592
  };
12592
12593
  const choicesOf = ([literal = "", options]) => pipe(Option.fromUndefinedOr(options), Option.map(String$1.split(OPTION_SEPARATOR)), Option.getOrElse(() => [""]), Array$1.map((option) => `${literal}${option}`));
12593
12594
  const combined = (chunks) => Array$1.matchLeft(chunks, {
@@ -12622,7 +12623,7 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(request) {
12622
12623
  return pipe(Array$1.getSomes(flagged), Array$1.map(({ text: pattern, start }) => ({
12623
12624
  file: path,
12624
12625
  ...positionOf(text.value)(start - kind.offset),
12625
- rule: RULE$49,
12626
+ rule: RULE$48,
12626
12627
  message: `${pattern} ${MESSAGE$13}`
12627
12628
  })));
12628
12629
  });
@@ -12651,11 +12652,11 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
12651
12652
  kind,
12652
12653
  workspaces,
12653
12654
  entries
12654
- }), { concurrency: READ_CONCURRENCY$21 });
12655
+ }), { concurrency: READ_CONCURRENCY$20 });
12655
12656
  return Array$1.flatten(found);
12656
12657
  });
12657
12658
  // src/features/check-repository-layout/model/fallow-entries.ts
12658
- const RULE$48 = "listed-entry";
12659
+ const RULE$47 = "listed-entry";
12659
12660
  const ENTRY_KEYS = [
12660
12661
  "entry",
12661
12662
  "entryPoints",
@@ -12665,7 +12666,7 @@ const FALLOW_CONFIG = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?
12665
12666
  const WILDCARD$2 = /[*?{[]/u;
12666
12667
  const SEPARATOR$11 = "/";
12667
12668
  const WRAP_OFFSET = 1;
12668
- const READ_CONCURRENCY$20 = 8;
12669
+ const READ_CONCURRENCY$19 = 8;
12669
12670
  const decodeKey = Schema.decodeUnknownOption(KeySchema);
12670
12671
  const isEntryProperty = (node) => node["type"] === "Property" && pipe(decodeKey(node["key"]), Option.exists((key) => Array$1.contains(ENTRY_KEYS, keyName(key))));
12671
12672
  const entryPatternsIn = (node) => {
@@ -12673,7 +12674,7 @@ const entryPatternsIn = (node) => {
12673
12674
  text,
12674
12675
  start: start - WRAP_OFFSET
12675
12676
  })));
12676
- return pipe(childrenOf$1(node), Array$1.flatMap(entryPatternsIn));
12677
+ return pipe(childrenOf$2(node), Array$1.flatMap(entryPatternsIn));
12677
12678
  };
12678
12679
  const namesOneFile = (directories) => ({ text }) => pipe(directories, Array$1.some((directory) => String$1.startsWith(`${directory}${SEPARATOR$11}`)(text))) || String$1.includes(SEPARATOR$11)(text) && !WILDCARD$2.test(text);
12679
12680
  const problemsIn$16 = Effect.fn("problemsIn")(function* problemsIn(root, file, directories) {
@@ -12685,7 +12686,7 @@ const problemsIn$16 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
12685
12686
  return pipe(entryPatternsIn(parsed.program), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
12686
12687
  file: path,
12687
12688
  ...positionOf(text.value)(start),
12688
- rule: RULE$48,
12689
+ rule: RULE$47,
12689
12690
  message: `${pattern} names files one by one. Let fallow find the file through what declares it: package.json bin and exports, a tool's config file, or the main of the Alchemy resource that deploys it.`
12690
12691
  })));
12691
12692
  });
@@ -12693,11 +12694,11 @@ const problemsIn$16 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
12693
12694
  const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallowEntries(root) {
12694
12695
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
12695
12696
  const directories = yield* workspaceDirectories(root);
12696
- const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$16(root, file, directories), { concurrency: READ_CONCURRENCY$20 });
12697
+ const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$16(root, file, directories), { concurrency: READ_CONCURRENCY$19 });
12697
12698
  return Array$1.flatten(found);
12698
12699
  });
12699
12700
  // src/features/check-repository-layout/model/root-workspace-paths.ts
12700
- const RULE$47 = "root-workspace-path";
12701
+ const RULE$46 = "root-workspace-path";
12701
12702
  const CONFIG_FILE$5 = "vite.config.ts";
12702
12703
  const PATH_CHARACTER = /[\w.@/-]/u;
12703
12704
  const NAME_CHARACTER = /[\w.@-]/u;
@@ -12716,7 +12717,7 @@ const mentions = (directory) => (text) => {
12716
12717
  const problemsIn$15 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
12717
12718
  file,
12718
12719
  ...positionOf(source)(found.start),
12719
- rule: RULE$47,
12720
+ rule: RULE$46,
12720
12721
  message: `${directory} is a workspace. The root ${CONFIG_FILE$5} holds what applies to every workspace, so move what only ${directory} needs into ${directory}/${CONFIG_FILE$5}: msch.lint, msch.devDependencies or its verify task.`
12721
12722
  })));
12722
12723
  /** @internal */
@@ -12730,10 +12731,10 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
12730
12731
  return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$15(file, source.value, directories)));
12731
12732
  });
12732
12733
  // src/features/check-repository-layout/model/hidden-verify.ts
12733
- const RULE$46 = "hidden-verify";
12734
+ const RULE$45 = "hidden-verify";
12734
12735
  const CONFIG_FILE$4 = "vite.config.ts";
12735
12736
  const FIRST$10 = 1;
12736
- const READ_CONCURRENCY$19 = 8;
12737
+ const READ_CONCURRENCY$18 = 8;
12737
12738
  const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory) {
12738
12739
  const config = yield* workspaceConfigOf(root, directory);
12739
12740
  if (Option.isNone(config)) return Option.none();
@@ -12744,19 +12745,19 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
12744
12745
  file,
12745
12746
  line: FIRST$10,
12746
12747
  column: FIRST$10,
12747
- rule: RULE$46,
12748
+ rule: RULE$45,
12748
12749
  message: `${directory} gets its verify task from code outside ${CONFIG_FILE$4}. The root verify reads ${CONFIG_FILE$4} without running it, so it never runs this verify. Write run.tasks.verify in ${directory}/${CONFIG_FILE$4}.`
12749
12750
  }).pipe(Option.filter(() => verified));
12750
12751
  });
12751
12752
  /** @internal */
12752
12753
  const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVerify(root) {
12753
12754
  const directories = yield* workspaceDirectories(root);
12754
- const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$19 });
12755
+ const found = yield* Effect.forEach(directories, (directory) => problemIn$2(root, directory), { concurrency: READ_CONCURRENCY$18 });
12755
12756
  return Array$1.getSomes(found);
12756
12757
  });
12757
12758
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
12758
- const RULE$45 = "shared-uncached-task";
12759
- const READ_CONCURRENCY$18 = 8;
12759
+ const RULE$44 = "shared-uncached-task";
12760
+ const READ_CONCURRENCY$17 = 8;
12760
12761
  const SHARED = 2;
12761
12762
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
12762
12763
  const UncachedTask = Schema.Struct({
@@ -12798,19 +12799,19 @@ const problemsOf$3 = (definitions) => {
12798
12799
  return pipe(definitions, Array$1.map(({ file, position, name, command }) => ({
12799
12800
  file,
12800
12801
  ...position,
12801
- rule: RULE$45,
12802
+ rule: RULE$44,
12802
12803
  message: `The uncached task ${name} (${command}) is written the same way in ${Array$1.join(directories, ", ")}. Write it once in a shared helper and spread it into each run.tasks, so that a change to it reaches every workspace.`
12803
12804
  })));
12804
12805
  };
12805
12806
  /** @internal */
12806
12807
  const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function* checkSharedUncachedTasks(root) {
12807
12808
  const directories = yield* workspaceDirectories(root);
12808
- const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$18 });
12809
+ const found = yield* Effect.forEach(directories, (directory) => definitionsIn(root, directory), { concurrency: READ_CONCURRENCY$17 });
12809
12810
  return pipe(Array$1.flatten(found), Array$1.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array$1.flatMap(problemsOf$3));
12810
12811
  });
12811
12812
  // src/features/check-repository-layout/model/unlocked-tasks.ts
12812
- const RULE$44 = "unlocked-task";
12813
- const READ_CONCURRENCY$17 = 8;
12813
+ const RULE$43 = "unlocked-task";
12814
+ const READ_CONCURRENCY$16 = 8;
12814
12815
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
12815
12816
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
12816
12817
  const commandOf = (task) => pipe(propertyValue("command")(task.value), Option.getOrElse(() => task.value), literalOf, Option.flatMap(decodeCommand), Option.flatMap((command) => Array$1.findFirst(Array$1.ensure(command), (line) => READS_DEPENDENCIES.test(line))));
@@ -12821,13 +12822,13 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
12821
12822
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array$1.filter(tracksLockfiles), Array$1.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
12822
12823
  file,
12823
12824
  ...positionOf(source)(task.start),
12824
- rule: RULE$44,
12825
+ rule: RULE$43,
12825
12826
  message: `The task ${keyName(task.key)} runs ${command} with inputs written by hand. It then reruns after every lockfile change, and it does not rerun when a dependency of a dependency moves. Set cache to LOCKED from @r_masseater/msch/locked-inputs.`
12826
12827
  })), Option.toArray)));
12827
12828
  /** @internal */
12828
12829
  const checkUnlockedTasks = Effect.fn("checkUnlockedTasks")(function* checkUnlockedTasks(root) {
12829
12830
  const directories = yield* workspaceDirectories(root);
12830
- const found = yield* Effect.forEach(directories, (directory) => runTasksOf(root, directory), { concurrency: READ_CONCURRENCY$17 });
12831
+ const found = yield* Effect.forEach(directories, (directory) => runTasksOf(root, directory), { concurrency: READ_CONCURRENCY$16 });
12831
12832
  return pipe(Array$1.getSomes(found), Array$1.flatMap(problemsOf$2));
12832
12833
  });
12833
12834
  // src/features/check-repository-layout/model/task-checks.ts
@@ -12918,7 +12919,7 @@ const reference = (kind, field, base = ROOT$2) => ({ text, offset }) => {
12918
12919
  const isPositive = ({ text }) => !String$1.startsWith(NEGATION)(String$1.trim(text));
12919
12920
  const globsIn = (field, node) => pipe(itemsOf(node), Array$1.flatMap((item) => Option.toArray(stringOf(item))), Array$1.filter(isPositive), Array$1.flatMap(reference("glob", field)));
12920
12921
  const filtersOf = ([event, filters]) => pipe(FILTER_KEYS$1, Array$1.flatMap((key) => globsIn(`on.${event}.${key}`, childOf(key)(filters))));
12921
- const directoryOf$2 = (located, base) => pipe(located, Option.map(({ text }) => joinPath(ROOT$2, text)), Option.getOrElse(() => base));
12922
+ const directoryOf$1 = (located, base) => pipe(located, Option.map(({ text }) => joinPath(ROOT$2, text)), Option.getOrElse(() => base));
12922
12923
  const located = (kind, field, base = ROOT$2) => (found) => pipe(found, Option.toArray, Array$1.flatMap(reference(kind, field, base)));
12923
12924
  const localUses = (node) => pipe(stringOf(childOf("uses")(node)), Option.filter(({ text }) => String$1.startsWith(LOCAL$1)(text)));
12924
12925
  const scriptsIn = (field, base) => ({ text, offset }) => pipe(String$1.split(text, TOKEN_SEPARATOR), Array$1.filter((token) => SCRIPT.test(token)), Array$1.dedupe, Array$1.flatMap((token) => reference("script", field, base)({
@@ -12935,7 +12936,7 @@ const fileInputsIn = (field, step) => pipe(entriesOf$1(childOf("with")(step)), A
12935
12936
  const stepReferences = (job, base) => (step, index) => {
12936
12937
  const field = `jobs.${job}.steps[${index}]`;
12937
12938
  const own = stringOf(childOf("working-directory")(step));
12938
- const directory = directoryOf$2(own, base);
12939
+ const directory = directoryOf$1(own, base);
12939
12940
  return [
12940
12941
  ...located("action", `${field}.uses`)(localUses(step)),
12941
12942
  ...located("directory", `${field}.working-directory`)(own),
@@ -12946,7 +12947,7 @@ const stepReferences = (job, base) => (step, index) => {
12946
12947
  const jobReferences = (base) => ([job, node]) => {
12947
12948
  const own = workingDirectoryOf(node);
12948
12949
  const steps = itemsOf(childOf("steps")(node));
12949
- const directory = directoryOf$2(own, base);
12950
+ const directory = directoryOf$1(own, base);
12950
12951
  return [
12951
12952
  ...located("file", `jobs.${job}.uses`)(localUses(node)),
12952
12953
  ...located("directory", `jobs.${job}.defaults.run.working-directory`)(own),
@@ -12963,7 +12964,7 @@ const jobsOf = (source) => entriesOf$1(childOf("jobs")(parseDocument(source).con
12963
12964
  const workflowReferences = (source) => {
12964
12965
  const root = parseDocument(source).contents;
12965
12966
  const workflowDefault = workingDirectoryOf(root);
12966
- const base = directoryOf$2(workflowDefault, ROOT$2);
12967
+ const base = directoryOf$1(workflowDefault, ROOT$2);
12967
12968
  return [
12968
12969
  ...pipe(entriesOf$1(childOf("on")(root)), Array$1.flatMap(filtersOf)),
12969
12970
  ...located("directory", "defaults.run.working-directory")(workflowDefault),
@@ -12976,10 +12977,10 @@ const outputPathsOf = (step) => pipe(stringOf(pathInputOf(step)), Option.toArray
12976
12977
  /** @internal */
12977
12978
  const producedPaths = (source) => pipe(jobsOf(source), Array$1.flatMap(([, job]) => itemsOf(childOf("steps")(job))), Array$1.flatMap(outputPathsOf));
12978
12979
  // src/features/check-repository-layout/model/workflow-paths.ts
12979
- const RULE$43 = "workflow-path";
12980
+ const RULE$42 = "workflow-path";
12980
12981
  const WORKFLOW_DIRECTORY = ".github/workflows/";
12981
12982
  const WORKFLOW_EXTENSIONS = [".yml", ".yaml"];
12982
- const READ_CONCURRENCY$16 = 8;
12983
+ const READ_CONCURRENCY$15 = 8;
12983
12984
  const SEPARATOR$9 = "/";
12984
12985
  const EXPECTED = {
12985
12986
  action: "a directory with action.yml",
@@ -13020,7 +13021,7 @@ const isMissing$1 = Effect.fn("isMissing")(function* isMissing(root, produced, f
13020
13021
  const problemOf$7 = (file, source) => (found) => ({
13021
13022
  file,
13022
13023
  ...positionOf(source)(found.offset),
13023
- rule: RULE$43,
13024
+ rule: RULE$42,
13024
13025
  message: `${found.field} names ${found.path}, which is not ${EXPECTED[found.kind]} in this repository. Point it at a path that exists or remove it.`
13025
13026
  });
13026
13027
  const problemsIn$14 = Effect.fn("problemsIn")(function* problemsIn(root, workflow) {
@@ -13035,7 +13036,7 @@ const problemsIn$14 = Effect.fn("problemsIn")(function* problemsIn(root, workflo
13035
13036
  /** @internal */
13036
13037
  const checkWorkflowPaths = Effect.fn("checkWorkflowPaths")(function* checkWorkflowPaths(root) {
13037
13038
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
13038
- const found = yield* Effect.forEach(pipe(listed, Array$1.filter(isWorkflow)), (workflow) => problemsIn$14(root, workflow), { concurrency: READ_CONCURRENCY$16 });
13039
+ const found = yield* Effect.forEach(pipe(listed, Array$1.filter(isWorkflow)), (workflow) => problemsIn$14(root, workflow), { concurrency: READ_CONCURRENCY$15 });
13039
13040
  return Array$1.flatten(found);
13040
13041
  });
13041
13042
  // src/features/check-repository-layout/model/workflow-scale.ts
@@ -13047,7 +13048,7 @@ const FILTER_KEYS = ["paths", "paths-ignore"];
13047
13048
  const PATHS_FILTER_ACTION = /(?:^|\/)paths-filter@/u;
13048
13049
  const PACKAGE_FILTER = /(?:^|\s)(?:--filter|-F)(?:\s+|=)(?<quote>["']?)(?<value>[^\s"'$][^\s"']*)\k<quote>/gu;
13049
13050
  const START$24 = 0;
13050
- const READ_CONCURRENCY$15 = 8;
13051
+ const READ_CONCURRENCY$14 = 8;
13051
13052
  const SEPARATOR$8 = "/";
13052
13053
  const WORD_SEPARATORS = /[-_]/gu;
13053
13054
  const SPACE = " ";
@@ -13126,7 +13127,7 @@ const checkWorkflowScale = Effect.fn("checkWorkflowScale")(function* checkWorkfl
13126
13127
  name: stem,
13127
13128
  source: text
13128
13129
  })]), Option.getOrElse(() => []));
13129
- }), { concurrency: READ_CONCURRENCY$15 });
13130
+ }), { concurrency: READ_CONCURRENCY$14 });
13130
13131
  const actions = pipe(listed, Array$1.flatMap((name) => pipe(groupOf("name")(ACTION.exec(name)), Option.map((action) => actionProblems(workspaces, files.join(root, name), action)), Option.getOrElse(() => []))));
13131
13132
  return [...Array$1.flatten(found), ...actions];
13132
13133
  });
@@ -13422,12 +13423,12 @@ const checkPublishedPackages = Effect.fn("checkPublishedPackages")(function* che
13422
13423
  return Array$1.flatten(found);
13423
13424
  });
13424
13425
  // src/features/check-migration-order/model/migration-order.ts
13425
- const RULE$42 = "migration-order";
13426
+ const RULE$41 = "migration-order";
13426
13427
  const SNAPSHOT = "snapshot.json";
13427
13428
  const MIGRATION = "migration.sql";
13428
13429
  const SNAPSHOTS = [`*/${SNAPSHOT}`];
13429
13430
  const FIRST$9 = 1;
13430
- const READ_CONCURRENCY$14 = 16;
13431
+ const READ_CONCURRENCY$13 = 16;
13431
13432
  const isSnapshot = (basename) => (file) => basename(file) === SNAPSHOT;
13432
13433
  const migrationAt = Effect.fn("migrationAt")(function* migrationAt(root, base, file) {
13433
13434
  const files = yield* RepositoryFiles;
@@ -13456,7 +13457,7 @@ const outOfOrder = (root, base, join) => (migrations) => pipe(latestOf(migration
13456
13457
  file: join(root, file),
13457
13458
  line: FIRST$9,
13458
13459
  column: FIRST$9,
13459
- rule: RULE$42,
13460
+ rule: RULE$41,
13460
13461
  message: `${folder} is new, but it sorts before ${latest.folder}, which ${base} already has. A database that has applied ${latest.folder} rejects an earlier migration, so delete ${folder} and generate it again after ${latest.folder}.`
13461
13462
  })))), Option.getOrElse(() => []));
13462
13463
  /** @internal */
@@ -13467,7 +13468,7 @@ const checkMigrationOrder = Effect.fn("checkMigrationOrder")(function* checkMigr
13467
13468
  if (Option.isNone(found)) return [];
13468
13469
  const [listed, changed] = yield* Effect.all([files.matchingFiles(root, SNAPSHOTS), files.changedFiles(root, base)], { concurrency: "unbounded" });
13469
13470
  const snapshots = pipe([...listed, ...changed], Array$1.filter(isSnapshot(files.basename)), Array$1.dedupe);
13470
- const migrations = yield* Effect.forEach(snapshots, (file) => migrationAt(root, base, file), { concurrency: READ_CONCURRENCY$14 });
13471
+ const migrations = yield* Effect.forEach(snapshots, (file) => migrationAt(root, base, file), { concurrency: READ_CONCURRENCY$13 });
13471
13472
  return pipe(Array$1.getSomes(migrations), Array$1.groupBy(({ directory }) => directory), Record.values, Array$1.flatMap(outOfOrder(root, base, files.join)));
13472
13473
  });
13473
13474
  // src/shared/lib/bundle-error.ts
@@ -13600,7 +13601,7 @@ const bundleScopeOf = ({ manifest, workspace }) => ({
13600
13601
  });
13601
13602
  const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(devDependencies), Option.map(Record.filter((specifier) => specifier === STACK_CATALOG)), Option.map(Record.keys), Option.getOrElse(() => []));
13602
13603
  // src/features/check-tree-shaking/model/optional-peers.ts
13603
- const RULE$41 = "optional-peer";
13604
+ const RULE$40 = "optional-peer";
13604
13605
  const REQUIRED_RULE = "required-peer";
13605
13606
  const START$22 = 0;
13606
13607
  const SINGLE = 1;
@@ -13616,7 +13617,7 @@ const positionIn = (located, key, name) => {
13616
13617
  const problemFor$3 = (located, name, importers) => ({
13617
13618
  file: located.file,
13618
13619
  ...positionIn(located, DEPENDENCIES_KEY, name),
13619
- rule: RULE$41,
13620
+ rule: RULE$40,
13620
13621
  message: `${name} is imported only from ${labelsOf(importers)}, so installing the other entries must not require it. Move it to peerDependencies, mark it optional in peerDependenciesMeta and keep it in devDependencies.`
13621
13622
  });
13622
13623
  const requiredPeerAdvice = (fromStack) => {
@@ -13652,7 +13653,7 @@ const requiredPeerProblems = ({ located, manifest, used }) => {
13652
13653
  }));
13653
13654
  };
13654
13655
  // src/features/check-tree-shaking/model/side-effects.ts
13655
- const RULE$40 = "side-effects";
13656
+ const RULE$39 = "side-effects";
13656
13657
  const BUNDLE_CONCURRENCY$2 = 4;
13657
13658
  const START$21 = 0;
13658
13659
  const FIRST$8 = 1;
@@ -13704,13 +13705,13 @@ const keyIndex$1 = (source) => pipe(String$1.indexOf(SIDE_EFFECTS_KEY)(source),
13704
13705
  const sideEffectProblems = ({ file, source, excesses }) => pipe(excesses, Array$1.sortBy(largest), Array$1.head, Option.map((worst) => ({
13705
13706
  file,
13706
13707
  ...positionOf(source)(keyIndex$1(source)),
13707
- rule: RULE$40,
13708
+ rule: RULE$39,
13708
13709
  message: messageOf$4(worst, excesses.length)
13709
13710
  })), Option.toArray);
13710
13711
  // src/features/check-tree-shaking/model/top-level-effects.ts
13711
- const RULE$39 = "top-level-effect";
13712
+ const RULE$38 = "top-level-effect";
13712
13713
  const CODE$1 = /\.[cm]?[jt]sx?$/u;
13713
- const READ_CONCURRENCY$13 = 16;
13714
+ const READ_CONCURRENCY$12 = 16;
13714
13715
  const IMPORT_MESSAGE = "imports a module only for its effect, but sideEffects in package.json does not list this file, so a bundler drops the import. Import what the module exports, or list the entry that exists for its effect in sideEffects.";
13715
13716
  const STATEMENT_MESSAGE = "runs a statement at the top level for its effect, but sideEffects in package.json does not list this file, so a bundler drops the module when nothing it exports is used. Move the statement into a function that the caller runs, or list the entry that exists for its effect in sideEffects.";
13716
13717
  const isEffect = (statement) => {
@@ -13724,7 +13725,7 @@ const messageOf$3 = (statement) => {
13724
13725
  const problemsIn$13 = (api) => (file) => (source) => {
13725
13726
  const retained = api.createSourceFile(file, source);
13726
13727
  const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$7({
13727
- rule: RULE$39,
13728
+ rule: RULE$38,
13728
13729
  message: messageOf$3(statement)
13729
13730
  })(statement)));
13730
13731
  retained.dispose();
@@ -13737,7 +13738,7 @@ const topLevelEffects = Effect.fn("topLevelEffects")(function* topLevelEffects(r
13737
13738
  const names = yield* files.ownedFiles(root);
13738
13739
  const owned = new Set(pipe(names, Array$1.map((name) => files.join(root, name))));
13739
13740
  const sources = pipe(modules, Array$1.filter((file) => owned.has(file) && CODE$1.test(file)));
13740
- const found = yield* Effect.forEach(sources, (file) => files.readFile(file).pipe(Effect.map((text) => pipe(text, Option.map(problemsIn$13(compiler.api)(file)), Option.getOrElse(() => [])))), { concurrency: READ_CONCURRENCY$13 });
13741
+ const found = yield* Effect.forEach(sources, (file) => files.readFile(file).pipe(Effect.map((text) => pipe(text, Option.map(problemsIn$13(compiler.api)(file)), Option.getOrElse(() => [])))), { concurrency: READ_CONCURRENCY$12 });
13741
13742
  return Array$1.flatten(found);
13742
13743
  }, Effect.scoped);
13743
13744
  const BUNDLED_RULE = "bundled-side-effects";
@@ -13767,7 +13768,7 @@ const bundledSideEffectProblems = Effect.fn("bundledSideEffectProblems")(functio
13767
13768
  const manifests = new Set(pipe(owned, Array$1.filter((file) => files.basename(file) === PACKAGE_JSON_FILE)));
13768
13769
  const ownedSet = new Set(owned);
13769
13770
  const directories = pipe(used, Array$1.flatMap(({ modules }) => modules), Array$1.filter((module) => ownedSet.has(module)), Array$1.flatMap((module) => Option.toArray(packageDirectoryOf(manifests, files)(module))), Array$1.dedupe, Array$1.filter((found) => found !== directory), Array$1.sortBy(Order.String));
13770
- const undeclared = yield* Effect.forEach(directories, undeclaredAt, { concurrency: READ_CONCURRENCY$13 });
13771
+ const undeclared = yield* Effect.forEach(directories, undeclaredAt, { concurrency: READ_CONCURRENCY$12 });
13771
13772
  const at = problemAtIndex(BUNDLED_RULE)(located.file, located.source);
13772
13773
  const index = nameIndex$1(located.source);
13773
13774
  return pipe(Array$1.getSomes(undeclared), Array$1.map((found) => at(index, undeclaredMessage(files, root)(found))));
@@ -13892,7 +13893,7 @@ const checkTreeShaking = Effect.fn("checkTreeShaking")(function* checkTreeShakin
13892
13893
  return Array$1.flatten(found);
13893
13894
  });
13894
13895
  // src/features/check-typescript-generation/model/typescript-generation.ts
13895
- const RULE$38 = "legacy-typescript";
13896
+ const RULE$37 = "legacy-typescript";
13896
13897
  const LOCKFILE = "pnpm-lock.yaml";
13897
13898
  const COMPILER = "typescript";
13898
13899
  const CURRENT_MAJOR = 7;
@@ -13923,12 +13924,12 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
13923
13924
  file,
13924
13925
  line: lineOf$2(source)(legacy.id),
13925
13926
  column: FIRST$7,
13926
- rule: RULE$38,
13927
+ rule: RULE$37,
13927
13928
  message: messageOf$2(legacy, dependentsOf(Option.getOrElse(nodes, () => []))(legacy.id))
13928
13929
  })));
13929
13930
  });
13930
13931
  // src/features/check-worker-bundles/model/worker-bundles.ts
13931
- const RULE$37 = "worker-bundle";
13932
+ const RULE$36 = "worker-bundle";
13932
13933
  const BUNDLE_CONCURRENCY = 4;
13933
13934
  const PLATFORM_MODULES = [/^cloudflare:/u, /^node:/u];
13934
13935
  const CONDITIONS = [
@@ -13939,7 +13940,7 @@ const CONDITIONS = [
13939
13940
  "module",
13940
13941
  "default"
13941
13942
  ];
13942
- const problemFor$2 = problemInFile(RULE$37);
13943
+ const problemFor$2 = problemInFile(RULE$36);
13943
13944
  const problemOf$6 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
13944
13945
  const bundleProblem = (file) => Effect.gen(function* bundle() {
13945
13946
  const built = yield* Effect.tryPromise({
@@ -14064,7 +14065,7 @@ const fileFactsIn = (checker) => (sourceFiles, excluded) => pipe(sourceFiles, Ar
14064
14065
  imports: importedFilesOf(checker)(sourceFile)
14065
14066
  })), Array$1.filter((facts) => Array$1.isReadonlyArrayNonEmpty(facts.values) || Array$1.isReadonlyArrayNonEmpty(facts.imports)));
14066
14067
  // src/features/check-value-owners/model/name-lists.ts
14067
- const RULE$36 = "hand-written-names";
14068
+ const RULE$35 = "hand-written-names";
14068
14069
  const TEST_FILE = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
14069
14070
  const nameListOf = (site) => {
14070
14071
  if (TEST_FILE.test(site.file) || site.values.length < 2) return Option.none();
@@ -14079,7 +14080,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
14079
14080
  file,
14080
14081
  line,
14081
14082
  column,
14082
- rule: RULE$36,
14083
+ rule: RULE$35,
14083
14084
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
14084
14085
  });
14085
14086
  const problemOf$5 = ({ list, reason }) => listedProblem({
@@ -14355,7 +14356,7 @@ const derivationScopeOf = (node) => {
14355
14356
  };
14356
14357
  const sourcesOf = (checker) => (node) => pipe(referencedSymbols(checker)(derivationScopeOf(node)), Array$1.filter((symbol) => Option.isSome(namedValuesOf(checker)(symbol))));
14357
14358
  const sitesUnder = (checker) => (node) => {
14358
- const nested = pipe(childrenOf$2(node), Array$1.flatMap((child) => sitesUnder(checker)(child)));
14359
+ const nested = pipe(childrenOf$1(node), Array$1.flatMap((child) => sitesUnder(checker)(child)));
14359
14360
  if (Array$1.isReadonlyArrayNonEmpty(nested)) return nested;
14360
14361
  return siteValuesOf(checker)(node).pipe(Option.map((values) => ({
14361
14362
  node,
@@ -14875,7 +14876,7 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
14875
14876
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
14876
14877
  }, Effect.scoped);
14877
14878
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
14878
- const RULE$35 = "namespace-destructuring";
14879
+ const RULE$34 = "namespace-destructuring";
14879
14880
  const LOCAL = /^[.#/]/u;
14880
14881
  const messageOf$1 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
14881
14882
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
@@ -14891,7 +14892,7 @@ const destructuredName = (declaration) => {
14891
14892
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
14892
14893
  };
14893
14894
  const problemOf$4 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$7({
14894
- rule: RULE$35,
14895
+ rule: RULE$34,
14895
14896
  message: messageOf$1(name)
14896
14897
  })), Option.map((report) => report(declaration)));
14897
14898
  const namespaceDestructuringIn = () => (sourceFile) => {
@@ -14899,7 +14900,7 @@ const namespaceDestructuringIn = () => (sourceFile) => {
14899
14900
  return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$4(names)), Array$1.getSomes);
14900
14901
  };
14901
14902
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
14902
- const RULE$34 = "pass-through-wrapper";
14903
+ const RULE$33 = "pass-through-wrapper";
14903
14904
  const SINGLE_STATEMENT = 1;
14904
14905
  const SINGLE_DECLARATION = 1;
14905
14906
  const THIS_PARAMETER = "this";
@@ -14996,7 +14997,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
14996
14997
  const problemOf$3 = (checker) => (candidate) => {
14997
14998
  if (changesTheCall(candidate.wrapper)) return Option.none();
14998
14999
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$7({
14999
- rule: RULE$34,
15000
+ rule: RULE$33,
15000
15001
  message: messageOf(forward.callee.getText())
15001
15002
  })(candidate.name)));
15002
15003
  };
@@ -15022,7 +15023,7 @@ var plugins = [{
15022
15023
  "description": "CLI for watashi (watashi.masseater.dev). Sends Claude Code transcripts from a Stop hook after masking secrets locally with h56m, and manages login and API tokens."
15023
15024
  }];
15024
15025
  // src/features/check-agent-settings/model/known-plugins.ts
15025
- const RULE$33 = "known-plugins";
15026
+ const RULE$32 = "known-plugins";
15026
15027
  const SETTINGS_FILE$2 = ".claude/settings.json";
15027
15028
  const GITHUB$2 = "github";
15028
15029
  const Source$1 = Schema.Struct({
@@ -15040,7 +15041,7 @@ const decodeSettings$1 = Schema.decodeUnknownOption(Schema.fromJsonString(Settin
15040
15041
  const REPOSITORY_NAME = "masseater/masseater.dev";
15041
15042
  const MARKETPLACE = name;
15042
15043
  const PLUGINS = pipe(plugins, Array$1.map(({ name }) => `${name}@${MARKETPLACE}`));
15043
- const problem$1 = problemInFile(RULE$33);
15044
+ const problem$1 = problemInFile(RULE$32);
15044
15045
  const fromGithub = ({ source }) => source.source === GITHUB$2 && source.repo === REPOSITORY_NAME;
15045
15046
  const marketplaceKnown = (settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(MARKETPLACE)), Option.exists(fromGithub));
15046
15047
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
@@ -15061,13 +15062,13 @@ const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlu
15061
15062
  return [...marketplaceProblems(file, settings), ...pluginProblems(file, settings)];
15062
15063
  });
15063
15064
  // src/features/check-agent-settings/model/missing-hooks.ts
15064
- const RULE$32 = "missing-hook";
15065
+ const RULE$31 = "missing-hook";
15065
15066
  const SETTINGS_FILE$1 = /^\.claude\/settings\.json$/u;
15066
15067
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
15067
15068
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
15068
15069
  const PLUGIN_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PLUGIN_ROOT\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
15069
15070
  const PLUGIN_ROOT = "..";
15070
- const READ_CONCURRENCY$12 = 16;
15071
+ const READ_CONCURRENCY$11 = 16;
15071
15072
  const START$19 = 0;
15072
15073
  const referenceOf$2 = (found) => pipe(groupOf("path")(found), Option.filter(() => Option.isNone(groupOf("optional")(found))), Option.map((path) => ({
15073
15074
  path,
@@ -15086,7 +15087,7 @@ const problemsIn$12 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
15086
15087
  return pipe(missing, Array$1.map(({ path, index }) => ({
15087
15088
  file,
15088
15089
  ...positionOf(source)(index),
15089
- rule: RULE$32,
15090
+ rule: RULE$31,
15090
15091
  message: `runs ${path}, which does not exist. The hook fails every time it fires. Point it at a file that exists or remove the hook.`
15091
15092
  })));
15092
15093
  });
@@ -15110,7 +15111,7 @@ const checkMissingHooks = Effect.fn("checkMissingHooks")(function* checkMissingH
15110
15111
  }];
15111
15112
  return [];
15112
15113
  }));
15113
- const found = yield* Effect.forEach(hookFiles, problemsIn$12, { concurrency: READ_CONCURRENCY$12 });
15114
+ const found = yield* Effect.forEach(hookFiles, problemsIn$12, { concurrency: READ_CONCURRENCY$11 });
15114
15115
  return Array$1.flatten(found);
15115
15116
  });
15116
15117
  // src/features/check-documented-commands/model/task-graph.ts
@@ -15139,7 +15140,7 @@ const listedTasks = Effect.fn("listedTasks")(function* listedTasks(root) {
15139
15140
  }, Effect.scoped, Effect.orElseSucceed(() => Option.none()));
15140
15141
  const GivenTaskGraph = Context.Reference("msch/GivenTaskGraph", { defaultValue: () => Option.none() });
15141
15142
  // src/features/check-documented-commands/model/commands.ts
15142
- const RULE$31 = "documented-commands";
15143
+ const RULE$30 = "documented-commands";
15143
15144
  const DOCUMENTS = ["*AGENTS.md", "*CLAUDE.md"];
15144
15145
  const DOCUMENT_NAMES = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
15145
15146
  const COMMAND = /`vp run (?<args>[^`]+)`/gu;
@@ -15217,7 +15218,7 @@ const isMissing = (graph, file) => ({ task, scope }) => !pipe(packagesOf(graph,
15217
15218
  const problemsIn$11 = (graph, absolute, { file, text }) => pipe(Array$1.fromIterable(String$1.matchAll(COMMAND)(text)), Array$1.flatMap((match) => pipe(Option.fromNullishOr(match.groups), Option.flatMap(Record.get(ARGS)), Option.flatMap(parsed), Option.filter(isMissing(graph, file)), Option.map(({ task, scope }) => ({
15218
15219
  file: absolute(file),
15219
15220
  ...positionOf(text)(match.index ?? START$18),
15220
- rule: RULE$31,
15221
+ rule: RULE$30,
15221
15222
  message: `${match[START$18]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
15222
15223
  })), Option.toArray)));
15223
15224
  const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$4), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
@@ -15242,15 +15243,15 @@ const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* c
15242
15243
  file: absolute(Array$1.headNonEmpty(commanded).file),
15243
15244
  line: ONE$1,
15244
15245
  column: ONE$1,
15245
- rule: RULE$31,
15246
+ rule: RULE$30,
15246
15247
  message: "msch could not list the tasks with `vp run --json`"
15247
15248
  }],
15248
15249
  onSome: (found) => pipe(commanded, Array$1.flatMap((document) => problemsIn$11(found, absolute, document)))
15249
15250
  });
15250
15251
  });
15251
15252
  // src/features/check-legacy-web/model/legacy-web.ts
15252
- const RULE$30 = "legacy-web";
15253
- const FIRST_COLUMN$4 = 1;
15253
+ const RULE$29 = "legacy-web";
15254
+ const FIRST_COLUMN$3 = 1;
15254
15255
  const SCANNER = fileURLToPath(new URL("./skills/modern-web-guidance/modern-web.mjs", import.meta.resolve("modern-web-guidance/package.json")));
15255
15256
  const Finding = Schema.Struct({
15256
15257
  file: Schema.String,
@@ -15287,8 +15288,8 @@ const checkLegacyWeb = Effect.fn("checkLegacyWeb")(function* checkLegacyWeb(root
15287
15288
  const problemOf = (guideId, ruleId) => ({ file, line, message }) => ({
15288
15289
  file: files.join(root, file),
15289
15290
  line,
15290
- column: FIRST_COLUMN$4,
15291
- rule: RULE$30,
15291
+ column: FIRST_COLUMN$3,
15292
+ rule: RULE$29,
15292
15293
  message: `${ruleId}: ${message} Read the guide with \`modern-web-guidance retrieve ${guideId}\` and apply it.`
15293
15294
  });
15294
15295
  return pipe(scan.guides, Array$1.flatMap(({ guideId, rules }) => pipe(rules, Array$1.flatMap(({ ruleId, findings }) => pipe(findings, Array$1.map(problemOf(guideId, ruleId)))))));
@@ -15358,8 +15359,8 @@ const SHELL_FILE = /\.(?:sh|bash|zsh|ksh|fish|command)$/u;
15358
15359
  const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|^#!\S*fish\b/u;
15359
15360
  const EXTENSION = /\.[^./]+$/u;
15360
15361
  const SETTINGS_FILE = ".claude/settings.json";
15361
- const READ_CONCURRENCY$11 = 64;
15362
- const RULE$29 = "shell-script";
15362
+ const READ_CONCURRENCY$10 = 64;
15363
+ const RULE$28 = "shell-script";
15363
15364
  const MESSAGE$12 = "is a shell script. Do the work in TypeScript as a Vite+ task in vite.config.ts, a test, or the tool's own hook, and delete this file. Only the SessionStart hook in .claude/settings.json, which installs the toolchain before TypeScript can run, stays a shell script.";
15364
15365
  const HookSchema = Schema.Struct({
15365
15366
  command: Schema.optional(Schema.String),
@@ -15391,12 +15392,12 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
15391
15392
  return files.readFile(file).pipe(Effect.map(Option.exists((source) => SHELL_SHEBANG.test(source))));
15392
15393
  };
15393
15394
  const candidates = pipe(names, Array$1.filter((name) => !isSessionStartHook(name)));
15394
- const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$11 });
15395
- return pipe(shell, Array$1.map((name) => problemInFile(RULE$29)(files.join(root, name), MESSAGE$12)));
15395
+ const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$10 });
15396
+ return pipe(shell, Array$1.map((name) => problemInFile(RULE$28)(files.join(root, name), MESSAGE$12)));
15396
15397
  });
15397
15398
  // src/shared/lib/workflow-files.ts
15398
15399
  const WORKFLOW_FILE = /^\.github\/workflows\/[^/]+\.ya?ml$/u;
15399
- const READ_CONCURRENCY$10 = 16;
15400
+ const READ_CONCURRENCY$9 = 16;
15400
15401
  const readWorkflows = Effect.fn("readWorkflows")(function* readWorkflows(root) {
15401
15402
  const files = yield* RepositoryFiles;
15402
15403
  const names = yield* files.listedFiles(root);
@@ -15406,7 +15407,7 @@ const readWorkflows = Effect.fn("readWorkflows")(function* readWorkflows(root) {
15406
15407
  file,
15407
15408
  source
15408
15409
  }))));
15409
- }, { concurrency: READ_CONCURRENCY$10 });
15410
+ }, { concurrency: READ_CONCURRENCY$9 });
15410
15411
  return Array$1.getSomes(found);
15411
15412
  });
15412
15413
  // src/shared/lib/workflow-run.ts
@@ -15427,7 +15428,7 @@ const runScriptsOf = (source) => {
15427
15428
  const COMMAND_CHAIN = /&&|\|\||;|\|/u;
15428
15429
  const QUOTED$1 = /\$\{\{.*?\}\}|"(?:[^"\\]|\\.)*"|'[^']*'/gu;
15429
15430
  const COMMENT = "#";
15430
- const RULE$28 = "workflow-script";
15431
+ const RULE$27 = "workflow-script";
15431
15432
  const ONE_COMMAND = 1;
15432
15433
  const MESSAGE$11 = "runs more than one command. Keep a step to one command, `vp run <task>` or `vp exec <bin>`, and put the logic in a Vite+ task in TypeScript.";
15433
15434
  const isCommand = (line) => String$1.isNonEmpty(line) && !String$1.startsWith(COMMENT)(line);
@@ -15438,7 +15439,7 @@ const runsMoreThanOneCommand = ({ text }) => {
15438
15439
  };
15439
15440
  const problemsIn$10 = (file) => (source) => {
15440
15441
  const at = positionOf(source);
15441
- return pipe(runScriptsOf(source), Array$1.filter(runsMoreThanOneCommand), Array$1.map(({ start }) => problemAtPosition(RULE$28)(file, at(start), MESSAGE$11)));
15442
+ return pipe(runScriptsOf(source), Array$1.filter(runsMoreThanOneCommand), Array$1.map(({ start }) => problemAtPosition(RULE$27)(file, at(start), MESSAGE$11)));
15442
15443
  };
15443
15444
  /** @internal */
15444
15445
  const checkWorkflows = Effect.fn("checkWorkflows")(function* checkWorkflows(root) {
@@ -15568,7 +15569,7 @@ const AGENT_DOCS = [
15568
15569
  ":(glob)**/CLAUDE.md",
15569
15570
  ...EXCLUDED$4
15570
15571
  ];
15571
- const READ_CONCURRENCY$9 = 16;
15572
+ const READ_CONCURRENCY$8 = 16;
15572
15573
  const START$16 = 0;
15573
15574
  const FIRST$5 = 1;
15574
15575
  const LINE = "\n";
@@ -15610,7 +15611,7 @@ const commandIn = (node) => {
15610
15611
  const record = node;
15611
15612
  return pipe(Option.fromUndefinedOr(record[COMMAND_KEY]), Option.filter(Predicate.isString), Option.map((command) => pipe(decodeArguments(record[ARGUMENTS_KEY]), Option.getOrElse(() => []), Array$1.prepend(command), Array$1.join(" "))));
15612
15613
  };
15613
- const commandsIn = (node) => [...Option.toArray(commandIn(node)), ...pipe(childrenOf$1(node), Array$1.flatMap(commandsIn))];
15614
+ const commandsIn = (node) => [...Option.toArray(commandIn(node)), ...pipe(childrenOf$2(node), Array$1.flatMap(commandsIn))];
15614
15615
  const agentSources = (file) => (source) => pipe(decodeJson$1(source), Option.map(commandsIn), Option.getOrElse(() => []), Array$1.map((text) => {
15615
15616
  const program = Array$1.headNonEmpty(String$1.split(text, " "));
15616
15617
  const offset = offsetOf$2(source, `"${program}"`);
@@ -15637,7 +15638,7 @@ const taskSources = Effect.fn("taskSources")(function* taskSources(root, directo
15637
15638
  return pipe(tasks, Array$1.flatMap((task) => Option.toArray(taskSource(file, source)(task))));
15638
15639
  });
15639
15640
  const workspaceTasks = Effect.fn("workspaceTasks")(function* workspaceTasks(root, directories) {
15640
- const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$9 });
15641
+ const found = yield* Effect.forEach(directories, (directory) => taskSources(root, directory), { concurrency: READ_CONCURRENCY$8 });
15641
15642
  return Array$1.flatten(found);
15642
15643
  });
15643
15644
  const readSources = Effect.fn("readSources")(function* readSources(root, names, sourcesOf) {
@@ -15649,7 +15650,7 @@ const readSources = Effect.fn("readSources")(function* readSources(root, names,
15649
15650
  onSome: sourcesOf(file, name)
15650
15651
  });
15651
15652
  return files.readFile(file).pipe(Effect.map(sourcesIn));
15652
- }, { concurrency: READ_CONCURRENCY$9 });
15653
+ }, { concurrency: READ_CONCURRENCY$8 });
15653
15654
  return Array$1.flatten(found);
15654
15655
  });
15655
15656
  /** @internal */
@@ -15673,7 +15674,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
15673
15674
  return Array$1.flatten(found);
15674
15675
  });
15675
15676
  // src/features/check-vite-plus/model/package-scripts.ts
15676
- const RULE$27 = "package-script";
15677
+ const RULE$26 = "package-script";
15677
15678
  const LIFECYCLE = [
15678
15679
  "preinstall",
15679
15680
  "install",
@@ -15696,12 +15697,12 @@ const LIFECYCLE = [
15696
15697
  const problemOf$2 = ({ file, position, name }) => ({
15697
15698
  file,
15698
15699
  ...position,
15699
- rule: RULE$27,
15700
+ rule: RULE$26,
15700
15701
  message: `The script ${name} is not a lifecycle script. package.json scripts hold only the scripts the package manager runs by itself, such as prepare and prepack. Write ${name} as a task in run.tasks of this package's vite.config.ts, where its shape is type-checked.`
15701
15702
  });
15702
15703
  const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$2));
15703
15704
  // src/features/check-vite-plus/model/vite-plus-block.ts
15704
- const RULE$26 = "vite-plus-block";
15705
+ const RULE$25 = "vite-plus-block";
15705
15706
  const MARKER = Array$1.join([
15706
15707
  "<!--",
15707
15708
  "VITE PLUS START",
@@ -15714,7 +15715,7 @@ const problemIn = (file) => (source) => {
15714
15715
  return Option.some({
15715
15716
  file,
15716
15717
  ...positionOf(source)(index.value),
15717
- rule: RULE$26,
15718
+ rule: RULE$25,
15718
15719
  message: MESSAGE$10
15719
15720
  });
15720
15721
  };
@@ -15785,7 +15786,7 @@ const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
15785
15786
  }));
15786
15787
  });
15787
15788
  // src/features/check-workflows/model/publish-trigger.ts
15788
- const RULE$24 = "publish-trigger";
15789
+ const RULE$23 = "publish-trigger";
15789
15790
  const PUBLISH = /\bmsch-publish\s+(?:plan|npm|release)\b/u;
15790
15791
  const MANUAL = "workflow_dispatch";
15791
15792
  const TRIGGER_KEY = "on";
@@ -15805,18 +15806,18 @@ const publishTriggerOffsetsOf = (source) => {
15805
15806
  };
15806
15807
  /** @internal */
15807
15808
  const checkPublishTrigger = workflowCheck({
15808
- rule: RULE$24,
15809
+ rule: RULE$23,
15809
15810
  message: MESSAGE$8,
15810
15811
  offsetsOf: publishTriggerOffsetsOf
15811
15812
  });
15812
15813
  // src/features/check-workflows/model/release-please.ts
15813
- const RULE$23 = "release-please";
15814
+ const RULE$22 = "release-please";
15814
15815
  const RELEASE_PLEASE = /^googleapis\/release-please-action(?:@|$)/u;
15815
15816
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
15816
15817
  const FIRST$4 = 1;
15817
15818
  const MESSAGE$7 = "releases with release-please. Releases are manual: bump the version in a PR, then run the publish workflow, which runs `msch-publish` for the workspace.";
15818
15819
  const checkReleasePleaseSteps = workflowCheck({
15819
- rule: RULE$23,
15820
+ rule: RULE$22,
15820
15821
  message: MESSAGE$7,
15821
15822
  offsetsOf: scalarKeyOffsets({
15822
15823
  name: "uses",
@@ -15830,7 +15831,7 @@ const checkReleasePleaseFiles = Effect.fn("checkReleasePleaseFiles")(function* c
15830
15831
  file: files.join(root, name),
15831
15832
  line: FIRST$4,
15832
15833
  column: FIRST$4,
15833
- rule: RULE$23,
15834
+ rule: RULE$22,
15834
15835
  message: MESSAGE$7
15835
15836
  })));
15836
15837
  });
@@ -15842,17 +15843,17 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
15842
15843
  // src/features/check-workflows/model/workflow-queue.ts
15843
15844
  const CONCURRENCY_KEY = "concurrency";
15844
15845
  const QUEUE_KEY = "queue";
15845
- const RULE$22 = "workflow-queue";
15846
+ const RULE$21 = "workflow-queue";
15846
15847
  const MESSAGE$6 = "queues runs with `queue`. A queued group runs every old push one by one, so a long run holds back the newest commit for hours. Drop `queue`: a job that later pushes redo gets `cancel-in-progress: true`, and a deploy or release job keeps the default, which lets the running one finish and replaces the waiting one with the newest run.";
15847
15848
  const queueOffsetsOf = (source) => pipe(pairsNamed(CONCURRENCY_KEY)(source), Array$1.flatMap((pair) => Option.toArray(keyOffsetIn(QUEUE_KEY)(pair.value))));
15848
15849
  /** @internal */
15849
15850
  const checkWorkflowQueues = workflowCheck({
15850
- rule: RULE$22,
15851
+ rule: RULE$21,
15851
15852
  message: MESSAGE$6,
15852
15853
  offsetsOf: queueOffsetsOf
15853
15854
  });
15854
15855
  // src/features/check-workflows/model/workflow-commits.ts
15855
- const RULE$21 = "workflow-commit";
15856
+ const RULE$20 = "workflow-commit";
15856
15857
  const GIT_WRITE = /\bgit\s+(?:-{1,2}\S+\s+(?:\S+\s+)?)*(?:commit|push)\b/u;
15857
15858
  const COMMIT_ACTION = /^[^@/]+\/[^@]*(?:commit|push)[^@]*(?:@|$)/iu;
15858
15859
  const MESSAGE$5 = "commits or pushes from a workflow. A bot commit leaves generated files out of review and races the next push. Regenerate the files in a commit hook (for example `.vite-hooks/pre-commit`) so they land in the author's commit, and let CI only check that they are current.";
@@ -15860,7 +15861,7 @@ const offsetsWhere = (name, pattern) => (source) => pipe(pairsNamed(name)(source
15860
15861
  const commitOffsetsOf = (source) => [...offsetsWhere("run", GIT_WRITE)(source), ...offsetsWhere("uses", COMMIT_ACTION)(source)];
15861
15862
  /** @internal */
15862
15863
  const checkWorkflowCommits = workflowCheck({
15863
- rule: RULE$21,
15864
+ rule: RULE$20,
15864
15865
  message: MESSAGE$5,
15865
15866
  offsetsOf: commitOffsetsOf
15866
15867
  });
@@ -16088,11 +16089,11 @@ const shebangReader = (source) => {
16088
16089
  };
16089
16090
  const readerOf = (name) => (source) => pipe(READERS$1, Array$1.findFirst(([pattern]) => pattern.test(name)), Option.orElse(() => shebangReader(source)), Option.map(([, reader]) => reader));
16090
16091
  // src/features/ban-comments/model/comments.ts
16091
- const RULE$20 = "comment";
16092
+ const RULE$19 = "comment";
16092
16093
  const UNUSED_RULE$1 = "unused-comment-allowance";
16093
16094
  const CONFIG_FILE$2 = "vite.config.ts";
16094
16095
  const VENDORED_PATHSPEC = ":(attr:linguist-vendored)";
16095
- const READ_CONCURRENCY$8 = 64;
16096
+ const READ_CONCURRENCY$7 = 64;
16096
16097
  const START$14 = 0;
16097
16098
  const SHEBANG = "#!";
16098
16099
  const PIN = /@(?:[0-9a-f]{40}|sha256:[0-9a-f]{64})\s*$/u;
@@ -16129,7 +16130,7 @@ const unusedMessage = (entry) => `allows the comment pattern \`${entry}\`, but n
16129
16130
  const problemOf$1 = (file, source) => ({ index }) => ({
16130
16131
  file,
16131
16132
  ...positionOf(source)(index),
16132
- rule: RULE$20,
16133
+ rule: RULE$19,
16133
16134
  message: MESSAGE$4
16134
16135
  });
16135
16136
  const settingsOf = ({ msch, lint }) => ({
@@ -16188,7 +16189,7 @@ const scanFile = ({ directives, allowances, comments }) => ({ name, file }, sour
16188
16189
  problems: pipe(found, Array$1.filter(kept), Array$1.map(toProblem)),
16189
16190
  used: usedAllowances(allowances, found)
16190
16191
  })), Effect.catchTag("CommentsUnreadable", ({ message }) => Effect.succeed({
16191
- problems: [problemInFile(RULE$20)(file, `msch could not read the comments in this file: ${message}`)],
16192
+ problems: [problemInFile(RULE$19)(file, `msch could not read the comments in this file: ${message}`)],
16192
16193
  used: []
16193
16194
  })))
16194
16195
  });
@@ -16207,7 +16208,7 @@ const checkComments = Effect.fn("checkComments")(function* checkComments(root) {
16207
16208
  const found = yield* Effect.forEach(scanned, (entry) => files.readFile(entry.file).pipe(Effect.flatMap(Option.match({
16208
16209
  onNone: () => Effect.succeed(NOTHING),
16209
16210
  onSome: (source) => scan(entry, source)
16210
- }))), { concurrency: READ_CONCURRENCY$8 });
16211
+ }))), { concurrency: READ_CONCURRENCY$7 });
16211
16212
  const used = HashSet.fromIterable(pipe(found, Array$1.flatMap(({ used: indexes }) => indexes)));
16212
16213
  const unused = yield* unusedAllowances(root, settings, used);
16213
16214
  return [...pipe(found, Array$1.flatMap(({ problems }) => problems)), ...unused];
@@ -16222,13 +16223,13 @@ const patternsBy = ({ spawn, command, toolVersions = [] }) => (entry) => {
16222
16223
  return command;
16223
16224
  };
16224
16225
  const spawnPattern = (program) => new RegExp(String.raw`(?:\bcommand["']?\s*[:=]\s*|(?:\bspawn\w*|\bexec\w*|\bexeca|Command::new|ChildProcess\.make)\(\s*|\$\(\s*|\$\s*(?=\x60))["'\x60](?:${program})(?=["'\x60\s])`, "gu");
16225
- const FIRST_LINE$4 = 1;
16226
- const FIRST_COLUMN$3 = 1;
16226
+ const FIRST_LINE$3 = 1;
16227
+ const FIRST_COLUMN$2 = 1;
16227
16228
  const WHOLE_MATCH$1 = 0;
16228
16229
  const fileProblem = (tool) => (entry) => ({
16229
16230
  file: entry.file,
16230
- line: FIRST_LINE$4,
16231
- column: FIRST_COLUMN$3,
16231
+ line: FIRST_LINE$3,
16232
+ column: FIRST_COLUMN$2,
16232
16233
  rule: tool.fileRule,
16233
16234
  message: tool.fileMessage(entry)
16234
16235
  });
@@ -16301,7 +16302,7 @@ const PYTHON = {
16301
16302
  /** @internal */
16302
16303
  const checkPython = (root) => checkBannedTool(root, PYTHON);
16303
16304
  // src/features/check-catalog-entries/model/uncataloged-dependencies.ts
16304
- const RULE$19 = "uncataloged-dependency";
16305
+ const RULE$18 = "uncataloged-dependency";
16305
16306
  const OWNED_ELSEWHERE = [
16306
16307
  "catalog:",
16307
16308
  "workspace:",
@@ -16315,7 +16316,7 @@ const isOwnedElsewhere = ({ specifier }) => pipe(OWNED_ELSEWHERE, Array$1.some((
16315
16316
  const problemsIn$9 = (entry, source) => pipe(manifestSpecifiers(source), Array$1.filter((found) => !isOwnedElsewhere(found)), Array$1.map((found) => ({
16316
16317
  file: entry.file,
16317
16318
  ...positionOf(source)(offsetIn$1(source)(manifestPattern(found))),
16318
- rule: RULE$19,
16319
+ rule: RULE$18,
16319
16320
  message: `\`${found.name}\` \`${found.specifier}\` ${MESSAGE$3}`
16320
16321
  })));
16321
16322
  /** @internal */
@@ -16339,10 +16340,10 @@ const CATALOG_PROTOCOL = "catalog:";
16339
16340
  const DEFAULT_CATALOG = "default";
16340
16341
  const VERSION_SEPARATOR = "||";
16341
16342
  const WILDCARD = "*";
16342
- const FIRST_LINE$3 = 1;
16343
- const FIRST_COLUMN$2 = 1;
16343
+ const FIRST_LINE$2 = 1;
16344
+ const FIRST_COLUMN$1 = 1;
16344
16345
  const SCOPED_NAME = /^(?<name>@?[^@]+)(?:@(?<versions>.+))?$/u;
16345
- const READ_CONCURRENCY$7 = 16;
16346
+ const READ_CONCURRENCY$6 = 16;
16346
16347
  const STALE_RULE = "stale-release-age-exclude";
16347
16348
  const UNUSED_RULE = "unused-catalog-entry";
16348
16349
  const STALE_MESSAGE = "excludes a version from `minimumReleaseAge` that the lockfile no longer resolves. Remove the entry: it only exempted that one version while it was new.";
@@ -16373,14 +16374,14 @@ const lockedKeys = (root) => lockedPackageIds(root).pipe(Effect.orElseSucceed(()
16373
16374
  const usedReferences = Effect.fn("usedReferences")(function* usedReferences(root, settings) {
16374
16375
  const files = yield* RepositoryFiles;
16375
16376
  const listed = yield* files.listedFiles(root);
16376
- const manifests = yield* Effect.forEach(pipe(listed, Array$1.filter((name) => MANIFEST$1.test(name))), (name) => files.readFile(files.join(root, name)), { concurrency: READ_CONCURRENCY$7 });
16377
+ const manifests = yield* Effect.forEach(pipe(listed, Array$1.filter((name) => MANIFEST$1.test(name))), (name) => files.readFile(files.join(root, name)), { concurrency: READ_CONCURRENCY$6 });
16377
16378
  const fromManifests = pipe(Array$1.getSomes(manifests), Array$1.flatMap((text) => Option.toArray(decodePackageJson(text))), Array$1.flatMap(referencesIn));
16378
16379
  const fromOverrides = pipe(fieldsOf(settings["overrides"]), Record.toEntries, Array$1.flatMap(referenceOf$1));
16379
16380
  return /* @__PURE__ */ new Set([...fromManifests, ...fromOverrides]);
16380
16381
  });
16381
16382
  const lineOf$1 = (source) => (needle) => pipe(String$1.split(source, "\n"), Array$1.findFirstIndex((line) => needle.test(line)), Option.match({
16382
- onNone: () => FIRST_LINE$3,
16383
- onSome: (index) => index + FIRST_LINE$3
16383
+ onNone: () => FIRST_LINE$2,
16384
+ onSome: (index) => index + FIRST_LINE$2
16384
16385
  }));
16385
16386
  const quoted = (name) => String$1.replaceAll(/[$()*+.?[\\\]^{|}]/gu, String.raw`\$&`)(name);
16386
16387
  const entryLine = (name) => new RegExp(`^\\s+["']?${quoted(name)}["']?:`, "u");
@@ -16388,7 +16389,7 @@ const excludeLine = (entry) => new RegExp(`^\\s+-\\s+["']?${quoted(entry)}["']?\
16388
16389
  const problemAt$4 = ({ file, at }, rule, message) => (name, needle) => ({
16389
16390
  file,
16390
16391
  line: at(needle),
16391
- column: FIRST_COLUMN$2,
16392
+ column: FIRST_COLUMN$1,
16392
16393
  rule,
16393
16394
  message: `\`${name}\` ${message}`
16394
16395
  });
@@ -16488,13 +16489,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
16488
16489
  ];
16489
16490
  });
16490
16491
  // src/features/check-skills/model/published-skills.ts
16491
- const RULE$18 = "published-skills";
16492
+ const RULE$17 = "published-skills";
16492
16493
  const KEYWORD = "tanstack-intent";
16493
16494
  const SKILLS = "skills";
16494
16495
  const SKILL_FILE$1 = "SKILL.md";
16495
16496
  const SUCCEEDED = 0;
16496
16497
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
16497
- const problemAt$2 = problemInFile(RULE$18);
16498
+ const problemAt$2 = problemInFile(RULE$17);
16498
16499
  const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$1), Array$1.map((file) => files.relative(directory, files.dirname(file))));
16499
16500
  const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
16500
16501
  const packagingMessages = ({ keywords, files }, skills) => {
@@ -16531,7 +16532,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
16531
16532
  return Array$1.flatten(problems);
16532
16533
  });
16533
16534
  // src/features/check-skills/model/skill-files.ts
16534
- const RULE$17 = "skill-file";
16535
+ const RULE$16 = "skill-file";
16535
16536
  const SKILL_FILE = /(?:^|\/)SKILL\.md$/u;
16536
16537
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
16537
16538
  const FIXTURE = /(?:^|\/)fixtures\//u;
@@ -16551,7 +16552,7 @@ const BLANK = /\s+/u;
16551
16552
  const SEPARATOR$2 = "/";
16552
16553
  const START$12 = 0;
16553
16554
  const FIRST$3 = 1;
16554
- const READ_CONCURRENCY$6 = 16;
16555
+ const READ_CONCURRENCY$5 = 16;
16555
16556
  const Metadata = Schema.Struct({ "derived-from": Schema.optional(Schema.String) });
16556
16557
  const Frontmatter = Schema.Struct({
16557
16558
  name: Schema.optional(Schema.String),
@@ -16589,7 +16590,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
16589
16590
  ]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
16590
16591
  file: skill.file,
16591
16592
  ...positionOf(skill.source)(index),
16592
- rule: RULE$17,
16593
+ rule: RULE$16,
16593
16594
  message
16594
16595
  })));
16595
16596
  const linkOf = (found) => pipe(groupOf("target")(found), Option.filter((target) => !EXTERNAL.test(target)), Option.map((target) => String$1.replace(FRAGMENT, "")(target)), Option.filter(String$1.isNonEmpty), Option.map((target) => ({
@@ -16616,7 +16617,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
16616
16617
  return pipe(missing, Array$1.map(({ target, index }) => ({
16617
16618
  file,
16618
16619
  ...positionOf(source)(index),
16619
- rule: RULE$17,
16620
+ rule: RULE$16,
16620
16621
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
16621
16622
  })));
16622
16623
  });
@@ -16627,12 +16628,12 @@ const problemsIn$7 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
16627
16628
  const inside = pipe(listed, Array$1.filter(String$1.startsWith(`${directory}${SEPARATOR$2}`)));
16628
16629
  const text = yield* files.readFile(file);
16629
16630
  const documents = pipe(inside, Array$1.filter(String$1.endsWith(MARKDOWN$1)), Array$1.map((entry) => files.join(root, entry)));
16630
- const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$6 });
16631
+ const links = yield* Effect.forEach(documents, linkProblems, { concurrency: READ_CONCURRENCY$5 });
16631
16632
  const licenses = pipe(inside, Array$1.filter((entry) => files.dirname(entry) === directory), Array$1.filter((entry) => LICENSE_FILE.test(files.basename(entry))), Array$1.map((entry) => ({
16632
16633
  file: files.join(root, entry),
16633
16634
  line: FIRST$3,
16634
16635
  column: FIRST$3,
16635
- rule: RULE$17,
16636
+ rule: RULE$16,
16636
16637
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
16637
16638
  })));
16638
16639
  return [
@@ -16649,7 +16650,7 @@ const problemsIn$7 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
16649
16650
  const checkSkillFiles = Effect.fn("checkSkillFiles")(function* checkSkillFiles(root) {
16650
16651
  const listed = yield* (yield* RepositoryFiles).listedFiles(root);
16651
16652
  const skills = pipe(listed, Array$1.filter((name) => SKILL_FILE.test(name) && !INSTALLED.test(name) && !FIXTURE.test(name)));
16652
- const found = yield* Effect.forEach(skills, (name) => problemsIn$7(root, listed, name), { concurrency: READ_CONCURRENCY$6 });
16653
+ const found = yield* Effect.forEach(skills, (name) => problemsIn$7(root, listed, name), { concurrency: READ_CONCURRENCY$5 });
16653
16654
  return Array$1.flatten(found);
16654
16655
  });
16655
16656
  // src/features/check-version-downgrades/model/version-entries.ts
@@ -16710,8 +16711,8 @@ const cargoEntries = (text) => {
16710
16711
  };
16711
16712
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
16712
16713
  // src/features/check-version-downgrades/model/version-downgrade.ts
16713
- const RULE$16 = "version-downgrade";
16714
- const READ_CONCURRENCY$5 = 16;
16714
+ const RULE$15 = "version-downgrade";
16715
+ const READ_CONCURRENCY$4 = 16;
16715
16716
  const READERS = [
16716
16717
  [/(?:^|\/)package\.json$/u, manifestEntries],
16717
16718
  [/^pnpm-workspace\.yaml$/u, workspaceEntries],
@@ -16723,20 +16724,20 @@ const isLower = (before, after) => pipe(Option.all([lowestOf(before), lowestOf(a
16723
16724
  onNone: () => false,
16724
16725
  onSome: ([old, current]) => semver.lt(current, old)
16725
16726
  }));
16726
- const FIRST_LINE$2 = 1;
16727
+ const FIRST_LINE$1 = 1;
16727
16728
  const lineOf = (text, { name, spec }) => pipe(String$1.split(text, "\n"), Array$1.findFirstIndex((line) => String$1.includes(name)(line) && String$1.includes(spec)(line)), Option.match({
16728
- onNone: () => FIRST_LINE$2,
16729
- onSome: (index) => index + FIRST_LINE$2
16729
+ onNone: () => FIRST_LINE$1,
16730
+ onSome: (index) => index + FIRST_LINE$1
16730
16731
  }));
16731
- const message$1 = (before, after) => `lowers ${after.key} from ${before.spec} to ${after.spec}. Never downgrade a dependency, toolchain or engine: fix what broke on the new version instead, or ask the owner.`;
16732
+ const message = (before, after) => `lowers ${after.key} from ${before.spec} to ${after.spec}. Never downgrade a dependency, toolchain or engine: fix what broke on the new version instead, or ask the owner.`;
16732
16733
  const downgradesIn = ({ file, text, before, after }) => {
16733
16734
  const previous = Record.fromEntries(pipe(before, Array$1.map((entry) => [entry.key, entry])));
16734
16735
  return pipe(after, Array$1.flatMap((entry) => pipe(Record.get(previous, entry.key), Option.filter((old) => isLower(old.spec, entry.spec)), Option.map((old) => ({
16735
16736
  file,
16736
16737
  line: lineOf(text, entry),
16737
- column: FIRST_LINE$2,
16738
- rule: RULE$16,
16739
- message: message$1(old, entry)
16738
+ column: FIRST_LINE$1,
16739
+ rule: RULE$15,
16740
+ message: message(old, entry)
16740
16741
  })), Option.toArray)));
16741
16742
  };
16742
16743
  /** @internal */
@@ -16755,7 +16756,7 @@ const checkDowngrades = Effect.fn("checkDowngrades")(function* checkDowngrades(r
16755
16756
  before: read(before),
16756
16757
  after: read(after)
16757
16758
  })), Option.getOrElse(() => []));
16758
- }), { concurrency: READ_CONCURRENCY$5 });
16759
+ }), { concurrency: READ_CONCURRENCY$4 });
16759
16760
  return Array$1.flatten(found);
16760
16761
  });
16761
16762
  // src/features/check-version-downgrades/model/renovate-settings.ts
@@ -16767,7 +16768,7 @@ const CAP_RULE = "renovate-version-cap";
16767
16768
  const PRESET_RULE = "renovate-msch-preset";
16768
16769
  const PRESET = "github>masseater/ecosystems//libs/msch/renovate";
16769
16770
  const START$11 = 0;
16770
- const READ_CONCURRENCY$4 = 16;
16771
+ const READ_CONCURRENCY$3 = 16;
16771
16772
  const AUTOMERGE_MESSAGE = "sets `platformAutomerge: false`. Keep the platform's automerge on so passing updates merge without waiting for the next Renovate run.";
16772
16773
  const CAP_MESSAGE = "caps a dependency below a version with `allowedVersions`. A cap holds the dependency on an old version, which is a downgrade that never ends: fix what breaks on the new version instead.";
16773
16774
  const PRESET_MESSAGE = `does not extend \`${PRESET}\`, so Renovate writes ranges that the \`version-range\` check rejects. Add it to \`extends\`.`;
@@ -16801,65 +16802,7 @@ const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* check
16801
16802
  onNone: () => [],
16802
16803
  onSome: (source) => problemsIn$6(file, source)
16803
16804
  })));
16804
- }, { concurrency: READ_CONCURRENCY$4 });
16805
- return Array$1.flatten(found);
16806
- });
16807
- // src/features/check-version-downgrades/model/package-versions.ts
16808
- const RULE$15 = "unbumped-package";
16809
- const UNSHIPPED = /(?:\.test\.[\w.]+$|(?:^|\/)(?:fixtures|__tests__|tests?)\/|(?:^|\/)(?:AGENTS|CLAUDE|CHANGELOG)\.md$)/u;
16810
- const UNVERSIONED = "0.0.0";
16811
- const FIRST_LINE$1 = 1;
16812
- const FIRST_COLUMN$1 = 1;
16813
- const READ_CONCURRENCY$3 = 16;
16814
- const LAST_SEGMENT$1 = /[^/]*$/u;
16815
- const directoryOf$1 = (file) => String$1.replace(LAST_SEGMENT$1, "")(file);
16816
- const packageAt = (file, text) => pipe(decodeVersionedPackageJson(text), Option.filter(({ private: hidden, version }) => hidden !== true && version !== UNVERSIONED), Option.map(({ name, version }) => ({
16817
- file,
16818
- directory: directoryOf$1(file),
16819
- name,
16820
- version,
16821
- text
16822
- })));
16823
- const versionAt = (name, text) => pipe(text, Option.flatMap(decodeVersionedPackageJson), Option.filter((manifest) => manifest.name === name), Option.map(({ version }) => version), Option.filter((version) => semver.valid(version) !== null));
16824
- const versionLine = (text) => pipe(String$1.split(text, "\n"), Array$1.findFirstIndex((line) => String$1.includes("\"version\"")(line)), Option.match({
16825
- onNone: () => FIRST_LINE$1,
16826
- onSome: (index) => index + FIRST_LINE$1
16827
- }));
16828
- const shippedChange = (directory, changed) => pipe(changed, Array$1.some((name) => String$1.startsWith(directory)(name) && !UNSHIPPED.test(name)));
16829
- const higher = (left, right) => {
16830
- if (semver.gt(right, left)) return right;
16831
- return left;
16832
- };
16833
- const floorOf$1 = (versions) => {
16834
- let floor = Option.none();
16835
- for (const version of Array$1.getSomes(versions)) floor = Option.match(floor, {
16836
- onNone: () => Option.some(version),
16837
- onSome: (lowest) => Option.some(higher(version, lowest))
16838
- });
16839
- return floor;
16840
- };
16841
- const message = ({ name, version }, floor) => `${name} changed, but its version ${version} is not above ${floor}, the version of the base or of main. Another change may already publish ${floor}. Bump the version above ${floor}.`;
16842
- /** @internal */
16843
- const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPackageVersions(root) {
16844
- const files = yield* RepositoryFiles;
16845
- const base = yield* baseRevision(root);
16846
- if (Option.isNone(base)) return [];
16847
- const tip = yield* baseName$1;
16848
- const changed = yield* files.changedFiles(root, base.value);
16849
- const manifests = yield* manifestTexts(root);
16850
- const packages = pipe(manifests, Array$1.map(({ file, text }) => packageAt(file, text)));
16851
- const found = yield* Effect.forEach(pipe(Array$1.getSomes(packages), Array$1.filter(({ directory }) => shippedChange(directory, changed))), (pack) => Effect.gen(function* compare() {
16852
- const before = yield* files.readAtRevision(root, base.value, pack.file);
16853
- const claimed = yield* files.readAtRevision(root, tip, pack.file);
16854
- const floor = floorOf$1([versionAt(pack.name, before), versionAt(pack.name, claimed)]);
16855
- return pipe(floor, Option.filter((lowest) => !semver.gt(pack.version, lowest)), Option.map((lowest) => ({
16856
- file: files.join(root, pack.file),
16857
- line: versionLine(pack.text),
16858
- column: FIRST_COLUMN$1,
16859
- rule: RULE$15,
16860
- message: message(pack, lowest)
16861
- })), Option.toArray);
16862
- }), { concurrency: READ_CONCURRENCY$3 });
16805
+ }, { concurrency: READ_CONCURRENCY$3 });
16863
16806
  return Array$1.flatten(found);
16864
16807
  });
16865
16808
  // src/features/find-unneeded-files/model/applied-packages.ts
@@ -17842,11 +17785,6 @@ const checkAll = Effect.fn("checkAll")(function* checkAll(root) {
17842
17785
  const NO_PROBLEMS = 0;
17843
17786
  const ONE_FAILURE = 1;
17844
17787
  const NO_CONFIG = "config-missing";
17845
- const writeProblems = (root, problems) => Effect.gen(function* report() {
17846
- const files = yield* RepositoryFiles;
17847
- const format = formatProblem((file) => files.relative(root, file));
17848
- yield* writeStdout(pipe(problems, Array$1.map((problem) => `${format(problem)}\n`), Array$1.join("")));
17849
- });
17850
17788
  const writeStderr = Effect.fn("writeStderr")(function* writeStderr(text) {
17851
17789
  const stdio = yield* Stdio.Stdio;
17852
17790
  yield* Stream.make(text).pipe(Stream.run(stdio.stderr()), Effect.orDie);
@@ -17856,10 +17794,6 @@ const failuresOf = (args, kind, message) => {
17856
17794
  return writeStderr(`${message}\n`).pipe(Effect.as(ONE_FAILURE));
17857
17795
  };
17858
17796
  const toolChecks = (root, args) => runVpa(root, args).pipe(Effect.as(NO_PROBLEMS), Effect.catchIf(Schema.is(VpToolsError), (failure) => failuresOf(args, failure.kind, failure.message)));
17859
- const failWhenAny = (count) => {
17860
- if (count > NO_PROBLEMS) return Effect.fail(ProblemsFound.make({ count }));
17861
- return Effect.void;
17862
- };
17863
17797
  const writeJson = Effect.fn("writeJson")(function* writeJson(root) {
17864
17798
  const found = yield* checkAll(root);
17865
17799
  const text = yield* Schema.encodeEffect(Schema.fromJsonString(ProblemList))(sortProblems(found));
@@ -17868,7 +17802,7 @@ const writeJson = Effect.fn("writeJson")(function* writeJson(root) {
17868
17802
  const checkEverything = Effect.fn("checkEverything")(function* checkEverything(root) {
17869
17803
  const found = yield* checkAll(root);
17870
17804
  const problems = sortProblems(found);
17871
- yield* writeProblems(root, problems);
17805
+ yield* writeProblems(root)(problems);
17872
17806
  const toolFailures = yield* toolChecks(root, []);
17873
17807
  return yield* failWhenAny(problems.length + toolFailures);
17874
17808
  });