@@ -26,6 +26,10 @@ export interface DenoSubcommandOptions {
2626 usageAsset : string ;
2727 /** Extra arguments to pass to the deno command */
2828 extraArgs ?: readonly string [ ] ;
29+ /** Enable -r/--reload option support */
30+ supportReload ?: boolean ;
31+ /** Use deno.json/deno.lock config (default: false, adds --no-config) */
32+ useConfig ?: boolean ;
2933}
3034
3135/**
@@ -46,13 +50,14 @@ export async function runDenoSubcommand(
4650 try {
4751 const parsed = parseArgs ( args , {
4852 string : [ "config" , "include" , "exclude" ] ,
49- boolean : [ "help" , "quiet" , "verbose" , "debug" ] ,
53+ boolean : [ "help" , "quiet" , "verbose" , "debug" , "reload" ] ,
5054 collect : [ "include" , "exclude" ] ,
5155 alias : {
5256 h : "help" ,
5357 v : "verbose" ,
5458 q : "quiet" ,
5559 d : "debug" ,
60+ r : "reload" ,
5661 } ,
5762 default : {
5863 include : undefined ,
@@ -108,10 +113,11 @@ export async function runDenoSubcommand(
108113 fileCount : scenarioFiles . length ,
109114 } ) ;
110115
111- // Run deno command with --no-config
116+ // Run deno command ( with --no-config unless useConfig is true)
112117 const denoArgs = [
113118 subcommand ,
114- "--no-config" ,
119+ ...( options . useConfig ? [ ] : [ "--no-config" ] ) ,
120+ ...( options . supportReload && parsed . reload ? [ "--reload" ] : [ ] ) ,
115121 ...( options . extraArgs ?? [ ] ) ,
116122 ...scenarioFiles ,
117123 ] ;
0 commit comments