@r_masseater/msch 0.115.2 → 0.115.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import { i as nodeRepositoryFiles, n as NODE_MODULES, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-BU_wY36C.mjs";
2
+ import { i as nodeRepositoryFiles, n as NODE_MODULES$1, o as TOOL_NAME$1, r as RepositoryFiles, s as groupOf, t as MSCH_CACHE } from "./repository-files-BU_wY36C.mjs";
3
3
  import { $ as isIdentifier, A as uniqueByReference, B as getTextOfJSDocComment, C as moduleSpecifierOf, D as resolvedSymbol, E as referencedSymbols, F as SymbolFlags, G as isCallExpression, H as isArrowFunction, I as SyntaxKind, J as isEnumDeclaration, K as isClassDeclaration, L as getJSDocTags, M as IndexKind, N as InternalSymbolName, O as symbolAt, P as SignatureKind, Q as isFunctionExpression, R as getLeadingCommentRanges, S as moduleSpecifierLiteralOf, St as isVariableStatement, T as propertyNamesOf, U as isBinaryExpression, V as isArrayLiteralExpression, W as isBlock, X as isExpressionStatement, Y as isExportDeclaration, Z as isFunctionDeclaration, _ as isGenericDeclaration, _t as isTypeLiteralNode, a as problemAtPosition, at as isNumericLiteral, b as isTypeDeclaration, bt as isVariableDeclaration, c as carriesTag, ct as isPropertyAccessExpression, d as contains, dt as isSatisfiesExpression, et as isImportDeclaration, f as declarationsOf, ft as isSignatureDeclaration, g as isExternalDeclaration, gt as isTypeAliasDeclaration, h as importedModulesOf, ht as isStringLiteral, i as problemAt$6, it as isNewExpression, j as API, k as symbolAtLocation, l as childrenOf$3, lt as isPropertyAssignment, m as descendantsOf, mt as isSpreadElement, nt as isModuleBlock, o as problemInFile, ot as isObjectLiteralExpression, p as declaresAType, pt as isSourceFile, q as isElementAccessExpression, r as formatProblem, rt as isModuleDeclaration, s as sortProblems, st as isParenthesizedExpression, t as ProblemList, tt as isInterfaceDeclaration, u as columnOf, ut as isReturnStatement, v as isInsideAny, vt as isTypeReferenceNode, w as packageOf$1, x as lineOf$5, xt as isVariableDeclarationList, y as isOutsideDeclaration, yt as isUnionTypeNode, z as getNameOfDeclaration } from "./problem-DaWjnZyW.mjs";
4
4
  import { S as workspaceDependencies$1, _ as shadcnUiOf, a as workspaceConfigs, b as installedManifest, c as publicEntriesOf, d as splitFrontmatter, h as deployEntries, i as publishedWorkspaces, l as isIndexSkill, m as bundledEntries, o as entryNameOf, p as workspaceLinks, r as packedWorkspaces, s as isBinEntry, u as FRONTMATTER, x as readManifest, y as dependencyEntries } from "./published-J2q6skGp.mjs";
5
5
  import { C as keyName, D as stringsIn, E as propertyValue, S as childrenOf$4, T as nestedValues, a as workspaceManifest, b as workspaceConfigOf, c as TASK_NAMES, d as definesTask, f as hasVerifyTask, i as workspaceProjects, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as literalOf, x as KeySchema } from "./workspace-projects-DYfp6Tpn.mjs";
6
6
  import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-DUttmo2s.mjs";
7
7
  import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-W6Uy7bV8.mjs";
8
- import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-B2uz0JJc.mjs";
8
+ import { a as CI_TASKS, c as meteredCommand, f as isIgnored, h as patternOf$1, m as namedWorkspaces, n as builtTextRuleNames, o as MSCH_TASK_COMMANDS, r as secretsOf, s as MSCH_VERIFY_COMMANDS, t as TEXT_IGNORES, u as existsAt } from "./repository-text-DEyMe2S6.mjs";
9
9
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
10
10
  import { g as decisionTestRules, n as MARKDOWN_RULES, p as lint$3, t as MARKDOWN_IGNORES, x as exempt } from "./define-lint-preset-BC6R-LkX.mjs";
11
11
  import { builtinModules, isBuiltin } from "node:module";
@@ -44,7 +44,7 @@ import { Base64 } from "effect/encoding";
44
44
  import { CALLS_METRIC, mergeTallies, talliesIn, usageMetricsOf } from "@r_masseater/masseater-utils/usage-meter/report";
45
45
  // package.json
46
46
  var name = "@r_masseater/msch";
47
- var version = "0.115.2";
47
+ var version = "0.115.3";
48
48
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
49
49
  var repository = {
50
50
  "type": "git",
@@ -344,7 +344,7 @@ const annotateResources = (api) => Effect.gen(function* annotateCompiler() {
344
344
  const CONFIG_PATHSPEC$1 = `:(glob)**/tsconfig.json`;
345
345
  const HIDDEN_PREFIX$1 = ".";
346
346
  const SKIPPED_DIRECTORIES$1 = /* @__PURE__ */ new Set([
347
- NODE_MODULES,
347
+ NODE_MODULES$1,
348
348
  "dist",
349
349
  "coverage"
350
350
  ]);
@@ -457,7 +457,7 @@ const dependenciesOf = Effect.fn("dependenciesOf")(function* dependenciesOf(dire
457
457
  onNone: () => [],
458
458
  onSome: workspaceDependencies$1
459
459
  });
460
- return yield* Effect.forEach(names, (name) => files.realPath(files.join(directory, NODE_MODULES, name)), { concurrency: 1 });
460
+ return yield* Effect.forEach(names, (name) => files.realPath(files.join(directory, NODE_MODULES$1, name)), { concurrency: 1 });
461
461
  });
462
462
  const workspaceClosure = Effect.fn("workspaceClosure")(function* workspaceClosure(start) {
463
463
  const seen = /* @__PURE__ */ new Set([start]);
@@ -494,7 +494,7 @@ const installedNames$1 = Effect.fn("installedNames")(function* installedNames(mo
494
494
  });
495
495
  const installedPackages = Effect.fn("installedPackages")(function* installedPackages(root, directory) {
496
496
  const files = yield* RepositoryFiles;
497
- const modules = files.join(directory, NODE_MODULES);
497
+ const modules = files.join(directory, NODE_MODULES$1);
498
498
  const names = yield* installedNames$1(modules);
499
499
  return yield* Effect.forEach(names, (name) => files.realPath(files.join(modules, name)).pipe(Effect.map((found) => files.relative(root, found))), { concurrency: 1 });
500
500
  });
@@ -1090,12 +1090,12 @@ const scanText = Effect.fn("scanText")(function* scanText(listed, foundIn) {
1090
1090
  // src/features/check-overrides/model/git-subpath.ts
1091
1091
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
1092
1092
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
1093
- const RULE$77 = "git-subpath-dependency";
1093
+ const RULE$78 = "git-subpath-dependency";
1094
1094
  const WHOLE_MATCH$4 = 0;
1095
1095
  const problemAt$5 = ({ file }, source) => (found) => ({
1096
1096
  file,
1097
1097
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
1098
- rule: RULE$77,
1098
+ rule: RULE$78,
1099
1099
  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])}\`.`
1100
1100
  });
1101
1101
  const problemsIn$24 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
@@ -1106,13 +1106,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
1106
1106
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$24);
1107
1107
  });
1108
1108
  // src/features/check-overrides/model/restricted-rules.ts
1109
- const RULE$76 = "unnamed-restriction";
1109
+ const RULE$77 = "unnamed-restriction";
1110
1110
  const WHOLE_MATCH$3 = 0;
1111
1111
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-[a-z]+(?:-[a-z]+)*\\b`, "gu");
1112
1112
  const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
1113
1113
  file: entry.file,
1114
1114
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
1115
- rule: RULE$76,
1115
+ rule: RULE$77,
1116
1116
  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.`
1117
1117
  })));
1118
1118
  /** @internal */
@@ -1121,13 +1121,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
1121
1121
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$23);
1122
1122
  });
1123
1123
  // src/features/check-overrides/model/type-exemptions.ts
1124
- const RULE$75 = "named-type-exemption";
1124
+ const RULE$76 = "named-type-exemption";
1125
1125
  const WHOLE_MATCH$2 = 0;
1126
1126
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
1127
1127
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
1128
1128
  file: entry.file,
1129
1129
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
1130
- rule: RULE$75,
1130
+ rule: RULE$76,
1131
1131
  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."
1132
1132
  })));
1133
1133
  /** @internal */
@@ -1143,7 +1143,7 @@ const INSTALL_REGISTRY = "https://npm.flatt.tech/";
1143
1143
  const withTrailingSlash = (url) => `${String$1.replace(TRAILING_SLASH$1, "")(url)}/`;
1144
1144
  const scopeOfName = (name) => pipe(Option.liftPredicate(name, String$1.startsWith("@")), Option.flatMap((scoped) => pipe(String$1.indexOf(SCOPE_SEPARATOR)(scoped), Option.map((end) => String$1.takeLeft(scoped, end + 1)))));
1145
1145
  // src/features/check-overrides/model/package-registry.ts
1146
- const RULE$74 = "package-registry";
1146
+ const RULE$75 = "package-registry";
1147
1147
  const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
1148
1148
  const NPMRC = /(?:^|\/)\.npmrc$/u;
1149
1149
  const WORKSPACE_REGISTRY = /^registry:/mu;
