@r_masseater/i68 0.1.0 → 0.2.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/package.json CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "@r_masseater/i68",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A linter for .fumx songs that checks musical rules such as notes outside the key, part ranges, voicing clashes and parallel fifths, configured from vite.config.ts with rules written in TypeScript.",
5
5
  "keywords": [
6
6
  "fumx",
7
7
  "lint",
8
8
  "music",
9
9
  "music-theory",
10
+ "preset",
10
11
  "tanstack-intent",
11
12
  "vite-plus",
12
13
  "voicing"
13
14
  ],
14
- "homepage": "https://github.com/masseater/masseater.dev/tree/main/libs/i68#readme",
15
+ "homepage": "https://github.com/masseater/ecosystems/tree/main/libs/i68#readme",
15
16
  "bugs": {
16
- "url": "https://github.com/masseater/masseater.dev/issues"
17
+ "url": "https://github.com/masseater/ecosystems/issues"
17
18
  },
18
19
  "license": "MIT",
19
20
  "repository": {
20
21
  "type": "git",
21
- "url": "git+https://github.com/masseater/masseater.dev.git",
22
+ "url": "git+https://github.com/masseater/ecosystems.git",
22
23
  "directory": "libs/i68"
23
24
  },
24
25
  "bin": {
@@ -27,9 +28,11 @@
27
28
  "files": [
28
29
  "LICENSE",
29
30
  "dist",
30
- "skills/lint-songs"
31
+ "skills/lint-songs",
32
+ "skills/use-i68-presets"
31
33
  ],
32
34
  "type": "module",
35
+ "sideEffects": false,
33
36
  "imports": {
34
37
  "#/*": "./src/*"
35
38
  },
@@ -38,6 +41,14 @@
38
41
  "types": "./dist/index.d.mts",
39
42
  "default": "./dist/index.mjs"
40
43
  },
44
+ "./presets": {
45
+ "types": "./dist/presets.d.mts",
46
+ "default": "./dist/presets.mjs"
47
+ },
48
+ "./habits": {
49
+ "types": "./dist/habits.d.mts",
50
+ "default": "./dist/habits.mjs"
51
+ },
41
52
  "./vite": {
42
53
  "types": "./dist/vite.d.mts",
43
54
  "default": "./dist/vite.mjs"
@@ -49,33 +60,36 @@
49
60
  "provenance": true
50
61
  },
51
62
  "dependencies": {
52
- "@effect/platform-node": "^4.1.4",
53
- "@r_masseater/fumx-parser": "^0.2.0"
63
+ "@effect/platform-node": "^4.1.5",
64
+ "@r_masseater/song-format": "^0.2.0"
54
65
  },
55
66
  "devDependencies": {
56
- "@effect/vitest": "4.1.4",
67
+ "@effect/vitest": "4.1.5",
57
68
  "@masseater.dev/lint-host": "0.0.0",
58
- "@r_masseater/vitest-otlp": "0.2.0",
69
+ "@r_masseater/vitest-otlp": "0.2.2",
59
70
  "@types/node": "26.6.6",
60
- "effect": "4.1.4",
61
- "vite": "npm:@voidzero-dev/vite-plus-core@8.3.8000",
62
- "vite-plus": "1.7.0"
71
+ "effect": "4.1.5",
72
+ "tonal": "6.9.0",
73
+ "verovio": "6.4.1",
74
+ "vite": "npm:@voidzero-dev/vite-plus-core@8.3.8001",
75
+ "vite-plus": "1.8.0"
63
76
  },
64
77
  "peerDependencies": {
65
- "effect": "^4.1.2",
78
+ "effect": "^4.1.0",
79
+ "tonal": ">=6.9.0",
66
80
  "vite": "*",
67
- "vite-plus": ">=1.5.0"
81
+ "vite-plus": ">=1.8.0"
68
82
  },
