Registry / devops / prisma-repo

prisma-repo

JSON →
library0.3.12jsnpmunverified

CLI tool that generates repository pattern classes for Prisma ORM models. v0.3.12 is the last version on the original package, which has been moved to @krsbx/prisma-repo (see warnings). The tool creates abstract base repositories with static methods, configurable via repository.setting files (JSON, JS, TS). Supports Express request extension (conflicts with multer/file). This package is now deprecated in favor of the renamed successor. No updates since move.

npm install prisma-repo
INSTALL
IMPORT
SIG · PRISMA-REPO
P
prisma-repo
devopsjavascriptv0.3.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PrismaRepoConfig
✓ import { PrismaRepoConfig } from 'prisma-repo'
TypeScript type import for config file.
BaseRepository
✓ import { BaseRepository } from 'prisma-repo'
✗ Cannot import from a generated file; BaseRepository is generated inside the project.
BaseRepository is generated by the CLI into the configured repository path.
prisma-repo (CLI)
✓ npx prisma-repo --repositories
CLI usage, not a code import. Generates repository files. Use via npx or as devDependency.

Install prisma-repo, generate repositories, and use the generated UserRepository with PrismaClient.

npm install -D prisma-repo npx prisma-repo --repositories # Generated files in src/repository/ # Then in your service: import { PrismaClient } from '@prisma/client'; import { UserRepository } from './repository/user.repository'; const prisma = new PrismaClient(); const userRepo = UserRepository(prisma); const user = await userRepo.findUnique({ where: { id: 1 } }); console.log(user);
Debug
Known issues
deprecatedPackage renamed to @krsbx/prisma-repo. The original package is no longer maintained.
fix
Use @krsbx/prisma-repo instead. Migrate your config and imports.
affects: >=0.0.0
breakingBreaking change from function-based to class-based API in v0.3.0. Generated code changed significantly.
fix
Follow the new abstract class pattern with static methods. Refer to the README for migration.
affects: >=0.3.0 <0.3.0
gotchaextendExpress option can conflict with other Express middleware like multer (reserved 'file'/'files'). Also conflicts with Prisma's 'include' option types.
fix
Avoid extendExpress or restrict include/exclude arrays to only model names that do not conflict.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'prisma-repo'
Package is not installed in node_modules
fix
Run 'npm install -D prisma-repo' to install it as a devDependency.
The 'repositoryPath' directory does not exist
Configured path in repository.setting does not exist
fix
Create the directory before running the CLI, or change repositoryPath to an existing directory.
Cannot read property 'repositoryPath' of undefined
Invalid or missing config file
fix
Ensure repository.setting.json/js/ts exists in the project root with proper format.
Upgrade
Version history
0.3.12latest on npm
Audit
Dependencies
prismarequiredPrisma ORM is required for generated repositories to work
Agent activity
2 hits · last 30 days
node
2
Resources
prisma-repo — npm install prisma-repo · libregistry