feat(providers): locking redis (#9544)
This commit is contained in:
committed by
GitHub
parent
e77a2ff032
commit
4a03bdbb86
@@ -66,6 +66,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
@@ -213,6 +216,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
@@ -368,6 +374,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
@@ -524,6 +533,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
@@ -668,6 +680,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
@@ -812,6 +827,9 @@ describe("defineConfig", function () {
|
||||
"inventory": {
|
||||
"resolve": "@medusajs/medusa/inventory-next",
|
||||
},
|
||||
"locking": {
|
||||
"resolve": "@medusajs/medusa/locking",
|
||||
},
|
||||
"notification": {
|
||||
"options": {
|
||||
"providers": [
|
||||
|
||||
@@ -8,10 +8,10 @@ import {
|
||||
Modules,
|
||||
REVERSED_MODULE_PACKAGE_NAMES,
|
||||
} from "../modules-sdk"
|
||||
import { isString } from "./is-string"
|
||||
import { resolveExports } from "./resolve-exports"
|
||||
import { isObject } from "./is-object"
|
||||
import { isString } from "./is-string"
|
||||
import { normalizeImportPathWithSource } from "./normalize-import-path-with-source"
|
||||
import { resolveExports } from "./resolve-exports"
|
||||
|
||||
const DEFAULT_SECRET = "supersecret"
|
||||
const DEFAULT_ADMIN_URL = "http://localhost:9000"
|
||||
@@ -132,6 +132,7 @@ function resolveModules(
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.CACHE] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.EVENT_BUS] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.WORKFLOW_ENGINE] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.LOCKING] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.STOCK_LOCATION] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.INVENTORY] },
|
||||
{ resolve: MODULE_PACKAGE_NAMES[Modules.PRODUCT] },
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from "./graphql"
|
||||
export * from "./api-key"
|
||||
export * from "./auth"
|
||||
export * from "./bundles"
|
||||
@@ -12,6 +11,7 @@ export * from "./exceptions"
|
||||
export * from "./feature-flags"
|
||||
export * from "./file"
|
||||
export * from "./fulfillment"
|
||||
export * from "./graphql"
|
||||
export * from "./inventory"
|
||||
export * from "./link"
|
||||
export * from "./modules-sdk"
|
||||
@@ -30,3 +30,4 @@ export * from "./totals/big-number"
|
||||
export * from "./user"
|
||||
|
||||
export const MedusaModuleType = Symbol.for("MedusaModule")
|
||||
export const MedusaModuleProviderType = Symbol.for("MedusaModuleProvider")
|
||||
|
||||
@@ -15,6 +15,7 @@ export * from "./medusa-service"
|
||||
export * from "./migration-scripts"
|
||||
export * from "./mikro-orm-cli-config-builder"
|
||||
export * from "./module"
|
||||
export * from "./module-provider"
|
||||
export * from "./query-context"
|
||||
export * from "./types/links-config"
|
||||
export * from "./types/medusa-service"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { ModuleProviderExports } from "@medusajs/types"
|
||||
|
||||
/**
|
||||
* Wrapper to build the module provider export
|
||||
*
|
||||
* @param serviceName // The name of the module the provider is for
|
||||
* @param services // The array of services that the module provides
|
||||
* @param loaders // The loaders that the module provider provides
|
||||
*/
|
||||
export function ModuleProvider(
|
||||
serviceName: string,
|
||||
{ services, loaders }: ModuleProviderExports
|
||||
): ModuleProviderExports {
|
||||
return {
|
||||
module: serviceName,
|
||||
services,
|
||||
loaders,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user