@r_masseater/msch 0.87.4 → 0.87.6

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
@@ -16730,10 +16730,13 @@ const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* check
16730
16730
  // src/features/find-unneeded-files/model/applied-packages.ts
16731
16731
  const MSCH = "@r_masseater/msch";
16732
16732
  const SCOPE$1 = "@r_masseater/";
16733
+ const PLUGIN_KEYWORDS = ["oxlint-plugin", "textlint-rule"];
16733
16734
  const RULE$14 = "applied-package";
16734
16735
  const WORKSPACE_FILE$2 = "pnpm-workspace.yaml";
16735
16736
  const NOT_FOUND = -1;
16736
16737
  const SEPARATOR$1 = "/";
16738
+ /** @internal */
16739
+ const isApplied = ({ bins, keywords }) => Array$1.isReadonlyArrayNonEmpty(bins) || pipe(keywords, Array$1.some((keyword) => Array$1.contains(PLUGIN_KEYWORDS, keyword)));
16737
16740
  const BY_LENGTH = Order.mapInput(Order.Number, (text) => text.length);
16738
16741
  const escaped = (text) => String$1.replaceAll(/[.*+?^${}()|[\]\\]/gu, String.raw`\$&`)(text);
16739
16742
  const declaredNames = (manifest) => namesIn(manifest, [
@@ -16750,18 +16753,23 @@ const installedManifest = Effect.fn("installedManifest")(function* installedMani
16750
16753
  });
16751
16754
  const installedPackage = Effect.fn("installedPackage")(function* installedPackage(name) {
16752
16755
  const manifest = yield* installedManifest(name);
16753
- return {
16756
+ return pipe(manifest, Option.map((found) => ({
16754
16757
  name,
16755
- bins: pipe(manifest, Option.map((found) => pipe(binEntriesOf({
16758
+ bins: pipe(binEntriesOf({
16756
16759
  ...found,
16757
16760
  name
16758
- }), Array$1.map(([command]) => command))), Option.getOrElse(() => []))
16759
- };
16761
+ }), Array$1.map(([command]) => command)),
16762
+ keywords: found.keywords ?? []
16763
+ })), Option.filter(isApplied), Option.map(({ name: applied, bins }) => ({
16764
+ name: applied,
16765
+ bins
16766
+ })));
16760
16767
  });
16761
16768
  const appliedByMsch = Effect.fn("appliedByMsch")(function* appliedByMsch() {
16762
16769
  const manifest = yield* installedManifest(MSCH);
16763
16770
  const names = pipe(manifest, Option.map(({ dependencies, peerDependencies }) => [...Record.keys(dependencies ?? {}), ...Record.keys(peerDependencies ?? {})]), Option.getOrElse(() => []), Array$1.filter(String$1.startsWith(SCOPE$1)));
16764
- return yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16771
+ const found = yield* Effect.forEach(names, installedPackage, { concurrency: 1 });
16772
+ return Array$1.getSomes(found);
16765
16773
  });
16766
16774
  const problemAt$1 = (file, source) => (index, name) => ({
16767
16775
  file,