@prisma/studio-core 0.1.0 → 0.2.0
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/{CPIOZS5X-NALOZFPD.js → CPIOZS5X-V4BHP4CI.js} +1 -1
- package/dist/{OKF6E45R-6KC3BLVB.js → OKF6E45R-XYOIK2NY.js} +1 -1
- package/dist/{adapter-Co8KY8Hi.d.cts → adapter-CKFCHq71.d.cts} +40 -5
- package/dist/{adapter-Co8KY8Hi.d.ts → adapter-CKFCHq71.d.ts} +40 -5
- package/dist/chunk-2ZJZX5I7.js +0 -0
- package/dist/chunk-BMVJYUJW.js +1 -0
- package/dist/chunk-P72NBTYE.js +1 -0
- package/dist/chunk-XS52QRY2.js +1 -0
- package/dist/data/accelerate/index.d.cts +2 -2
- package/dist/data/accelerate/index.d.ts +2 -2
- package/dist/data/accelerate/index.js +1 -1
- package/dist/data/bff/index.d.cts +2 -2
- package/dist/data/bff/index.d.ts +2 -2
- package/dist/data/bff/index.js +1 -1
- package/dist/data/index.cjs +1 -1
- package/dist/data/index.d.cts +2 -2
- package/dist/data/index.d.ts +2 -2
- package/dist/data/index.js +1 -1
- package/dist/data/pglite/index.cjs +1 -1
- package/dist/data/pglite/index.d.cts +22 -5
- package/dist/data/pglite/index.d.ts +22 -5
- package/dist/data/pglite/index.js +1 -1
- package/dist/data/postgres-core/index.cjs +1 -1
- package/dist/data/postgres-core/index.d.cts +35 -10
- package/dist/data/postgres-core/index.d.ts +35 -10
- package/dist/data/postgres-core/index.js +1 -1
- package/dist/{index-M4EjPWNJ.d.ts → index-BDPv5Gnt.d.ts} +19 -6
- package/dist/{index-CnVNNyod.d.cts → index-BNAA6jKD.d.cts} +19 -6
- package/dist/ui/index.cjs +62 -54
- package/dist/ui/index.css +154 -41
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +14 -6
- package/package.json +5 -2
- package/dist/chunk-2FW6TKD6.js +0 -1
- package/dist/chunk-RGBMDID6.js +0 -1
- package/dist/chunk-ZCFLMQMM.js +0 -1
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
|
-
import { A as Adapter } from '../../adapter-
|
|
3
|
-
import { E as Executor } from '../../index-
|
|
2
|
+
import { A as Adapter } from '../../adapter-CKFCHq71.cjs';
|
|
3
|
+
import { Q as Query, E as Executor } from '../../index-BNAA6jKD.cjs';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
interface PGLiteExecutorOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Delay in milliseconds to add before executing the query.
|
|
9
|
+
* This can be a static number or a function that takes the query as an argument and returns a number.
|
|
10
|
+
*
|
|
11
|
+
* This is useful for simulating network latency or for debugging purposes.
|
|
12
|
+
*/
|
|
13
|
+
addDelay?: number | ((query: Query) => number);
|
|
14
|
+
/**
|
|
15
|
+
* Whether to log the query and its parameters.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
logging?: boolean | ((query: Query) => boolean);
|
|
20
|
+
}
|
|
21
|
+
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
22
|
+
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
23
|
+
}
|
|
24
|
+
declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
|
|
8
25
|
|
|
9
|
-
export { createPGLiteAdapter, createPGLiteExecutor };
|
|
26
|
+
export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
|
-
import { A as Adapter } from '../../adapter-
|
|
3
|
-
import { E as Executor } from '../../index-
|
|
2
|
+
import { A as Adapter } from '../../adapter-CKFCHq71.js';
|
|
3
|
+
import { Q as Query, E as Executor } from '../../index-BDPv5Gnt.js';
|
|
4
4
|
import 'kysely';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
interface PGLiteExecutorOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Delay in milliseconds to add before executing the query.
|
|
9
|
+
* This can be a static number or a function that takes the query as an argument and returns a number.
|
|
10
|
+
*
|
|
11
|
+
* This is useful for simulating network latency or for debugging purposes.
|
|
12
|
+
*/
|
|
13
|
+
addDelay?: number | ((query: Query) => number);
|
|
14
|
+
/**
|
|
15
|
+
* Whether to log the query and its parameters.
|
|
16
|
+
*
|
|
17
|
+
* Defaults to `false`.
|
|
18
|
+
*/
|
|
19
|
+
logging?: boolean | ((query: Query) => boolean);
|
|
20
|
+
}
|
|
21
|
+
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
22
|
+
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
23
|
+
}
|
|
24
|
+
declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
|
|
8
25
|
|
|
9
|
-
export { createPGLiteAdapter, createPGLiteExecutor };
|
|
26
|
+
export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as d}from"../../chunk-XS52QRY2.js";import"../../chunk-P72NBTYE.js";import"../../chunk-BMVJYUJW.js";function b(o,n){let{addDelay:i=0,logging:a=!1}=n??{};return{execute:async(t,m)=>{let{abortSignal:s}=m||{},c,y=new Promise((e,r)=>c=r);function u(){let e=new Error("This operation was aborted");e.name="AbortError",c(e)}s?.addEventListener("abort",u);let l=typeof i=="function"?i(t):i,p=()=>o.query(t.sql,t.parameters,{rowMode:"object"}),P=l>0?()=>new Promise(e=>setTimeout(e,l)).then(()=>p()):p;try{let e=typeof a=="function"?a(t):a,r;e&&console.log("PGLiteExecutor: Executing query:",r=JSON.stringify(t,null,2));let f=Date.now(),x=await Promise.race([P(),y]),g=Date.now()-f;return e&&console.log("PGLiteExecutor: Query executed in",g,"ms:",r),[null,x.rows]}catch(e){return[e]}finally{s?.removeEventListener("abort",u)}}}}function G(o,n){return d({executor:b(o,n)})}export{G as createPGLiteAdapter,b as createPGLiteExecutor};
|