feat(medusa): Modules initializer (#3352)

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

No files matched your search

+27
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",
})
```