From 93fb54c99a5a1a6485ebd697590bce2f0a8898e0 Mon Sep 17 00:00:00 2001 From: YuShifan <894402575bt@gmail.com> Date: Wed, 10 Jul 2024 15:24:34 +0800 Subject: [PATCH] fix(cli): code format --- cli/src/index.ts | 49 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/cli/src/index.ts b/cli/src/index.ts index e2e21031f..48f6dd180 100755 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -64,7 +64,12 @@ export class Commander { .option('-k, --keepalive ', 'send a ping every SEC seconds', parseNumber, 30) .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -168,7 +173,12 @@ export class Commander { .option('-k, --keepalive ', 'send a ping every SEC seconds', parseNumber, 30) .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -273,7 +283,12 @@ export class Commander { .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -368,7 +383,12 @@ export class Commander { .option('-k, --keepalive ', 'send a ping every SEC seconds', parseNumber, 30) .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -478,7 +498,12 @@ export class Commander { .option('-k, --keepalive ', 'send a ping every SEC seconds', parseNumber, 30) .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -576,7 +601,12 @@ export class Commander { .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file') @@ -688,7 +718,12 @@ export class Commander { .option('-k, --keepalive ', 'send a ping every SEC seconds', parseNumber, 30) .option('-u, --username ', 'the username', state.getConfig('username')) .option('-P, --password ', 'the password', state.getConfig('password')) - .option('-l, --protocol ', 'the protocol to use, mqtt, mqtts, ws, or wss', parseProtocol, state.getConfig('protocol')) + .option( + '-l, --protocol ', + 'the protocol to use, mqtt, mqtts, ws, or wss', + parseProtocol, + state.getConfig('protocol'), + ) .option('--path ', 'the path of websocket', '/mqtt') .option('--key ', 'path to the key file') .option('--cert ', 'path to the cert file')