@prisma/cli-dev 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +13 -10
package/dist/index.js CHANGED
@@ -1,2 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{runMain as n}from"citty";import{defineCommand as o}from"citty";var e="0.0.0";var t=o({meta:{description:"Spin up a local Prisma Postgres database",name:"dev",version:e},run:async()=>{console.log("coming soon")}});function l(s){n(t,{rawArgs:s})}export{l as run};
2
+ import{runMain as l}from"citty";import{unstable_startServer as p}from"@prisma/dev";import{defineCommand as d}from"citty";var o="0.0.2";var i=d({meta:{description:"Spin up a local Prisma Postgres database",name:"dev",version:o},args:{"db-port":{alias:"P",default:"5432",description:"Port the database server will listen on. Defaults to 5432",required:!1,type:"string"},debug:{default:!1,description:"Enable debug logging",required:!1,type:"boolean"},port:{alias:"p",default:"5433",description:"Main port the server will listen on. Defaults to 5433",required:!1,type:"string"}},run:async e=>{let{args:t}=e,s=Number(t.port),r=Number(t["db-port"]);if(isNaN(s)||isNaN(r))return console.error("Invalid port number provided. Please provide a valid port number."),process.exit(1);if(s===r)return console.error("The accelerate port and database port cannot be the same. Please provide different port numbers."),process.exit(1);console.log(`Starting Prisma Dev...
3
+ `);let n=await p({acceleratePort:s,databasePort:r,debug:t.debug});console.log(`Great Success!
4
+ `),console.log(`To connect to your local Prisma Postgres database via Prisma ORM, use the following connection string:
5
+
6
+ DATABASE_URL="${n.ppg.url}"
7
+ `),await new Promise(()=>{})}});function y(e){l(i,{rawArgs:e})}export{y as run};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/cli-dev",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "description": "Dev CLI for Prisma",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -17,13 +17,6 @@
17
17
  "default": "./dist/index.js"
18
18
  }
19
19
  },
20
- "scripts": {
21
- "build": "tsup",
22
- "check:exports": "attw . --pack",
23
- "lint": "eslint --fix .",
24
- "test": "",
25
- "typecheck": "tsc --noEmit"
26
- },
27
20
  "keywords": [
28
21
  "cli",
29
22
  "prisma",
@@ -38,11 +31,21 @@
38
31
  ],
39
32
  "devDependencies": {
40
33
  "@arethetypeswrong/cli": "0.17.4",
34
+ "@types/node": "22.3.0",
41
35
  "tsup": "8.0.2",
42
36
  "typescript": "5.8.3",
43
37
  "vitest": "3.1.3"
44
38
  },
45
39
  "dependencies": {
46
- "citty": "0.1.6"
40
+ "citty": "0.1.6",
41
+ "@prisma/dev": "0.0.3"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup",
45
+ "check:exports": "attw . --pack --profile esm-only",
46
+ "dev": "tsup --watch",
47
+ "lint": "eslint --fix .",
48
+ "test": "",
49
+ "typecheck": "tsc --noEmit"
47
50
  }
48
- }
51
+ }