mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
chore: lint
This commit is contained in:
parent
fcce26d4e1
commit
1bef0d4381
13 changed files with 54 additions and 61 deletions
|
|
@ -153,7 +153,7 @@ function listen(manage, sock, auth) {
|
|||
.on('connection', (socket) => {
|
||||
if (!manage('auth'))
|
||||
return connection(manage, socket);
|
||||
|
||||
|
||||
const reject = () => socket.emit('reject');
|
||||
socket.on('auth', auth(connectionWraped(manage, socket), reject));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ module.exports = net
|
|||
const {pid} = process;
|
||||
const addr = socket.remoteAddress;
|
||||
const port = socket.remotePort;
|
||||
|
||||
|
||||
const r = repl.start({
|
||||
prompt: `[${pid} ${addr}:${port}>`,
|
||||
input: socket,
|
||||
|
|
@ -17,11 +17,11 @@ module.exports = net
|
|||
terminal: true,
|
||||
useGlobal: false,
|
||||
});
|
||||
|
||||
|
||||
r.on('exit', () => {
|
||||
socket.end();
|
||||
});
|
||||
|
||||
|
||||
r.context.socket = socket;
|
||||
})
|
||||
.listen(1337);
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ function getError(error, source) {
|
|||
source,
|
||||
highlightCode: false,
|
||||
})}</pre>\`);
|
||||
|
||||
|
||||
e.code = 'frame';
|
||||
|
||||
|
||||
throw e;
|
||||
`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue