Reformat code
This commit is contained in:
@@ -138,7 +138,7 @@ const defField = {
|
||||
},
|
||||
verify(v) {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -264,7 +264,7 @@ class Prompt {
|
||||
|
||||
this.f[data.inputs[i].name.toLowerCase()] = {
|
||||
value: f.value,
|
||||
verify: f.verify
|
||||
verify: f.verify,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -376,7 +376,7 @@ function next(type, data) {
|
||||
},
|
||||
data() {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ export function done(success, successData, errorTitle, errorMessage) {
|
||||
success: success,
|
||||
successData: successData,
|
||||
errorTitle: errorTitle,
|
||||
errorMessage: errorMessage
|
||||
errorMessage: errorMessage,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ export function done(success, successData, errorTitle, errorMessage) {
|
||||
export function wait(title, message) {
|
||||
return next(NEXT_WAIT, {
|
||||
title: title,
|
||||
message: message
|
||||
message: message,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ export function prompt(title, message, actionText, respond, cancel, inputs) {
|
||||
actionText: actionText,
|
||||
inputs: inputs,
|
||||
respond: respond,
|
||||
cancel: cancel
|
||||
cancel: cancel,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ class Builder {
|
||||
*/
|
||||
constructor(command) {
|
||||
this.cid = command.id();
|
||||
this.represeter = n => {
|
||||
this.represeter = (n) => {
|
||||
return command.represet(n);
|
||||
};
|
||||
this.wizarder = (n, i, r, u, y, x, l) => {
|
||||
@@ -629,7 +629,7 @@ class Builder {
|
||||
this.launchCmd = (n, i, r, u, y, x) => {
|
||||
return command.launch(n, i, r, u, y, x);
|
||||
};
|
||||
this.launcherCmd = c => {
|
||||
this.launcherCmd = (c) => {
|
||||
return command.launcher(c);
|
||||
};
|
||||
this.type = command.name();
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user