Compare commits

..

25 Commits

Author SHA1 Message Date
手瓜一十雪
7c8e825eba 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.
2025-11-13 15:39:20 +08:00
手瓜一十雪
c9c6942564 feat: pnpm new 2025-11-13 15:10:47 +08:00
手瓜一十雪
e2486606f9 feat: 正式终止once支持 2025-11-13 11:22:46 +08:00
Mlikiowa
f8eb368cdb release: v4.9.42 2025-11-13 02:48:59 +00:00
手瓜一十雪
9ce51fb082 fix: #1380 2025-11-13 10:47:40 +08:00
Mlikiowa
89e50be1e9 release: v4.9.41 2025-11-13 01:28:44 +00:00
手瓜一十雪
1259dcea5b Add new app, packet, and native mappings for 42086 builds
Updated appid.json, packet.json, and napi2native.json to include mappings for new 42086 builds across multiple platforms. Added sendMsfRequest method to NodeIKernelMSFService interface and made minor formatting improvements. Commented out a debug method in NodeIDependsAdapter.
2025-11-13 09:28:17 +08:00
手瓜一十雪
b4900066b3 fix: #1367 2025-11-12 13:50:35 +08:00
Mlikiowa
28acd94cbd release: v4.9.40 2025-11-12 05:38:39 +00:00
手瓜一十雪
7aedacb27f feat: png video截图 2025-11-12 13:38:08 +08:00
手瓜一十雪
c9b45ec1a2 Fix busiId comparison in parsePrivateMsgEvent
Ensure busiId is compared as a string in parsePrivateMsgEvent to handle cases where busiId may not be a string type. This prevents potential mismatches due to type differences.
2025-11-12 12:54:09 +08:00
Mlikiowa
54cacc30e4 release: v4.9.38 2025-11-12 04:20:16 +00:00
手瓜一十雪
9b26fc99d3 fix 2025-11-12 12:19:39 +08:00
手瓜一十雪
204846b404 Add success log messages to packet handler
Added log statements to indicate successful loading and initialization in NativePacketHandler. This improves traceability and debugging by providing clear feedback in the logs.
2025-11-12 12:04:48 +08:00
手瓜一十雪
3d654791b9 Add platform and arch to native module path
Prepends process.platform and process.arch to the native MoeHoo module filename, ensuring the correct binary is loaded for the current environment.
2025-11-12 12:00:36 +08:00
手瓜一十雪
63f42f1592 Improve native packet handler loading and error checks
Adds a 'loaded' flag to track native module loading status and improves error handling during initialization. The constructor now attempts to load the native module and logs warnings or errors if loading fails, while the init method checks the loaded status before proceeding.
2025-11-12 11:59:06 +08:00
Mlikiowa
0ab0b939da release: v4.9.36 2025-11-11 12:30:58 +00:00
手瓜一十雪
522a123f9a Update native MoeHoo binaries for Linux
Replaces MoeHoo.linux.arm64.node and MoeHoo.linux.x64.node with new versions. This may include bug fixes, performance improvements, or compatibility updates for the native packet module.
2025-11-11 20:30:33 +08:00
Mlikiowa
ec9f8d6e12 release: v4.9.35 2025-11-10 04:04:07 +00:00
手瓜一十雪
3c750c75a9 Add Linux native modules for arm64 and x64
Added prebuilt native binaries MoeHoo.linux.arm64.node and MoeHoo.linux.x64.node to support Linux on arm64 and x64 architectures.
2025-11-10 12:03:42 +08:00
手瓜一十雪
5b2b1f499b Remove Linux native packet binaries
Deleted MoeHoo.linux.arm64.node and MoeHoo.linux.x64.node from src/native/packet. These binaries are no longer needed or are being replaced.
2025-11-10 12:02:58 +08:00
手瓜一十雪
531ffcd55d Update MoeHoo.linux.x64.node binary
Replaces the MoeHoo.linux.x64.node native module with a new version. Details of the changes depend on the updated binary implementation.
2025-11-10 12:02:45 +08:00
Mlikiowa
068e4d8bb5 release: v4.9.33 2025-11-09 04:54:38 +00:00
手瓜一十雪
5dc33e78ad Add napiloader scripts and binaries, update Vite config
Introduces napiloader batch scripts and binaries (napiloader.dll, napimain.exe) for Windows integration. Updates vite.config.ts to include napiloader files in the Framework build output and refactors plugin target lists for improved distribution packaging.
2025-11-09 12:54:15 +08:00
Mlikiowa
d76a2170a0 release: v4.9.32 2025-11-08 04:26:49 +00:00
781 changed files with 2534 additions and 26447 deletions

View File

@@ -1,2 +0,0 @@
VITE_BUILD_TYPE = Production
VITE_BUILD_PLATFORM = Framework

View File

@@ -1,2 +0,0 @@
VITE_BUILD_TYPE = Production
VITE_BUILD_PLATFORM = Shell

View File

@@ -1,2 +0,0 @@
VITE_BUILD_TYPE = DEBUG
VITE_BUILD_PLATFORM = Shell

View File

@@ -1,2 +0,0 @@
VITE_BUILD_TYPE = Production
VITE_BUILD_PLATFORM = Universal

View File

