;
17 | }
18 |
--------------------------------------------------------------------------------
/libs/client/ui/src/lib/divider/divider.component.scss:
--------------------------------------------------------------------------------
1 | @use 'libs/client/styles/src/lib/carbon-theme';
2 | @use 'utilities/convert' as *;
3 | @use 'utilities/bemify' as *;
4 | @use '@carbon/layout';
5 |
6 | @include block(ui-divider) {
7 | display: block;
8 | border-bottom: 1px solid carbon-theme.get('border-strong');
9 | margin: layout.$spacing-05 0;
10 |
11 | @include modifier(vertical) {
12 | border-bottom: none;
13 | border-left: 0.5px solid carbon-theme.get('border-strong');
14 | border-right-width: 0.5px solid carbon-theme.get('border-strong');
15 | margin: 0 layout.$spacing-05;
16 | width: 0;
17 | min-height: rem(16px);
18 | height: 100%;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/apps/client/shell-app-e2e/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "compilerOptions": {
4 | "sourceMap": false,
5 | "outDir": "../../../dist/out-tsc",
6 | "allowJs": true,
7 | "types": ["cypress", "node"],
8 | "forceConsistentCasingInFileNames": true,
9 | "strict": true,
10 | "noImplicitOverride": true,
11 | "noPropertyAccessFromIndexSignature": true,
12 | "noImplicitReturns": true,
13 | "noFallthroughCasesInSwitch": true
14 | },
15 | "include": ["src/**/*.ts", "src/**/*.js"],
16 | "angularCompilerOptions": {
17 | "strictInjectionParameters": true,
18 | "strictInputAccessModifiers": true,
19 | "strictTemplates": true
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | {
6 | path: 'login',
7 | loadChildren: () => import('./login/login.module').then((m) => m.LoginModule),
8 | },
9 | {
10 | path: 'register',
11 | loadChildren: () => import('./register/register.module').then((m) => m.RegisterModule),
12 | },
13 | {
14 | path: '**',
15 | redirectTo: 'login',
16 | },
17 | ];
18 |
19 | @NgModule({
20 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })],
21 | exports: [RouterModule],
22 | })
23 | export class AppRoutingModule {}
24 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 |
--------------------------------------------------------------------------------
/libs/client/injector-container/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 |
--------------------------------------------------------------------------------
/libs/client/ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.lib.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ],
13 | "compilerOptions": {
14 | "forceConsistentCasingInFileNames": true,
15 | "strict": true,
16 | "noImplicitOverride": true,
17 | "noPropertyAccessFromIndexSignature": true,
18 | "noImplicitReturns": true,
19 | "noFallthroughCasesInSwitch": true,
20 | "target": "es2020"
21 | },
22 | "angularCompilerOptions": {
23 | "strictInjectionParameters": true,
24 | "strictInputAccessModifiers": true,
25 | "strictTemplates": true
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe-e2e/src/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe-e2e/src/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
--------------------------------------------------------------------------------
/apps/client/shell-app-e2e/src/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
--------------------------------------------------------------------------------
/tools/generators/mfe/helpers/replace-remote-entry-module.ts:
--------------------------------------------------------------------------------
1 | import { NormalizedSchema } from '@nrwl/angular/src/generators/application/lib';
2 | import * as fs from 'fs';
3 | import * as path from 'path';
4 |
5 | /**
6 | * Заменить контент файла entry.module.ts
7 | * @param options Normalized options
8 | */
9 | export function replaceRemoteEntryModule(options: NormalizedSchema): void {
10 | const filePath = path.normalize(
11 | path.resolve(process.cwd(), options.appProjectRoot, 'src/app/remote-entry/entry.module.ts')
12 | );
13 | const appModulePattern = fs.readFileSync(
14 | path.resolve(__dirname, '../patterns/entry.module.txt')
15 | );
16 | fs.writeFileSync(filePath, appModulePattern);
17 | }
18 |
--------------------------------------------------------------------------------
/apps/client/dashboard-mfe-e2e/src/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe-e2e/src/support/index.ts:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands';
18 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/src/app/not-found/not-found.component.ts:
--------------------------------------------------------------------------------
1 | import { ChangeDetectionStrategy, Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'nx-mfe-not-found',
5 | template: `
6 | Sorry, the page you visited does not exist.
7 | Go to Dashboard
8 |
17 | `,
18 | changeDetection: ChangeDetectionStrategy.OnPush,
19 | })
20 | export class NotFoundComponent {}
21 |
--------------------------------------------------------------------------------
/tools/generators/mfe/helpers/replace-remote-mfe-app-module.ts:
--------------------------------------------------------------------------------
1 | import { NormalizedSchema } from '@nrwl/angular/src/generators/application/lib';
2 | import * as fs from 'fs';
3 | import * as path from 'path';
4 |
5 | /**
6 | * Заменить контент корневого модуля app.module.ts для микрофронта
7 | * @param options Normalized options
8 | */
9 | export function replaceRemoteMfeAppModule(options: NormalizedSchema): void {
10 | const appModulePath = path.normalize(
11 | path.resolve(process.cwd(), options.appProjectRoot, 'src/app/app.module.ts')
12 | );
13 | const appModulePattern = fs.readFileSync(path.resolve(__dirname, '../patterns/app.module.txt'));
14 | fs.writeFileSync(appModulePath, appModulePattern);
15 | }
16 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/src/app/spinner/spinner.component.ts:
--------------------------------------------------------------------------------
1 | import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'nx-mfe-spinner',
5 | template: `
6 |
7 |
8 |
9 | `,
10 | styles: [
11 | `
12 | .container {
13 | width: 100%;
14 | display: flex;
15 | align-items: center;
16 | justify-content: center;
17 | }
18 | `,
19 | ],
20 | changeDetection: ChangeDetectionStrategy.OnPush,
21 | })
22 | export class SpinnerComponent {
23 | @Input()
24 | public isActive = true;
25 |
26 | @Input()
27 | public size: 'normal' | 'sm' = 'normal';
28 | }
29 |
--------------------------------------------------------------------------------
/apps/server/users-ms/src/app/modules/users/users.module.ts:
--------------------------------------------------------------------------------
1 | import { Module } from '@nestjs/common';
2 | import { TypeOrmModule } from '@nestjs/typeorm';
3 |
4 | import { Services } from '../../constants/services';
5 | import { UserEntity } from './user.entity';
6 | import { UsersController } from './users.controller';
7 | import { UsersService } from './users.service';
8 |
9 | const USER_SERVICE_PROVIDER = {
10 | provide: Services.USER_SERVICE,
11 | useClass: UsersService,
12 | };
13 |
14 | @Module({
15 | imports: [TypeOrmModule.forFeature([UserEntity])],
16 | controllers: [UsersController],
17 | providers: [USER_SERVICE_PROVIDER],
18 | exports: [USER_SERVICE_PROVIDER],
19 | })
20 | export class UsersModule {}
21 |
--------------------------------------------------------------------------------
/libs/client/forms/src/lib/validators/custom-validators.ts:
--------------------------------------------------------------------------------
1 | import { AbstractControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';
2 |
3 | export class CustomValidators {
4 | public static confirm(compareWith: string): ValidatorFn {
5 | return confirmValidator(compareWith);
6 | }
7 | }
8 |
9 | export function confirmValidator(compareWith: string): ValidatorFn {
10 | return (control: AbstractControl): ValidationErrors | null => {
11 | if (
12 | !!control.parent &&
13 | control.parent instanceof UntypedFormGroup &&
14 | control.parent.get(compareWith)?.value !== control.value
15 | ) {
16 | return { confirm: true, error: true };
17 | }
18 |
19 | return {};
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/libs/server/common/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3 | "sourceRoot": "libs/server/common/src",
4 | "projectType": "library",
5 | "targets": {
6 | "lint": {
7 | "executor": "@nrwl/linter:eslint",
8 | "outputs": ["{options.outputFile}"],
9 | "options": {
10 | "lintFilePatterns": ["libs/server/common/**/*.ts"]
11 | }
12 | },
13 | "test": {
14 | "executor": "@nrwl/jest:jest",
15 | "outputs": ["coverage/libs/server/common"],
16 | "options": {
17 | "jestConfig": "libs/server/common/jest.config.ts",
18 | "passWithNoTests": true
19 | }
20 | }
21 | },
22 | "tags": ["scope:server"]
23 | }
24 |
--------------------------------------------------------------------------------
/libs/shared/common/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3 | "sourceRoot": "libs/shared/common/src",
4 | "projectType": "library",
5 | "targets": {
6 | "lint": {
7 | "executor": "@nrwl/linter:eslint",
8 | "outputs": ["{options.outputFile}"],
9 | "options": {
10 | "lintFilePatterns": ["libs/shared/common/**/*.ts"]
11 | }
12 | },
13 | "test": {
14 | "executor": "@nrwl/jest:jest",
15 | "outputs": ["coverage/libs/shared/common"],
16 | "options": {
17 | "jestConfig": "libs/shared/common/jest.config.ts",
18 | "passWithNoTests": true
19 | }
20 | }
21 | },
22 | "tags": ["scope:shared"]
23 | }
24 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4 | import { CoreModule } from '@nx-mfe/client/core';
5 |
6 | import { environment } from '../environments/environment';
7 | import { AppComponent } from './app.component';
8 | import { AppRoutingModule } from './app-routing.module';
9 |
10 | @NgModule({
11 | declarations: [AppComponent],
12 | imports: [
13 | BrowserModule,
14 | BrowserAnimationsModule,
15 | AppRoutingModule,
16 | CoreModule.forRoot(environment),
17 | ],
18 | bootstrap: [AppComponent],
19 | })
20 | export class AppModule {}
21 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4 | import { CoreModule } from '@nx-mfe/client/core';
5 |
6 | import { environment } from '../environments/environment';
7 | import { AppComponent } from './app.component';
8 | import { AppRoutingModule } from './app-routing.module';
9 |
10 | @NgModule({
11 | declarations: [AppComponent],
12 | imports: [
13 | BrowserModule,
14 | BrowserAnimationsModule,
15 | AppRoutingModule,
16 | CoreModule.forRoot(environment),
17 | ],
18 | bootstrap: [AppComponent],
19 | })
20 | export class AppModule {}
21 |
--------------------------------------------------------------------------------
/libs/client/styles/src/lib/utilities/_convert.scss:
--------------------------------------------------------------------------------
1 | @use 'sass:meta';
2 | @use 'sass:math';
3 |
4 | /// Default font size
5 | /// @type Number
6 | /// @access public
7 | $base-font-size: 16px !default;
8 |
9 | /// Convert a given px unit to a rem unit
10 | /// @param {Number} $px - Number with px unit
11 | /// @return {Number} Number with rem unit
12 | /// @access public
13 | /// @group utilities
14 | @function rem($px) {
15 | @if unit($px) != 'px' {
16 | @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
17 | }
18 |
19 | @if meta.function-exists('div', 'math') {
20 | @return math.div($px, $base-font-size) * 1rem;
21 | } @else {
22 | @return ($px / $base-font-size) * 1rem;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/libs/client/ui/src/lib/divider/divider.component.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Component,
3 | ChangeDetectionStrategy,
4 | Input,
5 | HostBinding,
6 | ViewEncapsulation,
7 | } from '@angular/core';
8 | import { BooleanInput, CoerceBoolean } from '@nx-mfe/client/common';
9 |
10 | @Component({
11 | selector: 'ui-divider',
12 | template: ``,
13 | styleUrls: ['./divider.component.scss'],
14 | encapsulation: ViewEncapsulation.None,
15 | changeDetection: ChangeDetectionStrategy.OnPush,
16 | })
17 | export class DividerComponent {
18 | @Input()
19 | @CoerceBoolean()
20 | @HostBinding('class.ui-divider--vertical')
21 | public vertical: BooleanInput = false;
22 |
23 | @HostBinding('class.ui-divider') public baseClass = 'ui-divider';
24 | }
25 |
--------------------------------------------------------------------------------
/libs/client/ui/src/lib/logo/logo.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { LogoComponent } from './logo.component';
4 |
5 | describe('LogoComponent', () => {
6 | let component: LogoComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async () => {
10 | await TestBed.configureTestingModule({
11 | declarations: [LogoComponent],
12 | }).compileComponents();
13 | });
14 |
15 | beforeEach(() => {
16 | fixture = TestBed.createComponent(LogoComponent);
17 | component = fixture.componentInstance;
18 | fixture.detectChanges();
19 | });
20 |
21 | it('should create', () => {
22 | expect(component).toBeTruthy();
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4 | import { CoreModule } from '@nx-mfe/client/core';
5 |
6 | import { environment } from '../environments/environment';
7 | import { AppComponent } from './app.component';
8 | import { AppRoutingModule } from './app-routing.module';
9 |
10 | @NgModule({
11 | declarations: [AppComponent],
12 | imports: [
13 | BrowserModule,
14 | BrowserAnimationsModule,
15 | AppRoutingModule,
16 | CoreModule.forRoot(environment),
17 | ],
18 | bootstrap: [AppComponent],
19 | })
20 | export class AppModule {}
21 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/src/app/mfe-fallback/mfe-fallback.component.ts:
--------------------------------------------------------------------------------
1 | import { ChangeDetectionStrategy, Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'nx-mfe-client-fallbacks-mfe-entry',
5 | template: `
6 | MFE Fallback
7 | Something went wrong
8 |
18 | `,
19 | changeDetection: ChangeDetectionStrategy.OnPush,
20 | })
21 | export class MfeFallbackComponent {}
22 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | {
6 | path: 'mfe-fallback',
7 | loadChildren: () =>
8 | import('./mfe-fallback/mfe-fallback.module').then((m) => m.MfeFallbackModule),
9 | },
10 | {
11 | path: 'not-found',
12 | loadChildren: () => import('./not-found/not-found.module').then((m) => m.NotFoundModule),
13 | },
14 | {
15 | path: '**',
16 | redirectTo: 'mfe-fallback',
17 | },
18 | ];
19 |
20 | @NgModule({
21 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })],
22 | exports: [RouterModule],
23 | })
24 | export class AppRoutingModule {}
25 |
--------------------------------------------------------------------------------
/libs/client/injector-container/src/lib/client-injector-container.module.ts:
--------------------------------------------------------------------------------
1 | import { Injector, NgModule } from '@angular/core';
2 | import { FormsModule } from '@angular/forms';
3 |
4 | /**
5 | * Container of providers, that can get without constructor DI.
6 | * ------
7 | *
8 | * Add new imports and providers careful, coz it increase bundle size.
9 | *
10 | * @example
11 | * // get FormBuilder without constructor DI.
12 | * const fb = InjectorContainerModule.injector.get(FormBuilder);
13 | */
14 | @NgModule({
15 | imports: [FormsModule],
16 | })
17 | export class InjectorContainerModule {
18 | public static injector: Injector;
19 |
20 | constructor(injector: Injector) {
21 | InjectorContainerModule.injector = injector;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/libs/server/grpc/src/lib/proto/compile-proto.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | find . -type d -name 'build' -exec rm -r {} +
4 |
5 | mkdir -p build
6 |
7 | protoc \
8 | --plugin=../../../../../../node_modules/.bin/protoc-gen-ts_proto \
9 | -I=./ \
10 | --ts_proto_out=./build *.proto \
11 | --ts_proto_opt=nestJs=true \
12 | --ts_proto_opt=addGrpcMetadata=true \
13 | --ts_proto_opt=outputJsonMethods=true \
14 | --ts_proto_opt=outputPartialMethods=true \
15 |
16 | touch index.ts
17 | > index.ts
18 |
19 | for filename in ./build/*.ts
20 | do
21 | path=$(dirname "$file")
22 | file="$(basename $filename .ts)"
23 | namespace=$(perl -pe 's/(?:\b|-)(\p{Ll})/\u$1/g' <<< $file)
24 |
25 | echo "export * as $namespace from './build/$file';" >> index.ts
26 | done
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | .angular
12 |
13 | # IDEs and editors
14 | /.idea
15 | .project
16 | .classpath
17 | .c9/
18 | *.launch
19 | .settings/
20 | *.sublime-workspace
21 |
22 | # IDE - VSCode
23 | .vscode/*
24 | !.vscode/settings.json
25 | !.vscode/tasks.json
26 | !.vscode/launch.json
27 | !.vscode/extensions.json
28 |
29 | # misc
30 | /.sass-cache
31 | /connect.lock
32 | /coverage
33 | /libpeerconnection.log
34 | npm-debug.log
35 | yarn-error.log
36 | testem.log
37 | /typings
38 |
39 | # System Files
40 | .DS_Store
41 | Thumbs.db
42 |
43 | # Environment config files
44 | .env
45 |
--------------------------------------------------------------------------------
/apps/server/auth-ms/src/app/abstractions/auth-service.interface.ts:
--------------------------------------------------------------------------------
1 | import { UserMetadata } from '@nx-mfe/server/domains';
2 | import {
3 | AuthTokensResponse,
4 | CredentialsRequest,
5 | RegisterRequest,
6 | } from '@nx-mfe/shared/data-access';
7 |
8 | export interface IAuthService {
9 | register(credentials: RegisterRequest): Promise;
10 |
11 | login(credentials: CredentialsRequest, userMetadata: UserMetadata): Promise;
12 |
13 | logout(refreshToken: string): Promise;
14 |
15 | refresh(refreshToken: string, userMetadata: UserMetadata): Promise;
16 |
17 | activateAccount(activationToken: string): Promise;
18 |
19 | resendActivationEmail(email: string): Promise;
20 | }
21 |
--------------------------------------------------------------------------------
/libs/shared/data-access/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3 | "sourceRoot": "libs/shared/data-access/src",
4 | "projectType": "library",
5 | "targets": {
6 | "lint": {
7 | "executor": "@nrwl/linter:eslint",
8 | "outputs": ["{options.outputFile}"],
9 | "options": {
10 | "lintFilePatterns": ["libs/shared/data-access/**/*.ts"]
11 | }
12 | },
13 | "test": {
14 | "executor": "@nrwl/jest:jest",
15 | "outputs": ["coverage/libs/shared/data-access"],
16 | "options": {
17 | "jestConfig": "libs/shared/data-access/jest.config.ts",
18 | "passWithNoTests": true
19 | }
20 | }
21 | },
22 | "tags": ["scope:shared"]
23 | }
24 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | },
12 | {
13 | "path": "./tsconfig.editor.json"
14 | }
15 | ],
16 | "compilerOptions": {
17 | "forceConsistentCasingInFileNames": true,
18 | "strict": true,
19 | "noImplicitOverride": true,
20 | "noPropertyAccessFromIndexSignature": true,
21 | "noImplicitReturns": true,
22 | "noFallthroughCasesInSwitch": true,
23 | "target": "es2020"
24 | },
25 | "angularCompilerOptions": {
26 | "strictInjectionParameters": true,
27 | "strictInputAccessModifiers": true,
28 | "strictTemplates": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/shell-app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | },
12 | {
13 | "path": "./tsconfig.editor.json"
14 | }
15 | ],
16 | "compilerOptions": {
17 | "forceConsistentCasingInFileNames": true,
18 | "strict": true,
19 | "noImplicitOverride": true,
20 | "noPropertyAccessFromIndexSignature": true,
21 | "noImplicitReturns": true,
22 | "noFallthroughCasesInSwitch": true,
23 | "target": "es2020"
24 | },
25 | "angularCompilerOptions": {
26 | "strictInjectionParameters": true,
27 | "strictInputAccessModifiers": true,
28 | "strictTemplates": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/dashboard-mfe/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | },
12 | {
13 | "path": "./tsconfig.editor.json"
14 | }
15 | ],
16 | "compilerOptions": {
17 | "forceConsistentCasingInFileNames": true,
18 | "strict": true,
19 | "noImplicitOverride": true,
20 | "noPropertyAccessFromIndexSignature": true,
21 | "noImplicitReturns": true,
22 | "noFallthroughCasesInSwitch": true,
23 | "target": "es2020"
24 | },
25 | "angularCompilerOptions": {
26 | "strictInjectionParameters": true,
27 | "strictInputAccessModifiers": true,
28 | "strictTemplates": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | },
12 | {
13 | "path": "./tsconfig.editor.json"
14 | }
15 | ],
16 | "compilerOptions": {
17 | "forceConsistentCasingInFileNames": true,
18 | "strict": true,
19 | "noImplicitOverride": true,
20 | "noPropertyAccessFromIndexSignature": true,
21 | "noImplicitReturns": true,
22 | "noFallthroughCasesInSwitch": true,
23 | "target": "es2020"
24 | },
25 | "angularCompilerOptions": {
26 | "strictInjectionParameters": true,
27 | "strictInputAccessModifiers": true,
28 | "strictTemplates": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../../tsconfig.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | },
9 | {
10 | "path": "./tsconfig.spec.json"
11 | },
12 | {
13 | "path": "./tsconfig.editor.json"
14 | }
15 | ],
16 | "compilerOptions": {
17 | "forceConsistentCasingInFileNames": true,
18 | "strict": true,
19 | "noImplicitOverride": true,
20 | "noPropertyAccessFromIndexSignature": true,
21 | "noImplicitReturns": true,
22 | "noFallthroughCasesInSwitch": true,
23 | "target": "es2020"
24 | },
25 | "angularCompilerOptions": {
26 | "strictInjectionParameters": true,
27 | "strictInputAccessModifiers": true,
28 | "strictTemplates": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule, Routes } from '@angular/router';
3 |
4 | import { StandaloneSpinnerComponent } from './standalone-spinner/standalone-spinner.component';
5 |
6 | const routes: Routes = [
7 | {
8 | path: 'spinner',
9 | loadChildren: () => import('./spinner/spinner.module').then((m) => m.SpinnerModule),
10 | },
11 | {
12 | path: 'standalone-spinner',
13 | component: StandaloneSpinnerComponent,
14 | },
15 | {
16 | path: '**',
17 | redirectTo: 'spinner',
18 | },
19 | ];
20 |
21 | @NgModule({
22 | imports: [RouterModule.forRoot(routes, { initialNavigation: 'enabledBlocking' })],
23 | exports: [RouterModule],
24 | })
25 | export class AppRoutingModule {}
26 |
--------------------------------------------------------------------------------
/apps/server/users-ms/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { Module } from '@nestjs/common';
2 | import { TypeOrmModule } from '@nestjs/typeorm';
3 |
4 | import { UsersModule } from './modules/users/users.module';
5 |
6 | @Module({
7 | imports: [
8 | TypeOrmModule.forRoot({
9 | type: process.env.DB_TYPE as 'aurora-mysql',
10 | host: process.env.DB_HOST,
11 | port: Number(process.env.DB_PORT),
12 | username: process.env.DB_USER,
13 | password: process.env.DB_PASSWORD,
14 | database: process.env.DB_NAME,
15 | synchronize: !(process.env.NODE_ENV?.trim() === 'production'),
16 | autoLoadEntities: true,
17 | migrations: ['./migrations/*{.ts,.js}'],
18 | }),
19 | UsersModule,
20 | ],
21 | })
22 | export class AppModule {}
23 |
--------------------------------------------------------------------------------
/libs/client/auth/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-auth',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/auth',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/libs/client/core/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-core',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/core',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/libs/client/mfe/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-mfe',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/mfe',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/libs/server/common/src/lib/decorators/log-observable-error.decorator.ts:
--------------------------------------------------------------------------------
1 | import { Logger } from '@nestjs/common';
2 | import { Observable, tap } from 'rxjs';
3 |
4 | export function LogObservableError(
5 | logger: Logger = new Logger(),
6 | type: Exclude = 'log'
7 | ): MethodDecorator {
8 | return function (
9 | _target: any,
10 | _propertyKey: string | symbol,
11 | descriptor: TypedPropertyDescriptor
12 | ): TypedPropertyDescriptor {
13 | const originalMethod = descriptor.value;
14 |
15 | descriptor.value = function (...args: any[]): Observable {
16 | return originalMethod.apply(this, args).pipe(tap({ error: (error) => logger[type](error) }));
17 | };
18 |
19 | return descriptor;
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/libs/client/common/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-common',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/common',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/libs/client/forms/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-forms',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/forms',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/shell-app/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-shell',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/apps/client/shell-app',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
18 |
--------------------------------------------------------------------------------
/apps/client/auth-mfe/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-auth-mfe',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/apps/client/auth-mfe',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/shell-app/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
18 |
--------------------------------------------------------------------------------
/apps/server/api-gateway/src/app/modules/auth/auth.strategy.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@nestjs/common';
2 | import { PassportStrategy } from '@nestjs/passport';
3 | import { AuthTokenPayload } from '@nx-mfe/server/domains';
4 | import { ExtractJwt, Strategy } from 'passport-jwt';
5 |
6 | @Injectable()
7 | export class AuthStrategy extends PassportStrategy(Strategy) {
8 | constructor() {
9 | super({
10 | jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
11 | ignoreExpiration: false,
12 | secretOrKey: process.env.JWT_ACCESS_SECRET,
13 | });
14 | }
15 |
16 | public async validate(payload: AuthTokenPayload): Promise {
17 | return new AuthTokenPayload({
18 | id: payload.id,
19 | email: payload.email,
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/libs/client/ui/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../../../node_modules/nx/schemas/project-schema.json",
3 | "projectType": "library",
4 | "sourceRoot": "libs/client/ui/src",
5 | "prefix": "ui",
6 | "targets": {
7 | "test": {
8 | "executor": "@nrwl/jest:jest",
9 | "outputs": [
10 | "coverage/libs/client/ui"
11 | ],
12 | "options": {
13 | "jestConfig": "libs/client/ui/jest.config.ts",
14 | "passWithNoTests": true
15 | }
16 | },
17 | "lint": {
18 | "executor": "@nrwl/linter:eslint",
19 | "options": {
20 | "lintFilePatterns": [
21 | "libs/client/ui/**/*.ts",
22 | "libs/client/ui/**/*.html"
23 | ]
24 | }
25 | }
26 | },
27 | "tags": [
28 | "scope:client"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/apps/client/dashboard-mfe/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
18 |
--------------------------------------------------------------------------------
/apps/client/loaders-mfe/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-loaders-mfe',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/apps/client/loaders-mfe',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/libs/client/environment/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-environment',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/libs/client/environment',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/dashboard-mfe/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-dashboard',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/apps/client/dashboard-mfe',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/fallbacks-mfe/jest.config.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | export default {
3 | displayName: 'client-fallbacks-mfe',
4 | preset: '../../../jest.preset.js',
5 | setupFilesAfterEnv: ['/src/test-setup.ts'],
6 | globals: {
7 | 'ts-jest': {
8 | tsconfig: '/tsconfig.spec.json',
9 | stringifyContentPathRegex: '\\.(html|svg)$',
10 | },
11 | },
12 | coverageDirectory: '../../../coverage/apps/client/fallbacks-mfe',
13 | transform: {
14 | '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
15 | },
16 | transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
17 | snapshotSerializers: [
18 | 'jest-preset-angular/build/serializers/no-ng-attributes',
19 | 'jest-preset-angular/build/serializers/ng-snapshot',
20 | 'jest-preset-angular/build/serializers/html-comment',
21 | ],
22 | };
23 |
--------------------------------------------------------------------------------
/apps/client/shell-app/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { HttpClientModule } from '@angular/common/http';
2 | import { NgModule } from '@angular/core';
3 | import { BrowserModule } from '@angular/platform-browser';
4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5 | import { CoreModule } from '@nx-mfe/client/core';
6 |
7 | import { environment } from '../environments/environment';
8 | import { AppComponent } from './app.component';
9 | import { AppRoutingModule } from './app-routing.module';
10 |
11 | @NgModule({
12 | declarations: [AppComponent],
13 | imports: [
14 | BrowserModule,
15 | BrowserAnimationsModule,
16 | HttpClientModule,
17 | AppRoutingModule,
18 | CoreModule.forRoot(environment),
19 | ],
20 | bootstrap: [AppComponent],
21 | })
22 | export class AppModule {}
23 |
--------------------------------------------------------------------------------