refactor(core): Unify package exports and improve dev experience

- Update license header to include Qwen copyright
- Add error handler for spawn in dev.js
- Refactor core/src/index.ts to export all public APIs
- Simplify core/index.ts to be a clean re-export
- Fix vitest alias to point to package entry

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
tanzhenxin 2026-02-01 11:59:05 +08:00
parent 07b186fcbf
commit b1fa12f323
4 changed files with 190 additions and 167 deletions

View file

@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen
* SPDX-License-Identifier: Apache-2.0
*/
@ -84,6 +84,16 @@ const child = spawn('node', nodeArgs, {
cwd: process.cwd(),
});
child.on('error', (err) => {
console.error('Failed to start dev server:', err.message);
try {
rmSync(tmpDir, { recursive: true, force: true });
} catch {
// Ignore cleanup errors
}
process.exit(1);
});
child.on('close', (code) => {
// Cleanup temp directory
try {