@r_masseater/fu4 0.3.1 → 0.3.3
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/{source-BRZXj75b.mjs → app-BkrdDFcT.mjs} +195 -387
- package/dist/app-BkrdDFcT.mjs.map +1 -0
- package/dist/cli-BFiz4gDF.mjs +114 -0
- package/dist/cli-BFiz4gDF.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/presets.mjs +1 -1
- package/dist/source-CLFOyvUG.mjs +258 -0
- package/dist/source-CLFOyvUG.mjs.map +1 -0
- package/package.json +11 -4
- package/dist/app-DR_5JsmN.mjs +0 -204
- package/dist/app-DR_5JsmN.mjs.map +0 -1
- package/dist/cli-Cv5v6zny.mjs +0 -21
- package/dist/cli-Cv5v6zny.mjs.map +0 -1
- package/dist/source-BRZXj75b.mjs.map +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { n as workflowPathspecs, o as failedWith, r as lint, s as format, t as fu4Section } from "./app-BkrdDFcT.mjs";
|
|
2
|
+
import { Array, Console, Effect, FileSystem, Function, Option, Path, Schema, String, pipe } from "effect";
|
|
3
|
+
import { runMain } from "@r_masseater/node-main";
|
|
4
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
5
|
+
import { Argument, Command } from "effect/cli";
|
|
6
|
+
import { resolveConfigFromFile } from "vite-plus";
|
|
7
|
+
// ../lint-host/src/shared/lib/fail.ts
|
|
8
|
+
const taggedError = Schema.TaggedError;
|
|
9
|
+
var NotUtf8Error = class extends taggedError()("NotUtf8Error", { path: Schema.String }) {};
|
|
10
|
+
// ../lint-host/src/features/run-cli/model/cli.ts
|
|
11
|
+
const CONFIG_FILES = [
|
|
12
|
+
"vite.config.ts",
|
|
13
|
+
"vite.config.mts",
|
|
14
|
+
"vite.config.js",
|
|
15
|
+
"vite.config.mjs"
|
|
16
|
+
];
|
|
17
|
+
const FAILED = 1;
|
|
18
|
+
const DATA_FIRST_ARITY = 2;
|
|
19
|
+
const STRICT_UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
20
|
+
const readSectionIn = (source, root) => Effect.gen(function* readConfig() {
|
|
21
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
22
|
+
const path = yield* Path.Path;
|
|
23
|
+
const found = yield* pipe(CONFIG_FILES, Array.map((name) => path.join(root, name)), Effect.filter((file) => fileSystem.exists(file).pipe(Effect.orElseSucceed(() => false))));
|
|
24
|
+
const loaded = yield* Option.match(Array.head(found), {
|
|
25
|
+
onNone: () => Effect.succeed({}),
|
|
26
|
+
onSome: (file) => Effect.tryPromise({
|
|
27
|
+
try: () => resolveConfigFromFile(file),
|
|
28
|
+
catch: source.failWith(`could not load ${file}`)
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
return source.section(loaded);
|
|
32
|
+
}).pipe(Effect.withSpan(`${source.name}.config`));
|
|
33
|
+
Function.dual(DATA_FIRST_ARITY, readSectionIn);
|
|
34
|
+
const trackedFiles = (root, pathspecs) => Effect.gen(function* listFiles() {
|
|
35
|
+
const output = yield* (yield* ChildProcessSpawner.ChildProcessSpawner).string(ChildProcess.make("git", [
|
|
36
|
+
"ls-files",
|
|
37
|
+
"-co",
|
|
38
|
+
"--exclude-standard",
|
|
39
|
+
"-z",
|
|
40
|
+
"--",
|
|
41
|
+
...pathspecs
|
|
42
|
+
], { cwd: root }));
|
|
43
|
+
return pipe(String.split(output, "\0"), Array.filter(String.isNonEmpty));
|
|
44
|
+
});
|
|
45
|
+
const requestOf = (config, patterns) => Array.match(patterns, {
|
|
46
|
+
onEmpty: () => ({ config }),
|
|
47
|
+
onNonEmpty: (given) => ({
|
|
48
|
+
config,
|
|
49
|
+
patterns: given
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
const hasError = (found) => pipe(found, Array.some(({ severity }) => severity === "error"));
|
|
53
|
+
const failWhen = (failed) => Effect.when(Effect.sync(() => {
|
|
54
|
+
process.exitCode = FAILED;
|
|
55
|
+
}), Effect.succeed(failed)).pipe(Effect.asVoid);
|
|
56
|
+
const printAll = (found, format) => Array.match(found, {
|
|
57
|
+
onEmpty: () => Effect.void,
|
|
58
|
+
onNonEmpty: (all) => Console.log(pipe(all, Array.map(format), Array.join("\n")))
|
|
59
|
+
});
|
|
60
|
+
const readerIn = (root, failWith) => Effect.gen(function* reader() {
|
|
61
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
62
|
+
const path = yield* Path.Path;
|
|
63
|
+
return (file) => fileSystem.readFile(path.resolve(root, file)).pipe(Effect.mapError(failWith(`could not read ${file}`)), Effect.flatMap((bytes) => Effect.try({
|
|
64
|
+
try: () => STRICT_UTF8.decode(bytes),
|
|
65
|
+
catch: () => NotUtf8Error.make({ path: file })
|
|
66
|
+
})));
|
|
67
|
+
});
|
|
68
|
+
const mainOf = (cli, patterns) => Effect.gen(function* main() {
|
|
69
|
+
const root = process.cwd();
|
|
70
|
+
const config = yield* readSectionIn(cli, root);
|
|
71
|
+
const pathspecs = cli.pathspecs(requestOf(config, patterns));
|
|
72
|
+
const { files, projectFiles } = yield* Effect.all({
|
|
73
|
+
files: trackedFiles(root, pathspecs).pipe(Effect.withSpan(`${cli.name}.files`)),
|
|
74
|
+
projectFiles: trackedFiles(root, []).pipe(Effect.withSpan(`${cli.name}.project`))
|
|
75
|
+
}, { concurrency: "unbounded" });
|
|
76
|
+
const read = yield* readerIn(root, cli.failWith);
|
|
77
|
+
const found = yield* cli.lint({
|
|
78
|
+
root,
|
|
79
|
+
files,
|
|
80
|
+
projectFiles,
|
|
81
|
+
config,
|
|
82
|
+
read
|
|
83
|
+
});
|
|
84
|
+
yield* printAll(found, cli.format);
|
|
85
|
+
yield* failWhen(hasError(found));
|
|
86
|
+
});
|
|
87
|
+
const variadicOf = ({ name, description }) => Argument.String(name).pipe(Argument.withDescription(description), Argument.variadic());
|
|
88
|
+
const pathspecArgument = () => variadicOf({
|
|
89
|
+
name: "pathspec",
|
|
90
|
+
description: "Git pathspecs of the files to lint, in place of the configured ones"
|
|
91
|
+
});
|
|
92
|
+
const runCli$1 = (cli) => {
|
|
93
|
+
const command = Command.make(cli.name, { pathspecs: pathspecArgument() }, ({ pathspecs }) => mainOf(cli, pathspecs)).pipe(Command.withDescription(cli.description));
|
|
94
|
+
runMain(cli.name)(Command.run(command, { version: cli.version }));
|
|
95
|
+
};
|
|
96
|
+
// package.json
|
|
97
|
+
var version = "0.3.3";
|
|
98
|
+
var description = "The engine of a GitHub Actions linter: Rust parses workflows and TypeScript rules from its presets subpath check them, configured from vite.config.ts.";
|
|
99
|
+
// src/app/cli.ts
|
|
100
|
+
const runCli = () => {
|
|
101
|
+
runCli$1({
|
|
102
|
+
name: "fu4",
|
|
103
|
+
version,
|
|
104
|
+
description,
|
|
105
|
+
section: fu4Section,
|
|
106
|
+
pathspecs: workflowPathspecs,
|
|
107
|
+
lint,
|
|
108
|
+
format,
|
|
109
|
+
failWith: failedWith
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
export { runCli };
|
|
113
|
+
|
|
114
|
+
//# sourceMappingURL=cli-BFiz4gDF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-BFiz4gDF.mjs","names":["Arr","Fn","Str","runCli","manifest.version","manifest.description"],"sources":["../../lint-host/src/shared/lib/fail.ts","../../lint-host/src/features/run-cli/model/cli.ts","../package.json","../src/app/cli.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class NotUtf8Error extends taggedError<NotUtf8Error, { readonly brand: unique symbol }>()(\n \"NotUtf8Error\",\n { path: Schema.String },\n) {}\n\nexport type FailWith<Failure> = (message: string) => (cause: unknown) => Failure;\n","import { runMain } from \"@r_masseater/node-main\";\nimport {\n Array as Arr,\n Console,\n Effect,\n FileSystem,\n Function as Fn,\n Option,\n Path,\n Record as Rec,\n String as Str,\n pipe,\n} from \"effect\";\nimport { Argument, Command, Flag } from \"effect/cli\";\nimport type { PlatformError } from \"effect/PlatformError\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\nimport { resolveConfigFromFile } from \"vite-plus\";\n\nimport { NotUtf8Error } from \"#/shared/lib/fail.ts\";\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 STRICT_UTF8 = new TextDecoder(\"utf-8\", { fatal: true });\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 | NotUtf8Error>;\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 version: string;\n readonly description: 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 ToolParameter {\n readonly name: string;\n readonly description: string;\n}\n\nexport interface ToolInput {\n readonly flags: ReadonlySet<string>;\n readonly args: readonly string[];\n}\n\nexport interface ToolCall<Config> {\n readonly root: string;\n readonly config: Config;\n readonly input: ToolInput;\n}\n\nexport interface Tool<Config, Found, Failure> extends SectionSource<Config, Failure> {\n readonly flags: readonly ToolParameter[];\n readonly argument: ToolParameter;\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 | NotUtf8Error>,\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 | NotUtf8Error> =>\n fileSystem.readFile(path.resolve(root, file)).pipe(\n Effect.mapError(failWith(`could not read ${file}`)),\n Effect.flatMap((bytes) =>\n Effect.try({\n try: () => STRICT_UTF8.decode(bytes),\n catch: () => NotUtf8Error.make({ path: file }),\n }),\n ),\n );\n });\n\nconst mainOf = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n patterns: readonly string[],\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 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 =\n <Config, Found, Failure>(tool: Tool<Config, Found, Failure>) =>\n (input: ToolInput): 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, input });\n yield* printAll(found, tool.format);\n yield* failWhen(Arr.isReadonlyArrayNonEmpty(found));\n });\n\nconst variadicOf = ({ name, description }: ToolParameter): Argument.Argument<readonly string[]> =>\n Argument.String(name).pipe(Argument.withDescription(description), Argument.variadic());\n\nconst flagsOf = (flags: readonly ToolParameter[]): Readonly<Record<string, Flag.Flag<boolean>>> =>\n Rec.fromEntries(\n pipe(\n flags,\n Arr.map(({ name, description }) => [\n name,\n Flag.Boolean(name).pipe(Flag.withDescription(description), Flag.withDefault(false)),\n ]),\n ),\n );\n\nconst setFlags = (values: Readonly<Record<string, boolean>>): ReadonlySet<string> =>\n new Set(pipe(values, Rec.filter(Fn.identity), Rec.keys));\n\nexport const runTool = <Config, Found, Failure>(tool: Tool<Config, Found, Failure>): void => {\n const command = Command.make(\n tool.name,\n { args: variadicOf(tool.argument), flags: flagsOf(tool.flags) },\n ({ args, flags }) => toolMainOf(tool)({ args, flags: setFlags(flags) }),\n ).pipe(Command.withDescription(tool.description));\n runMain(tool.name)(Command.run(command, { version: tool.version }));\n};\n\nconst pathspecArgument = (): Argument.Argument<readonly string[]> =>\n variadicOf({\n name: \"pathspec\",\n description: \"Git pathspecs of the files to lint, in place of the configured ones\",\n });\n\nexport const runCli = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n): void => {\n const command = Command.make(cli.name, { pathspecs: pathspecArgument() }, ({ pathspecs }) =>\n mainOf(cli, pathspecs),\n ).pipe(Command.withDescription(cli.description));\n runMain(cli.name)(Command.run(command, { version: cli.version }));\n};\n","","import { runCli as runLinter } from \"@masseater.dev/lint-host\";\nimport manifest from \"@r_masseater/fu4/package.json\" with { type: \"json\" };\n\nimport { failedWith } from \"#/shared/lib/errors.ts\";\n\nimport { format, lint } from \"./index.ts\";\nimport { fu4Section, workflowPathspecs } from \"./section.ts\";\n\nexport const runCli = (): void => {\n runLinter({\n name: \"fu4\",\n version: manifest.version,\n description: manifest.description,\n section: fu4Section,\n pathspecs: workflowPathspecs,\n lint,\n format,\n failWith: failedWith,\n });\n};\n"],"mappings":";;;;;;;AAEA,MAAM,cAAc,OAAO;AAE3B,IAAa,eAAb,cAAkC,YAA6D,CAAC,CAC9F,gBACA,EAAE,MAAM,OAAO,OAAO,CACxB,CAAC,CAAC,CAAC;;ACcH,MAAM,eAAe;CAAC;CAAkB;CAAmB;CAAkB;AAAiB;AAC9F,MAAM,SAAS;AACf,MAAM,mBAAmB;AACzB,MAAM,cAAc,IAAI,YAAY,SAAS,EAAE,OAAO,KAAK,CAAC;AA6D5D,MAAM,iBACJ,QACA,SAEA,OAAO,IAAI,UAAU,aAAa;CAChC,MAAM,aAAa,OAAO,WAAW;CACrC,MAAM,OAAO,OAAO,KAAK;CACzB,MAAM,QAAQ,OAAO,KACnB,cACAA,MAAI,KAAK,SAAS,KAAK,KAAK,MAAM,IAAI,CAAC,GACvC,OAAO,QAAQ,SAAS,WAAW,OAAO,IAAI,CAAC,CAAC,KAAK,OAAO,oBAAoB,KAAK,CAAC,CAAC,CACzF;CACA,MAAM,SAAS,OAAO,OAAO,MAAMA,MAAI,KAAK,KAAK,GAAG;EAClD,cAAc,OAAO,QAAiB,CAAC,CAAC;EACxC,SAAS,SACP,OAAO,WAAW;GAChB,WAAW,sBAAsB,IAAI;GACrC,OAAO,OAAO,SAAS,kBAAkB,MAAM;EACjD,CAAC;CACL,CAAC;CACD,OAAO,OAAO,QAAQ,MAAM;AAC9B,CAAC,CAAC,CAAC,KAAK,OAAO,SAAS,GAAG,OAAO,KAAK,QAAQ,CAAC;AAa9CC,SAAG,KAAK,kBAAkB,aAAa;AAE3C,MAAM,gBACJ,MACA,cAEA,OAAO,IAAI,UAAU,YAAY;CAE/B,MAAM,SAAS,QAAO,OADC,oBAAoB,oBAAA,CACb,OAC5B,aAAa,KACX,OACA;EAAC;EAAY;EAAO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4Section } from "./app-
|
|
2
|
-
import {
|
|
1
|
+
import { a as Fu4Error, i as lintText, n as workflowPathspecs, r as lint, s as format, t as fu4Section } from "./app-BkrdDFcT.mjs";
|
|
2
|
+
import { c as defineRule, i as INPUT_KINDS, s as definePlugin } from "./source-CLFOyvUG.mjs";
|
|
3
3
|
export { Fu4Error, INPUT_KINDS, definePlugin, defineRule, format, fu4Section, lint, lintText, workflowPathspecs };
|
package/dist/presets.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { a as afterPrefix, c as defineRule, i as INPUT_KINDS, o as baseName, s as definePlugin, t as lineStartsOf } from "./source-CLFOyvUG.mjs";
|
|
2
2
|
import { Array as Array$1, Boolean as Boolean$1, Cache, Config, DateTime, Deferred, Effect, Equal, FileSystem, Function, Layer, ManagedRuntime, Match, Option, Order, Path, Predicate, Record, Redacted, Result, Schema, String as String$1, identity, pipe } from "effect";
|
|
3
3
|
import { layer } from "@effect/platform-node/NodeServices";
|
|
4
4
|
import { FetchHttpClient, HttpClient, HttpClientRequest } from "effect/http";
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { Array as Array$1, Option, Record, String, pipe } from "effect";
|
|
2
|
+
const EMPTY$1 = 0;
|
|
3
|
+
const LENGTH = 1;
|
|
4
|
+
const aligned = (buffer) => Option.match(Option.liftPredicate(buffer, ({ byteOffset }) => byteOffset % 4 === EMPTY$1), {
|
|
5
|
+
onNone: () => Uint8Array.from(buffer),
|
|
6
|
+
onSome: (value) => value
|
|
7
|
+
});
|
|
8
|
+
const wordAt = (words) => (index) => words[index] ?? EMPTY$1;
|
|
9
|
+
const fieldsOf = (header) => (fields) => pipe(fields, Record.map((index) => wordAt(header)(index)));
|
|
10
|
+
const wordsOf = (buffer) => (at, count) => new Uint32Array(buffer.buffer, buffer.byteOffset + at * 4, count);
|
|
11
|
+
const spanText = (words) => (blob, encoding) => (spansAt, unit) => {
|
|
12
|
+
const decoder = new TextDecoder(encoding);
|
|
13
|
+
const cache = /* @__PURE__ */ new Map();
|
|
14
|
+
const read = (index) => {
|
|
15
|
+
const at = spansAt + index * 2;
|
|
16
|
+
const offset = wordAt(words)(at) * unit;
|
|
17
|
+
const value = decoder.decode(blob.subarray(offset, offset + wordAt(words)(at + LENGTH) * unit));
|
|
18
|
+
cache.set(index, value);
|
|
19
|
+
return value;
|
|
20
|
+
};
|
|
21
|
+
return (index) => Option.getOrElse(Option.fromNullishOr(cache.get(index)), () => read(index));
|
|
22
|
+
};
|
|
23
|
+
// src/entities/rule/model/define.ts
|
|
24
|
+
const defineRule = (rule) => rule;
|
|
25
|
+
const definePlugin = (plugin) => plugin;
|
|
26
|
+
String.replaceAll("\\", "/");
|
|
27
|
+
const segments = (path) => String.split(path, "/");
|
|
28
|
+
const baseName = (path) => pipe(segments(path), Array$1.filter(String.isNonEmpty), Array$1.last, Option.getOrElse(() => ""));
|
|
29
|
+
const afterPrefix = (prefix) => (text) => pipe(Option.liftPredicate(text, String.startsWith(prefix)), Option.map(String.slice(prefix.length)));
|
|
30
|
+
// src/shared/config/types.ts
|
|
31
|
+
const INPUT_KINDS = [
|
|
32
|
+
"workflow",
|
|
33
|
+
"action",
|
|
34
|
+
"dependabot",
|
|
35
|
+
"pre-commit"
|
|
36
|
+
];
|
|
37
|
+
// src/shared/native/source.ts
|
|
38
|
+
const EMPTY = 0;
|
|
39
|
+
const START = 0;
|
|
40
|
+
const NONE = 4294967295;
|
|
41
|
+
const HEADER = {
|
|
42
|
+
version: 0,
|
|
43
|
+
semanticCount: 1,
|
|
44
|
+
semanticRoot: 2,
|
|
45
|
+
concreteCount: 3,
|
|
46
|
+
concreteRoot: 4,
|
|
47
|
+
childCount: 5,
|
|
48
|
+
errorCount: 6,
|
|
49
|
+
stringCount: 7
|
|
50
|
+
};
|
|
51
|
+
const SEMANTIC = {
|
|
52
|
+
kind: 0,
|
|
53
|
+
tag: 1,
|
|
54
|
+
value: 2,
|
|
55
|
+
style: 3,
|
|
56
|
+
line: 4,
|
|
57
|
+
column: 5,
|
|
58
|
+
childStart: 6,
|
|
59
|
+
childCount: 7
|
|
60
|
+
};
|
|
61
|
+
const CONCRETE = {
|
|
62
|
+
kind: 0,
|
|
63
|
+
flags: 1,
|
|
64
|
+
start: 2,
|
|
65
|
+
end: 3,
|
|
66
|
+
field: 4,
|
|
67
|
+
parent: 5,
|
|
68
|
+
childStart: 6,
|
|
69
|
+
childCount: 7
|
|
70
|
+
};
|
|
71
|
+
const FLAG = {
|
|
72
|
+
named: 1,
|
|
73
|
+
error: 2,
|
|
74
|
+
missing: 4,
|
|
75
|
+
extra: 8
|
|
76
|
+
};
|
|
77
|
+
const UTF16 = "utf-16le";
|
|
78
|
+
const rootOf = (value) => Option.liftPredicate(value, (id) => id !== NONE);
|
|
79
|
+
const layoutOf = (header) => {
|
|
80
|
+
const fields = fieldsOf(header)(HEADER);
|
|
81
|
+
const { semanticCount, concreteCount, errorCount } = fields;
|
|
82
|
+
const semanticAt = 8;
|
|
83
|
+
const concreteAt = semanticAt + semanticCount * 8;
|
|
84
|
+
const childAt = concreteAt + concreteCount * 8;
|
|
85
|
+
const errorAt = childAt + fields.childCount;
|
|
86
|
+
const spanAt = errorAt + errorCount * 3;
|
|
87
|
+
return {
|
|
88
|
+
semanticCount,
|
|
89
|
+
concreteCount,
|
|
90
|
+
errorCount,
|
|
91
|
+
semanticAt,
|
|
92
|
+
concreteAt,
|
|
93
|
+
childAt,
|
|
94
|
+
errorAt,
|
|
95
|
+
spanAt,
|
|
96
|
+
blobAt: (spanAt + fields.stringCount * 2) * 4
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const sourceView = (raw) => {
|
|
100
|
+
const buffer = aligned(raw);
|
|
101
|
+
const header = wordsOf(buffer)(START, 8);
|
|
102
|
+
const layout = layoutOf(header);
|
|
103
|
+
const words = wordsOf(buffer)(START, layout.blobAt / 4);
|
|
104
|
+
const stringAt = spanText(words)(buffer.subarray(layout.blobAt), UTF16)(layout.spanAt, 2);
|
|
105
|
+
return {
|
|
106
|
+
semanticCount: layout.semanticCount,
|
|
107
|
+
semanticRoot: rootOf(wordAt(header)(HEADER.semanticRoot)),
|
|
108
|
+
concreteCount: layout.concreteCount,
|
|
109
|
+
concreteRoot: rootOf(wordAt(header)(HEADER.concreteRoot)),
|
|
110
|
+
errorCount: layout.errorCount,
|
|
111
|
+
semantic: (id, field) => wordAt(words)(layout.semanticAt + id * 8 + field),
|
|
112
|
+
concrete: (id, field) => wordAt(words)(layout.concreteAt + id * 8 + field),
|
|
113
|
+
child: (index) => wordAt(words)(layout.childAt + index),
|
|
114
|
+
error: (index, field) => wordAt(words)(layout.errorAt + index * 3 + field),
|
|
115
|
+
stringAt,
|
|
116
|
+
text: stringAt(EMPTY)
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
// src/entities/source/model/source.ts
|
|
120
|
+
const FIRST = 1;
|
|
121
|
+
const FIRST_LINE = 0;
|
|
122
|
+
const HALF = 2;
|
|
123
|
+
const BIT = 2;
|
|
124
|
+
const SET = 1;
|
|
125
|
+
const ERROR_FIELD = {
|
|
126
|
+
line: 0,
|
|
127
|
+
column: 1,
|
|
128
|
+
message: 2
|
|
129
|
+
};
|
|
130
|
+
const LINE_BREAK = /\r\n|\r|\n/u;
|
|
131
|
+
const NEWLINES = /\n/gu;
|
|
132
|
+
const KINDS = [
|
|
133
|
+
"scalar",
|
|
134
|
+
"sequence",
|
|
135
|
+
"mapping",
|
|
136
|
+
"alias"
|
|
137
|
+
];
|
|
138
|
+
const STYLES = [
|
|
139
|
+
"plain",
|
|
140
|
+
"single-quoted",
|
|
141
|
+
"double-quoted",
|
|
142
|
+
"literal",
|
|
143
|
+
"folded"
|
|
144
|
+
];
|
|
145
|
+
const pick = (values, index, fallback) => pipe(Array$1.get(values, index), Option.getOrElse(() => fallback));
|
|
146
|
+
const lazy = (make) => {
|
|
147
|
+
let made = Option.none();
|
|
148
|
+
return () => pipe(made, Option.getOrElse(() => {
|
|
149
|
+
const value = make();
|
|
150
|
+
made = Option.some(value);
|
|
151
|
+
return value;
|
|
152
|
+
}));
|
|
153
|
+
};
|
|
154
|
+
const memo = (make) => {
|
|
155
|
+
const made = /* @__PURE__ */ new Map();
|
|
156
|
+
return (id) => made.getOrInsertComputed(id, () => make(id));
|
|
157
|
+
};
|
|
158
|
+
const times = (count, make) => Array.from({ length: count }, (_empty, index) => make(index));
|
|
159
|
+
const childrenOf = (view, at) => (start, count) => times(count, (offset) => at(view.child(start + offset)));
|
|
160
|
+
const yamlTree = (view) => {
|
|
161
|
+
const at = memo((id) => {
|
|
162
|
+
const field = (name) => view.semantic(id, SEMANTIC[name]);
|
|
163
|
+
const children = lazy(() => childrenOf(view, at)(field("childStart"), field("childCount")));
|
|
164
|
+
return {
|
|
165
|
+
id,
|
|
166
|
+
kind: pick(KINDS, field("kind"), "scalar"),
|
|
167
|
+
tag: view.stringAt(field("tag")),
|
|
168
|
+
value: view.stringAt(field("value")),
|
|
169
|
+
style: pick(STYLES, field("style"), "plain"),
|
|
170
|
+
line: field("line"),
|
|
171
|
+
column: field("column"),
|
|
172
|
+
get children() {
|
|
173
|
+
return children();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
});
|
|
177
|
+
return at;
|
|
178
|
+
};
|
|
179
|
+
const hasFlag = (flags, flag) => Math.floor(flags / flag) % BIT === SET;
|
|
180
|
+
const present = (index) => Option.liftPredicate(index, (value) => value !== NONE);
|
|
181
|
+
const syntaxNode = (view, at) => (id) => {
|
|
182
|
+
const field = (name) => view.concrete(id, CONCRETE[name]);
|
|
183
|
+
const flags = field("flags");
|
|
184
|
+
const start = field("start");
|
|
185
|
+
const end = field("end");
|
|
186
|
+
const children = lazy(() => childrenOf(view, at)(field("childStart"), field("childCount")));
|
|
187
|
+
return {
|
|
188
|
+
id,
|
|
189
|
+
type: view.stringAt(field("kind")),
|
|
190
|
+
named: hasFlag(flags, FLAG.named),
|
|
191
|
+
isError: hasFlag(flags, FLAG.error),
|
|
192
|
+
isMissing: hasFlag(flags, FLAG.missing),
|
|
193
|
+
isExtra: hasFlag(flags, FLAG.extra),
|
|
194
|
+
start,
|
|
195
|
+
end,
|
|
196
|
+
field: pipe(present(field("field")), Option.map(view.stringAt), Option.getOrUndefined),
|
|
197
|
+
get parent() {
|
|
198
|
+
return pipe(present(field("parent")), Option.map(at), Option.getOrUndefined);
|
|
199
|
+
},
|
|
200
|
+
get children() {
|
|
201
|
+
return children();
|
|
202
|
+
},
|
|
203
|
+
get namedChildren() {
|
|
204
|
+
return pipe(children(), Array$1.filter((child) => child.named));
|
|
205
|
+
},
|
|
206
|
+
get text() {
|
|
207
|
+
return String.slice(start, end)(view.text);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
const syntaxTree = (view) => {
|
|
212
|
+
const at = memo((id) => syntaxNode(view, at)(id));
|
|
213
|
+
return at;
|
|
214
|
+
};
|
|
215
|
+
const lineStartsOf = (text) => [FIRST_LINE, ...Array.from(String.matchAll(NEWLINES)(text), (match) => (match.index ?? FIRST_LINE) + FIRST)];
|
|
216
|
+
const lineAt = (starts, offset) => {
|
|
217
|
+
let low = FIRST_LINE;
|
|
218
|
+
let high = starts.length - FIRST;
|
|
219
|
+
while (low < high) {
|
|
220
|
+
const middle = Math.ceil((low + high) / HALF);
|
|
221
|
+
if ((starts[middle] ?? FIRST_LINE) <= offset) low = middle;
|
|
222
|
+
else high = middle - FIRST;
|
|
223
|
+
}
|
|
224
|
+
return low;
|
|
225
|
+
};
|
|
226
|
+
const positionIn = (text) => {
|
|
227
|
+
const starts = lineStartsOf(text);
|
|
228
|
+
return (offset) => {
|
|
229
|
+
const line = lineAt(starts, offset);
|
|
230
|
+
return {
|
|
231
|
+
line: line + FIRST,
|
|
232
|
+
column: offset - (starts[line] ?? FIRST_LINE) + FIRST
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
const errorsOf = (view) => times(view.errorCount, (index) => ({
|
|
237
|
+
line: view.error(index, ERROR_FIELD.line),
|
|
238
|
+
column: view.error(index, ERROR_FIELD.column),
|
|
239
|
+
message: view.stringAt(view.error(index, ERROR_FIELD.message))
|
|
240
|
+
}));
|
|
241
|
+
const sourceOf = (view) => {
|
|
242
|
+
const yaml = yamlTree(view);
|
|
243
|
+
const syntax = syntaxTree(view);
|
|
244
|
+
const lines = lazy(() => String.split(LINE_BREAK)(view.text));
|
|
245
|
+
return {
|
|
246
|
+
text: view.text,
|
|
247
|
+
yaml: pipe(view.semanticRoot, Option.map(yaml), Option.getOrUndefined),
|
|
248
|
+
syntax: pipe(view.concreteRoot, Option.map(syntax), Option.getOrUndefined),
|
|
249
|
+
errors: errorsOf(view),
|
|
250
|
+
get lines() {
|
|
251
|
+
return lines();
|
|
252
|
+
},
|
|
253
|
+
positionOf: positionIn(view.text)
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
export { afterPrefix as a, defineRule as c, INPUT_KINDS as i, sourceOf as n, baseName as o, sourceView as r, definePlugin as s, lineStartsOf as t };
|
|
257
|
+
|
|
258
|
+
//# sourceMappingURL=source-CLFOyvUG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-CLFOyvUG.mjs","names":["EMPTY","Rec","Str","Arr","Arr","Str"],"sources":["../../lint-host/src/shared/lib/words.ts","../src/entities/rule/model/define.ts","../../path-kit/src/entities/path/model/path.ts","../src/shared/config/types.ts","../src/shared/native/source.ts","../src/entities/source/model/source.ts"],"sourcesContent":["import { Option, Record as Rec, pipe } from \"effect\";\n\nexport const WORD = 4;\nexport const STRING_WORDS = 2;\nconst EMPTY = 0;\nconst LENGTH = 1;\n\nexport const aligned = (buffer: Uint8Array): Uint8Array =>\n Option.match(\n Option.liftPredicate(buffer, ({ byteOffset }) => byteOffset % WORD === EMPTY),\n {\n onNone: () => Uint8Array.from(buffer),\n onSome: (value) => value,\n },\n );\n\nexport const wordAt =\n (words: Uint32Array) =>\n (index: number): number =>\n words[index] ?? EMPTY;\n\nexport const fieldsOf =\n (header: Uint32Array) =>\n <Name extends string>(fields: Readonly<Record<Name, number>>): Readonly<Record<Name, number>> =>\n pipe(\n fields,\n Rec.map((index) => wordAt(header)(index)),\n );\n\nexport const wordsOf =\n (buffer: Uint8Array) =>\n (at: number, count: number): Uint32Array =>\n new Uint32Array(buffer.buffer, buffer.byteOffset + at * WORD, count);\n\nexport const spanText =\n (words: Uint32Array) =>\n (blob: Uint8Array, encoding: string) =>\n (spansAt: number, unit: number): ((index: number) => string) => {\n const decoder = new TextDecoder(encoding);\n const cache = new Map<number, string>();\n const read = (index: number): string => {\n const at = spansAt + index * STRING_WORDS;\n const offset = wordAt(words)(at) * unit;\n const value = decoder.decode(\n blob.subarray(offset, offset + wordAt(words)(at + LENGTH) * unit),\n );\n cache.set(index, value);\n return value;\n };\n return (index) => Option.getOrElse(Option.fromNullishOr(cache.get(index)), () => read(index));\n };\n","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","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nexport const SEPARATOR = \"/\";\n\nconst ROOT = \".\";\nconst EXTENSION = \".\";\nconst BACKSLASH = \"\\\\\";\nconst NONE = 0;\nconst ONE = 1;\n\nexport const toPosix = Str.replaceAll(BACKSLASH, SEPARATOR);\n\nexport const segments = (path: string): Arr.NonEmptyReadonlyArray<string> =>\n Str.split(path, SEPARATOR);\n\nexport const joinAll = (parts: readonly string[]): string => Arr.join(parts, SEPARATOR);\n\nexport const join =\n (directory: string) =>\n (name: string): string =>\n Arr.join(Arr.filter([directory, name], Str.isNonEmpty), SEPARATOR);\n\nexport const parent = (path: string): string => joinAll(Arr.dropRight(segments(path), ONE));\n\nexport const ancestors = (path: string): readonly string[] => {\n const parts = Arr.dropRight(segments(path), ONE);\n return pipe(\n Arr.range(NONE, parts.length),\n Arr.reverse,\n Arr.map((count) => joinAll(Arr.take(parts, count))),\n );\n};\n\nexport const baseName = (path: string): string =>\n pipe(\n segments(path),\n Arr.filter(Str.isNonEmpty),\n Arr.last,\n Option.getOrElse(() => \"\"),\n );\n\nexport const stem = (name: string): string =>\n pipe(\n Str.split(name, EXTENSION),\n Arr.head,\n Option.getOrElse(() => name),\n );\n\nexport const afterPrefix =\n (prefix: string) =>\n (text: string): Option.Option<string> =>\n pipe(Option.liftPredicate(text, Str.startsWith(prefix)), Option.map(Str.slice(prefix.length)));\n\nexport const isWithin =\n (directory: string) =>\n (path: string): boolean =>\n Str.isEmpty(directory) ||\n path === directory ||\n Str.startsWith(`${directory}${SEPARATOR}`)(path);\n\nexport const isInside =\n (directory: string) =>\n (path: string): boolean =>\n path !== directory && (directory === ROOT || isWithin(directory)(path));\n\nexport const below =\n (directory: string) =>\n (path: string): Option.Option<string> =>\n pipe(\n Option.liftPredicate(path, () => Str.isEmpty(directory)),\n Option.orElse(() => afterPrefix(`${directory}${SEPARATOR}`)(path)),\n );\n\nexport const relativeTo =\n (root: string) =>\n (file: string): Option.Option<string> =>\n below(toPosix(root))(toPosix(file));\n","import type { RuleEntry, RuleOptions, Severity } from \"@masseater.dev/lint-host\";\nimport type { Effect, Option } from \"effect\";\n\nexport type { RuleEntry, RuleOptions, Severity } from \"@masseater.dev/lint-host\";\n\nexport interface Position {\n readonly line: number;\n readonly column: number;\n}\n\nexport type YamlKind = \"scalar\" | \"sequence\" | \"mapping\" | \"alias\";\n\nexport type YamlStyle = \"plain\" | \"single-quoted\" | \"double-quoted\" | \"literal\" | \"folded\";\n\nexport interface YamlNode {\n readonly id: number;\n readonly kind: YamlKind;\n readonly tag: string;\n readonly value: string;\n readonly style: YamlStyle;\n readonly line: number;\n readonly column: number;\n readonly children: readonly YamlNode[];\n}\n\nexport interface SyntaxNode {\n readonly id: number;\n readonly type: string;\n readonly named: boolean;\n readonly isError: boolean;\n readonly isMissing: boolean;\n readonly isExtra: boolean;\n readonly start: number;\n readonly end: number;\n readonly field: string | undefined;\n readonly parent: SyntaxNode | undefined;\n readonly children: readonly SyntaxNode[];\n readonly namedChildren: readonly SyntaxNode[];\n readonly text: string;\n}\n\nexport interface ParseError {\n readonly line: number;\n readonly column: number;\n readonly message: string;\n}\n\nexport interface Source {\n readonly text: string;\n readonly yaml: YamlNode | undefined;\n readonly syntax: SyntaxNode | undefined;\n readonly errors: readonly ParseError[];\n readonly lines: readonly string[];\n readonly positionOf: (offset: number) => Position;\n}\n\nexport const INPUT_KINDS = [\"workflow\", \"action\", \"dependabot\", \"pre-commit\"] as const;\nexport type InputKind = (typeof INPUT_KINDS)[number];\n\nexport type ScriptLanguage = \"bash\" | \"powershell\";\n\nexport interface Report {\n readonly message: string;\n readonly line: number;\n readonly column: number;\n readonly length?: number;\n readonly detail?: string;\n readonly rule?: string;\n}\n\nexport interface Project {\n readonly root: string;\n readonly exists: (path: string) => boolean;\n readonly read: (path: string) => Option.Option<string>;\n readonly parse: (path: string) => Option.Option<Source>;\n}\n\nexport interface RuleContext {\n readonly filename: string;\n readonly kind: InputKind;\n readonly source: Source;\n readonly options: RuleOptions;\n readonly settings: Readonly<Record<string, unknown>>;\n readonly project: Project;\n readonly parseScript: (language: ScriptLanguage, text: string) => Source;\n readonly report: (report: Report) => void;\n}\n\nexport interface Rule {\n readonly meta: {\n readonly description: string;\n readonly kinds?: readonly InputKind[];\n readonly docs?: string;\n };\n readonly check: (context: RuleContext) => void | Effect.Effect<void>;\n}\n\nexport interface Plugin {\n readonly rules: Readonly<Record<string, Rule>>;\n}\n\nexport interface Override {\n readonly files: readonly string[];\n readonly rules: Readonly<Record<string, RuleEntry>>;\n}\n\nexport interface Fu4Config {\n readonly extends?: readonly Fu4Config[];\n readonly plugins?: Readonly<Record<string, Plugin>>;\n readonly rules?: Readonly<Record<string, RuleEntry>>;\n readonly settings?: Readonly<Record<string, unknown>>;\n readonly overrides?: readonly Override[];\n readonly ignores?: readonly string[];\n}\n\nexport interface Diagnostic {\n readonly path: string;\n readonly line: number;\n readonly column: number;\n readonly length?: number;\n readonly rule: string;\n readonly message: string;\n readonly detail?: string;\n readonly severity: Exclude<Severity, \"off\">;\n}\n","import {\n STRING_WORDS,\n WORD,\n aligned,\n fieldsOf,\n spanText,\n wordAt,\n wordsOf,\n} from \"@masseater.dev/lint-host\";\nimport { Option } from \"effect\";\n\nconst EMPTY = 0;\nconst START = 0;\nexport const NONE = 4_294_967_295;\nexport const HEADER_WORDS = 8;\nexport const SEMANTIC_WORDS = 8;\nexport const CONCRETE_WORDS = 8;\nexport const ERROR_WORDS = 3;\n\nexport const HEADER = {\n version: 0,\n semanticCount: 1,\n semanticRoot: 2,\n concreteCount: 3,\n concreteRoot: 4,\n childCount: 5,\n errorCount: 6,\n stringCount: 7,\n} as const;\n\nexport const SEMANTIC = {\n kind: 0,\n tag: 1,\n value: 2,\n style: 3,\n line: 4,\n column: 5,\n childStart: 6,\n childCount: 7,\n} as const;\n\nexport const CONCRETE = {\n kind: 0,\n flags: 1,\n start: 2,\n end: 3,\n field: 4,\n parent: 5,\n childStart: 6,\n childCount: 7,\n} as const;\n\nexport const FLAG = { named: 1, error: 2, missing: 4, extra: 8 } as const;\n\nexport interface SourceView {\n readonly semanticCount: number;\n readonly semanticRoot: Option.Option<number>;\n readonly concreteCount: number;\n readonly concreteRoot: Option.Option<number>;\n readonly errorCount: number;\n readonly semantic: (id: number, field: number) => number;\n readonly concrete: (id: number, field: number) => number;\n readonly child: (index: number) => number;\n readonly error: (index: number, field: number) => number;\n readonly stringAt: (index: number) => string;\n readonly text: string;\n}\n\nconst UTF16 = \"utf-16le\";\n\nconst rootOf = (value: number): Option.Option<number> =>\n Option.liftPredicate(value, (id) => id !== NONE);\n\ninterface Layout {\n readonly semanticCount: number;\n readonly concreteCount: number;\n readonly errorCount: number;\n readonly semanticAt: number;\n readonly concreteAt: number;\n readonly childAt: number;\n readonly errorAt: number;\n readonly spanAt: number;\n readonly blobAt: number;\n}\n\nconst layoutOf = (header: Uint32Array): Layout => {\n const fields = fieldsOf(header)(HEADER);\n const { semanticCount, concreteCount, errorCount } = fields;\n const semanticAt = HEADER_WORDS;\n const concreteAt = semanticAt + semanticCount * SEMANTIC_WORDS;\n const childAt = concreteAt + concreteCount * CONCRETE_WORDS;\n const errorAt = childAt + fields.childCount;\n const spanAt = errorAt + errorCount * ERROR_WORDS;\n const blobAt = (spanAt + fields.stringCount * STRING_WORDS) * WORD;\n return {\n semanticCount,\n concreteCount,\n errorCount,\n semanticAt,\n concreteAt,\n childAt,\n errorAt,\n spanAt,\n blobAt,\n };\n};\n\nexport const sourceView = (raw: Uint8Array): SourceView => {\n const buffer = aligned(raw);\n const header = wordsOf(buffer)(START, HEADER_WORDS);\n const layout = layoutOf(header);\n const words = wordsOf(buffer)(START, layout.blobAt / WORD);\n const stringAt = spanText(words)(buffer.subarray(layout.blobAt), UTF16)(\n layout.spanAt,\n STRING_WORDS,\n );\n return {\n semanticCount: layout.semanticCount,\n semanticRoot: rootOf(wordAt(header)(HEADER.semanticRoot)),\n concreteCount: layout.concreteCount,\n concreteRoot: rootOf(wordAt(header)(HEADER.concreteRoot)),\n errorCount: layout.errorCount,\n semantic: (id, field) => wordAt(words)(layout.semanticAt + id * SEMANTIC_WORDS + field),\n concrete: (id, field) => wordAt(words)(layout.concreteAt + id * CONCRETE_WORDS + field),\n child: (index) => wordAt(words)(layout.childAt + index),\n error: (index, field) => wordAt(words)(layout.errorAt + index * ERROR_WORDS + field),\n stringAt,\n text: stringAt(EMPTY),\n };\n};\n","import { Array as Arr, Option, String as Str, pipe } from \"effect\";\n\nimport type {\n ParseError,\n Position,\n Source,\n SyntaxNode,\n YamlKind,\n YamlNode,\n YamlStyle,\n} from \"#/shared/config/index.ts\";\nimport { CONCRETE, FLAG, NONE, SEMANTIC } from \"#/shared/native/index.ts\";\nimport type { SourceView } from \"#/shared/native/index.ts\";\n\nconst FIRST = 1;\nconst FIRST_LINE = 0;\nconst HALF = 2;\nconst BIT = 2;\nconst SET = 1;\nconst ERROR_FIELD = { line: 0, column: 1, message: 2 } as const;\nconst LINE_BREAK = /\\r\\n|\\r|\\n/u;\nconst NEWLINES = /\\n/gu;\n\nconst KINDS: readonly YamlKind[] = [\"scalar\", \"sequence\", \"mapping\", \"alias\"];\nconst STYLES: readonly YamlStyle[] = [\n \"plain\",\n \"single-quoted\",\n \"double-quoted\",\n \"literal\",\n \"folded\",\n];\n\nconst pick = <Value>(values: readonly Value[], index: number, fallback: Value): Value =>\n pipe(\n Arr.get(values, index),\n Option.getOrElse(() => fallback),\n );\n\nconst lazy = <Value>(make: () => Value): (() => Value) => {\n let made: Option.Option<Value> = Option.none();\n return () =>\n pipe(\n made,\n Option.getOrElse(() => {\n const value = make();\n made = Option.some(value);\n return value;\n }),\n );\n};\n\nconst memo = <Node>(make: (id: number) => Node): ((id: number) => Node) => {\n const made = new Map<number, Node>();\n return (id) => made.getOrInsertComputed(id, () => make(id));\n};\n\nconst times = <Value>(count: number, make: (index: number) => Value): readonly Value[] =>\n Array.from({ length: count }, (_empty, index) => make(index));\n\nconst childrenOf =\n <Node>(view: SourceView, at: (id: number) => Node) =>\n (start: number, count: number): readonly Node[] =>\n times(count, (offset) => at(view.child(start + offset)));\n\nconst yamlTree = (view: SourceView): ((id: number) => YamlNode) => {\n const at: (id: number) => YamlNode = memo((id) => {\n const field = (name: keyof typeof SEMANTIC): number => view.semantic(id, SEMANTIC[name]);\n const children = lazy(() => childrenOf(view, at)(field(\"childStart\"), field(\"childCount\")));\n return {\n id,\n kind: pick(KINDS, field(\"kind\"), \"scalar\"),\n tag: view.stringAt(field(\"tag\")),\n value: view.stringAt(field(\"value\")),\n style: pick(STYLES, field(\"style\"), \"plain\"),\n line: field(\"line\"),\n column: field(\"column\"),\n get children(): readonly YamlNode[] {\n return children();\n },\n };\n });\n return at;\n};\n\nconst hasFlag = (flags: number, flag: number): boolean => Math.floor(flags / flag) % BIT === SET;\n\nconst present = (index: number): Option.Option<number> =>\n Option.liftPredicate(index, (value) => value !== NONE);\n\nconst syntaxNode =\n (view: SourceView, at: (id: number) => SyntaxNode) =>\n (id: number): SyntaxNode => {\n const field = (name: keyof typeof CONCRETE): number => view.concrete(id, CONCRETE[name]);\n const flags = field(\"flags\");\n const start = field(\"start\");\n const end = field(\"end\");\n const children = lazy(() => childrenOf(view, at)(field(\"childStart\"), field(\"childCount\")));\n return {\n id,\n type: view.stringAt(field(\"kind\")),\n named: hasFlag(flags, FLAG.named),\n isError: hasFlag(flags, FLAG.error),\n isMissing: hasFlag(flags, FLAG.missing),\n isExtra: hasFlag(flags, FLAG.extra),\n start,\n end,\n field: pipe(present(field(\"field\")), Option.map(view.stringAt), Option.getOrUndefined),\n get parent(): SyntaxNode | undefined {\n return pipe(present(field(\"parent\")), Option.map(at), Option.getOrUndefined);\n },\n get children(): readonly SyntaxNode[] {\n return children();\n },\n get namedChildren(): readonly SyntaxNode[] {\n return pipe(\n children(),\n Arr.filter((child) => child.named),\n );\n },\n get text(): string {\n return Str.slice(start, end)(view.text);\n },\n };\n };\n\nconst syntaxTree = (view: SourceView): ((id: number) => SyntaxNode) => {\n const at: (id: number) => SyntaxNode = memo((id) => syntaxNode(view, at)(id));\n return at;\n};\n\nexport const lineStartsOf = (text: string): readonly number[] => [\n FIRST_LINE,\n ...Array.from(Str.matchAll(NEWLINES)(text), (match) => (match.index ?? FIRST_LINE) + FIRST),\n];\n\nconst lineAt = (starts: readonly number[], offset: number): number => {\n let low = FIRST_LINE;\n let high = starts.length - FIRST;\n while (low < high) {\n const middle = Math.ceil((low + high) / HALF);\n if ((starts[middle] ?? FIRST_LINE) <= offset) {\n low = middle;\n } else {\n high = middle - FIRST;\n }\n }\n return low;\n};\n\nconst positionIn = (text: string): ((offset: number) => Position) => {\n const starts = lineStartsOf(text);\n return (offset) => {\n const line = lineAt(starts, offset);\n return { line: line + FIRST, column: offset - (starts[line] ?? FIRST_LINE) + FIRST };\n };\n};\n\nconst errorsOf = (view: SourceView): readonly ParseError[] =>\n times(view.errorCount, (index) => ({\n line: view.error(index, ERROR_FIELD.line),\n column: view.error(index, ERROR_FIELD.column),\n message: view.stringAt(view.error(index, ERROR_FIELD.message)),\n }));\n\nexport const sourceOf = (view: SourceView): Source => {\n const yaml = yamlTree(view);\n const syntax = syntaxTree(view);\n const lines = lazy(() => Str.split(LINE_BREAK)(view.text));\n return {\n text: view.text,\n yaml: pipe(view.semanticRoot, Option.map(yaml), Option.getOrUndefined),\n syntax: pipe(view.concreteRoot, Option.map(syntax), Option.getOrUndefined),\n errors: errorsOf(view),\n get lines(): readonly string[] {\n return lines();\n },\n positionOf: positionIn(view.text),\n };\n};\n"],"mappings":";AAIA,MAAMA,UAAQ;AACd,MAAM,SAAS;AAEf,MAAa,WAAW,WACtB,OAAO,MACL,OAAO,cAAc,SAAS,EAAE,iBAAiB,aAAA,MAAsBA,OAAK,GAC5E;CACE,cAAc,WAAW,KAAK,MAAM;CACpC,SAAS,UAAU;AACrB,CACF;AAEF,MAAa,UACV,WACA,UACC,MAAM,UAAUA;AAEpB,MAAa,YACV,YACqB,WACpB,KACE,QACAC,OAAI,KAAK,UAAU,OAAO,MAAM,CAAC,CAAC,KAAK,CAAC,CAC1C;AAEJ,MAAa,WACV,YACA,IAAY,UACX,IAAI,YAAY,OAAO,QAAQ,OAAO,aAAa,KAAA,GAAW,KAAK;AAEvE,MAAa,YACV,WACA,MAAkB,cAClB,SAAiB,SAA8C;CAC9D,MAAM,UAAU,IAAI,YAAY,QAAQ;CACxC,MAAM,wBAAQ,IAAI,IAAoB;CACtC,MAAM,QAAQ,UAA0B;EACtC,MAAM,KAAK,UAAU,QAAA;EACrB,MAAM,SAAS,OAAO,KAAK,CAAC,CAAC,EAAE,IAAI;EACnC,MAAM,QAAQ,QAAQ,OACpB,KAAK,SAAS,QAAQ,SAAS,OAAO,KAAK,CAAC,CAAC,KAAK,MAAM,IAAI,IAAI,CAClE;EACA,MAAM,IAAI,OAAO,KAAK;EACtB,OAAO;CACT;CACA,QAAQ,UAAU,OAAO,UAAU,OAAO,cAAc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r_masseater/fu4",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "The engine of a GitHub Actions linter: Rust parses workflows and TypeScript rules from its presets subpath check them, configured from vite.config.ts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"actionlint",
|
|
@@ -56,9 +56,10 @@
|
|
|
56
56
|
"provenance": true
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@
|
|
59
|
+
"@r_masseater/node-main": "^0.2.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
+
"@effect/platform-node": "4.1.5",
|
|
62
63
|
"@masseater.dev/lint-host": "0.0.0",
|
|
63
64
|
"@masseater.dev/path-kit": "0.0.0",
|
|
64
65
|
"@r_masseater/vitest-otlp": "0.2.2",
|
|
@@ -80,10 +81,16 @@
|
|
|
80
81
|
"yaml": "2.9.1"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|
|
84
|
+
"@effect/platform-node": "^4.1.0",
|
|
83
85
|
"effect": "^4.1.0",
|
|
84
86
|
"vite": "*",
|
|
85
87
|
"vite-plus": ">=1.8.0"
|
|
86
88
|
},
|
|
89
|
+
"peerDependenciesMeta": {
|
|
90
|
+
"@effect/platform-node": {
|
|
91
|
+
"optional": true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
87
94
|
"engines": {
|
|
88
95
|
"node": ">=26.13.1"
|
|
89
96
|
},
|
|
@@ -95,7 +102,7 @@
|
|
|
95
102
|
]
|
|
96
103
|
},
|
|
97
104
|
"optionalDependencies": {
|
|
98
|
-
"@r_masseater/fu4-linux-x64-gnu": "0.3.
|
|
99
|
-
"@r_masseater/fu4-win32-x64-msvc": "0.3.
|
|
105
|
+
"@r_masseater/fu4-linux-x64-gnu": "0.3.3",
|
|
106
|
+
"@r_masseater/fu4-win32-x64-msvc": "0.3.3"
|
|
100
107
|
}
|
|
101
108
|
}
|