Browse Source

set node boron as min engine requirements

pull/126/head
butlerx 7 years ago
parent
commit
e43fe267c1
No known key found for this signature in database GPG Key ID: B37CA765BAA89170
  1. 2
      .prettierrc.js
  2. 4
      Dockerfile
  3. 2
      lib/command.mjs
  4. 2
      lib/emitter.mjs
  5. 2
      lib/index.mjs
  6. 5
      lib/logger.mjs
  7. 2
      lib/server.mjs
  8. 3
      package.json

2
.prettierrc.js

@ -1,6 +1,6 @@
module.exports = {
singleQuote: true,
trailingComma: 'all',
trailingComma: 'es5',
proseWrap: 'always',
overrides: [
{

4
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

2
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]]

2
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);

2
lib/index.mjs

@ -71,7 +71,7 @@ export default class {
port: sshport,
},
port,
{ key: sslkey, cert: sslcert },
{ key: sslkey, cert: sslcert }
);
}

5
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({

2
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' }
);
}

3
package.json

@ -30,6 +30,9 @@
"bin": {
"wetty": "./index.js"
},
"engines": {
"node": ">=6.9"
},
"nodemonConfig": {
"ignore": ["dist/*", "src/*", "*.json"]
},

Loading…
Cancel
Save