Skip to content

Commit

Permalink
chore(package): update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Burak Tasci committed Dec 24, 2018
1 parent be9b4f9 commit ac5aaa5
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 110 deletions.
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@
"@angular/platform-server": "~7.2.0-rc.0",
"@angular/router": "~7.2.0-rc.0",
"@angularclass/bootloader": "~1.0.1",
"@ngrx/effects": "~7.0.0-beta.1",
"@ngrx/entity": "~7.0.0-beta.1",
"@ngrx/store": "~7.0.0-beta.1",
"@ngrx/effects": "~7.0.0",
"@ngrx/entity": "~7.0.0",
"@ngrx/store": "~7.0.0",
"@nguniversal/common": "~7.0.2",
"@nguniversal/express-engine": "~7.0.2",
"@nguniversal/module-map-ngfactory-loader": "~7.0.2",
"@ngx-auth/core": "~6.0.0",
"@ngx-cache/core": "~6.0.0",
"@ngx-cache/fs-storage": "~6.0.0",
"@ngx-cache/platform-browser": "~6.0.0",
"@ngx-cache/platform-server": "~6.0.0",
"@ngx-config/core": "~6.0.0",
"@ngx-config/http-loader": "~6.0.0",
"@ngx-meta/core": "~6.0.0",
"@ngx-auth/core": "~7.0.0",
"@ngx-cache/core": "~7.0.0",
"@ngx-cache/fs-storage": "~7.0.0",
"@ngx-cache/platform-browser": "~7.0.0",
"@ngx-cache/platform-server": "~7.0.0",
"@ngx-config/core": "~7.0.0",
"@ngx-config/http-loader": "~7.0.0",
"@ngx-meta/core": "~7.0.0",
"@ngx-translate/core": "~11.0.1",
"@ngx-translate/http-loader": "~4.0.0",
"angulartics2": "~7.2.3",
"angulartics2": "~7.2.4",
"compression": "~1.7.3",
"core-js": "~2.6.1",
"debug": "~4.1.0",
"debug": "~4.1.1",
"express": "~4.16.4",
"hammerjs": "~2.0.8",
"lodash": "~4.17.11",
Expand All @@ -100,8 +100,8 @@
"@commitlint/cli": "~7.2.1",
"@commitlint/config-conventional": "~7.1.2",
"@compodoc/compodoc": "~1.1.7",
"@ngrx/schematics": "~7.0.0-beta.1",
"@ngrx/store-devtools": "~7.0.0-beta.1",
"@ngrx/schematics": "~7.0.0",
"@ngrx/store-devtools": "~7.0.0",
"@types/compression": "~0.0.36",
"@types/express": "~4.16.0",
"@types/jest": "~23.3.10",
Expand Down
5 changes: 3 additions & 2 deletions src/app/layout/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export class HeaderComponent extends BaseComponent implements OnInit {
this.isAuthenticated = this.auth.isAuthenticated;
}

logout(): void {
async logout(): Promise<boolean> {
this.isAuthenticated = false;
this.auth.invalidate();

return this.auth.invalidate();
}
}
49 changes: 27 additions & 22 deletions src/app/login/login.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,39 @@ t.describe('login: LoginComponent', () => {
)
);

t.it('should authenticate w/valid combination', () => {
const fixture = TestBed.createComponent(LoginComponent);
const instance = fixture.debugElement.componentInstance;
fixture.detectChanges();

instance.username = 'valid';
instance.password = 'valid';
instance.login();

t.e(instance.note$).toBeDefined();
t.e(instance.error$).toBeUndefined();
});

t.it(
'should not authenticate w/o valid combination',
t.inject([AuthService], (auth: AuthService) => {
auth.invalidate();

'should authenticate w/valid combination',
t.async(() => {
const fixture = TestBed.createComponent(LoginComponent);
const instance = fixture.debugElement.componentInstance;
fixture.detectChanges();

instance.username = 'invalid';
instance.password = 'invalid';
instance.login();
instance.username = 'valid';
instance.password = 'valid';

t.e(instance.note$).toBeDefined();
t.e(instance.error$).toBeDefined();
instance.login().subscribe(() => {
t.e(instance.note$).toBeDefined();
t.e(instance.error$).toBeUndefined();
});
})
);

t.it(
'should not authenticate w/o valid combination',
t.inject([AuthService], async (auth: AuthService) =>
auth.invalidate().then(() => {
const fixture = TestBed.createComponent(LoginComponent);
const instance = fixture.debugElement.componentInstance;
fixture.detectChanges();

instance.username = 'invalid';
instance.password = 'invalid';

instance.login().subscribe(() => {
t.e(instance.note$).toBeDefined();
t.e(instance.error$).toBeDefined();
});
})
)
);
});
21 changes: 11 additions & 10 deletions src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ export class LoginComponent extends BaseComponent implements OnInit {
}
}

