Add progressive web app companion for cross-platform access
Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
46365b713b
commit
e8428de775
12051 changed files with 1799735 additions and 0 deletions
54
pwa/node_modules/vitest/dist/chunks/inspector.70d6emsh.js
generated
vendored
Normal file
54
pwa/node_modules/vitest/dist/chunks/inspector.70d6emsh.js
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { createRequire } from 'node:module';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
const __require = createRequire(import.meta.url);
|
||||
let inspector;
|
||||
let session;
|
||||
function setupInspect(ctx) {
|
||||
const config = ctx.config;
|
||||
const isEnabled = config.inspector.enabled;
|
||||
if (isEnabled) {
|
||||
inspector = __require("node:inspector");
|
||||
const isOpen = inspector.url() !== void 0;
|
||||
if (!isOpen) {
|
||||
inspector.open(
|
||||
config.inspector.port,
|
||||
config.inspector.host,
|
||||
config.inspector.waitForDebugger
|
||||
);
|
||||
if (config.inspectBrk) {
|
||||
const firstTestFile = ctx.files[0];
|
||||
if (firstTestFile) {
|
||||
session = new inspector.Session();
|
||||
session.connect();
|
||||
session.post("Debugger.enable");
|
||||
session.post("Debugger.setBreakpointByUrl", {
|
||||
lineNumber: 0,
|
||||
url: pathToFileURL(firstTestFile)
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const keepOpen = shouldKeepOpen(config);
|
||||
return function cleanup() {
|
||||
if (isEnabled && !keepOpen && inspector) {
|
||||
inspector.close();
|
||||
session?.disconnect();
|
||||
}
|
||||
};
|
||||
}
|
||||
function closeInspector(config) {
|
||||
const keepOpen = shouldKeepOpen(config);
|
||||
if (inspector && !keepOpen) {
|
||||
inspector.close();
|
||||
session?.disconnect();
|
||||
}
|
||||
}
|
||||
function shouldKeepOpen(config) {
|
||||
const isIsolatedSingleThread = config.pool === "threads" && config.poolOptions?.threads?.isolate === false && config.poolOptions?.threads?.singleThread;
|
||||
const isIsolatedSingleFork = config.pool === "forks" && config.poolOptions?.forks?.isolate === false && config.poolOptions?.forks?.singleFork;
|
||||
return config.watch && (isIsolatedSingleFork || isIsolatedSingleThread);
|
||||
}
|
||||
|
||||
export { closeInspector as c, setupInspect as s };
|
||||
Loading…
Add table
Add a link
Reference in a new issue