@prisma/cli-dev 0.0.0-dev.202510101255 → 0.0.0-dev.202510101311
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.
- package/dist/chunk-D5MRRGDK.js +12 -0
- package/dist/chunk-XOIFSEIB.js +2 -0
- package/dist/chunk-ZKMEOIRF.js +2 -0
- package/dist/index.js +18 -100
- package/dist/list-K5DAVLAS.js +3 -0
- package/dist/remove-6QJTZ5SK.js +9 -0
- package/dist/stop-CRL2UWAK.js +5 -0
- package/package.json +10 -8
- package/dist/accelerate-6C2KDCGF.js +0 -164
- package/dist/chunk-6CY7FTXB.js +0 -12
- package/dist/chunk-7LVVKN3Q.js +0 -2
- package/dist/chunk-C743SY2X.js +0 -2
- package/dist/chunk-IUA2KLPR.js +0 -34
- package/dist/chunk-J2EYU3K5.js +0 -2
- package/dist/chunk-MKAOBCJL.js +0 -2
- package/dist/chunk-PKHPXFYF.js +0 -4
- package/dist/chunk-VMZVNK7U.js +0 -2
- package/dist/chunk-VN3SER5K.js +0 -2
- package/dist/chunk-WAQNVDRS.js +0 -15
- package/dist/chunk-ZZ7TGN5J.js +0 -2
- package/dist/client-ROT4AZYN.js +0 -2
- package/dist/dist-44BN73S3.js +0 -24
- package/dist/dist-FF6JPL3Y.js +0 -2
- package/dist/dist-OWTPHSRP.js +0 -2
- package/dist/http-exception-IXDDLQOJ.js +0 -2
- package/dist/list-AF7WT6HT.js +0 -5
- package/dist/logger-5NORX5VG.js +0 -2
- package/dist/nodefs-MQZB2OFY.js +0 -2
- package/dist/opfs-ahp-W7WVBYAH.js +0 -4
- package/dist/pg_dump-F2HW5KLY.js +0 -3
- package/dist/prompt-AVJG6SAC.js +0 -46
- package/dist/proxy-signals-TJILVQAL.js +0 -2
- package/dist/remove-BWVQMMM4.js +0 -9
- package/dist/stop-XM5K7ZMT.js +0 -5
- package/dist/tiny-4VNDEAK3.js +0 -2
- package/dist/utility-5QZDATLM.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-XOIFSEIB.js";import{ServerState as i}from"@prisma/dev/internal/state";import{defineCommand as m}from"citty";function o(t,n=t){return`\x1B]8;;${t.toString()}\x07${n.toString()}\x1B]8;;\x07`}import{consola as c}from"consola";import u from"table-layout";var l={...a},p={description:"List available servers",name:"ls"},U=m({args:l,meta:p,run:async t=>{let n=await i.scan({debug:t.args.debug}),e=new u([{name:s("name"),status:s("status"),urls:s("urls")},...n.map(r=>({name:r.name,status:r.status,urls:g(r)}))]);c.log(e.toString())}});function s(t){return`\x1B[1m${t}\x1B[0m`}function g(t){if(t.status!=="running")return"";let n=f(t),e=S(t),r=d(t);return[n?`${s("DATABASE_URL")}: ${n}`:null,e?`${s("TCP")}: ${e}`:null,r?`${s("Terminal")}: ${r}`:null].filter(Boolean).join(`
|
|
3
|
+
`)}function f(t){let{url:n}=t.exports?.ppg||{};if(!n)return"";let e=new URL(n),r=e.searchParams.get("api_key");return e.searchParams.set("api_key",`${r.slice(0,4)}...${r.slice(-4)}`),o(n,e)}function S(t){let{connectionString:n,prismaORMConnectionString:e}=t.exports?.database||{};if(!e&&!n)return"";let r=new URL(e||n);return o(r,`${r.protocol}//...@${r.host}/...`)}function d(t){let{connectionString:n,terminalCommand:e}=t.exports?.database||{};if(!n||!e)return"";let r=new URL(n);return o(e,`...psql -h ${r.hostname} -p ${r.port} ...`)}export{U as ListCommand};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as s,b as f}from"./chunk-D5MRRGDK.js";import{a as m,b as l,e}from"./chunk-ZKMEOIRF.js";import{a}from"./chunk-XOIFSEIB.js";import{deleteServer as u,isServerRunning as d,ServerState as C}from"@prisma/dev/internal/state";import{defineCommand as y}from"citty";import{consola as r}from"consola";import{process as c}from"std-env";var S={...a,force:{default:!1,description:"Stops any running servers before removing them. Default is `false`, which would fail the command if any server is running.",required:!1,type:"boolean"},name:{description:"Name(s)/pattern(s) of the server(s) to remove",required:!0,type:"positional",valueHint:"glob"}},h={description:"Remove servers",name:"rm"},P=y({args:S,meta:h,run:async n=>{let{debug:i,force:p,name:g}=n.args,v=g.split(","),o=await C.scan({debug:i,globs:v});if(o.length===0)return r.log(`\u26A0\uFE0F No ${e} servers found to remove.
|
|
3
|
+
`);if(!p&&o.some(d)){r.log(`\u{1F6AB} Some ${e} servers are currently running:
|
|
4
|
+
|
|
5
|
+
${s(o.filter(d))}
|
|
6
|
+
|
|
7
|
+
Use the ${l("--force")} flag to stop and remove them.`),c.exitCode||=1;return}if(r.log(`\u{1F5D1}\uFE0F Removing the following ${e} servers:
|
|
8
|
+
|
|
9
|
+
${s(o)}`),!await f({confirmationText:"i will lose local data",debug:n.args.debug}))return;(await Promise.allSettled(o.map(async t=>{await u(t,i),r.log(`\u{1F9F9} Removed ${e} server ${m(t.name)}.`)}))).some(t=>t.status==="rejected")&&(r.error(`Potentially failed to remove some ${e} servers.`),c.exitCode||=1),r.log("")}});export{P as RemoveCommand};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b as m}from"./chunk-D5MRRGDK.js";import{a as n,e}from"./chunk-ZKMEOIRF.js";import{a as i}from"./chunk-XOIFSEIB.js";import{isServerRunning as c,killServer as d,ServerState as g}from"@prisma/dev/internal/state";import{defineCommand as S}from"citty";import{consola as o}from"consola";var u={...i,name:{description:"Name(s)/pattern(s) of the server(s) to stop",required:!0,type:"positional",valueHint:"glob"}},v={description:"Stop servers",name:"stop"},D=S({args:u,meta:v,run:async p=>{let{debug:t,name:l}=p.args,f=l.split(","),s=(await g.scan({debug:t,globs:f})).filter(c);if(s.length===0)return o.log(`\u26A0\uFE0F No ${e} servers found to stop.
|
|
3
|
+
`);if(o.log(`\u26B0\uFE0F Stopping the following ${e} servers:
|
|
4
|
+
|
|
5
|
+
${a(s)}`),!await m({confirmationText:"i will interrupt sessions",debug:t}))return;(await Promise.allSettled(s.map(async r=>{await d(r,t),o.log(`\u{1F480} Stopped ${e} server ${n(r.name)}.`)}))).some(r=>r.status==="rejected")&&(o.error(`Potentially failed to stop some ${e} servers.`),process.exitCode||=1),o.log("")}});export{D as StopCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/cli-dev",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.202510101311",
|
|
4
4
|
"description": "Dev CLI for Prisma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,21 +31,23 @@
|
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@arethetypeswrong/cli": "0.18.1",
|
|
34
|
-
"@clack/core": "0.5.0",
|
|
35
34
|
"@prisma/config": "6.8.2",
|
|
36
35
|
"@types/node": "22.15.21",
|
|
37
|
-
"citty": "0.1.6",
|
|
38
|
-
"consola": "3.4.2",
|
|
39
|
-
"std-env": "3.9.0",
|
|
40
|
-
"table-layout": "4.1.1",
|
|
41
36
|
"tsup": "8.5.0",
|
|
42
37
|
"typescript": "5.8.3",
|
|
43
38
|
"vitest": "3.1.4",
|
|
44
|
-
"yocto-spinner": "1.0.0",
|
|
45
|
-
"@prisma/dev": "0.0.0-dev.202510101255",
|
|
46
39
|
"common-cli-utils": "^0.0.0",
|
|
47
40
|
"common-stuff": "^0.0.0"
|
|
48
41
|
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@clack/core": "0.5.0",
|
|
44
|
+
"citty": "0.1.6",
|
|
45
|
+
"consola": "3.4.2",
|
|
46
|
+
"std-env": "3.9.0",
|
|
47
|
+
"table-layout": "4.1.1",
|
|
48
|
+
"yocto-spinner": "1.0.0",
|
|
49
|
+
"@prisma/dev": "0.0.0-dev.202510101311"
|
|
50
|
+
},
|
|
49
51
|
"scripts": {
|
|
50
52
|
"build": "tsup",
|
|
51
53
|
"check:exports": "attw . --pack --profile esm-only",
|