login(): void {
login(): Observable<any> {
this.isProcessing = true;
this.note$ = this.translate.get('PUBLIC.LOGIN.NOTE');

this.auth
.authenticate(this.username, this.password)
.pipe(takeUntil(this.ngUnsubscribe))
.subscribe(() => {
this.isProcessing = false;
const auth$ = this.auth.authenticate(this.username, this.password).pipe(takeUntil(this.ngUnsubscribe));

if (!this.auth.isAuthenticated) {
this.error$ = this.translate.get('PUBLIC.LOGIN.ERROR');
}
});
auth$.subscribe(() => {
this.isProcessing = false;

if (!this.auth.isAuthenticated) {
this.error$ = this.translate.get('PUBLIC.LOGIN.ERROR');
}
});

return auth$;
}
}
129 changes: 68 additions & 61 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -601,30 +601,30 @@
call-me-maybe "^1.0.1"
glob-to-regexp "^0.3.0"

"@ngrx/effects@~7.0.0-beta.1":
version "7.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@ngrx/effects/-/effects-7.0.0-beta.1.tgz#021876e5b16b90540c53528fd491d27eb3b3732a"
integrity sha512-Uga7MLqIVifs6/WEh7w3WuJ4/KJhy7VjpNZ8K/RV7T6h/Qpxs1Kcn1OZ5HCEc8RN7EO0TXUcKF7r9n2Uit/WkA==

"@ngrx/entity@~7.0.0-beta.1":
version "7.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@ngrx/entity/-/entity-7.0.0-beta.1.tgz#27a0bd554fedd8c8abbbb11e0148511f5a5ff3e3"
integrity sha512-tJBOfRCqU+CiVLTAx/4EV6PWidBbwZqOKyRwluvJolR8NKcFApWFIO/ZyEc4u7tg5UI1KSyFPotxwkgyDBhQxA==

"@ngrx/schematics@~7.0.0-beta.1":
version "7.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@ngrx/schematics/-/schematics-7.0.0-beta.1.tgz#47c37cc6183b4a39c3f98fc00ee612d83db77518"
integrity sha512-2J3vuBrij79DqaNjg+UNETiP2i6x6l3xH6UmRXDoAT4VS6Y1hDZKDcwI9pHF0fClbl1DVrMbiDyf+dyx3qU7DQ==

"@ngrx/store-devtools@~7.0.0-beta.1":
version "7.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@ngrx/store-devtools/-/store-devtools-7.0.0-beta.1.tgz#88246cb79a9954294a16cbdd82d0b68762870595"
integrity sha512-jNiprxifY+eraUGsghiJ5ep8zjDdXIO3iNRTyilN4Gx3XD6WJOxXo+05URfBAKjB6zWIyYyx0vJb5bwITgfBtw==

"@ngrx/store@~7.0.0-beta.1":
version "7.0.0-beta.1"
resolved "https://registry.yarnpkg.com/@ngrx/store/-/store-7.0.0-beta.1.tgz#029d362a1355c1fc5badaf7f67a07fcaf3af8f38"
integrity sha512-sEF6nb5YRoGroW4Y+ibHQucxzWVfMJF9a4zQV/prxDPtYA2FC9h9ZY3N4TZbLNgg+MSqdThgHXl7vA+5RmIY+Q==
"@ngrx/effects@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngrx/effects/-/effects-7.0.0.tgz#57ea3a42ed970b748e78292e54fe02a768027b05"
integrity sha512-lhwt+UMDPYuxeTQ5vBw/MuKrIroHvQ6cLy0nGvNl8oPxakI2Jz/NAPuTYd+AdV/6ao9M9+kxXhQRFkAV53EEjA==

"@ngrx/entity@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngrx/entity/-/entity-7.0.0.tgz#c059e10f63d366e405f24a349d6f860afc80f91f"
integrity sha512-SyiUmg9YjKcb6cuHvIqoMIUJ6KPPJV4oIaI8Rxxps0C+K3R16q8pTbnNqZek/oGj7SQhbd2DOzhqvybrI34Kmg==

"@ngrx/schematics@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngrx/schematics/-/schematics-7.0.0.tgz#065fa7383bd20e388111901d507aa7eeeb10e4a9"
integrity sha512-DljjU77CkCR5YpgjtHEsZrxnnKIOY3AChcmQsDbQh1OZFzCT5lMq9mjtoHxRUKsEOp2/CwKb0sFCTsQBXJIZqg==

"@ngrx/store-devtools@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngrx/store-devtools/-/store-devtools-7.0.0.tgz#8be35ad8b455019c9ac583c92ad8f0ec0d538c37"
integrity sha512-VLYDIiK5uy6SfIh3PUWT8oXNSHtVefRm44h9MMDBBUQphu5fBmGB9wtkFHfVTmw5V9TdZ9KnUTvm5Dlln8VP0A==

