Browse Source
set node boron as min engine requirements
pull/126/head
butlerx
7 years ago
No known key found for this signature in database
GPG Key ID: B37CA765BAA89170
8 changed files with
12 additions and
10 deletions
-
.prettierrc.js
-
Dockerfile
-
lib/command.mjs
-
lib/emitter.mjs
-
lib/index.mjs
-
lib/logger.mjs
-
lib/server.mjs
-
package.json
|
|
@ -1,6 +1,6 @@ |
|
|
|
module.exports = { |
|
|
|
singleQuote: true, |
|
|
|
trailingComma: 'all', |
|
|
|
trailingComma: 'es5', |
|
|
|
proseWrap: 'always', |
|
|
|
overrides: [ |
|
|
|
{ |
|
|
|
|
|
@ -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 |
|
|
|
|
|
@ -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]] |
|
|
|
|
|
@ -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); |
|
|
|
|
|
@ -71,7 +71,7 @@ export default class { |
|
|
|
port: sshport, |
|
|
|
}, |
|
|
|
port, |
|
|
|
{ key: sslkey, cert: sslcert }, |
|
|
|
{ key: sslkey, cert: sslcert } |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -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({ |
|
|
|
|
|
@ -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' } |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
@ -30,6 +30,9 @@ |
|
|
|
"bin": { |
|
|
|
"wetty": "./index.js" |
|
|
|
}, |
|
|
|
"engines": { |
|
|
|
"node": ">=6.9" |
|
|
|
}, |
|
|
|
"nodemonConfig": { |
|
|
|
"ignore": ["dist/*", "src/*", "*.json"] |
|
|
|
}, |
|
|
|