@ada-support/embed2 1.4.10 → 1.4.11
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/npm-entry/index.js
CHANGED
|
@@ -15811,7 +15811,7 @@ const client = new error_tracker_BrowserClient({
|
|
|
15811
15811
|
},
|
|
15812
15812
|
|
|
15813
15813
|
environment: "production",
|
|
15814
|
-
release: "1.4.
|
|
15814
|
+
release: "1.4.11-b2dd6e8",
|
|
15815
15815
|
sampleRate: 0.25,
|
|
15816
15816
|
autoSessionTracking: false,
|
|
15817
15817
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -16432,7 +16432,7 @@ function getEmbedURL(_ref) {
|
|
|
16432
16432
|
host = "http://".concat(window.location.hostname, ":9001");
|
|
16433
16433
|
}
|
|
16434
16434
|
|
|
16435
|
-
return "".concat(host, "/embed/").concat(frameName, "/").concat("
|
|
16435
|
+
return "".concat(host, "/embed/").concat(frameName, "/").concat("b2dd6e8", "/index.html");
|
|
16436
16436
|
}
|
|
16437
16437
|
|
|
16438
16438
|
function constructQueryString(query) {
|
|
@@ -18246,13 +18246,22 @@ const getChatVersionFromManifest = manifest => {
|
|
|
18246
18246
|
persistence.set("ada-embed_chat-manifest-cache", manifestString);
|
|
18247
18247
|
return hash;
|
|
18248
18248
|
};
|
|
18249
|
-
const getChatVersion = async
|
|
18250
|
-
|
|
18251
|
-
|
|
18249
|
+
const getChatVersion = async adaSettings => {
|
|
18250
|
+
// allow versioning using global variable
|
|
18252
18251
|
if (window.__AdaChatVersion) {
|
|
18253
18252
|
return window.__AdaChatVersion;
|
|
18254
18253
|
}
|
|
18255
18254
|
|
|
18255
|
+
const {
|
|
18256
|
+
cluster,
|
|
18257
|
+
domain
|
|
18258
|
+
} = adaSettings; // Skip automatic versioning for ATT and dev/stage clusters but allow override through __AdaChatVersion
|
|
18259
|
+
|
|
18260
|
+
if (cluster === "att" || domain !== null && domain !== void 0 && domain.match(/ada-(dev|dev2|stage)/)) {
|
|
18261
|
+
return undefined;
|
|
18262
|
+
}
|
|
18263
|
+
|
|
18264
|
+
const manifest = await loadChatManifest();
|
|
18256
18265
|
return getChatVersionFromManifest(manifest);
|
|
18257
18266
|
};
|
|
18258
18267
|
// EXTERNAL MODULE: ./node_modules/lodash.memoize/index.js
|
|
@@ -18298,9 +18307,9 @@ async function log(message, extra, options) {
|
|
|
18298
18307
|
service: "embed",
|
|
18299
18308
|
env: "production",
|
|
18300
18309
|
embedVersion: 2,
|
|
18301
|
-
version: "1.4.
|
|
18310
|
+
version: "1.4.11",
|
|
18302
18311
|
isNpm: true,
|
|
18303
|
-
commitHash: "
|
|
18312
|
+
commitHash: "b2dd6e8"
|
|
18304
18313
|
}))
|
|
18305
18314
|
});
|
|
18306
18315
|
}
|
|
@@ -18742,7 +18751,7 @@ class ChatFrame extends d {
|
|
|
18742
18751
|
const hostPageUrlParams = new (url_default())(window.location.href).searchParams;
|
|
18743
18752
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
18744
18753
|
const queryParams = {
|
|
18745
|
-
embedVersion: "
|
|
18754
|
+
embedVersion: "b2dd6e8".slice(0, 7),
|
|
18746
18755
|
greeting,
|
|
18747
18756
|
language,
|
|
18748
18757
|
skipGreeting,
|
|
@@ -19672,15 +19681,8 @@ class Container extends d {
|
|
|
19672
19681
|
this.notificationPermHandler();
|
|
19673
19682
|
bindLocationChangeOverrides();
|
|
19674
19683
|
addServiceWorkerListeners();
|
|
19675
|
-
window.addEventListener("locationchange", this.locationChangeHandlerBound);
|
|
19676
|
-
|
|
19677
|
-
const chatVersion = await (async () => {
|
|
19678
|
-
if (adaSettings.cluster === "att") {
|
|
19679
|
-
return undefined;
|
|
19680
|
-
}
|
|
19681
|
-
|
|
19682
|
-
return getChatVersion();
|
|
19683
|
-
})();
|
|
19684
|
+
window.addEventListener("locationchange", this.locationChangeHandlerBound);
|
|
19685
|
+
const chatVersion = await getChatVersion(adaSettings);
|
|
19684
19686
|
this.setState({
|
|
19685
19687
|
chatVersion,
|
|
19686
19688
|
// We shouldn't try to render chat frame until version is attempted to be retrieved.
|
|
@@ -20924,7 +20926,7 @@ class Embed {
|
|
|
20924
20926
|
|
|
20925
20927
|
}
|
|
20926
20928
|
|
|
20927
|
-
_defineProperty(Embed, "embed2Version", "
|
|
20929
|
+
_defineProperty(Embed, "embed2Version", "b2dd6e8");
|
|
20928
20930
|
;// CONCATENATED MODULE: ./src/common/helpers/startup.ts
|
|
20929
20931
|
|
|
20930
20932
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StartOptions } from "@ada-support/embed-types";
|
|
1
2
|
import type { Manifest } from "./manifest";
|
|
2
3
|
export declare const getChatVersionFromManifest: (manifest: Manifest | unknown) => string;
|
|
3
|
-
export declare const getChatVersion: () => Promise<string>;
|
|
4
|
+
export declare const getChatVersion: (adaSettings: StartOptions) => Promise<string>;
|