@medusajs/pricing 0.1.13-snapshot-20240815071705 → 0.1.13-snapshot-20240821142206
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricing-module.d.ts","sourceRoot":"","sources":["../../src/services/pricing-module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,OAAO,EAEP,kBAAkB,EAGlB,GAAG,EACH,UAAU,EACV,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAoBxB,OAAO,EACL,KAAK,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,SAAS,EACT,QAAQ,EACT,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAErC,OAAO,EAAE,kBAAkB,EAAkB,MAAM,oBAAoB,CAAA;AAGvE,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,GAAG,CAAC,iBAAiB,CAAA;IACrC,iBAAiB,EAAE,wBAAwB,CAAA;IAC3C,eAAe,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAC5D,gBAAgB,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAC7D,YAAY,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;IACzD,gBAAgB,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAC7D,sBAAsB,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;IACnE,oBAAoB,EAAE,eAAe,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAA;CAClE,CAAA;;cAaa;QAAE,GAAG,EAAE,wBAAwB,CAAA;KAAE;WACpC;QAAE,GAAG,EAAE,aAAa,QAAQ,CAAA;K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AqB,EAAE,EAC1C,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,KAAK,EAAE,CAAC;cAuEH,kBAAkB,CAChC,IAAI,EAAE,YAAY,CAAC,oBAAoB,EAAE,EACzC,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,SAAS,EAAE,CAAC;cA2DP,qBAAqB,CACnC,IAAI,EAAE,YAAY,CAAC,uBAAuB,EAAE,EAC5C,aAAa,GAAE,OAAY,GAC1B,OAAO,CAAC,SAAS,EAAE,CAAC;IA4DvB,SAAS,CAAC,sBAAsB,CAC9B,IAAI,EAAE,CACF,YAAY,CAAC,kBAAkB,GAC/B,YAAY,CAAC,kBAAkB,GAC/B,kBAAkB,CACrB,EAAE;IAiBL,SAAS,CAAC,uBAAuB,CAC/B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,SAAS;;;;;;;;;;;;CAS3D"}
|
@@ -145,13 +145,17 @@ class PricingModuleService extends utils_1.ModulesSdkUtils.MedusaService(generat
|
|
145
145
|
id: priceSetId,
|
146
146
|
is_calculated_price_price_list: !!calculatedPrice?.price_list_id,
|
147
147
|
is_calculated_price_tax_inclusive: isTaxInclusive(priceRulesPriceMap.get(calculatedPrice.id), pricingPreferences, calculatedPrice.currency_code, pricingContext.context?.region_id),
|
148
|
-
calculated_amount:
|
148
|
+
calculated_amount: (0, utils_1.isPresent)(calculatedPrice?.amount)
|
149
|
+
? parseFloat(calculatedPrice?.amount)
|
150
|
+
: null,
|
149
151
|
raw_calculated_amount: calculatedPrice?.raw_amount || null,
|
150
152
|
is_original_price_price_list: !!originalPrice?.price_list_id,
|
151
153
|
is_original_price_tax_inclusive: originalPrice?.id
|
152
154
|
? isTaxInclusive(priceRulesPriceMap.get(originalPrice.id), pricingPreferences, originalPrice.currency_code || calculatedPrice.currency_code, pricingContext.context?.region_id)
|
153
155
|
: false,
|
154
|
-
original_amount:
|
156
|
+
original_amount: (0, utils_1.isPresent)(originalPrice?.amount)
|
157
|
+
? parseFloat(originalPrice?.amount)
|
158
|
+
: null,
|
155
159
|
raw_original_amount: originalPrice?.raw_amount || null,
|
156
160
|
currency_code: calculatedPrice?.currency_code || null,
|
157
161
|
calculated_price: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/pricing",
|
3
|
-
"version": "0.1.13-snapshot-
|
3
|
+
"version": "0.1.13-snapshot-20240821142206",
|
4
4
|
"description": "Medusa Pricing module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -34,12 +34,12 @@
|
|
34
34
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-
|
38
|
-
"@medusajs/types": "1.12.0-snapshot-
|
37
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240821142206",
|
38
|
+
"@medusajs/types": "1.12.0-snapshot-20240821142206",
|
39
39
|
"@mikro-orm/cli": "5.9.7",
|
40
40
|
"cross-env": "^5.2.1",
|
41
41
|
"jest": "^29.7.0",
|
42
|
-
"medusa-test-utils": "1.1.45-snapshot-
|
42
|
+
"medusa-test-utils": "1.1.45-snapshot-20240821142206",
|
43
43
|
"rimraf": "^3.0.2",
|
44
44
|
"ts-jest": "^29.1.1",
|
45
45
|
"ts-node": "^10.9.1",
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"typescript": "^5.1.6"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
50
|
+
"@medusajs/utils": "1.12.0-snapshot-20240821142206",
|
51
51
|
"@mikro-orm/core": "5.9.7",
|
52
52
|
"@mikro-orm/migrations": "5.9.7",
|
53
53
|
"@mikro-orm/postgresql": "5.9.7",
|