@r_masseater/msch 0.115.2 → 0.115.4

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,12 @@
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
- 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";
4
+ import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-CgIp-gS1.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
+ import { _ as shadcnUiOf, a as workspaceConfigs, 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 } from "./published-BITU3twH.mjs";
7
8
  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";
9
+ 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
10
  import { t as startedOnce } from "./started-once-muJbvD_I.mjs";
10
11
  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
12
  import { builtinModules, isBuiltin } from "node:module";
@@ -44,7 +45,7 @@ import { Base64 } from "effect/encoding";
44
45
  import { CALLS_METRIC, mergeTallies, talliesIn, usageMetricsOf } from "@r_masseater/masseater-utils/usage-meter/report";
45
46
  // package.json
46
47
  var name = "@r_masseater/msch";
47
- var version = "0.115.2";
48
+ var version = "0.115.4";
48
49
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
49
50
  var repository = {
50
51
  "type": "git",
@@ -344,7 +345,7 @@ const annotateResources = (api) => Effect.gen(function* annotateCompiler() {
344
345
  const CONFIG_PATHSPEC$1 = `:(glob)**/tsconfig.json`;
345
346
  const HIDDEN_PREFIX$1 = ".";
346
347
  const SKIPPED_DIRECTORIES$1 = /* @__PURE__ */ new Set([
347
- NODE_MODULES,
348
+ NODE_MODULES$1,
348
349
  "dist",
349
350
  "coverage"
350
351
  ]);
@@ -457,7 +458,7 @@ const dependenciesOf = Effect.fn("dependenciesOf")(function* dependenciesOf(dire
457
458
  onNone: () => [],
458
459
  onSome: workspaceDependencies$1
459
460
  });
460
- return yield* Effect.forEach(names, (name) => files.realPath(files.join(directory, NODE_MODULES, name)), { concurrency: 1 });
461
+ return yield* Effect.forEach(names, (name) => files.realPath(files.join(directory, NODE_MODULES$1, name)), { concurrency: 1 });
461
462
  });
462
463
  const workspaceClosure = Effect.fn("workspaceClosure")(function* workspaceClosure(start) {
463
464
  const seen = /* @__PURE__ */ new Set([start]);
@@ -494,7 +495,7 @@ const installedNames$1 = Effect.fn("installedNames")(function* installedNames(mo
494
495
  });
495
496
  const installedPackages = Effect.fn("installedPackages")(function* installedPackages(root, directory) {
496
497
  const files = yield* RepositoryFiles;
497
- const modules = files.join(directory, NODE_MODULES);
498
+ const modules = files.join(directory, NODE_MODULES$1);
498
499
  const names = yield* installedNames$1(modules);
499
500
  return yield* Effect.forEach(names, (name) => files.realPath(files.join(modules, name)).pipe(Effect.map((found) => files.relative(root, found))), { concurrency: 1 });
500
501
  });
@@ -1090,12 +1091,12 @@ const scanText = Effect.fn("scanText")(function* scanText(listed, foundIn) {
1090
1091
  // src/features/check-overrides/model/git-subpath.ts
1091
1092
  const DEPENDENCY_FILE = /(?:^|\/)(?:package\.json|pnpm-workspace\.ya?ml)$/u;
1092
1093
  const GIT_SUBPATH = /(?<![^\s"':])[^\s"'#]+#(?:[^\s"'&]*&)*path:[^\s"']*/gu;
1093
- const RULE$77 = "git-subpath-dependency";
1094
+ const RULE$78 = "git-subpath-dependency";
1094
1095
  const WHOLE_MATCH$4 = 0;
1095
1096
  const problemAt$5 = ({ file }, source) => (found) => ({
1096
1097
  file,
1097
1098
  ...positionOf(source)(found.index ?? WHOLE_MATCH$4),
1098
- rule: RULE$77,
1099
+ rule: RULE$78,
1099
1100
  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
1101
  });
1101
1102
  const problemsIn$24 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(GIT_SUBPATH)(source)), Array$1.map(problemAt$5(entry, source)));
@@ -1106,13 +1107,13 @@ const checkGitSubpath = Effect.fn("checkGitSubpath")(function* checkGitSubpath(r
1106
1107
  return yield* scanText(pipe(listed, Array$1.filter(isDependencyFile)), problemsIn$24);
1107
1108
  });
1108
1109
  // src/features/check-overrides/model/restricted-rules.ts
1109
- const RULE$76 = "unnamed-restriction";
1110
+ const RULE$77 = "unnamed-restriction";
1110
1111
  const WHOLE_MATCH$3 = 0;
1111
1112
  const UNNAMED = new RegExp(`(?:[\\w@-]+/)?no-restricted-[a-z]+(?:-[a-z]+)*\\b`, "gu");
1112
1113
  const problemsIn$23 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(UNNAMED)(source)), Array$1.map((found) => ({
1113
1114
  file: entry.file,
1114
1115
  ...positionOf(source)(found.index ?? WHOLE_MATCH$3),
1115
- rule: RULE$76,
1116
+ rule: RULE$77,
1116
1117
  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
1118
  })));
1118
1119
  /** @internal */
@@ -1121,13 +1122,13 @@ const checkRestrictedRules = Effect.fn("checkRestrictedRules")(function* checkRe
1121
1122
  return yield* scanText(pipe(listed, Array$1.filter(isScannedText)), problemsIn$23);
1122
1123
  });
1123
1124
  // src/features/check-overrides/model/type-exemptions.ts
1124
- const RULE$75 = "named-type-exemption";
1125
+ const RULE$76 = "named-type-exemption";
1125
1126
  const WHOLE_MATCH$2 = 0;
1126
1127
  const SPECIFIER = new RegExp(`["']?\\bfrom["']?\\s*:\\s*["'](?:file|lib|package)["']`, "gu");
1127
1128
  const problemsIn$22 = (entry, source) => pipe(Array$1.fromIterable(String$1.matchAll(SPECIFIER)(source)), Array$1.map((found) => ({
1128
1129
  file: entry.file,
1129
1130
  ...positionOf(source)(found.index ?? WHOLE_MATCH$2),
1130
- rule: RULE$75,
1131
+ rule: RULE$76,
1131
1132
  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
1133
  })));
1133
1134
  /** @internal */
@@ -1143,7 +1144,7 @@ const INSTALL_REGISTRY = "https://npm.flatt.tech/";
1143
1144
  const withTrailingSlash = (url) => `${String$1.replace(TRAILING_SLASH$1, "")(url)}/`;
1144
1145
  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
1146
  // src/features/check-overrides/model/package-registry.ts
1146
- const RULE$74 = "package-registry";
1147
+ const RULE$75 = "package-registry";
1147
1148
  const WORKSPACE_FILE$6 = "pnpm-workspace.yaml";
1148
1149
  const NPMRC = /(?:^|\/)\.npmrc$/u;
1149
1150
  const WORKSPACE_REGISTRY = /^registry:/mu;
@@ -1157,7 +1158,7 @@ const offsetIn$1 = (found) => pipe(Option.fromNullishOr(found), Option.map(({ in
1157
1158
  const workspaceProblem = ({ file, source }, registry) => ({
1158
1159
  file,
1159
1160
  ...positionOf(source)(offsetIn$1(WORKSPACE_REGISTRY.exec(source))),
1160
- rule: RULE$74,
1161
+ rule: RULE$75,
1161
1162
  message: Option.match(registry, {
1162
1163
  onNone: () => `${REASON$3} Set \`registry: ${INSTALL_REGISTRY}\` in ${WORKSPACE_FILE$6}.`,
1163
1164
  onSome: (value) => `${REASON$3} \`registry\` is ${value}. Set it to ${INSTALL_REGISTRY}.`
@@ -1166,7 +1167,7 @@ const workspaceProblem = ({ file, source }, registry) => ({
1166
1167
  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
1168
  file: entry.file,
1168
1169
  ...positionOf(source)(found.index ?? START$33),
1169
- rule: RULE$74,
1170
+ rule: RULE$75,
1170
1171
  message: `${REASON$3} This .npmrc overrides it with \`${String$1.trim(found[START$33])}\`. Remove the line.`
1171
1172
  })));
1172
1173
  const checkWorkspace = Effect.fn("checkWorkspace")(function* checkWorkspace(root) {
@@ -1191,6 +1192,119 @@ const checkPackageRegistry = Effect.fn("checkPackageRegistry")(function* checkPa
1191
1192
  });
1192
1193
  // src/entities/package/model/stack-catalog.ts
1193
1194
  const STACK_CATALOG = "catalog:stack";
1195
+ // src/entities/package/model/specifiers.ts
1196
+ const START$32 = 0;
1197
+ const FieldsSchema = Schema.Record(Schema.String, Schema.Unknown);
1198
+ const decodeFields$1 = Schema.decodeUnknownOption(FieldsSchema);
1199
+ const decodeString$1 = Schema.decodeUnknownOption(Schema.String);
1200
+ /** @internal */
1201
+ const fieldsOf = (value) => Option.getOrElse(decodeFields$1(value), () => ({}));
1202
+ /** @internal */
1203
+ const namedCatalogsOf = (settings) => Record.toEntries(fieldsOf(settings["catalogs"]));
1204
+ /** @internal */
1205
+ const specifiedIn = (held) => pipe(fieldsOf(held), Record.toEntries, Array$1.flatMap(([name, value]) => pipe(decodeString$1(value), Option.map((specifier) => ({
1206
+ name,
1207
+ specifier
1208
+ })), Option.toArray)));
1209
+ /** @internal */
1210
+ const quoted$1 = (text) => String$1.replaceAll(/[$()*+.?[\\\]^{|}]/gu, String.raw`\$&`)(text);
1211
+ /** @internal */
1212
+ const manifestPattern = ({ name, specifier }) => new RegExp(`"${quoted$1(name)}"\\s*:\\s*"${quoted$1(specifier)}"`, "u");
1213
+ /** @internal */
1214
+ const offsetIn = (source) => (pattern) => pipe(Option.fromNullishOr(pattern.exec(source)), Option.map(({ index }) => index), Option.getOrElse(() => START$32));
1215
+ const SECTIONS$1 = [
1216
+ "dependencies",
1217
+ "devDependencies",
1218
+ "optionalDependencies"
1219
+ ];
1220
+ /** @internal */
1221
+ const manifestSpecifiers = (source) => pipe(decodePackageJson(source), Option.map((manifest) => pipe(SECTIONS$1, Array$1.flatMap((section) => specifiedIn(manifest[section])))), Option.getOrElse(() => []));
1222
+ // src/entities/package/model/published-manifest.ts
1223
+ const EXCLUDED$9 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
1224
+ const isPublished$1 = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
1225
+ const publishedManifestOf = (source) => pipe(source, Option.flatMap(decodePackageJson), Option.filter(isPublished$1));
1226
+ /** @internal */
1227
+ const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* scanPublishedManifests(root, problemsIn) {
1228
+ const files = yield* RepositoryFiles;
1229
+ const manifests = yield* files.matchingFiles(root, [`:(glob)**/${PACKAGE_JSON_FILE}`, ...EXCLUDED$9]);
1230
+ return yield* scanText(pipe(manifests, Array$1.map((name) => ({
1231
+ name,
1232
+ file: files.join(root, name)
1233
+ }))), (entry, source) => pipe(publishedManifestOf(Option.some(source)), Option.map((manifest) => problemsIn({
1234
+ entry,
1235
+ source,
1236
+ manifest
1237
+ })), Option.getOrElse(() => [])));
1238
+ });
1239
+ // src/shared/config/self.ts
1240
+ const GIT_PREFIX = /^git\+/u;
1241
+ const GIT_SUFFIX = /\.git$/u;
1242
+ const GITHUB$6 = "https://github.com/";
1243
+ const SELF_NAME = name;
1244
+ const SELF_HOMEPAGE = homepage;
1245
+ const SELF_DIRECTORY = repository.directory;
1246
+ 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`;
1247
+ // src/features/check-overrides/model/removed-peers.ts
1248
+ const RULE$74 = "removed-peer";
1249
+ const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
1250
+ const REMOVED = "-";
1251
+ const PARENT_SEPARATOR = ">";
1252
+ const VERSION_SEPARATOR = "@";
1253
+ const SCOPED_START = 1;
1254
+ const packageNameOf$1 = (selector) => pipe(String$1.indexOf(VERSION_SEPARATOR)(String$1.slice(SCOPED_START)(selector)), Option.match({
1255
+ onNone: () => selector,
1256
+ onSome: (index) => String$1.takeLeft(selector, index + SCOPED_START)
1257
+ }));
1258
+ const removalOf$1 = (key) => Array$1.matchRight(String$1.split(key, PARENT_SEPARATOR), {
1259
+ onEmpty: () => Option.none(),
1260
+ onNonEmpty: (parents, target) => Option.some({
1261
+ key,
1262
+ target: packageNameOf$1(target),
1263
+ parent: pipe(Array$1.last(parents), Option.map(packageNameOf$1))
1264
+ })
1265
+ });
1266
+ const removesPeer = ({ target, parent }) => ({ peer, dependent }) => peer === target && Option.match(parent, {
1267
+ onNone: () => true,
1268
+ onSome: (name) => name === dependent
1269
+ });
1270
+ const isRemoval = (value) => value === REMOVED;
1271
+ const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
1272
+ file,
1273
+ line,
1274
+ column,
1275
+ rule: RULE$74,
1276
+ message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
1277
+ });
1278
+ const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
1279
+ const firstRemovedPeer = (peers) => (removal) => pipe(peers, Array$1.findFirst(removesPeer(removal)));
1280
+ 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)));
1281
+ const requiredPeersOf$1 = (dependent, manifest) => pipe(Record.keys(manifest.peerDependencies ?? {}), Array$1.difference(optionalPeerNames(manifest)), Array$1.map((peer) => ({
1282
+ peer,
1283
+ dependent
1284
+ })));
1285
+ const mschPeers = Effect.fn("mschPeers")(function* mschPeers() {
1286
+ const files = yield* RepositoryFiles;
1287
+ const own = findPackageJson(SELF_NAME, import.meta.url);
1288
+ if (Option.isNone(own)) return [];
1289
+ const manifest = yield* readManifest(files.dirname(own.value));
1290
+ const dependencies = pipe(manifest, Option.map(({ dependencies: held }) => Record.keys(held ?? {})), Option.getOrElse(() => []));
1291
+ 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 });
1292
+ return Array$1.flatten(found);
1293
+ });
1294
+ /** @internal */
1295
+ const checkRemovedPeers = Effect.fn("checkRemovedPeers")(function* checkRemovedPeers(root) {
1296
+ const files = yield* RepositoryFiles;
1297
+ const overrides = yield* workspaceOverrides(root);
1298
+ if (!pipe(Record.values(overrides), Array$1.some(isRemoval))) return [];
1299
+ const file = files.join(root, WORKSPACE_FILE$5);
1300
+ const source = yield* files.readFile(file);
1301
+ const peers = yield* mschPeers();
1302
+ return removedPeerProblems(peers)({
1303
+ file,
1304
+ source: Option.getOrElse(source, () => ""),
1305
+ overrides
1306
+ });
1307
+ });
1194
1308
  // ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
1195
1309
  const balanced = (a, b, str) => {
1196
1310
  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
@@ -3298,121 +3412,8 @@ const matcher = (patterns) => {
3298
3412
  };
3299
3413
  String$1.startsWith(NEGATION$1);
3300
3414
  String$1.slice(1);
3301
- // src/entities/package/model/specifiers.ts
3302
- const START$32 = 0;
3303
- const FieldsSchema = Schema.Record(Schema.String, Schema.Unknown);
3304
- const decodeFields$1 = Schema.decodeUnknownOption(FieldsSchema);
3305
- const decodeString$1 = Schema.decodeUnknownOption(Schema.String);
3306
- /** @internal */
3307
- const fieldsOf = (value) => Option.getOrElse(decodeFields$1(value), () => ({}));
3308
- /** @internal */
3309
- const namedCatalogsOf = (settings) => Record.toEntries(fieldsOf(settings["catalogs"]));
3310
- /** @internal */
3311
- const specifiedIn = (held) => pipe(fieldsOf(held), Record.toEntries, Array$1.flatMap(([name, value]) => pipe(decodeString$1(value), Option.map((specifier) => ({
3312
- name,
3313
- specifier
3314
- })), Option.toArray)));
3315
- /** @internal */
3316
- const quoted$1 = (text) => String$1.replaceAll(/[$()*+.?[\\\]^{|}]/gu, String.raw`\$&`)(text);
3317
- /** @internal */
3318
- const manifestPattern = ({ name, specifier }) => new RegExp(`"${quoted$1(name)}"\\s*:\\s*"${quoted$1(specifier)}"`, "u");
3319
- /** @internal */
3320
- const offsetIn = (source) => (pattern) => pipe(Option.fromNullishOr(pattern.exec(source)), Option.map(({ index }) => index), Option.getOrElse(() => START$32));
3321
- const SECTIONS$1 = [
3322
- "dependencies",
3323
- "devDependencies",
3324
- "optionalDependencies"
3325
- ];
3326
- /** @internal */
3327
- const manifestSpecifiers = (source) => pipe(decodePackageJson(source), Option.map((manifest) => pipe(SECTIONS$1, Array$1.flatMap((section) => specifiedIn(manifest[section])))), Option.getOrElse(() => []));
3328
- // src/entities/package/model/published-manifest.ts
3329
- const EXCLUDED$9 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
3330
- const isPublished$1 = (manifest) => manifest.private !== true && Predicate.isNotUndefined(manifest.publishConfig);
3331
- const publishedManifestOf = (source) => pipe(source, Option.flatMap(decodePackageJson), Option.filter(isPublished$1));
3332
- /** @internal */
3333
- const scanPublishedManifests = Effect.fn("scanPublishedManifests")(function* scanPublishedManifests(root, problemsIn) {
3334
- const files = yield* RepositoryFiles;
3335
- const manifests = yield* files.matchingFiles(root, [`:(glob)**/${PACKAGE_JSON_FILE}`, ...EXCLUDED$9]);
3336
- return yield* scanText(pipe(manifests, Array$1.map((name) => ({
3337
- name,
3338
- file: files.join(root, name)
3339
- }))), (entry, source) => pipe(publishedManifestOf(Option.some(source)), Option.map((manifest) => problemsIn({
3340
- entry,
3341
- source,
3342
- manifest
3343
- })), Option.getOrElse(() => [])));
3344
- });
3345
- // src/shared/config/self.ts
3346
- const GIT_PREFIX = /^git\+/u;
3347
- const GIT_SUFFIX = /\.git$/u;
3348
- const GITHUB$6 = "https://github.com/";
3349
- const SELF_NAME = name;
3350
- const SELF_HOMEPAGE = homepage;
3351
- const SELF_DIRECTORY = repository.directory;
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
- // src/features/check-overrides/model/removed-peers.ts
3354
- const RULE$73 = "removed-peer";
3355
- const WORKSPACE_FILE$5 = "pnpm-workspace.yaml";
3356
- const REMOVED = "-";
3357
- const PARENT_SEPARATOR = ">";
3358
- const VERSION_SEPARATOR = "@";
3359
- const SCOPED_START = 1;
3360
- const packageNameOf$1 = (selector) => pipe(String$1.indexOf(VERSION_SEPARATOR)(String$1.slice(SCOPED_START)(selector)), Option.match({
3361
- onNone: () => selector,
3362
- onSome: (index) => String$1.takeLeft(selector, index + SCOPED_START)
3363
- }));
3364
- const removalOf$1 = (key) => Array$1.matchRight(String$1.split(key, PARENT_SEPARATOR), {
3365
- onEmpty: () => Option.none(),
3366
- onNonEmpty: (parents, target) => Option.some({
3367
- key,
3368
- target: packageNameOf$1(target),
3369
- parent: pipe(Array$1.last(parents), Option.map(packageNameOf$1))
3370
- })
3371
- });
3372
- const removesPeer = ({ target, parent }) => ({ peer, dependent }) => peer === target && Option.match(parent, {
3373
- onNone: () => true,
3374
- onSome: (name) => name === dependent
3375
- });
3376
- const isRemoval = (value) => value === REMOVED;
3377
- const problemAt$4 = (file, { key, line, column }) => ({ peer, dependent }) => ({
3378
- file,
3379
- line,
3380
- column,
3381
- rule: RULE$73,
3382
- message: `msch runs ${dependent}, which needs ${peer} as a peer, so removing ${peer} with the override ${key} breaks msch. Remove the override.`
3383
- });
3384
- const removalsIn = (overrides) => pipe(overrides, Record.filter(isRemoval));
3385
- const firstRemovedPeer = (peers) => (removal) => pipe(peers, Array$1.findFirst(removesPeer(removal)));
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) => ({
3388
- peer,
3389
- dependent
3390
- })));
3391
- const mschPeers = Effect.fn("mschPeers")(function* mschPeers() {
3392
- const files = yield* RepositoryFiles;
3393
- const own = findPackageJson(SELF_NAME, import.meta.url);
3394
- if (Option.isNone(own)) return [];
3395
- const manifest = yield* readManifest(files.dirname(own.value));
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 });
3398
- return Array$1.flatten(found);
3399
- });
3400
- /** @internal */
3401
- const checkRemovedPeers = Effect.fn("checkRemovedPeers")(function* checkRemovedPeers(root) {
3402
- const files = yield* RepositoryFiles;
3403
- const overrides = yield* workspaceOverrides(root);
3404
- if (!pipe(Record.values(overrides), Array$1.some(isRemoval))) return [];
3405
- const file = files.join(root, WORKSPACE_FILE$5);
3406
- const source = yield* files.readFile(file);
3407
- const peers = yield* mschPeers();
3408
- return removedPeerProblems(peers)({
3409
- file,
3410
- source: Option.getOrElse(source, () => ""),
3411
- overrides
3412
- });
3413
- });
3414
3415
  // src/features/check-placement/model/colocated-git-patterns.ts
3415
- const RULE$72 = "colocated-git-patterns";
3416
+ const RULE$73 = "colocated-git-patterns";
3416
3417
  const PATTERN_FILES = [":(glob)**/.gitignore", ":(glob)**/.gitattributes"];
3417
3418
  const ROOT$3 = ".";
3418
3419
  const NEGATION = "!";
@@ -3459,7 +3460,7 @@ const entriesIn$2 = Effect.fn("entriesIn")(function* entriesIn(root, file) {
3459
3460
  const toEntry = entryOf$2(absolute, files.basename(file), files.dirname(file));
3460
3461
  return pipe(Option.getOrElse(text, () => ""), String$1.split("\n"), Array$1.map(toEntry), Array$1.getSomes);
3461
3462
  });
3462
- const patternProblem = (entry, message) => problemAtPosition(RULE$72)(entry.file, {
3463
+ const patternProblem = (entry, message) => problemAtPosition(RULE$73)(entry.file, {
3463
3464
  line: entry.line,
3464
3465
  column: FIRST$26
3465
3466
  }, message);
@@ -3522,7 +3523,7 @@ const checkColocatedGitPatterns = Effect.fn("checkColocatedGitPatterns")(functio
3522
3523
  return Array$1.getSomes([...misplacedFound, ...repeatedFound]);
3523
3524
  });
3524
3525
  // src/features/check-placement/model/colocated-tests.ts
3525
- const RULE$71 = "colocated-test";
3526
+ const RULE$72 = "colocated-test";
3526
3527
  const FIRST$25 = 1;
3527
3528
  const READ_CONCURRENCY$40 = 64;
3528
3529
  const ROOT_SUBPATH$2 = ".";
@@ -3545,7 +3546,7 @@ const problemFor$10 = (test, message) => ({
3545
3546
  file: test.file,
3546
3547
  line: FIRST$25,
3547
3548
  column: FIRST$25,
3548
- rule: RULE$71,
3549
+ rule: RULE$72,
3549
3550
  message: `${test.base} ${message}`
3550
3551
  });
3551
3552
  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 +3629,7 @@ const agentDocProblems = Effect.fn("agentDocProblems")(function* agentDocProblem
3628
3629
  // src/features/check-placement/model/agent-docs-length.ts
3629
3630
  const RECOMMENDED_LINES = 200;
3630
3631
  const FIRST$24 = 1;
3631
- const RULE$70 = "agent-docs-length";
3632
+ const RULE$71 = "agent-docs-length";
3632
3633
  const lineCount = (source) => pipe(String$1.trimEnd(source), String$1.split("\n")).length;
3633
3634
  const problemFor$9 = (file) => (lines) => {
3634
3635
  if (lines <= RECOMMENDED_LINES) return Option.none();
@@ -3636,14 +3637,14 @@ const problemFor$9 = (file) => (lines) => {
3636
3637
  file,
3637
3638
  line: 201,
3638
3639
  column: FIRST$24,
3639
- rule: RULE$70,
3640
+ rule: RULE$71,
3640
3641
  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
3642
  });
3642
3643
  };
3643
3644
  /** @internal */
3644
3645
  const checkAgentDocsLength = (root) => agentDocProblems(root, (file) => (source) => problemFor$9(file)(lineCount(source)));
3645
3646
  // src/features/check-placement/model/claude-link.ts
3646
- const RULE$69 = "claude-md-link";
3647
+ const RULE$70 = "claude-md-link";
3647
3648
  const CLAUDE = "CLAUDE.md";
3648
3649
  const AGENTS = "AGENTS.md";
3649
3650
  const FIRST$23 = 1;
@@ -3662,7 +3663,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3662
3663
  file: path,
3663
3664
  line: FIRST$23,
3664
3665
  column: FIRST$23,
3665
- rule: RULE$69,
3666
+ rule: RULE$70,
3666
3667
  message: MESSAGE$14
3667
3668
  })));
3668
3669
  });
@@ -3671,7 +3672,7 @@ const checkClaudeLinks = Effect.fn("checkClaudeLinks")(function* checkClaudeLink
3671
3672
  return Array$1.getSomes(found);
3672
3673
  });
3673
3674
  // src/features/check-placement/model/dangling-links.ts
3674
- const RULE$68 = "dangling-link";
3675
+ const RULE$69 = "dangling-link";
3675
3676
  const SEPARATOR$25 = "/";
3676
3677
  const FIRST$22 = 1;
3677
3678
  const READ_CONCURRENCY$37 = 16;
@@ -3687,7 +3688,7 @@ const checkDanglingLinks = Effect.fn("checkDanglingLinks")(function* checkDangli
3687
3688
  file,
3688
3689
  line: FIRST$22,
3689
3690
  column: FIRST$22,
3690
- rule: RULE$68,
3691
+ rule: RULE$69,
3691
3692
  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
3693
  })));
3693
3694
  });
@@ -3745,7 +3746,7 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3745
3746
  }));
3746
3747
  });
3747
3748
  // src/features/check-placement/model/deployed-readme.ts
3748
- const RULE$67 = "deployed-readme";
3749
+ const RULE$68 = "deployed-readme";
3749
3750
  const ROOT_DIRECTORY$4 = "";
3750
3751
  const READ_CONCURRENCY$36 = 16;
3751
3752
  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 +3786,14 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3785
3786
  const readme = yield* readReadme({
3786
3787
  root,
3787
3788
  directory,
3788
- rule: RULE$67,
3789
+ rule: RULE$68,
3789
3790
  missingMessage: MISSING_MESSAGE$2
3790
3791
  });
3791
3792
  return Result.match(readme, {
3792
3793
  onFailure: Option.some,
3793
3794
  onSuccess: ({ file, source }) => pipe(Option.liftPredicate(source, (text) => !URL_PATTERN.test(text)), Option.map(() => fileProblem$1({
3794
3795
  file,
3795
- rule: RULE$67,
3796
+ rule: RULE$68,
3796
3797
  message: NO_URL_MESSAGE
3797
3798
  })))
3798
3799
  });
@@ -3809,7 +3810,7 @@ const checkDeployedReadme = Effect.fn("checkDeployedReadme")(function* checkDepl
3809
3810
  return Array$1.getSomes(found);
3810
3811
  });
3811
3812
  // src/features/check-placement/model/nested-docs.ts
3812
- const RULE$66 = "nested-docs";
3813
+ const RULE$67 = "nested-docs";
3813
3814
  const CONFIG_FILE$9 = "vite.config.ts";
3814
3815
  const SEPARATOR$23 = "/";
3815
3816
  const READ_CONCURRENCY$35 = 64;
@@ -3822,7 +3823,7 @@ const RootConfig$1 = Schema.Struct({ msch: Schema.Struct({ workspaceAgentsMd: Sc
3822
3823
  const taggedError$13 = Schema.TaggedError;
3823
3824
  var RootConfigUnreadable = class extends taggedError$13()("RootConfigUnreadable", { file: Schema.String }) {};
3824
3825
  const isNested = (name) => String$1.includes(SEPARATOR$23)(name);
3825
- const problemFor$8 = problemInFile(RULE$66);
3826
+ const problemFor$8 = problemInFile(RULE$67);
3826
3827
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3827
3828
  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
3829
  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 +3880,7 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3879
3880
  return [...Array$1.getSomes(found), ...missing];
3880
3881
  });
3881
3882
  // src/features/check-placement/model/published-readme.ts
3882
- const RULE$65 = "published-readme";
3883
+ const RULE$66 = "published-readme";
3883
3884
  const READ_CONCURRENCY$34 = 16;
3884
3885
  const MESSAGE$13 = "contains Japanese. This package is published to npm, so write its README in English.";
3885
3886
  const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
@@ -3887,7 +3888,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3887
3888
  const readme = yield* readReadme({
3888
3889
  root,
3889
3890
  directory,
3890
- rule: RULE$65,
3891
+ rule: RULE$66,
3891
3892
  missingMessage: MISSING_MESSAGE
3892
3893
  });
3893
3894
  return Result.match(readme, {
@@ -3898,7 +3899,7 @@ const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory
3898
3899
  file,
3899
3900
  line,
3900
3901
  column,
3901
- rule: RULE$65,
3902
+ rule: RULE$66,
3902
3903
  message: MESSAGE$13
3903
3904
  };
3904
3905
  }))
@@ -3911,7 +3912,7 @@ const checkPublishedReadme = Effect.fn("checkPublishedReadme")(function* checkPu
3911
3912
  return Array$1.getSomes(found);
3912
3913
  });
3913
3914
  // src/features/check-placement/model/published-tests.ts
3914
- const RULE$64 = "published-tests";
3915
+ const RULE$65 = "published-tests";
3915
3916
  const FILE_START = 1;
3916
3917
  const TEST_FILE$3 = /\.test\.[cm]?[jt]sx?$/u;
3917
3918
  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 +3926,7 @@ const problemFor$7 = Effect.fn("problemFor")(function* problemFor(root, listed,
3925
3926
  file: files.join(absolute, PACKAGE_JSON_FILE),
3926
3927
  line: FILE_START,
3927
3928
  column: FILE_START,
3928
- rule: RULE$64,
3929
+ rule: RULE$65,
3929
3930
  message: MESSAGE$12
3930
3931
  });
3931
3932
  });
@@ -3939,7 +3940,7 @@ const checkPublishedTests = Effect.fn("checkPublishedTests")(function* checkPubl
3939
3940
  return Array$1.getSomes(found);
3940
3941
  });
3941
3942
  // src/features/check-placement/model/root-docs.ts
3942
- const RULE$63 = "root-docs";
3943
+ const RULE$64 = "root-docs";
3943
3944
  const SEPARATOR$22 = "/";
3944
3945
  const FIRST$20 = 1;
3945
3946
  const MARKDOWN$6 = /\.(?:md|mdx|markdown)$/iu;
@@ -3954,12 +3955,12 @@ const checkRootDocs = Effect.fn("checkRootDocs")(function* checkRootDocs(root) {
3954
3955
  file: files.join(root, name),
3955
3956
  line: FIRST$20,
3956
3957
  column: FIRST$20,
3957
- rule: RULE$63,
3958
+ rule: RULE$64,
3958
3959
  message: `${name} ${MESSAGE$11}`
3959
3960
  })));
3960
3961
  });
3961
3962
  // src/features/check-placement/model/root-readme.ts
3962
- const RULE$62 = "root-readme";
3963
+ const RULE$63 = "root-readme";
3963
3964
  const ROOT_DOC = /^(?:README(?:\.[^/]+)?|AGENTS\.md|CLAUDE\.md)$/iu;
3964
3965
  const READ_CONCURRENCY$33 = 16;
3965
3966
  const START$31 = 0;
@@ -3975,7 +3976,7 @@ const NO_PLUGINS = {
3975
3976
  names: []
3976
3977
  };
3977
3978
  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.`;
3979
+ 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
3980
  const pluginsOf = (plugins) => {
3980
3981
  const directories = pipe(plugins, Array$1.map(({ source }) => source), Array$1.filter(Predicate.isString), Array$1.map(String$1.replace(RELATIVE$3, "")));
3981
3982
  const segments = pipe(directories, Array$1.map(baseName$1));
@@ -3999,10 +4000,10 @@ const patternFor = (plugins) => ({ directory, names }) => patternOf$1(Option.mat
3999
4000
  onSome: () => [directory]
4000
4001
  }));
4001
4002
  const problemsIn$21 = (file, source, plugins) => (workspace) => {
4002
- const message = messageFor$4(workspace.directory);
4003
+ const message = messageFor$5(workspace.directory);
4003
4004
  const at = positionOf(source);
4004
4005
  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)));
4006
+ 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
4007
  };
4007
4008
  const problemsInReadme = Effect.fn("problemsInReadme")(function* problemsInReadme(file, workspaces, plugins) {
4008
4009
  const text = yield* (yield* RepositoryFiles).readFile(file);
@@ -4039,7 +4040,7 @@ const checkDocPlacement = Effect.fn("checkDocPlacement")(function* checkDocPlace
4039
4040
  return Array$1.flatten(found);
4040
4041
  });
4041
4042
  // src/features/check-placement/model/docs-mirror.ts
4042
- const RULE$61 = "docs-mirror";
4043
+ const RULE$62 = "docs-mirror";
4043
4044
  const DOC = /(?:^|\/)(?:README|AGENTS|ARCHITECTURE|CLAUDE|SKILL)\.md$/u;
4044
4045
  const MIRROR_LIMIT = 3;
4045
4046
  const READ_CONCURRENCY$32 = 16;
@@ -4064,7 +4065,7 @@ const problemFor$6 = (file, source, mentions) => pipe(Array$1.head(mentions), Op
4064
4065
  file,
4065
4066
  line,
4066
4067
  column,
4067
- rule: RULE$61,
4068
+ rule: RULE$62,
4068
4069
  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
4070
  };
4070
4071
  }), Option.toArray);
@@ -4096,7 +4097,7 @@ const checkDocsMirror = Effect.fn("checkDocsMirror")(function* checkDocsMirror(r
4096
4097
  return Array$1.flatten(found);
4097
4098
  });
4098
4099
  // src/features/check-placement/model/ignored-sources.ts
4099
- const RULE$60 = "ignored-sources";
4100
+ const RULE$61 = "ignored-sources";
4100
4101
  const SOURCES = [":(glob)**/src/**", ":(exclude,glob)**/node_modules/**"];
4101
4102
  const FIRST$19 = 1;
4102
4103
  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 +4109,7 @@ const checkIgnoredSources = Effect.fn("checkIgnoredSources")(function* checkIgno
4108
4109
  file: files.join(root, file),
4109
4110
  line: FIRST$19,
4110
4111
  column: FIRST$19,
4111
- rule: RULE$60,
4112
+ rule: RULE$61,
4112
4113
  message: MESSAGE$10
4113
4114
  })));
