feat(client): migration old package to rspack (#15068)

#### PR Dependency Tree


* **PR #15068** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Upgraded Vitest across packages to 4.1.8 and bumped Tailwind PostCSS
to 4.3.0
* CLI/tooling updated to support the media-capture-playground package
and adjust build/dev server behavior

* **Bug Fixes**
  * Improved workspace deletion reliability in the Electron app

* **Refactor**
* Simplified media capture playground build setup (build/config
adjustments)

* **Tests**
* Made tests more robust by preserving/restoring environment state
during runs
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-06-02 12:00:50 +08:00
committed by GitHub
parent 69c2f09eba
commit aca47445aa
50 changed files with 738 additions and 507 deletions
@@ -31,7 +31,7 @@ async function deleteWorkspaceV1(workspaceId: string) {
try {
await ensureSQLiteDisconnected('workspace', workspaceId);
const basePath = await getWorkspaceBasePathV1('workspace', workspaceId);
await fs.rmdir(basePath, { recursive: true });
await fs.remove(basePath);
} catch (error) {
logger.error('deleteWorkspaceV1', error);
}
@@ -47,7 +47,7 @@ export async function deleteWorkspace(universalId: string) {
const dbPath = await getSpaceDBPath(peer, type, id);
try {
await getDocStoragePool().disconnect(universalId);
await fs.rmdir(path.dirname(dbPath), { recursive: true });
await fs.remove(path.dirname(dbPath));
} catch (e) {
logger.error('deleteWorkspace', e);
}
@@ -78,7 +78,7 @@ export async function trashWorkspace(universalId: string) {
await fs.copy(path.dirname(dbPath), movedPath, {
overwrite: true,
});
await fs.rmdir(path.dirname(dbPath), { recursive: true });
await fs.remove(path.dirname(dbPath));
} catch (error) {
logger.error('trashWorkspace', error);
}
@@ -331,7 +331,7 @@ async function importWorkspaceDb(originalPath: string) {
export async function deleteBackupWorkspace(id: string) {
const basePath = await getDeletedWorkspacesBasePath();
const workspacePath = path.join(basePath, normalizeWorkspaceIdForPath(id));
await fs.rmdir(workspacePath, { recursive: true });
await fs.remove(workspacePath);
logger.info(
'deleteBackupWorkspace',
`Deleted backup workspace: ${workspacePath}`