Files
actual/packages/api/test
github-actions[bot] 35f84b3f7f [AI] api: serve runtime assets from the api package itself
Consumers no longer copy default-db.sqlite, migrations, sql-wasm.wasm,
or data-file-index.txt into their static assets directory. The api's
dist/ now contains everything loot-core's browser fs asks for — the
existing files plus a new data-file-index.txt manifest and a data/
mirror directory (hard-linked to avoid duplicating bytes).

At init time the main-thread facade derives the directory portion of
its own bundle URL (via string manipulation to dodge Vite's asset
plugin) and hands it to the worker as __assetsBaseUrl. The worker
sets process.env.PUBLIC_URL to that URL before calling loot-core's
init(config), so populateDefaultFilesystem and sql.js locateFile all
resolve against @actual-app/api/dist/ wherever the consumer's bundler
placed it.

Playground shrinks accordingly: no more public/ directory,
copy-assets.sh script, or predev hook. `yarn dev` now does just
`vite` — matching the zero-setup `api.init()` story.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 16:16:23 +01:00
..