-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: clean up main project structure
- Loading branch information
Showing
31 changed files
with
137 additions
and
120 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
45 changes: 0 additions & 45 deletions
45
libs/api/core/data-access/src/lib/api-core-data-access.module.ts
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
libs/api/core/data-access/src/lib/api-core.data-access.module.ts
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,20 @@ | ||
import { Module } from '@nestjs/common' | ||
import { ScheduleModule } from '@nestjs/schedule' | ||
import { ServeStaticModule } from '@nestjs/serve-static' | ||
import { ApiCoreProvisionService } from './api-core-provision.service' | ||
import { ApiCoreService } from './api-core.service' | ||
import { ApiCoreConfigModule } from './config/api-core-config.module' | ||
import { ApiCoreGraphQLModule } from './graphql/api-core-graphql.module' | ||
import { serveStaticFactory } from './helpers/serve-static-factory' | ||
|
||
@Module({ | ||
imports: [ | ||
ApiCoreConfigModule, | ||
ApiCoreGraphQLModule, | ||
ScheduleModule.forRoot(), | ||
ServeStaticModule.forRootAsync({ useFactory: serveStaticFactory() }), | ||
], | ||
providers: [ApiCoreService, ApiCoreProvisionService], | ||
exports: [ApiCoreService], | ||
}) | ||
export class ApiCoreDataAccessModule {} |
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
19 changes: 19 additions & 0 deletions
19
libs/api/core/data-access/src/lib/config/api-core-config.module.ts
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,19 @@ | ||
import { Module } from '@nestjs/common' | ||
import { ConfigModule } from '@nestjs/config' | ||
|
||
import { ApiCoreConfigService } from './api-core-config.service' | ||
import { configuration } from './configuration' | ||
import { validationSchema } from './validation-schema' | ||
|
||
@Module({ | ||
imports: [ | ||
ConfigModule.forRoot({ | ||
cache: true, | ||
load: [configuration], | ||
validationSchema, | ||
}), | ||
], | ||
providers: [ApiCoreConfigService], | ||
exports: [ApiCoreConfigService], | ||
}) | ||
export class ApiCoreConfigModule {} |
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
26 changes: 26 additions & 0 deletions
26
libs/api/core/data-access/src/lib/graphql/api-core-graphql.module.ts
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,26 @@ | ||
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo' | ||
import { Module } from '@nestjs/common' | ||
import { GraphQLModule } from '@nestjs/graphql' | ||
import { AppContext } from '../entity/app-context' | ||
import { join } from 'path' | ||
|
||
@Module({ | ||
imports: [ | ||
GraphQLModule.forRoot<ApolloDriverConfig>({ | ||
autoSchemaFile: join(process.cwd(), 'api-schema.graphql'), | ||
sortSchema: true, | ||
driver: ApolloDriver, | ||
introspection: process.env['GRAPHQL_PLAYGROUND']?.toLowerCase() === 'true', | ||
playground: { | ||
settings: { | ||
'request.credentials': 'include', | ||
}, | ||
}, | ||
resolvers: { | ||
// JSON: GraphQLJSON, | ||
}, | ||
context: ({ req, res }: AppContext) => ({ req, res }), | ||
}), | ||
], | ||
}) | ||
export class ApiCoreGraphQLModule {} |
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
12 changes: 6 additions & 6 deletions
12
...cess/src/lib/api-anon-identity.service.ts → ...src/lib/api-identity-data-anon.service.ts
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
6 changes: 3 additions & 3 deletions
6
...ss/src/lib/api-solana-identity.service.ts → ...ss/src/lib/api-identity-solana.service.ts
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
16 changes: 8 additions & 8 deletions
16
...rc/lib/api-identity-data-access.module.ts → ...rc/lib/api-identity.data-access.module.ts
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
12 changes: 6 additions & 6 deletions
12
libs/api/identity/data-access/src/lib/api-identity.service.ts
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 @@ | ||
import { Injectable } from '@nestjs/common' | ||
|
||
import { ApiAdminIdentityService } from './api-admin-identity.service' | ||
import { ApiUserIdentityService } from './api-user-identity.service' | ||
import { ApiAnonIdentityService } from './api-anon-identity.service' | ||
import { ApiIdentityDataAdminService } from './api-identity-data-admin.service' | ||
import { ApiIdentityDataAnonService } from './api-identity-data-anon.service' | ||
import { ApiIdentityDataUserService } from './api-identity-data-user.service' | ||
|
||
@Injectable() | ||
export class ApiIdentityService { | ||
constructor( | ||
readonly admin: ApiAdminIdentityService, | ||
readonly anon: ApiAnonIdentityService, | ||
readonly user: ApiUserIdentityService, | ||
readonly admin: ApiIdentityDataAdminService, | ||
readonly anon: ApiIdentityDataAnonService, | ||
readonly user: ApiIdentityDataUserService, | ||
) {} | ||
} |
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 +1 @@ | ||
export * from './lib/api-identity-feature.module' | ||
export * from './lib/api-identity.feature.module' |
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 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
8 changes: 4 additions & 4 deletions
8
...re/src/lib/api-identity-feature.module.ts → ...re/src/lib/api-identity.feature.module.ts
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,12 +1,12 @@ | ||
import { Module } from '@nestjs/common' | ||
import { ApiIdentityDataAccessModule } from '@pubkey-stack/api-identity-data-access' | ||
import { ApiAdminIdentityResolver } from './api-admin-identity.resolver' | ||
import { ApiIdentityAdminResolver } from './api-identity-admin.resolver' | ||
import { ApiIdentityAnonResolver } from './api-identity-anon.resolver' | ||
import { ApiIdentityUserResolver } from './api-identity-user.resolver' | ||
import { ApiIdentityResolver } from './api-identity.resolver' | ||
import { ApiUserIdentityResolver } from './api-user-identity.resolver' | ||
import { ApiAnonIdentityResolver } from './api-anon-identity.resolver' | ||
|
||
@Module({ | ||
imports: [ApiIdentityDataAccessModule], | ||
providers: [ApiAdminIdentityResolver, ApiAnonIdentityResolver, ApiIdentityResolver, ApiUserIdentityResolver], | ||
providers: [ApiIdentityAdminResolver, ApiIdentityAnonResolver, ApiIdentityResolver, ApiIdentityUserResolver], | ||
}) | ||
export class ApiIdentityFeatureModule {} |
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,11 +1,10 @@ | ||
export * from './lib/api-user-data-access.module' | ||
export * from './lib/api-user.data-access.module' | ||
export * from './lib/api-user.service' | ||
export * from './lib/dto/admin-create-user.input' | ||
export * from './lib/dto/admin-find-many-user.input' | ||
export * from './lib/dto/admin-update-user.input' | ||
export * from './lib/dto/user-find-many-user.input' | ||
export * from './lib/dto/user-update-user.input' | ||
export * from './lib/entity/user-paging.entity' | ||
export * from './lib/entity/user-role.enum' | ||
export * from './lib/entity/user-status.enum' | ||
export * from './lib/entity/user.entity' |
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
Oops, something went wrong.