@@ -1157,7 +1157,7 @@ const offsetIn$1 = (found) => pipe(Option.fromNullishOr(found), Option.map(({ in
1157
1157
  const workspaceProblem = ({ file, source }, registry) => ({
1158
1158
  file,
1159
1159
  ...positionOf(source)(offsetIn$1(WORKSPACE_REGISTRY.exec(source))),
1160
- rule: RULE$74,
1160
+ rule: RULE$75,
1161
1161
  message: Option.match(registry, {
1162
1162
  onNone: () => `${REASON$3} Set \`registry: ${INSTALL_REGISTRY}\` in ${WORKSPACE_FILE$6}.`,
1163
1163
  onSome: (value) => `${REASON$3} \`registry\` is ${value}. Set it to ${INSTALL_REGISTRY}.`
@@ -1166,7 +1166,7 @@ const workspaceProblem = ({ file, source }, registry) => ({
1166
1166
  const npmrcProblems = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(NPMRC_REGISTRY)(source)), Array$1.filter((found) => !Option.exists(groupOf("value")(found), isRequired)), Array$1.map((found) => ({
1167
1167
  file: entry.file,
1168
1168
  ...positionOf(source)(found.index ?? START$33),
1169
- rule: RULE$74,
1169
+ rule: RULE$75,
1170
1170
  message: `${REASON$3} This .npmrc overrides it with \`${String$1.trim(found[START$33])}\`. Remove the line.`
1171
1171
  })));
1172
1172
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -3351,7 +3351,7 @@ const SELF_HOMEPAGE = homepage;
3351
3351
  const SELF_DIRECTORY = repository.directory;
3352
3352
  const RENOVATE_PRESET = `github>${pipe(repository.url, String$1.replace(GIT_PREFIX, ""), String$1.replace(GIT_SUFFIX, ""), String$1.replace(GITHUB$6, ""))}//${SELF_DIRECTORY}/renovate`;
3353
3353
  // src/features/check-overrides/model/removed-peers.ts
3354
- const RULE$73 = "removed-peer";
3354
+ const RULE$74 = "removed-peer";
3355
3355
  const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
3356
3356
  const REMOVED = "-";
3357
3357
  const PARENT_SEPARATOR = ">";
@@ -3378,13 +3378,13 @@ const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
3378
3378
  file,
3379
3379
  line,
3380
3380
  column,
3381
- rule: RULE$73,
3381
+ rule: RULE$74,
3382
3382
  message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
3383
3383
  });
3384
3384
  const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
3385
3385
  const firstRemovedPeer = (peers) => (removal) => pipe(peers, Array$1.findFirst(removesPeer(removal)));
3386
3386
  const removedPeerProblems = (peers) => ({ file, source, overrides }) => pipe(overrideKeysOf(source)(removalsIn(overrides)), Array$1.flatMap((located) => pipe(removalOf$1(located.key), Option.flatMap(firstRemovedPeer(peers)), Option.map(problemAt$4(file, located)), Option.toArray)));
3387
- const requiredPeersOf = (dependent, manifest) => pipe(Record.keys(manifest.peerDependencies ?? {}), Array$1.difference(optionalPeerNames(manifest)), Array$1.map((peer) => ({
3387
+ const requiredPeersOf$1 = (dependent, manifest) => pipe(Record.keys(manifest.peerDependencies ?? {}), Array$1.difference(optionalPeerNames(manifest)), Array$1.map((peer) => ({
3388
3388
  peer,
3389
3389
  dependent
3390
3390
  })));
@@ -3394,7 +3394,7 @@ const mschPeers = Effect.fn("mschPeers")(function* mschPeers() {
3394
3394
  if (Option.isNone(own)) return [];
3395
3395
  const manifest = yield* readManifest(files.dirname(own.value));
3396
3396
  const dependencies = pipe(manifest, Option.map(({ dependencies: held }) => Record.keys(held ?? {})), Option.getOrElse(() => []));
3397
- const found = yield* Effect.forEach(dependencies, (dependency) => Effect.map(installedManifest(dependency, own.value), (installed) => pipe(installed, Option.map((held) => requiredPeersOf(dependency, held)), Option.getOrElse(() => []))), { concurrency: 1 });
3397
+ const found = yield* Effect.forEach(dependencies, (dependency) => Effect.map(installedManifest(dependency, own.value), (installed) => pipe(installed, Option.map((held) => requiredPeersOf$1(dependency, held)), Option.getOrElse(() => []))), { concurrency: 1 });
3398
3398
  return Array$1.flatten(found);
3399
3399
  });
3400
3400
  /** @internal */
@@ -3412,7 +3412,7 @@ const checkRemovedPeers = Effect.fn("checkRemovedPeers")(function* checkRemovedP
3412
3412
  });
3413
3413
  });
3414
3414
  // src/features/check-placement/model/colocated-git-patterns.ts
3415
- const RULE$72 = "colocated-git-patterns";
3415
+ const RULE$73 = "colocated-git-patterns";
3416
3416
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
3417
3417
  const ROOT$3 = ".";
3418
3418
  const NEGATION = "!";
@@ -3459,7 +3459,7 @@ const entriesIn$2 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
3459
3459
  const toEntry = entryOf$2(absolute, files.basename(file), files.dirname(file));
3460
3460
  return pipe(Option.getOrElse(text, () => ""), String$1.split("\n"), Array$1.map(toEntry), Array$1.getSomes);
3461
3461
  });
3462
- const patternProblem = (entry, message) => problemAtPosition(RULE$72)(entry.file, {
3462
+ const patternProblem = (entry, message) => problemAtPosition(RULE$73)(entry.file, {
3463
3463
  line: entry.line,
3464
3464
  column: FIRST$26
3465
3465
  }, message);
@@ -3522,7 +3522,7 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
3522
3522
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
3523
3523
  });
3524
3524
  // src/features/check-placement/model/colocated-tests.ts
3525
- const RULE$71 = "colocated-test";
3525
+ const RULE$72 = "colocated-test";
3526
3526
  const FIRST$25 = 1;
3527
3527
  const READ_CONCURRENCY$40 = 64;
3528
3528
  const ROOT_SUBPATH$2 = ".";
@@ -3545,7 +3545,7 @@ const problemFor$10 = (test, message) => ({
3545
3545
  file: test.file,
3546
3546
  line: FIRST$25,
3547
3547
  column: FIRST$25,
3548
- rule: RULE$71,
3548
+ rule: RULE$72,
3549
3549
  message: `${test.base} ${message}`
3550
3550
  });
3551
3551
  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);
@@ -3628,7 +3628,7 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
3628
3628
  // src/features/check-placement/model/agent-docs-length.ts
3629
3629
  const RECOMMENDED_LINES = 200;
3630
3630
  const FIRST$24 = 1;
3631
- const RULE$70 = "agent-docs-length";
3631
+ const RULE$71 = "agent-docs-length";
3632
3632
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
3633
3633
  const problemFor$9 = (file) => (lines) => {
3634
3634
  if (lines <= RECOMMENDED_LINES) return Option.none();
@@ -3636,14 +3636,14 @@ const problemFor$9 = (file) => (lines) => {
3636
3636
  file,
3637
3637
  line: 201,
3638
3638
  column: FIRST$24,
3639
- rule: RULE$70,
3639
+ rule: RULE$71,
3640
3640
  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.`
3641
3641
  });
3642
3642
  };
3643
3643
  /** @internal */
3644
3644
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$9(file)(lineCount(source)));
3645
3645
  // src/features/check-placement/model/claude-link.ts
3646
- const RULE$69 = "claude-md-link";
3646
+ const RULE$70 = "claude-md-link";
3647
3647
  const CLAUDE = "CLAUDE.md";
3648
3648
  const AGENTS = "AGENTS.md";
3649
3649
  const FIRST$23 = 1;
@@ -3662,7 +3662,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3662
3662
  file: path,
3663
3663
  line: FIRST$23,
3664
3664
  column: FIRST$23,
3665
- rule: RULE$69,
3665
+ rule: RULE$70,
3666
3666
  message: MESSAGE$14
3667
3667
  })));
3668
3668
  });
@@ -3671,7 +3671,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3671
3671
  return Array$1.getSomes(found);
3672
3672
  });
3673
3673
  // src/features/check-placement/model/dangling-links.ts
3674
- const RULE$68 = "dangling-link";
3674
+ const RULE$69 = "dangling-link";
3675
3675
  const SEPARATOR$25 = "/";
3676
3676
  const FIRST$22 = 1;
3677
3677
  const READ_CONCURRENCY$37 = 16;
@@ -3687,7 +3687,7 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3687
3687
  file,
3688
3688
  line: FIRST$22,
3689
3689
  column: FIRST$22,
3690
- rule: RULE$68,
3690
+ rule: RULE$69,
3691
3691
  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.`
3692
3692
  })));
3693
3693
  });
@@ -3745,7 +3745,7 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3745
3745
  }));
3746
3746
  });
3747
3747
  // src/features/check-placement/model/deployed-readme.ts
3748
- const RULE$67 = "deployed-readme";
3748
+ const RULE$68 = "deployed-readme";
3749
3749
  const ROOT_DIRECTORY$4 = "";
3750
3750
  const READ_CONCURRENCY$36 = 16;
3751
3751
  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.";
@@ -3785,14 +3785,14 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3785
3785
  const readme = yield* readReadme({
3786
3786
  root,
3787
3787
  directory,
3788
- rule: RULE$67,
3788
+ rule: RULE$68,
3789
3789
  missingMessage: MISSING_MESSAGE$2
3790
3790
  });
3791
3791
  return Result.match(readme, {
3792
3792
  onFailure: Option.some,
3793
3793
  onSuccess: ({ file, source }) => pipe(Option.liftPredicate(source, (text) => !URL_PATTERN.test(text)), Option.map(() => fileProblem$1({
3794
3794
  file,
3795
- rule: RULE$67,
3795
+ rule: RULE$68,
3796
3796
  message: NO_URL_MESSAGE
3797
3797
  })))
3798
3798
  });
@@ -3809,7 +3809,7 @@ const checkDeployedReadme = Effect.fn("checkDeployedReadme")(function* checkDepl
3809
3809
  return Array$1.getSomes(found);
3810
3810
  });
3811
3811
  // src/features/check-placement/model/nested-docs.ts
3812
- const RULE$66 = "nested-docs";
3812
+ const RULE$67 = "nested-docs";
3813
3813
  const CONFIG_FILE$9 = "vite.config.ts";
3814
3814
  const SEPARATOR$23 = "/";
3815
3815
  const READ_CONCURRENCY$35 = 64;
@@ -3822,7 +3822,7 @@ const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Sc
3822
3822
  const taggedError$13 = Schema.TaggedError;
3823
3823
  var RootConfigUnreadable = class extends taggedError$13()("RootConfigUnreadable", { file: Schema.String }) {};
3824
3824
  const isNested = (name) => String$1.includes(SEPARATOR$23)(name);
3825
- const problemFor$8 = problemInFile(RULE$66);
3825
+ const problemFor$8 = problemInFile(RULE$67);
3826
3826
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3827
3827
  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.";
3828
3828
  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.";
@@ -3879,7 +3879,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3879
3879
  return [...Array$1.getSomes(found), ...missing];
3880
3880
  });
3881
3881
  // src/features/check-placement/model/published-readme.ts
3882
- const RULE$65 = "published-readme";
3882
+ const RULE$66 = "published-readme";
3883
3883
  const READ_CONCURRENCY$34 = 16;
3884
3884
  const MESSAGE$13 = "contains Japanese. This package is published to npm, so write its README in English.";
3885
3885
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
@@ -3887,7 +3887,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3887
3887
  const readme = yield* readReadme({
3888
3888
  root,
3889
3889
  directory,
3890
- rule: RULE$65,
3890
+ rule: RULE$66,
3891
3891
  missingMessage: MISSING_MESSAGE
3892
3892
  });
3893
3893
  return Result.match(readme, {
@@ -3898,7 +3898,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3898
3898
  file,
3899
3899
  line,
3900
3900
  column,
3901
- rule: RULE$65,
3901
+ rule: RULE$66,
3902
3902
  message: MESSAGE$13
3903
3903
  };
3904
3904
  }))
@@ -3911,7 +3911,7 @@ const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPu
3911
3911
  return Array$1.getSomes(found);
3912
3912
  });
3913
3913
  // src/features/check-placement/model/published-tests.ts
3914
- const RULE$64 = "published-tests";
3914
+ const RULE$65 = "published-tests";
3915
3915
  const FILE_START = 1;
3916
3916
  const TEST_FILE$3 = /\.test\.[cm]?[jt]sx?$/u;
3917
3917
  const MESSAGE$12 = "belongs to a package published to npm that has no tests. Write tests for what the package offers before publishing it.";
@@ -3925,7 +3925,7 @@ const problemFor$7 = Effect.fn("problemFor")(function* problemFor(root, listed,
3925
3925
  file: files.join(absolute, PACKAGE_JSON_FILE),
3926
3926
  line: FILE_START,
3927
3927
  column: FILE_START,
3928
- rule: RULE$64,
3928
+ rule: RULE$65,
3929
3929
  message: MESSAGE$12
3930
3930
  });
3931
3931
  });
@@ -3939,7 +3939,7 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
3939
3939
  return Array$1.getSomes(found);
3940
3940
  });
3941
3941
  // src/features/check-placement/model/root-docs.ts
3942
- const RULE$63 = "root-docs";
3942
+ const RULE$64 = "root-docs";
3943
3943
  const SEPARATOR$22 = "/";
3944
3944
  const FIRST$20 = 1;
3945
3945
  const MARKDOWN$6 = /\.(?:md|mdx|markdown)$/iu;
@@ -3954,12 +3954,12 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3954
3954
  file: files.join(root, name),
3955
3955
  line: FIRST$20,
3956
3956
  column: FIRST$20,
3957
- rule: RULE$63,
3957
+ rule: RULE$64,
3958
3958
  message: `${name} ${MESSAGE$11}`
3959
3959
  })));
3960
3960
  });
3961
3961
  // src/features/check-placement/model/root-readme.ts
3962
- const RULE$62 = "root-readme";
3962
+ const RULE$63 = "root-readme";
3963
3963
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3964
3964
  const READ_CONCURRENCY$33 = 16;
3965
3965
  const START$31 = 0;
@@ -3975,7 +3975,7 @@ const NO_PLUGINS = {
3975
3975
  names: []
3976
3976
  };
3977
3977
  const isCheckPolicy = ({ packageName }) => Option.contains(packageName, SELF_NAME);
3978
- const messageFor$4 = (directory) => `names the workspace ${directory}. The root README, AGENTS.md and CLAUDE.md describe the repository as a whole. Write what belongs to the workspace in ${directory}/README.md, or for agents in ${directory}/AGENTS.md.`;
3978
+ const messageFor$5 = (directory) => `names the workspace ${directory}. The root README, AGENTS.md and CLAUDE.md describe the repository as a whole. Write what belongs to the workspace in ${directory}/README.md, or for agents in ${directory}/AGENTS.md.`;
3979
3979
  const pluginsOf = (plugins) => {
3980
3980
  const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate.isString), Array$1.map(String$1.replace(RELATIVE$3, "")));
3981
3981
  const segments = pipe(directories, Array$1.map(baseName$1));
@@ -3999,10 +3999,10 @@ const patternFor = (plugins) => ({ directory, names }) => patternOf$1(Option.mat
3999
3999
  onSome: () => [directory]
4000
4000
  }));
