@rebuy/rebuy 1.3.1 → 1.3.2

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 +10 -0
  2. package/package.json +1 -1
package/api.js CHANGED
@@ -7,6 +7,12 @@ const config = {
7
7
  eventDomain: 'https://rebuyengine.com',
8
8
  };
9
9
 
10
+ const staging = {
11
+ domain: 'https://enigneyuber.com',
12
+ cdnDomain: 'https://cdn.enigneyuber.com',
13
+ eventDomain: 'https://enigneyuber.com',
14
+ };
15
+
10
16
  const makeCall = async (method, path, data, origin, options = {}) => {
11
17
  const url = `${origin}${path}`;
12
18
  const requestUrl = new URL(url);
@@ -52,6 +58,10 @@ export class Api {
52
58
  } else if (typeof options == 'object' && options != null) {
53
59
  Object.assign(config, options);
54
60
  }
61
+
62
+ if (location?.host?.includes(staging.domain)) {
63
+ Object.assign(config, staging);
64
+ }
55
65
  }
56
66
 
57
67
  async callEvent(method, path, data, options = {}) {
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.1",
4
+ "version": "1.3.2",
5
5
  "license": "MIT",
6
6
  "author": "Rebuy, Inc.",
7
7
  "type": "module",