@frontegg/injector
Advanced tools
Comparing version 0.0.10 to 0.0.11
{ | ||
"name": "@frontegg/injector", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"main": "dist/cjs/index.js", | ||
@@ -19,3 +19,3 @@ "types": "dist/esm/index.d.ts", | ||
}, | ||
"gitHead": "b2173dfadd41bd96151c1dc8c169e5c44075d3e8" | ||
"gitHead": "744db34fb18fbc46b7d0672188a4d3d537b8879b" | ||
} |
@@ -14,6 +14,10 @@ import Logger from './logger'; | ||
export async function getVersionMetadata(logger: Logger, cdn: string, version: string): Promise<VersionMetadata> { | ||
logger.info(`Retrieving version from cdn: ${version}`); | ||
const res = await fetch(`${cdn}/${version}`, { cache: 'no-cache' }); | ||
export async function getVersionMetadata(logger: Logger, cdn: string, _version: string): Promise<VersionMetadata> { | ||
logger.info(`Retrieving version from cdn: ${_version}`); | ||
let version = _version; | ||
if (version !== 'latest' && version !== 'stable') { | ||
version = `${_version}/config`; | ||
} | ||
const res = await fetch(`${cdn}/${version}.json`, { cache: 'no-cache' }); | ||
return res.json(); | ||
} |
@@ -125,2 +125,3 @@ import Logger from './logger'; | ||
} | ||
resolve() | ||
}); | ||
@@ -146,2 +147,3 @@ } | ||
this.shadowEl.insertBefore(url, this.rootEl); | ||
resolve(); | ||
} | ||
@@ -148,0 +150,0 @@ }); |
148577
1422