chore: Update modules deps (#9286)

This commit is contained in:
Adrien de Peretti
2024-09-26 11:14:35 +05:30
committed by GitHub
parent 11d8264062
commit e096feb7d5
518 changed files with 1115 additions and 957 deletions
@@ -1,4 +1,4 @@
import { EventBusTypes } from "@medusajs/types"
import { EventBusTypes } from "@medusajs/framework/types"
export function buildExpectedEventMessageShape(options: {
eventName: string
@@ -1,4 +1,4 @@
import { CreateFulfillmentDTO } from "@medusajs/types"
import { CreateFulfillmentDTO } from "@medusajs/framework/types"
export function generateCreateFulfillmentData(
data: Partial<CreateFulfillmentDTO> & {
@@ -1,6 +1,6 @@
import { generateCreateShippingOptionsData } from "./shipping-options"
import { generateCreateFulfillmentData } from "./fulfillment"
import { IFulfillmentModuleService } from "@medusajs/types"
import { IFulfillmentModuleService } from "@medusajs/framework/types"
export * from "./shipping-options"
export * from "./fulfillment"
@@ -1,4 +1,4 @@
import { AbstractFulfillmentProviderService } from "@medusajs/utils"
import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils"
export class FulfillmentProviderServiceFixtures extends AbstractFulfillmentProviderService {
static identifier = "fixtures-fulfillment-provider"
@@ -1,4 +1,4 @@
import { CreateShippingOptionDTO } from "@medusajs/types"
import { CreateShippingOptionDTO } from "@medusajs/framework/types"
export function generateCreateShippingOptionsData({
name,
@@ -4,8 +4,12 @@ import {
IFulfillmentModuleService,
ServiceZoneDTO,
UpdateFulfillmentSetDTO,
} from "@medusajs/types"
import { FulfillmentEvents, GeoZoneType, Modules } from "@medusajs/utils"
} from "@medusajs/framework/types"
import {
FulfillmentEvents,
GeoZoneType,
Modules,
} from "@medusajs/framework/utils"
import {
MockEventBusService,
moduleIntegrationTestRunner,
@@ -2,7 +2,7 @@ import { resolve } from "path"
import {
IFulfillmentModuleService,
UpdateFulfillmentDTO,
} from "@medusajs/types"
} from "@medusajs/framework/types"
import {
MockEventBusService,
moduleIntegrationTestRunner,
@@ -12,7 +12,7 @@ import {
generateCreateFulfillmentData,
generateCreateShippingOptionsData,
} from "../../__fixtures__"
import { FulfillmentEvents, Modules } from "@medusajs/utils"
import { FulfillmentEvents, Modules } from "@medusajs/framework/utils"
jest.setTimeout(100000)
@@ -2,8 +2,12 @@ import {
CreateGeoZoneDTO,
IFulfillmentModuleService,
UpdateGeoZoneDTO,
} from "@medusajs/types"
import { FulfillmentEvents, GeoZoneType, Modules } from "@medusajs/utils"
} from "@medusajs/framework/types"
import {
FulfillmentEvents,
GeoZoneType,
Modules,
} from "@medusajs/framework/utils"
import {
MockEventBusService,
moduleIntegrationTestRunner,
@@ -1,6 +1,9 @@
import { ModulesDefinition } from "@medusajs/modules-sdk"
import { FulfillmentSetDTO, IFulfillmentModuleService } from "@medusajs/types"
import { Module, Modules } from "@medusajs/utils"
import { ModulesDefinition } from "@medusajs/framework/modules-sdk"
import {
FulfillmentSetDTO,
IFulfillmentModuleService,
} from "@medusajs/framework/types"
import { Module, Modules } from "@medusajs/framework/utils"
import { FulfillmentModuleService, FulfillmentProviderService } from "@services"
import {
initModules,
@@ -3,8 +3,12 @@ import {
GeoZoneDTO,
IFulfillmentModuleService,
UpdateServiceZoneDTO,
} from "@medusajs/types"
import { FulfillmentEvents, GeoZoneType, Modules } from "@medusajs/utils"
} from "@medusajs/framework/types"
import {
FulfillmentEvents,
GeoZoneType,
Modules,
} from "@medusajs/framework/utils"
import {
MockEventBusService,
moduleIntegrationTestRunner,
@@ -2,8 +2,12 @@ import {
CreateShippingOptionDTO,
IFulfillmentModuleService,
UpdateShippingOptionDTO,
} from "@medusajs/types"
import { FulfillmentEvents, GeoZoneType, Modules } from "@medusajs/utils"
} from "@medusajs/framework/types"
import {
FulfillmentEvents,
GeoZoneType,
Modules,
} from "@medusajs/framework/utils"
import { FulfillmentProviderService } from "@services"
import {
MockEventBusService,
@@ -1,7 +1,7 @@
import {
CreateShippingProfileDTO,
IFulfillmentModuleService,
} from "@medusajs/types"
} from "@medusajs/framework/types"
import {
MockEventBusService,
moduleIntegrationTestRunner,
@@ -10,7 +10,7 @@ import {
buildExpectedEventMessageShape,
generateCreateShippingOptionsData,
} from "../../__fixtures__"
import { FulfillmentEvents, Modules } from "@medusajs/utils"
import { FulfillmentEvents, Modules } from "@medusajs/framework/utils"
import { resolve } from "path"
import { FulfillmentProviderService } from "@services"
import { FulfillmentProviderServiceFixtures } from "../../__fixtures__/providers"
@@ -1,5 +1,5 @@
import * as entities from "./src/models"
import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils"
import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils"
export default defineMikroOrmCliConfig(Modules.FULFILLMENT, {
entities: Object.values(entities),
+2 -5
View File
@@ -37,8 +37,8 @@
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
},
"devDependencies": {
"@medusajs/framework": "^0.0.1",
"@medusajs/fulfillment-manual": "workspace:*",
"@medusajs/types": "^1.11.16",
"@mikro-orm/cli": "5.9.7",
"cross-env": "^5.2.1",
"jest": "^29.7.0",
@@ -48,11 +48,8 @@
"tsc-alias": "^1.8.6",
"typescript": "^5.6.2"
},
"dependencies": {
"@medusajs/modules-sdk": "^1.12.11",
"@medusajs/utils": "^1.11.9"
},
"peerDependencies": {
"@medusajs/framework": "^0.0.1",
"@mikro-orm/core": "5.9.7",
"@mikro-orm/migrations": "5.9.7",
"@mikro-orm/postgresql": "5.9.7",
+1 -1
View File
@@ -1,6 +1,6 @@
import { FulfillmentModuleService } from "@services"
import loadProviders from "./loaders/providers"
import { Module, Modules } from "@medusajs/utils"
import { Module, Modules } from "@medusajs/framework/utils"
export default Module(Modules.FULFILLMENT, {
service: FulfillmentModuleService,
@@ -1,4 +1,4 @@
import { defineJoinerConfig, Modules } from "@medusajs/utils"
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
import {
Fulfillment,
FulfillmentProvider,
@@ -1,10 +1,14 @@
import { moduleProviderLoader } from "@medusajs/modules-sdk"
import { LoaderOptions, ModuleProvider, ModulesSdkTypes } from "@medusajs/types"
import { moduleProviderLoader } from "@medusajs/framework/modules-sdk"
import {
LoaderOptions,
ModuleProvider,
ModulesSdkTypes,
} from "@medusajs/framework/types"
import {
ContainerRegistrationKeys,
lowerCaseFirst,
promiseAll,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { FulfillmentProviderService } from "@services"
import { FulfillmentIdentifiersRegistrationName } from "@types"
import { Lifetime, asFunction, asValue } from "awilix"
@@ -1,8 +1,8 @@
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
createPsqlIndexStatementHelper,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import {
BeforeCreate,
Entity,
@@ -4,9 +4,9 @@ import {
DALUtils,
generateEntityId,
MikroOrmBigNumberProperty,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { BigNumberRawValue, DAL } from "@medusajs/types"
import { BigNumberRawValue, DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Entity,
@@ -2,9 +2,9 @@ import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Entity,
@@ -1,4 +1,4 @@
import { Searchable, generateEntityId } from "@medusajs/utils"
import { Searchable, generateEntityId } from "@medusajs/framework/utils"
import {
BeforeCreate,
Entity,
@@ -2,9 +2,9 @@ import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Cascade,
@@ -2,9 +2,9 @@ import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Cascade,
@@ -3,9 +3,9 @@ import {
DALUtils,
generateEntityId,
GeoZoneType,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Entity,
@@ -2,9 +2,9 @@ import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Cascade,
@@ -1,10 +1,10 @@
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
RuleOperator,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import {
BeforeCreate,
Entity,
@@ -2,9 +2,9 @@ import {
createPsqlIndexStatementHelper,
DALUtils,
generateEntityId,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Entity,
@@ -4,9 +4,9 @@ import {
generateEntityId,
Searchable,
ShippingOptionPriceType,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Cascade,
@@ -3,9 +3,9 @@ import {
DALUtils,
generateEntityId,
Searchable,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import { DAL } from "@medusajs/types"
import { DAL } from "@medusajs/framework/types"
import {
BeforeCreate,
Collection,
@@ -1,6 +1,6 @@
/*
import { Context, FulfillmentTypes } from "@medusajs/types"
import { DALUtils, promiseAll } from "@medusajs/utils"
import { Context, FulfillmentTypes } from "@medusajs/framework/types"
import { DALUtils, promiseAll } from "@medusajs/framework/utils"
import { FulfillmentSet, ServiceZone } from "@models"
import { SqlEntityManager } from "@mikro-orm/postgresql"
@@ -1 +1 @@
export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils"
export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils"
@@ -13,7 +13,7 @@ import {
SoftDeleteReturn,
UpdateFulfillmentSetDTO,
UpdateServiceZoneDTO,
} from "@medusajs/types"
} from "@medusajs/framework/types"
import {
arrayDifference,
deepEqualObj,
@@ -28,7 +28,7 @@ import {
MedusaError,
ModulesSdkUtils,
promiseAll,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
import {
Fulfillment,
FulfillmentProvider,
@@ -3,8 +3,12 @@ import {
DAL,
FulfillmentTypes,
IFulfillmentProvider,
} from "@medusajs/types"
import { MedusaError, ModulesSdkUtils, promiseAll } from "@medusajs/utils"
} from "@medusajs/framework/types"
import {
MedusaError,
ModulesSdkUtils,
promiseAll,
} from "@medusajs/framework/utils"
import { FulfillmentProvider } from "@models"
type InjectedDependencies = {
@@ -3,7 +3,7 @@ import {
Logger,
ModuleProviderExports,
ModuleServiceInitializeOptions,
} from "@medusajs/types"
} from "@medusajs/framework/types"
export type InitializeModuleInjectableDependencies = {
logger?: Logger
@@ -1,4 +1,4 @@
import { FulfillmentTypes } from "@medusajs/types"
import { FulfillmentTypes } from "@medusajs/framework/types"
export type UpdateShippingOptionsInput = Required<
Pick<FulfillmentTypes.UpdateShippingOptionDTO, "id">
@@ -1,4 +1,4 @@
import { RuleOperator } from "@medusajs/utils"
import { RuleOperator } from "@medusajs/framework/utils"
import { isContextValid } from "../utils"
describe("isContextValidForRules", () => {
@@ -7,13 +7,13 @@ import {
ShippingOptionRule,
ShippingOptionType,
} from "@models"
import { Context } from "@medusajs/types"
import { Context } from "@medusajs/framework/types"
import {
CommonEvents,
FulfillmentEvents,
moduleEventBuilderFactory,
Modules,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
export const eventBuilders = {
createdFulfillment: moduleEventBuilderFactory({
@@ -4,7 +4,7 @@ import {
MedusaError,
pickValueFromObject,
RuleOperator,
} from "@medusajs/utils"
} from "@medusajs/framework/utils"
/**
* The rule engine here is kept inside the module as of now, but it could be moved