@@ -1,8 +1,9 @@
name: "Build Action"
on:
push:
pull_request:
workflow_dispatch:
push:
branches:
- main
permissions: write-all
@@ -18,14 +19,16 @@ jobs:
node-version: 20.x
- name: Build NapCat.Framework
run: |
npm i && cd napcat.webui && npm i && cd .. || exit 1
npm run build:framework && npm run depend || exit 1
rm package-lock.json
pnpm i
pnpm --filter napcat-webui-frontend run build || exit 1
pnpm run build:framework
cd packages/napcat-framework/dist
pnpm install --production
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Framework
path: dist
path: packages/napcat-framework/dist
Build-Shell:
runs-on: ubuntu-latest
steps:
@@ -37,11 +40,13 @@ jobs:
node-version: 20.x
- name: Build NapCat.Shell
run: |
npm i && cd napcat.webui && npm i && cd .. || exit 1
npm run build:shell && npm run depend || exit 1
rm package-lock.json
pnpm i
pnpm --filter napcat-webui-frontend run build || exit 1
pnpm run build:shell
cd packages/napcat-shell/dist
pnpm install --production
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Shell
path: dist
path: packages/napcat-shell/dist

View File

@@ -1,164 +1,82 @@
name: "Build Release"
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions: write-all
jobs:
check-version:
Build-LiteLoader:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
- name: Clone Main Repository
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NapCat.Framework
run: |
pnpm i
pnpm --filter napcat-webui-frontend run build || exit 1
pnpm run build:framework
cd packages/napcat-framework/dist
pnpm install --production
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Framework
path: packages/napcat-framework/dist
- name: Check Version
run: |
ls
node ./script/checkVersion.cjs
sh ./checkVersion.sh
Build-LiteLoader:
needs: [check-version]
runs-on: ubuntu-latest
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NuCat Framework
run: |
npm i
cd napcat.webui
npm i
cd ..
npm run build:framework
cd dist
npm i --omit=dev
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Framework
path: dist
Build-Shell:
runs-on: ubuntu-latest
needs: [check-version]
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NuCat Shell
run: |
npm i
cd napcat.webui
npm i
cd ..
npm run build:shell
cd dist
npm i --omit=dev
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Shell
path: dist
- name: Clone Main Repository
uses: actions/checkout@v4
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NapCat.Shell
run: |
pnpm i
pnpm --filter napcat-webui-frontend run build || exit 1
pnpm run build:shell
cd packages/napcat-shell/dist
pnpm install --production
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.Shell
path: packages/napcat-shell/dist
release-napcat:
needs: [Build-LiteLoader,Build-Shell]
needs: [Build-LiteLoader, Build-Shell]
runs-on: ubuntu-latest
steps:
- name: Download All Artifact
uses: actions/download-artifact@v4
- name: Clone Main Repository
uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Download All Artifact
uses: actions/download-artifact@v4
- name: Compress subdirectories
run: |
cd ./NapCat.Shell/
zip -q -r NapCat.Shell.zip *
cd ..
cd ./NapCat.Framework/
zip -q -r NapCat.Framework.zip *
cd ..
rm ./NapCat.Shell.zip -rf
rm ./NapCat.Framework.zip -rf
mv ./NapCat.Shell/NapCat.Shell.zip ./
mv ./NapCat.Framework/NapCat.Framework.zip ./
mkdir ./NapCat.Framework.Windows.Once
unzip -q ./external/LiteLoaderWrapper.zip -d ./NapCat.Framework.Windows.Once
cd ./NapCat.Framework.Windows.Once
ls
mkdir -p ./LL/plugins/NapCatQQ
unzip -q ../NapCat.Framework.zip -d ./LL/plugins/NapCatQQ
zip -q -r NapCat.Framework.Windows.Once.zip *
cd ..
mv ./NapCat.Framework.Windows.Once/NapCat.Framework.Windows.Once.zip ./
- name: Extract version from tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Clone Changes Log
run: curl -o CHANGELOG.md https://fastly.jsdelivr.net/gh/NapNeko/NapCatQQ@main/docs/changelogs/CHANGELOG.v${{ env.VERSION }}.md
- name: Create Release Draft and Upload Artifacts
uses: softprops/action-gh-release@v1
with:
name: NapCat V${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
body_path: CHANGELOG.md
files: |
NapCat.Framework.zip
NapCat.Shell.zip
NapCat.Framework.Windows.Once.zip
draft: true
build-docker:
needs: release-napcat
runs-on: ubuntu-latest
steps:
- name: Dispatch Docker Build
- name: Compress subdirectories
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.NAPCAT_BUILD }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/NapNeko/NapCat-Docker/actions/workflows/docker-publish.yml/dispatches \
-d '{"ref": "main"}'
cd ./NapCat.Shell/
zip -q -r NapCat.Shell.zip *
cd ..
cd ./NapCat.Framework/
zip -q -r NapCat.Framework.zip *
cd ..
rm ./NapCat.Shell.zip -rf
rm ./NapCat.Framework.zip -rf
mv ./NapCat.Shell/NapCat.Shell.zip ./
mv ./NapCat.Framework/NapCat.Framework.zip ./
- name: Create Release Draft and Upload Artifacts
uses: softprops/action-gh-release@v1
with:
name: NapCat
token: ${{ secrets.GITHUB_TOKEN }}
body: Automated release artifact (no version detection)
files: |
NapCat.Framework.zip
NapCat.Shell.zip
draft: true

115
.vscode/launch.json vendored
View File

