mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 16:00:27 +00:00
Add napcat-develop package and update scripts
Introduces the napcat-develop package with its own package.json and tsconfig.json. Updates build and dev scripts in the root package.json, modifies loadNapCat.cjs to adjust paths and output directories, and updates nodeTest.ps1 to use the correct script path.
This commit is contained in:
@@ -18,9 +18,9 @@ if (versionFolders.length !== 1) {
|
||||
}
|
||||
|
||||
const BASE_DIR = path.join(versionsDir, versionFolders[0], 'resources', 'app');
|
||||
const TARGET_DIR = path.join(__dirname, 'run');
|
||||
const TARGET_DIR = path.join(__dirname, 'dist');
|
||||
const QQNT_FILE = path.join(__dirname, 'QQNT.dll');
|
||||
const NAPCAT_MJS_PATH = path.join(__dirname, '..', 'dist', 'napcat.mjs');
|
||||
const NAPCAT_MJS_PATH = path.join(__dirname, '..', 'napcat-shell','dist', 'napcat.mjs');
|
||||
|
||||
const itemsToCopy = [
|
||||
'avif_convert.dll',
|
||||
@@ -60,7 +60,7 @@ async function copyAll () {
|
||||
process.env.NAPCAT_QQ_PACKAGE_INFO_PATH = path.join(TARGET_DIR, 'package.json');
|
||||
process.env.NAPCAT_QQ_VERSION_CONFIG_PATH = path.join(TARGET_DIR, 'config.json');
|
||||
process.env.NAPCAT_DISABLE_PIPE = '1';
|
||||
process.env.NAPCAT_WORKDIR = path.join(__dirname, 'run');
|
||||
process.env.NAPCAT_WORKDIR = TARGET_DIR;
|
||||
|
||||
console.log('Loading NapCat module...');
|
||||
await import(pathToFileURL(NAPCAT_MJS_PATH).href);
|
||||
|
||||
@@ -5,4 +5,4 @@ $uninstall = $uninstall.Trim('"')
|
||||
$qqPath = Split-Path $uninstall -Parent
|
||||
|
||||
Write-Host "QQPath: $qqPath"
|
||||
node.exe "tests/loadNapCat.cjs" "$qqPath"
|
||||
node.exe "./loadNapCat.cjs" "$qqPath"
|
||||
|
||||
27
packages/napcat-develop/package.json
Normal file
27
packages/napcat-develop/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "napcat-develop",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.cjs",
|
||||
"scripts": {
|
||||
"dev": "powershell ./nodeTest.ps1"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./index.cjs"
|
||||
},
|
||||
"./*": {
|
||||
"require": "./*"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^11.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
49
packages/napcat-develop/tsconfig.json
Normal file
49
packages/napcat-develop/tsconfig.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2021",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"lib": [
|
||||
"ES2021"
|
||||
],
|
||||
"typeRoots": [
|
||||
"./node_modules/@types"
|
||||
],
|
||||
"esModuleInterop": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "./",
|
||||
"noEmit": false,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"strictFunctionTypes": true,
|
||||
"strictBindCallApply": true,
|
||||
"alwaysStrict": true,
|
||||
"noImplicitThis": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"useUnknownInCatchVariables": true,
|
||||
"noImplicitOverride": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"useDefineForClassFields": true,
|
||||
"experimentalDecorators": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"baseUrl": "./",
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": [
|
||||
"**/*.cjs"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user