chore: Update modules deps (#9286)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CampaignBudgetType } from "@medusajs/utils"
|
||||
import { CampaignBudgetType } from "@medusajs/framework/utils"
|
||||
|
||||
export const defaultCampaignsData = [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CreateCampaignDTO } from "@medusajs/types"
|
||||
import { CreateCampaignDTO } from "@medusajs/framework/types"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { Campaign } from "@models"
|
||||
import { defaultCampaignsData } from "./data"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CreatePromotionDTO } from "@medusajs/types"
|
||||
import { PromotionType } from "@medusajs/utils"
|
||||
import { CreatePromotionDTO } from "@medusajs/framework/types"
|
||||
import { PromotionType } from "@medusajs/framework/utils"
|
||||
|
||||
export const defaultPromotionsData: CreatePromotionDTO[] = [
|
||||
{
|
||||
|
||||
@@ -2,8 +2,8 @@ import {
|
||||
CreatePromotionDTO,
|
||||
IPromotionModuleService,
|
||||
PromotionDTO,
|
||||
} from "@medusajs/types"
|
||||
import { isPresent } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import { isPresent } from "@medusajs/framework/utils"
|
||||
import { SqlEntityManager } from "@mikro-orm/postgresql"
|
||||
import { Promotion } from "@models"
|
||||
import { defaultPromotionsData } from "./data"
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { CampaignBudgetType } from "../../../../../../core/utils/src/promotion/index"
|
||||
import { createCampaigns } from "../../../__fixtures__/campaigns"
|
||||
|
||||
+6
-2
@@ -1,5 +1,9 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { ApplicationMethodType, Modules, PromotionType } from "@medusajs/utils"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodType,
|
||||
Modules,
|
||||
PromotionType,
|
||||
} from "@medusajs/framework/utils"
|
||||
import { moduleIntegrationTestRunner, SuiteOptions } from "medusa-test-utils"
|
||||
import { createCampaigns } from "../../../__fixtures__/campaigns"
|
||||
import { createDefaultPromotion } from "../../../__fixtures__/promotion"
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodType,
|
||||
CampaignBudgetType,
|
||||
Module,
|
||||
Modules,
|
||||
PromotionType,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { PromotionModuleService } from "@services"
|
||||
import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { createCampaigns } from "../../../__fixtures__/campaigns"
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import { moduleIntegrationTestRunner, SuiteOptions } from "medusa-test-utils"
|
||||
import { createCampaigns } from "../../../__fixtures__/campaigns"
|
||||
import { createDefaultPromotion } from "../../../__fixtures__/promotion"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
|
||||
jest.setTimeout(30000)
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { IPromotionModuleService } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
import { IPromotionModuleService } from "@medusajs/framework/types"
|
||||
import { Modules } from "@medusajs/framework/utils"
|
||||
import { moduleIntegrationTestRunner, SuiteOptions } from "medusa-test-utils"
|
||||
import { createCampaigns } from "../../../__fixtures__/campaigns"
|
||||
import { createDefaultPromotion } from "../../../__fixtures__/promotion"
|
||||
|
||||
@@ -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.PRODUCT, {
|
||||
entities: Object.values(entities),
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@medusajs/types": "^1.11.16",
|
||||
"@medusajs/framework": "^0.0.1",
|
||||
"@mikro-orm/cli": "5.9.7",
|
||||
"cross-env": "^5.2.1",
|
||||
"jest": "^29.7.0",
|
||||
@@ -48,10 +48,8 @@
|
||||
"tsc-alias": "^1.8.6",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@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,4 +1,4 @@
|
||||
import { Module, Modules } from "@medusajs/utils"
|
||||
import { Module, Modules } from "@medusajs/framework/utils"
|
||||
import { PromotionModuleService } from "@services"
|
||||
|
||||
export default Module(Modules.PROMOTION, {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
||||
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils"
|
||||
import { Campaign, Promotion, PromotionRule } from "@models"
|
||||
import { default as schema } from "./schema"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
ApplicationMethodTargetTypeValues,
|
||||
ApplicationMethodTypeValues,
|
||||
BigNumberRawValue,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
BigNumber,
|
||||
DALUtils,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
PromotionUtils,
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Collection,
|
||||
|
||||
@@ -2,14 +2,14 @@ import {
|
||||
BigNumberRawValue,
|
||||
CampaignBudgetTypeValues,
|
||||
DAL,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
BigNumber,
|
||||
DALUtils,
|
||||
MikroOrmBigNumberProperty,
|
||||
PromotionUtils,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Entity,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DAL } from "@medusajs/types"
|
||||
import { DAL } from "@medusajs/framework/types"
|
||||
import {
|
||||
DALUtils,
|
||||
Searchable,
|
||||
createPsqlIndexStatementHelper,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Collection,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DALUtils, generateEntityId } from "@medusajs/utils"
|
||||
import { DALUtils, generateEntityId } from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Entity,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { DAL, PromotionRuleOperatorValues } from "@medusajs/types"
|
||||
import { DALUtils, PromotionUtils, generateEntityId } from "@medusajs/utils"
|
||||
import { DAL, PromotionRuleOperatorValues } from "@medusajs/framework/types"
|
||||
import {
|
||||
DALUtils,
|
||||
PromotionUtils,
|
||||
generateEntityId,
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Cascade,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { DAL, PromotionTypeValues } from "@medusajs/types"
|
||||
import { DAL, PromotionTypeValues } from "@medusajs/framework/types"
|
||||
import {
|
||||
DALUtils,
|
||||
PromotionUtils,
|
||||
Searchable,
|
||||
generateEntityId,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
BeforeCreate,
|
||||
Collection,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ModuleJoinerConfig,
|
||||
ModulesSdkTypes,
|
||||
PromotionTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodAllocation,
|
||||
ApplicationMethodTargetType,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
MedusaService,
|
||||
PromotionType,
|
||||
transformPropertiesToBigNumber,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import {
|
||||
ApplicationMethod,
|
||||
Campaign,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ApplicationMethodTypeValues,
|
||||
BigNumberInput,
|
||||
PromotionDTO,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
|
||||
import { Promotion } from "@models"
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { BigNumberInput, CampaignBudgetTypeValues } from "@medusajs/types"
|
||||
import {
|
||||
BigNumberInput,
|
||||
CampaignBudgetTypeValues,
|
||||
} from "@medusajs/framework/types"
|
||||
import { Campaign } from "@models"
|
||||
|
||||
export interface CreateCampaignBudgetDTO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PromotionDTO } from "@medusajs/types"
|
||||
import { PromotionDTO } from "@medusajs/framework/types"
|
||||
import { Promotion } from "@models"
|
||||
|
||||
export interface CreateCampaignDTO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Logger } from "@medusajs/types"
|
||||
import { Logger } from "@medusajs/framework/types"
|
||||
|
||||
export type InitializeModuleInjectableDependencies = {
|
||||
logger?: Logger
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PromotionRuleDTO } from "@medusajs/types"
|
||||
import { PromotionRuleDTO } from "@medusajs/framework/types"
|
||||
import { PromotionRule } from "@models"
|
||||
|
||||
export interface CreatePromotionRuleValueDTO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PromotionRuleOperatorValues } from "@medusajs/types"
|
||||
import { PromotionRuleOperatorValues } from "@medusajs/framework/types"
|
||||
|
||||
export interface CreatePromotionRuleDTO {
|
||||
description?: string | null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PromotionTypeValues } from "@medusajs/types"
|
||||
import { PromotionTypeValues } from "@medusajs/framework/types"
|
||||
|
||||
export interface CreatePromotionDTO {
|
||||
code: string
|
||||
|
||||
@@ -2,14 +2,14 @@ import {
|
||||
BigNumberInput,
|
||||
ComputeActionItemLine,
|
||||
PromotionTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodTargetType,
|
||||
ComputedActions,
|
||||
MathBN,
|
||||
MedusaError,
|
||||
PromotionType,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { areRulesValidForContext } from "../validations"
|
||||
import { computeActionForBudgetExceeded } from "./usage"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ApplicationMethodAllocationValues,
|
||||
BigNumberInput,
|
||||
PromotionTypes,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodAllocation,
|
||||
ApplicationMethodTargetType,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
MedusaError,
|
||||
ApplicationMethodTargetType as TargetType,
|
||||
calculateAdjustmentAmountFromPromotion,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { areRulesValidForContext } from "../validations"
|
||||
import { computeActionForBudgetExceeded } from "./usage"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BigNumberInput, PromotionTypes } from "@medusajs/types"
|
||||
import { BigNumberInput, PromotionTypes } from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodAllocation,
|
||||
ApplicationMethodTargetType,
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ComputedActions,
|
||||
MathBN,
|
||||
MedusaError,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { areRulesValidForContext } from "../validations"
|
||||
import { computeActionForBudgetExceeded } from "./usage"
|
||||
|
||||
|
||||
@@ -2,8 +2,12 @@ import {
|
||||
BigNumberInput,
|
||||
CampaignBudgetExceededAction,
|
||||
PromotionDTO,
|
||||
} from "@medusajs/types"
|
||||
import { CampaignBudgetType, ComputedActions, MathBN } from "@medusajs/utils"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
CampaignBudgetType,
|
||||
ComputedActions,
|
||||
MathBN,
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
export function computeActionForBudgetExceeded(
|
||||
promotion: PromotionDTO,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
MathBN,
|
||||
MedusaError,
|
||||
PromotionType,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { Promotion } from "@models"
|
||||
import { CreateApplicationMethodDTO, UpdateApplicationMethodDTO } from "@types"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
ApplicationMethodTargetTypeValues,
|
||||
PromotionRuleDTO,
|
||||
PromotionRuleOperatorValues,
|
||||
} from "@medusajs/types"
|
||||
} from "@medusajs/framework/types"
|
||||
import {
|
||||
ApplicationMethodTargetType,
|
||||
MedusaError,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
isPresent,
|
||||
isString,
|
||||
pickValueFromObject,
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
import { CreatePromotionRuleDTO } from "@types"
|
||||
|
||||
export function validatePromotionRuleAttributes(
|
||||
|
||||
Reference in New Issue
Block a user