Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.0 Release #246

Merged
merged 41 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f157984
feat: upgrade to socket.io 4.1.1 #242
billchurch May 13, 2021
9adfa5a
chore: lint ./app/client/src/js/index.js #242
billchurch May 13, 2021
c1396c5
chore: eslint disable global Blob warning #242
billchurch May 13, 2021
c3d63fa
chore: lint ./app/index.js #242
billchurch May 13, 2021
8fb819d
chore: lint ./app/server/app.js #242
billchurch May 13, 2021
65111d7
chore: setup eslint and airbnb rules disable standard #242
billchurch May 13, 2021
140e0a2
Delete package-lock-old.json
billchurch May 13, 2021
44ce925
chore: lint ./app/index.js #242
billchurch May 13, 2021
36e4e68
feat: implement alpine docker image from #213
billchurch May 13, 2021
ec2fcfb
chore: lint ./app/server/app.js still TODO for stop function #242
billchurch May 13, 2021
bd0760e
chore: lint ./app/server/util.js #242
billchurch May 13, 2021
aa580b5
chore: lint ./app/server/app.js reorg socket and safe shutdown
billchurch May 17, 2021
b612304
chore: grammar / spelling
billchurch May 17, 2021
3d7e1d6
chore: fix some misplaced next returns in some Express routes #242
billchurch May 17, 2021
545d503
chore: lint ./app/server/socket.js #242
billchurch May 17, 2021
00e990c
chore: bump version in ./app/package.json #242
billchurch May 17, 2021
772907f
docs: update docs for 0.4.0 #242
billchurch May 17, 2021
77faa8a
chore: update package-lock.json
billchurch May 17, 2021
024dd75
chore: install Prettier code linter #242
billchurch May 17, 2021
982780e
chore: linting for Prettier #242
billchurch May 17, 2021
259f4f0
chore: lint ./app/client/src/js/index.js #242
billchurch May 17, 2021
0ff37bc
chore: client linting #242
billchurch May 17, 2021
8a976f2
Update package-lock.json
billchurch May 17, 2021
e0ea6ae
chore: repackage wbssh2 bundle for testing #242
billchurch May 17, 2021
55754d3
chore: convert ./app/client/src/js/index.js to typescript #242
billchurch May 17, 2021
b066883
chore: remove html rendering from node
billchurch May 17, 2021
becdb26
Update tsconfig.json
billchurch May 17, 2021
3d0cb0d
Update tsconfig.json
billchurch May 17, 2021
7c0bc48
Delete index.js
billchurch May 17, 2021
a840ec1
Update ChangeLog.md
billchurch May 17, 2021
42f1335
chore: config for development container #242
billchurch May 17, 2021
304a3db
Update BUILDING.md
billchurch May 17, 2021
fd59c1d
feat: pull in #234 staged for 0.4.0 #242
billchurch May 17, 2021
a8265d4
docs: update changelog
billchurch May 17, 2021
3eb2488
update package.json
billchurch May 17, 2021
f3a9478
chore: split config from app/server/app.js #242
billchurch May 18, 2021
f3c6246
chore: version bump
billchurch May 18, 2021
ad6b74c
chore: consistency
billchurch May 18, 2021
5999375
feat: overridebasic fixes #243 included for #242
billchurch May 18, 2021
9d74615
chore: remove serverlog code
billchurch May 19, 2021
5a7f403
docs: update changelog
billchurch May 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" ]
Loading