How to use the terminal-kit.terminal.processExit function in terminal-kit

To help you get started, we’ve selected a few terminal-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brannondorsey / chattervox / src / ui / init.ts View on Github external
term(`\nGenerating ECDSA keypair...`)
    const key: Key = ks.genKeyPair(conf.callsign)
    await timeout(2000) // delay for dramatic effect, lol
    term(`\nPublic Key: ^c${key.public}^\n`)

    // signatures are created using a private key, but we don't want to include
    // the private key in the config file, so instead we use the public key
    // as the identifier, and then actually sign with the private key.
    conf.signingKey = key.public

    try {
        save(conf)
        term(`\nSettings saved to ${defaultConfigPath}\n`)
    } catch (err) {
        term(`\nError saving settings to ${defaultConfigPath}\n`)
        term.processExit()
    }
}
github zamotany / react-slate / packages / core / src / render.tsx View on Github external
})().catch(error => {
    console.error(error);
    terminal.processExit(1);
  });
github citelab / JAMScript / samples / richboy / shell / index.js View on Github external
terminal.on('key', function(key, matches, data){
            switch ( key ){
                case 'CTRL_C':
                    if( hook )
                        hook.disconnect();
                    console.log();
                    terminal.processExit(0);
                    break;
            }
        });
    },
github zamotany / react-slate / packages / core / src / renderFullscreen.ts View on Github external
export function exit(code: number = 0) {
  terminal.grabInput(false);
  terminal.hideCursor(false);
  terminal.fullscreen(false);
  flushConsole(terminal);
  terminal.processExit(code);
}
github Automattic / wp-calypso / bin / analyze-css.js View on Github external
case 'BACKSPACE':
			const parentPath = path.dirname( current.path );

			if ( isProjectPath( parentPath ) ) {
				current = Folder( parentPath );

				render();
			} else {
				term.bell();
			}

			break;

		case 'ESCAPE':
			term.clear();
			term.processExit();

			break;
	}
} );
github callstack / haul / packages / haul-core / src / runtime / Runtime.ts View on Github external
complete(exitCode: number = 0) {
    this.logger.dispose();
    if (this.inspectorClient) {
      this.inspectorClient.emitEvent(new RuntimeCompleteEvent(exitCode));
      this.inspectorClient.close();
    }
    terminal.processExit(exitCode);
  }
}
github cronvel / http-requester / lib / cli.js View on Github external
term.red( error.toString() + '\n' ) ;
		process.exit( 1 ) ;
	}

	term( '\n' ) ;

	if ( ! streams.output ) {
		httpRequester.displayBody( body , incomingMessage ) ;
		httpRequester.displayTrailer( incomingMessage ) ;
	}

	term.dim.magenta( '[Received ' +
	( body ? utils.byteString( body.length ) + ' ' : '' ) +
	'in ' + httpRequester.lastResponse.time + 'ms]\n' ) ;

	term.processExit( 0 ) ;
} ;
github brannondorsey / chattervox / src / ui / chat.ts View on Github external
export function exit(code: number): void {
    term.processExit(code)
}