4114
4115
  });
@@ -12865,13 +12866,13 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12865
12866
  return [...sliceNameProblems(root, files.join, sources), ...Array$1.flatMap(Array$1.getSomes(read), problemsOf$4)];
12866
12867
  });
12867
12868
  // src/features/check-placement/model/shadcn-ui-alias.ts
12868
- const RULE$59 = "shadcn-ui-alias";
12869
+ const RULE$60 = "shadcn-ui-alias";
12869
12870
  const FIRST$18 = 1;
12870
12871
  const problemOf$12 = (directory, { file, alias }) => ({
12871
12872
  file,
12872
12873
  line: FIRST$18,
12873
12874
  column: FIRST$18,
12874
- rule: RULE$59,
12875
+ rule: RULE$60,
12875
12876
  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
12877
  });
12877
12878
  /** @internal */
@@ -13139,7 +13140,7 @@ const tsconfigMentions = Effect.fn("tsconfigMentions")(function* tsconfigMention
13139
13140
  ])));
13140
13141
  });
13141
13142
  // src/features/check-repository-layout/model/config-paths.ts
13142
- const RULE$58 = "config-path";
13143
+ const RULE$59 = "config-path";
13143
13144
  const WORKSPACE_FILE$4 = "pnpm-workspace.yaml";