@@ -1,115 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "dev:shell",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev:shell"
]
},
{
"type": "node",
"request": "launch",
"name": "build:shell",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"build:shell"
]
},
{
"type": "node",
"request": "launch",
"name": "build:universal",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"build:universal"
]
},
{
"type": "node",
"request": "launch",
"name": "build:framework",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"build:framework"
]
},
{
"type": "node",
"request": "launch",
"name": "build:webui",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"build:webui"
]
},
{
"type": "node",
"request": "launch",
"name": "dev:universal",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev:universal"
]
},
{
"type": "node",
"request": "launch",
"name": "dev:framework",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev:framework"
]
},
{
"type": "node",
"request": "launch",
"name": "dev:webui",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev:webui"
]
},
{
"type": "node",
"request": "launch",
"name": "lint",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"lint"
]
},
{
"type": "node",
"request": "launch",
"name": "depend",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"depend"
]
},
{
"type": "node",
"request": "launch",
"name": "dev:depend",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev:depend"
]
}
]
}

35
.vscode/settings.json vendored
View File

@@ -1,37 +1,2 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
".env.universal": ".env.*",
"vite.config.ts": "vite*.ts",
"README.md": "CODE_OF_CONDUCT.md, RELEASES.md, CONTRIBUTING.md, CHANGELOG.md, SECURITY.md",
"tsconfig.json": "tsconfig.*.json, env.d.ts",
"package.json": "package-lock.json, eslint*, .prettier*, .editorconfig, manifest.json, logo.png, .gitignore, LICENSE"
},
"css.customData": [
".vscode/tailwindcss.json"
],
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.formatOnType": false,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
"files.autoSave": "onFocusChange",
"javascript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single",
"javascript.format.semicolons": "insert",
"typescript.format.semicolons": "insert",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
"typescript.format.insertSpaceAfterConstructor": true,
"javascript.format.insertSpaceAfterConstructor": true,
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"javascript.preferences.importModuleSpecifier": "non-relative",
"javascript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.disableAutomaticTypeAcquisition": true,
}

View File

@@ -1,55 +0,0 @@
{
"version": 1.1,
"atDirectives": [
{
"name": "@tailwind",
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
}
]
},
{
"name": "@apply",
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that youd like to extract to a new component.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
}
]
},
{
"name": "@responsive",
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
}
]
},
{
"name": "@screen",
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
}
]
},
{
"name": "@variants",
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
}
]
}
]
}

View File

@@ -1,52 +0,0 @@
import neostandard from 'neostandard';
/** 尾随逗号 */
const commaDangle = val => {
if (val?.rules?.['@stylistic/comma-dangle']?.[0] === 'warn') {
const rule = val?.rules?.['@stylistic/comma-dangle']?.[1];
Object.keys(rule).forEach(key => {
rule[key] = 'always-multiline';
});
val.rules['@stylistic/comma-dangle'][1] = rule;
}
/** 三元表达式 */
if (val?.rules?.['@stylistic/indent']) {
val.rules['@stylistic/indent'][2] = {
...val.rules?.['@stylistic/indent']?.[2],
flatTernaryExpressions: true,
offsetTernaryExpressions: false,
};
}
/** 支持下划线 - 禁用 camelcase 规则 */
if (val?.rules?.camelcase) {
val.rules.camelcase = 'off';
}
/** 未使用的变量强制报错 */
if (val?.rules?.['@typescript-eslint/no-unused-vars']) {
val.rules['@typescript-eslint/no-unused-vars'] = ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
}];
}
return val;
};
/** 忽略的文件 */
const ignores = [
'node_modules',
'**/dist/**',
'launcher',
];
const options = neostandard({
ts: true,
ignores,
semi: true, // 强制使用分号
}).map(commaDangle);
export default options;

Binary file not shown.

BIN
external/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 KiB

After

Width:  |  Height:  |  Size: 250 KiB

File diff suppressed because it is too large Load Diff

