Reformat code

This commit is contained in:
NI
2020-11-14 22:53:21 +08:00
parent ffdab9f037
commit 530570abc0
3 changed files with 39 additions and 39 deletions

View File

@@ -60,7 +60,7 @@ class Telnet {
"connect.succeed",
"@inband",
"close",
"@completed"
"@completed",
],
callbacks
);
@@ -214,7 +214,7 @@ const initialFieldDef = {
}
return "Look like " + addr.type + " address";
}
},
},
Encoding: {
name: "Encoding",
@@ -236,8 +236,8 @@ const initialFieldDef = {
}
throw new Error('The character encoding "' + d + '" is not supported');
}
}
},
},
};
class Wizard {
@@ -324,7 +324,7 @@ class Wizard {
let parsedConfig = {
host: address.parseHostPort(configInput.host, DEFAULT_PORT),
charset: configInput.charset
charset: configInput.charset,
};
return new Telnet(sender, parsedConfig, {
@@ -362,7 +362,7 @@ class Wizard {
close() {
return commandHandler.sendClose();
},
events: commandHandler.events
events: commandHandler.events,
}),
self.controls.ui()
)
@@ -386,7 +386,7 @@ class Wizard {
},
"@inband"(rd) {},
close() {},
"@completed"() {}
"@completed"() {},
});
}
@@ -397,15 +397,15 @@ class Wizard {
"Telnet",
"Teletype Network",
"Connect",
r => {
(r) => {
self.hasStarted = true;
self.streams.request(COMMAND_ID, sd => {
self.streams.request(COMMAND_ID, (sd) => {
return self.buildCommand(
sd,
{
host: r.host,
charset: r.encoding
charset: r.encoding,
},
self.session
);
@@ -434,15 +434,15 @@ class Wizard {
title: hosts[i].title,
value: hosts[i].data.host,
meta: {
Encoding: hosts[i].data.charset
}
Encoding: hosts[i].data.charset,
},
});
}
return sugg;
}
},
},
{ name: "Encoding" }
{ name: "Encoding" },
],
self.preset
)
@@ -482,12 +482,12 @@ class Executor extends Wizard {
self.hasStarted = true;
self.streams.request(COMMAND_ID, sd => {
self.streams.request(COMMAND_ID, (sd) => {
return self.buildCommand(
sd,
{
host: self.config.host,
charset: self.config.charset ? self.config.charset : "utf-8"
charset: self.config.charset ? self.config.charset : "utf-8",
},
self.session
);
@@ -566,7 +566,7 @@ export class Command {
info,
{
host: d[0],
charset: charset
charset: charset,
},
null,
streams,