13144
13145
  const CARGO_MANIFEST = /(?:^|\/)Cargo\.toml$/u;
13145
13146
  const TSCONFIG = /(?:^|\/)tsconfig(?:\.[\w-]+)?\.json$/u;
@@ -13158,7 +13159,7 @@ const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
13158
13159
  const problemOf$11 = (file, source) => (mention) => ({
13159
13160
  file,
13160
13161
  ...positionOf(source)(mention.index),
13161
- rule: RULE$58,
13162
+ rule: RULE$59,
13162
13163
  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
13164
  });
13164
13165
  const mentionsIn = Effect.fn("mentionsIn")(function* mentionsIn(file, source) {
@@ -13183,7 +13184,7 @@ const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatt
13183
13184
  return pipe(patterns, Array$1.map((pattern) => ({
13184
13185
  file,
13185
13186
  ...positionOf(source.value)(indexOfText(source.value)(pattern)),
13186
- rule: RULE$58,
13187
+ rule: RULE$59,
13187
13188
  message: `packages lists ${pattern}, which matches no workspace package. Point it at directories that have a package.json or remove the entry.`
13188
13189
  })));
13189
13190
  });
@@ -13195,7 +13196,7 @@ const checkConfigPaths = Effect.fn("checkConfigPaths")(function* checkConfigPath
13195
13196
  return [...Array$1.flatten(found), ...patterns];
13196
13197
  });
