Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nx-tools/nx-prisma

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx-tools/nx-prisma

This builder provides a wrapper around the [Prisma CLI](https://www.npmjs.com/package/@prisma/cli)

  • 2.0.0-alpha.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-4.83%
Maintainers
1
Weekly downloads
 
Created
Source

@nx-tools/nx-prisma

This builder provides a wrapper around the Prisma CLI

Getting started

Configuration

The first step is configure the builder in your angular.json or workspace.json. You will need at least one project per each prisma schema you make. The prisma schemas can be in already existing backend/frontend projects OR in their own libraries. Each CLI command uses it's own architect so add the ones you need from the examples bellow.

"deploy": {
  "builder": "@nx-tools/nx-prisma:generate",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"generate": {
  "builder": "@nx-tools/nx-prisma:generate",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"migrate": {
  "builder": "@nx-tools/nx-prisma:migrate",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"pull": {
  "builder": "@nx-tools/nx-prisma:rollback",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"push": {
  "builder": "@nx-tools/nx-prisma:seed",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"reset": {
  "builder": "@nx-tools/nx-prisma:seed",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
},
"seed": {
  "builder": "@nx-tools/nx-prisma:seed",
  "options": {
    "script": "apps/examples/prisma/data/seed.ts",
    "tsConfig": "apps/examples/prisma/tsconfig.tools.json"
  }
},
"status": {
  "builder": "@nx-tools/nx-prisma:seed",
  "options": {
    "schema": "apps/api/schema.prisma"
  }
}

Note that the options use absolute paths to where your configuration files live in your repository.

Usage

Once your angular.json or workspace.json is configured you can run the commands using the the Angular/NX CLI.

nx <architect> <project>
# OR
ng <architect> <project>
# ie
nx migrations prisma

FAQs

Package last updated on 02 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc