@prisma/dev 0.0.0-dev.202505220030 → 0.0.0-dev.202505220433
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.d.ts +35 -27
- package/dist/index.js +5 -4
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
declare const DEFAULT_ACCELERATE_PORT = 51213;
|
|
4
|
-
declare const DEFAULT_DATABASE_PORT = 51214;
|
|
5
|
-
declare const DEFAULT_SHADOW_DATABASE_PORT = 51215;
|
|
6
|
-
type PortAssignableService = "accelerate" | "database" | "shadow_database";
|
|
7
|
-
declare class PortNotAvailableError extends Error {
|
|
8
|
-
port: number;
|
|
9
|
-
service: PortAssignableService;
|
|
10
|
-
name: string;
|
|
11
|
-
constructor(port: number, service: PortAssignableService);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface StartServerOptions {
|
|
15
|
-
/**
|
|
16
|
-
* The port the Accelerate server will listen on.
|
|
17
|
-
*
|
|
18
|
-
* Defaults to `51213`.
|
|
19
|
-
*
|
|
20
|
-
* An error is thrown if the port is already in use.
|
|
21
|
-
*/
|
|
22
|
-
acceleratePort?: number;
|
|
1
|
+
interface ServerOptions {
|
|
23
2
|
/**
|
|
24
3
|
* The port the database server will listen on.
|
|
25
4
|
*
|
|
@@ -41,11 +20,25 @@ interface StartServerOptions {
|
|
|
41
20
|
*/
|
|
42
21
|
dryRun?: boolean;
|
|
43
22
|
/**
|
|
44
|
-
*
|
|
23
|
+
* The name of the server.
|
|
24
|
+
*
|
|
25
|
+
* Defaults to `default`.
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The persistence mode of the server.
|
|
45
30
|
*
|
|
46
|
-
* Default is `
|
|
31
|
+
* Default is `stateless`.
|
|
47
32
|
*/
|
|
48
|
-
persistenceMode?:
|
|
33
|
+
persistenceMode?: PersistenceMode;
|
|
34
|
+
/**
|
|
35
|
+
* The port the server will listen on.
|
|
36
|
+
*
|
|
37
|
+
* Defaults to `51213`.
|
|
38
|
+
*
|
|
39
|
+
* An error is thrown if the port is already in use.
|
|
40
|
+
*/
|
|
41
|
+
port?: number;
|
|
49
42
|
/**
|
|
50
43
|
* The port the shadow database server will listen on.
|
|
51
44
|
*
|
|
@@ -55,6 +48,21 @@ interface StartServerOptions {
|
|
|
55
48
|
*/
|
|
56
49
|
shadowDatabasePort?: number;
|
|
57
50
|
}
|
|
51
|
+
type PersistenceMode = "stateless" | "stateful";
|
|
52
|
+
|
|
53
|
+
type DBServerPurpose = "database" | "shadow_database";
|
|
54
|
+
|
|
55
|
+
declare const DEFAULT_DATABASE_PORT = 51214;
|
|
56
|
+
declare const DEFAULT_SERVER_PORT = 51213;
|
|
57
|
+
declare const DEFAULT_SHADOW_DATABASE_PORT = 51215;
|
|
58
|
+
type PortAssignableService = DBServerPurpose | "server";
|
|
59
|
+
declare class PortNotAvailableError extends Error {
|
|
60
|
+
port: number;
|
|
61
|
+
service: PortAssignableService;
|
|
62
|
+
name: string;
|
|
63
|
+
constructor(port: number, service: PortAssignableService);
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
interface Server {
|
|
59
67
|
accelerate: {
|
|
60
68
|
url: string;
|
|
@@ -70,6 +78,6 @@ interface Server {
|
|
|
70
78
|
connectionString: string;
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
|
-
declare function unstable_startServer(options?:
|
|
81
|
+
declare function unstable_startServer(options?: ServerOptions): Promise<Server>;
|
|
74
82
|
|
|
75
|
-
export {
|
|
83
|
+
export { DEFAULT_DATABASE_PORT, DEFAULT_SERVER_PORT, DEFAULT_SHADOW_DATABASE_PORT, type PortAssignableService, PortNotAvailableError, type Server, unstable_startServer };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{createServer as
|
|
3
|
-
`).find(
|
|
4
|
-
Received data: ${i}`));s({childProcess:r,url:`http://${
|
|
2
|
+
import{createServer as Ge}from"http";import{promisify as ze}from"util";import{serve as Je}from"@hono/node-server";import We from"@prisma/get-platform";import{logger as Qe}from"hono/logger";import{Hono as ie}from"hono/tiny";import{validator as b}from"hono/validator";import{process as Xe}from"std-env";import{HTTPException as P}from"hono/http-exception";import{object as me,optional as pe,parseJson as ge,pipe as R,regex as C,safeParse as he,string as D,url as L}from"valibot";var M=/^(postgres|postgresql):\/\//,fe=R(D(),ge(),me({databaseUrl:R(D(),L(),C(M)),shadowDatabaseUrl:pe(R(D(),L(),C(M)))}));function j(t){return Buffer.from(JSON.stringify(t),"utf8").toString("base64url")}function ye(t){let e=Buffer.from(t,"base64url").toString("utf8"),{issues:r,output:n,success:o}=he(fe,e,{abortEarly:!0});return o?[null,n]:[r]}var m=(t,e)=>{let{authorization:r}=t;if(!r)throw new P(401,{message:"Missing API Key"});let[n,o="",s]=r.split(" ");if(n!=="Bearer"||s)throw new P(401,{message:"Invalid API Key"});let[a,i]=ye(o);if(a)throw new P(401,{message:"Invalid API Key",cause:a.join(", ")});let{databaseUrl:c}=i;if(c!==e.var.db.connectionString)throw new P(401,{message:"Unauthorized"});return{decodedAPIKey:i}};import{array as be,literal as we,minLength as Se,object as Pe,pipe as ve,safeParse as Ee,string as Te,union as Ae}from"valibot";var Re=Pe({tags:Ae([ve(be(Te()),Se(1)),we("all")])});async function U(t){let{output:e,success:r}=Ee(Re,await t.req.json(),{abortEarly:!0});return r?e:t.text("Invalid input",400)}import{spawn as ke}from"child_process";import{once as Be}from"events";import{mkdir as Ce}from"fs/promises";import{join as Le}from"path";import{process as Me}from"std-env";import{createWriteStream as De,WriteStream as Oe}from"fs";import{chmod as xe,stat as Ie,writeFile as $e}from"fs/promises";import _e from"env-paths";import{inflate as He}from"pako";var F=_e("prisma-dev");function N(t,e){return`${F.cache}/engine/${t}/${e}`}function q(t){return`${F.data}/${t}`}async function V(t){try{return await Ie(t),!0}catch(e){if(e!=null&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return!1;throw e}}async function K(t,e){let r=He(t);await $e(e,r),await xe(e,"755")}async function G(t,e){await t.stream().pipeTo(Oe.toWeb(De(e,{encoding:"utf-8"})))}function v(){let t,e,r=new Promise((n,o)=>{t=n,e=o});return{fail:e,promise:r,succeed:t}}var f=class t{static#r=new Map;#e;#t;constructor(e){this.#e=e,this.#t=null}static async get(e){let r=`${e.schemaHash}:${e.clientVersion}`;try{let n=t.#r.get(r);if(n)return n;let o=new t(e);return t.#r.set(r,o),e.debug&&console.debug("starting engine...",e),await o.start(),e.debug&&console.debug("engine started!"),o}finally{t.stopAll(r)}}static async stopAll(e){let n=(await Promise.allSettled(Array.from(t.#r.entries()).filter(([o])=>o!==e).map(async([o,s])=>{try{await s.stop()}finally{t.#r.delete(o)}}))).filter(o=>o.status==="rejected").map(o=>o.reason);if(n.length>0)throw new AggregateError(n,"Failed to stop engines")}async commitTransaction(e,r){return await this.#s(e,r,"commit")}async request(e,r){let{url:n}=await this.#t,o=this.#o(r),s=await fetch(n,{body:typeof e=="string"?e:JSON.stringify(e),headers:{...o,"Content-Type":"application/json"},method:"POST"});if(!s.ok)throw await p.fromResponse(s);return await s.text()}async rollbackTransaction(e,r){return await this.#s(e,r,"rollback")}async startTransaction(e,r){let{url:n}=await this.#t,o=this.#o(r),s=await fetch(`${n}/transaction/start`,{body:JSON.stringify(e),headers:{...o,"Content-Type":"application/json"},method:"POST"});if(!s.ok)throw await p.fromResponse(s);return await s.json()}async start(){if(this.#t!=null)return;let e=await this.#n();this.#e.debug&&console.debug("spinning up engine at path...",e);let r=ke(e,["--enable-raw-queries","--enable-telemetry-in-response","--port","0"],{env:{LOG_QUERIES:"y",PRISMA_DML:this.#e.base64Schema,QE_LOG_LEVEL:"TRACE",RUST_BACKTRACE:"1",RUST_LOG:"info"},stdio:["ignore","pipe","pipe"],windowsHide:!0});r.stderr.setEncoding("utf8"),r.stdout.setEncoding("utf8");let{fail:n,promise:o,succeed:s}=v();this.#t=o;let a=i=>{let c=i.split(`
|
|
3
|
+
`).find(le=>le.includes("Started query engine http server"));if(!c)return;r.stdout.removeListener("data",a);let{fields:l}=JSON.parse(c);if(l==null)return n(new Error(`Unexpected data during initialization, "fields" are missing: ${i}`));let{ip:u,port:B}=l;if(u==null||B==null)return n(new Error(`This version of query-engine is not compatible with minippg, "ip" and "port" are missing in the startup log entry.
|
|
4
|
+
Received data: ${i}`));s({childProcess:r,url:`http://${u}:${B}`})};r.once("error",i=>{this.#t=null,n(new y(String(i)))}),r.once("exit",(i,c)=>{this.#t=null,n(new y(`Query Engine exited with code ${i} and signal ${c}`))}),r.stdout.on("data",a),r.stderr.on("data",i=>{console.error(i)}),await this.#t}async stop(){if(this.#t==null)return;let{childProcess:e}=await this.#t;e.exitCode==null&&e.signalCode==null&&(e.kill(),await Be(e,"exit"))}async#n(){this.#e.debug&&console.debug("getting engine commit hash...");let e=await this.#a();this.#e.debug&&console.debug("got engine commit hash",e);let r=N(this.#e.clientVersion,e);this.#e.debug&&console.debug("cache directory path",r),await Ce(r,{recursive:!0});let{platform:n}=this.#e.platform,o=n==="windows"?".exe":"",s=Le(r,`query-engine-${n}${o}`);return this.#e.debug&&console.debug("engine binary path",s),(Me.env.PRISMA_DEV_FORCE_ENGINE_DOWNLOAD==="1"||await V(s)===!1)&&await this.#i({commitHash:e,extension:o,engineBinaryPath:s}),s}async#a(){let e=await fetch(`https://registry.npmjs.org/@prisma/client/${this.#e.clientVersion}`);if(!e.ok)throw new Error(`Couldn't fetch package.json from npm registry, status code: ${e.status}`);let n=(await e.json()).devDependencies?.["@prisma/engines-version"];if(!n)throw new Error("Couldn't find engines version in package.json");let o=n.split(".").at(-1);if(!o)throw new Error("Couldn't find commit hash in engines version");return o}async#i(e){let{commitHash:r,extension:n,engineBinaryPath:o}=e,{binaryTarget:s}=this.#e.platform,a=`https://binaries.prisma.sh/all_commits/${r}/${s}/query-engine${n}.gz`;this.#e.debug&&console.debug("downloading engine from url",a);let i=await fetch(a);if(!i.ok)throw new Error(`Couldn't download engine. URL: ${a}, status code: ${i.status}`);await K(await i.arrayBuffer(),o),this.#e.debug&&console.debug("engine downloaded and saved at",o)}#o(e){let r={};for(let[n,o]of Object.entries(e))o!=null&&(r[n]=o);return r}async#s(e,r,n){let{url:o}=await this.#t,s=this.#o(r),a=await fetch(`${o}/transaction/${e}/${n}`,{headers:{...s,"Content-Type":"application/json"},method:"POST"});if(!a.ok)throw await p.fromResponse(a);try{return await a.json()}catch{return{}}}};function E(t,e){return console.error(t),t instanceof y?e.json({EngineNotStarted:{reason:{EngineStartupError:{logs:[],msg:t.message}}}},500):t instanceof p?e.text(t.responseBody,t.statusCode):e.body(null,500)}var y=class extends Error{name="EngineStartError"},p=class t extends Error{constructor(r,n,o){super(`${r}: Query Engine response status ${n}, body: ${o}`);this.action=r;this.statusCode=n;this.responseBody=o}name="EngineHttpError";static async fromResponse(r){let n=new URL(r.url),o=await r.text();return new t(n.pathname,r.status,o)}};var z=51214,J=51213,W=51215,g=class extends Error{constructor(r,n){super(`Port number \`${r}\` is not available for service ${n}.`);this.port=r;this.service=n}name="PortNotAvailableError"};import{Buffer as Q}from"buffer";var T=new Map;async function O(t){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(a=>a.toString(16).padStart(2,"0")).join("")}function X(t){let e=t.req.param("schemaHash"),r=T.get(e);return r==null?t.json({EngineNotStarted:{reason:"SchemaMissing"}},404):{schemaHash:e,schemas:r}}var je=/datasource\s+db\s+\{\s*provider\s*=\s*"postgres(!?ql)?"\s+url\s*=\s*.+\s*\}/;async function Y(t,e){let r=Q.from(t,"base64").toString("utf8"),n=`datasource db {
|
|
5
5
|
provider = "postgresql"
|
|
6
6
|
url = "${e}"
|
|
7
|
-
}`,o=r.replace(
|
|
7
|
+
}`,o=r.replace(je,n),s=await O(o);return{base64Override:Q.from(o,"utf8").toString("base64"),overrideHash:s}}function A(t){let{req:e}=t;return{traceparent:e.header("traceparent"),"X-capture-telemetry":e.header("X-capture-telemetry")}}import{integer as Z,looseObject as Ue,minValue as ee,number as x,object as Fe,optional as Ne,pipe as te,safeParse as re,string as ne,union as qe}from"valibot";var Ve=Fe({isolation_level:Ne(ne()),max_wait:te(x(),Z(),ee(0)),timeout:te(x(),Z(),ee(0))});async function oe(t){let{issues:e,output:r,success:n}=re(Ve,await t.req.json(),{abortEarly:!0});return n?r:t.json({EngineNotStarted:{reason:"InvalidRequest",issues:e}},400)}var Ke=Ue({id:qe([ne(),x()])});function se(t,e){let{output:r,success:n}=re(Ke,t);return n?r:e.json({EngineMalfunction:{}},500)}async function ce(t,e){let{port:r}=e;if(e.dryRun)return ae(r,null);let n=await Ye(r,t,e),{fail:o,promise:s,succeed:a}=v(),i=Je({createServer:Ge,fetch:n.fetch,port:r},()=>{a()});return i.on("error",c=>{if(typeof c=="object"&&"code"in c&&c.code==="EADDRINUSE")return o(new g(r,"server"));console.error(c)}),await s,ae(r,i)}function ae(t,e){return{async close(){e&&await Promise.allSettled([ze(e.close.bind(e))(),f.stopAll()])},port:t,url:`http://localhost:${t}`}}async function Ye(t,e,r){let{debug:n}=r,o=new ie,s=await We.getPlatformInfo();return n&&console.debug("platform info: %s",JSON.stringify(s)),n&&o.use("*",Qe()),o.use("*",async(a,i)=>(a.set("db",e),a.set("debug",!!n),a.set("platform",s),a.set("port",t),a.set("protocol","http"),a.set("serverState",r),await i())),o.route("/",w),o}var w=new ie;w.get("/health",t=>t.json({name:t.get("serverState").name}));w.post("/invalidate",b("header",m),async t=>{let e=await U(t);return e instanceof Response?e:t.body(null)});var Ze="/:clientVersion/:schemaHash",S=w.basePath(Ze);w.route("/",S);var et=["/graphql","/itx/:transactionId/graphql"];S.on("POST",[...et],b("header",m),async t=>{let{req:e}=t;try{let r=await I(t);if(r instanceof Response)return r;let n=await e.text(),o=e.param("transactionId"),s=await r.request(n,{...A(t),"X-transaction-id":o});return t.text(s)}catch(r){return E(r,t)}});S.basePath("/itx/:transactionId").on("POST",["/commit","/rollback"],b("header",m),async t=>{let{req:e}=t;try{let r=await I(t);if(r instanceof Response)return r;let o=`${e.routePath.split("/").filter(Boolean).at(-1)}Transaction`,s=e.param("transactionId"),a=await r[o](s,A(t));return t.json(a)}catch(r){return E(r,t)}});S.put("/schema",b("header",m),async t=>{let{req:e}=t,r=await e.text();if(!r)return t.text("Missing schema",400);let n=e.param("schemaHash"),o=T.get(n);if(o==null){if(n!==await O(r))return t.text("Schema hash mismatch",400);let s=await Y(r,t.get("db").connectionString);return T.set(n,{base64Original:r,...s}),t.text(n)}return r!==o.base64Original?t.text("Schema mismatch",400):t.text(n)});S.post("/transaction/start",b("header",m),async t=>{let{req:e}=t,r=await oe(t);if(r instanceof Response)return r;try{let n=await I(t);if(n instanceof Response)return n;let o=await n.startTransaction(r,A(t)),s=se(o,t);if(s instanceof Response)return s;let{id:a}=s,i=e.param("clientVersion"),c=t.get("port"),l=t.get("protocol"),u=e.param("schemaHash");return t.json({...o,"data-proxy":{endpoint:`${l}://localhost:${c}/${i}/${u}/itx/${a}`}})}catch(n){return E(n,t)}});async function I(t){let{req:e}=t,r=X(t);if(r instanceof Response)return r;let{base64Override:n,overrideHash:o}=r.schemas;return await f.get({base64Schema:n,clientVersion:Xe.env.PRISMA_DEV_FORCE_CLIENT_VERSION||e.param("clientVersion"),debug:t.get("debug"),platform:t.get("platform"),schemaHash:o})}import{PGlite as tt}from"@electric-sql/pglite";import{PGLiteSocketServer as rt}from"@electric-sql/pglite-socket";import{pgDump as nt}from"@electric-sql/pglite-tools/pg_dump";var d={connectionLimit:1,connectTimeout:0,database:"postgres",maxIdleConnectionLifetime:0,password:"postgres",poolTimeout:0,socketTimeout:0,sslMode:"disable",username:"postgres"},ot=`postgres://${d.username}:${d.password}@localhost`,st=new URLSearchParams({connection_limit:String(d.connectionLimit),connect_timeout:String(d.connectTimeout),max_idle_connection_lifetime:String(d.maxIdleConnectionLifetime),pool_timeout:String(d.poolTimeout),socket_timeout:String(d.socketTimeout),sslmode:d.sslMode});async function $(t,e){let r=t==="database"?e.databasePort:e.shadowDatabasePort;if(e.dryRun)return de(t,e,{db:null,port:r,server:null});let{debug:n}=e,o=await tt.create({database:d.database,dataDir:"memory://",debug:n?5:void 0,defaultDataTransferContainer:"file",username:d.username});await o.waitReady,t!=="shadow_database"&&await at(o,e);let s=new rt({db:o,inspect:n,port:r});try{await s.start()}catch(a){throw a instanceof Error&&"code"in a&&a.code==="EADDRINUSE"?new g(r,t):a}return de(t,e,{db:o,port:r,server:s})}function de(t,e,r){let{debug:n}=e,{db:o,port:s,server:a}=r||{};return n&&console.debug(`${t} server started on port %i`,s),{...d,close:async()=>{let i=[];try{await a?.stop(),n&&console.debug(`${t} server stopped on port %i`,s)}catch(c){console.error("server stop error",c),i.push(c)}if(t!=="shadow_database")try{await it(o,e),n&&console.debug(`${t} state saved`)}catch(c){console.error("dump error",c),i.push(c)}try{await o?.close(),n&&console.debug(`${t} closed`)}catch(c){console.error("db close error",c),i.push(c)}if(i.length>0)throw new AggregateError(i,`Failed to close ${t} properly`)},connectionString:ct(s),port:s}}async function at(t,e){try{let r=await e.readDatabaseDump();if(!r.length)return;await t.exec(`${r}; set search_path to public;`)}catch(r){if(r instanceof Error&&"code"in r&&r.code==="ENOENT")return console.warn("No database dump found. Starting with an empty database.");throw r}}async function it(t,e){await e.writeDatabaseDump(()=>nt({args:[],pg:t}))}function ct(t){return`${ot}:${t}/${d.database}?${st.toString()}`}import{copyFile as dt,mkdir as ut,readFile as lt,unlink as mt,writeFile as pt}from"fs/promises";import{join as ue}from"pathe";import{lock as gt}from"proper-lockfile";import{process as ht}from"std-env";var k=Symbol("initialize"),h=class{databasePort;debug;dryRun;name;persistenceMode;port;shadowDatabasePort;constructor(e){this.databasePort=e.databasePort??51214,this.debug=e.debug??!1,this.dryRun=e.dryRun??!1,this.name=e.name??"default",this.persistenceMode=e.persistenceMode,this.port=e.port??51213,this.shadowDatabasePort=e.shadowDatabasePort??51215}static async get(e){let r=e?.dryRun!==!0&&e?.persistenceMode!=="stateless"?new H(e):new _(e);return await r[k](),r}},_=class extends h{constructor(e){super({...e,persistenceMode:"stateless"})}async[k](){}readDatabaseDump(){return Promise.resolve("")}async writeDatabaseDump(){}},H=class extends h{#r;#e;#t;constructor(e){super({...e,persistenceMode:"stateful"}),this.#r=q(this.name),this.#e=ue(this.#r,"dump.sql"),this.#t=ue(this.#r,"prisma-dev.json")}async[k](){await ut(this.#r,{recursive:!0}),this.debug&&console.debug(`using data directory: ${this.#r}`);try{await this.#n(),await gt(this.#t),this.debug&&console.debug(`obtained lock on: ${this.#r}`)}catch(e){throw e instanceof Error&&"code"in e&&e.code==="ELOCKED"?new Error(`The server is already running with name "${this.name}". `):e}}async readDatabaseDump(){return await lt(this.#e,{encoding:"utf-8"})}async writeDatabaseDump(e){let r=!1,n=`${this.#e}.bak`;try{await dt(this.#e,n),r=!0,this.debug&&console.debug(`backed up dump to: ${n}`)}catch(s){if(!(s instanceof Error&&"code"in s&&s.code==="ENOENT"))throw s}let o=await e();if(await G(o,this.#e),this.debug&&console.debug(`dumped database to: ${this.#e}`),!!r)try{await mt(`${this.#e}.bak`),this.debug&&console.log(`removed backup dump: ${n}`)}catch{}}async#n(){await pt(this.#t,`${JSON.stringify({databasePort:this.databasePort,name:this.name,pid:ht.pid,port:this.port,shadowDatabasePort:this.shadowDatabasePort},null,2)}
|
|
8
|
+
`,{encoding:"utf-8"})}};async function vr(t){let e=await h.get(t),[r,n]=await Promise.all([$("database",e),$("shadow_database",e)]),o=await ce(r,e),s=`prisma+postgres://localhost:${o.port}/?${new URLSearchParams({api_key:j({databaseUrl:r.connectionString,shadowDatabaseUrl:n.connectionString})}).toString()}`;return{accelerate:{url:o.url},close:()=>a([o,r,n]),database:{connectionString:r.connectionString},ppg:{url:s},shadowDatabase:{connectionString:n.connectionString}};async function a(i){let l=(await Promise.allSettled(i.map(u=>u.close()))).filter(u=>u.status==="rejected").map(u=>new Error(u.reason));if(l.length>0)throw new AggregateError(l,"Failed to close some servers")}}export{z as DEFAULT_DATABASE_PORT,J as DEFAULT_SERVER_PORT,W as DEFAULT_SHADOW_DATABASE_PORT,g as PortNotAvailableError,vr as unstable_startServer};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/dev",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.202505220433",
|
|
4
4
|
"description": "A local Prisma Postgres server for development and testing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@arethetypeswrong/cli": "0.17.4",
|
|
31
31
|
"@types/node": "22.3.0",
|
|
32
32
|
"@types/pako": "2.0.3",
|
|
33
|
+
"@types/proper-lockfile": "4.1.4",
|
|
33
34
|
"pkg-types": "2.1.0",
|
|
34
35
|
"tsup": "8.0.2",
|
|
35
36
|
"typescript": "5.8.3",
|
|
@@ -44,6 +45,9 @@
|
|
|
44
45
|
"env-paths": "3.0.0",
|
|
45
46
|
"hono": "4.7.8",
|
|
46
47
|
"pako": "2.1.0",
|
|
48
|
+
"pathe": "2.0.3",
|
|
49
|
+
"proper-lockfile": "4.1.2",
|
|
50
|
+
"std-env": "3.8.1",
|
|
47
51
|
"valibot": "1.1.0"
|
|
48
52
|
},
|
|
49
53
|
"scripts": {
|