Files
headroom/frontend/node_modules/tinypool/dist/utils-B--2TaWv.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

38 lines
1.2 KiB
JavaScript

import { pathToFileURL } from "node:url";
//#region src/entry/utils.ts
let importESMCached;
function getImportESM() {
if (importESMCached === void 0) importESMCached = new Function("specifier", "return import(specifier)");
return importESMCached;
}
const handlerCache = new Map();
async function getHandler(filename, name) {
let handler = handlerCache.get(`${filename}/${name}`);
if (handler !== void 0) return handler;
try {
const handlerModule = await import(filename);
handler = typeof handlerModule.default !== "function" && handlerModule.default || handlerModule;
if (typeof handler !== "function") handler = await handler[name];
} catch {}
if (typeof handler !== "function") {
handler = await getImportESM()(pathToFileURL(filename).href);
if (typeof handler !== "function") handler = await handler[name];
}
if (typeof handler !== "function") return null;
if (handlerCache.size > 1e3) {
const [handler$1] = handlerCache;
const key = handler$1[0];
handlerCache.delete(key);
}
handlerCache.set(`${filename}/${name}`, handler);
return handler;
}
function throwInNextTick(error) {
process.nextTick(() => {
throw error;
});
}
//#endregion
export { getHandler, throwInNextTick };