Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:03:44 +02:00
commit 15f48d259f
91 changed files with 22716 additions and 0 deletions

16
Frontend/.browserslistrc Normal file
View File

@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
#last 1 Chrome version
#last 1 Firefox version
#last 2 Edge major versions
#last 2 Safari major versions
#last 2 iOS major versions
#Firefox ESR

7
Frontend/.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
.editorconfig
/node_modules
/e2e
/docs
.gitignore
*.zip
*.md

16
Frontend/.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

46
Frontend/.gitignore vendored Normal file
View File

@@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

11
Frontend/Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
#stage 1
FROM node:latest as node
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build --prod
#stage 2
FROM nginx:alpine
COPY nginx.conf /etc/nginx/sites-available/default
COPY --from=node /app/dist/frontend /usr/share/nginx/html

27
Frontend/README.md Normal file
View File

@@ -0,0 +1,27 @@
# Frontend
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.1.2.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

111
Frontend/angular.json Normal file
View File

@@ -0,0 +1,111 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Frontend": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/frontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "Frontend:build:production"
},
"development": {
"browserTarget": "Frontend:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "Frontend:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
}
}
},
"defaultProject": "Frontend"
}

44
Frontend/karma.conf.js Normal file
View File

@@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/frontend'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

13
Frontend/nginx.conf Normal file
View File

@@ -0,0 +1,13 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ /index.html;
}
}

19966
Frontend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

39
Frontend/package.json Normal file
View File