8223
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,77 +2,20 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.9.30",
"version": "4.9.42",
"scripts": {
"build:universal": "npm run build:webui && npm run dev:universal || exit 1",
"build:framework": "npm run build:webui && npm run dev:framework || exit 1",
"build:shell": "npm run build:webui && npm run dev:shell || exit 1",
"build:webui": "cd napcat.webui && npm run build",
"dev:universal": "vite build --mode universal",
"dev:framework": "vite build --mode framework",
"dev:shell": "vite build --mode shell",
"dev:shell-analysis": "vite build --mode shell-analysis",
"dev:webui": "cd napcat.webui && npm run dev",
"tsc": "npm run tsc:webui && npm run tsc:core",
"tsc:core": "tsc --noEmit",
"tsc:webui": "cd napcat.webui && tsc --noEmit",
"lint": "npm run lint:core && npm run lint:webui",
"lint:fix": "npm run lint:fix:core && npm run lint:fix:webui",
"lint:core": "eslint src/**/*",
"lint:fix:core": "eslint --fix src/**/*",
"lint:webui": "cd napcat.webui && eslint src/**/*",
"lint:fix:webui": "cd napcat.webui && eslint --fix src/**/*",
"depend": "cd dist && npm install --omit=dev",
"dev:depend": "npm i && cd napcat.webui && npm i",
"test:winshell": "pwsh ./tests/nodeTest.ps1"
"build:shell": "pnpm --filter napcat-shell run build || exit 1",
"build:framework": "pnpm --filter napcat-framework run build || exit 1",
"build:webui": "pnpm --filter napcat-webui-frontend run build || exit 1"
},
"devDependencies": {
"@babel/core": "^7.28.0",
"@babel/generator": "^7.28.0",
"@babel/parser": "^7.28.0",
"@babel/preset-typescript": "^7.24.7",
"@babel/traverse": "^7.28.0",
"@babel/types": "^7.28.2",
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
"@log4js-node/log4js-api": "^1.0.2",
"@napneko/nap-proto-core": "^0.0.4",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-typescript": "^12.1.4",
"@sinclair/typebox": "^0.34.38",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/multer": "^1.4.12",
"@types/node": "^22.0.1",
"@types/on-finished": "^2.3.4",
"@types/qrcode-terminal": "^0.12.2",
"@types/react-color": "^3.0.13",
"@types/type-is": "^1.6.7",
"@types/ws": "^8.5.12",
"ajv": "^8.13.0",
"async-mutex": "^0.5.0",
"commander": "^13.0.0",
"compressing": "^1.10.1",
"cors": "^2.8.5",
"esbuild": "0.25.8",
"eslint": "^9.14.0",
"express-rate-limit": "^7.5.0",
"fast-xml-parser": "^4.3.6",
"file-type": "^21.0.0",
"fs-extra": "^11.3.2",
"json5": "^2.2.3",
"multer": "^2.0.1",
"napcat.protobuf": "^1.1.4",
"neostandard": "^0.12.2",
"typescript": "^5.3.3",
"typescript-eslint": "^8.35.1",
"vite": "^7.1.1",
"vite-plugin-cp": "^6.0.0",
"vite-tsconfig-paths": "^5.1.0",
"winston": "^3.17.0"
"@rollup/plugin-node-resolve": "^16.0.3",
"vite": "^6.4.1",
"vite-plugin-cp": "^6.0.3"
},
"dependencies": {
"express": "^5.0.0",
"silk-wasm": "^3.6.1",
"express": "^5.0.0",
"ws": "^8.18.3"
}
}

View File

@@ -0,0 +1,31 @@
{
"name": "napcat-common",
"version": "0.0.1",
"private": true,
"type": "module",
"main": "src/index.ts",
"exports": {
".": {
"import": "./src/index.ts"
},
"./src/*": {
"import": "./src/*"
}
},
"dependencies": {
"compressing": "^1.10.1",
"json5": "^2.2.3",
"ajv": "^8.13.0",
"file-type": "^21.0.0",
"napcat-image-size": "workspace:*",
"napcat-core": "workspace:*",
"silk-wasm": "^3.6.1",
"winston": "^3.17.0"
},
"devDependencies": {
"@types/node": "^22.0.1"
},
"engines": {
"node": ">=18.0.0"
}
}

View File

@@ -2,9 +2,9 @@ import fsPromise from 'fs/promises';
import path from 'node:path';
import { randomUUID } from 'crypto';
import { EncodeResult, getDuration, getWavFileInfo, isSilk, isWav } from 'silk-wasm';
import { LogWrapper } from '@/common/log';
import { EncodeArgs } from '@/common/audio-worker';
import { FFmpegService } from '@/common/ffmpeg';
import { LogWrapper } from '@/napcat-common/log';
import { EncodeArgs } from '@/napcat-common/audio-worker';
import { FFmpegService } from '@/napcat-common/ffmpeg';
import { runTask } from './worker';
import { fileURLToPath } from 'node:url';

View File

@@ -1,6 +1,6 @@
import path from 'node:path';
import fs from 'node:fs';
import type { NapCatCore } from '@/core';
import type { NapCatCore } from 'napcat-core';
import json5 from 'json5';
import Ajv, { AnySchema, ValidateFunction } from 'ajv';

View File

