@r_masseater/msch 0.49.0 → 0.53.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/cargo-inputs.mjs +5 -5
- package/dist/cargo-inputs.mjs.map +1 -1
- package/dist/changed.mjs +4 -4
- package/dist/{check-upstream-exits-22kQ5juG.mjs → check-upstream-exits-DYxWDyHC.mjs} +2 -2
- package/dist/{check-upstream-exits-22kQ5juG.mjs.map → check-upstream-exits-DYxWDyHC.mjs.map} +1 -1
- package/dist/cli.mjs +472 -336
- package/dist/cli.mjs.map +1 -1
- package/dist/{comment-directives-CRAU6yNZ.mjs → comment-directives-CXgB6xpE.mjs} +1 -3
- package/dist/comment-directives-CXgB6xpE.mjs.map +1 -0
- package/dist/config.d.mts +7 -2
- package/dist/config.mjs +22 -11
- 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-BhT4RpHs.mjs → define-lint-preset-CecEvjVf.mjs} +110 -2
- package/dist/define-lint-preset-CecEvjVf.mjs.map +1 -0
- package/dist/{dependencies-Bh625TQu.mjs → dependencies-DCJv7YcW.mjs} +14 -12
- package/dist/dependencies-DCJv7YcW.mjs.map +1 -0
- package/dist/exits.mjs +3 -3
- package/dist/ignored-directories-BTMTNuAx.mjs +85 -0
- package/dist/ignored-directories-BTMTNuAx.mjs.map +1 -0
- package/dist/{index-DL7PSp7j.d.mts → index-B2X8WhBt.d.mts} +41 -2
- package/dist/{index-DdJXnW1q.d.mts → index-BZIBqvmt.d.mts} +18 -7
- package/dist/lint-rules.mjs +247 -6
- package/dist/lint-rules.mjs.map +1 -1
- package/dist/lint.d.mts +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/oxlint.mjs +4 -8
- package/dist/oxlint.mjs.map +1 -1
- package/dist/{package-M3y-ZOGZ.mjs → package-LeBO9czg.mjs} +3 -3
- package/dist/{package-M3y-ZOGZ.mjs.map → package-LeBO9czg.mjs.map} +1 -1
- package/dist/{problem-DHWbumiO.mjs → problem-CzOlOb5f.mjs} +11 -3
- package/dist/problem-CzOlOb5f.mjs.map +1 -0
- package/dist/{project-DmUvZQEd.mjs → project-C4uzq7_4.mjs} +4 -4
- package/dist/{project-DmUvZQEd.mjs.map → project-C4uzq7_4.mjs.map} +1 -1
- package/dist/publish.mjs +11 -41
- package/dist/publish.mjs.map +1 -1
- package/dist/{repository-files-CEaXCw-J.mjs → repository-files-B5sRbxlz.mjs} +7 -1
- package/dist/repository-files-B5sRbxlz.mjs.map +1 -0
- package/dist/{runtime-Calown4W.mjs → runtime-DFsdNYI0.mjs} +2 -2
- package/dist/{runtime-Calown4W.mjs.map → runtime-DFsdNYI0.mjs.map} +1 -1
- package/dist/started-once-muJbvD_I.mjs +8 -0
- package/dist/started-once-muJbvD_I.mjs.map +1 -0
- package/dist/{syntax-P4jlh7LM.mjs → syntax-3AJkpCcs.mjs} +2 -2
- package/dist/{syntax-P4jlh7LM.mjs.map → syntax-3AJkpCcs.mjs.map} +1 -1
- package/dist/workspace-settings.d.mts +2 -2
- package/dist/workspace-settings.mjs +85 -44
- package/dist/workspace-settings.mjs.map +1 -1
- package/package.json +4 -1
- package/skills/msch-checks/SKILL.md +1 -1
- package/skills/repository-config/SKILL.md +7 -7
- package/skills/workspace-settings/SKILL.md +1 -0
- package/src/app/vite.d.ts +3 -2
- package/dist/comment-directives-CRAU6yNZ.mjs.map +0 -1
- package/dist/define-lint-preset-BhT4RpHs.mjs.map +0 -1
- package/dist/dependencies-Bh625TQu.mjs.map +0 -1
- package/dist/ignored-directories-BrwYtwZw.mjs +0 -57
- package/dist/ignored-directories-BrwYtwZw.mjs.map +0 -1
- package/dist/problem-DHWbumiO.mjs.map +0 -1
- package/dist/repository-files-CEaXCw-J.mjs.map +0 -1
- package/dist/started-once-CkTooI_o.mjs +0 -13
- package/dist/started-once-CkTooI_o.mjs.map +0 -1
|
@@ -1,8 +1,57 @@
|
|
|
1
|
-
import { a as publicEntriesOf, i as EntryManifestJson, n as entriesOf, t as PackEntry } from "./package-
|
|
2
|
-
import { A as merged,
|
|
3
|
-
import {
|
|
4
|
-
import { n as RepositoryFiles, r as nodeRepositoryFiles } from "./repository-files-
|
|
1
|
+
import { a as publicEntriesOf, i as EntryManifestJson, n as entriesOf, t as PackEntry } from "./package-LeBO9czg.mjs";
|
|
2
|
+
import { A as merged, D as tasksOf, M as settingsInvalid, N as usedFrom, O as testsItself, R as literalOf, S as NO_TASKS, d as deployEntries, g as prefixed, j as programOf, k as literalSettings, m as shadcnUiIn, r as readManifest, s as writeLockedClosures, t as MANIFEST_FILE, v as workspaceDirectories, z as nestedValues } from "./dependencies-DCJv7YcW.mjs";
|
|
3
|
+
import { r as ignoredDirectories, t as collectIgnoredDirectories } from "./ignored-directories-BTMTNuAx.mjs";
|
|
4
|
+
import { n as RepositoryFiles, r as nodeRepositoryFiles } from "./repository-files-B5sRbxlz.mjs";
|
|
5
5
|
import { Array, Effect, Option, Record, Schema, pipe } from "effect";
|
|
6
|
+
// src/features/build-workspace-settings/model/dependency-allowances.ts
|
|
7
|
+
const MSCH_DEV_DEPENDENCIES = ["msch", "devDependencies"];
|
|
8
|
+
const MSCH_DEPENDENCIES = ["msch", "dependencies"];
|
|
9
|
+
const Names$1 = Schema.optional(Schema.Array(Schema.String));
|
|
10
|
+
const DependencySettings = Schema.Struct({
|
|
11
|
+
use: Names$1,
|
|
12
|
+
dependencies: Names$1
|
|
13
|
+
});
|
|
14
|
+
const WorkspaceDependencyAllowances = Schema.Record(Schema.String, DependencySettings);
|
|
15
|
+
const allowanceOf = Effect.fn("allowanceOf")(function* allowanceOf(source, dependencySets, [reason, allowance]) {
|
|
16
|
+
const sets = yield* usedFrom(source.file, dependencySets, allowance.use ?? []);
|
|
17
|
+
const dependencies = [...Array.flatten(sets), ...allowance.dependencies ?? []];
|
|
18
|
+
return [`${source.directory}: ${reason}`, {
|
|
19
|
+
workspaces: [source.directory],
|
|
20
|
+
dependencies
|
|
21
|
+
}];
|
|
22
|
+
});
|
|
23
|
+
const allowancesOf = Effect.fn("allowancesOf")(function* allowancesOf(source, dependencySets, path) {
|
|
24
|
+
const settings = yield* literalSettings({
|
|
25
|
+
source,
|
|
26
|
+
path,
|
|
27
|
+
decode: Schema.decodeUnknownEffect(WorkspaceDependencyAllowances)
|
|
28
|
+
});
|
|
29
|
+
const allowed = Record.toEntries(Option.getOrElse(settings, () => ({})));
|
|
30
|
+
const entries = yield* Effect.forEach(allowed, (entry) => allowanceOf(source, dependencySets, entry), { concurrency: 1 });
|
|
31
|
+
return Record.fromEntries(entries);
|
|
32
|
+
});
|
|
33
|
+
// src/features/build-workspace-settings/model/test-project.ts
|
|
34
|
+
const TEST_ISOLATION = ["test", "isolate"];
|
|
35
|
+
const sharedTestProject = (manifest) => ({ directory, config }) => ({
|
|
36
|
+
extends: config,
|
|
37
|
+
root: directory,
|
|
38
|
+
test: {
|
|
39
|
+
name: pipe(manifest, Option.flatMap(({ name }) => Option.fromUndefinedOr(name)), Option.getOrElse(() => directory)),
|
|
40
|
+
isolate: false
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const testProjectOf = Effect.fn("testProjectOf")(function* testProjectOf(source, config, manifest) {
|
|
44
|
+
const isolated = yield* literalSettings({
|
|
45
|
+
source,
|
|
46
|
+
path: TEST_ISOLATION,
|
|
47
|
+
decode: Schema.decodeUnknownEffect(Schema.Boolean)
|
|
48
|
+
});
|
|
49
|
+
if (Option.getOrElse(isolated, () => false)) return source.directory;
|
|
50
|
+
return sharedTestProject(manifest)({
|
|
51
|
+
directory: source.directory,
|
|
52
|
+
config
|
|
53
|
+
});
|
|
54
|
+
});
|
|
6
55
|
// src/features/build-workspace-settings/model/workspace-public-entries.ts
|
|
7
56
|
const PACK_ENTRY = ["pack", "entry"];
|
|
8
57
|
const decodeEntryManifest = Schema.decodeUnknownOption(EntryManifestJson);
|
|
@@ -34,7 +83,6 @@ const CONFIG_FILE = "vite.config.ts";
|
|
|
34
83
|
const READ_CONCURRENCY = 16;
|
|
35
84
|
const ROOT_WORKSPACE = ".";
|
|
36
85
|
const MSCH_LINT = ["msch", "lint"];
|
|
37
|
-
const MSCH_DEV_DEPENDENCIES = ["msch", "devDependencies"];
|
|
38
86
|
const Severity = Schema.Literals(Record.keys({
|
|
39
87
|
off: true,
|
|
40
88
|
allow: true,
|
|
@@ -57,11 +105,6 @@ const WorkspaceLintSettings = Schema.Struct({
|
|
|
57
105
|
ignorePatterns: Names,
|
|
58
106
|
overrides: Schema.optional(Schema.Array(WorkspaceOverride))
|
|
59
107
|
});
|
|
60
|
-
const DevDependencySettings = Schema.Struct({
|
|
61
|
-
use: Names,
|
|
62
|
-
dependencies: Names
|
|
63
|
-
});
|
|
64
|
-
const WorkspaceDevDependencies = Schema.Record(Schema.String, DevDependencySettings);
|
|
65
108
|
const overrideOf = Effect.fn("overrideOf")(function* overrideOf(source, ruleSets, override) {
|
|
66
109
|
const { file, directory } = source;
|
|
67
110
|
const fromSets = yield* usedFrom(file, ruleSets, override.use ?? []);
|
|
@@ -92,55 +135,49 @@ const lintOf = Effect.fn("lintOf")(function* lintOf(source, ruleSets) {
|
|
|
92
135
|
overrides
|
|
93
136
|
};
|
|
94
137
|
});
|
|
95
|
-
const allowanceOf = Effect.fn("allowanceOf")(function* allowanceOf(source, dependencySets, [reason, allowance]) {
|
|
96
|
-
const sets = yield* usedFrom(source.file, dependencySets, allowance.use ?? []);
|
|
97
|
-
const dependencies = [...Array.flatten(sets), ...allowance.dependencies ?? []];
|
|
98
|
-
return [`${source.directory}: ${reason}`, {
|
|
99
|
-
workspaces: [source.directory],
|
|
100
|
-
dependencies
|
|
101
|
-
}];
|
|
102
|
-
});
|
|
103
|
-
const devDependenciesOf = Effect.fn("devDependenciesOf")(function* devDependenciesOf(source, dependencySets) {
|
|
104
|
-
const settings = yield* literalSettings({
|
|
105
|
-
source,
|
|
106
|
-
path: MSCH_DEV_DEPENDENCIES,
|
|
107
|
-
decode: Schema.decodeUnknownEffect(WorkspaceDevDependencies)
|
|
108
|
-
});
|
|
109
|
-
const allowed = Record.toEntries(Option.getOrElse(settings, () => ({})));
|
|
110
|
-
const entries = yield* Effect.forEach(allowed, (entry) => allowanceOf(source, dependencySets, entry), { concurrency: 1 });
|
|
111
|
-
return Record.fromEntries(entries);
|
|
112
|
-
});
|
|
113
138
|
const settingsOf = Effect.fn("settingsOf")(function* settingsOf(source, options) {
|
|
114
139
|
const lint = yield* lintOf(source, options.ruleSets);
|
|
115
|
-
const devDependencies = yield*
|
|
116
|
-
const
|
|
140
|
+
const devDependencies = yield* allowancesOf(source, options.dependencySets, MSCH_DEV_DEPENDENCIES);
|
|
141
|
+
const dependencies = yield* allowancesOf(source, options.dependencySets, MSCH_DEPENDENCIES);
|
|
142
|
+
const ownTests = testsItself(source.program);
|
|
117
143
|
const files = yield* RepositoryFiles;
|
|
118
144
|
const manifest = yield* readManifest(files.dirname(source.file));
|
|
119
145
|
const tasks = tasksOf(manifest)(source.program);
|
|
146
|
+
const testProject = yield* testProjectOf(source, `${source.directory}/${CONFIG_FILE}`, manifest);
|
|
120
147
|
return {
|
|
121
148
|
directory: source.directory,
|
|
122
149
|
...lint,
|
|
123
150
|
devDependencies,
|
|
151
|
+
dependencies,
|
|
124
152
|
ownTests,
|
|
153
|
+
testProject,
|
|
125
154
|
tasks
|
|
126
155
|
};
|
|
127
156
|
});
|
|
157
|
+
const unconfiguredWorkspace = Effect.fn("unconfiguredWorkspace")(function* unconfiguredWorkspace(root, directory) {
|
|
158
|
+
const files = yield* RepositoryFiles;
|
|
159
|
+
const publicEntries = yield* publicEntryFiles(root, directory, Option.none());
|
|
160
|
+
const manifest = yield* readManifest(files.join(root, directory));
|
|
161
|
+
return {
|
|
162
|
+
directory,
|
|
163
|
+
ignorePatterns: [],
|
|
164
|
+
overrides: [],
|
|
165
|
+
devDependencies: {},
|
|
166
|
+
dependencies: {},
|
|
167
|
+
ownTests: false,
|
|
168
|
+
testProject: sharedTestProject(manifest)({
|
|
169
|
+
directory,
|
|
170
|
+
config: false
|
|
171
|
+
}),
|
|
172
|
+
tasks: NO_TASKS,
|
|
173
|
+
publicEntries
|
|
174
|
+
};
|
|
175
|
+
});
|
|
128
176
|
const workspaceIn = Effect.fn("workspaceIn")(function* workspaceIn(options, directory) {
|
|
129
177
|
const files = yield* RepositoryFiles;
|
|
130
178
|
const file = files.join(options.root, directory, CONFIG_FILE);
|
|
131
179
|
const text = yield* files.readFile(file);
|
|
132
|
-
if (Option.isNone(text))
|
|
133
|
-
const publicEntries = yield* publicEntryFiles(options.root, directory, Option.none());
|
|
134
|
-
return {
|
|
135
|
-
directory,
|
|
136
|
-
ignorePatterns: [],
|
|
137
|
-
overrides: [],
|
|
138
|
-
devDependencies: {},
|
|
139
|
-
ownTests: false,
|
|
140
|
-
tasks: NO_TASKS,
|
|
141
|
-
publicEntries
|
|
142
|
-
};
|
|
143
|
-
}
|
|
180
|
+
if (Option.isNone(text)) return yield* unconfiguredWorkspace(options.root, directory);
|
|
144
181
|
const program = yield* programOf(file, text.value);
|
|
145
182
|
const settings = yield* settingsOf({
|
|
146
183
|
file,
|
|
@@ -157,6 +194,10 @@ const mergedTasks = (found) => ({
|
|
|
157
194
|
verify: pipe(found, Array.flatMap(({ tasks }) => tasks.verify)),
|
|
158
195
|
native: pipe(found, Array.flatMap(({ tasks }) => tasks.native))
|
|
159
196
|
});
|
|
197
|
+
const mergedAllowances = (found) => ({
|
|
198
|
+
devDependencies: merged(pipe(found, Array.map(({ devDependencies }) => devDependencies))),
|
|
199
|
+
dependencies: merged(pipe(found, Array.map(({ dependencies }) => dependencies)))
|
|
200
|
+
});
|
|
160
201
|
const collectWorkspaceSettings = Effect.fn("collectWorkspaceSettings")(function* collectWorkspaceSettings(options) {
|
|
161
202
|
yield* Effect.ignore(writeLockedClosures(options.root));
|
|
162
203
|
const directories = yield* workspaceDirectories(options.root);
|
|
@@ -172,9 +213,9 @@ const collectWorkspaceSettings = Effect.fn("collectWorkspaceSettings")(function*
|
|
|
172
213
|
publicEntries: pipe(found, Array.flatMap(({ publicEntries }) => publicEntries)),
|
|
173
214
|
deployEntries: yield* deployEntries(options.root)
|
|
174
215
|
},
|
|
175
|
-
testProjects: pipe(found, Array.filter(({ ownTests }) => !ownTests), Array.map(({
|
|
216
|
+
testProjects: pipe(found, Array.filter(({ ownTests }) => !ownTests), Array.map(({ testProject }) => testProject)),
|
|
176
217
|
tasks: mergedTasks(found),
|
|
177
|
-
|
|
218
|
+
...mergedAllowances(found)
|
|
178
219
|
};
|
|
179
220
|
});
|
|
180
221
|
const workspaceSettings = (options) => Effect.runPromise(collectWorkspaceSettings(options).pipe(Effect.provide(nodeRepositoryFiles)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-settings.mjs","names":["Arr","Rec","Arr"],"sources":["../src/features/build-workspace-settings/model/workspace-public-entries.ts","../src/features/build-workspace-settings/model/workspace-settings.ts"],"sourcesContent":["import { Array as Arr, Effect, Option, Schema, pipe } from \"effect\";\n\nimport {\n MANIFEST_FILE,\n EntryManifestJson,\n entriesOf,\n PackEntry,\n publicEntriesOf,\n} from \"#/entities/package/index.ts\";\nimport type { EntryManifest, PackEntrySource } from \"#/entities/package/index.ts\";\nimport { literalOf, nestedValues } from \"#/entities/workspace/index.ts\";\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nconst PACK_ENTRY = [\"pack\", \"entry\"] as const;\n\nconst decodeEntryManifest = Schema.decodeUnknownOption(EntryManifestJson);\nconst decodePackEntry = Schema.decodeUnknownOption(PackEntry);\n\nconst packEntriesIn = (program: unknown): readonly PackEntrySource[] =>\n pipe(\n nestedValues(PACK_ENTRY)(program),\n Arr.flatMap((node) =>\n pipe(\n literalOf(node),\n Option.flatMap(decodePackEntry),\n Option.toArray,\n Arr.flatMap(entriesOf),\n ),\n ),\n );\n\ninterface EntryFilesRequest {\n readonly join: (target: string) => string;\n readonly packEntries: readonly PackEntrySource[];\n}\n\nconst entryFilesOf =\n ({ join, packEntries }: EntryFilesRequest) =>\n (manifest: EntryManifest): readonly string[] => {\n const joined = pipe(\n packEntries,\n Arr.map((entry) => ({ name: entry.name, source: join(entry.source) })),\n );\n return pipe(\n publicEntriesOf({ manifest, join, packEntries: joined }),\n Arr.map(({ source }) => source),\n Arr.dedupe,\n );\n };\n\nexport const publicEntryFiles = Effect.fn(\"publicEntryFiles\")(function* publicEntryFiles(\n root: string,\n directory: string,\n config: Option.Option<unknown>,\n) {\n const files = yield* RepositoryFiles;\n const text = yield* files.readFile(files.join(root, directory, MANIFEST_FILE));\n const packEntries = pipe(\n config,\n Option.map(packEntriesIn),\n Option.getOrElse(() => []),\n );\n const join = (target: string): string => files.join(directory, target);\n return pipe(\n text,\n Option.flatMap(decodeEntryManifest),\n Option.map(entryFilesOf({ join, packEntries })),\n Option.getOrElse((): readonly string[] => []),\n );\n});\n","import { Array as Arr, Effect, Option, Record as Rec, Schema, pipe } from \"effect\";\nimport type { AllowWarnDeny, OxlintOverride } from \"vite-plus/lint\";\n\nimport { readManifest } from \"#/entities/package/index.ts\";\nimport {\n deployEntries,\n literalSettings,\n merged,\n programOf,\n settingsInvalid,\n usedFrom,\n workspaceDirectories,\n writeLockedClosures,\n prefixed,\n shadcnUiIn,\n NO_TASKS,\n TEST_TASK,\n definesTask,\n tasksOf,\n} from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSource, WorkspaceTasks } from \"#/entities/workspace/index.ts\";\nimport { collectIgnoredDirectories } from \"#/shared/lib/ignored-directories.ts\";\nimport type { IgnoredDirectory } from \"#/shared/lib/ignored-directories.ts\";\nimport { RepositoryFiles, nodeRepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { publicEntryFiles } from \"./workspace-public-entries.ts\";\n\nexport type RuleSet = Readonly<Record<string, unknown>>;\nexport type RuleSets = Readonly<Record<string, RuleSet>>;\nexport type DependencySets = Readonly<Record<string, readonly string[]>>;\n\nconst CONFIG_FILE = \"vite.config.ts\";\nconst READ_CONCURRENCY = 16;\nconst ROOT_WORKSPACE = \".\";\nconst MSCH_LINT = [\"msch\", \"lint\"] as const;\nconst MSCH_DEV_DEPENDENCIES = [\"msch\", \"devDependencies\"] as const;\n\ntype SeverityName = Extract<AllowWarnDeny, string>;\n\nconst SEVERITY_NAMES: Readonly<Record<SeverityName, true>> = {\n off: true,\n allow: true,\n warn: true,\n error: true,\n deny: true,\n};\nconst Severity = Schema.Literals<readonly SeverityName[]>(Rec.keys(SEVERITY_NAMES));\nconst SeverityWithOptions = Schema.mutable(\n Schema.TupleWithRest(Schema.Tuple([Severity]), [Schema.Unknown]),\n);\nconst RuleSetting = Schema.Union([Severity, SeverityWithOptions]);\nconst Rules = Schema.Record(Schema.String, RuleSetting);\nconst decodeRules = Schema.decodeUnknownEffect(Rules);\nconst Names = Schema.optional(Schema.Array(Schema.String));\nconst WorkspaceOverride = Schema.Struct({\n files: Schema.Array(Schema.String),\n excludeFiles: Names,\n rules: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),\n use: Names,\n});\nconst WorkspaceLintSettings = Schema.Struct({\n ignorePatterns: Names,\n overrides: Schema.optional(Schema.Array(WorkspaceOverride)),\n});\nconst DevDependencySettings = Schema.Struct({ use: Names, dependencies: Names });\nconst WorkspaceDevDependencies = Schema.Record(Schema.String, DevDependencySettings);\n\nexport interface DevDependencyAllowance {\n readonly workspaces: readonly string[];\n readonly dependencies: readonly string[];\n}\n\nexport interface WorkspaceLint {\n readonly ignorePatterns: readonly string[];\n readonly overrides: readonly OxlintOverride[];\n readonly shadcnUi: readonly string[];\n readonly publicEntries: readonly string[];\n readonly deployEntries: readonly string[];\n}\n\nexport interface WorkspaceSettings {\n readonly lint: WorkspaceLint;\n readonly members: readonly string[];\n readonly ignoredDirectories: readonly IgnoredDirectory[];\n readonly testProjects: readonly string[];\n readonly tasks: WorkspaceTasks;\n readonly devDependencies: Readonly<Record<string, DevDependencyAllowance>>;\n}\n\nexport interface SettingsOptions {\n readonly root: string;\n readonly ruleSets: RuleSets;\n readonly dependencySets: DependencySets;\n}\n\ninterface Workspace {\n readonly directory: string;\n readonly ignorePatterns: readonly string[];\n readonly overrides: readonly OxlintOverride[];\n readonly devDependencies: Readonly<Record<string, DevDependencyAllowance>>;\n readonly ownTests: boolean;\n readonly tasks: WorkspaceTasks;\n readonly publicEntries: readonly string[];\n}\n\nconst overrideOf = Effect.fn(\"overrideOf\")(function* overrideOf(\n source: WorkspaceSource,\n ruleSets: RuleSets,\n override: typeof WorkspaceOverride.Type,\n) {\n const { file, directory } = source;\n const fromSets = yield* usedFrom(file, ruleSets, override.use ?? []);\n const rules = yield* decodeRules(merged([...fromSets, override.rules ?? {}])).pipe(\n Effect.mapError((error) => settingsInvalid(file)(error.message)),\n );\n const files = pipe(override.files, Arr.map(prefixed(directory)));\n return pipe(\n Option.fromUndefinedOr(override.excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files, rules }),\n onSome: (excluded): OxlintOverride => ({\n files,\n excludeFiles: pipe(excluded, Arr.map(prefixed(directory))),\n rules,\n }),\n }),\n );\n});\n\nconst lintOf = Effect.fn(\"lintOf\")(function* lintOf(source: WorkspaceSource, ruleSets: RuleSets) {\n const settings = yield* literalSettings({\n source,\n path: MSCH_LINT,\n decode: Schema.decodeUnknownEffect(WorkspaceLintSettings),\n });\n const lint = Option.getOrElse(settings, (): typeof WorkspaceLintSettings.Type => ({}));\n const overrides = yield* Effect.forEach(\n lint.overrides ?? [],\n (override) => overrideOf(source, ruleSets, override),\n { concurrency: 1 },\n );\n const ignorePatterns = pipe(lint.ignorePatterns ?? [], Arr.map(prefixed(source.directory)));\n return { ignorePatterns, overrides };\n});\n\nconst allowanceOf = Effect.fn(\"allowanceOf\")(function* allowanceOf(\n source: WorkspaceSource,\n dependencySets: DependencySets,\n [reason, allowance]: readonly [string, typeof DevDependencySettings.Type],\n) {\n const sets = yield* usedFrom(source.file, dependencySets, allowance.use ?? []);\n const dependencies = [...Arr.flatten(sets), ...(allowance.dependencies ?? [])];\n return [\n `${source.directory}: ${reason}`,\n { workspaces: [source.directory], dependencies },\n ] as const;\n});\n\nconst devDependenciesOf = Effect.fn(\"devDependenciesOf\")(function* devDependenciesOf(\n source: WorkspaceSource,\n dependencySets: DependencySets,\n) {\n const settings = yield* literalSettings({\n source,\n path: MSCH_DEV_DEPENDENCIES,\n decode: Schema.decodeUnknownEffect(WorkspaceDevDependencies),\n });\n const allowed = Rec.toEntries(Option.getOrElse(settings, () => ({})));\n const entries = yield* Effect.forEach(\n allowed,\n (entry) => allowanceOf(source, dependencySets, entry),\n {\n concurrency: 1,\n },\n );\n return Rec.fromEntries(entries);\n});\n\nconst settingsOf = Effect.fn(\"settingsOf\")(function* settingsOf(\n source: WorkspaceSource,\n options: SettingsOptions,\n) {\n const lint = yield* lintOf(source, options.ruleSets);\n const devDependencies = yield* devDependenciesOf(source, options.dependencySets);\n const ownTests = definesTask(TEST_TASK)(source.program);\n const files = yield* RepositoryFiles;\n const manifest = yield* readManifest(files.dirname(source.file));\n const tasks = tasksOf(manifest)(source.program);\n return { directory: source.directory, ...lint, devDependencies, ownTests, tasks };\n});\n\nconst workspaceIn = Effect.fn(\"workspaceIn\")(function* workspaceIn(\n options: SettingsOptions,\n directory: string,\n) {\n const files = yield* RepositoryFiles;\n const file = files.join(options.root, directory, CONFIG_FILE);\n const text = yield* files.readFile(file);\n if (Option.isNone(text)) {\n const publicEntries = yield* publicEntryFiles(options.root, directory, Option.none());\n return {\n directory,\n ignorePatterns: [],\n overrides: [],\n devDependencies: {},\n ownTests: false,\n tasks: NO_TASKS,\n publicEntries,\n };\n }\n const program = yield* programOf(file, text.value);\n const settings = yield* settingsOf({ file, directory, program }, options);\n const publicEntries = yield* publicEntryFiles(options.root, directory, Option.some(program));\n return { ...settings, publicEntries };\n});\n\nconst mergedTasks = (found: readonly { readonly tasks: WorkspaceTasks }[]): WorkspaceTasks => ({\n verify: pipe(\n found,\n Arr.flatMap(({ tasks }) => tasks.verify),\n ),\n native: pipe(\n found,\n Arr.flatMap(({ tasks }) => tasks.native),\n ),\n});\n\nconst collectWorkspaceSettings = Effect.fn(\"collectWorkspaceSettings\")(\n function* collectWorkspaceSettings(options: SettingsOptions) {\n yield* Effect.ignore(writeLockedClosures(options.root));\n const directories = yield* workspaceDirectories(options.root);\n const found: readonly Workspace[] = yield* Effect.forEach(\n directories,\n (directory) => workspaceIn(options, directory),\n { concurrency: READ_CONCURRENCY },\n );\n const shadcnUi = yield* Effect.forEach(\n directories,\n (directory) => shadcnUiIn(options.root, directory),\n { concurrency: READ_CONCURRENCY },\n );\n return {\n members: pipe(\n directories,\n Arr.filter((directory) => directory !== ROOT_WORKSPACE),\n ),\n ignoredDirectories: yield* collectIgnoredDirectories(options.root),\n lint: {\n ignorePatterns: pipe(\n found,\n Arr.flatMap(({ ignorePatterns }) => ignorePatterns),\n ),\n overrides: pipe(\n found,\n Arr.flatMap(({ overrides }) => overrides),\n ),\n shadcnUi: Arr.getSomes(shadcnUi),\n publicEntries: pipe(\n found,\n Arr.flatMap(({ publicEntries }) => publicEntries),\n ),\n deployEntries: yield* deployEntries(options.root),\n },\n testProjects: pipe(\n found,\n Arr.filter(({ ownTests }) => !ownTests),\n Arr.map(({ directory }) => directory),\n ),\n tasks: mergedTasks(found),\n devDependencies: merged(\n pipe(\n found,\n Arr.map(({ devDependencies }) => devDependencies),\n ),\n ),\n };\n },\n);\n\nexport const workspaceSettings = (options: SettingsOptions): Promise<WorkspaceSettings> =>\n Effect.runPromise(collectWorkspaceSettings(options).pipe(Effect.provide(nodeRepositoryFiles)));\n\nexport type { WorkspaceTasks } from \"#/entities/workspace/index.ts\";\n"],"mappings":";;;;;;AAaA,MAAM,aAAa,CAAC,QAAQ,OAAO;AAEnC,MAAM,sBAAsB,OAAO,oBAAoB,iBAAiB;AACxE,MAAM,kBAAkB,OAAO,oBAAoB,SAAS;AAE5D,MAAM,iBAAiB,YACrB,KACE,aAAa,UAAU,CAAC,CAAC,OAAO,GAChCA,MAAI,SAAS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AY,MAAM,MAAM,CACzC;AACF;AAEA,MAAM,2BAA2B,OAAO,GAAG,0BAA0B,CAAC,CACpE,UAAU,yBAAyB,SAA0B;CAC3D,OAAO,OAAO,OAAO,oBAAoB,QAAQ,IAAI,CAAC;CACtD,MAAM,cAAc,OAAO,qBAAqB,QAAQ,IAAI;CAC5D,MAAM,QAA8B,OAAO,OAAO,QAChD,cACC,cAAc,YAAY,SAAS,SAAS,GAC7C,EAAE,aAAa,iBAAiB,CAClC;CACA,MAAM,WAAW,OAAO,OAAO,QAC7B,cACC,cAAc,WAAW,QAAQ,MAAM,SAAS,GACjD,EAAE,aAAa,iBAAiB,CAClC;CACA,OAAO;EACL,SAAS,KACP,aACAA,MAAI,QAAQ,cAAc,cAAc,cAAc,CACxD;EACA,oBAAoB,OAAO,0BAA0B,QAAQ,IAAI;EACjE,MAAM;GACJ,gBAAgB,KACd,OACAA,MAAI,SAAS,EAAE,qBAAqB,cAAc,CACpD;GACA,WAAW,KACT,OACAA,MAAI,SAAS,EAAE,gBAAgB,SAAS,CAC1C;GACA,UAAUA,MAAI,SAAS,QAAQ;GAC/B,eAAe,KACb,OACAA,MAAI,SAAS,EAAE,oBAAoB,aAAa,CAClD;GACA,eAAe,OAAO,cAAc,QAAQ,IAAI;EAClD;EACA,cAAc,KACZ,OACAA,MAAI,QAAQ,EAAE,eAAe,CAAC,QAAQ,GACtCA,MAAI,KAAK,EAAE,gBAAgB,SAAS,CACtC;EACA,OAAO,YAAY,KAAK;EACxB,iBAAiB,OACf,KACE,OACAA,MAAI,KAAK,EAAE,sBAAsB,eAAe,CAClD,CACF;CACF;AACF,CACF;AAEA,MAAa,qBAAqB,YAChC,OAAO,WAAW,yBAAyB,OAAO,CAAC,CAAC,KAAK,OAAO,QAAQ,mBAAmB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"workspace-settings.mjs","names":["Names","Arr","Rec","Arr","Rec","Arr"],"sources":["../src/features/build-workspace-settings/model/dependency-allowances.ts","../src/features/build-workspace-settings/model/test-project.ts","../src/features/build-workspace-settings/model/workspace-public-entries.ts","../src/features/build-workspace-settings/model/workspace-settings.ts"],"sourcesContent":["import { Array as Arr, Effect, Option, Record as Rec, Schema } from \"effect\";\n\nimport { literalSettings, usedFrom } from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSource } from \"#/entities/workspace/index.ts\";\n\nexport type DependencySets = Readonly<Record<string, readonly string[]>>;\n\nexport interface DependencyAllowance {\n readonly workspaces: readonly string[];\n readonly dependencies: readonly string[];\n}\n\nexport type DependencyAllowances = Readonly<Record<string, DependencyAllowance>>;\n\nexport const MSCH_DEV_DEPENDENCIES = [\"msch\", \"devDependencies\"] as const;\nexport const MSCH_DEPENDENCIES = [\"msch\", \"dependencies\"] as const;\n\nconst Names = Schema.optional(Schema.Array(Schema.String));\nconst DependencySettings = Schema.Struct({ use: Names, dependencies: Names });\nconst WorkspaceDependencyAllowances = Schema.Record(Schema.String, DependencySettings);\n\nconst allowanceOf = Effect.fn(\"allowanceOf\")(function* allowanceOf(\n source: WorkspaceSource,\n dependencySets: DependencySets,\n [reason, allowance]: readonly [string, typeof DependencySettings.Type],\n) {\n const sets = yield* usedFrom(source.file, dependencySets, allowance.use ?? []);\n const dependencies = [...Arr.flatten(sets), ...(allowance.dependencies ?? [])];\n return [\n `${source.directory}: ${reason}`,\n { workspaces: [source.directory], dependencies },\n ] as const;\n});\n\nexport const allowancesOf = Effect.fn(\"allowancesOf\")(function* allowancesOf(\n source: WorkspaceSource,\n dependencySets: DependencySets,\n path: typeof MSCH_DEV_DEPENDENCIES | typeof MSCH_DEPENDENCIES,\n) {\n const settings = yield* literalSettings({\n source,\n path,\n decode: Schema.decodeUnknownEffect(WorkspaceDependencyAllowances),\n });\n const allowed = Rec.toEntries(Option.getOrElse(settings, () => ({})));\n const entries = yield* Effect.forEach(\n allowed,\n (entry) => allowanceOf(source, dependencySets, entry),\n { concurrency: 1 },\n );\n return Rec.fromEntries(entries);\n});\n","import { Effect, Option, Schema, pipe } from \"effect\";\n\nimport type { Manifest } from \"#/entities/package/index.ts\";\nimport { literalSettings } from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSource } from \"#/entities/workspace/index.ts\";\n\nconst TEST_ISOLATION = [\"test\", \"isolate\"] as const;\n\nexport interface SharedTestProject {\n readonly extends: string | false;\n readonly root: string;\n readonly test: { readonly name: string; readonly isolate: false };\n}\n\nexport type TestProject = string | SharedTestProject;\n\nexport interface ProjectPlace {\n readonly directory: string;\n readonly config: string | false;\n}\n\nexport const sharedTestProject =\n (manifest: Option.Option<Manifest>) =>\n ({ directory, config }: ProjectPlace): TestProject => ({\n extends: config,\n root: directory,\n test: {\n name: pipe(\n manifest,\n Option.flatMap(({ name }) => Option.fromUndefinedOr(name)),\n Option.getOrElse(() => directory),\n ),\n isolate: false,\n },\n });\n\nexport const testProjectOf = Effect.fn(\"testProjectOf\")(function* testProjectOf(\n source: WorkspaceSource,\n config: string,\n manifest: Option.Option<Manifest>,\n) {\n const isolated = yield* literalSettings({\n source,\n path: TEST_ISOLATION,\n decode: Schema.decodeUnknownEffect(Schema.Boolean),\n });\n if (Option.getOrElse(isolated, () => false)) {\n return source.directory;\n }\n return sharedTestProject(manifest)({ directory: source.directory, config });\n});\n","import { Array as Arr, Effect, Option, Schema, pipe } from \"effect\";\n\nimport {\n MANIFEST_FILE,\n EntryManifestJson,\n entriesOf,\n PackEntry,\n publicEntriesOf,\n} from \"#/entities/package/index.ts\";\nimport type { EntryManifest, PackEntrySource } from \"#/entities/package/index.ts\";\nimport { literalOf, nestedValues } from \"#/entities/workspace/index.ts\";\nimport { RepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nconst PACK_ENTRY = [\"pack\", \"entry\"] as const;\n\nconst decodeEntryManifest = Schema.decodeUnknownOption(EntryManifestJson);\nconst decodePackEntry = Schema.decodeUnknownOption(PackEntry);\n\nconst packEntriesIn = (program: unknown): readonly PackEntrySource[] =>\n pipe(\n nestedValues(PACK_ENTRY)(program),\n Arr.flatMap((node) =>\n pipe(\n literalOf(node),\n Option.flatMap(decodePackEntry),\n Option.toArray,\n Arr.flatMap(entriesOf),\n ),\n ),\n );\n\ninterface EntryFilesRequest {\n readonly join: (target: string) => string;\n readonly packEntries: readonly PackEntrySource[];\n}\n\nconst entryFilesOf =\n ({ join, packEntries }: EntryFilesRequest) =>\n (manifest: EntryManifest): readonly string[] => {\n const joined = pipe(\n packEntries,\n Arr.map((entry) => ({ name: entry.name, source: join(entry.source) })),\n );\n return pipe(\n publicEntriesOf({ manifest, join, packEntries: joined }),\n Arr.map(({ source }) => source),\n Arr.dedupe,\n );\n };\n\nexport const publicEntryFiles = Effect.fn(\"publicEntryFiles\")(function* publicEntryFiles(\n root: string,\n directory: string,\n config: Option.Option<unknown>,\n) {\n const files = yield* RepositoryFiles;\n const text = yield* files.readFile(files.join(root, directory, MANIFEST_FILE));\n const packEntries = pipe(\n config,\n Option.map(packEntriesIn),\n Option.getOrElse(() => []),\n );\n const join = (target: string): string => files.join(directory, target);\n return pipe(\n text,\n Option.flatMap(decodeEntryManifest),\n Option.map(entryFilesOf({ join, packEntries })),\n Option.getOrElse((): readonly string[] => []),\n );\n});\n","import { Array as Arr, Effect, Option, Record as Rec, Schema, pipe } from \"effect\";\nimport type { AllowWarnDeny, OxlintOverride } from \"vite-plus/lint\";\n\nimport { readManifest } from \"#/entities/package/index.ts\";\nimport {\n deployEntries,\n literalSettings,\n merged,\n programOf,\n settingsInvalid,\n usedFrom,\n workspaceDirectories,\n writeLockedClosures,\n prefixed,\n shadcnUiIn,\n NO_TASKS,\n tasksOf,\n testsItself,\n} from \"#/entities/workspace/index.ts\";\nimport type { WorkspaceSource, WorkspaceTasks } from \"#/entities/workspace/index.ts\";\nimport { collectIgnoredDirectories } from \"#/shared/lib/ignored-directories.ts\";\nimport type { IgnoredDirectory } from \"#/shared/lib/ignored-directories.ts\";\nimport { RepositoryFiles, nodeRepositoryFiles } from \"#/shared/lib/repository-files.ts\";\n\nimport { MSCH_DEPENDENCIES, MSCH_DEV_DEPENDENCIES, allowancesOf } from \"./dependency-allowances.ts\";\nimport type { DependencyAllowances, DependencySets } from \"./dependency-allowances.ts\";\nimport { sharedTestProject, testProjectOf } from \"./test-project.ts\";\nimport type { TestProject } from \"./test-project.ts\";\nimport { publicEntryFiles } from \"./workspace-public-entries.ts\";\n\nexport type RuleSet = Readonly<Record<string, unknown>>;\nexport type RuleSets = Readonly<Record<string, RuleSet>>;\n\nconst CONFIG_FILE = \"vite.config.ts\";\nconst READ_CONCURRENCY = 16;\nconst ROOT_WORKSPACE = \".\";\nconst MSCH_LINT = [\"msch\", \"lint\"] as const;\n\ntype SeverityName = Extract<AllowWarnDeny, string>;\n\nconst SEVERITY_NAMES: Readonly<Record<SeverityName, true>> = {\n off: true,\n allow: true,\n warn: true,\n error: true,\n deny: true,\n};\nconst Severity = Schema.Literals<readonly SeverityName[]>(Rec.keys(SEVERITY_NAMES));\nconst SeverityWithOptions = Schema.mutable(\n Schema.TupleWithRest(Schema.Tuple([Severity]), [Schema.Unknown]),\n);\nconst RuleSetting = Schema.Union([Severity, SeverityWithOptions]);\nconst Rules = Schema.Record(Schema.String, RuleSetting);\nconst decodeRules = Schema.decodeUnknownEffect(Rules);\nconst Names = Schema.optional(Schema.Array(Schema.String));\nconst WorkspaceOverride = Schema.Struct({\n files: Schema.Array(Schema.String),\n excludeFiles: Names,\n rules: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),\n use: Names,\n});\nconst WorkspaceLintSettings = Schema.Struct({\n ignorePatterns: Names,\n overrides: Schema.optional(Schema.Array(WorkspaceOverride)),\n});\n\nexport interface WorkspaceLint {\n readonly ignorePatterns: readonly string[];\n readonly overrides: readonly OxlintOverride[];\n readonly shadcnUi: readonly string[];\n readonly publicEntries: readonly string[];\n readonly deployEntries: readonly string[];\n}\n\nexport interface WorkspaceSettings {\n readonly lint: WorkspaceLint;\n readonly members: readonly string[];\n readonly ignoredDirectories: readonly IgnoredDirectory[];\n readonly testProjects: readonly TestProject[];\n readonly tasks: WorkspaceTasks;\n readonly devDependencies: DependencyAllowances;\n readonly dependencies: DependencyAllowances;\n}\n\nexport interface SettingsOptions {\n readonly root: string;\n readonly ruleSets: RuleSets;\n readonly dependencySets: DependencySets;\n}\n\ninterface Workspace {\n readonly directory: string;\n readonly ignorePatterns: readonly string[];\n readonly overrides: readonly OxlintOverride[];\n readonly devDependencies: DependencyAllowances;\n readonly dependencies: DependencyAllowances;\n readonly ownTests: boolean;\n readonly testProject: TestProject;\n readonly tasks: WorkspaceTasks;\n readonly publicEntries: readonly string[];\n}\n\nconst overrideOf = Effect.fn(\"overrideOf\")(function* overrideOf(\n source: WorkspaceSource,\n ruleSets: RuleSets,\n override: typeof WorkspaceOverride.Type,\n) {\n const { file, directory } = source;\n const fromSets = yield* usedFrom(file, ruleSets, override.use ?? []);\n const rules = yield* decodeRules(merged([...fromSets, override.rules ?? {}])).pipe(\n Effect.mapError((error) => settingsInvalid(file)(error.message)),\n );\n const files = pipe(override.files, Arr.map(prefixed(directory)));\n return pipe(\n Option.fromUndefinedOr(override.excludeFiles),\n Option.match({\n onNone: (): OxlintOverride => ({ files, rules }),\n onSome: (excluded): OxlintOverride => ({\n files,\n excludeFiles: pipe(excluded, Arr.map(prefixed(directory))),\n rules,\n }),\n }),\n );\n});\n\nconst lintOf = Effect.fn(\"lintOf\")(function* lintOf(source: WorkspaceSource, ruleSets: RuleSets) {\n const settings = yield* literalSettings({\n source,\n path: MSCH_LINT,\n decode: Schema.decodeUnknownEffect(WorkspaceLintSettings),\n });\n const lint = Option.getOrElse(settings, (): typeof WorkspaceLintSettings.Type => ({}));\n const overrides = yield* Effect.forEach(\n lint.overrides ?? [],\n (override) => overrideOf(source, ruleSets, override),\n { concurrency: 1 },\n );\n const ignorePatterns = pipe(lint.ignorePatterns ?? [], Arr.map(prefixed(source.directory)));\n return { ignorePatterns, overrides };\n});\n\nconst settingsOf = Effect.fn(\"settingsOf\")(function* settingsOf(\n source: WorkspaceSource,\n options: SettingsOptions,\n) {\n const lint = yield* lintOf(source, options.ruleSets);\n const devDependencies = yield* allowancesOf(\n source,\n options.dependencySets,\n MSCH_DEV_DEPENDENCIES,\n );\n const dependencies = yield* allowancesOf(source, options.dependencySets, MSCH_DEPENDENCIES);\n const ownTests = testsItself(source.program);\n const files = yield* RepositoryFiles;\n const manifest = yield* readManifest(files.dirname(source.file));\n const tasks = tasksOf(manifest)(source.program);\n const testProject = yield* testProjectOf(source, `${source.directory}/${CONFIG_FILE}`, manifest);\n return {\n directory: source.directory,\n ...lint,\n devDependencies,\n dependencies,\n ownTests,\n testProject,\n tasks,\n };\n});\n\nconst unconfiguredWorkspace = Effect.fn(\"unconfiguredWorkspace\")(function* unconfiguredWorkspace(\n root: string,\n directory: string,\n) {\n const files = yield* RepositoryFiles;\n const publicEntries = yield* publicEntryFiles(root, directory, Option.none());\n const manifest = yield* readManifest(files.join(root, directory));\n return {\n directory,\n ignorePatterns: [],\n overrides: [],\n devDependencies: {},\n dependencies: {},\n ownTests: false,\n testProject: sharedTestProject(manifest)({ directory, config: false }),\n tasks: NO_TASKS,\n publicEntries,\n };\n});\n\nconst workspaceIn = Effect.fn(\"workspaceIn\")(function* workspaceIn(\n options: SettingsOptions,\n directory: string,\n) {\n const files = yield* RepositoryFiles;\n const file = files.join(options.root, directory, CONFIG_FILE);\n const text = yield* files.readFile(file);\n if (Option.isNone(text)) {\n return yield* unconfiguredWorkspace(options.root, directory);\n }\n const program = yield* programOf(file, text.value);\n const settings = yield* settingsOf({ file, directory, program }, options);\n const publicEntries = yield* publicEntryFiles(options.root, directory, Option.some(program));\n return { ...settings, publicEntries };\n});\n\nconst mergedTasks = (found: readonly { readonly tasks: WorkspaceTasks }[]): WorkspaceTasks => ({\n verify: pipe(\n found,\n Arr.flatMap(({ tasks }) => tasks.verify),\n ),\n native: pipe(\n found,\n Arr.flatMap(({ tasks }) => tasks.native),\n ),\n});\n\nconst mergedAllowances = (\n found: readonly Workspace[],\n): Pick<Workspace, \"devDependencies\" | \"dependencies\"> => ({\n devDependencies: merged(\n pipe(\n found,\n Arr.map(({ devDependencies }) => devDependencies),\n ),\n ),\n dependencies: merged(\n pipe(\n found,\n Arr.map(({ dependencies }) => dependencies),\n ),\n ),\n});\n\nconst collectWorkspaceSettings = Effect.fn(\"collectWorkspaceSettings\")(\n function* collectWorkspaceSettings(options: SettingsOptions) {\n yield* Effect.ignore(writeLockedClosures(options.root));\n const directories = yield* workspaceDirectories(options.root);\n const found: readonly Workspace[] = yield* Effect.forEach(\n directories,\n (directory) => workspaceIn(options, directory),\n { concurrency: READ_CONCURRENCY },\n );\n const shadcnUi = yield* Effect.forEach(\n directories,\n (directory) => shadcnUiIn(options.root, directory),\n { concurrency: READ_CONCURRENCY },\n );\n return {\n members: pipe(\n directories,\n Arr.filter((directory) => directory !== ROOT_WORKSPACE),\n ),\n ignoredDirectories: yield* collectIgnoredDirectories(options.root),\n lint: {\n ignorePatterns: pipe(\n found,\n Arr.flatMap(({ ignorePatterns }) => ignorePatterns),\n ),\n overrides: pipe(\n found,\n Arr.flatMap(({ overrides }) => overrides),\n ),\n shadcnUi: Arr.getSomes(shadcnUi),\n publicEntries: pipe(\n found,\n Arr.flatMap(({ publicEntries }) => publicEntries),\n ),\n deployEntries: yield* deployEntries(options.root),\n },\n testProjects: pipe(\n found,\n Arr.filter(({ ownTests }) => !ownTests),\n Arr.map(({ testProject }) => testProject),\n ),\n tasks: mergedTasks(found),\n ...mergedAllowances(found),\n };\n },\n);\n\nexport const workspaceSettings = (options: SettingsOptions): Promise<WorkspaceSettings> =>\n Effect.runPromise(collectWorkspaceSettings(options).pipe(Effect.provide(nodeRepositoryFiles)));\n\nexport type { WorkspaceTasks } from \"#/entities/workspace/index.ts\";\n"],"mappings":";;;;;;AAcA,MAAa,wBAAwB,CAAC,QAAQ,iBAAiB;AAC/D,MAAa,oBAAoB,CAAC,QAAQ,cAAc;AAExD,MAAMA,UAAQ,OAAO,SAAS,OAAO,MAAM,OAAO,MAAM,CAAC;A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ater/msch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "masseater's check policy: points every finite value set and object shape at its one owner, and ships the oxlint preset of plugins and rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"@pnpm/workspace.workspace-manifest-reader": "^1100.3.2",
|
|
92
92
|
"@pnpm/workspace.workspace-manifest-writer": "^1100.2.11",
|
|
93
93
|
"@r_masseater/fu4": "^0.1.0",
|
|
94
|
+
"@r_masseater/fu4-presets": "^0.1.0",
|
|
94
95
|
"@r_masseater/h56m": "^0.1.0",
|
|
95
96
|
"@r_masseater/h56m-presets": "^0.1.0",
|
|
96
97
|
"@r_masseater/oxlint-plugin-decision": "^0.8.0",
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
"eslint-plugin-no-comments": "^1.2.1",
|
|
112
113
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
113
114
|
"htmlparser2": "^12.0.0",
|
|
115
|
+
"modern-web-guidance": "^1.0.1",
|
|
114
116
|
"oxlint-plugin-eslint": "^1.94.0",
|
|
115
117
|
"semver": "^7.8.6",
|
|
116
118
|
"sql-parser-cst": "^0.44.1",
|
|
@@ -127,6 +129,7 @@
|
|
|
127
129
|
"@types/node": "26.6.6",
|
|
128
130
|
"@types/semver": "7.8.0",
|
|
129
131
|
"effect": "4.1.4",
|
|
132
|
+
"oxlint": "1.94.0",
|
|
130
133
|
"typescript": "7.1.0-beta",
|
|
131
134
|
"vite": "npm:@voidzero-dev/vite-plus-core@8.3.8000",
|
|
132
135
|
"vite-plus": "1.7.0",
|
|
@@ -24,7 +24,7 @@ Run `vp exec msch` at the repository root. It takes no subcommand, checks the wh
|
|
|
24
24
|
|
|
25
25
|
msch also runs every vite-plus-adopt check that the root `vite.config.ts` configures.
|
|
26
26
|
Those include h56m, commitlint and textlint.
|
|
27
|
-
Steiger, the dependency rules and
|
|
27
|
+
Steiger, the dependency rules, fallow and the `legacy-scan` of modern-web-guidance run as well.
|
|
28
28
|
They read `VPA_BASE` (default `origin/main`) and other environment variables.
|
|
29
29
|
A task that runs msch therefore sets `cache: false`.
|
|
30
30
|
|
|
@@ -67,13 +67,13 @@ They also apply `decisionTestRules` to `*.test.ts`.
|
|
|
67
67
|
|
|
68
68
|
## Options
|
|
69
69
|
|
|
70
|
-
| Option | Holds
|
|
71
|
-
| ----------- |
|
|
72
|
-
| `workspace` | The result of `workspaceSettings`
|
|
73
|
-
| `overrides` | Extra oxlint overrides for the repository
|
|
74
|
-
| `secrets` | `lines` and `paths` regular expressions that h56m accepts as public
|
|
75
|
-
| `textlint` | `ignores`, `kanji` words allowed past the kanji run limit, `technicalWriting` and `rules` settings, `filters` and `sources`
|
|
76
|
-
| `run` | `tasks`, extra root tasks as `{ name: command }
|
|
70
|
+
| Option | Holds |
|
|
71
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
72
|
+
| `workspace` | The result of `workspaceSettings` |
|
|
73
|
+
| `overrides` | Extra oxlint overrides for the repository |
|
|
74
|
+
| `secrets` | `lines` and `paths` regular expressions that h56m accepts as public |
|
|
75
|
+
| `textlint` | `ignores`, `kanji` words allowed past the kanji run limit, `technicalWriting` and `rules` settings, `filters` and `sources` |
|
|
76
|
+
| `run` | `tasks`, extra root tasks as `{ name: command }`; `remoteCache`, the URL of the remote task cache that every `vp run` reads; and `check`, `{ launcher, dependsOn }` to run `vp check` through another command than `effect-tsgo --tsrs-lint` after the named tasks |
|
|
77
77
|
|
|
78
78
|
## Rule sets
|
|
79
79
|
|
|
@@ -50,6 +50,7 @@ export default defineConfig({
|
|
|
50
50
|
| `lint.ignorePatterns` | Paths in the workspace that oxlint skips |
|
|
51
51
|
| `lint.overrides` | Oxlint overrides. `use` names a rule set the root passes to `workspaceSettings` |
|
|
52
52
|
| `devDependencies` | Each key states why the workspace needs the packages. `dependencies` lists them, `use` names a dependency set from the root |
|
|
53
|
+
| `dependencies` | The same for packages the workspace ships at run time, for a banned package with no other way to do the job |
|
|
53
54
|
| `publish.installSize` | The largest install size a published package may reach |
|
|
54
55
|
|
|
55
56
|
## Test and build tasks
|
package/src/app/vite.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export interface WorkspaceLintSettings {
|
|
|
24
24
|
readonly overrides?: readonly WorkspaceLintOverride[];
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export interface
|
|
27
|
+
export interface DependencyAllowance {
|
|
28
28
|
readonly use?: readonly string[];
|
|
29
29
|
readonly dependencies?: readonly string[];
|
|
30
30
|
}
|
|
@@ -37,7 +37,8 @@ export interface MschConfig {
|
|
|
37
37
|
readonly comments?: CommentSettings;
|
|
38
38
|
readonly publish?: PublishSettings;
|
|
39
39
|
readonly lint?: WorkspaceLintSettings;
|
|
40
|
-
readonly devDependencies?: Readonly<Record<string,
|
|
40
|
+
readonly devDependencies?: Readonly<Record<string, DependencyAllowance>>;
|
|
41
|
+
readonly dependencies?: Readonly<Record<string, DependencyAllowance>>;
|
|
41
42
|
readonly workspaceAgentsMd?: true;
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment-directives-CRAU6yNZ.mjs","names":[],"sources":["../src/shared/config/index.ts","../src/shared/lib/comment-directives.ts"],"sourcesContent":["export const JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\n","export const COMMENT_DIRECTIVES: readonly string[] = [\n \"oxlint-disable\",\n \"oxlint-enable\",\n \"eslint-disable\",\n \"eslint-enable\",\n \"textlint-disable\",\n \"textlint-enable\",\n String.raw`\\* @internal \\*?$`,\n String.raw`\\* @msch \\S+ \\*?$`,\n \"/usr/bin/env node$\",\n String.raw`shellcheck \\w`,\n String.raw`zizmor: ignore\\[`,\n \"renovate:\",\n String.raw`exit: \\S`,\n \"yaml-language-server:\",\n \"> statement-breakpoint$\",\n String.raw`fallow-ignore-(?:next-line|file) \\S`,\n String.raw`@vitest-environment \\S+$`,\n String.raw`v8 ignore (?:start|stop|next|file|if|else)\\b`,\n \"@vite-ignore $\",\n \"/ <reference (?:types|path|lib)=\",\n];\n"],"mappings":";AAAA,MAAa,WAAW;;ACAxB,MAAa,qBAAwC;CACnD;CACA;CACA;CACA;CACA;CACA;CACA,OAAO,GAAG;CACV,OAAO,GAAG;CACV;CACA,OAAO,GAAG;CACV,OAAO,GAAG;CACV;CACA,OAAO,GAAG;CACV;CACA;CACA,OAAO,GAAG;CACV,OAAO,GAAG;CACV,OAAO,GAAG;CACV;CACA;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-lint-preset-BhT4RpHs.mjs","names":["Rec","Arr","Str","effectPresets","decisionPlugin","shadcn","Str","Arr","Rec"],"sources":["../src/features/define-lint-preset/config/lint-overrides.config.ts","../src/features/define-lint-preset/config/decision-rules.ts","../src/features/define-lint-preset/config/lint.config.ts","../src/features/define-lint-preset/config/readonly-binary.config.ts","../src/features/define-lint-preset/config/readonly-browser.config.ts","../src/features/define-lint-preset/config/readonly-lint-tools.config.ts","../src/features/define-lint-preset/config/readonly-markdown.config.ts","../src/features/define-lint-preset/config/readonly-types.config.ts","../src/features/define-lint-preset/config/preset.ts","../src/features/define-lint-preset/config/required-stack.config.ts","../src/features/define-lint-preset/config/traced-rules.config.ts","../src/features/define-lint-preset/config/remotion-rules.config.ts","../src/features/define-lint-preset/config/structure.config.ts","../src/features/define-lint-preset/config/kuromojin.config.ts","../src/features/define-lint-preset/config/textlint-presets.config.ts","../src/features/define-lint-preset/config/markdown.config.ts"],"sourcesContent":["const LOGPUSH = 'Property[key.name=\"logpush\"]:not([value.value=false])';\nconst LOGPUSH_MESSAGE =\n \"Worker には logpush: true を付ける。付けないと、その Worker のログが Logpush に流れない\";\n\nconst CPU_LIMIT = 'Property[key.name=\"limits\"]:has(Property[key.name=\"cpuMs\"])';\nconst CPU_LIMIT_MESSAGE =\n \"コードを動かす Worker には limits.cpuMs を付け、本番の CPU 時間の最大値をわずかに上回る値にする。付けないと、1 回の暴走が上限の CPU 時間まで請求される\";\n\nconst UNATTRIBUTED_MODEL_CALL =\n \"モデルの呼び出しは AI Gateway を通し、呼び出し元を metadata に載せる。載せないと、費用やエラーを後から呼び出し元で引けない\";\n\nexport const cloudflareResourceSyntax: readonly Readonly<{ selector: string; message: string }>[] =\n [\n {\n selector: `CallExpression[callee.object.name=\"Workers\"][callee.property.name=\"Worker\"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,\n message: LOGPUSH_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=\"Website\"] > ObjectExpression.arguments:not(:has(${LOGPUSH}))`,\n message: LOGPUSH_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=/^(Workers|Website)$/] > ObjectExpression.arguments:has(Property[key.name=\"main\"]):not(:has(${CPU_LIMIT}))`,\n message: CPU_LIMIT_MESSAGE,\n },\n {\n selector: `CallExpression[callee.object.name=\"Website\"]:not([callee.property.name=\"StaticSite\"]) > ObjectExpression.arguments:not(:has(${CPU_LIMIT}))`,\n message: CPU_LIMIT_MESSAGE,\n },\n {\n selector:\n 'CallExpression[callee.property.name=\"run\"][callee.object.property.name=\"AI\"][arguments.length<3]',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.name=\"runWorkersAi\"] > ObjectExpression > Property[key.name=\"call\"] > ArrowFunctionExpression[params.length=0]',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.name=\"createAI\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"metadata\"]))',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'ObjectExpression:has(Property[key.value=\"cf-aig-gateway-id\"]):not(:has(Property[key.value=\"cf-aig-metadata\"]))',\n message: UNATTRIBUTED_MODEL_CALL,\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"collectLogs\"][value.value=true]))',\n message:\n \"AI Gateway には collectLogs: true を付ける。付けないと、モデルの呼び出しが後から引けない\",\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"spendLimits\"] > ObjectExpression > Property[key.name=\"enabled\"][value.value=true]))',\n message:\n \"AI Gateway には spendLimits を enabled: true で付け、日ごとの費用の上限を掛ける。付けないと、従量課金のモデルの呼び出しが上限なく請求される\",\n },\n {\n selector:\n 'CallExpression[callee.object.name=\"AI\"][callee.property.name=\"Gateway\"] > ObjectExpression.arguments:not(:has(Property[key.name=\"cacheTtl\"]))',\n message:\n \"AI Gateway には cacheTtl を付け、同じ問いの答えをキャッシュする。付けないと、同じ問いにも毎回課金される\",\n },\n {\n selector: 'MemberExpression[object.name=\"Rum\"][property.name=\"Site\"]',\n message:\n \"Rum.Site は使わない。CI のトークンに Account Settings Write が要る。Cloudflare API でホストごとに一度サイトを作り、トークンを CF_BEACON_TOKEN に置く\",\n },\n ];\nexport const removalPolicySyntax: Readonly<{ selector: string; message: string }> = {\n selector:\n 'CallExpression[callee.object.name=/^(D1|R2)$/][callee.property.name=/^(Database|Bucket)$/]:not(CallExpression[callee.property.name=\"pipe\"][arguments.0.callee.object.name=\"RemovalPolicy\"] > MemberExpression.callee > CallExpression.object)',\n message:\n \"D1 と R2 は作り直すと中身が消えるので、alchemy の RemovalPolicy.protect() を .pipe で付けて置き換えと削除を止める\",\n};\n\nexport const removalPolicyOverride: {\n files: string[];\n excludeFiles: string[];\n rules: Readonly<Record<string, [\"error\", ...unknown[]]>>;\n} = {\n files: [\"**/*.ts\"],\n excludeFiles: [\"**/*.test.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax, removalPolicySyntax],\n },\n};\n\nexport const alchemyOverride: {\n files: string[];\n rules: Readonly<Record<string, [\"error\", ...unknown[]]>>;\n} = {\n files: [\"**/alchemy.run.ts\"],\n rules: {\n \"eslint-js/no-restricted-syntax\": [\n \"error\",\n ...cloudflareResourceSyntax,\n removalPolicySyntax,\n {\n selector: 'CallExpression[callee.name=\"Stack\"]:not([arguments.0.name=\"APP_NAME\"])',\n message: \"スタック名には app-name.ts の APP_NAME を渡す\",\n },\n {\n selector:\n 'Program:not(:has(YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))',\n message:\n \"スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する\",\n },\n {\n selector:\n 'CallExpression[callee.name=\"Stack\"] > .arguments:nth-child(3):not(:has(FunctionExpression > BlockStatement > ExpressionStatement:nth-last-child(2) > YieldExpression[delegate=true] > Identifier.argument[name=\"requireAppPrefix\"]))',\n message:\n \"スタックの最後で app-name.ts の requireAppPrefix を yield* して、リソース名の prefix を検査する\",\n },\n ],\n },\n};\n\nexport const commandsOverride: {\n files: string[];\n rules: Readonly<Record<string, \"off\">>;\n} = {\n files: [\"bin/**\"],\n rules: {\n \"node/no-process-env\": \"off\",\n \"node/no-sync\": \"off\",\n \"effecttsgo/node-builtin-import\": \"off\",\n },\n};\n","import { createDecisionPlugin, defineDecisionRule } from \"@r_masseater/oxlint-plugin-decision\";\n\nexport default createDecisionPlugin({\n name: \"stack\",\n rules: [\n defineDecisionRule({\n id: \"exclusive-status\",\n target: \"file\",\n question:\n \"Does this code represent one piece of state with several boolean flags or optional fields whose combinations can contradict each other, instead of one exclusive status expressed as a discriminated union? Answer no when every state is a single exclusive status, or when the file holds no such state. A violation needs two or more booleans or optional fields that describe the same piece of state; a single boolean value, parameter, return value or field is not a violation, and a union of objects told apart by a status or kind field is already an exclusive status. A constant configuration object whose shape a library fixes, such as an OpenFeature flag definition, holds no state and is not a violation.\",\n message: \"状態は排他的なstatusを持つ判別共用体で表し、booleanフラグの組を使わない。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"server-state-tanstack-query\",\n target: \"file\",\n question:\n \"Does this code fetch, cache or synchronize server data on the client with something other than TanStack Query, such as fetch inside useEffect, SWR or a hand-written cache? Answer no when server data on the client goes only through TanStack Query, or when the file handles none. Creating an API client such as a better-auth or Eden client, which fetches nothing until a query calls it, is not a violation.\",\n message: \"サーバー状態はTanStack Queryだけで扱う。\",\n cutoff: 0.8,\n }),\n defineDecisionRule({\n id: \"ui-state-effect-atom\",\n target: \"file\",\n question:\n \"Does this code hold client-side UI state with something other than effect-atom, such as useState, useReducer, React context used as a store, zustand, jotai or redux? Answer no when client-side UI state is held only by effect-atom, or when the file holds none. effect-atom is Atom from effect/reactivity, read and written through @effect/atom-react hooks such as useAtomValue and useAtomSet. Creating a TanStack Query QueryClient or configuring the router, which hold no UI state, is not a violation.\",\n message: \"UI状態はeffect-atomだけで扱う。\",\n cutoff: 0.8,\n }),\n ],\n});\n","import { presets as effectPresets } from \"@effect/tsgo/oxlint-presets\";\nimport htmlReact from \"@html-eslint/eslint-plugin-react\";\nimport eslintReact from \"@r_masseater/oxlint-typed-rules/react\";\nimport { Array as Arr, Record as Rec, String as Str, Struct, pipe } from \"effect\";\nimport reactHooks from \"eslint-plugin-react-hooks\";\n\nimport decisionPlugin from \"./decision-rules.ts\";\n\nexport const generated = [\n \"**/routeTree.gen.ts\",\n \"**/generated/**\",\n \"**/drizzle/**/snapshot.json\",\n \".claude/skills/**\",\n \".intent/**\",\n \"AGENTS.md\",\n \"**/CHANGELOG.md\",\n \".github/release-please/*manifest.json\",\n \"**/.release-please-manifest.json\",\n \"**/*.d.*.ts\",\n \"**/src-tauri/gen/**\",\n];\n\nconst asErrors = (names: readonly string[]): Readonly<Record<string, \"error\">> =>\n Rec.fromEntries(\n pipe(\n names,\n Arr.map((name) => [name, \"error\"] as const),\n ),\n );\n\nexport const allRulesOf = ({\n prefix,\n rules,\n}: Readonly<{ prefix: string; rules: Readonly<Record<string, unknown>> }>): Readonly<\n Record<string, \"error\">\n> =>\n asErrors(\n pipe(\n Rec.keys(rules),\n Arr.map((rule) => `${prefix}/${rule}`),\n ),\n );\n\nconst reactHooksRuleNames = pipe(\n Struct.keys(reactHooks.configs[\"recommended-latest\"].rules),\n Arr.map(Str.replace(\"react-hooks/\", \"react-hooks-js/\")),\n);\n\nconst reactHooksRules = asErrors(reactHooksRuleNames);\n\nconst eslintReactRuleNames = pipe(\n Rec.keys(eslintReact.configs[\"strict-typescript\"].rules ?? {}),\n Arr.filter(\n (name) => !(Str.replace(\"@eslint-react/\", \"react-hooks-js/\")(name) in reactHooksRules),\n ),\n);\n\nconst effectRuleNames = pipe(\n Rec.values(effectPresets),\n Arr.flatMap((preset) => Struct.keys(preset.rules ?? {})),\n);\n\nexport const pluginRules: Readonly<Record<string, \"error\">> = {\n ...asErrors(Rec.keys(htmlReact.configs.all.rules ?? {})),\n ...reactHooksRules,\n ...asErrors(eslintReactRuleNames),\n ...asErrors(effectRuleNames),\n};\n\nexport const decisionPluginName = decisionPlugin.meta.name;\n\nexport const decisionRules = allRulesOf({\n prefix: decisionPluginName,\n rules: decisionPlugin.rules,\n});\n\nexport const decisionTestRules = pipe(\n decisionRules,\n Rec.map(() => \"off\" as const),\n);\n\nexport const shadcnRestyleContracts = [\n { pattern: \"^Table(Head|Cell)$\", allow: [\"text-alignment\", \"fvn-spacing\"] },\n { pattern: \"^TableCaption$\", allow: [\"caption\", \"text-alignment\", \"mt-*\", \"mb-*\"] },\n];\n\nexport { COMMENT_DIRECTIVES } from \"#/shared/lib/comment-directives.ts\";\n","export const BINARY_DATA: readonly string[] = [\n \"ArrayBuffer\",\n \"DataView\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Float32Array\",\n \"Float64Array\",\n \"Int8Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"Uint16Array\",\n \"Uint32Array\",\n];\n","export const WEBGPU_HANDLES: readonly string[] = [\n \"GPUDevice\",\n \"GPUCanvasContext\",\n \"GPUTexture\",\n \"GPUBuffer\",\n \"GPUBindGroup\",\n \"GPUBindGroupLayout\",\n \"GPUPipelineLayout\",\n \"GPURenderPipeline\",\n \"GPUSampler\",\n];\n\nexport const BROWSER_HANDLES: readonly string[] = [\n \"HTMLCanvasElement\",\n \"HTMLImageElement\",\n \"HTMLAnchorElement\",\n \"CanvasRenderingContext2D\",\n \"PointerEvent\",\n \"WheelEvent\",\n \"KeyboardEvent\",\n \"MouseEvent\",\n \"AbortSignal\",\n \"ImageBitmap\",\n \"AudioContext\",\n \"OfflineAudioContext\",\n \"AnalyserNode\",\n \"AudioBuffer\",\n \"AudioBufferSourceNode\",\n ...WEBGPU_HANDLES,\n];\n","export const lintToolReadonlyAllow = [\n {\n from: \"package\" as const,\n package: \"@oxlint/plugins\",\n name: [\n \"Context\",\n \"ExportNamedDeclaration\",\n \"ExportSpecifier\",\n \"Statement\",\n \"Fixer\",\n \"ImportDeclaration\",\n \"ImportDeclarationSpecifier\",\n \"Location\",\n \"MemberExpression\",\n \"Node\",\n \"Range\",\n \"Rule\",\n \"RuleMeta\",\n \"SourceCode\",\n \"VisitorWithHooks\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"oxlint\",\n name: [\n \"DummyRule\",\n \"DummyRuleMap\",\n \"InvalidTestCase\",\n \"OxlintOverride\",\n \"Rule\",\n \"TestCases\",\n \"ValidTestCase\",\n ],\n },\n { from: \"package\" as const, package: \"@commitlint/types\", name: [\"QualifiedConfig\"] },\n {\n from: \"package\" as const,\n package: \"@textlint/config-loader\",\n name: [\"TextlintLoadPackagesFromRawConfigResult\"],\n },\n { from: \"package\" as const, package: \"markdownlint\", name: [\"LintError\"] },\n {\n from: \"package\" as const,\n package: \"steiger\",\n name: [\"ConfigObject\", \"GlobalIgnore\", \"Plugin\"],\n },\n {\n from: \"file\" as const,\n path: \"upstream/attw-core/lib/checkPackage.d.ts\",\n name: [\"CheckPackageOptions\"],\n },\n {\n from: \"package\" as const,\n package: \"@r_masseater/vite-plus-adopt\",\n name: [\"CheckPackageOptions\", \"TextlintSource\"],\n },\n {\n from: \"file\" as const,\n path: \"src/shared/config/types.ts\",\n name: [\"CommitlintConfig\", \"MarkdownlintConfig\", \"TextlintConfig\", \"ToolSections\"],\n },\n {\n from: \"file\" as const,\n name: [\n \"BoundSymbol\",\n \"CompatSymbol\",\n \"CompatType\",\n \"FileBinding\",\n \"SymbolTable\",\n \"TypedContext\",\n ],\n },\n];\n","export const markdownReadonlyAllow = [\n {\n from: \"package\" as const,\n package: \"mdast\",\n name: [\"ListItem\", \"Root\", \"RootContent\", \"Table\", \"TableRow\", \"Yaml\"],\n },\n {\n from: \"package\" as const,\n package: \"@types/mdast\",\n name: [\"Code\", \"ListItem\", \"Nodes\", \"Table\", \"TableRow\"],\n },\n { from: \"package\" as const, package: \"@types/hast\", name: [\"Element\", \"Root\", \"RootContent\"] },\n {\n from: \"package\" as const,\n package: \"liquidjs\",\n name: [\n \"Context\",\n \"Emitter\",\n \"Liquid\",\n \"Parser\",\n \"TagToken\",\n \"Template\",\n \"Tokenizer\",\n \"TopLevelToken\",\n ],\n },\n];\n","import { BINARY_DATA } from \"./readonly-binary.config.ts\";\nimport { BROWSER_HANDLES, WEBGPU_HANDLES } from \"./readonly-browser.config.ts\";\nimport { lintToolReadonlyAllow } from \"./readonly-lint-tools.config.ts\";\nimport { markdownReadonlyAllow } from \"./readonly-markdown.config.ts\";\n\nexport const readonlyParameterAllow = [\n {\n from: \"lib\" as const,\n name: [\n \"HTMLElement\",\n \"HTMLDivElement\",\n \"Worker\",\n \"ReadableStream\",\n \"Request\",\n \"Response\",\n ...BINARY_DATA,\n \"RegExp\",\n \"RegExpExecArray\",\n \"RegExpMatchArray\",\n \"Date\",\n \"SpeechRecognitionResult\",\n \"CryptoKey\",\n ...BROWSER_HANDLES,\n ],\n },\n { from: \"package\" as const, package: \"@webgpu/types\", name: [...WEBGPU_HANDLES] },\n { from: \"package\" as const, package: \"@vscode/tree-sitter-wasm\", name: [\"Language\", \"Node\"] },\n { from: \"package\" as const, package: \"domhandler\", name: [\"AnyNode\", \"Text\", \"Element\"] },\n {\n from: \"package\" as const,\n package: \"@cloudflare/workers-types\",\n name: [\n \"AnalyticsEngineDataset\",\n \"Container\",\n \"DurableObjectState\",\n \"DurableObjectStorage\",\n \"CryptoKey\",\n \"KVNamespace\",\n \"R2Bucket\",\n \"SecretsStoreSecret\",\n \"TailEvent\",\n \"Onset\",\n \"Log\",\n \"Exception\",\n \"Attribute\",\n \"SpanUpdateInfo\",\n \"FetchResponseInfo\",\n \"Span\",\n ],\n },\n { from: \"package\" as const, package: \"@alchemy.run/cloudflare\", name: [\"Store\", \"WorkerProps\"] },\n {\n from: \"package\" as const,\n package: \"@bufbuild/protobuf\",\n name: [\"DescMessage\", \"JsonObject\", \"JsonValue\", \"Message\"],\n },\n { from: \"package\" as const, package: \"lighthouse\", name: [\"FlowResult\", \"Step\", \"UserFlow\"] },\n { from: \"package\" as const, package: \"vitest\", name: \"TestProject\" },\n {\n from: \"package\" as const,\n package: \"puppeteer-core\",\n name: [\"Browser\", \"ElementHandle\", \"Page\"],\n },\n { from: \"package\" as const, package: \"miniflare\", name: \"Miniflare\" },\n { from: \"package\" as const, package: \"elysia\", name: \"ElysiaConfig\" },\n { from: \"package\" as const, package: \"@types/node\", name: [\"Request\", \"Response\"] },\n { from: \"package\" as const, package: \"@better-auth/drizzle-adapter\", name: \"DB\" },\n {\n from: \"package\" as const,\n package: \"drizzle-orm\",\n name: [\"DrizzleSqliteDODatabase\", \"SQL\"],\n },\n { from: \"package\" as const, package: \"@tanstack/query-core\", name: \"QueryClient\" },\n {\n from: \"package\" as const,\n package: \"@codemirror/view\",\n name: [\"Decoration\", \"EditorView\", \"GutterMarker\", \"ViewUpdate\", \"WidgetType\"],\n },\n {\n from: \"package\" as const,\n package: \"@codemirror/state\",\n name: [\"ChangeDesc\", \"EditorState\", \"Extension\", \"StateEffect\", \"Text\", \"Transaction\"],\n },\n { from: \"package\" as const, package: \"@codemirror/lint\", name: \"Diagnostic\" },\n { from: \"package\" as const, package: \"comlink\", name: \"Remote\" },\n {\n from: \"package\" as const,\n package: \"typescript\",\n name: [\n \"API\",\n \"ArrayLiteralExpression\",\n \"ArrowFunction\",\n \"BinaryExpression\",\n \"BindingElement\",\n \"CallExpression\",\n \"Checker\",\n \"ClassDeclaration\",\n \"CompilerHost\",\n \"CompilerOptions\",\n \"CompletionEntry\",\n \"ConfigFileResponse\",\n \"Declaration\",\n \"DeclarationBase\",\n \"DiagnosticResponse\",\n \"ElementAccessExpression\",\n \"EnumDeclaration\",\n \"ExportAssignment\",\n \"ExportDeclaration\",\n \"ExportSpecifier\",\n \"Expression\",\n \"ExpressionBase\",\n \"FunctionDeclaration\",\n \"FunctionExpression\",\n \"Identifier\",\n \"InterfaceDeclaration\",\n \"JSDocCallbackTag\",\n \"JSDocTagBase\",\n \"JSDocTypedefTag\",\n \"ModuleDeclaration\",\n \"Node\",\n \"NodeHandle\",\n \"NumericLiteral\",\n \"ParameterDeclaration\",\n \"ParseConfigFileHost\",\n \"ParsedCommandLine\",\n \"Program\",\n \"Project\",\n \"PropertyAccessExpression\",\n \"PropertyDeclaration\",\n \"PropertySignature\",\n \"Signature\",\n \"SignatureDeclaration\",\n \"Snapshot\",\n \"SourceFile\",\n \"StringLiteral\",\n \"Symbol\",\n \"Type\",\n \"TypeAliasDeclaration\",\n \"TypeChecker\",\n \"TypeFlags\",\n \"TypeNode\",\n \"TypeNodeBase\",\n \"UnionTypeNode\",\n \"VariableDeclaration\",\n \"VariableDeclarationList\",\n \"WasmTransport\",\n ],\n },\n { from: \"package\" as const, package: \"@codemirror/autocomplete\", name: \"CompletionContext\" },\n ...lintToolReadonlyAllow,\n {\n from: \"package\" as const,\n package: \"react\",\n name: [\n \"ReactNode\",\n \"ButtonHTMLAttributes\",\n \"ChangeEvent\",\n \"ClassAttributes\",\n \"FocusEvent\",\n \"KeyboardEvent\",\n \"SubmitEvent\",\n ],\n },\n { from: \"package\" as const, package: \"clsx\", name: \"ClassValue\" },\n {\n from: \"package\" as const,\n package: \"@anthropic-ai/claude-agent-sdk\",\n name: [\"SDKMessage\", \"SDKResultMessage\"],\n },\n {\n from: \"package\" as const,\n package: \"@types/dom-speech-recognition\",\n name: [\"SpeechRecognition\", \"SpeechRecognitionEvent\", \"SpeechRecognitionResult\"],\n },\n { from: \"package\" as const, package: \"@modelcontextprotocol/server\", name: \"McpServer\" },\n {\n from: \"package\" as const,\n package: \"@modelcontextprotocol/client\",\n name: [\"CallToolResult\", \"Client\", \"ContentBlock\"],\n },\n { from: \"package\" as const, package: \"discord.js\", name: [\"Client\", \"Guild\"] },\n {\n from: \"package\" as const,\n package: \"@discordjs/voice\",\n name: [\"AudioPlayer\", \"VoiceConnection\"],\n },\n ...markdownReadonlyAllow,\n { from: \"package\" as const, package: \"ical.js\", name: \"Component\" },\n {\n from: \"package\" as const,\n package: \"@jupyterlab/nbformat\",\n name: [\n \"ICell\",\n \"IDisplayData\",\n \"IExecuteResult\",\n \"INotebookContent\",\n \"IOutput\",\n \"MultilineString\",\n ],\n },\n { from: \"package\" as const, package: \"unpdf\", name: \"PDFDocumentProxy\" },\n { from: \"package\" as const, package: \"@kenjiuno/msgreader\", name: \"FieldsData\" },\n {\n from: \"package\" as const,\n package: \"parse5\",\n name: [\n \"Document\",\n \"DocumentFragment\",\n \"DocumentType\",\n \"Element\",\n \"Template\",\n \"CommentNode\",\n \"TextNode\",\n ],\n },\n { from: \"package\" as const, package: \"postal-mime\", name: [\"Address\", \"Email\"] },\n { from: \"package\" as const, package: \"fflate\", name: [\"Unzipped\"] },\n {\n from: \"package\" as const,\n package: \"@openrouter/sdk\",\n name: [\"DecisionsChoiceAnswer\", \"DecisionsNoulAnswer\", \"DecisionsScoreAnswer\", \"Unknown\"],\n },\n { from: \"package\" as const, package: \"recharts\", name: \"TooltipPayloadEntry\" },\n { from: \"package\" as const, package: \"vfile\", name: \"VFile\" },\n { from: \"package\" as const, package: \"modern-tar\", name: \"ParsedTarEntry\" },\n { from: \"package\" as const, package: \"@zip.js/zip.js\", name: [\"Entry\", \"FileEntry\"] },\n {\n from: \"package\" as const,\n package: \"three\",\n name: [\n \"LoadingManager\",\n \"Object3D\",\n \"WebGLRenderer\",\n \"PerspectiveCamera\",\n \"Scene\",\n \"Sphere\",\n \"BufferAttribute\",\n \"Material\",\n \"Mesh\",\n ],\n },\n {\n from: \"package\" as const,\n package: \"@huggingface/transformers\",\n name: [\"RawImage\", \"PretrainedConfig\", \"PreTrainedModel\", \"Processor\"],\n },\n {\n from: \"package\" as const,\n package: \"effect\",\n name: [\n \"Atom\",\n \"Cause\",\n \"Context\",\n \"DateTime\",\n \"Decoder\",\n \"Deferred\",\n \"Duration\",\n \"Effect\",\n \"Exit\",\n \"Fiber\",\n \"HashMap\",\n \"HashSet\",\n \"HttpClient\",\n \"HttpClientRequest\",\n \"HttpClientResponse\",\n \"HttpServerRequest\",\n \"HttpServerResponse\",\n \"Json\",\n \"JsonArray\",\n \"JsonObject\",\n \"Layer\",\n \"Logger\",\n \"NativeSpan\",\n \"Option\",\n \"Redacted\",\n \"Ref\",\n \"Stream\",\n \"Utc\",\n \"Writable\",\n ],\n },\n];\n","import { fileURLToPath } from \"node:url\";\n\nimport tanstackQuery from \"@r_masseater/oxlint-typed-rules/tanstack-query\";\nimport tanstackRouter from \"@r_masseater/oxlint-typed-rules/tanstack-router\";\nimport { plugin as shadcn } from \"@shadcn/lint\";\nimport baselineJs from \"eslint-plugin-baseline-js\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport {\n alchemyOverride,\n cloudflareResourceSyntax,\n removalPolicyOverride,\n commandsOverride,\n} from \"./lint-overrides.config.ts\";\nimport {\n COMMENT_DIRECTIVES,\n allRulesOf,\n decisionPluginName,\n generated,\n pluginRules,\n shadcnRestyleContracts,\n} from \"./lint.config.ts\";\nimport { readonlyParameterAllow } from \"./readonly-types.config.ts\";\n\ntype LintConfig = NonNullable<UserConfig[\"lint\"]>;\n\nconst resolved = (specifier: string): string => fileURLToPath(import.meta.resolve(specifier));\n\nconst DECISION_TIMEOUT_MS = 50_000;\n\nconst typedRules = \"@r_masseater/oxlint-typed-rules\";\n\nconst jsPlugins = [\n { name: \"vite-plus\", specifier: resolved(\"vite-plus/oxlint-plugin\") },\n { name: \"tanstack-query\", specifier: resolved(`${typedRules}/tanstack-query`) },\n { name: \"tanstack-router\", specifier: resolved(`${typedRules}/tanstack-router`) },\n { name: \"tanstack-start\", specifier: resolved(`${typedRules}/tanstack-start`) },\n { name: \"drizzle\", specifier: resolved(`${typedRules}/drizzle`) },\n { name: \"react-hooks-js\", specifier: resolved(\"eslint-plugin-react-hooks\") },\n { name: \"@eslint-react\", specifier: resolved(`${typedRules}/react`) },\n { name: \"@remotion\", specifier: resolved(`${typedRules}/remotion`) },\n { name: \"shadcn\", specifier: resolved(\"@shadcn/lint\") },\n { name: \"no-comments\", specifier: resolved(\"eslint-plugin-no-comments\") },\n { name: \"baseline-js\", specifier: resolved(\"eslint-plugin-baseline-js\") },\n { name: \"@html-eslint/react\", specifier: resolved(\"@html-eslint/eslint-plugin-react\") },\n { name: \"eslint-js\", specifier: resolved(\"oxlint-plugin-eslint\") },\n { name: decisionPluginName, specifier: resolved(\"@r_masseater/msch/decision-rules\") },\n { name: \"msch-lint\", specifier: resolved(\"@r_masseater/msch/lint-rules\") },\n];\n\nconst rules = {\n \"vite-plus/prefer-vite-plus-imports\": \"error\",\n \"tanstack-start/no-async-client-component\": \"error\",\n \"tanstack-start/no-client-code-in-server-component\": \"error\",\n \"no-comments/disallowComments\": [\"error\", { allow: COMMENT_DIRECTIVES }],\n ...allRulesOf({ prefix: \"tanstack-query\", rules: tanstackQuery.rules }),\n ...allRulesOf({ prefix: \"tanstack-router\", rules: tanstackRouter.rules }),\n \"drizzle/enforce-delete-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n \"drizzle/enforce-update-with-where\": [\"error\", { drizzleObjectName: [\"db\"] }],\n ...allRulesOf({ prefix: \"shadcn\", rules: shadcn.rules }),\n \"shadcn/no-restyle\": [\"error\", { contracts: shadcnRestyleContracts }],\n ...allRulesOf({ prefix: \"baseline-js\", rules: baselineJs.rules }),\n ...baselineJs.configs.recommended().rules,\n \"baseline-js/use-baseline\": [\n \"error\",\n {\n available: \"widely\",\n includeWebApis: { preset: \"auto\" },\n includeJsBuiltins: { preset: \"auto\" },\n },\n ],\n ...pluginRules,\n \"eslint/capitalized-comments\": \"off\",\n \"eslint/sort-imports\": \"off\",\n \"eslint/sort-keys\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/exports-last\": \"off\",\n \"msch-lint/ecosystem-readers\": \"error\",\n \"msch-lint/inline-exports\": \"error\",\n \"msch-lint/ui-state-in-atoms\": \"error\",\n \"msch-lint/no-hand-written-sql\": \"error\",\n \"react/react-in-jsx-scope\": \"off\",\n \"eslint/no-undef\": \"off\",\n \"typescript/promise-function-async\": \"off\",\n \"react/forbid-component-props\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"node/no-top-level-await\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"eslint/new-cap\": [\"error\", { capIsNew: false }],\n \"eslint/one-var\": [\"error\", \"never\"],\n \"unicorn/relative-url-style\": [\"error\", \"always\"],\n \"eslint/id-length\": [\"error\", { exceptions: [\"x\", \"y\"] }],\n \"jsdoc/check-tag-names\": [\"error\", { definedTags: [\"msch\"] }],\n \"jsdoc/require-param\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\"] }],\n \"jsdoc/require-returns\": [\"error\", { exemptedBy: [\"inheritdoc\", \"internal\", \"msch\"] }],\n \"eslint-js/no-restricted-syntax\": [\"error\", ...cloudflareResourceSyntax],\n \"typescript/prefer-readonly-parameter-types\": [\n \"error\",\n { ignoreInferredTypes: true, allow: readonlyParameterAllow },\n ],\n \"eslint/no-duplicate-imports\": [\"error\", { allowSeparateTypeImports: true }],\n \"react/function-component-definition\": [\n \"error\",\n { namedComponents: \"arrow-function\", unnamedComponents: \"arrow-function\" },\n ],\n \"typescript/no-empty-interface\": [\"error\", { allowSingleExtends: true }],\n \"typescript/no-empty-object-type\": [\"error\", { allowInterfaces: \"with-single-extends\" }],\n \"react/jsx-filename-extension\": [\"error\", { extensions: [\".tsx\"] }],\n \"react/only-export-components\": [\"error\", { allowExportNames: [\"Route\"] }],\n} satisfies LintConfig[\"rules\"];\n\nconst overrides = [\n removalPolicyOverride,\n alchemyOverride,\n {\n files: [\"**/*.config.ts\", \"**/alchemy.*.ts\", \"**/decision-rules.ts\"],\n rules: { \"import/no-default-export\": \"off\" },\n },\n commandsOverride,\n {\n files: [\"**/vite.config.ts\"],\n rules: {\n \"eslint/max-lines\": \"off\",\n \"eslint/max-lines-per-function\": \"off\",\n \"baseline-js/use-baseline\": \"off\",\n },\n },\n] satisfies LintConfig[\"overrides\"];\n\nexport const lint = {\n ignorePatterns: generated,\n plugins: [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"react\",\n \"react-perf\",\n \"jsx-a11y\",\n \"jsdoc\",\n \"promise\",\n \"node\",\n \"effecttsgo\",\n ],\n categories: {\n correctness: \"error\",\n suspicious: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n style: \"error\",\n restriction: \"error\",\n nursery: \"error\",\n },\n jsPlugins,\n rules,\n overrides,\n settings: {\n [decisionPluginName]: {\n model: \"cloudflare/@cf/cloudflare/clef-flash\",\n timeoutMs: DECISION_TIMEOUT_MS,\n ci: \"skip\",\n },\n },\n options: {\n typeAware: true,\n typeCheck: true,\n denyWarnings: true,\n reportUnusedDisableDirectives: \"error\",\n },\n} satisfies LintConfig;\n","const UI_STATE = \"UI 状態は effect-atom だけで扱う\";\n\nexport const INSTRUMENTATION = \"計装は Effect のトレーシングだけで扱う\";\nconst INFRASTRUCTURE = \"インフラは Alchemy の IaC と Cloudflare だけで扱い、wrangler は使わない\";\n\nexport const requiredStack: Readonly<Record<string, readonly string[]>> = {\n [UI_STATE]: [\n \"zustand\",\n \"jotai\",\n \"valtio\",\n \"recoil\",\n \"mobx\",\n \"mobx-*\",\n \"redux\",\n \"@reduxjs/*\",\n \"react-redux\",\n \"xstate\",\n \"@xstate/*\",\n \"nanostores\",\n \"@nanostores/*\",\n \"@preact/signals*\",\n ],\n \"サーバー状態は TanStack Query と Eden だけで扱う\": [\n \"swr\",\n \"react-query\",\n \"@apollo/*\",\n \"urql\",\n \"@urql/*\",\n \"axios\",\n \"ky\",\n \"ofetch\",\n \"got\",\n \"node-fetch\",\n \"graphql-request\",\n \"@trpc/*\",\n ],\n \"ルーティングとサーバーは TanStack Start と Elysia だけで扱う\": [\n \"react-router\",\n \"react-router-dom\",\n \"next\",\n \"@remix-run/*\",\n \"wouter\",\n \"express\",\n \"hono\",\n \"fastify\",\n \"koa\",\n \"@nestjs/*\",\n ],\n \"データベースは Drizzle だけで扱い、スキーマはマイグレーションで生成する\": [\n \"prisma\",\n \"@prisma/*\",\n \"typeorm\",\n \"sequelize\",\n \"kysely\",\n \"knex\",\n \"@mikro-orm/*\",\n \"better-sqlite3\",\n \"pg\",\n \"mysql2\",\n ],\n \"認証は better-auth だけで扱う\": [\n \"next-auth\",\n \"@auth/*\",\n \"lucia\",\n \"passport\",\n \"passport-*\",\n \"@clerk/*\",\n \"firebase/auth\",\n \"@supabase/*\",\n ],\n \"UI は shadcn/ui と Tailwind CSS だけで組む\": [\n \"@mui/*\",\n \"antd\",\n \"@chakra-ui/*\",\n \"@mantine/*\",\n \"styled-components\",\n \"@emotion/*\",\n \"bootstrap\",\n \"react-bootstrap\",\n ],\n \"検証、日時、ログ、関数型ユーティリティは Effect だけで扱う\": [\n \"zod\",\n \"yup\",\n \"joi\",\n \"valibot\",\n \"arktype\",\n \"io-ts\",\n \"superstruct\",\n \"moment\",\n \"dayjs\",\n \"date-fns\",\n \"luxon\",\n \"winston\",\n \"pino\",\n \"bunyan\",\n \"loglevel\",\n \"lodash\",\n \"lodash-es\",\n \"ramda\",\n \"rxjs\",\n \"fp-ts\",\n \"neverthrow\",\n \"ts-results\",\n \"purify-ts\",\n ],\n \"CSV は effect/encoding の Csv だけで読み書きする\": [\n \"papaparse\",\n \"csv-parse\",\n \"csv-parser\",\n \"csv-stringify\",\n \"fast-csv\",\n \"@fast-csv/*\",\n \"d3-dsv\",\n ],\n \"tar は effect/encoding の Tar だけで読み書きする\": [\n \"modern-tar\",\n \"nanotar\",\n \"tar\",\n \"tar-stream\",\n \"tar-fs\",\n \"tar-js\",\n \"tarts\",\n \"it-tar\",\n ],\n \"エージェントスキルは vite.config.ts の skills に書き、msch --prepare で入れる\": [\"skills\"],\n \"フィーチャーフラグは OpenFeature だけで扱う\": [\n \"launchdarkly-*\",\n \"@launchdarkly/*\",\n \"@growthbook/*\",\n \"unleash-client\",\n \"flagsmith\",\n \"@vercel/flags\",\n ],\n \"テストは Vitest と Playwright だけで扱う\": [\n \"jest\",\n \"jest-*\",\n \"@jest/*\",\n \"ts-jest\",\n \"mocha\",\n \"jasmine\",\n \"jasmine-core\",\n \"ava\",\n \"cypress\",\n \"tap\",\n \"uvu\",\n ],\n \"決済は Stripe だけで扱う\": [\n \"@paypal/*\",\n \"paypal-rest-sdk\",\n \"braintree\",\n \"@paddle/*\",\n \"@lemonsqueezy/*\",\n \"square\",\n ],\n \"整形は Vite+ の vp fmt だけで扱う\": [\n \"prettier\",\n \"prettier-plugin-*\",\n \"@prettier/*\",\n \"@biomejs/*\",\n \"dprint\",\n ],\n \"lint は Vite+ の vp lint だけで扱い、ESLint のプラグインは oxlint の JS プラグインとして読む\": [\n \"eslint\",\n \"@eslint/*\",\n \"eslint-config-*\",\n \"tslint\",\n \"standard\",\n \"xo\",\n ],\n [INSTRUMENTATION]: [\"@opentelemetry/*\", \"dd-trace\", \"newrelic\"],\n [INFRASTRUCTURE]: [\n \"wrangler\",\n \"miniflare\",\n \"@cloudflare/vite-plugin\",\n \"@vercel/*\",\n \"@netlify/*\",\n \"aws-cdk\",\n \"aws-cdk-lib\",\n \"@pulumi/*\",\n \"cdktf\",\n ],\n};\n","export const tracedRules = {\n \"msch-lint/traced-elysia\": \"error\",\n \"msch-lint/traced-effect-run\": \"error\",\n} as const;\n","import remotion from \"@r_masseater/oxlint-typed-rules/remotion\";\n\nimport { allRulesOf } from \"./lint.config.ts\";\n\nexport const remotionRules = allRulesOf({ prefix: \"@remotion\", rules: remotion.rules });\n","import type { WismConfig } from \"@r_masseater/wism\";\nimport { rustCrate, skill, structure, workspace } from \"@r_masseater/wism-presets\";\nimport { Array as Arr, Predicate, String as Str, pipe } from \"effect\";\n\nconst NEGATION = \"!\";\nconst isIgnore = Predicate.not(Str.startsWith(NEGATION));\n\nexport interface StructureOptions {\n readonly members: readonly string[];\n readonly ignorePatterns: readonly string[];\n}\n\nexport const structureOf = ({ members, ignorePatterns }: StructureOptions): WismConfig =>\n structure({\n kinds: [workspace({ paths: members }), rustCrate(), skill()],\n ignores: pipe(ignorePatterns, Arr.filter(isIgnore)),\n });\n","import { createRequire, registerHooks } from \"node:module\";\n\nexport const KUROMOJIN = \"kuromojin\";\nconst ON_Y8 = \"@r_masseater/y8/kuromojin\";\n\nexport const requireWithY8Kuromojin = (parentUrl: string): NodeJS.Require => {\n registerHooks({\n resolve: (specifier, context, nextResolve) => {\n if (specifier === KUROMOJIN) {\n return nextResolve(ON_Y8, { ...context, parentURL: import.meta.url });\n }\n return nextResolve(specifier, context);\n },\n });\n return createRequire(parentUrl);\n};\n","import presetJa from \"@r_masseater/textlint-rule-preset-ja\";\nimport type { ToolSections } from \"@r_masseater/vite-plus-adopt\";\nimport { Option, Predicate, Record as Rec, pipe } from \"effect\";\n\nimport { JAPANESE } from \"#/shared/config/index.ts\";\n\nimport { requireWithY8Kuromojin } from \"./kuromojin.config.ts\";\n\ntype Preset = NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]>[string];\ntype Rule = Preset[\"rules\"][string];\ntype Reporter = Extract<Rule, (...args: never) => unknown>;\ntype Fixable = Exclude<Rule, Reporter>;\n\nconst NO_HANDLERS = {};\n\nconst isPreset = (value: unknown): value is Preset =>\n Predicate.hasProperty(value, \"rules\") &&\n Predicate.isObject(value.rules) &&\n Predicate.hasProperty(value, \"rulesConfig\") &&\n Predicate.isObject(value.rulesConfig);\n\nconst presetIn = (value: unknown): Option.Option<Preset> => {\n if (isPreset(value)) {\n return Option.some(value);\n }\n if (Predicate.hasProperty(value, \"default\")) {\n return presetIn(value.default);\n }\n return Option.none();\n};\n\nconst required = requireWithY8Kuromojin(import.meta.url);\n\nconst presetOf = (specifier: string, loaded: unknown): Preset =>\n Option.getOrThrowWith(\n presetIn(loaded),\n () => new TypeError(`${specifier} does not export a textlint preset`),\n );\n\nconst japaneseOnly =\n (reporter: Reporter): Reporter =>\n (context, options) => {\n if (JAPANESE.test(context.getSource())) {\n return reporter(context, options);\n }\n return NO_HANDLERS;\n };\n\nconst forJapanese = (rule: Reporter | Readonly<Fixable>): Rule => {\n if (Predicate.isFunction(rule)) {\n return japaneseOnly(rule);\n }\n return { linter: japaneseOnly(rule.linter), fixer: japaneseOnly(rule.fixer) };\n};\n\nconst japanesePreset = (specifier: string, loaded: unknown): Preset => {\n const { rules, rulesConfig } = presetOf(specifier, loaded);\n return { rules: pipe(rules, Rec.map(forJapanese)), rulesConfig };\n};\n\nexport const textlintPresets: NonNullable<NonNullable<ToolSections[\"textlint\"]>[\"presets\"]> = {\n \"@r_masseater/preset-ja\": japanesePreset(\"@r_masseater/textlint-rule-preset-ja\", presetJa),\n \"@textlint-ja/preset-ai-writing\": japanesePreset(\n \"@textlint-ja/textlint-rule-preset-ai-writing\",\n required(\"@textlint-ja/textlint-rule-preset-ai-writing\"),\n ),\n \"preset-ja-technical-writing\": japanesePreset(\n \"textlint-rule-preset-ja-technical-writing\",\n required(\"textlint-rule-preset-ja-technical-writing\"),\n ),\n};\n","import type { RuleEntry, Y8Config } from \"@r_masseater/y8\";\nimport { recommended } from \"@r_masseater/y8-presets\";\nimport type { RecommendedOptions } from \"@r_masseater/y8-presets\";\n\nconst INDEX_SKILL = \"masseater-ecosystem\";\n\nconst MASSEATER_DOCS: RecommendedOptions = {\n agents: {\n sections: [[\"Tech stack\"], [\"Commands\"], [\"Rules\"]],\n commands: [\"Commands\"],\n stack: [\"Tech stack\"],\n skillNames: { index: INDEX_SKILL },\n },\n skills: { skillNames: { index: INDEX_SKILL } },\n};\n\nconst MARKDOWN_IGNORES = [\n \".agents/skills/**\",\n \"**/fixtures/**\",\n \"**/upstream/**\",\n \"CHANGELOG.md\",\n \"**/CLAUDE.md\",\n];\n\nexport interface MarkdownOptions {\n readonly ignores?: readonly string[];\n readonly rules?: Readonly<Record<string, RuleEntry>>;\n readonly docs?: RecommendedOptions;\n}\n\nexport const markdownOf = ({ ignores = [], rules = {}, docs = {} }: MarkdownOptions): Y8Config => ({\n extends: [\n recommended({\n ...MASSEATER_DOCS,\n ...docs,\n agents: { ...MASSEATER_DOCS.agents, ...docs.agents },\n skills: { ...MASSEATER_DOCS.skills, ...docs.skills },\n }),\n ],\n rules: { \"agnix/XP-001\": \"off\", ...rules },\n ignores: [...MARKDOWN_IGNORES, ...ignores],\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,MAAM,UAAU;AAChB,MAAM,kBACJ;AAEF,MAAM,YAAY;AAClB,MAAM,oBACJ;AAEF,MAAM,0BACJ;AAEF,MAAa,2BACX;CACE;EACE,UAAU,qHAAqH,QAAQ;EACvI,SAAS;CACX;CACA;EACE,UAAU,sFAAsF,QAAQ;EACxG,SAAS;CACX;CACA;EACE,UAAU,iIAAiI,UAAU;EACrJ,SAAS;CACX;CACA;EACE,UAAU,+HAA+H,UAAU;EACnJ,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SAAS;CACX;CACA;EACE,UACE;EACF,SACE;CACJ;CACA;EACE,UACE;EACF,SACE;CACJ;CACA;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ACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB,SAAS;EAA4B,MAAM;CAAoB;CAC3F,GAAG;CACH;EACE,MAAM;EACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAQ,MAAM;CAAa;CAChE;EACE,MAAM;EACN,SAAS;EACT,MAAM,CAAC,cAAc,kBAAkB;CACzC;CACA;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAqB;GAA0B;EAAyB;CACjF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAgC,MAAM;CAAY;CACvF;EACE,MAAM;EACN,SAAS;EACT,MAAM;GAAC;GAAkB;GAAU;EAAc;CACnD;CACA;EAAE,MAAM;EAAoB,SAAS;EAAc,MAAM,CAAC,UAAU,OAAO;CAAE;CAC7E;EACE,MAAM;EACN,SAAS;EACT,MAAM,CAAC,eAAe,iBAAiB;CACzC;CACA,GAAG;CACH;EAAE,MAAM;EAAoB,SAAS;EAAW,MAAM;CAAY;CAClE;EACE,MAAM;EACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB,SAAS;EAAS,MAAM;CAAmB;CACvE;EAAE,MAAM;EAAoB,SAAS;EAAuB,MAAM;CAAa;CAC/E;EACE,MAAM;EACN,SAAS;EACT,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EAAE,MAAM;EAAoB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E,gCAAgC,CAAC,SAAS,EAAE,kBAAkB,CAAC,OAAO,EAAE,CAAC;CA+CzE;CACA;EA5CA;EACA;EACA;GACE,OAAO;IAAC;IAAkB;IAAmB;GAAsB;GACnE,OAAO,EAAE,4BAA4B,MAAM;EAC7C;EACA;EACA;GACE,OAAO,CAAC,mBAAmB;GAC3B,OAAO;IACL,oBAAoB;IACpB,iCAAiC;IACjC,4BAA4B;GAC9B;EACF;CA8BA;CACA,UAAU,GACP,qBAAqB;EACpB,OAAO;EACP,WAAW;EACX,IAAI;CACN,EACF;CACA,SAAS;EACP,WAAW;EACX,WAAW;EACX,cAAc;EACd,+BAA+B;CACjC;AACF;;AC5KA,MAAM,WAAW;AAEjB,MAAa,kBAAkB;AAC/B,MAAM,iBAAiB;AAEvB,MAAa,gBAA6D;EACvE,WAAW;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8CAA8C;EAC5C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,4CAA4C;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yBAAyB;EACvB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,uCAAuC;EACrC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,qCAAqC;EACnC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,yCAAyC;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,8DAA8D,CAAC,QAAQ;CACvE,gCAAgC;EAC9B;EACA;EACA;EACA;EACA;EACA;CACF;C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