@r_masseater/vite-plus-adopt 0.10.1 → 0.11.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 +1 -2
- package/dist/cli.mjs +2 -2
- package/dist/fsd.d.mts +1 -1
- package/dist/{index-DiN12XmL.d.mts → index-HXyQUvp_.d.mts} +106 -10
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{output-BdvTIQ-k.mjs → output-CeQIa6e5.mjs} +2 -2
- package/dist/output-CeQIa6e5.mjs.map +1 -0
- package/dist/postinstall.mjs +2 -2
- package/dist/{run-cli-BiPFbX9J.mjs → run-cli-DIrqPoTy.mjs} +2 -2
- package/dist/{run-cli-BiPFbX9J.mjs.map → run-cli-DIrqPoTy.mjs.map} +1 -1
- package/dist/{steiger-BX9S5pik.mjs → steiger-CbusAzht.mjs} +2 -283
- package/dist/steiger-CbusAzht.mjs.map +1 -0
- package/dist/{vpa-DHB6y2A5.mjs → vpa--jth0aBQ.mjs} +24 -54
- package/dist/vpa--jth0aBQ.mjs.map +1 -0
- package/package.json +8 -4
- package/skills/configure-checks/SKILL.md +8 -9
- package/dist/output-BdvTIQ-k.mjs.map +0 -1
- package/dist/steiger-BX9S5pik.mjs.map +0 -1
- package/dist/vpa-DHB6y2A5.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# vite-plus-adopt
|
|
2
2
|
|
|
3
|
-
`vpa` is a CLI that brings Betterleaks, actionlint, zizmor, commitlint, textlint,
|
|
3
|
+
`vpa` is a CLI that brings Betterleaks, actionlint, zizmor, commitlint, textlint, Steiger, fallow and agent skill installation into Vite+. Write their settings and your dependency rules in `vite.config.ts`, and `vpa` reads them from there.
|
|
4
4
|
Running `vpa` once with no arguments runs every configured check in parallel and prints the results together.
|
|
5
5
|
It also bundles a Feature-Sliced Design plugin for Steiger and @arethetypeswrong/core, both running on TypeScript 7 alone.
|
|
6
6
|
|
|
@@ -42,7 +42,6 @@ export default defineConfig({
|
|
|
42
42
|
ignores: ["CHANGELOG.md"],
|
|
43
43
|
rules: { "preset-ja-technical-writing": true },
|
|
44
44
|
},
|
|
45
|
-
markdownlint: { ignores: ["CHANGELOG.md"] },
|
|
46
45
|
fallow: { production: true, rules: { "unused-files": "error" } },
|
|
47
46
|
run: { tasks: { vpa: { command: "vpa", cache: false } } },
|
|
48
47
|
});
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as runCli } from "./run-cli-
|
|
3
|
-
import { t as runVpa } from "./vpa
|
|
2
|
+
import { t as runCli } from "./run-cli-DIrqPoTy.mjs";
|
|
3
|
+
import { t as runVpa } from "./vpa--jth0aBQ.mjs";
|
|
4
4
|
import { Effect, Path, Stdio } from "effect";
|
|
5
5
|
// src/app/cli.ts
|
|
6
6
|
runCli(Effect.gen(function* main() {
|
package/dist/fsd.d.mts
CHANGED
|
@@ -1,9 +1,111 @@
|
|
|
1
|
-
import { t as defineConfig } from "./steiger-BX9S5pik.mjs";
|
|
2
1
|
import { Effect, Path, Schema } from "effect";
|
|
3
2
|
import { TextlintRcConfig } from "@textlint/config-loader";
|
|
4
3
|
import { TextlintKernelRule } from "@textlint/kernel";
|
|
4
|
+
import "effector";
|
|
5
5
|
import { UserConfig } from "@commitlint/types";
|
|
6
|
-
|
|
6
|
+
interface File {
|
|
7
|
+
type: 'file';
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
interface Folder {
|
|
11
|
+
type: 'folder';
|
|
12
|
+
path: string;
|
|
13
|
+
children: Array<File | Folder>;
|
|
14
|
+
}
|
|
15
|
+
type BaseRuleOptions = Record<string, unknown>;
|
|
16
|
+
interface Rule<Context = unknown, RuleOptions extends BaseRuleOptions = BaseRuleOptions, RuleName extends string | number | symbol = string> {
|
|
17
|
+
/** Short code name for the rule. */
|
|
18
|
+
name: RuleName;
|
|
19
|
+
check: (this: Context, root: Folder, ruleOptions: RuleOptions) => RuleResult | Promise<RuleResult>;
|
|
20
|
+
}
|
|
21
|
+
interface RuleResult {
|
|
22
|
+
diagnostics: Array<PartialDiagnostic>;
|
|
23
|
+
}
|
|
24
|
+
interface PartialDiagnostic {
|
|
25
|
+
message: string;
|
|
26
|
+
fixes?: Array<Fix>;
|
|
27
|
+
location: {
|
|
28
|
+
/** Absolute path to a folder or a file that contains the issue. */
|
|
29
|
+
path: string;
|
|
30
|
+
/** 1-based line and column indexes of the start of the issue. */
|
|
31
|
+
start?: {
|
|
32
|
+
/** 1-based line index of the start of the issue. */
|
|
33
|
+
line?: number;
|
|
34
|
+
/** 1-based column index of the start of the issue. */
|
|
35
|
+
column?: number;
|
|
36
|
+
};
|
|
37
|
+
/** 1-based line and column indexes of the end of the issue. */
|
|
38
|
+
end?: {
|
|
39
|
+
/** 1-based line index of the end of the issue. */
|
|
40
|
+
line?: number;
|
|
41
|
+
/** 1-based column index of the end of the issue. */
|
|
42
|
+
column?: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
type Fix = {
|
|
47
|
+
type: 'rename';
|
|
48
|
+
path: string;
|
|
49
|
+
newName: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'create-file';
|
|
52
|
+
path: string;
|
|
53
|
+
content: string;
|
|
54
|
+
} | {
|
|
55
|
+
type: 'create-folder';
|
|
56
|
+
path: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'delete';
|
|
59
|
+
path: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: 'modify-file';
|
|
62
|
+
path: string;
|
|
63
|
+
content: string;
|
|
64
|
+
};
|
|
65
|
+
type Config$1<Rules extends Array<Rule>> = Array<ConfigObject<Rules> | Plugin<unknown, Rules> | GlobalIgnore>;
|
|
66
|
+
type Severity = 'off' | 'warn' | 'error';
|
|
67
|
+
/**
|
|
68
|
+
* Extracts a union of rule names from a given tuple of `Rule` objects.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* type Context = unknown
|
|
72
|
+
* type Options = BaseRuleOptions
|
|
73
|
+
* type Result = RuleNames<[Rule<Context, Options, 'foo'>, Rule<Context, Options, 'bar'>]>
|
|
74
|
+
* // Result is 'foo' | 'bar'
|
|
75
|
+
*/
|
|
76
|
+
type RuleNames<Rules extends Array<Rule>> = Rules[number]['name'];
|
|
77
|
+
type LookUpByName<Union, Name> = Union extends {
|
|
78
|
+
name: Name;
|
|
79
|
+
} ? Union : never;
|
|
80
|
+
/**
|
|
81
|
+
* Looks up a rule in a tuple of rules by name and then extracts that rule's options type.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* type Context = unknown
|
|
85
|
+
* type Rules = [Rule<Context, { foo: string }, 'foo'>, Rule<Context, { bar: number }, 'bar'>]
|
|
86
|
+
* type Result = OptionsForRule<Rules, 'foo'>
|
|
87
|
+
* // Result is { foo: string }
|
|
88
|
+
*/
|
|
89
|
+
type OptionsForRule<Rules extends Array<Rule>, RuleName extends RuleNames<Rules>> = LookUpByName<Rules[number], RuleName> extends Rule<unknown, infer Options> ? Options : never;
|
|
90
|
+
interface ConfigObject<Rules extends Array<Rule>> {
|
|
91
|
+
/** Globs of files to check. */
|
|
92
|
+
files?: Array<string>;
|
|
93
|
+
/** Globs of files to ignore. */
|
|
94
|
+
ignores?: Array<string>;
|
|
95
|
+
/** Severity of rules and individual rule options. */
|
|
96
|
+
rules: { [key in RuleNames<Rules>]?: Severity | [Severity, OptionsForRule<Rules, key>]; };
|
|
97
|
+
}
|
|
98
|
+
type GlobalIgnore = {
|
|
99
|
+
ignores: Array<string>;
|
|
100
|
+
};
|
|
101
|
+
interface Plugin<Context = unknown, Rules extends Array<Rule<Context>> = Array<Rule>> {
|
|
102
|
+
meta: {
|
|
103
|
+
name: string;
|
|
104
|
+
version: string;
|
|
105
|
+
};
|
|
106
|
+
ruleDefinitions: Rules;
|
|
107
|
+
}
|
|
108
|
+
declare function defineConfig<Rules extends Array<Rule> = Array<Rule>>(config: Config$1<Rules>): Config$1<Rules>;
|
|
7
109
|
declare const VpToolsError_base: Schema.Class<VpToolsError, Schema.TaggedStruct<"VpToolsError", {
|
|
8
110
|
readonly kind: Schema.Literals<readonly ["config-missing", "tool-failed", "checks-failed"]>;
|
|
9
111
|
readonly message: Schema.String;
|
|
@@ -67,11 +169,6 @@ interface TextlintConfig extends TextlintRcConfig {
|
|
|
67
169
|
readonly presets?: Readonly<Record<string, TextlintPreset>>;
|
|
68
170
|
readonly sources?: readonly TextlintSource[];
|
|
69
171
|
}
|
|
70
|
-
interface MarkdownlintConfig {
|
|
71
|
-
readonly config?: Configuration;
|
|
72
|
-
readonly customRules?: readonly Rule[];
|
|
73
|
-
readonly ignores?: readonly string[];
|
|
74
|
-
}
|
|
75
172
|
interface SteigerSection {
|
|
76
173
|
readonly paths: readonly string[];
|
|
77
174
|
readonly rules: SteigerConfig;
|
|
@@ -94,7 +191,6 @@ interface ToolSections {
|
|
|
94
191
|
readonly commitlint?: CommitlintConfig;
|
|
95
192
|
readonly dependencyRules?: DependencyRules;
|
|
96
193
|
readonly fallow?: FallowConfig;
|
|
97
|
-
readonly markdownlint?: MarkdownlintConfig;
|
|
98
194
|
readonly skills?: SkillsSection;
|
|
99
195
|
readonly steiger?: SteigerSection;
|
|
100
196
|
readonly textlint?: TextlintConfig;
|
|
@@ -102,5 +198,5 @@ interface ToolSections {
|
|
|
102
198
|
declare module "vite" {
|
|
103
199
|
interface UserConfig extends ToolSections {}
|
|
104
200
|
}
|
|
105
|
-
export { FallowConfig as a,
|
|
106
|
-
//# sourceMappingURL=index-
|
|
201
|
+
export { FallowConfig as a, TextlintConfig as c, VpToolsError as d, DependencyRules as i, ToolSections as l, BetterleaksRule as n, SteigerConfig as o, CommitlintConfig as r, SteigerSection as s, BetterleaksConfig as t, SkillsSection as u };
|
|
202
|
+
//# sourceMappingURL=index-HXyQUvp_.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FallowConfig, c as
|
|
1
|
+
import { a as FallowConfig, c as TextlintConfig, d as VpToolsError, i as DependencyRules, l as ToolSections, n as BetterleaksRule, o as SteigerConfig, r as CommitlintConfig, s as SteigerSection, t as BetterleaksConfig, u as SkillsSection } from "./index-HXyQUvp_.mjs";
|
|
2
2
|
import { Effect, FileSystem, Path, PlatformError, Schema, Stdio } from "effect";
|
|
3
3
|
import { ChildProcessSpawner } from "effect/process";
|
|
4
4
|
/** @internal */
|
|
@@ -16,5 +16,5 @@ export declare const runVpa: {
|
|
|
16
16
|
(args: readonly string[]): (root: string) => CommandEffect;
|
|
17
17
|
(root: string, args: readonly string[]): CommandEffect;
|
|
18
18
|
};
|
|
19
|
-
export { type BetterleaksConfig, type BetterleaksRule, type CommitlintConfig, type DependencyRules, type FallowConfig, type
|
|
19
|
+
export { type BetterleaksConfig, type BetterleaksRule, type CommitlintConfig, type DependencyRules, type FallowConfig, type SkillsSection, type SteigerConfig, type SteigerSection, type TextlintConfig, type ToolSections, VpToolsError };
|
|
20
20
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as loadViteConfig, t as runVpa } from "./vpa
|
|
2
|
-
import { d as VpToolsError } from "./output-
|
|
1
|
+
import { n as loadViteConfig, t as runVpa } from "./vpa--jth0aBQ.mjs";
|
|
2
|
+
import { d as VpToolsError } from "./output-CeQIa6e5.mjs";
|
|
3
3
|
export { VpToolsError, loadViteConfig, runVpa };
|
|
@@ -119,7 +119,7 @@ const PLATFORMS = [
|
|
|
119
119
|
const VendorDirectory = Context.Reference("vite-plus-adopt/VendorDirectory", { defaultValue: () => `${import.meta.dirname}/../vendor` });
|
|
120
120
|
// src/entities/binary/model/install.ts
|
|
121
121
|
const EXECUTABLE = 493;
|
|
122
|
-
const NOT_INSTALLED = "was not installed.
|
|
122
|
+
const NOT_INSTALLED = "was not installed. Let your package manager run the postinstall of @r_masseater/vite-plus-adopt (allowBuilds in pnpm-workspace.yaml, trustedDependencies in package.json for Bun) and install again.";
|
|
123
123
|
const currentPlatform = () => Array.findFirst(PLATFORMS, (platform) => platform === `${process.platform}-${process.arch}`);
|
|
124
124
|
const executableName = (binary, platform) => {
|
|
125
125
|
if (platform === "win32-x64") return `${binary.name}.exe`;
|
|
@@ -220,4 +220,4 @@ const finish = (report) => {
|
|
|
220
220
|
};
|
|
221
221
|
export { ACTIONLINT as a, readTarGz as c, VpToolsError as d, checksFailed as f, installBinary as i, runCaptured as l, toolFailed as m, writeTo as n, BETTERLEAKS as o, configMissing as p, runVendored as r, ZIZMOR as s, finish as t, attempt as u };
|
|
222
222
|
|
|
223
|
-
//# sourceMappingURL=output-
|
|
223
|
+
//# sourceMappingURL=output-CeQIa6e5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-CeQIa6e5.mjs","names":["Str","Arr","encodeHex","Rec","DATA_FIRST_ARITY","Fn","Fn"],"sources":["../src/shared/lib/errors.ts","../src/shared/lib/attempt.ts","../src/shared/lib/process.ts","../src/shared/lib/tar-gz.ts","../src/entities/binary/model/binaries.ts","../src/entities/binary/model/vendor.ts","../src/entities/binary/model/install.ts","../src/entities/binary/model/vendored.ts","../src/shared/lib/output.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nconst taggedError = Schema.TaggedError;\n\nexport class VpToolsError extends taggedError<VpToolsError, { readonly brand: unique symbol }>()(\n \"VpToolsError\",\n {\n kind: Schema.Literals([\"config-missing\", \"tool-failed\", \"checks-failed\"]),\n message: Schema.String,\n },\n) {}\n\nexport const configMissing = (message: string): VpToolsError =>\n VpToolsError.make({ kind: \"config-missing\", message });\n\nexport const checksFailed = (message: string): VpToolsError =>\n VpToolsError.make({ kind: \"checks-failed\", message });\n\nexport const toolFailed =\n (tool: string) =>\n (cause: unknown): VpToolsError =>\n VpToolsError.make({ kind: \"tool-failed\", message: `${tool} failed: ${String(cause)}` });\n","import { Effect } from \"effect\";\n\nimport { toolFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\n\nexport const attempt =\n (tool: string) =>\n <Value>(run: () => PromiseLike<Value>): Effect.Effect<Value, VpToolsError> =>\n Effect.tryPromise({ try: run, catch: toolFailed(tool) });\n","import { Effect, Option, Stream, pipe } from \"effect\";\nimport type { PlatformError } from \"effect\";\nimport { ChildProcess, ChildProcessSpawner } from \"effect/process\";\n\nimport type { Report } from \"./report.ts\";\n\nconst SUCCESS = 0;\n\n/** @internal */\nexport interface Invocation {\n readonly root: string;\n readonly file: string;\n readonly args: readonly string[];\n readonly env?: Readonly<Record<string, string>>;\n readonly input?: string | undefined;\n readonly output?: \"all\" | \"stdout\";\n}\n\nconst stdinOf = (input: string | undefined): ChildProcess.CommandInput =>\n pipe(\n Option.fromNullishOr(input),\n Option.match({\n onNone: (): ChildProcess.CommandInput => \"ignore\",\n onSome: (text) => Stream.make(new TextEncoder().encode(text)),\n }),\n );\n\n/** @internal */\nexport const runCaptured = ({\n root,\n file,\n args,\n env = {},\n input,\n output = \"all\",\n}: Invocation): Effect.Effect<\n Report,\n PlatformError.PlatformError,\n ChildProcessSpawner.ChildProcessSpawner\n> =>\n Effect.gen(function* run() {\n const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;\n const handle = yield* spawner.spawn(\n ChildProcess.make(file, args, { cwd: root, env, extendEnv: true, stdin: stdinOf(input) }),\n );\n const [text, exitCode] = yield* Effect.all(\n [handle[output].pipe(Stream.decodeText, Stream.mkString), handle.exitCode],\n { concurrency: \"unbounded\" },\n );\n return { valid: exitCode === SUCCESS, output: text };\n }).pipe(Effect.scoped);\n","import { Effect, Stream } from \"effect\";\nimport { Tar } from \"effect/encoding\";\n\nimport { attempt } from \"./attempt.ts\";\nimport { toolFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\n\n/** @internal */\nexport interface TarEntry {\n readonly header: Tar.Header;\n readonly bytes: Uint8Array;\n}\n\nconst gunzipped = (data: Uint8Array): Effect.Effect<ArrayBuffer, VpToolsError> => {\n const compressed = new Blob([new Uint8Array(data)]).stream();\n return attempt(\"gunzip\")(() =>\n new Response(compressed.pipeThrough(new DecompressionStream(\"gzip\"))).arrayBuffer(),\n );\n};\n\nconst untarred = (archive: ArrayBuffer): Effect.Effect<readonly TarEntry[], VpToolsError> =>\n Stream.make(new Uint8Array(archive)).pipe(\n Stream.pipeThroughChannel(Tar.decode()),\n Stream.mapEffect(({ header, body }) =>\n Effect.map(Stream.mkUint8Array(body), (bytes): TarEntry => ({ header, bytes })),\n ),\n Stream.runCollect,\n Effect.mapError(toolFailed(\"untar\")),\n );\n\n/** @internal */\nexport const readTarGz = (data: Uint8Array): Effect.Effect<readonly TarEntry[], VpToolsError> =>\n Effect.flatMap(gunzipped(data), untarred);\n","import { String as Str } from \"effect\";\n\nexport type Platform = \"darwin-arm64\" | \"darwin-x64\" | \"linux-arm64\" | \"linux-x64\" | \"win32-x64\";\n\nexport type Archive = \"tar.gz\" | \"zip\";\n\nexport interface BinaryAsset {\n readonly url: string;\n readonly sha256: string;\n readonly archive: Archive;\n}\n\nexport interface Binary {\n readonly name: string;\n readonly version: string;\n readonly assets: Readonly<Record<Platform, BinaryAsset>>;\n}\n\nconst archiveOf = (file: string): Archive => {\n if (Str.endsWith(\".zip\")(file)) {\n return \"zip\";\n }\n return \"tar.gz\";\n};\n\nconst releaseAsset =\n (release: string) =>\n (file: string, sha256: string): BinaryAsset => ({\n url: `${release}/${file}`,\n sha256,\n archive: archiveOf(file),\n });\n\nconst betterleaksAsset = releaseAsset(\n \"https://github.com/betterleaks/betterleaks/releases/download/v2.0.0-rc.7\",\n);\n\nexport const BETTERLEAKS: Binary = {\n name: \"betterleaks\",\n version: \"2.0.0-rc.7\",\n assets: {\n \"darwin-arm64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_darwin_arm64.tar.gz\",\n \"d5052b4789752e3d9995c0b71a5b531aea747455ba4f8d1534c90b41e03f906c\",\n ),\n \"darwin-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_darwin_x64.tar.gz\",\n \"b3be0c6b4b91036a6d8b98e47642470a5a872d4bff08b8ee34348e9baf1e3434\",\n ),\n \"linux-arm64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_linux_arm64.tar.gz\",\n \"32fcd5a77d7c3c2d97cc615c5d70344d0c62b5a36f38568ce8ec72e62783acad\",\n ),\n \"linux-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_linux_x64.tar.gz\",\n \"230ef42dc3a0ee35e5148b7b4e9280224a412ef100cd4e74d3d6681d94e6ccb8\",\n ),\n \"win32-x64\": betterleaksAsset(\n \"betterleaks_2.0.0-rc.7_windows_x64.zip\",\n \"36db668ba12b55537a11cc45cd61565ab7f4f23ce606e0827206f49048a5183e\",\n ),\n },\n};\n\nconst actionlintAsset = releaseAsset(\n \"https://github.com/rhysd/actionlint/releases/download/v1.7.12\",\n);\n\nexport const ACTIONLINT: Binary = {\n name: \"actionlint\",\n version: \"1.7.12\",\n assets: {\n \"darwin-arm64\": actionlintAsset(\n \"actionlint_1.7.12_darwin_arm64.tar.gz\",\n \"aba9ced2dee8d27fecca3dc7feb1a7f9a52caefa1eb46f3271ea66b6e0e6953f\",\n ),\n \"darwin-x64\": actionlintAsset(\n \"actionlint_1.7.12_darwin_amd64.tar.gz\",\n \"5b44c3bc2255115c9b69e30efc0fecdf498fdb63c5d58e17084fd5f16324c644\",\n ),\n \"linux-arm64\": actionlintAsset(\n \"actionlint_1.7.12_linux_arm64.tar.gz\",\n \"325e971b6ba9bfa504672e29be93c24981eeb1c07576d730e9f7c8805afff0c6\",\n ),\n \"linux-x64\": actionlintAsset(\n \"actionlint_1.7.12_linux_amd64.tar.gz\",\n \"8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8\",\n ),\n \"win32-x64\": actionlintAsset(\n \"actionlint_1.7.12_windows_amd64.zip\",\n \"6e7241b51e6817ea6a047693d8e6fed13b31819c9a0dd6c5a726e1592d22f6e9\",\n ),\n },\n};\n\nconst zizmorAsset = releaseAsset(\"https://github.com/zizmorcore/zizmor/releases/download/v1.32.0\");\n\nexport const ZIZMOR: Binary = {\n name: \"zizmor\",\n version: \"1.32.0\",\n assets: {\n \"darwin-arm64\": zizmorAsset(\n \"zizmor-aarch64-apple-darwin.tar.gz\",\n \"6efed18c4539a663fd3c851a2be9533fd8456c4e646d9416206da059154a0d3c\",\n ),\n \"darwin-x64\": zizmorAsset(\n \"zizmor-x86_64-apple-darwin.tar.gz\",\n \"6983143c719ada6845a69cc4dd2bacc215f971662fecd8bbd2678388e5ce5969\",\n ),\n \"linux-arm64\": zizmorAsset(\n \"zizmor-aarch64-unknown-linux-gnu.tar.gz\",\n \"cb152b207f815116d7fa1c1ee4614f61578803351395052908095e79adfd9fd0\",\n ),\n \"linux-x64\": zizmorAsset(\n \"zizmor-x86_64-unknown-linux-gnu.tar.gz\",\n \"bb110cc765eca9cd7efb2e284a956be5974c60027b0970f16397d86208a9957b\",\n ),\n \"win32-x64\": zizmorAsset(\n \"zizmor-x86_64-pc-windows-msvc.zip\",\n \"d284a16e09d9df4ce2c000357e7b59bd531be093bea5718a1ce225b449b59d49\",\n ),\n },\n};\n\nexport const PLATFORMS: readonly Platform[] = [\n \"darwin-arm64\",\n \"darwin-x64\",\n \"linux-arm64\",\n \"linux-x64\",\n \"win32-x64\",\n];\n","import { Context } from \"effect\";\n\nexport const VendorDirectory = Context.Reference<string>(\"vite-plus-adopt/VendorDirectory\", {\n defaultValue: () => `${import.meta.dirname}/../vendor`,\n});\n","import { Array as Arr, Effect, FileSystem, Path, pipe, Record as Rec } from \"effect\";\nimport type { Option, PlatformError } from \"effect\";\nimport { encode as encodeHex } from \"effect/encoding/Hex\";\nimport { HttpClient } from \"effect/http\";\nimport { unzip } from \"fflate\";\n\nimport { attempt } from \"#/shared/lib/attempt.ts\";\nimport { configMissing, toolFailed } from \"#/shared/lib/errors.ts\";\nimport type { VpToolsError } from \"#/shared/lib/errors.ts\";\nimport { readTarGz } from \"#/shared/lib/tar-gz.ts\";\n\nimport { PLATFORMS } from \"./binaries.ts\";\nimport type { Binary, BinaryAsset, Platform } from \"./binaries.ts\";\nimport { VendorDirectory } from \"./vendor.ts\";\n\ntype Entries = ReadonlyMap<string, Uint8Array>;\n\ninterface Download {\n readonly binary: Binary;\n readonly platform: Platform;\n readonly data: Uint8Array;\n}\n\ntype InstallServices = FileSystem.FileSystem | Path.Path;\n\ntype InstallError = VpToolsError | PlatformError.PlatformError;\n\nconst EXECUTABLE = 0o755;\n\nconst NOT_INSTALLED =\n \"was not installed. Let your package manager run the postinstall of @r_masseater/vite-plus-adopt (allowBuilds in pnpm-workspace.yaml, trustedDependencies in package.json for Bun) and install again.\";\n\nconst currentPlatform = (): Option.Option<Platform> =>\n Arr.findFirst(PLATFORMS, (platform) => platform === `${process.platform}-${process.arch}`);\n\nconst executableName = (binary: Binary, platform: Platform): string => {\n if (platform === \"win32-x64\") {\n return `${binary.name}.exe`;\n }\n return binary.name;\n};\n\nconst assetOf = ({ binary, platform }: Download): BinaryAsset => binary.assets[platform];\n\nconst download = (\n binary: Binary,\n asset: BinaryAsset,\n): Effect.Effect<Uint8Array, VpToolsError, HttpClient.HttpClient> =>\n Effect.gen(function* fetchAsset() {\n const httpClient = yield* HttpClient.HttpClient;\n const client = HttpClient.filterStatusOk(httpClient);\n const response = yield* client.get(asset.url);\n const body = yield* response.arrayBuffer;\n return new Uint8Array(body);\n }).pipe(Effect.mapError(toolFailed(binary.name)));\n\nconst verify = (fetched: Download): Effect.Effect<Download, VpToolsError> => {\n const asset = assetOf(fetched);\n const failed = toolFailed(fetched.binary.name);\n const data = new Uint8Array(fetched.data);\n return attempt(fetched.binary.name)(() => crypto.subtle.digest(\"SHA-256\", data)).pipe(\n Effect.map((digest) => encodeHex(new Uint8Array(digest))),\n Effect.filterOrFail(\n (digest) => digest === asset.sha256,\n (digest) => failed(`${asset.url} has SHA-256 ${digest}, expected ${asset.sha256}`),\n ),\n Effect.as(fetched),\n );\n};\n\nconst tarEntries = (data: Uint8Array): Effect.Effect<Entries, VpToolsError> =>\n readTarGz(data).pipe(\n Effect.map(Arr.map(({ header, bytes }) => [header.path, bytes] as const)),\n Effect.map((entries): Entries => new Map(entries)),\n );\n\nconst zipEntries = (data: Uint8Array): Effect.Effect<Entries, VpToolsError> =>\n Effect.callback<Entries, VpToolsError>((resume) => {\n unzip(data, (failure, files) => {\n if (failure === null) {\n const entries: Entries = new Map(Rec.toEntries(files));\n resume(Effect.succeed(entries));\n return;\n }\n resume(Effect.fail(toolFailed(\"unzip\")(failure)));\n });\n });\n\nconst entriesOf = (\n asset: BinaryAsset,\n): ((data: Uint8Array) => Effect.Effect<Entries, VpToolsError>) => {\n if (asset.archive === \"zip\") {\n return zipEntries;\n }\n return tarEntries;\n};\n\nconst extract = (fetched: Download): Effect.Effect<Uint8Array, VpToolsError> => {\n const asset = assetOf(fetched);\n const executable = executableName(fetched.binary, fetched.platform);\n return entriesOf(asset)(fetched.data).pipe(\n Effect.flatMap((files) => Effect.fromNullishOr(files.get(executable))),\n Effect.mapError(() => toolFailed(fetched.binary.name)(`${asset.url} has no ${executable}`)),\n );\n};\n\nconst binaryPath = (binary: Binary, platform: Platform): Effect.Effect<string, never, Path.Path> =>\n Effect.gen(function* vendoredPath() {\n const path = yield* Path.Path;\n const vendor = yield* VendorDirectory;\n return path.join(vendor, binary.name, binary.version, executableName(binary, platform));\n });\n\nconst place = (\n fetched: Download,\n bytes: Uint8Array,\n): Effect.Effect<void, PlatformError.PlatformError, InstallServices> =>\n Effect.gen(function* write() {\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const file = yield* binaryPath(fetched.binary, fetched.platform);\n yield* fs.makeDirectory(path.dirname(file), { recursive: true });\n yield* Effect.scoped(\n Effect.gen(function* stage() {\n const staging = yield* fs.makeTempDirectoryScoped({\n directory: path.dirname(file),\n prefix: \".partial-\",\n });\n const partial = path.join(staging, path.basename(file));\n yield* fs.writeFile(partial, bytes);\n yield* fs.chmod(partial, EXECUTABLE);\n yield* fs.rename(partial, file);\n }),\n );\n });\n\nconst unpack = (fetched: Download): Effect.Effect<void, InstallError, InstallServices> =>\n verify(fetched).pipe(\n Effect.flatMap(extract),\n Effect.flatMap((bytes) => place(fetched, bytes)),\n );\n\nconst platformOf = (binary: Binary): Effect.Effect<Platform, VpToolsError> =>\n pipe(\n currentPlatform(),\n Effect.fromOption,\n Effect.mapError(() =>\n toolFailed(binary.name)(`no release for ${process.platform}-${process.arch}`),\n ),\n );\n\nconst isPlaced = (\n binary: Binary,\n platform: Platform,\n): Effect.Effect<boolean, PlatformError.PlatformError, InstallServices> =>\n Effect.gen(function* placed() {\n const fs = yield* FileSystem.FileSystem;\n const file = yield* binaryPath(binary, platform);\n return yield* fs.exists(file);\n });\n\n/** @internal */\nexport const installBinary = (\n binary: Binary,\n): Effect.Effect<\n void,\n VpToolsError | PlatformError.PlatformError,\n FileSystem.FileSystem | HttpClient.HttpClient | Path.Path\n> =>\n Effect.gen(function* install() {\n const platform = yield* platformOf(binary);\n if (yield* isPlaced(binary, platform)) {\n return;\n }\n const data = yield* download(binary, binary.assets[platform]);\n yield* unpack({ binary, platform, data });\n });\n\n/** @internal */\nexport const locateBinary = (\n binary: Binary,\n): Effect.Effect<\n string,\n VpToolsError | PlatformError.PlatformError,\n FileSystem.FileSystem | Path.Path\n> =>\n Effect.gen(function* locate() {\n const platform = yield* platformOf(binary);\n if (!(yield* isPlaced(binary, platform))) {\n return yield* configMissing(`${binary.name} ${binary.version} ${NOT_INSTALLED}`);\n }\n return yield* binaryPath(binary, platform);\n });\n","import { Effect, Function as Fn } from \"effect\";\nimport type { FileSystem, Path, PlatformError } from \"effect\";\nimport type { ChildProcessSpawner } from \"effect/process\";\n\nimport type { VpToolsError } from \"#/shared/lib/errors.ts\";\nimport { runCaptured } from \"#/shared/lib/process.ts\";\nimport type { Invocation } from \"#/shared/lib/process.ts\";\nimport type { Report } from \"#/shared/lib/report.ts\";\n\nimport type { Binary } from \"./binaries.ts\";\nimport { locateBinary } from \"./install.ts\";\n\nconst DATA_FIRST_ARITY = 2;\n\n/** @internal */\nexport const runVendored: {\n (\n invocation: Omit<Invocation, \"file\">,\n ): (\n binary: Binary,\n ) => Effect.Effect<\n Report,\n VpToolsError | PlatformError.PlatformError,\n ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | Path.Path\n >;\n (\n binary: Binary,\n invocation: Omit<Invocation, \"file\">,\n ): Effect.Effect<\n Report,\n VpToolsError | PlatformError.PlatformError,\n ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | Path.Path\n >;\n} = Fn.dual(\n DATA_FIRST_ARITY,\n (\n binary: Binary,\n invocation: Omit<Invocation, \"file\">,\n ): Effect.Effect<\n Report,\n VpToolsError | PlatformError.PlatformError,\n ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem | Path.Path\n > => locateBinary(binary).pipe(Effect.flatMap((file) => runCaptured({ ...invocation, file }))),\n);\n","import { Effect, Stdio, Stream, Function as Fn } from \"effect\";\n\nimport { checksFailed } from \"./errors.ts\";\nimport type { VpToolsError } from \"./errors.ts\";\nimport type { Report } from \"./report.ts\";\n\nconst DATA_FIRST_ARITY = 2;\n\n/** @internal */\nexport type Sink = \"stdout\" | \"stderr\";\n\n/** @internal */\nexport const writeTo: {\n (text: string): (sink: Sink) => Effect.Effect<void, never, Stdio.Stdio>;\n (sink: Sink, text: string): Effect.Effect<void, never, Stdio.Stdio>;\n} = Fn.dual(DATA_FIRST_ARITY, (sink: Sink, text: string): Effect.Effect<void, never, Stdio.Stdio> =>\n Effect.gen(function* write() {\n const stdio = yield* Stdio.Stdio;\n yield* Stream.make(text).pipe(Stream.run(stdio[sink]()), Effect.orDie);\n }),\n);\n\n/** @internal */\nexport const finish = (report: Report): Effect.Effect<void, VpToolsError, Stdio.Stdio> => {\n if (!report.valid) {\n return Effect.fail(checksFailed(report.output));\n }\n if (report.output === \"\") {\n return Effect.void;\n }\n return writeTo(\"stdout\", `${report.output}\\n`);\n};\n"],"mappings":";;;;;;;AAEA,MAAM,cAAc,OAAO;AAE3B,IAAa,eAAb,cAAkC,YAA6D,CAAC,CAC9F,gBACA;CACE,MAAM,OAAO,SAAS;EAAC;EAAkB;EAAe;CAAe,CAAC;CACxE,SAAS,OAAO;AAClB,CACF,CAAC,CAAC,CAAC;AAEH,MAAa,iBAAiB,YAC5B,aAAa,KAAK;CAAE,MAAM;CAAkB;AAAQ,CAAC;AAEvD,MAAa,gBAAgB,YAC3B,aAAa,KAAK;CAAE,MAAM;CAAiB;AAAQ,CAAC;AAEtD,MAAa,cACV,UACA,UACC,aAAa,KAAK;CAAE,MAAM;CAAe,SAAS,GAAG,KAAK,WAAW,OAAO,KAAK;AAAI,CAAC;;AChB1F,MAAa,WACV,UACO,QACN,OAAO,WAAW;CAAE,KAAK;CAAK,OAAO,WAAW,IAAI;AAAE,CAAC;;ACF3D,MAAM,UAAU;AAYhB,MAAM,WAAW,UACf,KACE,OAAO,cAAc,KAAK,GAC1B,OAAO,MAAM;CACX,cAAyC;CACzC,SAAS,SAAS,OAAO,KAAK,IAAI,YAAY,CAAC,CAAC,OAAO,IAAI,CAAC;AAC9D,CAAC,CACH;;AAGF,MAAa,eAAe,EAC1B,MACA,MACA,MACA,MAAM,CAAC,GACP,OACA,SAAS,YAMT,OAAO,IAAI,UAAU,MAAM;CAEzB,MAAM,SAAS,QAAO,OADC,oBAAoB,oBAAA,CACb,MAC5B,aAAa,KAAK,MAAM,MAAM;EAAE,KAAK;EAAM;EAAK,WAAW;EAAM,OAAO,QAAQ,KAAK;CAAE,CAAC,CAC1F;CACA,MAAM,CAAC,MAAM,YAAY,OAAO,OAAO,IACrC,CAAC,OAAO,OAAO,CAAC,KAAK,OAAO,YAAY,OAAO,QAAQ,GAAG,OAAO,QAAQ,GACzE,EAAE,aAAa,YAAY,CAC7B;CACA,OAAO;EAAE,OAAO,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ACTIONLINT, i as installBinary, o as BETTERLEAKS, s as ZIZMOR } from "./output-CeQIa6e5.mjs";
|
|
2
|
+
import { t as runCli } from "./run-cli-DIrqPoTy.mjs";
|
|
3
3
|
import { Effect, Layer } from "effect";
|
|
4
4
|
import { FetchHttpClient } from "effect/http";
|
|
5
5
|
// src/app/postinstall.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as VpToolsError, n as writeTo } from "./output-
|
|
1
|
+
import { d as VpToolsError, n as writeTo } from "./output-CeQIa6e5.mjs";
|
|
2
2
|
import { Cause, Effect, Layer, Option, Schema, pipe } from "effect";
|
|
3
3
|
import { runMain } from "@effect/platform-node-shared/NodeRuntime";
|
|
4
4
|
import { NodeChildProcessSpawner, NodeFileSystem, NodePath, NodeStdio } from "@effect/platform-node-shared";
|
|
@@ -21,4 +21,4 @@ const runCli = (program) => {
|
|
|
21
21
|
};
|
|
22
22
|
export { runCli as t };
|
|
23
23
|
|
|
24
|
-
//# sourceMappingURL=run-cli-
|
|
24
|
+
//# sourceMappingURL=run-cli-DIrqPoTy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cli-
|
|
1
|
+
{"version":3,"file":"run-cli-DIrqPoTy.mjs","names":[],"sources":["../src/shared/lib/node-services.ts","../src/app/run-cli.ts"],"sourcesContent":["import {\n NodeChildProcessSpawner,\n NodeFileSystem,\n NodePath,\n NodeStdio,\n} from \"@effect/platform-node-shared\";\nimport { Layer } from \"effect\";\n\n/** @internal */\nexport const nodeServicesLayer = Layer.provideMerge(\n NodeChildProcessSpawner.layer,\n Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer),\n);\n","import { runMain } from \"@effect/platform-node-shared/NodeRuntime\";\nimport { Cause, Effect, Layer, Option, Schema, pipe } from \"effect\";\nimport type { Stdio } from \"effect\";\n\nimport type { CommandServices } from \"#/shared/lib/command.ts\";\nimport { VpToolsError } from \"#/shared/lib/errors.ts\";\nimport { nodeServicesLayer } from \"#/shared/lib/node-services.ts\";\nimport { writeTo } from \"#/shared/lib/output.ts\";\n\nconst reportFailure = <Failure>(\n cause: Cause.Cause<Failure>,\n): Effect.Effect<void, never, Stdio.Stdio> => {\n const message = pipe(\n Cause.findErrorOption(cause),\n Option.filter(Schema.is(VpToolsError)),\n Option.match({\n onNone: () => Cause.pretty(cause),\n onSome: (error) => error.message,\n }),\n );\n return writeTo(\"stderr\", `${message}\\n`);\n};\n\n/** @internal */\nexport const runCli = <Failure>(program: Effect.Effect<void, Failure, CommandServices>): void => {\n const reported = program.pipe(Effect.tapCause(reportFailure));\n const main = Layer.build(nodeServicesLayer).pipe(\n Effect.flatMap((services) => Effect.provideContext(reported, services)),\n Effect.scoped,\n );\n runMain(main, { disableErrorReporting: true });\n};\n"],"mappings":";;;;;;AASA,MAAa,oBAAoB,MAAM,aACrC,wBAAwB,OACxB,MAAM,SAAS,eAAe,OAAO,SAAS,OAAO,UAAU,KAAK,CACtE;;ACHA,MAAM,iBACJ,UAC4C;CAC5C,MAAM,UAAU,KACd,MAAM,gBAAgB,KAAK,GAC3B,OAAO,OAAO,OAAO,GAAG,YAAY,CAAC,GACrC,OAAO,MAAM;EACX,cAAc,MAAM,OAAO,KAAK;EAChC,SAAS,UAAU,MAAM;CAC3B,CAAC,CACH;CACA,OAAO,QAAQ,UAAU,GAAG,QAAQ,GAAG;AACzC;;AAGA,MAAa,UAAmB,YAAiE;CAC/F,MAAM,WAAW,QAAQ,KAAK,OAAO,SAAS,aAAa,CAAC;CAC5D,MAAM,OAAO,MAAM,MAAM,iBAAiB,CAAC,CAAC,KAC1C,OAAO,SAAS,aAAa,OAAO,eAAe,UAAU,QAAQ,CAAC,GACtE,OAAO,MACT;CACA,QAAQ,MAAM,EAAE,uBAAuB,KAAK,CAAC;AAC/C"}
|
|
@@ -5939,287 +5939,6 @@ var linter = {
|
|
|
5939
5939
|
return [runRulesFx.doneData, () => watcher.close()];
|
|
5940
5940
|
}
|
|
5941
5941
|
};
|
|
5942
|
-
|
|
5943
|
-
var [File$1] = [
|
|
5944
|
-
72,
|
|
5945
|
-
() => [],
|
|
5946
|
-
["", ""]
|
|
5947
|
-
];
|
|
5948
|
-
var [Folder] = [
|
|
5949
|
-
73,
|
|
5950
|
-
() => [
|
|
5951
|
-
File$1,
|
|
5952
|
-
Folder,
|
|
5953
|
-
Array
|
|
5954
|
-
],
|
|
5955
|
-
[
|
|
5956
|
-
"",
|
|
5957
|
-
"",
|
|
5958
|
-
"",
|
|
5959
|
-
"",
|
|
5960
|
-
"",
|
|
5961
|
-
""
|
|
5962
|
-
]
|
|
5963
|
-
];
|
|
5964
|
-
var [BaseRuleOptions] = [
|
|
5965
|
-
74,
|
|
5966
|
-
() => [Record],
|
|
5967
|
-
[""]
|
|
5968
|
-
];
|
|
5969
|
-
var [Rule] = [
|
|
5970
|
-
75,
|
|
5971
|
-
(Context, RuleOptions, RuleName) => [
|
|
5972
|
-
BaseRuleOptions,
|
|
5973
|
-
BaseRuleOptions,
|
|
5974
|
-
RuleName,
|
|
5975
|
-
Context,
|
|
5976
|
-
Folder,
|
|
5977
|
-
RuleOptions,
|
|
5978
|
-
RuleResult,
|
|
5979
|
-
RuleResult,
|
|
5980
|
-
Promise
|
|
5981
|
-
],
|
|
5982
|
-
[
|
|
5983
|
-
"",
|
|
5984
|
-
"",
|
|
5985
|
-
"",
|
|
5986
|
-
"",
|
|
5987
|
-
"",
|
|
5988
|
-
"",
|
|
5989
|
-
"",
|
|
5990
|
-
"",
|
|
5991
|
-
"",
|
|
5992
|
-
"",
|
|
5993
|
-
"",
|
|
5994
|
-
"",
|
|
5995
|
-
"",
|
|
5996
|
-
"",
|
|
5997
|
-
"",
|
|
5998
|
-
"",
|
|
5999
|
-
""
|
|
6000
|
-
]
|
|
6001
|
-
];
|
|
6002
|
-
var [RuleResult] = [
|
|
6003
|
-
76,
|
|
6004
|
-
() => [PartialDiagnostic, Array],
|
|
6005
|
-
[
|
|
6006
|
-
"",
|
|
6007
|
-
"",
|
|
6008
|
-
""
|
|
6009
|
-
]
|
|
6010
|
-
];
|
|
6011
|
-
var [PartialDiagnostic] = [
|
|
6012
|
-
77,
|
|
6013
|
-
() => [Fix, Array],
|
|
6014
|
-
[
|
|
6015
|
-
"",
|
|
6016
|
-
"",
|
|
6017
|
-
"",
|
|
6018
|
-
"",
|
|
6019
|
-
"",
|
|
6020
|
-
"",
|
|
6021
|
-
"",
|
|
6022
|
-
"",
|
|
6023
|
-
"",
|
|
6024
|
-
"",
|
|
6025
|
-
"",
|
|
6026
|
-
""
|
|
6027
|
-
]
|
|
6028
|
-
];
|
|
6029
|
-
var [Fix] = [
|
|
6030
|
-
78,
|
|
6031
|
-
() => [],
|
|
6032
|
-
[
|
|
6033
|
-
"",
|
|
6034
|
-
"",
|
|
6035
|
-
"",
|
|
6036
|
-
"",
|
|
6037
|
-
"",
|
|
6038
|
-
"",
|
|
6039
|
-
"",
|
|
6040
|
-
"",
|
|
6041
|
-
"",
|
|
6042
|
-
"",
|
|
6043
|
-
"",
|
|
6044
|
-
"",
|
|
6045
|
-
""
|
|
6046
|
-
]
|
|
6047
|
-
];
|
|
6048
|
-
var [Config] = [
|
|
6049
|
-
79,
|
|
6050
|
-
(Rules) => [
|
|
6051
|
-
Rule,
|
|
6052
|
-
Array,
|
|
6053
|
-
Rules,
|
|
6054
|
-
ConfigObject,
|
|
6055
|
-
Rules,
|
|
6056
|
-
Plugin,
|
|
6057
|
-
GlobalIgnore,
|
|
6058
|
-
Array
|
|
6059
|
-
],
|
|
6060
|
-
[
|
|
6061
|
-
"",
|
|
6062
|
-
"",
|
|
6063
|
-
"",
|
|
6064
|
-
"",
|
|
6065
|
-
"",
|
|
6066
|
-
"",
|
|
6067
|
-
"",
|
|
6068
|
-
"",
|
|
6069
|
-
""
|
|
6070
|
-
]
|
|
6071
|
-
];
|
|
6072
|
-
var [Severity] = [
|
|
6073
|
-
80,
|
|
6074
|
-
() => [],
|
|
6075
|
-
[]
|
|
6076
|
-
];
|
|
6077
|
-
var [RuleNames] = [
|
|
6078
|
-
81,
|
|
6079
|
-
(Rules) => [
|
|
6080
|
-
Rule,
|
|
6081
|
-
Array,
|
|
6082
|
-
Rules
|
|
6083
|
-
],
|
|
6084
|
-
[
|
|
6085
|
-
"",
|
|
6086
|
-
"",
|
|
6087
|
-
"",
|
|
6088
|
-
""
|
|
6089
|
-
]
|
|
6090
|
-
];
|
|
6091
|
-
var [LookUpByName] = [
|
|
6092
|
-
82,
|
|
6093
|
-
(Union, Name) => [
|
|
6094
|
-
Union,
|
|
6095
|
-
Name,
|
|
6096
|
-
Union
|
|
6097
|
-
],
|
|
6098
|
-
[
|
|
6099
|
-
"",
|
|
6100
|
-
"",
|
|
6101
|
-
"",
|
|
6102
|
-
"",
|
|
6103
|
-
"",
|
|
6104
|
-
""
|
|
6105
|
-
]
|
|
6106
|
-
];
|
|
6107
|
-
var [OptionsForRule] = [
|
|
6108
|
-
83,
|
|
6109
|
-
(Rules, RuleName) => [
|
|
6110
|
-
Rule,
|
|
6111
|
-
Array,
|
|
6112
|
-
Rules,
|
|
6113
|
-
RuleNames,
|
|
6114
|
-
Rules,
|
|
6115
|
-
RuleName,
|
|
6116
|
-
LookUpByName,
|
|
6117
|
-
Rule
|
|
6118
|
-
],
|
|
6119
|
-
[
|
|
6120
|
-
"",
|
|
6121
|
-
"",
|
|
6122
|
-
"",
|
|
6123
|
-
"",
|
|
6124
|
-
"",
|
|
6125
|
-
"",
|
|
6126
|
-
"",
|
|
6127
|
-
"",
|
|
6128
|
-
"",
|
|
6129
|
-
"",
|
|
6130
|
-
"",
|
|
6131
|
-
""
|
|
6132
|
-
]
|
|
6133
|
-
];
|
|
6134
|
-
var [ConfigObject] = [
|
|
6135
|
-
84,
|
|
6136
|
-
(Rules) => [
|
|
6137
|
-
Rule,
|
|
6138
|
-
Array,
|
|
6139
|
-
Array,
|
|
6140
|
-
Array,
|
|
6141
|
-
Rules,
|
|
6142
|
-
RuleNames,
|
|
6143
|
-
Severity,
|
|
6144
|
-
Severity,
|
|
6145
|
-
Rules,
|
|
6146
|
-
key,
|
|
6147
|
-
OptionsForRule
|
|
6148
|
-
],
|
|
6149
|
-
[
|
|
6150
|
-
"",
|
|
6151
|
-
"",
|
|
6152
|
-
"",
|
|
6153
|
-
"",
|
|
6154
|
-
"",
|
|
6155
|
-
"",
|
|
6156
|
-
"",
|
|
6157
|
-
"",
|
|
6158
|
-
"",
|
|
6159
|
-
"",
|
|
6160
|
-
"",
|
|
6161
|
-
"",
|
|
6162
|
-
"",
|
|
6163
|
-
"",
|
|
6164
|
-
"",
|
|
6165
|
-
""
|
|
6166
|
-
]
|
|
6167
|
-
];
|
|
6168
|
-
var [GlobalIgnore] = [
|
|
6169
|
-
85,
|
|
6170
|
-
() => [Array],
|
|
6171
|
-
["", ""]
|
|
6172
|
-
];
|
|
6173
|
-
var [Plugin] = [
|
|
6174
|
-
86,
|
|
6175
|
-
(Context, Rules) => [
|
|
6176
|
-
Context,
|
|
6177
|
-
Rule,
|
|
6178
|
-
Array,
|
|
6179
|
-
Rule,
|
|
6180
|
-
Array,
|
|
6181
|
-
Rules
|
|
6182
|
-
],
|
|
6183
|
-
[
|
|
6184
|
-
"",
|
|
6185
|
-
"",
|
|
6186
|
-
"",
|
|
6187
|
-
"",
|
|
6188
|
-
"",
|
|
6189
|
-
"",
|
|
6190
|
-
"",
|
|
6191
|
-
"",
|
|
6192
|
-
"",
|
|
6193
|
-
"",
|
|
6194
|
-
"",
|
|
6195
|
-
""
|
|
6196
|
-
]
|
|
6197
|
-
];
|
|
6198
|
-
var [defineConfig] = [
|
|
6199
|
-
96,
|
|
6200
|
-
(Rules) => [
|
|
6201
|
-
Rule,
|
|
6202
|
-
Array,
|
|
6203
|
-
Rule,
|
|
6204
|
-
Array,
|
|
6205
|
-
Rules,
|
|
6206
|
-
Config,
|
|
6207
|
-
Rules,
|
|
6208
|
-
Config
|
|
6209
|
-
],
|
|
6210
|
-
[
|
|
6211
|
-
"",
|
|
6212
|
-
"",
|
|
6213
|
-
"",
|
|
6214
|
-
"",
|
|
6215
|
-
"",
|
|
6216
|
-
"",
|
|
6217
|
-
"",
|
|
6218
|
-
"",
|
|
6219
|
-
"",
|
|
6220
|
-
""
|
|
6221
|
-
]
|
|
6222
|
-
];
|
|
6223
|
-
export { linter as n, processConfiguration as r, defineConfig as t };
|
|
5942
|
+
export { processConfiguration as n, linter as t };
|
|
6224
5943
|
|
|
6225
|
-
//# sourceMappingURL=steiger-
|
|
5944
|
+
//# sourceMappingURL=steiger-CbusAzht.mjs.map
|