diff --git a/.gitignore b/.gitignore index d71f12fc1..b790d9ed3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,13 +33,33 @@ projects/trivia/src/**/*.js # misc /.sass-cache /connect.lock -/coverage +/coverage/* /libpeerconnection.log npm-debug.log yarn-error.log testem.log /typings +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db + + # System Files .DS_Store Thumbs.db +functions/node_modules/ +functions/server/ +functions/config/ +functions/package-lock.json +functions/dist/ +package-lock.json +firebase-debug.log + scheduler/node_modules/ +scheduler/server/ +scheduler/config/ +scheduler/package-lock.json diff --git a/README.md b/README.md index cc103c932..72c0c8429 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,130 @@ -# Trivia +# rwa-trivia app -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.1.5. +This is part of building a new app for my series - Real World Angular @ https://blog.realworldfullstack.io/ -## Development server +See it in action (still a work in progress) - https://bitwiser.io -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. +[Part 0: From zero to cli-ng](https://blog.realworldfullstack.io/real-world-angular-part-0-from-zero-to-cli-ng-a2ff646b90cc) -## Code scaffolding +[Part 1: Not another todo list app](https://blog.realworldfullstack.io/real-world-angular-part-1-not-another-todo-list-c2ea5020f944) -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`. +[Part 2: It's a Material world](https://blog.realworldfullstack.io/real-world-angular-part-2-its-a-material-world-2d70238ef8ef) -## Build +[Part 3: Form Formation](https://blog.realworldfullstack.io/real-world-angular-part-3-form-formation-f78d8462da70) -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. +[Part 4: State of my SPA](https://blog.realworldfullstack.io/real-world-angular-part-4-state-of-my-spa-10bf90c5a15) -## Running unit tests +[Part 5: Light my fire](https://blog.realworldfullstack.io/real-world-angular-part-5-light-my-fire-34b0bcb351a8) -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). +[Part 6: 3Rs ... Rules, Roles & Routes](https://blog.realworldfullstack.io/real-world-angular-part-6-3rs-rules-roles-routes-9e7de5a3ea8e) -## Running end-to-end tests +[Part 6.1: Upgrading to 4.0.0-rc.2](https://blog.realworldfullstack.io/real-world-angular-part-6-1-upgrading-to-4-0-0-rc-2-fcaab81603fa) -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +[Part 7: Split my lazy loaded code](https://blog.realworldfullstack.io/real-world-angular-part-7-lazy-coding-load-splitting-4552f5f54ef7) -## Further help +[Part 8: Just Ahead of In Time](https://blog.realworldfullstack.io/real-world-angular-part-8-just-ahead-of-in-time-ae2d3cc89656) -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +[Part 9: Unit Testing](https://blog.realworldfullstack.io/real-world-angular-part-9-unit-testing-c62ba20b1d93) + +[Part 9.1: More Unit Testing](https://blog.realworldfullstack.io/real-world-angular-part-9-1-more-unit-testing-f0545ece586d) + +[Part 9.2: Even More Unit Tests](https://blog.realworldfullstack.io/real-world-angular-part-9-2-even-more-unit-tests-f903df40530a) + +[Part 10: Angular 4 upgrade](https://blog.realworldfullstack.io/real-world-angular-part-x-fantastic-4-c714b04640ab) + +[Part 11: Gameplay with Angular](https://blog.realworldfullstack.io/real-world-app-part-11-gameplay-with-angular-2a660fad52c2) + +[Part 12: Cloud Functions for Firebase](https://blog.realworldfullstack.io/real-world-app-part-12-cloud-functions-for-firebase-8359787e26f3) + +[Part 13: Elasticsearch on Google Cloud with Firebase functions](https://blog.realworldfullstack.io/real-world-app-part-13-elasticsearch-on-google-cloud-with-firebase-functions-8a24fa2b95ed) + +[Part 14: Faceted search with Elasticsearch and Angular Material data-table](https://blog.realworldfullstack.io/real-world-app-part-14-faceted-search-with-elasticsearch-and-angular-material-data-table-d90ebaf2ee4b) + +[Part 15: Incorporate Material UI design into the app](https://blog.realworldfullstack.io/real-world-app-part-15-ui-design-with-angular-material-1a5c597c679e) + +[Part 16: Migrating from Firebase to Firestore](https://blog.realworldfullstack.io/real-world-app-part-16-from-firebase-to-firestore-f6c494e80237) + +[Part 17: Bulk upload and User profile settings using firebase cloud storage](https://blog.realworldfullstack.io/real-world-app-part-17-cloud-storage-with-firebase-and-angular-d3d2c9f5f27c) + +[Part 18: Revisiting ngrx - Splitting store into feature modules, using action classes, selectors & router-store](https://blog.realworldfullstack.io/real-world-app-part-18-revisiting-ngrx-e20feed6312c) + +[Part 19: Ready Player Two - Two player game play, computing stats, dashboard and other features](https://blog.realworldfullstack.io/real-world-app-part-19-ready-player-two-9e17c2e7c694) + +[Part 20: Angular, ngrx & cli version 6 - Upgrading Angular, cli, ngrx, material & RxJS to version 6](https://blog.realworldfullstack.io/real-world-app-part-20-angular-ngrx-cli-version-6-a3490b64f0c7) + +[Part 21: Service Workers (Progressive Web App) with Angular](https://blog.realworldfullstack.io/real-world-app-part-21-service-workers-pwa-with-angular-3ba5c7168f3f) + +[Part 22: Angular Testing with Protractor, Jasmine and Jest](https://blog.realworldfullstack.io/real-world-app-part-22-angular-testing-with-protractor-jasmine-and-jest-6a0e03a89038) + +## Quick Installation Instructions + +* Install cli globally (version should match the one in package.json) + +`npm install -g @angular/cli@1.0.0` + +* Install npm packages + +`npm install` + +* Setup your firebase instance @ https://firebase.google.com/ + +* Setup providers in Firebase Authentication + +* Use the firebase configuration information and plug it in src/environment.ts + +* Import src/db.json to your firebase database instance to get the initial set of test data + +* Run the application using ng serve + +`ng serve` + +* Add yourself as a user using the application. Ensure you are added as a user in Authentication tab of firebase console. + +* Add your user id as an admin in the firebase database (admins need to be added manually) - + +Set: users/\/roles/admin: true + +* Use firebase-rules.json file to setup the firebase rules for your database + +* Serve the application again. Ensure you have admin privileges + +`ng serve` + +## Deploy to Firebase Server + +* Install firebase tools globally + +`npm install -g firebase-tools` + +* Authenticate with your firebase credentials + +`firebase login` + +* Setup firebase hosting configuration for the application, using "dist" instead of public as the public folder name + +`firebase init` + +* Create a build + +`ng build` + +* Serve up the app using firebase server locally + +`firebase serve` + +* Deploy Site to firebase + +`firebase deploy --only hosting` + +* Setup firebase functions - creates functions folder and installs dependencies + +`firebase init` + +* Deploy functions to firebase + +`npm run deploy-functions` + +## Testing +* Test the application using + +`ng test` diff --git a/angular.json b/angular.json index de536065b..d4543dadd 100644 --- a/angular.json +++ b/angular.json @@ -49,6 +49,7 @@ "with": "projects/shared-library/src/lib/environments/environment.dev.ts" } ], + "serviceWorker": true, "optimization": true, "outputHashing": "all", "sourceMap": false, @@ -346,9 +347,6 @@ }, "@schematics/angular:directive": { "prefix": "app" - }, - "cli": { - "defaultCollection": "@nativescript/schematics" - } + } } } \ No newline at end of file diff --git a/firebase.json b/firebase.json index e471f0df5..1bfd4a13b 100644 --- a/firebase.json +++ b/firebase.json @@ -5,11 +5,17 @@ { "source": "/app/**", "function": "app" - }, + }, + { + "source": "/robots.txt", + "destination": "/robots.txt" + }, { "source": "**", "function": "ssr" } ] } -} \ No newline at end of file +} + + diff --git a/functions/controllers/game.controller.ts b/functions/controllers/game.controller.ts index a71b04bdd..6686d8521 100644 --- a/functions/controllers/game.controller.ts +++ b/functions/controllers/game.controller.ts @@ -163,10 +163,6 @@ exports.checkGameOver = (req, res) => { const millis = utils.getUTCTimeStamp(); const noPlayTimeBound = (millis > game.turnAt) ? millis - game.turnAt : game.turnAt - millis; const playedHours = Math.floor((noPlayTimeBound) / (1000 * 60 * 60)); -<<<<<<< HEAD - -======= ->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58 if (playedHours >= schedulerConstants.gamePlayDuration) { game.gameOver = true; game.winnerPlayerId = game.playerIds.filter(playerId => playerId !== game.nextTurnPlayerId)[0]; @@ -174,18 +170,6 @@ exports.checkGameOver = (req, res) => { gameControllerService.updateGame(dbGame).then((ref) => { console.log('updated game', dbGame.id); }); -<<<<<<< HEAD - } else if (playedHours >= schedulerConstants.gameInvitationDuration - && (game.GameStatus === GameStatus.WAITING_FOR_FRIEND_INVITATION_ACCEPTANCE || - game.GameStatus === GameStatus.WAITING_FOR_RANDOM_PLAYER_INVITATION_ACCEPTANCE)) { - game.gameOver = true; - game.GameStatus = GameStatus.INVITATION_TIMEOUT; - const dbGame = game.getDbModel(); - gameControllerService.updateGame(dbGame).then((ref) => { - console.log('invitation expires', dbGame.id); - }); -======= ->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58 } }); res.send('scheduler check is completed'); diff --git a/functions/controllers/user.controller.ts b/functions/controllers/user.controller.ts index d99ae8c31..cc86e640c 100644 --- a/functions/controllers/user.controller.ts +++ b/functions/controllers/user.controller.ts @@ -1,14 +1,9 @@ const userService = require('../services/user.service'); const sharp = require('sharp'); -<<<<<<< HEAD import { User, UserStats, UserControllerConstants } from '../../projects/shared-library/src/lib/shared/model'; import { ProfileImagesGenerator } from '../utils/profile-images-generator'; import { MailClient } from '../utils/mail-client'; -======= -import { User, UserStats } from '../../projects/shared-library/src/lib/shared/model'; -import { ProfileImagesGenerator } from '../utils/profile-images-generator'; ->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58 /** * getUserById @@ -79,7 +74,6 @@ exports.generateUserProfileImage = (req, res) => { if (user.profilePicture) { profileImagesGenerator. getStoredImage(user.userId, user.profilePicture).then((status) => { -<<<<<<< HEAD setUser(user, res); }) @@ -99,16 +93,3 @@ function setUser(user, res) { res.send({ 'status': 'Profile Data is saved !!' }) }); } -======= - userService.setUser(user).then((ref) => { - res.send({ 'status': 'Profile Data is saved !!' }) - }); - }) - - } else { - userService.setUser(user).then((ref) => { - res.send({ 'status': 'Profile Data is saved !!' }) - }); - } -}; ->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58 diff --git a/package-lock.json b/package-lock.json index b4e3e6ec0..2522f7733 100644 --- a/package-lock.json +++ b/package-lock.json @@ -851,9 +851,9 @@ }, "dependencies": { "@angular-devkit/core": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.8.2.tgz", - "integrity": "sha512-jPcKrqkGathCTXl+T8xA9gmze8x4Yfn2BO0kMk+1Hw5wJ5Y48YyfigPG/UTk+vNWgyxwdEEVYTFBdkWhVcs0Eg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.8.3.tgz", + "integrity": "sha512-2KHt5osMs3zACYXev20ZU5SXdWoinoKwZkj2caj2LCj9W7QNHmsz34QvaygNq7YdJzF3jkXkdy0GSUgUgDke0w==", "dev": true, "requires": { "ajv": "~6.4.0", @@ -863,23 +863,23 @@ } }, "@angular-devkit/schematics": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.8.2.tgz", - "integrity": "sha512-50mu38GnJfLikF+on5A2fFczdu50jpJ8qC8I2S7Xg6Z34WksTGXTn7FucyS12UTkN/W1TL9XU1ERa+Fcm8KSxw==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.8.3.tgz", + "integrity": "sha512-NzsRc0O6nlwCviynZbbkrSWPvTSICviqyYxCXkmEkrbiXqvvahJjSQ/sXQQV0TRkgyTFdhnDF4WIwpeJM4UDeg==", "dev": true, "requires": { - "@angular-devkit/core": "0.8.2", + "@angular-devkit/core": "0.8.3", "rxjs": "~6.2.0" } }, "@schematics/angular": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.8.2.tgz", - "integrity": "sha512-TrZyDnALiIG/utr5UzvoY9vcgqkveEvFsN6rdvmEpidfr0vdg2gwt1V77ryFsOWMmGFsWDVksmrMI2TuNCo7cw==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.8.3.tgz", + "integrity": "sha512-kAax08neZQhIsWfqnNdmpSekWbLku+po+1ndfxOMDIhQOAgS/3QTc2mxfSRz/JyQMw1UMSDiXHG8F2Q7gkFIZw==", "dev": true, "requires": { - "@angular-devkit/core": "0.8.2", - "@angular-devkit/schematics": "0.8.2", + "@angular-devkit/core": "0.8.3", + "@angular-devkit/schematics": "0.8.3", "typescript": ">=2.6.2 <2.10" } } @@ -1077,9 +1077,9 @@ "dev": true }, "@types/selenium-webdriver": { - "version": "2.53.43", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz", - "integrity": "sha512-UBYHWph6P3tutkbXpW6XYg9ZPbTKjw/YC2hGG1/GEvWwTbvezBUv3h+mmUFw79T3RFPnmedpiXdOBbXX+4l0jg==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.10.tgz", + "integrity": "sha512-ikB0JHv6vCR1KYUQAzTO4gi/lXLElT4Tx+6De2pc/OZwizE9LRNiTa+U8TBFKBD/nntPnr/MPSHSnOTybjhqNA==", "dev": true }, "@webassemblyjs/ast": { @@ -1341,7 +1341,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "dev": true, "requires": { "mime-types": "~2.1.18", "negotiator": "0.6.1" @@ -1440,9 +1439,9 @@ } }, "adm-zip": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.4.tgz", - "integrity": "sha1-ph7VrmkFw66lizplfSUDMJEFJzY=", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz", + "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==", "dev": true }, "after": { @@ -3348,6 +3347,15 @@ "electron-to-chromium": "^1.3.47" } }, + "browserstack": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.5.1.tgz", + "integrity": "sha512-O8VMT64P9NOLhuIoD4YngyxBURefaSdR4QdhG8l6HZ9VxtU7jc3m6jLufFwKA5gaf7fetfB2TnRJnMxyob+heg==", + "dev": true, + "requires": { + "https-proxy-agent": "^2.2.1" + } + }, "bser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", @@ -3474,8 +3482,7 @@ "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cacache": { "version": "10.0.4", @@ -4133,7 +4140,6 @@ "version": "2.0.15", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz", "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==", - "dev": true, "requires": { "mime-db": ">= 1.36.0 < 2" } @@ -4142,7 +4148,6 @@ "version": "1.7.3", "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz", "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==", - "dev": true, "requires": { "accepts": "~1.3.5", "bytes": "3.0.0", @@ -12692,14 +12697,12 @@ "mime-db": { "version": "1.36.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", - "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==", - "dev": true + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" }, "mime-types": { "version": "2.1.20", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", - "dev": true, "requires": { "mime-db": "~1.36.0" } @@ -13582,8 +13585,7 @@ "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=", - "dev": true + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, "neo-async": { "version": "2.5.2", @@ -13707,6 +13709,11 @@ "resolved": "https://registry.npmjs.org/ngx-img-cropper/-/ngx-img-cropper-0.10.4.tgz", "integrity": "sha512-9rg4UnNtlrjMlMIy7echqHGSqoTgudVsi6brgYGUNJHhZZ9HdvwRfXu0yc/tvBBcMCiap6OkHieyQpRwrlWjcQ==" }, + "ngx-lazy-load-images": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ngx-lazy-load-images/-/ngx-lazy-load-images-1.3.1.tgz", + "integrity": "sha512-KXB7Y1OGOXyovRapTs9TPrLLvrgMrIaYNus6r3iiJVdua0KElhxxfQrQeeAlaSGPQe8hGwR1Ie2SngiH4dD5Ug==" + }, "ngx-papaparse": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/ngx-papaparse/-/ngx-papaparse-2.1.4.tgz", @@ -14364,8 +14371,7 @@ "on-headers": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", - "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=", - "dev": true + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" }, "once": { "version": "1.4.0", @@ -14384,12 +14390,6 @@ "mimic-fn": "^1.0.0" } }, - "open": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz", - "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw=", - "dev": true - }, "opener": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz", @@ -14437,12 +14437,6 @@ "wordwrap": "~1.0.0" } }, - "options": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", - "dev": true - }, "optjs": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", @@ -16918,25 +16912,26 @@ } }, "protractor": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.3.0.tgz", - "integrity": "sha512-8z1TWtc/I9Kn4fkfg87DhkSAi0arul7DHBEeJ70sy66teQAeffjQED1s0Gduigme7hxHRYdYEKbhHYz28fpv5w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.1.tgz", + "integrity": "sha512-ORey5ewQMYiXQxcQohsqEiKYOg/r5yJoJbt0tuROmmgajdg/CA3gTOZNIFJncUVMAJIk5YFqBBLUjKVmQO6tfA==", "dev": true, "requires": { "@types/node": "^6.0.46", "@types/q": "^0.0.32", - "@types/selenium-webdriver": "~2.53.39", + "@types/selenium-webdriver": "^3.0.0", "blocking-proxy": "^1.0.0", + "browserstack": "^1.5.1", "chalk": "^1.1.3", "glob": "^7.0.3", "jasmine": "2.8.0", "jasminewd2": "^2.1.0", "optimist": "~0.6.0", "q": "1.4.1", - "saucelabs": "~1.3.0", + "saucelabs": "^1.5.0", "selenium-webdriver": "3.6.0", "source-map-support": "~0.4.0", - "webdriver-js-extender": "^1.0.0", + "webdriver-js-extender": "2.1.0", "webdriver-manager": "^12.0.6" }, "dependencies": { @@ -16946,12 +16941,6 @@ "integrity": "sha512-sihk0SnN8PpiS5ihu5xJQ5ddnURNq4P+XPmW+nORlKkHy21CoZO/IVHK/Wq/l3G8fFW06Fkltgnqx229uPlnRg==", "dev": true }, - "adm-zip": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz", - "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==", - "dev": true - }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -18192,41 +18181,12 @@ } }, "saucelabs": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.3.0.tgz", - "integrity": "sha1-0kDoAJ33+ocwbsRXimm6O1xCT+4=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz", + "integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==", "dev": true, "requires": { - "https-proxy-agent": "^1.0.0" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "dev": true, - "requires": { - "extend": "~3.0.0", - "semver": "~5.0.1" - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "dev": true, - "requires": { - "agent-base": "2", - "debug": "2", - "extend": "3" - } - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", - "dev": true - } + "https-proxy-agent": "^2.2.1" } }, "sax": { @@ -18842,16 +18802,16 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-explorer": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/source-map-explorer/-/source-map-explorer-1.5.0.tgz", - "integrity": "sha512-skfca9IJvJKsI+J3sWFQ+hCqUDmZxhGgM20/L7PpNGRnQSVyXPYi7U0TDw0eNj5Yhtsm//psmNkxQmHuEJJ6FA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/source-map-explorer/-/source-map-explorer-1.6.0.tgz", + "integrity": "sha512-Om4L02wExk1tWZ2KJqW7A/gadFoU6/6vuPUOiYyeMCtkQqhexTod6Pi6aCQ6HiIEd7ZSbiOOPgIrG6bn/72foQ==", "dev": true, "requires": { "btoa": "^1.1.2", "convert-source-map": "^1.1.1", "docopt": "^0.6.2", "glob": "^7.1.2", - "open": "0.0.5", + "opn": "^5.3.0", "source-map": "^0.5.1", "temp": "^0.8.3", "underscore": "^1.8.3" @@ -20861,8 +20821,7 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vendors": { "version": "1.0.2", @@ -21013,66 +20972,13 @@ } }, "webdriver-js-extender": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz", - "integrity": "sha1-gcUzqeM9W/tZe05j4s2yW1R3dRU=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz", + "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==", "dev": true, "requires": { - "@types/selenium-webdriver": "^2.53.35", - "selenium-webdriver": "^2.53.2" - }, - "dependencies": { - "sax": { - "version": "0.6.1", - "resolved": "http://registry.npmjs.org/sax/-/sax-0.6.1.tgz", - "integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=", - "dev": true - }, - "selenium-webdriver": { - "version": "2.53.3", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz", - "integrity": "sha1-0p/1qVff8aG0ncRXdW5OS/vc4IU=", - "dev": true, - "requires": { - "adm-zip": "0.4.4", - "rimraf": "^2.2.8", - "tmp": "0.0.24", - "ws": "^1.0.1", - "xml2js": "0.4.4" - } - }, - "tmp": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.24.tgz", - "integrity": "sha1-1qXhmNFKmDXMby18PZ4wJCjIzxI=", - "dev": true - }, - "ultron": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", - "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", - "dev": true - }, - "ws": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", - "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", - "dev": true, - "requires": { - "options": ">=0.0.5", - "ultron": "1.0.x" - } - }, - "xml2js": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.4.tgz", - "integrity": "sha1-MREBAAMAiuGSQOuhdJe1fHKcVV0=", - "dev": true, - "requires": { - "sax": "0.6.x", - "xmlbuilder": ">=1.0.0" - } - } + "@types/selenium-webdriver": "^3.0.0", + "selenium-webdriver": "^3.0.1" } }, "webidl-conversions": { diff --git a/package.json b/package.json index 19a2a941b..9ac58afb1 100644 --- a/package.json +++ b/package.json @@ -150,4 +150,4 @@ "pre-push": "npm run test && ng e2e trivia-e2e" } } -} +} \ No newline at end of file diff --git a/projects/shared-library/src/lib/core/db-service/mobile/db.service.ts b/projects/shared-library/src/lib/core/db-service/mobile/db.service.ts index 7fdb94a51..88a2d73e1 100644 --- a/projects/shared-library/src/lib/core/db-service/mobile/db.service.ts +++ b/projects/shared-library/src/lib/core/db-service/mobile/db.service.ts @@ -6,7 +6,7 @@ import { User } from '../../../shared/model'; // @Inject(PlatformFirebaseToken) protected _firebase: any const firebase = require("nativescript-plugin-firebase/app"); -import { firestore } from "nativescript-plugin-firebase"; +// import { firestore } from "nativescript-plugin-firebase"; @Injectable() export class TNSDbService extends DbService { diff --git a/projects/shared-library/src/lib/core/store/reducers/questions.reducer.spec.ts b/projects/shared-library/src/lib/core/store/reducers/questions.reducer.spec.ts index 4d8a73a4e..2f3804cf8 100644 --- a/projects/shared-library/src/lib/core/store/reducers/questions.reducer.spec.ts +++ b/projects/shared-library/src/lib/core/store/reducers/questions.reducer.spec.ts @@ -1,11 +1,7 @@ import { Observable } from 'rxjs'; import { Action } from '@ngrx/store'; import { QuestionActions } from '../actions'; -<<<<<<< HEAD import { Question, SearchResults } from '../../../../../../shared-library/src/lib/shared/model'; -======= -import { Question, SearchResults } from '../../../model'; ->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58 import { questionOfTheDay } from './questions.reducer'; import { TEST_DATA } from '../../../testing/test.data'; diff --git a/projects/trivia/src/app/user/components/recent-games/recent-game-card/recent-game-card.component.html b/projects/trivia/src/app/user/components/recent-games/recent-game-card/recent-game-card.component.html index 1c79dcc95..6ca836eb5 100644 --- a/projects/trivia/src/app/user/components/recent-games/recent-game-card/recent-game-card.component.html +++ b/projects/trivia/src/app/user/components/recent-games/recent-game-card/recent-game-card.component.html @@ -9,15 +9,11 @@
Won
Lost
-<<<<<<< HEAD
Tie
Rejected
Expired
-======= -
Tie
->>>>>>> 5cb465b4d8adddf023929f77b9fd04dec8292b58
diff --git a/tsconfig.tns.json b/tsconfig.tns.json index 4a228f851..32010cdae 100644 --- a/tsconfig.tns.json +++ b/tsconfig.tns.json @@ -21,6 +21,7 @@ "**/*.ios.ts", "app/main.aot.ts", "functions", - "**/*.spec.ts" + "**/*.spec.ts", + "server.ts" ] } \ No newline at end of file diff --git a/tslint.json b/tslint.json index 3ea984c77..14a265f87 100644 --- a/tslint.json +++ b/tslint.json @@ -34,6 +34,8 @@ "member-access": false, "member-ordering": [ true, + "static-before-instance", + "variables-before-functions", { "order": [ "static-field", @@ -55,7 +57,7 @@ ], "no-construct": true, "no-debugger": true, - "no-duplicate-super": true, + "no-duplicate-variable": true, "no-empty": false, "no-empty-interface": true, "no-eval": true, @@ -106,6 +108,7 @@ "variable-declaration": "nospace" } ], + "typeof-compare": true, "unified-signatures": true, "variable-name": false, "whitespace": [ @@ -116,6 +119,8 @@ "check-separator", "check-type" ], + "directive-selector": [true, "attribute", "app", "camelCase"], + "component-selector": [true, "element", "app", "kebab-case"], "no-output-on-prefix": true, "use-input-property-decorator": true, "use-output-property-decorator": true, @@ -125,6 +130,9 @@ "use-life-cycle-interface": true, "use-pipe-transform-interface": true, "component-class-suffix": true, + "no-access-missing-member": true, + "templates-use-public": true, + "invoke-injectable": true, "directive-class-suffix": true } }