fix: Add version to embed.js and preview.js (#16182)
This commit is contained in:
1 parent
1a0448910b
commit
36ecece181
6 files changed
+10
-2
No files matched your search
@@ -52,6 +52,7 @@ if (!globalCal || !globalCal.q) {
|
||||
// TODO: Ideally it should be the version as per package.json and then it can be renamed to version.
|
||||
// But because it is built on local machine right now, it is much more reliable to have the commit hash.
|
||||
globalCal.fingerprint = process.env.EMBED_PUBLIC_EMBED_FINGER_PRINT as string;
|
||||
globalCal.version = process.env.EMBED_PUBLIC_EMBED_VERSION as string;
|
||||
globalCal.__css = allCss;
|
||||
document.head.appendChild(document.createElement("style")).innerHTML = css;
|
||||
|
||||
@@ -810,6 +811,7 @@ export interface GlobalCalWithoutNs {
|
||||
instance?: Cal;
|
||||
__css?: string;
|
||||
fingerprint?: string;
|
||||
version?: string;
|
||||
__logQueue?: unknown[];
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ if (!bookerUrl || !embedLibUrl) {
|
||||
})(window, embedLibUrl, "init");
|
||||
const previewWindow = window;
|
||||
previewWindow.Cal.fingerprint = process.env.EMBED_PUBLIC_EMBED_FINGER_PRINT as string;
|
||||
previewWindow.Cal.version = process.env.EMBED_PUBLIC_EMBED_VERSION as string;
|
||||
|
||||
previewWindow.Cal("init", {
|
||||
origin: bookerUrl,
|
||||
|
||||
Reference in new issue
Block a user