13197
13198
  // src/features/check-repository-layout/model/crates.ts
13198
- const RULE$57 = "unverified-crate";
13199
+ const RULE$58 = "unverified-crate";
13199
13200
  const VERSION_RULE = "release-version";
13200
13201
  const APP_DIRECTORIES = ["", "src-tauri"];
13201
13202
  const CARGO_FILE$1 = "Cargo.toml";
@@ -13207,7 +13208,7 @@ const problemFor$5 = (crate, message) => ({
13207
13208
  file: crate.manifest,
13208
13209
  line: FIRST$16,
13209
13210
  column: FIRST$16,
13210
- rule: RULE$57,
13211
+ rule: RULE$58,
13211
13212
  message: `crate ${crate.name} ${message}, so vp run verify never checks it.`
13212
13213
  });
13213
13214
  const problemIn$3 = Effect.fn("problemIn")(function* problemIn(root, directories, crate) {
@@ -13243,7 +13244,7 @@ const checkCrates = Effect.fn("checkCrates")(function* checkCrates(root) {
13243
13244
  return Array$1.getSomes(Array$1.flatten(found));
13244
13245
  });
13245
13246
  // src/features/check-repository-layout/model/deploy-entry-patterns.ts
13246
- const RULE$56 = "deploy-entry-pattern";
13247
+ const RULE$57 = "deploy-entry-pattern";
13247
13248
  const FALLOW_KEYS = [
13248
13249
  "entry",
13249
13250
  "entryPoints",
@@ -13314,7 +13315,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(request) {
13314
13315
  return pipe(Array$1.getSomes(flagged), Array$1.map(({ text: pattern, start }) => ({
13315
13316
  file: path,
13316
13317
  ...positionOf(text.value)(start - kind.offset),
13317
- rule: RULE$56,
13318
+ rule: RULE$57,
13318
13319
  message: `${pattern} ${MESSAGE$9}`
13319
13320
  })));
13320
13321
  });
@@ -13347,7 +13348,7 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
13347
13348
  return Array$1.flatten(found);
13348
13349
  });
13349
13350
  // src/features/check-repository-layout/model/fallow-entries.ts
13350
- const RULE$55 = "listed-entry";
13351
+ const RULE$56 = "listed-entry";
13351
13352
  const ENTRY_KEYS = [
13352
13353
  "entry",
13353
13354
  "entryPoints",
@@ -13377,7 +13378,7 @@ const problemsIn$17 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
13377
13378
  return pipe(entryPatternsIn(parsed.program), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
13378
13379
  file: path,
13379
13380
  ...positionOf(text.value)(start),
13380
- rule: RULE$55,
13381
+ rule: RULE$56,
13381
13382
  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
13383
  })));
13383
13384
  });
@@ -13389,7 +13390,7 @@ const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallow
13389
13390
  return Array$1.flatten(found);
13390
13391
  });
13391
13392
  // src/features/check-repository-layout/model/root-workspace-paths.ts
13392
- const RULE$54 = "root-workspace-path";
13393
+ const RULE$55 = "root-workspace-path";
13393
13394
  const CONFIG_FILE$7 = "vite.config.ts";
13394
13395
  const PATH_CHARACTER = /[\w.@/-]/u;
13395
13396
  const NAME_CHARACTER = /[\w.@-]/u;
@@ -13408,7 +13409,7 @@ const mentions = (directory) => (text) => {
13408
13409
  const problemsIn$16 = (file, source, directories) => (found) => pipe(directories, Array$1.filter((directory) => mentions(directory)(found.text)), Array$1.map((directory) => ({
13409
13410
  file,
13410
13411
  ...positionOf(source)(found.start),
13411
- rule: RULE$54,
13412
+ rule: RULE$55,
13412
13413
  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
13414
  })));
13414
13415
  /** @internal */
@@ -13422,7 +13423,7 @@ const checkRootWorkspacePaths = Effect.fn("checkRootWorkspacePaths")(function* c
13422
13423
  return pipe(stringsIn(parsed.program), Array$1.flatMap(problemsIn$16(file, source.value, directories)));
13423
13424
  });
13424
13425
  // src/features/check-repository-layout/model/hidden-verify.ts
13425
- const RULE$53 = "hidden-verify";
13426
+ const RULE$54 = "hidden-verify";
13426
13427
  const CONFIG_FILE$6 = "vite.config.ts";
13427
13428
  const FIRST$14 = 1;
13428
13429
  const READ_CONCURRENCY$25 = 8;
@@ -13436,7 +13437,7 @@ const problemIn$2 = Effect.fn("problemIn")(function* problemIn(root, directory)
13436
13437
  file,
13437
13438
  line: FIRST$14,
13438
13439
  column: FIRST$14,
13439
- rule: RULE$53,
13440
+ rule: RULE$54,
13440
13441
  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
13442
  }).pipe(Option.filter(() => verified));
13442
13443
  });
@@ -13447,7 +13448,7 @@ const checkHiddenVerify = Effect.fn("checkHiddenVerify")(function* checkHiddenVe
13447
13448
  return Array$1.getSomes(found);
13448
13449
  });
13449
13450
  // src/features/check-repository-layout/model/shared-uncached-tasks.ts
13450
- const RULE$52 = "shared-uncached-task";
13451
+ const RULE$53 = "shared-uncached-task";
13451
13452
  const READ_CONCURRENCY$24 = 8;
13452
13453
  const SHARED = 2;
13453
13454
  const OWN_PROGRAM = /^(?:node|vpx|bun|deno|tsx)$|\//u;
@@ -13490,7 +13491,7 @@ const problemsOf$3 = (definitions) => {
13490
13491
  return pipe(definitions, Array$1.map(({ file, position, name, command }) => ({
13491
13492
  file,
13492
13493
  ...position,
13493
- rule: RULE$52,
13494
+ rule: RULE$53,
13494
13495
  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
13496
  })));
13496
13497
  };
@@ -13501,7 +13502,7 @@ const checkSharedUncachedTasks = Effect.fn("checkSharedUncachedTasks")(function*
13501
13502
  return pipe(Array$1.flatten(found), Array$1.groupBy(({ name, definition }) => `${name}\u0000${definition}`), Record.values, Array$1.flatMap(problemsOf$3));
13502
13503
  });
13503
13504
  // src/features/check-repository-layout/model/tested-verify.ts
13504
- const RULE$51 = "tested-verify";
13505
+ const RULE$52 = "tested-verify";
13505
13506
  const READ_CONCURRENCY$23 = 8;
13506
13507
  const TESTS = new Set(TEST_TASK_NAMES);
13507
13508
  const RUNS_TESTS = /\b(?:vp|cargo) test\b/u;
@@ -13530,7 +13531,7 @@ const problemsIn$15 = Effect.fn("problemsIn")(function* problemsIn(root, directo
13530
13531
  return pipe(Option.toArray(config), Array$1.flatMap(({ file, source, program }) => pipe(testedEdges(runTasksIn(program)), Array$1.map(({ to, at }) => ({
13531
13532
  file,
13532
13533
  ...positionOf(source)(at.start),
13533
- rule: RULE$51,
13534
+ rule: RULE$52,
13534
13535
  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
13536
  })))));
13536
13537
  });
@@ -13541,7 +13542,7 @@ const checkTestedVerify = Effect.fn("checkTestedVerify")(function* checkTestedVe
13541
13542
  return Array$1.flatten(found);
13542
13543
  });
13543
13544
  // src/features/check-repository-layout/model/unlocked-tasks.ts
13544
- const RULE$50 = "unlocked-task";
13545
+ const RULE$51 = "unlocked-task";
13545
13546
  const READ_CONCURRENCY$22 = 8;
13546
13547
  const READS_DEPENDENCIES = /^vp (?:test|pack|build)\b/u;
13547
13548
  const decodeCommand = Schema.decodeUnknownOption(Schema.Union([Schema.String, Schema.NonEmptyArray(Schema.String)]));
