refactor: core

This commit is contained in:
linyuchen
2024-04-26 13:55:35 +08:00
parent 20dec19bfe
commit 0ff5b4e90b
56 changed files with 111 additions and 129 deletions

View File

@@ -4,7 +4,7 @@ import {
type Group,
type GroupMember, GroupNotify,
type SelfInfo
} from '@/core/qqnt/entities';
} from '../core/src/entities';
import { isNumeric } from './utils/helper';
import { log } from '@/common/utils/log';

View File

@@ -1,4 +1,4 @@
import { ElementType, FileElement, PicElement, PttElement, RawMessage, VideoElement } from '@/core/qqnt/entities';
import { ElementType, FileElement, PicElement, PttElement, RawMessage, VideoElement } from '../../core/src/entities';
import sqlite3 from 'sqlite3';
import { log } from '@/common/utils/log';

View File

@@ -10,7 +10,7 @@ import { v4 as uuidv4 } from 'uuid';
import { napCatCore } from '@/core';
export const getNapCatDir = () => {
const p = path.join(napCatCore.wrapper.dataPath, 'NapCat');
const p = path.join(napCatCore.dataPath, 'NapCat');
fs.mkdirSync(p, { recursive: true });
return p;
};

View File

@@ -1,5 +1,5 @@
// QQ等级换算
import { QQLevel } from '@/core/qqnt/entities';
import { QQLevel } from '../../core/src/entities';
export function calcQQLevel(level: QQLevel) {
const { crownNum, sunNum, moonNum, starNum } = level;