fix(product, types): correct path for migration files + fix types on products service module (#4348)
* chore: correct path for migration files * chore: resolve the path for migrations to be picked up * chore: fix types on product service interface * chore: update changeset to reflect type changes * chore: changed changeset to the correct format
This commit is contained in:
1 parent
bf4f5e7147
commit
dc120121c1
3 files changed
+18
-13
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/product": patch
|
||||||
|
"@medusajs/types": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(product, types): correct path for migration files + fix types on product module service interface
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import { MikroORM, PostgreSqlDriver } from "@mikro-orm/postgresql"
|
import { MikroORM, PostgreSqlDriver } from "@mikro-orm/postgresql"
|
||||||
import { ProductServiceInitializeOptions } from "../types"
|
import { ProductServiceInitializeOptions } from "../types"
|
||||||
import { Utils } from "@mikro-orm/core"
|
|
||||||
|
|
||||||
export async function createConnection(
|
export async function createConnection(
|
||||||
database: ProductServiceInitializeOptions["database"],
|
database: ProductServiceInitializeOptions["database"],
|
||||||
@@ -20,7 +19,7 @@ export async function createConnection(
|
|||||||
tsNode: process.env.APP_ENV === "development",
|
tsNode: process.env.APP_ENV === "development",
|
||||||
type: "postgresql",
|
type: "postgresql",
|
||||||
migrations: {
|
migrations: {
|
||||||
path: Utils.detectTsNode() ? "src/migrations" : "dist/migrations",
|
path: __dirname + "/../migrations",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -21,37 +21,37 @@ export interface IProductModuleService<
|
|||||||
TProductCategory = any
|
TProductCategory = any
|
||||||
> {
|
> {
|
||||||
list(
|
list(
|
||||||
filter: FilterableProductProps,
|
filters?: FilterableProductProps,
|
||||||
config?: FindConfig<ProductDTO>,
|
config?: FindConfig<ProductDTO>,
|
||||||
context?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<ProductDTO[]>
|
): Promise<ProductDTO[]>
|
||||||
|
|
||||||
listAndCount(
|
listAndCount(
|
||||||
filter: FilterableProductProps,
|
filters?: FilterableProductProps,
|
||||||
config?: FindConfig<ProductDTO>,
|
config?: FindConfig<ProductDTO>,
|
||||||
context?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<[ProductDTO[], number]>
|
): Promise<[ProductDTO[], number]>
|
||||||
|
|
||||||
listTags(
|
listTags(
|
||||||
filter: FilterableProductTagProps,
|
filters?: FilterableProductTagProps,
|
||||||
config?: FindConfig<ProductTagDTO>,
|
config?: FindConfig<ProductTagDTO>,
|
||||||
context?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<ProductTagDTO[]>
|
): Promise<ProductTagDTO[]>
|
||||||
|
|
||||||
listVariants(
|
listVariants(
|
||||||
filter: FilterableProductVariantProps,
|
filters?: FilterableProductVariantProps,
|
||||||
config?: FindConfig<ProductVariantDTO>,
|
config?: FindConfig<ProductVariantDTO>,
|
||||||
context?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<ProductVariantDTO[]>
|
): Promise<ProductVariantDTO[]>
|
||||||
|
|
||||||
listCollections(
|
listCollections(
|
||||||
filter: FilterableProductCollectionProps,
|
filters?: FilterableProductCollectionProps,
|
||||||
config?: FindConfig<ProductCollectionDTO>,
|
config?: FindConfig<ProductCollectionDTO>,
|
||||||
context?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<ProductCollectionDTO[]>
|
): Promise<ProductCollectionDTO[]>
|
||||||
|
|
||||||
listCategories(
|
listCategories(
|
||||||
filters: FilterableProductCategoryProps,
|
filters?: FilterableProductCategoryProps,
|
||||||
config?: FindConfig<ProductCategoryDTO>,
|
config?: FindConfig<ProductCategoryDTO>,
|
||||||
sharedContext?: SharedContext
|
sharedContext?: SharedContext
|
||||||
): Promise<ProductCategoryDTO[]>
|
): Promise<ProductCategoryDTO[]>
|
||||||
|
|||||||
Reference in new issue
Block a user