diff --git a/Procfile b/Procfile index a9472b4a3..50704083e 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: node lib/index.js +web: node lib/index.ts diff --git a/package.json b/package.json index ab26db487..8b19f02c9 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,9 @@ "lib" ], "scripts": { - "build:all": "npm run build && npm run build:radar && npm run build:maintainer", + "build:all": "npm run build:radar && npm run build:maintainer", "build:maintainer": "node scripts/workflow/build-maintainer.js", "build:radar": "node scripts/workflow/build-radar.js", - "build": "tsc", "dev": "cross-env NODE_ENV=dev tsx watch lib/index.ts", "format": "eslint --cache --fix \"**/*.{ts,js,yml}\" && node website/docs/.format/format.mjs && prettier \"**/*.{ts,js,json}\" --write", "format:check": "eslint --cache \"**/*.{ts,js,yml}\" && prettier \"**/*.{ts,js,json}\" --check", @@ -33,8 +32,8 @@ "jest:watch": "cross-env NODE_ENV=test jest --watch", "lint": "eslint --cache .", "prepare": "husky || true", - "profiling": "NODE_ENV=production node --prof lib/index.js", - "start": "node lib/index.js", + "profiling": "NODE_ENV=production tsx --prof lib/index.ts", + "start": "tsx lib/index.ts", "test": "npm run format:check && npm run jest:coverage" }, "lint-staged": { diff --git a/process.json b/process.json index 0f94fc3fb..e305903a7 100644 --- a/process.json +++ b/process.json @@ -2,7 +2,7 @@ "apps": [ { "name": "rsshub", - "script": "lib/index.js", + "script": "lib/index.ts", "instances": "max", "exec_mode": "cluster", "env": { diff --git a/scripts/docker/minify-docker.js b/scripts/docker/minify-docker.js index 3504afaf1..f40d1c81e 100644 --- a/scripts/docker/minify-docker.js +++ b/scripts/docker/minify-docker.js @@ -6,7 +6,7 @@ const { nodeFileTrace } = require('@vercel/nft'); const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(__dirname, '../..')); const resultFolder = path.join(projectRoot, 'app-minimal'); // no need to resolve, ProjectRoot is always absolute -const files = ['lib/index.js', 'api/vercel.js'].map((file) => path.join(projectRoot, file)); +const files = ['lib/index.ts', 'api/vercel.js'].map((file) => path.join(projectRoot, file)); (async () => { console.log('Start analyzing, project root:', projectRoot);