Skip to content

Commit

Permalink
Merge pull request #36 from duluca/pipeline-experiment
Browse files Browse the repository at this point in the history
tweak to pipeline
  • Loading branch information
duluca committed Nov 17, 2020
2 parents 3b76d9c + 46ead48 commit 06699ec
Show file tree
Hide file tree
Showing 48 changed files with 892 additions and 548 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ commands:
- when:
condition: << parameters.warm-cache >>
steps:
- run: npm install
- run: npm ci
# Pre-build Angular modules
- run: npx ngcc --properties es2015
# force update the webdriver, so it runs with latest version of Chrome
Expand Down Expand Up @@ -46,6 +46,7 @@ commands:
- when:
condition: << parameters.run-tests >>
steps:
- run: cd ./node_modules/protractor && npm i webdriver-manager@latest
- run: npx ng test --code-coverage --watch=false --project << parameters.project >>
- run: npx ng e2e << parameters.project >>
store:
Expand Down
1,220 changes: 789 additions & 431 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lemon-mart",
"version": "10.0.0",
"version": "11.0.0",
"license": "MIT",
"config": {
"imageRepo": "073020584345.dkr.ecr.us-east-1.amazonaws.com/lemon-mart",
Expand Down Expand Up @@ -65,7 +65,7 @@
"@angular/common": "11.0.0",
"@angular/compiler": "11.0.0",
"@angular/core": "11.0.0",
"@angular/fire": "^6.0.2",
"@angular/fire": "^6.1.0-rc.2",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "11.0.0",
"@angular/material": "11.0.0",
Expand All @@ -77,28 +77,28 @@
"@ngrx/entity": "^10.0.1",
"@ngrx/store": "^10.0.1",
"@ngrx/store-devtools": "^10.0.1",
"firebase": "^7.15.5",
"jwt-decode": "^2.2.0",
"firebase": "^8.0.2",
"jwt-decode": "^3.1.1",
"ngx-mask": "^11.0.0",
"rxjs": "^6.6.3",
"subsink": "^1.0.1",
"ts-enum-util": "^4.0.2",
"tslib": "^2.0.0",
"tslib": "^2.0.3",
"zone.js": "^0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1100.1",
"@angular/cli": "11.0.1",
"@angular/compiler-cli": "11.0.0",
"@angular/language-service": "11.0.0",
"@types/jasmine": "~3.6.0",
"@types/jasmine": "~3.6.1",
"@types/jasminewd2": "~2.0.8",
"@types/jsonwebtoken": "^8.5.0",
"@types/jwt-decode": "^2.2.1",
"@types/node": "^14.0.19",
"@types/node": "^14.14.7",
"angular-unit-test-helper": "^11.0.2",
"codelyzer": "^6.0.0",
"cross-conf-env": "^1.1.2",
"codelyzer": "^6.0.1",
"cross-conf-env": "^1.2.1",
"dev-norms": "^1.7.1",
"fake-jwt-sign": "^1.1.1",
"http-server": "^0.12.3",
Expand All @@ -107,28 +107,29 @@
"import-sort-parser-typescript": "^6.0.0",
"import-sort-style-module": "^6.0.0",
"init-dev-env": "^1.0.0",
"jasmine": "^3.5.0",
"jasmine": "^3.6.3",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"js-beautify": "^1.11.0",
"karma": "~5.1.0",
"jasmine-spec-reporter": "~6.0.0",
"js-beautify": "^1.13.0",
"karma": "~5.2.3",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-edge-launcher": "^0.4.2",
"karma-htmlfile-reporter": "^0.3.8",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"npm-run-all": "^4.1.5",
"open-cli": "^6.0.1",
"prettier": "^2.0.5",
"prettier": "^2.1.2",
"protractor": "~7.0.0",
"rimraf": "^3.0.2",
"ts-node": "~8.10.2",
"ts-node": "~9.0.0",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"tslint-etc": "^1.11.1",
"tslint-etc": "^1.13.7",
"tslint-plugin-prettier": "^2.3.0",
"tsutils": "^3.17.1",
"typescript": "^4.0.5"
},
"importSort": {
Expand Down
2 changes: 1 addition & 1 deletion projects/ch10/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import { AuthService } from './auth/auth.service'
</mat-sidenav-content>
</mat-sidenav-container>
</div>
`
`,
})
export class AppComponent implements OnInit, OnDestroy {
private subs = new SubSink()
Expand Down
8 changes: 5 additions & 3 deletions projects/ch10/src/app/auth/auth.firebase.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'firebase/auth'

import { Injectable } from '@angular/core'
import { AngularFireAuth } from '@angular/fire/auth'
import { User as FirebaseUser } from 'firebase'
import firebase from 'firebase/app'
import { Observable, Subject } from 'rxjs'
import { map } from 'rxjs/operators'

Expand Down Expand Up @@ -34,7 +36,7 @@ export class FirebaseAuthService extends AuthService {

this.afAuth.signInWithEmailAndPassword(email, password).then(
(res) => {
const firebaseUser: FirebaseUser | null = res.user
const firebaseUser: firebase.User | null = res.user
firebaseUser?.getIdToken().then(
(token) => serverResponse$.next({ accessToken: token } as IServerAuthResponse),
(err) => serverResponse$.error(err)
Expand Down Expand Up @@ -62,7 +64,7 @@ export class FirebaseAuthService extends AuthService {
return this.afAuth.user.pipe(map(this.transformFirebaseUser))
}

private transformFirebaseUser(firebaseUser: FirebaseUser): User {
private transformFirebaseUser(firebaseUser: firebase.User): User {
if (!firebaseUser) {
return new User()
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ch10/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'
import * as decode from 'jwt-decode'
import decode from 'jwt-decode'
import { BehaviorSubject, Observable, pipe, throwError } from 'rxjs'
import { catchError, filter, map, mergeMap, tap } from 'rxjs/operators'

Expand Down
2 changes: 1 addition & 1 deletion projects/ch10/src/app/common/simple-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'
{{ data.okText }}
</button>
</mat-dialog-actions>
`
`,
})
export class SimpleDialogComponent {
constructor(
Expand Down
8 changes: 2 additions & 6 deletions projects/ch10/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ import { AuthService } from '../auth/auth.service'
],
template: `
<div *ngIf="(authService.authStatus$ | async)?.isAuthenticated; else doLogin">
<div class="mat-display-4">
This is LemonMart! The place where
</div>
<div class="mat-display-4">This is LemonMart! The place where</div>
<div class="mat-display-4">
You get a lemon, you get a lemon, you get a lemon...
</div>
<div class="mat-display-4">
Everybody gets a lemon.
</div>
<div class="mat-display-4">Everybody gets a lemon.</div>
</div>
<ng-template #doLogin>
<app-login></app-login>
Expand Down
2 changes: 1 addition & 1 deletion projects/ch11/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import { AuthService } from './auth/auth.service'
</mat-sidenav-content>
</mat-sidenav-container>
</div>
`
`,
})
export class AppComponent implements OnInit, OnDestroy {
private subs = new SubSink()
Expand Down
8 changes: 5 additions & 3 deletions projects/ch11/src/app/auth/auth.firebase.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'firebase/auth'

import { Injectable } from '@angular/core'
import { AngularFireAuth } from '@angular/fire/auth'
import { User as FirebaseUser } from 'firebase'
import firebase from 'firebase/app'
import { Observable, Subject } from 'rxjs'
import { map } from 'rxjs/operators'

Expand Down Expand Up @@ -34,7 +36,7 @@ export class FirebaseAuthService extends AuthService {

this.afAuth.signInWithEmailAndPassword(email, password).then(
(res) => {
const firebaseUser: FirebaseUser | null = res.user
const firebaseUser: firebase.User | null = res.user
firebaseUser?.getIdToken().then(
(token) => serverResponse$.next({ accessToken: token } as IServerAuthResponse),
(err) => serverResponse$.error(err)
Expand Down Expand Up @@ -62,7 +64,7 @@ export class FirebaseAuthService extends AuthService {
return this.afAuth.user.pipe(map(this.transformFirebaseUser))
}

private transformFirebaseUser(firebaseUser: FirebaseUser): User {
private transformFirebaseUser(firebaseUser: firebase.User): User {
if (!firebaseUser) {
return new User()
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ch11/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'
import * as decode from 'jwt-decode'
import decode from 'jwt-decode'
import { BehaviorSubject, Observable, pipe, throwError } from 'rxjs'
import { catchError, filter, map, mergeMap, tap } from 'rxjs/operators'

Expand Down
2 changes: 1 addition & 1 deletion projects/ch11/src/app/common/simple-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'
{{ data.okText }}
</button>
</mat-dialog-actions>
`
`,
})
export class SimpleDialogComponent {
constructor(
Expand Down
8 changes: 2 additions & 6 deletions projects/ch11/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ import { AuthService } from '../auth/auth.service'
],
template: `
<div *ngIf="(authService.authStatus$ | async)?.isAuthenticated; else doLogin">
<div class="mat-display-4">
This is LemonMart! The place where
</div>
<div class="mat-display-4">This is LemonMart! The place where</div>
<div class="mat-display-4">
You get a lemon, you get a lemon, you get a lemon...
</div>
<div class="mat-display-4">
Everybody gets a lemon.
</div>
<div class="mat-display-4">Everybody gets a lemon.</div>
</div>
<ng-template #doLogin>
<app-login></app-login>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ import { IName } from '../user/user'
`,
styles: [],
})
export class NameInputComponent extends BaseFormDirective<IName>
export class NameInputComponent
extends BaseFormDirective<IName>
implements OnInit, OnChanges {
ErrorSets = ErrorSets

Expand Down
3 changes: 2 additions & 1 deletion projects/ch11/src/app/user/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { IUSState, USStateFilter } from './data'
templateUrl: './profile.component.html',
styleUrls: ['./profile.component.css'],
})
export class ProfileComponent extends BaseFormDirective<IUser>
export class ProfileComponent
extends BaseFormDirective<IUser>
implements OnInit, OnDestroy {
private get currentUserRole() {
return this.authService.authStatus$.value.userRole
Expand Down
2 changes: 1 addition & 1 deletion projects/ch12/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import { AuthService } from './auth/auth.service'
</mat-sidenav-content>
</mat-sidenav-container>
</div>
`
`,
})
export class AppComponent implements OnInit, OnDestroy {
private subs = new SubSink()
Expand Down
8 changes: 5 additions & 3 deletions projects/ch12/src/app/auth/auth.firebase.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'firebase/auth'

import { Injectable } from '@angular/core'
import { AngularFireAuth } from '@angular/fire/auth'
import { User as FirebaseUser } from 'firebase'
import firebase from 'firebase/app'
import { Observable, Subject } from 'rxjs'
import { map } from 'rxjs/operators'

Expand Down Expand Up @@ -34,7 +36,7 @@ export class FirebaseAuthService extends AuthService {

this.afAuth.signInWithEmailAndPassword(email, password).then(
(res) => {
const firebaseUser: FirebaseUser | null = res.user
const firebaseUser: firebase.User | null = res.user
firebaseUser?.getIdToken().then(
(token) => serverResponse$.next({ accessToken: token } as IServerAuthResponse),
(err) => serverResponse$.error(err)
Expand Down Expand Up @@ -62,7 +64,7 @@ export class FirebaseAuthService extends AuthService {
return this.afAuth.user.pipe(map(this.transformFirebaseUser))
}

private transformFirebaseUser(firebaseUser: FirebaseUser): User {
private transformFirebaseUser(firebaseUser: firebase.User): User {
if (!firebaseUser) {
return new User()
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ch12/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'
import * as decode from 'jwt-decode'
import decode from 'jwt-decode'
import { BehaviorSubject, Observable, pipe, throwError } from 'rxjs'
import { catchError, filter, map, mergeMap, tap } from 'rxjs/operators'

Expand Down
2 changes: 1 addition & 1 deletion projects/ch12/src/app/common/simple-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'
{{ data.okText }}
</button>
</mat-dialog-actions>
`
`,
})
export class SimpleDialogComponent {
constructor(
Expand Down
8 changes: 2 additions & 6 deletions projects/ch12/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ import { AuthService } from '../auth/auth.service'
],
template: `
<div *ngIf="(authService.authStatus$ | async)?.isAuthenticated; else doLogin">
<div class="mat-display-4">
This is LemonMart! The place where
</div>
<div class="mat-display-4">This is LemonMart! The place where</div>
<div class="mat-display-4">
You get a lemon, you get a lemon, you get a lemon...
</div>
<div class="mat-display-4">
Everybody gets a lemon.
</div>
<div class="mat-display-4">Everybody gets a lemon.</div>
</div>
<ng-template #doLogin>
<app-login></app-login>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ import { IName } from '../user/user'
`,
styles: [],
})
export class NameInputComponent extends BaseFormDirective<IName>
export class NameInputComponent
extends BaseFormDirective<IName>
implements OnInit, OnChanges {
ErrorSets = ErrorSets

Expand Down
3 changes: 2 additions & 1 deletion projects/ch12/src/app/user/profile/profile.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import { IUSState, USStateFilter } from './data'
templateUrl: './profile.component.html',
styleUrls: ['./profile.component.css'],
})
export class ProfileComponent extends BaseFormDirective<IUser>
export class ProfileComponent
extends BaseFormDirective<IUser>
implements OnInit, OnDestroy {
private get currentUserRole() {
return this.authService.authStatus$.value.userRole
Expand Down
2 changes: 1 addition & 1 deletion projects/ch13/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import { AuthService } from './auth/auth.service'
</mat-sidenav-content>
</mat-sidenav-container>
</div>
`
`,
})
export class AppComponent implements OnInit, OnDestroy {
private subs = new SubSink()
Expand Down
2 changes: 1 addition & 1 deletion projects/ch13/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'
import * as decode from 'jwt-decode'
import decode from 'jwt-decode'
import { BehaviorSubject, Observable, pipe, throwError } from 'rxjs'
import { catchError, filter, map, mergeMap, tap } from 'rxjs/operators'

Expand Down
2 changes: 1 addition & 1 deletion projects/ch13/src/app/common/simple-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'
{{ data.okText }}
</button>
</mat-dialog-actions>
`
`,
})
export class SimpleDialogComponent {
constructor(
Expand Down
Loading

0 comments on commit 06699ec

Please sign in to comment.