@r_masseater/h56m 0.3.2 → 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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as failedWith, n as format, o as runTool, r as makeDetector, t as h56mSection } from "./section-CLfJKKKL.mjs";
|
|
2
2
|
import { Array, Boolean, Effect } from "effect";
|
|
3
3
|
// package.json
|
|
4
|
-
var version = "0.3.
|
|
4
|
+
var version = "0.3.3";
|
|
5
5
|
var description = "A secret scanner engine written in Rust that scans git history, the staged changes or any text with Betterleaks-format rules from a preset, configured from vite.config.ts.";
|
|
6
6
|
// src/app/cli.ts
|
|
7
7
|
const STAGED = "staged";
|
|
@@ -48,4 +48,4 @@ const runCli = () => {
|
|
|
48
48
|
};
|
|
49
49
|
export { runCli };
|
|
50
50
|
|
|
51
|
-
//# sourceMappingURL=cli-
|
|
51
|
+
//# sourceMappingURL=cli-BaFxd0PW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-
|
|
1
|
+
{"version":3,"file":"cli-BaFxd0PW.mjs","names":["Arr","Bool","manifest.version","manifest.description"],"sources":["../package.json","../src/app/cli.ts"],"sourcesContent":["","import { runTool } from \"@masseater.dev/lint-host\";\nimport type { ToolCall, ToolInput } from \"@masseater.dev/lint-host\";\nimport manifest from \"@r_masseater/h56m/package.json\" with { type: \"json\" };\nimport { Array as Arr, Boolean as Bool, Effect } from \"effect\";\n\nimport type { Finding, GitSource, H56mConfig } from \"#/shared/config/index.ts\";\nimport { failedWith } from \"#/shared/lib/errors.ts\";\nimport type { H56mError } from \"#/shared/lib/errors.ts\";\n\nimport { makeDetector } from \"./detector.ts\";\nimport { format } from \"./format.ts\";\nimport { h56mSection } from \"./section.ts\";\n\nconst STAGED = \"staged\";\nconst BASES = [\"origin/HEAD\", \"origin/main\", \"origin/master\"];\nconst HEAD = \"HEAD\";\n\nconst candidatesOf = (requested: readonly string[]): readonly string[] =>\n Arr.match(requested, { onEmpty: () => BASES, onNonEmpty: (given) => given });\n\nconst sourceOf = ({ flags, args }: ToolInput): GitSource =>\n Bool.match(flags.has(STAGED), {\n onTrue: (): GitSource => ({ type: \"staged\" }),\n onFalse: (): GitSource => ({ type: \"history\", bases: candidatesOf(args), head: HEAD }),\n });\n\nconst scan = ({\n root,\n config,\n input,\n}: ToolCall<H56mConfig>): Effect.Effect<readonly Finding[], H56mError> =>\n makeDetector(config).pipe(\n Effect.flatMap((detector) => detector.scanGit({ root, source: sourceOf(input) })),\n );\n\nexport const runCli = (): void => {\n runTool({\n name: \"h56m\",\n version: manifest.version,\n description: manifest.description,\n flags: [{ name: STAGED, description: \"Scan the staged changes instead of the history\" }],\n argument: {\n name: \"base\",\n description:\n \"Refs to scan the history from, the first one that exists winning (default: origin/HEAD, origin/main, origin/master)\",\n },\n section: h56mSection,\n failWith: failedWith,\n scan,\n format,\n });\n};\n"],"mappings":";;;;;;ACaA,MAAM,SAAS;AACf,MAAM,QAAQ;CAAC;CAAe;CAAe;AAAe;AAC5D,MAAM,OAAO;AAEb,MAAM,gBAAgB,cACpBA,MAAI,MAAM,WAAW;CAAE,eAAe;CAAO,aAAa,UAAU;AAAM,CAAC;AAE7E,MAAM,YAAY,EAAE,OAAO,WACzBC,QAAK,MAAM,MAAM,IAAI,MAAM,GAAG;CAC5B,eAA0B,EAAE,MAAM,SAAS;CAC3C,gBAA2B;EAAE,MAAM;EAAW,OAAO,aAAa,IAAI;EAAG,MAAM;CAAK;AACtF,CAAC;AAEH,MAAM,QAAQ,EACZ,MACA,QACA,YAEA,aAAa,MAAM,CAAC,CAAC,KACnB,OAAO,SAAS,aAAa,SAAS,QAAQ;CAAE;CAAM,QAAQ,SAAS,KAAK;AAAE,CAAC,CAAC,CAClF;AAEF,MAAa,eAAqB;CAChC,QAAQ;EACN,MAAM;EACGC;EACIC;EACb,OAAO,CAAC;GAAE,MAAM;GAAQ,aAAa;EAAiD,CAAC;EACvF,UAAU;GACR,MAAM;GACN,aACE;EACJ;EACA,SAAS;EACT,UAAU;EACV;EACA;CACF,CAAC;AACH"}
|
package/dist/cli.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r_masseater/h56m",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "A secret scanner engine written in Rust that scans git history, the staged changes or any text with Betterleaks-format rules from a preset, configured from vite.config.ts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"betterleaks",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@effect/platform-node": "^4.1.5",
|
|
63
|
-
"@r_masseater/node-main": "^0.2.
|
|
63
|
+
"@r_masseater/node-main": "^0.2.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@effect/vitest": "4.1.5",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
97
|
"optionalDependencies": {
|
|
98
|
-
"@r_masseater/h56m-linux-x64-gnu": "0.3.
|
|
99
|
-
"@r_masseater/h56m-win32-x64-msvc": "0.3.
|
|
98
|
+
"@r_masseater/h56m-linux-x64-gnu": "0.3.3",
|
|
99
|
+
"@r_masseater/h56m-win32-x64-msvc": "0.3.3"
|
|
100
100
|
}
|
|
101
101
|
}
|