"@ngrx/store@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngrx/store/-/store-7.0.0.tgz#5472000197c2a388b09afceb2d062cb37b03d334"
integrity sha512-fF4A4De/vtQawxGBc1jV5HiLrc/J3NS8A2UDRoD3kLdviDzAlAber6kuj5XmM+xxaI9f9qnUrwOVXr/oPfqoBg==

"@ngtools/webpack@7.2.0-rc.0":
version "7.2.0-rc.0"
Expand Down Expand Up @@ -652,59 +652,59 @@
resolved "https://registry.yarnpkg.com/@nguniversal/module-map-ngfactory-loader/-/module-map-ngfactory-loader-7.0.2.tgz#2df0532f84d4f4e042adb294e3685fad28ed0622"
integrity sha512-zZst1DfmWZdozNmYRu6vUacFLKreLVhGfpp/LmBrW/jDESHWU4AtRBQYtH8KfhKFSE+B6ehyGYHPfDdSa5sk7g==

"@ngx-auth/core@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-auth/core/-/core-6.0.0.tgz#5dab90519870597a31d21d3584d62811731fc47c"
integrity sha512-Rl5wB35g2bHld8r8aRebQfpXZ35YZg/+fFvL7XLXYEHN59cAdhB0sjJVc/IKfyqpkeAyHbxlcftntvZuh0IknQ==
"@ngx-auth/core@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-auth/core/-/core-7.0.0.tgz#cec14874fda16d56f381982297aad6b2f40d9904"
integrity sha512-0mQfsbCasd0csIwn1m0iD+GthcOlsxbeGBzKPEq3TcxNA2AlMOmwP3jc90EzweIx/V6+oNg+ICmXsg8rpUAJgg==
dependencies:
tslib "~1.9.0"

"@ngx-cache/core@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/core/-/core-6.0.0.tgz#835496ca1c38e7cb4b8c866465305f825fb52105"
integrity sha512-ioCzzk5Msh7Alj/Ms/DY5oBO6TC97QeMNTwi4rJrtT8Ja6Y4v1Z3ZNbOh9UYaiIdCGeNE56jQL/6bsw/PMTCdw==
"@ngx-cache/core@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/core/-/core-7.0.0.tgz#adb475316bd45d7549e53212553f2f4d5ba0411f"
integrity sha512-+NoEI5/I91ACSoQEzO60gaHRlct/FWWo2LWBzobHORZRXqSXi42zK5BQSpCsU6RnLRu4kG6rWaaFiD/eV/88gQ==
dependencies:
tslib "~1.9.0"

"@ngx-cache/fs-storage@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/fs-storage/-/fs-storage-6.0.0.tgz#0e4bc6ded6917cf4d64817402d30c52399f18122"
integrity sha512-hh423cGZ0cx2LcxXBbq1AHTGuv8Gbx4ajHrHDwraXAlL6Ysnp1NYJI0n+iZCd3qZMYwOiMFyOpPaQ+pZ4a8yRQ==
"@ngx-cache/fs-storage@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/fs-storage/-/fs-storage-7.0.0.tgz#d012e5a1c5974c33b1461a4f1da52a30c666957d"
integrity sha512-xKpNM90sLOLychFXR1TgyZ9cD1dxGs/ds6FbggGstOaZtVxULVXB43Ia5mwmZVaAAs9ESG+yHKs4oS1SxjRojQ==
dependencies:
tslib "~1.9.0"

"@ngx-cache/platform-browser@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/platform-browser/-/platform-browser-6.0.0.tgz#4e25ebed614a290c038f6f9754dd12e6920f43a1"
integrity sha512-vMtIy551B54WRjamfP/f+OZcMM6AgPNJGDKiMNR6klWJjJaqrXWZQNBt21MyN3D0mETpYmwRbphZJExykDG0aA==
"@ngx-cache/platform-browser@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/platform-browser/-/platform-browser-7.0.0.tgz#7644a6b61c9d1fe076281e209a7b918ada543e31"
integrity sha512-WCORI5Pz1GYCq63odycLiO3c1hKuXBUP94GnddcsJVuQULvhAO6+9KJs//ddWshS61+ssiK18sXaoF7erlhZvA==
dependencies:
tslib "~1.9.0"

"@ngx-cache/platform-server@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/platform-server/-/platform-server-6.0.0.tgz#f53499767558a481442e4a8d5e3abfce95f43a40"
integrity sha512-oO/zrqRXmpLcUM3QXsicJ6RhMsr5M+xUsVwskzxqY/kpYvdpFcEnGeE9plcj/sZ5eLMP7eCU0k7X0OhMLgdFQw==
"@ngx-cache/platform-server@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-cache/platform-server/-/platform-server-7.0.0.tgz#a3c34fab705bba1bfbd21d63c50b53395e2b24d1"
integrity sha512-X5zxaKyEjE23xvTy2zRjFb6Fg1ILGv+9cAsQd02z5cN5ORDRDS4ZxG39egZ5je2c4Xds+0gHALglnI51p7N1AQ==
dependencies:
tslib "~1.9.0"

