This commit is contained in:
Panayiotis Lipiridis 2021-03-03 10:40:09 +02:00
commit bdbd692075
8 changed files with 898 additions and 45 deletions

3
.eslintrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "@excalidraw/eslint-config"
}

View File

@ -1,6 +1,8 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "npm" - package-ecosystem: npm
directory: "/" directory: /
schedule: schedule:
interval: "weekly" interval: weekly
day: sunday
time: "01:00"

View File

@ -6,17 +6,13 @@ on:
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Setup Node.js 14.x - name: Setup Node.js 14.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 14.x node-version: 14.x
- name: Install dependencies - name: Install dependencies
run: yarn run: yarn --frozen-lockfile
- name: Lint - name: Lint
run: yarn lint run: yarn test:other

View File

@ -8,7 +8,6 @@ on:
jobs: jobs:
publish-docker: publish-docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: docker/build-push-action@v1 - uses: docker/build-push-action@v1

View File

@ -6,19 +6,15 @@ on:
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Setup Node.js 14.x - name: Setup Node.js 14.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 14.x node-version: 14.x
- name: Install dependencies - name: Install dependencies
run: yarn run: yarn --frozen-lockfile
- name: Test and Build - name: Test and Build
run: | run: |
yarn test yarn test:code
yarn build yarn build

View File

@ -5,14 +5,23 @@
"socket.io": "2.3.0" "socket.io": "2.3.0"
}, },
"devDependencies": { "devDependencies": {
"@excalidraw/prettier-config": "1.0.1", "@excalidraw/eslint-config": "1.0.0",
"@excalidraw/prettier-config": "1.0.2",
"@types/debug": "4.1.5", "@types/debug": "4.1.5",
"@types/express": "4.17.11", "@types/express": "4.17.11",
"@types/node": "14.14.31", "@types/node": "14.14.31",
"@types/socket.io": "2.1.4", "@types/socket.io": "2.1.4",
"@typescript-eslint/eslint-plugin": "4.16.1",
"@typescript-eslint/parser": "4.16.1",
"debug": "4.3.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-prettier": "3.3.1",
"eslint": "7.21.0",
"express": "4.17.1",
"prettier": "2.2.1", "prettier": "2.2.1",
"ts-node-dev": "1.1.1", "socket.io": "2.3.0",
"typescript": "4.1.5" "ts-node-dev": "1.1.6",
"typescript": "4.2.2"
}, },
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
@ -21,12 +30,15 @@
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"deploy": "yarn build && gcloud app deploy --project=excalidraw-portal", "deploy": "yarn build && gcloud app deploy --project=excalidraw-portal",
"format": "yarn prettier --write", "fix:code": "yarn test:code --fix",
"lint": "yarn prettier --list-different", "fix:other": "yarn prettier --write",
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"", "fix": "yarn fix:other && yarn fix:code",
"start": "node dist/index.js", "prettier": "prettier . --ignore-path=.gitignore",
"start:dev": "ts-node-dev --respawn --transpile-only src/index.ts", "start:dev": "ts-node-dev --respawn --transpile-only src/index.ts",
"test": "yarn lint" "start": "node dist/index.js",
"test:code": "eslint --ext .ts .",
"test:other": "yarn prettier --list-different",
"test": "yarn test:other && yarn test:code"
}, },
"version": "1.0.0" "version": "1.0.0"
} }

View File

@ -23,7 +23,7 @@ server.listen(port, () => {
}); });
const io = socketIO(server, { const io = socketIO(server, {
handlePreflightRequest: function (req, res) { handlePreflightRequest: (req, res) => {
const headers = { const headers = {
"Access-Control-Allow-Headers": "Content-Type, Authorization", "Access-Control-Allow-Headers": "Content-Type, Authorization",
"Access-Control-Allow-Origin": "Access-Control-Allow-Origin":

885
yarn.lock

File diff suppressed because it is too large Load Diff