@prisma/studio-core 0.0.0-dev.202504300949 → 0.0.0-dev.202504301002
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/data/pglite/index.cjs +1 -1
- package/dist/data/pglite/index.d.cts +15 -4
- package/dist/data/pglite/index.d.ts +15 -4
- package/dist/data/pglite/index.js +1 -1
- package/dist/ui/index.cjs +21 -21
- package/dist/ui/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
2
|
import { A as Adapter } from '../../adapter-BJtXh9Gf.cjs';
|
|
3
|
-
import { E as Executor } from '../../index-Dq8DiI_o.cjs';
|
|
3
|
+
import { Q as Query, E as Executor } from '../../index-Dq8DiI_o.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
|
+
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
16
|
+
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
17
|
+
}
|
|
18
|
+
declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
|
|
8
19
|
|
|
9
|
-
export { createPGLiteAdapter, createPGLiteExecutor };
|
|
20
|
+
export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { PGlite } from '@electric-sql/pglite';
|
|
2
2
|
import { A as Adapter } from '../../adapter-BJtXh9Gf.js';
|
|
3
|
-
import { E as Executor } from '../../index-fE6YzF75.js';
|
|
3
|
+
import { Q as Query, E as Executor } from '../../index-fE6YzF75.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
|
+
declare function createPGLiteExecutor(pglite: PGlite, options?: PGLiteExecutorOptions): Executor;
|
|
16
|
+
interface PGLiteAdapterOptions extends PGLiteExecutorOptions {
|
|
17
|
+
}
|
|
18
|
+
declare function createPGLiteAdapter(pglite: PGlite, options?: PGLiteAdapterOptions): Adapter;
|
|
8
19
|
|
|
9
|
-
export { createPGLiteAdapter, createPGLiteExecutor };
|
|
20
|
+
export { type PGLiteAdapterOptions, type PGLiteExecutorOptions, createPGLiteAdapter, createPGLiteExecutor };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i}from"../../chunk-TCZDODDW.js";import"../../chunk-RGBMDID6.js";import"../../chunk-BMVJYUJW.js";function
|
|
1
|
+
import{i as p}from"../../chunk-TCZDODDW.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};
|