@@ -1,6 +1,6 @@
import { NodeIQQNTWrapperSession } from '@/core/wrapper';
import { NodeIQQNTWrapperSession } from '@/napcat-core/wrapper';
import { randomUUID } from 'crypto';
import { ListenerNamingMapping, ServiceNamingMapping } from '@/core';
import { ListenerNamingMapping, ServiceNamingMapping } from '@/napcat-core';
interface InternalMapKey {
timeout: number;

View File

@@ -66,7 +66,7 @@ export class FFmpegAddonAdapter implements IFFmpegAdapter {
*/
async getVideoInfo (videoPath: string): Promise<VideoInfoResult> {
const addon = this.ensureAddon();
const info = await addon.getVideoInfo(videoPath, 'bmp24');
const info = await addon.getVideoInfo(videoPath);
let format = info.format.includes(',') ? info.format.split(',')[0] ?? info.format : info.format;
console.log('[FFmpegAddonAdapter] Detected format:', format);

View File

@@ -8,7 +8,7 @@ import { dirname, join } from 'path';
import { execFile } from 'child_process';
import { promisify } from 'util';
import { fileTypeFromFile } from 'file-type';
import { imageSizeFallBack } from '@/image-size';
import { imageSizeFallBack } from 'napcat-image-size/src/index';
import { downloadFFmpegIfNotExists } from './download-ffmpeg';
import { LogWrapper } from './log';
import type { IFFmpegAdapter, VideoInfoResult } from './ffmpeg-adapter-interface';

View File

@@ -1,4 +1,4 @@
import { Peer } from '@/core';
import { Peer } from '@/napcat-core';
import { randomUUID } from 'crypto';
class TimeBasedCache<K, V> {

View File

@@ -2,7 +2,7 @@ import fs from 'fs';
import { stat } from 'fs/promises';
import crypto, { randomUUID } from 'crypto';
import path from 'node:path';
import { solveProblem } from '@/common/helper';
import { solveProblem } from '@/napcat-common/helper';
export interface HttpDownloadOptions {
url: string;

View File

@@ -1,5 +1,5 @@
import * as crypto from 'node:crypto';
import { PacketMsg } from '@/core/packet/message/message';
import { PacketMsg } from '@/napcat-core/packet/message/message';
interface ForwardMsgJson {
app: string

View File

@@ -1,7 +1,7 @@
import path from 'node:path';
import fs from 'fs';
import os from 'node:os';
import { QQLevel } from '@/core';
import { QQLevel } from '@/napcat-core';
import { QQVersionConfigType } from './types';
export async function solveProblem<T extends (...arg: any[]) => any> (func: T, ...args: Parameters<T>): Promise<ReturnType<T> | undefined> {

View File

@@ -1,8 +1,8 @@
import winston, { format, transports } from 'winston';
import { truncateString } from '@/common/helper';
import { truncateString } from './helper';
import path from 'node:path';
import fs from 'node:fs/promises';
import { NTMsgAtType, ChatType, ElementType, MessageElement, RawMessage, SelfInfo } from '@/core';
import { NTMsgAtType, ChatType, ElementType, MessageElement, RawMessage, SelfInfo } from 'napcat-core/index';
import EventEmitter from 'node:events';
export enum LogLevel {
DEBUG = 'debug',

View File

@@ -1,4 +1,4 @@
import { Peer } from '@/core';
import { Peer } from '@/napcat-core';
import crypto from 'crypto';
export class LimitedHashTable<K, V> {

View File

@@ -1,4 +1,4 @@
import { LogWrapper } from '@/common/log';
import { LogWrapper } from '@/napcat-common/log';
export function proxyHandlerOf (logger: LogWrapper) {
return {

View File

@@ -1,9 +1,9 @@
import fs from 'node:fs';
import { systemPlatform } from '@/common/system';
import { systemPlatform } from '@/napcat-common/system';
import { getDefaultQQVersionConfigInfo, getQQPackageInfoPath, getQQVersionConfigPath, parseAppidFromMajor } from './helper';
import AppidTable from '@/core/external/appid.json';
import { LogWrapper } from '@/common/log';
import { getMajorPath } from '@/core';
import AppidTable from 'napcat-core/external/appid.json';
import { LogWrapper } from '@/napcat-common/log';
import { getMajorPath } from 'napcat-core';
import { QQAppidTableType, QQPackageInfoType, QQVersionConfigType } from './types';
export class QQBasicInfoWrapper {

View File

@@ -0,0 +1 @@
export const napCatVersion = '4.9.42';

View File

@@ -1,35 +1,20 @@
{
"compilerOptions": {
"target": "ES2021",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": [
"ES2021",
"DOM",
"DOM.Iterable"
],
"skipLibCheck": true,
"moduleResolution": "Node",
"experimentalDecorators": true,
"allowImportingTsExtensions": false,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"lib": [
"ES2021"
],
"typeRoots": [
"./node_modules/@types"
],
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src",
"noEmit": false,
"sourceMap": true,
"paths": {
"@/*": [
"./src/*"
],
"@webapi/*": [
"./src/webui/src/*"
]
},
"strict": true,
"noImplicitAny": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
@@ -38,23 +23,31 @@
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": false, //
"exactOptionalPropertyTypes": false,
"forceConsistentCasingInFileNames": true,
"useUnknownInCatchVariables": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"useDefineForClassFields": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"baseUrl": ".",
"paths": {
"@/napcat-common/*": [
"src/*"
]
},
"skipLibCheck": true,
"skipDefaultLibCheck": true
},
"include": [
"!@homebridge/node-pty-prebuilt-multiarch/src/eventEmitter2.ts",
"!@homebridge/node-pty-prebuilt-multiarch/src/terminal.ts",
"!@napneko/nap-proto-core/NapProto.ts",
"src/**/*.ts",
"src/**/*.ts"
],
"exclude": [
"node_modules",
"node_modules/**/*",
"node_modules/@homebridge/node-pty-prebuilt-multiarch/src/eventEmitter2.ts",
"node_modules/@homebridge/node-pty-prebuilt-multiarch/src/terminal.ts",
"node_modules/@napneko/nap-proto-core/NapProto.ts"
"dist"
]
}

View File

@@ -0,0 +1,27 @@
import { MsfChangeReasonType, MsfStatusType } from '@/napcat-core/types/adapter';
export class NodeIDependsAdapter {
onMSFStatusChange (_statusType: MsfStatusType, _changeReasonType: MsfChangeReasonType) {
}
onMSFSsoError (_args: unknown) {
}
getGroupCode (_args: unknown) {
}
// onSendMsfReply (_seq: string, _cmd: string, _uk1: number, _uk2: string, _rsp: {
// ssoRetCode: 0,
// trpcRetCode: 0,
// trpcFuncCode: 0,
// errorMsg: '',
// pbBuffer: Uint8Array,
// transInfoMap: Map<unknown, unknown>;
// }) {
// console.log('[NodeIDependsAdapter] onSendMsfReply', _seq, _cmd, _uk1, _uk2, Buffer.from(_rsp.pbBuffer).toString('hex'));
// }
}

View File

@@ -1,4 +1,4 @@
import { InstanceContext, NapCatCore } from '@/core';
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
export class NTQQCollectionApi {
context: InstanceContext;

View File

@@ -11,30 +11,30 @@ import {
SendPicElement,
SendPttElement,
SendVideoElement,
} from '@/core/types';
} from '@/napcat-core/types';
import path from 'path';
import fs from 'fs';
import fsPromises from 'fs/promises';
import { InstanceContext, NapCatCore, SearchResultItem } from '@/core';
import { InstanceContext, NapCatCore, SearchResultItem } from '@/napcat-core/index';
import { fileTypeFromFile } from 'file-type';
import { RkeyManager } from '@/core/helper/rkey';
import { calculateFileMD5 } from '@/common/file';
import { RkeyManager } from '@/napcat-core/helper/rkey';
import { calculateFileMD5 } from 'napcat-common/src/file';
import pathLib from 'node:path';
import { defaultVideoThumbB64 } from '@/common/video';
import { encodeSilk } from '@/common/audio';
import { SendMessageContext } from '@/onebot/api';
import { defaultVideoThumbB64 } from 'napcat-common/src/video';
import { encodeSilk } from 'napcat-common/src/audio';
import { SendMessageContext } from 'napcat-onebot/api/msg';
import { getFileTypeForSendType } from '../helper/msg';
import { FFmpegService } from '@/common/ffmpeg';
import { FFmpegService } from 'napcat-common/src/ffmpeg';
import { rkeyDataType } from '../types/file';
import { NapProtoMsg } from '@napneko/nap-proto-core';
import { FileId } from '../packet/transformer/proto/misc/fileid';
import { imageSizeFallBack } from '@/image-size';
import { imageSizeFallBack } from 'napcat-image-size';
export class NTQQFileApi {
context: InstanceContext;
core: NapCatCore;
rkeyManager: RkeyManager;
packetRkey: Array<{ rkey: string; time: number; type: number; ttl: bigint }> | undefined;
packetRkey: Array<{ rkey: string; time: number; type: number; ttl: bigint; }> | undefined;
private fetchRkeyFailures: number = 0;
private readonly MAX_RKEY_FAILURES: number = 8;
@@ -45,7 +45,7 @@ export class NTQQFileApi {
'http://ss.xingzhige.com/music_card/rkey',
'https://secret-service.bietiaop.com/rkeys',
],
this.context.logger
this.context.logger
);
}
@@ -360,9 +360,9 @@ export class NTQQFileApi {
m.elements
.filter(element =>
element.elementType === ElementType.PIC ||
element.elementType === ElementType.VIDEO ||
element.elementType === ElementType.PTT ||
element.elementType === ElementType.FILE
element.elementType === ElementType.VIDEO ||
element.elementType === ElementType.PTT ||
element.elementType === ElementType.FILE
)
.map(element =>
this.downloadMedia(m.msgId, m.chatType, m.peerUid, element.elementId, '', '', 1000 * 60 * 2, true)
@@ -376,9 +376,9 @@ export class NTQQFileApi {
m.elements.forEach(element => {
if (
element.elementType === ElementType.PIC ||
element.elementType === ElementType.VIDEO ||
element.elementType === ElementType.PTT ||
element.elementType === ElementType.FILE
element.elementType === ElementType.VIDEO ||
element.elementType === ElementType.PTT ||
element.elementType === ElementType.FILE
) {
switch (element.elementType) {
case ElementType.PIC:

View File

@@ -1,6 +1,6 @@
import { FriendRequest, FriendV2 } from '@/core/types';
import { BuddyListReqType, InstanceContext, NapCatCore } from '@/core';
import { LimitedHashTable } from '@/common/message-unique';
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 {
context: InstanceContext;

View File

@@ -12,11 +12,11 @@ import {
ShutUpGroupMember,
Peer,
ChatType,
} from '@/core';
import { isNumeric, solveAsyncProblem } from '@/common/helper';
import { LimitedHashTable } from '@/common/message-unique';
import { NTEventWrapper } from '@/common/event';
import { CancelableTask, TaskExecutor } from '@/common/cancel-task';
} from '@/napcat-core/index';
import { isNumeric, solveAsyncProblem } from 'napcat-common/src/helper';
import { LimitedHashTable } from 'napcat-common/src/message-unique';
import { NTEventWrapper } from 'napcat-common/src/event';
import { CancelableTask, TaskExecutor } from 'napcat-common/src/cancel-task';
import { createGroupDetailInfoV2Param, createGroupExtFilter, createGroupExtInfo } from '../data';
export class NTQQGroupApi {

View File

@@ -1,6 +1,6 @@
import { ChatType, GetFileListParam, Peer, RawMessage, SendMessageElement, SendStatusType } from '@/core/types';
import { GroupFileInfoUpdateItem, InstanceContext, NapCatCore, NodeIKernelMsgService } from '@/core';
import { GeneralCallResult } from '@/core/services/common';
import { ChatType, GetFileListParam, Peer, RawMessage, SendMessageElement, SendStatusType } from '@/napcat-core/types';
import { GroupFileInfoUpdateItem, InstanceContext, NapCatCore, NodeIKernelMsgService } from '@/napcat-core/index';
import { GeneralCallResult } from '@/napcat-core/services/common';
export class NTQQMsgApi {
context: InstanceContext;

View File

@@ -1,9 +1,9 @@
import * as os from 'os';
import offset from '@/core/external/napi2native.json';
import { InstanceContext, NapCatCore } from '@/core';
import { LogWrapper } from '@/common/log';
import { PacketClientSession } from '@/core/packet/clientSession';
import { napCatVersion } from '@/common/version';
import offset from '@/napcat-core/external/napi2native.json';
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
import { LogWrapper } from 'napcat-common/src/log';
import { PacketClientSession } from '@/napcat-core/packet/clientSession';
import { napCatVersion } from 'napcat-common/src/version';
interface OffsetType {
[key: string]: {

View File

@@ -1,4 +1,4 @@
import { InstanceContext, NapCatCore } from '@/core';
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
export class NTQQSystemApi {
context: InstanceContext;

View File

@@ -1,8 +1,8 @@
import { ModifyProfileParams, User, UserDetailSource } from '@/core/types';
import { RequestUtil } from '@/common/request';
import { ModifyProfileParams, User, UserDetailSource } from '@/napcat-core/types';
import { RequestUtil } from 'napcat-common/src/request';
import { InstanceContext, NapCatCore, ProfileBizType } from '..';
import { solveAsyncProblem } from '@/common/helper';
import { Fallback, FallbackUtil } from '@/common/fall-back';
import { solveAsyncProblem } from 'napcat-common/src/helper';
import { Fallback, FallbackUtil } from 'napcat-common/src/fall-back';
export class NTQQUserApi {
context: InstanceContext;

View File

@@ -1,4 +1,4 @@
import { RequestUtil } from '@/common/request';
import { RequestUtil } from 'napcat-common/src/request';
import {
GroupEssenceMsgRet,
InstanceContext,
@@ -6,7 +6,7 @@ import {
WebApiGroupMemberRet,
WebApiGroupNoticeRet,
WebHonorType, NapCatCore,
} from '@/core';
} from '@/napcat-core/index';
import { createReadStream, readFileSync, statSync } from 'node:fs';
import { createHash } from 'node:crypto';

View File

@@ -454,5 +454,17 @@
"6.9.83-41857": {
"appid": 537320186,
"qua": "V1_MAC_NQ_6.9.83_41857_GW_B"
},
"3.2.21-42086": {
"appid": 537320248,
"qua": "V1_LNX_NQ_3.2.21_42086_GW_B"
},
"9.9.23-42086": {
"appid": 537320212,
"qua": "V1_WIN_NQ_9.9.23_42086_GW_B"
},
"6.9.85-42086": {
"appid": 537320237,
"qua": "V1_MAC_NQ_6.9.85_42086_GW_B"
}
}

View File

@@ -78,5 +78,17 @@
"9.9.23-41857-x64": {
"send": "0A01394",
"recv": "1D1C4F9"
},
"9.9.23-42086-x64": {
"send": "0A01814",
"recv": "1D1C9B9"
},
"6.9.85-42086-arm64": {
"send": "23B0330",
"recv": "0957648"
},
"3.2.21-42086-x64": {
"send": "5B42CF0",
"recv": "2FDA6F0"
}
}

View File

@@ -590,5 +590,17 @@
"3.2.21-41857-arm64": {
"send": "6B159F8",
"recv": "6B19388"
},
"9.9.23-42086-x64": {
"send": "2C99800",
"recv": "2C9CD80"
},
"3.2.21-42086-x64": {
"send": "A7B1060",
"recv": "A7B4AE0"
},
"3.2.21-42086-arm64": {
"send": "6B13038",
"recv": "6B169C8"
}
}

View File

@@ -1,5 +1,5 @@
import { ConfigBase } from '@/common/config-base';
import { NapCatCore } from '@/core';
import { ConfigBase } from 'napcat-common/src/config-base';
import { NapCatCore } from '@/napcat-core/index';
import { Type, Static } from '@sinclair/typebox';
import { AnySchema } from 'ajv';

View File

@@ -1,5 +1,5 @@
import { LogWrapper } from '@/common/log';
import { RequestUtil } from '@/common/request';
import { LogWrapper } from 'napcat-common/src/log';
import { RequestUtil } from 'napcat-common/src/request';
interface ServerRkeyData {
group_rkey: string;

View File

@@ -6,8 +6,8 @@ import {
NTQQSystemApi,
NTQQUserApi,
NTQQWebApi,
} from '@/core/apis';
import { NTQQCollectionApi } from '@/core/apis/collection';
} from '@/napcat-core/apis';
import { NTQQCollectionApi } from '@/napcat-core/apis/collection';
import {
NodeIQQNTWrapperSession,
NodeQQNTWrapperUtil,
@@ -15,26 +15,26 @@ import {
VendorType,
WrapperNodeApi,
WrapperSessionInitConfig,
} from '@/core/wrapper';
import { LogLevel, LogWrapper } from '@/common/log';
import { NodeIKernelLoginService } from '@/core/services';
import { QQBasicInfoWrapper } from '@/common/qq-basic-info';
import { NapCatPathWrapper } from '@/common/path';
} from '@/napcat-core/wrapper';
import { LogLevel, LogWrapper } from 'napcat-common/src/log';
import { NodeIKernelLoginService } from '@/napcat-core/services';
import { QQBasicInfoWrapper } from 'napcat-common/src/qq-basic-info';
import { NapCatPathWrapper } from 'napcat-common/src/path';
import path from 'node:path';
import fs from 'node:fs';
import { hostname, systemName, systemVersion } from '@/common/system';
import { NTEventWrapper } from '@/common/event';
import { KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/core/types';
import { NapCatConfigLoader, NapcatConfigSchema } from '@/core/helper/config';
import { hostname, systemName, systemVersion } from 'napcat-common/src/system';
import { NTEventWrapper } from 'napcat-common/src/event';
import { KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/napcat-core/types';
import { NapCatConfigLoader, NapcatConfigSchema } from '@/napcat-core/helper/config';
import os from 'node:os';
import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/core/listeners';
import { proxiedListenerOf } from '@/common/proxy-handler';
import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/napcat-core/listeners';
import { proxiedListenerOf } from 'napcat-common/src/proxy-handler';
import { NTQQPacketApi } from './apis/packet';
import { NativePacketHandler } from './packet/handler/client';
export * from './wrapper';
export * from './types';
export * from './services';
export * from './listeners';
export * from './types/index';
export * from './services/index';
export * from './listeners/index';
export enum NapCatCoreWorkingEnv {
Unknown = 0,

View File

@@ -1,4 +1,4 @@
import { BuddyCategoryType, FriendRequestNotify } from '@/core/types';
import { BuddyCategoryType, FriendRequestNotify } from '@/napcat-core/types';
export type OnBuddyChangeParams = BuddyCategoryType[];

View File

@@ -1,4 +1,4 @@
import { DataSource, Group, GroupDetailInfo, GroupListUpdateType, GroupMember, GroupNotify, ShutUpGroupMember } from '@/core/types';
import { DataSource, Group, GroupDetailInfo, GroupListUpdateType, GroupMember, GroupNotify, ShutUpGroupMember } from '@/napcat-core/types';
export class NodeIKernelGroupListener {
onGroupListInited (_listEmpty: boolean): any { }

View File

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

View File

@@ -1,4 +1,4 @@
import { User, UserDetailInfoListenerArg } from '@/core/types';
import { User, UserDetailInfoListenerArg } from '@/napcat-core/types';
export class NodeIKernelProfileListener {
onUserDetailInfoChanged (_arg: UserDetailInfoListenerArg): void {

View File

@@ -1,4 +1,4 @@
import { ChatType, RawMessage } from '@/core';
import { ChatType, RawMessage } from '@/napcat-core/index';
export interface SearchGroupInfo {
groupCode: string;
ownerUid: string;

View File

@@ -0,0 +1,31 @@
{
"name": "napcat-core",
"version": "0.0.1",
"private": true,
"type": "module",
"main": "index.ts",
"exports": {
".": {
"import": "./index.ts"
},
"./*": {
"import": "./*"
}
},
"dependencies": {
"@protobuf-ts/runtime": "^2.11.1",
"@napneko/nap-proto-core": "^0.0.4",
"ajv": "^8.13.0",
"@sinclair/typebox": "^0.34.38",
"file-type": "^21.0.0",
"napcat-image-size": "workspace:*",
"napcat-common": "workspace:*",
"napcat-onebot": "workspace:*"
},
"devDependencies": {
"@types/node": "^22.0.1"
},
"engines": {
"node": ">=18.0.0"
}
}

View File

@@ -2,10 +2,10 @@ import path, { dirname } from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs';
import { constants } from 'node:os';
import { LogStack } from '@/core/packet/context/clientContext';
import { NapCoreContext } from '@/core/packet/context/napCoreContext';
import { PacketLogger } from '@/core/packet/context/loggerContext';
import { OidbPacket, PacketBuf } from '@/core/packet/transformer/base';
import { LogStack } from '@/napcat-core/packet/context/clientContext';
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
import { OidbPacket, PacketBuf } from '@/napcat-core/packet/transformer/base';
export interface RecvPacket {
type: string, // 仅recv
data: RecvPacketData;
@@ -71,7 +71,7 @@ export class NativePacketClient {
if (!rsp) {
this.napcore
.sendSsoCmdReqByContend(cmd, data)
.catch(err =>
.catch((err: any) =>
this.logger.error(
`[PacketClient] sendPacket 无响应命令发送失败 cmd=${cmd} err=${err}`
)

View File

@@ -1,5 +1,5 @@
import { PacketContext } from '@/core/packet/context/packetContext';
import { NapCatCore } from '@/core';
import { PacketContext } from '@/napcat-core/packet/context/packetContext';
import { NapCatCore } from '@/napcat-core/index';
export class PacketClientSession {
private readonly context: PacketContext;

View File

@@ -1,7 +1,7 @@
import { NativePacketClient } from '@/core/packet/client/nativeClient';
import { OidbPacket } from '@/core/packet/transformer/base';
import { PacketLogger } from '@/core/packet/context/loggerContext';
import { NapCoreContext } from '@/core/packet/context/napCoreContext';
import { NativePacketClient } from '@/napcat-core/packet/client/nativeClient';
import { OidbPacket } from '@/napcat-core/packet/transformer/base';
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
export class LogStack {
private stack: string[] = [];

View File

@@ -1,5 +1,5 @@
import { LogLevel, LogWrapper } from '@/common/log';
import { NapCoreContext } from '@/core/packet/context/napCoreContext';
import { LogLevel, LogWrapper } from 'napcat-common/src/log';
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
// TODO: check bind?
export class PacketLogger {

View File

@@ -1,4 +1,4 @@
import { NapCatCore } from '@/core';
import { NapCatCore } from '@/napcat-core/index';
export interface NapCoreCompatBasicInfo {
readonly requireMinNTQQBuild: (buildVer: string) => boolean;

Some files were not shown because too many files have changed in this diff Show More