Skip to content

Commit

Permalink
0.4.0 Release (billchurch#246)
Browse files Browse the repository at this point in the history
* feat: upgrade to socket.io 4.1.1 billchurch#242

* chore: lint ./app/client/src/js/index.js billchurch#242

* chore: eslint disable global Blob warning billchurch#242

* chore: lint ./app/index.js billchurch#242

* chore: lint ./app/server/app.js billchurch#242

* chore: setup eslint and airbnb rules disable standard billchurch#242

* Delete package-lock-old.json

* chore: lint ./app/index.js billchurch#242

* feat: implement alpine docker image from billchurch#213

* chore: lint ./app/server/app.js still TODO for stop function billchurch#242

* chore: lint ./app/server/util.js billchurch#242

* chore: lint ./app/server/app.js reorg socket and safe shutdown

* chore: grammar / spelling

* chore: fix some misplaced next returns in some Express routes billchurch#242

* chore: lint ./app/server/socket.js billchurch#242

* chore: bump version in ./app/package.json billchurch#242

* docs: update docs for 0.4.0 billchurch#242

* chore: update package-lock.json

* chore: install Prettier code linter billchurch#242

* chore: linting for Prettier billchurch#242

* chore: lint ./app/client/src/js/index.js billchurch#242

* chore: client linting billchurch#242

* Update package-lock.json

* chore: repackage wbssh2 bundle for testing billchurch#242

* chore: convert ./app/client/src/js/index.js to typescript billchurch#242

* chore: remove html rendering from node

* Update tsconfig.json

* Update tsconfig.json

* Delete index.js

* Update ChangeLog.md

* chore: config for development container billchurch#242

* Update BUILDING.md

* feat: pull in billchurch#234 staged for 0.4.0 billchurch#242

* docs: update changelog

* update package.json

* chore: split config from app/server/app.js billchurch#242

* chore: version bump

* chore: consistency

* feat: overridebasic fixes billchurch#243 included for billchurch#242

* chore: remove serverlog code

* docs: update changelog
  • Loading branch information
billchurch committed May 19, 2021
1 parent cc548df commit aead1ea
Show file tree
Hide file tree
Showing 31 changed files with 1,912 additions and 15,262 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/typescript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version: 16, 14, 12
ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node packages
# RUN su node -c "npm install -g <your-package-list -here>"
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/typescript-node
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 12, 14, 16
"args": {
"VARIANT": "14"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

277 changes: 0 additions & 277 deletions .eslintrc.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
release:
types: [published]
schedule:
- cron: '0 6 * * 1'
- cron: '0 1 * * 1'

jobs:
build:
Expand All @@ -19,5 +19,5 @@ jobs:
imageName: ${{ secrets.DOCKER_HUB_USER }}/webssh2
platform: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/arm/v7
publish: true
dockerHubUser: ${{ secrets.DOCKER_HUB_USER }}
dockerHubPassword: ${{ secrets.DOCKER_HUB_PASSWORD }}
dockerUser: ${{ secrets.DOCKER_HUB_USER }}
dockerPassword: ${{ secrets.DOCKER_HUB_PASSWORD }}
2 changes: 1 addition & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Buliding

To rebuild the client files, you need at least Node v10.
To rebuild the client files, you need at least Node v14.

The source of the client files are located in `./app/client/source`

Expand Down
20 changes: 20 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Change Log
## 0.4.0 [20210519]
### BREAKING
- Disabled ssh.serverlog.client option, this disables the POC which allowed for logging of the data sent between the client/server to the console.log.
- Dropping support for node versions under 14
### Changes
- Removed HTML menu code from ./app/server/socket.js, the menu is now fully laid out in the ./app/client/src/index.html and the option elements are hidden by default. Not sure why it wasn't done this way from the start, but there it is.
- Updated socket.io to v4.1.1
- Client javascript `./app/client/src/js/index.ts` is now built on TypeScript (`npm run build` will generate javascript for client and place into `app/client/public/webssh2.bundle.js` as before)
- Build environment changes
- removed unused xterm-addon-search, xterm-addon-weblinks, standard, postcss-discard-comments
- added prettier 2.3.0, typescript modules, socket.io-client 4.1.1, airbnb linting tools
### Added
- Lookup ip address for hostname in URL, fixes #199 thanks to @zwiy
- Ability to override `Authorization: Basic` header and replace with credentials specified in `config.json` fixes #243. New config.json option `user.overridebasic`
### CONTRIBUTING
In this release, we're trying our best to conform to the [Airbnb Javascript Style Guide](https://airbnb.io/projects/javascript/). I'm hoping this will make contributions easier and keep the code readable. I love shortcuts more than anyone but I've found when making changes to code I've not looked at in a while, it can take me a few momements to deconstruct what was being done due to readbility issues. While I don't agree with every decision in the style guide (semi-colons, yuk), it is a good base to keep the code consistent.

If you've not used it before, I recommend installing the [vscode extensions](https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a) for that and [Prettier](https://prettier.io/) and getting familiar. The autocorrections are great (especially if you hate dealing with semi-colons...)

As of 0.4.0-testing-0, the client code is written in [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html). It's not that much different from JavaScript, and the introduction strong typing will ultimately help to produce better code. Eventually we want to move the whole project to TypeScript but that make take a bit more time. Take a moment to look at ./app/client/src/js/index.ts to see what TypeScript looks like.
## 0.3.1 [20210513]
### BREAKING
- Ability to configure CORS settings for socket.io see [#240](../../issues/240) for more information on how this may break existing deployments. Default settings in example `config.json` are currently permissive `http.origins: ["*:*"]` please note that if a `config.json` is not present, the default is `http.origins: ["localhost:2222"]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:8.6
FROM node:14.17-alpine

WORKDIR /usr/src
COPY app/ /usr/src/
RUN npm install --production
EXPOSE 2222
EXPOSE 2222/tcp
ENTRYPOINT [ "/usr/local/bin/node", "index.js" ]

0 comments on commit aead1ea

Please sign in to comment.