-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 migrate and refactory app envs config
- Loading branch information
Showing
69 changed files
with
4,139 additions
and
4,157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,5 @@ testem.log | |
Thumbs.db | ||
.env | ||
.angular | ||
|
||
.nx/cache |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/dist | ||
/coverage | ||
.angular | ||
|
||
/.nx/cache |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { | ||
UserServiceImpl, | ||
AuthServiceImpl, | ||
GroupServiceImpl, | ||
AuthServiceMock, | ||
UserServiceMock, | ||
GroupServiceMock, | ||
} from '../infrastructure' | ||
|
||
export interface AccountInject { | ||
auth: AuthServiceImpl | AuthServiceMock | ||
user: UserServiceImpl | UserServiceMock | ||
group: GroupServiceImpl | GroupServiceMock | ||
} |
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 @@ | ||
export * from './account-inject' |
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,52 @@ | ||
import {EnvConfig} from '@dev/shared-util-data' | ||
import {Http} from '@dev/shared-data-access' | ||
import {AccountInject} from '../interfaces' | ||
import {AuthService, GroupService, UserService} from '@dev/account-domain' | ||
import {AuthFacade, GroupFacade, UserFacade} from '../application' | ||
|
||
function provideServices(env: EnvConfig<AccountInject>) { | ||
return [ | ||
{ | ||
provide: UserService, | ||
useFactory(http: Http) { | ||
return new env.inject.user(http, env.api.account) | ||
}, | ||
deps: [Http], | ||
}, | ||
{ | ||
provide: AuthService, | ||
useFactory(http: Http) { | ||
return new env.inject.auth(http, env.api.accountAuth) | ||
}, | ||
deps: [Http], | ||
}, | ||
{ | ||
provide: GroupService, | ||
useFactory(http: Http) { | ||
return new env.inject.group(http, env.api.accountGroups) | ||
}, | ||
deps: [Http], | ||
}, | ||
] | ||
} | ||
|
||
export function provideFacades() { | ||
return [ | ||
{ | ||
provide: UserFacade, | ||
deps: [UserService], | ||
}, | ||
{ | ||
provide: AuthFacade, | ||
deps: [AuthService], | ||
}, | ||
{ | ||
provide: GroupFacade, | ||
deps: [GroupService], | ||
}, | ||
] | ||
} | ||
|
||
export function provideAccount(env: EnvConfig<AccountInject>) { | ||
return [provideServices(env), provideFacades()] | ||
} |
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,3 +1 @@ | ||
export * from './auth' | ||
export * from './group' | ||
export * from './user' | ||
export * from './account' |
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,4 +1,5 @@ | ||
export * from './lib/infrastructure' | ||
export * from './lib/application' | ||
export * from './lib/interfaces' | ||
export * from './lib/providers' | ||
export * from './lib/dtos' |
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
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
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
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.