feat: add core package

Add @puaros/core package with TypeScript configuration, Vitest test setup, and package structure
This commit is contained in:
imfozilbek
2025-11-23 21:19:44 +05:00
parent 5e9477cd21
commit ba6ffb197c
4 changed files with 100 additions and 0 deletions

13
packages/core/.gitignore vendored Normal file
View File

@@ -0,0 +1,13 @@
# Build output
dist/
*.tsbuildinfo
# Dependencies
node_modules/
# Test coverage
coverage/
# Logs
*.log
npm-debug.log*

View File

@@ -0,0 +1,39 @@
{
"name": "@puaros/core",
"version": "0.0.1",
"private": true,
"description": "Core business logic for Puaros",
"keywords": [
"puaros"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "Fozilbek Samiyev <fozilbek.samiyev@gmail.com>",
"license": "MIT",
"scripts": {
"build": "tsc",
"watch": "tsc --watch",
"clean": "rm -rf dist",
"test": "vitest",
"test:ui": "vitest --ui",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage",
"test:run": "vitest run"
},
"dependencies": {
"simple-git": "^3.30.0",
"tree-sitter": "^0.21.1",
"tree-sitter-javascript": "^0.23.0",
"tree-sitter-typescript": "^0.23.0",
"uuid": "^13.0.0"
},
"devDependencies": {
"@types/ioredis": "^5.0.0",
"@types/node": "^22.10.7",
"@types/uuid": "^11.0.0",
"@vitest/coverage-v8": "^4.0.10",
"@vitest/ui": "^4.0.10",
"typescript": "^5.7.3",
"vitest": "^4.0.10"
}
}

View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"target": "ES2023",
"module": "CommonJS",
"moduleResolution": "node",
"declaration": true,
"declarationMap": true,
"composite": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"skipLibCheck": true,
"sourceMap": true,
"baseUrl": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"]
}

View File

@@ -0,0 +1,28 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
test: {
globals: true,
environment: 'node',
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/*.test.ts',
'**/*.spec.ts',
'**/tests/**',
],
thresholds: {
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
},
},
});