refactor: update router import path and add random ID utility

- Changed the import path for router types from '@kevisual/router' to './route.ts' in src/router-define.ts.
- Added a new lock file (bun.lock) to manage dependencies.
- Introduced a new utility function in src/utils/random.ts to generate random IDs using the nanoid library.
This commit is contained in:
2026-02-17 20:35:16 +08:00
parent b4f2615afa
commit a53e8c0bc3
9 changed files with 391 additions and 1300 deletions

8
src/utils/random.ts Normal file
View File

@@ -0,0 +1,8 @@
import { customAlphabet } from 'nanoid';
const nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz', 16);
export const randomId = (length: number = 8, affix: string = '') => {
return affix + nanoid(length);
}
export { nanoid };