mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
* ♻️ refactor(cli): extract shared @lobechat/local-file-shell package Extract common file and shell operations from Desktop and CLI into a shared package to eliminate ~1500 lines of duplicated code. CLI now uses @lobechat/file-loaders for rich format support (PDF, DOCX, etc.). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * update * update commands * update version * update deps * refactor version issue * ✨ feat(local-file-shell): add cwd support, move/rename ops, improve logging - Add missing `cwd` parameter to `runCommand` (align with Desktop) - Add `moveLocalFiles` with batch support and detailed error handling - Add `renameLocalFile` with path validation and traversal prevention - Add error logging in shell runner's error/completion handlers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * support update model and provider in cli * fix desktop build * fix * 🐛 fix: pin fast-xml-parser to 5.4.2 in bun overrides Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
885 B
TypeScript
32 lines
885 B
TypeScript
import path from 'node:path';
|
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: '@lobechat/device-gateway-client',
|
|
replacement: path.resolve(__dirname, '../../packages/device-gateway-client/src/index.ts'),
|
|
},
|
|
{
|
|
find: '@lobechat/local-file-shell',
|
|
replacement: path.resolve(__dirname, '../../packages/local-file-shell/src/index.ts'),
|
|
},
|
|
{
|
|
find: '@lobechat/file-loaders',
|
|
replacement: path.resolve(__dirname, '../../packages/file-loaders/src/index.ts'),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
coverage: {
|
|
all: false,
|
|
reporter: ['text', 'json', 'lcov', 'text-summary'],
|
|
},
|
|
environment: 'node',
|
|
// Suppress unhandled rejection warnings from Commander async actions with mocked process.exit
|
|
onConsoleLog: () => true,
|
|
},
|
|
});
|