-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from meysamhadeli/feat/update-all-packages
feat: update all packages
- Loading branch information
Showing
198 changed files
with
3,368 additions
and
2,914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"tabWidth": 4 | ||
} | ||
"semi": true, | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// https://denar90.github.io/eslint.github.io/docs/rules/ | ||
export default [ | ||
{ | ||
rules: { | ||
semi: 'error', | ||
'prefer-const': 'warn', | ||
'no-unused-vars': 'warn', | ||
'no-debugger': 'warn', | ||
'no-console': 'warn' | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"collection": "@nestjs/schematics", | ||
"sourceRoot": "src", | ||
"sourceRoot": "booking/src", | ||
"entryFile": "main", | ||
"compilerOptions": { | ||
"plugins": ["@nestjs/swagger/plugin"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
import {RouterModule} from '@nestjs/core'; | ||
import {TypeOrmModule} from '@nestjs/typeorm'; | ||
import {postgresOptions} from './data/data-source'; | ||
import {PassportModule} from "@nestjs/passport"; | ||
import {JwtModule} from "@nestjs/jwt"; | ||
import {OpenTelemetryModule} from "building-blocks/openTelemetry/open-telemetry.module"; | ||
import {JwtStrategy} from "building-blocks/passport/jwt.strategy"; | ||
import {BookingModule} from "./booking/booking.module"; | ||
import configs from "building-blocks/configs/configs"; | ||
import {MiddlewareConsumer, Module, NestModule} from "@nestjs/common"; | ||
import {HttpContextMiddleware} from "building-blocks/context/context"; | ||
import { RouterModule } from '@nestjs/core'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
import { postgresOptions } from './data/data-source'; | ||
import { PassportModule } from '@nestjs/passport'; | ||
import { JwtModule } from '@nestjs/jwt'; | ||
import { OpenTelemetryModule } from 'building-blocks/openTelemetry/open-telemetry.module'; | ||
import { JwtStrategy } from 'building-blocks/passport/jwt.strategy'; | ||
import { BookingModule } from './booking/booking.module'; | ||
import configs from 'building-blocks/configs/configs'; | ||
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; | ||
import { HttpContextMiddleware } from 'building-blocks/context/context'; | ||
|
||
@Module({ | ||
imports: [ | ||
PassportModule, | ||
JwtModule.register({ | ||
secret: configs.jwt.secret, | ||
signOptions: {expiresIn: configs.jwt.refreshExpirationDays}, | ||
}), | ||
OpenTelemetryModule.forRoot(), | ||
TypeOrmModule.forRoot(postgresOptions), | ||
BookingModule, | ||
RouterModule.register([ | ||
{ | ||
path: '/', | ||
module: BookingModule, | ||
} | ||
]), | ||
], | ||
providers: [JwtStrategy], | ||
imports: [ | ||
PassportModule, | ||
JwtModule.register({ | ||
secret: configs.jwt.secret, | ||
signOptions: { expiresIn: configs.jwt.refreshExpirationDays } | ||
}), | ||
OpenTelemetryModule.forRoot(), | ||
TypeOrmModule.forRoot(postgresOptions), | ||
BookingModule, | ||
RouterModule.register([ | ||
{ | ||
path: '/', | ||
module: BookingModule | ||
} | ||
]) | ||
], | ||
providers: [JwtStrategy] | ||
}) | ||
export class AppModule implements NestModule { | ||
configure(consumer: MiddlewareConsumer) { | ||
consumer | ||
.apply(HttpContextMiddleware) | ||
.forRoutes('*'); | ||
} | ||
configure(consumer: MiddlewareConsumer) { | ||
consumer.apply(HttpContextMiddleware).forRoutes('*'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
import {Module} from '@nestjs/common'; | ||
import {CqrsModule} from '@nestjs/cqrs'; | ||
import {TypeOrmModule} from '@nestjs/typeorm'; | ||
import {RabbitmqModule} from "building-blocks/rabbitmq/rabbitmq.module"; | ||
import {Booking} from "./entities/booking.entity"; | ||
import {BookingRepository} from "../data/repositories/booking.repository"; | ||
import {PassengerClient} from "./http-client/services/passenger/passenger-client"; | ||
import {FlightClient} from "./http-client/services/flight/flight.client"; | ||
import {CreateBookingController, CreateBookingHandler} from "./features/v1/create-booking/create-booking"; | ||
|
||
|
||
import { Module } from '@nestjs/common'; | ||
import { CqrsModule } from '@nestjs/cqrs'; | ||
import { TypeOrmModule } from '@nestjs/typeorm'; | ||
import { RabbitmqModule } from 'building-blocks/rabbitmq/rabbitmq.module'; | ||
import { Booking } from './entities/booking.entity'; | ||
import { BookingRepository } from '../data/repositories/booking.repository'; | ||
import { PassengerClient } from './http-client/services/passenger/passenger-client'; | ||
import { FlightClient } from './http-client/services/flight/flight.client'; | ||
import { | ||
CreateBookingController, | ||
CreateBookingHandler | ||
} from './features/v1/create-booking/create-booking'; | ||
|
||
@Module({ | ||
imports: [CqrsModule, RabbitmqModule.forRoot(), TypeOrmModule.forFeature([Booking])], | ||
controllers: [CreateBookingController], | ||
providers: [ CreateBookingHandler, | ||
{ | ||
provide: 'IBookingRepository', | ||
useClass: BookingRepository, | ||
}, | ||
{ | ||
provide: 'IPassengerClient', | ||
useClass: PassengerClient, | ||
}, | ||
{ | ||
provide: 'IFlightClient', | ||
useClass: FlightClient, | ||
} | ||
], | ||
exports: [], | ||
imports: [CqrsModule, RabbitmqModule.forRoot(), TypeOrmModule.forFeature([Booking])], | ||
controllers: [CreateBookingController], | ||
providers: [ | ||
CreateBookingHandler, | ||
{ | ||
provide: 'IBookingRepository', | ||
useClass: BookingRepository | ||
}, | ||
{ | ||
provide: 'IPassengerClient', | ||
useClass: PassengerClient | ||
}, | ||
{ | ||
provide: 'IFlightClient', | ||
useClass: FlightClient | ||
} | ||
], | ||
exports: [] | ||
}) | ||
export class BookingModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
export class BookingDto { | ||
id: number; | ||
flightNumber: string; | ||
aircraftId: number; | ||
departureAirportId: number; | ||
arriveAirportId: number; | ||
flightDate: Date; | ||
price: number; | ||
description: string; | ||
seatNumber: string; | ||
passengerName: string; | ||
createdAt: Date; | ||
updatedAt?: Date | null; | ||
id: number; | ||
flightNumber: string; | ||
aircraftId: number; | ||
departureAirportId: number; | ||
arriveAirportId: number; | ||
flightDate: Date; | ||
price: number; | ||
description: string; | ||
seatNumber: string; | ||
passengerName: string; | ||
createdAt: Date; | ||
updatedAt?: Date | null; | ||
} |
Oops, something went wrong.