feat: write version info to window
This commit is contained in:
@@ -6,6 +6,9 @@ import { DEFAULT_ZERO_EX_CONTAINER_SELECTOR, INJECTED_DIV_CLASS, INJECTED_DIV_ID
|
||||
import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index';
|
||||
import { assert } from './util/assert';
|
||||
import { util } from './util/util';
|
||||
import { versionUtil } from './util/version';
|
||||
|
||||
versionUtil.writeVersionInfoToWindow();
|
||||
|
||||
const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID);
|
||||
|
||||
|
||||
8
packages/instant/src/util/version.ts
Normal file
8
packages/instant/src/util/version.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
const anyWindow = window as any;
|
||||
|
||||
export const versionUtil = {
|
||||
writeVersionInfoToWindow: () => {
|
||||
anyWindow.__zeroExInstantGitSha = process.env.GIT_SHA;
|
||||
anyWindow.__zeroExInstantNpmVersion = process.env.NPM_PACKAGE_VERSION;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user