Skip to content

Commit 44bb1bf

Browse files
Merge pull request #45 from corporateanon/feat/remove-qrcode
feat(cli): remove qrcode
2 parents 87daaaa + 53247b4 commit 44bb1bf

File tree

5 files changed

+73
-10
lines changed

5 files changed

+73
-10
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/typescript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
4+
ARG VARIANT="14-bullseye"
5+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
6+
7+
# Add repository for GitHub CLI
8+
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
9+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
10+
11+
# [Optional] Uncomment this section to install additional OS packages.
12+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
# && apt-get -y install --no-install-recommends mc
14+
15+
# [Optional] Uncomment if you want to install an additional version of node using nvm
16+
# ARG EXTRA_NODE_VERSION=10
17+
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
18+
19+
# [Optional] Uncomment if you want to install more global node packages
20+
# RUN su node -c "npm install -g <your-package-list -here>"

.devcontainer/devcontainer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
"runArgs": [
6+
"--init"
7+
],
8+
"build": {
9+
"dockerfile": "Dockerfile",
10+
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
11+
// Append -bullseye or -buster to pin to an OS version.
12+
// Use -bullseye variants on local on arm64/Apple Silicon.
13+
"args": {
14+
"VARIANT": "14-bullseye"
15+
}
16+
},
17+
// Set *default* container specific settings.json values on container create.
18+
"settings": {},
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [
21+
"dbaeumer.vscode-eslint",
22+
"maptz.regionfolder",
23+
"wmaurer.change-case",
24+
"nemesv.copy-file-name",
25+
"ryanluker.vscode-coverage-gutters",
26+
"jpruliere.env-autocomplete",
27+
"waderyan.gitblame",
28+
"github.vscode-pull-request-github",
29+
"eamodio.gitlens",
30+
"orta.vscode-jest",
31+
"cmstead.js-codeformer",
32+
"eg2.vscode-npm-script",
33+
"silvenga.positions",
34+
"esbenp.prettier-vscode",
35+
"2gua.rainbow-brackets",
36+
"unional.vscode-sort-package-json",
37+
"hbenl.vscode-test-explorer"
38+
],
39+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
40+
"forwardPorts": [
41+
4380
42+
],
43+
// Use 'postCreateCommand' to run commands after the container is created.
44+
// "postCreateCommand": "yarn",
45+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
46+
"remoteUser": "node",
47+
"containerEnv": {
48+
"NPM_TOKEN": "${localEnv:NPM_TOKEN}"
49+
},
50+
"features": {
51+
"github-cli": "latest"
52+
}
53+
}

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"ip": "^1.1.5",
6666
"lodash": "^4.17.20",
6767
"opener": "^1.5.2",
68-
"qrcode-terminal": "^0.12.0",
6968
"react": "^16.9.0",
7069
"react-data-grid": "^7.0.0-canary.30",
7170
"react-dom": "^16.9.0",

server/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import openURI from 'opener';
66
import { argv } from './argv';
77
import { configureServer } from './configureServer';
88
import { PubSub } from './PubSub';
9-
// eslint-disable-next-line @typescript-eslint/no-var-requires
10-
const qrterm = require('qrcode-terminal');
119

1210
declare module 'fastify' {
1311
interface FastifyInstance {
@@ -22,8 +20,6 @@ export async function main(): Promise<void> {
2220
const listenURL = `http://0.0.0.0:${port}`;
2321
const externalURL = `http://${ip}:${port}`;
2422
const localURL = `http://localhost:${port}`;
25-
qrterm.generate(externalURL);
26-
console.log('Use this QR-code to open on a mobile device\n');
2723

2824
console.log(chalk`Listening at : {bold ${listenURL}}`);
2925
console.log(chalk`Open on your machine: {bold ${localURL}}`);

0 commit comments

Comments
 (0)