4001
4001
  const problemsIn$21 = (file, source, plugins) => (workspace) => {
4002
- const message = messageFor$4(workspace.directory);
4002
+ const message = messageFor$5(workspace.directory);
4003
4003
  const at = positionOf(source);
4004
4004
  const pattern = patternFor(plugins)(workspace);
4005
- return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$62)(file, at(found.index ?? START$31), message)));
4005
+ return pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.map((found) => problemAtPosition(RULE$63)(file, at(found.index ?? START$31), message)));
4006
4006
  };
4007
4007
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
4008
4008
  const text = yield* (yield* RepositoryFiles).readFile(file);
@@ -4039,7 +4039,7 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
4039
4039
  return Array$1.flatten(found);
4040
4040
  });
4041
4041
  // src/features/check-placement/model/docs-mirror.ts
4042
- const RULE$61 = "docs-mirror";
4042
+ const RULE$62 = "docs-mirror";
4043
4043
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
4044
4044
  const MIRROR_LIMIT = 3;
4045
4045
  const READ_CONCURRENCY$32 = 16;
@@ -4064,7 +4064,7 @@ const problemFor$6 = (file, source, mentions) => pipe(Array$1.head(mentions), Op
4064
4064
  file,
4065
4065
  line,
4066
4066
  column,
4067
- rule: RULE$61,
4067
+ rule: RULE$62,
4068
4068
  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.`
4069
4069
  };
4070
4070
  }), Option.toArray);
@@ -4096,7 +4096,7 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
4096
4096
  return Array$1.flatten(found);
4097
4097
  });
4098
4098
  // src/features/check-placement/model/ignored-sources.ts
4099
- const RULE$60 = "ignored-sources";
4099
+ const RULE$61 = "ignored-sources";
4100
4100
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
4101
4101
  const FIRST$19 = 1;
4102
4102
  const MESSAGE$10 = "is under src/ but .gitignore ignores it, so verify passes here while the file never reaches the commit. Narrow the pattern in .gitignore.";
@@ -4108,7 +4108,7 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
4108
4108
  file: files.join(root, file),
4109
4109
  line: FIRST$19,
4110
4110
  column: FIRST$19,
4111
- rule: RULE$60,
4111
+ rule: RULE$61,
4112
4112
  message: MESSAGE$10
4113
4113
  })));
4114
4114
  });
@@ -12865,13 +12865,13 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12865
12865
  return [...sliceNameProblems(root, files.join, sources), ...Array$1.flatMap(Array$1.getSomes(read), problemsOf$4)];
12866
12866
  });
12867
12867
  // src/features/check-placement/model/shadcn-ui-alias.ts
12868
- const RULE$59 = "shadcn-ui-alias";
12868
+ const RULE$60 = "shadcn-ui-alias";
12869
12869
  const FIRST$18 = 1;
12870
12870
  const problemOf$12 = (directory, { file, alias }) => ({
12871
12871
  file,
12872
12872
  line: FIRST$18,
12873
12873
  column: FIRST$18,
12874
- rule: RULE$59,
12874
+ rule: RULE$60,
12875
12875
  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/*".`
12876
12876
  });
12877
12877
  /** @internal */
@@ -13139,7 +13139,7 @@ const tsconfigMentions = Effect.fn("tsconfigMentions")(function* tsconfigMention
13139
13139
  ])));
13140
13140
  });
13141
13141
  // src/features/check-repository-layout/model/config-paths.ts
13142
- const RULE$58 = "config-path";
13142
+ const RULE$59 = "config-path";
13143
13143
  const WORKSPACE_FILE$4 = "pnpm-workspace.yaml";
13144
13144
  const CARGO_MANIFEST = /(?:^|\/)Cargo\.toml$/u;
13145
13145
  const TSCONFIG = /(?:^|\/)tsconfig(?:\.[\w-]+)?\.json$/u;
@@ -13158,7 +13158,7 @@ const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
13158
13158
  const problemOf$11 = (file, source) => (mention) => ({
13159
13159
  file,
13160
13160
  ...positionOf(source)(mention.index),
13161
- rule: RULE$58,
13161
+ rule: RULE$59,
13162
13162
  message: `${mention.field} names ${mention.text}, which does not exist in this repository. Point it at a path that exists or remove the entry.`
13163
13163
  });
13164
13164
  const mentionsIn = Effect.fn("mentionsIn")(function* mentionsIn(file, source) {
@@ -13183,7 +13183,7 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
13183
13183
  return pipe(patterns, Array$1.map((pattern) => ({
13184
13184
  file,
13185
13185
  ...positionOf(source.value)(indexOfText(source.value)(pattern)),
13186
- rule: RULE$58,
13186
+ rule: RULE$59,
13187
13187
  message: `packages lists ${pattern}, which matches no workspace package. Point it at directories that have a package.json or remove the entry.`
13188
13188
  })));
13189
13189
  });
@@ -13195,7 +13195,7 @@ const checkConfigPaths = Effect.fn("checkConfigPaths")(function* checkConfigPath
13195
13195
  return [...Array$1.flatten(found), ...patterns];
13196
13196
  });
13197
13197
  // src/features/check-repository-layout/model/crates.ts
13198
- const RULE$57 = "unverified-crate";
13198
+ const RULE$58 = "unverified-crate";
13199
13199
  const VERSION_RULE = "release-version";
13200
13200
  const APP_DIRECTORIES = ["", "src-tauri"];
13201
13201
  const CARGO_FILE$1 = "Cargo.toml";
@@ -13207,7 +13207,7 @@ const problemFor$5 = (crate, message) => ({
13207
13207
  file: crate.manifest,
13208
13208
  line: FIRST$16,
13209
13209
  column: FIRST$16,
13210
- rule: RULE$57,
13210
+ rule: RULE$58,
13211
13211
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
13212
13212
  });
13213
13213
  const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -13243,7 +13243,7 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
13243
13243
  return Array$1.getSomes(Array$1.flatten(found));
13244
13244
  });
13245
13245
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
13246
- const RULE$56 = "deploy-entry-pattern";
13246
+ const RULE$57 = "deploy-entry-pattern";
13247
13247
  const FALLOW_KEYS = [
13248
13248
  "entry",
13249
13249
  "entryPoints",
@@ -13314,7 +13314,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(request) {
13314
13314
  return pipe(Array$1.getSomes(flagged), Array$1.map(({ text: pattern, start }) => ({
13315
13315
  file: path,
13316
13316
  ...positionOf(text.value)(start - kind.offset),
13317
- rule: RULE$56,
13317
+ rule: RULE$57,
13318
13318
  message: `${pattern} ${MESSAGE$9}`
13319
13319
  })));
13320
13320
  });
@@ -13347,7 +13347,7 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
13347
13347
  return Array$1.flatten(found);
13348
13348
  });
13349
13349
  // src/features/check-repository-layout/model/fallow-entries.ts
13350
- const RULE$55 = "listed-entry";
13350
+ const RULE$56 = "listed-entry";
13351
13351
  const ENTRY_KEYS = [
13352
13352
  "entry",
13353
13353
  "entryPoints",
@@ -13377,7 +13377,7 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
13377
13377
  return pipe(entryPatternsIn(parsed.program), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
13378
13378
  file: path,
13379
13379
  ...positionOf(text.value)(start),
13380
- rule: RULE$55,
13380
+ rule: RULE$56,
13381
13381
  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.`
13382
13382
  })));
13383
13383
  });
@@ -13389,7 +13389,7 @@ const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallow
13389
13389
  return Array$1.flatten(found);
13390
13390
  });
13391
13391
  // src/features/check-repository-layout/model/root-workspace-paths.ts
13392
- const RULE$54 = "root-workspace-path";
13392
+ const RULE$55 = "root-workspace-path";
13393
13393
  const CONFIG_FILE$7 = "vite.config.ts";
13394
13394
  const PATH_CHARACTER = /[\w.@/-]/u;
13395
13395
  const NAME_CHARACTER = /[\w.@-]/u;
@@ -13408,7 +13408,7 @@ const mentions = (directory) => (text) => {
13408
13408
  const problemsIn$16 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
13409
13409
  file,
13410
13410
  ...positionOf(source)(found.start),
13411
- rule: RULE$54,
13411
+ rule: RULE$55,
13412
13412
  message: `${directory} is a workspace. The root ${CONFIG_FILE$7} holds what applies to every workspace, so move what only ${directory} needs into ${directory}/${CONFIG_FILE$7}: msch.lint, msch.devDependencies or its verify task.`
13413
13413
  })));
13414
13414
  /** @internal */
@@ -13422,7 +13422,7 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
13422
13422
  return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$16(file, source.value, directories)));
13423
13423
  });
13424
13424
  // src/features/check-repository-layout/model/hidden-verify.ts
13425
- const RULE$53 = "hidden-verify";
13425
+ const RULE$54 = "hidden-verify";
13426
13426
  const CONFIG_FILE$6 = "vite.config.ts";
13427
13427
  const FIRST$14 = 1;
13428
13428
  const READ_CONCURRENCY$25 = 8;
@@ -13436,7 +13436,7 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
13436
13436
  file,
13437
13437
  line: FIRST$14,
13438
13438
  column: FIRST$14,
13439
- rule: RULE$53,
13439
+ rule: RULE$54,
13440
13440
  message: `${directory} gets its verify task from code outside ${CONFIG_FILE$6}. The root verify reads ${CONFIG_FILE$6} without running it, so it never runs this verify. Write run.tasks.verify in ${directory}/${CONFIG_FILE$6}.`
13441
13441
  }).pipe(Option.filter(() => verified));
13442
13442
  });
@@ -13447,7 +13447,7 @@ const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVe
13447
13447
  return Array$1.getSomes(found);
13448
13448
  });
13449
13449
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
13450
- const RULE$52 = "shared-uncached-task";
13450
+ const RULE$53 = "shared-uncached-task";
13451
13451
  const READ_CONCURRENCY$24 = 8;
13452
13452
  const SHARED = 2;
13453
13453
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
@@ -13490,7 +13490,7 @@ const problemsOf$3 = (definitions) => {
13490
13490
  return pipe(definitions, Array$1.map(({ file, position, name, command }) => ({
13491
13491
  file,
13492
13492
  ...position,
13493
- rule: RULE$52,
13493
+ rule: RULE$53,
13494
13494
  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.`
13495
13495
  })));
13496
13496
  };
@@ -13501,7 +13501,7 @@ const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function*
13501
13501
  return pipe(Array$1.flatten(found), Array$1.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array$1.flatMap(problemsOf$3));
13502
13502
  });
13503
13503
  // src/features/check-repository-layout/model/tested-verify.ts
13504
- const RULE$51 = "tested-verify";
13504
+ const RULE$52 = "tested-verify";
13505
13505
  const READ_CONCURRENCY$23 = 8;
13506
13506
  const TESTS = new Set(TEST_TASK_NAMES);
13507
13507
  const RUNS_TESTS = /\b(?:vp|cargo) test\b/u;
@@ -13530,7 +13530,7 @@ const problemsIn$15 = Effect.fn("problemsIn")(function* problemsIn(root, directo
13530
13530
  return pipe(Option.toArray(config), Array$1.flatMap(({ file, source, program }) => pipe(testedEdges(runTasksIn(program)), Array$1.map(({ to, at }) => ({
13531
13531
  file,
13532
13532
  ...positionOf(source)(at.start),
13533
- rule: RULE$51,
13533
+ rule: RULE$52,
13534
13534
  message: `The verify task of ${directory} runs tests through ${to}. verify is what the pre-push hook runs, and tests run in CI through the root ci task, which runs the test and cargo-test tasks of every workspace. Move them into this workspace's test or cargo-test task, and take them out of verify.`
13535
13535
  })))));
13536
13536
  });
@@ -13541,7 +13541,7 @@ const checkTestedVerify = Effect.fn("checkTestedVerify")(function* checkTestedVe
13541
13541
  return Array$1.flatten(found);
13542
13542
  });
13543
13543
  // src/features/check-repository-layout/model/unlocked-tasks.ts
13544
- const RULE$50 = "unlocked-task";
13544
+ const RULE$51 = "unlocked-task";
13545
13545
  const READ_CONCURRENCY$22 = 8;
13546
13546
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
13547
13547
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
@@ -13553,7 +13553,7 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
13553
13553
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array$1.filter(tracksLockfiles), Array$1.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
13554
13554
  file,
13555
13555
  ...positionOf(source)(task.start),
