Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(private appState: AppState) {
// TODO set this via AppState, ideally per-logger
Logger.setLevel(Logger.DEBUG);
}
}
var defaults = Object.freeze({
logLevel: 'warn',
publishableApiKey: getPublishableApiKeyFromUrl(),
secretApiKey: null,
servicesUrl: 'https://spaces.archilogic.com/api/v2',
storageDomain: 'storage.3d.io',
storageDomainNoCdn: 'storage-nocdn.3d.io'
})
// constants
var LOG_STRING_TO_ENUM = {
error: log.ERROR,
warn: log.WARN,
info: log.INFO,
debug: log.DEBUG
}
// main
var configs = function configs (args) {
if (!args) {
// no arguments: return copy of configs object
return JSON.parse(JSON.stringify(this))
}
// apply log level if among arguments
if (args.logLevel) {
setLogLevel(args.logLevel)
delete args.logLevel
}