@medusajs/product 2.11.1-snapshot-20251022075617 → 2.11.1-snapshot-20251022165335
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/migrations/Migration20250929204438.d.ts +6 -0
- package/dist/migrations/Migration20250929204438.d.ts.map +1 -0
- package/dist/migrations/{Migration20250929204436.js → Migration20250929204438.js} +15 -5
- package/dist/migrations/Migration20250929204438.js.map +1 -0
- package/dist/migrations/Migration20251011090511.d.ts +6 -0
- package/dist/migrations/Migration20251011090511.d.ts.map +1 -0
- package/dist/migrations/Migration20251011090511.js +16 -0
- package/dist/migrations/Migration20251011090511.js.map +1 -0
- package/dist/models/product-variant-product-image.d.ts +0 -2
- package/dist/models/product-variant-product-image.d.ts.map +1 -1
- package/dist/models/product-variant-product-image.js +0 -2
- package/dist/models/product-variant-product-image.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/migrations/Migration20250929204436.d.ts +0 -6
- package/dist/migrations/Migration20250929204436.d.ts.map +0 -1
- package/dist/migrations/Migration20250929204436.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250929204438.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250929204438.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAyBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Migration20250929204438 = void 0;
|
|
4
4
|
const migrations_1 = require("@mikro-orm/migrations");
|
|
5
|
-
class
|
|
5
|
+
class Migration20250929204438 extends migrations_1.Migration {
|
|
6
6
|
async up() {
|
|
7
|
-
this.addSql(`create table if not exists "product_variant_product_image" (
|
|
7
|
+
this.addSql(`create table if not exists "product_variant_product_image" (
|
|
8
|
+
"id" text not null,
|
|
9
|
+
"variant_id" text not null,
|
|
10
|
+
"image_id" text not null,
|
|
11
|
+
"created_at" timestamptz not null default now(),
|
|
12
|
+
"updated_at" timestamptz not null default now(),
|
|
13
|
+
"deleted_at" timestamptz null,
|
|
14
|
+
constraint "product_variant_product_image_pkey" primary key ("id"),
|
|
15
|
+
constraint "product_variant_product_image_image_id_foreign"
|
|
16
|
+
foreign key ("image_id") references "product_image" ("id") on delete cascade
|
|
17
|
+
);`);
|
|
8
18
|
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_product_variant_product_image_variant_id" ON "product_variant_product_image" (variant_id) WHERE deleted_at IS NULL;`);
|
|
9
19
|
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_product_variant_product_image_image_id" ON "product_variant_product_image" (image_id) WHERE deleted_at IS NULL;`);
|
|
10
20
|
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_product_variant_product_image_deleted_at" ON "product_variant_product_image" (deleted_at) WHERE deleted_at IS NULL;`);
|
|
@@ -13,5 +23,5 @@ class Migration20250929204436 extends migrations_1.Migration {
|
|
|
13
23
|
this.addSql(`drop table if exists "product_variant_product_image" cascade;`);
|
|
14
24
|
}
|
|
15
25
|
}
|
|
16
|
-
exports.
|
|
17
|
-
//# sourceMappingURL=
|
|
26
|
+
exports.Migration20250929204438 = Migration20250929204438;
|
|
27
|
+
//# sourceMappingURL=Migration20250929204438.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250929204438.js","sourceRoot":"","sources":["../../src/migrations/Migration20250929204438.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT;;;;;;;;;;SAUG,CACJ,CAAA;QACD,IAAI,CAAC,MAAM,CACT,qJAAqJ,CACtJ,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iJAAiJ,CAClJ,CAAA;QACD,IAAI,CAAC,MAAM,CACT,qJAAqJ,CACtJ,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,+DAA+D,CAAC,CAAA;IAC9E,CAAC;CACF;AA7BD,0DA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20251011090511.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20251011090511.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,SAAS;IAErC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAMrC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20251011090511 = void 0;
|
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
|
5
|
+
class Migration20251011090511 extends migrations_1.Migration {
|
|
6
|
+
// UP: Fixes the bug by dropping the bad index from product_collection.
|
|
7
|
+
async up() {
|
|
8
|
+
this.addSql('DROP INDEX IF EXISTS "IDX_product_category_deleted_at";');
|
|
9
|
+
}
|
|
10
|
+
// DOWN: Reverts the fix by re-creating the original bug.
|
|
11
|
+
async down() {
|
|
12
|
+
this.addSql('CREATE INDEX IF NOT EXISTS "IDX_product_category_deleted_at" ON "product_collection" ("deleted_at");');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20251011090511 = Migration20251011090511;
|
|
16
|
+
//# sourceMappingURL=Migration20251011090511.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20251011090511.js","sourceRoot":"","sources":["../../src/migrations/Migration20251011090511.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAElD,MAAa,uBAAwB,SAAQ,sBAAS;IACtD,uEAAuE;IAC5D,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,yDAAyD,CAC1D,CAAC;IACJ,CAAC;IAED,yDAAyD;IAChD,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CACT,sGAAsG,CACvG,CAAC;IACJ,CAAC;CAEF;AAfD,0DAeC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
declare const ProductVariantProductImage: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
2
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
-
created_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
4
|
-
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
5
3
|
variant: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
6
4
|
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
7
5
|
title: import("@medusajs/framework/utils").TextProperty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-variant-product-image.d.ts","sourceRoot":"","sources":["../../src/models/product-variant-product-image.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"product-variant-product-image.d.ts","sourceRoot":"","sources":["../../src/models/product-variant-product-image.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAQ9B,CAAA;AAEF,eAAe,0BAA0B,CAAA"}
|
|
@@ -8,8 +8,6 @@ const product_variant_1 = __importDefault(require("./product-variant"));
|
|
|
8
8
|
const product_image_1 = __importDefault(require("./product-image"));
|
|
9
9
|
const ProductVariantProductImage = utils_1.model.define("ProductVariantProductImage", {
|
|
10
10
|
id: utils_1.model.id({ prefix: "pvpi" }).primaryKey(),
|
|
11
|
-
created_by: utils_1.model.text().nullable(),
|
|
12
|
-
metadata: utils_1.model.json().nullable(),
|
|
13
11
|
variant: utils_1.model.belongsTo(() => product_variant_1.default, {
|
|
14
12
|
mappedBy: "images",
|
|
15
13
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-variant-product-image.js","sourceRoot":"","sources":["../../src/models/product-variant-product-image.ts"],"names":[],"mappings":";;;;;AAAA,qDAAiD;AACjD,wEAA8C;AAC9C,oEAA0C;AAE1C,MAAM,0BAA0B,GAAG,aAAK,CAAC,MAAM,CAAC,4BAA4B,EAAE;IAC5E,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE;IAC7C,
|
|
1
|
+
{"version":3,"file":"product-variant-product-image.js","sourceRoot":"","sources":["../../src/models/product-variant-product-image.ts"],"names":[],"mappings":";;;;;AAAA,qDAAiD;AACjD,wEAA8C;AAC9C,oEAA0C;AAE1C,MAAM,0BAA0B,GAAG,aAAK,CAAC,MAAM,CAAC,4BAA4B,EAAE;IAC5E,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,UAAU,EAAE;IAC7C,OAAO,EAAE,aAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,yBAAc,EAAE;QAC7C,QAAQ,EAAE,QAAQ;KACnB,CAAC;IACF,KAAK,EAAE,aAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,uBAAY,EAAE;QACzC,QAAQ,EAAE,UAAU;KACrB,CAAC;CACH,CAAC,CAAA;AAEF,kBAAe,0BAA0B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/joiner-config.ts","../src/migrations/InitialSetup20240401153642.ts","../src/migrations/Migration20240601111544.ts","../src/migrations/Migration202408271511.ts","../src/migrations/Migration20241122120331.ts","../src/migrations/Migration20241125090957.ts","../src/migrations/Migration20250411073236.ts","../src/migrations/Migration20250516081326.ts","../src/migrations/Migration20250910154539.ts","../src/migrations/Migration20250911092221.ts","../src/migrations/
|
|
1
|
+
{"root":["../src/index.ts","../src/joiner-config.ts","../src/migrations/InitialSetup20240401153642.ts","../src/migrations/Migration20240601111544.ts","../src/migrations/Migration202408271511.ts","../src/migrations/Migration20241122120331.ts","../src/migrations/Migration20241125090957.ts","../src/migrations/Migration20250411073236.ts","../src/migrations/Migration20250516081326.ts","../src/migrations/Migration20250910154539.ts","../src/migrations/Migration20250911092221.ts","../src/migrations/Migration20250929204438.ts","../src/migrations/Migration20251008132218.ts","../src/migrations/Migration20251011090511.ts","../src/models/index.ts","../src/models/product-category.ts","../src/models/product-collection.ts","../src/models/product-image.ts","../src/models/product-option-value.ts","../src/models/product-option.ts","../src/models/product-tag.ts","../src/models/product-type.ts","../src/models/product-variant-product-image.ts","../src/models/product-variant.ts","../src/models/product.ts","../src/repositories/index.ts","../src/repositories/product-category.ts","../src/repositories/product.ts","../src/schema/index.ts","../src/services/index.ts","../src/services/product-category.ts","../src/services/product-module-service.ts","../src/services/__tests__/index.ts","../src/types/index.ts","../src/utils/events.ts","../src/utils/index.ts"],"version":"5.6.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/product",
|
|
3
|
-
"version": "2.11.1-snapshot-
|
|
3
|
+
"version": "2.11.1-snapshot-20251022165335",
|
|
4
4
|
"description": "Medusa Product module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm cache:clear"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@medusajs/framework": "2.11.1-snapshot-
|
|
40
|
-
"@medusajs/test-utils": "2.11.1-snapshot-
|
|
39
|
+
"@medusajs/framework": "2.11.1-snapshot-20251022165335",
|
|
40
|
+
"@medusajs/test-utils": "2.11.1-snapshot-20251022165335",
|
|
41
41
|
"@swc/core": "^1.7.28",
|
|
42
42
|
"@swc/jest": "^0.2.36",
|
|
43
43
|
"faker": "^5.5.3",
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"typescript": "^5.6.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@medusajs/framework": "2.11.1-snapshot-
|
|
50
|
+
"@medusajs/framework": "2.11.1-snapshot-20251022165335"
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250929204436.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250929204436.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAenB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Migration20250929204436.js","sourceRoot":"","sources":["../../src/migrations/Migration20250929204436.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CACT,4XAA4X,CAC7X,CAAA;QACD,IAAI,CAAC,MAAM,CACT,qJAAqJ,CACtJ,CAAA;QACD,IAAI,CAAC,MAAM,CACT,iJAAiJ,CAClJ,CAAA;QACD,IAAI,CAAC,MAAM,CACT,qJAAqJ,CACtJ,CAAA;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,+DAA+D,CAAC,CAAA;IAC9E,CAAC;CACF;AAnBD,0DAmBC"}
|