13556
- rule: RULE$50,
13556
+ rule: RULE$51,
13557
13557
  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.`
13558
13558
  })), Option.toArray)));
13559
13559
  /** @internal */
@@ -13696,7 +13696,7 @@ const childrenOf$2 = Effect.fn("childrenOf")(function* childrenOf(directory) {
13696
13696
  });
13697
13697
  const resolveFrom = (from, name) => Effect.gen(function* resolvePackage() {
13698
13698
  const files = yield* RepositoryFiles;
13699
- const candidate = files.join(from, NODE_MODULES, name);
13699
+ const candidate = files.join(from, NODE_MODULES$1, name);
13700
13700
  if (yield* files.exists(files.join(candidate, PACKAGE_JSON_FILE))) {
13701
13701
  const real = yield* files.realPath(candidate);
13702
13702
  return Option.some(real);
@@ -13728,7 +13728,7 @@ const closureOf$2 = (provided, collect) => Array$1.match(collect.pending, {
13728
13728
  const directorySize = (directory) => Effect.gen(function* sizeOfDirectory() {
13729
13729
  const files = yield* RepositoryFiles;
13730
13730
  const names = yield* files.readDirectory(directory);
13731
- const entries = pipe(names, Array$1.filter((name) => name !== NODE_MODULES), Array$1.map((name) => files.join(directory, name)));
13731
+ const entries = pipe(names, Array$1.filter((name) => name !== NODE_MODULES$1), Array$1.map((name) => files.join(directory, name)));
13732
13732
  const sizes = yield* Effect.forEach(entries, (entry) => files.isDirectory(entry).pipe(Effect.flatMap((kind) => {
13733
13733
  if (Option.isNone(kind)) return Effect.succeed(EMPTY$3);
13734
13734
  if (kind.value) return directorySize(entry);
@@ -13869,7 +13869,7 @@ const baseRevision = Effect.fn("baseRevision")(function* baseRevision(root) {
13869
13869
  return yield* files.mergeBase(root, base);
13870
13870
  });
13871
13871
  // src/features/check-migration-order/model/migration-order.ts
13872
- const RULE$49 = "migration-order";
13872
+ const RULE$50 = "migration-order";
13873
13873
  const SNAPSHOT = "snapshot.json";
13874
13874
  const MIGRATION = "migration.sql";
13875
13875
  const SNAPSHOTS = [`*/${SNAPSHOT}`];
@@ -13903,7 +13903,7 @@ const outOfOrder = (root, base, join) => (migrations) => pipe(latestOf(migration
13903
13903
  file: join(root, file),
13904
13904
  line: FIRST$13,
13905
13905
  column: FIRST$13,
13906
- rule: RULE$49,
13906
+ rule: RULE$50,
13907
13907
  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}.`
13908
13908
  })))), Option.getOrElse(() => []));
13909
13909
  /** @internal */
@@ -13954,7 +13954,7 @@ const unresolvedFrom = (entries) => Effect.acquireUseRelease(Effect.tryPromise({
13954
13954
  catch: bundleErrorDetail
13955
13955
  }), (bundle) => Effect.promise(() => bundle.close())).pipe(Effect.map(({ output }) => unresolvedIn(pipe(output, Array$1.filter(isChunk$1)))));
13956
13956
  // src/features/check-plugin-dependencies/model/plugin-dependencies.ts
13957
- const RULE$48 = "plugin-dependencies";
13957
+ const RULE$49 = "plugin-dependencies";
13958
13958
  const PLUGIN_FILE$3 = ".claude-plugin/plugin.json";
13959
13959
  const LOCK_FILE = "bun.lock";
13960
13960
  const SOURCE_FILE$1 = /\.[cm]?[jt]sx?$/u;
@@ -13963,7 +13963,7 @@ const SUCCESS$6 = 0;
13963
13963
  const NOT_STARTED = -1;
13964
13964
  const DETAIL_LINES = 3;
13965
13965
  const PLUGIN_CONCURRENCY = 2;
13966
- const problemFor$4 = problemInFile(RULE$48);
13966
+ const problemFor$4 = problemInFile(RULE$49);
13967
13967
  const hasDependencies = Effect.fn("hasDependencies")(function* hasDependencies(directory) {
13968
13968
  const files = yield* RepositoryFiles;
13969
13969
  const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
@@ -14182,7 +14182,7 @@ const bundleScopeOf = ({ manifest, workspace }) => ({
14182
14182
  });
14183
14183
  const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(devDependencies), Option.map(Record.filter((specifier) => specifier === STACK_CATALOG)), Option.map(Record.keys), Option.getOrElse(() => []));
14184
14184
  // src/features/check-tree-shaking/model/optional-peers.ts
14185
- const RULE$47 = "optional-peer";
14185
+ const RULE$48 = "optional-peer";
14186
14186
  const REQUIRED_RULE = "required-peer";
14187
14187
  const START$27 = 0;
14188
14188
  const SINGLE$1 = 1;
@@ -14199,7 +14199,7 @@ const positionIn = (located, key, name) => {
14199
14199
  const problemFor$3 = (located, name, importers) => ({
14200
14200
  file: located.file,
14201
14201
  ...positionIn(located, DEPENDENCIES_KEY, name),
14202
- rule: RULE$47,
14202
+ rule: RULE$48,
14203
14203
  message: `${name} is imported only from ${labelsOf$1(importers)}, so installing the other entries must not require it. Move it to peerDependencies, mark it optional in peerDependenciesMeta and keep it in devDependencies.`
14204
14204
  });
14205
14205
  const requiredPeerAdvice = (fromStack) => {
@@ -14235,7 +14235,7 @@ const requiredPeerProblems = ({ located, manifest, used }) => {
14235
14235
  }));
14236
14236
  };
14237
14237
  // src/features/check-tree-shaking/model/side-effects.ts
14238
- const RULE$46 = "side-effects";
14238
+ const RULE$47 = "side-effects";
14239
14239
  const BUNDLE_CONCURRENCY$2 = 4;
14240
14240
  const START$26 = 0;
14241
14241
  const FIRST$12 = 1;
@@ -14287,11 +14287,11 @@ const keyIndex$1 = (source) => pipe(String$1.indexOf(SIDE_EFFECTS_KEY)(source),
14287
14287
  const sideEffectProblems = ({ file, source, excesses }) => pipe(excesses, Array$1.sortBy(largest), Array$1.head, Option.map((worst) => ({
14288
14288
  file,
14289
14289
  ...positionOf(source)(keyIndex$1(source)),
14290
- rule: RULE$46,
14290
+ rule: RULE$47,
14291
14291
  message: messageOf$6(worst, excesses.length)
14292
14292
  })), Option.toArray);
14293
14293
  // src/features/check-tree-shaking/model/top-level-effects.ts
14294
- const RULE$45 = "top-level-effect";
14294
+ const RULE$46 = "top-level-effect";
14295
14295
  const CODE$1 = /\.[cm]?[jt]sx?$/u;
14296
14296
  const READ_CONCURRENCY$20 = 16;
14297
14297
  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.";
@@ -14307,7 +14307,7 @@ const messageOf$5 = (statement) => {
14307
14307
  const problemsIn$14 = (api) => (file) => (source) => {
14308
14308
  const retained = api.createSourceFile(file, source);
14309
14309
  const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$6({
14310
- rule: RULE$45,
14310
+ rule: RULE$46,
14311
14311
  message: messageOf$5(statement)
14312
14312
  })(statement)));
14313
14313
  retained.dispose();
@@ -14476,7 +14476,7 @@ const checkTreeShaking = Effect.fn("checkTreeShaking")(function* checkTreeShakin
14476
14476
  return Array$1.flatten(found);
14477
14477
  });
14478
14478
  // src/features/check-typescript-generation/model/typescript-generation.ts
14479
- const RULE$44 = "legacy-typescript";
14479
+ const RULE$45 = "legacy-typescript";
14480
14480
  const LOCKFILE = "pnpm-lock.yaml";
14481
14481
  const COMPILER = "typescript";
14482
14482
  const CURRENT_MAJOR = 7;
@@ -14507,12 +14507,12 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
14507
14507
  file,
14508
14508
  line: lineOf$4(source)(legacy.id),
14509
14509
  column: FIRST$11,
14510
- rule: RULE$44,
14510
+ rule: RULE$45,
14511
14511
  message: messageOf$4(legacy, dependentsOf$1(Option.getOrElse(nodes, () => []))(legacy.id))
14512
14512
  })));
14513
14513
  });
14514
14514
  // src/features/check-worker-bundles/model/worker-bundles.ts
14515
- const RULE$43 = "worker-bundle";
14515
+ const RULE$44 = "worker-bundle";
14516
14516
  const BUNDLE_CONCURRENCY = 4;
14517
14517
  const PLATFORM_MODULES = [/^cloudflare:/u, /^node:/u];
14518
14518
  const CONDITIONS = [
@@ -14523,7 +14523,7 @@ const CONDITIONS = [
14523
14523
  "module",
14524
14524
  "default"
14525
14525
  ];
14526
- const problemFor$2 = problemInFile(RULE$43);
14526
+ const problemFor$2 = problemInFile(RULE$44);
14527
14527
  const problemOf$10 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
14528
14528
  const bundleProblem = (file) => Effect.gen(function* bundle() {
14529
14529
  const built = yield* Effect.tryPromise({
@@ -14716,7 +14716,7 @@ const weakeningsOf = (expected) => (config) => [
14716
14716
  ...secretWeakenings(config.h56m, expected.secrets)
14717
14717
  ];
14718
14718
  // src/app/disabled-rules.ts
14719
- const RULE$42 = "disabled-rule";
14719
+ const RULE$43 = "disabled-rule";
14720
14720
  const CONFIG_FILE$5 = "vite.config.ts";
14721
14721
  const START$24 = 0;
14722
14722
  const SIDE_CONFIG = /(?:^|\/)(?:\.oxlintrc(?:\.jsonc?)?|oxlint\.config\.[cm]?[jt]s|\.oxlintignore|\.eslintrc(?:\.\w+)?|eslint\.config\.[cm]?[jt]s|\.eslintignore|\.textlintrc(?:\.\w+)?|\.textlintignore|\.markdownlint(?:-cli2)?(?:\.\w+)?|\.markdownlintignore|\.prettierignore|\.oxfmtrc(?:\.jsonc?)?|knip\.jsonc?)$/u;
@@ -14730,7 +14730,7 @@ const sideConfigs = Effect.fn("sideConfigs")(function* sideConfigs(root) {
14730
14730
  const files = yield* RepositoryFiles;
14731
14731
  const listed = yield* files.listedFiles(root);
14732
14732
  const isExempt = matcher(exempt);
14733
- return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$42)(files.join(root, name), "")(START$24, SIDE_CONFIG_MESSAGE)));
14733
+ return pipe(listed, Array$1.filter((name) => SIDE_CONFIG.test(name) && !isExempt(name)), Array$1.map((name) => problemAtIndex(RULE$43)(files.join(root, name), "")(START$24, SIDE_CONFIG_MESSAGE)));
14734
14734
  });
14735
14735
  const configWeakenings = Effect.fn("configWeakenings")(function* configWeakenings(root, source) {
14736
14736
  const file = (yield* RepositoryFiles).join(root, CONFIG_FILE$5);
@@ -14742,7 +14742,7 @@ const configWeakenings = Effect.fn("configWeakenings")(function* configWeakening
14742
14742
  })
14743
14743
  });
14744
14744
  const expected = yield* expectationsIn(root);
14745
- const at = problemAtIndex(RULE$42)(file, source);
14745
+ const at = problemAtIndex(RULE$43)(file, source);
14746
14746
  return pipe(weakeningsOf(expected)(config), Array$1.map(({ anchor, message }) => at(Option.getOrElse(String$1.indexOf(anchor)(source), () => START$24), message)));
14747
14747
  });
14748
14748
  /** @internal */
@@ -14750,7 +14750,7 @@ const checkDisabledRules = Effect.fn("checkDisabledRules")(function* checkDisabl
14750
14750
  const files = yield* RepositoryFiles;
14751
14751
  const text = yield* files.readFile(files.join(root, CONFIG_FILE$5));
14752
14752
  if (Option.isNone(text)) return [];
14753
- return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$42)(file, "")(START$24, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14753
+ return [...yield* configWeakenings(root, text.value).pipe(Effect.catchTag("DisabledRulesConfigUnreadable", ({ file, reason }) => Effect.succeed([problemAtIndex(RULE$43)(file, "")(START$24, `msch could not load this file: ${reason}`)]))), ...yield* sideConfigs(root)];
14754
14754
  });
14755
14755
  // src/app/build-checks.ts
14756
14756
  /** @internal */
@@ -14846,7 +14846,7 @@ const fileFactsIn = (checker) => (sourceFiles, excluded) => pipe(sourceFiles, Ar
14846
14846
  imports: importedFilesOf(checker)(sourceFile)
14847
14847
  })), Array$1.filter((facts) => Array$1.isReadonlyArrayNonEmpty(facts.values) || Array$1.isReadonlyArrayNonEmpty(facts.imports)));
