@aklinker1/check
Advanced tools
Comparing version 1.0.0 to 1.0.1
export interface CheckOptions { | ||
/** | ||
* Set to true to fix problems that can be automatically fixed. | ||
* | ||
* Defaults to `true` outside CI, and `false` inside CI. | ||
*/ | ||
@@ -27,20 +29,8 @@ fix?: boolean; | ||
*/ | ||
check: (root: string | undefined) => Promise<Output>; | ||
check: (root: string | undefined) => Promise<Problem[]>; | ||
/** | ||
* Run the tool, but fix problems if possible. If the tool doesn't support fixing problems, `check` will be called instead. | ||
*/ | ||
fix?: (root: string | undefined) => Promise<Output>; | ||
fix?: (root: string | undefined) => Promise<Problem[]>; | ||
} | ||
export type Output = OutputSuccess | OutputWarning | OutputError; | ||
export interface OutputSuccess { | ||
type: "success"; | ||
} | ||
export interface OutputWarning { | ||
type: "warning"; | ||
problems: Problem[]; | ||
} | ||
export interface OutputError { | ||
type: "error"; | ||
problems: Problem[]; | ||
} | ||
export interface Problem { | ||
@@ -62,2 +52,2 @@ location?: CodeLocation; | ||
stderr: string; | ||
}) => Output; | ||
}) => Problem[]; |
@@ -1,4 +0,4 @@ | ||
import type { OutputParser, Output } from "./types"; | ||
import type { OutputParser, Problem } from "./types"; | ||
export declare function isBinInstalled(bin: string, root?: string): Promise<boolean>; | ||
export declare function execAndParse(root: string | undefined, bin: string, args: string[], parser: OutputParser): Promise<Output>; | ||
export declare function execAndParse(root: string | undefined, bin: string, args: string[], parser: OutputParser): Promise<Problem[]>; | ||
export declare function isDebug(): boolean; | ||
@@ -5,0 +5,0 @@ export declare const bold: (str: string) => string; |
{ | ||
"name": "@aklinker1/check", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "module", | ||
@@ -13,14 +13,12 @@ "exports": { | ||
"types": "./dist/index.d.ts", | ||
"files": ["dist"], | ||
"files": [ | ||
"dist" | ||
], | ||
"bin": { | ||
"check": "bin/check.mjs" | ||
}, | ||
"scripts": { | ||
"build": "bunx unbuild", | ||
"check": "bun src/cli.ts", | ||
"prepublish": "bun build" | ||
}, | ||
"dependencies": { | ||
"@antfu/utils": "^0.7.7", | ||
"citty": "^0.1.6" | ||
"citty": "^0.1.6", | ||
"ci-info": "^4.0.0" | ||
}, | ||
@@ -44,3 +42,8 @@ "devDependencies": { | ||
"declaration": true | ||
}, | ||
"scripts": { | ||
"build": "bunx --bun unbuild", | ||
"check": "bun src/cli.ts", | ||
"prepublish": "bun run build" | ||
} | ||
} | ||
} |
# Check | ||
An opinionated CLI tool to run all your checks all at once. The command will only exit with code 0 when no warnings exist. | ||
An opinionated CLI tool to run all your checks all at once. The command will only exit with code 0 when no problems exist. | ||
https://github.com/aklinker1/check/assets/10101283/c8089e5c-e25f-4f59-8897-d2a6f97a3139 | ||
> [!WARNING] | ||
> I have not actually published this to NPM yet. | ||
```sh | ||
@@ -11,0 +8,0 @@ pnpm i @aklinker1/check |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
22360
4
614
44
+ Addedci-info@^4.0.0
+ Addedci-info@4.1.0(transitive)