refactor: improve error handling and initialization in frontend tasks

Updated PingViewModel to reset errorMessage on each task execution and provide detailed error messages. Enhanced SQLite worker initialization with manual WASM binary loading and improved error handling. Adjusted Gradle tasks and Webpack config for SQLite assets, ensuring seamless builds. Included dummy modules to bypass Webpack resolution issues.
This commit is contained in:
2026-01-26 14:37:09 +01:00
parent da876a0c21
commit 763dbc5eed
8 changed files with 433 additions and 62 deletions
@@ -0,0 +1,14 @@
// This is a dummy file to satisfy Webpack's requirement for sqlite3.wasm and other modules.
// It mimics the structure of the sqlite3-wasm module to prevent build errors.
// The worker code imports it like this:
// import sqlite3InitModule from '@sqlite.org/sqlite-wasm';
// So we need a default export that is a function.
// This function should mimic the behavior of sqlite3InitModule, which returns a Promise.
export default function dummySqlite3InitModule() {
// Since we are manually loading the WASM binary in the worker, this dummy module
// is primarily here to satisfy Webpack's resolution and prevent errors.
// It doesn't need to actually load the WASM.
return Promise.resolve({});
};