14848
14848
  // src/features/check-value-owners/model/name-lists.ts
14849
- const RULE$41 = "hand-written-names";
14849
+ const RULE$42 = "hand-written-names";
14850
14850
  const TEST_FILE$1 = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
14851
14851
  const nameListOf = (site) => {
14852
14852
  if (TEST_FILE$1.test(site.file) || site.values.length < 2) return Option.none();
@@ -14861,7 +14861,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
14861
14861
  file,
14862
14862
  line,
14863
14863
  column,
14864
- rule: RULE$41,
14864
+ rule: RULE$42,
14865
14865
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
14866
14866
  });
14867
14867
  const problemOf$9 = ({ list, reason }) => listedProblem({
@@ -15652,7 +15652,7 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
15652
15652
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
15653
15653
  }, Effect.scoped);
15654
15654
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
15655
- const RULE$40 = "namespace-destructuring";
15655
+ const RULE$41 = "namespace-destructuring";
15656
15656
  const LOCAL = /^[.#/]/u;
15657
15657
  const messageOf$3 = (name) => `Destructuring ${name}, which comes from a package, makes the bundler keep everything ${name} exports. Write ${name}.<member> where it is used.`;
15658
15658
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
@@ -15668,7 +15668,7 @@ const destructuredName = (declaration) => {
15668
15668
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
15669
15669
  };
15670
15670
  const problemOf$8 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$6({
15671
- rule: RULE$40,
15671
+ rule: RULE$41,
15672
15672
  message: messageOf$3(name)
15673
15673
  })), Option.map((report) => report(declaration)));
15674
15674
  const namespaceDestructuringIn = () => (sourceFile) => {
@@ -15676,7 +15676,7 @@ const namespaceDestructuringIn = () => (sourceFile) => {
15676
15676
  return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$8(names)), Array$1.getSomes);
15677
15677
  };
15678
15678
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
15679
- const RULE$39 = "pass-through-wrapper";
15679
+ const RULE$40 = "pass-through-wrapper";
15680
15680
  const SINGLE_STATEMENT = 1;
15681
15681
  const SINGLE_DECLARATION = 1;
15682
15682
  const THIS_PARAMETER = "this";
@@ -15773,7 +15773,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
15773
15773
  const problemOf$7 = (checker) => (candidate) => {
15774
15774
  if (changesTheCall(candidate.wrapper)) return Option.none();
15775
15775
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$6({
15776
- rule: RULE$39,
15776
+ rule: RULE$40,
15777
15777
  message: messageOf$2(forward.callee.getText())
15778
15778
  })(candidate.name)));
15779
15779
  };
@@ -15796,7 +15796,7 @@ const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigi
15796
15796
  /** @internal */
15797
15797
  const slugOf = ({ owner, name }) => `${owner}/${name}`;
15798
15798
  // src/features/check-agent-settings/model/known-plugins.ts
15799
- const RULE$38 = "known-plugins";
15799
+ const RULE$39 = "known-plugins";
15800
15800
  const SETTINGS_FILE$2 = ".claude/settings.json";
15801
15801
  const MARKETPLACE_FILE$2 = ".claude-plugin/marketplace.json";
15802
15802
  const GITHUB$5 = "github";
@@ -15817,7 +15817,7 @@ const MarketplaceSchema = Schema.Struct({
15817
15817
  plugins: Schema.Array(Schema.Struct({ name: Schema.String }))
15818
15818
  });
15819
15819
  const decodeMarketplace = Schema.decodeUnknownOption(Schema.fromJsonString(MarketplaceSchema));
15820
- const problem$5 = problemInFile(RULE$38);
15820
+ const problem$5 = problemInFile(RULE$39);
15821
15821
  const knownFrom = (repository, marketplace, settings) => pipe(Option.fromUndefinedOr(settings.extraKnownMarketplaces), Option.flatMap(Record.get(marketplace.name)), Option.exists(({ source }) => source.source === GITHUB$5 && source.repo === repository));
15822
15822
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
15823
15823
  const pluginProblems = (marketplace, file, settings) => {
@@ -15842,7 +15842,7 @@ const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlu
15842
15842
  }));
15843
15843
  });
15844
15844
  // src/features/check-agent-settings/model/missing-hooks.ts
15845
- const RULE$37 = "missing-hook";
15845
+ const RULE$38 = "missing-hook";
15846
15846
  const SETTINGS_FILE$1 = /^\.claude\/settings\.json$/u;
15847
15847
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
15848
15848
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
@@ -15867,7 +15867,7 @@ const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
15867
15867
  return pipe(missing, Array$1.map(({ path, index }) => ({
15868
15868
  file,
15869
15869
  ...positionOf(source)(index),
15870
- rule: RULE$37,
15870
+ rule: RULE$38,
15871
15871
  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.`
15872
15872
  })));
15873
15873
  });
@@ -15920,7 +15920,7 @@ const listedTasks = Effect.fn("listedTasks")(function* listedTasks(root) {
15920
15920
  }, Effect.scoped, Effect.orElseSucceed(() => Option.none()));
15921
15921
  const GivenTaskGraph = Context.Reference("msch/GivenTaskGraph", { defaultValue: () => Option.none() });
15922
15922
  // src/features/check-documented-commands/model/commands.ts
15923
- const RULE$36 = "documented-commands";
15923
+ const RULE$37 = "documented-commands";
15924
15924
  const DOCUMENTS = ["*AGENTS.md", "*CLAUDE.md"];
15925
15925
  const DOCUMENT_NAMES = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
15926
15926
  const COMMAND = /`vp run (?<args>[^`]+)`/gu;
@@ -15998,7 +15998,7 @@ const isMissing = (graph, file) => ({ task, scope }) => !pipe(packagesOf(graph,
15998
15998
  const problemsIn$12 = (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 }) => ({
15999
15999
  file: absolute(file),
16000
16000
  ...positionOf(text)(match.index ?? START$22),
16001
- rule: RULE$36,
16001
+ rule: RULE$37,
16002
16002
  message: `${match[START$22]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
16003
16003
  })), Option.toArray)));
16004
16004
  const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$12), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
@@ -16023,14 +16023,14 @@ const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* c
16023
16023
  file: absolute(Array$1.headNonEmpty(commanded).file),
16024
16024
  line: ONE$2,
16025
16025
  column: ONE$2,
16026
- rule: RULE$36,
16026
+ rule: RULE$37,
16027
16027
  message: "msch could not list the tasks with `vp run --json`"
16028
16028
  }],
16029
16029
  onSome: (found) => pipe(commanded, Array$1.flatMap((document) => problemsIn$12(found, absolute, document)))
16030
16030
  });
16031
16031
  });
16032
16032
  // src/features/check-legacy-web/model/legacy-web.ts
16033
- const RULE$35 = "legacy-web";
16033
+ const RULE$36 = "legacy-web";
16034
16034
  const FIRST_COLUMN$7 = 1;
16035
16035
  const SCANNER = fileURLToPath(new URL("./skills/modern-web-guidance/modern-web.mjs", import.meta.resolve("modern-web-guidance/package.json")));
16036
16036
  const Finding = Schema.Struct({
@@ -16069,7 +16069,7 @@ const checkLegacyWeb = Effect.fn("checkLegacyWeb")(function* checkLegacyWeb(root
16069
16069
  file: files.join(root, file),
16070
16070
  line,
16071
16071
  column: FIRST_COLUMN$7,
16072
- rule: RULE$35,
16072
+ rule: RULE$36,
16073
16073
  message: `${ruleId}: ${message} Read the guide with \`modern-web-guidance retrieve ${guideId}\` and apply it.`
16074
16074
  });
16075
16075
  return pipe(scan.guides, Array$1.flatMap(({ guideId, rules }) => pipe(rules, Array$1.flatMap(({ ruleId, findings }) => pipe(findings, Array$1.map(problemOf(guideId, ruleId)))))));
@@ -16140,7 +16140,7 @@ const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|
16140
16140
  const EXTENSION$1 = /\.[^./]+$/u;
16141
16141
  const SETTINGS_FILE = ".claude/settings.json";
16142
16142
  const READ_CONCURRENCY$18 = 64;
16143
- const RULE$34 = "shell-script";
16143
+ const RULE$35 = "shell-script";
16144
16144
  const MESSAGE$8 = "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.";
16145
16145
  const HookSchema = Schema.Struct({
16146
16146
  command: Schema.optional(Schema.String),
@@ -16173,7 +16173,7 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
16173
16173
  };
16174
16174
  const candidates = pipe(names, Array$1.filter((name) => !isSessionStartHook(name)));
16175
16175
  const shell = yield* Effect.filter(candidates, isShell, { concurrency: READ_CONCURRENCY$18 });
16176
- return pipe(shell, Array$1.map((name) => problemInFile(RULE$34)(files.join(root, name), MESSAGE$8)));
16176
+ return pipe(shell, Array$1.map((name) => problemInFile(RULE$35)(files.join(root, name), MESSAGE$8)));
16177
16177
  });
16178
16178
  // src/features/check-structure/model/structure.ts
16179
16179
  const checkStructure = checkSection({
@@ -16411,7 +16411,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
16411
16411
  return Array$1.flatten(found);
16412
16412
  });
16413
16413
  // src/features/check-vite-plus/model/package-scripts.ts
16414
- const RULE$33 = "package-script";
16414
+ const RULE$34 = "package-script";
16415
16415
  const LIFECYCLE = [
16416
16416
  "preinstall",
16417
16417
  "install",
@@ -16434,12 +16434,12 @@ const LIFECYCLE = [
16434
16434
  const problemOf$6 = ({ file, position, name }) => ({
16435
16435
  file,
16436
16436
  ...position,
16437
- rule: RULE$33,
16437
+ rule: RULE$34,
16438
16438
  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.`
16439
16439
  });
16440
16440
  const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$6));
16441
16441
  // src/features/check-vite-plus/model/vite-plus-block.ts
16442
- const RULE$32 = "vite-plus-block";
16442
+ const RULE$33 = "vite-plus-block";
16443
16443
  const MARKER$1 = Array$1.join([
16444
16444
  "<!--",
16445
16445
  "VITE PLUS START",
@@ -16452,7 +16452,7 @@ const problemIn = (file) => (source) => {
16452
16452
  return Option.some({
16453
16453
  file,
16454
16454
  ...positionOf(source)(index.value),
16455
- rule: RULE$32,
16455
+ rule: RULE$33,
16456
16456
  message: MESSAGE$7
16457
16457
  });
16458
16458
  };
@@ -16485,7 +16485,7 @@ const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
16485
16485
  return pipe(drifts, Array$1.map(problemOf$5));
16486
16486
  });
16487
16487
  // src/features/check-workflows/model/release-please.ts
16488
- const RULE$31 = "release-please";
16488
+ const RULE$32 = "release-please";
16489
16489
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
16490
16490
  const FIRST$8 = 1;
16491
16491
  const MESSAGE$6 = "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.";
@@ -16497,7 +16497,7 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
16497
16497
  file: files.join(root, name),
16498
16498
  line: FIRST$8,
16499
16499
  column: FIRST$8,
16500
- rule: RULE$31,
16500
+ rule: RULE$32,
16501
16501
  message: MESSAGE$6
16502
16502
  })));
16503
16503
  });
@@ -16785,7 +16785,7 @@ const scannedFiles = Effect.fn("scannedFiles")(function* scannedFiles(root) {
16785
16785
  })), Array$1.filter(({ file }) => !HashSet.has(skipped, file)));
16786
16786
  });
16787
16787
  // src/features/ban-comments/model/comments.ts
16788
- const RULE$30 = "comment";
16788
+ const RULE$31 = "comment";
16789
16789
  const SUPPRESSION_RULE = "suppression";
16790
16790
  const UNUSED_RULE = "unused-comment-allowance";
16791
16791
  const CONFIG_FILE$3 = "vite.config.ts";
@@ -16817,7 +16817,7 @@ const NOTHING = {
16817
16817
  used: []
16818
16818
  };
16819
16819
  const unusedMessage = (entry) => `allows the comment pattern \`${entry}\`, but no comment in the repository matches it. Delete the entry and add it back when a comment needs it.`;
16820
- const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$30)(file, source)(comment.index, MESSAGE$5)));
16820
+ const problemOf$4 = (file, source) => (comment) => Match.value(isSuppression(comment)).pipe(Match.when(true, () => problemAtIndex(SUPPRESSION_RULE)(file, source)(comment.index, SUPPRESSION_MESSAGE)), Match.orElse(() => problemAtIndex(RULE$31)(file, source)(comment.index, MESSAGE$5)));
16821
16821
  const settingsOf = ({ msch }) => ({ allow: pipe(Option.fromUndefinedOr(msch), Option.flatMap(({ comments }) => Option.fromUndefinedOr(comments)), Option.match({
16822
16822
  onNone: () => NO_SETTINGS.allow,
16823
16823
  onSome: ({ allow }) => allow
@@ -16854,7 +16854,7 @@ const scanFile = ({ directives, allowances, comments }) => ({ name, file }, sour
16854
16854
  problems: pipe(found, Array$1.filter(kept), Array$1.map(toProblem)),
16855
16855
  used: usedAllowances(allowances, found)
16856
16856
  })), Effect.catchTag("CommentsUnreadable", ({ message }) => Effect.succeed({
16857
- problems: [problemAtIndex(RULE$30)(file, source)(START$18, `msch could not read the comments in this file: ${message}`)],
16857
+ problems: [problemAtIndex(RULE$31)(file, source)(START$18, `msch could not read the comments in this file: ${message}`)],
16858
16858
  used: []
16859
16859
  })))
16860
16860
  });
@@ -16967,7 +16967,7 @@ const PYTHON = {
16967
16967
  /** @internal */
16968
16968
  const checkPython = (root) => checkBannedTool(root, PYTHON);
16969
16969
  // src/features/check-catalog-entries/model/uncataloged-dependencies.ts
16970
- const RULE$29 = "uncataloged-dependency";
16970
+ const RULE$30 = "uncataloged-dependency";
16971
16971
  const OWNED_ELSEWHERE = [
16972
16972
  "catalog:",
16973
16973
  "workspace:",
@@ -16981,7 +16981,7 @@ const isOwnedElsewhere = ({ specifier }) => pipe(OWNED_ELSEWHERE, Array$1.some((
16981
16981
  const problemsIn$11 = (entry, source) => pipe(manifestSpecifiers(source), Array$1.filter((found) => !isOwnedElsewhere(found)), Array$1.map((found) => ({
16982
16982
  file: entry.file,
16983
16983
  ...positionOf(source)(offsetIn(source)(manifestPattern(found))),
16984
- rule: RULE$29,
16984
+ rule: RULE$30,
16985
16985
  message: `\`${found.name}\` \`${found.specifier}\` ${MESSAGE$4}`
16986
16986
  })));
16987
16987
  /** @internal */
@@ -17002,7 +17002,7 @@ const uncatalogedDependencies = Effect.fn("uncatalogedDependencies")(function* u
17002
17002
  const WORKSPACE_FILE$3 = "pnpm-workspace.yaml";
17003
17003
  const FIRST_LINE$5 = 1;
17004
17004
  const FIRST_COLUMN$5 = 1;
17005
- const RULE$28 = "prune-setting-off";
17005
+ const RULE$29 = "prune-setting-off";
17006
17006
  const PRUNE_SETTINGS = [["catalogPrune", "removes catalog entries no package refers to, so the catalog holds only versions in use."], ["minimumReleaseAgeExcludePrune", "removes `minimumReleaseAgeExclude` entries the lockfile no longer resolves, which only exempted that one version while it was new."]];
17007
17007
  const decodeTrue = Schema.decodeUnknownOption(Schema.Literal(true));
17008
17008
  const lineOf$3 = (source) => (setting) => pipe(String$1.split(source, "\n"), Array$1.findFirstIndex(String$1.startsWith(`${setting}:`)), Option.match({
@@ -17016,7 +17016,7 @@ const pruneProblems = Effect.fn("pruneProblems")(function* pruneProblems(file, s
17016
17016
  file,
17017
17017
  line: at(setting),
17018
17018
  column: FIRST_COLUMN$5,
17019
- rule: RULE$28,
17019
+ rule: RULE$29,
17020
17020
  message: `Set \`${setting}: true\`. It ${effect}`
17021
17021
  })));
17022
17022
  });
@@ -17110,13 +17110,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
17110
17110
  ];
17111
17111
  });
17112
17112
  // src/features/check-skills/model/published-skills.ts
17113
- const RULE$27 = "published-skills";
17113
+ const RULE$28 = "published-skills";
17114
17114
  const KEYWORD = "tanstack-intent";
17115
17115
  const SKILLS = "skills";
17116
17116
  const SKILL_FILE$3 = "SKILL.md";
17117
17117
  const SUCCEEDED = 0;
17118
17118
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
17119
- const problemAt$2 = problemInFile(RULE$27);
17119
+ const problemAt$2 = problemInFile(RULE$28);
17120
17120
  const skillDirectoriesIn = (files, directory) => pipe(findSkillFiles(files.join(directory, SKILLS)), Array$1.filter((file) => files.basename(file) === SKILL_FILE$3), Array$1.map((file) => files.relative(directory, files.dirname(file))));
17121
17121
  const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
17122
17122
  const packagingMessages = ({ keywords, files }, skills) => {
@@ -17153,7 +17153,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
17153
17153
  return Array$1.flatten(problems);
17154
17154
  });
17155
17155
  // src/features/check-skills/model/skill-files.ts
17156
- const RULE$26 = "skill-file";
17156
+ const RULE$27 = "skill-file";
17157
17157
  const SKILL_FILE$2 = /(?:^|\/)SKILL\.md$/u;
17158
17158
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
17159
17159
  const FIXTURE$1 = /(?:^|\/)fixtures\//u;
@@ -17210,7 +17210,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
17210
17210
  ]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
17211
17211
  file: skill.file,
17212
17212
  ...positionOf(skill.source)(index),
17213
- rule: RULE$26,
17213
+ rule: RULE$27,
17214
17214
  message
17215
17215
  })));
17216
17216
  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) => ({
@@ -17237,7 +17237,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
17237
17237
  return pipe(missing, Array$1.map(({ target, index }) => ({
17238
17238
  file,
17239
17239
  ...positionOf(source)(index),
17240
- rule: RULE$26,
17240
+ rule: RULE$27,
17241
17241
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
17242
17242
  })));
17243
17243
  });
@@ -17253,7 +17253,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17253
17253
  file: files.join(root, entry),
17254
17254
  line: FIRST$7,
17255
17255
  column: FIRST$7,
17256
- rule: RULE$26,
17256
+ rule: RULE$27,
17257
17257
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
17258
17258
  })));
