@medusajs/pricing 3.0.0-snapshot-20250410061231 → 3.0.0-snapshot-20250410112222
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/Migration20250409122219.d.ts +6 -0
- package/dist/migrations/Migration20250409122219.d.ts.map +1 -0
- package/dist/migrations/Migration20250409122219.js +14 -0
- package/dist/migrations/Migration20250409122219.js.map +1 -0
- package/dist/models/price-rule.d.ts.map +1 -1
- package/dist/models/price-rule.js +4 -0
- package/dist/models/price-rule.js.map +1 -1
- package/dist/repositories/pricing.d.ts +0 -1
- package/dist/repositories/pricing.d.ts.map +1 -1
- package/dist/repositories/pricing.js +7 -35
- package/dist/repositories/pricing.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20250409122219.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250409122219.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,SAAS;IAErC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAIrC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migration20250409122219 = void 0;
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
+
class Migration20250409122219 extends migrations_1.Migration {
|
6
|
+
async up() {
|
7
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_price_rule_attribute" ON "price_rule" (attribute) WHERE deleted_at IS NULL;`);
|
8
|
+
}
|
9
|
+
async down() {
|
10
|
+
this.addSql(`drop index if exists "IDX_price_rule_attribute";`);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
exports.Migration20250409122219 = Migration20250409122219;
|
14
|
+
//# sourceMappingURL=Migration20250409122219.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20250409122219.js","sourceRoot":"","sources":["../../src/migrations/Migration20250409122219.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAElD,MAAa,uBAAwB,SAAQ,sBAAS;IAE3C,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,6GAA6G,CAAC,CAAC;IAC7H,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAC;IAClE,CAAC;CAEF;AAVD,0DAUC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAGtE,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"price-rule.d.ts","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAGtE,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA6BX,CAAA;AAEJ,eAAe,SAAS,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"price-rule.js","sourceRoot":"","sources":["../../src/models/price-rule.ts"],"names":[],"mappings":";;;;;AAAA,qDAAsE;AACtE,oDAA2B;AAE3B,MAAM,SAAS,GAAG,aAAK;KACpB,MAAM,CAAC,WAAW,EAAE;IACnB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE;IAC9C,SAAS,EAAE,aAAK,CAAC,IAAI,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C,KAAK,EAAE,aAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAK,EAAE;QAClC,QAAQ,EAAE,aAAa;KACxB,CAAC;CACH,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;QACzC,KAAK,EAAE,oBAAoB;QAC3B,MAAM,EAAE,IAAI;KACb;IACD;QACE,EAAE,EAAE,CAAC,WAAW,CAAC;QACjB,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;QAC1B,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;QACzB,KAAK,EAAE,oBAAoB;KAC5B;CACF,CAAC,CAAA;AAEJ,kBAAe,SAAS,CAAA"}
|
@@ -3,6 +3,5 @@ import { CalculatedPriceSetDTO, Context, PricingContext, PricingFilters, Pricing
|
|
3
3
|
export declare class PricingRepository extends MikroOrmBase implements PricingRepositoryService {
|
4
4
|
constructor();
|
5
5
|
calculatePrices(pricingFilters: PricingFilters, pricingContext?: PricingContext, sharedContext?: Context): Promise<CalculatedPriceSetDTO[]>;
|
6
|
-
private getAttributesFromRuleTables;
|
7
6
|
}
|
8
7
|
//# sourceMappingURL=pricing.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEb,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,cAAc,EACd,wBAAwB,EACzB,MAAM,2BAA2B,CAAA;AAGlC,qBAAa,iBACX,SAAQ,YACR,YAAW,wBAAwB;;IAQ7B,eAAe,CACnB,cAAc,EAAE,cAAc,EAC9B,cAAc,GAAE,cAAgC,EAChD,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,qBAAqB,EAAE,CAAC;CAyMpC"}
|
@@ -2,7 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.PricingRepository = void 0;
|
4
4
|
const utils_1 = require("@medusajs/framework/utils");
|
5
|
-
// Simple cache implementation
|
6
5
|
class PricingRepository extends utils_1.MikroOrmBase {
|
7
6
|
constructor() {
|
8
7
|
// @ts-ignore
|
@@ -23,20 +22,14 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
23
22
|
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `Method calculatePrices requires currency_code in the pricing context`);
|
24
23
|
}
|
25
24
|
// Generate flatten key-value pairs for rule matching
|
26
|
-
const [ruleAttributes, priceListRuleAttributes] = await this.getAttributesFromRuleTables(knex);
|
27
|
-
const allowedRuleAttributes = [
|
28
|
-
...ruleAttributes,
|
29
|
-
...priceListRuleAttributes,
|
30
|
-
];
|
31
25
|
const flattenedKeyValuePairs = (0, utils_1.flattenObjectToKeyValuePairs)(context);
|
32
|
-
|
26
|
+
// First filter by value presence
|
27
|
+
const flattenedContext = Object.entries(flattenedKeyValuePairs).filter(([, value]) => {
|
33
28
|
const isValuePresent = !Array.isArray(value) && (0, utils_1.isPresent)(value);
|
34
29
|
const isArrayPresent = Array.isArray(value) && value.flat(1).length;
|
35
|
-
return
|
36
|
-
(isValuePresent || isArrayPresent));
|
30
|
+
return isValuePresent || isArrayPresent;
|
37
31
|
});
|
38
32
|
const hasComplexContext = flattenedContext.length > 0;
|
39
|
-
// Base query with efficient index lookups
|
40
33
|
const query = knex
|
41
34
|
.select({
|
42
35
|
id: "price.id",
|
@@ -55,7 +48,6 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
55
48
|
.whereIn("price.price_set_id", pricingFilters.id)
|
56
49
|
.andWhere("price.currency_code", currencyCode)
|
57
50
|
.whereNull("price.deleted_at");
|
58
|
-
// Apply quantity filter
|
59
51
|
if (quantity !== undefined) {
|
60
52
|
query.andWhere(function () {
|
61
53
|
this.where(function () {
|
@@ -70,7 +62,6 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
70
62
|
this.where("price.min_quantity", "<=", 1).orWhereNull("price.min_quantity");
|
71
63
|
});
|
72
64
|
}
|
73
|
-
// Efficient price list join with index usage
|
74
65
|
query.leftJoin("price_list as pl", function () {
|
75
66
|
this.on("pl.id", "=", "price.price_list_id")
|
76
67
|
.andOn("pl.status", "=", knex.raw("?", [utils_1.PriceListStatus.ACTIVE]))
|
@@ -84,9 +75,7 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
84
75
|
this.onNull("pl.ends_at").orOn("pl.ends_at", ">=", knex.fn.now());
|
85
76
|
});
|
86
77
|
});
|
87
|
-
// OPTIMIZATION: Only add complex rule filtering when necessary
|
88
78
|
if (hasComplexContext) {
|
89
|
-
// For price rules - direct check that ALL rules match
|
90
79
|
const priceRuleConditions = knex.raw(`
|
91
80
|
(
|
92
81
|
price.rules_count = 0 OR
|
@@ -137,7 +126,6 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
137
126
|
return [key, ...normalizeValue];
|
138
127
|
}
|
139
128
|
}));
|
140
|
-
// For price list rules - direct check that ALL rules match
|
141
129
|
const priceListRuleConditions = knex.raw(`
|
142
130
|
(
|
143
131
|
pl.rules_count = 0 OR
|
@@ -177,36 +165,20 @@ class PricingRepository extends utils_1.MikroOrmBase {
|
|
177
165
|
});
|
178
166
|
}
|
179
167
|
else {
|
180
|
-
// Simple case - just get prices with no rules or price lists with no rules
|
181
168
|
query.where(function () {
|
182
169
|
this.where("price.rules_count", 0).orWhere(function () {
|
183
170
|
this.whereNotNull("price.price_list_id").where("pl.rules_count", 0);
|
184
171
|
});
|
185
172
|
});
|
186
173
|
}
|
187
|
-
// Optimized ordering to help query planner and preserve price list precedence
|
188
174
|
query
|
189
175
|
.orderByRaw("price.price_list_id IS NOT NULL DESC")
|
190
|
-
.orderByRaw("price.rules_count + COALESCE(pl.rules_count, 0) DESC")
|
191
|
-
.orderBy("pl.id", "asc")
|
192
|
-
.orderBy("price.amount", "asc");
|
193
|
-
|
176
|
+
.orderByRaw("price.rules_count + COALESCE(pl.rules_count, 0) DESC")
|
177
|
+
.orderBy("pl.id", "asc")
|
178
|
+
.orderBy("price.amount", "asc");
|
179
|
+
console.log(query.toString());
|
194
180
|
return await query;
|
195
181
|
}
|
196
|
-
// Helper method to get attributes from rule tables
|
197
|
-
async getAttributesFromRuleTables(knex) {
|
198
|
-
// Using distinct queries for better performance
|
199
|
-
const priceRuleAttributesQuery = knex("price_rule")
|
200
|
-
.distinct("attribute")
|
201
|
-
.pluck("attribute");
|
202
|
-
const priceListRuleAttributesQuery = knex("price_list_rule")
|
203
|
-
.distinct("attribute")
|
204
|
-
.pluck("attribute");
|
205
|
-
return await (0, utils_1.promiseAll)([
|
206
|
-
priceRuleAttributesQuery,
|
207
|
-
priceListRuleAttributesQuery,
|
208
|
-
]);
|
209
|
-
}
|
210
182
|
}
|
211
183
|
exports.PricingRepository = PricingRepository;
|
212
184
|
//# sourceMappingURL=pricing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"pricing.js","sourceRoot":"","sources":["../../src/repositories/pricing.ts"],"names":[],"mappings":";;;AAAA,qDAMkC;AAWlC,MAAa,iBACX,SAAQ,oBAAY;IAGpB;QACE,aAAa;QACb,8CAA8C;QAC9C,KAAK,CAAC,GAAG,SAAS,CAAC,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,cAA8B,EAC9B,iBAAiC,EAAE,OAAO,EAAE,EAAE,EAAE,EAChD,gBAAyB,EAAE;QAE3B,MAAM,OAAO,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,KAAK,CAAC,KAAK,CAAC;gBACV,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;oBAGzC,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;gBACrE,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,KAAK;aACF,UAAU,CAAC,sCAAsC,CAAC;aAClD,UAAU,CAAC,sDAAsD,CAAC;aAClE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC;aACvB,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;QAEjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;QAC7B,OAAO,MAAM,KAAK,CAAA;IACpB,CAAC;CACF;AAvND,8CAuNC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"root":["../src/index.ts","../src/joiner-config.ts","../src/migrations/Migration20230929122253.ts","../src/migrations/Migration20240322094407.ts","../src/migrations/Migration20240322113359.ts","../src/migrations/Migration20240322120125.ts","../src/migrations/Migration20240626133555.ts","../src/migrations/Migration20240704094505.ts","../src/migrations/Migration20241127114534.ts","../src/migrations/Migration20241127223829.ts","../src/migrations/Migration20241128055359.ts","../src/migrations/Migration20241212190401.ts","../src/migrations/Migration20250408145122.ts","../src/models/index.ts","../src/models/price-list-rule.ts","../src/models/price-list.ts","../src/models/price-preference.ts","../src/models/price-rule.ts","../src/models/price-set.ts","../src/models/price.ts","../src/repositories/index.ts","../src/repositories/pricing.ts","../src/schema/index.ts","../src/services/index.ts","../src/services/pricing-module.ts","../src/services/__tests__/index.spec.ts","../src/types/index.ts","../src/types/services/index.ts","../src/utils/events.ts","../src/utils/index.ts","../src/utils/validate-price-list-dates.ts"],"version":"5.6.2"}
|
1
|
+
{"root":["../src/index.ts","../src/joiner-config.ts","../src/migrations/Migration20230929122253.ts","../src/migrations/Migration20240322094407.ts","../src/migrations/Migration20240322113359.ts","../src/migrations/Migration20240322120125.ts","../src/migrations/Migration20240626133555.ts","../src/migrations/Migration20240704094505.ts","../src/migrations/Migration20241127114534.ts","../src/migrations/Migration20241127223829.ts","../src/migrations/Migration20241128055359.ts","../src/migrations/Migration20241212190401.ts","../src/migrations/Migration20250408145122.ts","../src/migrations/Migration20250409122219.ts","../src/models/index.ts","../src/models/price-list-rule.ts","../src/models/price-list.ts","../src/models/price-preference.ts","../src/models/price-rule.ts","../src/models/price-set.ts","../src/models/price.ts","../src/repositories/index.ts","../src/repositories/pricing.ts","../src/schema/index.ts","../src/services/index.ts","../src/services/pricing-module.ts","../src/services/__tests__/index.spec.ts","../src/types/index.ts","../src/types/services/index.ts","../src/utils/events.ts","../src/utils/index.ts","../src/utils/validate-price-list-dates.ts"],"version":"5.6.2"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/pricing",
|
3
|
-
"version": "3.0.0-snapshot-
|
3
|
+
"version": "3.0.0-snapshot-20250410112222",
|
4
4
|
"description": "Medusa Pricing 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 medusa-mikro-orm cache:clear"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
40
|
-
"@medusajs/test-utils": "3.0.0-snapshot-
|
39
|
+
"@medusajs/framework": "3.0.0-snapshot-20250410112222",
|
40
|
+
"@medusajs/test-utils": "3.0.0-snapshot-20250410112222",
|
41
41
|
"@mikro-orm/cli": "6.4.3",
|
42
42
|
"@mikro-orm/core": "6.4.3",
|
43
43
|
"@mikro-orm/migrations": "6.4.3",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"typescript": "^5.6.2"
|
51
51
|
},
|
52
52
|
"peerDependencies": {
|
53
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
53
|
+
"@medusajs/framework": "3.0.0-snapshot-20250410112222",
|
54
54
|
"@mikro-orm/core": "6.4.3",
|
55
55
|
"@mikro-orm/migrations": "6.4.3",
|
56
56
|
"@mikro-orm/postgresql": "6.4.3",
|