Procházet zdrojové kódy

chore(feat/v2-ci): updated preview dependencies [automated] (#1198)

* chore(feat/v2-ci): updated preview dependencies [automated]

* fix seed script

---------

Co-authored-by: GitHub <github-actions[bot]@users.noreply.github.com>
Shahed Nasser před 11 měsíci
rodič
revize
63224853f5
2 změnil soubory, kde provedl 387 přidání a 382 odebrání
  1. 40 31
      src/scripts/seed.ts
  2. 347 351
      yarn.lock

+ 40 - 31
src/scripts/seed.ts

@@ -72,10 +72,10 @@ export default async function seedDemoData({ container }: ExecArgs) {
         supported_currencies: [
           {
             currency_code: "eur",
-            is_default: true
+            is_default: true,
           },
           {
-            currency_code: "usd"
+            currency_code: "usd",
           },
         ],
         default_sales_channel_id: defaultSalesChannel[0].id,
@@ -106,6 +106,34 @@ export default async function seedDemoData({ container }: ExecArgs) {
   });
   logger.info("Finished seeding tax regions.");
 
+  logger.info("Seeding stock location data...");
+  const { result: stockLocationResult } = await createStockLocationsWorkflow(
+    container
+  ).run({
+    input: {
+      locations: [
+        {
+          name: "European Warehouse",
+          address: {
+            city: "Copenhagen",
+            country_code: "DK",
+            address_1: "",
+          },
+        },
+      ],
+    },
+  });
+  const stockLocation = stockLocationResult[0];
+
+  await remoteLink.create({
+    [Modules.STOCK_LOCATION]: {
+      stock_location_id: stockLocation.id,
+    },
+    [Modules.FULFILLMENT]: {
+      fulfillment_provider_id: "manual_manual",
+    },
+  });
+
   logger.info("Seeding fulfillment data...");
   const { result: shippingProfileResult } =
     await createShippingProfilesWorkflow(container).run({
@@ -122,7 +150,7 @@ export default async function seedDemoData({ container }: ExecArgs) {
 
   const fulfillmentSet = await fulfillmentModuleService.createFulfillmentSets({
     name: "European Warehouse delivery",
-    type: "delivery",
+    type: "shipping",
     service_zones: [
       {
         name: "Europe",
@@ -160,6 +188,15 @@ export default async function seedDemoData({ container }: ExecArgs) {
     ],
   });
 
+  await remoteLink.create({
+    [Modules.STOCK_LOCATION]: {
+      stock_location_id: stockLocation.id,
+    },
+    [Modules.FULFILLMENT]: {
+      fulfillment_set_id: fulfillmentSet.id,
+    },
+  });
+
   await createShippingOptionsWorkflow(container).run({
     input: [
       {
@@ -242,40 +279,12 @@ export default async function seedDemoData({ container }: ExecArgs) {
   });
   logger.info("Finished seeding fulfillment data.");
 
-  logger.info("Seeding stock location data...");
-  const { result: stockLocationResult } = await createStockLocationsWorkflow(
-    container
-  ).run({
-    input: {
-      locations: [
-        {
-          name: "European Warehouse",
-          address: {
-            city: "Copenhagen",
-            country_code: "DK",
-            address_1: "",
-          },
-        },
-      ],
-    },
-  });
-  const stockLocation = stockLocationResult[0];
-
   await linkSalesChannelsToStockLocationWorkflow(container).run({
     input: {
       id: stockLocation.id,
       add: [defaultSalesChannel[0].id],
     },
   });
-
-  await remoteLink.create({
-    [Modules.STOCK_LOCATION]: {
-      stock_location_id: stockLocation.id,
-    },
-    [Modules.FULFILLMENT]: {
-      fulfillment_set_id: fulfillmentSet.id,
-    },
-  });
   logger.info("Finished seeding stock location data.");
 
   logger.info("Seeding publishable API key data...");

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 347 - 351
yarn.lock


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů