@r_masseater/msch 0.125.0 → 0.126.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
@@ -14,7 +14,7 @@ import { decodePackageJson, decodeVersionedPackageJson, readPackageJson, readRaw
14
14
  import { a as workspaceConfigs, c as publicEntriesOf, d as FRONTMATTER, f as splitFrontmatter, g as deployEntries, h as bundledEntries$1, i as publishedWorkspaces, l as modDirectories, m as workspaceLinks, o as entryNameOf, r as packedWorkspaces, s as isBinEntry, u as isIndexSkill, v as shadcnUiOf } from "./published-DkH6B-Gr.mjs";
15
15
  import { parse, resolveConfigFromFile } from "vite-plus";
16
16
  import { i as USAGE_SPOOL, n as DECISION_TIMEOUT_MS, r as JAPANESE, t as DECISION_MODEL } from "./config-B3SYjao5.mjs";
17
- import { _ as patternOf$1, a as CI_TASKS, c as MSCH_VERIFY_COMMANDS, f as existsAt, g as namedWorkspaces, m as isIgnored, n as builtTextRuleNames, r as secretsOf, s as MSCH_TASK_COMMANDS, t as TEXT_IGNORES, u as meteredCommand } from "./repository-text-DfTSvaqo.mjs";
17
+ import { _ as namedWorkspaces, a as TEXT_IGNORES, c as CI_TASKS, d as MSCH_VERIFY_COMMANDS, f as meteredCommand, g as isIgnored, h as existsAt, l as GIT_HOOKS, m as fu4Of, n as FORMAT, o as builtTextRuleNames, r as STAGED$1, s as secretsOf, t as COMMIT_LINT, u as MSCH_TASK_COMMANDS, v as patternOf$1 } from "./repository-config-8JN86BZA.mjs";
18
18
  import { fileURLToPath, pathToFileURL } from "node:url";
19
19
  import treeSitter from "@vscode/tree-sitter-wasm";
20
20
  import { t as startedOnce } from "./started-once-BN_hLlmU.mjs";
@@ -49,7 +49,7 @@ import { Buffer } from "node:buffer";
49
49
  import { createZstdDecompress } from "node:zlib";
50
50
  // package.json
51
51
  var name = "@r_masseater/msch";
52
- var version = "0.125.0";
52
+ var version = "0.126.0";
53
53
  var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
54
54
  var repository = {
55
55
  "type": "git",
@@ -1195,6 +1195,30 @@ const checkPackageRegistry = Effect.fn("checkPackageRegistry")(function* checkPa
1195
1195
  const overrides = yield* scanText(pipe(listed, Array$1.filter(({ name }) => NPMRC.test(name))), npmrcProblems);
1196
1196
  return [...yield* checkWorkspace(root), ...overrides];
1197
1197
  });
1198
+ // src/shared/lib/repository-origin.ts
1199
+ const ORIGIN = /[:/](?<owner>[^/:]+)\/(?<name>[^/]+?)(?:\.git)?\/?$/u;
1200
+ /** @internal */
1201
+ const originOf = (url) => pipe(Option.fromNullishOr(ORIGIN.exec(url)), Option.flatMap(({ groups }) => Option.fromNullishOr(groups)), Option.flatMap(({ owner, name }) => Option.all({
1202
+ owner: Option.fromNullishOr(owner),
1203
+ name: Option.fromNullishOr(name)
1204
+ })));
1205
+ /** @internal */
1206
+ const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigin(root) {
1207
+ const url = yield* (yield* RepositoryFiles).originUrl(root);
1208
+ return pipe(url, Option.flatMap(originOf));
1209
+ });
1210
+ /** @internal */
1211
+ const slugOf = ({ owner, name }) => `${owner}/${name}`;
1212
+ // src/entities/package/model/renovate-preset.ts
1213
+ const RepositoryField = Schema.Struct({
1214
+ url: Schema.String,
1215
+ directory: Schema.String
1216
+ });
1217
+ const decodeRepository$2 = Schema.decodeUnknownOption(RepositoryField);
1218
+ const renovatePresetOf = Effect.fn("renovatePresetOf")(function* renovatePresetOf(name, base) {
1219
+ const manifest = yield* installedManifest(name, base);
1220
+ return pipe(manifest, Option.flatMap(({ repository }) => decodeRepository$2(repository)), Option.flatMap(({ url, directory }) => pipe(originOf(url), Option.map((origin) => `github>${slugOf(origin)}//${directory}/renovate`))));
1221
+ });
1198
1222
  // src/entities/package/model/stack-catalog.ts