@@ -13553,7 +13554,7 @@ const tracksLockfiles = (task) => pipe(propertyValue("cache")(task.value), Optio
13553
13554
  const problemsOf$2 = ({ file, source, tasks }) => pipe(tasks, Array$1.filter(tracksLockfiles), Array$1.flatMap((task) => pipe(commandOf(task), Option.map((command) => ({
13554
13555
  file,
13555
13556
  ...positionOf(source)(task.start),
13556
- rule: RULE$50,
13557
+ rule: RULE$51,
13557
13558
  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
13559
  })), Option.toArray)));
13559
13560
  /** @internal */
@@ -13696,7 +13697,7 @@ const childrenOf$2 = Effect.fn("childrenOf")(function* childrenOf(directory) {
13696
13697
  });
13697
13698
  const resolveFrom = (from, name) => Effect.gen(function* resolvePackage() {
13698
13699
  const files = yield* RepositoryFiles;
13699
- const candidate = files.join(from, NODE_MODULES, name);
13700
+ const candidate = files.join(from, NODE_MODULES$1, name);
13700
13701
  if (yield* files.exists(files.join(candidate, PACKAGE_JSON_FILE))) {
13701
13702
  const real = yield* files.realPath(candidate);
13702
13703
  return Option.some(real);
@@ -13728,7 +13729,7 @@ const closureOf$2 = (provided, collect) => Array$1.match(collect.pending, {
13728
13729
  const directorySize = (directory) => Effect.gen(function* sizeOfDirectory() {
13729
13730
  const files = yield* RepositoryFiles;
13730
13731
  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)));
13732
+ const entries = pipe(names, Array$1.filter((name) => name !== NODE_MODULES$1), Array$1.map((name) => files.join(directory, name)));
13732
13733
  const sizes = yield* Effect.forEach(entries, (entry) => files.isDirectory(entry).pipe(Effect.flatMap((kind) => {
13733
13734
  if (Option.isNone(kind)) return Effect.succeed(EMPTY$3);
13734
13735
  if (kind.value) return directorySize(entry);
@@ -13869,7 +13870,7 @@ const baseRevision = Effect.fn("baseRevision")(function* baseRevision(root) {
13869
13870
  return yield* files.mergeBase(root, base);
13870
13871
  });
13871
13872
  // src/features/check-migration-order/model/migration-order.ts
13872
- const RULE$49 = "migration-order";
13873
+ const RULE$50 = "migration-order";
13873
13874
  const SNAPSHOT = "snapshot.json";
13874
13875
  const MIGRATION = "migration.sql";
13875
13876
  const SNAPSHOTS = [`*/${SNAPSHOT}`];
@@ -13903,7 +13904,7 @@ const outOfOrder = (root, base, join) => (migrations) => pipe(latestOf(migration
13903
13904
  file: join(root, file),
13904
13905
  line: FIRST$13,
13905
13906
  column: FIRST$13,
13906
- rule: RULE$49,
13907
+ rule: RULE$50,
13907
13908
  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
13909
  })))), Option.getOrElse(() => []));
13909
13910
  /** @internal */
@@ -13954,7 +13955,7 @@ const unresolvedFrom = (entries) => Effect.acquireUseRelease(Effect.tryPromise({
13954
13955
  catch: bundleErrorDetail
13955
13956
  }), (bundle) => Effect.promise(() => bundle.close())).pipe(Effect.map(({ output }) => unresolvedIn(pipe(output, Array$1.filter(isChunk$1)))));
13956
13957
  // src/features/check-plugin-dependencies/model/plugin-dependencies.ts
13957
- const RULE$48 = "plugin-dependencies";
13958
+ const RULE$49 = "plugin-dependencies";
13958
13959
  const PLUGIN_FILE$3 = ".claude-plugin/plugin.json";
13959
13960
  const LOCK_FILE = "bun.lock";
13960
13961
  const SOURCE_FILE$1 = /\.[cm]?[jt]sx?$/u;
@@ -13963,7 +13964,7 @@ const SUCCESS$6 = 0;
13963
13964
  const NOT_STARTED = -1;
13964
13965
  const DETAIL_LINES = 3;
13965
13966
  const PLUGIN_CONCURRENCY = 2;
13966
- const problemFor$4 = problemInFile(RULE$48);
13967
+ const problemFor$4 = problemInFile(RULE$49);
13967
13968
  const hasDependencies = Effect.fn("hasDependencies")(function* hasDependencies(directory) {
13968
13969
  const files = yield* RepositoryFiles;
13969
13970
  const text = yield* files.readFile(files.join(directory, PACKAGE_JSON_FILE));
@@ -14068,7 +14069,12 @@ var BundleFailed = class extends taggedError$11()("BundleFailed", { detail: Sche
14068
14069
  const failed = (error) => BundleFailed.make({ detail: bundleErrorDetail(error) });
14069
14070
  const isBare = (specifier) => !String$1.startsWith(RELATIVE_PREFIX)(specifier) && !String$1.startsWith(SUBPATH_IMPORT)(specifier) && !ABSOLUTE.test(specifier) && !String$1.startsWith(VIRTUAL_PREFIX)(specifier);
14070
14071
  const isBuiltin$1 = (specifier) => String$1.startsWith(NODE_PROTOCOL)(specifier) || builtins.has(packageNameOf(specifier));
14071
- const isExternal = ({ declared, bundled }) => (specifier, importer) => Predicate.isNotUndefined(importer) && isBare(specifier) && (isBuiltin$1(specifier) || Array$1.contains(declared, packageNameOf(specifier)) && !Array$1.contains(bundled, packageNameOf(specifier)));
14072
+ const matchesPattern = (name) => (pattern) => {
14073
+ if (Predicate.isString(pattern)) return pattern === name;
14074
+ return pattern.test(name);
14075
+ };
14076
+ const isBundledBy = (bundled, name) => pipe(bundled, Array$1.some(matchesPattern(name)));
14077
+ const isExternal = ({ declared, bundled }) => (specifier, importer) => Predicate.isNotUndefined(importer) && isBare(specifier) && (isBuiltin$1(specifier) || Array$1.contains(declared, packageNameOf(specifier)) && !isBundledBy(bundled, packageNameOf(specifier)));
14072
14078
  const consumerSource = ({ entry, member }) => Option.match(member, {
14073
14079
  onNone: () => `export * from ${quote(entry)};\n`,
14074
14080
  onSome: (name) => `import * as ${NAMESPACE} from ${quote(entry)};\nglobalThis.used = ${NAMESPACE}[${quote(name)}];\n`
@@ -14182,7 +14188,7 @@ const bundleScopeOf = ({ manifest, workspace }) => ({
14182
14188
  });
14183
14189
  const stackPackagesOf = ({ devDependencies }) => pipe(Option.fromUndefinedOr(devDependencies), Option.map(Record.filter((specifier) => specifier === STACK_CATALOG)), Option.map(Record.keys), Option.getOrElse(() => []));
14184
14190
  // src/features/check-tree-shaking/model/optional-peers.ts
14185
- const RULE$47 = "optional-peer";
14191
+ const RULE$48 = "optional-peer";
14186
14192
  const REQUIRED_RULE = "required-peer";
14187
14193
  const START$27 = 0;
14188
14194
  const SINGLE$1 = 1;
@@ -14199,7 +14205,7 @@ const positionIn = (located, key, name) => {
14199
14205
  const problemFor$3 = (located, name, importers) => ({
14200
14206
  file: located.file,
14201
14207
  ...positionIn(located, DEPENDENCIES_KEY, name),
14202
- rule: RULE$47,
14208
+ rule: RULE$48,
14203
14209
  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
14210
  });
14205
14211
  const requiredPeerAdvice = (fromStack) => {
@@ -14235,7 +14241,7 @@ const requiredPeerProblems = ({ located, manifest, used }) => {
14235
14241
  }));
14236
14242
  };
14237
14243
  // src/features/check-tree-shaking/model/side-effects.ts
14238
- const RULE$46 = "side-effects";
14244
+ const RULE$47 = "side-effects";
14239
14245
  const BUNDLE_CONCURRENCY$2 = 4;
14240
14246
  const START$26 = 0;
14241
14247
  const FIRST$12 = 1;
@@ -14287,11 +14293,11 @@ const keyIndex$1 = (source) => pipe(String$1.indexOf(SIDE_EFFECTS_KEY)(source),
14287
14293
  const sideEffectProblems = ({ file, source, excesses }) => pipe(excesses, Array$1.sortBy(largest), Array$1.head, Option.map((worst) => ({
14288
14294
  file,
14289
14295
  ...positionOf(source)(keyIndex$1(source)),
14290
- rule: RULE$46,
14296
+ rule: RULE$47,
14291
14297
  message: messageOf$6(worst, excesses.length)
14292
14298
  })), Option.toArray);
14293
14299
  // src/features/check-tree-shaking/model/top-level-effects.ts
14294
- const RULE$45 = "top-level-effect";
14300
+ const RULE$46 = "top-level-effect";
14295
14301
  const CODE$1 = /\.[cm]?[jt]sx?$/u;
14296
14302
  const READ_CONCURRENCY$20 = 16;
14297
14303
  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 +14313,7 @@ const messageOf$5 = (statement) => {
14307
14313
  const problemsIn$14 = (api) => (file) => (source) => {
14308
14314
  const retained = api.createSourceFile(file, source);
14309
14315
  const problems = pipe(retained.sourceFile.statements, Array$1.fromIterable, Array$1.filter(isEffect), Array$1.map((statement) => problemAt$6({
14310
- rule: RULE$45,
14316
+ rule: RULE$46,
14311
14317
  message: messageOf$5(statement)
14312
14318
  })(statement)));
14313
14319
  retained.dispose();
@@ -14476,7 +14482,7 @@ const checkTreeShaking = Effect.fn("checkTreeShaking")(function* checkTreeShakin
14476
14482
  return Array$1.flatten(found);
14477
14483
  });
14478
14484
  // src/features/check-typescript-generation/model/typescript-generation.ts
14479
- const RULE$44 = "legacy-typescript";
14485
+ const RULE$45 = "legacy-typescript";
14480
14486
  const LOCKFILE = "pnpm-lock.yaml";
14481
14487
  const COMPILER = "typescript";
14482
14488
  const CURRENT_MAJOR = 7;
@@ -14507,12 +14513,12 @@ const checkTypescriptGeneration = Effect.fn("checkTypescriptGeneration")(functio
14507
14513
  file,
14508
14514
  line: lineOf$4(source)(legacy.id),
14509
14515
  column: FIRST$11,
14510
- rule: RULE$44,
14516
+ rule: RULE$45,
14511
14517
  message: messageOf$4(legacy, dependentsOf$1(Option.getOrElse(nodes, () => []))(legacy.id))
14512
14518
  })));
14513
14519
  });
14514
14520
  // src/features/check-worker-bundles/model/worker-bundles.ts
14515
- const RULE$43 = "worker-bundle";
14521
+ const RULE$44 = "worker-bundle";
14516
14522
  const BUNDLE_CONCURRENCY = 4;
14517
14523
  const PLATFORM_MODULES = [/^cloudflare:/u, /^node:/u];
14518
14524
  const CONDITIONS = [
@@ -14523,7 +14529,7 @@ const CONDITIONS = [
14523
14529
  "module",
14524
14530
  "default"
14525
14531
  ];
14526
- const problemFor$2 = problemInFile(RULE$43);
14532
+ const problemFor$2 = problemInFile(RULE$44);
14527
14533
  const problemOf$10 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
14528
14534
  const bundleProblem = (file) => Effect.gen(function* bundle() {
14529
14535
  const built = yield* Effect.tryPromise({
@@ -14716,7 +14722,7 @@ const weakeningsOf = (expected) => (config) => [
14716
14722
  ...secretWeakenings(config.h56m, expected.secrets)
14717
14723
  ];
14718
14724
  // src/app/disabled-rules.ts
14719
- const RULE$42 = "disabled-rule";
14725
+ const RULE$43 = "disabled-rule";
14720
14726
  const CONFIG_FILE$5 = "vite.config.ts";
14721
14727
  const START$24 = 0;
14722
14728
  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 +14736,7 @@ const sideConfigs = Effect.fn("sideConfigs")(function* sideConfigs(root) {
14730
14736
  const files = yield* RepositoryFiles;
14731
14737
  const listed = yield* files.listedFiles(root);
14732
14738
  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)));
14739
+ 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
14740
  });
14735
14741
  const configWeakenings = Effect.fn("configWeakenings")(function* configWeakenings(root, source) {
14736
14742
  const file = (yield* RepositoryFiles).join(root, CONFIG_FILE$5);
@@ -14742,7 +14748,7 @@ const configWeakenings = Effect.fn("configWeakenings")(function* configWeakening
14742
14748
  })
14743
14749
  });
14744
14750
  const expected = yield* expectationsIn(root);
14745
- const at = problemAtIndex(RULE$42)(file, source);
14751
+ const at = problemAtIndex(RULE$43)(file, source);
14746
14752
  return pipe(weakeningsOf(expected)(config), Array$1.map(({ anchor, message }) => at(Option.getOrElse(String$1.indexOf(anchor)(source), () => START$24), message)));
14747
14753
  });
14748
14754
  /** @internal */
@@ -14750,7 +14756,7 @@ const checkDisabledRules = Effect.fn("checkDisabledRules")(function* checkDisabl
14750
14756
  const files = yield* RepositoryFiles;
14751
14757
  const text = yield* files.readFile(files.join(root, CONFIG_FILE$5));
14752
14758
  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)];
14759
+ 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
14760
  });
14755
14761
  // src/app/build-checks.ts
14756
14762
  /** @internal */
@@ -14846,7 +14852,7 @@ const fileFactsIn = (checker) => (sourceFiles, excluded) => pipe(sourceFiles, Ar
14846
14852
  imports: importedFilesOf(checker)(sourceFile)
14847
14853
  })), Array$1.filter((facts) => Array$1.isReadonlyArrayNonEmpty(facts.values) || Array$1.isReadonlyArrayNonEmpty(facts.imports)));
14848
14854
  // src/features/check-value-owners/model/name-lists.ts
14849
- const RULE$41 = "hand-written-names";
14855
+ const RULE$42 = "hand-written-names";
14850
14856
  const TEST_FILE$1 = /\.test(?:\.[\w-]+)?\.[cm]?tsx?$/u;
14851
14857
  const nameListOf = (site) => {
14852
14858
  if (TEST_FILE$1.test(site.file) || site.values.length < 2) return Option.none();
@@ -14861,7 +14867,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
14861
14867
  file,
14862
14868
  line,
14863
14869
  column,
14864
- rule: RULE$41,
14870
+ rule: RULE$42,
14865
14871
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
14866
14872
  });
14867
14873
  const problemOf$9 = ({ list, reason }) => listedProblem({
@@ -15652,7 +15658,7 @@ const checkRepository = Effect.fn("checkRepository")(function* checkRepository(r
15652
15658
  return sortProblems([...ownerScan.problems, ...repositoryProblems(repository)(analyses)]);
15653
15659
  }, Effect.scoped);
15654
15660
  // src/features/source-code/find-namespace-destructuring/model/namespace-destructuring.ts
15655
- const RULE$40 = "namespace-destructuring";
15661
+ const RULE$41 = "namespace-destructuring";
15656
15662
  const LOCAL = /^[.#/]/u;
15657
15663
  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
15664
  const isPackage = (specifier) => isStringLiteral(specifier) && !LOCAL.test(specifier.text);
@@ -15668,7 +15674,7 @@ const destructuredName = (declaration) => {
15668
15674
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
15669
15675
  };
15670
15676
  const problemOf$8 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$6({
15671
- rule: RULE$40,
15677
+ rule: RULE$41,
15672
15678
  message: messageOf$3(name)
15673
15679
  })), Option.map((report) => report(declaration)));
15674
15680
  const namespaceDestructuringIn = () => (sourceFile) => {
@@ -15676,7 +15682,7 @@ const namespaceDestructuringIn = () => (sourceFile) => {
15676
15682
  return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$8(names)), Array$1.getSomes);
15677
15683
  };
15678
15684
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
15679
- const RULE$39 = "pass-through-wrapper";
15685
+ const RULE$40 = "pass-through-wrapper";
15680
15686
  const SINGLE_STATEMENT = 1;
15681
15687
  const SINGLE_DECLARATION = 1;
15682
15688
  const THIS_PARAMETER = "this";
@@ -15773,7 +15779,7 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
15773
15779
  const problemOf$7 = (checker) => (candidate) => {
15774
15780
  if (changesTheCall(candidate.wrapper)) return Option.none();
15775
15781
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$6({
15776
- rule: RULE$39,
15782
+ rule: RULE$40,
15777
15783
  message: messageOf$2(forward.callee.getText())
15778
15784
  })(candidate.name)));
15779
15785
  };
@@ -15796,7 +15802,7 @@ const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigi
15796
15802
  /** @internal */
15797
15803
  const slugOf = ({ owner, name }) => `${owner}/${name}`;
15798
15804
  // src/features/check-agent-settings/model/known-plugins.ts
15799
- const RULE$38 = "known-plugins";
15805
+ const RULE$39 = "known-plugins";
15800
15806
  const SETTINGS_FILE$2 = ".claude/settings.json";
15801
15807
  const MARKETPLACE_FILE$2 = ".claude-plugin/marketplace.json";
15802
15808
  const GITHUB$5 = "github";
@@ -15817,7 +15823,7 @@ const MarketplaceSchema = Schema.Struct({
15817
15823
  plugins: Schema.Array(Schema.Struct({ name: Schema.String }))
15818
15824
  });
