chore(): Allow to register modules through array (#9522)
This commit is contained in:
committed by
GitHub
parent
9c73503084
commit
1d8939df3a
@@ -144,18 +144,18 @@ medusaIntegrationTestRunner({
|
||||
|
||||
await remoteLink.create([
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: product.variants[0].id,
|
||||
},
|
||||
Pricing: {
|
||||
[Modules.PRICING]: {
|
||||
price_set_id: priceSet.id,
|
||||
},
|
||||
},
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: product.variants[1].id,
|
||||
},
|
||||
Pricing: {
|
||||
[Modules.PRICING]: {
|
||||
price_set_id: priceSetTwo.id,
|
||||
},
|
||||
},
|
||||
@@ -232,8 +232,8 @@ medusaIntegrationTestRunner({
|
||||
|
||||
await remoteLink.create([
|
||||
{
|
||||
Product: { variant_id: product.variants[0].id },
|
||||
Pricing: { price_set_id: priceSet.id },
|
||||
[Modules.PRODUCT]: { variant_id: product.variants[0].id },
|
||||
[Modules.PRICING]: { price_set_id: priceSet.id },
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1080,10 +1080,10 @@ medusaIntegrationTestRunner({
|
||||
|
||||
await remoteLink.create([
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: productWithDefaultTax.variants[0].id,
|
||||
},
|
||||
Pricing: { price_set_id: priceSetDefaultTax.id },
|
||||
[Modules.PRICING]: { price_set_id: priceSetDefaultTax.id },
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1212,10 +1212,10 @@ medusaIntegrationTestRunner({
|
||||
|
||||
await remoteLink.create([
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: productWithDefaultTax.variants[0].id,
|
||||
},
|
||||
Pricing: { price_set_id: priceSetDefaultTax.id },
|
||||
[Modules.PRICING]: { price_set_id: priceSetDefaultTax.id },
|
||||
},
|
||||
])
|
||||
|
||||
@@ -2104,16 +2104,16 @@ medusaIntegrationTestRunner({
|
||||
|
||||
await remoteLink.create([
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: productWithSpecialTax.variants[0].id,
|
||||
},
|
||||
Pricing: { price_set_id: priceSet.id },
|
||||
[Modules.PRICING]: { price_set_id: priceSet.id },
|
||||
},
|
||||
{
|
||||
Product: {
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: productWithDefaultTax.variants[0].id,
|
||||
},
|
||||
Pricing: { price_set_id: priceSetDefaultTax.id },
|
||||
[Modules.PRICING]: { price_set_id: priceSetDefaultTax.id },
|
||||
},
|
||||
{
|
||||
[Modules.CART]: { cart_id: cart.id },
|
||||
|
||||
@@ -42,7 +42,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKeys: ["id", "currency_code", "region_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
@@ -53,7 +53,7 @@ medusaIntegrationTestRunner({
|
||||
deleteCascade: false,
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
@@ -66,7 +66,7 @@ medusaIntegrationTestRunner({
|
||||
],
|
||||
extends: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
fieldAlias: {
|
||||
region: {
|
||||
path: "region_link.region",
|
||||
@@ -84,7 +84,7 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
path: "currency_link.currency",
|
||||
@@ -139,7 +139,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKeys: ["id", "product_variant_id", "region_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: "Product",
|
||||
serviceName: "product",
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "product_variant_id",
|
||||
@@ -150,7 +150,7 @@ medusaIntegrationTestRunner({
|
||||
deleteCascade: false,
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
@@ -163,7 +163,7 @@ medusaIntegrationTestRunner({
|
||||
],
|
||||
extends: [
|
||||
{
|
||||
serviceName: "Product",
|
||||
serviceName: "product",
|
||||
fieldAlias: {
|
||||
region: {
|
||||
path: "region_link.region",
|
||||
@@ -181,7 +181,7 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
fieldAlias: {
|
||||
product_variant: {
|
||||
path: "product_variant_link.product_variant",
|
||||
@@ -241,7 +241,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKeys: ["id", "currency_code", "region_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
@@ -252,7 +252,7 @@ medusaIntegrationTestRunner({
|
||||
deleteCascade: true,
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
@@ -265,7 +265,7 @@ medusaIntegrationTestRunner({
|
||||
],
|
||||
extends: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
fieldAlias: {
|
||||
region: {
|
||||
path: "region_link.region",
|
||||
@@ -283,7 +283,7 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
path: "currency_link.currency",
|
||||
@@ -337,7 +337,7 @@ medusaIntegrationTestRunner({
|
||||
primaryKeys: ["id", "currency_code", "region_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "currency_code",
|
||||
@@ -348,7 +348,7 @@ medusaIntegrationTestRunner({
|
||||
deleteCascade: false,
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
@@ -361,7 +361,7 @@ medusaIntegrationTestRunner({
|
||||
],
|
||||
extends: [
|
||||
{
|
||||
serviceName: "Currency",
|
||||
serviceName: "currency",
|
||||
fieldAlias: {
|
||||
regions: {
|
||||
path: "region_link.region",
|
||||
@@ -379,7 +379,7 @@ medusaIntegrationTestRunner({
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: "Region",
|
||||
serviceName: "region",
|
||||
fieldAlias: {
|
||||
currency: {
|
||||
path: "currency_link.currency",
|
||||
|
||||
Reference in New Issue
Block a user