@r_masseater/fu4 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/README.md +79 -29
- package/dist/app-DheTFmZd.mjs +635 -0
- package/dist/app-DheTFmZd.mjs.map +1 -0
- package/dist/cli-Dc3I8PTz.mjs +15 -0
- package/dist/cli-Dc3I8PTz.mjs.map +1 -0
- package/dist/cli.mjs +3 -12
- package/dist/cli.mjs.map +1 -1
- package/dist/index-BBTwA_Cz.d.mts +110 -0
- package/dist/index.d.mts +13 -3
- package/dist/index.mjs +1 -1
- package/dist/vite.d.mts +1 -1
- package/package.json +8 -18
- package/skills/lint-workflows/SKILL.md +33 -44
- package/dist/app-D0TgXIa0.mjs +0 -211
- package/dist/app-D0TgXIa0.mjs.map +0 -1
- package/dist/types-DywsX0Gn.d.mts +0 -34
package/dist/app-D0TgXIa0.mjs
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import { Array, Boolean, Config, Console, Effect, FileSystem, Function, Layer, Match, Option, Order, Path, Predicate, Record, Redacted, Schema, String as String$1, pipe } from "effect";
|
|
3
|
-
import { NodeServices } from "@effect/platform-node";
|
|
4
|
-
import { runMain } from "@effect/platform-node/NodeRuntime";
|
|
5
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
6
|
-
import { FetchHttpClient } from "effect/http";
|
|
7
|
-
import { Otlp, OtlpSerialization } from "effect/observability";
|
|
8
|
-
import { resolveConfigFromFile } from "vite-plus";
|
|
9
|
-
// src/app/format.ts
|
|
10
|
-
const format = (diagnostic) => `${diagnostic.path}:${String(diagnostic.line)}:${String(diagnostic.column)}: ${diagnostic.message} [${diagnostic.rule}]`;
|
|
11
|
-
// ../lint-host/src/shared/lib/target.ts
|
|
12
|
-
const abiOf = (platform) => Match.value(platform).pipe(Match.when("linux", () => "-gnu"), Match.when("win32", () => "-msvc"), Match.orElse(() => ""));
|
|
13
|
-
const platformTarget = `${process.platform}-${process.arch}${abiOf(process.platform)}`;
|
|
14
|
-
const addonFileOf = (binary) => `${binary}.${platformTarget}.node`;
|
|
15
|
-
// ../lint-host/src/features/build-addon/model/build.ts
|
|
16
|
-
const taggedError$1 = Schema.TaggedError;
|
|
17
|
-
var AddonBuildFailed = class extends taggedError$1()("AddonBuildFailed", { message: Schema.String }) {};
|
|
18
|
-
const LIBRARY = {
|
|
19
|
-
linux: (name) => `lib${name}.so`,
|
|
20
|
-
darwin: (name) => `lib${name}.dylib`,
|
|
21
|
-
win32: (name) => `${name}.dll`
|
|
22
|
-
};
|
|
23
|
-
const SUCCESS = 0;
|
|
24
|
-
const cargo = Effect.fn("cargo")(function* cargo(crate, workspace) {
|
|
25
|
-
const exitCode = yield* (yield* ChildProcessSpawner.ChildProcessSpawner).exitCode(ChildProcess.make("cargo", [
|
|
26
|
-
"build",
|
|
27
|
-
"--release",
|
|
28
|
-
"--locked",
|
|
29
|
-
"-p",
|
|
30
|
-
crate
|
|
31
|
-
], {
|
|
32
|
-
cwd: workspace,
|
|
33
|
-
stdout: "inherit",
|
|
34
|
-
stderr: "inherit"
|
|
35
|
-
}));
|
|
36
|
-
const failure = AddonBuildFailed.make({ message: `cargo exited with ${String(exitCode)}` });
|
|
37
|
-
yield* Effect.when(Effect.fail(failure), Effect.sync(() => Number(exitCode) !== SUCCESS));
|
|
38
|
-
});
|
|
39
|
-
Effect.fn("buildAddon")(function* build(options) {
|
|
40
|
-
const fileSystem = yield* FileSystem.FileSystem;
|
|
41
|
-
const path = yield* Path.Path;
|
|
42
|
-
const library = yield* Effect.fromOption(Record.get(LIBRARY, process.platform)).pipe(Effect.mapError(() => AddonBuildFailed.make({ message: `no native build for ${process.platform}` })));
|
|
43
|
-
yield* cargo(options.crate, options.workspaceDir);
|
|
44
|
-
const output = path.join(options.packageDir, "native");
|
|
45
|
-
yield* fileSystem.makeDirectory(output, { recursive: true });
|
|
46
|
-
const built = library(String$1.replaceAll("-", "_")(options.crate));
|
|
47
|
-
yield* fileSystem.copyFile(path.join(options.workspaceDir, "target", "release", built), path.join(output, addonFileOf(options.binary)));
|
|
48
|
-
});
|
|
49
|
-
// ../lint-host/src/features/load-addon/model/load.ts
|
|
50
|
-
const loadAddon = ({ packageName, binary, from, isAddon, failWith }) => {
|
|
51
|
-
const requireFrom = createRequire(from);
|
|
52
|
-
const loadFrom = (specifier) => Effect.try({
|
|
53
|
-
try: () => requireFrom(specifier),
|
|
54
|
-
catch: failWith(`could not load ${specifier}`)
|
|
55
|
-
});
|
|
56
|
-
return loadFrom(`${packageName}-${platformTarget}`).pipe(Effect.catchCause(() => loadFrom(`${packageName}/native/${addonFileOf(binary)}`)), Effect.filterOrFail(isAddon, (found) => failWith(`no ${binary} addon for ${platformTarget}`)(found)));
|
|
57
|
-
};
|
|
58
|
-
const callAddon = ({ addon, name, files, call, failWith }) => addon.pipe(Effect.flatMap((loaded) => Effect.try({
|
|
59
|
-
try: () => call(loaded),
|
|
60
|
-
catch: failWith(`${name} could not lint`)
|
|
61
|
-
}).pipe(Effect.tap(() => Effect.promise(() => loaded.flushTelemetry())))), Effect.withSpan(`${name}.native`, { attributes: { [`${name}.files`]: files } }));
|
|
62
|
-
// ../lint-host/src/features/run-cli/model/cli.ts
|
|
63
|
-
const CONFIG_FILES = [
|
|
64
|
-
"vite.config.ts",
|
|
65
|
-
"vite.config.mts",
|
|
66
|
-
"vite.config.js",
|
|
67
|
-
"vite.config.mjs"
|
|
68
|
-
];
|
|
69
|
-
const FAILED = 1;
|
|
70
|
-
const ARGUMENTS_START = 2;
|
|
71
|
-
const configOf = (cli, root) => Effect.gen(function* readConfig() {
|
|
72
|
-
const fileSystem = yield* FileSystem.FileSystem;
|
|
73
|
-
const path = yield* Path.Path;
|
|
74
|
-
const found = yield* pipe(CONFIG_FILES, Array.map((name) => path.join(root, name)), Effect.filter((file) => fileSystem.exists(file).pipe(Effect.orElseSucceed(() => false))));
|
|
75
|
-
const loaded = yield* Option.match(Array.head(found), {
|
|
76
|
-
onNone: () => Effect.succeed({}),
|
|
77
|
-
onSome: (file) => Effect.tryPromise({
|
|
78
|
-
try: () => resolveConfigFromFile(file),
|
|
79
|
-
catch: cli.failWith(`could not load ${file}`)
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
return cli.section(loaded);
|
|
83
|
-
}).pipe(Effect.withSpan(`${cli.name}.config`));
|
|
84
|
-
const trackedFiles = (root, pathspecs) => Effect.gen(function* listFiles() {
|
|
85
|
-
const output = yield* (yield* ChildProcessSpawner.ChildProcessSpawner).string(ChildProcess.make("git", [
|
|
86
|
-
"ls-files",
|
|
87
|
-
"-co",
|
|
88
|
-
"--exclude-standard",
|
|
89
|
-
"-z",
|
|
90
|
-
"--",
|
|
91
|
-
...pathspecs
|
|
92
|
-
], { cwd: root }));
|
|
93
|
-
return pipe(String$1.split(output, "\0"), Array.filter(String$1.isNonEmpty));
|
|
94
|
-
});
|
|
95
|
-
const requestOf = (config, patterns) => Array.match(patterns, {
|
|
96
|
-
onEmpty: () => ({ config }),
|
|
97
|
-
onNonEmpty: (given) => ({
|
|
98
|
-
config,
|
|
99
|
-
patterns: given
|
|
100
|
-
})
|
|
101
|
-
});
|
|
102
|
-
const hasError = (found) => pipe(found, Array.some(({ severity }) => severity === "error"));
|
|
103
|
-
const mainOf = (cli) => Effect.gen(function* main() {
|
|
104
|
-
const root = process.cwd();
|
|
105
|
-
const config = yield* configOf(cli, root);
|
|
106
|
-
const patterns = process.argv.slice(ARGUMENTS_START);
|
|
107
|
-
const files = yield* trackedFiles(root, cli.pathspecs(requestOf(config, patterns))).pipe(Effect.withSpan(`${cli.name}.files`));
|
|
108
|
-
const projectFiles = yield* trackedFiles(root, []).pipe(Effect.withSpan(`${cli.name}.project`));
|
|
109
|
-
const found = yield* cli.lint({
|
|
110
|
-
root,
|
|
111
|
-
files,
|
|
112
|
-
projectFiles,
|
|
113
|
-
config
|
|
114
|
-
});
|
|
115
|
-
yield* Array.match(found, {
|
|
116
|
-
onEmpty: () => Effect.void,
|
|
117
|
-
onNonEmpty: (all) => Console.log(pipe(all, Array.map(cli.format), Array.join("\n")))
|
|
118
|
-
});
|
|
119
|
-
yield* Effect.when(Effect.sync(() => {
|
|
120
|
-
process.exitCode = FAILED;
|
|
121
|
-
}), Effect.sync(() => hasError(found)));
|
|
122
|
-
});
|
|
123
|
-
const runCli = (cli) => {
|
|
124
|
-
const services = Otlp.layerFromConfig({ resource: { serviceName: cli.name } }).pipe(Layer.provide(OtlpSerialization.layerJson), Layer.provide(FetchHttpClient.layer), Layer.provideMerge(NodeServices.layer));
|
|
125
|
-
runMain(mainOf(cli).pipe(Effect.provide(services)));
|
|
126
|
-
};
|
|
127
|
-
const present = Function.dual(2, (value, build) => Option.match(value, {
|
|
128
|
-
onNone: () => ({}),
|
|
129
|
-
onSome: build
|
|
130
|
-
}));
|
|
131
|
-
// ../lint-host/src/shared/lib/trace.ts
|
|
132
|
-
const SAMPLED = "01";
|
|
133
|
-
const NOT_SAMPLED = "00";
|
|
134
|
-
const flagsOf = (sampled) => Boolean.match(sampled, {
|
|
135
|
-
onFalse: () => NOT_SAMPLED,
|
|
136
|
-
onTrue: () => SAMPLED
|
|
137
|
-
});
|
|
138
|
-
const traceparent = Effect.currentSpan.pipe(Effect.map((span) => `00-${span.traceId}-${span.spanId}-${flagsOf(span.sampled)}`), Effect.option);
|
|
139
|
-
const byPosition = Order.combine(Order.mapInput(Order.String, (found) => found.path), Order.mapInput(Order.Number, (found) => found.line));
|
|
140
|
-
const sortByPosition = (found) => Array.sort(found, byPosition);
|
|
141
|
-
// src/shared/lib/errors.ts
|
|
142
|
-
const taggedError = Schema.TaggedError;
|
|
143
|
-
var Fu4Error = class extends taggedError()("Fu4Error", { message: Schema.String }) {};
|
|
144
|
-
const failedWith = (message) => (cause) => Fu4Error.make({ message: `${message}: ${String(cause)}` });
|
|
145
|
-
// src/shared/native/index.ts
|
|
146
|
-
const isNative = (value) => Predicate.hasProperty(value, "lintPaths") && Predicate.isFunction(value.lintPaths) && Predicate.hasProperty(value, "flushTelemetry") && Predicate.isFunction(value.flushTelemetry);
|
|
147
|
-
const native = loadAddon({
|
|
148
|
-
packageName: "@r_masseater/fu4",
|
|
149
|
-
binary: "fu4",
|
|
150
|
-
from: import.meta.url,
|
|
151
|
-
isAddon: isNative,
|
|
152
|
-
failWith: failedWith
|
|
153
|
-
});
|
|
154
|
-
// src/app/lint.ts
|
|
155
|
-
const diagnosticsOf = (result) => pipe(result.diagnostics, Array.map((diagnostic) => ({
|
|
156
|
-
path: result.path,
|
|
157
|
-
line: diagnostic.line,
|
|
158
|
-
column: diagnostic.column,
|
|
159
|
-
rule: diagnostic.kind,
|
|
160
|
-
message: diagnostic.message,
|
|
161
|
-
severity: "error"
|
|
162
|
-
})));
|
|
163
|
-
const githubToken = Config.option(Config.Redacted("GH_TOKEN")).pipe(Effect.map(Option.filter((token) => Redacted.value(token) !== "")), Effect.orDie);
|
|
164
|
-
const auditOptions = Effect.fn("fu4.auditOptions")(function* auditOptions(config = {}) {
|
|
165
|
-
const { online = true, ...rest } = config;
|
|
166
|
-
if (!online) return rest;
|
|
167
|
-
const token = yield* githubToken;
|
|
168
|
-
return {
|
|
169
|
-
...rest,
|
|
170
|
-
...present(token, (value) => ({ githubToken: Redacted.value(value) }))
|
|
171
|
-
};
|
|
172
|
-
});
|
|
173
|
-
const lint = Effect.fn("fu4.lint")(function* lint(input) {
|
|
174
|
-
const parent = yield* traceparent;
|
|
175
|
-
const config = input.config ?? {};
|
|
176
|
-
const options = {
|
|
177
|
-
config,
|
|
178
|
-
audit: yield* auditOptions(config.audit),
|
|
179
|
-
...present(parent, (value) => ({ traceparent: value }))
|
|
180
|
-
};
|
|
181
|
-
const results = yield* callAddon({
|
|
182
|
-
addon: native,
|
|
183
|
-
name: "fu4",
|
|
184
|
-
files: input.files.length,
|
|
185
|
-
call: (addon) => addon.lintPaths(input.root, input.files, options),
|
|
186
|
-
failWith: failedWith
|
|
187
|
-
});
|
|
188
|
-
return sortByPosition(pipe(results, Array.flatMap(diagnosticsOf)));
|
|
189
|
-
});
|
|
190
|
-
// src/app/section.ts
|
|
191
|
-
const WORKFLOWS = [
|
|
192
|
-
".github/workflows/*.yml",
|
|
193
|
-
".github/workflows/*.yaml",
|
|
194
|
-
":(glob)**/action.yml",
|
|
195
|
-
":(glob)**/action.yaml",
|
|
196
|
-
".github/dependabot.yml",
|
|
197
|
-
".github/dependabot.yaml",
|
|
198
|
-
".pre-commit-config.yaml",
|
|
199
|
-
".pre-commit-hooks.yaml"
|
|
200
|
-
];
|
|
201
|
-
const NOT_OWNED = [":(exclude,attr:linguist-vendored)", ":(exclude,attr:linguist-generated)"];
|
|
202
|
-
const hasSection = (value) => Predicate.hasProperty(value, "fu4") && Predicate.isObject(value.fu4);
|
|
203
|
-
const fu4Section = (config) => pipe(Option.liftPredicate(config, hasSection), Option.map((value) => value.fu4), Option.getOrElse(() => ({})));
|
|
204
|
-
const workflowPathspecs = ({ config, patterns = WORKFLOWS }) => [
|
|
205
|
-
...patterns,
|
|
206
|
-
...NOT_OWNED,
|
|
207
|
-
...pipe(config.ignores ?? [], Array.map((glob) => `:(glob,exclude)${glob}`))
|
|
208
|
-
];
|
|
209
|
-
export { failedWith as a, Fu4Error as i, workflowPathspecs as n, runCli as o, lint as r, format as s, fu4Section as t };
|
|
210
|
-
|
|
211
|
-
//# sourceMappingURL=app-D0TgXIa0.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-D0TgXIa0.mjs","names":["taggedError","Rec","Str","Arr","Str","Fn","Bool","Arr","Arr","Arr"],"sources":["../src/app/format.ts","../../lint-host/src/shared/lib/target.ts","../../lint-host/src/features/build-addon/model/build.ts","../../lint-host/src/features/load-addon/model/load.ts","../../lint-host/src/features/run-cli/model/cli.ts","../../lint-host/src/shared/lib/present.ts","../../lint-host/src/shared/lib/trace.ts","../src/shared/lib/errors.ts","../src/shared/native/index.ts","../src/app/lint.ts","../src/app/section.ts"],"sourcesContent":["import type { Diagnostic } from \"#/shared/config/index.ts\";\n\nexport const format = (diagnostic: Diagnostic): string =>\n `${diagnostic.path}:${String(diagnostic.line)}:${String(diagnostic.column)}: ${diagnostic.message} [${diagnostic.rule}]`;\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 { NodeServices } from \"@effect/platform-node\";\nimport { runMain } from \"@effect/platform-node/NodeRuntime\";\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.layer)));\n};\n","import { createRequire } from \"node:module\";\n\nimport { Effect } from \"effect\";\n\nimport type { FailWith } from \"#/shared/lib/fail.ts\";\nimport { addonFileOf, platformTarget } from \"#/shared/lib/target.ts\";\n\nexport interface AddonSource<Addon, Failure> {\n readonly packageName: string;\n readonly binary: string;\n readonly from: string;\n readonly isAddon: (value: unknown) => value is Addon;\n readonly failWith: FailWith<Failure>;\n}\n\nexport const loadAddon = <Addon, Failure>({\n packageName,\n binary,\n from,\n isAddon,\n failWith,\n}: AddonSource<Addon, Failure>): Effect.Effect<Addon, Failure> => {\n const requireFrom = createRequire(from);\n const loadFrom = (specifier: string): Effect.Effect<unknown, Failure> =>\n Effect.try({\n try: (): unknown => requireFrom(specifier),\n catch: failWith(`could not load ${specifier}`),\n });\n return loadFrom(`${packageName}-${platformTarget}`).pipe(\n Effect.catchCause(() => loadFrom(`${packageName}/native/${addonFileOf(binary)}`)),\n Effect.filterOrFail(isAddon, (found) =>\n failWith(`no ${binary} addon for ${platformTarget}`)(found),\n ),\n );\n};\n\nexport interface Telemetered {\n readonly flushTelemetry: () => Promise<void>;\n}\n\nexport interface AddonCall<Addon extends Telemetered, Result, Failure> {\n readonly addon: Effect.Effect<Addon, Failure>;\n readonly name: string;\n readonly files: number;\n readonly call: (addon: Addon) => Result;\n readonly failWith: FailWith<Failure>;\n}\n\nexport const callAddon = <Addon extends Telemetered, Result, Failure>({\n addon,\n name,\n files,\n call,\n failWith,\n}: AddonCall<Addon, Result, Failure>): Effect.Effect<Result, Failure> =>\n addon.pipe(\n Effect.flatMap((loaded) =>\n Effect.try({ try: () => call(loaded), catch: failWith(`${name} could not lint`) }).pipe(\n Effect.tap(() => Effect.promise(() => loaded.flushTelemetry())),\n ),\n ),\n Effect.withSpan(`${name}.native`, { attributes: { [`${name}.files`]: files } }),\n );\n","import { NodeServices } from \"@effect/platform-node\";\nimport { runMain } from \"@effect/platform-node/NodeRuntime\";\nimport {\n Array as Arr,\n Console,\n Effect,\n FileSystem,\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 ARGUMENTS_START = 2;\n\nexport interface Reported {\n readonly severity: string;\n}\n\nexport interface LintCall<Config> {\n readonly root: string;\n readonly files: readonly string[];\n readonly projectFiles: readonly string[];\n readonly config: Config;\n}\n\nexport interface PathspecRequest<Config> {\n readonly config: Config;\n readonly patterns?: readonly string[];\n}\n\nexport interface Cli<Config, Found extends Reported, Failure> {\n readonly name: string;\n readonly section: (config: unknown) => Config;\n readonly pathspecs: (request: PathspecRequest<Config>) => readonly string[];\n readonly lint: (call: LintCall<Config>) => Effect.Effect<readonly Found[], Failure>;\n readonly format: (found: Found) => string;\n readonly failWith: FailWith<Failure>;\n}\n\nconst configOf = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, 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: cli.failWith(`could not load ${file}`),\n }),\n });\n return cli.section(loaded);\n }).pipe(Effect.withSpan(`${cli.name}.config`));\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 mainOf = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n): Effect.Effect<\n void,\n Failure | PlatformError,\n FileSystem.FileSystem | Path.Path | ChildProcessSpawner.ChildProcessSpawner\n> =>\n Effect.gen(function* main() {\n const root = process.cwd();\n const config = yield* configOf(cli, root);\n const patterns = process.argv.slice(ARGUMENTS_START);\n const files = yield* trackedFiles(root, cli.pathspecs(requestOf(config, patterns))).pipe(\n Effect.withSpan(`${cli.name}.files`),\n );\n const projectFiles = yield* trackedFiles(root, []).pipe(Effect.withSpan(`${cli.name}.project`));\n const found = yield* cli.lint({ root, files, projectFiles, config });\n yield* Arr.match(found, {\n onEmpty: () => Effect.void,\n onNonEmpty: (all) => Console.log(pipe(all, Arr.map(cli.format), Arr.join(\"\\n\"))),\n });\n yield* Effect.when(\n Effect.sync(() => {\n process.exitCode = FAILED;\n }),\n Effect.sync(() => hasError(found)),\n );\n });\n\nexport const runCli = <Config, Found extends Reported, Failure>(\n cli: Cli<Config, Found, Failure>,\n): void => {\n const services = Otlp.layerFromConfig({ resource: { serviceName: cli.name } }).pipe(\n Layer.provide(OtlpSerialization.layerJson),\n Layer.provide(FetchHttpClient.layer),\n Layer.provideMerge(NodeServices.layer),\n );\n runMain(mainOf(cli).pipe(Effect.provide(services)));\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}\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.mapInput(Order.Number, (found: Positioned) => found.line),\n);\n\nexport const sortByPosition = <Found extends Positioned>(found: readonly Found[]): Found[] =>\n Arr.sort(found, byPosition);\n","import { Schema } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class Fu4Error extends taggedError<Fu4Error, { readonly brand: unique symbol }>()(\n \"Fu4Error\",\n {\n message: Schema.String,\n },\n) {}\n\nexport const failedWith =\n (message: string) =>\n (cause: unknown): Fu4Error =>\n Fu4Error.make({ message: `${message}: ${String(cause)}` });\n","import { loadAddon } from \"@masseater.dev/lint-host\";\nimport { Predicate } from \"effect\";\nimport type { Effect } from \"effect\";\n\nimport type { AuditConfig, Fu4Config } from \"#/shared/config/index.ts\";\nimport { failedWith } from \"#/shared/lib/errors.ts\";\nimport type { Fu4Error } from \"#/shared/lib/errors.ts\";\n\nexport interface NativeDiagnostic {\n readonly line: number;\n readonly column: number;\n readonly message: string;\n readonly kind: string;\n}\n\nexport interface NativeResult {\n readonly path: string;\n readonly diagnostics: readonly NativeDiagnostic[];\n}\n\nexport interface NativeAuditOptions extends Omit<AuditConfig, \"online\"> {\n readonly githubToken?: string;\n}\n\nexport interface NativeOptions {\n readonly config?: Fu4Config;\n readonly audit?: NativeAuditOptions;\n readonly traceparent?: string;\n}\n\nexport interface Native {\n readonly lintPaths: (\n root: string,\n paths: readonly string[],\n options: NativeOptions,\n ) => readonly NativeResult[];\n readonly flushTelemetry: () => Promise<void>;\n}\n\nconst isNative = (value: unknown): value is Native =>\n Predicate.hasProperty(value, \"lintPaths\") &&\n Predicate.isFunction(value.lintPaths) &&\n Predicate.hasProperty(value, \"flushTelemetry\") &&\n Predicate.isFunction(value.flushTelemetry);\n\nexport const native: Effect.Effect<Native, Fu4Error> = loadAddon({\n packageName: \"@r_masseater/fu4\",\n binary: \"fu4\",\n from: import.meta.url,\n isAddon: isNative,\n failWith: failedWith,\n});\n","import { callAddon, present, sortByPosition, traceparent } from \"@masseater.dev/lint-host\";\nimport { Array as Arr, Config, Effect, Option, Redacted, pipe } from \"effect\";\n\nimport type { AuditConfig, Diagnostic, Fu4Config } from \"#/shared/config/index.ts\";\nimport { failedWith } from \"#/shared/lib/errors.ts\";\nimport { native } from \"#/shared/native/index.ts\";\nimport type { NativeAuditOptions, NativeOptions, NativeResult } from \"#/shared/native/index.ts\";\n\nexport interface LintInput {\n readonly root: string;\n readonly files: readonly string[];\n readonly config?: Fu4Config;\n}\n\nconst diagnosticsOf = (result: NativeResult): readonly Diagnostic[] =>\n pipe(\n result.diagnostics,\n Arr.map((diagnostic): Diagnostic => ({\n path: result.path,\n line: diagnostic.line,\n column: diagnostic.column,\n rule: diagnostic.kind,\n message: diagnostic.message,\n severity: \"error\",\n })),\n );\n\nconst githubToken = Config.option(Config.Redacted(\"GH_TOKEN\")).pipe(\n Effect.map(Option.filter((token) => Redacted.value(token) !== \"\")),\n Effect.orDie,\n);\n\nconst auditOptions = Effect.fn(\"fu4.auditOptions\")(function* auditOptions(\n config: AuditConfig = {},\n) {\n const { online = true, ...rest } = config;\n if (!online) {\n return rest;\n }\n const token = yield* githubToken;\n return {\n ...rest,\n ...present(token, (value) => ({ githubToken: Redacted.value(value) })),\n } satisfies NativeAuditOptions;\n});\n\nexport const lint = Effect.fn(\"fu4.lint\")(function* lint(input: LintInput) {\n const parent = yield* traceparent;\n const config = input.config ?? {};\n const options: NativeOptions = {\n config,\n audit: yield* auditOptions(config.audit),\n ...present(parent, (value) => ({ traceparent: value })),\n };\n const results = yield* callAddon({\n addon: native,\n name: \"fu4\",\n files: input.files.length,\n call: (addon) => addon.lintPaths(input.root, input.files, options),\n failWith: failedWith,\n });\n return sortByPosition(pipe(results, Arr.flatMap(diagnosticsOf)));\n});\n","import { Array as Arr, Option, Predicate, pipe } from \"effect\";\n\nimport type { Fu4Config } from \"#/shared/config/index.ts\";\n\nconst WORKFLOWS = [\n \".github/workflows/*.yml\",\n \".github/workflows/*.yaml\",\n \":(glob)**/action.yml\",\n \":(glob)**/action.yaml\",\n \".github/dependabot.yml\",\n \".github/dependabot.yaml\",\n \".pre-commit-config.yaml\",\n \".pre-commit-hooks.yaml\",\n];\n\nconst NOT_OWNED = [\":(exclude,attr:linguist-vendored)\", \":(exclude,attr:linguist-generated)\"];\n\nconst hasSection = (value: unknown): value is { readonly fu4: Fu4Config } =>\n Predicate.hasProperty(value, \"fu4\") && Predicate.isObject(value.fu4);\n\nexport const fu4Section = (config: unknown): Fu4Config =>\n pipe(\n Option.liftPredicate(config, hasSection),\n Option.map((value) => value.fu4),\n Option.getOrElse((): Fu4Config => ({})),\n );\n\nexport interface PathspecInput {\n readonly config: Fu4Config;\n readonly patterns?: readonly string[];\n}\n\nexport const workflowPathspecs = ({\n config,\n patterns = WORKFLOWS,\n}: PathspecInput): readonly string[] => [\n ...patterns,\n ...NOT_OWNED,\n ...pipe(\n config.ignores ?? [],\n Arr.map((glob) => `:(glob,exclude)${glob}`),\n ),\n];\n"],"mappings":";;;;;;;;;AAEA,MAAa,UAAU,eACrB,GAAG,WAAW,KAAK,GAAG,OAAO,WAAW,IAAI,EAAE,GAAG,OAAO,WAAW,MAAM,EAAE,IAAI,WAAW,QAAQ,IAAI,WAAW,KAAK;;ACDxH,MAAM,SAAS,aACb,MAAM,MAAM,QAAQ,CAAC,CAAC,KACpB,MAAM,KAAK,eAAe,MAAM,GAChC,MAAM,KAAK,eAAe,OAAO,GACjC,MAAM,aAAa,EAAE,CACvB;AAEF,MAAa,iBAAiB,GAAG,QAAQ,SAAS,GAAG,QAAQ,OAAO,MAAM,QAAQ,QAAQ;AAE1F,MAAa,eAAe,WAA2B,GAAG,OAAO,GAAG,eAAe;;ACJnF,MAAMA,gBAAc,OAAO;AAE3B,IAAM,mBAAN,cAA+BA,cAAiE,CAAC,CAC/F,oBACA,EAAE,SAAS,OAAO,OAAO,CAC3B,CAAC,CAAC,C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W,EAAE,aAAa,MAAM,EAAE;CACxD;CACA,MAAM,UAAU,OAAO,UAAU;EAC/B,OAAO;EACP,MAAM;EACN,OAAO,MAAM,MAAM;EACnB,OAAO,UAAU,MAAM,UAAU,MAAM,MAAM,MAAM,OAAO,OAAO;EACjE,UAAU;CACZ,CAAC;CACD,OAAO,eAAe,KAAK,SAASA,MAAI,QAAQ,aAAa,CAAC,CAAC;AACjE,CAAC;;AC1DD,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,YAAY,CAAC,qCAAqC,oCAAoC;AAE5F,MAAM,cAAc,UAClB,UAAU,YAAY,OAAO,KAAK,KAAK,UAAU,SAAS,MAAM,GAAG;AAErE,MAAa,cAAc,WACzB,KACE,OAAO,cAAc,QAAQ,UAAU,GACvC,OAAO,KAAK,UAAU,MAAM,GAAG,GAC/B,OAAO,iBAA4B,CAAC,EAAE,CACxC;AAOF,MAAa,qBAAqB,EAChC,QACA,WAAW,gBAC2B;CACtC,GAAG;CACH,GAAG;CACH,GAAG,KACD,OAAO,WAAW,CAAC,GACnBC,MAAI,KAAK,SAAS,kBAAkB,MAAM,CAC5C;AACF"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
interface PathConfig {
|
|
2
|
-
readonly ignore?: readonly string[];
|
|
3
|
-
}
|
|
4
|
-
interface SelfHostedRunner {
|
|
5
|
-
readonly labels?: readonly string[];
|
|
6
|
-
}
|
|
7
|
-
type Persona = "regular" | "pedantic" | "auditor";
|
|
8
|
-
type Severity = "informational" | "low" | "medium" | "high";
|
|
9
|
-
type Confidence = Exclude<Severity, "informational">;
|
|
10
|
-
interface AuditConfig {
|
|
11
|
-
readonly rules?: Readonly<Record<string, unknown>>;
|
|
12
|
-
readonly persona?: Persona;
|
|
13
|
-
readonly minSeverity?: Severity;
|
|
14
|
-
readonly minConfidence?: Confidence;
|
|
15
|
-
readonly githubHost?: string;
|
|
16
|
-
readonly online?: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface Fu4Config {
|
|
19
|
-
readonly audit?: AuditConfig;
|
|
20
|
-
readonly selfHostedRunner?: SelfHostedRunner;
|
|
21
|
-
readonly configVariables?: readonly string[] | null;
|
|
22
|
-
readonly paths?: Readonly<Record<string, PathConfig>>;
|
|
23
|
-
readonly ignores?: readonly string[];
|
|
24
|
-
}
|
|
25
|
-
interface Diagnostic {
|
|
26
|
-
readonly path: string;
|
|
27
|
-
readonly line: number;
|
|
28
|
-
readonly column: number;
|
|
29
|
-
readonly rule: string;
|
|
30
|
-
readonly message: string;
|
|
31
|
-
readonly severity: "error";
|
|
32
|
-
}
|
|
33
|
-
export { PathConfig as a, Severity as c, Fu4Config as i, Confidence as n, Persona as o, Diagnostic as r, SelfHostedRunner as s, AuditConfig as t };
|
|
34
|
-
//# sourceMappingURL=types-DywsX0Gn.d.mts.map
|