@prisma/cli-dev 0.0.0-dev.202511112128 → 0.0.0-dev.202511120235
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/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m,b as d,c as T,e as g,f as S,g as R,h as U,i as H}from"./chunk-FT2LISIE.js";import{a as G,b,c as k,d as p,e as D,f as L}from"./chunk-4QNO2WQL.js";import{b as oe}from"./chunk-M6TFCQLD.js";import{unstable_startServer as lt}from"@prisma/dev";function j(e){let t,r,n=new Promise((i,c)=>{t=i,r=c}),s=i=>{s=a=null,r(i),e?.onRejected?.(i),e?.onFulfilled?.()},a=i=>{a=s=null,t(i),e?.onResolved?.(i),e?.onFulfilled?.()};return{isFulfilled:()=>a===s,promise:n,reject:i=>s?.(i),resolve:i=>a?.(i)}}var F="0.0.0-dev.
|
|
2
|
+
import{a as m,b as d,c as T,e as g,f as S,g as R,h as U,i as H}from"./chunk-FT2LISIE.js";import{a as G,b,c as k,d as p,e as D,f as L}from"./chunk-4QNO2WQL.js";import{b as oe}from"./chunk-M6TFCQLD.js";import{unstable_startServer as lt}from"@prisma/dev";function j(e){let t,r,n=new Promise((i,c)=>{t=i,r=c}),s=i=>{s=a=null,r(i),e?.onRejected?.(i),e?.onFulfilled?.()},a=i=>{a=s=null,t(i),e?.onResolved?.(i),e?.onFulfilled?.()};return{isFulfilled:()=>a===s,promise:n,reject:i=>s?.(i),resolve:i=>a?.(i)}}var F="0.0.0-dev.202511120235";var l={database:"db-port",server:"port",shadow_database:"shadow-db-port"},W={...L,[l.database]:{alias:"P",description:"Port number the database server will listen on.",required:!1,type:"string"},name:{alias:"n",default:"default",description:"Name of the server. Helps keep state isolated between different projects. Defaults to `default`.",required:!1,type:"string"},[l.server]:{alias:"p",description:"Main port number the Prisma Dev server will listen on.",required:!1,type:"string"},[l.shadow_database]:{description:"Port number the shadow database server will listen on.",required:!1,type:"string"}},se=/^[a-zA-Z0-9-_]+$/;function q(e){let{[l.server]:t,[l.database]:r,[l.shadow_database]:n,debug:s,name:a}=e.args,i=r?Number(r):void 0,c=t?Number(t):void 0,u=n?Number(n):void 0;return t&&Number.isNaN(c)?(console.error(`Invalid server port number provided. Please provide a valid port number in \`--${l.server}\`.`),process.exit(1)):r&&Number.isNaN(i)?(console.error(`Invalid database port number provided. Please provide a valid port number in \`--${l.database}\`.`),process.exit(1)):n&&Number.isNaN(u)?(console.error(`Invalid shadow database port number provided. Please provide a valid port number in \`--${l.shadow_database}\`.`),process.exit(1)):c!=null&&c===i?(console.error(`The server port and database port cannot be the same. Please provide different port numbers in \`--${l.server}\` and/or \`--${l.database}\`.`),process.exit(1)):i!=null&&i===u?(console.error(`The database port and shadow database port cannot be the same. Please provide different port numbers in \`--${l.database}\` and/or \`--${l.shadow_database}\`.`),process.exit(1)):c!=null&&c===u?(console.error(`The server port and shadow database port cannot be the same. Please provide different port numbers in \`--${l.server}\` and/or \`--${l.shadow_database}\`.`),process.exit(1)):se.test(a)?{databasePort:i,debug:s,name:a,serverPort:c,shadowDatabasePort:u}:(console.error("Invalid name provided. The name can only contain letters, numbers, dashes, and underscores. Please provide a valid name in `--name`."),process.exit(1))}import{PortNotAvailableError as pt,ServerAlreadyRunningError as ct}from"@prisma/dev";import{setTimeout as nt}from"timers/promises";import h from"process";import{stripVTControlCharacters as Xe}from"util";var f={};oe(f,{bgBlack:()=>Re,bgBlue:()=>Ee,bgBlueBright:()=>qe,bgCyan:()=>Ne,bgCyanBright:()=>Ye,bgGray:()=>Be,bgGreen:()=>Ie,bgGreenBright:()=>Fe,bgMagenta:()=>Ae,bgMagentaBright:()=>Ve,bgRed:()=>$e,bgRedBright:()=>je,bgWhite:()=>_e,bgWhiteBright:()=>Qe,bgYellow:()=>Oe,bgYellowBright:()=>We,black:()=>ge,blue:()=>ye,blueBright:()=>De,bold:()=>pe,cyan:()=>Pe,cyanBright:()=>Ue,dim:()=>ce,gray:()=>Te,green:()=>Se,greenBright:()=>Ge,hidden:()=>fe,inverse:()=>he,italic:()=>le,magenta:()=>we,magentaBright:()=>Le,overline:()=>ue,red:()=>be,redBright:()=>Me,reset:()=>de,strikethrough:()=>ve,underline:()=>me,white:()=>Ce,whiteBright:()=>He,yellow:()=>xe,yellowBright:()=>ke});import ie from"tty";var ae=ie?.WriteStream?.prototype?.hasColors?.()??!1,o=(e,t)=>{if(!ae)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let a=s+"",i=a.indexOf(n);if(i===-1)return r+a+n;let c=r,u=0;for(;i!==-1;)c+=a.slice(u,i)+r,u=i+n.length,i=a.indexOf(n,u);return c+=a.slice(u)+n,c}},de=o(0,0),pe=o(1,22),ce=o(2,22),le=o(3,23),me=o(4,24),ue=o(53,55),he=o(7,27),fe=o(8,28),ve=o(9,29),ge=o(30,39),be=o(31,39),Se=o(32,39),xe=o(33,39),ye=o(34,39),we=o(35,39),Pe=o(36,39),Ce=o(37,39),Te=o(90,39),Re=o(40,49),$e=o(41,49),Ie=o(42,49),Oe=o(43,49),Ee=o(44,49),Ae=o(45,49),Ne=o(46,49),_e=o(47,49),Be=o(100,49),Me=o(91,39),Ge=o(92,39),ke=o(93,39),De=o(94,39),Le=o(95,39),Ue=o(96,39),He=o(97,39),je=o(101,49),Fe=o(102,49),We=o(103,49),qe=o(104,49),Ve=o(105,49),Ye=o(106,49),Qe=o(107,49);var x=h.platform!=="win32"||!!h.env.WT_SESSION||h.env.TERM_PROGRAM==="vscode",Ke=e=>!!(e.isTTY&&h.env.TERM!=="dumb"&&!("CI"in h.env)),ze=f.blue(x?"\u2139":"i"),Je=f.green(x?"\u2714":"\u221A"),Ze=f.yellow(x?"\u26A0":"\u203C"),et=f.red(x?"\u2716":"\xD7"),tt={frames:x?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],interval:80},$=class{#p;#c;#n=-1;#s;#r;#e;#i;#l=0;#o;#t;#h=0;#m=!1;constructor(t={}){let r=t.spinner??tt;this.#p=r.frames,this.#c=r.interval,this.#r=t.text??"",this.#e=t.stream??h.stderr,this.#i=t.color??"cyan",this.#t=Ke(this.#e),this.#o=this.#x.bind(this)}start(t){return t&&(this.#r=t),this.isSpinning?this:(this.#m=!0,this.#v(),this.#d(),this.#b(),this.#t&&(this.#s=setInterval(()=>{this.#d()},this.#c)),this)}stop(t){return this.isSpinning?(this.#m=!1,this.#s&&(clearInterval(this.#s),this.#s=void 0),this.#g(),this.clear(),this.#S(),t&&this.#e.write(`${t}
|
|
3
3
|
`),this):this}#a(t,r){return this.stop(`${t} ${r??this.#r}`)}success(t){return this.#a(Je,t)}error(t){return this.#a(et,t)}warning(t){return this.#a(Ze,t)}info(t){return this.#a(ze,t)}get isSpinning(){return this.#m}get text(){return this.#r}set text(t){this.#r=t??"",this.#d()}get color(){return this.#i}set color(t){this.#i=t,this.#d()}clear(){if(!this.#t)return this;this.#e.cursorTo(0);for(let t=0;t<this.#l;t++)t>0&&this.#e.moveCursor(0,-1),this.#e.clearLine(1);return this.#l=0,this}#d(){let t=Date.now();(this.#n===-1||t-this.#h>=this.#c)&&(this.#n=++this.#n%this.#p.length,this.#h=t);let r=f[this.#i]??f.cyan,n=this.#p[this.#n],s=`${r(n)} ${this.#r}`;this.#t||(s+=`
|
|
4
4
|
`),this.clear(),this.#u(s),this.#t&&(this.#l=this.#f(s))}#u(t){this.#e.write(t)}#f(t){let r=this.#e.columns??80,n=Xe(t).split(`
|
|
5
5
|
`),s=0;for(let a of n)s+=Math.max(1,Math.ceil(a.length/r));return s}#v(){this.#t&&this.#u("\x1B[?25l")}#g(){this.#t&&this.#u("\x1B[?25h")}#b(){h.once("SIGINT",this.#o),h.once("SIGTERM",this.#o)}#S(){h.off("SIGINT",this.#o),h.off("SIGTERM",this.#o)}#x(t){this.isSpinning&&this.stop();let r=t==="SIGINT"?130:t==="SIGTERM"?143:1;h.exit(r)}};function I(e){return new $(e)}var rt=[{value:"h",label:"print http url"},{value:"t",label:"print tcp urls"},{value:"q",label:"quit"}],O=6;function V(e){let t=new H({debug:e?.debug,options:rt,render:ot,signal:e?.abortSignal});return{clearPrompt(){m.stdout.moveCursor(0,-O),m.stdout.cursorTo(0),m.stdout.clearScreenDown()},prompt:t,respond:async r=>{if(U(r)||r==="q")return await e?.onQuit?.();await e?.onOption?.[r]?.()}}}function ot(){let e=`${this.options.map(t=>`${b("inverse",` ${t.value} `)} ${t.label}`).join(" ")}`;return k(e,{style:{borderColor:"blackBright",borderStyle:"solid"},title:" \u25B3 press a key \u25B3 "})}function K(e){let t=I();return{renderContent:st,renderIntro:()=>it(e,t),renderOutro:()=>Promise.resolve(at(e)),spinner:t}}async function st(e){let{abortSignal:t,debug:r,isClosed:n,onQuit:s,server:a,spinner:i}=e;if(i.success(` Great Success! \u{1F609}\u{1F44D}
|
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.202511120235",
|
|
4
4
|
"description": "Dev CLI for Prisma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"common-stuff": "^0.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@prisma/dev": "0.0.0-dev.
|
|
49
|
+
"@prisma/dev": "0.0.0-dev.202511120235"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup",
|