From e096feb7d5b0a47c1955138958b42d59697f05bb Mon Sep 17 00:00:00 2001 From: Adrien de Peretti Date: Thu, 26 Sep 2024 07:44:35 +0200 Subject: [PATCH] chore: Update modules deps (#9286) --- .eslintrc.js | 2 +- packages/core/framework/package.json | 5 +- .../core/framework/src/modules-sdk/index.ts | 1 + packages/medusa-telemetry/package.json | 2 +- packages/medusa-telemetry/tsconfig.json | 4 +- .../integration-tests/__fixtures__/index.ts | 2 +- .../__tests__/api-key-module-service.spec.ts | 4 +- .../modules/api-key/mikro-orm.config.dev.ts | 2 +- packages/modules/api-key/package.json | 6 +- packages/modules/api-key/src/index.ts | 2 +- packages/modules/api-key/src/joiner-config.ts | 2 +- .../modules/api-key/src/models/api-key.ts | 2 +- .../src/services/api-key-module-service.ts | 4 +- packages/modules/api-key/src/types/index.ts | 2 +- .../__fixtures__/auth-identity/index.ts | 2 +- .../providers/default-provider.ts | 7 +- .../auth-module-service/auth-identity.spec.ts | 4 +- .../auth-module-service/index.spec.ts | 4 +- packages/modules/auth/mikro-orm.config.dev.ts | 2 +- packages/modules/auth/package.json | 5 +- packages/modules/auth/src/index.ts | 2 +- packages/modules/auth/src/joiner-config.ts | 2 +- .../modules/auth/src/loaders/providers.ts | 8 +- .../modules/auth/src/models/auth-identity.ts | 2 +- .../auth/src/models/provider-identity.ts | 2 +- .../modules/auth/src/services/auth-module.ts | 4 +- .../auth/src/services/auth-provider.ts | 6 +- packages/modules/auth/src/types/index.ts | 6 +- packages/modules/cache-inmemory/package.json | 7 +- packages/modules/cache-inmemory/src/index.ts | 2 +- .../cache-inmemory/src/initialize/index.ts | 8 +- .../src/services/inmemory-cache.ts | 2 +- packages/modules/cache-redis/package.json | 5 +- packages/modules/cache-redis/src/index.ts | 2 +- .../cache-redis/src/initialize/index.ts | 6 +- .../modules/cache-redis/src/loaders/index.ts | 2 +- .../cache-redis/src/services/redis-cache.ts | 2 +- .../__fixtures__/cart/index.ts | 2 +- .../services/cart-module/index.spec.ts | 4 +- packages/modules/cart/mikro-orm.config.dev.ts | 2 +- packages/modules/cart/package.json | 5 +- packages/modules/cart/src/index.ts | 2 +- packages/modules/cart/src/models/address.ts | 4 +- .../cart/src/models/adjustment-line.ts | 4 +- packages/modules/cart/src/models/cart.ts | 4 +- .../cart/src/models/line-item-adjustment.ts | 2 +- .../cart/src/models/line-item-tax-line.ts | 2 +- packages/modules/cart/src/models/line-item.ts | 4 +- .../src/models/shipping-method-adjustment.ts | 2 +- .../src/models/shipping-method-tax-line.ts | 2 +- .../cart/src/models/shipping-method.ts | 4 +- packages/modules/cart/src/models/tax-line.ts | 2 +- .../modules/cart/src/services/cart-module.ts | 4 +- packages/modules/cart/src/types/index.ts | 2 +- .../cart/src/types/line-item-adjustment.ts | 2 +- packages/modules/cart/src/types/line-item.ts | 2 +- .../src/types/shipping-method-adjustment.ts | 2 +- .../modules/cart/src/types/shipping-method.ts | 2 +- .../__tests__/currency-module-service.spec.ts | 4 +- .../modules/currency/mikro-orm.config.dev.ts | 2 +- packages/modules/currency/package.json | 6 +- packages/modules/currency/src/index.ts | 2 +- .../currency/src/loaders/initial-data.ts | 11 +- .../modules/currency/src/models/currency.ts | 2 +- .../src/services/currency-module-service.ts | 4 +- packages/modules/currency/src/types/index.ts | 2 +- .../services/customer-module/index.spec.ts | 4 +- .../modules/customer/mikro-orm.config.dev.ts | 2 +- packages/modules/customer/package.json | 6 +- packages/modules/customer/src/index.ts | 2 +- .../modules/customer/src/joiner-config.ts | 2 +- .../modules/customer/src/models/address.ts | 4 +- .../src/models/customer-group-customer.ts | 4 +- .../customer/src/models/customer-group.ts | 4 +- .../modules/customer/src/models/customer.ts | 4 +- .../customer/src/services/customer-module.ts | 4 +- packages/modules/customer/src/types/index.ts | 2 +- packages/modules/event-bus-local/package.json | 7 +- packages/modules/event-bus-local/src/index.ts | 2 +- .../event-bus-local/src/initialize/index.ts | 6 +- .../event-bus-local/src/loaders/index.ts | 2 +- .../src/services/event-bus-local.ts | 4 +- packages/modules/event-bus-redis/package.json | 5 +- packages/modules/event-bus-redis/src/index.ts | 2 +- .../event-bus-redis/src/initialize/index.ts | 6 +- .../event-bus-redis/src/loaders/index.ts | 2 +- .../src/services/__tests__/event-bus.ts | 2 +- .../src/services/event-bus-redis.ts | 4 +- .../providers/default-provider.ts | 4 +- .../__tests__/module.spec.ts | 4 +- packages/modules/file/package.json | 7 +- packages/modules/file/src/index.ts | 2 +- packages/modules/file/src/joiner-config.ts | 2 +- .../modules/file/src/loaders/providers.ts | 8 +- .../file/src/services/file-module-service.ts | 4 +- .../src/services/file-provider-service.ts | 4 +- packages/modules/file/src/types/index.ts | 2 +- .../integration-tests/__fixtures__/events.ts | 2 +- .../__fixtures__/fulfillment.ts | 2 +- .../integration-tests/__fixtures__/index.ts | 2 +- .../providers/default-provider.ts | 2 +- .../__fixtures__/shipping-options.ts | 2 +- .../fulfillment-set.spec.ts | 8 +- .../fulfillment.spec.ts | 4 +- .../geo-zone.spec.ts | 8 +- .../fulfillment-module-service/index.spec.ts | 9 +- .../service-zone.spec.ts | 8 +- .../shipping-option.spec.ts | 8 +- .../shipping-profile.spec.ts | 4 +- .../fulfillment/mikro-orm.config.dev.ts | 2 +- packages/modules/fulfillment/package.json | 7 +- packages/modules/fulfillment/src/index.ts | 2 +- .../modules/fulfillment/src/joiner-config.ts | 2 +- .../fulfillment/src/loaders/providers.ts | 10 +- .../modules/fulfillment/src/models/address.ts | 4 +- .../src/models/fulfillment-item.ts | 4 +- .../src/models/fulfillment-label.ts | 4 +- .../src/models/fulfillment-provider.ts | 2 +- .../fulfillment/src/models/fulfillment-set.ts | 4 +- .../fulfillment/src/models/fulfillment.ts | 4 +- .../fulfillment/src/models/geo-zone.ts | 4 +- .../fulfillment/src/models/service-zone.ts | 4 +- .../src/models/shipping-option-rule.ts | 4 +- .../src/models/shipping-option-type.ts | 4 +- .../fulfillment/src/models/shipping-option.ts | 4 +- .../src/models/shipping-profile.ts | 4 +- .../src/repositories/fulfillment-set.ts | 4 +- .../fulfillment/src/repositories/index.ts | 2 +- .../services/fulfillment-module-service.ts | 4 +- .../src/services/fulfillment-provider.ts | 8 +- .../modules/fulfillment/src/types/index.ts | 2 +- .../modules/fulfillment/src/types/service.ts | 2 +- .../src/utils/__tests__/utils.spec.ts | 2 +- .../modules/fulfillment/src/utils/events.ts | 4 +- .../modules/fulfillment/src/utils/utils.ts | 2 +- .../__fixtures__/event-bus.ts | 2 +- .../__tests__/index-engine-module.spec.ts | 6 +- .../__tests__/query-builder.spec.ts | 7 +- .../modules/index/mikro-orm.config.dev.ts | 2 +- packages/modules/index/package.json | 6 +- packages/modules/index/src/index.ts | 2 +- packages/modules/index/src/loaders/index.ts | 4 +- .../src/services/index-module-service.ts | 4 +- .../index/src/services/postgres-provider.ts | 4 +- .../modules/index/src/utils/build-config.ts | 6 +- .../index/src/utils/create-partitions.ts | 2 +- .../modules/index/src/utils/gql-to-types.ts | 7 +- .../src/utils/normalize-fields-selection.ts | 2 +- .../modules/index/src/utils/query-builder.ts | 4 +- .../inventory-module-service.spec.ts | 4 +- .../inventory-next/mikro-orm.config.dev.ts | 2 +- packages/modules/inventory-next/package.json | 6 +- packages/modules/inventory-next/src/index.ts | 2 +- .../inventory-next/src/joiner-config.ts | 2 +- .../src/models/inventory-item.ts | 4 +- .../src/models/inventory-level.ts | 6 +- .../src/models/reservation-item.ts | 4 +- .../inventory-next/src/repositories/index.ts | 2 +- .../src/repositories/inventory-level.ts | 4 +- .../src/services/inventory-level.ts | 4 +- .../src/services/inventory-module.ts | 6 +- .../__fixtures__/migrations.ts | 2 +- .../__tests__/migrations.spec.ts | 6 +- packages/modules/link-modules/package.json | 7 +- .../definitions/cart-payment-collection.ts | 4 +- .../src/definitions/cart-promotion.ts | 4 +- .../fulfillment-provider-location.ts | 4 +- .../definitions/fulfillment-set-location.ts | 4 +- .../src/definitions/order-cart.ts | 4 +- .../order-claim-payment-collection.ts | 4 +- .../order-exchange-payment-collection.ts | 4 +- .../src/definitions/order-fulfillment.ts | 4 +- .../definitions/order-payment-collection.ts | 4 +- .../src/definitions/order-promotion.ts | 4 +- .../definitions/order-return-fulfillment.ts | 4 +- .../src/definitions/product-sales-channel.ts | 4 +- .../product-variant-inventory-item.ts | 4 +- .../definitions/product-variant-price-set.ts | 4 +- .../publishable-api-key-sales-channel.ts | 4 +- .../src/definitions/readonly/cart-customer.ts | 4 +- .../src/definitions/readonly/cart-product.ts | 4 +- .../src/definitions/readonly/cart-region.ts | 4 +- .../readonly/cart-sales-channel.ts | 4 +- .../inventory-level-stock-location.ts | 4 +- .../line-item-adjustment-promotion.ts | 4 +- .../definitions/readonly/order-customer.ts | 4 +- .../src/definitions/readonly/order-product.ts | 4 +- .../src/definitions/readonly/order-region.ts | 4 +- .../readonly/order-sales-channel.ts | 4 +- .../definitions/readonly/store-currency.ts | 4 +- .../definitions/region-payment-provider.ts | 4 +- .../src/definitions/sales-channel-location.ts | 4 +- .../definitions/shipping-option-price-set.ts | 4 +- .../link-modules/src/initialize/index.ts | 6 +- .../src/initialize/module-definition.ts | 2 +- .../link-modules/src/loaders/connection.ts | 4 +- .../link-modules/src/loaders/container.ts | 4 +- .../modules/link-modules/src/loaders/index.ts | 2 +- .../link-modules/src/migration/index.ts | 4 +- .../link-modules/src/repositories/index.ts | 2 +- .../link-modules/src/repositories/link.ts | 4 +- .../src/services/dynamic-service-class.ts | 8 +- .../src/services/link-module-service.ts | 4 +- .../modules/link-modules/src/services/link.ts | 4 +- .../modules/link-modules/src/types/index.ts | 2 +- .../link-modules/src/utils/compress-name.ts | 2 +- .../link-modules/src/utils/generate-entity.ts | 7 +- .../link-modules/src/utils/generate-schema.ts | 9 +- .../modules/link-modules/src/utils/index.ts | 2 +- .../providers/default-provider.ts | 4 +- .../notification-module-service/index.spec.ts | 4 +- .../notification/mikro-orm.config.dev.ts | 2 +- packages/modules/notification/package.json | 7 +- packages/modules/notification/src/index.ts | 2 +- .../notification/src/loaders/providers.ts | 10 +- .../src/models/notification-provider.ts | 2 +- .../notification/src/models/notification.ts | 2 +- .../services/notification-module-service.ts | 4 +- .../src/services/notification-provider.ts | 8 +- .../modules/notification/src/types/index.ts | 2 +- .../modules/notification/src/utils/events.ts | 2 +- .../__tests__/create-order.ts | 4 +- .../integration-tests/__tests__/index.spec.ts | 4 +- .../__tests__/order-claim.ts | 4 +- .../integration-tests/__tests__/order-edit.ts | 4 +- .../__tests__/order-exchange.ts | 4 +- .../__tests__/order-items-shipping.spec.ts | 4 +- .../__tests__/order-return.ts | 4 +- .../integration-tests/__tests__/returns.ts | 4 +- .../modules/order/mikro-orm.config.dev.ts | 2 +- packages/modules/order/package.json | 6 +- packages/modules/order/src/index.ts | 2 +- packages/modules/order/src/joiner-config.ts | 2 +- .../src/migrations/Migration20240219102530.ts | 2 +- packages/modules/order/src/models/address.ts | 4 +- .../order/src/models/adjustment-line.ts | 4 +- .../order/src/models/claim-item-image.ts | 4 +- .../modules/order/src/models/claim-item.ts | 4 +- packages/modules/order/src/models/claim.ts | 4 +- .../modules/order/src/models/exchange-item.ts | 4 +- packages/modules/order/src/models/exchange.ts | 4 +- .../order/src/models/line-item-adjustment.ts | 2 +- .../order/src/models/line-item-tax-line.ts | 2 +- .../modules/order/src/models/line-item.ts | 4 +- .../order/src/models/order-change-action.ts | 4 +- .../modules/order/src/models/order-change.ts | 6 +- .../modules/order/src/models/order-item.ts | 4 +- .../order/src/models/order-shipping-method.ts | 4 +- .../modules/order/src/models/order-summary.ts | 2 +- packages/modules/order/src/models/order.ts | 4 +- .../modules/order/src/models/return-item.ts | 4 +- .../modules/order/src/models/return-reason.ts | 4 +- packages/modules/order/src/models/return.ts | 4 +- .../src/models/shipping-method-adjustment.ts | 2 +- .../src/models/shipping-method-tax-line.ts | 2 +- .../order/src/models/shipping-method.ts | 4 +- packages/modules/order/src/models/tax-line.ts | 4 +- .../modules/order/src/models/transaction.ts | 4 +- .../modules/order/src/repositories/claim.ts | 2 +- .../order/src/repositories/exchange.ts | 2 +- .../modules/order/src/repositories/index.ts | 2 +- .../modules/order/src/repositories/order.ts | 2 +- .../modules/order/src/repositories/return.ts | 2 +- .../__tests__/util/actions/exchanges.ts | 2 +- .../__tests__/util/actions/returns.ts | 2 +- .../src/services/actions/cancel-claim.ts | 4 +- .../src/services/actions/cancel-exchange.ts | 4 +- .../services/actions/cancel-fulfillment.ts | 4 +- .../src/services/actions/cancel-return.ts | 4 +- .../src/services/actions/create-claim.ts | 4 +- .../src/services/actions/create-exchange.ts | 4 +- .../src/services/actions/create-return.ts | 4 +- .../src/services/actions/receive-return.ts | 4 +- .../src/services/actions/register-delivery.ts | 4 +- .../services/actions/register-fulfillment.ts | 4 +- .../src/services/actions/register-shipment.ts | 4 +- .../src/services/order-module-service.ts | 4 +- .../order/src/services/order-service.ts | 4 +- packages/modules/order/src/types/address.ts | 2 +- packages/modules/order/src/types/index.ts | 2 +- .../order/src/types/line-item-adjustment.ts | 2 +- packages/modules/order/src/types/line-item.ts | 2 +- .../modules/order/src/types/order-change.ts | 2 +- .../modules/order/src/types/order-detail.ts | 2 +- packages/modules/order/src/types/order.ts | 2 +- .../modules/order/src/types/return-reason.ts | 2 +- .../src/types/shipping-method-adjustment.ts | 2 +- .../order/src/types/shipping-method.ts | 2 +- packages/modules/order/src/types/tax-line.ts | 2 +- .../modules/order/src/types/transaction.ts | 2 +- .../modules/order/src/types/utils/index.ts | 2 +- .../utils/actions/cancel-item-fulfillment.ts | 6 +- .../order/src/utils/actions/cancel-return.ts | 6 +- .../order/src/utils/actions/deliver-item.ts | 6 +- .../order/src/utils/actions/fulfill-item.ts | 6 +- .../order/src/utils/actions/item-add.ts | 6 +- .../order/src/utils/actions/item-remove.ts | 6 +- .../order/src/utils/actions/item-update.ts | 2 +- .../actions/receive-damaged-return-item.ts | 6 +- .../src/utils/actions/receive-return-item.ts | 6 +- .../order/src/utils/actions/reinstate-item.ts | 6 +- .../order/src/utils/actions/return-item.ts | 6 +- .../order/src/utils/actions/ship-item.ts | 6 +- .../order/src/utils/actions/shipping-add.ts | 2 +- .../src/utils/actions/shipping-remove.ts | 2 +- .../order/src/utils/actions/write-off-item.ts | 6 +- .../order/src/utils/apply-order-changes.ts | 4 +- .../order/src/utils/base-repository-find.ts | 2 +- .../order/src/utils/calculate-order-change.ts | 4 +- .../order/src/utils/transform-order.ts | 2 +- .../__tests__/loaders/providers.spec.ts | 4 +- .../services/payment-module/index.spec.ts | 4 +- .../modules/payment/mikro-orm.config.dev.ts | 2 +- packages/modules/payment/package.json | 8 +- packages/modules/payment/src/index.ts | 2 +- packages/modules/payment/src/joiner-config.ts | 2 +- .../modules/payment/src/loaders/providers.ts | 4 +- .../src/migrations/Migration20240225134525.ts | 2 +- .../modules/payment/src/models/capture.ts | 4 +- .../payment/src/models/payment-collection.ts | 4 +- .../src/models/payment-method-token.ts | 2 +- .../payment/src/models/payment-session.ts | 4 +- .../modules/payment/src/models/payment.ts | 4 +- .../payment/src/models/refund-reason.ts | 6 +- packages/modules/payment/src/models/refund.ts | 4 +- .../modules/payment/src/providers/system.ts | 4 +- .../payment/src/services/payment-module.ts | 4 +- .../payment/src/services/payment-provider.ts | 4 +- packages/modules/payment/src/types/index.ts | 2 +- .../__fixtures__/price-rule/data.ts | 2 +- .../__fixtures__/price-rule/index.ts | 2 +- .../__fixtures__/price-set/data.ts | 2 +- .../__fixtures__/price-set/index.ts | 2 +- .../pricing-module/calculate-price.spec.ts | 8 +- .../services/pricing-module/index.spec.ts | 4 +- .../pricing-module/price-list-rule.spec.ts | 4 +- .../pricing-module/price-list.spec.ts | 4 +- .../pricing-module/price-rule.spec.ts | 4 +- .../services/pricing-module/price-set.spec.ts | 7 +- .../modules/pricing/mikro-orm.config.dev.ts | 2 +- packages/modules/pricing/package.json | 6 +- packages/modules/pricing/src/index.ts | 2 +- packages/modules/pricing/src/joiner-config.ts | 2 +- .../pricing/src/models/price-list-rule.ts | 4 +- .../modules/pricing/src/models/price-list.ts | 4 +- .../pricing/src/models/price-preference.ts | 2 +- .../modules/pricing/src/models/price-rule.ts | 4 +- .../modules/pricing/src/models/price-set.ts | 2 +- packages/modules/pricing/src/models/price.ts | 4 +- .../modules/pricing/src/repositories/index.ts | 2 +- .../pricing/src/repositories/pricing.ts | 8 +- .../pricing/src/services/pricing-module.ts | 4 +- packages/modules/pricing/src/types/index.ts | 2 +- .../pricing/src/types/services/index.ts | 2 +- packages/modules/pricing/src/utils/events.ts | 2 +- .../src/utils/validate-price-list-dates.ts | 2 +- .../integration-tests/__fixtures__/module.ts | 4 +- .../product/data/create-product.ts | 4 +- .../__fixtures__/product/data/products.ts | 2 +- .../__fixtures__/product/index.ts | 2 +- .../variant/data/create-variant.ts | 2 +- .../__tests__/product-category.ts | 4 +- .../product-categories.spec.ts | 4 +- .../product-collections.spec.ts | 4 +- .../product-options.spec.ts | 4 +- .../product-tags.spec.ts | 4 +- .../product-types.spec.ts | 4 +- .../product-variants.spec.ts | 4 +- .../product-module-service/products.spec.ts | 4 +- .../integration-tests/__tests__/product.ts | 9 +- .../modules/product/mikro-orm.config.dev.ts | 2 +- packages/modules/product/package.json | 6 +- packages/modules/product/src/index.ts | 2 +- packages/modules/product/src/joiner-config.ts | 2 +- .../product/src/models/product-category.ts | 2 +- .../product/src/models/product-collection.ts | 2 +- .../product/src/models/product-image.ts | 2 +- .../src/models/product-option-value.ts | 2 +- .../product/src/models/product-option.ts | 2 +- .../modules/product/src/models/product-tag.ts | 2 +- .../product/src/models/product-type.ts | 2 +- .../product/src/models/product-variant.ts | 2 +- .../modules/product/src/models/product.ts | 2 +- .../src/repositories/product-category.ts | 4 +- .../product/src/repositories/product.ts | 4 +- .../product/src/services/product-category.ts | 9 +- .../src/services/product-module-service.ts | 4 +- packages/modules/product/src/types/index.ts | 6 +- packages/modules/product/src/utils/events.ts | 2 +- .../__fixtures__/campaigns/data.ts | 2 +- .../__fixtures__/campaigns/index.ts | 2 +- .../__fixtures__/promotion/data.ts | 4 +- .../__fixtures__/promotion/index.ts | 4 +- .../promotion-module/campaign.spec.ts | 4 +- .../promotion-module/compute-actions.spec.ts | 8 +- .../promotion-module/promotion.spec.ts | 4 +- .../promotion-module/register-usage.spec.ts | 4 +- .../promotion-module/revert-usage.spec.ts | 4 +- .../modules/promotion/mikro-orm.config.dev.ts | 2 +- packages/modules/promotion/package.json | 6 +- packages/modules/promotion/src/index.ts | 2 +- .../modules/promotion/src/joiner-config.ts | 2 +- .../src/models/application-method.ts | 4 +- .../promotion/src/models/campaign-budget.ts | 4 +- .../modules/promotion/src/models/campaign.ts | 4 +- .../src/models/promotion-rule-value.ts | 2 +- .../promotion/src/models/promotion-rule.ts | 8 +- .../modules/promotion/src/models/promotion.ts | 4 +- .../src/services/promotion-module.ts | 4 +- .../promotion/src/types/application-method.ts | 2 +- .../promotion/src/types/campaign-budget.ts | 5 +- .../modules/promotion/src/types/campaign.ts | 2 +- packages/modules/promotion/src/types/index.ts | 2 +- .../src/types/promotion-rule-value.ts | 2 +- .../promotion/src/types/promotion-rule.ts | 2 +- .../modules/promotion/src/types/promotion.ts | 2 +- .../src/utils/compute-actions/buy-get.ts | 4 +- .../src/utils/compute-actions/line-items.ts | 4 +- .../utils/compute-actions/shipping-methods.ts | 4 +- .../src/utils/compute-actions/usage.ts | 8 +- .../utils/validations/application-method.ts | 2 +- .../src/utils/validations/promotion-rule.ts | 4 +- .../__tests__/services.spec.ts | 2 +- .../providers/auth-emailpass/package.json | 5 +- .../providers/auth-emailpass/src/index.ts | 2 +- .../auth-emailpass/src/services/emailpass.ts | 4 +- .../__tests__/services.spec.ts | 2 +- .../providers/auth-github/package.json | 6 +- .../providers/auth-github/src/index.ts | 2 +- .../auth-github/src/services/github.ts | 7 +- .../__tests__/services.spec.ts | 2 +- .../providers/auth-google/package.json | 6 +- .../providers/auth-google/src/index.ts | 2 +- .../auth-google/src/services/google.ts | 7 +- .../modules/providers/file-local/package.json | 5 +- .../modules/providers/file-local/src/index.ts | 2 +- .../file-local/src/services/local-file.ts | 7 +- .../modules/providers/file-s3/package.json | 5 +- .../modules/providers/file-s3/src/index.ts | 2 +- .../providers/file-s3/src/services/s3-file.ts | 11 +- .../providers/fulfillment-manual/package.json | 5 +- .../providers/fulfillment-manual/src/index.ts | 2 +- .../src/services/manual-fulfillment.ts | 2 +- .../providers/notification-local/package.json | 5 +- .../providers/notification-local/src/index.ts | 2 +- .../notification-local/src/services/local.ts | 4 +- .../notification-sendgrid/package.json | 5 +- .../notification-sendgrid/src/index.ts | 2 +- .../src/services/sendgrid.ts | 4 +- .../providers/payment-stripe/package.json | 4 +- .../payment-stripe/src/core/stripe-base.ts | 4 +- .../providers/payment-stripe/src/index.ts | 2 +- .../src/utils/get-smallest-unit.ts | 4 +- .../__tests__/region-module.spec.ts | 4 +- .../modules/region/mikro-orm.config.dev.ts | 2 +- packages/modules/region/package.json | 6 +- packages/modules/region/src/index.ts | 2 +- .../modules/region/src/loaders/defaults.ts | 11 +- .../src/migrations/Migration20240205173216.ts | 2 +- .../src/migrations/Migration20240624200006.ts | 2 +- packages/modules/region/src/models/country.ts | 2 +- packages/modules/region/src/models/region.ts | 2 +- .../region/src/services/region-module.ts | 4 +- packages/modules/region/src/types/index.ts | 2 +- .../services/sales-channel-module.spec.ts | 4 +- .../sales-channel/mikro-orm.config.dev.ts | 2 +- packages/modules/sales-channel/package.json | 6 +- packages/modules/sales-channel/src/index.ts | 2 +- .../sales-channel/src/joinfer-config.ts | 2 +- .../sales-channel/src/models/sales-channel.ts | 8 +- .../src/services/sales-channel-module.ts | 4 +- .../modules/sales-channel/src/types/index.ts | 4 +- .../stock-location-module-service.spec.ts | 4 +- .../mikro-orm.config.dev.ts | 2 +- .../modules/stock-location-next/package.json | 6 +- .../modules/stock-location-next/src/index.ts | 2 +- .../stock-location-next/src/joiner-config.ts | 2 +- .../src/models/stock-location-address.ts | 2 +- .../src/models/stock-location.ts | 2 +- .../src/services/stock-location-module.ts | 4 +- .../integration-tests/__fixtures__/index.ts | 2 +- .../__tests__/store-module-service.spec.ts | 4 +- .../modules/store/mikro-orm.config.dev.ts | 2 +- packages/modules/store/package.json | 6 +- packages/modules/store/src/index.ts | 2 +- packages/modules/store/src/models/currency.ts | 2 +- packages/modules/store/src/models/store.ts | 4 +- .../src/services/store-module-service.ts | 4 +- packages/modules/store/src/types/index.ts | 6 +- .../integration-tests/__tests__/index.spec.ts | 4 +- .../utils/setup-tax-structure.ts | 2 +- packages/modules/tax/mikro-orm.config.dev.ts | 2 +- packages/modules/tax/package.json | 7 +- packages/modules/tax/src/index.ts | 2 +- packages/modules/tax/src/loaders/providers.ts | 8 +- .../src/migrations/Migration20240227090331.ts | 2 +- .../modules/tax/src/models/tax-rate-rule.ts | 4 +- packages/modules/tax/src/models/tax-rate.ts | 4 +- packages/modules/tax/src/models/tax-region.ts | 4 +- packages/modules/tax/src/providers/system.ts | 2 +- .../tax/src/services/tax-module-service.ts | 4 +- .../__tests__/invite.spec.ts | 4 +- .../integration-tests/__tests__/user.spec.ts | 4 +- packages/modules/user/mikro-orm.config.dev.ts | 2 +- packages/modules/user/package.json | 4 +- packages/modules/user/src/index.ts | 2 +- .../src/migrations/Migration20240214033943.ts | 2 +- packages/modules/user/src/models/invite.ts | 4 +- packages/modules/user/src/models/user.ts | 4 +- .../modules/user/src/services/user-module.ts | 4 +- packages/modules/user/src/types/index.ts | 2 +- .../workflow-engine-inmemory/package.json | 4 +- .../workflow-engine-redis/package.json | 3 +- .../workflow-engine-redis/src/index.ts | 2 +- .../src/models/workflow-execution.ts | 2 +- .../src/services/workflows-module.ts | 2 +- .../src/constants/custom-options.ts | 2 +- yarn.lock | 166 +++++++++--------- 518 files changed, 1115 insertions(+), 957 deletions(-) create mode 100644 packages/core/framework/src/modules-sdk/index.ts diff --git a/.eslintrc.js b/.eslintrc.js index 211dcf6de2..e7c49b3435 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -134,7 +134,7 @@ module.exports = { "./packages/modules/providers/fulfillment-manual/tsconfig.spec.json", "./packages/modules/providers/payment-stripe/tsconfig.spec.json", - "./packages/framework/framework/tsconfig.json", + "./packages/framework/tsconfig.json", ], }, rules: { diff --git a/packages/core/framework/package.json b/packages/core/framework/package.json index c591172d67..951ec9524d 100644 --- a/packages/core/framework/package.json +++ b/packages/core/framework/package.json @@ -23,7 +23,8 @@ "./types": "./dist/types/index.js", "./orchestration": "./dist/orchestration/index.js", "./workflows-sdk": "./dist/workflows-sdk/index.js", - "./workflows-sdk/composer": "./dist/workflows-sdk/composer.js" + "./workflows-sdk/composer": "./dist/workflows-sdk/composer.js", + "./modules-sdk": "./dist/modules-sdk/index.js" }, "engines": { "node": ">=20" @@ -31,7 +32,7 @@ "repository": { "type": "git", "url": "https://github.com/medusajs/medusa", - "directory": "packages/framework/framework" + "directory": "packages/framework" }, "publishConfig": { "access": "public" diff --git a/packages/core/framework/src/modules-sdk/index.ts b/packages/core/framework/src/modules-sdk/index.ts new file mode 100644 index 0000000000..e25580bb3b --- /dev/null +++ b/packages/core/framework/src/modules-sdk/index.ts @@ -0,0 +1 @@ +export * from "@medusajs/modules-sdk" diff --git a/packages/medusa-telemetry/package.json b/packages/medusa-telemetry/package.json index 0617cd0036..9de4b89d3a 100644 --- a/packages/medusa-telemetry/package.json +++ b/packages/medusa-telemetry/package.json @@ -24,7 +24,7 @@ "jest": "^29.7.0", "nodemon": "^2.0.20", "rimraf": "^3.0.2", - "typescript": "^4.1.3" + "typescript": "^5.6.2" }, "scripts": { "start": "nodemon --watch plugins/ --watch src/ --exec node src/index.js", diff --git a/packages/medusa-telemetry/tsconfig.json b/packages/medusa-telemetry/tsconfig.json index 81fd4c527f..76f97e7851 100644 --- a/packages/medusa-telemetry/tsconfig.json +++ b/packages/medusa-telemetry/tsconfig.json @@ -6,8 +6,8 @@ "esModuleInterop": true, "declarationMap": true, "declaration": true, - "module": "commonjs", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "Node16", "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": false, diff --git a/packages/modules/api-key/integration-tests/__fixtures__/index.ts b/packages/modules/api-key/integration-tests/__fixtures__/index.ts index 10004f3ef5..988e5b17e9 100644 --- a/packages/modules/api-key/integration-tests/__fixtures__/index.ts +++ b/packages/modules/api-key/integration-tests/__fixtures__/index.ts @@ -1,5 +1,5 @@ import { CreateApiKeyDTO } from "@types" -import { ApiKeyType } from "@medusajs/utils" +import { ApiKeyType } from "@medusajs/framework/utils" export const createSecretKeyFixture: CreateApiKeyDTO = { title: "Secret key", diff --git a/packages/modules/api-key/integration-tests/__tests__/api-key-module-service.spec.ts b/packages/modules/api-key/integration-tests/__tests__/api-key-module-service.spec.ts index df11e8c53a..89a195aa5c 100644 --- a/packages/modules/api-key/integration-tests/__tests__/api-key-module-service.spec.ts +++ b/packages/modules/api-key/integration-tests/__tests__/api-key-module-service.spec.ts @@ -1,5 +1,5 @@ -import { IApiKeyModuleService } from "@medusajs/types" -import { ApiKeyType, Module, Modules } from "@medusajs/utils" +import { IApiKeyModuleService } from "@medusajs/framework/types" +import { ApiKeyType, Module, Modules } from "@medusajs/framework/utils" import { ApiKeyModuleService } from "@services" import crypto from "crypto" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/api-key/mikro-orm.config.dev.ts b/packages/modules/api-key/mikro-orm.config.dev.ts index 561ebe87cc..e9a663ea67 100644 --- a/packages/modules/api-key/mikro-orm.config.dev.ts +++ b/packages/modules/api-key/mikro-orm.config.dev.ts @@ -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.API_KEY, { entities: Object.values(entities), diff --git a/packages/modules/api-key/package.json b/packages/modules/api-key/package.json index d11ce37d0f..40854c8e16 100644 --- a/packages/modules/api-key/package.json +++ b/packages/modules/api-key/package.json @@ -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", "cross-env": "^5.2.1", "jest": "^29.7.0", "medusa-test-utils": "^1.1.44", @@ -46,10 +46,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", diff --git a/packages/modules/api-key/src/index.ts b/packages/modules/api-key/src/index.ts index c3e6aad498..684d923444 100644 --- a/packages/modules/api-key/src/index.ts +++ b/packages/modules/api-key/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { ApiKeyModuleService } from "@services" export default Module(Modules.API_KEY, { diff --git a/packages/modules/api-key/src/joiner-config.ts b/packages/modules/api-key/src/joiner-config.ts index 299cd0a4b2..954a430999 100644 --- a/packages/modules/api-key/src/joiner-config.ts +++ b/packages/modules/api-key/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" export const joinerConfig = defineJoinerConfig(Modules.API_KEY, { linkableKeys: { diff --git a/packages/modules/api-key/src/models/api-key.ts b/packages/modules/api-key/src/models/api-key.ts index 9c3b3e3aba..c5dd599469 100644 --- a/packages/modules/api-key/src/models/api-key.ts +++ b/packages/modules/api-key/src/models/api-key.ts @@ -2,7 +2,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, diff --git a/packages/modules/api-key/src/services/api-key-module-service.ts b/packages/modules/api-key/src/services/api-key-module-service.ts index 5d4748f999..ccb6536d38 100644 --- a/packages/modules/api-key/src/services/api-key-module-service.ts +++ b/packages/modules/api-key/src/services/api-key-module-service.ts @@ -8,7 +8,7 @@ import { InternalModuleDeclaration, ModuleJoinerConfig, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ApiKeyType, InjectManager, @@ -20,7 +20,7 @@ import { MedusaError, MedusaService, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ApiKey } from "@models" import { CreateApiKeyDTO, diff --git a/packages/modules/api-key/src/types/index.ts b/packages/modules/api-key/src/types/index.ts index 824fbce29c..1f3834cf43 100644 --- a/packages/modules/api-key/src/types/index.ts +++ b/packages/modules/api-key/src/types/index.ts @@ -4,7 +4,7 @@ import { Logger, RevokeApiKeyDTO, UpdateApiKeyDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/auth/integration-tests/__fixtures__/auth-identity/index.ts b/packages/modules/auth/integration-tests/__fixtures__/auth-identity/index.ts index 20cb4e9f71..5db3afe459 100644 --- a/packages/modules/auth/integration-tests/__fixtures__/auth-identity/index.ts +++ b/packages/modules/auth/integration-tests/__fixtures__/auth-identity/index.ts @@ -1,4 +1,4 @@ -import { IAuthModuleService } from "@medusajs/types" +import { IAuthModuleService } from "@medusajs/framework/types" import { AuthIdentity } from "@models" export async function createAuthIdentities( diff --git a/packages/modules/auth/integration-tests/__fixtures__/providers/default-provider.ts b/packages/modules/auth/integration-tests/__fixtures__/providers/default-provider.ts index 1f48ef9763..28548ea104 100644 --- a/packages/modules/auth/integration-tests/__fixtures__/providers/default-provider.ts +++ b/packages/modules/auth/integration-tests/__fixtures__/providers/default-provider.ts @@ -3,8 +3,11 @@ import { AuthIdentityProviderService, AuthenticationInput, AuthenticationResponse, -} from "@medusajs/types" -import { AbstractAuthModuleProvider, MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { + AbstractAuthModuleProvider, + MedusaError, +} from "@medusajs/framework/utils" export class AuthServiceFixtures extends AbstractAuthModuleProvider { constructor() { diff --git a/packages/modules/auth/integration-tests/__tests__/auth-module-service/auth-identity.spec.ts b/packages/modules/auth/integration-tests/__tests__/auth-module-service/auth-identity.spec.ts index bceab502cf..6541effd1a 100644 --- a/packages/modules/auth/integration-tests/__tests__/auth-module-service/auth-identity.spec.ts +++ b/packages/modules/auth/integration-tests/__tests__/auth-module-service/auth-identity.spec.ts @@ -1,5 +1,5 @@ -import { IAuthModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IAuthModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { createAuthIdentities } from "../../__fixtures__/auth-identity" diff --git a/packages/modules/auth/integration-tests/__tests__/auth-module-service/index.spec.ts b/packages/modules/auth/integration-tests/__tests__/auth-module-service/index.spec.ts index 0fd5a9034d..d35f111eb6 100644 --- a/packages/modules/auth/integration-tests/__tests__/auth-module-service/index.spec.ts +++ b/packages/modules/auth/integration-tests/__tests__/auth-module-service/index.spec.ts @@ -1,5 +1,5 @@ -import { IAuthModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IAuthModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { AuthModuleService } from "@services" import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils" import { resolve } from "path" diff --git a/packages/modules/auth/mikro-orm.config.dev.ts b/packages/modules/auth/mikro-orm.config.dev.ts index 27c64ea32b..4e48d06fda 100644 --- a/packages/modules/auth/mikro-orm.config.dev.ts +++ b/packages/modules/auth/mikro-orm.config.dev.ts @@ -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.AUTH, { entities: Object.values(entities), diff --git a/packages/modules/auth/package.json b/packages/modules/auth/package.json index 8deeb51baa..4ece12abb2 100644 --- a/packages/modules/auth/package.json +++ b/packages/modules/auth/package.json @@ -37,7 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.14", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -47,13 +47,12 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/modules-sdk": "^1.12.11", - "@medusajs/utils": "^1.11.9", "jsonwebtoken": "^9.0.2", "scrypt-kdf": "^2.0.1", "simple-oauth2": "^5.0.0" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "@mikro-orm/core": "5.9.7", "@mikro-orm/migrations": "5.9.7", "@mikro-orm/postgresql": "5.9.7", diff --git a/packages/modules/auth/src/index.ts b/packages/modules/auth/src/index.ts index 2c564ede0f..6ce752fdea 100644 --- a/packages/modules/auth/src/index.ts +++ b/packages/modules/auth/src/index.ts @@ -1,6 +1,6 @@ import { AuthModuleService } from "@services" import loadProviders from "./loaders/providers" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.AUTH, { service: AuthModuleService, diff --git a/packages/modules/auth/src/joiner-config.ts b/packages/modules/auth/src/joiner-config.ts index b5868a6e0a..eeb0d2e1ff 100644 --- a/packages/modules/auth/src/joiner-config.ts +++ b/packages/modules/auth/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { AuthIdentity, ProviderIdentity } from "@models" export const joinerConfig = defineJoinerConfig(Modules.AUTH, { diff --git a/packages/modules/auth/src/loaders/providers.ts b/packages/modules/auth/src/loaders/providers.ts index 46d967e642..24af7af212 100644 --- a/packages/modules/auth/src/loaders/providers.ts +++ b/packages/modules/auth/src/loaders/providers.ts @@ -1,6 +1,10 @@ -import { LoaderOptions, ModulesSdkTypes, ModuleProvider } from "@medusajs/types" +import { + LoaderOptions, + ModulesSdkTypes, + ModuleProvider, +} from "@medusajs/framework/types" import { Lifetime, asFunction, asValue } from "awilix" -import { moduleProviderLoader } from "@medusajs/modules-sdk" +import { moduleProviderLoader } from "@medusajs/framework/modules-sdk" import { AuthIdentifiersRegistrationName, AuthProviderRegistrationPrefix, diff --git a/packages/modules/auth/src/models/auth-identity.ts b/packages/modules/auth/src/models/auth-identity.ts index 3b32192113..6488edb2bd 100644 --- a/packages/modules/auth/src/models/auth-identity.ts +++ b/packages/modules/auth/src/models/auth-identity.ts @@ -8,7 +8,7 @@ import { Property, } from "@mikro-orm/core" -import { generateEntityId } from "@medusajs/utils" +import { generateEntityId } from "@medusajs/framework/utils" import ProviderIdentity from "./provider-identity" @Entity() diff --git a/packages/modules/auth/src/models/provider-identity.ts b/packages/modules/auth/src/models/provider-identity.ts index 9debb0ac67..130f1a4fde 100644 --- a/packages/modules/auth/src/models/provider-identity.ts +++ b/packages/modules/auth/src/models/provider-identity.ts @@ -11,7 +11,7 @@ import { import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import AuthIdentity from "./auth-identity" const providerEntityIdIndexName = "IDX_provider_identity_provider_entity_id" diff --git a/packages/modules/auth/src/services/auth-module.ts b/packages/modules/auth/src/services/auth-module.ts index 749263e9ae..1c1b653b4d 100644 --- a/packages/modules/auth/src/services/auth-module.ts +++ b/packages/modules/auth/src/services/auth-module.ts @@ -8,13 +8,13 @@ import { InternalModuleDeclaration, ModuleJoinerConfig, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, MedusaContext, MedusaError, MedusaService, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { AuthIdentity, ProviderIdentity } from "@models" import { joinerConfig } from "../joiner-config" import AuthProviderService from "./auth-provider" diff --git a/packages/modules/auth/src/services/auth-provider.ts b/packages/modules/auth/src/services/auth-provider.ts index 3c0532c380..b231e7cb21 100644 --- a/packages/modules/auth/src/services/auth-provider.ts +++ b/packages/modules/auth/src/services/auth-provider.ts @@ -2,9 +2,9 @@ import { AuthIdentityProviderService, AuthTypes, AuthenticationInput, - AuthenticationResponse -} from "@medusajs/types" -import { MedusaError } from "@medusajs/utils" + AuthenticationResponse, +} from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" import { AuthProviderRegistrationPrefix } from "@types" type InjectedDependencies = { diff --git a/packages/modules/auth/src/types/index.ts b/packages/modules/auth/src/types/index.ts index 717b235867..f1b3063de7 100644 --- a/packages/modules/auth/src/types/index.ts +++ b/packages/modules/auth/src/types/index.ts @@ -1,6 +1,6 @@ -import { ModuleProviderExports } from "@medusajs/types" -import { ModuleServiceInitializeOptions } from "@medusajs/types" -import { Logger } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" +import { ModuleServiceInitializeOptions } from "@medusajs/framework/types" +import { Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/cache-inmemory/package.json b/packages/modules/cache-inmemory/package.json index 34c35b281c..c8073676ee 100644 --- a/packages/modules/cache-inmemory/package.json +++ b/packages/modules/cache-inmemory/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "devDependencies": { - "@medusajs/types": "^1.11.9", + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", @@ -34,8 +34,7 @@ "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, - "dependencies": { - "@medusajs/modules-sdk": "^1.12.11", - "@medusajs/utils": "^1.11.9" + "peerDependencies": { + "@medusajs/framework": "^0.0.1" } } diff --git a/packages/modules/cache-inmemory/src/index.ts b/packages/modules/cache-inmemory/src/index.ts index 5dd3330c72..ffe6ab2bf4 100644 --- a/packages/modules/cache-inmemory/src/index.ts +++ b/packages/modules/cache-inmemory/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleExports } from "@medusajs/types" +import { ModuleExports } from "@medusajs/framework/types" import InMemoryCacheService from "./services/inmemory-cache" const service = InMemoryCacheService diff --git a/packages/modules/cache-inmemory/src/initialize/index.ts b/packages/modules/cache-inmemory/src/initialize/index.ts index 25fcd1422a..1d088cc1c7 100644 --- a/packages/modules/cache-inmemory/src/initialize/index.ts +++ b/packages/modules/cache-inmemory/src/initialize/index.ts @@ -1,10 +1,10 @@ -import { MedusaModule } from "@medusajs/modules-sdk" +import { MedusaModule } from "@medusajs/framework/modules-sdk" import { ExternalModuleDeclaration, ICacheService, InternalModuleDeclaration, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { InMemoryCacheModuleOptions } from "../types" export const initialize = async ( @@ -13,7 +13,7 @@ export const initialize = async ( const serviceKey = Modules.CACHE const loaded = await MedusaModule.bootstrap({ moduleKey: serviceKey, - defaultPath: "@medusajs/cache-inmemory", + defaultPath: "@medusajs//cache-inmemory", declaration: options as | InternalModuleDeclaration | ExternalModuleDeclaration, diff --git a/packages/modules/cache-inmemory/src/services/inmemory-cache.ts b/packages/modules/cache-inmemory/src/services/inmemory-cache.ts index 12552db07a..b06e789f8b 100644 --- a/packages/modules/cache-inmemory/src/services/inmemory-cache.ts +++ b/packages/modules/cache-inmemory/src/services/inmemory-cache.ts @@ -1,4 +1,4 @@ -import { ICacheService } from "@medusajs/types" +import { ICacheService } from "@medusajs/framework/types" import { CacheRecord, InMemoryCacheModuleOptions } from "../types" const DEFAULT_TTL = 30 // seconds diff --git a/packages/modules/cache-redis/package.json b/packages/modules/cache-redis/package.json index 92852ed603..8471b57973 100644 --- a/packages/modules/cache-redis/package.json +++ b/packages/modules/cache-redis/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "devDependencies": { - "@medusajs/types": "^1.11.16", + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", @@ -35,11 +35,10 @@ "test": "jest --passWithNoTests" }, "dependencies": { - "@medusajs/modules-sdk": "^1.12.11", - "@medusajs/utils": "^1.11.9", "ioredis": "^5.4.1" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "awilix": "^8.0.1" } } diff --git a/packages/modules/cache-redis/src/index.ts b/packages/modules/cache-redis/src/index.ts index dbdf310bc0..5195c55d98 100644 --- a/packages/modules/cache-redis/src/index.ts +++ b/packages/modules/cache-redis/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleExports } from "@medusajs/types" +import { ModuleExports } from "@medusajs/framework/types" import Loader from "./loaders" import { RedisCacheService } from "./services" diff --git a/packages/modules/cache-redis/src/initialize/index.ts b/packages/modules/cache-redis/src/initialize/index.ts index 392af417dc..f6e0add0e5 100644 --- a/packages/modules/cache-redis/src/initialize/index.ts +++ b/packages/modules/cache-redis/src/initialize/index.ts @@ -1,10 +1,10 @@ -import { MedusaModule } from "@medusajs/modules-sdk" +import { MedusaModule } from "@medusajs/framework/modules-sdk" import { ExternalModuleDeclaration, ICacheService, InternalModuleDeclaration, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { RedisCacheModuleOptions } from "../types" export const initialize = async ( diff --git a/packages/modules/cache-redis/src/loaders/index.ts b/packages/modules/cache-redis/src/loaders/index.ts index c620494460..1b25f62637 100644 --- a/packages/modules/cache-redis/src/loaders/index.ts +++ b/packages/modules/cache-redis/src/loaders/index.ts @@ -1,4 +1,4 @@ -import { LoaderOptions } from "@medusajs/types" +import { LoaderOptions } from "@medusajs/framework/types" import { asValue } from "awilix" import Redis from "ioredis" import { RedisCacheModuleOptions } from "../types" diff --git a/packages/modules/cache-redis/src/services/redis-cache.ts b/packages/modules/cache-redis/src/services/redis-cache.ts index 7872a6567d..b794dffdba 100644 --- a/packages/modules/cache-redis/src/services/redis-cache.ts +++ b/packages/modules/cache-redis/src/services/redis-cache.ts @@ -1,4 +1,4 @@ -import { ICacheService } from "@medusajs/types" +import { ICacheService } from "@medusajs/framework/types" import { Redis } from "ioredis" import { RedisCacheModuleOptions } from "../types" diff --git a/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts b/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts index f355d7fc4c..d143925d6b 100644 --- a/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts +++ b/packages/modules/cart/integration-tests/__fixtures__/cart/index.ts @@ -1,4 +1,4 @@ -import { CreateCartDTO } from "@medusajs/types" +import { CreateCartDTO } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" import { Cart } from "../../../src/models" import { defaultCartsData } from "./data" diff --git a/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts b/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts index c389925687..a3212d0565 100644 --- a/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts +++ b/packages/modules/cart/integration-tests/__tests__/services/cart-module/index.spec.ts @@ -1,5 +1,5 @@ -import { ICartModuleService } from "@medusajs/types" -import { BigNumber, Module, Modules } from "@medusajs/utils" +import { ICartModuleService } from "@medusajs/framework/types" +import { BigNumber, Module, Modules } from "@medusajs/framework/utils" import { CheckConstraintViolationException } from "@mikro-orm/core" import { CartModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/cart/mikro-orm.config.dev.ts b/packages/modules/cart/mikro-orm.config.dev.ts index f84e539724..1e631e030e 100644 --- a/packages/modules/cart/mikro-orm.config.dev.ts +++ b/packages/modules/cart/mikro-orm.config.dev.ts @@ -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.CART, { entities: Object.values(entities), diff --git a/packages/modules/cart/package.json b/packages/modules/cart/package.json index 856458d233..8e2144c9be 100644 --- a/packages/modules/cart/package.json +++ b/packages/modules/cart/package.json @@ -37,7 +37,6 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.16", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -47,10 +46,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", diff --git a/packages/modules/cart/src/index.ts b/packages/modules/cart/src/index.ts index 790cf78e34..08b6d2438e 100644 --- a/packages/modules/cart/src/index.ts +++ b/packages/modules/cart/src/index.ts @@ -1,5 +1,5 @@ import { CartModuleService } from "./services" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.CART, { service: CartModuleService, diff --git a/packages/modules/cart/src/models/address.ts b/packages/modules/cart/src/models/address.ts index c73d1899f6..07b99fdb47 100644 --- a/packages/modules/cart/src/models/address.ts +++ b/packages/modules/cart/src/models/address.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/cart/src/models/adjustment-line.ts b/packages/modules/cart/src/models/adjustment-line.ts index 3c42557b41..55b913c794 100644 --- a/packages/modules/cart/src/models/adjustment-line.ts +++ b/packages/modules/cart/src/models/adjustment-line.ts @@ -1,5 +1,5 @@ -import { DAL } from "@medusajs/types" -import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/utils" +import { DAL } from "@medusajs/framework/types" +import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/framework/utils" import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core" type OptionalAdjustmentLineProps = DAL.SoftDeletableModelDateColumns diff --git a/packages/modules/cart/src/models/cart.ts b/packages/modules/cart/src/models/cart.ts index 41f2236258..09762a073f 100644 --- a/packages/modules/cart/src/models/cart.ts +++ b/packages/modules/cart/src/models/cart.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/cart/src/models/line-item-adjustment.ts b/packages/modules/cart/src/models/line-item-adjustment.ts index 4327e437b6..a96426d615 100644 --- a/packages/modules/cart/src/models/line-item-adjustment.ts +++ b/packages/modules/cart/src/models/line-item-adjustment.ts @@ -2,7 +2,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Check, diff --git a/packages/modules/cart/src/models/line-item-tax-line.ts b/packages/modules/cart/src/models/line-item-tax-line.ts index d49efee05d..d857078826 100644 --- a/packages/modules/cart/src/models/line-item-tax-line.ts +++ b/packages/modules/cart/src/models/line-item-tax-line.ts @@ -2,7 +2,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/cart/src/models/line-item.ts b/packages/modules/cart/src/models/line-item.ts index 5f33ac16dd..bffabc97d0 100644 --- a/packages/modules/cart/src/models/line-item.ts +++ b/packages/modules/cart/src/models/line-item.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/cart/src/models/shipping-method-adjustment.ts b/packages/modules/cart/src/models/shipping-method-adjustment.ts index 53a63feb1d..22c7a3ce91 100644 --- a/packages/modules/cart/src/models/shipping-method-adjustment.ts +++ b/packages/modules/cart/src/models/shipping-method-adjustment.ts @@ -2,7 +2,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/cart/src/models/shipping-method-tax-line.ts b/packages/modules/cart/src/models/shipping-method-tax-line.ts index 627ead9113..d24db596fc 100644 --- a/packages/modules/cart/src/models/shipping-method-tax-line.ts +++ b/packages/modules/cart/src/models/shipping-method-tax-line.ts @@ -2,7 +2,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/cart/src/models/shipping-method.ts b/packages/modules/cart/src/models/shipping-method.ts index d22f8ce2a0..0bee5d79f9 100644 --- a/packages/modules/cart/src/models/shipping-method.ts +++ b/packages/modules/cart/src/models/shipping-method.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/cart/src/models/tax-line.ts b/packages/modules/cart/src/models/tax-line.ts index f9ae6e935c..b99ab74cb8 100644 --- a/packages/modules/cart/src/models/tax-line.ts +++ b/packages/modules/cart/src/models/tax-line.ts @@ -1,4 +1,4 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core" type OptionalTaxLineProps = DAL.SoftDeletableModelDateColumns diff --git a/packages/modules/cart/src/services/cart-module.ts b/packages/modules/cart/src/services/cart-module.ts index ba108572b9..d727707d77 100644 --- a/packages/modules/cart/src/services/cart-module.ts +++ b/packages/modules/cart/src/services/cart-module.ts @@ -7,7 +7,7 @@ import { ICartModuleService, InternalModuleDeclaration, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { createRawPropertiesFromBigNumber, decorateCartTotals, @@ -19,7 +19,7 @@ import { MedusaContext, MedusaError, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Address, Cart, diff --git a/packages/modules/cart/src/types/index.ts b/packages/modules/cart/src/types/index.ts index 9e420fcb7f..4d4c16f861 100644 --- a/packages/modules/cart/src/types/index.ts +++ b/packages/modules/cart/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export * from "./address" export * from "./cart" diff --git a/packages/modules/cart/src/types/line-item-adjustment.ts b/packages/modules/cart/src/types/line-item-adjustment.ts index 076ad8ea03..0053ce0401 100644 --- a/packages/modules/cart/src/types/line-item-adjustment.ts +++ b/packages/modules/cart/src/types/line-item-adjustment.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export interface CreateLineItemAdjustmentDTO { item_id: string diff --git a/packages/modules/cart/src/types/line-item.ts b/packages/modules/cart/src/types/line-item.ts index 82b7f5ebc0..42759ed569 100644 --- a/packages/modules/cart/src/types/line-item.ts +++ b/packages/modules/cart/src/types/line-item.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" interface PartialUpsertLineItemDTO { subtitle?: string diff --git a/packages/modules/cart/src/types/shipping-method-adjustment.ts b/packages/modules/cart/src/types/shipping-method-adjustment.ts index bb8ec468dc..ef8bc38118 100644 --- a/packages/modules/cart/src/types/shipping-method-adjustment.ts +++ b/packages/modules/cart/src/types/shipping-method-adjustment.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export interface CreateShippingMethodAdjustmentDTO { shipping_method_id: string diff --git a/packages/modules/cart/src/types/shipping-method.ts b/packages/modules/cart/src/types/shipping-method.ts index e693467ab6..0958ddf360 100644 --- a/packages/modules/cart/src/types/shipping-method.ts +++ b/packages/modules/cart/src/types/shipping-method.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export interface CreateShippingMethodDTO { name: string diff --git a/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts b/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts index 65ea7eb01b..81d85896ad 100644 --- a/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts +++ b/packages/modules/currency/integration-tests/__tests__/currency-module-service.spec.ts @@ -1,5 +1,5 @@ -import { ICurrencyModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { ICurrencyModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { CurrencyModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/currency/mikro-orm.config.dev.ts b/packages/modules/currency/mikro-orm.config.dev.ts index 6c52647591..55a8202860 100644 --- a/packages/modules/currency/mikro-orm.config.dev.ts +++ b/packages/modules/currency/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.CURRENCY, { diff --git a/packages/modules/currency/package.json b/packages/modules/currency/package.json index 1f4e4cdc6a..4da9ef0a8c 100644 --- a/packages/modules/currency/package.json +++ b/packages/modules/currency/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/currency/src/index.ts b/packages/modules/currency/src/index.ts index 4b97ebd8f8..9b541ed7b3 100644 --- a/packages/modules/currency/src/index.ts +++ b/packages/modules/currency/src/index.ts @@ -1,6 +1,6 @@ import { CurrencyModuleService } from "@services" import initialDataLoader from "./loaders/initial-data" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" const service = CurrencyModuleService const loaders = [initialDataLoader] diff --git a/packages/modules/currency/src/loaders/initial-data.ts b/packages/modules/currency/src/loaders/initial-data.ts index 742e26c579..36bb8f9796 100644 --- a/packages/modules/currency/src/loaders/initial-data.ts +++ b/packages/modules/currency/src/loaders/initial-data.ts @@ -1,5 +1,12 @@ -import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types" -import { ContainerRegistrationKeys, defaultCurrencies } from "@medusajs/utils" +import { + LoaderOptions, + Logger, + ModulesSdkTypes, +} from "@medusajs/framework/types" +import { + ContainerRegistrationKeys, + defaultCurrencies, +} from "@medusajs/framework/utils" import { Currency } from "@models" export default async ({ diff --git a/packages/modules/currency/src/models/currency.ts b/packages/modules/currency/src/models/currency.ts index 41a5b02053..a02539c77d 100644 --- a/packages/modules/currency/src/models/currency.ts +++ b/packages/modules/currency/src/models/currency.ts @@ -1,4 +1,4 @@ -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" export default model.define("currency", { code: model.text().searchable().primaryKey(), diff --git a/packages/modules/currency/src/services/currency-module-service.ts b/packages/modules/currency/src/services/currency-module-service.ts index 00d229dc78..d842070ff0 100644 --- a/packages/modules/currency/src/services/currency-module-service.ts +++ b/packages/modules/currency/src/services/currency-module-service.ts @@ -8,9 +8,9 @@ import { ICurrencyModuleService, InternalModuleDeclaration, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" -import { MedusaService } from "@medusajs/utils" +import { MedusaService } from "@medusajs/framework/utils" import { Currency } from "@models" type InjectedDependencies = { diff --git a/packages/modules/currency/src/types/index.ts b/packages/modules/currency/src/types/index.ts index 473fec2d61..b13c739729 100644 --- a/packages/modules/currency/src/types/index.ts +++ b/packages/modules/currency/src/types/index.ts @@ -1,4 +1,4 @@ -import { IEventBusModuleService, Logger } from "@medusajs/types" +import { IEventBusModuleService, Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/customer/integration-tests/__tests__/services/customer-module/index.spec.ts b/packages/modules/customer/integration-tests/__tests__/services/customer-module/index.spec.ts index 66e9be56e8..70fa6bf7af 100644 --- a/packages/modules/customer/integration-tests/__tests__/services/customer-module/index.spec.ts +++ b/packages/modules/customer/integration-tests/__tests__/services/customer-module/index.spec.ts @@ -1,5 +1,5 @@ -import { ICustomerModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { ICustomerModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { CustomerModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/customer/mikro-orm.config.dev.ts b/packages/modules/customer/mikro-orm.config.dev.ts index 2b3a613eeb..caeaf3c705 100644 --- a/packages/modules/customer/mikro-orm.config.dev.ts +++ b/packages/modules/customer/mikro-orm.config.dev.ts @@ -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.CUSTOMER, { entities: Object.values(entities), diff --git a/packages/modules/customer/package.json b/packages/modules/customer/package.json index 3a2d2daf54..98b4398046 100644 --- a/packages/modules/customer/package.json +++ b/packages/modules/customer/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/customer/src/index.ts b/packages/modules/customer/src/index.ts index e742d1fa0b..b77a27b1fe 100644 --- a/packages/modules/customer/src/index.ts +++ b/packages/modules/customer/src/index.ts @@ -1,5 +1,5 @@ import { CustomerModuleService } from "@services" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.CUSTOMER, { service: CustomerModuleService, diff --git a/packages/modules/customer/src/joiner-config.ts b/packages/modules/customer/src/joiner-config.ts index a12ae0a0ea..83e5574a03 100644 --- a/packages/modules/customer/src/joiner-config.ts +++ b/packages/modules/customer/src/joiner-config.ts @@ -1,3 +1,3 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" export const joinerConfig = defineJoinerConfig(Modules.CUSTOMER) diff --git a/packages/modules/customer/src/models/address.ts b/packages/modules/customer/src/models/address.ts index c1d31a101f..81f9d92b66 100644 --- a/packages/modules/customer/src/models/address.ts +++ b/packages/modules/customer/src/models/address.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/customer/src/models/customer-group-customer.ts b/packages/modules/customer/src/models/customer-group-customer.ts index 509e7019f6..83fc538306 100644 --- a/packages/modules/customer/src/models/customer-group-customer.ts +++ b/packages/modules/customer/src/models/customer-group-customer.ts @@ -1,5 +1,5 @@ -import { DAL } from "@medusajs/types" -import { generateEntityId } from "@medusajs/utils" +import { DAL } from "@medusajs/framework/types" +import { generateEntityId } from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/customer/src/models/customer-group.ts b/packages/modules/customer/src/models/customer-group.ts index a6604fa31e..3afe8ba8a3 100644 --- a/packages/modules/customer/src/models/customer-group.ts +++ b/packages/modules/customer/src/models/customer-group.ts @@ -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, diff --git a/packages/modules/customer/src/models/customer.ts b/packages/modules/customer/src/models/customer.ts index dc897b6987..018f09cc2a 100644 --- a/packages/modules/customer/src/models/customer.ts +++ b/packages/modules/customer/src/models/customer.ts @@ -1,10 +1,10 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/customer/src/services/customer-module.ts b/packages/modules/customer/src/services/customer-module.ts index d47fc30eac..8ffc4ff074 100644 --- a/packages/modules/customer/src/services/customer-module.ts +++ b/packages/modules/customer/src/services/customer-module.ts @@ -10,7 +10,7 @@ import { InternalModuleDeclaration, ModuleJoinerConfig, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, @@ -18,7 +18,7 @@ import { isString, MedusaContext, MedusaService, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntityManager } from "@mikro-orm/core" import { Customer, diff --git a/packages/modules/customer/src/types/index.ts b/packages/modules/customer/src/types/index.ts index c993481e0d..b8966db0bc 100644 --- a/packages/modules/customer/src/types/index.ts +++ b/packages/modules/customer/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export * as ServiceTypes from "./services" export * from "./services" diff --git a/packages/modules/event-bus-local/package.json b/packages/modules/event-bus-local/package.json index 426b06d688..b28db95370 100644 --- a/packages/modules/event-bus-local/package.json +++ b/packages/modules/event-bus-local/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "devDependencies": { - "@medusajs/types": "^1.11.12", + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", @@ -34,11 +34,8 @@ "build": "rimraf dist && tsc --build", "test": "jest --passWithNoTests" }, - "dependencies": { - "@medusajs/modules-sdk": "^1.12.11", - "@medusajs/utils": "^1.11.9" - }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "ulid": "^2.3.0" } } diff --git a/packages/modules/event-bus-local/src/index.ts b/packages/modules/event-bus-local/src/index.ts index 3efbfe77d1..71d915635a 100644 --- a/packages/modules/event-bus-local/src/index.ts +++ b/packages/modules/event-bus-local/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleExports } from "@medusajs/types" +import { ModuleExports } from "@medusajs/framework/types" import Loader from "./loaders" import LocalEventBus from "./services/event-bus-local" diff --git a/packages/modules/event-bus-local/src/initialize/index.ts b/packages/modules/event-bus-local/src/initialize/index.ts index a73eacd57a..800d03e9ff 100644 --- a/packages/modules/event-bus-local/src/initialize/index.ts +++ b/packages/modules/event-bus-local/src/initialize/index.ts @@ -1,6 +1,6 @@ -import { MedusaModule } from "@medusajs/modules-sdk" -import { IEventBusService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { MedusaModule } from "@medusajs/framework/modules-sdk" +import { IEventBusService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const initialize = async (): Promise => { const serviceKey = Modules.EVENT_BUS diff --git a/packages/modules/event-bus-local/src/loaders/index.ts b/packages/modules/event-bus-local/src/loaders/index.ts index 21f648bcbc..8612996ada 100644 --- a/packages/modules/event-bus-local/src/loaders/index.ts +++ b/packages/modules/event-bus-local/src/loaders/index.ts @@ -1,4 +1,4 @@ -import { LoaderOptions } from "@medusajs/types" +import { LoaderOptions } from "@medusajs/framework/types" export default async ({ logger }: LoaderOptions): Promise => { logger?.warn( diff --git a/packages/modules/event-bus-local/src/services/event-bus-local.ts b/packages/modules/event-bus-local/src/services/event-bus-local.ts index 3be657f464..ed828e85d3 100644 --- a/packages/modules/event-bus-local/src/services/event-bus-local.ts +++ b/packages/modules/event-bus-local/src/services/event-bus-local.ts @@ -5,8 +5,8 @@ import { MedusaContainer, Message, Subscriber, -} from "@medusajs/types" -import { AbstractEventBusModuleService } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { AbstractEventBusModuleService } from "@medusajs/framework/utils" import { EventEmitter } from "events" import { ulid } from "ulid" diff --git a/packages/modules/event-bus-redis/package.json b/packages/modules/event-bus-redis/package.json index 034c028e04..7a344ad7fe 100644 --- a/packages/modules/event-bus-redis/package.json +++ b/packages/modules/event-bus-redis/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "devDependencies": { - "@medusajs/types": "^1.11.16", + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "medusa-test-utils": "^1.1.44", @@ -36,12 +36,11 @@ "test": "jest --silent --bail --maxWorkers=50% --forceExit" }, "dependencies": { - "@medusajs/modules-sdk": "^1.12.11", - "@medusajs/utils": "^1.11.9", "bullmq": "5.13.0", "ioredis": "^5.4.1" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "awilix": "^8.0.1" } } diff --git a/packages/modules/event-bus-redis/src/index.ts b/packages/modules/event-bus-redis/src/index.ts index c572099b5f..eb8ad53ca6 100644 --- a/packages/modules/event-bus-redis/src/index.ts +++ b/packages/modules/event-bus-redis/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleExports } from "@medusajs/types" +import { ModuleExports } from "@medusajs/framework/types" import Loader from "./loaders" import RedisEventBusService from "./services/event-bus-redis" diff --git a/packages/modules/event-bus-redis/src/initialize/index.ts b/packages/modules/event-bus-redis/src/initialize/index.ts index 2a72126a23..bbc7ebae46 100644 --- a/packages/modules/event-bus-redis/src/initialize/index.ts +++ b/packages/modules/event-bus-redis/src/initialize/index.ts @@ -1,10 +1,10 @@ -import { MedusaModule } from "@medusajs/modules-sdk" +import { MedusaModule } from "@medusajs/framework/modules-sdk" import { ExternalModuleDeclaration, IEventBusService, InternalModuleDeclaration, -} from "@medusajs/types" -import { Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { EventBusRedisModuleOptions } from "../types" export const initialize = async ( diff --git a/packages/modules/event-bus-redis/src/loaders/index.ts b/packages/modules/event-bus-redis/src/loaders/index.ts index f44f5bd555..1a15082477 100644 --- a/packages/modules/event-bus-redis/src/loaders/index.ts +++ b/packages/modules/event-bus-redis/src/loaders/index.ts @@ -1,4 +1,4 @@ -import { LoaderOptions } from "@medusajs/types" +import { LoaderOptions } from "@medusajs/framework/types" import { asValue } from "awilix" import Redis from "ioredis" import { EOL } from "os" diff --git a/packages/modules/event-bus-redis/src/services/__tests__/event-bus.ts b/packages/modules/event-bus-redis/src/services/__tests__/event-bus.ts index c63a44c153..7c929000cc 100644 --- a/packages/modules/event-bus-redis/src/services/__tests__/event-bus.ts +++ b/packages/modules/event-bus-redis/src/services/__tests__/event-bus.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" import { Queue, Worker } from "bullmq" import { Redis } from "ioredis" import RedisEventBusService from "../event-bus-redis" diff --git a/packages/modules/event-bus-redis/src/services/event-bus-redis.ts b/packages/modules/event-bus-redis/src/services/event-bus-redis.ts index 8fc23acd62..25d9fe0448 100644 --- a/packages/modules/event-bus-redis/src/services/event-bus-redis.ts +++ b/packages/modules/event-bus-redis/src/services/event-bus-redis.ts @@ -3,12 +3,12 @@ import { InternalModuleDeclaration, Logger, Message, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractEventBusModuleService, isPresent, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BulkJobOptions, Queue, Worker } from "bullmq" import { Redis } from "ioredis" import { BullJob, EventBusRedisModuleOptions, Options } from "../types" diff --git a/packages/modules/file/integration-tests/__fixtures__/providers/default-provider.ts b/packages/modules/file/integration-tests/__fixtures__/providers/default-provider.ts index 8b6858f623..08cbcb12fe 100644 --- a/packages/modules/file/integration-tests/__fixtures__/providers/default-provider.ts +++ b/packages/modules/file/integration-tests/__fixtures__/providers/default-provider.ts @@ -1,5 +1,5 @@ -import { FileTypes } from "@medusajs/types" -import { AbstractFileProviderService } from "@medusajs/utils" +import { FileTypes } from "@medusajs/framework/types" +import { AbstractFileProviderService } from "@medusajs/framework/utils" export class FileProviderServiceFixtures extends AbstractFileProviderService { static identifier = "fixtures-file-provider" diff --git a/packages/modules/file/integration-tests/__tests__/module.spec.ts b/packages/modules/file/integration-tests/__tests__/module.spec.ts index 72118d0ea3..dc3f34414f 100644 --- a/packages/modules/file/integration-tests/__tests__/module.spec.ts +++ b/packages/modules/file/integration-tests/__tests__/module.spec.ts @@ -1,7 +1,7 @@ import { resolve } from "path" import { moduleIntegrationTestRunner } from "medusa-test-utils" -import { IFileModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IFileModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { FileModuleService } from "@services" jest.setTimeout(100000) diff --git a/packages/modules/file/package.json b/packages/modules/file/package.json index 5712a55875..99bc12199a 100644 --- a/packages/modules/file/package.json +++ b/packages/modules/file/package.json @@ -37,7 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.15", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "faker": "^5.5.3", @@ -49,11 +49,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", diff --git a/packages/modules/file/src/index.ts b/packages/modules/file/src/index.ts index 58b7666312..a826355cce 100644 --- a/packages/modules/file/src/index.ts +++ b/packages/modules/file/src/index.ts @@ -1,6 +1,6 @@ import { FileModuleService } from "@services" import loadProviders from "./loaders/providers" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.FILE, { service: FileModuleService, diff --git a/packages/modules/file/src/joiner-config.ts b/packages/modules/file/src/joiner-config.ts index 67db8fbcee..a71d0533fb 100644 --- a/packages/modules/file/src/joiner-config.ts +++ b/packages/modules/file/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" export const joinerConfig = defineJoinerConfig(Modules.FILE, { models: [{ name: "File" }], diff --git a/packages/modules/file/src/loaders/providers.ts b/packages/modules/file/src/loaders/providers.ts index 68139366b9..630d839d39 100644 --- a/packages/modules/file/src/loaders/providers.ts +++ b/packages/modules/file/src/loaders/providers.ts @@ -1,5 +1,9 @@ -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 { FileProviderService } from "@services" import { FileProviderIdentifierRegistrationName, diff --git a/packages/modules/file/src/services/file-module-service.ts b/packages/modules/file/src/services/file-module-service.ts index 9ee076557b..e238e461b8 100644 --- a/packages/modules/file/src/services/file-module-service.ts +++ b/packages/modules/file/src/services/file-module-service.ts @@ -6,11 +6,11 @@ import { FilterableFileProps, FindConfig, ModuleJoinerConfig, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { joinerConfig } from "../joiner-config" import FileProviderService from "./file-provider-service" -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" type InjectedDependencies = { fileProviderService: FileProviderService diff --git a/packages/modules/file/src/services/file-provider-service.ts b/packages/modules/file/src/services/file-provider-service.ts index eb73cea6cf..0293424578 100644 --- a/packages/modules/file/src/services/file-provider-service.ts +++ b/packages/modules/file/src/services/file-provider-service.ts @@ -1,5 +1,5 @@ -import { Constructor, FileTypes } from "@medusajs/types" -import { MedusaError } from "@medusajs/utils" +import { Constructor, FileTypes } from "@medusajs/framework/types" +import { MedusaError } from "@medusajs/framework/utils" import { FileProviderRegistrationPrefix } from "@types" type InjectedDependencies = { diff --git a/packages/modules/file/src/types/index.ts b/packages/modules/file/src/types/index.ts index f4344c4afa..8d9ef992ef 100644 --- a/packages/modules/file/src/types/index.ts +++ b/packages/modules/file/src/types/index.ts @@ -1,7 +1,7 @@ import { ModuleProviderExports, ModuleServiceInitializeOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" export const FileProviderIdentifierRegistrationName = "file_providers_identifier" diff --git a/packages/modules/fulfillment/integration-tests/__fixtures__/events.ts b/packages/modules/fulfillment/integration-tests/__fixtures__/events.ts index bc87840e80..8a3b15cb37 100644 --- a/packages/modules/fulfillment/integration-tests/__fixtures__/events.ts +++ b/packages/modules/fulfillment/integration-tests/__fixtures__/events.ts @@ -1,4 +1,4 @@ -import { EventBusTypes } from "@medusajs/types" +import { EventBusTypes } from "@medusajs/framework/types" export function buildExpectedEventMessageShape(options: { eventName: string diff --git a/packages/modules/fulfillment/integration-tests/__fixtures__/fulfillment.ts b/packages/modules/fulfillment/integration-tests/__fixtures__/fulfillment.ts index 20ed8760d2..059302d76d 100644 --- a/packages/modules/fulfillment/integration-tests/__fixtures__/fulfillment.ts +++ b/packages/modules/fulfillment/integration-tests/__fixtures__/fulfillment.ts @@ -1,4 +1,4 @@ -import { CreateFulfillmentDTO } from "@medusajs/types" +import { CreateFulfillmentDTO } from "@medusajs/framework/types" export function generateCreateFulfillmentData( data: Partial & { diff --git a/packages/modules/fulfillment/integration-tests/__fixtures__/index.ts b/packages/modules/fulfillment/integration-tests/__fixtures__/index.ts index 4a445b804e..ca6c9800b5 100644 --- a/packages/modules/fulfillment/integration-tests/__fixtures__/index.ts +++ b/packages/modules/fulfillment/integration-tests/__fixtures__/index.ts @@ -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" diff --git a/packages/modules/fulfillment/integration-tests/__fixtures__/providers/default-provider.ts b/packages/modules/fulfillment/integration-tests/__fixtures__/providers/default-provider.ts index caee5b3620..7302d2aaf9 100644 --- a/packages/modules/fulfillment/integration-tests/__fixtures__/providers/default-provider.ts +++ b/packages/modules/fulfillment/integration-tests/__fixtures__/providers/default-provider.ts @@ -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" diff --git a/packages/modules/fulfillment/integration-tests/__fixtures__/shipping-options.ts b/packages/modules/fulfillment/integration-tests/__fixtures__/shipping-options.ts index 8f49962e03..961f521d52 100644 --- a/packages/modules/fulfillment/integration-tests/__fixtures__/shipping-options.ts +++ b/packages/modules/fulfillment/integration-tests/__fixtures__/shipping-options.ts @@ -1,4 +1,4 @@ -import { CreateShippingOptionDTO } from "@medusajs/types" +import { CreateShippingOptionDTO } from "@medusajs/framework/types" export function generateCreateShippingOptionsData({ name, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment-set.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment-set.spec.ts index b0aac84ada..a358c924a4 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment-set.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment-set.spec.ts @@ -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, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment.spec.ts index c2075bfb7f..13ee0e2e42 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/fulfillment.spec.ts @@ -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) diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/geo-zone.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/geo-zone.spec.ts index b52c861929..a847ddea66 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/geo-zone.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/geo-zone.spec.ts @@ -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, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/index.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/index.spec.ts index 866d4f18f3..012eaf5a95 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/index.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/index.spec.ts @@ -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, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/service-zone.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/service-zone.spec.ts index a99fe8c58f..385a3b7795 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/service-zone.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/service-zone.spec.ts @@ -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, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-option.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-option.spec.ts index 2dbdb21eb9..f4a5c3cc57 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-option.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-option.spec.ts @@ -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, diff --git a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-profile.spec.ts b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-profile.spec.ts index 0e65b79789..d6372fd5f4 100644 --- a/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-profile.spec.ts +++ b/packages/modules/fulfillment/integration-tests/__tests__/fulfillment-module-service/shipping-profile.spec.ts @@ -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" diff --git a/packages/modules/fulfillment/mikro-orm.config.dev.ts b/packages/modules/fulfillment/mikro-orm.config.dev.ts index 1079f2365f..331cf4fed0 100644 --- a/packages/modules/fulfillment/mikro-orm.config.dev.ts +++ b/packages/modules/fulfillment/mikro-orm.config.dev.ts @@ -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), diff --git a/packages/modules/fulfillment/package.json b/packages/modules/fulfillment/package.json index 551f506c6e..6cd8ce4dfe 100644 --- a/packages/modules/fulfillment/package.json +++ b/packages/modules/fulfillment/package.json @@ -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", diff --git a/packages/modules/fulfillment/src/index.ts b/packages/modules/fulfillment/src/index.ts index 9f061b83dd..83803a5c5d 100644 --- a/packages/modules/fulfillment/src/index.ts +++ b/packages/modules/fulfillment/src/index.ts @@ -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, diff --git a/packages/modules/fulfillment/src/joiner-config.ts b/packages/modules/fulfillment/src/joiner-config.ts index e767b13dfc..dc5a1e053a 100644 --- a/packages/modules/fulfillment/src/joiner-config.ts +++ b/packages/modules/fulfillment/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { Fulfillment, FulfillmentProvider, diff --git a/packages/modules/fulfillment/src/loaders/providers.ts b/packages/modules/fulfillment/src/loaders/providers.ts index fc6b87b00c..69026f111d 100644 --- a/packages/modules/fulfillment/src/loaders/providers.ts +++ b/packages/modules/fulfillment/src/loaders/providers.ts @@ -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" diff --git a/packages/modules/fulfillment/src/models/address.ts b/packages/modules/fulfillment/src/models/address.ts index 9639a6a642..781f2a06c1 100644 --- a/packages/modules/fulfillment/src/models/address.ts +++ b/packages/modules/fulfillment/src/models/address.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/fulfillment-item.ts b/packages/modules/fulfillment/src/models/fulfillment-item.ts index 70ae145eaa..af55445f15 100644 --- a/packages/modules/fulfillment/src/models/fulfillment-item.ts +++ b/packages/modules/fulfillment/src/models/fulfillment-item.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/fulfillment-label.ts b/packages/modules/fulfillment/src/models/fulfillment-label.ts index e0babac47d..27b8164d62 100644 --- a/packages/modules/fulfillment/src/models/fulfillment-label.ts +++ b/packages/modules/fulfillment/src/models/fulfillment-label.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/fulfillment-provider.ts b/packages/modules/fulfillment/src/models/fulfillment-provider.ts index 9ec905463a..b12a485f03 100644 --- a/packages/modules/fulfillment/src/models/fulfillment-provider.ts +++ b/packages/modules/fulfillment/src/models/fulfillment-provider.ts @@ -1,4 +1,4 @@ -import { Searchable, generateEntityId } from "@medusajs/utils" +import { Searchable, generateEntityId } from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/fulfillment/src/models/fulfillment-set.ts b/packages/modules/fulfillment/src/models/fulfillment-set.ts index ddd54d04a0..30193687f5 100644 --- a/packages/modules/fulfillment/src/models/fulfillment-set.ts +++ b/packages/modules/fulfillment/src/models/fulfillment-set.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/fulfillment.ts b/packages/modules/fulfillment/src/models/fulfillment.ts index af009e9df3..dce04f0f34 100644 --- a/packages/modules/fulfillment/src/models/fulfillment.ts +++ b/packages/modules/fulfillment/src/models/fulfillment.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/geo-zone.ts b/packages/modules/fulfillment/src/models/geo-zone.ts index a9cd0d0c11..fc7e2f9175 100644 --- a/packages/modules/fulfillment/src/models/geo-zone.ts +++ b/packages/modules/fulfillment/src/models/geo-zone.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/service-zone.ts b/packages/modules/fulfillment/src/models/service-zone.ts index 6d4c372aae..50b21a9f87 100644 --- a/packages/modules/fulfillment/src/models/service-zone.ts +++ b/packages/modules/fulfillment/src/models/service-zone.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/shipping-option-rule.ts b/packages/modules/fulfillment/src/models/shipping-option-rule.ts index 638b2c80e2..a237c07b75 100644 --- a/packages/modules/fulfillment/src/models/shipping-option-rule.ts +++ b/packages/modules/fulfillment/src/models/shipping-option-rule.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/shipping-option-type.ts b/packages/modules/fulfillment/src/models/shipping-option-type.ts index cfe586d6f1..7425d2bb65 100644 --- a/packages/modules/fulfillment/src/models/shipping-option-type.ts +++ b/packages/modules/fulfillment/src/models/shipping-option-type.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/shipping-option.ts b/packages/modules/fulfillment/src/models/shipping-option.ts index b847e08a86..5f110b24f1 100644 --- a/packages/modules/fulfillment/src/models/shipping-option.ts +++ b/packages/modules/fulfillment/src/models/shipping-option.ts @@ -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, diff --git a/packages/modules/fulfillment/src/models/shipping-profile.ts b/packages/modules/fulfillment/src/models/shipping-profile.ts index b5f3997e57..c8d7fba377 100644 --- a/packages/modules/fulfillment/src/models/shipping-profile.ts +++ b/packages/modules/fulfillment/src/models/shipping-profile.ts @@ -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, diff --git a/packages/modules/fulfillment/src/repositories/fulfillment-set.ts b/packages/modules/fulfillment/src/repositories/fulfillment-set.ts index 97b718201f..85d443f8ee 100644 --- a/packages/modules/fulfillment/src/repositories/fulfillment-set.ts +++ b/packages/modules/fulfillment/src/repositories/fulfillment-set.ts @@ -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" diff --git a/packages/modules/fulfillment/src/repositories/index.ts b/packages/modules/fulfillment/src/repositories/index.ts index 147c9cc259..390afcdb9c 100644 --- a/packages/modules/fulfillment/src/repositories/index.ts +++ b/packages/modules/fulfillment/src/repositories/index.ts @@ -1 +1 @@ -export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" diff --git a/packages/modules/fulfillment/src/services/fulfillment-module-service.ts b/packages/modules/fulfillment/src/services/fulfillment-module-service.ts index f686fe4ec6..1d09848f6c 100644 --- a/packages/modules/fulfillment/src/services/fulfillment-module-service.ts +++ b/packages/modules/fulfillment/src/services/fulfillment-module-service.ts @@ -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, diff --git a/packages/modules/fulfillment/src/services/fulfillment-provider.ts b/packages/modules/fulfillment/src/services/fulfillment-provider.ts index a2b23aa74c..6a1934949f 100644 --- a/packages/modules/fulfillment/src/services/fulfillment-provider.ts +++ b/packages/modules/fulfillment/src/services/fulfillment-provider.ts @@ -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 = { diff --git a/packages/modules/fulfillment/src/types/index.ts b/packages/modules/fulfillment/src/types/index.ts index 57ce0f402f..106e08ecc2 100644 --- a/packages/modules/fulfillment/src/types/index.ts +++ b/packages/modules/fulfillment/src/types/index.ts @@ -3,7 +3,7 @@ import { Logger, ModuleProviderExports, ModuleServiceInitializeOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/fulfillment/src/types/service.ts b/packages/modules/fulfillment/src/types/service.ts index 8ea3b52219..18c7f508f5 100644 --- a/packages/modules/fulfillment/src/types/service.ts +++ b/packages/modules/fulfillment/src/types/service.ts @@ -1,4 +1,4 @@ -import { FulfillmentTypes } from "@medusajs/types" +import { FulfillmentTypes } from "@medusajs/framework/types" export type UpdateShippingOptionsInput = Required< Pick diff --git a/packages/modules/fulfillment/src/utils/__tests__/utils.spec.ts b/packages/modules/fulfillment/src/utils/__tests__/utils.spec.ts index 4306772a7a..57e3d75d87 100644 --- a/packages/modules/fulfillment/src/utils/__tests__/utils.spec.ts +++ b/packages/modules/fulfillment/src/utils/__tests__/utils.spec.ts @@ -1,4 +1,4 @@ -import { RuleOperator } from "@medusajs/utils" +import { RuleOperator } from "@medusajs/framework/utils" import { isContextValid } from "../utils" describe("isContextValidForRules", () => { diff --git a/packages/modules/fulfillment/src/utils/events.ts b/packages/modules/fulfillment/src/utils/events.ts index 6644c35c68..30ea7b736f 100644 --- a/packages/modules/fulfillment/src/utils/events.ts +++ b/packages/modules/fulfillment/src/utils/events.ts @@ -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({ diff --git a/packages/modules/fulfillment/src/utils/utils.ts b/packages/modules/fulfillment/src/utils/utils.ts index 76147bd397..4710125c8f 100644 --- a/packages/modules/fulfillment/src/utils/utils.ts +++ b/packages/modules/fulfillment/src/utils/utils.ts @@ -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 diff --git a/packages/modules/index/integration-tests/__fixtures__/event-bus.ts b/packages/modules/index/integration-tests/__fixtures__/event-bus.ts index 1bbab84468..0932d450aa 100644 --- a/packages/modules/index/integration-tests/__fixtures__/event-bus.ts +++ b/packages/modules/index/integration-tests/__fixtures__/event-bus.ts @@ -3,7 +3,7 @@ import { IEventBusModuleService, Message, Subscriber, -} from "@medusajs/types" +} from "@medusajs/framework/types" export class EventBusServiceMock implements IEventBusModuleService { protected readonly subscribers_: Map> = diff --git a/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts b/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts index b90ecc255b..470e438650 100644 --- a/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/index-engine-module.spec.ts @@ -4,13 +4,13 @@ import { logger, MedusaAppLoader, } from "@medusajs/framework" -import { MedusaAppOutput, MedusaModule } from "@medusajs/modules-sdk" -import { EventBusTypes, IndexTypes } from "@medusajs/types" +import { MedusaAppOutput, MedusaModule } from "@medusajs/framework/modules-sdk" +import { EventBusTypes, IndexTypes } from "@medusajs/framework/types" import { ContainerRegistrationKeys, ModuleRegistrationName, Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntityManager } from "@mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" import { asValue } from "awilix" diff --git a/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts b/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts index 3780b361c1..7eed0945db 100644 --- a/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts +++ b/packages/modules/index/integration-tests/__tests__/query-builder.spec.ts @@ -4,13 +4,13 @@ import { logger, MedusaAppLoader, } from "@medusajs/framework" -import { MedusaAppOutput, MedusaModule } from "@medusajs/modules-sdk" -import { IndexTypes } from "@medusajs/types" +import { MedusaAppOutput, MedusaModule } from "@medusajs/framework/modules-sdk" +import { IndexTypes } from "@medusajs/framework/types" import { ContainerRegistrationKeys, ModuleRegistrationName, Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntityManager } from "@mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" import { asValue } from "awilix" @@ -65,7 +65,6 @@ const beforeAll_ = async () => { ;(index as any).eventBusModuleService_ = eventBusMock await globalApp.onApplicationStart() - ;(index as any).storageProvider_.query_ = queryMock return globalApp diff --git a/packages/modules/index/mikro-orm.config.dev.ts b/packages/modules/index/mikro-orm.config.dev.ts index 3a232c09eb..5a79c9e816 100644 --- a/packages/modules/index/mikro-orm.config.dev.ts +++ b/packages/modules/index/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.INDEX, { diff --git a/packages/modules/index/package.json b/packages/modules/index/package.json index 172be863ac..a73787030b 100644 --- a/packages/modules/index/package.json +++ b/packages/modules/index/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/index/src/index.ts b/packages/modules/index/src/index.ts index 6a29488fc0..4bb3463034 100644 --- a/packages/modules/index/src/index.ts +++ b/packages/modules/index/src/index.ts @@ -1,5 +1,5 @@ import { IndexModuleService } from "@services" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import containerLoader from "./loaders/index" export default Module(Modules.INDEX, { diff --git a/packages/modules/index/src/loaders/index.ts b/packages/modules/index/src/loaders/index.ts index 4826a6cfed..623ddf84a3 100644 --- a/packages/modules/index/src/loaders/index.ts +++ b/packages/modules/index/src/loaders/index.ts @@ -1,8 +1,8 @@ import { asClass, asValue } from "awilix" import { PostgresProvider } from "../services/postgres-provider" -import { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +import { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" import { IndexModuleService } from "@services" -import { LoaderOptions } from "@medusajs/types" +import { LoaderOptions } from "@medusajs/framework/types" export default async ({ container, options }: LoaderOptions): Promise => { container.register({ diff --git a/packages/modules/index/src/services/index-module-service.ts b/packages/modules/index/src/services/index-module-service.ts index 61124e0970..f093ee3664 100644 --- a/packages/modules/index/src/services/index-module-service.ts +++ b/packages/modules/index/src/services/index-module-service.ts @@ -4,12 +4,12 @@ import { IndexTypes, InternalModuleDeclaration, RemoteQueryFunction, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ContainerRegistrationKeys, MikroOrmBaseRepository as BaseRepository, Modules, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { schemaObjectRepresentationPropertiesToOmit } from "@types" import { buildSchemaObjectRepresentation } from "../utils/build-config" import { defaultSchema } from "../utils/default-schema" diff --git a/packages/modules/index/src/services/postgres-provider.ts b/packages/modules/index/src/services/postgres-provider.ts index 6394b1369e..2858f646c6 100644 --- a/packages/modules/index/src/services/postgres-provider.ts +++ b/packages/modules/index/src/services/postgres-provider.ts @@ -4,7 +4,7 @@ import { IndexTypes, RemoteQueryFunction, Subscriber, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ContainerRegistrationKeys, InjectManager, @@ -12,7 +12,7 @@ import { isDefined, MedusaContext, MikroOrmBaseRepository as BaseRepository, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntityManager, SqlEntityManager } from "@mikro-orm/postgresql" import { IndexData, IndexRelation } from "@models" import { createPartitions, QueryBuilder } from "../utils" diff --git a/packages/modules/index/src/utils/build-config.ts b/packages/modules/index/src/utils/build-config.ts index 9aa71491ee..bc37fe0ab1 100644 --- a/packages/modules/index/src/utils/build-config.ts +++ b/packages/modules/index/src/utils/build-config.ts @@ -1,12 +1,12 @@ import { makeExecutableSchema } from "@graphql-tools/schema" -import { MedusaModule } from "@medusajs/modules-sdk" +import { MedusaModule } from "@medusajs/framework/modules-sdk" import { IndexTypes, JoinerServiceConfigAlias, ModuleJoinerConfig, ModuleJoinerRelationship, -} from "@medusajs/types" -import { CommonEvents, GraphQLUtils } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { CommonEvents, GraphQLUtils } from "@medusajs/framework/utils" import { schemaObjectRepresentationPropertiesToOmit } from "@types" export const CustomDirectives = { diff --git a/packages/modules/index/src/utils/create-partitions.ts b/packages/modules/index/src/utils/create-partitions.ts index faedd38e23..44f6930a2a 100644 --- a/packages/modules/index/src/utils/create-partitions.ts +++ b/packages/modules/index/src/utils/create-partitions.ts @@ -1,6 +1,6 @@ import { SqlEntityManager } from "@mikro-orm/postgresql" import { schemaObjectRepresentationPropertiesToOmit } from "@types" -import { IndexTypes } from "@medusajs/types" +import { IndexTypes } from "@medusajs/framework/types" export async function createPartitions( schemaObjectRepresentation: IndexTypes.SchemaObjectRepresentation, diff --git a/packages/modules/index/src/utils/gql-to-types.ts b/packages/modules/index/src/utils/gql-to-types.ts index 60246d0210..410368d7a8 100644 --- a/packages/modules/index/src/utils/gql-to-types.ts +++ b/packages/modules/index/src/utils/gql-to-types.ts @@ -1,9 +1,10 @@ import { join } from "path" import { CustomDirectives, makeSchemaExecutable } from "./build-config" +import { MedusaModule } from "@medusajs/framework/modules-sdk" import { - MedusaModule, -} from "@medusajs/modules-sdk" -import { FileSystem, gqlSchemaToTypes as ModulesSdkGqlSchemaToTypes, } from "@medusajs/utils" + FileSystem, + gqlSchemaToTypes as ModulesSdkGqlSchemaToTypes, +} from "@medusajs/framework/utils" import * as process from "process" export async function gqlSchemaToTypes(schema: string) { diff --git a/packages/modules/index/src/utils/normalize-fields-selection.ts b/packages/modules/index/src/utils/normalize-fields-selection.ts index 0036b4dcd4..6d5994eb7b 100644 --- a/packages/modules/index/src/utils/normalize-fields-selection.ts +++ b/packages/modules/index/src/utils/normalize-fields-selection.ts @@ -1,4 +1,4 @@ -import { objectFromStringPath } from "@medusajs/utils" +import { objectFromStringPath } from "@medusajs/framework/utils" export function normalizeFieldsSelection(fields: string[]) { const normalizedFields = fields.map((field) => field.replace(/\.\*/g, "")) diff --git a/packages/modules/index/src/utils/query-builder.ts b/packages/modules/index/src/utils/query-builder.ts index a0f36e7f09..b414747ae2 100644 --- a/packages/modules/index/src/utils/query-builder.ts +++ b/packages/modules/index/src/utils/query-builder.ts @@ -1,5 +1,5 @@ -import { isObject, isString } from "@medusajs/utils" -import { IndexTypes } from "@medusajs/types" +import { isObject, isString } from "@medusajs/framework/utils" +import { IndexTypes } from "@medusajs/framework/types" import { GraphQLList } from "graphql" import { Knex } from "knex" import { OrderBy, QueryFormat, QueryOptions, Select } from "@types" diff --git a/packages/modules/inventory-next/integration-tests/__tests__/inventory-module-service.spec.ts b/packages/modules/inventory-next/integration-tests/__tests__/inventory-module-service.spec.ts index a666cc2046..b8c1e8c77b 100644 --- a/packages/modules/inventory-next/integration-tests/__tests__/inventory-module-service.spec.ts +++ b/packages/modules/inventory-next/integration-tests/__tests__/inventory-module-service.spec.ts @@ -1,5 +1,5 @@ -import { IInventoryService, InventoryItemDTO } from "@medusajs/types" -import { BigNumber, Module, Modules } from "@medusajs/utils" +import { IInventoryService, InventoryItemDTO } from "@medusajs/framework/types" +import { BigNumber, Module, Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { InventoryModuleService } from "../../src/services" diff --git a/packages/modules/inventory-next/mikro-orm.config.dev.ts b/packages/modules/inventory-next/mikro-orm.config.dev.ts index 11bdfad9ed..1ede4ad576 100644 --- a/packages/modules/inventory-next/mikro-orm.config.dev.ts +++ b/packages/modules/inventory-next/mikro-orm.config.dev.ts @@ -1,6 +1,6 @@ import * as entities from "./src/models" -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" export default defineMikroOrmCliConfig(Modules.INVENTORY, { entities: Object.values(entities), diff --git a/packages/modules/inventory-next/package.json b/packages/modules/inventory-next/package.json index 4874b3682c..e48042a6f6 100644 --- a/packages/modules/inventory-next/package.json +++ b/packages/modules/inventory-next/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "devDependencies": { - "@medusajs/types": "^1.11.15", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -33,10 +33,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", diff --git a/packages/modules/inventory-next/src/index.ts b/packages/modules/inventory-next/src/index.ts index 69f27cb300..f067f52595 100644 --- a/packages/modules/inventory-next/src/index.ts +++ b/packages/modules/inventory-next/src/index.ts @@ -1,5 +1,5 @@ import InventoryModuleService from "./services/inventory-module" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.INVENTORY, { service: InventoryModuleService, diff --git a/packages/modules/inventory-next/src/joiner-config.ts b/packages/modules/inventory-next/src/joiner-config.ts index 68aa913934..2d18d16970 100644 --- a/packages/modules/inventory-next/src/joiner-config.ts +++ b/packages/modules/inventory-next/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { default as schema } from "./schema" export const joinerConfig = defineJoinerConfig(Modules.INVENTORY, { diff --git a/packages/modules/inventory-next/src/models/inventory-item.ts b/packages/modules/inventory-next/src/models/inventory-item.ts index 05f4b41001..5ee899fc27 100644 --- a/packages/modules/inventory-next/src/models/inventory-item.ts +++ b/packages/modules/inventory-next/src/models/inventory-item.ts @@ -3,7 +3,7 @@ import { DALUtils, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Collection, @@ -18,7 +18,7 @@ import { Rel, } from "@mikro-orm/core" -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { InventoryLevel } from "./inventory-level" import { ReservationItem } from "./reservation-item" diff --git a/packages/modules/inventory-next/src/models/inventory-level.ts b/packages/modules/inventory-next/src/models/inventory-level.ts index c30f95792a..01969b7e9f 100644 --- a/packages/modules/inventory-next/src/models/inventory-level.ts +++ b/packages/modules/inventory-next/src/models/inventory-level.ts @@ -1,4 +1,4 @@ -import { DALUtils, isDefined, MathBN } from "@medusajs/utils" +import { DALUtils, isDefined, MathBN } from "@medusajs/framework/utils" import { BeforeCreate, Entity, @@ -11,13 +11,13 @@ import { Rel, } from "@mikro-orm/core" -import { BigNumberRawValue } from "@medusajs/types" +import { BigNumberRawValue } from "@medusajs/framework/types" import { BigNumber, createPsqlIndexStatementHelper, generateEntityId, MikroOrmBigNumberProperty, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { InventoryItem } from "./inventory-item" const InventoryLevelDeletedAtIndex = createPsqlIndexStatementHelper({ diff --git a/packages/modules/inventory-next/src/models/reservation-item.ts b/packages/modules/inventory-next/src/models/reservation-item.ts index 48f6aadca4..37a2d2504b 100644 --- a/packages/modules/inventory-next/src/models/reservation-item.ts +++ b/packages/modules/inventory-next/src/models/reservation-item.ts @@ -9,14 +9,14 @@ import { Rel, } from "@mikro-orm/core" -import { BigNumberRawValue } from "@medusajs/types" +import { BigNumberRawValue } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { InventoryItem } from "./inventory-item" const ReservationItemDeletedAtIndex = createPsqlIndexStatementHelper({ diff --git a/packages/modules/inventory-next/src/repositories/index.ts b/packages/modules/inventory-next/src/repositories/index.ts index dc31fdaa30..87f816987d 100644 --- a/packages/modules/inventory-next/src/repositories/index.ts +++ b/packages/modules/inventory-next/src/repositories/index.ts @@ -1,2 +1,2 @@ export * from "./inventory-level" -export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" diff --git a/packages/modules/inventory-next/src/repositories/inventory-level.ts b/packages/modules/inventory-next/src/repositories/inventory-level.ts index eb9fbc7ade..719fcc36ec 100644 --- a/packages/modules/inventory-next/src/repositories/inventory-level.ts +++ b/packages/modules/inventory-next/src/repositories/inventory-level.ts @@ -1,9 +1,9 @@ -import { Context } from "@medusajs/types" +import { Context } from "@medusajs/framework/types" import { BigNumber, MathBN, mikroOrmBaseRepositoryFactory, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { SqlEntityManager } from "@mikro-orm/postgresql" import { InventoryLevel } from "@models" diff --git a/packages/modules/inventory-next/src/services/inventory-level.ts b/packages/modules/inventory-next/src/services/inventory-level.ts index 225f8bc7a2..5771f72f68 100644 --- a/packages/modules/inventory-next/src/services/inventory-level.ts +++ b/packages/modules/inventory-next/src/services/inventory-level.ts @@ -1,5 +1,5 @@ -import { Context } from "@medusajs/types" -import { BigNumber, ModulesSdkUtils } from "@medusajs/utils" +import { Context } from "@medusajs/framework/types" +import { BigNumber, ModulesSdkUtils } from "@medusajs/framework/utils" import { InventoryLevelRepository } from "@repositories" import { InventoryLevel } from "../models/inventory-level" diff --git a/packages/modules/inventory-next/src/services/inventory-module.ts b/packages/modules/inventory-next/src/services/inventory-module.ts index afeb8462e2..688b745ada 100644 --- a/packages/modules/inventory-next/src/services/inventory-module.ts +++ b/packages/modules/inventory-next/src/services/inventory-module.ts @@ -2,6 +2,7 @@ import { BigNumberInput, Context, DAL, + IInventoryService, InternalModuleDeclaration, InventoryTypes, ModuleJoinerConfig, @@ -9,8 +10,7 @@ import { ReservationItemDTO, RestoreReturn, SoftDeleteReturn, -} from "@medusajs/types" -import { IInventoryService } from "@medusajs/types/dist/inventory" +} from "@medusajs/framework/types" import { arrayDifference, BigNumber, @@ -26,7 +26,7 @@ import { MedusaError, MedusaService, partitionArray, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { InventoryItem, InventoryLevel, ReservationItem } from "@models" import { joinerConfig } from "../joiner-config" import InventoryLevelService from "./inventory-level" diff --git a/packages/modules/link-modules/integration-tests/__fixtures__/migrations.ts b/packages/modules/link-modules/integration-tests/__fixtures__/migrations.ts index 0964d30f0f..d343900e46 100644 --- a/packages/modules/link-modules/integration-tests/__fixtures__/migrations.ts +++ b/packages/modules/link-modules/integration-tests/__fixtures__/migrations.ts @@ -3,7 +3,7 @@ import { MedusaService, model, Module, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const User = model.define("user", { id: model.id().primaryKey(), diff --git a/packages/modules/link-modules/integration-tests/__tests__/migrations.spec.ts b/packages/modules/link-modules/integration-tests/__tests__/migrations.spec.ts index c8832f6a30..9b65a92cd7 100644 --- a/packages/modules/link-modules/integration-tests/__tests__/migrations.spec.ts +++ b/packages/modules/link-modules/integration-tests/__tests__/migrations.spec.ts @@ -1,6 +1,6 @@ -import { MedusaModule } from "@medusajs/modules-sdk" -import { ILinkModule, ModuleJoinerConfig } from "@medusajs/types" -import { Modules, defineLink, isObject } from "@medusajs/utils" +import { MedusaModule } from "@medusajs/framework/modules-sdk" +import { ILinkModule, ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules, defineLink, isObject } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { MigrationsExecutionPlanner } from "../../src" import { diff --git a/packages/modules/link-modules/package.json b/packages/modules/link-modules/package.json index ac9a4f53fd..d091bc2269 100644 --- a/packages/modules/link-modules/package.json +++ b/packages/modules/link-modules/package.json @@ -33,7 +33,7 @@ "test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts" }, "devDependencies": { - "@medusajs/types": "^1.11.16", + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "medusa-test-utils": "^1.1.44", @@ -43,11 +43,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", diff --git a/packages/modules/link-modules/src/definitions/cart-payment-collection.ts b/packages/modules/link-modules/src/definitions/cart-payment-collection.ts index d5cff98945..82ec4ec63a 100644 --- a/packages/modules/link-modules/src/definitions/cart-payment-collection.ts +++ b/packages/modules/link-modules/src/definitions/cart-payment-collection.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const CartPaymentCollection: ModuleJoinerConfig = { serviceName: LINKS.CartPaymentCollection, diff --git a/packages/modules/link-modules/src/definitions/cart-promotion.ts b/packages/modules/link-modules/src/definitions/cart-promotion.ts index c655fb3ab4..9b5f2153ed 100644 --- a/packages/modules/link-modules/src/definitions/cart-promotion.ts +++ b/packages/modules/link-modules/src/definitions/cart-promotion.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const CartPromotion: ModuleJoinerConfig = { serviceName: LINKS.CartPromotion, diff --git a/packages/modules/link-modules/src/definitions/fulfillment-provider-location.ts b/packages/modules/link-modules/src/definitions/fulfillment-provider-location.ts index 2bcb17f853..44855c12a5 100644 --- a/packages/modules/link-modules/src/definitions/fulfillment-provider-location.ts +++ b/packages/modules/link-modules/src/definitions/fulfillment-provider-location.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const LocationFulfillmentProvider: ModuleJoinerConfig = { serviceName: LINKS.LocationFulfillmentProvider, diff --git a/packages/modules/link-modules/src/definitions/fulfillment-set-location.ts b/packages/modules/link-modules/src/definitions/fulfillment-set-location.ts index c01811eca8..6813ae0dc9 100644 --- a/packages/modules/link-modules/src/definitions/fulfillment-set-location.ts +++ b/packages/modules/link-modules/src/definitions/fulfillment-set-location.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const LocationFulfillmentSet: ModuleJoinerConfig = { serviceName: LINKS.LocationFulfillmentSet, diff --git a/packages/modules/link-modules/src/definitions/order-cart.ts b/packages/modules/link-modules/src/definitions/order-cart.ts index 7aadad1e49..ae40751073 100644 --- a/packages/modules/link-modules/src/definitions/order-cart.ts +++ b/packages/modules/link-modules/src/definitions/order-cart.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderCart: ModuleJoinerConfig = { serviceName: LINKS.OrderCart, diff --git a/packages/modules/link-modules/src/definitions/order-claim-payment-collection.ts b/packages/modules/link-modules/src/definitions/order-claim-payment-collection.ts index e99a80f01f..9ddf9be7cf 100644 --- a/packages/modules/link-modules/src/definitions/order-claim-payment-collection.ts +++ b/packages/modules/link-modules/src/definitions/order-claim-payment-collection.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderClaimPaymentCollection: ModuleJoinerConfig = { serviceName: LINKS.OrderClaimPaymentCollection, diff --git a/packages/modules/link-modules/src/definitions/order-exchange-payment-collection.ts b/packages/modules/link-modules/src/definitions/order-exchange-payment-collection.ts index aed1b7e51e..dcd656bd30 100644 --- a/packages/modules/link-modules/src/definitions/order-exchange-payment-collection.ts +++ b/packages/modules/link-modules/src/definitions/order-exchange-payment-collection.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderExchangePaymentCollection: ModuleJoinerConfig = { serviceName: LINKS.OrderExchangePaymentCollection, diff --git a/packages/modules/link-modules/src/definitions/order-fulfillment.ts b/packages/modules/link-modules/src/definitions/order-fulfillment.ts index 8ff465334c..6083022134 100644 --- a/packages/modules/link-modules/src/definitions/order-fulfillment.ts +++ b/packages/modules/link-modules/src/definitions/order-fulfillment.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderFulfillment: ModuleJoinerConfig = { serviceName: LINKS.OrderFulfillment, diff --git a/packages/modules/link-modules/src/definitions/order-payment-collection.ts b/packages/modules/link-modules/src/definitions/order-payment-collection.ts index b59b2d107b..e7683fdef0 100644 --- a/packages/modules/link-modules/src/definitions/order-payment-collection.ts +++ b/packages/modules/link-modules/src/definitions/order-payment-collection.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderPaymentCollection: ModuleJoinerConfig = { serviceName: LINKS.OrderPaymentCollection, diff --git a/packages/modules/link-modules/src/definitions/order-promotion.ts b/packages/modules/link-modules/src/definitions/order-promotion.ts index efb44c2f02..da2e0bfff9 100644 --- a/packages/modules/link-modules/src/definitions/order-promotion.ts +++ b/packages/modules/link-modules/src/definitions/order-promotion.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const OrderPromotion: ModuleJoinerConfig = { serviceName: LINKS.OrderPromotion, diff --git a/packages/modules/link-modules/src/definitions/order-return-fulfillment.ts b/packages/modules/link-modules/src/definitions/order-return-fulfillment.ts index 3e808291ff..015e32ddb0 100644 --- a/packages/modules/link-modules/src/definitions/order-return-fulfillment.ts +++ b/packages/modules/link-modules/src/definitions/order-return-fulfillment.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const ReturnFulfillment: ModuleJoinerConfig = { serviceName: LINKS.ReturnFulfillment, diff --git a/packages/modules/link-modules/src/definitions/product-sales-channel.ts b/packages/modules/link-modules/src/definitions/product-sales-channel.ts index 2304257ffd..7466444e5a 100644 --- a/packages/modules/link-modules/src/definitions/product-sales-channel.ts +++ b/packages/modules/link-modules/src/definitions/product-sales-channel.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const ProductSalesChannel: ModuleJoinerConfig = { serviceName: LINKS.ProductSalesChannel, diff --git a/packages/modules/link-modules/src/definitions/product-variant-inventory-item.ts b/packages/modules/link-modules/src/definitions/product-variant-inventory-item.ts index 93422a9029..9e122490bc 100644 --- a/packages/modules/link-modules/src/definitions/product-variant-inventory-item.ts +++ b/packages/modules/link-modules/src/definitions/product-variant-inventory-item.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const ProductVariantInventoryItem: ModuleJoinerConfig = { serviceName: LINKS.ProductVariantInventoryItem, diff --git a/packages/modules/link-modules/src/definitions/product-variant-price-set.ts b/packages/modules/link-modules/src/definitions/product-variant-price-set.ts index d2ee84799d..c2c1d8f9c8 100644 --- a/packages/modules/link-modules/src/definitions/product-variant-price-set.ts +++ b/packages/modules/link-modules/src/definitions/product-variant-price-set.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const ProductVariantPriceSet: ModuleJoinerConfig = { serviceName: LINKS.ProductVariantPriceSet, diff --git a/packages/modules/link-modules/src/definitions/publishable-api-key-sales-channel.ts b/packages/modules/link-modules/src/definitions/publishable-api-key-sales-channel.ts index a78761992e..bae571e9d1 100644 --- a/packages/modules/link-modules/src/definitions/publishable-api-key-sales-channel.ts +++ b/packages/modules/link-modules/src/definitions/publishable-api-key-sales-channel.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const PublishableApiKeySalesChannel: ModuleJoinerConfig = { serviceName: LINKS.PublishableApiKeySalesChannel, diff --git a/packages/modules/link-modules/src/definitions/readonly/cart-customer.ts b/packages/modules/link-modules/src/definitions/readonly/cart-customer.ts index 3502f5ccdd..14f1bbabfe 100644 --- a/packages/modules/link-modules/src/definitions/readonly/cart-customer.ts +++ b/packages/modules/link-modules/src/definitions/readonly/cart-customer.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const CartCustomer: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/cart-product.ts b/packages/modules/link-modules/src/definitions/readonly/cart-product.ts index 709d2bea96..4ab920e95b 100644 --- a/packages/modules/link-modules/src/definitions/readonly/cart-product.ts +++ b/packages/modules/link-modules/src/definitions/readonly/cart-product.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const CartProduct: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/cart-region.ts b/packages/modules/link-modules/src/definitions/readonly/cart-region.ts index 34fac15f8b..94e920e28d 100644 --- a/packages/modules/link-modules/src/definitions/readonly/cart-region.ts +++ b/packages/modules/link-modules/src/definitions/readonly/cart-region.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const CartRegion: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/cart-sales-channel.ts b/packages/modules/link-modules/src/definitions/readonly/cart-sales-channel.ts index b75a5c2651..3b11286573 100644 --- a/packages/modules/link-modules/src/definitions/readonly/cart-sales-channel.ts +++ b/packages/modules/link-modules/src/definitions/readonly/cart-sales-channel.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const CartSalesChannel: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/inventory-level-stock-location.ts b/packages/modules/link-modules/src/definitions/readonly/inventory-level-stock-location.ts index a8da57f315..9163edfc1f 100644 --- a/packages/modules/link-modules/src/definitions/readonly/inventory-level-stock-location.ts +++ b/packages/modules/link-modules/src/definitions/readonly/inventory-level-stock-location.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const InventoryLevelStockLocation: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/line-item-adjustment-promotion.ts b/packages/modules/link-modules/src/definitions/readonly/line-item-adjustment-promotion.ts index 5e94ba386f..7617bfba27 100644 --- a/packages/modules/link-modules/src/definitions/readonly/line-item-adjustment-promotion.ts +++ b/packages/modules/link-modules/src/definitions/readonly/line-item-adjustment-promotion.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const LineItemAdjustmentPromotion: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/order-customer.ts b/packages/modules/link-modules/src/definitions/readonly/order-customer.ts index 3440df3e36..86f8fd1566 100644 --- a/packages/modules/link-modules/src/definitions/readonly/order-customer.ts +++ b/packages/modules/link-modules/src/definitions/readonly/order-customer.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const OrderCustomer: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/order-product.ts b/packages/modules/link-modules/src/definitions/readonly/order-product.ts index 67b48ea2d5..17a4478f2a 100644 --- a/packages/modules/link-modules/src/definitions/readonly/order-product.ts +++ b/packages/modules/link-modules/src/definitions/readonly/order-product.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const OrderProduct: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/order-region.ts b/packages/modules/link-modules/src/definitions/readonly/order-region.ts index ae893b9e1a..3935d3ca17 100644 --- a/packages/modules/link-modules/src/definitions/readonly/order-region.ts +++ b/packages/modules/link-modules/src/definitions/readonly/order-region.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const OrderRegion: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/order-sales-channel.ts b/packages/modules/link-modules/src/definitions/readonly/order-sales-channel.ts index bf89d12200..834f8cec42 100644 --- a/packages/modules/link-modules/src/definitions/readonly/order-sales-channel.ts +++ b/packages/modules/link-modules/src/definitions/readonly/order-sales-channel.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const OrderSalesChannel: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/readonly/store-currency.ts b/packages/modules/link-modules/src/definitions/readonly/store-currency.ts index b929e144a9..cde506eecf 100644 --- a/packages/modules/link-modules/src/definitions/readonly/store-currency.ts +++ b/packages/modules/link-modules/src/definitions/readonly/store-currency.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" export const StoreCurrencies: ModuleJoinerConfig = { isLink: true, diff --git a/packages/modules/link-modules/src/definitions/region-payment-provider.ts b/packages/modules/link-modules/src/definitions/region-payment-provider.ts index 5c89ad690a..f021f37934 100644 --- a/packages/modules/link-modules/src/definitions/region-payment-provider.ts +++ b/packages/modules/link-modules/src/definitions/region-payment-provider.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const RegionPaymentProvider: ModuleJoinerConfig = { serviceName: LINKS.RegionPaymentProvider, diff --git a/packages/modules/link-modules/src/definitions/sales-channel-location.ts b/packages/modules/link-modules/src/definitions/sales-channel-location.ts index 648fddaeae..8c143f49ad 100644 --- a/packages/modules/link-modules/src/definitions/sales-channel-location.ts +++ b/packages/modules/link-modules/src/definitions/sales-channel-location.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const SalesChannelLocation: ModuleJoinerConfig = { serviceName: LINKS.SalesChannelLocation, diff --git a/packages/modules/link-modules/src/definitions/shipping-option-price-set.ts b/packages/modules/link-modules/src/definitions/shipping-option-price-set.ts index 7b29f28265..64c36b3494 100644 --- a/packages/modules/link-modules/src/definitions/shipping-option-price-set.ts +++ b/packages/modules/link-modules/src/definitions/shipping-option-price-set.ts @@ -1,5 +1,5 @@ -import { ModuleJoinerConfig } from "@medusajs/types" -import { LINKS, Modules } from "@medusajs/utils" +import { ModuleJoinerConfig } from "@medusajs/framework/types" +import { LINKS, Modules } from "@medusajs/framework/utils" export const ShippingOptionPriceSet: ModuleJoinerConfig = { serviceName: LINKS.ShippingOptionPriceSet, diff --git a/packages/modules/link-modules/src/initialize/index.ts b/packages/modules/link-modules/src/initialize/index.ts index 8bb690b431..e12d7709d2 100644 --- a/packages/modules/link-modules/src/initialize/index.ts +++ b/packages/modules/link-modules/src/initialize/index.ts @@ -2,7 +2,7 @@ import { MedusaModule, MODULE_RESOURCE_TYPE, MODULE_SCOPE, -} from "@medusajs/modules-sdk" +} from "@medusajs/framework/modules-sdk" import { ExternalModuleDeclaration, ILinkModule, @@ -12,7 +12,7 @@ import { ModuleJoinerConfig, ModuleServiceInitializeCustomDataLayerOptions, ModuleServiceInitializeOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { arrayDifference, composeLinkName, @@ -21,7 +21,7 @@ import { Modules, simpleHash, toPascalCase, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import * as linkDefinitions from "../definitions" import { MigrationsExecutionPlanner } from "../migration" import { InitializeModuleInjectableDependencies } from "../types" diff --git a/packages/modules/link-modules/src/initialize/module-definition.ts b/packages/modules/link-modules/src/initialize/module-definition.ts index a4a2b06300..ee32e28e35 100644 --- a/packages/modules/link-modules/src/initialize/module-definition.ts +++ b/packages/modules/link-modules/src/initialize/module-definition.ts @@ -2,7 +2,7 @@ import { JoinerRelationship, ModuleExports, ModuleJoinerConfig, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { getModuleService, getReadOnlyModuleService } from "@services" import { getLoaders } from "../loaders" diff --git a/packages/modules/link-modules/src/loaders/connection.ts b/packages/modules/link-modules/src/loaders/connection.ts index 66343342a3..e0ef5c8c45 100644 --- a/packages/modules/link-modules/src/loaders/connection.ts +++ b/packages/modules/link-modules/src/loaders/connection.ts @@ -3,8 +3,8 @@ import { LoaderOptions, ModuleServiceInitializeCustomDataLayerOptions, ModuleServiceInitializeOptions, -} from "@medusajs/types" -import { ModulesSdkUtils } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ModulesSdkUtils } from "@medusajs/framework/utils" import { EntitySchema } from "@mikro-orm/core" diff --git a/packages/modules/link-modules/src/loaders/container.ts b/packages/modules/link-modules/src/loaders/container.ts index d55dbf9c71..2984099fd0 100644 --- a/packages/modules/link-modules/src/loaders/container.ts +++ b/packages/modules/link-modules/src/loaders/container.ts @@ -6,13 +6,13 @@ import { LoaderOptions, ModuleJoinerConfig, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { composeLinkName, composeTableName, simpleHash, toPascalCase, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { asClass, asValue } from "awilix" export function containerLoader(entity, joinerConfig: ModuleJoinerConfig) { return async ( diff --git a/packages/modules/link-modules/src/loaders/index.ts b/packages/modules/link-modules/src/loaders/index.ts index 98cc5ccf04..594db09e7c 100644 --- a/packages/modules/link-modules/src/loaders/index.ts +++ b/packages/modules/link-modules/src/loaders/index.ts @@ -2,7 +2,7 @@ import { JoinerRelationship, ModuleJoinerConfig, ModuleLoaderFunction, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { generateEntity } from "../utils" import { connectionLoader } from "./connection" diff --git a/packages/modules/link-modules/src/migration/index.ts b/packages/modules/link-modules/src/migration/index.ts index 43a0d4c366..962714e2d6 100644 --- a/packages/modules/link-modules/src/migration/index.ts +++ b/packages/modules/link-modules/src/migration/index.ts @@ -4,14 +4,14 @@ import { ModuleJoinerConfig, ModuleServiceInitializeOptions, PlannerActionLinkDescriptor, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { DALUtils, ModulesSdkUtils, arrayDifference, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntitySchema, MikroORM } from "@mikro-orm/core" import { DatabaseSchema, PostgreSqlDriver } from "@mikro-orm/postgresql" import { generateEntity } from "../utils" diff --git a/packages/modules/link-modules/src/repositories/index.ts b/packages/modules/link-modules/src/repositories/index.ts index 7f222e85fd..0b6b62463f 100644 --- a/packages/modules/link-modules/src/repositories/index.ts +++ b/packages/modules/link-modules/src/repositories/index.ts @@ -1,2 +1,2 @@ -export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" export { getLinkRepository } from "./link" diff --git a/packages/modules/link-modules/src/repositories/link.ts b/packages/modules/link-modules/src/repositories/link.ts index 272e6294c3..116bf500e4 100644 --- a/packages/modules/link-modules/src/repositories/link.ts +++ b/packages/modules/link-modules/src/repositories/link.ts @@ -1,10 +1,10 @@ -import { Context, ModuleJoinerConfig } from "@medusajs/types" +import { Context, ModuleJoinerConfig } from "@medusajs/framework/types" import { EntitySchema } from "@mikro-orm/core" import { generateEntityId, mikroOrmBaseRepositoryFactory, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { SqlEntityManager } from "@mikro-orm/postgresql" export function getLinkRepository(model: EntitySchema) { diff --git a/packages/modules/link-modules/src/services/dynamic-service-class.ts b/packages/modules/link-modules/src/services/dynamic-service-class.ts index a53f6100ac..3766fb33a0 100644 --- a/packages/modules/link-modules/src/services/dynamic-service-class.ts +++ b/packages/modules/link-modules/src/services/dynamic-service-class.ts @@ -1,5 +1,9 @@ -import { Constructor, ILinkModule, ModuleJoinerConfig } from "@medusajs/types" -import { isDefined } from "@medusajs/utils" +import { + Constructor, + ILinkModule, + ModuleJoinerConfig, +} from "@medusajs/framework/types" +import { isDefined } from "@medusajs/framework/utils" import { LinkModuleService } from "@services" export function getModuleService( diff --git a/packages/modules/link-modules/src/services/link-module-service.ts b/packages/modules/link-modules/src/services/link-module-service.ts index 9bf627326a..84860bf38a 100644 --- a/packages/modules/link-modules/src/services/link-module-service.ts +++ b/packages/modules/link-modules/src/services/link-module-service.ts @@ -8,7 +8,7 @@ import { ModuleJoinerConfig, RestoreReturn, SoftDeleteReturn, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { CommonEvents, InjectManager, @@ -20,7 +20,7 @@ import { MedusaError, Modules, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { LinkService } from "@services" import { shouldForceTransaction } from "../utils" diff --git a/packages/modules/link-modules/src/services/link.ts b/packages/modules/link-modules/src/services/link.ts index 2b6094e903..fbc02ddfc6 100644 --- a/packages/modules/link-modules/src/services/link.ts +++ b/packages/modules/link-modules/src/services/link.ts @@ -1,10 +1,10 @@ -import { Context, FindConfig } from "@medusajs/types" +import { Context, FindConfig } from "@medusajs/framework/types" import { InjectManager, InjectTransactionManager, MedusaContext, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { doNotForceTransaction } from "../utils" type InjectedDependencies = { diff --git a/packages/modules/link-modules/src/types/index.ts b/packages/modules/link-modules/src/types/index.ts index 0f252977b0..e33cf96478 100644 --- a/packages/modules/link-modules/src/types/index.ts +++ b/packages/modules/link-modules/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/link-modules/src/utils/compress-name.ts b/packages/modules/link-modules/src/utils/compress-name.ts index 7b3c446515..b32809f7b8 100644 --- a/packages/modules/link-modules/src/utils/compress-name.ts +++ b/packages/modules/link-modules/src/utils/compress-name.ts @@ -1,4 +1,4 @@ -import { camelToSnakeCase, simpleHash } from "@medusajs/utils" +import { camelToSnakeCase, simpleHash } from "@medusajs/framework/utils" export function compressName(name: string, limit = 58) { if (name.length <= limit) { diff --git a/packages/modules/link-modules/src/utils/generate-entity.ts b/packages/modules/link-modules/src/utils/generate-entity.ts index 47ed031f34..c5c0f3391b 100644 --- a/packages/modules/link-modules/src/utils/generate-entity.ts +++ b/packages/modules/link-modules/src/utils/generate-entity.ts @@ -1,10 +1,13 @@ -import { JoinerRelationship, ModuleJoinerConfig } from "@medusajs/types" +import { + JoinerRelationship, + ModuleJoinerConfig, +} from "@medusajs/framework/types" import { SoftDeletableFilterKey, composeTableName, mikroOrmSoftDeletableFilterOptions, simpleHash, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { EntitySchema } from "@mikro-orm/core" import { compressName } from "./compress-name" diff --git a/packages/modules/link-modules/src/utils/generate-schema.ts b/packages/modules/link-modules/src/utils/generate-schema.ts index d57846ee49..aefb9fa49d 100644 --- a/packages/modules/link-modules/src/utils/generate-schema.ts +++ b/packages/modules/link-modules/src/utils/generate-schema.ts @@ -1,12 +1,15 @@ -import { MedusaModule } from "@medusajs/modules-sdk" -import { ModuleJoinerConfig, ModuleJoinerRelationship } from "@medusajs/types" +import { MedusaModule } from "@medusajs/framework/modules-sdk" +import { + ModuleJoinerConfig, + ModuleJoinerRelationship, +} from "@medusajs/framework/types" import { camelToSnakeCase, composeTableName, isString, lowerCaseFirst, toPascalCase, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export function generateGraphQLSchema( joinerConfig: ModuleJoinerConfig, diff --git a/packages/modules/link-modules/src/utils/index.ts b/packages/modules/link-modules/src/utils/index.ts index 29115e423f..3885bea721 100644 --- a/packages/modules/link-modules/src/utils/index.ts +++ b/packages/modules/link-modules/src/utils/index.ts @@ -1,4 +1,4 @@ -import { MODULE_RESOURCE_TYPE } from "@medusajs/modules-sdk" +import { MODULE_RESOURCE_TYPE } from "@medusajs/framework/modules-sdk" export * from "./generate-entity" export * from "./generate-schema" diff --git a/packages/modules/notification/integration-tests/__fixtures__/providers/default-provider.ts b/packages/modules/notification/integration-tests/__fixtures__/providers/default-provider.ts index 17620ee7a5..b30e58ede3 100644 --- a/packages/modules/notification/integration-tests/__fixtures__/providers/default-provider.ts +++ b/packages/modules/notification/integration-tests/__fixtures__/providers/default-provider.ts @@ -1,5 +1,5 @@ -import { NotificationTypes } from "@medusajs/types" -import { AbstractNotificationProviderService } from "@medusajs/utils" +import { NotificationTypes } from "@medusajs/framework/types" +import { AbstractNotificationProviderService } from "@medusajs/framework/utils" export class NotificationProviderServiceFixtures extends AbstractNotificationProviderService { static identifier = "fixtures-notification-provider" diff --git a/packages/modules/notification/integration-tests/__tests__/notification-module-service/index.spec.ts b/packages/modules/notification/integration-tests/__tests__/notification-module-service/index.spec.ts index 575a728c35..d30deda473 100644 --- a/packages/modules/notification/integration-tests/__tests__/notification-module-service/index.spec.ts +++ b/packages/modules/notification/integration-tests/__tests__/notification-module-service/index.spec.ts @@ -1,4 +1,4 @@ -import { INotificationModuleService } from "@medusajs/types" +import { INotificationModuleService } from "@medusajs/framework/types" import { CommonEvents, composeMessage, @@ -6,7 +6,7 @@ import { Modules, NotificationEvents, NotificationStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { NotificationModuleService } from "@services" import { MockEventBusService, diff --git a/packages/modules/notification/mikro-orm.config.dev.ts b/packages/modules/notification/mikro-orm.config.dev.ts index ca687ffc53..4c047a33fc 100644 --- a/packages/modules/notification/mikro-orm.config.dev.ts +++ b/packages/modules/notification/mikro-orm.config.dev.ts @@ -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.NOTIFICATION, { entities: Object.values(entities), diff --git a/packages/modules/notification/package.json b/packages/modules/notification/package.json index 25e1ec2f60..d14a6e1f17 100644 --- a/packages/modules/notification/package.json +++ b/packages/modules/notification/package.json @@ -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", @@ -47,11 +47,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", diff --git a/packages/modules/notification/src/index.ts b/packages/modules/notification/src/index.ts index 4a93106ade..1808b7064c 100644 --- a/packages/modules/notification/src/index.ts +++ b/packages/modules/notification/src/index.ts @@ -1,6 +1,6 @@ import { NotificationModuleService } from "@services" import loadProviders from "./loaders/providers" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.NOTIFICATION, { service: NotificationModuleService, diff --git a/packages/modules/notification/src/loaders/providers.ts b/packages/modules/notification/src/loaders/providers.ts index ad6aef5871..8529a40536 100644 --- a/packages/modules/notification/src/loaders/providers.ts +++ b/packages/modules/notification/src/loaders/providers.ts @@ -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 { NotificationProvider } from "@models" import { NotificationProviderService } from "@services" import { diff --git a/packages/modules/notification/src/models/notification-provider.ts b/packages/modules/notification/src/models/notification-provider.ts index e5548308e9..4b7ad482c4 100644 --- a/packages/modules/notification/src/models/notification-provider.ts +++ b/packages/modules/notification/src/models/notification-provider.ts @@ -1,4 +1,4 @@ -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import { Notification } from "./notification" export const NotificationProvider = model.define("notificationProvider", { diff --git a/packages/modules/notification/src/models/notification.ts b/packages/modules/notification/src/models/notification.ts index 451c564011..4b178beeb8 100644 --- a/packages/modules/notification/src/models/notification.ts +++ b/packages/modules/notification/src/models/notification.ts @@ -1,4 +1,4 @@ -import { model, NotificationStatus } from "@medusajs/utils" +import { model, NotificationStatus } from "@medusajs/framework/utils" import { NotificationProvider } from "./notification-provider" // We probably want to have a TTL for each entry, so we don't bloat the DB (and also for GDPR reasons if TTL < 30 days). diff --git a/packages/modules/notification/src/services/notification-module-service.ts b/packages/modules/notification/src/services/notification-module-service.ts index 60a222c5d1..f405505593 100644 --- a/packages/modules/notification/src/services/notification-module-service.ts +++ b/packages/modules/notification/src/services/notification-module-service.ts @@ -6,7 +6,7 @@ import { InternalModuleDeclaration, ModulesSdkTypes, NotificationTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { EmitEvents, generateEntityId, @@ -16,7 +16,7 @@ import { MedusaService, NotificationStatus, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Notification } from "@models" import { eventBuilders } from "@utils" import NotificationProviderService from "./notification-provider" diff --git a/packages/modules/notification/src/services/notification-provider.ts b/packages/modules/notification/src/services/notification-provider.ts index f1d39aec2a..9b08b8b74c 100644 --- a/packages/modules/notification/src/services/notification-provider.ts +++ b/packages/modules/notification/src/services/notification-provider.ts @@ -1,5 +1,9 @@ -import { DAL, InferEntityType, NotificationTypes } from "@medusajs/types" -import { MedusaError, ModulesSdkUtils } from "@medusajs/utils" +import { + DAL, + InferEntityType, + NotificationTypes, +} from "@medusajs/framework/types" +import { MedusaError, ModulesSdkUtils } from "@medusajs/framework/utils" import { NotificationProvider } from "@models" import { NotificationProviderRegistrationPrefix } from "@types" diff --git a/packages/modules/notification/src/types/index.ts b/packages/modules/notification/src/types/index.ts index 3b8e900bbd..f312c54952 100644 --- a/packages/modules/notification/src/types/index.ts +++ b/packages/modules/notification/src/types/index.ts @@ -2,7 +2,7 @@ import { Logger, ModuleProviderExports, ModuleServiceInitializeOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/notification/src/utils/events.ts b/packages/modules/notification/src/utils/events.ts index 67b2efaeef..6703ca901f 100644 --- a/packages/modules/notification/src/utils/events.ts +++ b/packages/modules/notification/src/utils/events.ts @@ -3,7 +3,7 @@ import { moduleEventBuilderFactory, Modules, NotificationEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const eventBuilders = { createdNotification: moduleEventBuilderFactory({ diff --git a/packages/modules/order/integration-tests/__tests__/create-order.ts b/packages/modules/order/integration-tests/__tests__/create-order.ts index f44aae134e..a4a67b5974 100644 --- a/packages/modules/order/integration-tests/__tests__/create-order.ts +++ b/packages/modules/order/integration-tests/__tests__/create-order.ts @@ -1,5 +1,5 @@ -import { CreateOrderDTO, IOrderModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { CreateOrderDTO, IOrderModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/integration-tests/__tests__/index.spec.ts b/packages/modules/order/integration-tests/__tests__/index.spec.ts index cab174f438..6e47b50276 100644 --- a/packages/modules/order/integration-tests/__tests__/index.spec.ts +++ b/packages/modules/order/integration-tests/__tests__/index.spec.ts @@ -1,5 +1,5 @@ -import { IOrderModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IOrderModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { OrderModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/order/integration-tests/__tests__/order-claim.ts b/packages/modules/order/integration-tests/__tests__/order-claim.ts index 5caf179e3d..058a95c0f6 100644 --- a/packages/modules/order/integration-tests/__tests__/order-claim.ts +++ b/packages/modules/order/integration-tests/__tests__/order-claim.ts @@ -1,5 +1,5 @@ -import { CreateOrderDTO, IOrderModuleService } from "@medusajs/types" -import { ClaimType, Modules } from "@medusajs/utils" +import { CreateOrderDTO, IOrderModuleService } from "@medusajs/framework/types" +import { ClaimType, Modules } from "@medusajs/framework/utils" import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/integration-tests/__tests__/order-edit.ts b/packages/modules/order/integration-tests/__tests__/order-edit.ts index 663aa6d559..4fc0ba90bc 100644 --- a/packages/modules/order/integration-tests/__tests__/order-edit.ts +++ b/packages/modules/order/integration-tests/__tests__/order-edit.ts @@ -3,8 +3,8 @@ import { CreateOrderChangeDTO, CreateOrderDTO, IOrderModuleService, -} from "@medusajs/types" -import { BigNumber, ChangeActionType, Modules } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { BigNumber, ChangeActionType, Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/integration-tests/__tests__/order-exchange.ts b/packages/modules/order/integration-tests/__tests__/order-exchange.ts index db4bbaec54..327f0a3bda 100644 --- a/packages/modules/order/integration-tests/__tests__/order-exchange.ts +++ b/packages/modules/order/integration-tests/__tests__/order-exchange.ts @@ -1,5 +1,5 @@ -import { CreateOrderDTO, IOrderModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { CreateOrderDTO, IOrderModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { SuiteOptions, moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/integration-tests/__tests__/order-items-shipping.spec.ts b/packages/modules/order/integration-tests/__tests__/order-items-shipping.spec.ts index 48e87a8b08..0a5c2adb02 100644 --- a/packages/modules/order/integration-tests/__tests__/order-items-shipping.spec.ts +++ b/packages/modules/order/integration-tests/__tests__/order-items-shipping.spec.ts @@ -1,8 +1,8 @@ import { CreateOrderLineItemTaxLineDTO, IOrderModuleService, -} from "@medusajs/types" -import { Modules, OrderStatus } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules, OrderStatus } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/integration-tests/__tests__/order-return.ts b/packages/modules/order/integration-tests/__tests__/order-return.ts index ceeb01e28b..1c00d8ff2c 100644 --- a/packages/modules/order/integration-tests/__tests__/order-return.ts +++ b/packages/modules/order/integration-tests/__tests__/order-return.ts @@ -1,5 +1,5 @@ -import { CreateOrderDTO, IOrderModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { CreateOrderDTO, IOrderModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(1000000) diff --git a/packages/modules/order/integration-tests/__tests__/returns.ts b/packages/modules/order/integration-tests/__tests__/returns.ts index a17142dd98..b0b89b0b52 100644 --- a/packages/modules/order/integration-tests/__tests__/returns.ts +++ b/packages/modules/order/integration-tests/__tests__/returns.ts @@ -1,5 +1,5 @@ -import { IOrderModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IOrderModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" jest.setTimeout(100000) diff --git a/packages/modules/order/mikro-orm.config.dev.ts b/packages/modules/order/mikro-orm.config.dev.ts index 5b46ffe9dd..c95217c47f 100644 --- a/packages/modules/order/mikro-orm.config.dev.ts +++ b/packages/modules/order/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.ORDER, { diff --git a/packages/modules/order/package.json b/packages/modules/order/package.json index 0068c6f011..0e2ea38017 100644 --- a/packages/modules/order/package.json +++ b/packages/modules/order/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/order/src/index.ts b/packages/modules/order/src/index.ts index 13dfbbb48d..79fb95e9d0 100644 --- a/packages/modules/order/src/index.ts +++ b/packages/modules/order/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { OrderModuleService } from "@services" export default Module(Modules.ORDER, { diff --git a/packages/modules/order/src/joiner-config.ts b/packages/modules/order/src/joiner-config.ts index ee502c7d97..edc6873ad1 100644 --- a/packages/modules/order/src/joiner-config.ts +++ b/packages/modules/order/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { Order, OrderAddress, diff --git a/packages/modules/order/src/migrations/Migration20240219102530.ts b/packages/modules/order/src/migrations/Migration20240219102530.ts index c1c48fd779..b475cf185f 100644 --- a/packages/modules/order/src/migrations/Migration20240219102530.ts +++ b/packages/modules/order/src/migrations/Migration20240219102530.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class Migration20240219102530 extends Migration { diff --git a/packages/modules/order/src/models/address.ts b/packages/modules/order/src/models/address.ts index 970d3cda4b..83d7d0e7c1 100644 --- a/packages/modules/order/src/models/address.ts +++ b/packages/modules/order/src/models/address.ts @@ -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, diff --git a/packages/modules/order/src/models/adjustment-line.ts b/packages/modules/order/src/models/adjustment-line.ts index e87da7d466..567051ec5d 100644 --- a/packages/modules/order/src/models/adjustment-line.ts +++ b/packages/modules/order/src/models/adjustment-line.ts @@ -1,5 +1,5 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" -import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/utils" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" +import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/framework/utils" import { OptionalProps, PrimaryKey, Property } from "@mikro-orm/core" type OptionalAdjustmentLineProps = DAL.ModelDateColumns diff --git a/packages/modules/order/src/models/claim-item-image.ts b/packages/modules/order/src/models/claim-item-image.ts index 2bf5f8b07f..3c6d1f3264 100644 --- a/packages/modules/order/src/models/claim-item-image.ts +++ b/packages/modules/order/src/models/claim-item-image.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/claim-item.ts b/packages/modules/order/src/models/claim-item.ts index b23240164a..fe90bc20f1 100644 --- a/packages/modules/order/src/models/claim-item.ts +++ b/packages/modules/order/src/models/claim-item.ts @@ -1,10 +1,10 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { ClaimReason, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/claim.ts b/packages/modules/order/src/models/claim.ts index ce7f010f56..9839930981 100644 --- a/packages/modules/order/src/models/claim.ts +++ b/packages/modules/order/src/models/claim.ts @@ -1,4 +1,4 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, ClaimType, @@ -6,7 +6,7 @@ import { MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/exchange-item.ts b/packages/modules/order/src/models/exchange-item.ts index 1173170ac5..9564d39b84 100644 --- a/packages/modules/order/src/models/exchange-item.ts +++ b/packages/modules/order/src/models/exchange-item.ts @@ -1,9 +1,9 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/exchange.ts b/packages/modules/order/src/models/exchange.ts index 7855296860..34fb61abd6 100644 --- a/packages/modules/order/src/models/exchange.ts +++ b/packages/modules/order/src/models/exchange.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/line-item-adjustment.ts b/packages/modules/order/src/models/line-item-adjustment.ts index fe4e4cfb3f..3fe70618a5 100644 --- a/packages/modules/order/src/models/line-item-adjustment.ts +++ b/packages/modules/order/src/models/line-item-adjustment.ts @@ -1,7 +1,7 @@ import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core" import AdjustmentLine from "./adjustment-line" import OrderLineItem from "./line-item" diff --git a/packages/modules/order/src/models/line-item-tax-line.ts b/packages/modules/order/src/models/line-item-tax-line.ts index b1ef83902a..4770cb4532 100644 --- a/packages/modules/order/src/models/line-item-tax-line.ts +++ b/packages/modules/order/src/models/line-item-tax-line.ts @@ -1,7 +1,7 @@ import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/line-item.ts b/packages/modules/order/src/models/line-item.ts index c9f1edb80b..23008ce81b 100644 --- a/packages/modules/order/src/models/line-item.ts +++ b/packages/modules/order/src/models/line-item.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/order-change-action.ts b/packages/modules/order/src/models/order-change-action.ts index 1f64b9166d..70fb16a5e3 100644 --- a/packages/modules/order/src/models/order-change-action.ts +++ b/packages/modules/order/src/models/order-change-action.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/order-change.ts b/packages/modules/order/src/models/order-change.ts index 9a62402c7e..efa172e7a4 100644 --- a/packages/modules/order/src/models/order-change.ts +++ b/packages/modules/order/src/models/order-change.ts @@ -1,10 +1,10 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, OrderChangeStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, @@ -20,7 +20,7 @@ import { Property, Rel, } from "@mikro-orm/core" -import { } from "@types" +import {} from "@types" import OrderClaim from "./claim" import OrderExchange from "./exchange" import Order from "./order" diff --git a/packages/modules/order/src/models/order-item.ts b/packages/modules/order/src/models/order-item.ts index 778b180453..85b873a1f9 100644 --- a/packages/modules/order/src/models/order-item.ts +++ b/packages/modules/order/src/models/order-item.ts @@ -1,10 +1,10 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/order-shipping-method.ts b/packages/modules/order/src/models/order-shipping-method.ts index c2a468459c..98d85cb9cf 100644 --- a/packages/modules/order/src/models/order-shipping-method.ts +++ b/packages/modules/order/src/models/order-shipping-method.ts @@ -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, diff --git a/packages/modules/order/src/models/order-summary.ts b/packages/modules/order/src/models/order-summary.ts index 399c6862e0..dd843b9d7f 100644 --- a/packages/modules/order/src/models/order-summary.ts +++ b/packages/modules/order/src/models/order-summary.ts @@ -2,7 +2,7 @@ import { BigNumber, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/order.ts b/packages/modules/order/src/models/order.ts index 89141913c7..302f1ddc01 100644 --- a/packages/modules/order/src/models/order.ts +++ b/packages/modules/order/src/models/order.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { OrderStatus, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/return-item.ts b/packages/modules/order/src/models/return-item.ts index bc0b835c59..a0e78dd9d6 100644 --- a/packages/modules/order/src/models/return-item.ts +++ b/packages/modules/order/src/models/return-item.ts @@ -1,9 +1,9 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/models/return-reason.ts b/packages/modules/order/src/models/return-reason.ts index 63cac152b6..5ace1f0823 100644 --- a/packages/modules/order/src/models/return-reason.ts +++ b/packages/modules/order/src/models/return-reason.ts @@ -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, Cascade, diff --git a/packages/modules/order/src/models/return.ts b/packages/modules/order/src/models/return.ts index 553c1d4b1a..65bfaf4201 100644 --- a/packages/modules/order/src/models/return.ts +++ b/packages/modules/order/src/models/return.ts @@ -1,4 +1,4 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, @@ -6,7 +6,7 @@ import { ReturnStatus, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/shipping-method-adjustment.ts b/packages/modules/order/src/models/shipping-method-adjustment.ts index 09babe559e..5258694355 100644 --- a/packages/modules/order/src/models/shipping-method-adjustment.ts +++ b/packages/modules/order/src/models/shipping-method-adjustment.ts @@ -1,7 +1,7 @@ import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core" import AdjustmentLine from "./adjustment-line" import OrderShippingMethod from "./shipping-method" diff --git a/packages/modules/order/src/models/shipping-method-tax-line.ts b/packages/modules/order/src/models/shipping-method-tax-line.ts index 86938a7daf..1afba00809 100644 --- a/packages/modules/order/src/models/shipping-method-tax-line.ts +++ b/packages/modules/order/src/models/shipping-method-tax-line.ts @@ -1,7 +1,7 @@ import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, ManyToOne, OnInit, Rel } from "@mikro-orm/core" import OrderShippingMethod from "./shipping-method" import TaxLine from "./tax-line" diff --git a/packages/modules/order/src/models/shipping-method.ts b/packages/modules/order/src/models/shipping-method.ts index 88cd338773..8c9207bbbb 100644 --- a/packages/modules/order/src/models/shipping-method.ts +++ b/packages/modules/order/src/models/shipping-method.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue } from "@medusajs/types" +import { BigNumberRawValue } from "@medusajs/framework/types" import { BigNumber, createPsqlIndexStatementHelper, DALUtils, generateEntityId, MikroOrmBigNumberProperty, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/order/src/models/tax-line.ts b/packages/modules/order/src/models/tax-line.ts index 74933ad31b..2be617fda9 100644 --- a/packages/modules/order/src/models/tax-line.ts +++ b/packages/modules/order/src/models/tax-line.ts @@ -1,5 +1,5 @@ -import { BigNumberRawValue } from "@medusajs/types" -import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/utils" +import { BigNumberRawValue } from "@medusajs/framework/types" +import { BigNumber, MikroOrmBigNumberProperty } from "@medusajs/framework/utils" import { PrimaryKey, Property } from "@mikro-orm/core" /** diff --git a/packages/modules/order/src/models/transaction.ts b/packages/modules/order/src/models/transaction.ts index 4c47a55f98..42ca89608c 100644 --- a/packages/modules/order/src/models/transaction.ts +++ b/packages/modules/order/src/models/transaction.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/order/src/repositories/claim.ts b/packages/modules/order/src/repositories/claim.ts index 8eef6098e4..b24c674ec1 100644 --- a/packages/modules/order/src/repositories/claim.ts +++ b/packages/modules/order/src/repositories/claim.ts @@ -1,4 +1,4 @@ -import { DALUtils } from "@medusajs/utils" +import { DALUtils } from "@medusajs/framework/utils" import { OrderClaim } from "@models" import { setFindMethods } from "../utils/base-repository-find" diff --git a/packages/modules/order/src/repositories/exchange.ts b/packages/modules/order/src/repositories/exchange.ts index 63188310fc..f2d7d82281 100644 --- a/packages/modules/order/src/repositories/exchange.ts +++ b/packages/modules/order/src/repositories/exchange.ts @@ -1,4 +1,4 @@ -import { DALUtils } from "@medusajs/utils" +import { DALUtils } from "@medusajs/framework/utils" import { OrderExchange } from "@models" import { setFindMethods } from "../utils/base-repository-find" diff --git a/packages/modules/order/src/repositories/index.ts b/packages/modules/order/src/repositories/index.ts index a140f601b9..1652966ef7 100644 --- a/packages/modules/order/src/repositories/index.ts +++ b/packages/modules/order/src/repositories/index.ts @@ -1,4 +1,4 @@ -export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" export { OrderClaimRepository } from "./claim" export { OrderRepository } from "./order" export { ReturnRepository } from "./return" diff --git a/packages/modules/order/src/repositories/order.ts b/packages/modules/order/src/repositories/order.ts index d10a500c30..63e98c58e2 100644 --- a/packages/modules/order/src/repositories/order.ts +++ b/packages/modules/order/src/repositories/order.ts @@ -1,4 +1,4 @@ -import { DALUtils } from "@medusajs/utils" +import { DALUtils } from "@medusajs/framework/utils" import { Order } from "@models" import { setFindMethods } from "../utils/base-repository-find" diff --git a/packages/modules/order/src/repositories/return.ts b/packages/modules/order/src/repositories/return.ts index 30e8554b74..9f5c760d8b 100644 --- a/packages/modules/order/src/repositories/return.ts +++ b/packages/modules/order/src/repositories/return.ts @@ -1,4 +1,4 @@ -import { DALUtils } from "@medusajs/utils" +import { DALUtils } from "@medusajs/framework/utils" import { Return } from "@models" import { setFindMethods } from "../utils/base-repository-find" diff --git a/packages/modules/order/src/services/__tests__/util/actions/exchanges.ts b/packages/modules/order/src/services/__tests__/util/actions/exchanges.ts index 5fbcd14e3a..fd1f8bda23 100644 --- a/packages/modules/order/src/services/__tests__/util/actions/exchanges.ts +++ b/packages/modules/order/src/services/__tests__/util/actions/exchanges.ts @@ -1,4 +1,4 @@ -import { ChangeActionType } from "@medusajs/utils" +import { ChangeActionType } from "@medusajs/framework/utils" import { OrderChangeEvent } from "../../../../types" import { calculateOrderChange } from "../../../../utils" diff --git a/packages/modules/order/src/services/__tests__/util/actions/returns.ts b/packages/modules/order/src/services/__tests__/util/actions/returns.ts index fae9f68e37..cd81a9d17b 100644 --- a/packages/modules/order/src/services/__tests__/util/actions/returns.ts +++ b/packages/modules/order/src/services/__tests__/util/actions/returns.ts @@ -1,4 +1,4 @@ -import { ChangeActionType } from "@medusajs/utils" +import { ChangeActionType } from "@medusajs/framework/utils" import { OrderChangeEvent } from "../../../../types" import { calculateOrderChange } from "../../../../utils" diff --git a/packages/modules/order/src/services/actions/cancel-claim.ts b/packages/modules/order/src/services/actions/cancel-claim.ts index 132b020806..34993681e9 100644 --- a/packages/modules/order/src/services/actions/cancel-claim.ts +++ b/packages/modules/order/src/services/actions/cancel-claim.ts @@ -3,8 +3,8 @@ import { CreateOrderChangeActionDTO, OrderClaimDTO, OrderTypes, -} from "@medusajs/types" -import { ChangeActionType, promiseAll } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ChangeActionType, promiseAll } from "@medusajs/framework/utils" async function createOrderChange( service, diff --git a/packages/modules/order/src/services/actions/cancel-exchange.ts b/packages/modules/order/src/services/actions/cancel-exchange.ts index a4d1b7148d..2665f5baab 100644 --- a/packages/modules/order/src/services/actions/cancel-exchange.ts +++ b/packages/modules/order/src/services/actions/cancel-exchange.ts @@ -3,8 +3,8 @@ import { CreateOrderChangeActionDTO, OrderExchangeDTO, OrderTypes, -} from "@medusajs/types" -import { ChangeActionType, promiseAll } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ChangeActionType, promiseAll } from "@medusajs/framework/utils" async function createOrderChange( service, diff --git a/packages/modules/order/src/services/actions/cancel-fulfillment.ts b/packages/modules/order/src/services/actions/cancel-fulfillment.ts index 2ce194cbf2..8ee4c44a46 100644 --- a/packages/modules/order/src/services/actions/cancel-fulfillment.ts +++ b/packages/modules/order/src/services/actions/cancel-fulfillment.ts @@ -1,5 +1,5 @@ -import { Context, OrderTypes } from "@medusajs/types" -import { ChangeActionType } from "@medusajs/utils" +import { Context, OrderTypes } from "@medusajs/framework/types" +import { ChangeActionType } from "@medusajs/framework/utils" export async function cancelFulfillment( this: any, diff --git a/packages/modules/order/src/services/actions/cancel-return.ts b/packages/modules/order/src/services/actions/cancel-return.ts index ef43d4e72f..58b80c1c92 100644 --- a/packages/modules/order/src/services/actions/cancel-return.ts +++ b/packages/modules/order/src/services/actions/cancel-return.ts @@ -3,8 +3,8 @@ import { CreateOrderChangeActionDTO, OrderTypes, ReturnDTO, -} from "@medusajs/types" -import { ChangeActionType, promiseAll } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ChangeActionType, promiseAll } from "@medusajs/framework/utils" async function createOrderChange( service, diff --git a/packages/modules/order/src/services/actions/create-claim.ts b/packages/modules/order/src/services/actions/create-claim.ts index 6978477c04..6782806e6c 100644 --- a/packages/modules/order/src/services/actions/create-claim.ts +++ b/packages/modules/order/src/services/actions/create-claim.ts @@ -2,7 +2,7 @@ import { Context, CreateOrderChangeActionDTO, OrderTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ChangeActionType, ClaimType, @@ -11,7 +11,7 @@ import { getShippingMethodsTotals, isString, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { OrderClaim, OrderClaimItem, Return, ReturnItem } from "@models" function createClaimAndReturnEntities(em, data, order) { diff --git a/packages/modules/order/src/services/actions/create-exchange.ts b/packages/modules/order/src/services/actions/create-exchange.ts index d27a980310..97c95c103e 100644 --- a/packages/modules/order/src/services/actions/create-exchange.ts +++ b/packages/modules/order/src/services/actions/create-exchange.ts @@ -2,7 +2,7 @@ import { Context, CreateOrderChangeActionDTO, OrderTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ChangeActionType, OrderChangeType, @@ -10,7 +10,7 @@ import { getShippingMethodsTotals, isString, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { OrderExchange, OrderExchangeItem, Return, ReturnItem } from "@models" function createExchangeAndReturnEntities(em, data, order) { diff --git a/packages/modules/order/src/services/actions/create-return.ts b/packages/modules/order/src/services/actions/create-return.ts index ec1b542dcf..ceedb5776f 100644 --- a/packages/modules/order/src/services/actions/create-return.ts +++ b/packages/modules/order/src/services/actions/create-return.ts @@ -2,7 +2,7 @@ import { Context, CreateOrderChangeActionDTO, OrderTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { ChangeActionType, OrderChangeType, @@ -11,7 +11,7 @@ import { isDefined, isString, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Return, ReturnItem } from "@models" function createReturnReference(em, data, order) { diff --git a/packages/modules/order/src/services/actions/receive-return.ts b/packages/modules/order/src/services/actions/receive-return.ts index 2d77780d2a..142adde8d0 100644 --- a/packages/modules/order/src/services/actions/receive-return.ts +++ b/packages/modules/order/src/services/actions/receive-return.ts @@ -1,11 +1,11 @@ -import { Context, OrderTypes } from "@medusajs/types" +import { Context, OrderTypes } from "@medusajs/framework/types" import { ChangeActionType, MathBN, OrderChangeType, ReturnStatus, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" function createReturnItems(data) { return data.items.map((item) => ({ diff --git a/packages/modules/order/src/services/actions/register-delivery.ts b/packages/modules/order/src/services/actions/register-delivery.ts index 3c2d06a06e..9be866cd52 100644 --- a/packages/modules/order/src/services/actions/register-delivery.ts +++ b/packages/modules/order/src/services/actions/register-delivery.ts @@ -1,5 +1,5 @@ -import { Context, OrderTypes } from "@medusajs/types" -import { ChangeActionType } from "@medusajs/utils" +import { Context, OrderTypes } from "@medusajs/framework/types" +import { ChangeActionType } from "@medusajs/framework/utils" export async function registerDelivery( this: any, diff --git a/packages/modules/order/src/services/actions/register-fulfillment.ts b/packages/modules/order/src/services/actions/register-fulfillment.ts index 0c5a26520c..c328306672 100644 --- a/packages/modules/order/src/services/actions/register-fulfillment.ts +++ b/packages/modules/order/src/services/actions/register-fulfillment.ts @@ -1,5 +1,5 @@ -import { Context, OrderTypes } from "@medusajs/types" -import { ChangeActionType } from "@medusajs/utils" +import { Context, OrderTypes } from "@medusajs/framework/types" +import { ChangeActionType } from "@medusajs/framework/utils" export async function registerFulfillment( this: any, diff --git a/packages/modules/order/src/services/actions/register-shipment.ts b/packages/modules/order/src/services/actions/register-shipment.ts index 68175aeeea..8a00914a21 100644 --- a/packages/modules/order/src/services/actions/register-shipment.ts +++ b/packages/modules/order/src/services/actions/register-shipment.ts @@ -2,8 +2,8 @@ import { Context, CreateOrderChangeActionDTO, OrderTypes, -} from "@medusajs/types" -import { ChangeActionType } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { ChangeActionType } from "@medusajs/framework/utils" export async function registerShipment( this: any, diff --git a/packages/modules/order/src/services/order-module-service.ts b/packages/modules/order/src/services/order-module-service.ts index e31bb5c03e..67cf3e328d 100644 --- a/packages/modules/order/src/services/order-module-service.ts +++ b/packages/modules/order/src/services/order-module-service.ts @@ -16,7 +16,7 @@ import { SoftDeleteReturn, UpdateOrderItemWithSelectorDTO, UpdateOrderReturnReasonDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { BigNumber, createRawPropertiesFromBigNumber, @@ -36,7 +36,7 @@ import { OrderStatus, promiseAll, transformPropertiesToBigNumber, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Order, OrderAddress, diff --git a/packages/modules/order/src/services/order-service.ts b/packages/modules/order/src/services/order-service.ts index 35010daf37..2254d0373b 100644 --- a/packages/modules/order/src/services/order-service.ts +++ b/packages/modules/order/src/services/order-service.ts @@ -4,13 +4,13 @@ import { FindConfig, OrderTypes, RepositoryService, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, MedusaContext, MedusaError, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Order } from "@models" type InjectedDependencies = { diff --git a/packages/modules/order/src/types/address.ts b/packages/modules/order/src/types/address.ts index 027d751460..9a3b3aa8bc 100644 --- a/packages/modules/order/src/types/address.ts +++ b/packages/modules/order/src/types/address.ts @@ -1,4 +1,4 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export type UpsertOrderAddressDTO = OrderTypes.UpsertOrderAddressDTO diff --git a/packages/modules/order/src/types/index.ts b/packages/modules/order/src/types/index.ts index 5d7661af4f..acb88ea6b5 100644 --- a/packages/modules/order/src/types/index.ts +++ b/packages/modules/order/src/types/index.ts @@ -1,4 +1,4 @@ -import { IEventBusModuleService, Logger } from "@medusajs/types" +import { IEventBusModuleService, Logger } from "@medusajs/framework/types" export * from "./address" export * from "./line-item" diff --git a/packages/modules/order/src/types/line-item-adjustment.ts b/packages/modules/order/src/types/line-item-adjustment.ts index 361883a534..6fd47a1e09 100644 --- a/packages/modules/order/src/types/line-item-adjustment.ts +++ b/packages/modules/order/src/types/line-item-adjustment.ts @@ -1,4 +1,4 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export type CreateOrderLineItemAdjustmentDTO = OrderTypes.CreateOrderLineItemAdjustmentDTO diff --git a/packages/modules/order/src/types/line-item.ts b/packages/modules/order/src/types/line-item.ts index 8834b7e087..6bd8ace148 100644 --- a/packages/modules/order/src/types/line-item.ts +++ b/packages/modules/order/src/types/line-item.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" interface PartialUpsertOrderLineItemDTO { subtitle?: string diff --git a/packages/modules/order/src/types/order-change.ts b/packages/modules/order/src/types/order-change.ts index 8711b3fefa..9a24212c77 100644 --- a/packages/modules/order/src/types/order-change.ts +++ b/packages/modules/order/src/types/order-change.ts @@ -1,3 +1,3 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export interface CreateOrderChangeDTO extends OrderTypes.CreateOrderChangeDTO {} diff --git a/packages/modules/order/src/types/order-detail.ts b/packages/modules/order/src/types/order-detail.ts index 6dc8de1bc4..7056175809 100644 --- a/packages/modules/order/src/types/order-detail.ts +++ b/packages/modules/order/src/types/order-detail.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export interface PartialUpsertOrderItemDTO { order_id?: string diff --git a/packages/modules/order/src/types/order.ts b/packages/modules/order/src/types/order.ts index b23483764f..4a9a1b0ace 100644 --- a/packages/modules/order/src/types/order.ts +++ b/packages/modules/order/src/types/order.ts @@ -1,4 +1,4 @@ -import { OrderStatus } from "@medusajs/utils" +import { OrderStatus } from "@medusajs/framework/utils" export interface CreateOrderDTO { region_id?: string diff --git a/packages/modules/order/src/types/return-reason.ts b/packages/modules/order/src/types/return-reason.ts index d3ad589436..c640c2e6a4 100644 --- a/packages/modules/order/src/types/return-reason.ts +++ b/packages/modules/order/src/types/return-reason.ts @@ -1,4 +1,4 @@ -import { UpdateOrderReturnReasonDTO } from "@medusajs/types" +import { UpdateOrderReturnReasonDTO } from "@medusajs/framework/types" export type UpdateReturnReasonDTO = UpdateOrderReturnReasonDTO & { id: string diff --git a/packages/modules/order/src/types/shipping-method-adjustment.ts b/packages/modules/order/src/types/shipping-method-adjustment.ts index 75bfadc6ea..b645336896 100644 --- a/packages/modules/order/src/types/shipping-method-adjustment.ts +++ b/packages/modules/order/src/types/shipping-method-adjustment.ts @@ -1,4 +1,4 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export type CreateOrderShippingMethodAdjustmentDTO = OrderTypes.CreateOrderShippingMethodAdjustmentDTO diff --git a/packages/modules/order/src/types/shipping-method.ts b/packages/modules/order/src/types/shipping-method.ts index 9fbc13d57b..51471d7db8 100644 --- a/packages/modules/order/src/types/shipping-method.ts +++ b/packages/modules/order/src/types/shipping-method.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export interface CreateOrderShippingMethodDTO { name: string diff --git a/packages/modules/order/src/types/tax-line.ts b/packages/modules/order/src/types/tax-line.ts index ccf6bd89f9..a65dfeadf7 100644 --- a/packages/modules/order/src/types/tax-line.ts +++ b/packages/modules/order/src/types/tax-line.ts @@ -1,4 +1,4 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export type CreateOrderTaxLineDTO = OrderTypes.CreateOrderTaxLineDTO diff --git a/packages/modules/order/src/types/transaction.ts b/packages/modules/order/src/types/transaction.ts index 1b508a0e3a..1db375a522 100644 --- a/packages/modules/order/src/types/transaction.ts +++ b/packages/modules/order/src/types/transaction.ts @@ -1,3 +1,3 @@ -import { OrderTypes } from "@medusajs/types" +import { OrderTypes } from "@medusajs/framework/types" export type OrderTransactionDTO = OrderTypes.OrderTransactionDTO diff --git a/packages/modules/order/src/types/utils/index.ts b/packages/modules/order/src/types/utils/index.ts index 50e26a3b4b..0845234463 100644 --- a/packages/modules/order/src/types/utils/index.ts +++ b/packages/modules/order/src/types/utils/index.ts @@ -1,4 +1,4 @@ -import { BigNumberInput } from "@medusajs/types" +import { BigNumberInput } from "@medusajs/framework/types" export type VirtualOrder = { id: string diff --git a/packages/modules/order/src/utils/actions/cancel-item-fulfillment.ts b/packages/modules/order/src/utils/actions/cancel-item-fulfillment.ts index e42280bc21..d7e9eb7e11 100644 --- a/packages/modules/order/src/utils/actions/cancel-item-fulfillment.ts +++ b/packages/modules/order/src/utils/actions/cancel-item-fulfillment.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/cancel-return.ts b/packages/modules/order/src/utils/actions/cancel-return.ts index ca18b074a7..bb71a68f06 100644 --- a/packages/modules/order/src/utils/actions/cancel-return.ts +++ b/packages/modules/order/src/utils/actions/cancel-return.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/deliver-item.ts b/packages/modules/order/src/utils/actions/deliver-item.ts index 53469dea5e..e455f1f6fa 100644 --- a/packages/modules/order/src/utils/actions/deliver-item.ts +++ b/packages/modules/order/src/utils/actions/deliver-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/fulfill-item.ts b/packages/modules/order/src/utils/actions/fulfill-item.ts index 3b667915a3..d090bb7273 100644 --- a/packages/modules/order/src/utils/actions/fulfill-item.ts +++ b/packages/modules/order/src/utils/actions/fulfill-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/item-add.ts b/packages/modules/order/src/utils/actions/item-add.ts index 45b1d316de..f6e206fe78 100644 --- a/packages/modules/order/src/utils/actions/item-add.ts +++ b/packages/modules/order/src/utils/actions/item-add.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { VirtualOrder } from "@types" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/item-remove.ts b/packages/modules/order/src/utils/actions/item-remove.ts index d79f576c4c..ccb3f16050 100644 --- a/packages/modules/order/src/utils/actions/item-remove.ts +++ b/packages/modules/order/src/utils/actions/item-remove.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/item-update.ts b/packages/modules/order/src/utils/actions/item-update.ts index ac144f4c5f..bd21068d60 100644 --- a/packages/modules/order/src/utils/actions/item-update.ts +++ b/packages/modules/order/src/utils/actions/item-update.ts @@ -3,7 +3,7 @@ import { ChangeActionType, MathBN, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/receive-damaged-return-item.ts b/packages/modules/order/src/utils/actions/receive-damaged-return-item.ts index 05e9382ddd..a8dc23b89b 100644 --- a/packages/modules/order/src/utils/actions/receive-damaged-return-item.ts +++ b/packages/modules/order/src/utils/actions/receive-damaged-return-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/receive-return-item.ts b/packages/modules/order/src/utils/actions/receive-return-item.ts index 1ed7041c20..31c43e2049 100644 --- a/packages/modules/order/src/utils/actions/receive-return-item.ts +++ b/packages/modules/order/src/utils/actions/receive-return-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/reinstate-item.ts b/packages/modules/order/src/utils/actions/reinstate-item.ts index 5d208c0b44..1dd84991cb 100644 --- a/packages/modules/order/src/utils/actions/reinstate-item.ts +++ b/packages/modules/order/src/utils/actions/reinstate-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/return-item.ts b/packages/modules/order/src/utils/actions/return-item.ts index 031a20f9d0..db4134bf27 100644 --- a/packages/modules/order/src/utils/actions/return-item.ts +++ b/packages/modules/order/src/utils/actions/return-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/ship-item.ts b/packages/modules/order/src/utils/actions/ship-item.ts index c97c968f9c..582d0c0834 100644 --- a/packages/modules/order/src/utils/actions/ship-item.ts +++ b/packages/modules/order/src/utils/actions/ship-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/shipping-add.ts b/packages/modules/order/src/utils/actions/shipping-add.ts index cfda4b64f2..d1c048e3f0 100644 --- a/packages/modules/order/src/utils/actions/shipping-add.ts +++ b/packages/modules/order/src/utils/actions/shipping-add.ts @@ -1,4 +1,4 @@ -import { ChangeActionType, MedusaError } from "@medusajs/utils" +import { ChangeActionType, MedusaError } from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/actions/shipping-remove.ts b/packages/modules/order/src/utils/actions/shipping-remove.ts index 38b02689ea..c03c3f1b95 100644 --- a/packages/modules/order/src/utils/actions/shipping-remove.ts +++ b/packages/modules/order/src/utils/actions/shipping-remove.ts @@ -1,4 +1,4 @@ -import { ChangeActionType, MedusaError } from "@medusajs/utils" +import { ChangeActionType, MedusaError } from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" OrderChangeProcessing.registerActionType(ChangeActionType.SHIPPING_REMOVE, { diff --git a/packages/modules/order/src/utils/actions/write-off-item.ts b/packages/modules/order/src/utils/actions/write-off-item.ts index feb35e3f6c..a8fdea6256 100644 --- a/packages/modules/order/src/utils/actions/write-off-item.ts +++ b/packages/modules/order/src/utils/actions/write-off-item.ts @@ -1,4 +1,8 @@ -import { ChangeActionType, MathBN, MedusaError } from "@medusajs/utils" +import { + ChangeActionType, + MathBN, + MedusaError, +} from "@medusajs/framework/utils" import { OrderChangeProcessing } from "../calculate-order-change" import { setActionReference } from "../set-action-reference" diff --git a/packages/modules/order/src/utils/apply-order-changes.ts b/packages/modules/order/src/utils/apply-order-changes.ts index 0899d91c37..ff71e4210c 100644 --- a/packages/modules/order/src/utils/apply-order-changes.ts +++ b/packages/modules/order/src/utils/apply-order-changes.ts @@ -1,10 +1,10 @@ -import { OrderChangeActionDTO } from "@medusajs/types" +import { OrderChangeActionDTO } from "@medusajs/framework/types" import { ChangeActionType, MathBN, createRawPropertiesFromBigNumber, isDefined, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { OrderItem, OrderShippingMethod } from "@models" import { calculateOrderChange } from "./calculate-order-change" diff --git a/packages/modules/order/src/utils/base-repository-find.ts b/packages/modules/order/src/utils/base-repository-find.ts index 87fb6e0391..7bb9a5cbf0 100644 --- a/packages/modules/order/src/utils/base-repository-find.ts +++ b/packages/modules/order/src/utils/base-repository-find.ts @@ -1,4 +1,4 @@ -import { Constructor, Context, DAL } from "@medusajs/types" +import { Constructor, Context, DAL } from "@medusajs/framework/types" import { LoadStrategy } from "@mikro-orm/core" import { Order, OrderClaim } from "@models" import { mapRepositoryToOrderModel } from "." diff --git a/packages/modules/order/src/utils/calculate-order-change.ts b/packages/modules/order/src/utils/calculate-order-change.ts index 7c41890ad5..b1e1800122 100644 --- a/packages/modules/order/src/utils/calculate-order-change.ts +++ b/packages/modules/order/src/utils/calculate-order-change.ts @@ -1,10 +1,10 @@ -import { BigNumberInput, OrderSummaryDTO } from "@medusajs/types" +import { BigNumberInput, OrderSummaryDTO } from "@medusajs/framework/types" import { BigNumber, MathBN, isPresent, transformPropertiesToBigNumber, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ActionTypeDefinition, EVENT_STATUS, diff --git a/packages/modules/order/src/utils/transform-order.ts b/packages/modules/order/src/utils/transform-order.ts index 687114ea53..d0942f1db4 100644 --- a/packages/modules/order/src/utils/transform-order.ts +++ b/packages/modules/order/src/utils/transform-order.ts @@ -4,7 +4,7 @@ import { deduplicate, isDefined, isObject, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" // Reshape the order object to match the OrderDTO // This function is used to format the order object before returning to the main module methods diff --git a/packages/modules/payment/integration-tests/__tests__/loaders/providers.spec.ts b/packages/modules/payment/integration-tests/__tests__/loaders/providers.spec.ts index df72ee2fb2..eb88ee8c1a 100644 --- a/packages/modules/payment/integration-tests/__tests__/loaders/providers.spec.ts +++ b/packages/modules/payment/integration-tests/__tests__/loaders/providers.spec.ts @@ -1,7 +1,7 @@ -import { IPaymentModuleService } from "@medusajs/types" +import { IPaymentModuleService } from "@medusajs/framework/types" import { moduleIntegrationTestRunner } from "medusa-test-utils" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" jest.setTimeout(30000) diff --git a/packages/modules/payment/integration-tests/__tests__/services/payment-module/index.spec.ts b/packages/modules/payment/integration-tests/__tests__/services/payment-module/index.spec.ts index 64c41ee3cb..d3e9338715 100644 --- a/packages/modules/payment/integration-tests/__tests__/services/payment-module/index.spec.ts +++ b/packages/modules/payment/integration-tests/__tests__/services/payment-module/index.spec.ts @@ -1,5 +1,5 @@ -import { IPaymentModuleService } from "@medusajs/types" -import { Module, Modules, promiseAll } from "@medusajs/utils" +import { IPaymentModuleService } from "@medusajs/framework/types" +import { Module, Modules, promiseAll } from "@medusajs/framework/utils" import { PaymentModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { diff --git a/packages/modules/payment/mikro-orm.config.dev.ts b/packages/modules/payment/mikro-orm.config.dev.ts index 52f2951a36..0123261153 100644 --- a/packages/modules/payment/mikro-orm.config.dev.ts +++ b/packages/modules/payment/mikro-orm.config.dev.ts @@ -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.PAYMENT, { entities: Object.values(entities), diff --git a/packages/modules/payment/package.json b/packages/modules/payment/package.json index baf0d8ec03..abebaa3c34 100644 --- a/packages/modules/payment/package.json +++ b/packages/modules/payment/package.json @@ -37,8 +37,9 @@ "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", + "bignumber.js": "*", "cross-env": "^5.2.1", "jest": "^29.7.0", "medusa-test-utils": "^1.1.44", @@ -48,11 +49,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", diff --git a/packages/modules/payment/src/index.ts b/packages/modules/payment/src/index.ts index 504dbeb5fd..19710fc9fc 100644 --- a/packages/modules/payment/src/index.ts +++ b/packages/modules/payment/src/index.ts @@ -1,6 +1,6 @@ import { PaymentModuleService } from "@services" import loadProviders from "./loaders/providers" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.PAYMENT, { service: PaymentModuleService, diff --git a/packages/modules/payment/src/joiner-config.ts b/packages/modules/payment/src/joiner-config.ts index cf4e9a0d5b..edadd259ae 100644 --- a/packages/modules/payment/src/joiner-config.ts +++ b/packages/modules/payment/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { Payment, PaymentCollection, diff --git a/packages/modules/payment/src/loaders/providers.ts b/packages/modules/payment/src/loaders/providers.ts index b657918718..41d9a9f32d 100644 --- a/packages/modules/payment/src/loaders/providers.ts +++ b/packages/modules/payment/src/loaders/providers.ts @@ -1,10 +1,10 @@ -import { moduleProviderLoader } from "@medusajs/modules-sdk" +import { moduleProviderLoader } from "@medusajs/framework/modules-sdk" import { CreatePaymentProviderDTO, LoaderOptions, ModuleProvider, ModulesSdkTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { Lifetime, asFunction, asValue } from "awilix" import { PaymentProviderService } from "@services" diff --git a/packages/modules/payment/src/migrations/Migration20240225134525.ts b/packages/modules/payment/src/migrations/Migration20240225134525.ts index cba7dba7d2..859808c8dc 100644 --- a/packages/modules/payment/src/migrations/Migration20240225134525.ts +++ b/packages/modules/payment/src/migrations/Migration20240225134525.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class Migration20240225134525 extends Migration { diff --git a/packages/modules/payment/src/models/capture.ts b/packages/modules/payment/src/models/capture.ts index f99c6410ce..94a5b4ff93 100644 --- a/packages/modules/payment/src/models/capture.ts +++ b/packages/modules/payment/src/models/capture.ts @@ -1,9 +1,9 @@ -import { BigNumberRawValue } from "@medusajs/types" +import { BigNumberRawValue } from "@medusajs/framework/types" import { BigNumber, MikroOrmBigNumberProperty, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/payment/src/models/payment-collection.ts b/packages/modules/payment/src/models/payment-collection.ts index aca053831d..d4e178496a 100644 --- a/packages/modules/payment/src/models/payment-collection.ts +++ b/packages/modules/payment/src/models/payment-collection.ts @@ -1,11 +1,11 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, MikroOrmBigNumberProperty, PaymentCollectionStatus, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/payment/src/models/payment-method-token.ts b/packages/modules/payment/src/models/payment-method-token.ts index dbad27a306..2944f232ca 100644 --- a/packages/modules/payment/src/models/payment-method-token.ts +++ b/packages/modules/payment/src/models/payment-method-token.ts @@ -1,4 +1,4 @@ -import { generateEntityId } from "@medusajs/utils" +import { generateEntityId } from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/payment/src/models/payment-session.ts b/packages/modules/payment/src/models/payment-session.ts index d4341ae475..6375d81215 100644 --- a/packages/modules/payment/src/models/payment-session.ts +++ b/packages/modules/payment/src/models/payment-session.ts @@ -1,10 +1,10 @@ -import { BigNumberRawValue } from "@medusajs/types" +import { BigNumberRawValue } from "@medusajs/framework/types" import { BigNumber, generateEntityId, MikroOrmBigNumberProperty, PaymentSessionStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/payment/src/models/payment.ts b/packages/modules/payment/src/models/payment.ts index ae3248bf43..c64582fcf5 100644 --- a/packages/modules/payment/src/models/payment.ts +++ b/packages/modules/payment/src/models/payment.ts @@ -1,4 +1,4 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, DALUtils, @@ -6,7 +6,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/payment/src/models/refund-reason.ts b/packages/modules/payment/src/models/refund-reason.ts index c42aaeb5d5..d32b3d7bb3 100644 --- a/packages/modules/payment/src/models/refund-reason.ts +++ b/packages/modules/payment/src/models/refund-reason.ts @@ -1,4 +1,8 @@ -import { DALUtils, generateEntityId, Searchable } from "@medusajs/utils" +import { + DALUtils, + generateEntityId, + Searchable, +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/payment/src/models/refund.ts b/packages/modules/payment/src/models/refund.ts index 7114892350..f7627c79b5 100644 --- a/packages/modules/payment/src/models/refund.ts +++ b/packages/modules/payment/src/models/refund.ts @@ -1,9 +1,9 @@ -import { BigNumberRawValue, DAL } from "@medusajs/types" +import { BigNumberRawValue, DAL } from "@medusajs/framework/types" import { BigNumber, MikroOrmBigNumberProperty, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/payment/src/providers/system.ts b/packages/modules/payment/src/providers/system.ts index 88c61e5675..0a3a016ef9 100644 --- a/packages/modules/payment/src/providers/system.ts +++ b/packages/modules/payment/src/providers/system.ts @@ -4,12 +4,12 @@ import { PaymentProviderSessionResponse, ProviderWebhookPayload, WebhookActionResult, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractPaymentProvider, PaymentActions, PaymentSessionStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export class SystemProviderService extends AbstractPaymentProvider { static identifier = "system" diff --git a/packages/modules/payment/src/services/payment-module.ts b/packages/modules/payment/src/services/payment-module.ts index 959a7a62ea..2966cbda9d 100644 --- a/packages/modules/payment/src/services/payment-module.ts +++ b/packages/modules/payment/src/services/payment-module.ts @@ -27,7 +27,7 @@ import { UpdatePaymentDTO, UpdatePaymentSessionDTO, UpsertPaymentCollectionDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { BigNumber, InjectManager, @@ -41,7 +41,7 @@ import { PaymentCollectionStatus, PaymentSessionStatus, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Capture, Payment, diff --git a/packages/modules/payment/src/services/payment-provider.ts b/packages/modules/payment/src/services/payment-provider.ts index 6cd1dd6477..919689525d 100644 --- a/packages/modules/payment/src/services/payment-provider.ts +++ b/packages/modules/payment/src/services/payment-provider.ts @@ -11,12 +11,12 @@ import { ProviderWebhookPayload, UpdatePaymentProviderSession, WebhookActionResult, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { isPaymentProviderError, MedusaError, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { PaymentProvider } from "@models" import { EOL } from "os" diff --git a/packages/modules/payment/src/types/index.ts b/packages/modules/payment/src/types/index.ts index bee03db2db..f19bd65ca7 100644 --- a/packages/modules/payment/src/types/index.ts +++ b/packages/modules/payment/src/types/index.ts @@ -2,7 +2,7 @@ import { Logger, ModuleProviderExports, ModuleServiceInitializeOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/data.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/data.ts index 83394428ac..c8e18f9b9d 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/data.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/data.ts @@ -1,4 +1,4 @@ -import { CreatePriceRuleDTO } from "@medusajs/types" +import { CreatePriceRuleDTO } from "@medusajs/framework/types" export * from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts index 1df682da38..c4578f16ee 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-rule/index.ts @@ -1,6 +1,6 @@ import { PriceRule } from "@models" -import { CreatePriceRuleDTO } from "@medusajs/types" +import { CreatePriceRuleDTO } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" import { defaultPriceRuleData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-set/data.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-set/data.ts index ce4d60c77f..732740dca5 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-set/data.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-set/data.ts @@ -1,4 +1,4 @@ -import { CreatePriceSetDTO } from "@medusajs/types" +import { CreatePriceSetDTO } from "@medusajs/framework/types" export const defaultPriceSetsData = [ { diff --git a/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts b/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts index f7e0100cc0..688055c513 100644 --- a/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts +++ b/packages/modules/pricing/integration-tests/__fixtures__/price-set/index.ts @@ -1,4 +1,4 @@ -import { CreatePriceSetDTO } from "@medusajs/types" +import { CreatePriceSetDTO } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" import { Price, PriceSet } from "@models" import { defaultPriceSetsData } from "./data" diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/calculate-price.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/calculate-price.spec.ts index 99ea1a4d3b..1bc2843d92 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/calculate-price.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/calculate-price.spec.ts @@ -3,8 +3,12 @@ import { CreatePriceSetDTO, IPricingModuleService, PricingTypes, -} from "@medusajs/types" -import { Modules, PriceListStatus, PriceListType } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { + Modules, + PriceListStatus, + PriceListType, +} from "@medusajs/framework/utils" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { seedPriceData } from "../../../__fixtures__/seed-price-data" diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/index.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/index.spec.ts index 6687f51b6b..a890de365d 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/index.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/index.spec.ts @@ -1,5 +1,5 @@ -import { IPricingModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IPricingModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { PricingModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts index 114d5d2966..470e9f74de 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list-rule.spec.ts @@ -1,9 +1,9 @@ -import { IPricingModuleService } from "@medusajs/types" +import { IPricingModuleService } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { createPriceLists } from "../../../__fixtures__/price-list" import { createPriceListRules } from "../../../__fixtures__/price-list-rules" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" jest.setTimeout(30000) diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list.spec.ts index 4800a0a178..3e7192955e 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-list.spec.ts @@ -1,10 +1,10 @@ -import { IPricingModuleService } from "@medusajs/types" +import { IPricingModuleService } from "@medusajs/framework/types" import { CommonEvents, composeMessage, Modules, PricingEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { MockEventBusService, moduleIntegrationTestRunner, diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts index 24c95fdb46..4a555273ba 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-rule.spec.ts @@ -1,11 +1,11 @@ -import { IPricingModuleService } from "@medusajs/types" +import { IPricingModuleService } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { Price } from "../../../../src/models" import { createPrices } from "../../../__fixtures__/price" import { createPriceRules } from "../../../__fixtures__/price-rule" import { createPriceSets } from "../../../__fixtures__/price-set" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" jest.setTimeout(30000) diff --git a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-set.spec.ts b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-set.spec.ts index 221234cd10..a28a95af78 100644 --- a/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-set.spec.ts +++ b/packages/modules/pricing/integration-tests/__tests__/services/pricing-module/price-set.spec.ts @@ -1,10 +1,13 @@ -import { CreatePriceSetDTO, IPricingModuleService } from "@medusajs/types" +import { + CreatePriceSetDTO, + IPricingModuleService, +} from "@medusajs/framework/types" import { CommonEvents, composeMessage, Modules, PricingEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { MockEventBusService, moduleIntegrationTestRunner, diff --git a/packages/modules/pricing/mikro-orm.config.dev.ts b/packages/modules/pricing/mikro-orm.config.dev.ts index 038f512a6d..cfa7cedd3b 100644 --- a/packages/modules/pricing/mikro-orm.config.dev.ts +++ b/packages/modules/pricing/mikro-orm.config.dev.ts @@ -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.PRICING, { entities: Object.values(entities), diff --git a/packages/modules/pricing/package.json b/packages/modules/pricing/package.json index 9c9b366e4a..d256b17cbe 100644 --- a/packages/modules/pricing/package.json +++ b/packages/modules/pricing/package.json @@ -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", diff --git a/packages/modules/pricing/src/index.ts b/packages/modules/pricing/src/index.ts index 60aebf6c77..459171302d 100644 --- a/packages/modules/pricing/src/index.ts +++ b/packages/modules/pricing/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { PricingModuleService } from "@services" export default Module(Modules.PRICING, { diff --git a/packages/modules/pricing/src/joiner-config.ts b/packages/modules/pricing/src/joiner-config.ts index fa846a98cb..bd286bb463 100644 --- a/packages/modules/pricing/src/joiner-config.ts +++ b/packages/modules/pricing/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { Price, PriceList, PricePreference, PriceSet } from "@models" import { default as schema } from "./schema" diff --git a/packages/modules/pricing/src/models/price-list-rule.ts b/packages/modules/pricing/src/models/price-list-rule.ts index 7e37888266..2ef67341a1 100644 --- a/packages/modules/pricing/src/models/price-list-rule.ts +++ b/packages/modules/pricing/src/models/price-list-rule.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/pricing/src/models/price-list.ts b/packages/modules/pricing/src/models/price-list.ts index 87449dc3ce..b1635aaa28 100644 --- a/packages/modules/pricing/src/models/price-list.ts +++ b/packages/modules/pricing/src/models/price-list.ts @@ -1,4 +1,4 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, @@ -6,7 +6,7 @@ import { PriceListStatus, PriceListType, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/pricing/src/models/price-preference.ts b/packages/modules/pricing/src/models/price-preference.ts index 04fc533a15..6625ef5db5 100644 --- a/packages/modules/pricing/src/models/price-preference.ts +++ b/packages/modules/pricing/src/models/price-preference.ts @@ -2,7 +2,7 @@ import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/pricing/src/models/price-rule.ts b/packages/modules/pricing/src/models/price-rule.ts index 64e7936719..c814bff7e6 100644 --- a/packages/modules/pricing/src/models/price-rule.ts +++ b/packages/modules/pricing/src/models/price-rule.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/pricing/src/models/price-set.ts b/packages/modules/pricing/src/models/price-set.ts index 8c1e4a5cdd..2c5f9d50ed 100644 --- a/packages/modules/pricing/src/models/price-set.ts +++ b/packages/modules/pricing/src/models/price-set.ts @@ -2,7 +2,7 @@ import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/pricing/src/models/price.ts b/packages/modules/pricing/src/models/price.ts index 1223ba5e85..ef243b7fb9 100644 --- a/packages/modules/pricing/src/models/price.ts +++ b/packages/modules/pricing/src/models/price.ts @@ -1,11 +1,11 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { BigNumber, createPsqlIndexStatementHelper, DALUtils, generateEntityId, MikroOrmBigNumberProperty, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/pricing/src/repositories/index.ts b/packages/modules/pricing/src/repositories/index.ts index 2edee3deb2..1c61ad2fde 100644 --- a/packages/modules/pricing/src/repositories/index.ts +++ b/packages/modules/pricing/src/repositories/index.ts @@ -1,2 +1,2 @@ -export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/utils" +export { MikroOrmBaseRepository as BaseRepository } from "@medusajs/framework/utils" export { PricingRepository } from "./pricing" diff --git a/packages/modules/pricing/src/repositories/pricing.ts b/packages/modules/pricing/src/repositories/pricing.ts index 6fa8c34490..ef2636c542 100644 --- a/packages/modules/pricing/src/repositories/pricing.ts +++ b/packages/modules/pricing/src/repositories/pricing.ts @@ -1,4 +1,8 @@ -import { MedusaError, MikroOrmBase, PriceListStatus } from "@medusajs/utils" +import { + MedusaError, + MikroOrmBase, + PriceListStatus, +} from "@medusajs/framework/utils" import { CalculatedPriceSetDTO, @@ -6,7 +10,7 @@ import { PricingContext, PricingFilters, PricingRepositoryService, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" export class PricingRepository diff --git a/packages/modules/pricing/src/services/pricing-module.ts b/packages/modules/pricing/src/services/pricing-module.ts index 3ec63f5a1b..c6d9d0d457 100644 --- a/packages/modules/pricing/src/services/pricing-module.ts +++ b/packages/modules/pricing/src/services/pricing-module.ts @@ -18,7 +18,7 @@ import { PricingTypes, UpsertPricePreferenceDTO, UpsertPriceSetDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { arrayDifference, deduplicate, @@ -36,7 +36,7 @@ import { promiseAll, removeNullish, simpleHash, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Price, diff --git a/packages/modules/pricing/src/types/index.ts b/packages/modules/pricing/src/types/index.ts index 48641f932f..cbaa0e558d 100644 --- a/packages/modules/pricing/src/types/index.ts +++ b/packages/modules/pricing/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/pricing/src/types/services/index.ts b/packages/modules/pricing/src/types/services/index.ts index bdbe560974..a389e47164 100644 --- a/packages/modules/pricing/src/types/services/index.ts +++ b/packages/modules/pricing/src/types/services/index.ts @@ -1,4 +1,4 @@ -import { PriceListStatus, PricingTypes } from "@medusajs/types" +import { PriceListStatus, PricingTypes } from "@medusajs/framework/types" export interface CreatePriceListDTO extends PricingTypes.CreatePriceListDTO { rules_count?: number diff --git a/packages/modules/pricing/src/utils/events.ts b/packages/modules/pricing/src/utils/events.ts index cfa38f5cfc..d5cd476263 100644 --- a/packages/modules/pricing/src/utils/events.ts +++ b/packages/modules/pricing/src/utils/events.ts @@ -3,7 +3,7 @@ import { moduleEventBuilderFactory, Modules, PricingEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const eventBuilders = { createdPriceSet: moduleEventBuilderFactory({ diff --git a/packages/modules/pricing/src/utils/validate-price-list-dates.ts b/packages/modules/pricing/src/utils/validate-price-list-dates.ts index bb23008836..30e9f91d11 100644 --- a/packages/modules/pricing/src/utils/validate-price-list-dates.ts +++ b/packages/modules/pricing/src/utils/validate-price-list-dates.ts @@ -1,4 +1,4 @@ -import { isDate, MedusaError } from "@medusajs/utils" +import { isDate, MedusaError } from "@medusajs/framework/utils" export const validatePriceListDates = (priceListData: { starts_at?: Date | string | null diff --git a/packages/modules/product/integration-tests/__fixtures__/module.ts b/packages/modules/product/integration-tests/__fixtures__/module.ts index 50f5c53549..e254a5a9f8 100644 --- a/packages/modules/product/integration-tests/__fixtures__/module.ts +++ b/packages/modules/product/integration-tests/__fixtures__/module.ts @@ -1,5 +1,5 @@ -import { Context } from "@medusajs/types" -import { DALUtils } from "@medusajs/utils" +import { Context } from "@medusajs/framework/types" +import { DALUtils } from "@medusajs/framework/utils" class CustomRepository extends DALUtils.MikroOrmBaseRepository { constructor({ manager }) { diff --git a/packages/modules/product/integration-tests/__fixtures__/product/data/create-product.ts b/packages/modules/product/integration-tests/__fixtures__/product/data/create-product.ts index bf44c16b15..f26bdcdb9f 100644 --- a/packages/modules/product/integration-tests/__fixtures__/product/data/create-product.ts +++ b/packages/modules/product/integration-tests/__fixtures__/product/data/create-product.ts @@ -1,5 +1,5 @@ -import { ProductTypes } from "@medusajs/types" -import { ProductStatus } from "@medusajs/utils" +import { ProductTypes } from "@medusajs/framework/types" +import { ProductStatus } from "@medusajs/framework/utils" import { Image } from "@models" import faker from "faker" diff --git a/packages/modules/product/integration-tests/__fixtures__/product/data/products.ts b/packages/modules/product/integration-tests/__fixtures__/product/data/products.ts index f4c5bdcec0..56556967ee 100644 --- a/packages/modules/product/integration-tests/__fixtures__/product/data/products.ts +++ b/packages/modules/product/integration-tests/__fixtures__/product/data/products.ts @@ -1,4 +1,4 @@ -import { ProductStatus } from "@medusajs/utils" +import { ProductStatus } from "@medusajs/framework/utils" export const productsData = [ { diff --git a/packages/modules/product/integration-tests/__fixtures__/product/index.ts b/packages/modules/product/integration-tests/__fixtures__/product/index.ts index 701d7769fe..6b965abc86 100644 --- a/packages/modules/product/integration-tests/__fixtures__/product/index.ts +++ b/packages/modules/product/integration-tests/__fixtures__/product/index.ts @@ -1,4 +1,4 @@ -import { ProductStatus } from "@medusajs/utils" +import { ProductStatus } from "@medusajs/framework/utils" import { SqlEntityManager } from "@mikro-orm/postgresql" import { Image, diff --git a/packages/modules/product/integration-tests/__fixtures__/variant/data/create-variant.ts b/packages/modules/product/integration-tests/__fixtures__/variant/data/create-variant.ts index a0e496391e..41561735eb 100644 --- a/packages/modules/product/integration-tests/__fixtures__/variant/data/create-variant.ts +++ b/packages/modules/product/integration-tests/__fixtures__/variant/data/create-variant.ts @@ -1,4 +1,4 @@ -import { ProductTypes } from "@medusajs/types" +import { ProductTypes } from "@medusajs/framework/types" import faker from "faker" export const buildProductVariantOnlyData = ({ diff --git a/packages/modules/product/integration-tests/__tests__/product-category.ts b/packages/modules/product/integration-tests/__tests__/product-category.ts index 795a555434..a049f52026 100644 --- a/packages/modules/product/integration-tests/__tests__/product-category.ts +++ b/packages/modules/product/integration-tests/__tests__/product-category.ts @@ -6,8 +6,8 @@ import { productCategoriesData, productCategoriesRankData, } from "../__fixtures__/product-category/data" -import { IProductModuleService } from "@medusajs/types" -import { Modules } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules } from "@medusajs/framework/utils" jest.setTimeout(30000) diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-categories.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-categories.spec.ts index 1bdd1ace0a..fcd1888b9a 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-categories.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-categories.spec.ts @@ -1,11 +1,11 @@ -import { IProductModuleService } from "@medusajs/types" +import { IProductModuleService } from "@medusajs/framework/types" import { CommonEvents, composeMessage, Modules, ProductEvents, ProductStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Product, ProductCategory } from "@models" import { MockEventBusService, diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-collections.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-collections.spec.ts index bb866f6481..c16b598375 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-collections.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-collections.spec.ts @@ -1,5 +1,5 @@ -import { IProductModuleService } from "@medusajs/types" -import { CommonEvents, Modules, ProductStatus } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { CommonEvents, Modules, ProductStatus } from "@medusajs/framework/utils" import { Product, ProductCollection } from "@models" import { MockEventBusService, diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-options.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-options.spec.ts index 4c05be17a1..8083e2d37e 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-options.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-options.spec.ts @@ -1,5 +1,5 @@ -import { IProductModuleService } from "@medusajs/types" -import { Modules, ProductStatus } from "@medusajs/utils" +import { IProductModuleService } from "@medusajs/framework/types" +import { Modules, ProductStatus } from "@medusajs/framework/utils" import { Product, ProductOption } from "@models" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-tags.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-tags.spec.ts index 5da8eae1ca..b10ab87dd6 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-tags.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-tags.spec.ts @@ -1,11 +1,11 @@ -import { IProductModuleService } from "@medusajs/types" +import { IProductModuleService } from "@medusajs/framework/types" import { CommonEvents, composeMessage, Modules, ProductEvents, ProductStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Product, ProductTag } from "@models" import { MockEventBusService, diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-types.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-types.spec.ts index b938f141c0..bd0645cda1 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-types.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-types.spec.ts @@ -1,7 +1,7 @@ -import { IProductModuleService } from "@medusajs/types" +import { IProductModuleService } from "@medusajs/framework/types" import { ProductType } from "@models" import { moduleIntegrationTestRunner } from "medusa-test-utils" -import { Modules } from "@medusajs/utils" +import { Modules } from "@medusajs/framework/utils" jest.setTimeout(30000) diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/product-variants.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/product-variants.spec.ts index 98a6d8ff3a..7dd5d7b99b 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/product-variants.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/product-variants.spec.ts @@ -4,14 +4,14 @@ import { IProductModuleService, ProductDTO, ProductVariantDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { CommonEvents, composeMessage, Modules, ProductEvents, ProductStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { MockEventBusService, diff --git a/packages/modules/product/integration-tests/__tests__/product-module-service/products.spec.ts b/packages/modules/product/integration-tests/__tests__/product-module-service/products.spec.ts index 2c9b0a29cd..2b7327491b 100644 --- a/packages/modules/product/integration-tests/__tests__/product-module-service/products.spec.ts +++ b/packages/modules/product/integration-tests/__tests__/product-module-service/products.spec.ts @@ -2,8 +2,8 @@ import { IProductModuleService, ProductCategoryDTO, ProductTagDTO, -} from "@medusajs/types" -import { Modules, ProductStatus, kebabCase } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { Modules, ProductStatus, kebabCase } from "@medusajs/framework/utils" import { Product, ProductCategory, diff --git a/packages/modules/product/integration-tests/__tests__/product.ts b/packages/modules/product/integration-tests/__tests__/product.ts index 88bbda49ce..ce91596e5f 100644 --- a/packages/modules/product/integration-tests/__tests__/product.ts +++ b/packages/modules/product/integration-tests/__tests__/product.ts @@ -8,8 +8,13 @@ import { createProductVariants, } from "../__fixtures__/product" -import { IProductModuleService, ProductDTO } from "@medusajs/types" -import { Module, Modules, ProductStatus, kebabCase } from "@medusajs/utils" +import { IProductModuleService, ProductDTO } from "@medusajs/framework/types" +import { + Module, + Modules, + ProductStatus, + kebabCase, +} from "@medusajs/framework/utils" import { SqlEntityManager } from "@mikro-orm/postgresql" import { ProductCategoryService, diff --git a/packages/modules/product/mikro-orm.config.dev.ts b/packages/modules/product/mikro-orm.config.dev.ts index 50a21f71f3..bd696c7f0f 100644 --- a/packages/modules/product/mikro-orm.config.dev.ts +++ b/packages/modules/product/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.PRODUCT, { diff --git a/packages/modules/product/package.json b/packages/modules/product/package.json index 92c5d762a5..fa1240fbd7 100644 --- a/packages/modules/product/package.json +++ b/packages/modules/product/package.json @@ -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", "faker": "^5.5.3", @@ -49,10 +49,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", diff --git a/packages/modules/product/src/index.ts b/packages/modules/product/src/index.ts index 26a2ed53e7..f7a7bb968f 100644 --- a/packages/modules/product/src/index.ts +++ b/packages/modules/product/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { ProductModuleService } from "@services" export default Module(Modules.PRODUCT, { diff --git a/packages/modules/product/src/joiner-config.ts b/packages/modules/product/src/joiner-config.ts index bfb647c469..f6a60f7f35 100644 --- a/packages/modules/product/src/joiner-config.ts +++ b/packages/modules/product/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { Product, ProductCategory, diff --git a/packages/modules/product/src/models/product-category.ts b/packages/modules/product/src/models/product-category.ts index 3736c3dd1f..8f86be88cb 100644 --- a/packages/modules/product/src/models/product-category.ts +++ b/packages/modules/product/src/models/product-category.ts @@ -4,7 +4,7 @@ import { createPsqlIndexStatementHelper, generateEntityId, kebabCase, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Collection, diff --git a/packages/modules/product/src/models/product-collection.ts b/packages/modules/product/src/models/product-collection.ts index 3f71864eeb..87f44b353b 100644 --- a/packages/modules/product/src/models/product-collection.ts +++ b/packages/modules/product/src/models/product-collection.ts @@ -16,7 +16,7 @@ import { generateEntityId, kebabCase, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import Product from "./product" const collectionHandleIndexName = "IDX_collection_handle_unique" diff --git a/packages/modules/product/src/models/product-image.ts b/packages/modules/product/src/models/product-image.ts index 048576c420..5c0baf2445 100644 --- a/packages/modules/product/src/models/product-image.ts +++ b/packages/modules/product/src/models/product-image.ts @@ -14,7 +14,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import Product from "./product" const imageUrlIndexName = "IDX_product_image_url" diff --git a/packages/modules/product/src/models/product-option-value.ts b/packages/modules/product/src/models/product-option-value.ts index 2109c1d2ab..a3f0486f5f 100644 --- a/packages/modules/product/src/models/product-option-value.ts +++ b/packages/modules/product/src/models/product-option-value.ts @@ -2,7 +2,7 @@ import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Collection, diff --git a/packages/modules/product/src/models/product-option.ts b/packages/modules/product/src/models/product-option.ts index cb537f0f35..d75b3bd73f 100644 --- a/packages/modules/product/src/models/product-option.ts +++ b/packages/modules/product/src/models/product-option.ts @@ -3,7 +3,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/product/src/models/product-tag.ts b/packages/modules/product/src/models/product-tag.ts index e03c82dc14..7f1313d3d1 100644 --- a/packages/modules/product/src/models/product-tag.ts +++ b/packages/modules/product/src/models/product-tag.ts @@ -15,7 +15,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import Product from "./product" const tagValueIndexName = "IDX_tag_value_unique" diff --git a/packages/modules/product/src/models/product-type.ts b/packages/modules/product/src/models/product-type.ts index bf67de8ac7..2fd981c2e8 100644 --- a/packages/modules/product/src/models/product-type.ts +++ b/packages/modules/product/src/models/product-type.ts @@ -13,7 +13,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const typeValueIndexName = "IDX_type_value_unique" const typeValueIndexStatement = createPsqlIndexStatementHelper({ diff --git a/packages/modules/product/src/models/product-variant.ts b/packages/modules/product/src/models/product-variant.ts index ccda0a8fda..c52640afc2 100644 --- a/packages/modules/product/src/models/product-variant.ts +++ b/packages/modules/product/src/models/product-variant.ts @@ -3,7 +3,7 @@ import { DALUtils, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Collection, diff --git a/packages/modules/product/src/models/product.ts b/packages/modules/product/src/models/product.ts index a6875141ef..c2f89a3975 100644 --- a/packages/modules/product/src/models/product.ts +++ b/packages/modules/product/src/models/product.ts @@ -20,7 +20,7 @@ import { ProductUtils, Searchable, toHandle, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import ProductCategory from "./product-category" import ProductCollection from "./product-collection" import ProductImage from "./product-image" diff --git a/packages/modules/product/src/repositories/product-category.ts b/packages/modules/product/src/repositories/product-category.ts index 43cde671c4..249d4ccd26 100644 --- a/packages/modules/product/src/repositories/product-category.ts +++ b/packages/modules/product/src/repositories/product-category.ts @@ -3,8 +3,8 @@ import { DAL, ProductCategoryTransformOptions, ProductTypes, -} from "@medusajs/types" -import { DALUtils, isDefined, MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { DALUtils, isDefined, MedusaError } from "@medusajs/framework/utils" import { LoadStrategy, FilterQuery as MikroFilterQuery, diff --git a/packages/modules/product/src/repositories/product.ts b/packages/modules/product/src/repositories/product.ts index b9d64164c0..c53db0e0d2 100644 --- a/packages/modules/product/src/repositories/product.ts +++ b/packages/modules/product/src/repositories/product.ts @@ -1,8 +1,8 @@ import { Product } from "@models" -import { Context, DAL } from "@medusajs/types" +import { Context, DAL } from "@medusajs/framework/types" import { SqlEntityManager } from "@mikro-orm/postgresql" -import { DALUtils } from "@medusajs/utils" +import { DALUtils } from "@medusajs/framework/utils" // eslint-disable-next-line max-len export class ProductRepository extends DALUtils.mikroOrmBaseRepositoryFactory( diff --git a/packages/modules/product/src/services/product-category.ts b/packages/modules/product/src/services/product-category.ts index 87305ee2c6..ba1a74002c 100644 --- a/packages/modules/product/src/services/product-category.ts +++ b/packages/modules/product/src/services/product-category.ts @@ -1,4 +1,9 @@ -import { Context, DAL, FindConfig, ProductTypes } from "@medusajs/types" +import { + Context, + DAL, + FindConfig, + ProductTypes, +} from "@medusajs/framework/types" import { FreeTextSearchFilterKey, InjectManager, @@ -7,7 +12,7 @@ import { MedusaContext, MedusaError, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ProductCategory } from "@models" import { ProductCategoryRepository } from "@repositories" import { UpdateCategoryInput } from "@types" diff --git a/packages/modules/product/src/services/product-module-service.ts b/packages/modules/product/src/services/product-module-service.ts index eeb7ff91b0..6fdf0c71f6 100644 --- a/packages/modules/product/src/services/product-module-service.ts +++ b/packages/modules/product/src/services/product-module-service.ts @@ -6,7 +6,7 @@ import { ModuleJoinerConfig, ModulesSdkTypes, ProductTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { Image as ProductImage, Product, @@ -37,7 +37,7 @@ import { promiseAll, removeUndefined, toHandle, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ProductCollectionEventData, ProductCollectionEvents, diff --git a/packages/modules/product/src/types/index.ts b/packages/modules/product/src/types/index.ts index 4cd7648107..61c6ea1999 100644 --- a/packages/modules/product/src/types/index.ts +++ b/packages/modules/product/src/types/index.ts @@ -1,4 +1,8 @@ -import { IEventBusModuleService, Logger, ProductTypes } from "@medusajs/types" +import { + IEventBusModuleService, + Logger, + ProductTypes, +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/product/src/utils/events.ts b/packages/modules/product/src/utils/events.ts index cd15db6306..ccdaf0c9cb 100644 --- a/packages/modules/product/src/utils/events.ts +++ b/packages/modules/product/src/utils/events.ts @@ -3,7 +3,7 @@ import { moduleEventBuilderFactory, Modules, ProductEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" export const eventBuilders = { createdProduct: moduleEventBuilderFactory({ diff --git a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/data.ts b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/data.ts index e22fa7d5d0..af31928cc5 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/data.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/data.ts @@ -1,4 +1,4 @@ -import { CampaignBudgetType } from "@medusajs/utils" +import { CampaignBudgetType } from "@medusajs/framework/utils" export const defaultCampaignsData = [ { diff --git a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts index a56b537cc4..0434a6e51c 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/campaigns/index.ts @@ -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" diff --git a/packages/modules/promotion/integration-tests/__fixtures__/promotion/data.ts b/packages/modules/promotion/integration-tests/__fixtures__/promotion/data.ts index 597d44e077..61822491dd 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/promotion/data.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/promotion/data.ts @@ -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[] = [ { diff --git a/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts b/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts index fe3b3a01b9..297f762541 100644 --- a/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts +++ b/packages/modules/promotion/integration-tests/__fixtures__/promotion/index.ts @@ -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" diff --git a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/campaign.spec.ts b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/campaign.spec.ts index f22c04f3da..9583bad3a1 100644 --- a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/campaign.spec.ts +++ b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/campaign.spec.ts @@ -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" diff --git a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/compute-actions.spec.ts b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/compute-actions.spec.ts index 528b041c4a..e4be54827c 100644 --- a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/compute-actions.spec.ts +++ b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/compute-actions.spec.ts @@ -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" diff --git a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/promotion.spec.ts b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/promotion.spec.ts index 04c82edaf6..ba18128125 100644 --- a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/promotion.spec.ts +++ b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/promotion.spec.ts @@ -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" diff --git a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/register-usage.spec.ts b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/register-usage.spec.ts index 7eed12992b..c4887115ce 100644 --- a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/register-usage.spec.ts +++ b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/register-usage.spec.ts @@ -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) diff --git a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/revert-usage.spec.ts b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/revert-usage.spec.ts index 08253f6145..6568b74c3a 100644 --- a/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/revert-usage.spec.ts +++ b/packages/modules/promotion/integration-tests/__tests__/services/promotion-module/revert-usage.spec.ts @@ -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" diff --git a/packages/modules/promotion/mikro-orm.config.dev.ts b/packages/modules/promotion/mikro-orm.config.dev.ts index dc9ef94345..81ad33347d 100644 --- a/packages/modules/promotion/mikro-orm.config.dev.ts +++ b/packages/modules/promotion/mikro-orm.config.dev.ts @@ -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), diff --git a/packages/modules/promotion/package.json b/packages/modules/promotion/package.json index 4f039311b1..88d1fd1a35 100644 --- a/packages/modules/promotion/package.json +++ b/packages/modules/promotion/package.json @@ -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", diff --git a/packages/modules/promotion/src/index.ts b/packages/modules/promotion/src/index.ts index 87fdd26e94..5a23327508 100644 --- a/packages/modules/promotion/src/index.ts +++ b/packages/modules/promotion/src/index.ts @@ -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, { diff --git a/packages/modules/promotion/src/joiner-config.ts b/packages/modules/promotion/src/joiner-config.ts index 114ce805db..af471f3cc3 100644 --- a/packages/modules/promotion/src/joiner-config.ts +++ b/packages/modules/promotion/src/joiner-config.ts @@ -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" diff --git a/packages/modules/promotion/src/models/application-method.ts b/packages/modules/promotion/src/models/application-method.ts index 48ded967d3..57597e1a67 100644 --- a/packages/modules/promotion/src/models/application-method.ts +++ b/packages/modules/promotion/src/models/application-method.ts @@ -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, diff --git a/packages/modules/promotion/src/models/campaign-budget.ts b/packages/modules/promotion/src/models/campaign-budget.ts index bdc82a9ce7..34f3dabdf9 100644 --- a/packages/modules/promotion/src/models/campaign-budget.ts +++ b/packages/modules/promotion/src/models/campaign-budget.ts @@ -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, diff --git a/packages/modules/promotion/src/models/campaign.ts b/packages/modules/promotion/src/models/campaign.ts index 37b8e44965..cd49a92813 100644 --- a/packages/modules/promotion/src/models/campaign.ts +++ b/packages/modules/promotion/src/models/campaign.ts @@ -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, diff --git a/packages/modules/promotion/src/models/promotion-rule-value.ts b/packages/modules/promotion/src/models/promotion-rule-value.ts index e80fe4afef..285938c2e0 100644 --- a/packages/modules/promotion/src/models/promotion-rule-value.ts +++ b/packages/modules/promotion/src/models/promotion-rule-value.ts @@ -1,4 +1,4 @@ -import { DALUtils, generateEntityId } from "@medusajs/utils" +import { DALUtils, generateEntityId } from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/promotion/src/models/promotion-rule.ts b/packages/modules/promotion/src/models/promotion-rule.ts index ae3db494fc..9e69abb0f1 100644 --- a/packages/modules/promotion/src/models/promotion-rule.ts +++ b/packages/modules/promotion/src/models/promotion-rule.ts @@ -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, diff --git a/packages/modules/promotion/src/models/promotion.ts b/packages/modules/promotion/src/models/promotion.ts index e82dcc4468..01c6cf2fa1 100644 --- a/packages/modules/promotion/src/models/promotion.ts +++ b/packages/modules/promotion/src/models/promotion.ts @@ -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, diff --git a/packages/modules/promotion/src/services/promotion-module.ts b/packages/modules/promotion/src/services/promotion-module.ts index a3c7d84166..5d3afdf86a 100644 --- a/packages/modules/promotion/src/services/promotion-module.ts +++ b/packages/modules/promotion/src/services/promotion-module.ts @@ -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, diff --git a/packages/modules/promotion/src/types/application-method.ts b/packages/modules/promotion/src/types/application-method.ts index 30c264d6a8..09023530a4 100644 --- a/packages/modules/promotion/src/types/application-method.ts +++ b/packages/modules/promotion/src/types/application-method.ts @@ -4,7 +4,7 @@ import { ApplicationMethodTypeValues, BigNumberInput, PromotionDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { Promotion } from "@models" diff --git a/packages/modules/promotion/src/types/campaign-budget.ts b/packages/modules/promotion/src/types/campaign-budget.ts index d5724e8566..30a9f4e224 100644 --- a/packages/modules/promotion/src/types/campaign-budget.ts +++ b/packages/modules/promotion/src/types/campaign-budget.ts @@ -1,4 +1,7 @@ -import { BigNumberInput, CampaignBudgetTypeValues } from "@medusajs/types" +import { + BigNumberInput, + CampaignBudgetTypeValues, +} from "@medusajs/framework/types" import { Campaign } from "@models" export interface CreateCampaignBudgetDTO { diff --git a/packages/modules/promotion/src/types/campaign.ts b/packages/modules/promotion/src/types/campaign.ts index 1e63d3308c..5e3d4e6ad7 100644 --- a/packages/modules/promotion/src/types/campaign.ts +++ b/packages/modules/promotion/src/types/campaign.ts @@ -1,4 +1,4 @@ -import { PromotionDTO } from "@medusajs/types" +import { PromotionDTO } from "@medusajs/framework/types" import { Promotion } from "@models" export interface CreateCampaignDTO { diff --git a/packages/modules/promotion/src/types/index.ts b/packages/modules/promotion/src/types/index.ts index 145c717bae..5cc3e10b2c 100644 --- a/packages/modules/promotion/src/types/index.ts +++ b/packages/modules/promotion/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/promotion/src/types/promotion-rule-value.ts b/packages/modules/promotion/src/types/promotion-rule-value.ts index 38b796be7a..e403a1b35d 100644 --- a/packages/modules/promotion/src/types/promotion-rule-value.ts +++ b/packages/modules/promotion/src/types/promotion-rule-value.ts @@ -1,4 +1,4 @@ -import { PromotionRuleDTO } from "@medusajs/types" +import { PromotionRuleDTO } from "@medusajs/framework/types" import { PromotionRule } from "@models" export interface CreatePromotionRuleValueDTO { diff --git a/packages/modules/promotion/src/types/promotion-rule.ts b/packages/modules/promotion/src/types/promotion-rule.ts index 3ed12d5d37..117bcd2ca7 100644 --- a/packages/modules/promotion/src/types/promotion-rule.ts +++ b/packages/modules/promotion/src/types/promotion-rule.ts @@ -1,4 +1,4 @@ -import { PromotionRuleOperatorValues } from "@medusajs/types" +import { PromotionRuleOperatorValues } from "@medusajs/framework/types" export interface CreatePromotionRuleDTO { description?: string | null diff --git a/packages/modules/promotion/src/types/promotion.ts b/packages/modules/promotion/src/types/promotion.ts index 5780d76a7a..2389b48f59 100644 --- a/packages/modules/promotion/src/types/promotion.ts +++ b/packages/modules/promotion/src/types/promotion.ts @@ -1,4 +1,4 @@ -import { PromotionTypeValues } from "@medusajs/types" +import { PromotionTypeValues } from "@medusajs/framework/types" export interface CreatePromotionDTO { code: string diff --git a/packages/modules/promotion/src/utils/compute-actions/buy-get.ts b/packages/modules/promotion/src/utils/compute-actions/buy-get.ts index c3a3d33e06..03af6114ce 100644 --- a/packages/modules/promotion/src/utils/compute-actions/buy-get.ts +++ b/packages/modules/promotion/src/utils/compute-actions/buy-get.ts @@ -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" diff --git a/packages/modules/promotion/src/utils/compute-actions/line-items.ts b/packages/modules/promotion/src/utils/compute-actions/line-items.ts index 4ae977044b..fe6bdf45e8 100644 --- a/packages/modules/promotion/src/utils/compute-actions/line-items.ts +++ b/packages/modules/promotion/src/utils/compute-actions/line-items.ts @@ -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" diff --git a/packages/modules/promotion/src/utils/compute-actions/shipping-methods.ts b/packages/modules/promotion/src/utils/compute-actions/shipping-methods.ts index ce9fecff22..7f51c48071 100644 --- a/packages/modules/promotion/src/utils/compute-actions/shipping-methods.ts +++ b/packages/modules/promotion/src/utils/compute-actions/shipping-methods.ts @@ -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" diff --git a/packages/modules/promotion/src/utils/compute-actions/usage.ts b/packages/modules/promotion/src/utils/compute-actions/usage.ts index e1d1e72763..0396e967e0 100644 --- a/packages/modules/promotion/src/utils/compute-actions/usage.ts +++ b/packages/modules/promotion/src/utils/compute-actions/usage.ts @@ -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, diff --git a/packages/modules/promotion/src/utils/validations/application-method.ts b/packages/modules/promotion/src/utils/validations/application-method.ts index 7628655c8e..ae98f075a4 100644 --- a/packages/modules/promotion/src/utils/validations/application-method.ts +++ b/packages/modules/promotion/src/utils/validations/application-method.ts @@ -8,7 +8,7 @@ import { MathBN, MedusaError, PromotionType, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Promotion } from "@models" import { CreateApplicationMethodDTO, UpdateApplicationMethodDTO } from "@types" diff --git a/packages/modules/promotion/src/utils/validations/promotion-rule.ts b/packages/modules/promotion/src/utils/validations/promotion-rule.ts index 4dcaea86bc..c9e4732596 100644 --- a/packages/modules/promotion/src/utils/validations/promotion-rule.ts +++ b/packages/modules/promotion/src/utils/validations/promotion-rule.ts @@ -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( diff --git a/packages/modules/providers/auth-emailpass/integration-tests/__tests__/services.spec.ts b/packages/modules/providers/auth-emailpass/integration-tests/__tests__/services.spec.ts index 33ab90d414..1f8a12e709 100644 --- a/packages/modules/providers/auth-emailpass/integration-tests/__tests__/services.spec.ts +++ b/packages/modules/providers/auth-emailpass/integration-tests/__tests__/services.spec.ts @@ -1,4 +1,4 @@ -import { MedusaError } from "@medusajs/utils" +import { MedusaError } from "@medusajs/framework/utils" import Scrypt from "scrypt-kdf" import { EmailPassAuthService } from "../../src/services/emailpass" jest.setTimeout(100000) diff --git a/packages/modules/providers/auth-emailpass/package.json b/packages/modules/providers/auth-emailpass/package.json index 1f06d7d14a..5773575b05 100644 --- a/packages/modules/providers/auth-emailpass/package.json +++ b/packages/modules/providers/auth-emailpass/package.json @@ -26,15 +26,18 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "scrypt-kdf": "^2.0.1" }, + "peerDependencies": { + "@medusajs/framework": "^0.0.1" + }, "keywords": [ "medusa-provider", "medusa-provider-auth-userpass" diff --git a/packages/modules/providers/auth-emailpass/src/index.ts b/packages/modules/providers/auth-emailpass/src/index.ts index efc1ad4343..1b5c666fb3 100644 --- a/packages/modules/providers/auth-emailpass/src/index.ts +++ b/packages/modules/providers/auth-emailpass/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { EmailPassAuthService } from "./services/emailpass" const services = [EmailPassAuthService] diff --git a/packages/modules/providers/auth-emailpass/src/services/emailpass.ts b/packages/modules/providers/auth-emailpass/src/services/emailpass.ts index ae060cda9c..1b15496116 100644 --- a/packages/modules/providers/auth-emailpass/src/services/emailpass.ts +++ b/packages/modules/providers/auth-emailpass/src/services/emailpass.ts @@ -5,12 +5,12 @@ import { AuthIdentityProviderService, EmailPassAuthProviderOptions, Logger, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractAuthModuleProvider, isString, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import Scrypt from "scrypt-kdf" type InjectedDependencies = { diff --git a/packages/modules/providers/auth-github/integration-tests/__tests__/services.spec.ts b/packages/modules/providers/auth-github/integration-tests/__tests__/services.spec.ts index db09b44385..af379d684d 100644 --- a/packages/modules/providers/auth-github/integration-tests/__tests__/services.spec.ts +++ b/packages/modules/providers/auth-github/integration-tests/__tests__/services.spec.ts @@ -1,4 +1,4 @@ -import { generateJwtToken, MedusaError } from "@medusajs/utils" +import { generateJwtToken, MedusaError } from "@medusajs/framework/utils" import { GithubAuthService } from "../../src/services/github" import { http, HttpResponse } from "msw" import { setupServer } from "msw/node" diff --git a/packages/modules/providers/auth-github/package.json b/packages/modules/providers/auth-github/package.json index b5e850079a..4b4ee70da0 100644 --- a/packages/modules/providers/auth-github/package.json +++ b/packages/modules/providers/auth-github/package.json @@ -26,7 +26,7 @@ "watch": "tsc --watch" }, "devDependencies": { - "@medusajs/types": "^1.11.16", + "@medusajs/framework": "^0.0.1", "@types/simple-oauth2": "^5.0.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -34,8 +34,8 @@ "rimraf": "^5.0.1", "typescript": "^5.6.2" }, - "dependencies": { - "@medusajs/utils": "^1.11.9" + "peerDependencies": { + "@medusajs/framework": "^0.0.1" }, "keywords": [ "medusa-provider", diff --git a/packages/modules/providers/auth-github/src/index.ts b/packages/modules/providers/auth-github/src/index.ts index 6a4a0bcb9f..70fde0eefd 100644 --- a/packages/modules/providers/auth-github/src/index.ts +++ b/packages/modules/providers/auth-github/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { GithubAuthService } from "./services/github" const services = [GithubAuthService] diff --git a/packages/modules/providers/auth-github/src/services/github.ts b/packages/modules/providers/auth-github/src/services/github.ts index fb26c69fcc..0aff38e1db 100644 --- a/packages/modules/providers/auth-github/src/services/github.ts +++ b/packages/modules/providers/auth-github/src/services/github.ts @@ -4,8 +4,11 @@ import { AuthIdentityProviderService, GithubAuthProviderOptions, Logger, -} from "@medusajs/types" -import { AbstractAuthModuleProvider, MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { + AbstractAuthModuleProvider, + MedusaError, +} from "@medusajs/framework/utils" type InjectedDependencies = { logger: Logger diff --git a/packages/modules/providers/auth-google/integration-tests/__tests__/services.spec.ts b/packages/modules/providers/auth-google/integration-tests/__tests__/services.spec.ts index 613e1d9e36..693d0474a2 100644 --- a/packages/modules/providers/auth-google/integration-tests/__tests__/services.spec.ts +++ b/packages/modules/providers/auth-google/integration-tests/__tests__/services.spec.ts @@ -1,4 +1,4 @@ -import { generateJwtToken, MedusaError } from "@medusajs/utils" +import { generateJwtToken, MedusaError } from "@medusajs/framework/utils" import { GoogleAuthService } from "../../src/services/google" import { http, HttpResponse } from "msw" import { setupServer } from "msw/node" diff --git a/packages/modules/providers/auth-google/package.json b/packages/modules/providers/auth-google/package.json index d3cafc9e05..5a9f38cf53 100644 --- a/packages/modules/providers/auth-google/package.json +++ b/packages/modules/providers/auth-google/package.json @@ -26,7 +26,7 @@ "watch": "tsc --watch" }, "devDependencies": { - "@medusajs/types": "^1.11.16", + "@medusajs/framework": "^0.0.1", "@types/simple-oauth2": "^5.0.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -35,9 +35,11 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "jsonwebtoken": "^9.0.2" }, + "peerDependencies": { + "@medusajs/framework": "^0.0.1" + }, "keywords": [ "medusa-provider", "medusa-provider-auth-google" diff --git a/packages/modules/providers/auth-google/src/index.ts b/packages/modules/providers/auth-google/src/index.ts index 34efdea219..9245ab8756 100644 --- a/packages/modules/providers/auth-google/src/index.ts +++ b/packages/modules/providers/auth-google/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { GoogleAuthService } from "./services/google" const services = [GoogleAuthService] diff --git a/packages/modules/providers/auth-google/src/services/google.ts b/packages/modules/providers/auth-google/src/services/google.ts index ecb4d672b3..78b99a58ce 100644 --- a/packages/modules/providers/auth-google/src/services/google.ts +++ b/packages/modules/providers/auth-google/src/services/google.ts @@ -4,8 +4,11 @@ import { AuthIdentityProviderService, GoogleAuthProviderOptions, Logger, -} from "@medusajs/types" -import { AbstractAuthModuleProvider, MedusaError } from "@medusajs/utils" +} from "@medusajs/framework/types" +import { + AbstractAuthModuleProvider, + MedusaError, +} from "@medusajs/framework/utils" import jwt, { JwtPayload } from "jsonwebtoken" type InjectedDependencies = { diff --git a/packages/modules/providers/file-local/package.json b/packages/modules/providers/file-local/package.json index e16847634d..75427a3528 100644 --- a/packages/modules/providers/file-local/package.json +++ b/packages/modules/providers/file-local/package.json @@ -25,13 +25,14 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, - "dependencies": { - "@medusajs/utils": "^1.11.9" + "peerDependencies": { + "@medusajs/framework": "^0.0.1" }, "keywords": [ "medusa-plugin", diff --git a/packages/modules/providers/file-local/src/index.ts b/packages/modules/providers/file-local/src/index.ts index 50180f56a4..92f1b8dbad 100644 --- a/packages/modules/providers/file-local/src/index.ts +++ b/packages/modules/providers/file-local/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { LocalFileService } from "./services/local-file" const services = [LocalFileService] diff --git a/packages/modules/providers/file-local/src/services/local-file.ts b/packages/modules/providers/file-local/src/services/local-file.ts index c8c6047797..b5001a6256 100644 --- a/packages/modules/providers/file-local/src/services/local-file.ts +++ b/packages/modules/providers/file-local/src/services/local-file.ts @@ -1,5 +1,8 @@ -import { FileTypes, LocalFileServiceOptions } from "@medusajs/types" -import { AbstractFileProviderService, MedusaError } from "@medusajs/utils" +import { FileTypes, LocalFileServiceOptions } from "@medusajs/framework/types" +import { + AbstractFileProviderService, + MedusaError, +} from "@medusajs/framework/utils" import fs from "fs/promises" import path from "path" diff --git a/packages/modules/providers/file-s3/package.json b/packages/modules/providers/file-s3/package.json index 722a473136..ab38562826 100644 --- a/packages/modules/providers/file-s3/package.json +++ b/packages/modules/providers/file-s3/package.json @@ -26,6 +26,7 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "axios": "^1.6.8", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -34,10 +35,10 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.556.0", - "@aws-sdk/s3-request-presigner": "^3.556.0", - "@medusajs/utils": "^1.11.9" + "@aws-sdk/s3-request-presigner": "^3.556.0" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "ulid": "^2.3.0" }, "keywords": [ diff --git a/packages/modules/providers/file-s3/src/index.ts b/packages/modules/providers/file-s3/src/index.ts index da9b468118..741be94297 100644 --- a/packages/modules/providers/file-s3/src/index.ts +++ b/packages/modules/providers/file-s3/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { S3FileService } from "./services/s3-file" const services = [S3FileService] diff --git a/packages/modules/providers/file-s3/src/services/s3-file.ts b/packages/modules/providers/file-s3/src/services/s3-file.ts index 1377a1d2a2..152ca60b6f 100644 --- a/packages/modules/providers/file-s3/src/services/s3-file.ts +++ b/packages/modules/providers/file-s3/src/services/s3-file.ts @@ -6,8 +6,15 @@ import { S3ClientConfigType, } from "@aws-sdk/client-s3" import { getSignedUrl } from "@aws-sdk/s3-request-presigner" -import { FileTypes, Logger, S3FileServiceOptions } from "@medusajs/types" -import { AbstractFileProviderService, MedusaError } from "@medusajs/utils" +import { + FileTypes, + Logger, + S3FileServiceOptions, +} from "@medusajs/framework/types" +import { + AbstractFileProviderService, + MedusaError, +} from "@medusajs/framework/utils" import path from "path" import { ulid } from "ulid" diff --git a/packages/modules/providers/fulfillment-manual/package.json b/packages/modules/providers/fulfillment-manual/package.json index 2db86a4876..fd3357b698 100644 --- a/packages/modules/providers/fulfillment-manual/package.json +++ b/packages/modules/providers/fulfillment-manual/package.json @@ -25,16 +25,19 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "body-parser": "^1.19.0", "express": "^4.17.1" }, + "peerDependencies": { + "@medusajs/framework": "^0.0.1" + }, "keywords": [ "medusa-plugin", "medusa-plugin-fulfillment" diff --git a/packages/modules/providers/fulfillment-manual/src/index.ts b/packages/modules/providers/fulfillment-manual/src/index.ts index 89339c0067..f7652183da 100644 --- a/packages/modules/providers/fulfillment-manual/src/index.ts +++ b/packages/modules/providers/fulfillment-manual/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { ManualFulfillmentService } from "./services/manual-fulfillment" const services = [ManualFulfillmentService] diff --git a/packages/modules/providers/fulfillment-manual/src/services/manual-fulfillment.ts b/packages/modules/providers/fulfillment-manual/src/services/manual-fulfillment.ts index 835572fa3e..7fd765dee6 100644 --- a/packages/modules/providers/fulfillment-manual/src/services/manual-fulfillment.ts +++ b/packages/modules/providers/fulfillment-manual/src/services/manual-fulfillment.ts @@ -1,4 +1,4 @@ -import { AbstractFulfillmentProviderService } from "@medusajs/utils" +import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils" // TODO rework type and DTO's diff --git a/packages/modules/providers/notification-local/package.json b/packages/modules/providers/notification-local/package.json index e94e53ae72..9dcd5a9745 100644 --- a/packages/modules/providers/notification-local/package.json +++ b/packages/modules/providers/notification-local/package.json @@ -26,13 +26,14 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "cross-env": "^5.2.1", "jest": "^29.7.0", "rimraf": "^5.0.1", "typescript": "^5.6.2" }, - "dependencies": { - "@medusajs/utils": "^1.11.9" + "peerDependencies": { + "@medusajs/framework": "^0.0.1" }, "keywords": [ "medusa-provider", diff --git a/packages/modules/providers/notification-local/src/index.ts b/packages/modules/providers/notification-local/src/index.ts index 9280b5ff69..c0efc3f3e7 100644 --- a/packages/modules/providers/notification-local/src/index.ts +++ b/packages/modules/providers/notification-local/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { LocalNotificationService } from "./services/local" const services = [LocalNotificationService] diff --git a/packages/modules/providers/notification-local/src/services/local.ts b/packages/modules/providers/notification-local/src/services/local.ts index af99b57fa3..880aebd7a2 100644 --- a/packages/modules/providers/notification-local/src/services/local.ts +++ b/packages/modules/providers/notification-local/src/services/local.ts @@ -2,11 +2,11 @@ import { Logger, NotificationTypes, LocalNotificationServiceOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractNotificationProviderService, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" type InjectedDependencies = { logger: Logger diff --git a/packages/modules/providers/notification-sendgrid/package.json b/packages/modules/providers/notification-sendgrid/package.json index 67ceef3780..8818e91166 100644 --- a/packages/modules/providers/notification-sendgrid/package.json +++ b/packages/modules/providers/notification-sendgrid/package.json @@ -26,6 +26,7 @@ "watch": "tsc --watch" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "@swc/core": "^1.5.29", "@swc/jest": "^0.2.36", "cross-env": "^5.2.1", @@ -34,9 +35,11 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "@sendgrid/mail": "^8.1.3" }, + "peerDependencies": { + "@medusajs/framework": "^0.0.1" + }, "keywords": [ "medusa-provider", "medusa-provider-sendgrid" diff --git a/packages/modules/providers/notification-sendgrid/src/index.ts b/packages/modules/providers/notification-sendgrid/src/index.ts index 7c8afdd5cc..f49098cb2d 100644 --- a/packages/modules/providers/notification-sendgrid/src/index.ts +++ b/packages/modules/providers/notification-sendgrid/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { SendgridNotificationService } from "./services/sendgrid" const services = [SendgridNotificationService] diff --git a/packages/modules/providers/notification-sendgrid/src/services/sendgrid.ts b/packages/modules/providers/notification-sendgrid/src/services/sendgrid.ts index 834a1723d7..ddd2f2ca1e 100644 --- a/packages/modules/providers/notification-sendgrid/src/services/sendgrid.ts +++ b/packages/modules/providers/notification-sendgrid/src/services/sendgrid.ts @@ -2,11 +2,11 @@ import { Logger, NotificationTypes, SendgridNotificationServiceOptions, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractNotificationProviderService, MedusaError, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import sendgrid from "@sendgrid/mail" type InjectedDependencies = { diff --git a/packages/modules/providers/payment-stripe/package.json b/packages/modules/providers/payment-stripe/package.json index aaf1ef416a..5d2f1d75f9 100644 --- a/packages/modules/providers/payment-stripe/package.json +++ b/packages/modules/providers/payment-stripe/package.json @@ -25,7 +25,7 @@ "watch": "tsc --watch" }, "devDependencies": { - "@medusajs/medusa": "^1.20.3", + "@medusajs/framework": "^0.0.1", "@types/stripe": "^8.0.417", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -33,10 +33,10 @@ "typescript": "^5.6.2" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "awilix": "^8.0.1" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "body-parser": "^1.19.0", "express": "^4.17.1", "stripe": "latest" diff --git a/packages/modules/providers/payment-stripe/src/core/stripe-base.ts b/packages/modules/providers/payment-stripe/src/core/stripe-base.ts index 0619ce8aa4..8c51410911 100644 --- a/packages/modules/providers/payment-stripe/src/core/stripe-base.ts +++ b/packages/modules/providers/payment-stripe/src/core/stripe-base.ts @@ -10,7 +10,7 @@ import { ProviderWebhookPayload, UpdatePaymentProviderSession, WebhookActionResult, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { AbstractPaymentProvider, isDefined, @@ -19,7 +19,7 @@ import { MedusaError, PaymentActions, PaymentSessionStatus, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { ErrorCodes, ErrorIntentStatus, diff --git a/packages/modules/providers/payment-stripe/src/index.ts b/packages/modules/providers/payment-stripe/src/index.ts index 28904bd1bb..5d7614763e 100644 --- a/packages/modules/providers/payment-stripe/src/index.ts +++ b/packages/modules/providers/payment-stripe/src/index.ts @@ -1,4 +1,4 @@ -import { ModuleProviderExports } from "@medusajs/types" +import { ModuleProviderExports } from "@medusajs/framework/types" import { StripeBancontactService, StripeBlikService, diff --git a/packages/modules/providers/payment-stripe/src/utils/get-smallest-unit.ts b/packages/modules/providers/payment-stripe/src/utils/get-smallest-unit.ts index 339876f74e..c007350921 100644 --- a/packages/modules/providers/payment-stripe/src/utils/get-smallest-unit.ts +++ b/packages/modules/providers/payment-stripe/src/utils/get-smallest-unit.ts @@ -1,5 +1,5 @@ -import { BigNumberInput } from "@medusajs/types" -import { BigNumber, MathBN } from "@medusajs/utils" +import { BigNumberInput } from "@medusajs/framework/types" +import { BigNumber, MathBN } from "@medusajs/framework/utils" function getCurrencyMultiplier(currency) { const currencyMultipliers = { diff --git a/packages/modules/region/integration-tests/__tests__/region-module.spec.ts b/packages/modules/region/integration-tests/__tests__/region-module.spec.ts index 72a011f5ce..66bb2e2b06 100644 --- a/packages/modules/region/integration-tests/__tests__/region-module.spec.ts +++ b/packages/modules/region/integration-tests/__tests__/region-module.spec.ts @@ -1,5 +1,5 @@ -import { IRegionModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IRegionModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { RegionModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/region/mikro-orm.config.dev.ts b/packages/modules/region/mikro-orm.config.dev.ts index a2e1382556..231e908aef 100644 --- a/packages/modules/region/mikro-orm.config.dev.ts +++ b/packages/modules/region/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.REGION, { diff --git a/packages/modules/region/package.json b/packages/modules/region/package.json index 92b82a2fc2..dd69f4e5eb 100644 --- a/packages/modules/region/package.json +++ b/packages/modules/region/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/region/src/index.ts b/packages/modules/region/src/index.ts index 9e24ccddc5..ccd4c6c8a0 100644 --- a/packages/modules/region/src/index.ts +++ b/packages/modules/region/src/index.ts @@ -1,6 +1,6 @@ import { RegionModuleService } from "./services" import loadDefaults from "./loaders/defaults" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.REGION, { service: RegionModuleService, diff --git a/packages/modules/region/src/loaders/defaults.ts b/packages/modules/region/src/loaders/defaults.ts index 0d024643e3..fcf097ba31 100644 --- a/packages/modules/region/src/loaders/defaults.ts +++ b/packages/modules/region/src/loaders/defaults.ts @@ -1,5 +1,12 @@ -import { LoaderOptions, Logger, ModulesSdkTypes } from "@medusajs/types" -import { ContainerRegistrationKeys, DefaultsUtils } from "@medusajs/utils" +import { + LoaderOptions, + Logger, + ModulesSdkTypes, +} from "@medusajs/framework/types" +import { + ContainerRegistrationKeys, + DefaultsUtils, +} from "@medusajs/framework/utils" import { Country } from "@models" export default async ({ container }: LoaderOptions): Promise => { diff --git a/packages/modules/region/src/migrations/Migration20240205173216.ts b/packages/modules/region/src/migrations/Migration20240205173216.ts index 4b447ecf15..a0296a7260 100644 --- a/packages/modules/region/src/migrations/Migration20240205173216.ts +++ b/packages/modules/region/src/migrations/Migration20240205173216.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class RegionModuleSetup20240205173216 extends Migration { diff --git a/packages/modules/region/src/migrations/Migration20240624200006.ts b/packages/modules/region/src/migrations/Migration20240624200006.ts index d2047d2353..c5243910e0 100644 --- a/packages/modules/region/src/migrations/Migration20240624200006.ts +++ b/packages/modules/region/src/migrations/Migration20240624200006.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class Migration20240624200006 extends Migration { diff --git a/packages/modules/region/src/models/country.ts b/packages/modules/region/src/models/country.ts index 460e43d8d9..e1ffe03ca8 100644 --- a/packages/modules/region/src/models/country.ts +++ b/packages/modules/region/src/models/country.ts @@ -1,4 +1,4 @@ -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import Region from "./region" export default model diff --git a/packages/modules/region/src/models/region.ts b/packages/modules/region/src/models/region.ts index fa643107bb..cfc64a04ba 100644 --- a/packages/modules/region/src/models/region.ts +++ b/packages/modules/region/src/models/region.ts @@ -1,4 +1,4 @@ -import { model } from "@medusajs/utils" +import { model } from "@medusajs/framework/utils" import RegionCountry from "./country" export default model.define("region", { diff --git a/packages/modules/region/src/services/region-module.ts b/packages/modules/region/src/services/region-module.ts index 2ed6781753..09f684dea2 100644 --- a/packages/modules/region/src/services/region-module.ts +++ b/packages/modules/region/src/services/region-module.ts @@ -12,7 +12,7 @@ import { SoftDeleteReturn, UpdateRegionDTO, UpsertRegionDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { arrayDifference, getDuplicates, @@ -24,7 +24,7 @@ import { MedusaService, promiseAll, removeUndefined, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Country, Region } from "@models" import { UpdateRegionInput } from "@types" diff --git a/packages/modules/region/src/types/index.ts b/packages/modules/region/src/types/index.ts index a9f2f2a7e3..87e0be8c3a 100644 --- a/packages/modules/region/src/types/index.ts +++ b/packages/modules/region/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger, UpdateRegionDTO } from "@medusajs/types" +import { Logger, UpdateRegionDTO } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/sales-channel/integration-tests/__tests__/services/sales-channel-module.spec.ts b/packages/modules/sales-channel/integration-tests/__tests__/services/sales-channel-module.spec.ts index 7934b7b85a..805de51364 100644 --- a/packages/modules/sales-channel/integration-tests/__tests__/services/sales-channel-module.spec.ts +++ b/packages/modules/sales-channel/integration-tests/__tests__/services/sales-channel-module.spec.ts @@ -1,5 +1,5 @@ -import { ISalesChannelModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { ISalesChannelModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { SalesChannelModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" diff --git a/packages/modules/sales-channel/mikro-orm.config.dev.ts b/packages/modules/sales-channel/mikro-orm.config.dev.ts index 8f9f45ef98..5405bf00c6 100644 --- a/packages/modules/sales-channel/mikro-orm.config.dev.ts +++ b/packages/modules/sales-channel/mikro-orm.config.dev.ts @@ -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.SALES_CHANNEL, { entities: Object.values(entities), diff --git a/packages/modules/sales-channel/package.json b/packages/modules/sales-channel/package.json index 19a2534fff..ccb92af2d1 100644 --- a/packages/modules/sales-channel/package.json +++ b/packages/modules/sales-channel/package.json @@ -37,7 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.14", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -47,10 +47,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", diff --git a/packages/modules/sales-channel/src/index.ts b/packages/modules/sales-channel/src/index.ts index dca8ba9c81..274cd392ad 100644 --- a/packages/modules/sales-channel/src/index.ts +++ b/packages/modules/sales-channel/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { SalesChannelModuleService } from "@services" export default Module(Modules.SALES_CHANNEL, { diff --git a/packages/modules/sales-channel/src/joinfer-config.ts b/packages/modules/sales-channel/src/joinfer-config.ts index dae9675d4d..3816d19db2 100644 --- a/packages/modules/sales-channel/src/joinfer-config.ts +++ b/packages/modules/sales-channel/src/joinfer-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { default as schema } from "./schema" export const joinerConfig = defineJoinerConfig(Modules.SALES_CHANNEL, { diff --git a/packages/modules/sales-channel/src/models/sales-channel.ts b/packages/modules/sales-channel/src/models/sales-channel.ts index b821f13e5a..42fe6e125d 100644 --- a/packages/modules/sales-channel/src/models/sales-channel.ts +++ b/packages/modules/sales-channel/src/models/sales-channel.ts @@ -1,6 +1,10 @@ -import { DALUtils, Searchable, generateEntityId } from "@medusajs/utils" +import { + DALUtils, + Searchable, + generateEntityId, +} from "@medusajs/framework/utils" -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { BeforeCreate, Entity, diff --git a/packages/modules/sales-channel/src/services/sales-channel-module.ts b/packages/modules/sales-channel/src/services/sales-channel-module.ts index 62480f46c7..5f8bab37ac 100644 --- a/packages/modules/sales-channel/src/services/sales-channel-module.ts +++ b/packages/modules/sales-channel/src/services/sales-channel-module.ts @@ -10,7 +10,7 @@ import { SalesChannelDTO, UpdateSalesChannelDTO, UpsertSalesChannelDTO, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, InjectTransactionManager, @@ -18,7 +18,7 @@ import { MedusaContext, MedusaService, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { SalesChannel } from "@models" import { UpdateSalesChanneInput } from "@types" diff --git a/packages/modules/sales-channel/src/types/index.ts b/packages/modules/sales-channel/src/types/index.ts index 773523638d..03a2e05499 100644 --- a/packages/modules/sales-channel/src/types/index.ts +++ b/packages/modules/sales-channel/src/types/index.ts @@ -1,7 +1,7 @@ -import { Logger, UpdateSalesChannelDTO } from "@medusajs/types" +import { Logger, UpdateSalesChannelDTO } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger } -export type UpdateSalesChanneInput = UpdateSalesChannelDTO & { id: string } \ No newline at end of file +export type UpdateSalesChanneInput = UpdateSalesChannelDTO & { id: string } diff --git a/packages/modules/stock-location-next/integration-tests/__tests__/stock-location-module-service.spec.ts b/packages/modules/stock-location-next/integration-tests/__tests__/stock-location-module-service.spec.ts index 92e6eab380..1d77cdd78a 100644 --- a/packages/modules/stock-location-next/integration-tests/__tests__/stock-location-module-service.spec.ts +++ b/packages/modules/stock-location-next/integration-tests/__tests__/stock-location-module-service.spec.ts @@ -1,7 +1,7 @@ import { moduleIntegrationTestRunner } from "medusa-test-utils" -import { IStockLocationService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IStockLocationService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { StockLocationModuleService } from "../../src/services" jest.setTimeout(100000) diff --git a/packages/modules/stock-location-next/mikro-orm.config.dev.ts b/packages/modules/stock-location-next/mikro-orm.config.dev.ts index 00da7459ef..097b3794f9 100644 --- a/packages/modules/stock-location-next/mikro-orm.config.dev.ts +++ b/packages/modules/stock-location-next/mikro-orm.config.dev.ts @@ -1,6 +1,6 @@ import * as entities from "./src/models" -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" export default defineMikroOrmCliConfig(Modules.STOCK_LOCATION, { entities: Object.values(entities), diff --git a/packages/modules/stock-location-next/package.json b/packages/modules/stock-location-next/package.json index c4380cfe26..cde0c678e1 100644 --- a/packages/modules/stock-location-next/package.json +++ b/packages/modules/stock-location-next/package.json @@ -23,7 +23,7 @@ "author": "Medusa", "license": "MIT", "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", @@ -33,10 +33,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", diff --git a/packages/modules/stock-location-next/src/index.ts b/packages/modules/stock-location-next/src/index.ts index 2249ce249c..d0cc3ca12b 100644 --- a/packages/modules/stock-location-next/src/index.ts +++ b/packages/modules/stock-location-next/src/index.ts @@ -1,5 +1,5 @@ import { StockLocationModuleService } from "@services" -import { ModuleExports } from "@medusajs/types" +import { ModuleExports } from "@medusajs/framework/types" const moduleDefinition: ModuleExports = { service: StockLocationModuleService, diff --git a/packages/modules/stock-location-next/src/joiner-config.ts b/packages/modules/stock-location-next/src/joiner-config.ts index d8874d1526..33b787b7f7 100644 --- a/packages/modules/stock-location-next/src/joiner-config.ts +++ b/packages/modules/stock-location-next/src/joiner-config.ts @@ -1,4 +1,4 @@ -import { defineJoinerConfig, Modules } from "@medusajs/utils" +import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" import { StockLocation } from "./models" import { default as schema } from "./schema" diff --git a/packages/modules/stock-location-next/src/models/stock-location-address.ts b/packages/modules/stock-location-next/src/models/stock-location-address.ts index b968d16473..b479abffbd 100644 --- a/packages/modules/stock-location-next/src/models/stock-location-address.ts +++ b/packages/modules/stock-location-next/src/models/stock-location-address.ts @@ -8,7 +8,7 @@ import { import { createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const StockLocationAddressDeletedAtIndex = createPsqlIndexStatementHelper({ tableName: "stock_location_address", diff --git a/packages/modules/stock-location-next/src/models/stock-location.ts b/packages/modules/stock-location-next/src/models/stock-location.ts index a3c95f0ad8..45427b92ea 100644 --- a/packages/modules/stock-location-next/src/models/stock-location.ts +++ b/packages/modules/stock-location-next/src/models/stock-location.ts @@ -3,7 +3,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/stock-location-next/src/services/stock-location-module.ts b/packages/modules/stock-location-next/src/services/stock-location-module.ts index 1515b1d1c8..da3f21eab2 100644 --- a/packages/modules/stock-location-next/src/services/stock-location-module.ts +++ b/packages/modules/stock-location-next/src/services/stock-location-module.ts @@ -12,7 +12,7 @@ import { StockLocationTypes, UpdateStockLocationInput, UpsertStockLocationInput, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, InjectTransactionManager, @@ -21,7 +21,7 @@ import { MedusaService, Modules, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { joinerConfig } from "../joiner-config" import { StockLocation, StockLocationAddress } from "../models" diff --git a/packages/modules/store/integration-tests/__fixtures__/index.ts b/packages/modules/store/integration-tests/__fixtures__/index.ts index 32bfacd168..2b65438d17 100644 --- a/packages/modules/store/integration-tests/__fixtures__/index.ts +++ b/packages/modules/store/integration-tests/__fixtures__/index.ts @@ -1,4 +1,4 @@ -import { StoreTypes } from "@medusajs/types" +import { StoreTypes } from "@medusajs/framework/types" export const createStoreFixture: StoreTypes.CreateStoreDTO = { name: "Test store", diff --git a/packages/modules/store/integration-tests/__tests__/store-module-service.spec.ts b/packages/modules/store/integration-tests/__tests__/store-module-service.spec.ts index 2e75c39d67..f672ab5706 100644 --- a/packages/modules/store/integration-tests/__tests__/store-module-service.spec.ts +++ b/packages/modules/store/integration-tests/__tests__/store-module-service.spec.ts @@ -1,5 +1,5 @@ -import { IStoreModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { IStoreModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { StoreModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { createStoreFixture } from "../__fixtures__" diff --git a/packages/modules/store/mikro-orm.config.dev.ts b/packages/modules/store/mikro-orm.config.dev.ts index 486c39ae9b..d54090d97c 100644 --- a/packages/modules/store/mikro-orm.config.dev.ts +++ b/packages/modules/store/mikro-orm.config.dev.ts @@ -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.STORE, { entities: Object.values(entities), diff --git a/packages/modules/store/package.json b/packages/modules/store/package.json index 18e9c07a65..bb83e8784e 100644 --- a/packages/modules/store/package.json +++ b/packages/modules/store/package.json @@ -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", @@ -47,10 +47,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", diff --git a/packages/modules/store/src/index.ts b/packages/modules/store/src/index.ts index 98cd455a50..386c94a9ff 100644 --- a/packages/modules/store/src/index.ts +++ b/packages/modules/store/src/index.ts @@ -1,5 +1,5 @@ import { StoreModuleService } from "@services" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.STORE, { service: StoreModuleService, diff --git a/packages/modules/store/src/models/currency.ts b/packages/modules/store/src/models/currency.ts index f68b2c6f8f..e62286f141 100644 --- a/packages/modules/store/src/models/currency.ts +++ b/packages/modules/store/src/models/currency.ts @@ -3,7 +3,7 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, diff --git a/packages/modules/store/src/models/store.ts b/packages/modules/store/src/models/store.ts index 569720f64a..86df01dbf3 100644 --- a/packages/modules/store/src/models/store.ts +++ b/packages/modules/store/src/models/store.ts @@ -3,9 +3,9 @@ import { Searchable, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { BeforeCreate, diff --git a/packages/modules/store/src/services/store-module-service.ts b/packages/modules/store/src/services/store-module-service.ts index 822407f11d..5f8d422ce0 100644 --- a/packages/modules/store/src/services/store-module-service.ts +++ b/packages/modules/store/src/services/store-module-service.ts @@ -5,7 +5,7 @@ import { IStoreModuleService, ModulesSdkTypes, StoreTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { getDuplicates, InjectManager, @@ -16,7 +16,7 @@ import { MedusaService, promiseAll, removeUndefined, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { Store, StoreCurrency } from "@models" import { UpdateStoreInput } from "@types" diff --git a/packages/modules/store/src/types/index.ts b/packages/modules/store/src/types/index.ts index bccc6a2763..a27bfdda69 100644 --- a/packages/modules/store/src/types/index.ts +++ b/packages/modules/store/src/types/index.ts @@ -1,4 +1,8 @@ -import { IEventBusModuleService, Logger, StoreTypes } from "@medusajs/types" +import { + IEventBusModuleService, + Logger, + StoreTypes, +} from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/tax/integration-tests/__tests__/index.spec.ts b/packages/modules/tax/integration-tests/__tests__/index.spec.ts index 081f24d071..e46a72eae0 100644 --- a/packages/modules/tax/integration-tests/__tests__/index.spec.ts +++ b/packages/modules/tax/integration-tests/__tests__/index.spec.ts @@ -1,5 +1,5 @@ -import { ITaxModuleService } from "@medusajs/types" -import { Module, Modules } from "@medusajs/utils" +import { ITaxModuleService } from "@medusajs/framework/types" +import { Module, Modules } from "@medusajs/framework/utils" import { TaxModuleService } from "@services" import { moduleIntegrationTestRunner } from "medusa-test-utils" import { setupTaxStructure } from "../utils/setup-tax-structure" diff --git a/packages/modules/tax/integration-tests/utils/setup-tax-structure.ts b/packages/modules/tax/integration-tests/utils/setup-tax-structure.ts index 0813e0a662..f78fcfd761 100644 --- a/packages/modules/tax/integration-tests/utils/setup-tax-structure.ts +++ b/packages/modules/tax/integration-tests/utils/setup-tax-structure.ts @@ -1,4 +1,4 @@ -import { ITaxModuleService } from "@medusajs/types" +import { ITaxModuleService } from "@medusajs/framework/types" /** * Setup for this specific test diff --git a/packages/modules/tax/mikro-orm.config.dev.ts b/packages/modules/tax/mikro-orm.config.dev.ts index 33896c8c66..3694986136 100644 --- a/packages/modules/tax/mikro-orm.config.dev.ts +++ b/packages/modules/tax/mikro-orm.config.dev.ts @@ -1,4 +1,4 @@ -import { defineMikroOrmCliConfig, Modules } from "@medusajs/utils" +import { defineMikroOrmCliConfig, Modules } from "@medusajs/framework/utils" import * as entities from "./src/models" export default defineMikroOrmCliConfig(Modules.TAX, { diff --git a/packages/modules/tax/package.json b/packages/modules/tax/package.json index cc313c2af8..4280d64c5d 100644 --- a/packages/modules/tax/package.json +++ b/packages/modules/tax/package.json @@ -37,7 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.14", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -47,11 +47,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", diff --git a/packages/modules/tax/src/index.ts b/packages/modules/tax/src/index.ts index 13e46b12d4..20b185f529 100644 --- a/packages/modules/tax/src/index.ts +++ b/packages/modules/tax/src/index.ts @@ -1,6 +1,6 @@ import { TaxModuleService } from "@services" import loadProviders from "./loaders/providers" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.TAX, { service: TaxModuleService, diff --git a/packages/modules/tax/src/loaders/providers.ts b/packages/modules/tax/src/loaders/providers.ts index fdeac2c944..ef59cecd3e 100644 --- a/packages/modules/tax/src/loaders/providers.ts +++ b/packages/modules/tax/src/loaders/providers.ts @@ -1,6 +1,10 @@ -import { moduleProviderLoader } from "@medusajs/modules-sdk" +import { moduleProviderLoader } from "@medusajs/framework/modules-sdk" -import { LoaderOptions, ModuleProvider, ModulesSdkTypes } from "@medusajs/types" +import { + LoaderOptions, + ModuleProvider, + ModulesSdkTypes, +} from "@medusajs/framework/types" import { Lifetime, asFunction } from "awilix" import * as providers from "../providers" diff --git a/packages/modules/tax/src/migrations/Migration20240227090331.ts b/packages/modules/tax/src/migrations/Migration20240227090331.ts index e7383472e6..f9af48af98 100644 --- a/packages/modules/tax/src/migrations/Migration20240227090331.ts +++ b/packages/modules/tax/src/migrations/Migration20240227090331.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class Migration20240227090331 extends Migration { diff --git a/packages/modules/tax/src/models/tax-rate-rule.ts b/packages/modules/tax/src/models/tax-rate-rule.ts index aca6224c0c..a27fa65086 100644 --- a/packages/modules/tax/src/models/tax-rate-rule.ts +++ b/packages/modules/tax/src/models/tax-rate-rule.ts @@ -1,9 +1,9 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/tax/src/models/tax-rate.ts b/packages/modules/tax/src/models/tax-rate.ts index 3d4cb95d3f..e009339305 100644 --- a/packages/modules/tax/src/models/tax-rate.ts +++ b/packages/modules/tax/src/models/tax-rate.ts @@ -1,10 +1,10 @@ -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { BeforeCreate, Cascade, diff --git a/packages/modules/tax/src/models/tax-region.ts b/packages/modules/tax/src/models/tax-region.ts index 400fd577c9..95b7c5f832 100644 --- a/packages/modules/tax/src/models/tax-region.ts +++ b/packages/modules/tax/src/models/tax-region.ts @@ -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, Cascade, diff --git a/packages/modules/tax/src/providers/system.ts b/packages/modules/tax/src/providers/system.ts index 626a48d7a3..d90dfe35dc 100644 --- a/packages/modules/tax/src/providers/system.ts +++ b/packages/modules/tax/src/providers/system.ts @@ -1,4 +1,4 @@ -import { ITaxProvider, TaxTypes } from "@medusajs/types" +import { ITaxProvider, TaxTypes } from "@medusajs/framework/types" export default class SystemTaxService implements ITaxProvider { static identifier = "system" diff --git a/packages/modules/tax/src/services/tax-module-service.ts b/packages/modules/tax/src/services/tax-module-service.ts index db4aaf6a60..303e66bde0 100644 --- a/packages/modules/tax/src/services/tax-module-service.ts +++ b/packages/modules/tax/src/services/tax-module-service.ts @@ -7,7 +7,7 @@ import { ModulesSdkTypes, TaxRegionDTO, TaxTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { InjectManager, InjectTransactionManager, @@ -17,7 +17,7 @@ import { MedusaError, ModulesSdkUtils, promiseAll, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import { TaxProvider, TaxRate, TaxRateRule, TaxRegion } from "@models" type InjectedDependencies = { diff --git a/packages/modules/user/integration-tests/__tests__/invite.spec.ts b/packages/modules/user/integration-tests/__tests__/invite.spec.ts index 9fd1aef4f1..ee8abb7f0f 100644 --- a/packages/modules/user/integration-tests/__tests__/invite.spec.ts +++ b/packages/modules/user/integration-tests/__tests__/invite.spec.ts @@ -1,5 +1,5 @@ -import { IUserModuleService } from "@medusajs/types/dist/user" -import { Modules, UserEvents } from "@medusajs/utils" +import { IUserModuleService } from "@medusajs/framework/types/dist/user" +import { Modules, UserEvents } from "@medusajs/framework/utils" import { MockEventBusService, moduleIntegrationTestRunner, diff --git a/packages/modules/user/integration-tests/__tests__/user.spec.ts b/packages/modules/user/integration-tests/__tests__/user.spec.ts index c395f6eea3..302d04d992 100644 --- a/packages/modules/user/integration-tests/__tests__/user.spec.ts +++ b/packages/modules/user/integration-tests/__tests__/user.spec.ts @@ -1,5 +1,5 @@ -import { IUserModuleService } from "@medusajs/types" -import { Module, Modules, UserEvents } from "@medusajs/utils" +import { IUserModuleService } from "@medusajs/framework/types" +import { Module, Modules, UserEvents } from "@medusajs/framework/utils" import { UserModuleService } from "@services" import { MockEventBusService, diff --git a/packages/modules/user/mikro-orm.config.dev.ts b/packages/modules/user/mikro-orm.config.dev.ts index 2deb0982b1..7a88d02d9f 100644 --- a/packages/modules/user/mikro-orm.config.dev.ts +++ b/packages/modules/user/mikro-orm.config.dev.ts @@ -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.USER, { entities: Object.values(entities), diff --git a/packages/modules/user/package.json b/packages/modules/user/package.json index 8e113a708d..4a1e58ffa8 100644 --- a/packages/modules/user/package.json +++ b/packages/modules/user/package.json @@ -37,7 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { - "@medusajs/types": "^1.11.15", + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "@swc/core": "^1.5.29", "@swc/jest": "^0.2.36", @@ -50,10 +50,10 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/utils": "^1.11.9", "jsonwebtoken": "^9.0.2" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "@mikro-orm/core": "5.9.7", "@mikro-orm/migrations": "5.9.7", "@mikro-orm/postgresql": "5.9.7", diff --git a/packages/modules/user/src/index.ts b/packages/modules/user/src/index.ts index 4ea7d19956..a20f37a68a 100644 --- a/packages/modules/user/src/index.ts +++ b/packages/modules/user/src/index.ts @@ -1,5 +1,5 @@ import { UserModuleService } from "@services" -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" export default Module(Modules.USER, { service: UserModuleService, diff --git a/packages/modules/user/src/migrations/Migration20240214033943.ts b/packages/modules/user/src/migrations/Migration20240214033943.ts index 8ba729b37f..7aa803e73c 100644 --- a/packages/modules/user/src/migrations/Migration20240214033943.ts +++ b/packages/modules/user/src/migrations/Migration20240214033943.ts @@ -1,4 +1,4 @@ -import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/utils" +import { generatePostgresAlterColummnIfExistStatement } from "@medusajs/framework/utils" import { Migration } from "@mikro-orm/migrations" export class Migration20240214033943 extends Migration { diff --git a/packages/modules/user/src/models/invite.ts b/packages/modules/user/src/models/invite.ts index f29710073d..fd180b2a87 100644 --- a/packages/modules/user/src/models/invite.ts +++ b/packages/modules/user/src/models/invite.ts @@ -9,13 +9,13 @@ import { Property, } from "@mikro-orm/core" -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { DALUtils, createPsqlIndexStatementHelper, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const inviteEmailIndexName = "IDX_invite_email" const inviteEmailIndexStatement = createPsqlIndexStatementHelper({ diff --git a/packages/modules/user/src/models/user.ts b/packages/modules/user/src/models/user.ts index ea66b68df1..0c8b9acff9 100644 --- a/packages/modules/user/src/models/user.ts +++ b/packages/modules/user/src/models/user.ts @@ -9,13 +9,13 @@ import { Property, } from "@mikro-orm/core" -import { DAL } from "@medusajs/types" +import { DAL } from "@medusajs/framework/types" import { createPsqlIndexStatementHelper, DALUtils, generateEntityId, Searchable, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" const userEmailIndexName = "IDX_user_email" const userEmailIndexStatement = createPsqlIndexStatementHelper({ diff --git a/packages/modules/user/src/services/user-module.ts b/packages/modules/user/src/services/user-module.ts index df53020118..60712936f0 100644 --- a/packages/modules/user/src/services/user-module.ts +++ b/packages/modules/user/src/services/user-module.ts @@ -4,7 +4,7 @@ import { InternalModuleDeclaration, ModulesSdkTypes, UserTypes, -} from "@medusajs/types" +} from "@medusajs/framework/types" import { arrayDifference, CommonEvents, @@ -15,7 +15,7 @@ import { MedusaError, MedusaService, UserEvents, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import jwt, { JwtPayload } from "jsonwebtoken" import crypto from "node:crypto" diff --git a/packages/modules/user/src/types/index.ts b/packages/modules/user/src/types/index.ts index 591aa4b9a5..f22bb3441a 100644 --- a/packages/modules/user/src/types/index.ts +++ b/packages/modules/user/src/types/index.ts @@ -1,4 +1,4 @@ -import { Logger } from "@medusajs/types" +import { Logger } from "@medusajs/framework/types" export type InitializeModuleInjectableDependencies = { logger?: Logger diff --git a/packages/modules/workflow-engine-inmemory/package.json b/packages/modules/workflow-engine-inmemory/package.json index 4e9ff730f6..091e9719cc 100644 --- a/packages/modules/workflow-engine-inmemory/package.json +++ b/packages/modules/workflow-engine-inmemory/package.json @@ -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,10 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/framework": "^0.0.1", "cron-parser": "^4.9.0" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "@mikro-orm/core": "5.9.7", "@mikro-orm/migrations": "5.9.7", "@mikro-orm/postgresql": "5.9.7", diff --git a/packages/modules/workflow-engine-redis/package.json b/packages/modules/workflow-engine-redis/package.json index dd420e20e1..1cc520065f 100644 --- a/packages/modules/workflow-engine-redis/package.json +++ b/packages/modules/workflow-engine-redis/package.json @@ -37,6 +37,7 @@ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear" }, "devDependencies": { + "@medusajs/framework": "^0.0.1", "@mikro-orm/cli": "5.9.7", "cross-env": "^5.2.1", "jest": "^29.7.0", @@ -47,11 +48,11 @@ "typescript": "^5.6.2" }, "dependencies": { - "@medusajs/framework": "^0.0.1", "bullmq": "5.13.0", "ioredis": "^5.4.1" }, "peerDependencies": { + "@medusajs/framework": "^0.0.1", "@mikro-orm/core": "5.9.7", "@mikro-orm/migrations": "5.9.7", "@mikro-orm/postgresql": "5.9.7", diff --git a/packages/modules/workflow-engine-redis/src/index.ts b/packages/modules/workflow-engine-redis/src/index.ts index d6fc0b0466..62a98e03f7 100644 --- a/packages/modules/workflow-engine-redis/src/index.ts +++ b/packages/modules/workflow-engine-redis/src/index.ts @@ -1,4 +1,4 @@ -import { Module, Modules } from "@medusajs/utils" +import { Module, Modules } from "@medusajs/framework/utils" import { WorkflowsModuleService } from "@services" import { loadUtils, redisConnection } from "./loaders" diff --git a/packages/modules/workflow-engine-redis/src/models/workflow-execution.ts b/packages/modules/workflow-engine-redis/src/models/workflow-execution.ts index 559f54f558..22e693d428 100644 --- a/packages/modules/workflow-engine-redis/src/models/workflow-execution.ts +++ b/packages/modules/workflow-engine-redis/src/models/workflow-execution.ts @@ -1,5 +1,5 @@ import { TransactionState } from "@medusajs/framework/orchestration" -import { DALUtils, generateEntityId } from "@medusajs/utils" +import { DALUtils, generateEntityId } from "@medusajs/framework/utils" import { BeforeCreate, Entity, diff --git a/packages/modules/workflow-engine-redis/src/services/workflows-module.ts b/packages/modules/workflow-engine-redis/src/services/workflows-module.ts index 9080ac9522..37c371356f 100644 --- a/packages/modules/workflow-engine-redis/src/services/workflows-module.ts +++ b/packages/modules/workflow-engine-redis/src/services/workflows-module.ts @@ -9,7 +9,7 @@ import { InjectSharedContext, MedusaContext, ModulesSdkUtils, -} from "@medusajs/utils" +} from "@medusajs/framework/utils" import type { ReturnWorkflow, UnwrapWorkflowInputDataType, diff --git a/www/utils/packages/typedoc-generate-references/src/constants/custom-options.ts b/www/utils/packages/typedoc-generate-references/src/constants/custom-options.ts index 9118163cb0..983843030b 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/custom-options.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/custom-options.ts @@ -62,7 +62,7 @@ const customOptions: Record> = { ], }), "medusa-config": getOptions({ - entryPointPath: "packages/framework/framework/src/config/types.ts", + entryPointPath: "packages/frameworksrc/config/types.ts", tsConfigName: "framework.json", name: "medusa-config", }), diff --git a/yarn.lock b/yarn.lock index 3f1a2c136d..652da28dc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5574,8 +5574,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/api-key@workspace:packages/modules/api-key" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 medusa-test-utils: ^1.1.44 @@ -5584,6 +5583,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5595,12 +5595,14 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/auth-emailpass@workspace:packages/modules/providers/auth-emailpass" dependencies: - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 scrypt-kdf: ^2.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5608,14 +5610,15 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/auth-github@workspace:packages/modules/providers/auth-github" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@types/simple-oauth2": ^5.0.7 cross-env: ^5.2.1 jest: ^29.7.0 msw: ^2.3.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5623,8 +5626,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/auth-google@workspace:packages/modules/providers/auth-google" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@types/simple-oauth2": ^5.0.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5632,6 +5634,8 @@ __metadata: msw: ^2.3.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5639,9 +5643,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/auth@workspace:packages/modules/auth" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.14 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5653,6 +5655,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5664,13 +5667,13 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/cache-inmemory@workspace:packages/modules/cache-inmemory" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.9 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5678,15 +5681,14 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/cache-redis@workspace:packages/modules/cache-redis" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 ioredis: ^5.4.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 awilix: ^8.0.1 languageName: unknown linkType: soft @@ -5695,8 +5697,6 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/cart@workspace:packages/modules/cart" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5706,6 +5706,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5738,8 +5739,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/currency@workspace:packages/modules/currency" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5749,6 +5749,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5760,8 +5761,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/customer@workspace:packages/modules/customer" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5771,6 +5771,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5836,14 +5837,13 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/event-bus-local@workspace:packages/modules/event-bus-local" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.12 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 ulid: ^2.3.0 languageName: unknown linkType: soft @@ -5852,9 +5852,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/event-bus-redis@workspace:packages/modules/event-bus-redis" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 bullmq: 5.13.0 cross-env: ^5.2.1 ioredis: ^5.4.1 @@ -5863,6 +5861,7 @@ __metadata: rimraf: ^5.0.1 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 awilix: ^8.0.1 languageName: unknown linkType: soft @@ -5871,11 +5870,13 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/file-local-next@workspace:packages/modules/providers/file-local" dependencies: - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5885,13 +5886,14 @@ __metadata: dependencies: "@aws-sdk/client-s3": ^3.556.0 "@aws-sdk/s3-request-presigner": ^3.556.0 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 axios: ^1.6.8 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 ulid: ^2.3.0 languageName: unknown linkType: soft @@ -5900,9 +5902,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/file@workspace:packages/modules/file" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.15 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 faker: ^5.5.3 @@ -5914,6 +5914,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -5960,13 +5961,15 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/fulfillment-manual@workspace:packages/modules/providers/fulfillment-manual" dependencies: - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 body-parser: ^1.19.0 cross-env: ^5.2.1 express: ^4.17.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -5974,10 +5977,8 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/fulfillment@workspace:packages/modules/fulfillment" dependencies: + "@medusajs/framework": ^0.0.1 "@medusajs/fulfillment-manual": "workspace:*" - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -5987,6 +5988,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6032,8 +6034,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/index@workspace:packages/modules/index" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6043,6 +6044,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6054,8 +6056,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/inventory-next@workspace:packages/modules/inventory-next" dependencies: - "@medusajs/types": ^1.11.15 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6065,6 +6066,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6091,9 +6093,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/link-modules@workspace:packages/modules/link-modules" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 medusa-test-utils: ^1.1.44 @@ -6103,6 +6103,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6181,7 +6182,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/medusa@^1.20.3, @medusajs/medusa@^1.20.4, @medusajs/medusa@workspace:*, @medusajs/medusa@workspace:packages/medusa": +"@medusajs/medusa@^1.20.4, @medusajs/medusa@workspace:*, @medusajs/medusa@workspace:packages/medusa": version: 0.0.0-use.local resolution: "@medusajs/medusa@workspace:packages/medusa" dependencies: @@ -6263,11 +6264,13 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/notification-local@workspace:packages/modules/providers/notification-local" dependencies: - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 cross-env: ^5.2.1 jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -6275,7 +6278,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/notification-sendgrid@workspace:packages/modules/providers/notification-sendgrid" dependencies: - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@sendgrid/mail": ^8.1.3 "@swc/core": ^1.5.29 "@swc/jest": ^0.2.36 @@ -6283,6 +6286,8 @@ __metadata: jest: ^29.7.0 rimraf: ^5.0.1 typescript: ^5.6.2 + peerDependencies: + "@medusajs/framework": ^0.0.1 languageName: unknown linkType: soft @@ -6290,9 +6295,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/notification@workspace:packages/modules/notification" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6302,6 +6305,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6337,8 +6341,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/order@workspace:packages/modules/order" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6348,6 +6351,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6359,8 +6363,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/payment-stripe@workspace:packages/modules/providers/payment-stripe" dependencies: - "@medusajs/medusa": ^1.20.3 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@types/stripe": ^8.0.417 body-parser: ^1.19.0 cross-env: ^5.2.1 @@ -6370,6 +6373,7 @@ __metadata: stripe: latest typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 awilix: ^8.0.1 languageName: unknown linkType: soft @@ -6378,10 +6382,9 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/payment@workspace:packages/modules/payment" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 + bignumber.js: "*" cross-env: ^5.2.1 jest: ^29.7.0 medusa-test-utils: ^1.1.44 @@ -6391,6 +6394,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6403,8 +6407,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/pricing@workspace:packages/modules/pricing" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6415,6 +6418,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6426,8 +6430,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/product@workspace:packages/modules/product" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 faker: ^5.5.3 @@ -6439,6 +6442,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6450,8 +6454,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/promotion@workspace:packages/modules/promotion" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": 1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6462,6 +6465,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6473,8 +6477,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/region@workspace:packages/modules/region" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6484,6 +6487,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6495,8 +6499,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/sales-channel@workspace:packages/modules/sales-channel" dependencies: - "@medusajs/types": ^1.11.14 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6506,6 +6509,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6517,8 +6521,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/stock-location-next@workspace:packages/modules/stock-location-next" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6528,6 +6531,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6539,8 +6543,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/store@workspace:packages/modules/store" dependencies: - "@medusajs/types": ^1.11.16 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6550,6 +6553,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6561,9 +6565,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/tax@workspace:packages/modules/tax" dependencies: - "@medusajs/modules-sdk": ^1.12.11 - "@medusajs/types": ^1.11.14 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 cross-env: ^5.2.1 jest: ^29.7.0 @@ -6573,6 +6575,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6606,7 +6609,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/types@1.11.16, @medusajs/types@^1.11.12, @medusajs/types@^1.11.14, @medusajs/types@^1.11.15, @medusajs/types@^1.11.16, @medusajs/types@^1.11.9, @medusajs/types@workspace:^, @medusajs/types@workspace:packages/core/types": +"@medusajs/types@1.11.16, @medusajs/types@^1.11.15, @medusajs/types@^1.11.16, @medusajs/types@workspace:^, @medusajs/types@workspace:packages/core/types": version: 0.0.0-use.local resolution: "@medusajs/types@workspace:packages/core/types" dependencies: @@ -6714,8 +6717,7 @@ __metadata: version: 0.0.0-use.local resolution: "@medusajs/user@workspace:packages/modules/user" dependencies: - "@medusajs/types": ^1.11.15 - "@medusajs/utils": ^1.11.9 + "@medusajs/framework": ^0.0.1 "@mikro-orm/cli": 5.9.7 "@swc/core": ^1.5.29 "@swc/jest": ^0.2.36 @@ -6728,6 +6730,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6735,7 +6738,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/utils@1.11.9, @medusajs/utils@^1.11.9, @medusajs/utils@workspace:^, @medusajs/utils@workspace:packages/core/utils": +"@medusajs/utils@^1.11.9, @medusajs/utils@workspace:^, @medusajs/utils@workspace:packages/core/utils": version: 0.0.0-use.local resolution: "@medusajs/utils@workspace:packages/core/utils" dependencies: @@ -6774,7 +6777,6 @@ __metadata: resolution: "@medusajs/workflow-engine-inmemory@workspace:packages/modules/workflow-engine-inmemory" dependencies: "@medusajs/framework": ^0.0.1 - "@medusajs/types": ^1.11.16 "@mikro-orm/cli": 5.9.7 cron-parser: ^4.9.0 cross-env: ^5.2.1 @@ -6785,6 +6787,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -6808,6 +6811,7 @@ __metadata: tsc-alias: ^1.8.6 typescript: ^5.6.2 peerDependencies: + "@medusajs/framework": ^0.0.1 "@mikro-orm/core": 5.9.7 "@mikro-orm/migrations": 5.9.7 "@mikro-orm/postgresql": 5.9.7 @@ -15900,7 +15904,7 @@ __metadata: languageName: node linkType: hard -"bignumber.js@npm:^9.1.2": +"bignumber.js@npm:*, bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" checksum: e17786545433f3110b868725c449fa9625366a6e675cd70eb39b60938d6adbd0158cb4b3ad4f306ce817165d37e63f4aa3098ba4110db1d9a3b9f66abfbaf10d @@ -25159,7 +25163,7 @@ __metadata: nodemon: ^2.0.20 remove-trailing-slash: ^0.1.1 rimraf: ^3.0.2 - typescript: ^4.1.3 + typescript: ^5.6.2 uuid: ^8.3.2 languageName: unknown linkType: soft