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
@@ -22,17 +22,21 @@ Similarly to your custom module, a commerce module's main service is registered
For example, you saw this code snippet in the [Medusa container chapter](../medusa-container/page.mdx):
```ts highlights={[["13"]]}
```ts highlights={[["10"]]}
import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import { IProductModuleService } from "@medusajs/types"
import { ModuleRegistrationName } from "@medusajs/utils"
export const GET = async (req: MedusaRequest, res: MedusaResponse) => {
export const GET = async (
req: MedusaRequest,
res: MedusaResponse
) => {
const productModuleService: IProductModuleService = req.scope.resolve(
ModuleRegistrationName.PRODUCT
)
const [, count] = await productModuleService.listAndCount()
const [, count] = await productModuleService
.listAndCountProducts()
res.json({
count,