mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:21:10 +02:00
fix(cards-database): add .js extensions to relative imports for NodeNext
Package uses moduleResolution: NodeNext which requires explicit .js extensions on relative ESM imports. Without these, prepare/build failed and broke pnpm install for the whole monorepo. The implicit-any errors on (table) callbacks were cascading from the broken imports — they resolve once the modules import correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e974761e8a
commit
b9fdf0802f
9 changed files with 30 additions and 30 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { uuid, text, varchar, timestamp, jsonb, index, pgEnum } from 'drizzle-orm/pg-core';
|
||||
import { relations } from 'drizzle-orm';
|
||||
import { cardsSchema } from './schema';
|
||||
import { decks } from './decks';
|
||||
import { cardsSchema } from './schema.js';
|
||||
import { decks } from './decks.js';
|
||||
|
||||
// AI generation status enum
|
||||
export const aiGenerationStatusEnum = pgEnum('ai_generation_status', [
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import {
|
|||
unique,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
import { relations } from 'drizzle-orm';
|
||||
import { cardsSchema } from './schema';
|
||||
import { cards } from './cards';
|
||||
import { cardsSchema } from './schema.js';
|
||||
import { cards } from './cards.js';
|
||||
|
||||
// Progress status enum (SM-2 algorithm states)
|
||||
export const progressStatusEnum = pgEnum('progress_status', [
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import {
|
|||
pgEnum,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
import { relations } from 'drizzle-orm';
|
||||
import { cardsSchema } from './schema';
|
||||
import { decks } from './decks';
|
||||
import { cardProgress } from './cardProgress';
|
||||
import { cardsSchema } from './schema.js';
|
||||
import { decks } from './decks.js';
|
||||
import { cardProgress } from './cardProgress.js';
|
||||
|
||||
// Card type enum
|
||||
export const cardTypeEnum = pgEnum('card_type', ['text', 'flashcard', 'quiz', 'mixed']);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { uuid, text, date, integer, decimal, timestamp, index, unique } from 'drizzle-orm/pg-core';
|
||||
import { cardsSchema } from './schema';
|
||||
import { cardsSchema } from './schema.js';
|
||||
|
||||
export const dailyProgress = cardsSchema.table(
|
||||
'daily_progress',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {
|
|||
jsonb,
|
||||
index,
|
||||
} from 'drizzle-orm/pg-core';
|
||||
import { cardsSchema } from './schema';
|
||||
import { cardsSchema } from './schema.js';
|
||||
|
||||
// Template data structure
|
||||
export interface DeckTemplateData {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { uuid, text, varchar, boolean, timestamp, jsonb, index } from 'drizzle-orm/pg-core';
|
||||
import { relations } from 'drizzle-orm';
|
||||
import { cardsSchema } from './schema';
|
||||
import { cards } from './cards';
|
||||
import { studySessions } from './studySessions';
|
||||
import { aiGenerations } from './aiGenerations';
|
||||
import { cardsSchema } from './schema.js';
|
||||
import { cards } from './cards.js';
|
||||
import { studySessions } from './studySessions.js';
|
||||
import { aiGenerations } from './aiGenerations.js';
|
||||
|
||||
export const decks = cardsSchema.table(
|
||||
'decks',
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
// Export schema definition
|
||||
export * from './schema';
|
||||
export * from './schema.js';
|
||||
|
||||
// Export all schemas
|
||||
export * from './decks';
|
||||
export * from './cards';
|
||||
export * from './studySessions';
|
||||
export * from './cardProgress';
|
||||
export * from './deckTemplates';
|
||||
export * from './aiGenerations';
|
||||
export * from './userStats';
|
||||
export * from './dailyProgress';
|
||||
export * from './decks.js';
|
||||
export * from './cards.js';
|
||||
export * from './studySessions.js';
|
||||
export * from './cardProgress.js';
|
||||
export * from './deckTemplates.js';
|
||||
export * from './aiGenerations.js';
|
||||
export * from './userStats.js';
|
||||
export * from './dailyProgress.js';
|
||||
|
||||
// Re-export relations for use with Drizzle query builder
|
||||
export { decksRelations } from './decks';
|
||||
export { cardsRelations } from './cards';
|
||||
export { studySessionsRelations } from './studySessions';
|
||||
export { cardProgressRelations } from './cardProgress';
|
||||
export { aiGenerationsRelations } from './aiGenerations';
|
||||
export { decksRelations } from './decks.js';
|
||||
export { cardsRelations } from './cards.js';
|
||||
export { studySessionsRelations } from './studySessions.js';
|
||||
export { cardProgressRelations } from './cardProgress.js';
|
||||
export { aiGenerationsRelations } from './aiGenerations.js';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { uuid, text, integer, timestamp, index, pgEnum } from 'drizzle-orm/pg-core';
|
||||
import { relations } from 'drizzle-orm';
|
||||
import { cardsSchema } from './schema';
|
||||
import { decks } from './decks';
|
||||
import { cardsSchema } from './schema.js';
|
||||
import { decks } from './decks.js';
|
||||
|
||||
// Study mode enum
|
||||
export const studyModeEnum = pgEnum('study_mode', ['all', 'new', 'review', 'favorites', 'random']);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { text, integer, decimal, date, timestamp, index } from 'drizzle-orm/pg-core';
|
||||
import { cardsSchema } from './schema';
|
||||
import { cardsSchema } from './schema.js';
|
||||
|
||||
export const userStats = cardsSchema.table(
|
||||
'user_stats',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue