@vonage/vvd-core
Advanced tools
Comparing version 0.7.0 to 0.10.0
@@ -1,4 +0,4 @@ | ||
# 0.7.0 (2020-09-15) | ||
# 0.10.0 (2020-09-22) | ||
{ | ||
"name": "@vonage/vvd-core", | ||
"version": "0.7.0", | ||
"version": "0.10.0", | ||
"description": "> TODO: description", | ||
@@ -27,7 +27,7 @@ "author": "yinonov <yinon@hotmail.com>", | ||
"dependencies": { | ||
"@vonage/vvd-fonts": "^0.7.0", | ||
"@vonage/vvd-scheme": "^0.7.0", | ||
"@vonage/vvd-fonts": "^0.10.0", | ||
"@vonage/vvd-scheme": "^0.10.0", | ||
"tslib": "^2.0.1" | ||
}, | ||
"gitHead": "7ea075c26f7d4224be96ce96efd8ad6d6f210cd3" | ||
"gitHead": "2aeca64a96ebdb3dfc61888430fea0f959c19090" | ||
} |
@@ -1,1 +0,7 @@ | ||
export declare const coreReady: Promise<unknown>; | ||
import { Configuration } from './vvd-configurer.js'; | ||
declare const _default: Readonly<{ | ||
set: typeof applyConfiguration; | ||
settled: Promise<unknown[]>; | ||
}>; | ||
export default _default; | ||
declare function applyConfiguration(configuration: Partial<Configuration>): Promise<unknown[]>; |
@@ -1,16 +0,22 @@ | ||
import configuration from './config-resolver.js'; | ||
import configurer from './vvd-configurer.js'; | ||
import fonts from '@vonage/vvd-fonts/vvd-fonts.js'; | ||
import schemeService from '@vonage/vvd-scheme'; | ||
let initResolver, initRejector; | ||
export const coreReady = new Promise((resolve, reject) => { | ||
initResolver = resolve; | ||
initRejector = reject; | ||
let coreAutoInitDone; | ||
if (configurer.initialConfiguration.autoInit) { | ||
coreAutoInitDone = applyConfiguration(configurer.initialConfiguration); | ||
} | ||
else { | ||
coreAutoInitDone = Promise.reject('auto-init unavailable when "none" used'); | ||
} | ||
export default Object.freeze({ | ||
set: applyConfiguration, | ||
settled: coreAutoInitDone, | ||
}); | ||
console.debug('effective config', JSON.stringify(configuration)); | ||
init(configuration); | ||
async function init({ scheme }) { | ||
Promise.all([fonts.init(), schemeService.set(scheme)]) | ||
.then(initResolver) | ||
.catch(initRejector); | ||
async function applyConfiguration(configuration) { | ||
configurer.validateConfiguration(configuration); | ||
return init(configuration); | ||
} | ||
async function init(configuration) { | ||
return Promise.all([fonts.init(), schemeService.set(configuration.scheme)]); | ||
} | ||
//# sourceMappingURL=vvd-core.js.map |
Sorry, the diff of this file is not supported yet
19145
71
+ Added@vonage/vvd-fonts@0.10.0(transitive)
+ Added@vonage/vvd-scheme@0.10.0(transitive)
- Removed@vonage/vvd-fonts@0.7.0(transitive)
- Removed@vonage/vvd-scheme@0.7.0(transitive)
Updated@vonage/vvd-fonts@^0.10.0
Updated@vonage/vvd-scheme@^0.10.0