Add esbuild production bundle and multi-stage slim Docker image.
Bundle server (and mcp entry) into a single JS file with deps inlined, minify UI into one HTML, and ship only dist/ in the runtime image.
This commit is contained in:
26
package.json
26
package.json
@@ -1,15 +1,19 @@
|
||||
{
|
||||
"name": "webshare-api",
|
||||
"version": "1.0.0",
|
||||
"description": "Webshare.cz HTTP API: Torznab indexer, fake qBittorrent client, and MCP server for AI agents",
|
||||
"main": "src/index.js",
|
||||
"description": "Webshare.cz HTTP API: Torznab indexer, fake qBittorrent client, Web UI, and MCP server for AI agents",
|
||||
"main": "dist/server.js",
|
||||
"bin": {
|
||||
"webshare-mcp": "src/mcp.js"
|
||||
"webshare-mcp": "dist/mcp.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node src/index.js",
|
||||
"mcp": "node src/mcp.js",
|
||||
"test": "jest --coverage --runInBand"
|
||||
"build": "node scripts/build.mjs",
|
||||
"start": "node dist/server.js",
|
||||
"start:dev": "node src/index.js",
|
||||
"mcp": "node dist/mcp.js",
|
||||
"mcp:dev": "node src/mcp.js",
|
||||
"test": "jest --coverage --runInBand",
|
||||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
@@ -23,7 +27,15 @@
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"jest": "^30.4.2",
|
||||
"supertest": "^7.2.2"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src",
|
||||
"ui",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user