- 17301 新增 printer.printPdf:接收波次/平台/订单结构,逐张串行静默打印 - printer 必传(请求参数或波次/平台/订单字段),纸张按 pdfPrint.papers 匹配打印机 - 内置 SumatraPDF 3.6.1 便携版,extraResources 随包分发;仅 win32,录制模式拒绝 - wsServer 广播 printer.pdfPrintProgress(仅本机客户端,不串到远端通道) - build.ps1 新增 Ensure-ElectronNativeModules,修复 better-sqlite3 ABI 与 Electron 不匹配导致打包后后端起不来 - 版本 1.0.41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
114 lines
3.3 KiB
JSON
114 lines
3.3 KiB
JSON
{
|
|
"name": "printserver",
|
|
"version": "1.0.41",
|
|
"main": "electron/main.cjs",
|
|
"scripts": {
|
|
"start": "node index.js",
|
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
"dev": "chcp 65001 > nul && nodemon index.js",
|
|
"desktop:dev": "chcp 65001 > nul && electron .",
|
|
"start:linux": "node index.js",
|
|
"postinstall": "node -e \"process.env.npm_config_omit!=='dev'&&process.exit(0);require('child_process').execSync('npx @electron/rebuild -f -w better-sqlite3',{stdio:'inherit'})\"",
|
|
"package:clean": "powershell -NoProfile -File build.ps1 clean",
|
|
"package:prepare": "powershell -NoProfile -File build.ps1 prepare",
|
|
"package:app": "powershell -NoProfile -File build.ps1 app",
|
|
"package:win": "powershell -NoProfile -File build.ps1 win",
|
|
"package": "powershell -NoProfile -File build.ps1 package",
|
|
"release:linux": "powershell -NoProfile -File scripts/deploy-linux.ps1 -ConfigPath scripts/deploy.config.json",
|
|
"release:linux:local": "powershell -NoProfile -File scripts/deploy-linux.ps1 -ConfigPath scripts/deploy.config.local.json"
|
|
},
|
|
"author": "LFMR",
|
|
"license": "ISC",
|
|
"description": "Windows local print service with HTTP, WebSocket, tray shell and printer component integration",
|
|
"dependencies": {
|
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
"@xmldom/xmldom": "^0.9.10",
|
|
"@zxing/library": "^0.23.0",
|
|
"better-sqlite3": "^12.11.1",
|
|
"exceljs": "^4.4.0",
|
|
"iconv-lite": "^0.7.2",
|
|
"onvif": "^0.8.1",
|
|
"ws": "^8.19.0",
|
|
"zxing-wasm": "^3.1.5"
|
|
},
|
|
"optionalDependencies": {
|
|
"node-windows": "^1.0.0-beta.8"
|
|
},
|
|
"devDependencies": {
|
|
"electron": "^37.2.0",
|
|
"electron-builder": "^26.0.12",
|
|
"nodemon": "^3.0.0",
|
|
"rimraf": "^6.0.1"
|
|
},
|
|
"type": "module",
|
|
"build": {
|
|
"appId": "com.gztbyc.printserver",
|
|
"productName": "打印电脑服务",
|
|
"directories": {
|
|
"output": "dist"
|
|
},
|
|
"asarUnpack": [
|
|
"node_modules/@ffmpeg-installer/**/*"
|
|
],
|
|
"files": [
|
|
"electron/**/*",
|
|
"core/**/*",
|
|
"services/**/*",
|
|
"utils/**/*",
|
|
"views/**/*",
|
|
"db/**/*",
|
|
"index.js",
|
|
"package.json",
|
|
"!electron/assets/icon-gray.svg",
|
|
"!config.json",
|
|
"!临时/**/*",
|
|
"!开发日志/**/*",
|
|
"!day.log",
|
|
"!.vscode/**/*"
|
|
],
|
|
"extraResources": [
|
|
{
|
|
"from": "config.packaged.json",
|
|
"to": "config.json"
|
|
},
|
|
{
|
|
"from": "electron/assets/printserver.ico",
|
|
"to": "printserver.ico"
|
|
},
|
|
"printer.ps1",
|
|
{
|
|
"from": "frpc",
|
|
"to": "frpc"
|
|
},
|
|
{
|
|
"from": "SumatraPDF",
|
|
"to": "SumatraPDF"
|
|
}
|
|
],
|
|
"win": {
|
|
"icon": "electron/assets/printserver.ico",
|
|
"executableName": "printServer",
|
|
"signAndEditExecutable": false,
|
|
"target": [
|
|
{
|
|
"target": "nsis",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
}
|
|
],
|
|
"artifactName": "printServer-${version}-setup.${ext}"
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true,
|
|
"installerIcon": "electron/assets/printserver.ico",
|
|
"uninstallerIcon": "electron/assets/printserver.ico",
|
|
"createDesktopShortcut": false,
|
|
"createStartMenuShortcut": false,
|
|
"include": "electron/nsis-shortcuts.nsh",
|
|
"shortcutName": "打印电脑服务"
|
|
}
|
|
}
|
|
}
|