fix apps/bot build
Some checks failed
Build & Deploy Web & Bot / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Web & Bot / Deploy to VPS (push) Has been cancelled

This commit is contained in:
vchikalkin 2025-07-02 19:55:15 +03:00
parent ecc7b44d6d
commit 7a3dd4688b
5 changed files with 699 additions and 126 deletions

View File

@ -1,7 +1,9 @@
import { reactConfig } from '@repo/eslint-config/react-internal'; import { typescript } from '@repo/eslint-config/typescript';
/** @type {import("eslint").Linter.Config} */ /** @type {import("eslint").Linter.Config} */
export default [ export default [
...reactConfig, ...typescript,
{
ignores: ['**/types/**', '*.config.*'],
},
]; ];

View File

@ -2,30 +2,29 @@
"name": "bot", "name": "bot",
"version": "0.0.0", "version": "0.0.0",
"type": "module", "type": "module",
"main": "index.js", "main": "dist/index.js",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "rimraf ./build & tsc -p tsconfig.json", "build": "tsup",
"build:watch": "tsc -w -p tsconfig.json",
"start": "node dist/src/index.js",
"dev": "dotenv -e ../../.env.local tsx watch src/index.ts", "dev": "dotenv -e ../../.env.local tsx watch src/index.ts",
"start": "node dist/index.cjs",
"lint": "eslint", "lint": "eslint",
"lint-staged": "lint-staged" "lint-staged": "lint-staged"
}, },
"dependencies": { "dependencies": {
"@repo/graphql": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "catalog:",
"telegraf": "catalog:", "telegraf": "catalog:",
"tsup": "^8.5.0",
"typescript": "catalog:",
"zod": "catalog:" "zod": "catalog:"
}, },
"devDependencies": { "devDependencies": {
"@repo/eslint-config": "workspace:*", "@repo/eslint-config": "workspace:*",
"@repo/graphql": "workspace:*",
"@repo/lint-staged-config": "workspace:*", "@repo/lint-staged-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "catalog:",
"dotenv-cli": "catalog:", "dotenv-cli": "catalog:",
"lint-staged": "catalog:", "lint-staged": "catalog:",
"rimraf": "catalog:", "tsx": "^4.19.2"
"tsx": "^4.19.2",
"typescript": "catalog:"
} }
} }

View File

@ -5,12 +5,12 @@
"outDir": "dist", "outDir": "dist",
"alwaysStrict": true, "alwaysStrict": true,
"strict": true, "strict": true,
"moduleResolution": "bundler", "moduleResolution": "Node",
"module": "ES2020", "module": "CommonJS",
"paths": { "paths": {
"@/*": ["./*"] "@/*": ["./*"]
} }
}, },
"include": [".", "../../packages/graphql/config", "../../packages/graphql/utils", "../../packages/graphql/apollo", "../../packages/graphql/api"], "include": ["."],
"exclude": ["dist", "build", "node_modules"] "exclude": ["dist", "build", "node_modules"]
} }

16
apps/bot/tsup.config.js Normal file
View File

@ -0,0 +1,16 @@
import { defineConfig } from 'tsup';
export default defineConfig({
bundle: true,
clean: true,
entry: ['./src/index.ts'],
external: ['telegraf', 'zod'],
format: 'cjs',
loader: { '.json': 'copy' },
minify: true,
noExternal: ['@repo'],
outDir: './dist',
sourcemap: false,
splitting: false,
target: 'es2022',
});

776
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff