fix(medusa): Remove deps mongoose + mongodb (#1218)

* fix(medusa): Remove deps mongoose, mongodb and transaction service + base model

* chore: delete permissions+add-ons legacy plugins

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
This commit is contained in:
Oliver Windall JuhlandSebastian Rindom authored and GitHub committed 2022-07-04 09:10:32 +02:00
1 parent 8fe5fb5503
commit c76e23e84d
52 files changed
+28 -9053

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,5 +1,3 @@
import mongoose from "mongoose"
import { IdMap } from "medusa-test-utils"
import MiddlewareService from "../middleware"
describe("MiddlewareService", () => {
@@ -1,11 +1,11 @@
import { BaseService } from "medusa-interfaces"
import { MedusaError } from "medusa-core-utils"
import { BaseService } from "medusa-interfaces"
import { v4 } from "uuid"
const KEY_LOCKED_TIMEOUT = 1000
class IdempotencyKeyService extends BaseService {
constructor({ manager, idempotencyKeyRepository, transactionService }) {
constructor({ manager, idempotencyKeyRepository }) {
super()
/** @private @constant {EntityManager} */
@@ -13,9 +13,6 @@ class IdempotencyKeyService extends BaseService {
/** @private @constant {IdempotencyKeyRepository} */
this.idempotencyKeyRepository_ = idempotencyKeyRepository
/** @private @constant {TransactionService} */
this.transactionService_ = transactionService
}
/**
@@ -88,7 +85,6 @@ class IdempotencyKeyService extends BaseService {
/**
* Locks an idempotency.
* @param {string} idempotencyKey - key to lock
* @param {object} session - mongoose transaction session
* @return {Promise} result of the update operation
*/
async lock(idempotencyKey) {
+12 -13
View File
@@ -1,15 +1,16 @@
export { default as AuthService } from "./auth"
export { default as BatchJobService } from "./batch-job"
export { default as CartService } from "./cart"
export { default as ClaimService } from "./claim"
export { default as ClaimItemService } from "./claim-item"
export { default as ClaimService } from "./claim"
export { default as CustomShippingOptionService } from "./custom-shipping-option"
export { default as CustomerService } from "./customer"
export { default as CustomerGroupService } from "./customer-group"
export { default as CustomerService } from "./customer"
export { default as DiscountService } from "./discount"
export { default as DraftOrderService } from "./draft-order"
export { default as EventBusService } from "./event-bus"
export { default as FulfillmentService } from "./fulfillment"
export { default as FulfillmentProviderService } from "./fulfillment-provider"
export { default as FulfillmentService } from "./fulfillment"
export { default as GiftCardService } from "./gift-card"
export { default as IdempotencyKeyService } from "./idempotency-key"
export { default as InventoryService } from "./inventory"
@@ -20,25 +21,23 @@ export { default as NotificationService } from "./notification"
export { default as OauthService } from "./oauth"
export { default as OrderService } from "./order"
export { default as PaymentProviderService } from "./payment-provider"
export { default as ProductService } from "./product"
export { default as PricingService } from "./pricing"
export { default as ProductCollectionService } from "./product-collection"
export { default as ProductService } from "./product"
export { default as ProductTypeService } from "./product-type"
export { default as ProductVariantService } from "./product-variant"
export { default as QueryBuilderService } from "./query-builder"
export { default as RegionService } from "./region"
export { default as ReturnService } from "./return"
export { default as ReturnReasonService } from "./return-reason"
export { default as ReturnService } from "./return"
export { default as SearchService } from "./search"
export { default as ShippingOptionService } from "./shipping-option"
export { default as ShippingProfileService } from "./shipping-profile"
export { default as StoreService } from "./store"
export { default as StrategyResolverService } from "./strategy-resolver"
export { default as SwapService } from "./swap"
export { default as SystemPaymentProviderService } from "./system-payment-provider"
export { default as TotalsService } from "./totals"
export { default as TransactionService } from "./transaction"
export { default as UserService } from "./user"
export { default as TaxRateService } from "./tax-rate"
export { default as TaxProviderService } from "./tax-provider"
export { default as ProductTypeService } from "./product-type"
export { default as PricingService } from "./pricing"
export { default as BatchJobService } from "./batch-job"
export { default as StrategyResolverService } from "./strategy-resolver"
export { default as TaxRateService } from "./tax-rate"
export { default as TotalsService } from "./totals"
export { default as UserService } from "./user"
@@ -1,14 +0,0 @@
import { BaseService } from "medusa-interfaces"
import mongoose from "mongoose"
class TransactionService extends BaseService {
constructor() {
super()
}
async createSession() {
return mongoose.startSession()
}
}
export default TransactionService