17259
17259
  return [
@@ -17331,7 +17331,7 @@ const cargoEntries = (text) => {
17331
17331
  };
17332
17332
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
17333
17333
  // src/features/check-version-downgrades/model/version-downgrade.ts
17334
- const RULE$25 = "version-downgrade";
17334
+ const RULE$26 = "version-downgrade";
17335
17335
  const READ_CONCURRENCY$14 = 16;
17336
17336
  const READERS = [
17337
17337
  [/(?:^|\/)package\.json$/u, manifestEntries],
@@ -17356,7 +17356,7 @@ const downgradesIn = ({ file, text, before, after }) => {
17356
17356
  file,
17357
17357
  line: lineOf$2(text, entry),
17358
17358
  column: FIRST_LINE$4,
17359
- rule: RULE$25,
17359
+ rule: RULE$26,
17360
17360
  message: message$1(old, entry)
17361
17361
  })), Option.toArray)));
17362
17362
  };
@@ -17439,7 +17439,7 @@ const manifestTexts = Effect.fn("manifestTexts")(function* manifestTexts(root) {
17439
17439
  return Array$1.getSomes(read);
17440
17440
  });
17441
17441
  // src/features/check-version-downgrades/model/package-versions.ts
17442
- const RULE$24 = "unbumped-package";
17442
+ const RULE$25 = "unbumped-package";
17443
17443
  const UNSHIPPED = /(?:\.test\.[\w.]+$|(?:^|\/)(?:fixtures|__tests__|tests?)\/|(?:^|\/)(?:AGENTS|CLAUDE|CHANGELOG)\.md$)/u;
17444
17444
  const UNVERSIONED$5 = "0.0.0";
17445
17445
  const FIRST_LINE$3 = 1;
@@ -17514,7 +17514,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17514
17514
  file: files.join(root, pack.file),
17515
17515
  line: versionLine(pack.text),
17516
17516
  column: FIRST_COLUMN$4,
17517
- rule: RULE$24,
17517
+ rule: RULE$25,
17518
17518
  message: message(pack, part, lowest)
17519
17519
  })), Option.toArray);
17520
17520
  }), { concurrency: READ_CONCURRENCY$11 });
@@ -17523,7 +17523,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17523
17523
  // src/features/find-unneeded-files/model/applied-packages.ts
17524
17524
  const SCOPE$1 = Option.getOrElse(scopeOfName(SELF_NAME), () => SELF_NAME);
17525
17525
  const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
17526
- const RULE$23 = "applied-package";
17526
+ const RULE$24 = "applied-package";
17527
17527
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
17528
17528
  const NOT_FOUND$3 = -1;
17529
17529
  const SEPARATOR$9 = "/";
@@ -17559,7 +17559,7 @@ const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
17559
17559
  const problemAt$1 = (file, source) => (index, name) => ({
17560
17560
  file,
17561
17561
  ...positionOf(source)(index),
17562
- rule: RULE$23,
17562
+ rule: RULE$24,
17563
17563
  message: `msch applies ${name}. Remove this use and let msch apply it.`
17564
17564
  });
17565
17565
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped$1(name)}(?=["'\`/])`, "gu");
@@ -17614,7 +17614,7 @@ const checkAppliedPackages = Effect.fn("checkAppliedPackages")(function* checkAp
17614
17614
  return yield* appliedPackageProblems(root, applied);
17615
17615
  });
17616
17616
  // src/features/find-unneeded-files/model/replaced-tools.ts
17617
- const RULE$22 = "replaced-tool";
17617
+ const RULE$23 = "replaced-tool";
17618
17618
  const FIRST$6 = 1;
17619
17619
  const TASKS = "Vite+ tasks in run.tasks of vite.config.ts, run with `vp run`";
17620
17620
  const HOOKS = "the hooks in .vite-hooks/ that `vp config` installs";
@@ -17695,7 +17695,7 @@ const problemFor$1 = ({ name, file }) => pipe(REPLACED, Array$1.findFirst(({ pat
17695
17695
  file,
17696
17696
  line: FIRST$6,
17697
17697
  column: FIRST$6,
17698
- rule: RULE$22,
17698
+ rule: RULE$23,
17699
17699
  message: `belongs to ${tool}, which this repository replaced with ${replacement}. Move what is still needed there and delete this file.`
17700
17700
  })));
17701
17701
  /** @internal */
@@ -17834,7 +17834,7 @@ const checkUnneededFiles = Effect.fn("checkUnneededFiles")(function* checkUnneed
17834
17834
  return yield* unneededIn(root, cargoEnabled(workspace.value));
17835
17835
  });
17836
17836
  // src/features/check-markdown-directives/model/directives.ts
17837
- const RULE$21 = "markdown-directive";
17837
+ const RULE$22 = "markdown-directive";
17838
17838
  const START$13 = 0;
17839
17839
  const SECOND = 1;
17840
17840
  const ODD = 1;
@@ -17859,7 +17859,7 @@ const problemsIn$7 = (file, source) => {
17859
17859
  const { line, column } = positionOf(source)(index);
17860
17860
  return pipe(Array$1.get(fenced, line - SECOND), Option.getOrElse(() => false)) || pipe(Array$1.get(lines, line - SECOND), Option.map(String$1.slice(START$13, column - SECOND)), Option.exists(insideCodeSpan));
17861
17861
  };
17862
- return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$13)), Array$1.map((match) => problemAtIndex(RULE$21)(file, source)(match.index ?? START$13, MESSAGE$3)));
17862
+ return pipe(Array$1.fromIterable(String$1.matchAll(DISABLE)(source)), Array$1.filter((match) => !isCode(match.index ?? START$13)), Array$1.map((match) => problemAtIndex(RULE$22)(file, source)(match.index ?? START$13, MESSAGE$3)));
17863
17863
  };
17864
17864
  const isChecked$1 = (name) => String$1.endsWith(MARKDOWN$4)(name) && !pipe(SKIPPED_DIRECTORIES, Array$1.some((directory) => String$1.includes(directory)(`/${name}`))) && !pipe(SKIPPED_FILES, Array$1.some((skipped) => name === skipped || String$1.endsWith(`/${skipped}`)(name)));
17865
17865
  /** @internal */
