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.
34 lines
768 B
JavaScript
34 lines
768 B
JavaScript
import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config';
|
|
|
|
export default defineWorkersConfig({
|
|
test: {
|
|
poolOptions: {
|
|
workers: {
|
|
wrangler: { configPath: './wrangler.toml' }
|
|
}
|
|
},
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json', 'html', 'lcov'],
|
|
reportsDirectory: './coverage',
|
|
exclude: [
|
|
'node_modules/**',
|
|
'test/**',
|
|
'coverage/**',
|
|
'dist/**',
|
|
'*.config.js',
|
|
'*.config.ts'
|
|
],
|
|
include: ['src/**/*.js', 'src/**/*.ts', 'functions/**/*.js', 'functions/**/*.ts'],
|
|
thresholds: {
|
|
global: {
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80,
|
|
statements: 80
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|