feat: add initial project configuration and smoke tests
- Created pnpm workspace configuration to manage packages. - Added a placeholder .gitkeep file in the scripts directory. - Implemented a smoke test script to validate core API and web endpoints. - Established TypeScript base configuration for consistent compilation settings. - Introduced Turbo configuration for task management and build processes.
This commit is contained in:
20
packages/shared/package.json
Normal file
20
packages/shared/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "@davinci/shared",
|
||||
"version": "0.1.0-alpha.0",
|
||||
"description": "Davinci Platform — shared types, DTOs, and constants",
|
||||
"author": "Galaxis",
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"test": "vitest run",
|
||||
"test:unit": "vitest run",
|
||||
"test:cov": "vitest run --coverage"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.0",
|
||||
"vitest": "^3.0.0"
|
||||
}
|
||||
}
|
||||
9
packages/shared/src/__tests__/index.test.ts
Normal file
9
packages/shared/src/__tests__/index.test.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { APP_NAME } from '../index.js';
|
||||
|
||||
describe('@davinci/shared', () => {
|
||||
it('exports APP_NAME constant', () => {
|
||||
expect(APP_NAME).toBeDefined();
|
||||
expect(APP_NAME).toBe('Davinci Platform');
|
||||
});
|
||||
});
|
||||
1
packages/shared/src/constants/index.ts
Normal file
1
packages/shared/src/constants/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const APP_NAME = 'Davinci Platform';
|
||||
1
packages/shared/src/index.ts
Normal file
1
packages/shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { APP_NAME } from './constants/index.js';
|
||||
11
packages/shared/tsconfig.json
Normal file
11
packages/shared/tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"declaration": true,
|
||||
"composite": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["dist", "node_modules", "**/*.test.ts"]
|
||||
}
|
||||
8
packages/shared/vitest.config.ts
Normal file
8
packages/shared/vitest.config.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user