@@ -83,8 +83,8 @@ global.kitPrompt = async (config: any) => {
8383 message : config . placeholder
8484 }
8585 let { prompt } : Enquirer = enquirer
86- // TODO: Strip out enquirer autocomplete
87- ; ( prompt as any ) . on ( 'cancel' , ( ) => process . exit ( ) )
86+ // TODO: Strip out enquirer autocomplete
87+ ; ( prompt as any ) . on ( 'cancel' , ( ) => process . exit ( ) )
8888
8989 let result = ( await prompt ( promptConfig ) ) as any
9090
@@ -97,13 +97,13 @@ global.arg = async (messageOrConfig = 'Input', choices) => {
9797 }
9898
9999 let firstArg = global . args . length ? global . args . shift ( ) : null
100-
101- // // Check if the argument is the special "__undefined__" marker
102- // if (firstArg === "__undefined__") {
103- // // Treat it as if no argument was provided - show the prompt
104- // firstArg = null
105- // }
106-
100+
101+ // Check if the argument is the special "__undefined__" marker
102+ if ( firstArg === "__undefined__" ) {
103+ // Treat it as if no argument was provided - show the prompt
104+ firstArg = null
105+ }
106+
107107 if ( firstArg ) {
108108 let valid = true
109109 if ( typeof messageOrConfig !== 'string' && ( messageOrConfig as PromptConfig ) ?. validate ) {
@@ -264,7 +264,7 @@ global.edit = async (filePath) => {
264264 if ( global ?. env ?. KIT_TERMINAL_EDITOR === 'kit' ) {
265265 try {
266266 await exec ( `~/.kit/kar ~/.kit/cli/edit.js '${ filePath } '` )
267- } catch ( error ) { }
267+ } catch ( error ) { }
268268 } else {
269269 await spawn ( global . env . KIT_TERMINAL_EDITOR , [ filePath ] , {
270270 stdio : 'inherit'
@@ -302,17 +302,17 @@ global.drop = async () => {
302302 global . exit ( )
303303}
304304
305- global . setChoices = async ( ) => { }
306- global . clearTabs = async ( ) => { }
305+ global . setChoices = async ( ) => { }
306+ global . clearTabs = async ( ) => { }
307307
308- global . setPanel = async ( html , containerClasses = '' ) => { }
309- global . setPreview = async ( html , containerClasses = '' ) => { }
310- global . setPanelContainer = async ( html , containerClasses = '' ) => { }
308+ global . setPanel = async ( html , containerClasses = '' ) => { }
309+ global . setPreview = async ( html , containerClasses = '' ) => { }
310+ global . setPanelContainer = async ( html , containerClasses = '' ) => { }
311311
312- global . setIgnoreBlur = async ( ignore ) => { }
313- global . setResize = async ( resize ) => { }
312+ global . setIgnoreBlur = async ( ignore ) => { }
313+ global . setResize = async ( resize ) => { }
314314
315- global . setBounds = async ( bounds : Partial < Rectangle > ) => { }
315+ global . setBounds = async ( bounds : Partial < Rectangle > ) => { }
316316
317317global . setDescription = ( description : string ) => {
318318 // console.log({ description })
@@ -321,7 +321,7 @@ global.setName = (name: string) => {
321321 // console.log({ name })
322322}
323323
324- global . setPauseResize = ( pause : boolean ) => { }
324+ global . setPauseResize = ( pause : boolean ) => { }
325325
326326global . getScriptsState = ( ) => {
327327 notSupported ( 'getScriptsState' )
@@ -344,8 +344,8 @@ global.submit = async (value: any) => {
344344 notSupported ( 'submit' )
345345}
346346
347- global . setLoading = ( loading : boolean ) => { }
348- global . setRunning = ( running : boolean ) => { }
347+ global . setLoading = ( loading : boolean ) => { }
348+ global . setRunning = ( running : boolean ) => { }
349349
350350global . copy = async ( text ) => {
351351 let c = await npm ( 'clipboardy' )
@@ -378,26 +378,26 @@ global.revealFile = async () => {
378378 notSupported ( 'revealFile' )
379379 return ''
380380}
381- ; ( global as any ) . clipboard = new Proxy (
382- { } ,
383- {
384- get : ( target , k : string ) => {
385- return ( ) => {
386- notSupported ( `clipboard.${ k } ` )
381+ ; ( global as any ) . clipboard = new Proxy (
382+ { } ,
383+ {
384+ get : ( target , k : string ) => {
385+ return ( ) => {
386+ notSupported ( `clipboard.${ k } ` )
387+ }
387388 }
388389 }
389- }
390- )
391- ; ( global as any ) . keyboard = new Proxy (
392- { } ,
393- {
394- get : ( target , k : string ) => {
395- return ( ) => {
396- notSupported ( `keyboard. ${ k } ` )
390+ )
391+ ; ( global as any ) . keyboard = new Proxy (
392+ { } ,
393+ {
394+ get : ( target , k : string ) => {
395+ return ( ) => {
396+ notSupported ( `keyboard. ${ k } ` )
397+ }
397398 }
398399 }
399- }
400- )
400+ )
401401
402402global . term = async ( commandOrConfig ) => {
403403 let defaultConfig = {
@@ -419,7 +419,7 @@ global.term = async (commandOrConfig) => {
419419 return result ?. stdout || result ?. stderr || ''
420420}
421421
422- global . mainScript = async ( ) => { }
422+ global . mainScript = async ( ) => { }
423423global . sendWait = async ( ) => {
424424 notSupportedDebug ( 'sendWait' )
425425}
0 commit comments