diff --git a/generators/app/templates/_package.json b/generators/app/templates/_package.json index 5033fd92..d3174917 100644 --- a/generators/app/templates/_package.json +++ b/generators/app/templates/_package.json @@ -56,14 +56,14 @@ "generate": "ng generate" }, "dependencies": { - "@angular/animations": "^9.0.0", - "@angular/common": "^9.0.0", - "@angular/compiler": "^9.0.0", - "@angular/core": "^9.0.0", - "@angular/forms": "^9.0.0", - "@angular/platform-browser": "^9.0.0", - "@angular/platform-browser-dynamic": "^9.0.0", - "@angular/router": "^9.0.0", + "@angular/animations": "^9.0.7", + "@angular/common": "^9.0.7", + "@angular/compiler": "^9.0.7", + "@angular/core": "^9.0.7", + "@angular/forms": "^9.0.7", + "@angular/platform-browser": "^9.0.7", + "@angular/platform-browser-dynamic": "^9.0.7", + "@angular/router": "^9.0.7", "@ngx-translate/core": "^12.0.0", <% if (props.target.includes('cordova')) { -%> "@ionic-native/core": "^5.0.0", @@ -81,7 +81,7 @@ "cordova-plugin-whitelist": "^1.3.3", <% } -%> <% if (props.pwa) { -%> - "@angular/service-worker": "^9.0.0", + "@angular/service-worker": "^9.0.7", <% } -%> <% if (props.ui === 'ionic') { -%> "@ionic/angular": "^5.0.0", @@ -89,10 +89,10 @@ "@ng-bootstrap/ng-bootstrap": "^5.0.0-rc.1", "bootstrap": "^4.1.1", "@fortawesome/fontawesome-free": "^5.1.0", - "@angular/localize": "^9.0.1", + "@angular/localize": "^9.0.7", <% } else if (props.ui === 'material') { -%> - "@angular/cdk": "^9.0.0", - "@angular/material": "^9.0.0", + "@angular/cdk": "^9.1.3", + "@angular/material": "^9.1.3", "@angular/flex-layout": "^9.0.0-beta.29", "material-design-icons-iconfont": "^5.0.1", <% } -%> @@ -112,8 +112,8 @@ "date-fns": "^2.9.0", <% } -%> "rxjs": "^6.5.4", - "tslib": "^1.10.0", - "zone.js": "^0.10.2" + "tslib": "^1.10.1", + "zone.js": "^0.10.3" }, "devDependencies": { <% if (props.target.includes('cordova')) { -%> @@ -122,10 +122,10 @@ <% if (props.tools.includes('jest')) { -%> "@angular-builders/jest": "^8.3.2", <% } -%> - "@angular/cli": "~9.0.1", - "@angular/compiler-cli": "^9.0.0", - "@angular/language-service": "^9.0.0", - "@angular-devkit/build-angular": "^0.900.1", + "@angular/cli": "~9.0.7", + "@angular/compiler-cli": "^9.0.1", + "@angular/language-service": "^9.0.1", + "@angular-devkit/build-angular": "^0.900.7", "@angularclass/hmr": "^2.1.3", "@biesbjerg/ngx-translate-extract": "^4.2.0", "@ngx-rocket/scripts": "^4.0.0", @@ -180,11 +180,11 @@ <% if (props.tools.includes('puppeteer')) { -%> "puppeteer": "^2.1.1", <% } -%> - "stylelint": "~13.2.0", + "stylelint": "~13.2.1", "stylelint-config-recommended-scss": "~4.2.0", "stylelint-config-standard": "~20.0.0", - "stylelint-scss": "~3.14.2", - "ts-node": "^8.3.0", + "stylelint-scss": "~3.16.0", + "ts-node": "^8.8.1", "tslint": "~5.18.0", "typescript": "~3.7.5" <% if (props.tools.includes('prettier')) { -%> diff --git a/generators/app/templates/src/app/_app.module.ts b/generators/app/templates/src/app/_app.module.ts index 13ad2df2..6d243b41 100644 --- a/generators/app/templates/src/app/_app.module.ts +++ b/generators/app/templates/src/app/_app.module.ts @@ -35,14 +35,14 @@ import { environment } from '@env/environment'; <% } -%> import { CoreModule } from '@app/core'; import { SharedModule } from '@app/shared'; +<% if (props.auth) { -%> +import { AuthModule } from '@app/auth'; +<% } -%> import { HomeModule } from './home/home.module'; import { ShellModule } from './shell/shell.module'; <% if (!props.lazy) { -%> import { AboutModule } from './about/about.module'; <% } -%> -<% if (props.auth) { -%> -import { LoginModule } from './login/login.module'; -<% } -%> <% if (props.layout === 'tabs') { -%> import { SettingsModule } from './settings/settings.module'; <% } -%> @@ -77,7 +77,7 @@ import { AppRoutingModule } from './app-routing.module'; AboutModule, <% } -%> <% if (props.auth) { -%> - LoginModule, + AuthModule, <% } -%> <% if (props.angulartics ) { -%> Angulartics2Module.forRoot(), diff --git a/generators/app/templates/src/app/login/__auth+bootstrap.login.component.html b/generators/app/templates/src/app/auth/__auth+bootstrap.login.component.html similarity index 100% rename from generators/app/templates/src/app/login/__auth+bootstrap.login.component.html rename to generators/app/templates/src/app/auth/__auth+bootstrap.login.component.html diff --git a/generators/app/templates/src/app/login/__auth+bootstrap.login.component.scss b/generators/app/templates/src/app/auth/__auth+bootstrap.login.component.scss similarity index 100% rename from generators/app/templates/src/app/login/__auth+bootstrap.login.component.scss rename to generators/app/templates/src/app/auth/__auth+bootstrap.login.component.scss diff --git a/generators/app/templates/src/app/login/__auth+ionic.login.component.html b/generators/app/templates/src/app/auth/__auth+ionic.login.component.html similarity index 100% rename from generators/app/templates/src/app/login/__auth+ionic.login.component.html rename to generators/app/templates/src/app/auth/__auth+ionic.login.component.html diff --git a/generators/app/templates/src/app/login/__auth+ionic.login.component.scss b/generators/app/templates/src/app/auth/__auth+ionic.login.component.scss similarity index 100% rename from generators/app/templates/src/app/login/__auth+ionic.login.component.scss rename to generators/app/templates/src/app/auth/__auth+ionic.login.component.scss diff --git a/generators/app/templates/src/app/login/__auth+material.login.component.html b/generators/app/templates/src/app/auth/__auth+material.login.component.html similarity index 100% rename from generators/app/templates/src/app/login/__auth+material.login.component.html rename to generators/app/templates/src/app/auth/__auth+material.login.component.html diff --git a/generators/app/templates/src/app/login/__auth+material.login.component.scss b/generators/app/templates/src/app/auth/__auth+material.login.component.scss similarity index 100% rename from generators/app/templates/src/app/login/__auth+material.login.component.scss rename to generators/app/templates/src/app/auth/__auth+material.login.component.scss diff --git a/generators/app/templates/src/app/login/__auth+raw.login.component.html b/generators/app/templates/src/app/auth/__auth+raw.login.component.html similarity index 100% rename from generators/app/templates/src/app/login/__auth+raw.login.component.html rename to generators/app/templates/src/app/auth/__auth+raw.login.component.html diff --git a/generators/app/templates/src/app/login/__auth+raw.login.component.scss b/generators/app/templates/src/app/auth/__auth+raw.login.component.scss similarity index 100% rename from generators/app/templates/src/app/login/__auth+raw.login.component.scss rename to generators/app/templates/src/app/auth/__auth+raw.login.component.scss diff --git a/generators/app/templates/src/app/login/__auth._login.module.ts b/generators/app/templates/src/app/auth/__auth._auth.module.ts similarity index 90% rename from generators/app/templates/src/app/login/__auth._login.module.ts rename to generators/app/templates/src/app/auth/__auth._auth.module.ts index d5b851a7..b41a2bd3 100644 --- a/generators/app/templates/src/app/login/__auth._login.module.ts +++ b/generators/app/templates/src/app/auth/__auth._auth.module.ts @@ -15,7 +15,7 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { SharedModule } from '@app/shared'; import { MaterialModule } from '@app/material.module'; <% } -%> -import { LoginRoutingModule } from './login-routing.module'; +import { AuthRoutingModule } from './auth-routing.module'; import { LoginComponent } from './login.component'; @NgModule({ @@ -33,10 +33,10 @@ import { LoginComponent } from './login.component'; FlexLayoutModule, MaterialModule, <% } -%> - LoginRoutingModule + AuthRoutingModule ], declarations: [ LoginComponent ] }) -export class LoginModule { } +export class AuthModule { } diff --git a/generators/app/templates/src/app/core/authentication/__auth._authentication.guard.spec.ts b/generators/app/templates/src/app/auth/__auth._authentication.guard.spec.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth._authentication.guard.spec.ts rename to generators/app/templates/src/app/auth/__auth._authentication.guard.spec.ts diff --git a/generators/app/templates/src/app/login/__auth._login.component.spec.ts b/generators/app/templates/src/app/auth/__auth._login.component.spec.ts similarity index 83% rename from generators/app/templates/src/app/login/__auth._login.component.spec.ts rename to generators/app/templates/src/app/auth/__auth._login.component.spec.ts index 4a9748ee..dc7cac91 100644 --- a/generators/app/templates/src/app/login/__auth._login.component.spec.ts +++ b/generators/app/templates/src/app/auth/__auth._login.component.spec.ts @@ -18,6 +18,9 @@ import { CoreModule } from '@app/core'; import { SharedModule } from '@app/shared'; import { MaterialModule } from '@app/material.module'; <% } -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; import { LoginComponent } from './login.component'; describe('LoginComponent', () => { @@ -46,8 +49,10 @@ describe('LoginComponent', () => { <% if (props.ui === 'ionic') { -%> schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [ + { provide: AuthenticationService, useClass: MockAuthenticationService }, + { provide: CredentialsService, useClass: MockCredentialsService }, Platform, - LoadingController, + LoadingController ], <% } -%> declarations: [LoginComponent] diff --git a/generators/app/templates/src/app/login/__auth._login.component.ts b/generators/app/templates/src/app/auth/__auth._login.component.ts similarity index 95% rename from generators/app/templates/src/app/login/__auth._login.component.ts rename to generators/app/templates/src/app/auth/__auth._login.component.ts index 424b88c5..77c11273 100644 --- a/generators/app/templates/src/app/login/__auth._login.component.ts +++ b/generators/app/templates/src/app/auth/__auth._login.component.ts @@ -9,7 +9,8 @@ import { forkJoin, from } from 'rxjs'; import { finalize } from 'rxjs/operators'; import { environment } from '@env/environment'; -import { Logger, I18nService, AuthenticationService, untilDestroyed } from '@app/core'; +import { Logger, I18nService, untilDestroyed } from '@app/core'; +import { AuthenticationService } from './authentication.service'; const log = new Logger('Login'); diff --git a/generators/app/templates/src/app/login/__auth.login-routing.module.ts b/generators/app/templates/src/app/auth/__auth.auth-routing.module.ts similarity index 91% rename from generators/app/templates/src/app/login/__auth.login-routing.module.ts rename to generators/app/templates/src/app/auth/__auth.auth-routing.module.ts index 24b87261..209c34b1 100644 --- a/generators/app/templates/src/app/login/__auth.login-routing.module.ts +++ b/generators/app/templates/src/app/auth/__auth.auth-routing.module.ts @@ -13,4 +13,4 @@ const routes: Routes = [ exports: [RouterModule], providers: [] }) -export class LoginRoutingModule { } +export class AuthRoutingModule { } diff --git a/generators/app/templates/src/app/core/authentication/__auth.authentication.guard.ts b/generators/app/templates/src/app/auth/__auth.authentication.guard.ts similarity index 94% rename from generators/app/templates/src/app/core/authentication/__auth.authentication.guard.ts rename to generators/app/templates/src/app/auth/__auth.authentication.guard.ts index a7cd5c96..c6d7aa38 100644 --- a/generators/app/templates/src/app/core/authentication/__auth.authentication.guard.ts +++ b/generators/app/templates/src/app/auth/__auth.authentication.guard.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; -import { Logger } from '../logger.service'; +import { Logger } from '@app/core'; import { CredentialsService } from './credentials.service'; const log = new Logger('AuthenticationGuard'); diff --git a/generators/app/templates/src/app/core/authentication/__auth.authentication.service.mock.ts b/generators/app/templates/src/app/auth/__auth.authentication.service.mock.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.authentication.service.mock.ts rename to generators/app/templates/src/app/auth/__auth.authentication.service.mock.ts diff --git a/generators/app/templates/src/app/core/authentication/__auth.authentication.service.spec.ts b/generators/app/templates/src/app/auth/__auth.authentication.service.spec.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.authentication.service.spec.ts rename to generators/app/templates/src/app/auth/__auth.authentication.service.spec.ts diff --git a/generators/app/templates/src/app/core/authentication/__auth.authentication.service.ts b/generators/app/templates/src/app/auth/__auth.authentication.service.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.authentication.service.ts rename to generators/app/templates/src/app/auth/__auth.authentication.service.ts diff --git a/generators/app/templates/src/app/core/authentication/__auth.credentials.service.mock.ts b/generators/app/templates/src/app/auth/__auth.credentials.service.mock.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.credentials.service.mock.ts rename to generators/app/templates/src/app/auth/__auth.credentials.service.mock.ts diff --git a/generators/app/templates/src/app/core/authentication/__auth.credentials.service.spec.ts b/generators/app/templates/src/app/auth/__auth.credentials.service.spec.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.credentials.service.spec.ts rename to generators/app/templates/src/app/auth/__auth.credentials.service.spec.ts diff --git a/generators/app/templates/src/app/core/authentication/__auth.credentials.service.ts b/generators/app/templates/src/app/auth/__auth.credentials.service.ts similarity index 100% rename from generators/app/templates/src/app/core/authentication/__auth.credentials.service.ts rename to generators/app/templates/src/app/auth/__auth.credentials.service.ts diff --git a/generators/app/templates/src/app/auth/index.ts b/generators/app/templates/src/app/auth/index.ts new file mode 100644 index 00000000..21f4f894 --- /dev/null +++ b/generators/app/templates/src/app/auth/index.ts @@ -0,0 +1,4 @@ +export * from './auth.module'; +export * from './authentication.service'; +export * from './credentials.service'; +export * from './authentication.guard'; diff --git a/generators/app/templates/src/app/core/_index.ts b/generators/app/templates/src/app/core/_index.ts index 9440e090..0892e57a 100644 --- a/generators/app/templates/src/app/core/_index.ts +++ b/generators/app/templates/src/app/core/_index.ts @@ -1,9 +1,4 @@ export * from './core.module'; -<% if (props.auth) { -%> -export * from './authentication/authentication.service'; -export * from './authentication/credentials.service'; -export * from './authentication/authentication.guard'; -<% } -%> export * from './i18n.service'; export * from './http/http.service'; export * from './http/http-cache.service'; diff --git a/generators/app/templates/src/app/settings/__ionic-tabs.settings.component.spec.ts b/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.spec.ts similarity index 73% rename from generators/app/templates/src/app/settings/__ionic-tabs.settings.component.spec.ts rename to generators/app/templates/src/app/settings/__ionic-tabs._settings.component.spec.ts index c63960e6..d35caab5 100755 --- a/generators/app/templates/src/app/settings/__ionic-tabs.settings.component.spec.ts +++ b/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.spec.ts @@ -7,6 +7,11 @@ import { IonicModule } from '@ionic/angular'; import { SharedModule } from '@app/shared'; import { CoreModule } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; +<% } -%> import { SettingsComponent } from './settings.component'; describe('SettingsComponent', () => { @@ -25,9 +30,13 @@ describe('SettingsComponent', () => { schemas: [CUSTOM_ELEMENTS_SCHEMA], declarations: [SettingsComponent], providers: [ +<% if (props.auth) { -%> + { provide: AuthenticationService, useClass: MockAuthenticationService }, + { provide: CredentialsService, useClass: MockCredentialsService }, +<% } -%> Platform, AlertController, - ActionSheetController, + ActionSheetController ] }) .compileComponents(); diff --git a/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.ts b/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.ts index 451610f9..1186dc02 100755 --- a/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.ts +++ b/generators/app/templates/src/app/settings/__ionic-tabs._settings.component.ts @@ -4,10 +4,9 @@ import { TranslateService } from '@ngx-translate/core'; import { ActionSheetController, AlertController, Platform } from '@ionic/angular'; import { TextFieldTypes } from '@ionic/core'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -<% } else { -%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } -%> @Component({ diff --git a/generators/app/templates/src/app/shell/__ionic-side-menu._shell.component.ts b/generators/app/templates/src/app/shell/__ionic-side-menu._shell.component.ts index 4a0371f2..9ae04367 100644 --- a/generators/app/templates/src/app/shell/__ionic-side-menu._shell.component.ts +++ b/generators/app/templates/src/app/shell/__ionic-side-menu._shell.component.ts @@ -4,10 +4,9 @@ import { ActionSheetController, AlertController, Platform } from '@ionic/angular import { ActionSheetButton, ActionSheetOptions, TextFieldTypes } from '@ionic/core'; import { TranslateService } from '@ngx-translate/core'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -<% } else {-%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } -%> @Component({ diff --git a/generators/app/templates/src/app/shell/__material-side-menu._shell.component.ts b/generators/app/templates/src/app/shell/__material-side-menu._shell.component.ts index c178b450..f17793f4 100644 --- a/generators/app/templates/src/app/shell/__material-side-menu._shell.component.ts +++ b/generators/app/templates/src/app/shell/__material-side-menu._shell.component.ts @@ -3,10 +3,9 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { MediaObserver } from '@angular/flex-layout'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -<% } else { -%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } -%> @Component({ diff --git a/generators/app/templates/src/app/shell/_shell.component.spec.ts b/generators/app/templates/src/app/shell/_shell.component.spec.ts index 2e7712aa..00575590 100644 --- a/generators/app/templates/src/app/shell/_shell.component.spec.ts +++ b/generators/app/templates/src/app/shell/_shell.component.spec.ts @@ -12,12 +12,11 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { MaterialModule } from '@app/material.module'; <% } -%> -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, CoreModule } from '@app/core'; -import { MockAuthenticationService } from '@app/core/authentication/authentication.service.mock'; -import { MockCredentialsService } from '@app/core/authentication/credentials.service.mock'; -<% } else {-%> import { CoreModule } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; <% } -%> import { ShellComponent } from './shell.component'; diff --git a/generators/app/templates/src/app/shell/_shell.module.ts b/generators/app/templates/src/app/shell/_shell.module.ts index a1b11018..1b4c23c0 100644 --- a/generators/app/templates/src/app/shell/_shell.module.ts +++ b/generators/app/templates/src/app/shell/_shell.module.ts @@ -12,6 +12,9 @@ import { IonicModule } from '@ionic/angular'; <% if (props.ui === 'material') { -%> import { MaterialModule } from '@app/material.module'; <% } -%> +<% if (props.auth) { -%> +import { AuthModule } from '@app/auth'; +<% } -%> import { ShellComponent } from './shell.component'; <% if (props.ui === 'bootstrap' || (props.ui === 'material' && props.layout === 'simple') || props.ui === 'raw') { -%> @@ -29,6 +32,9 @@ import { HeaderComponent } from './header/header.component'; MaterialModule, <% } else if (props.ui === 'ionic') { -%> IonicModule, +<% } -%> +<% if (props.auth) { -%> + AuthModule, <% } -%> RouterModule ], diff --git a/generators/app/templates/src/app/shell/_shell.service.spec.ts b/generators/app/templates/src/app/shell/_shell.service.spec.ts index 3b3a89a8..ac38e356 100644 --- a/generators/app/templates/src/app/shell/_shell.service.spec.ts +++ b/generators/app/templates/src/app/shell/_shell.service.spec.ts @@ -1,8 +1,8 @@ import { TestBed, inject } from '@angular/core/testing'; <% if (props.auth) { -%> -import { AuthenticationGuard, AuthenticationService } from '@app/core'; -import { MockAuthenticationService } from '@app/core/authentication/authentication.service.mock'; +import { AuthenticationGuard, AuthenticationService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; <% } -%> import { ShellComponent } from './shell.component'; import { Shell } from './shell.service'; diff --git a/generators/app/templates/src/app/shell/_shell.service.ts b/generators/app/templates/src/app/shell/_shell.service.ts index c5723611..8fb10382 100644 --- a/generators/app/templates/src/app/shell/_shell.service.ts +++ b/generators/app/templates/src/app/shell/_shell.service.ts @@ -1,7 +1,7 @@ import { Routes, Route } from '@angular/router'; <% if (props.auth) { -%> -import { AuthenticationGuard } from '@app/core'; +import { AuthenticationGuard } from '@app/auth'; <% } -%> import { ShellComponent } from './shell.component'; diff --git a/generators/app/templates/src/app/shell/header/__bootstrap._header.component.spec.ts b/generators/app/templates/src/app/shell/header/__bootstrap._header.component.spec.ts index 2a0b3230..7075b32b 100644 --- a/generators/app/templates/src/app/shell/header/__bootstrap._header.component.spec.ts +++ b/generators/app/templates/src/app/shell/header/__bootstrap._header.component.spec.ts @@ -3,12 +3,11 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -import { MockAuthenticationService } from '@app/core/authentication/authentication.service.mock'; -import { MockCredentialsService } from '@app/core/authentication/credentials.service.mock'; -<% } else {-%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; <% } -%> import { HeaderComponent } from './header.component'; diff --git a/generators/app/templates/src/app/shell/header/__bootstrap._header.component.ts b/generators/app/templates/src/app/shell/header/__bootstrap._header.component.ts index bf269d58..4cd75601 100644 --- a/generators/app/templates/src/app/shell/header/__bootstrap._header.component.ts +++ b/generators/app/templates/src/app/shell/header/__bootstrap._header.component.ts @@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core'; <% if (props.auth) { -%> import { Router } from '@angular/router'; -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; +import { I18nService } from '@app/core'; +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } else { -%> import { I18nService } from '@app/core'; diff --git a/generators/app/templates/src/app/shell/header/__material-simple._header.component.spec.ts b/generators/app/templates/src/app/shell/header/__material-simple._header.component.spec.ts index 9270602d..b9f77162 100644 --- a/generators/app/templates/src/app/shell/header/__material-simple._header.component.spec.ts +++ b/generators/app/templates/src/app/shell/header/__material-simple._header.component.spec.ts @@ -3,13 +3,12 @@ import { TranslateModule } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; import { MaterialModule } from '@app/material.module'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -import { MockAuthenticationService } from '@app/core/authentication/authentication.service.mock'; -import { MockCredentialsService } from '@app/core/authentication/credentials.service.mock'; -<% } else {-%> import { I18nService } from '@app/core'; -<% }-%> +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; +<% } -%> import { HeaderComponent } from './header.component'; describe('HeaderComponent', () => { diff --git a/generators/app/templates/src/app/shell/header/__material-simple._header.component.ts b/generators/app/templates/src/app/shell/header/__material-simple._header.component.ts index 46179e36..93d8f2c2 100644 --- a/generators/app/templates/src/app/shell/header/__material-simple._header.component.ts +++ b/generators/app/templates/src/app/shell/header/__material-simple._header.component.ts @@ -3,10 +3,9 @@ import { Component, OnInit, Input } from '@angular/core'; import { Router } from '@angular/router'; import { MatSidenav } from '@angular/material/sidenav'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -<% } else { -%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } -%> @Component({ diff --git a/generators/app/templates/src/app/shell/header/__raw._header.component.spec.ts b/generators/app/templates/src/app/shell/header/__raw._header.component.spec.ts index 3d9114a1..e87e54de 100644 --- a/generators/app/templates/src/app/shell/header/__raw._header.component.spec.ts +++ b/generators/app/templates/src/app/shell/header/__raw._header.component.spec.ts @@ -2,12 +2,11 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; -<% if (props.auth) { -%> -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; -import { MockAuthenticationService } from '@app/core/authentication/authentication.service.mock'; -import { MockCredentialsService } from '@app/core/authentication/credentials.service.mock'; -<% } else { -%> import { I18nService } from '@app/core'; +<% if (props.auth) { -%> +import { AuthenticationService, CredentialsService } from '@app/auth'; +import { MockAuthenticationService } from '@app/auth/authentication.service.mock'; +import { MockCredentialsService } from '@app/auth/credentials.service.mock'; <% } -%> import { HeaderComponent } from './header.component'; diff --git a/generators/app/templates/src/app/shell/header/__raw._header.component.ts b/generators/app/templates/src/app/shell/header/__raw._header.component.ts index 6dfdb2d7..26780d73 100644 --- a/generators/app/templates/src/app/shell/header/__raw._header.component.ts +++ b/generators/app/templates/src/app/shell/header/__raw._header.component.ts @@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core'; <% if (props.auth) { -%> import { Router } from '@angular/router'; -import { AuthenticationService, CredentialsService, I18nService } from '@app/core'; +import { I18nService } from '@app/core'; +import { AuthenticationService, CredentialsService } from '@app/auth'; <% } else { -%> import { I18nService } from '@app/core';