@prisma/dev 0.0.0 → 0.0.1

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.
@@ -0,0 +1,18 @@
1
+ interface StartServerOptions {
2
+ /**
3
+ * An abort signal to stop the server abruptly.
4
+ */
5
+ abortSignal?: AbortSignal;
6
+ onStart?: (port: number) => void;
7
+ /**
8
+ * The port the server will listen on.
9
+ *
10
+ * Defaults to `5433`.
11
+ *
12
+ * An error is thrown if the port is already in use.
13
+ */
14
+ port?: number;
15
+ }
16
+ declare function unstable_startServer(options?: StartServerOptions): Promise<void>;
17
+
18
+ export { type StartServerOptions, unstable_startServer };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{createServer as s}from"http2";import{serve as S}from"@hono/node-server";import{Hono as p}from"hono/tiny";var m=new p,o=m;async function l(e){let{abortSignal:a,onStart:n,port:i=5433}=e||{};await new Promise((c,t)=>{a?.addEventListener("abort",()=>t(new Error("aborted")),{once:!0});try{S({createServer:s,fetch:o.fetch,port:i},r=>n?.(r.port))}catch(r){t(r)}})}export{l as unstable_startServer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/dev",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "A local Prisma Postgres server for development and testing",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -18,8 +18,7 @@
18
18
  "scripts": {
19
19
  "build": "tsup",
20
20
  "check:exports": "attw . --pack",
21
- "lint": "eslint --fix .",
22
- "test": "",
21
+ "lint": "eslint --fix .", "test": "",
23
22
  "typecheck": "tsc --noEmit"
24
23
  },
25
24
  "keywords": [