Refactor imports to use package names instead of aliases

Replaced all path alias imports (e.g., '@/napcat-core') with direct package imports (e.g., 'napcat-core/index') across napcat-common, napcat-core, and napcat-webui-backend. This improves compatibility with tooling and workspace resolution, and aligns with standard TypeScript/Node.js import practices.
This commit is contained in:
手瓜一十雪
2025-11-14 14:34:27 +08:00
parent 6e9f448a0c
commit c8fd66fa9b
15 changed files with 18 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
import { FriendRequest, FriendV2 } from '@/napcat-core/types';
import { BuddyListReqType, InstanceContext, NapCatCore } from '@/napcat-core/index';
import { FriendRequest, FriendV2 } from 'napcat-core/types';
import { BuddyListReqType, InstanceContext, NapCatCore } from 'napcat-core/index';
import { LimitedHashTable } from 'napcat-common/src/message-unique';
export class NTQQFriendApi {

View File

@@ -6,7 +6,7 @@ import {
NTQQSystemApi,
NTQQUserApi,
NTQQWebApi,
} from '@/napcat-core/apis';
} from 'napcat-core/apis';
import { NTQQCollectionApi } from '@/napcat-core/apis/collection';
import {
NodeIQQNTWrapperSession,

View File

@@ -1,5 +1,5 @@
import { ChatType, KickedOffLineInfo, RawMessage } from '@/napcat-core/types';
import { CommonFileInfo } from '@/napcat-core';
import { CommonFileInfo } from 'napcat-core/index';
export interface OnRichMediaDownloadCompleteParams {
fileModelId: string,

View File

@@ -19,6 +19,7 @@
"@sinclair/typebox": "^0.34.38",
"file-type": "^21.0.0",
"napcat-image-size": "workspace:*",
"napcat-core": "workspace:*",
"napcat-common": "workspace:*",
"napcat-onebot": "workspace:*"
},

View File

@@ -9,7 +9,7 @@ import {
PacketMsgReplyElement,
PacketMsgVideoElement,
} from '@/napcat-core/packet/message/element';
import { ChatType, MsgSourceType, NTMsgType, RawMessage } from '@/napcat-core';
import { ChatType, MsgSourceType, NTMsgType, RawMessage } from 'napcat-core/index';
import { MiniAppRawData, MiniAppReqParams } from '@/napcat-core/packet/entities/miniApp';
import { AIVoiceChatType } from '@/napcat-core/packet/entities/aiChat';
import { NapProtoDecodeStructType, NapProtoEncodeStructType, NapProtoMsg } from '@napneko/nap-proto-core';

View File

@@ -1,5 +1,5 @@
import { PacketHighwayContext } from '@/napcat-core/packet/highway/highwayContext';
import { NapCatCore } from '@/napcat-core';
import { NapCatCore } from 'napcat-core/index';
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
import { PacketClientContext } from '@/napcat-core/packet/context/clientContext';

View File

@@ -32,7 +32,7 @@ import {
SendTextElement,
SendVideoElement,
Peer,
} from '@/napcat-core';
} from 'napcat-core/index';
import { ForwardMsgBuilder } from 'napcat-common/src/forward-msg-builder';
import { PacketMsg, PacketSendMsgElement } from '@/napcat-core/packet/message/message';

View File

@@ -1,5 +1,5 @@
import { IPacketMsgElement } from '@/napcat-core/packet/message/element';
import { SendMessageElement, SendMultiForwardMsgElement } from '@/napcat-core';
import { SendMessageElement, SendMultiForwardMsgElement } from 'napcat-core/index';
export type PacketSendMsgElement = SendMessageElement | SendMultiForwardMsgElement;

View File

@@ -1,5 +1,5 @@
import { AnyCnameRecord } from 'node:dns';
import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, ProfileBizType, SimpleInfo, UserDetailInfoByUin, UserDetailInfoListenerArg, UserDetailSource } from '@/napcat-core';
import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, ProfileBizType, SimpleInfo, UserDetailInfoByUin, UserDetailInfoListenerArg, UserDetailSource } from 'napcat-core/index';
import { GeneralCallResult } from '@/napcat-core/services/common';
export interface NodeIKernelProfileService {