1111 */
1212export interface CliOptions {
1313 /** Resolver function for the lint tool (oxlint) */
14- lint : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
14+ lint : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
1515 /** Resolver function for the fmt tool (oxfmt) */
16- fmt : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
16+ fmt : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
1717 /** Resolver function for the vite tool (used for build/dev) */
18- vite : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
18+ vite : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
1919 /** Resolver function for the test tool (vitest) */
20- test : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
20+ test : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
2121 /** Resolver function for the lib tool (tsdown) */
22- lib : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
22+ lib : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
2323 /** Resolver function for the doc tool (vitepress) */
24- doc : ( ( err : Error | null , ) => Promise < JsCommandResolvedResult > )
24+ doc : ( err : Error | null ) => Promise < JsCommandResolvedResult > ;
2525 /** Optional working directory override */
26- cwd ?: string
26+ cwd ?: string ;
2727 /** Read the vite.config.ts in the Node.js side and return the `lint` and `fmt` config JSON string back to the Rust side */
28- resolveUniversalViteConfig : ( ( err : Error | null , arg : string ) => Promise < string > )
28+ resolveUniversalViteConfig : (
29+ err : Error | null ,
30+ arg : string ,
31+ ) => Promise < string > ;
2932}
3033
3134/**
@@ -53,13 +56,15 @@ export interface CliOptions {
5356 * console.log(`Workspace root: ${result.root}`);
5457 * ```
5558 */
56- export declare function detectWorkspace ( cwd : string ) : Promise < DetectWorkspaceResult >
59+ export declare function detectWorkspace (
60+ cwd : string ,
61+ ) : Promise < DetectWorkspaceResult > ;
5762
5863export interface DetectWorkspaceResult {
59- packageManagerName ?: string
60- packageManagerVersion ?: string
61- isMonorepo : boolean
62- root ?: string
64+ packageManagerName ?: string ;
65+ packageManagerVersion ?: string ;
66+ isMonorepo : boolean ;
67+ root ?: string ;
6368}
6469
6570/**
@@ -95,20 +100,22 @@ export interface DetectWorkspaceResult {
95100 * console.log(`Package manager version: ${result.version}`);
96101 * ```
97102 */
98- export declare function downloadPackageManager ( options : DownloadPackageManagerOptions ) : Promise < DownloadPackageManagerResult >
103+ export declare function downloadPackageManager (
104+ options : DownloadPackageManagerOptions ,
105+ ) : Promise < DownloadPackageManagerResult > ;
99106
100107export interface DownloadPackageManagerOptions {
101- name : string
102- version : string
103- expectedHash ?: string
108+ name : string ;
109+ version : string ;
110+ expectedHash ?: string ;
104111}
105112
106113export interface DownloadPackageManagerResult {
107- name : string
108- installDir : string
109- binPrefix : string
110- packageName : string
111- version : string
114+ name : string ;
115+ installDir : string ;
116+ binPrefix : string ;
117+ packageName : string ;
118+ version : string ;
112119}
113120
114121/**
@@ -120,19 +127,19 @@ export interface DownloadPackageManagerResult {
120127 */
121128export interface JsCommandResolvedResult {
122129 /** Absolute path to the tool's executable or script */
123- binPath : string
130+ binPath : string ;
124131 /** Environment variables to set when running the tool */
125- envs : Record < string , string >
132+ envs : Record < string , string > ;
126133}
127134
128135/** Access modes for a path. */
129136export interface PathAccess {
130137 /** Whether the path was read */
131- read : boolean
138+ read : boolean ;
132139 /** Whether the path was written */
133- write : boolean
140+ write : boolean ;
134141 /** Whether the path was read as a directory */
135- readDir : boolean
142+ readDir : boolean ;
136143}
137144
138145/**
@@ -156,7 +163,7 @@ export interface PathAccess {
156163 * Errors from JavaScript resolvers are converted to specific error types
157164 * (e.g., `LintFailed`, `ViteError`) to provide better error messages.
158165 */
159- export declare function run ( options : CliOptions ) : Promise < number >
166+ export declare function run ( options : CliOptions ) : Promise < number > ;
160167
161168/**
162169 * Run a command with fspy tracking, callable from JavaScript.
@@ -192,7 +199,9 @@ export declare function run(options: CliOptions): Promise<number>
192199 * console.log(`Path accesses:`, result.pathAccesses);
193200 * ```
194201 */
195- export declare function runCommand ( options : RunCommandOptions ) : Promise < RunCommandResult >
202+ export declare function runCommand (
203+ options : RunCommandOptions ,
204+ ) : Promise < RunCommandResult > ;
196205
197206/**
198207 * Input parameters for running a command with fspy tracking.
@@ -205,13 +214,13 @@ export declare function runCommand(options: RunCommandOptions): Promise<RunComma
205214 */
206215export interface RunCommandOptions {
207216 /** The name of the binary to execute */
208- binName : string
217+ binName : string ;
209218 /** Command line arguments to pass to the binary */
210- args : Array < string >
219+ args : Array < string > ;
211220 /** Environment variables to set when executing the command */
212- envs : Record < string , string >
221+ envs : Record < string , string > ;
213222 /** The current working directory for the command */
214- cwd : string
223+ cwd : string ;
215224}
216225
217226/**
@@ -223,7 +232,7 @@ export interface RunCommandOptions {
223232 */
224233export interface RunCommandResult {
225234 /** The exit code of the command */
226- exitCode : number
235+ exitCode : number ;
227236 /** Map of relative paths to their access modes */
228- pathAccesses : Record < string , PathAccess >
237+ pathAccesses : Record < string , PathAccess > ;
229238}
0 commit comments