69
83
  "peerDependenciesMeta": {
70
- "vite": {
84
+ "tonal": {
71
85
  "optional": true
72
86
  },
73
- "vite-plus": {
87
+ "vite": {
74
88
  "optional": true
75
89
  }
76
90
  },
77
91
  "engines": {
78
- "node": "v26.13.1"
92
+ "node": ">=26.13.1"
79
93
  },
80
94
  "scripts": {}
81
95
  }
@@ -21,7 +21,7 @@ i68 lints `.fumx` songs. Each rule sees the song as data and reports findings by
21
21
 
22
22
  ```ts
23
23
  import "@r_masseater/i68/vite";
24
- import { recommended } from "@r_masseater/i68-presets";
24
+ import { recommended } from "@r_masseater/i68/presets";
25
25
  import { defineConfig } from "vite-plus";
26
26
 
27
27
  export default defineConfig({ i68: { extends: [recommended()] } });
@@ -42,7 +42,7 @@ Naming a plugin in `rules` that `plugins` does not register fails the run.
42
42
 
43
43
  ## Write a rule
44
44
 
45
- `check(context)` gets `song` (the parsed `Song`), `soundings` (notes of unmuted tracks with `track`, `role`, `midi`, `start`, `end`, `bar`, `line`, `column`), `options` and `report({ line, column, message, detail })`. Times are ticks. `end` already accounts for the note's gate. Keys and chords come from `@r_masseater/fumx-parser/analysis`.
45
+ `check(context)` gets `song` (the parsed `Song`), `soundings` (notes of unmuted tracks with `track`, `role`, `midi`, `start`, `end`, `bar`, `line`, `column`), `options` and `report({ line, column, message, detail })`. Times are ticks. `end` already accounts for the note's gate. Keys and chords come from `@r_masseater/song-format/analysis`.
46
46
 
47
47
  Report with the sounding's `line` and `column` so the finding points at the note in the file.
48
48
 
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: use-i68-presets
3
+ description: >
4
+ Use when choosing which @r_masseater/i68/presets presets a project extends, setting their
5
+ options, explaining a pop/, harmony/, classical/, progressions/ or bach/ finding in plain words, or adding a preset
6
+ for another style of writing music.
7
+ metadata:
8
+ type: core
9
+ library: "@r_masseater/i68"
10
+ library_version: 0.1.0
11
+ sources:
12
+ - src/app/presets.ts
13
+ - src/app/presets/features/check-pop/model/preset.ts
14
+ - src/app/presets/features/check-harmony/model/preset.ts
15
+ - src/app/presets/features/check-classical/model/preset.ts
16
+ - src/app/presets/features/check-progressions/model/preset.ts
17
+ - src/app/presets/features/check-style/model/preset.ts
18
+ ---
19
+
20
+ # use-i68-presets
21
+
22
+ Each preset returns an i68 config for one concern. List the ones you want in `extends`.
23
+
24
+ ```ts
25
+ import "@r_masseater/i68/vite";
26
+ import { classical, harmony, pop } from "@r_masseater/i68/presets";
27
+ import { defineConfig } from "vite-plus";
28
+
29
+ export default defineConfig({
30
+ i68: {
31
+ extends: [pop({ ranges: { lead: ["A3", "E5"], bass: ["E1", "G3"] } }), harmony(), classical()],
32
+ },
33
+ });
34
+ ```
35
+
36
+ ## Presets
37
+
38
+ | Preset | What it checks |
39
+ | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | `pop({ ranges, maxLeap, breathSeconds })` | Key, part range, melody leaps and breath. `ranges` maps a track name or role to `[low, high]` pitch names. |
41
+ | `harmony()` | Semitone clashes, low interval limits and crowded low mids (A2-B3). It also flags harmony above the melody and chord voices that leap. |
42
+ | `classical()` | Parallel fifths and octaves between melody and bass. It also flags dissonances on strong beats that do not step down. |
43
+ | `progressions()` | Names famous progressions where they start. `PROGRESSIONS` lists them. |
44
+ | `bach()` | Warns on chord changes Bach rarely makes in his chorales. The detail names the chords he usually picks. |
45
+ | `recommended(popOptions)` | `pop` and `harmony`. |
46
+
47
+ `stylePluginOf(table)` turns any `StyleTable` of chord transition counts into the same rule as `bach()` for another style.
48
+
49
+ Rules read the track `role`. A track without a role is only checked by rules that look at every pitched part. Those are `out-of-key`, `semitone-clash`, `low-interval-limit` and `crowded-low-mids`.
50
+
51
+ ## Explain a finding
52
+
53
+ Every report has a `detail` with the fix. When the person does not know music theory, start with what they would hear. Examples are a rumble, a wrong-sounding note, or a line that cannot be sung in one breath. Give the theory name after that.
54
+
55
+ ## Add a style
56
+
57
+ Put a new style in `src/app/presets/features/check-<style>/` with its own plugin and preset function. Export both from `src/app/index.ts`. Do not add options to an existing preset to change its style.
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli-CWRZxhv9.mjs","names":[],"sources":["../src/app/cli.ts"],"sourcesContent":["import { runCli as runLinter } from \"@masseater.dev/lint-host\";\n\nimport { failedWith } from \"#/shared/lib/errors.ts\";\n\nimport { format } from \"./format.ts\";\nimport { lint } from \"./lint.ts\";\nimport { i68Section, songPathspecs } from \"./section.ts\";\n\nexport const runCli = (): void => {\n runLinter({\n name: \"i68\",\n section: i68Section,\n pathspecs: songPathspecs,\n lint,\n format,\n failWith: failedWith,\n });\n};\n"],"mappings":";;AAQA,MAAa,eAAqB;CAChC,SAAU;EACR,MAAM;EACN,SAAS;EACT,WAAW;EACX;EACA;EACA,UAAU;CACZ,CAAC;AACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/entities/rule/model/define.ts"],"sourcesContent":["import type { Plugin, Rule } from \"#/shared/config/index.ts\";\n\nexport const defineRule = (rule: Rule): Rule => rule;\n\nexport const definePlugin = (plugin: Plugin): Plugin => plugin;\n"],"mappings":";;AAEA,MAAa,cAAc,SAAqB;AAEhD,MAAa,gBAAgB,WAA2B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"section-DwA18QK6.mjs","names":["Arr","Rec","taggedError","Rec","Str","DATA_FIRST_ARITY","Arr","Fn","Str","nodeServices","Fn","LINE_START","Bool","Arr","Arr","Rec","Arr","SEPARATOR","Str","rulesOf","Rec","Arr","Arr","Str","rulesOf","Arr","Arr","Arr","Arr"],"sources":["../../lint-host/src/entities/rule/model/setting.ts","../../lint-host/src/entities/rule/model/severity.ts","../../lint-host/src/shared/lib/target.ts","../../lint-host/src/features/build-addon/model/build.ts","../../lint-host/src/features/run-cli/model/cli.ts","../../lint-host/src/shared/lib/present.ts","../../lint-host/src/shared/lib/trace.ts","../../lint-host/src/shared/lib/layers.ts","../src/entities/rule/model/extend.ts","../src/entities/rule/model/resolve.ts","../src/app/format.ts","../src/features/read-songs/model/read.ts","../src/shared/lib/errors.ts","../src/features/run-rules/model/suppressions.ts","../src/features/run-rules/model/run.ts","../src/app/lint.ts","../src/app/section.ts"],"sourcesContent":["import { Array as Arr, Match, Option, Record as Rec, pipe } from \"effect\";\n\nexport type Severity = \"off\" | \"warn\" | \"error\";\n\nexport type RuleOptions = Readonly<Record<string, unknown>>;\n\nexport type RuleEntry = Severity | readonly [Severity] | readonly [Severity, RuleOptions];\n\nexport interface Setting {\n readonly severity: Severity;\n readonly options: RuleOptions;\n}\n\nconst NO_OPTIONS: RuleOptions = {};\n\nexport const settingOf = (entry: RuleEntry): Setting =>\n Match.value(entry).pipe(\n Match.when(Match.string, (severity): Setting => ({ severity, options: NO_OPTIONS })),\n Match.orElse(([severity, options]): Setting => ({\n severity,\n options: options ?? NO_OPTIONS,\n })),\n );\n\nconst optionsOf = (entry: RuleEntry): Option.Option<RuleOptions> =>\n Match.value(entry).pipe(\n Match.when(Match.string, () => Option.none()),\n Match.orElse(([, options]) => Option.fromUndefinedOr(options)),\n );\n\nconst overridden = (earlier: RuleEntry, later: RuleEntry): RuleEntry =>\n pipe(\n optionsOf(later),\n Option.orElse(() => optionsOf(earlier)),\n Option.match({\n onNone: () => later,\n onSome: (options): RuleEntry => [settingOf(later).severity, options],\n }),\n );\n\nexport const mergedRules = (\n layers: readonly (Readonly<Record<string, RuleEntry>> | undefined)[],\n): Readonly<Record<string, RuleEntry>> => {\n const merged: Record<string, RuleEntry> = {};\n for (const [name, later] of pipe(\n layers,\n Arr.flatMap((layer) => Rec.toEntries(layer ?? {})),\n )) {\n merged[name] = pipe(\n Rec.get(merged, name),\n Option.match({\n onNone: () => later,\n onSome: (earlier) => overridden(earlier, later),\n }),\n );\n }\n return merged;\n};\n","import { Match } from \"effect\";\n\nimport type { Setting, Severity } from \"./setting.ts\";\n\nexport const reportedSeverity = (setting: Setting): Exclude<Severity, \"off\"> =>\n Match.value(setting.severity).pipe(\n Match.when(\"warn\", (): Exclude<Severity, \"off\"> => \"warn\"),\n Match.orElse((): Exclude<Severity, \"off\"> => \"error\"),\n );\n","import { Match } from \"effect\";\n\nconst abiOf = (platform: string): string =>\n Match.value(platform).pipe(\n Match.when(\"linux\", () => \"-gnu\"),\n Match.when(\"win32\", () => \"-msvc\"),\n Match.orElse(() => \"\"),\n );\n\nexport const platformTarget = `${process.platform}-${process.arch}${abiOf(process.platform)}`;\n\nexport const addonFileOf = (binary: string): string => `${binary}.${platformTarget}.node`;\n","import { runMain } from \"@effect/platform-node/NodeRuntime\";\nimport { layer as nodeServices } from \"@effect/platform-node/NodeServices\";\nimport { Effect, FileSystem, Path, Record as Rec, Schema, String as Str } from \"effect\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\n\nimport { addonFileOf } from \"#/shared/lib/target.ts\";\n\nconst taggedError = Schema.TaggedError;\n\nclass AddonBuildFailed extends taggedError<AddonBuildFailed, { readonly brand: unique symbol }>()(\n \"AddonBuildFailed\",\n { message: Schema.String },\n) {}\n\nconst LIBRARY: Readonly<Record<string, (name: string) => string>> = {\n linux: (name) => `lib${name}.so`,\n darwin: (name) => `lib${name}.dylib`,\n win32: (name) => `${name}.dll`,\n};\n\nconst SUCCESS = 0;\n\nexport interface AddonBuild {\n readonly crate: string;\n readonly binary: string;\n readonly packageDir: string;\n readonly workspaceDir: string;\n}\n\nconst cargo = Effect.fn(\"cargo\")(function* cargo(crate: string, workspace: string) {\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const exitCode = yield* spawner.exitCode(\n ChildProcess.make(\"cargo\", [\"build\", \"--release\", \"--locked\", \"-p\", crate], {\n cwd: workspace,\n stdout: \"inherit\",\n stderr: \"inherit\",\n }),\n );\n const failure = AddonBuildFailed.make({ message: `cargo exited with ${String(exitCode)}` });\n yield* Effect.when(\n Effect.fail(failure),\n Effect.sync(() => Number(exitCode) !== SUCCESS),\n );\n});\n\nconst build = Effect.fn(\"buildAddon\")(function* build(options: AddonBuild) {\n const fileSystem = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const library = yield* Effect.fromOption(Rec.get(LIBRARY, process.platform)).pipe(\n Effect.mapError(() =>\n AddonBuildFailed.make({ message: `no native build for ${process.platform}` }),\n ),\n );\n yield* cargo(options.crate, options.workspaceDir);\n const output = path.join(options.packageDir, \"native\");\n yield* fileSystem.makeDirectory(output, { recursive: true });\n const built = library(Str.replaceAll(\"-\", \"_\")(options.crate));\n yield* fileSystem.copyFile(\n path.join(options.workspaceDir, \"target\", \"release\", built),\n path.join(output, addonFileOf(options.binary)),\n );\n});\n\nexport const buildAddon = (options: AddonBuild): void => {\n runMain(build(options).pipe(Effect.provide(nodeServices)));\n};\n","import { runMain } from \"@effect/platform-node/NodeRuntime\";\nimport { layer as nodeServices } from \"@effect/platform-node/NodeServices\";\nimport {\n Array as Arr,\n Console,\n Effect,\n FileSystem,\n Function as Fn,\n Layer,\n Option,\n Path,\n String as Str,\n pipe,\n} from \"effect\";\nimport { FetchHttpClient } from \"effect/http\";\nimport { Otlp, OtlpSerialization } from \"effect/observability\";\nimport type { PlatformError } from \"effect/PlatformError\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\nimport { resolveConfigFromFile } from \"vite-plus\";\n\nimport type { FailWith } from \"#/shared/lib/fail.ts\";\n\nconst CONFIG_FILES = [\"vite.config.ts\", \"vite.config.mts\", \"vite.config.js\", \"vite.config.mjs\"];\nconst FAILED = 1;\nconst DATA_FIRST_ARITY = 2;\nconst ARGUMENTS_START = 2;\n\nexport interface Reported {\n readonly severity: string;\n}\n\nexport interface LintCall<Config, Failure> {\n readonly root: string;\n readonly files: readonly string[];\n readonly projectFiles: readonly string[];\n readonly config: Config;\n readonly read: (file: string) => Effect.Effect<string, Failure>;\n}\n\nexport interface PathspecRequest<Config> {\n readonly config: Config;\n readonly patterns?: readonly string[];\n}\n\nexport interface SectionSource<Config, Failure> {\n readonly name: string;\n readonly section: (config: unknown) => Config;\n readonly failWith: FailWith<Failure>;\n}\n\nexport interface Cli<Config, Found extends Reported, Failure> extends SectionSource<\n Config,\n Failure\n> {\n readonly pathspecs: (request: PathspecRequest<Config>) => readonly string[];\n readonly lint: (call: LintCall<Config, Failure>) => Effect.Effect<readonly Found[], Failure>;\n readonly format: (found: Found) => string;\n}\n\nexport interface ToolCall<Config> {\n readonly root: string;\n readonly config: Config;\n readonly args: readonly string[];\n}\n\nexport interface Tool<Config, Found, Failure> extends SectionSource<Config, Failure> {\n readonly scan: (call: ToolCall<Config>) => Effect.Effect<readonly Found[], Failure>;\n readonly format: (found: Found) => string;\n}\n\ntype CliServices = FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner;\n\nconst readSectionIn = <Config, Failure>(\n source: SectionSource<Config, Failure>,\n root: string,\n): Effect.Effect<Config, Failure, FileSystem.FileSystem | Path.Path> =>\n Effect.gen(function* readConfig() {\n const fileSystem = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const found = yield* pipe(\n CONFIG_FILES,\n Arr.map((name) => path.join(root, name)),\n Effect.filter((file) => fileSystem.exists(file).pipe(Effect.orElseSucceed(() => false))),\n );\n const loaded = yield* Option.match(Arr.head(found), {\n onNone: () => Effect.succeed<unknown>({}),\n onSome: (file) =>\n Effect.tryPromise({\n try: () => resolveConfigFromFile(file),\n catch: source.failWith(`could not load ${file}`),\n }),\n });\n return source.section(loaded);\n }).pipe(Effect.withSpan(`${source.name}.config`));\n\n/** @internal */\nexport const readSection: {\n (\n root: string,\n ): <Config, Failure>(\n source: SectionSource<Config, Failure>,\n ) => Effect.Effect<Config, Failure, FileSystem.FileSystem | Path.Path>;\n <Config, Failure>(\n source: SectionSource<Config, Failure>,\n root: string,\n ): Effect.Effect<Config, Failure, FileSystem.FileSystem | Path.Path>;\n} = Fn.dual(DATA_FIRST_ARITY, readSectionIn);\n\nconst trackedFiles = (\n root: string,\n pathspecs: readonly string[],\n): Effect.Effect<readonly string[], PlatformError, ChildProcessSpawner.ChildProcessSpawner> =>\n Effect.gen(function* listFiles() {\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const output = yield* spawner.string(\n ChildProcess.make(\n \"git\",\n [\"ls-files\", \"-co\", \"--exclude-standard\", \"-z\", \"--\", ...pathspecs],\n { cwd: root },\n ),\n );\n return pipe(Str.split(output, \"\\0\"), Arr.filter(Str.isNonEmpty));\n });\n\nconst requestOf = <Config>(config: Config, patterns: readonly string[]): PathspecRequest<Config> =>\n Arr.match(patterns, {\n onEmpty: () => ({ config }),\n onNonEmpty: (given) => ({ config, patterns: given }),\n });\n\nconst hasError = (found: readonly Reported[]): boolean =>\n pipe(\n found,\n Arr.some(({ severity }) => severity === \"error\"),\n );\n\nconst failWhen = (failed: boolean): Effect.Effect<void> =>\n Effect.when(\n Effect.sync(() => {\n process.exitCode = FAILED;\n }),\n Effect.succeed(failed),\n ).pipe(Effect.asVoid);\n\nconst printAll = <Found>(\n found: readonly Found[],\n format: (found: Found) => string,\n): Effect.Effect<void> =>\n Arr.match(found, {\n onEmpty: () => Effect.void,\n onNonEmpty: (all) => Console.log(pipe(all, Arr.map(format), Arr.join(\"\\n\"))),\n });\n\nconst readerIn = <Failure>(\n root: string,\n failWith: FailWith<Failure>,\n): Effect.Effect<\n (file: string) => Effect.Effect<string, Failure>,\n never,\n FileSystem.FileSystem | Path.Path\n> =>\n Effect.gen(function* reader() {\n const fileSystem = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n return (file: string): Effect.Effect<string, Failure> =>\n fileSystem\n .readFileString(path.resolve(root, file))\n .pipe(Effect.mapError(failWith(`could not read ${file}`)));\n });\n\nconst mainOf = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n): Effect.Effect<void, Failure | PlatformError, CliServices> =>\n Effect.gen(function* main() {\n const root = process.cwd();\n const config = yield* readSectionIn(cli, root);\n const patterns = process.argv.slice(ARGUMENTS_START);\n const pathspecs = cli.pathspecs(requestOf(config, patterns));\n const { files, projectFiles } = yield* Effect.all(\n {\n files: trackedFiles(root, pathspecs).pipe(Effect.withSpan(`${cli.name}.files`)),\n projectFiles: trackedFiles(root, []).pipe(Effect.withSpan(`${cli.name}.project`)),\n },\n { concurrency: \"unbounded\" },\n );\n const read = yield* readerIn(root, cli.failWith);\n const found = yield* cli.lint({ root, files, projectFiles, config, read });\n yield* printAll(found, cli.format);\n yield* failWhen(hasError(found));\n });\n\nconst toolMainOf = <Config, Found, Failure>(\n tool: Tool<Config, Found, Failure>,\n): Effect.Effect<void, Failure | PlatformError, CliServices> =>\n Effect.gen(function* main() {\n const root = process.cwd();\n const config = yield* readSectionIn(tool, root);\n const found = yield* tool.scan({ root, config, args: process.argv.slice(ARGUMENTS_START) });\n yield* printAll(found, tool.format);\n yield* failWhen(Arr.isReadonlyArrayNonEmpty(found));\n });\n\nconst runTraced = <Failure>(\n name: string,\n program: Effect.Effect<void, Failure, CliServices>,\n): void => {\n const services = Otlp.layerFromConfig({ resource: { serviceName: name } }).pipe(\n Layer.provide(OtlpSerialization.layerJson),\n Layer.provide(FetchHttpClient.layer),\n Layer.provideMerge(nodeServices),\n );\n runMain(program.pipe(Effect.provide(services)));\n};\n\nexport const runCli = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n): void => {\n runTraced(cli.name, mainOf(cli));\n};\n\nexport const runTool = <Config, Found, Failure>(tool: Tool<Config, Found, Failure>): void => {\n runTraced(tool.name, toolMainOf(tool));\n};\n","import { Function as Fn, Option } from \"effect\";\n\nconst DATA_FIRST_ARITY = 2;\n\nexport const present: {\n <Value, Fields extends object>(\n build: (value: Value) => Fields,\n ): (value: Option.Option<Value>) => Partial<Fields>;\n <Value, Fields extends object>(\n value: Option.Option<Value>,\n build: (value: Value) => Fields,\n ): Partial<Fields>;\n} = Fn.dual(\n DATA_FIRST_ARITY,\n <Value, Fields extends object>(\n value: Option.Option<Value>,\n build: (value: Value) => Fields,\n ): Partial<Fields> => Option.match(value, { onNone: (): Partial<Fields> => ({}), onSome: build }),\n);\n","import { Array as Arr, Boolean as Bool, Effect, Order } from \"effect\";\nimport type { Option } from \"effect\";\n\nconst SAMPLED = \"01\";\nconst NOT_SAMPLED = \"00\";\n\nexport interface Positioned {\n readonly path: string;\n readonly line: number;\n readonly column?: number;\n}\n\nconst LINE_START = 0;\n\nconst flagsOf = (sampled: boolean): string =>\n Bool.match(sampled, { onFalse: () => NOT_SAMPLED, onTrue: () => SAMPLED });\n\nexport const traceparent: Effect.Effect<Option.Option<string>> = Effect.currentSpan.pipe(\n Effect.map((span) => `00-${span.traceId}-${span.spanId}-${flagsOf(span.sampled)}`),\n Effect.option,\n);\n\nconst byPosition: Order.Order<Positioned> = Order.combine(\n Order.mapInput(Order.String, (found: Positioned) => found.path),\n Order.combine(\n Order.mapInput(Order.Number, (found: Positioned) => found.line),\n Order.mapInput(Order.Number, (found: Positioned) => found.column ?? LINE_START),\n ),\n);\n\nexport const sortByPosition = <Found extends Positioned>(found: readonly Found[]): Found[] =>\n Arr.sort(found, byPosition);\n","import { Array as Arr, Record as Rec, pipe } from \"effect\";\n\nexport interface Layer<Plugin, Entry, Override> {\n readonly plugins?: Readonly<Record<string, Plugin>>;\n readonly rules?: Readonly<Record<string, Entry>>;\n readonly ignores?: readonly string[];\n readonly overrides?: readonly Override[];\n}\n\nexport interface Merged<Plugin, Entry, Override> {\n readonly plugins: Readonly<Record<string, Plugin>>;\n readonly rules: Readonly<Record<string, Entry>>;\n readonly ignores: readonly string[];\n readonly overrides: readonly Override[];\n}\n\nexport const mergedRecords = <Value>(\n records: readonly (Readonly<Record<string, Value>> | undefined)[],\n): Readonly<Record<string, Value>> =>\n pipe(\n records,\n Arr.flatMap((record) => Rec.toEntries(record ?? {})),\n Rec.fromEntries,\n );\n\nexport const layersOf = <Config extends { readonly extends?: readonly Config[] }>(\n config: Config,\n): readonly Omit<Config, \"extends\">[] => {\n const { extends: bases = [], ...own } = config;\n return [...pipe(bases, Arr.flatMap(layersOf)), own];\n};\n\nexport const mergedLayers = <Plugin, Entry, Override>(\n layers: readonly Layer<Plugin, Entry, Override>[],\n): Merged<Plugin, Entry, Override> => ({\n plugins: mergedRecords(\n pipe(\n layers,\n Arr.map((layer) => layer.plugins),\n ),\n ),\n rules: mergedRecords(\n pipe(\n layers,\n Arr.map((layer) => layer.rules),\n ),\n ),\n ignores: pipe(\n layers,\n Arr.flatMap((layer) => layer.ignores ?? []),\n ),\n overrides: pipe(\n layers,\n Arr.flatMap((layer) => layer.overrides ?? []),\n ),\n});\n","import { layersOf, mergedLayers, mergedRules } from \"@masseater.dev/lint-host\";\nimport { Array as Arr, pipe } from \"effect\";\n\nimport type { I68Config } from \"#/shared/config/index.ts\";\n\nexport const flattenConfig = (config: I68Config): I68Config => {\n const layers = layersOf(config);\n const { plugins, ignores } = mergedLayers(layers);\n const rules = mergedRules(\n pipe(\n layers,\n Arr.map((layer) => layer.rules),\n ),\n );\n return { plugins, rules, ignores };\n};\n","import { settingOf } from \"@masseater.dev/lint-host\";\nimport type { Setting } from \"@masseater.dev/lint-host\";\nimport { Array as Arr, Option, Record as Rec, String as Str, pipe } from \"effect\";\n\nimport type { I68Config, Plugin, Rule } from \"#/shared/config/index.ts\";\n\nconst SEPARATOR = \"/\";\nconst START = 0;\nconst ENABLED: Setting = settingOf(\"error\");\n\nexport interface ResolvedRule {\n readonly id: string;\n readonly rule: Rule;\n readonly setting: Setting;\n}\n\ntype PluginEntry = readonly [string, Plugin];\n\nconst idOf = (plugin: string, name: string): string => `${plugin}${SEPARATOR}${name}`;\n\nconst pluginOf = (id: string): string =>\n pipe(\n Str.indexOf(SEPARATOR)(id),\n Option.match({\n onNone: () => id,\n onSome: (slash) => Str.slice(START, slash)(id),\n }),\n );\n\nconst rulesOf =\n (config: I68Config) =>\n ([plugin, value]: PluginEntry): readonly ResolvedRule[] =>\n pipe(\n Rec.toEntries(value.rules),\n Arr.map(([name, rule]): ResolvedRule => {\n const id = idOf(plugin, name);\n return {\n id,\n rule,\n setting: pipe(\n config.rules ?? {},\n Rec.get(id),\n Option.map(settingOf),\n Option.getOrElse(() => ENABLED),\n ),\n };\n }),\n Arr.filter(({ setting }) => setting.severity !== \"off\"),\n );\n\nexport const resolve = (config: I68Config): readonly ResolvedRule[] =>\n pipe(Rec.toEntries(config.plugins ?? {}), Arr.flatMap(rulesOf(config)));\n\nexport const unknownPlugins = (config: I68Config): readonly string[] =>\n pipe(\n Rec.keys(config.rules ?? {}),\n Arr.map(pluginOf),\n Arr.filter((plugin) => !Rec.has(config.plugins ?? {}, plugin)),\n Arr.dedupe,\n );\n\nconst ruleNameOf = (id: string): string =>\n pipe(\n Str.indexOf(SEPARATOR)(id),\n Option.match({\n onNone: () => \"\",\n onSome: (slash) => Str.slice(slash + SEPARATOR.length)(id),\n }),\n );\n\nconst isKnownRule =\n (config: I68Config) =>\n (id: string): boolean =>\n pipe(\n Rec.get(config.plugins ?? {}, pluginOf(id)),\n Option.match({\n onNone: () => true,\n onSome: (plugin) => Rec.has(plugin.rules, ruleNameOf(id)),\n }),\n );\n\nexport const unknownRules = (config: I68Config): readonly string[] =>\n pipe(\n Rec.keys(config.rules ?? {}),\n Arr.filter((id) => !isKnownRule(config)(id)),\n );\n","import { Array as Arr, Option, pipe } from \"effect\";\n\nimport type { Diagnostic } from \"#/shared/config/index.ts\";\n\nexport const format = (diagnostic: Diagnostic): string => {\n const column = pipe(\n Option.fromNullishOr(diagnostic.column),\n Option.match({ onNone: () => \"\", onSome: (value) => `:${String(value)}` }),\n );\n const detail = pipe(\n [diagnostic.detail],\n Arr.flatMap((part) => Option.toArray(Option.fromNullishOr(part))),\n Arr.map((part) => ` [${part}]`),\n Arr.join(\"\"),\n );\n return `${diagnostic.path}:${String(diagnostic.line)}${column} ${diagnostic.severity} ${diagnostic.rule} ${diagnostic.message}${detail}`;\n};\n","import { readSong } from \"@r_masseater/fumx-parser\";\nimport type { SongSource } from \"@r_masseater/fumx-parser\";\nimport { Effect } from \"effect\";\n\nimport type { I68Error } from \"#/shared/lib/errors.ts\";\n\nconst SEPARATOR = \"/\";\n\nexport interface SongFile {\n readonly file: string;\n readonly source: SongSource;\n}\n\nexport type Read = (path: string) => Effect.Effect<string, I68Error>;\n\nexport interface ReadInput {\n readonly root: string;\n readonly file: string;\n readonly read: Read;\n}\n\nexport const readSongFile = Effect.fn(\"i68.read\")(function* readSongFile(input: ReadInput) {\n const path = `${input.root}${SEPARATOR}${input.file}`;\n const source = yield* readSong({ path, read: input.read });\n return { file: input.file, source } satisfies SongFile;\n});\n","import { Schema } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class I68Error extends taggedError<I68Error, { readonly brand: unique symbol }>()(\n \"I68Error\",\n { message: Schema.String },\n) {}\n\nexport const failedWith =\n (message: string) =>\n (cause: unknown): I68Error =>\n I68Error.make({ message: `${message}: ${String(cause)}` });\n","import type { SourceComment } from \"@r_masseater/fumx-parser\";\nimport { Array as Arr, Match, Option, String as Str, pipe } from \"effect\";\n\nconst DIRECTIVE =\n /^i68-(?<kind>ignore-next-line|ignore-file|ignore|disable|enable)(?:\\s(?<rest>[\\s\\S]*))?$/u;\nconst REASON = /\\s-{2,}(?:\\s|$)/u;\nconst LINE_MARK = \"//\";\nconst BLOCK_START = \"/*\";\nconst BLOCK_END = \"*/\";\nconst LIST = \",\";\nconst NEXT = 1;\nconst LINE_START = 0;\n\ntype Kind = \"ignore\" | \"ignore-next-line\" | \"ignore-file\" | \"disable\" | \"enable\";\n\ninterface Directive {\n readonly line: number;\n readonly column: number;\n readonly kind: Kind;\n readonly rules: readonly string[];\n}\n\nexport interface Suppressed {\n readonly line: number;\n readonly column?: number;\n readonly rule: string;\n}\n\nconst kindOf = (text: string): Kind =>\n Match.value(text).pipe(\n Match.when(\"ignore-file\", (): Kind => \"ignore-file\"),\n Match.when(\"ignore-next-line\", (): Kind => \"ignore-next-line\"),\n Match.when(\"disable\", (): Kind => \"disable\"),\n Match.when(\"enable\", (): Kind => \"enable\"),\n Match.orElse((): Kind => \"ignore\"),\n );\n\nconst bodyOf = (text: string): string => {\n if (Str.startsWith(BLOCK_START)(text)) {\n return pipe(text, Str.slice(BLOCK_START.length), Str.replace(BLOCK_END, \"\"), Str.trim);\n }\n return pipe(text, Str.slice(LINE_MARK.length), Str.trim);\n};\n\nconst rulesOf = (rest: string): readonly string[] =>\n pipe(\n Str.split(` ${rest}`, REASON),\n Arr.head,\n Option.getOrElse(() => \"\"),\n Str.split(LIST),\n Arr.map(Str.trim),\n Arr.filter(Str.isNonEmpty),\n );\n\nconst groupsOf = (text: string): Option.Option<Partial<Record<string, string>>> =>\n pipe(\n Option.fromNullishOr(DIRECTIVE.exec(text)),\n Option.flatMap((found) => Option.fromNullishOr(found.groups)),\n );\n\nconst directiveOf = (comment: SourceComment): Option.Option<Directive> =>\n pipe(\n groupsOf(bodyOf(comment.text)),\n Option.map((groups) => ({\n line: comment.line,\n column: comment.column,\n kind: kindOf(groups[\"kind\"] ?? \"\"),\n rules: rulesOf(groups[\"rest\"] ?? \"\"),\n })),\n );\n\nconst names =\n (rule: string) =>\n (directive: Directive): boolean =>\n !Arr.isReadonlyArrayNonEmpty(directive.rules) || Arr.contains(directive.rules, rule);\n\nconst isRange = (directive: Directive): boolean =>\n directive.kind === \"disable\" || directive.kind === \"enable\";\n\nconst coversLine =\n (found: Suppressed) =>\n (directive: Directive): boolean =>\n names(found.rule)(directive) &&\n Match.value(directive.kind).pipe(\n Match.when(\"ignore-file\", () => true),\n Match.when(\"ignore-next-line\", () => directive.line + NEXT === found.line),\n Match.when(\"ignore\", () => directive.line === found.line),\n Match.orElse(() => false),\n );\n\nconst isAfter =\n (found: Suppressed) =>\n (directive: Directive): boolean =>\n directive.line < found.line ||\n (directive.line === found.line && directive.column <= (found.column ?? LINE_START));\n\nconst insideRange =\n (directives: readonly Directive[]) =>\n (found: Suppressed): boolean =>\n pipe(\n directives,\n Arr.filter(\n (directive) =>\n isRange(directive) && isAfter(found)(directive) && names(found.rule)(directive),\n ),\n Arr.last,\n Option.exists((directive) => directive.kind === \"disable\"),\n );\n\nexport const suppressionsOf = (\n comments: readonly SourceComment[],\n): ((found: Suppressed) => boolean) => {\n const directives = pipe(comments, Arr.map(directiveOf), Arr.getSomes);\n return (found) => pipe(directives, Arr.some(coversLine(found))) || insideRange(directives)(found);\n};\n","import { present, reportedSeverity } from \"@masseater.dev/lint-host\";\nimport type { Song, SourceComment } from \"@r_masseater/fumx-parser\";\nimport { soundingsOf } from \"@r_masseater/fumx-parser/analysis\";\nimport type { Sounding } from \"@r_masseater/fumx-parser/analysis\";\nimport { Array as Arr, Effect, Option, pipe } from \"effect\";\n\nimport type { ResolvedRule } from \"#/entities/rule/index.ts\";\nimport type { Diagnostic, Report } from \"#/shared/config/index.ts\";\nimport { failedWith } from \"#/shared/lib/errors.ts\";\nimport type { I68Error } from \"#/shared/lib/errors.ts\";\n\nimport { suppressionsOf } from \"./suppressions.ts\";\n\nexport interface RunInput {\n readonly path: string;\n readonly comments: readonly SourceComment[];\n readonly song: Song;\n readonly rules: readonly ResolvedRule[];\n}\n\nconst diagnosticOf =\n (path: string, rule: ResolvedRule) =>\n (report: Report): Diagnostic => ({\n path,\n line: report.line,\n rule: rule.id,\n message: report.message,\n severity: reportedSeverity(rule.setting),\n ...present(Option.fromNullishOr(report.column), (column) => ({ column })),\n ...present(Option.fromNullishOr(report.detail), (detail) => ({ detail })),\n });\n\nconst runOne = (\n input: RunInput,\n soundings: readonly Sounding[],\n): ((rule: ResolvedRule) => Effect.Effect<readonly Diagnostic[], I68Error>) =>\n Effect.fn(\"i68.rule\")(function* run(rule: ResolvedRule) {\n yield* Effect.annotateCurrentSpan({ \"i68.rule\": rule.id });\n const reports: Report[] = [];\n yield* Effect.try({\n try: () => {\n rule.rule.check({\n filename: input.path,\n song: input.song,\n soundings,\n options: rule.setting.options,\n report: (report) => {\n reports.push(report);\n },\n });\n },\n catch: failedWith(`${rule.id} failed`),\n });\n return pipe(reports, Arr.map(diagnosticOf(input.path, rule)));\n });\n\nexport const runRules = Effect.fn(\"i68.rules\")(function* runRules(input: RunInput) {\n const soundings = soundingsOf(input.song);\n const suppressed = suppressionsOf(input.comments);\n const found = yield* pipe(\n input.rules,\n Effect.forEach(runOne(input, soundings), { concurrency: 1 }),\n );\n return pipe(\n Arr.flatten(found),\n Arr.filter((diagnostic) => !suppressed(diagnostic)),\n );\n});\n","import { sortByPosition } from \"@masseater.dev/lint-host\";\nimport { readSong } from \"@r_masseater/fumx-parser\";\nimport type { SourceIssue } from \"@r_masseater/fumx-parser\";\nimport { Array as Arr, Effect, pipe } from \"effect\";\n\nimport { flattenConfig, resolve, unknownPlugins, unknownRules } from \"#/entities/rule/index.ts\";\nimport type { ResolvedRule } from \"#/entities/rule/index.ts\";\nimport { readSongFile } from \"#/features/read-songs/index.ts\";\nimport type { Read, SongFile } from \"#/features/read-songs/index.ts\";\nimport { runRules } from \"#/features/run-rules/index.ts\";\nimport type { Diagnostic, I68Config } from \"#/shared/config/index.ts\";\nimport { I68Error } from \"#/shared/lib/errors.ts\";\n\nconst PARSE_RULE = \"i68/parse\";\n\nexport interface LintInput {\n readonly root: string;\n readonly files: readonly string[];\n readonly read: Read;\n readonly config?: I68Config;\n}\n\nexport interface TextInput {\n readonly path: string;\n readonly text: string;\n readonly read?: Read;\n readonly config?: I68Config;\n}\n\nconst failIfAny =\n (problem: string) =>\n (names: readonly string[]): Effect.Effect<void, I68Error> =>\n Arr.match(names, {\n onEmpty: () => Effect.void,\n onNonEmpty: (found) =>\n Effect.fail(I68Error.make({ message: `${problem}: ${Arr.join(found, \", \")}` })),\n });\n\nconst UNKNOWN_PLUGINS = failIfAny(\"rules name plugins that are not configured\");\nconst UNKNOWN_RULES = failIfAny(\"rules name rules that their plugins do not have\");\n\nconst checkPlugins = (config: I68Config): Effect.Effect<void, I68Error> => {\n const rules = UNKNOWN_RULES(unknownRules(config));\n return UNKNOWN_PLUGINS(unknownPlugins(config)).pipe(Effect.andThen(rules));\n};\n\nconst rulesOf = (\n config: I68Config | undefined,\n): Effect.Effect<readonly ResolvedRule[], I68Error> => {\n const flat = flattenConfig(config ?? {});\n return checkPlugins(flat).pipe(Effect.as(resolve(flat)));\n};\n\nconst parseDiagnosticsOf =\n (file: string) =>\n (issues: readonly SourceIssue[]): readonly Diagnostic[] =>\n pipe(\n issues,\n Arr.map((issue): Diagnostic => ({\n path: file,\n line: issue.line,\n column: issue.column,\n rule: PARSE_RULE,\n message: issue.message,\n severity: \"error\",\n })),\n );\n\nconst lintFile =\n (rules: readonly ResolvedRule[]) =>\n (song: SongFile): Effect.Effect<readonly Diagnostic[], I68Error> => {\n if (song.source.status === \"invalid\") {\n return Effect.succeed(parseDiagnosticsOf(song.file)(song.source.issues));\n }\n return runRules({\n path: song.file,\n comments: song.source.outline.comments,\n song: song.source.song,\n rules,\n });\n };\n\nexport const lint = Effect.fn(\"i68.lint\")(function* lint(input: LintInput) {\n const rules = yield* rulesOf(input.config);\n const found = yield* Effect.all(\n pipe(\n input.files,\n Arr.map((file) =>\n readSongFile({ root: input.root, file, read: input.read }).pipe(\n Effect.flatMap(lintFile(rules)),\n ),\n ),\n ),\n { concurrency: \"unbounded\" },\n );\n return sortByPosition<Diagnostic>(Arr.flatten(found));\n});\n\nconst notFound = (path: string): Effect.Effect<string, I68Error> =>\n Effect.fail(I68Error.make({ message: `could not read ${path}` }));\n\nconst readerOf =\n (input: TextInput): Read =>\n (path) => {\n if (path === input.path) {\n return Effect.succeed(input.text);\n }\n return (input.read ?? notFound)(path);\n };\n\nexport const lintText = Effect.fn(\"i68.lintText\")(function* lintText(input: TextInput) {\n const rules = yield* rulesOf(input.config);\n const source = yield* readSong({ path: input.path, read: readerOf(input) });\n const found = yield* lintFile(rules)({ file: input.path, source });\n return sortByPosition<Diagnostic>(found);\n});\n","import { Array as Arr, Option, Predicate, pipe } from \"effect\";\n\nimport { flattenConfig } from \"#/entities/rule/index.ts\";\nimport type { I68Config } from \"#/shared/config/index.ts\";\n\nconst SONGS = \"*.fumx\";\n\nconst hasSection = (value: unknown): value is { readonly i68: I68Config } =>\n Predicate.hasProperty(value, \"i68\") && Predicate.isObject(value.i68);\n\nexport const i68Section = (config: unknown): I68Config =>\n pipe(\n Option.liftPredicate(config, hasSection),\n Option.map((value) => flattenConfig(value.i68)),\n Option.getOrElse((): I68Config => ({})),\n );\n\nexport interface PathspecInput {\n readonly config: I68Config;\n readonly patterns?: readonly string[];\n}\n\nexport const songPathspecs = ({ config, patterns = [SONGS] }: PathspecInput): readonly string[] => [\n ...patterns,\n ...pipe(\n config.ignores ?? [],\n Arr.map((glob) => `:(glob,exclude)${glob}`),\n ),\n];\n"],"mappings":";;;;;;;;;;AAaA,MAAM,aAA0B,CAAC;AAEjC,MAAa,aAAa,UACxB,MAAM,MAAM,KAAK,CAAC,CAAC,KACjB,MAAM,KAAK,MAAM,SAAS,cAAuB;CAAE;CAAU,SAAS;AA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