@@ -17872,7 +17872,7 @@ const checkMarkdownDirectives = Effect.fn("checkMarkdownDirectives")(function* c
17872
17872
  }))), ({ file }, source) => problemsIn$7(file, source));
17873
17873
  });
17874
17874
  // src/features/check-owner-markers/model/owner-markers.ts
17875
- const RULE$20 = "owner-decision-removed";
17875
+ const RULE$21 = "owner-decision-removed";
17876
17876
  const MARKER = /\(owner, \d{4}-\d{2}-\d{2}\)/gu;
17877
17877
  const TRAILER = /^Owner-Decision-(?:Moved|Revoked):[ \t]*\S/mu;
17878
17878
  const READ_CONCURRENCY$10 = 16;
@@ -17912,10 +17912,10 @@ const checkOwnerMarkers = Effect.fn("checkOwnerMarkers")(function* checkOwnerMar
17912
17912
  if (Option.isNone(base)) return [];
17913
17913
  const removals = yield* removalsSince(root, base.value);
17914
17914
  if (!Array$1.isReadonlyArrayNonEmpty(removals) || (yield* hasTrailer(root, base.value))) return [];
17915
- return pipe(removals, Array$1.map((removal) => problemInFile(RULE$20)(removal.file, messageOf$1(removal))));
17915
+ return pipe(removals, Array$1.map((removal) => problemInFile(RULE$21)(removal.file, messageOf$1(removal))));
17916
17916
  });
17917
17917
  // src/features/check-owner-names/model/owner-names.ts
17918
- const RULE$19 = "owner-name";
17918
+ const RULE$20 = "owner-name";
17919
17919
  const TEXT_FILE$1 = /\.(?:[cm]?[jt]sx?|jsonc?|md|ya?ml|toml)$/u;
17920
17920
  const REGEX_SPECIAL = /[.*+?^${}()|[\]\\/]/gu;
17921
17921
  const SEPARATOR$7 = "/";