@@ -0,0 +1,39 @@
{
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.1.0",
"@angular/common": "~13.1.0",
"@angular/compiler": "~13.1.0",
"@angular/core": "~13.1.0",
"@angular/forms": "~13.1.0",
"@angular/platform-browser": "~13.1.0",
"@angular/platform-browser-dynamic": "~13.1.0",
"@angular/router": "~13.1.0",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.2",
"@angular/cli": "~13.1.2",
"@angular/compiler-cli": "~13.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2"
}
}

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {LoginComponent} from "./sites/login/login.component";
const routes: Routes = [
{path: "login", component: LoginComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

@@ -0,0 +1 @@
<router-outlet *ngIf="loaded"></router-outlet>

View File

View File

@@ -0,0 +1,27 @@
import {Component, OnInit} from '@angular/core';
import {BackendService} from "./services/backend.service";
import {Router} from "@angular/router";
import {UserApi} from "./services/users.service";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
public loaded: boolean = false;
constructor(private backend: BackendService, private router: Router, private users: UserApi) {}
ngOnInit(): void {
setTimeout(async () => {
if (this.router.url == "/login" || this.router.url == "/register") {
this.loaded = true;
return;
}
if (await this.backend.requestToken()) this.loaded = true;
else await this.router.navigate(["login"]);
}, 0);
}
}

View File

@@ -0,0 +1,22 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {HttpClientModule} from "@angular/common/http";
import { LoginComponent } from './sites/login/login.component';
@NgModule({
declarations: [
AppComponent,
LoginComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

View File

@@ -0,0 +1,5 @@
export interface AccessToken {
id: string;
refreshTokenId: string;
expirationDate: string;
}

View File

@@ -0,0 +1,17 @@
export interface User extends UserEditor {
id: string;
created: Date;
}
export interface UserLogin {
usernameOrEmail: string;
password: string;
}
export interface UserEditor {
firstName: string;
lastName: string;
email: string;
username: string;
password: string;
}

View File

@@ -0,0 +1,99 @@
import { Injectable } from '@angular/core';
import {HttpClient, HttpErrorResponse, HttpHeaders} from "@angular/common/http";
import {firstValueFrom} from "rxjs";
import {environment} from "../../environments/environment";
export interface BackendResponse<T> {
content: T;
success: boolean;
code: number;
message?: string;
}
export enum RequestTypes {
GET = 0,
PUT = 1,
POST = 2,
DELETE = 3
}
export interface RequestOptions {
withCredentials?: boolean;
authorized?: boolean;
}
@Injectable({
providedIn: 'root'
})
export class BackendService {
public authKey: string;
public headers: HttpHeaders = new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': ''
});
constructor(private client: HttpClient) {}
public setToken(token: string): void {
this.authKey = token;
this.headers = this.headers.set("Authorization", token);
}
public async sendRequest<T>(type: RequestTypes, endpoint: string, body?: any, options?: RequestOptions): Promise<BackendResponse<T>> {
try {
let response;
switch (type) {
default:
case RequestTypes.GET:
response = await firstValueFrom(this.client.get<T>(environment.backendUrl + endpoint, {withCredentials: options?.withCredentials, headers: this.headers}));
break;
case RequestTypes.DELETE:
response = await firstValueFrom(this.client.delete<T>(environment.backendUrl + endpoint, {withCredentials: options?.withCredentials, headers: this.headers}));
break;
case RequestTypes.PUT:
response = await firstValueFrom(this.client.put<T>(environment.backendUrl + endpoint, body, {withCredentials: options?.withCredentials, headers: this.headers}));
break;
case RequestTypes.POST:
response = await firstValueFrom(this.client.post<T>(environment.backendUrl + endpoint, body, {withCredentials: options?.withCredentials, headers: this.headers}));
break;
}
return {content: response, success: true, code: 200};
} catch (e) {
const error = e as HttpErrorResponse;
if (error.status == 401 && options?.authorized) {
if (await this.requestToken()) {
options.authorized = false; // Prevent infinite resent loop
return this.sendRequest<T>(type, endpoint, body, options);
}
}
return {content: undefined, success: false, code: error.status, message: error.error.title};
}
}
public async testConnection(): Promise<boolean> {
try {
await this.client.get(environment.backendUrl);
return true;
}catch {
return false;
}
}
public async requestToken(): Promise<boolean> {
try {
const token = await firstValueFrom(this.client.get<{id: string, refreshTokenId: string, expirationDate: string}>(environment.backendUrl + "users/token", {headers: this.headers, withCredentials: true}));
this.setToken(token.id);
return true;
}catch {
return false;
}
}
}

View File

@@ -0,0 +1,88 @@
import {Injectable} from '@angular/core';
import {BackendService, RequestTypes} from "./backend.service";
import {User, UserEditor, UserLogin} from "../entitys/user";
import {AccessToken} from "../entitys/accessToken";
@Injectable({
providedIn: 'root'
})
export class UserApi {
private user: User;
constructor(private backend: BackendService) { }
public async getUsers(): Promise<User[]> {
const response = await this.backend.sendRequest<User[]>(RequestTypes.GET, "users", undefined, {authorized: true});
if (!response.success) return [];
return response.content;
}
public async getUser(id: string): Promise<User> {
const response = await this.backend.sendRequest<User>(RequestTypes.GET, "users/" + id, undefined, {authorized: true});
return response.content;
}
public async editUser(id: string, editor: UserEditor): Promise<boolean> {
const response = await this.backend.sendRequest<any>(RequestTypes.PUT, "users/" + id, editor, {authorized: true});
return response.success;
}
public async deleteUser(id: string): Promise<boolean> {
const response = await this.backend.sendRequest(RequestTypes.DELETE, "users/" + id, undefined, {authorized: true});
return response.success;
}
public async getUserPermissions(id: string, includeGroupPermissions: boolean = true): Promise<string[]> {
const response = await this.backend.sendRequest<string[]>(RequestTypes.GET, "users/" + id + "/permissions" + (includeGroupPermissions ? "/raw" : ""), undefined, {authorized: true});
if (!response.success) return [];
return response.content;
}
public async addUserPermissions(id: string, permissions: string[]): Promise<boolean> {
const response = await this.backend.sendRequest<any>(RequestTypes.POST, "users/" + id + "/permissions", permissions, {authorized: true});
return response.success;
}
public async removeUserPermissions(id: string, permissions: string[]): Promise<boolean> {
const response = await this.backend.sendRequest<any>(RequestTypes.PUT, "users/" + id + "/permissions", permissions, {authorized: true});
return response.success;
}
public async login(login: UserLogin): Promise<{success: boolean, errorMessage: string}> {
const response = await this.backend.sendRequest<AccessToken>(RequestTypes.PUT, "users/login", login, {withCredentials: true});
if (response.success) {
this.backend.setToken(response.content.id);
await this.getAuthorizedUser();
}
return {success: response.success, errorMessage: response.message};
}
public async register(register: UserEditor): Promise<{success: boolean, errorMessage: string}> {
const response = await this.backend.sendRequest<AccessToken>(RequestTypes.POST, "users/register", register, {withCredentials: true});
if (response.success) {
this.backend.setToken(response.content.id);
await this.getAuthorizedUser();
}
return {success: response.success, errorMessage: response.message};
}
public async logout(id: string): Promise<boolean> {
const response = await this.backend.sendRequest(RequestTypes.DELETE, "users/" + id + "/logout", undefined, {authorized: true, withCredentials: true});
return response.success;
}
public async getAuthorizedUser(): Promise<User> {
if (this.user != undefined) return this.user;
const response = await this.backend.sendRequest<User>(RequestTypes.GET, "users/self", undefined, {authorized: true});
if (response.success)
this.user = response.content;
return response.content;
}
}

View File

@@ -0,0 +1 @@
<p>login works!</p>

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

View File

@@ -0,0 +1,4 @@
export const environment = {
production: true,
backendUrl: 'https://api.desktop.leon-hoppe.de/'
};

View File

@@ -0,0 +1,17 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
backendUrl: 'http://localhost:5142/'
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

BIN
Frontend/src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

13
Frontend/src/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WebDesktop</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

12
Frontend/src/main.ts Normal file
View File

@@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

53
Frontend/src/polyfills.ts Normal file
View File

@@ -0,0 +1,53 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes recent versions of Safari, Chrome (including
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

1
Frontend/src/styles.scss Normal file
View File

@@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */

26
Frontend/src/test.ts Normal file
View File

@@ -0,0 +1,26 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
<T>(id: string): T;
keys(): string[];
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -0,0 +1,19 @@
import {BackendService, RequestTypes} from "../app/services/backend.service";
import {TestBed} from "@angular/core/testing";
import {HttpClientModule} from "@angular/common/http";
describe('BackendService', () => {
let service : BackendService;
beforeEach(() => {
TestBed.configureTestingModule({imports: [HttpClientModule]})
service = TestBed.inject(BackendService);
})
it('should connect to the backend', function (done) {
service.testConnection().then(result => {
expect(result).toBeTrue();
done();
})
});
})

View File

@@ -0,0 +1,115 @@
import { TestBed } from '@angular/core/testing';
import {UserApi} from "../app/services/users.service";
import {BackendService} from "../app/services/backend.service";
import {HttpClientModule} from "@angular/common/http";
describe('UserApi', () => {
let backend: BackendService;
let service: UserApi;
let userId: string;
beforeAll((done) => {
TestBed.configureTestingModule({imports: [HttpClientModule]});
backend = TestBed.inject(BackendService);
service = TestBed.inject(UserApi);
service.register({
username: "tester",
password: "password",
email: "test@test.com",
firstName: "test",
lastName: "test"
}).then(success => {
expect(success.success).toBeTrue();
service.getAuthorizedUser().then(user => {
expect(user).not.toBeUndefined();
userId = user.id;
done();
})
})
}, 5000)
beforeEach(() => {
backend.setToken("474a0461-37ec-4b11-aefe-00c423d1511e");
});
it('should be create the service', () => {
expect(service).toBeTruthy();
});
it('should show all users', (done) => {
service.getUsers().then(users => {
expect(users).not.toBeUndefined();
done();
})
});
it('should login with the given credentials', (done) => {
service.login({
usernameOrEmail: "tester",
password: "password"
}).then(result => {
expect(result.success).toBeTrue();
done();
})
});
it('should delete all user sessions', (done) => {
service.login({
usernameOrEmail: "tester",
password: "password"
}).then(result => {
expect(result.success).toBeTrue();
service.logout(userId).then(success => {
expect(success).toBeTrue();
done();
})
})
});
it('should show the specified user', (done) => {
service.getUser(userId).then(user => {
expect(user).not.toBeUndefined();
done();
})
});
it('should edit the specified user', (done) => {
service.editUser(userId, {
username: "",
password: "",
email: "",
firstName: "Test",
lastName: "Test"
}).then(result => {
expect(result).toBeTrue();
done();
})
});
it('should show the permissions of the specified user', (done) => {
service.getUserPermissions(userId).then(perms => {
expect(perms).not.toBeUndefined();
done();
})
});
it('should add the permissions to the specified user', (done) => {
service.addUserPermissions(userId, ["*"]).then(success => {
expect(success).toBeTrue();
done();
})
});
it('should remove the permissions to the specified user', (done) => {
service.removeUserPermissions(userId, ["*"]).then(success => {
expect(success).toBeTrue();
done();
})
});
afterAll((done) => {
service.deleteUser(userId).then(() => done());
})
});

View File

@@ -0,0 +1,15 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

34
Frontend/tsconfig.json Normal file
View File

@@ -0,0 +1,34 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2017",
"module": "es2020",
"lib": [
"es2020",
"dom"
],
"strictPropertyInitialization": false,
"strictNullChecks": false
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
}
}

View File

@@ -0,0 +1,18 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}