15819
15825
  const decodeMarketplace = Schema.decodeUnknownOption(Schema.fromJsonString(MarketplaceSchema));
15820
- const problem$5 = problemInFile(RULE$38);
15826
+ const problem$5 = problemInFile(RULE$39);
15821
15827
  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
15828
  const pluginEnabled = (settings) => (plugin) => pipe(Option.fromUndefinedOr(settings.enabledPlugins), Option.flatMap(Record.get(plugin)), Option.getOrElse(() => false));
15823
15829
  const pluginProblems = (marketplace, file, settings) => {
@@ -15842,7 +15848,7 @@ const checkKnownPlugins = Effect.fn("checkKnownPlugins")(function* checkKnownPlu
15842
15848
  }));
15843
15849
  });
15844
15850
  // src/features/check-agent-settings/model/missing-hooks.ts
15845
- const RULE$37 = "missing-hook";
15851
+ const RULE$38 = "missing-hook";
15846
15852
  const SETTINGS_FILE$1 = /^\.claude\/settings\.json$/u;
15847
15853
  const PLUGIN_HOOKS_FILE = /(?:^|\/)hooks\/hooks\.json$/u;
15848
15854
  const PROJECT_PATH = /(?<optional>--env-file-if-exists=)?\$\{?CLAUDE_PROJECT_DIR\}?(?:\\")?\/(?<path>[\w.@/-]+)/gu;
@@ -15867,7 +15873,7 @@ const problemsIn$13 = Effect.fn("problemsIn")(function* problemsIn({ root, file,
15867
15873
  return pipe(missing, Array$1.map(({ path, index }) => ({
15868
15874
  file,
15869
15875
  ...positionOf(source)(index),
15870
- rule: RULE$37,
15876
+ rule: RULE$38,
15871
15877
  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
15878
  })));
15873
15879
  });
@@ -15920,7 +15926,7 @@ const listedTasks = Effect.fn("listedTasks")(function* listedTasks(root) {
15920
15926
  }, Effect.scoped, Effect.orElseSucceed(() => Option.none()));
15921
15927
  const GivenTaskGraph = Context.Reference("msch/GivenTaskGraph", { defaultValue: () => Option.none() });
15922
15928
  // src/features/check-documented-commands/model/commands.ts
15923
- const RULE$36 = "documented-commands";
15929
+ const RULE$37 = "documented-commands";
15924
15930
  const DOCUMENTS = ["*AGENTS.md", "*CLAUDE.md"];
15925
15931
  const DOCUMENT_NAMES = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
15926
15932
  const COMMAND = /`vp run (?<args>[^`]+)`/gu;
@@ -15998,7 +16004,7 @@ const isMissing = (graph, file) => ({ task, scope }) => !pipe(packagesOf(graph,
15998
16004
  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
16005
  file: absolute(file),
16000
16006
  ...positionOf(text)(match.index ?? START$22),
16001
- rule: RULE$36,
16007
+ rule: RULE$37,
16002
16008
  message: `${match[START$22]} runs task ${task}, but ${whereOf(scope, file)} has no such task. Fix the command or the task`
16003
16009
  })), Option.toArray)));
16004
16010
  const isDocument = (file) => pipe(String$1.split(file, SEPARATOR$12), Array$1.last, Option.exists((name) => DOCUMENT_NAMES.has(name)));
@@ -16023,14 +16029,14 @@ const checkDocumentedCommands = Effect.fn("checkDocumentedCommands")(function* c
16023
16029
  file: absolute(Array$1.headNonEmpty(commanded).file),
16024
16030
  line: ONE$2,
16025
16031
  column: ONE$2,
16026
- rule: RULE$36,
16032
+ rule: RULE$37,
16027
16033
  message: "msch could not list the tasks with `vp run --json`"
16028
16034
  }],
16029
16035
  onSome: (found) => pipe(commanded, Array$1.flatMap((document) => problemsIn$12(found, absolute, document)))
16030
16036
  });
16031
16037
  });
16032
16038
  // src/features/check-legacy-web/model/legacy-web.ts
16033
- const RULE$35 = "legacy-web";
16039
+ const RULE$36 = "legacy-web";
16034
16040
  const FIRST_COLUMN$7 = 1;
16035
16041
  const SCANNER = fileURLToPath(new URL("./skills/modern-web-guidance/modern-web.mjs", import.meta.resolve("modern-web-guidance/package.json")));
16036
16042
  const Finding = Schema.Struct({
@@ -16069,7 +16075,7 @@ const checkLegacyWeb = Effect.fn("checkLegacyWeb")(function* checkLegacyWeb(root
16069
16075
  file: files.join(root, file),
16070
16076
  line,
16071
16077
  column: FIRST_COLUMN$7,
16072
- rule: RULE$35,
16078
+ rule: RULE$36,
16073
16079
  message: `${ruleId}: ${message} Read the guide with \`modern-web-guidance retrieve ${guideId}\` and apply it.`
16074
16080
  });
16075
16081
  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 +16146,7 @@ const SHELL_SHEBANG = /^#!\S*(?:\/|\s)(?:env\s+)?(?:-\S+\s+)*(?:ba|z|k|da)?sh\b|
16140
16146
  const EXTENSION$1 = /\.[^./]+$/u;
16141
16147
  const SETTINGS_FILE = ".claude/settings.json";
16142
16148
  const READ_CONCURRENCY$18 = 64;
16143
- const RULE$34 = "shell-script";
16149
+ const RULE$35 = "shell-script";
16144
16150
  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
16151
  const HookSchema = Schema.Struct({
16146
16152
  command: Schema.optional(Schema.String),
@@ -16173,7 +16179,7 @@ const checkShellScripts = Effect.fn("checkShellScripts")(function* checkShellScr
16173
16179
  };
16174
16180
  const candidates = pipe(names, Array$1.filter((name) => !isSessionStartHook(name)));
16175
16181
  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)));
16182
+ return pipe(shell, Array$1.map((name) => problemInFile(RULE$35)(files.join(root, name), MESSAGE$8)));
16177
16183
  });
16178
16184
  // src/features/check-structure/model/structure.ts
16179
16185
  const checkStructure = checkSection({
@@ -16411,7 +16417,7 @@ const commandSources = Effect.fn("commandSources")(function* commandSources(root
16411
16417
  return Array$1.flatten(found);
16412
16418
  });
16413
16419
  // src/features/check-vite-plus/model/package-scripts.ts
16414
- const RULE$33 = "package-script";
16420
+ const RULE$34 = "package-script";
16415
16421
  const LIFECYCLE = [
16416
16422
  "preinstall",
16417
16423
  "install",
@@ -16434,12 +16440,12 @@ const LIFECYCLE = [
16434
16440
  const problemOf$6 = ({ file, position, name }) => ({
16435
16441
  file,
16436
16442
  ...position,
16437
- rule: RULE$33,
16443
+ rule: RULE$34,
16438
16444
  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
16445
  });
16440
16446
  const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$6));
16441
16447
  // src/features/check-vite-plus/model/vite-plus-block.ts
16442
- const RULE$32 = "vite-plus-block";
16448
+ const RULE$33 = "vite-plus-block";
16443
16449
  const MARKER$1 = Array$1.join([
16444
16450
  "<!--",
16445
16451
  "VITE PLUS START",
@@ -16452,7 +16458,7 @@ const problemIn = (file) => (source) => {
16452
16458
  return Option.some({
16453
16459
  file,
16454
16460
  ...positionOf(source)(index.value),
16455
- rule: RULE$32,
16461
+ rule: RULE$33,
16456
16462
  message: MESSAGE$7
16457
16463
  });
16458
16464
  };
@@ -16485,7 +16491,7 @@ const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
16485
16491
  return pipe(drifts, Array$1.map(problemOf$5));
16486
16492
  });
16487
16493
  // src/features/check-workflows/model/release-please.ts
16488
- const RULE$31 = "release-please";
16494
+ const RULE$32 = "release-please";
16489
16495
  const RELEASE_PLEASE_FILE = /(?:^|\/)(?:release-please-config|\.release-please-manifest)\.json$/u;
16490
16496
  const FIRST$8 = 1;
16491
16497
  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 +16503,7 @@ const checkReleasePlease = Effect.fn("checkReleasePlease")(function* checkReleas
16497
16503
  file: files.join(root, name),
16498
16504
  line: FIRST$8,
16499
16505
  column: FIRST$8,
16500
- rule: RULE$31,
16506
+ rule: RULE$32,
16501
16507
  message: MESSAGE$6
16502
16508
  })));
16503
16509
  });
@@ -16785,7 +16791,7 @@ const scannedFiles = Effect.fn("scannedFiles")(function* scannedFiles(root) {
16785
16791
  })), Array$1.filter(({ file }) => !HashSet.has(skipped, file)));
16786
16792
  });
16787
16793
  // src/features/ban-comments/model/comments.ts
16788
- const RULE$30 = "comment";
16794
+ const RULE$31 = "comment";
16789
16795
  const SUPPRESSION_RULE = "suppression";
16790
16796
  const UNUSED_RULE = "unused-comment-allowance";
16791
16797
  const CONFIG_FILE$3 = "vite.config.ts";
@@ -16817,7 +16823,7 @@ const NOTHING = {
16817
16823
  used: []
16818
16824
  };
16819
16825
  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)));
16826
+ 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
16827
  const settingsOf = ({ msch }) => ({ allow: pipe(Option.fromUndefinedOr(msch), Option.flatMap(({ comments }) => Option.fromUndefinedOr(comments)), Option.match({
16822
16828
  onNone: () => NO_SETTINGS.allow,
16823
16829
  onSome: ({ allow }) => allow
@@ -16854,7 +16860,7 @@ const scanFile = ({ directives, allowances, comments }) => ({ name, file }, sour
16854
16860
  problems: pipe(found, Array$1.filter(kept), Array$1.map(toProblem)),
16855
16861
  used: usedAllowances(allowances, found)
16856
16862
  })), 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}`)],
16863
+ problems: [problemAtIndex(RULE$31)(file, source)(START$18, `msch could not read the comments in this file: ${message}`)],
16858
16864
  used: []
16859
16865
  })))
16860
16866
  });
@@ -16967,7 +16973,7 @@ const PYTHON = {
16967
16973
  /** @internal */
16968
16974
  const checkPython = (root) => checkBannedTool(root, PYTHON);
16969
16975
  // src/features/check-catalog-entries/model/uncataloged-dependencies.ts
16970
- const RULE$29 = "uncataloged-dependency";
16976
+ const RULE$30 = "uncataloged-dependency";
16971
16977
  const OWNED_ELSEWHERE = [
16972
16978
  "catalog:",
16973
16979
  "workspace:",
@@ -16981,7 +16987,7 @@ const isOwnedElsewhere = ({ specifier }) => pipe(OWNED_ELSEWHERE, Array$1.some((
16981
16987
  const problemsIn$11 = (entry, source) => pipe(manifestSpecifiers(source), Array$1.filter((found) => !isOwnedElsewhere(found)), Array$1.map((found) => ({
16982
16988
  file: entry.file,
16983
16989
  ...positionOf(source)(offsetIn(source)(manifestPattern(found))),
16984
- rule: RULE$29,
16990
+ rule: RULE$30,
16985
16991
  message: `\`${found.name}\` \`${found.specifier}\` ${MESSAGE$4}`
16986
16992
  })));
16987
16993
  /** @internal */
@@ -17002,7 +17008,7 @@ const uncatalogedDependencies = Effect.fn("uncatalogedDependencies")(function* u
17002
17008
  const WORKSPACE_FILE$3 = "pnpm-workspace.yaml";
17003
17009
  const FIRST_LINE$5 = 1;
17004
17010
  const FIRST_COLUMN$5 = 1;
17005
- const RULE$28 = "prune-setting-off";
17011
+ const RULE$29 = "prune-setting-off";
17006
17012
  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
17013
  const decodeTrue = Schema.decodeUnknownOption(Schema.Literal(true));
17008
17014
  const lineOf$3 = (source) => (setting) => pipe(String$1.split(source, "\n"), Array$1.findFirstIndex(String$1.startsWith(`${setting}:`)), Option.match({
@@ -17016,7 +17022,7 @@ const pruneProblems = Effect.fn("pruneProblems")(function* pruneProblems(file, s
17016
17022
  file,
17017
17023
  line: at(setting),
17018
17024
  column: FIRST_COLUMN$5,
17019
- rule: RULE$28,
17025
+ rule: RULE$29,
17020
17026
  message: `Set \`${setting}: true\`. It ${effect}`
17021
17027
  })));
17022
17028
  });
@@ -17110,13 +17116,13 @@ const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(r
17110
17116
  ];
17111
17117
  });
17112
17118
  // src/features/check-skills/model/published-skills.ts
17113
- const RULE$27 = "published-skills";
17119
+ const RULE$28 = "published-skills";
17114
17120
  const KEYWORD = "tanstack-intent";
