-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(providers): locking redis (#9544)
- Loading branch information
1 parent
e77a2ff
commit 4a03bdb
Showing
49 changed files
with
1,730 additions
and
449 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
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
11 changes: 11 additions & 0 deletions
11
packages/core/modules-sdk/src/loaders/utils/__fixtures__/module-with-providers/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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ModuleExports } from "@medusajs/types" | ||
import { ModuleService } from "./services/module-service" | ||
import { Module } from "@medusajs/utils" | ||
|
||
const moduleExports: ModuleExports = { | ||
service: ModuleService, | ||
} | ||
|
||
export * from "./services/module-service" | ||
|
||
export default Module("module-with-providers", moduleExports) |
8 changes: 8 additions & 0 deletions
8
...core/modules-sdk/src/loaders/utils/__fixtures__/module-with-providers/provider-1/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ModuleProviderService } from "./services/provider-service" | ||
import { ModuleProvider } from "@medusajs/utils" | ||
|
||
export * from "./services/provider-service" | ||
|
||
export default ModuleProvider("provider-1", { | ||
services: [ModuleProviderService], | ||
}) |
3 changes: 3 additions & 0 deletions
3
.../loaders/utils/__fixtures__/module-with-providers/provider-1/services/provider-service.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,3 @@ | ||
export class ModuleProviderService { | ||
static identifier = "provider-1" | ||
} |
8 changes: 8 additions & 0 deletions
8
...core/modules-sdk/src/loaders/utils/__fixtures__/module-with-providers/provider-2/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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ModuleProvider2Service } from "./services/provider-service" | ||
import { ModuleProvider } from "@medusajs/utils" | ||
|
||
export * from "./services/provider-service" | ||
|
||
export default ModuleProvider("provider-2", { | ||
services: [ModuleProvider2Service], | ||
}) |
1 change: 1 addition & 0 deletions
1
.../loaders/utils/__fixtures__/module-with-providers/provider-2/services/provider-service.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 class ModuleProvider2Service {} |
9 changes: 9 additions & 0 deletions
9
...dules-sdk/src/loaders/utils/__fixtures__/module-with-providers/services/module-service.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,9 @@ | ||
import { InternalModuleDeclaration } from "@medusajs/types" | ||
|
||
export class ModuleService { | ||
constructor( | ||
public container: Record<any, any>, | ||
public moduleOptions: Record<any, any>, | ||
public moduleDeclaration: InternalModuleDeclaration | ||
) {} | ||
} |
Oops, something went wrong.