@unchainedshop/plugins 2.5.12 → 2.6.1

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.
Files changed (96) hide show
  1. package/lib/events/node-event-emitter.js.map +1 -1
  2. package/lib/events/redis.js.map +1 -1
  3. package/lib/files/gridfs/gridfs-adapter.d.ts +1 -1
  4. package/lib/files/gridfs/gridfs-adapter.js +5 -1
  5. package/lib/files/gridfs/gridfs-adapter.js.map +1 -1
  6. package/lib/files/gridfs/index.d.ts +1 -1
  7. package/lib/files/gridfs/index.js +5 -12
  8. package/lib/files/gridfs/index.js.map +1 -1
  9. package/lib/files/minio/minio-adapter.d.ts +1 -1
  10. package/lib/files/minio/minio-adapter.js +9 -3
  11. package/lib/files/minio/minio-adapter.js.map +1 -1
  12. package/lib/filters/local-search.js +19 -1
  13. package/lib/filters/local-search.js.map +1 -1
  14. package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +4 -3
  15. package/lib/payment/apple-iap/db/AppleTransactionsCollection.js.map +1 -1
  16. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.d.ts +2 -3
  17. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js +1 -1
  18. package/lib/payment/apple-iap/module/configureAppleTransactionsModule.js.map +1 -1
  19. package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +5 -5
  20. package/lib/payment/cryptopay/db/CryptopayTransactions.js.map +1 -1
  21. package/lib/payment/cryptopay/module/configureCryptopayModule.d.ts +1 -2
  22. package/lib/payment/cryptopay/module/configureCryptopayModule.js +3 -3
  23. package/lib/payment/cryptopay/module/configureCryptopayModule.js.map +1 -1
  24. package/lib/plugins-index.d.ts +4 -22
  25. package/lib/plugins-index.js.map +1 -1
  26. package/lib/pricing/delivery-swiss-tax.js +1 -1
  27. package/lib/pricing/discount-100-off.js +1 -1
  28. package/lib/pricing/discount-100-off.js.map +1 -1
  29. package/lib/pricing/discount-half-price-manual.js +1 -1
  30. package/lib/pricing/discount-half-price-manual.js.map +1 -1
  31. package/lib/pricing/discount-half-price.js +1 -1
  32. package/lib/pricing/discount-half-price.js.map +1 -1
  33. package/lib/pricing/order-discount.js +1 -1
  34. package/lib/pricing/order-items-discount.js +1 -1
  35. package/lib/pricing/order-payment.js +1 -1
  36. package/lib/pricing/order-round.d.ts +10 -0
  37. package/lib/pricing/order-round.js +113 -0
  38. package/lib/pricing/order-round.js.map +1 -0
  39. package/lib/pricing/product-discount.js +1 -1
  40. package/lib/pricing/product-price-rateconversion.js +1 -1
  41. package/lib/pricing/product-price-rateconversion.js.map +1 -1
  42. package/lib/pricing/product-round.d.ts +10 -0
  43. package/lib/pricing/product-round.js +45 -0
  44. package/lib/pricing/product-round.js.map +1 -0
  45. package/lib/pricing/product-swiss-tax.js +1 -1
  46. package/lib/pricing/product-swiss-tax.js.map +1 -1
  47. package/lib/warehousing/eth-minter.js +2 -1
  48. package/lib/warehousing/eth-minter.js.map +1 -1
  49. package/lib/warehousing/google-sheets.js +2 -2
  50. package/lib/warehousing/google-sheets.js.map +1 -1
  51. package/lib/worker/bulk-import.js +7 -9
  52. package/lib/worker/bulk-import.js.map +1 -1
  53. package/lib/worker/export-token.js +2 -1
  54. package/lib/worker/export-token.js.map +1 -1
  55. package/lib/worker/update-coinbase-rates.js +0 -1
  56. package/lib/worker/update-coinbase-rates.js.map +1 -1
  57. package/lib/worker/update-ecb-rates.js.map +1 -1
  58. package/lib/worker/update-token-ownership.js +2 -1
  59. package/lib/worker/update-token-ownership.js.map +1 -1
  60. package/package.json +30 -28
  61. package/src/events/node-event-emitter.ts +1 -2
  62. package/src/events/redis.ts +1 -2
  63. package/src/files/gridfs/gridfs-adapter.ts +8 -2
  64. package/src/files/gridfs/index.ts +5 -13
  65. package/src/files/minio/minio-adapter.ts +12 -4
  66. package/src/filters/local-search.ts +27 -4
  67. package/src/payment/apple-iap/db/AppleTransactionsCollection.ts +4 -3
  68. package/src/payment/apple-iap/module/configureAppleTransactionsModule.ts +1 -6
  69. package/src/payment/cryptopay/db/CryptopayTransactions.ts +5 -5
  70. package/src/payment/cryptopay/module/configureCryptopayModule.ts +4 -5
  71. package/src/plugins-index.ts +7 -2
  72. package/src/pricing/delivery-swiss-tax.ts +1 -1
  73. package/src/pricing/discount-100-off.ts +1 -1
  74. package/src/pricing/discount-half-price-manual.ts +1 -1
  75. package/src/pricing/discount-half-price.ts +1 -1
  76. package/src/pricing/order-discount.ts +1 -1
  77. package/src/pricing/order-items-discount.ts +1 -1
  78. package/src/pricing/order-payment.ts +1 -1
  79. package/src/pricing/order-round.ts +139 -0
  80. package/src/pricing/product-discount.ts +1 -1
  81. package/src/pricing/product-price-rateconversion.ts +1 -1
  82. package/src/pricing/product-round.ts +63 -0
  83. package/src/pricing/product-swiss-tax.test.ts +4 -4
  84. package/src/pricing/product-swiss-tax.ts +3 -3
  85. package/src/warehousing/eth-minter.ts +2 -1
  86. package/src/warehousing/google-sheets.ts +2 -2
  87. package/src/worker/bulk-import.ts +14 -20
  88. package/src/worker/export-token.ts +3 -2
  89. package/src/worker/update-coinbase-rates.ts +0 -1
  90. package/src/worker/update-ecb-rates.ts +4 -5
  91. package/src/worker/update-token-ownership.ts +2 -1
  92. package/lib/pricing/product-price-round.d.ts +0 -12
  93. package/lib/pricing/product-price-round.js +0 -53
  94. package/lib/pricing/product-price-round.js.map +0 -1
  95. package/src/pricing/configureProductPriceRounding.test.ts +0 -42
  96. package/src/pricing/product-price-round.ts +0 -75