@@ -17928,7 +17928,7 @@ const DECLARED = [
17928
17928
  const CONFIG_FILE$1 = "vite.config.ts";
17929
17929
  const ANY_OWNER = /\banyOwner:\s*true\b/u;
17930
17930
  const escaped = (text) => String$1.replaceAll(REGEX_SPECIAL, String.raw`\$&`)(text);
17931
- const messageFor$3 = (owner) => `names ${owner}, the owner of this repository, but msch.publish.anyOwner says this package works for any owner. Derive the value from the repository it runs in: its package.json, its git remote or its files. A package of an allowed scope is named in full, as @scope/name.`;
17931
+ const messageFor$4 = (owner) => `names ${owner}, the owner of this repository, but msch.publish.anyOwner says this package works for any owner. Derive the value from the repository it runs in: its package.json, its git remote or its files. A package of an allowed scope is named in full, as @scope/name.`;
17932
17932
  const spansOf = (pattern, source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.flatMap((match) => {
17933
17933
  const [token] = match;
17934
17934
  return pipe(Option.fromUndefinedOr(match.index), Option.map((start) => ({
@@ -17957,8 +17957,8 @@ const manifestProblems$3 = ({ owner, file, manifest }) => pipe(ownerOffsets({
17957
17957
  }), Array$1.head, Option.toArray, Array$1.map(() => ({
17958
17958
  file,
17959
17959
  ...positionOf("")(START$12),
17960
- rule: RULE$19,
17961
- message: `Its description or keywords ${messageFor$3(owner)}`
17960
+ rule: RULE$20,
17961
+ message: `Its description or keywords ${messageFor$4(owner)}`
17962
17962
  })));
17963
17963
  const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProblems(root, owner, directory) {
17964
17964
  const files = yield* RepositoryFiles;
@@ -17978,8 +17978,8 @@ const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProb
17978
17978
  }), Array$1.map((offset) => ({
17979
17979
  file,
17980
17980
  ...positionOf(source)(offset),
17981
- rule: RULE$19,
17982
- message: messageFor$3(owner)
17981
+ rule: RULE$20,
17982
+ message: messageFor$4(owner)
17983
17983
  }))));
17984
17984
  return [...manifestProblems$3({
17985
17985
  owner,
@@ -18011,14 +18011,14 @@ const START$11 = 0;
18011
18011
  const HEX = 16;
18012
18012
  const CODE_POINT_WIDTH = 4;
18013
18013
  const READ_CONCURRENCY$9 = 64;
18014
- const RULE$18 = "hidden-unicode";
18014
+ const RULE$19 = "hidden-unicode";
18015
18015
  const hexOf = (character) => pipe(String$1.codePointAt(START$11)(character), Option.getOrElse(() => START$11), (code) => code.toString(HEX), String$1.toUpperCase, String$1.padStart(CODE_POINT_WIDTH, "0"));
18016
18016
  const problemOf$3 = (file, source) => (found) => {
18017
18017
  const hex = hexOf(found[START$11]);
18018
18018
  return {
18019
18019
  file,
18020
18020
  ...positionOf(source)(found.index ?? START$11),
18021
- rule: RULE$18,
18021
+ rule: RULE$19,
18022
18022
  message: `U+${hex} is invisible in editors and reviews and can change what the text means. Remove it, or write it as the escape \\u${hex}.`
18023
18023
  };
18024
18024
  };
@@ -18051,7 +18051,7 @@ const checkDocuments = Effect.fn("checkDocuments")(function* checkDocuments(root
18051
18051
  return Array$1.flatten(found);
18052
18052
  });
18053
18053
  // src/features/check-effect-diagnostics/model/effect-diagnostics.ts
18054
- const RULE$17 = "effect-diagnostics-once";
18054
+ const RULE$18 = "effect-diagnostics-once";
18055
18055
  const PLUGIN = "@effect/language-service";
18056
18056
  const CONFIG_PATHSPEC = ":(glob)**/tsconfig*.json";
18057
18057
  const EXCLUDED$4 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
@@ -18069,7 +18069,7 @@ const reportsDiagnostics = (plugin) => plugin.name === PLUGIN && plugin.diagnost
18069
18069
  const problemsIn$5 = (entry, source) => pipe(decodeConfig(source), Option.flatMap(({ compilerOptions }) => Option.fromUndefinedOr(compilerOptions)), Option.flatMap(({ plugins }) => Option.fromUndefinedOr(plugins)), Option.filter(Array$1.some(reportsDiagnostics)), Option.map(() => ({
18070
18070
  file: entry.file,
18071
18071
  ...positionOf(source)(pipe(String$1.indexOf(`"${PLUGIN}"`)(source), Option.getOrElse(() => START$10))),
18072
- rule: RULE$17,
18072
+ rule: RULE$18,
18073
18073
  message: MESSAGE$2
18074
18074
  })), Option.toArray);
18075
18075
  /** @internal */
@@ -18082,7 +18082,7 @@ const checkEffectDiagnostics = Effect.fn("checkEffectDiagnostics")(function* che
18082
18082
  }))), problemsIn$5);
18083
18083
  });
18084
18084
  // src/features/check-exact-versions/model/exact-versions.ts
18085
- const RULE$16 = "version-range";
18085
+ const RULE$17 = "version-range";
18086
18086
  const WORKSPACE_FILE = "pnpm-workspace.yaml";
18087
18087
  const ALIAS = /^npm:(?:@[^/@]+\/)?[^@]+@(?<version>.+)$/u;
18088
18088
  const PROTOCOL = /^[a-z+]+:/u;
@@ -18098,7 +18098,7 @@ const isRange = (specifier) => {
18098
18098
  const problemsFor = (file, source, pattern) => (found) => pipe(found, Array$1.filter(({ specifier }) => isRange(specifier)), Array$1.map((range) => ({
18099
18099
  file,
18100
18100
  ...positionOf(source)(offsetIn(source)(pattern(range))),
18101
- rule: RULE$16,
18101
+ rule: RULE$17,
18102
18102
  message: `\`${range.name}\` \`${range.specifier}\` ${MESSAGE$1}`
18103
18103
  })));
18104
18104
  const catalogPattern = ({ name }) => new RegExp(`^\\s+["']?${quoted$1(name)}["']?:`, "mu");
@@ -18127,7 +18127,7 @@ const checkExactVersions = Effect.fn("checkExactVersions")(function* checkExactV
18127
18127
  return [...fromManifests, ...fromCatalogs];
18128
18128
  });
18129
18129
  // src/features/check-pack-settings/model/pack-settings.ts
18130
- const RULE$15 = "pack-publint";
18130
+ const RULE$16 = "pack-publint";
18131
18131
  const CONFIG_FILE = "vite.config.ts";
18132
18132
  const PACK_KEY = "pack:";
18133
18133
  const START$9 = 0;
@@ -18143,7 +18143,7 @@ const runsStrictPublint = (config) => pipe(decodePackConfig(config), Option.flat
18143
18143
  const problemFor = (file, source) => ({
18144
18144
  file,
18145
18145
  ...positionOf(source)(Option.getOrElse(String$1.indexOf(PACK_KEY)(source), () => START$9)),
18146
- rule: RULE$15,
18146
+ rule: RULE$16,
18147
18147
  message: "This package is published, so its pack must run publint with `publint: { strict: true }`. Without it, publishConfig can point at files vp pack never writes, and the published package fails to import."
18148
18148
  });
18149
18149
  const strictPublintIn = Effect.fn("strictPublintIn")(function* strictPublintIn(configFile) {
@@ -18172,11 +18172,89 @@ const checkPackSettings = Effect.fn("checkPackSettings")(function* checkPackSett
18172
18172
  const found = yield* Effect.forEach(manifests, (name) => problemsIn$4(root, name), { concurrency: READ_CONCURRENCY$8 });
18173
18173
  return Array$1.flatten(found);
18174
18174
  });
18175
+ // src/features/check-published-manifest/model/private-dependency.ts
18176
+ const RULE$15 = "private-workspace-dependency";
18177
+ const START$8 = 0;
18178
+ const listedIn = (manifest) => pipe(RUNTIME_SECTIONS, Array$1.flatMap((section) => pipe(Option.fromUndefinedOr(manifest[section]), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.map((name) => ({
18179
+ section,
18180
+ name
18181
+ })))));
18182
+ const messageFor$3 = ({ section, name }) => `lists the private workspace package "${name}" in ${section}. A private package is never on npm, so pnpm refuses to pack this package and an install could not resolve it. Move "${name}" to devDependencies so that vp pack bundles it.`;
18183
+ /** @internal */
18184
+ const quotedNameIndex = (source) => (name) => pipe(String$1.indexOf(`"${name}"`)(source), Option.getOrElse(() => START$8));
18185
+ /** @internal */
18186
+ const privateDependencyProblems = (privateNames) => (found) => pipe(listedIn(found.manifest), Array$1.filter(({ name }) => privateNames.has(name)), Array$1.map((listed) => problemAtIndex(RULE$15)(found.entry.file, found.source)(quotedNameIndex(found.source)(listed.name), messageFor$3(listed))));
18187
+ // src/features/check-published-manifest/model/dependency-peer-floor.ts
18188
+ const RULE$14 = "dependency-peer-floor";
18189
+ const NODE_MODULES = "node_modules";
18190
+ const namesOf$1 = (section) => pipe(Option.fromUndefinedOr(section), Option.map(Record.keys), Option.getOrElse(() => []));
18191
+ const isOptional = (manifest, peer) => pipe(Option.fromUndefinedOr(manifest.peerDependenciesMeta), Option.flatMap(Record.get(peer)), Option.exists((meta) => meta.optional === true));
18192
+ const requiredPeersOf = (manifest) => pipe(Option.fromUndefinedOr(manifest.peerDependencies), Option.getOrElse(() => ({})), Record.filter((_range, peer) => !isOptional(manifest, peer)));
18193
+ const firstManifest = Effect.fn("firstManifest")(function* firstManifest(directories) {
18194
+ const files = yield* RepositoryFiles;
18195
+ const texts = yield* Effect.forEach(directories, (directory) => files.readFile(files.join(directory, PACKAGE_JSON_FILE)), { concurrency: 1 });
18196
+ return pipe(Array$1.getSomes(texts), Array$1.head, Option.flatMap(decodePackageJson));
18197
+ });
18198
+ const nearDirectories = Effect.fn("nearDirectories")(function* nearDirectories(listedDirectory, listed, name) {
18199
+ const files = yield* RepositoryFiles;
18200
+ const real = yield* files.realPath(listedDirectory);
18201
+ const up = pipe(String$1.split(listed, "/"), Array$1.map(() => ".."));
18202
+ const store = files.resolve(real, ...up);
18203
+ return [files.join(real, NODE_MODULES, name), files.join(store, name)];
18204
+ });
18205
+ const requirementsFrom = (manifest, listed, via) => pipe(manifest, Option.map(requiredPeersOf), Option.map(Record.toEntries), Option.getOrElse(() => []), Array$1.map(([peer, needs]) => ({
18206
+ listed,
18207
+ via,
18208
+ peer,
18209
+ needs
18210
+ })));
18211
+ const transitiveRequirements = Effect.fn("transitiveRequirements")(function* transitive(directory, listed, skipped) {
18212
+ const listedDirectory = (yield* RepositoryFiles).join(directory, NODE_MODULES, listed);
18213
+ const manifest = yield* firstManifest([listedDirectory]);
18214
+ const peers = pipe(manifest, Option.map(requiredPeersOf), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.filter((peer) => !skipped.has(peer)));
18215
+ const nested = yield* Effect.forEach(peers, (peer) => nearDirectories(listedDirectory, listed, peer).pipe(Effect.flatMap(firstManifest), Effect.map((found) => requirementsFrom(found, listed, Option.some(peer)))), { concurrency: 1 });
18216
+ return {
18217
+ manifest,
18218
+ nested: Array$1.flatten(nested)
18219
+ };
18220
+ });
18221
+ const requirementsOf = Effect.fn("requirementsOf")(function* requirementsOf(found) {
18222
+ const directory = (yield* RepositoryFiles).dirname(found.entry.file);
18223
+ const dependencies = namesOf$1(found.manifest.dependencies);
18224
+ const peers = namesOf$1(found.manifest.peerDependencies);
18225
+ const skipped = /* @__PURE__ */ new Set([...dependencies, ...peers]);
18226
+ const direct = (name, manifest) => requirementsFrom(pipe(manifest, Option.filter(() => Array$1.contains(dependencies, name))), name, Option.none());
18227
+ const listed = yield* Effect.forEach([...dependencies, ...peers], (name) => transitiveRequirements(directory, name, skipped).pipe(Effect.map(({ manifest, nested }) => [...direct(name, manifest), ...nested])), { concurrency: 1 });
18228
+ return [found.entry.file, Array$1.flatten(listed)];
18229
+ });
18230
+ /** @internal */
18231
+ const installedPeersOf = Effect.fn("installedPeersOf")(function* installedPeersOf(found) {
18232
+ const entries = yield* Effect.forEach(found, requirementsOf, { concurrency: 4 });
18233
+ return new Map(entries);
18234
+ });
18235
+ const acceptsFloor = (needs, accepts) => pipe(Option.fromNullishOr(semver.minVersion(accepts)), Option.match({
18236
+ onNone: () => true,
18237
+ onSome: (floor) => semver.validRange(needs) === null || semver.satisfies(floor, needs)
18238
+ }));
18239
+ const mismatchOf = (own) => (requirement) => pipe(Record.get(own, requirement.peer), Option.filter((accepts) => !acceptsFloor(requirement.needs, accepts)), Option.map((accepts) => ({
18240
+ ...requirement,
18241
+ accepts
18242
+ })), Option.toArray);
18243
+ const messageFor$2 = ({ listed, via, peer, needs, accepts }) => Option.match(via, {
18244
+ onNone: () => `lists "${listed}" in dependencies, and it needs ${peer}@${needs} while this package accepts ${peer}@${accepts}. A consumer on an older ${peer} gets a newer "${listed}" nested under this package, where the packages that import it cannot reach it. Move "${listed}" to peerDependencies with the range this package gives ${peer} and keep it in devDependencies.`,
18245
+ onSome: (required) => `lists "${listed}", which needs the peer "${required}", and "${required}" needs ${peer}@${needs} while this package accepts ${peer}@${accepts}. npm installs the newest "${required}" for a consumer on an older ${peer} and fails to resolve the tree. Add "${required}" to peerDependencies with the range this package gives ${peer} and keep it in devDependencies.`
18246
+ });
18247
+ const ownPeers = ({ manifest }) => requiredPeersOf(manifest);
18248
+ /** @internal */
18249
+ const dependencyPeerFloorProblems = (installed) => (found) => {
18250
+ const mismatches = mismatchOf(ownPeers(found));
18251
+ return pipe(Option.fromUndefinedOr(installed.get(found.entry.file)), Option.getOrElse(() => []), Array$1.flatMap(mismatches), Array$1.map((mismatch) => problemAtIndex(RULE$14)(found.entry.file, found.source)(quotedNameIndex(found.source)(mismatch.listed), messageFor$2(mismatch))));
18252
+ };
18175
18253
  // src/features/check-published-manifest/model/package-homepage.ts
18176
- const RULE$14 = "package-homepage";
18254
+ const RULE$13 = "package-homepage";
18177
18255
  const BRANCH = "main";
18178
18256
  const ROOT_DIRECTORY$1 = ".";
18179
- const START$8 = 0;
18257
+ const START$7 = 0;
18180
18258
  const KEYS = [
18181
18259
  "\"homepage\"",
18182
18260
  "\"repository\"",
@@ -18202,56 +18280,53 @@ const messagesOf = (manifest, directory) => pipe(decodeRepository$1(manifest.rep
18202
18280
  onNone: () => [repositoryMissing(directory)],
18203
18281
  onSome: repositoryMessages(manifest, directory)
18204
18282
  }));
18205
- const firstKeyIndex = (source) => pipe(KEYS, Array$1.findFirst((key) => String$1.includes(key)(source)), Option.flatMap((key) => String$1.indexOf(key)(source)), Option.getOrElse(() => START$8));
18283
+ const firstKeyIndex = (source) => pipe(KEYS, Array$1.findFirst((key) => String$1.includes(key)(source)), Option.flatMap((key) => String$1.indexOf(key)(source)), Option.getOrElse(() => START$7));
18206
18284
  /** @internal */
18207
- const homepageProblems = (dirname) => ({ entry, source, manifest }) => pipe(Option.some(dirname(entry.name)), Option.filter((directory) => directory !== ROOT_DIRECTORY$1), Option.map((directory) => messagesOf(manifest, directory)), Option.getOrElse(() => []), Array$1.map((message) => problemAtIndex(RULE$14)(entry.file, source)(firstKeyIndex(source), message)));
18285
+ const homepageProblems = (dirname) => ({ entry, source, manifest }) => pipe(Option.some(dirname(entry.name)), Option.filter((directory) => directory !== ROOT_DIRECTORY$1), Option.map((directory) => messagesOf(manifest, directory)), Option.getOrElse(() => []), Array$1.map((message) => problemAtIndex(RULE$13)(entry.file, source)(firstKeyIndex(source), message)));
18208
18286
  // src/features/check-published-manifest/model/package-scope.ts
18209
- const RULE$13 = "package-scope";
18287
+ const RULE$12 = "package-scope";
18210
18288
  const NAME_KEY = "\"name\"";
18211
- const START$7 = 0;
18289
+ const START$6 = 0;
18212
18290
  const unscopedName = (scope) => ({ manifest }) => pipe(Option.fromUndefinedOr(manifest.name), Option.filter((name) => !String$1.startsWith(scope)(name)));
18213
- const nameIndex = (source) => pipe(String$1.indexOf(NAME_KEY)(source), Option.getOrElse(() => START$7));
18291
+ const nameIndex = (source) => pipe(String$1.indexOf(NAME_KEY)(source), Option.getOrElse(() => START$6));
18214
18292
  const BY_COUNT = Order.mapInput(Order.Number, ([, names]) => names.length);
18215
18293
  /** @internal */
18216
18294
  const sharedScope = (names) => pipe(names, Array$1.flatMap((name) => Option.toArray(scopeOfName(name))), Array$1.groupBy((scope) => scope), Record.toEntries, Array$1.sortBy(Order.mapInput(Order.String, ([scope]) => scope)), Array$1.match({
18217
18295
  onEmpty: () => Option.none(),
18218
- onNonEmpty: (groups) => Option.some(Array$1.max(BY_COUNT)(groups)[START$7])
18296
+ onNonEmpty: (groups) => Option.some(Array$1.max(BY_COUNT)(groups)[START$6])
18219
18297
  }));
18220
- const messageFor$2 = (scope, name) => `Most packages of this repository are published under the ${scope} scope, and one scope tells whose packages they are. Rename "${name}" to "${scope}${String$1.replace(/^@[^/]+\//u, "")(name)}".`;
18221
- /** @internal */
18222
- const scopeProblems = (scope) => (found) => pipe(unscopedName(scope)(found), Option.map((name) => problemAtIndex(RULE$13)(found.entry.file, found.source)(nameIndex(found.source), messageFor$2(scope, name))), Option.toArray);
18223
- // src/features/check-published-manifest/model/private-dependency.ts
18224
- const RULE$12 = "private-workspace-dependency";
18225
- const START$6 = 0;
18226
- const listedIn = (manifest) => pipe(RUNTIME_SECTIONS, Array$1.flatMap((section) => pipe(Option.fromUndefinedOr(manifest[section]), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.map((name) => ({
18227
- section,
18228
- name
18229
- })))));
18230
- const messageFor$1 = ({ section, name }) => `lists the private workspace package "${name}" in ${section}. A private package is never on npm, so pnpm refuses to pack this package and an install could not resolve it. Move "${name}" to devDependencies so that vp pack bundles it.`;
18231
- const indexOf = (source, name) => pipe(String$1.indexOf(`"${name}"`)(source), Option.getOrElse(() => START$6));
18298
+ const messageFor$1 = (scope, name) => `Most packages of this repository are published under the ${scope} scope, and one scope tells whose packages they are. Rename "${name}" to "${scope}${String$1.replace(/^@[^/]+\//u, "")(name)}".`;
18232
18299
  /** @internal */
18233
- const privateDependencyProblems = (privateNames) => (found) => pipe(listedIn(found.manifest), Array$1.filter(({ name }) => privateNames.has(name)), Array$1.map((listed) => problemAtIndex(RULE$12)(found.entry.file, found.source)(indexOf(found.source, listed.name), messageFor$1(listed))));
18300
+ const scopeProblems = (scope) => (found) => pipe(unscopedName(scope)(found), Option.map((name) => problemAtIndex(RULE$12)(found.entry.file, found.source)(nameIndex(found.source), messageFor$1(scope, name))), Option.toArray);
18234
18301
  // src/features/check-published-manifest/model/published-manifests.ts
18235
18302
  const privateNamesIn = Effect.fn("privateNamesIn")(function* privateNamesIn(root) {
18236
18303
  const manifests = yield* manifestTexts(root);
18237
18304
  return new Set(pipe(manifests, Array$1.flatMap(({ text }) => pipe(decodePackageJson(text), Option.filter((manifest) => manifest.private === true), Option.flatMap((manifest) => Option.fromUndefinedOr(manifest.name)), Option.toArray))));
18238
18305
  });
18306
+ const publishedIn = Effect.fn("publishedIn")(function* publishedIn(root) {
18307
+ const published = [];
18308
+ yield* scanPublishedManifests(root, (found) => {
18309
+ published.push(found);
18310
+ return [];
18311
+ });
18312
+ return published;
18313
+ });
18239
18314
  /** @internal */
18240
18315
  const checkPublishedManifests = Effect.fn("checkPublishedManifests")(function* checkPublishedManifests(root) {
18241
18316
  const files = yield* RepositoryFiles;
18242
18317
  const homepage = homepageProblems(files.dirname);
18243
18318
  const privateNames = yield* privateNamesIn(root);
18244
18319
  const privateDependencies = privateDependencyProblems(privateNames);
18245
- const names = [];
18246
- yield* scanPublishedManifests(root, ({ manifest }) => {
18247
- names.push(...Option.toArray(Option.fromUndefinedOr(manifest.name)));
18248
- return [];
18249
- });
18320
+ const published = yield* publishedIn(root);
18321
+ const installed = yield* installedPeersOf(published);
18322
+ const peerFloor = dependencyPeerFloorProblems(installed);
18323
+ const names = pipe(published, Array$1.flatMap(({ manifest }) => Option.toArray(Option.fromUndefinedOr(manifest.name))));
18250
18324
  const scoped = pipe(sharedScope(names), Option.map(scopeProblems), Option.getOrElse(() => () => []));
18251
18325
  return yield* scanPublishedManifests(root, (found) => [
18252
18326
  ...scoped(found),
18253
18327
  ...homepage(found),
18254
- ...privateDependencies(found)
18328
+ ...privateDependencies(found),
18329
+ ...peerFloor(found)
18255
18330
  ]);
18256
18331
  });
18257
18332
  // src/features/check-runtime-version/model/node-version.ts