feat(cart): Add cart module package (#5982)
* feat: Add CartModule foundation * remove migration * fix ts issue * Create hot-dingos-pay.md
This commit is contained in:
1 parent
487067fb48
commit
925feea04a
44 files changed
+679
-3
No files matched your search
@@ -0,0 +1,5 @@
|
||||
describe("Noop test", () => {
|
||||
it("noop check", async () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
CartTypes,
|
||||
DAL,
|
||||
InternalModuleDeclaration,
|
||||
ModuleJoinerConfig,
|
||||
} from "@medusajs/types"
|
||||
|
||||
import { Cart } from "@models"
|
||||
|
||||
import { joinerConfig } from "../joiner-config"
|
||||
|
||||
type InjectedDependencies = {
|
||||
baseRepository: DAL.RepositoryService
|
||||
}
|
||||
|
||||
export default class CartModuleService<
|
||||
TCart extends Cart = Cart
|
||||
> implements CartTypes.ICartModuleService
|
||||
{
|
||||
protected baseRepository_: DAL.RepositoryService
|
||||
|
||||
constructor(
|
||||
{ baseRepository }: InjectedDependencies,
|
||||
protected readonly moduleDeclaration: InternalModuleDeclaration
|
||||
) {
|
||||
this.baseRepository_ = baseRepository
|
||||
}
|
||||
|
||||
__joinerConfig(): ModuleJoinerConfig {
|
||||
return joinerConfig
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { default as CartModuleService } from "./cart-module";
|
||||
|
||||
Reference in new issue
Block a user