Skip to content

Commit

Permalink
chore: update to Nx 19.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
getlarge committed Jun 13, 2024
1 parent 169b8de commit d38dd71
Show file tree
Hide file tree
Showing 38 changed files with 2,369 additions and 2,660 deletions.
20 changes: 8 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,25 +290,21 @@
"simple-import-sort/imports": [
"error",
{
"groups": [
// Side effects.
["^\\u0000"],
// 3rd party.
["^@?\\w"],
// Anything not fitting group above.
["^"],
// Relative imports.
["^\\."]
]
"groups": [["^\\u0000"], ["^@?\\w"], ["^"], ["^\\."]]
}
],
"simple-import-sort/exports": "error"
"simple-import-sort/exports": "error",
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx", "*.cjs"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ keys/*
!.yarn/versions

.nx/cache
.nx/workspace-data
.flaskenv*
!.env.vault

Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@

/.nx/cache
*-template.yaml

/.nx/workspace-data
15 changes: 3 additions & 12 deletions apps/auth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/auth/src",
"projectType": "application",
"tags": ["scope:auth", "type:app", "platform:server"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand All @@ -17,7 +18,6 @@
"target": "node",
"compiler": "tsc",
"webpackConfig": "apps/auth/webpack.config.cjs",
"isolatedConfig": true,
"babelUpwardRootMode": true
},
"configurations": {
Expand Down Expand Up @@ -55,15 +55,7 @@
"defaultConfiguration": "local"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/auth/**/*.ts",
"apps/auth/**/package.json",
"apps/auth/**/project.json"
]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down Expand Up @@ -147,6 +139,5 @@
"cwd": ".",
"parallel": false
}
},
"tags": ["scope:auth", "type:app", "platform:server"]
}
}
4 changes: 2 additions & 2 deletions apps/auth/src/app/users/models/ory-identity.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'created_at';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Identity, IdentityState } from '@ory/client';
import { Identity, IdentityStateEnum } from '@ory/client';
import { Expose, Type } from 'class-transformer';
import {
IsArray,
Expand Down Expand Up @@ -52,7 +52,7 @@ export class OryIdentityDto implements Identity {
@IsString()
@IsIn(['active', 'inactive'])
@ApiPropertyOptional()
state?: IdentityState;
state?: IdentityStateEnum;

@Expose()
@IsArray()
Expand Down
15 changes: 3 additions & 12 deletions apps/expiration/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/expiration/src",
"projectType": "application",
"tags": ["scope:expiration", "type:app", "platform:server"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand All @@ -17,7 +18,6 @@
"target": "node",
"compiler": "tsc",
"webpackConfig": "apps/expiration/webpack.config.cjs",
"isolatedConfig": true,
"babelUpwardRootMode": true
},
"configurations": {
Expand Down Expand Up @@ -55,15 +55,7 @@
"defaultConfiguration": "local"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/expiration/**/*.ts",
"apps/expiration/**/package.json",
"apps/expiration/**/project.json"
]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down Expand Up @@ -139,6 +131,5 @@
"cwd": ".",
"parallel": false
}
},
"tags": ["scope:expiration", "type:app", "platform:server"]
}
}
12 changes: 4 additions & 8 deletions apps/ng-client-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/ng-client-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["ng-client"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
Expand All @@ -17,13 +19,7 @@
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/ng-client-e2e/**/*.{js,ts}"]
}
"executor": "@nx/eslint:lint"
}
},
"tags": [],
"implicitDependencies": ["ng-client"]
}
}
12 changes: 3 additions & 9 deletions apps/ng-client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/ng-client/src",
"prefix": "ticketing",
"tags": ["scope:client", "type:app", "platform:web"],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
Expand Down Expand Up @@ -122,13 +123,7 @@
}
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": [
"apps/ng-client/src/**/*.ts",
"apps/ng-client/src/**/*.html"
]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down Expand Up @@ -160,6 +155,5 @@
"command": "docker push ghcr.io/getlarge/ticketing-ng-client:{args.tag}"
}
}
},
"tags": ["scope:client", "type:app", "platform:web"]
}
}
10 changes: 7 additions & 3 deletions apps/ng-client/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import {
HTTP_INTERCEPTORS,
provideHttpClient,
withInterceptorsFromDi,
} from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
Expand All @@ -23,9 +27,9 @@ import { RootStoreModule } from './store/root-store.module';

