mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-04 06:31:13 +00:00
Add dev config and copy-env build script
Add development config files and wiring to include them in the shell build. Creates packages/napcat-develop/config/.env and packages/napcat-develop/config/onebot11.json, adds a root script `build🐚config` that builds napcat-shell and then runs napcat-develop's `copy-env` script. Update packages/napcat-develop/package.json to add the `copy-env` script (uses xcopy to copy config into the napcat-shell dist), tidy exports and metadata. This ensures dev configuration is packaged into napcat-shell during the build process.
This commit is contained in:
parent
cc8891b6a1
commit
ff93aa3dc7
@ -14,7 +14,8 @@
|
|||||||
"test": "pnpm --filter napcat-test run test",
|
"test": "pnpm --filter napcat-test run test",
|
||||||
"test:ui": "pnpm --filter napcat-test run test:ui",
|
"test:ui": "pnpm --filter napcat-test run test:ui",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix"
|
"lint:fix": "eslint . --fix",
|
||||||
|
"build:shell:config": "pnpm --filter napcat-shell run build && pnpm --filter napcat-develop run copy-env"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||||
|
|||||||
4
packages/napcat-develop/config/.env
Normal file
4
packages/napcat-develop/config/.env
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
NAPCAT_DISABLE_PIPE=1
|
||||||
|
NAPCAT_DISABLE_MULTI_PROCESS=1
|
||||||
|
NAPCAT_WEBUI_JWT_SECRET_KEY=napcat_dev_secret_key
|
||||||
|
NAPCAT_WEBUI_SECRET_KEY=napcat
|
||||||
39
packages/napcat-develop/config/onebot11.json
Normal file
39
packages/napcat-develop/config/onebot11.json
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"network": {
|
||||||
|
"httpServers": [
|
||||||
|
{
|
||||||
|
"enable": true,
|
||||||
|
"name": "HTTP",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 3000,
|
||||||
|
"enableCors": true,
|
||||||
|
"enableWebsocket": false,
|
||||||
|
"messagePostFormat": "array",
|
||||||
|
"token": "",
|
||||||
|
"debug": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"httpSseServers": [],
|
||||||
|
"httpClients": [],
|
||||||
|
"websocketServers": [
|
||||||
|
{
|
||||||
|
"enable": true,
|
||||||
|
"name": "WebSocket",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 3001,
|
||||||
|
"reportSelfMessage": false,
|
||||||
|
"enableForcePushEvent": true,
|
||||||
|
"messagePostFormat": "array",
|
||||||
|
"token": "",
|
||||||
|
"debug": false,
|
||||||
|
"heartInterval": 30000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"websocketClients": [],
|
||||||
|
"plugins": []
|
||||||
|
},
|
||||||
|
"musicSignUrl": "",
|
||||||
|
"enableLocalFile2Url": false,
|
||||||
|
"parseMultMsg": false,
|
||||||
|
"imageDownloadProxy": ""
|
||||||
|
}
|
||||||
@ -5,7 +5,8 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "powershell ./nodeTest.ps1"
|
"dev": "powershell ./nodeTest.ps1",
|
||||||
|
"copy-env": "xcopy config ..\\napcat-shell\\dist\\config /E /I /Y"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user