Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function renderInstance(options: PiralOptions = {}) {
const { routes = {}, selector = '#app', gateway, translations, components } = options;
const origin = getGateway(gateway);
const client = setupGqlClient({
url: origin,
});
const Piral = createInstance({
availableModules: getAvailableModules(),
requestModules() {
return fetch(`${origin}/api/v1/pilet`)
.then(res => res.json())
.then(res => res.items);
},
components,
Loader,
Dashboard,
ErrorInfo,
extendApi(api: PiralCoreApi): PiletApi {
return {