@NgModule({
declarations: [AppComponent, HomeComponent],
bootstrap: [AppComponent],
imports: [
BrowserModule,
HttpClientModule,
NgbModule,
RootStoreModule,
AlertModule,
Expand Down Expand Up @@ -77,7 +81,7 @@ import { RootStoreModule } from './store/root-store.module';
useFactory: () => new AddVersionHeaderInterceptor(environment),
multi: true,
},
provideHttpClient(withInterceptorsFromDi()),
],
bootstrap: [AppComponent],
})
export class AppModule {}
4 changes: 2 additions & 2 deletions apps/ng-client/src/app/helpers/error.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class ErrorInterceptor implements HttpInterceptor {

intercept(
request: HttpRequest<unknown>,
next: HttpHandler
next: HttpHandler,
): Observable<HttpEvent<unknown>> {
return next.handle(request).pipe(
catchError((err) => {
Expand All @@ -26,7 +26,7 @@ export class ErrorInterceptor implements HttpInterceptor {
this.store.dispatch(new UserStoreActions.SignOutAction());
}
return throwError(() => err.error || err);
})
}),
);
}
}
8 changes: 4 additions & 4 deletions apps/ng-client/src/app/helpers/jwt.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class JwtInterceptor implements HttpInterceptor {
// add auth header with jwt if user is logged in and request is to the api url
intercept(
request: HttpRequest<unknown>,
next: HttpHandler
next: HttpHandler,
): Observable<HttpEvent<unknown>> {
//? Take token from LocalStorageService.get('token') instead ?
return this.store.select(UserStoreSelectors.selectCurrentToken).pipe(
Expand All @@ -29,16 +29,16 @@ export class JwtInterceptor implements HttpInterceptor {
// eslint-disable-next-line no-param-reassign
request = this.updateRequest(
request,
token || LocalStorageService.get('token')
token || LocalStorageService.get('token'),
);
return next.handle(request);
})
}),
);
}

updateRequest(
request: HttpRequest<unknown>,
token?: string
token?: string,
): HttpRequest<unknown> {
const url = new URL(request.url);
const isApiUrl = url.hostname === environment.apiBaseDomain;
Expand Down
1 change: 1 addition & 0 deletions apps/ng-client/src/app/store/root-store.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { UserStoreModule } from './user-store/user-store.module';
StoreDevtoolsModule.instrument({
maxAge: 25,
logOnly: environment.production,
connectInZone: true,
}),
EffectsModule.forRoot([]),
],
Expand Down
15 changes: 3 additions & 12 deletions apps/orders/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/orders/src",
"projectType": "application",
"tags": ["scope:orders", "type:app", "platform:server"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand All @@ -16,7 +17,6 @@
"target": "node",
"compiler": "tsc",
"webpackConfig": "apps/orders/webpack.config.cjs",
"isolatedConfig": true,
"babelUpwardRootMode": true
},
"configurations": {
Expand Down Expand Up @@ -54,15 +54,7 @@
"defaultConfiguration": "local"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/orders/**/*.ts",
"apps/orders/**/package.json",
"apps/orders/**/project.json"
]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down Expand Up @@ -148,6 +140,5 @@
"cwd": ".",
"parallel": false
}
},
"tags": ["scope:orders", "type:app", "platform:server"]
}
}
15 changes: 3 additions & 12 deletions apps/payments/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/payments/src",
"projectType": "application",
"tags": ["scope:payments", "type:app", "platform:server"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand All @@ -16,7 +17,6 @@
"target": "node",
"compiler": "tsc",
"webpackConfig": "apps/payments/webpack.config.cjs",
"isolatedConfig": true,
"babelUpwardRootMode": true
},
"configurations": {
Expand Down Expand Up @@ -54,15 +54,7 @@
"defaultConfiguration": "local"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/payments/**/*.ts",
"apps/payments/**/package.json",
"apps/payments/**/project.json"
]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down Expand Up @@ -148,6 +140,5 @@
"cwd": ".",
"parallel": false
}
},
"tags": ["scope:payments", "type:app", "platform:server"]
}
}
Loading

0 comments on commit d38dd71

Please sign in to comment.