feat: Flatten the provider config for all modules (#7930)

This commit is contained in:
Stevche Radevski
2024-07-03 16:57:12 +02:00
committed by GitHub
parent b6e4435c23
commit 012a624ee4
24 changed files with 168 additions and 292 deletions
+6 -21
View File
@@ -14,20 +14,12 @@ const customPaymentProvider = {
resolve: {
services: [require("@medusajs/payment/dist/providers/system").default],
},
options: {
config: {
default_2: {},
},
},
id: "default_2",
}
const customFulfillmentProvider = {
resolve: "@medusajs/fulfillment-manual",
options: {
config: {
"test-provider": {},
},
},
id: "test-provider",
}
module.exports = {
@@ -74,11 +66,7 @@ module.exports = {
providers: [
{
resolve: "@medusajs/file-local-next",
options: {
config: {
local: {},
},
},
id: "local",
},
],
},
@@ -116,13 +104,10 @@ module.exports = {
providers: [
{
resolve: "@medusajs/notification-local",
id: "local-notification-provider",
options: {
config: {
"local-notification-provider": {
name: "Local Notification Provider",
channels: ["log", "email"],
},
},
name: "Local Notification Provider",
channels: ["log", "email"],
},
},
],
+4 -9
View File
@@ -12,11 +12,7 @@ process.env.LOG_LEVEL = "error"
const customFulfillmentProvider = {
resolve: "@medusajs/fulfillment-manual",
options: {
config: {
"test-provider": {},
},
},
id: "test-provider",
}
module.exports = defineConfig({
@@ -41,11 +37,10 @@ module.exports = defineConfig({
providers: [
{
resolve: "@medusajs/file-local-next",
id: "local",
options: {
config: {
// This is the directory where we can reliably write in CI environments
local: { upload_dir: path.join(os.tmpdir(), "uploads") },
},
// This is the directory where we can reliably write in CI environments
upload_dir: path.join(os.tmpdir(), "uploads"),
},
},
],
+5 -16
View File
@@ -14,20 +14,12 @@ const customPaymentProvider = {
resolve: {
services: [require("@medusajs/payment/dist/providers/system").default],
},
options: {
config: {
default_2: {},
},
},
id: "default_2",
}
const customFulfillmentProvider = {
resolve: "@medusajs/fulfillment-manual",
options: {
config: {
"test-provider": {},
},
},
id: "test-provider",
}
module.exports = {
@@ -101,13 +93,10 @@ module.exports = {
providers: [
{
resolve: "@medusajs/notification-local",
id: "local-notification-provider",
options: {
config: {
"local-notification-provider": {
name: "Local Notification Provider",
channels: ["log", "email"],
},
},
name: "Local Notification Provider",
channels: ["log", "email"],
},
},
],