@vouchfor/embeds 8.7.3 → 8.8.0
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.
- package/dist/es/embeds.js +25 -5
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/src/utils/env.d.ts +1 -1
- package/dist/iife/dialog-embed/embed.iife.js +64 -64
- package/dist/iife/dialog-embed/embed.iife.js.map +1 -1
- package/dist/iife/embeds.iife.js +64 -64
- package/dist/iife/embeds.iife.js.map +1 -1
- package/dist/iife/player-embed/embed.iife.js +60 -60
- package/dist/iife/player-embed/embed.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DialogEmbed/Dialog.stories.ts +1 -1
- package/src/components/PlayerEmbed/MultiEmbed.stories.ts +1 -1
- package/src/components/PlayerEmbed/PlayerEmbed.stories.ts +1 -1
- package/src/utils/env.ts +27 -5
package/package.json
CHANGED
package/src/utils/env.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Environment = 'local' | 'dev' | 'staging' | 'prod';
|
|
1
|
+
type Environment = 'local' | 'dev' | 'usdev' | 'staging' | 'prod' | 'usprod';
|
|
2
2
|
|
|
3
3
|
type GetEnvUrlsReturn = {
|
|
4
4
|
videoUrl: string;
|
|
@@ -9,21 +9,27 @@ type GetEnvUrlsReturn = {
|
|
|
9
9
|
const devVideoUrl = 'https://d2rxhdlm2q91uk.cloudfront.net';
|
|
10
10
|
const stagingVideoUrl = 'https://d1ix11aj5kfygl.cloudfront.net';
|
|
11
11
|
const prodVideoUrl = 'https://d157jlwnudd93d.cloudfront.net';
|
|
12
|
+
const usdevVideoUrl = 'https://d17hr4vx9tg3y1.cloudfront.net';
|
|
13
|
+
const usprodVideoUrl = 'https://d1mc31k0nyn3vx.cloudfront.net';
|
|
12
14
|
|
|
13
|
-
const devPublicApiUrl = 'https://
|
|
14
|
-
const stagingPublicApiUrl = 'https://
|
|
15
|
-
const prodPublicApiUrl = 'https://
|
|
15
|
+
const devPublicApiUrl = 'https://public-dev.vouchfor.com';
|
|
16
|
+
const stagingPublicApiUrl = 'https://public-staging.vouchfor.com';
|
|
17
|
+
const prodPublicApiUrl = 'https://public.vouchfor.com';
|
|
18
|
+
const usdevPublicApiUrl = 'https://public-usdev.vouchfor.com';
|
|
19
|
+
const usprodPublicApiUrl = 'https://public-us.vouchfor.com';
|
|
16
20
|
|
|
17
21
|
const localEmbedApiUrl = 'http://localhost:6060/v2';
|
|
18
22
|
const devEmbedApiUrl = 'https://embed-dev.vouchfor.com/v2';
|
|
19
23
|
const stagingEmbedApiUrl = 'https://embed-staging.vouchfor.com/v2';
|
|
20
24
|
const prodEmbedApiUrl = 'https://embed.vouchfor.com/v2';
|
|
25
|
+
const usdevEmbedApiUrl = 'https://embed-usdev.vouchfor.com/v2';
|
|
26
|
+
const usprodEmbedApiUrl = 'https://embed-us.vouchfor.com/v2';
|
|
21
27
|
|
|
22
28
|
// We are handling the case where env is an unknown string so the ts error is a lie
|
|
23
29
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24
30
|
// @ts-ignore
|
|
25
31
|
function getEnvUrls(env: Environment): GetEnvUrlsReturn {
|
|
26
|
-
if (!['local', 'dev', 'staging', 'prod'].includes(env)) {
|
|
32
|
+
if (!['local', 'dev', 'usdev', 'staging', 'prod', 'usprod'].includes(env)) {
|
|
27
33
|
throw new Error(`Unknown environment: ${env}`);
|
|
28
34
|
}
|
|
29
35
|
|
|
@@ -43,6 +49,14 @@ function getEnvUrls(env: Environment): GetEnvUrlsReturn {
|
|
|
43
49
|
};
|
|
44
50
|
}
|
|
45
51
|
|
|
52
|
+
if (env === 'usdev') {
|
|
53
|
+
return {
|
|
54
|
+
videoUrl: usdevVideoUrl,
|
|
55
|
+
publicApiUrl: usdevPublicApiUrl,
|
|
56
|
+
embedApiUrl: usdevEmbedApiUrl
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
if (env === 'staging') {
|
|
47
61
|
return {
|
|
48
62
|
videoUrl: stagingVideoUrl,
|
|
@@ -58,6 +72,14 @@ function getEnvUrls(env: Environment): GetEnvUrlsReturn {
|
|
|
58
72
|
embedApiUrl: prodEmbedApiUrl
|
|
59
73
|
};
|
|
60
74
|
}
|
|
75
|
+
|
|
76
|
+
if (env === 'usprod') {
|
|
77
|
+
return {
|
|
78
|
+
videoUrl: usprodVideoUrl,
|
|
79
|
+
publicApiUrl: usprodPublicApiUrl,
|
|
80
|
+
embedApiUrl: usprodEmbedApiUrl
|
|
81
|
+
};
|
|
82
|
+
}
|
|
61
83
|
}
|
|
62
84
|
|
|
63
85
|
export { devEmbedApiUrl, stagingEmbedApiUrl, prodEmbedApiUrl, getEnvUrls };
|