@prisma/dev 0.0.0-dev.202510101424 → 0.0.0-dev.202510131014

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 CHANGED
@@ -1 +1 @@
1
- import{a as f}from"./chunk-RBVZVBDC.js";import{a as w,g as R}from"./chunk-FZ7JBZR6.js";import{a as h,b,c as A,f as d}from"./chunk-LMPFMHCB.js";import{a as u,c as v,d as g}from"./chunk-7EOUKLQR.js";import"./chunk-EPFUMVT3.js";import{createServer as D}from"http";import{promisify as O}from"util";import C from"@prisma/get-platform";async function P(a,e){let{port:r}=e;if(e.dryRun)return y(r,null);let t=await x(r,a,e),{promise:s,reject:S,resolve:c}=v(),{serve:i}=await import("@hono/node-server"),m=i({createServer:D,fetch:t.fetch,overrideGlobalObjects:!1,port:r},c);return m.on("error",o=>{if(typeof o=="object"&&"code"in o&&o.code==="EADDRINUSE")return S(new d(r));console.error("[Accelerate]",o)}),await s,y(r,m)}function y(a,e){return{async close(){e&&await Promise.allSettled([O(e.close.bind(e))(),g.stopAll()])},port:a,url:`http://localhost:${a}`}}async function x(a,e,r){let{debug:t}=r,[{Hono:s},{accelerateRoute:S},{utilityRoute:c}]=await Promise.all([import("hono/tiny"),import("./accelerate-Y4P6JW2J.js"),import("./utility-YJ4TFSMW.js")]),i=new s,m=await C.getPlatformInfo();if(t&&console.debug("[Accelerate] platform info: %s",JSON.stringify(m)),t){let{logger:n}=await import("hono/logger");i.use("*",n((...p)=>console.log("[Accelerate]",...p)))}i.use("*",async(n,p)=>(n.set("db",e),n.set("debug",!!t),n.set("platform",m),n.set("port",a),n.set("protocol","http"),n.set("serverState",r),n.set("shadowDBPort",r.shadowDatabasePort),await p()));let o=new s;return o.route("/",S),o.route("/",c),i.route("/",o),i}async function G(a){let e=await w.createExclusively(a),[r,t]=await Promise.all([f("database",e),f("shadow_database",e)]),s=await P(r,e),S=`prisma+postgres://localhost:${s.port}/?${new URLSearchParams({api_key:u({databaseUrl:r.prismaORMConnectionString,name:e.name,shadowDatabaseUrl:t.prismaORMConnectionString})}).toString()}`,c={database:{connectionString:r.connectionString,prismaORMConnectionString:r.prismaORMConnectionString,terminalCommand:r.terminalCommand},http:{url:s.url},ppg:{url:S},shadowDatabase:{connectionString:t.prismaORMConnectionString,prismaORMConnectionString:t.prismaORMConnectionString,terminalCommand:t.terminalCommand}};return await e.writeServerDump(c),{...c,close:()=>i(e,[s,r,t]),name:e.name};async function i(m,o){let p=(await Promise.allSettled(o.map(l=>l.close()))).filter(l=>l.status==="rejected").map(l=>new Error(l.reason));try{await m.close()}catch(l){p.push(l)}if(p.length>0)throw new AggregateError(p,"Failed to close some servers")}}export{h as DEFAULT_DATABASE_PORT,b as DEFAULT_SERVER_PORT,A as DEFAULT_SHADOW_DATABASE_PORT,d as PortNotAvailableError,R as ServerAlreadyRunningError,G as unstable_startServer};
1
+ import{a as f}from"./chunk-RBVZVBDC.js";import{a as w,g as R}from"./chunk-FZ7JBZR6.js";import{a as h,b,c as A,f as d}from"./chunk-LMPFMHCB.js";import{a as u,c as v,d as g}from"./chunk-7EOUKLQR.js";import"./chunk-EPFUMVT3.js";import{createServer as D}from"http";import{promisify as O}from"util";import C from"@prisma/get-platform";async function P(a,e){let{port:r}=e;if(e.dryRun)return y(r,null);let t=await x(r,a,e),{promise:s,reject:S,resolve:c}=v(),{serve:i}=await import("@hono/node-server"),m=i({createServer:D,fetch:t.fetch,overrideGlobalObjects:!1,port:r},c);return m.on("error",o=>{if(typeof o=="object"&&"code"in o&&o.code==="EADDRINUSE")return S(new d(r));console.error("[Accelerate]",o)}),await s,y(r,m)}function y(a,e){return{async close(){e&&await Promise.allSettled([O(e.close.bind(e))(),g.stopAll()])},port:a,url:`http://localhost:${a}`}}async function x(a,e,r){let{debug:t}=r,[{Hono:s},{accelerateRoute:S},{utilityRoute:c}]=await Promise.all([import("hono/tiny"),import("./accelerate-MVW5ZKXM.js"),import("./utility-YJ4TFSMW.js")]),i=new s,m=await C.getPlatformInfo();if(t&&console.debug("[Accelerate] platform info: %s",JSON.stringify(m)),t){let{logger:n}=await import("hono/logger");i.use("*",n((...p)=>console.log("[Accelerate]",...p)))}i.use("*",async(n,p)=>(n.set("db",e),n.set("debug",!!t),n.set("platform",m),n.set("port",a),n.set("protocol","http"),n.set("serverState",r),n.set("shadowDBPort",r.shadowDatabasePort),await p()));let o=new s;return o.route("/",S),o.route("/",c),i.route("/",o),i}async function G(a){let e=await w.createExclusively(a),[r,t]=await Promise.all([f("database",e),f("shadow_database",e)]),s=await P(r,e),S=`prisma+postgres://localhost:${s.port}/?${new URLSearchParams({api_key:u({databaseUrl:r.prismaORMConnectionString,name:e.name,shadowDatabaseUrl:t.prismaORMConnectionString})}).toString()}`,c={database:{connectionString:r.connectionString,prismaORMConnectionString:r.prismaORMConnectionString,terminalCommand:r.terminalCommand},http:{url:s.url},ppg:{url:S},shadowDatabase:{connectionString:t.prismaORMConnectionString,prismaORMConnectionString:t.prismaORMConnectionString,terminalCommand:t.terminalCommand}};return await e.writeServerDump(c),{...c,close:()=>i(e,[s,r,t]),name:e.name};async function i(m,o){let p=(await Promise.allSettled(o.map(l=>l.close()))).filter(l=>l.status==="rejected").map(l=>new Error(l.reason));try{await m.close()}catch(l){p.push(l)}if(p.length>0)throw new AggregateError(p,"Failed to close some servers")}}export{h as DEFAULT_DATABASE_PORT,b as DEFAULT_SERVER_PORT,A as DEFAULT_SHADOW_DATABASE_PORT,d as PortNotAvailableError,R as ServerAlreadyRunningError,G as unstable_startServer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/dev",
3
- "version": "0.0.0-dev.202510101424",
3
+ "version": "0.0.0-dev.202510131014",
4
4
  "description": "A local Prisma Postgres server for development and testing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -80,7 +80,7 @@
80
80
  "@hono/node-server": "1.14.2",
81
81
  "@mrleebo/prisma-ast": "0.12.1",
82
82
  "@prisma/get-platform": "6.8.2",
83
- "@prisma/query-plan-executor": "6.18.0-dev.12",
83
+ "@prisma/query-plan-executor": "6.18.0-dev.17",
84
84
  "foreground-child": "3.3.1",
85
85
  "get-port-please": "3.1.2",
86
86
  "hono": "4.7.10",