fm.teal.alpha.feed.play lexicon.
refactor: extract shared environment-agnostic core and migrate to pnpm workspace
This refactor removes duplicated logic between the CLI and the web app by introducing a shared, environment-agnostic core. It also restructures the project as a proper pnpm workspace.
Key changes:
- Monorepo setup:
- Added `pnpm-workspace.yaml`
- Updated root `package.json` to define workspaces (`packages/*`, `web`)
- Introduced `build:packages` and `build:all` scripts
- Shared core extraction:
- Created `src/core/` for environment-agnostic domain logic
- Moved modules including `auth`, `car-fetch`, `csv`, `merge`, `publisher`,
`rate-limiter`, `spotify`, `sync`, `tid`, and `types` into the shared core
- Web app updates:
- Replaced duplicated browser-specific implementations with re-exports from `src/core/`
- Added `$core` alias in `svelte.config.js` pointing to `../src/core`
- Configured Vite `fs.allow` to support workspace root imports
- CLI adjustments:
- Refactored `src/lib/` to act as thin wrappers around `src/core/`
- Reintroduced Node-specific concerns (e.g. `fs` access, terminal auth prompts) at the CLI layer
- Version bumps:
- Root package → `0.10.1`
- Web package → `0.3.1`