1199
1223
  const STACK_CATALOG = "catalog:stack";
1200
1224
  // src/entities/package/model/specifiers.ts
@@ -3754,7 +3778,7 @@ const readReadme = Effect.fn("readReadme")(function* readReadme({ root, director
3754
3778
  const RULE$71 = "deployed-readme";
3755
3779
  const ROOT_DIRECTORY$4 = "";
3756
3780
  const READ_CONCURRENCY$35 = 16;
3757
- 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.";
3781
+ const MISSING_MESSAGE$3 = "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.";
3758
3782
  const NO_URL_MESSAGE = "has no https:// URL. This workspace has an Alchemy stack that serves an address, so link the URL it is served at.";
3759
3783
  const ADDRESS_KEYS = [
3760
3784
  "domain",
@@ -3792,7 +3816,7 @@ const problemIn$7 = Effect.fn("problemIn")(function* problemIn(root, directory)
3792
3816
  root,
3793
3817
  directory,
3794
3818
  rule: RULE$71,
3795
- missingMessage: MISSING_MESSAGE$2
3819
+ missingMessage: MISSING_MESSAGE$3
3796
3820
  });
3797
3821
  return Result.match(readme, {
3798
3822
  onFailure: Option.some,
@@ -3831,7 +3855,7 @@ const isNested = (name) => String$1.includes(SEPARATOR$24)(name);
3831
3855
  const problemFor$9 = problemInFile(RULE$70);
3832
3856
  const AGENT_DOCS_MESSAGE = "belongs only at the repository root. Move what agents need into the root AGENTS.md and delete this file.";
3833
3857
  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.";
3834
- 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.";
3858
+ const MISSING_MESSAGE$2 = "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.";
3835
3859
  const README_MESSAGE = "is allowed below the root only in a workspace, the directory that holds its package.json. Move it into the workspace it describes.";
3836
3860
  const agentDocProblem = ({ file, base, directory }, allowed) => {
3837
3861
  if (!allowed.workspaceAgentDocs) return Option.some(problemFor$9(file, `${base} ${AGENT_DOCS_MESSAGE}`));
@@ -3842,7 +3866,7 @@ const readmeProblem = ({ file, base, directory }, allowed) => {
3842
3866
  if (!README.test(base) || HashSet.has(allowed.workspaces, directory)) return Option.none();
3843
3867
  return Option.some(problemFor$9(file, `${base} ${README_MESSAGE}`));
3844
3868
  };
3845
- const missingProblems = ({ required, directories, present, join }) => pipe(directories, Array$1.filter((directory) => required && !HashSet.has(present, join(directory, WORKSPACE_AGENT_DOC))), Array$1.map((directory) => problemInFile(MISSING_RULE)(join(directory, MANIFEST$4), MISSING_MESSAGE$1)));
3869
+ const missingProblems = ({ required, directories, present, join }) => pipe(directories, Array$1.filter((directory) => required && !HashSet.has(present, join(directory, WORKSPACE_AGENT_DOC))), Array$1.map((directory) => problemInFile(MISSING_RULE)(join(directory, MANIFEST$4), MISSING_MESSAGE$2)));
3846
3870
  const problemIn$6 = Effect.fn("problemIn")(function* problemIn(root, allowed, name) {
3847
3871
  const files = yield* RepositoryFiles;
3848
3872
  const file = files.join(root, name);
@@ -3888,13 +3912,13 @@ const checkNestedDocs = Effect.fn("checkNestedDocs")(function* checkNestedDocs(r
3888
3912
  const RULE$69 = "published-readme";
3889
3913
  const READ_CONCURRENCY$33 = 16;
3890
3914
  const MESSAGE$14 = "contains Japanese. This package is published to npm, so write its README in English.";
3891
- const MISSING_MESSAGE = "is missing. This package is published to npm, so give it an English README.md.";
3915
+ const MISSING_MESSAGE$1 = "is missing. This package is published to npm, so give it an English README.md.";
3892
3916
  const problemIn$5 = Effect.fn("problemIn")(function* problemIn(root, { directory }) {
3893
3917
  const readme = yield* readReadme({
3894
3918
  root,
3895
3919
  directory,
3896
3920
  rule: RULE$69,
3897
- missingMessage: MISSING_MESSAGE
3921
+ missingMessage: MISSING_MESSAGE$1
3898
3922
  });
3899
3923
  return Result.match(readme, {
3900
3924
  onFailure: Option.some,
@@ -14775,9 +14799,57 @@ const expectationsIn = Effect.fn("expectationsIn")(function* expectationsIn(root
14775
14799
  tasks: MSCH_TASK_COMMANDS,
14776
14800
  verifyTasks: Record.keys(MSCH_VERIFY_COMMANDS),
14777
14801
  ciTasks: CI_TASKS,
14778
- secrets: secretsOf()
14802
+ secrets: secretsOf(),
14803
+ fixed: {
14804
+ commitlint: COMMIT_LINT,
14805
+ fu4: fu4Of(),
14806
+ staged: STAGED$1,
14807
+ fmt: FORMAT
14808
+ },
14809
+ gitHooks: GIT_HOOKS
14779
14810
  };
14780
14811
  });
14812
+ // src/app/config-sections.ts
14813
+ const isList = (value) => Array$1.isArray(value);
14814
+ const isSection = (value) => Predicate$1.isObject(value) && !Array$1.isArray(value);
14815
+ const sectionOf = (value) => pipe(Option.some(value), Option.filter(isSection), Option.getOrElse(() => ({})));
14816
+ const listOf$2 = (value) => pipe(Option.some(value), Option.filter(isList), Option.getOrElse(() => []));
14817
+ // src/app/section-weakenings.ts
14818
+ const fixedWeakenings = (config, expected) => pipe(Record.toEntries(expected.fixed), Array$1.filter(([section, built]) => !Equal.equals(config[section], built)), Array$1.map(([section]) => ({
14819
+ anchor: section,
14820
+ message: `${section} differs from what repositoryConfig builds, so msch's ${section} settings do not apply. Leave the ${section} section as repositoryConfig builds it.`
14821
+ })));
14822
+ const builtSections = [
14823
+ "wism",
14824
+ "dependencyRules",
14825
+ "test"
14826
+ ];
14827
+ const missingSections = (config) => pipe(builtSections, Array$1.filter((section) => Predicate$1.isUndefined(config[section])), Array$1.map((section) => ({
14828
+ anchor: "defineConfig",
14829
+ message: `vite.config.ts has no ${section} section, so the checks msch builds into it do not run. Spread repositoryConfig from @r_masseater/msch/config into defineConfig.`
14830
+ })));
14831
+ const RUN_PREFIX = "vp run ";
14832
+ const tasksRunBy = (tasks) => (command) => {
14833
+ const named = String$1.slice(7)(command);
14834
+ const dependsOn = listOf$2(sectionOf(tasks[named])["dependsOn"]);
14835
+ return [named, ...pipe(dependsOn, Array$1.filter(Predicate$1.isString))];
14836
+ };
14837
+ const runCommandOf = (command) => pipe(String$1.lastIndexOf(RUN_PREFIX)(command), Option.map((index) => String$1.slice(index)(command)));
14838
+ const covers = (tasks) => (built) => (command) => Predicate$1.isString(command) && (String$1.endsWith(built)(command) || String$1.startsWith(RUN_PREFIX)(built) && pipe(runCommandOf(command), Option.exists((run) => Array$1.contains(tasksRunBy(tasks)(run), String$1.slice(7)(built)))));
14839
+ const hookWeakenings = (config, expected) => {
14840
+ const hooks = sectionOf(config.gitHooks);
14841
+ const tasks = sectionOf(sectionOf(config.run)["tasks"]);
14842
+ return pipe(Record.toEntries(expected.gitHooks), Array$1.flatMap(([hook, commands]) => pipe(commands, Array$1.filter((built) => !Array$1.some(listOf$2(hooks[hook]), covers(tasks)(built))), Array$1.map((built) => ({
14843
+ anchor: "gitHooks",
14844
+ message: `The ${hook} hook does not run \`${built}\`, which msch puts there. Add commands to a hook or wrap them, but keep the ones repositoryConfig builds.`
14845
+ })))));
14846
+ };
14847
+ /** @internal */
14848
+ const sectionWeakenings = (config, expected) => [
14849
+ ...fixedWeakenings(config, expected),
14850
+ ...missingSections(config),
14851
+ ...hookWeakenings(config, expected)
14852
+ ];
14781
14853
  // src/app/config-weakenings.ts
14782
14854
  const PRESET_KEYS = [
14783
14855
  "categories",
@@ -14794,10 +14866,6 @@ const MSCH_RELAXATIONS = [
14794
14866
  { "import/no-default-export": "off" },
14795
14867
  decisionTestRules
14796
14868
  ];
14797
- const isList = (value) => Array$1.isArray(value);
14798
- const isSection = (value) => Predicate$1.isObject(value) && !Array$1.isArray(value);
14799
- const sectionOf = (value) => pipe(Option.some(value), Option.filter(isSection), Option.getOrElse(() => ({})));
14800
- const listOf$2 = (value) => pipe(Option.some(value), Option.filter(isList), Option.getOrElse(() => []));
14801
14869
  const severityOf = (value) => pipe(listOf$2(value), Array$1.head, Option.getOrElse(() => value));
14802
14870
  const hasOptions = (value) => Array$1.length(listOf$2(value)) > SEVERITY_ONLY;
14803
14871
  const unless = (kept, weakening) => Array$1.filter([weakening], () => !kept);
@@ -14898,7 +14966,8 @@ const weakeningsOf = (expected) => (config) => [
14898
14966
  ...textWeakenings(expected.text)(config.textlint),
14899
14967
  ...markdownWeakenings(expected.markdown)(config.y8),
14900
14968
  ...taskWeakenings(config.run, expected),
14901
- ...secretWeakenings(config.h56m, expected.secrets)
14969
+ ...secretWeakenings(config.h56m, expected.secrets),
14970
+ ...sectionWeakenings(config, expected)
14902
14971
  ];
14903
14972
  // src/app/disabled-rules.ts
14904
14973
  const RULE$45 = "disabled-rule";
@@ -15967,20 +16036,6 @@ const passThroughWrappersIn = (checker) => (sourceFile) => pipe(descendantsOf(so
15967
16036
  // src/app/source-checks.ts
15968
16037
  /** @internal */
15969
16038
  const checkSources = (root) => checkRepository(root, [passThroughWrappersIn, namespaceDestructuringIn]);
15970
- // src/shared/lib/repository-origin.ts
15971
- const ORIGIN = /[:/](?<owner>[^/:]+)\/(?<name>[^/]+?)(?:\.git)?\/?$/u;
15972
- /** @internal */
15973
- const originOf = (url) => pipe(Option.fromNullishOr(ORIGIN.exec(url)), Option.flatMap(({ groups }) => Option.fromNullishOr(groups)), Option.flatMap(({ owner, name }) => Option.all({
15974
- owner: Option.fromNullishOr(owner),
15975
- name: Option.fromNullishOr(name)
15976
- })));
15977
- /** @internal */
15978
- const repositoryOrigin = Effect.fn("repositoryOrigin")(function* repositoryOrigin(root) {
15979
- const url = yield* (yield* RepositoryFiles).originUrl(root);
15980
- return pipe(url, Option.flatMap(originOf));
15981
- });
15982
- /** @internal */
15983
- const slugOf = ({ owner, name }) => `${owner}/${name}`;
15984
16039
  // src/features/check-agent-settings/model/known-plugins.ts
15985
16040
  const RULE$41 = "known-plugins";
15986
16041
  const SETTINGS_FILE$3 = ".claude/settings.json";
@@ -17270,8 +17325,6 @@ const checkCatalogEntries = Effect.fn("checkCatalogEntries")(function* checkCata
17270
17325
  const ENTRY_RULE = "unlocked-skill";
17271
17326
  const VISIBLE_RULE = "skill-source-visible";
17272
17327
  const CONFIG_FILE$2 = "vite.config.ts";
17273
- const RENOVATE_FILE$1 = "renovate.json";
17274
- const ADOPTER = "@r_masseater/vite-plus-adopt";
17275
17328
  const SOURCE_SEPARATOR = "/";
17276
17329
  const START$18 = 0;
17277
17330
  const LOCAL_PREFIX = "./";
@@ -17312,34 +17365,12 @@ const entryProblems$1 = (owner, { file, text, sources }) => {
17312
17365
  };
17313
17366
  const literalPattern = (repository, commit) => new RegExp(`"${String$1.replaceAll(REGEX_SPECIAL$1, String.raw`\$&`)(repository)}": \\{\\s*commit: "${commit}"`, "u");
17314
17367
  const visibleProblems = ({ file, text, sources }) => pipe(Record.toEntries(sources), Array$1.filter(([repository]) => !String$1.startsWith(LOCAL_PREFIX)(repository)), Array$1.filter(([repository, { commit }]) => !literalPattern(repository, commit ?? "").test(text)), Array$1.map(([repository]) => problemAt$3(VISIBLE_RULE, file, text)(repository, `declares ${repository} in a form the Renovate preset cannot read. Write "${repository}": { commit: "<sha>", ... } with commit first and as a string literal.`)));
17315
- const RepositoryField = Schema.Struct({
17316
- url: Schema.String,
17317
- directory: Schema.String
17318
- });
17319
- const decodeRepository$2 = Schema.decodeUnknownOption(RepositoryField);
17320
- const adopterPreset = Effect.fn("adopterPreset")(function* adopterPreset() {
17321
- const manifest = yield* installedManifest(ADOPTER, import.meta.url);
17322
- return pipe(manifest, Option.flatMap(({ repository }) => decodeRepository$2(repository)), Option.flatMap(({ url, directory }) => pipe(originOf(url), Option.map((origin) => `github>${slugOf(origin)}//${directory}/renovate`))));
17323
- });
17324
- const presetProblems = Effect.fn("presetProblems")(function* presetProblems(root, preset) {
17325
- const files = yield* RepositoryFiles;
17326
- const file = files.join(root, RENOVATE_FILE$1);
17327
- const text = yield* files.readFile(file);
17328
- if (pipe(text, Option.exists(String$1.includes(`"${preset}"`)))) return [];
17329
- return [problemAt$3(VISIBLE_RULE, file, Option.getOrElse(text, () => ""))("extends", `does not extend ${preset}, so Renovate never updates the commits in the skills section of ${CONFIG_FILE$2}.`)];
17330
- });
17331
17368
  /** @internal */
17332
17369
  const checkSkillEntry = Effect.fn("checkSkillEntry")(function* checkSkillEntry(root) {
17333
17370
  const declared = yield* declaredSkills(root);
17334
17371
  if (Option.isNone(declared)) return [];
17335
- const preset = yield* adopterPreset();
17336
- const unextended = yield* Effect.forEach(Option.toArray(preset), (found) => presetProblems(root, found), { concurrency: 1 });
17337
17372
  const origin = yield* repositoryOrigin(root);
17338
- return [
17339
- ...pipe(origin, Option.map(({ owner }) => entryProblems$1(owner, declared.value)), Option.getOrElse(() => [])),
17340
- ...visibleProblems(declared.value),
17341
- ...Array$1.flatten(unextended)
17342
- ];
17373
+ return [...pipe(origin, Option.map(({ owner }) => entryProblems$1(owner, declared.value)), Option.getOrElse(() => [])), ...visibleProblems(declared.value)];
17343
17374
  });
17344
17375
  // src/features/check-skills/model/published-skills.ts
17345
17376
  const RULE$29 = "published-skills";
@@ -17618,13 +17649,33 @@ const VERSION_CAP = /["']?allowedVersions["']?\s*:\s*["'](?<range>[^"']*<[^"']*)
17618
17649
  const AUTOMERGE_RULE = "renovate-platform-automerge";
17619
17650
  const CAP_RULE = "renovate-version-cap";
17620
17651
  const PRESET_RULE = "renovate-msch-preset";
17652
+ const ADOPTER = "@r_masseater/vite-plus-adopt";
17653
+ const DEFAULT_FILE = "renovate.json";
17621
17654
  const START$16 = 0;
17622
17655
  const READ_CONCURRENCY$12 = 16;
17623
17656
  const AUTOMERGE_MESSAGE = "sets `platformAutomerge: false`. Keep the platform's automerge on so passing updates merge without waiting for the next Renovate run.";
17624
17657
  const CAP_MESSAGE = "caps a dependency below a version with `allowedVersions`. A cap holds the dependency on an old version, which is a downgrade that never ends: fix what breaks on the new version instead.";
17625
17658
  const PRESET_MESSAGE = `does not extend \`${RENOVATE_PRESET}\`, so Renovate writes ranges that the \`version-range\` check rejects. Add it to \`extends\`.`;
17659
+ const MISSING_MESSAGE = `is missing, so Renovate does not run msch's preset \`${RENOVATE_PRESET}\` and dependencies stay on old versions. Add a Renovate config that extends it.`;
17660
+ const adopterMessage = (preset) => `does not extend \`${preset}\` after \`${RENOVATE_PRESET}\`, so Renovate never updates the commits and versions in the skills and tools sections of vite.config.ts, and the package groups it waits for go out apart. Add it to \`extends\` after msch's preset.`;
17661
+ const Presets = Schema.Unknown.pipe(Schema.Array, Schema.optional);
17662
+ const Extends = Schema.fromJsonString(Schema.Struct({ extends: Presets }));
17663
+ const decodeExtends = Schema.decodeUnknownOption(Extends);
17664
+ const quotedOffset = (source) => (preset) => String$1.indexOf(`"${preset}"`)(source);
17665
+ const extendedAt = (source) => pipe(decodeExtends(source), Option.match({
17666
+ onNone: () => quotedOffset(source),
17667
+ onSome: ({ extends: presets = [] }) => (preset) => Array$1.findFirstIndex(presets, (entry) => entry === preset)
17668
+ }));
17669
+ const presetsMissing = (source, adopter) => {
17670
+ const at = extendedAt(source);
17671
+ const own = at(RENOVATE_PRESET);
17672
+ return [...Array$1.filter([PRESET_MESSAGE], () => Option.isNone(own)), ...pipe(Option.toArray(adopter), Array$1.filter((preset) => pipe(at(preset), Option.match({
17673
+ onNone: () => true,
17674
+ onSome: (index) => Option.exists(own, (ownIndex) => index < ownIndex)
17675
+ }))), Array$1.map(adopterMessage))];
17676
+ };
17626
17677
  const offsetsOf = (pattern, source) => pipe(Array$1.fromIterable(String$1.matchAll(pattern)(source)), Array$1.flatMap((match) => Option.toArray(Option.fromUndefinedOr(match.index))));
17627
- const problemsIn$8 = (file, source) => {
17678
+ const problemsIn$8 = (adopter) => (file, source) => {
17628
17679
  const at = positionOf(source);
17629
17680
  const found = (pattern, rule, message) => pipe(offsetsOf(pattern, source), Array$1.map((offset) => ({
17630
17681
  file,
@@ -17635,23 +17686,31 @@ const problemsIn$8 = (file, source) => {
17635
17686
  return [
17636
17687
  ...found(AUTOMERGE_OFF, AUTOMERGE_RULE, AUTOMERGE_MESSAGE),
17637
17688
  ...found(VERSION_CAP, CAP_RULE, CAP_MESSAGE),
17638
- ...pipe([{
17689
+ ...pipe(presetsMissing(source, adopter), Array$1.map((message) => ({
17639
17690
  file,
17640
17691
  ...at(START$16),
17641
17692
  rule: PRESET_RULE,
17642
- message: PRESET_MESSAGE
17643
- }], Array$1.filter(() => !String$1.includes(`"${RENOVATE_PRESET}"`)(source)))
17693
+ message
17694
+ })))
17644
17695
  ];
17645
17696
  };
17646
17697
  /** @internal */
17647
17698
  const checkRenovateSettings = Effect.fn("checkRenovateSettings")(function* checkRenovateSettings(root) {
17648
17699
  const files = yield* RepositoryFiles;
17649
17700
  const listed = yield* files.listedFiles(root);
17650
- const found = yield* Effect.forEach(pipe(listed, Array$1.filter((name) => RENOVATE_FILE.test(name))), (name) => {
17701
+ const adopter = yield* renovatePresetOf(ADOPTER, import.meta.url);
17702
+ const configs = pipe(listed, Array$1.filter((name) => RENOVATE_FILE.test(name)));
17703
+ if (Array$1.isReadonlyArrayEmpty(configs)) return [{
17704
+ file: files.join(root, DEFAULT_FILE),
17705
+ ...positionOf("")(START$16),
17706
+ rule: PRESET_RULE,
17707
+ message: MISSING_MESSAGE
17708
+ }];
17709
+ const found = yield* Effect.forEach(configs, (name) => {
17651
17710
  const file = files.join(root, name);
17652
17711
  return files.readFile(file).pipe(Effect.map(Option.match({
17653
17712
  onNone: () => [],
17654
- onSome: (source) => problemsIn$8(file, source)
17713
+ onSome: (source) => problemsIn$8(adopter)(file, source)
17655
17714
  })));
17656
17715
  }, { concurrency: READ_CONCURRENCY$12 });
17657
17716
  return Array$1.flatten(found);