feat: Implement Tarot session management and reading spreads

- Added TarotSessionManager class to manage tarot reading sessions, including session creation, retrieval, reading addition, and cleanup of old sessions.
- Defined various tarot spreads in a new spreads module, including single card, three card, Celtic cross, and more, with detailed descriptions and meanings for each position.
- Created core types for tarot cards, readings, and sessions in a new types module to structure data effectively.
- Configured TypeScript settings in tsconfig.json for improved development experience and compatibility.
This commit is contained in:
Morax
2025-07-28 20:29:58 +08:00
commit cfe75ffb2b
26 changed files with 15491 additions and 0 deletions

22
jest.config.js Normal file
View File

@@ -0,0 +1,22 @@
export default {
preset: 'ts-jest/presets/default-esm',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.test.ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
useESM: true,
}],
},
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.test.ts',
'!src/**/__tests__/**',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
};