This commit converts the entire Xget application from a Cloudflare Worker to a Cloudflare Page, enabling static asset hosting while maintaining all existing functionality. Changes: - Add functions/[[path]].js: Catch-all Pages Function handler - Add public/index.html: Landing page with Xget information - Update src/index.js: Export handleRequest for Pages Function import - Update wrangler.toml: Configure for Pages deployment - Update package.json: Change scripts to use Pages commands - Update vitest.config.js: Include functions/ in coverage - Update .github/workflows/depoly.yml: Deploy to Pages - Update documentation: CLAUDE.md, README.md, README.en.md The conversion maintains full backward compatibility with existing tests and functionality. All caching strategies, security headers, and protocol handling remain unchanged.
35 lines
1.0 KiB
JSON
35 lines
1.0 KiB
JSON
{
|
|
"dependencies": {
|
|
"express": "^4.19.2",
|
|
"xget": "file:"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/vitest-pool-workers": "^0.8.71",
|
|
"@cloudflare/workers-types": "^4.20250724.0",
|
|
"eslint": "^9.31.0",
|
|
"prettier": "^3.6.2",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^3.1.4",
|
|
"wrangler": "^4.26.0"
|
|
},
|
|
"name": "xget",
|
|
"private": false,
|
|
"scripts": {
|
|
"deploy": "wrangler pages deploy",
|
|
"dev": "wrangler pages dev public --compatibility-flags=nodejs_compat",
|
|
"format": "prettier --write src/ test/ functions/ *.js *.json",
|
|
"format:check": "prettier --check src/ test/ functions/ *.js *.json",
|
|
"lint": "eslint src/ test/ functions/",
|
|
"lint:fix": "eslint src/ test/ functions/ --fix",
|
|
"start": "wrangler pages dev public --compatibility-flags=nodejs_compat",
|
|
"test": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:run": "vitest run",
|
|
"test:ui": "vitest --ui",
|
|
"test:watch": "vitest --watch",
|
|
"type-check": "tsc --noEmit"
|
|
},
|
|
"type": "module",
|
|
"version": "1.0.0"
|
|
}
|