diff --git a/barker/barker/models/__init__.py b/barker/barker/models/__init__.py
index 0b17868..aa0999d 100644
--- a/barker/barker/models/__init__.py
+++ b/barker/barker/models/__init__.py
@@ -1,7 +1,6 @@
from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import configure_mappers
-import zope.sqlalchemy
# import or define all models here to ensure they are attached to the
# Base.metadata prior to any initialization routines
diff --git a/barker/pyproject.toml b/barker/pyproject.toml
index c285326..e670c40 100644
--- a/barker/pyproject.toml
+++ b/barker/pyproject.toml
@@ -19,6 +19,7 @@ itsdangerous = "^1.1.0"
python-dotenv = "^0.14.0"
pydantic = {extras = ["dotenv"], version = "^1.6.1"}
starlette = "^0.13.6"
+celery = "^5.0.0"
[tool.poetry.dev-dependencies]
flake8 = "^3.8.4"
diff --git a/bookie/.browserslistrc b/bookie/.browserslistrc
new file mode 100644
index 0000000..0ccadaf
--- /dev/null
+++ b/bookie/.browserslistrc
@@ -0,0 +1,18 @@
+# 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
+not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
+not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
diff --git a/bookie/.eslintrc.js b/bookie/.eslintrc.js
new file mode 100644
index 0000000..0bbf8cb
--- /dev/null
+++ b/bookie/.eslintrc.js
@@ -0,0 +1,43 @@
+/*
+We recommend eventually switching this configuration to extend from
+the recommended rulesets in typescript-eslint.
+https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
+
+Happy linting! 💖
+*/
+module.exports = {
+ "extends": [
+ "plugin:@angular-eslint/recommended",
+ // AirBnB Styleguide rules
+ "airbnb-typescript/base",
+ // Settings for Prettier
+ "prettier",
+ "prettier/@typescript-eslint",
+ "prettier/react",
+ ],
+ "env": {
+ "browser": true,
+ "node": true
+ },
+ "parser": "@typescript-eslint/parser",
+ "parserOptions": {
+ "project": "tsconfig.json",
+ "ecmaVersion": 2020,
+ "sourceType": "module"
+ },
+ "plugins": [
+ "eslint-plugin-import",
+ "eslint-plugin-jsdoc",
+ "@angular-eslint/eslint-plugin",
+ "@typescript-eslint",
+ ],
+ "ignorePatterns": ["/src/**/*.spec.ts", "src/test.ts", "src/polyfills.ts"],
+ "rules": {
+ "import/prefer-default-export": "off",
+ "no-param-reassign": ["error", { "props": false }],
+ "@typescript-eslint/lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
+ "class-methods-use-this": ["error", {"exceptMethods": ["disconnect", "displayFn", "transform"]}],
+ "import/order": ["error", {"alphabetize": {"order": "asc", "caseInsensitive": true}, "newlines-between": "always"}],
+ "@typescript-eslint/no-explicit-any": "off", // Disabled for now, but needed to transition to strict compiling
+ }
+};
diff --git a/bookie/.prettierrc.js b/bookie/.prettierrc.js
new file mode 100644
index 0000000..1597d25
--- /dev/null
+++ b/bookie/.prettierrc.js
@@ -0,0 +1,8 @@
+module.exports = {
+ trailingComma: "all",
+ tabWidth: 2,
+ semi: true,
+ singleQuote: true,
+ bracketSpacing: true,
+ printWidth: 100
+};
diff --git a/bookie/angular.json b/bookie/angular.json
index 1e3a823..078f670 100644
--- a/bookie/angular.json
+++ b/bookie/angular.json
@@ -4,21 +4,25 @@
"newProjectRoot": "projects",
"projects": {
"bookie": {
+ "projectType": "application",
+ "schematics": {
+ "@schematics/angular:application": {
+ "strict": true
+ }
+ },
"root": "",
"sourceRoot": "src",
- "projectType": "application",
"prefix": "app",
- "schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
- "aot": true,
"outputPath": "../frontend",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
- "tsConfig": "src/tsconfig.app.json",
+ "tsConfig": "tsconfig.app.json",
+ "aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
@@ -42,19 +46,19 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
- "aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
- "maximumWarning": "2mb",
- "maximumError": "5mb"
+ "maximumWarning": "1mb",
+ "maximumError": "2mb"
},
{
"type": "anyComponentStyle",
- "maximumWarning": "6kb"
+ "maximumWarning": "2kb",
+ "maximumError": "4kb"
}
]
}
@@ -83,8 +87,8 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
- "tsConfig": "src/tsconfig.spec.json",
- "karmaConfig": "src/karma.conf.js",
+ "tsConfig": "tsconfig.spec.json",
+ "karmaConfig": "karma.conf.js",
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.css"
@@ -97,24 +101,19 @@
}
},
"lint": {
- "builder": "@angular-devkit/build-angular:tslint",
+ "builder": "@angular-eslint/builder:lint",
"options": {
+ "eslintConfig": ".eslintrc.js",
"tsConfig": [
- "src/tsconfig.app.json",
- "src/tsconfig.spec.json"
+ "tsconfig.app.json",
+ "tsconfig.spec.json",
+ "e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
- }
- }
- },
- "bookie-e2e": {
- "root": "e2e/",
- "projectType": "application",
- "prefix": "",
- "architect": {
+ },
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
@@ -126,15 +125,6 @@
"devServerTarget": "bookie:serve:production"
}
}
- },
- "lint": {
- "builder": "@angular-devkit/build-angular:tslint",
- "options": {
- "tsConfig": "e2e/tsconfig.e2e.json",
- "exclude": [
- "**/node_modules/**"
- ]
- }
}
}
}
diff --git a/bookie/browserslist b/bookie/browserslist
deleted file mode 100644
index 37371cb..0000000
--- a/bookie/browserslist
+++ /dev/null
@@ -1,11 +0,0 @@
-# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
-# For additional information regarding the format and rule options, please see:
-# https://github.com/browserslist/browserslist#queries
-#
-# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
-
-> 0.5%
-last 2 versions
-Firefox ESR
-not dead
-not IE 9-11
\ No newline at end of file
diff --git a/bookie/src/karma.conf.js b/bookie/karma.conf.js
similarity index 92%
rename from bookie/src/karma.conf.js
rename to bookie/karma.conf.js
index b6e0042..b238a01 100644
--- a/bookie/src/karma.conf.js
+++ b/bookie/karma.conf.js
@@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
- dir: require('path').join(__dirname, '../coverage'),
+ dir: require('path').join(__dirname, './coverage/bookie'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
@@ -28,4 +28,4 @@ module.exports = function (config) {
browsers: ['Chrome'],
singleRun: false
});
-};
\ No newline at end of file
+};
diff --git a/bookie/package.json b/bookie/package.json
index 058102b..1c185af 100644
--- a/bookie/package.json
+++ b/bookie/package.json
@@ -8,51 +8,78 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
- "postinstall": "ngcc"
+ "eslint": "eslint",
+ "prettier": "prettier",
+ "husky": "husky"
},
"private": true,
"dependencies": {
- "@angular/animations": "^9.1.11",
- "@angular/cdk": "^9.2.4",
- "@angular/common": "^9.1.11",
- "@angular/compiler": "^9.1.11",
- "@angular/core": "^9.1.11",
- "@angular/flex-layout": "^9.0.0-beta.31",
- "@angular/forms": "^9.1.11",
- "@angular/material": "^9.2.4",
- "@angular/material-moment-adapter": "^9.2.4",
- "@angular/platform-browser": "^9.1.11",
- "@angular/platform-browser-dynamic": "^9.1.11",
- "@angular/router": "^9.1.11",
- "angular2-hotkeys": "^2.2.0",
- "core-js": "^3.1.1",
- "mathjs": "^5.10.3",
- "moment": "^2.24.0",
- "rxjs": "^6.5.5",
- "rxjs-tslint": "^0.1.5",
- "tslib": "^1.10.0",
- "zone.js": "~0.10.2"
+ "@angular/animations": "^10.1.4",
+ "@angular/cdk": "^10.2.4",
+ "@angular/common": "^10.1.4",
+ "@angular/compiler": "^10.1.4",
+ "@angular/core": "^10.1.4",
+ "@angular/flex-layout": "^10.0.0-beta.32",
+ "@angular/forms": "^10.1.4",
+ "@angular/material": "^10.2.4",
+ "@angular/material-moment-adapter": "^10.2.4",
+ "@angular/platform-browser": "^10.1.4",
+ "@angular/platform-browser-dynamic": "^10.1.4",
+ "@angular/router": "^10.1.4",
+ "core-js": "^3.6.5",
+ "mathjs": "^7.4.0",
+ "moment": "^2.29.1",
+ "rxjs": "^6.6.3",
+ "tslib": "^2.0.2",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular-devkit/build-angular": "~0.901.8",
- "@angular/cli": "^9.1.8",
- "@angular/compiler-cli": "^9.1.11",
- "@angular/language-service": "^9.1.11",
- "@types/jasmine": "^3.3.0",
+ "@angular-devkit/build-angular": "~0.1001.4",
+ "@angular-eslint/builder": "^0.5.0-beta.2",
+ "@angular-eslint/eslint-plugin": "^0.5.0-beta.2",
+ "@angular-eslint/eslint-plugin-template": "^0.5.0-beta.2",
+ "@angular-eslint/schematics": "^0.5.0-beta.2",
+ "@angular-eslint/template-parser": "^0.5.0-beta.2",
+ "@angular/cli": "^10.1.4",
+ "@angular/compiler-cli": "^10.1.4",
+ "@angular/language-service": "^10.1.4",
+ "@types/jasmine": "^3.5.14",
"@types/jasminewd2": "^2.0.3",
- "@types/node": "^12.11.1",
- "codelyzer": "^5.1.2",
- "jasmine-core": "^3.1.0",
- "jasmine-spec-reporter": "^4.2.1",
- "karma": "^4.1.0",
- "karma-chrome-launcher": "^2.2.0",
- "karma-coverage-istanbul-reporter": "^2.0.1",
- "karma-jasmine": "^2.0.1",
- "karma-jasmine-html-reporter": "^1.4.2",
- "protractor": "^5.4.0",
- "standard-version": "^6.0.1",
- "ts-node": "^8.1.0",
- "tslint": "^5.16.0",
- "typescript": "3.8.3"
+ "@types/node": "^14.11.5",
+ "@typescript-eslint/eslint-plugin": "^4.4.0",
+ "@typescript-eslint/parser": "^4.3.0",
+ "codelyzer": "^6.0.1",
+ "eslint": "^7.10.0",
+ "eslint-config-airbnb-typescript": "^11.0.0",
+ "eslint-config-prettier": "^6.12.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-jsdoc": "^30.6.3",
+ "husky": "^4.3.0",
+ "jasmine-core": "^3.6.0",
+ "jasmine-spec-reporter": "^6.0.0",
+ "karma": "^5.2.3",
+ "karma-chrome-launcher": "~3.1.0",
+ "karma-coverage-istanbul-reporter": "~3.0.2",
+ "karma-jasmine": "^4.0.1",
+ "karma-jasmine-html-reporter": "^1.5.0",
+ "lint-staged": "^10.4.0",
+ "prettier": "^2.1.2",
+ "protractor": "~7.0.0",
+ "standard-version": "^9.0.0",
+ "ts-node": "^9.0.0",
+ "typescript": "^4.0.3"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged"
+ }
+ },
+ "lint-staged": {
+ "./src/*.{js,jsx,ts,tsx}": [
+ "npx prettier --write"
+ ],
+ "./src/*.{js,jsx,ts,tsx, css, html}": [
+ "npx eslint --cache --fix"
+ ]
}
}
diff --git a/bookie/src/app/auth/login/login.component.html b/bookie/src/app/auth/login/login.component.html
index 9ab26e4..706f5f2 100644
--- a/bookie/src/app/auth/login/login.component.html
+++ b/bookie/src/app/auth/login/login.component.html
@@ -19,7 +19,7 @@