@@ -1,4 +1,3 @@
1
- import fs from 'fs';
2
1
  import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
3
2
  import { WorkerDirector, WorkerAdapter } from '@unchainedshop/core-worker';
4
3
  import { createLogger, LogLevel } from '@unchainedshop/logger';
@@ -8,16 +7,22 @@ import { UnchainedCore } from '@unchainedshop/types/core.js';
8
7
 
9
8
  const logger = createLogger('unchained:platform:bulk-import');
10
9
 
11
- const streamPayloadToBulkImporter = async (
12
- bulkImporter,
13
- createReadStream,
14
- unchainedAPI: UnchainedCore,
15
- ) => {
10
+ const streamPayloadToBulkImporter = async (bulkImporter, payloadId, unchainedAPI: UnchainedCore) => {
16
11
  logger.profile(`parseAsync`, { level: LogLevel.Verbose, message: 'parseAsync' });
17
12
 
13
+ const readStream = await unchainedAPI.services.files.createDownloadStream(
14
+ { fileId: payloadId },
15
+ unchainedAPI,
16
+ );
17
+
18
+ if (!readStream) {
19
+ throw new Error(
20
+ 'The current file adapter does not support streams when downloading required for streamed events. Please use a different file adapter.',
21
+ );
22
+ }
23
+
18
24
  const eventIterator = new EventIterator(
19
25
  (queue) => {
20
- const readStream = createReadStream();
21
26
  const jsonStream = JSONStream.parse('events.*'); // rows, ANYTHING, doc
22
27
  jsonStream.on('data', queue.push);
23
28
  jsonStream.on('close', queue.stop);
@@ -65,20 +70,9 @@ export const BulkImportWorker: IWorkerAdapter<any, Record<string, unknown>> = {
65
70
  skipCacheInvalidation,
66
71
  });
67
72
 
68
- if (rawPayload.payloadFilePath) {
69
- // stream payload from file system
70
- await streamPayloadToBulkImporter(
71
- bulkImporter,
72
- () => fs.createReadStream(rawPayload.payloadFilePath),
73
- unchainedAPI,
74
- );
75
- } else if (rawPayload.payloadId) {
73
+ if (rawPayload.payloadId) {
76
74
  // stream payload from gridfs
77
- await streamPayloadToBulkImporter(
78
- bulkImporter,
79
- () => unchainedAPI.bulkImporter.BulkImportPayloads.openDownloadStream(rawPayload.payloadId),
80
- unchainedAPI,
81
- );
75
+ await streamPayloadToBulkImporter(bulkImporter, rawPayload.payloadId, unchainedAPI);
82
76
  } else {
83
77
  const { events } = rawPayload;
84
78
  if (!events?.length) throw new Error('No events submitted');
@@ -1,6 +1,7 @@
1
- import { IWorkerAdapter } from '@unchainedshop/types/worker.js';
1
+ import { IWorkerAdapter, Work } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter, WorkerEventTypes } from '@unchainedshop/core-worker';
3
3
  import { UnchainedCore } from '@unchainedshop/types/core.js';
4
+ import { subscribe } from '@unchainedshop/events';
4
5
 
5
6
  export const ExportTokenWorker: IWorkerAdapter<void, void> = {
6
7
  ...WorkerAdapter,
@@ -17,7 +18,7 @@ export const ExportTokenWorker: IWorkerAdapter<void, void> = {
17
18
  };
18
19
 
19
20
  export const configureExportToken = (unchainedAPI: UnchainedCore) => {
20
- WorkerDirector.events.on(WorkerEventTypes.FINISHED, async ({ work }) => {
21
+ subscribe<Work>(WorkerEventTypes.FINISHED, async ({ payload: work }) => {
21
22
  if (work.type === 'EXPORT_TOKEN' && work.success) {
22
23
  await unchainedAPI.modules.warehousing.updateTokenOwnership({
23
24
  tokenId: work.input.token._id,
@@ -84,5 +84,4 @@ WorkerDirector.registerAdapter(UpdateCoinbaseRates);
84
84
 
85
85
  WorkerDirector.configureAutoscheduling(UpdateCoinbaseRates, {
86
86
  schedule: everyMinute,
87
- retries: 0,
88
87
  });
@@ -11,11 +11,10 @@ const getExchangeRates = async () => {
11
11
  })
12
12
  .then((res) => res.text())
13
13
  .then((text) => JSON.parse(xmlJs.xml2json(text)))
14
- .then(
15
- (json) =>
16
- json.elements?.[0]?.elements
17
- .filter((e) => e.name.toLowerCase() === 'cube')[0]
18
- ?.elements[0]?.elements.map((element) => element.attributes),
14
+ .then((json) =>
15
+ json.elements?.[0]?.elements
16
+ .filter((e) => e.name.toLowerCase() === 'cube')[0]
17
+ ?.elements[0]?.elements.map((element) => element.attributes),
19
18
  );
20
19
  };
21
20
 
@@ -2,6 +2,7 @@ import { IWorkerAdapter, Work } from '@unchainedshop/types/worker.js';
2
2
  import { WorkerDirector, WorkerAdapter, WorkerEventTypes } from '@unchainedshop/core-worker';
3
3
  import { UnchainedCore } from '@unchainedshop/types/core.js';
4
4
  import later from '@breejs/later';
5
+ import { subscribe } from '@unchainedshop/events';
5
6
 
6
7
  const everyMinute = later.parse.cron('* * * * *');
7
8
 
@@ -63,7 +64,7 @@ export const RefreshTokens: IWorkerAdapter<void, any> = {
63
64
  };
64
65
 
65
66
  export const configureUpdateTokenOwnership = (unchainedAPI: UnchainedCore) => {
66
- WorkerDirector.events.on(WorkerEventTypes.FINISHED, async ({ work }: { work: Work }) => {
67
+ subscribe<Work>(WorkerEventTypes.FINISHED, async ({ payload: work }) => {
67
68
  if (work.type === 'UPDATE_TOKEN_OWNERSHIP' && work.success) {
68
69
  await Promise.all(
69
70
  (work.result?.tokens || []).map(unchainedAPI.modules.warehousing.updateTokenOwnership),
@@ -1,12 +0,0 @@
1
- import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing.js';
2
- interface PriceRoundSettings {
3
- configurations: Record<string, number>;
4
- defaultPrecision: number;
5
- skip: Array<string>;
6
- }
7
- export declare const ProductPriceRoundSettings: PriceRoundSettings;
8
- export declare const configureProductPriceRounding: ({ configurations, defaultPrecision, skip, }: PriceRoundSettings) => void;
9
- export declare const ProductPriceRound: IProductPricingAdapter & {
10
- configure: (params: PriceRoundSettings) => void;
11
- };
12
- export {};
@@ -1,53 +0,0 @@
1
- import { ProductPricingAdapter, ProductPricingDirector } from '@unchainedshop/core-products';
2
- import { calculation as calcUtils } from '@unchainedshop/utils';
3
- export const ProductPriceRoundSettings = {
4
- configurations: {},
5
- defaultPrecision: 50,
6
- skip: [],
7
- };
8
- export const configureProductPriceRounding = ({ configurations, defaultPrecision, skip, }) => {
9
- if (defaultPrecision)
10
- ProductPriceRoundSettings.defaultPrecision = defaultPrecision;
11
- if (configurations)
12
- ProductPriceRoundSettings.configurations = configurations;
13
- if (skip?.length)
14
- ProductPriceRoundSettings.skip = skip;
15
- };
16
- export const ProductPriceRound = {
17
- ...ProductPricingAdapter,
18
- key: 'shop.unchained.pricing.price-round',
19
- version: '1.0.0',
20
- label: 'Round product price to the next precision number',
21
- orderIndex: 2,
22
- isActivatedFor: () => {
23
- return true;
24
- },
25
- configure: configureProductPriceRounding,
26
- actions: (params) => {
27
- const pricingAdapter = ProductPricingAdapter.actions(params);
28
- return {
29
- ...pricingAdapter,
30
- calculate: async () => {
31
- const { currency, quantity } = params.context;
32
- const { configurations, skip, defaultPrecision } = ProductPriceRoundSettings;
33
- const { calculation = [] } = params.calculationSheet;
34
- if (skip?.indexOf(currency) !== -1)
35
- return pricingAdapter.calculate();
36
- const roundPrecision = configurations?.[currency] || defaultPrecision;
37
- if (calculation?.length && roundPrecision) {
38
- const [productPrice] = calculation;
39
- pricingAdapter.resultSheet().resetCalculation(params.calculationSheet);
40
- pricingAdapter.resultSheet().addItem({
41
- amount: calcUtils.roundToNext(productPrice.amount, roundPrecision) * quantity,
42
- isTaxable: productPrice.isTaxable,
43
- isNetPrice: productPrice.isNetPrice,
44
- meta: { adapter: ProductPriceRound.key },
45
- });
46
- }
47
- return pricingAdapter.calculate();
48
- },
49
- };
50
- },
51
- };
52
- ProductPricingDirector.registerAdapter(ProductPriceRound);
53
- //# sourceMappingURL=product-price-round.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-price-round.js","sourceRoot":"","sources":["../../src/pricing/product-price-round.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQhE,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC3D,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,EAAE;IACpB,IAAI,EAAE,EAAE;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,EAC5C,cAAc,EACd,gBAAgB,EAChB,IAAI,GACe,EAAE,EAAE;IACvB,IAAI,gBAAgB;QAAE,yBAAyB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACpF,IAAI,cAAc;QAAE,yBAAyB,CAAC,cAAc,GAAG,cAAc,CAAC;IAC9E,IAAI,IAAI,EAAE,MAAM;QAAE,yBAAyB,CAAC,IAAI,GAAG,IAAI,CAAC;AAC1D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAE1B;IACF,GAAG,qBAAqB;IAExB,GAAG,EAAE,oCAAoC;IACzC,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,kDAAkD;IACzD,UAAU,EAAE,CAAC;IAEb,cAAc,EAAE,GAAG,EAAE;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,EAAE,6BAA6B;IAExC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;QAClB,MAAM,cAAc,GAAG,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE7D,OAAO;YACL,GAAG,cAAc;YAEjB,SAAS,EAAE,KAAK,IAAI,EAAE;gBACpB,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC;gBAC9C,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,yBAAyB,CAAC;gBAC7E,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC;gBAErD,IAAI,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBAAE,OAAO,cAAc,CAAC,SAAS,EAAE,CAAC;gBAEtE,MAAM,cAAc,GAAG,cAAc,EAAE,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC;gBAEtE,IAAI,WAAW,EAAE,MAAM,IAAI,cAAc,EAAE,CAAC;oBAC1C,MAAM,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC;oBACnC,cAAc,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;oBACvE,cAAc,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC;wBACnC,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,QAAQ;wBAC7E,SAAS,EAAE,YAAY,CAAC,SAAS;wBACjC,UAAU,EAAE,YAAY,CAAC,UAAU;wBACnC,IAAI,EAAE,EAAE,OAAO,EAAE,iBAAiB,CAAC,GAAG,EAAE;qBACzC,CAAC,CAAC;gBACL,CAAC;gBAED,OAAO,cAAc,CAAC,SAAS,EAAE,CAAC;YACpC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,sBAAsB,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,42 +0,0 @@
1
- import {configureProductPriceRounding, ProductPriceRoundSettings } from './product-price-round.js'
2
-
3
- describe('configureProductPriceRounding', () => {
4
- beforeEach(() => {
5
- ProductPriceRoundSettings.configurations = {};
6
- ProductPriceRoundSettings.defaultPrecision = 50;
7
- ProductPriceRoundSettings.skip = [];
8
- });
9
-
10
- it('updates the default precision correctly', () => {
11
- configureProductPriceRounding({ defaultPrecision: 100 } as any);
12
- expect(ProductPriceRoundSettings.defaultPrecision).toBe(100);
13
- });
14
-
15
- it('updates the configurations correctly', () => {
16
- configureProductPriceRounding({ configurations: { 'product1': 25 } } as any);
17
- expect(ProductPriceRoundSettings.configurations).toEqual({ 'product1': 25 });
18
- });
19
-
20
- it('updates the skip list correctly', () => {
21
- configureProductPriceRounding({ skip: ['product1'] } as any);
22
- expect(ProductPriceRoundSettings.skip).toEqual(['product1']);
23
- });
24
-
25
- it('updates multiple properties correctly', () => {
26
- configureProductPriceRounding({
27
- configurations: { 'product1': 25 },
28
- defaultPrecision: 100,
29
- skip: ['product1']
30
- });
31
- expect(ProductPriceRoundSettings.configurations).toEqual({ 'product1': 25 });
32
- expect(ProductPriceRoundSettings.defaultPrecision).toBe(100);
33
- expect(ProductPriceRoundSettings.skip).toEqual(['product1']);
34
- });
35
-
36
- it('does not update any properties when no arguments are passed', () => {
37
- configureProductPriceRounding({} as any);
38
- expect(ProductPriceRoundSettings.configurations).toEqual({});
39
- expect(ProductPriceRoundSettings.defaultPrecision).toBe(50);
40
- expect(ProductPriceRoundSettings.skip).toEqual([]);
41
- });
42
- });
@@ -1,75 +0,0 @@
1
- import { IProductPricingAdapter } from '@unchainedshop/types/products.pricing.js';
2
- import { ProductPricingAdapter, ProductPricingDirector } from '@unchainedshop/core-products';
3
- import { calculation as calcUtils } from '@unchainedshop/utils';
4
-
5
- interface PriceRoundSettings {
6
- configurations: Record<string, number>;
7
- defaultPrecision: number;
8
- skip: Array<string>;
9
- }
10
-
11
- export const ProductPriceRoundSettings: PriceRoundSettings = {
12
- configurations: {},
13
- defaultPrecision: 50,
14
- skip: [],
15
- };
16
-
17
- export const configureProductPriceRounding = ({
18
- configurations,
19
- defaultPrecision,
20
- skip,
21
- }: PriceRoundSettings) => {
22
- if (defaultPrecision) ProductPriceRoundSettings.defaultPrecision = defaultPrecision;
23
- if (configurations) ProductPriceRoundSettings.configurations = configurations;
24
- if (skip?.length) ProductPriceRoundSettings.skip = skip;
25
- };
26
-
27
- export const ProductPriceRound: IProductPricingAdapter & {
28
- configure: (params: PriceRoundSettings) => void;
29
- } = {
30
- ...ProductPricingAdapter,
31
-
32
- key: 'shop.unchained.pricing.price-round',
33
- version: '1.0.0',
34
- label: 'Round product price to the next precision number',
35
- orderIndex: 2,
36
-
37
- isActivatedFor: () => {
38
- return true;
39
- },
40
-
41
- configure: configureProductPriceRounding,
42
-
43
- actions: (params) => {
44
- const pricingAdapter = ProductPricingAdapter.actions(params);
45
-
46
- return {
47
- ...pricingAdapter,
48
-
49
- calculate: async () => {
50
- const { currency, quantity } = params.context;
51
- const { configurations, skip, defaultPrecision } = ProductPriceRoundSettings;
52
- const { calculation = [] } = params.calculationSheet;
53
-
54
- if (skip?.indexOf(currency) !== -1) return pricingAdapter.calculate();
55
-
56
- const roundPrecision = configurations?.[currency] || defaultPrecision;
57
-
58
- if (calculation?.length && roundPrecision) {
59
- const [productPrice] = calculation;
60
- pricingAdapter.resultSheet().resetCalculation(params.calculationSheet);
61
- pricingAdapter.resultSheet().addItem({
62
- amount: calcUtils.roundToNext(productPrice.amount, roundPrecision) * quantity,
63
- isTaxable: productPrice.isTaxable,
64
- isNetPrice: productPrice.isNetPrice,
65
- meta: { adapter: ProductPriceRound.key },
66
- });
67
- }
68
-
69
- return pricingAdapter.calculate();
70
- },
71
- };
72
- },
73
- };
74
-
75
- ProductPricingDirector.registerAdapter(ProductPriceRound);