@r_masseater/msch 0.81.0 → 0.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -12139,7 +12139,7 @@ const checkRustModules = Effect.fn("checkRustModules")(function* checkRustModule
12139
12139
  // src/features/check-placement/model/shadcn-ui-alias.ts
12140
12140
  const RULE$51 = "shadcn-ui-alias";
12141
12141
  const FIRST$15 = 1;
12142
- const problemOf$9 = (directory, { file, alias }) => ({
12142
+ const problemOf$10 = (directory, { file, alias }) => ({
12143
12143
  file,
12144
12144
  line: FIRST$15,
12145
12145
  column: FIRST$15,
@@ -12155,7 +12155,7 @@ const shadcnAliasProblems = Effect.fn("shadcnAliasProblems")(function* shadcnAli
12155
12155
  onNone: () => Effect.succeed(false),
12156
12156
  onSome: (target) => files.isDirectory(files.join(root, directory, target)).pipe(Effect.map(Option.getOrElse(() => false)))
12157
12157
  })) return Array$1.empty();
12158
- return [problemOf$9(directory, found.value)];
12158
+ return [problemOf$10(directory, found.value)];
12159
12159
  });
12160
12160
  // src/features/check-placement/model/source-aliases.ts
12161
12161
  const ALIAS_RULE = "source-alias";
@@ -12435,7 +12435,7 @@ const isMissing$2 = Effect.fn("isMissing")(function* isMissing(root, file, menti
12435
12435
  return !pipe(ignored, Array$1.some(Boolean));
12436
12436
  });
12437
12437
  const byIndex = Order.mapInput(Order.Number, ({ index }) => index);
12438
- const problemOf$8 = (file, source) => (mention) => ({
12438
+ const problemOf$9 = (file, source) => (mention) => ({
12439
12439
  file,
12440
12440
  ...positionOf(source)(mention.index),
12441
12441
  rule: RULE$50,
@@ -12452,7 +12452,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(root, name) {
12452
12452
  if (Option.isNone(source)) return [];
12453
12453
  const mentions = yield* mentionsIn(file, source.value);
12454
12454
  const missing = yield* Effect.filter(mentions, (mention) => isMissing$2(root, file, mention), { concurrency: READ_CONCURRENCY$22 });
12455
- return pipe(Array$1.sort(missing, byIndex), Array$1.map(problemOf$8(file, source.value)));
12455
+ return pipe(Array$1.sort(missing, byIndex), Array$1.map(problemOf$9(file, source.value)));
12456
12456
  });
12457
12457
  const unmatchedPatterns = Effect.fn("unmatchedPatterns")(function* unmatchedPatterns(root) {
12458
12458
  const files = yield* RepositoryFiles;
@@ -12989,7 +12989,7 @@ const isMissing$1 = Effect.fn("isMissing")(function* isMissing(root, produced, f
12989
12989
  if (yield* RESOLVERS[found.kind](root, found.path)) return false;
12990
12990
  return !(yield* isIgnored(root, found.path));
12991
12991
  });
12992
- const problemOf$7 = (file, source) => (found) => ({
12992
+ const problemOf$8 = (file, source) => (found) => ({
12993
12993
  file,
12994
12994
  ...positionOf(source)(found.offset),
12995
12995
  rule: RULE$42,
@@ -13002,7 +13002,7 @@ const problemsIn$14 = Effect.fn("problemsIn")(function* problemsIn(root, workflo
13002
13002
  if (Option.isNone(source)) return [];
13003
13003
  const produced = producedPaths(source.value);
13004
13004
  const missing = yield* Effect.filter(workflowReferences(source.value), (found) => isMissing$1(root, produced, found));
13005
- return pipe(missing, Array$1.map(problemOf$7(file, source.value)));
13005
+ return pipe(missing, Array$1.map(problemOf$8(file, source.value)));
13006
13006
  });
13007
13007
  /** @internal */
13008
13008
  const checkWorkflowPaths = Effect.fn("checkWorkflowPaths")(function* checkWorkflowPaths(root) {
@@ -13912,7 +13912,7 @@ const CONDITIONS = [
13912
13912
  "default"
13913
13913
  ];
13914
13914
  const problemFor$2 = problemInFile(RULE$36);
13915
- const problemOf$6 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
13915
+ const problemOf$7 = (file, detail) => problemFor$2(file, `does not bundle as a Worker, so the deploy would fail. ${detail}`);
13916
13916
  const bundleProblem = (file) => Effect.gen(function* bundle() {
13917
13917
  const built = yield* Effect.tryPromise({
13918
13918
  try: () => rolldown({
@@ -13931,7 +13931,7 @@ const bundleProblem = (file) => Effect.gen(function* bundle() {
13931
13931
  yield* Effect.promise(() => built.close());
13932
13932
  }).pipe(Effect.match({
13933
13933
  onSuccess: () => Option.none(),
13934
- onFailure: (detail) => Option.some(problemOf$6(file, detail))
13934
+ onFailure: (detail) => Option.some(problemOf$7(file, detail))
13935
13935
  }));
13936
13936
  /** @internal */
13937
13937
  const checkWorkerBundles = Effect.fn("checkWorkerBundles")(function* checkWorkerBundles(root) {
@@ -14054,7 +14054,7 @@ const listedProblem = ({ file, line, column, names, reason }) => ({
14054
14054
  rule: RULE$35,
14055
14055
  message: `The names ${formatValues(names)} are listed by hand, but ${reason}`
14056
14056
  });
14057
- const problemOf$5 = ({ list, reason }) => listedProblem({
14057
+ const problemOf$6 = ({ list, reason }) => listedProblem({
14058
14058
  file: list.site.file,
14059
14059
  line: list.site.line,
14060
14060
  column: list.site.column,
@@ -14652,7 +14652,7 @@ const declaredNameProblem = ({ literals, relative }) => {
14652
14652
  if (defined.length < mostNamesOf(list) || files.length < 2) return Option.none();
14653
14653
  const names = pipe(defined, Array$1.map(([name]) => name));
14654
14654
  const shown = pipe(files, Array$1.take(SHOWN_FILES), Array$1.map(relative), Array$1.join(", "));
14655
- return Option.some(problemOf$5({
14655
+ return Option.some(problemOf$6({
14656
14656
  list,
14657
14657
  reason: `${formatValues(names)} are each written in another module (${shown}). Type those values with this list, or build this list from them, so that adding one does not mean editing two places.`
14658
14658
  }));
@@ -14685,11 +14685,11 @@ const listedPathProblem = (repository) => (list) => {
14685
14685
  const paths = pipe(list.names, Array$1.map(namedPath(repository, list.site.file)), Array$1.getSomes);
14686
14686
  const packages = pipe(list.names, Array$1.filter((name) => HashSet.has(repository.packages, name)));
14687
14687
  const directory = enumeratedDirectory(repository)(paths);
14688
- if (Option.isSome(directory)) return Option.some(problemOf$5({
14688
+ if (Option.isSome(directory)) return Option.some(problemOf$6({
14689
14689
  list,
14690
14690
  reason: `they enumerate the entries of ${directoryLabel(directory.value)}. Find them with a glob or derive them from the declaration that names them.`
14691
14691
  }));
14692
- if (packages.length >= 2) return Option.some(problemOf$5({
14692
+ if (packages.length >= 2) return Option.some(problemOf$6({
14693
14693
  list,
14694
14694
  reason: `${formatValues(packages)} are workspace packages. Derive them from the workspace manifests or from a property that each package declares.`
14695
14695
  }));
@@ -14704,7 +14704,7 @@ const connected = (index) => (left, right) => left === right || imports(index)(l
14704
14704
  const isPartOf = (index, list) => (other) => other !== list && canImport(list.site.scope, other.site.scope) && connected(index)(list.site.file, other.site.file) && isSubsetOf(list.names, other.names) && list.names.length * SUBSET_SHARE >= other.names.length && !sameValues(list.names, other.names);
14705
14705
  const subsetListProblem = ({ lists, literals, relative }) => {
14706
14706
  const index = importIndexOf(literals);
14707
- return (list) => pipe(lists, Array$1.findFirst(isPartOf(index, list)), Option.map((other) => problemOf$5({
14707
+ return (list) => pipe(lists, Array$1.findFirst(isPartOf(index, list)), Option.map((other) => problemOf$6({
14708
14708
  list,
14709
14709
  reason: `they are a part of ${formatValues(other.names)} at ${relative(other.site.file)}:${String(other.site.line)}. Name that list once and select from it with Extract or Exclude.`
14710
14710
  })));
@@ -14862,13 +14862,13 @@ const destructuredName = (declaration) => {
14862
14862
  if (declaration.name.kind !== SyntaxKind.ObjectBindingPattern) return Option.none();
14863
14863
  return pipe(Option.fromUndefinedOr(declaration.initializer), Option.filter(isIdentifier), Option.map((initializer) => initializer.text));
14864
14864
  };
14865
- const problemOf$4 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$7({
14865
+ const problemOf$5 = (names) => (declaration) => pipe(destructuredName(declaration), Option.filter((name) => names.includes(name)), Option.map((name) => problemAt$7({
14866
14866
  rule: RULE$34,
14867
14867
  message: messageOf$1(name)
14868
14868
  })), Option.map((report) => report(declaration)));
14869
14869
  const namespaceDestructuringIn = () => (sourceFile) => {
14870
14870
  const names = importedNames(sourceFile);
14871
- return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$4(names)), Array$1.getSomes);
14871
+ return pipe(descendantsOf(sourceFile), Array$1.filter(isVariableDeclaration), Array$1.map(problemOf$5(names)), Array$1.getSomes);
14872
14872
  };
14873
14873
  // src/features/source-code/find-pass-through-wrappers/model/pass-through-wrappers.ts
14874
14874
  const RULE$33 = "pass-through-wrapper";
@@ -14965,14 +14965,14 @@ const isPassThrough = (checker) => (candidate) => (forward) => {
14965
14965
  const restForwarded = pipe(wrapper.parameters, Array$1.some(isRest));
14966
14966
  return Option.exists(forwardedNames(wrapper, forward), (names) => callsAnotherFunction(candidate, forward, names)) && (restForwarded || calleeTakesExactly(checker)(forward, wrapper.parameters.length)) && keepsTheReturnType(checker)(wrapper, forward) && !isOverloaded(checker)(name);
14967
14967
  };
14968
- const problemOf$3 = (checker) => (candidate) => {
14968
+ const problemOf$4 = (checker) => (candidate) => {
14969
14969
  if (changesTheCall(candidate.wrapper)) return Option.none();
14970
14970
  return pipe(returnedExpression(candidate.wrapper), Option.flatMap(forwardOf), Option.filter(isPassThrough(checker)(candidate)), Option.map((forward) => problemAt$7({
14971
14971
  rule: RULE$33,
14972
14972
  message: messageOf(forward.callee.getText())
14973
14973
  })(candidate.name)));
14974
14974
  };
14975
- const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(sourceFile), Array$1.map(candidateOf), Array$1.getSomes, Array$1.map(problemOf$3(checker)), Array$1.getSomes);
14975
+ const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(sourceFile), Array$1.map(candidateOf), Array$1.getSomes, Array$1.map(problemOf$4(checker)), Array$1.getSomes);
14976
14976
  // src/app/source-checks.ts
14977
14977
  /** @internal */
14978
14978
  const checkSources = (root) => checkRepository(root, [passThroughWrappersIn, namespaceDestructuringIn]);
@@ -15665,13 +15665,13 @@ const LIFECYCLE = [
15665
15665
  "dependencies",
15666
15666
  "pnpm:devPreinstall"
15667
15667
  ];
15668
- const problemOf$2 = ({ file, position, name }) => ({
15668
+ const problemOf$3 = ({ file, position, name }) => ({
15669
15669
  file,
15670
15670
  ...position,
15671
15671
  rule: RULE$26,
15672
15672
  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.`
15673
15673
  });
15674
- const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$2));
15674
+ const packageScriptProblems = (sources) => pipe(sources, Array$1.filter(({ kind, name }) => kind === "script" && !Array$1.contains(LIFECYCLE, name)), Array$1.map(problemOf$3));
15675
15675
  // src/features/check-vite-plus/model/vite-plus-block.ts
15676
15676
  const RULE$25 = "vite-plus-block";
15677
15677
  const MARKER = Array$1.join([
@@ -15744,17 +15744,18 @@ const checkFullHistoryCheckout = workflowCheck({
15744
15744
  // src/features/check-workflows/model/ci-drift.ts
15745
15745
  const SETUP_RULE$1 = "ci-setup";
15746
15746
  const REF_RULE = "ci-template-ref";
15747
+ const WORKFLOW_RULE = "ci-template-workflow";
15747
15748
  const SETUP_MESSAGE = "differs from what `vpa ci` writes. Run `vpa ci`: it puts the shared `setup` action where a job runs `vp`, removes the hand-written cache steps and keeps the cache workflow that cleans up old entries.";
15748
15749
  const REF_MESSAGE = "pins a different commit of the template than the other workflows. Run `vpa ci` to pin them all to one.";
15750
+ const WORKFLOW_MESSAGE = "differs from the template's workflow, which Renovate does not update because it only moves the pinned commits. Run `vpa ci`: it writes the template's triggers and jobs, such as the hourly run and the `wake` job that start the merge queue, and keeps the jobs the repository owns.";
15749
15751
  const setupProblem$1 = problemInFile(SETUP_RULE$1);
15750
15752
  const refProblem = problemInFile(REF_RULE);
15753
+ const workflowProblem = problemInFile(WORKFLOW_RULE);
15754
+ const problemOf$2 = ({ file, reason }) => Match.value(reason).pipe(Match.when("setup", () => setupProblem$1(file, SETUP_MESSAGE)), Match.when("ref", () => refProblem(file, REF_MESSAGE)), Match.when("workflow", () => workflowProblem(file, WORKFLOW_MESSAGE)), Match.exhaustive);
15751
15755
  /** @internal */
15752
15756
  const checkCiDrift = Effect.fn("checkCiDrift")(function* checkCiDrift(root) {
15753
15757
  const drifts = yield* findCiDrift(root);
15754
- return pipe(drifts, Array$1.map(({ file, reason }) => {
15755
- if (reason === "setup") return setupProblem$1(file, SETUP_MESSAGE);
15756
- return refProblem(file, REF_MESSAGE);
15757
- }));
15758
+ return pipe(drifts, Array$1.map(problemOf$2));
15758
15759
  });
15759
15760
  // src/features/check-workflows/model/publish-trigger.ts
15760
15761
  const RULE$23 = "publish-trigger";