17115
17121
  const SKILLS = "skills";
17116
17122
  const SKILL_FILE$3 = "SKILL.md";
17117
17123
  const SUCCEEDED = 0;
17118
17124
  const INTENT_CLI = fileURLToPath(new URL("./cli.mjs", import.meta.resolve("@tanstack/intent")));
17119
- const problemAt$2 = problemInFile(RULE$27);
17125
+ const problemAt$2 = problemInFile(RULE$28);
17120
17126
  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
17127
  const isShipped = (listed) => (skill) => Array$1.contains(listed, SKILLS) || Array$1.contains(listed, skill);
17122
17128
  const packagingMessages = ({ keywords, files }, skills) => {
@@ -17153,7 +17159,7 @@ const checkPublishedSkills = Effect.fn("checkPublishedSkills")(function* checkPu
17153
17159
  return Array$1.flatten(problems);
17154
17160
  });
17155
17161
  // src/features/check-skills/model/skill-files.ts
17156
- const RULE$26 = "skill-file";
17162
+ const RULE$27 = "skill-file";
17157
17163
  const SKILL_FILE$2 = /(?:^|\/)SKILL\.md$/u;
17158
17164
  const INSTALLED = /(?:^|\/)\.(?:agents|claude|codex)\/skills\//u;
17159
17165
  const FIXTURE$1 = /(?:^|\/)fixtures\//u;
@@ -17210,7 +17216,7 @@ const frontmatterProblems = (skill, folder) => pipe(frontmatterOf(skill.source),
17210
17216
  ]), Option.getOrElse(() => []), Array$1.map(({ index, message }) => ({
17211
17217
  file: skill.file,
17212
17218
  ...positionOf(skill.source)(index),
17213
- rule: RULE$26,
17219
+ rule: RULE$27,
17214
17220
  message
17215
17221
  })));
17216
17222
  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 +17243,7 @@ const linkProblems = Effect.fn("linkProblems")(function* linkProblems(file) {
17237
17243
  return pipe(missing, Array$1.map(({ target, index }) => ({
17238
17244
  file,
17239
17245
  ...positionOf(source)(index),
17240
- rule: RULE$26,
17246
+ rule: RULE$27,
17241
17247
  message: `links to ${target}, which does not exist. Fix the path or remove the link.`
17242
17248
  })));
17243
17249
  });
@@ -17253,7 +17259,7 @@ const problemsIn$9 = Effect.fn("problemsIn")(function* problemsIn(root, listed,
17253
17259
  file: files.join(root, entry),
17254
17260
  line: FIRST$7,
17255
17261
  column: FIRST$7,
17256
- rule: RULE$26,
17262
+ rule: RULE$27,
17257
17263
  message: "is a license file inside a skill. Skills here carry neither a license field nor a LICENSE file. Delete it."
17258
17264
  })));
17259
17265
  return [
@@ -17331,7 +17337,7 @@ const cargoEntries = (text) => {
17331
17337
  };
17332
17338
  const toolchainEntries = (text) => singleEntry("channel", fieldOf("channel")(parseToml(text)["toolchain"]));
17333
17339
  // src/features/check-version-downgrades/model/version-downgrade.ts
17334
- const RULE$25 = "version-downgrade";
17340
+ const RULE$26 = "version-downgrade";
17335
17341
  const READ_CONCURRENCY$14 = 16;
17336
17342
  const READERS = [
17337
17343
  [/(?:^|\/)package\.json$/u, manifestEntries],
@@ -17356,7 +17362,7 @@ const downgradesIn = ({ file, text, before, after }) => {
17356
17362
  file,
17357
17363
  line: lineOf$2(text, entry),
17358
17364
  column: FIRST_LINE$4,
17359
- rule: RULE$25,
17365
+ rule: RULE$26,
17360
17366
  message: message$1(old, entry)
17361
17367
  })), Option.toArray)));
17362
17368
  };
@@ -17439,7 +17445,7 @@ const manifestTexts = Effect.fn("manifestTexts")(function* manifestTexts(root) {
17439
17445
  return Array$1.getSomes(read);
17440
17446
  });
17441
17447
  // src/features/check-version-downgrades/model/package-versions.ts
17442
- const RULE$24 = "unbumped-package";
17448
+ const RULE$25 = "unbumped-package";
17443
17449
  const UNSHIPPED = /(?:\.test\.[\w.]+$|(?:^|\/)(?:fixtures|__tests__|tests?)\/|(?:^|\/)(?:AGENTS|CLAUDE|CHANGELOG)\.md$)/u;
17444
17450
  const UNVERSIONED$5 = "0.0.0";
17445
17451
  const FIRST_LINE$3 = 1;
@@ -17514,7 +17520,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17514
17520
  file: files.join(root, pack.file),
17515
17521
  line: versionLine(pack.text),
17516
17522
  column: FIRST_COLUMN$4,
17517
- rule: RULE$24,
17523
+ rule: RULE$25,
17518
17524
  message: message(pack, part, lowest)
17519
17525
  })), Option.toArray);
17520
17526
  }), { concurrency: READ_CONCURRENCY$11 });
@@ -17523,7 +17529,7 @@ const checkPackageVersions = Effect.fn("checkPackageVersions")(function* checkPa
17523
17529
  // src/features/find-unneeded-files/model/applied-packages.ts
17524
17530
  const SCOPE$1 = Option.getOrElse(scopeOfName(SELF_NAME), () => SELF_NAME);
17525
17531
  const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
17526
- const RULE$23 = "applied-package";
17532
+ const RULE$24 = "applied-package";
17527
17533
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
17528
17534
  const NOT_FOUND$3 = -1;
17529
17535
  const SEPARATOR$9 = "/";
@@ -17559,7 +17565,7 @@ const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
17559
17565
  const problemAt$1 = (file, source) => (index, name) => ({
17560
17566
  file,
17561
17567
  ...positionOf(source)(index),
17562
- rule: RULE$23,
17568
+ rule: RULE$24,
17563
17569
  message: `msch applies ${name}. Remove this use and let msch apply it.`
17564
17570
  });
17565
17571
  const specifierPattern = ({ name }) => new RegExp(`["'\`]${escaped$1(name)}(?=["'\`/])`, "gu");
@@ -17614,7 +17620,7 @@ const checkAppliedPackages = Effect.fn("checkAppliedPackages")(function* checkAp
17614
17620
  return yield* appliedPackageProblems(root, applied);
17615
17621
  });
17616
17622
  // src/features/find-unneeded-files/model/replaced-tools.ts
17617
- const RULE$22 = "replaced-tool";
17623
+ const RULE$23 = "replaced-tool";
17618
17624
  const FIRST$6 = 1;
17619
17625
  const TASKS = "Vite+ tasks in run.tasks of vite.config.ts, run with `vp run`";
17620
17626
  const HOOKS = "the hooks in .vite-hooks/ that `vp config` installs";
@@ -17695,7 +17701,7 @@ const problemFor$1 = ({ name, file }) => pipe(REPLACED, Array$1.findFirst(({ pat
17695
17701
  file,
17696
17702
  line: FIRST$6,
17697
17703
  column: FIRST$6,
17698
- rule: RULE$22,
17704
+ rule: RULE$23,
17699
17705
  message: `belongs to ${tool}, which this repository replaced with ${replacement}. Move what is still needed there and delete this file.`
17700
17706
  })));
17701
17707
  /** @internal */
@@ -17834,7 +17840,7 @@ const checkUnneededFiles = Effect.fn("checkUnneededFiles")(function* checkUnneed
17834
17840
  return yield* unneededIn(root, cargoEnabled(workspace.value));
17835
17841
  });
17836
17842
  // src/features/check-markdown-directives/model/directives.ts
17837
- const RULE$21 = "markdown-directive";
17843
+ const RULE$22 = "markdown-directive";
17838
17844
  const START$13 = 0;
17839
17845
  const SECOND = 1;
17840
17846
  const ODD = 1;
@@ -17859,7 +17865,7 @@ const problemsIn$7 = (file, source) => {
17859
17865
  const { line, column } = positionOf(source)(index);
17860
17866
  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
17867
  };
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)));
17868
+ 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
17869
  };
17864
17870
  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
17871
  /** @internal */
@@ -17872,7 +17878,7 @@ const checkMarkdownDirectives = Effect.fn("checkMarkdownDirectives")(function* c
17872
17878
  }))), ({ file }, source) => problemsIn$7(file, source));
17873
17879
  });
17874
17880
  // src/features/check-owner-markers/model/owner-markers.ts
17875
- const RULE$20 = "owner-decision-removed";
17881
+ const RULE$21 = "owner-decision-removed";
17876
17882
  const MARKER = /\(owner, \d{4}-\d{2}-\d{2}\)/gu;
17877
17883
  const TRAILER = /^Owner-Decision-(?:Moved|Revoked):[ \t]*\S/mu;
17878
17884
  const READ_CONCURRENCY$10 = 16;
@@ -17912,10 +17918,10 @@ const checkOwnerMarkers = Effect.fn("checkOwnerMarkers")(function* checkOwnerMar
17912
17918
  if (Option.isNone(base)) return [];
17913
17919
  const removals = yield* removalsSince(root, base.value);
17914
17920
  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))));
17921
+ return pipe(removals, Array$1.map((removal) => problemInFile(RULE$21)(removal.file, messageOf$1(removal))));
17916
17922
  });
17917
17923
  // src/features/check-owner-names/model/owner-names.ts
17918
- const RULE$19 = "owner-name";
17924
+ const RULE$20 = "owner-name";
17919
17925
  const TEXT_FILE$1 = /\.(?:[cm]?[jt]sx?|jsonc?|md|ya?ml|toml)$/u;
17920
17926
  const REGEX_SPECIAL = /[.*+?^${}()|[\]\\/]/gu;
17921
17927
  const SEPARATOR$7 = "/";
@@ -17928,7 +17934,7 @@ const DECLARED = [
17928
17934
  const CONFIG_FILE$1 = "vite.config.ts";
17929
17935
  const ANY_OWNER = /\banyOwner:\s*true\b/u;
17930
17936
  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.`;
17937
+ 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
17938
  const spansOf = (pattern, source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.flatMap((match) => {
17933
17939
  const [token] = match;
17934
17940
  return pipe(Option.fromUndefinedOr(match.index), Option.map((start) => ({
@@ -17957,8 +17963,8 @@ const manifestProblems$3 = ({ owner, file, manifest }) => pipe(ownerOffsets({
17957
17963
  }), Array$1.head, Option.toArray, Array$1.map(() => ({
17958
17964
  file,
17959
17965
  ...positionOf("")(START$12),
17960
- rule: RULE$19,
17961
- message: `Its description or keywords ${messageFor$3(owner)}`
17966
+ rule: RULE$20,
17967
+ message: `Its description or keywords ${messageFor$4(owner)}`
17962
17968
  })));
17963
17969
  const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProblems(root, owner, directory) {
17964
17970
  const files = yield* RepositoryFiles;
@@ -17978,8 +17984,8 @@ const workspaceProblems = Effect.fn("workspaceProblems")(function* workspaceProb
17978
17984
  }), Array$1.map((offset) => ({
17979
17985
  file,
17980
17986
  ...positionOf(source)(offset),
17981
- rule: RULE$19,
17982
- message: messageFor$3(owner)
17987
+ rule: RULE$20,
17988
+ message: messageFor$4(owner)
17983
17989
  }))));
17984
17990
  return [...manifestProblems$3({
17985
17991
  owner,
@@ -18011,14 +18017,14 @@ const START$11 = 0;
18011
18017
  const HEX = 16;
18012
18018
  const CODE_POINT_WIDTH = 4;
18013
18019
  const READ_CONCURRENCY$9 = 64;
18014
- const RULE$18 = "hidden-unicode";
18020
+ const RULE$19 = "hidden-unicode";
18015
18021
  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
18022
  const problemOf$3 = (file, source) => (found) => {
18017
18023
  const hex = hexOf(found[START$11]);
18018
18024
  return {
18019
18025
  file,
18020
18026
  ...positionOf(source)(found.index ?? START$11),
18021
- rule: RULE$18,
18027
+ rule: RULE$19,
18022
18028
  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
18029
  };
18024
18030
  };
@@ -18051,7 +18057,7 @@ const checkDocuments = Effect.fn("checkDocuments")(function* checkDocuments(root
18051
18057
  return Array$1.flatten(found);
18052
18058
  });
18053
18059
  // src/features/check-effect-diagnostics/model/effect-diagnostics.ts
18054
- const RULE$17 = "effect-diagnostics-once";
18060
+ const RULE$18 = "effect-diagnostics-once";
18055
18061
  const PLUGIN = "@effect/language-service";
18056
18062
  const CONFIG_PATHSPEC = ":(glob)**/tsconfig*.json";
18057
18063
  const EXCLUDED$4 = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
@@ -18069,7 +18075,7 @@ const reportsDiagnostics = (plugin) => plugin.name === PLUGIN && plugin.diagnost
18069
18075
  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
18076
  file: entry.file,
18071
18077
  ...positionOf(source)(pipe(String$1.indexOf(`"${PLUGIN}"`)(source), Option.getOrElse(() => START$10))),
18072
- rule: RULE$17,
18078
+ rule: RULE$18,
18073
18079
  message: MESSAGE$2
18074
18080
  })), Option.toArray);
18075
18081
  /** @internal */
@@ -18082,7 +18088,7 @@ const checkEffectDiagnostics = Effect.fn("checkEffectDiagnostics")(function* che
18082
18088
  }))), problemsIn$5);
18083
18089
  });
18084
18090
  // src/features/check-exact-versions/model/exact-versions.ts
18085
- const RULE$16 = "version-range";
18091
+ const RULE$17 = "version-range";
18086
18092
  const WORKSPACE_FILE = "pnpm-workspace.yaml";
18087
18093
  const ALIAS = /^npm:(?:@[^/@]+\/)?[^@]+@(?<version>.+)$/u;
18088
18094
  const PROTOCOL = /^[a-z+]+:/u;
@@ -18098,7 +18104,7 @@ const isRange = (specifier) => {
18098
18104
  const problemsFor = (file, source, pattern) => (found) => pipe(found, Array$1.filter(({ specifier }) => isRange(specifier)), Array$1.map((range) => ({
18099
18105
  file,
18100
18106
  ...positionOf(source)(offsetIn(source)(pattern(range))),
18101
- rule: RULE$16,
18107
+ rule: RULE$17,
18102
18108
  message: `\`${range.name}\` \`${range.specifier}\` ${MESSAGE$1}`
18103
18109
  })));
