Skip to content

[BUG] Missing repository's d.ts after running 'npm run prisma:generate'Β #2659

Open
@vangie

Description

Describe the bug

After running 'npm run prisma:generate' , files generated in following folder
./node_modules/@tsed/prisma/lib/cjs/.schema

❯ tree .
.
β”œβ”€β”€ client
β”‚   β”œβ”€β”€ index.d.ts
β”‚   └── index.js
β”œβ”€β”€ enums
β”‚   β”œβ”€β”€ index.d.ts
β”‚   └── index.js
β”œβ”€β”€ index.d.ts
β”œβ”€β”€ index.js
β”œβ”€β”€ interfaces
β”‚   β”œβ”€β”€ index.d.ts
β”‚   └── index.js
β”œβ”€β”€ models
β”‚   β”œβ”€β”€ JobModel.d.ts
β”‚   β”œβ”€β”€ JobModel.js
β”‚   β”œβ”€β”€ PlanModel.d.ts
β”‚   β”œβ”€β”€ PlanModel.js
β”‚   β”œβ”€β”€ index.d.ts
β”‚   └── index.js
β”œβ”€β”€ repositories
β”‚   β”œβ”€β”€ JobsRepository.js
β”‚   β”œβ”€β”€ PlansRepository.js
β”‚   β”œβ”€β”€ index.d.ts
β”‚   └── index.js
└── services
    β”œβ”€β”€ PrismaService.d.ts
    └── PrismaService.js

JobsRepository.js and PlansRepository.js file do not have d.ts file

To Reproduce

My schema.prisma file content

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["postgresqlExtensions"]
}

generator tsed {
  provider = "tsed-prisma"
  module   = "esm"
}

datasource db {
  provider   = "postgresql"
  url        = env("DATABASE_URL")
  extensions = [vector]
}

model Job {
  id           String    @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
  babel_id     String    @db.Uuid
  babel_name   String    @db.VarChar(255)
  namespace_id String    @db.Uuid
  user_id      String    @db.Uuid
  title        String    @db.VarChar(255)
  content      String
  source       String    @db.VarChar(255)
  target       String    @db.VarChar(255)
  status       String    @db.VarChar(255)
  reason       String?   @db.VarChar(255)
  attachments  Json      @db.Json
  result       String?
  options      Json?     @db.Json
  metadata     Json?     @db.Json
  created_at   DateTime? @db.Timestamptz(6)
  created_by   String?   @db.VarChar(255)
  updated_at   DateTime? @db.Timestamptz(6)
  updated_by   String?   @db.VarChar(255)
  parent_id    String?   @db.Uuid
  plan         Plan?

  @@index([babel_id], map: "idx_job_babel_id")
  @@index([source], map: "idx_job_source")
  @@index([source, target, title], map: "idx_job_source_target_title")
  @@index([target], map: "idx_job_target")
  @@index([title], map: "idx_job_title")
  @@index([user_id], map: "idx_job_user_id")
  @@map("job")
}

model Plan {
  id         String    @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
  job_id     String    @unique @db.Uuid
  goals      String[]
  tasks      Json      @db.Json
  next_task  Int?
  metadata   Json?     @db.Json
  job        Job       @relation(fields: [job_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
  created_at DateTime? @db.Timestamptz(6)
  created_by String?   @db.VarChar(255)
  updated_at DateTime? @db.Timestamptz(6)
  updated_by String?   @db.VarChar(255)

  @@index([job_id], map: "idx_plan_job_id")
  @@map("plan")
}

Expected behavior

generate JobsRepository.d.ts and PlansRepository.d.ts

Code snippets

No response

Repository URL example

No response

OS

macOS 14.4.1 M1

Node version

v20.10.0

Library version

v7.67.4

Additional context

No response

Metadata

Assignees

Type

No type

Projects

  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions