Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vangie opened this issue Apr 4, 2024 · 1 comment
Open
Assignees
Labels

Comments

@vangie
Copy link
Contributor

vangie commented Apr 4, 2024

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

@vangie vangie added the 🐛 bug label Apr 4, 2024
@vangie vangie changed the title [BUG] repository's d.ts missing after running 'npm run prisma:generate' [BUG] Missing repository's d.ts after running 'npm run prisma:generate' Apr 4, 2024
@Romakita
Copy link
Collaborator

Romakita commented Jul 8, 2024

seems to be fixed now :D @vangie

@Romakita Romakita moved this from To do to Done in Global Board Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants