@rebuy/rebuy 1.3.2 → 1.3.3

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 (2) hide show
  1. package/api.js +13 -2
  2. package/package.json +1 -1
package/api.js CHANGED
@@ -13,6 +13,14 @@ const staging = {
13
13
  eventDomain: 'https://enigneyuber.com',
14
14
  };
15
15
 
16
+ const stagingDomains = [
17
+ 'enigneyuber.com',
18
+ 'rebuy-dev-checkout-extensions.myshopify.com',
19
+ 'rebuy-engine-regression.myshopify.com',
20
+ 'rebuy-stage-currency-test.myshopify.com',
21
+ 'rebuy-staging-automation.myshopify.com',
22
+ ];
23
+
16
24
  const makeCall = async (method, path, data, origin, options = {}) => {
17
25
  const url = `${origin}${path}`;
18
26
  const requestUrl = new URL(url);
@@ -59,8 +67,11 @@ export class Api {
59
67
  Object.assign(config, options);
60
68
  }
61
69
 
62
- if (location?.host?.includes(staging.domain)) {
63
- Object.assign(config, staging);
70
+ for (const domain of stagingDomains) {
71
+ if (location?.host?.includes(domain)) {
72
+ Object.assign(config, staging);
73
+ break;
74
+ }
64
75
  }
65
76
  }
66
77
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebuy/rebuy",
3
3
  "description": "This is the default library for Rebuy",
4
- "version": "1.3.2",
4
+ "version": "1.3.3",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",