"@ngx-config/core@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-config/core/-/core-6.0.0.tgz#580a9eb6dddec27201a45c6de4fe29abc90438fd"
integrity sha512-7Qh3aqnXzK+zOUfVoEUmiD9Dwe+0A0R6r7zK8DJbCyYIbpSaCf5F43NfG/lhpDqOXMBkOmyCbkLy6BkQtXf/mQ==
"@ngx-config/core@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-config/core/-/core-7.0.0.tgz#c4bf8d15f7ab5ccb70dfebb71d10d4ff19f351e3"
integrity sha512-QaDuUCo2OI9OUwDy9W9Rwfv4PJwBToXT2Dgv+UnFhV0q+TcIIYww8K9AzL1NRRFuKoh420grj7Y+cps9rG1maA==
dependencies:
tslib "~1.9.0"

"@ngx-config/http-loader@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-config/http-loader/-/http-loader-6.0.0.tgz#3af4156af114565c4fb218b09e4263ad1d62cab8"
integrity sha512-ZjX6xEDWIlyIWfMu0Z2ksLiene7FZ29xfqzoPyOpq/O3jmxHRnebHFcUO63rj3SXJgpf+ezV+GUvIU71FNIB4w==
"@ngx-config/http-loader@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-config/http-loader/-/http-loader-7.0.0.tgz#317308465f3613a33166bafacc33508656b765b2"
integrity sha512-uRmPIFWJd61VSEQDnLP/Y5A8vIuIQPe6gVM1XqYDVU2FxD2e5jw6G4B01niaabH2oNwvC3I7B4Je+rUUmq7uCQ==
dependencies:
tslib "~1.9.0"

"@ngx-meta/core@~6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@ngx-meta/core/-/core-6.0.0.tgz#3cdc176e810fbe7b9b2d0d09abc5c8606ec61023"
integrity sha512-44BZrKeJsvAsnJHIgp2PG5RyM/GrkvPbE2HxFhMBgOpHBtNcsosbr3FmdhYMwKDim3fsd6HnNEE21nqEMI9+Nw==
"@ngx-meta/core@~7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@ngx-meta/core/-/core-7.0.0.tgz#fe136fc7f0b507499972f5ea0675c58721f6f6e1"
integrity sha512-gsbt84hnQPGGGSwxG8av6y7HdZCw9y4pCjUDybEfJEPogrRJIVNUnemh2PnpdzpxRlk9qjbQ+sxO1Nohs+2pSQ==
dependencies:
tslib "~1.9.0"

Expand Down Expand Up @@ -1148,10 +1148,10 @@ angular-tslint-rules@~1.12.1:
resolved "https://registry.yarnpkg.com/angular-tslint-rules/-/angular-tslint-rules-1.12.1.tgz#a21eb1848525fc8c5b4e4fe110f0b198504b2f23"
integrity sha512-bcNwWoRd0/ePyfT02Id2E9nsU9Z/ONhlGYLCLmRgF1Pl5aQDYfnbioeDgvl8faRXAL1Xk+9a1PsgQ+22r5TrMw==

angulartics2@~7.2.3:
version "7.2.3"
resolved "https://registry.yarnpkg.com/angulartics2/-/angulartics2-7.2.3.tgz#81a13d8ba3cdc2d6e1bf1806db2d14dc0c626838"
integrity sha512-p2WSa54fjRdlPeUIgfhaKnWcz61tNAJa5oruzti5P7u0WcpMY2Z5WPEJOOGtHQOI7eTHFnGhxd1XpPX4fRkNRg==
angulartics2@~7.2.4:
version "7.2.4"
resolved "https://registry.yarnpkg.com/angulartics2/-/angulartics2-7.2.4.tgz#d0477b6ce4f3dc11bc02abc3a41100a29b24da9a"
integrity sha512-NfssYv0Amng1BnRk5L8ohyT5fJSb252WadjGh2Pj/dlHnoB+yxlYXmXajAB/WCUqUPfB34ZW54m/l4kWHal24Q==
dependencies:
tslib "^1.9.0"

Expand Down Expand Up @@ -2964,7 +2964,7 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==

debug@*, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@~4.1.0:
debug@*, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87"
integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==
Expand Down Expand Up @@ -2992,6 +2992,13 @@ debug@^3.1.0, debug@^3.2.5:
dependencies:
ms "^2.1.1"

debug@~4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"

decamelize-keys@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
Expand Down

0 comments on commit ac5aaa5

Please sign in to comment.