18104
18110
  const catalogPattern = ({ name }) => new RegExp(`^\\s+["']?${quoted$1(name)}["']?:`, "mu");
@@ -18127,7 +18133,7 @@ const checkExactVersions = Effect.fn("checkExactVersions")(function* checkExactV
18127
18133
  return [...fromManifests, ...fromCatalogs];
18128
18134
  });
18129
18135
  // src/features/check-pack-settings/model/pack-settings.ts
18130
- const RULE$15 = "pack-publint";
18136
+ const RULE$16 = "pack-publint";
18131
18137
  const CONFIG_FILE = "vite.config.ts";
18132
18138
  const PACK_KEY = "pack:";
18133
18139
  const START$9 = 0;
@@ -18143,7 +18149,7 @@ const runsStrictPublint = (config) => pipe(decodePackConfig(config), Option.flat
18143
18149
  const problemFor = (file, source) => ({
18144
18150
  file,
18145
18151
  ...positionOf(source)(Option.getOrElse(String$1.indexOf(PACK_KEY)(source), () => START$9)),
18146
- rule: RULE$15,
18152
+ rule: RULE$16,
18147
18153
  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
18154
  });
18149
18155
  const strictPublintIn = Effect.fn("strictPublintIn")(function* strictPublintIn(configFile) {
@@ -18172,11 +18178,89 @@ const checkPackSettings = Effect.fn("checkPackSettings")(function* checkPackSett
18172
18178
  const found = yield* Effect.forEach(manifests, (name) => problemsIn$4(root, name), { concurrency: READ_CONCURRENCY$8 });
18173
18179
  return Array$1.flatten(found);
18174
18180
  });
18181
+ // src/features/check-published-manifest/model/private-dependency.ts
18182
+ const RULE$15 = "private-workspace-dependency";
18183
+ const START$8 = 0;
18184
+ 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) => ({
18185
+ section,
18186
+ name
18187
+ })))));
18188
+ 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.`;
18189
+ /** @internal */
18190
+ const quotedNameIndex = (source) => (name) => pipe(String$1.indexOf(`"${name}"`)(source), Option.getOrElse(() => START$8));
18191
+ /** @internal */
18192
+ 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))));
18193
+ // src/features/check-published-manifest/model/dependency-peer-floor.ts
18194
+ const RULE$14 = "dependency-peer-floor";
18195
+ const NODE_MODULES = "node_modules";
18196
+ const namesOf$1 = (section) => pipe(Option.fromUndefinedOr(section), Option.map(Record.keys), Option.getOrElse(() => []));
18197
+ const isOptional = (manifest, peer) => pipe(Option.fromUndefinedOr(manifest.peerDependenciesMeta), Option.flatMap(Record.get(peer)), Option.exists((meta) => meta.optional === true));
18198
+ const requiredPeersOf = (manifest) => pipe(Option.fromUndefinedOr(manifest.peerDependencies), Option.getOrElse(() => ({})), Record.filter((_range, peer) => !isOptional(manifest, peer)));
18199
+ const firstManifest = Effect.fn("firstManifest")(function* firstManifest(directories) {
18200
+ const files = yield* RepositoryFiles;
18201
+ const texts = yield* Effect.forEach(directories, (directory) => files.readFile(files.join(directory, PACKAGE_JSON_FILE)), { concurrency: 1 });
18202
+ return pipe(Array$1.getSomes(texts), Array$1.head, Option.flatMap(decodePackageJson));
18203
+ });
18204
+ const nearDirectories = Effect.fn("nearDirectories")(function* nearDirectories(listedDirectory, listed, name) {
18205
+ const files = yield* RepositoryFiles;
18206
+ const real = yield* files.realPath(listedDirectory);
18207
+ const up = pipe(String$1.split(listed, "/"), Array$1.map(() => ".."));
18208
+ const store = files.resolve(real, ...up);
18209
+ return [files.join(real, NODE_MODULES, name), files.join(store, name)];
18210
+ });
18211
+ const requirementsFrom = (manifest, listed, via) => pipe(manifest, Option.map(requiredPeersOf), Option.map(Record.toEntries), Option.getOrElse(() => []), Array$1.map(([peer, needs]) => ({
18212
+ listed,
18213
+ via,
18214
+ peer,
18215
+ needs
18216
+ })));
18217
+ const transitiveRequirements = Effect.fn("transitiveRequirements")(function* transitive(directory, listed, skipped) {
18218
+ const listedDirectory = (yield* RepositoryFiles).join(directory, NODE_MODULES, listed);
18219
+ const manifest = yield* firstManifest([listedDirectory]);
18220
+ const peers = pipe(manifest, Option.map(requiredPeersOf), Option.map(Record.keys), Option.getOrElse(() => []), Array$1.filter((peer) => !skipped.has(peer)));
18221
+ 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 });
18222
+ return {
18223
+ manifest,
18224
+ nested: Array$1.flatten(nested)
18225
+ };
18226
+ });
18227
+ const requirementsOf = Effect.fn("requirementsOf")(function* requirementsOf(found) {
18228
+ const directory = (yield* RepositoryFiles).dirname(found.entry.file);
18229
+ const dependencies = namesOf$1(found.manifest.dependencies);
18230
+ const peers = namesOf$1(found.manifest.peerDependencies);
18231
+ const skipped = /* @__PURE__ */ new Set([...dependencies, ...peers]);
18232
+ const direct = (name, manifest) => requirementsFrom(pipe(manifest, Option.filter(() => Array$1.contains(dependencies, name))), name, Option.none());
18233
+ const listed = yield* Effect.forEach([...dependencies, ...peers], (name) => transitiveRequirements(directory, name, skipped).pipe(Effect.map(({ manifest, nested }) => [...direct(name, manifest), ...nested])), { concurrency: 1 });
18234
+ return [found.entry.file, Array$1.flatten(listed)];
18235
+ });
18236
+ /** @internal */
18237
+ const installedPeersOf = Effect.fn("installedPeersOf")(function* installedPeersOf(found) {
18238
+ const entries = yield* Effect.forEach(found, requirementsOf, { concurrency: 4 });
18239
+ return new Map(entries);
18240
+ });
18241
+ const acceptsFloor = (needs, accepts) => pipe(Option.fromNullishOr(semver.minVersion(accepts)), Option.match({
18242
+ onNone: () => true,
18243
+ onSome: (floor) => semver.validRange(needs) === null || semver.satisfies(floor, needs)
18244
+ }));
18245
+ const mismatchOf = (own) => (requirement) => pipe(Record.get(own, requirement.peer), Option.filter((accepts) => !acceptsFloor(requirement.needs, accepts)), Option.map((accepts) => ({
18246
+ ...requirement,
18247
+ accepts
18248
+ })), Option.toArray);
18249
+ const messageFor$2 = ({ listed, via, peer, needs, accepts }) => Option.match(via, {
18250
+ 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.`,
18251
+ 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.`
18252
+ });
18253
+ const ownPeers = ({ manifest }) => requiredPeersOf(manifest);
18254
+ /** @internal */
18255
+ const dependencyPeerFloorProblems = (installed) => (found) => {
18256
+ const mismatches = mismatchOf(ownPeers(found));
18257
+ 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))));
18258
+ };
18175
18259
  // src/features/check-published-manifest/model/package-homepage.ts
18176
- const RULE$14 = "package-homepage";
18260
+ const RULE$13 = "package-homepage";
18177
18261
  const BRANCH = "main";
18178
18262
  const ROOT_DIRECTORY$1 = ".";
18179
- const START$8 = 0;
18263
+ const START$7 = 0;
18180
18264
  const KEYS = [
18181
18265
  "\"homepage\"",
18182
18266
  "\"repository\"",
@@ -18202,56 +18286,53 @@ const messagesOf = (manifest, directory) => pipe(decodeRepository$1(manifest.rep
18202
18286
  onNone: () => [repositoryMissing(directory)],
18203
18287
  onSome: repositoryMessages(manifest, directory)
18204
18288
  }));
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));
18289
+ 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
18290
  /** @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)));
18291
+ 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
18292
  // src/features/check-published-manifest/model/package-scope.ts
18209
- const RULE$13 = "package-scope";
18293
+ const RULE$12 = "package-scope";
18210
18294
  const NAME_KEY = "\"name\"";
18211
- const START$7 = 0;
18295
+ const START$6 = 0;
18212
18296
  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));
18297
+ const nameIndex = (source) => pipe(String$1.indexOf(NAME_KEY)(source), Option.getOrElse(() => START$6));
18214
18298
  const BY_COUNT = Order.mapInput(Order.Number, ([, names]) => names.length);
18215
18299
  /** @internal */
18216
18300
  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
18301
  onEmpty: () => Option.none(),
18218
- onNonEmpty: (groups) => Option.some(Array$1.max(BY_COUNT)(groups)[START$7])
18302
+ onNonEmpty: (groups) => Option.some(Array$1.max(BY_COUNT)(groups)[START$6])
18219
18303
  }));
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)}".`;
18304
+ 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)}".`;
18221
18305
  /** @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));
18232
- /** @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))));
18306
+ 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
18307
  // src/features/check-published-manifest/model/published-manifests.ts
18235
18308
  const privateNamesIn = Effect.fn("privateNamesIn")(function* privateNamesIn(root) {
18236
18309
  const manifests = yield* manifestTexts(root);
18237
18310
  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
18311
  });
18312
+ const publishedIn = Effect.fn("publishedIn")(function* publishedIn(root) {
18313
+ const published = [];
18314
+ yield* scanPublishedManifests(root, (found) => {
18315
+ published.push(found);
18316
+ return [];
18317
+ });
18318
+ return published;
18319
+ });
18239
18320
  /** @internal */
18240
18321
  const checkPublishedManifests = Effect.fn("checkPublishedManifests")(function* checkPublishedManifests(root) {
18241
18322
  const files = yield* RepositoryFiles;
18242
18323
  const homepage = homepageProblems(files.dirname);
18243
18324
  const privateNames = yield* privateNamesIn(root);
18244
18325
  const privateDependencies = privateDependencyProblems(privateNames);
18245
- const names = [];
18246
- yield* scanPublishedManifests(root, ({ manifest }) => {
18247
- names.push(...Option.toArray(Option.fromUndefinedOr(manifest.name)));
18248
- return [];
18249
- });
18326
+ const published = yield* publishedIn(root);
18327
+ const installed = yield* installedPeersOf(published);
18328
+ const peerFloor = dependencyPeerFloorProblems(installed);
18329
+ const names = pipe(published, Array$1.flatMap(({ manifest }) => Option.toArray(Option.fromUndefinedOr(manifest.name))));
18250
18330
  const scoped = pipe(sharedScope(names), Option.map(scopeProblems), Option.getOrElse(() => () => []));
18251
18331
  return yield* scanPublishedManifests(root, (found) => [
18252
18332
  ...scoped(found),
18253
18333
  ...homepage(found),
18254
- ...privateDependencies(found)
18334
+ ...privateDependencies(found),
18335
+ ...peerFloor(found)
18255
18336
  ]);
18256
18337
  });
18257
18338
  // src/features/check-runtime-version/model/node-version.ts