From c1abe8c2a4f38038ee1670382474fbbda1e9507c Mon Sep 17 00:00:00 2001 From: Sebastian Seedorf Date: Mon, 30 Nov 2020 11:56:27 +0100 Subject: [PATCH] Fixed build errors --- .dockerignore | 1 + Dockerfile | 2 +- backend/tsconfig.json | 5 ++++- package.json | 6 +++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 481f283..4015660 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ !backend/src/* !public/* !backend/views/* +!backend/test/* !bio-proxy-configuration-for-docker/* !package.json diff --git a/Dockerfile b/Dockerfile index fc1d838..f91a5e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ COPY . . # install and test USER root -RUN . /etc/profile && apk add --virtual .npm-install-virt --no-cache git +RUN chown -R appuser:appuser /app && . /etc/profile && apk add --virtual .npm-install-virt --no-cache git USER appuser RUN npm run install-prod USER root diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 8845498..69b507e 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -14,5 +14,8 @@ "exclude": [ "../node_modules", "./public" - ] + ], + "ts-node": { + "files": true + } } diff --git a/package.json b/package.json index 620fa2d..f51813e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,11 @@ "debug-client": "tsc-watch --project ./public/js-source", "debug-server": "tsc-watch --project ./backend --onSuccess \"node --enable-source-maps --use-openssl-ca --unhandled-rejections=strict ./backend/out/index\"", "debug": "concurrently npm:debug-*", - "test": "nyc mocha -r ts-node/register ./public/js-source/test/**/*.ts ./backend/test/**/*.ts", + "test-client": "nyc mocha -r ts-node/register ./public/js-source/test/**/*.ts", + "test-server:default": "TS_NODE_PROJECT=backend/tsconfig.json nyc mocha -r ts-node/register ./backend/test/**/*.ts", + "test-server:windows": "SET TS_NODE_PROJECT=backend/tsconfig.json&& nyc mocha -r ts-node/register ./backend/test/**/*.ts", + "test-server": "run-script-os", + "test": "npm run test-server && npm run test-client", "build": "tsc -b ./backend ./public/js-source", "production": "node --use-openssl-ca --unhandled-rejections=strict ./backend/out/index", "install-debug": "npm install && npm run build",