docs: add documentation for migration generate cli tool (#8128)

* docs: add documentation for migration generate cli tool

* changed migrations details in marketplace recipe

* added generated oas files to action

* vale + lint fixes

* don't import from src in medusa-config.js

* fix generate command in recipe

* fix module name
This commit is contained in:
Shahed Nasser
2024-07-15 17:46:10 +02:00
committed by GitHub
parent 43eb38c8cb
commit a74c900ab1
19 changed files with 270 additions and 229 deletions
@@ -40,10 +40,10 @@ The first step in the workflow receives the products ID and the data to updat
Create the file `src/workflows/update-product-erp/steps/update-product.ts` with the following content:
export const updateProductHighlights = [
["13", "resolve", "Resolve the `ProductService` from the Medusa container."],
["16", "previousProductData", "Retrieve the `previousProductData` to pass it to the compensation function."],
["19", "updateProducts", "Update the product."],
["39", "updateProducts", "Revert the products data using the `previousProductData` passed from the step to the compensation function."]
["10", "resolve", "Resolve the `ProductService` from the Medusa container."],
["13", "previousProductData", "Retrieve the `previousProductData` to pass it to the compensation function."],
["16", "updateProducts", "Update the product."],
["30", "updateProducts", "Revert the products data using the `previousProductData` passed from the step to the compensation function."]
]
```ts title="src/workflows/update-product-erp/steps/update-product.ts" highlights={updateProductHighlights} collapsibleLines="1-9" expandButtonLabel="Show Imports"
@@ -130,22 +130,22 @@ Create the file `src/workflows/update-product-erp/steps/update-erp.ts` with the
export const updateErpHighlights = [
[
"12",
"9",
"resolve",
"Resolve the `erpModuleService` from the Medusa container.",
],
[
"17",
"14",
"previousErpData",
"Retrieve the `previousErpData` to pass it to the compensation function.",
],
[
"21",
"16",
"updateProductErpData",
"Update the products ERP data and return the data from the ERP system.",
],
[
"37",
"31",
"updateProductErpData",
"Revert the product's data in the ERP system to its previous state using the `previousErpData`.",
],
@@ -27,7 +27,7 @@ export const highlights = [
```ts highlights={highlights}
import {
createWorkflow,
when
when,
} from "@medusajs/workflows-sdk"
// step imports...
@@ -127,7 +127,7 @@ const step1 = createStep(
// ...
return new StepResponse({
myMap
myMap,
})
}
)
@@ -146,7 +146,7 @@ const step1 = createStep(
// ...
return new StepResponse({
myObj
myObj,
})
}
)