INNER CODE UNIT · TypeScript
configureWorkerFactory
prisma/prisma · apps/lsp-playground/src/client/main.ts:92
function configureWorkerFactory(logger?: ILogger): void {
const workerLoaders = defineDefaultWorkerLoaders();
workerLoaders['extensionHostWorkerMain'] = undefined;
const config = logger !== undefined ? { workerLoaders, logger } : { workerLoaders };
useWorkerFactory(config);
}
function buildWebSocketUrl(wsPath: string): string {
const host = `${window.location.host}${wsPath}`;
// nosemgrep: javascript.lang.security.detect-insecure-websocket.detect-insecure-websocket
return window.location.protocol === 'https:' ? `wss://${host}` : `ws://${host}`;
}
async function main(): Promise<void> {
const runtimeConfig = await loadRuntimeConfig();
const pathEl = document.getElementById('schema-path');
if (pathEl !== null) {