feat(medusa): Modules initializer (#3352)

This commit is contained in:
Carlos R. L. Rodrigues
2023-03-17 12:18:52 -03:00
committed by GitHub
parent 8a7421db5b
commit aa690beed7
51 changed files with 1290 additions and 715 deletions

View File

@@ -0,0 +1,27 @@
---
"@medusajs/inventory": patch
"medusa-core-utils": patch
"@medusajs/medusa": patch
---
feat(medusa): Modules initializer
### Loading modules in a project
Example
``` typescript
import { InventoryServiceInitializeOptions, initialize } from "@medusajs/inventory"
const options: InventoryServiceInitializeOptions = {
database: {
type: "postgres",
url: DB_URL,
},
}
const inventoryService = await initialize(options)
const newInventoryItem = await inventoryService.createInventoryItem({
sku: "sku_123",
})
```