-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Free utils from core dependencies, starting to move services to core
- Loading branch information
Showing
30 changed files
with
110 additions
and
94 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 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,7 +1,8 @@ | ||
import { BaseDiscountAdapter, IDiscountAdapter } from '@unchainedshop/utils'; | ||
import { OrderDiscountConfiguration } from './OrderDiscountConfiguration.js'; | ||
import { UnchainedCore } from '@unchainedshop/core'; | ||
|
||
export const OrderDiscountAdapter: Omit< | ||
IDiscountAdapter<OrderDiscountConfiguration>, | ||
IDiscountAdapter<OrderDiscountConfiguration, UnchainedCore>, | ||
'key' | 'label' | 'version' | ||
> = BaseDiscountAdapter; |
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 @@ | ||
import { UnchainedCore } from '@unchainedshop/core'; | ||
import { BaseDiscountDirector } from '@unchainedshop/utils'; | ||
import { OrderDiscountConfiguration } from './OrderDiscountConfiguration.js'; | ||
|
||
export const OrderDiscountDirector = | ||
BaseDiscountDirector<OrderDiscountConfiguration>('OrderDiscountDirector'); | ||
export const OrderDiscountDirector = BaseDiscountDirector<OrderDiscountConfiguration, UnchainedCore>( | ||
'OrderDiscountDirector', | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { BaseDiscountAdapter, IDiscountAdapter } from '@unchainedshop/utils'; | ||
import { ProductDiscountConfiguration } from './ProductDiscountConfiguration.js'; | ||
import { UnchainedCore } from '@unchainedshop/core'; | ||
|
||
export const ProductDiscountAdapter: Omit< | ||
IDiscountAdapter<ProductDiscountConfiguration>, | ||
IDiscountAdapter<ProductDiscountConfiguration, UnchainedCore>, | ||
'key' | 'label' | 'version' | ||
> = BaseDiscountAdapter; |
6 changes: 4 additions & 2 deletions
6
packages/core-products/src/director/ProductDiscountDirector.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,7 @@ | ||
import { UnchainedCore } from '@unchainedshop/core'; | ||
import { BaseDiscountDirector } from '@unchainedshop/utils'; | ||
import { ProductDiscountConfiguration } from './ProductDiscountConfiguration.js'; | ||
|
||
export const ProductDiscountDirector = | ||
BaseDiscountDirector<ProductDiscountConfiguration>('ProductDiscountDirector'); | ||
export const ProductDiscountDirector = BaseDiscountDirector<ProductDiscountConfiguration, UnchainedCore>( | ||
'ProductDiscountDirector', | ||
); |
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 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './types.js'; | ||
export * from './module/configureUsersModule.js'; | ||
export * from './services/userServices.js'; | ||
export * from './users-settings.js'; |
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
17 changes: 14 additions & 3 deletions
17
...rs/src/services/migrateUserDataService.ts → ...re/src/services/migrateUserDataService.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
2 changes: 1 addition & 1 deletion
2
...ces/updateUserAvatarAfterUploadService.ts → ...ces/updateUserAvatarAfterUploadService.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { UnchainedCore } from '@unchainedshop/core'; | ||
import { FileDirector } from '../../../file-upload/lib/file-upload-index.js'; | ||
|
||
export const setupUploadHandlers = () => { | ||
FileDirector.registerFileUploadCallback<UnchainedCore>('user-avatars', async (file, context) => { | ||
const { services } = context; | ||
return services.users.updateUserAvatarAfterUpload({ file }, context); | ||
}); | ||
}; |
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.