@r_masseater/msch 0.132.0 → 0.133.2
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 +43 -14
- package/dist/cli.mjs.map +1 -1
- package/dist/config.d.mts +3 -2
- package/dist/config.mjs +5 -3
- package/dist/config.mjs.map +1 -1
- package/dist/decision-rules.d.mts +1 -1
- package/dist/decision-rules.mjs +1 -1
- package/dist/{define-lint-preset-Cd0FMUQq.mjs → define-lint-preset-_bDnJMcY.mjs} +205 -5
- package/dist/define-lint-preset-_bDnJMcY.mjs.map +1 -0
- package/dist/{index-BF-ubMH2.d.mts → index-BXM6N-Rk.d.mts} +1 -0
- package/dist/{index-D0JFyFgM.d.mts → index-_y7Igwy0.d.mts} +3 -1
- package/dist/lint.d.mts +2 -2
- package/dist/lint.mjs +1 -1
- package/dist/{published-BYVJ_t-U.mjs → published-Cgl1qeYH.mjs} +2 -2
- package/dist/{published-BYVJ_t-U.mjs.map → published-Cgl1qeYH.mjs.map} +1 -1
- package/dist/{repository-text-C9iSj4BY.mjs → repository-text-BPhi-pct.mjs} +6 -25
- package/dist/{repository-text-C9iSj4BY.mjs.map → repository-text-BPhi-pct.mjs.map} +1 -1
- package/dist/{workspace-projects-CqSL9R26.mjs → workspace-projects-Zg078aA1.mjs} +3 -2
- package/dist/workspace-projects-Zg078aA1.mjs.map +1 -0
- package/dist/workspace-settings.d.mts +1 -1
- package/dist/workspace-settings.mjs +42 -4
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +3 -3
- package/skills/msch-checks/SKILL.md +1 -1
- package/skills/msch-publishing/SKILL.md +1 -1
- package/skills/msch-repository-config/SKILL.md +3 -2
- package/skills/msch-workspace-settings/SKILL.md +9 -8
- package/src/app/vite.d.ts +8 -0
- package/dist/define-lint-preset-Cd0FMUQq.mjs.map +0 -1
- package/dist/workspace-projects-CqSL9R26.mjs.map +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -8,13 +8,13 @@ import { lockedGraph, lockedPackageIds, parseDependencyPath, updateWorkspaceMani
|
|
|
8
8
|
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
9
9
|
import { DEPENDENCY_SECTIONS, PACKAGE_JSON_FILE, ROOT_SUBPATH as ROOT_SUBPATH$2, RUNTIME_SECTIONS, binEntriesOf, exportEntriesOf, importSpecifierOf, namesIn as namesIn$1, optionalPeerNames, runtimeDependencyNames, targetsIn, unscopedNameOf } from "@r_masseater/masseater-utils/kestrion";
|
|
10
10
|
import { i as workspaceDependencies$1, n as installedManifest, r as readManifest, t as dependencyEntries } from "./dependencies-Bjn3xWkq.mjs";
|
|
11
|
-
import { C as childrenOf$4, D as
|
|
11
|
+
import { C as childrenOf$4, D as nestedValues, E as literalOf, O as propertyValue, S as KeySchema, T as keyValues, a as workspaceManifest, c as TASK_NAMES, d as definesTask, f as hasCargoTask, i as workspaceProjects, k as stringsIn, l as TEST_TASK_NAMES, n as unmatchedWorkspacePatterns, p as hasVerifyTask, r as workspaceDirectories, s as RUN_TASKS, t as publishedProjects, u as VERIFY_TASK, w as keyName, x as workspaceConfigOf } from "./workspace-projects-Zg078aA1.mjs";
|
|
12
12
|
import { a as parent, i as join, n as isInside, t as baseName$1 } from "./path-BhBnc3Sn.mjs";
|
|
13
13
|
import { decodePackageJson, decodeVersionedPackageJson, readPackageJson, readRawPackageJson, readVersionedPackageJson, updatePackageJson, writePackageJson } from "@r_masseater/masseater-utils/kestrion/npm";
|
|
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 INDEX_SKILL, v as shadcnUiOf } from "./published-
|
|
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 INDEX_SKILL, v as shadcnUiOf } from "./published-Cgl1qeYH.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 { c as forgetBuilt, d as existsAt, g as patternOf$1, h as namedWorkspaces, i as GIT_HOOKS, l as lastBuilt, p as isIgnored, s as MDLCT_BIN, t as BUILT_ALLOWANCES } from "./repository-text-
|
|
17
|
+
import { c as forgetBuilt, d as existsAt, g as patternOf$1, h as namedWorkspaces, i as GIT_HOOKS, l as lastBuilt, p as isIgnored, s as MDLCT_BIN, t as BUILT_ALLOWANCES } from "./repository-text-BPhi-pct.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";
|
|
@@ -23,7 +23,7 @@ import { rolldown } from "rolldown";
|
|
|
23
23
|
import { stripVTControlCharacters } from "node:util";
|
|
24
24
|
import { builtinModules, isBuiltin as isBuiltin$1 } from "node:module";
|
|
25
25
|
import semver from "semver";
|
|
26
|
-
import {
|
|
26
|
+
import { b as exempt, f as lint$3, h as decisionTestRules } from "./define-lint-preset-_bDnJMcY.mjs";
|
|
27
27
|
import { NO_PATH, describeReference, diagnosticDetail, linksIn as linksIn$1, lint, markdownPathspecs, referenceOf as referenceOf$2, y8Section } from "@r_masseater/y8";
|
|
28
28
|
import { lint as lint$1, wismPathspecs, wismSection } from "@r_masseater/wism";
|
|
29
29
|
import { Parser, isMap, isNode, isPair, isScalar, isSeq, parse as parse$1, parseDocument, visit as visit$1 } from "yaml";
|
|
@@ -50,7 +50,7 @@ import { Buffer } from "node:buffer";
|
|
|
50
50
|
import { createZstdDecompress } from "node:zlib";
|
|
51
51
|
// package.json
|
|
52
52
|
var name = "@r_masseater/msch";
|
|
53
|
-
var version = "0.
|
|
53
|
+
var version = "0.133.2";
|
|
54
54
|
var homepage = "https://github.com/masseater/ecosystems/tree/main/libs/msch#readme";
|
|
55
55
|
var repository = {
|
|
56
56
|
"type": "git",
|
|
@@ -13432,29 +13432,39 @@ const FALLOW_KEYS = [
|
|
|
13432
13432
|
];
|
|
13433
13433
|
const VITE_KEYS = ["files"];
|
|
13434
13434
|
const FALLOW_CONFIG$1 = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?)$/u;
|
|
13435
|
-
const VITE_CONFIG = /(?:^|\/)vite\.config\.[cm]?ts$/u;
|
|
13435
|
+
const VITE_CONFIG$1 = /(?:^|\/)vite\.config\.[cm]?ts$/u;
|
|
13436
13436
|
const BRACE_GROUP = /\{(?<options>[^{}]*)\}/u;
|
|
13437
13437
|
const OPTION_SEPARATOR = ",";
|
|
13438
13438
|
const PAIR$1 = 2;
|
|
13439
13439
|
const NEGATED = "!";
|
|
13440
13440
|
const ROOT_WORKSPACE = ".";
|
|
13441
13441
|
const WRAP_OFFSET$1 = 1;
|
|
13442
|
-
const NO_OFFSET = 0;
|
|
13442
|
+
const NO_OFFSET$1 = 0;
|
|
13443
13443
|
const READ_CONCURRENCY$26 = 8;
|
|
13444
13444
|
const MESSAGE$10 = "selects deploy entries by their name or location. A deploy entry is the file that an Alchemy resource names in main, and its name and place change with the code. Use workspaceSettings().lint.deployEntries in lint settings; fallow reads main from the stack by itself.";
|
|
13445
13445
|
const decodeKey$1 = Schema.decodeUnknownOption(KeySchema);
|
|
13446
|
+
const whole = (program) => [program];
|
|
13446
13447
|
const FALLOW = {
|
|
13447
13448
|
keys: FALLOW_KEYS,
|
|
13449
|
+
sections: whole,
|
|
13448
13450
|
offset: WRAP_OFFSET$1,
|
|
13449
13451
|
sourceOf: (text) => `(${text})`,
|
|
13450
13452
|
bases: (directory, workspaces) => [directory, ...workspaces]
|
|
13451
13453
|
};
|
|
13452
13454
|
const VITE$1 = {
|
|
13453
13455
|
keys: VITE_KEYS,
|
|
13454
|
-
|
|
13456
|
+
sections: whole,
|
|
13457
|
+
offset: NO_OFFSET$1,
|
|
13455
13458
|
sourceOf: (text) => text,
|
|
13456
13459
|
bases: (directory) => [directory]
|
|
13457
13460
|
};
|
|
13461
|
+
const FALLOW_IN_VITE = {
|
|
13462
|
+
keys: FALLOW_KEYS,
|
|
13463
|
+
sections: keyValues("fallow"),
|
|
13464
|
+
offset: NO_OFFSET$1,
|
|
13465
|
+
sourceOf: (text) => text,
|
|
13466
|
+
bases: (directory, workspaces) => [directory, ...workspaces]
|
|
13467
|
+
};
|
|
13458
13468
|
const isPatternProperty = (keys) => (node) => node["type"] === "Property" && pipe(decodeKey$1(node["key"]), Option.exists((key) => Array$1.contains(keys, keyName(key))));
|
|
13459
13469
|
const patternsIn = (keys) => (node) => {
|
|
13460
13470
|
if (Predicate$1.isReadonlyObject(node) && isPatternProperty(keys)(node)) return stringsIn(node["value"]);
|
|
@@ -13475,7 +13485,7 @@ const selectsOnlyDeployEntries = Effect.fn("selectsOnlyDeployEntries")(function*
|
|
|
13475
13485
|
});
|
|
13476
13486
|
const patternsOf = Effect.fn("patternsOf")(function* patternsOf(file, text, kind) {
|
|
13477
13487
|
const parsed = yield* Effect.promise(() => parse(`${file}.ts`, kind.sourceOf(text), { lang: "ts" }));
|
|
13478
|
-
return pipe(
|
|
13488
|
+
return pipe(kind.sections(parsed.program), Array$1.flatMap(patternsIn(kind.keys)), Array$1.filter(({ text: pattern }) => !String$1.startsWith(NEGATED)(pattern)));
|
|
13479
13489
|
});
|
|
13480
13490
|
const problemsIn$19 = Effect.fn("problemsIn")(function* problemsIn(request) {
|
|
13481
13491
|
const { root, file, kind, workspaces, entries } = request;
|
|
@@ -13510,9 +13520,12 @@ const checkDeployEntryPatterns = Effect.fn("checkDeployEntryPatterns")(function*
|
|
|
13510
13520
|
file,
|
|
13511
13521
|
kind: FALLOW
|
|
13512
13522
|
}];
|
|
13513
|
-
if (VITE_CONFIG.test(file)) return [{
|
|
13523
|
+
if (VITE_CONFIG$1.test(file)) return [{
|
|
13514
13524
|
file,
|
|
13515
13525
|
kind: VITE$1
|
|
13526
|
+
}, {
|
|
13527
|
+
file,
|
|
13528
|
+
kind: FALLOW_IN_VITE
|
|
13516
13529
|
}];
|
|
13517
13530
|
return [];
|
|
13518
13531
|
}));
|
|
@@ -13533,6 +13546,9 @@ const ENTRY_KEYS = [
|
|
|
13533
13546
|
"supportEntry"
|
|
13534
13547
|
];
|
|
13535
13548
|
const FALLOW_CONFIG = /(?:^|\/)(?:\.fallowrc\.jsonc?|fallow-plugin-[^/]+\.jsonc?|\.fallow\/plugins\/[^/]+\.jsonc?)$/u;
|
|
13549
|
+
const VITE_CONFIG = /(?:^|\/)vite\.config\.[cm]?ts$/u;
|
|
13550
|
+
const FALLOW_SECTION = "fallow";
|
|
13551
|
+
const NO_OFFSET = 0;
|
|
13536
13552
|
const WILDCARD$2 = /[*?{[]/u;
|
|
13537
13553
|
const SEPARATOR$17 = "/";
|
|
13538
13554
|
const WRAP_OFFSET = 1;
|
|
@@ -13547,15 +13563,28 @@ const entryPatternsIn = (node) => {
|
|
|
13547
13563
|
return pipe(childrenOf$4(node), Array$1.flatMap(entryPatternsIn));
|
|
13548
13564
|
};
|
|
13549
13565
|
const namesOneFile = (directories) => ({ text }) => pipe(directories, Array$1.some((directory) => String$1.startsWith(`${directory}${SEPARATOR$17}`)(text))) || String$1.includes(SEPARATOR$17)(text) && !WILDCARD$2.test(text);
|
|
13566
|
+
const sourceOf$1 = (file, text) => {
|
|
13567
|
+
if (VITE_CONFIG.test(file)) return {
|
|
13568
|
+
code: text,
|
|
13569
|
+
offset: NO_OFFSET,
|
|
13570
|
+
sections: keyValues(FALLOW_SECTION)
|
|
13571
|
+
};
|
|
13572
|
+
return {
|
|
13573
|
+
code: `(${text})`,
|
|
13574
|
+
offset: WRAP_OFFSET,
|
|
13575
|
+
sections: (program) => [program]
|
|
13576
|
+
};
|
|
13577
|
+
};
|
|
13550
13578
|
const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(root, file, directories) {
|
|
13551
13579
|
const files = yield* RepositoryFiles;
|
|
13552
13580
|
const path = files.join(root, file);
|
|
13553
13581
|
const text = yield* files.readFile(path);
|
|
13554
13582
|
if (Option.isNone(text)) return [];
|
|
13555
|
-
const
|
|
13556
|
-
|
|
13583
|
+
const source = sourceOf$1(file, text.value);
|
|
13584
|
+
const parsed = yield* Effect.promise(() => parse(`${file}.ts`, source.code, { lang: "ts" }));
|
|
13585
|
+
return pipe(source.sections(parsed.program), Array$1.flatMap(entryPatternsIn), Array$1.filter(namesOneFile(directories)), Array$1.map(({ text: pattern, start }) => ({
|
|
13557
13586
|
file: path,
|
|
13558
|
-
...positionOf(text.value)(start),
|
|
13587
|
+
...positionOf(text.value)(start + WRAP_OFFSET - source.offset),
|
|
13559
13588
|
rule: RULE$61,
|
|
13560
13589
|
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.`
|
|
13561
13590
|
})));
|
|
@@ -13564,7 +13593,7 @@ const problemsIn$18 = Effect.fn("problemsIn")(function* problemsIn(root, file, d
|
|
|
13564
13593
|
const checkFallowEntries = Effect.fn("checkFallowEntries")(function* checkFallowEntries(root) {
|
|
13565
13594
|
const listed = yield* (yield* RepositoryFiles).listedFiles(root);
|
|
13566
13595
|
const directories = yield* workspaceDirectories(root);
|
|
13567
|
-
const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file))), (file) => problemsIn$18(root, file, directories), { concurrency: READ_CONCURRENCY$25 });
|
|
13596
|
+
const found = yield* Effect.forEach(pipe(listed, Array$1.filter((file) => FALLOW_CONFIG.test(file) || VITE_CONFIG.test(file))), (file) => problemsIn$18(root, file, directories), { concurrency: READ_CONCURRENCY$25 });
|
|
13568
13597
|
return Array$1.flatten(found);
|
|
13569
13598
|
});
|
|
13570
13599
|
// src/features/check-repository-layout/model/root-workspace-paths.ts
|