datakeen-session-react 1.1.140-rc.53 → 1.1.140-rc.54

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.
@@ -5,6 +5,10 @@
5
5
 
6
6
  import { configureApiBaseURL } from "client-sessions-react-sdk";
7
7
 
8
+ const PRODUCTION_API_URL: string =
9
+ process.env.VITE_API_URL ||
10
+ "https://app.datakeen.co/backend";
11
+
8
12
  // =====================================
9
13
  // Configuration par environnement
10
14
  // =====================================
@@ -16,7 +20,7 @@ export const configureSDKForEnvironment = () => {
16
20
 
17
21
  switch (environment) {
18
22
  case "production":
19
- apiBaseURL = "https://app.datakeen.co/backend";
23
+ apiBaseURL = PRODUCTION_API_URL;
20
24
  break;
21
25
 
22
26
  case "staging":
@@ -64,9 +68,9 @@ export const configureSDKDynamically = () => {
64
68
 
65
69
  let apiBaseURL: string;
66
70
 
67
- if (hostname.includes("app.datakeen.co")) {
71
+ if (hostname.includes("app.datakeen.co") || hostname.includes("app-v3.datakeen.co")) {
68
72
  // Production
69
- apiBaseURL = "https://app.datakeen.co/backend";
73
+ apiBaseURL = PRODUCTION_API_URL;
70
74
  } else if (hostname.includes("app.staging.datakeen.co")) {
71
75
  // Staging
72
76
  apiBaseURL = "https://app.staging.datakeen.co/backend";
@@ -115,7 +119,7 @@ export const configureSDKAdvanced = (options: {
115
119
  if (!apiBaseURL && environment) {
116
120
  switch (environment) {
117
121
  case "production":
118
- apiBaseURL = "https://app.datakeen.co/backend";
122
+ apiBaseURL = PRODUCTION_API_URL;
119
123
  break;
120
124
  case "staging":
121
125
  apiBaseURL = "https://app.staging.datakeen.co/backend";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datakeen-session-react",
3
- "version": "1.1.140-rc.53",
3
+ "version": "1.1.140-rc.54",
4
4
  "description": "React SDK component to manage and render Datakeen session experiences easily.",
5
5
  "publishConfig": {
6
6
  "access": "public",