Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// await SchemaIntrospection()
} catch (e) {
console.error(e);
}
isRunning = false;
if (config.$views) {
config.$views = await transpileComponentsForViews(config.$views)
}
if(config.$components) {
config.$components = (await transpileComponentsInit(config.$components as string[])).map(c => c && c.link ? c.link : c) as any;
}
Container.reset(Config)
Container.remove(Config)
Container.set(Config, config);
if (config.$views) {
Container.get(PubSubService).publish('listenForChanges', config.$views);
}
Container.reset('main-config-compiled')
Container.remove('main-config-compiled')
Container.set('main-config-compiled', config)
console.log(`📦 Bundle realoaded! ${Date.now() - timer}ms`, path);
}
// traverseMap.push(...(config.$components as string[]).map(c => ({path: c.replace('💉', ''), parent: null})))
// }
if (config.$views) {
process.argv.push('--hot-reload', '--client')
}
if (includes('--hot-reload')) {
config.$externals.forEach(e =>
traverseMap.push({ parent: null, path: e.file })
);
watchBundles(traverseMap.map(f => f.path), config);
}
config.$components = config.$components || [];
if (config.$components.length) {
config.$components = (await predictConfig(config.$components as string[]) || []).map(c => c.link)
}
Container.set('main-config-compiled', config)
console.log(
'You can extract this schema by running --generate command'
);
return true;
}
}
config.$views = await transpileComponentsForViews(config.$views)
}
if(config.$components) {
config.$components = (await transpileComponentsInit(config.$components as string[])).map(c => c && c.link ? c.link : c) as any;
}
Container.reset(Config)
Container.remove(Config)
Container.set(Config, config);
if (config.$views) {
Container.get(PubSubService).publish('listenForChanges', config.$views);
}
Container.reset('main-config-compiled')
Container.remove('main-config-compiled')
Container.set('main-config-compiled', config)
console.log(`📦 Bundle realoaded! ${Date.now() - timer}ms`, path);
}