mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-11 22:59:03 +08:00
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
import os from 'node:os';
|
|
import path from 'node:path';
|
|
|
|
// 缓解Win7设备兼容性问题
|
|
let osName: string;
|
|
|
|
try {
|
|
osName = os.hostname();
|
|
} catch {
|
|
osName = 'NapCat'; // + crypto.randomUUID().substring(0, 4);
|
|
}
|
|
|
|
const homeDir = os.homedir();
|
|
|
|
export const systemPlatform = os.platform();
|
|
export const cpuArch = os.arch();
|
|
export const systemVersion = os.release();
|
|
export const hostname = osName;
|
|
export const downloadsPath = path.join(homeDir, 'Downloads');
|
|
export const systemName = os.type();
|