@prisma/studio-core 0.0.0-dev.202504292225 → 0.0.0-dev.202504300806

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.
@@ -1,20 +1,9 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
- import { A as Adapter } from '../../adapter-ClY8JSgB.cjs';
3
- import { Q as Query, E as Executor } from '../../index-BanPmfQa.cjs';
2
+ import { A as Adapter } from '../../adapter-fgW3WhES.cjs';
3
+ import { E as Executor } from '../../index-BersuYMP.cjs';
4
4
  import 'kysely';
5
5
 
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
- declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
16
- interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
17
- }
18
- declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
6
+ declare function createPGLiteExecutor(pglite: PGlite): Executor;
7
+ declare function createPGLiteAdapter(pglite: PGlite): Adapter;
19
8
 
20
- export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
9
+ export { createPGLiteAdapter, createPGLiteExecutor };
@@ -1,20 +1,9 @@
1
1
  import { PGlite } from '@electric-sql/pglite';
2
- import { A as Adapter } from '../../adapter-ClY8JSgB.js';
3
- import { Q as Query, E as Executor } from '../../index-LzQyewM3.js';
2
+ import { A as Adapter } from '../../adapter-fgW3WhES.js';
3
+ import { E as Executor } from '../../index-BzRwl_zd.js';
4
4
  import 'kysely';
5
5
 
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
- declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
16
- interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
17
- }
18
- declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
6
+ declare function createPGLiteExecutor(pglite: PGlite): Executor;
7
+ declare function createPGLiteAdapter(pglite: PGlite): Adapter;
19
8
 
20
- export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
9
+ export { createPGLiteAdapter, createPGLiteExecutor };
@@ -1 +1 @@
1
- import{i as p}from"../../chunk-QTG5SZZY.js";import"../../chunk-RGBMDID6.js";import"../../chunk-BMVJYUJW.js";function y(t,r){let{addDelay:o=0}=r??{};return{execute:async(n,d)=>{let{abortSignal:i}=d||{},a,l=new Promise((e,P)=>a=P);function s(){let e=new Error("This operation was aborted");e.name="AbortError",a(e)}i?.addEventListener("abort",s);let c=typeof o=="function"?o(n):o,u=()=>t.query(n.sql,n.parameters,{rowMode:"object"}),m=c>0?()=>new Promise(e=>setTimeout(e,c)).then(()=>u()):u;try{return[null,(await Promise.race([m(),l])).rows]}catch(e){return[e]}finally{i?.removeEventListener("abort",s)}}}}function b(t,r){return p({executor:y(t,r)})}export{b as createPGLiteAdapter,y as createPGLiteExecutor};
1
+ import{i}from"../../chunk-TCZDODDW.js";import"../../chunk-RGBMDID6.js";import"../../chunk-BMVJYUJW.js";function p(e){return{execute:async(t,s)=>{let{abortSignal:o}=s||{},n,c=new Promise((r,u)=>n=u);function a(){let r=new Error("This operation was aborted");r.name="AbortError",n(r)}o?.addEventListener("abort",a);try{return[null,(await Promise.race([e.query(t.sql,t.parameters,{rowMode:"object"}),c])).rows]}catch(r){return[r]}finally{o?.removeEventListener("abort",a)}}}}function d(e){return i({executor:p(e)})}export{d as createPGLiteAdapter,p as createPGLiteExecutor};