@medusajs/product 2.22.1 → 2.22.2-preview-20261029135257

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProductModuleService } from "./services";
1
+ import { ProductModuleService } from "./services/index.js";
2
2
  declare const _default: import("@medusajs/types").ModuleExports<typeof ProductModuleService> & {
3
3
  linkable: Record<string, any>;
4
4
  };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const utils_1 = require("@medusajs/framework/utils");
4
- const _services_1 = require("./services");
4
+ const _services_1 = require("./services/index.js");
5
5
  exports.default = (0, utils_1.Module)(utils_1.Modules.PRODUCT, {
6
6
  service: _services_1.ProductModuleService,
7
7
  });
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.joinerConfig = void 0;
7
7
  const utils_1 = require("@medusajs/framework/utils");
8
- const _models_1 = require("./models");
8
+ const _models_1 = require("./models/index.js");
9
9
  const schema_1 = __importDefault(require("./schema"));
10
10
  exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.PRODUCT, {
11
11
  schema: schema_1.default,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const utils_1 = require("@medusajs/framework/utils");
4
- const _models_1 = require(".");
4
+ const _models_1 = require("./index.js");
5
5
  const ProductType = utils_1.model
6
6
  .define("ProductType", {
7
7
  id: utils_1.model.id({ prefix: "ptyp" }).primaryKey(),
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const utils_1 = require("@medusajs/framework/utils");
7
- const _models_1 = require(".");
7
+ const _models_1 = require("./index.js");
8
8
  const product_variant_product_image_1 = __importDefault(require("./product-variant-product-image"));
9
9
  const ProductVariant = utils_1.model
10
10
  .define("ProductVariant", {
@@ -1,8 +1,8 @@
1
1
  import { Context, DAL, InferEntityType, ProductCategoryTransformOptions, ProductTypes } from "@medusajs/framework/types";
2
2
  import { DALUtils } from "@medusajs/framework/utils";
3
3
  import { SqlEntityManager } from "@medusajs/framework/mikro-orm/postgresql";
4
- import { ProductCategory } from "../models";
5
- import { UpdateCategoryInput } from "../types";
4
+ import { ProductCategory } from "../models/index.js";
5
+ import { UpdateCategoryInput } from "../types/index.js";
6
6
  export declare class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeRepository<typeof ProductCategory> {
7
7
  buildFindOptions(findOptions?: DAL.FindOptions<typeof ProductCategory>, familyOptions?: ProductCategoryTransformOptions): {
8
8
  where: import("@medusajs/types/dist/dal/utils").FilterQueryProperties<{
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProductCategoryRepository = void 0;
4
4
  const utils_1 = require("@medusajs/framework/utils");
5
5
  const core_1 = require("@medusajs/framework/mikro-orm/core");
6
- const _models_1 = require("../models");
6
+ const _models_1 = require("../models/index.js");
7
7
  // eslint-disable-next-line max-len
8
8
  class ProductCategoryRepository extends utils_1.DALUtils.MikroOrmBaseTreeRepository {
9
9
  buildFindOptions(findOptions = { where: {} }, familyOptions = {}) {
@@ -1,4 +1,4 @@
1
- import { Product, ProductOption } from "../models";
1
+ import { Product, ProductOption } from "../models/index.js";
2
2
  import { Context, DAL, InferEntityType } from "@medusajs/framework/types";
3
3
  import { DALUtils } from "@medusajs/framework/utils";
4
4
  declare const ProductRepository_base: new ({ manager }: {
@@ -7,7 +7,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
7
7
  var _a, _ProductRepository_getProductDeepUpdateRelationsToLoad;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ProductRepository = void 0;
10
- const _models_1 = require("../models");
10
+ const _models_1 = require("../models/index.js");
11
11
  const utils_1 = require("@medusajs/framework/utils");
12
12
  const postgresql_1 = require("@medusajs/framework/mikro-orm/postgresql");
13
13
  const resolve_allowed_option_values_1 = require("../utils/resolve-allowed-option-values");
@@ -1,7 +1,7 @@
1
1
  import { Context, DAL, FindConfig, InferEntityType, ProductTypes } from "@medusajs/framework/types";
2
2
  import { MedusaService, ModulesSdkUtils } from "@medusajs/framework/utils";
3
- import { ProductCategory } from "../models";
4
- import { UpdateCategoryInput } from "../types";
3
+ import { ProductCategory } from "../models/index.js";
4
+ import { UpdateCategoryInput } from "../types/index.js";
5
5
  type InjectedDependencies = {
6
6
  productCategoryRepository: DAL.TreeRepositoryService;
7
7
  productModuleService: ReturnType<typeof MedusaService>;
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const types_1 = require("@medusajs/framework/types");
16
16
  const utils_1 = require("@medusajs/framework/utils");
17
17
  const core_1 = require("@mikro-orm/core");
18
- const _models_1 = require("../models");
18
+ const _models_1 = require("../models/index.js");
19
19
  class ProductCategoryService extends (0, utils_1.MedusaInternalService)(_models_1.ProductCategory) {
20
20
  constructor(container) {
21
21
  // @ts-expect-error
@@ -1,6 +1,6 @@
1
1
  import { Context, DAL, FilterableProductOptionValueProps, FindConfig, IEventBusModuleService, InferEntityType, InternalModuleDeclaration, ModuleJoinerConfig, ModulesSdkTypes, ProductTypes, RestoreReturn, SoftDeleteReturn } from "@medusajs/framework/types";
2
- import { Product, ProductCategory, ProductCollection, ProductImage, ProductOption, ProductOptionValue, ProductProductOption, ProductProductOptionValue, ProductTag, ProductType, ProductVariant, ProductVariantProductImage } from "../models";
3
- import { ProductCategoryService } from ".";
2
+ import { Product, ProductCategory, ProductCollection, ProductImage, ProductOption, ProductOptionValue, ProductProductOption, ProductProductOptionValue, ProductTag, ProductType, ProductVariant, ProductVariantProductImage } from "../models/index.js";
3
+ import { ProductCategoryService } from "./index.js";
4
4
  import { Modules } from "@medusajs/framework/utils";
5
5
  import { ProductRepository } from "../repositories";
6
6
  import { UpdateCollectionInput, UpdateProductInput, UpdateProductOptionInput, UpdateProductVariantInput, VariantImageInputArray } from "../types";
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  var _a;
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  const types_1 = require("@medusajs/framework/types");
17
- const _models_1 = require("../models");
17
+ const _models_1 = require("../models/index.js");
18
18
  const utils_1 = require("@medusajs/framework/utils");
19
19
  const utils_2 = require("../utils");
20
20
  const joiner_config_1 = require("./../joiner-config");
@@ -20,7 +20,7 @@ exports.computeSetDifference = computeSetDifference;
20
20
  function computeSetDifference(currentValues, newValueIds) {
21
21
  const normalized = Array.isArray(currentValues)
22
22
  ? currentValues
23
- : currentValues?.toArray?.() ?? [];
23
+ : (currentValues?.toArray?.() ?? []);
24
24
  const currentSet = new Set(normalized.map((v) => v.id));
25
25
  const newSet = new Set(newValueIds);
26
26
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"compute-set-difference.js","sourceRoot":"","sources":["../../src/utils/compute-set-difference.ts"],"names":[],"mappings":";;AAgBA,oDAeC;AA/BD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,oBAAoB,CAClC,aAAyE,EACzE,WAAqB;IAErB,MAAM,UAAU,GAAqB,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;QAC/D,CAAC,CAAC,aAAa;QACf,CAAC,CAAE,aAAqB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAA;IAE7C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAS,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAS,WAAW,CAAC,CAAA;IAE3C,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KAC9D,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"compute-set-difference.js","sourceRoot":"","sources":["../../src/utils/compute-set-difference.ts"],"names":[],"mappings":";;AAgBA,oDAeC;AA/BD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,oBAAoB,CAClC,aAAyE,EACzE,WAAqB;IAErB,MAAM,UAAU,GAAqB,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;QAC/D,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,CAAE,aAAqB,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAE/C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAS,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC/D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAS,WAAW,CAAC,CAAA;IAE3C,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;KAC9D,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/product",
3
- "version": "2.22.1",
3
+ "version": "2.22.2-preview-20261029135257",
4
4
  "description": "Medusa Product module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,10 +43,10 @@
43
43
  "orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm cache:clear"
44
44
  },
45
45
  "devDependencies": {
46
- "@medusajs/framework": "2.22.1",
47
- "@medusajs/test-utils": "2.22.1"
46
+ "@medusajs/framework": "2.22.2-preview-20261029135257",
47
+ "@medusajs/test-utils": "2.22.2-preview-20261029135257"
48
48
  },
49
49
  "peerDependencies": {
50
- "@medusajs/framework": "2.22.1"
50
+ "@medusajs/framework": "2.22.2-preview-20261029135257"
51
51
  }
52
52
  }