-
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.
- Loading branch information
1 parent
20f4ced
commit a94f94a
Showing
12 changed files
with
56 additions
and
50 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
8 changes: 3 additions & 5 deletions
8
libs/pathway-design/server/pathway/infrastructure/src/index.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,5 +1,3 @@ | ||
export { | ||
PDSPIPPathwayPersistenceInfrastructureModule, | ||
PDSPIPPersistenceDriverAuthorized, | ||
pDSPIPPersistenceKeys, | ||
} from './lib/persistence/pathway-persistence-infrastructure.module'; | ||
export { pDSPIPPersistenceKeys } from './lib/persistence/pathway-persistence-infrastructure.constants'; | ||
export { PDSPIPPathwayPersistenceInfrastructureModule } from './lib/persistence/pathway-persistence-infrastructure.module'; | ||
export { PDSPIPPersistenceDriverAuthorized } from './lib/persistence/pathway-persistence-infrastructure.types'; |
28 changes: 28 additions & 0 deletions
28
...athway/infrastructure/src/lib/persistence/pathway-persistence-infrastructure.constants.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,28 @@ | ||
import { | ||
PDSPBP_CHANGE_TITLE_PATHWAY_PERSISTENCE_PORT, | ||
PDSPBP_INITIALIZE_PATHWAY_PERSISTENCE_PORT, | ||
} from '@bewoak/pathway-design-server-pathway-business'; | ||
import type { Provider } from '@nestjs/common'; | ||
import { ChangeTitlePathwayInMemoryPersistence } from './change-title/in-memory/change-title-pathway-in-memory.persistence'; | ||
import { PathwayInMemoryRepository } from './common/in-memory/repositories/in-memory-pathway.repository'; | ||
import { InitializePathwayInMemoryPersistence } from './initialize/in-memory/initialize-pathway-in-memory.persistence'; | ||
import type { PDSPIPPersistenceDriverAuthorized } from './pathway-persistence-infrastructure.types'; | ||
|
||
export const persistenceProvidersMap: Record<PDSPIPPersistenceDriverAuthorized, Provider[]> = { | ||
inMemory: [ | ||
InitializePathwayInMemoryPersistence, | ||
{ | ||
provide: PDSPBP_INITIALIZE_PATHWAY_PERSISTENCE_PORT, | ||
useExisting: InitializePathwayInMemoryPersistence, | ||
}, | ||
ChangeTitlePathwayInMemoryPersistence, | ||
{ | ||
provide: PDSPBP_CHANGE_TITLE_PATHWAY_PERSISTENCE_PORT, | ||
useExisting: ChangeTitlePathwayInMemoryPersistence, | ||
}, | ||
PathwayInMemoryRepository, | ||
], | ||
orm: [], | ||
}; | ||
|
||
export const pDSPIPPersistenceKeys = Object.keys(persistenceProvidersMap) as [PDSPIPPersistenceDriverAuthorized]; |
27 changes: 3 additions & 24 deletions
27
...r/pathway/infrastructure/src/lib/persistence/pathway-persistence-infrastructure.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
1 change: 1 addition & 0 deletions
1
...er/pathway/infrastructure/src/lib/persistence/pathway-persistence-infrastructure.types.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 @@ | ||
export type PDSPIPPersistenceDriverAuthorized = 'inMemory' | 'orm'; |
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
...way/interface-adapters/src/lib/initialize/initialize-pathway-interface-adapters.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
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,3 @@ | ||
export { | ||
PDSPPPathwayPresentersModule, | ||
PDSPPPresenterDriverAuthorized, | ||
pDSPPPresenterKeys, | ||
} from './lib/pathway-presenters.module'; | ||
export { pDSPPPresenterKeys } from './lib/pathway-presenters.constants'; | ||
export { PDSPPPathwayPresentersModule } from './lib/pathway-presenters.module'; | ||
export { PDSPPPresenterDriverAuthorized } from './lib/pathway-presenters.types'; |
8 changes: 8 additions & 0 deletions
8
libs/pathway-design/server/pathway/presenters/src/lib/pathway-presenters.constants.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,8 @@ | ||
import type { PDSPPPresenterDriverAuthorized } from './pathway-presenters.types'; | ||
import { ToJsonPathwayPresenterModule } from './toJson/to-json-pathway-presenter.module'; | ||
|
||
export const presenterModuleMap: Record<PDSPPPresenterDriverAuthorized, typeof ToJsonPathwayPresenterModule> = { | ||
toJson: ToJsonPathwayPresenterModule, | ||
}; | ||
|
||
export const pDSPPPresenterKeys = Object.keys(presenterModuleMap) as [PDSPPPresenterDriverAuthorized]; |
11 changes: 2 additions & 9 deletions
11
libs/pathway-design/server/pathway/presenters/src/lib/pathway-presenters.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
1 change: 1 addition & 0 deletions
1
libs/pathway-design/server/pathway/presenters/src/lib/pathway-presenters.types.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 @@ | ||
export type PDSPPPresenterDriverAuthorized = 'toJson'; |