diff --git a/.prettierrc.js b/.prettierrc.js index 491fdf1..a12be80 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,6 +1,6 @@ module.exports = { singleQuote: true, - trailingComma: 'all', + trailingComma: 'es5', proseWrap: 'always', overrides: [ { diff --git a/Dockerfile b/Dockerfile index c0d9ca8..ca9e604 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:alpine as builder +FROM node:boron-alpine as builder WORKDIR /usr/src/app COPY . /usr/src/app RUN apk add -U build-base python && \ @@ -6,7 +6,7 @@ RUN apk add -U build-base python && \ yarn build && \ yarn install --production --ignore-scripts --prefer-offline -FROM node:alpine +FROM node:boron-alpine LABEL maintainer="butlerx@notthe.cloud" WORKDIR /app ENV NODE_ENV=production diff --git a/lib/command.mjs b/lib/command.mjs index a746222..378cf64 100644 --- a/lib/command.mjs +++ b/lib/command.mjs @@ -4,7 +4,7 @@ const localhost = host => export default ( { request: { headers }, client: { conn } }, - { user, host, port, auth }, + { user, host, port, auth } ) => ({ args: localhost(host) ? ['login', '-h', conn.remoteAddress.split(':')[3]] diff --git a/lib/emitter.mjs b/lib/emitter.mjs index a4b6f55..ba428a2 100644 --- a/lib/emitter.mjs +++ b/lib/emitter.mjs @@ -27,7 +27,7 @@ class WeTTy extends EventEmitter { start( { user = '', host = 'localhost', auth = 'password', port = 22 }, serverPort = 3000, - { key, cert }, + { key, cert } ) { return loadSSL(key, cert).then(ssl => { const io = server(serverPort, ssl); diff --git a/lib/index.mjs b/lib/index.mjs index bc52710..f91fb83 100644 --- a/lib/index.mjs +++ b/lib/index.mjs @@ -71,7 +71,7 @@ export default class { port: sshport, }, port, - { key: sslkey, cert: sslcert }, + { key: sslkey, cert: sslcert } ); } diff --git a/lib/logger.mjs b/lib/logger.mjs index a25a10f..26ca2df 100644 --- a/lib/logger.mjs +++ b/lib/logger.mjs @@ -8,9 +8,8 @@ const logger = createLogger({ label({ label: 'Wetty' }), timestamp(), printf( - info => - `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`, - ), + info => `${info.timestamp} [${info.label}] ${info.level}: ${info.message}` + ) ), transports: [ new transports.Console({ diff --git a/lib/server.mjs b/lib/server.mjs index 1707d86..23cfb44 100644 --- a/lib/server.mjs +++ b/lib/server.mjs @@ -33,6 +33,6 @@ export default function createServer(port, { key, cert }) { : http.createServer(app).listen(port, () => { events.server(port, 'http'); }), - { path: '/wetty/socket.io' }, + { path: '/wetty/socket.io' } ); } diff --git a/package.json b/package.json index 13b9674..e5e9e51 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,9 @@ "bin": { "wetty": "./index.js" }, + "engines": { + "node": ">=6.9" + }, "nodemonConfig": { "ignore": ["dist/*", "src/*", "*.json"] },