@prisma/studio-core 0.0.0-dev.202504221935 → 0.0.0-dev.202504221955
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/bff/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var
|
|
1
|
+
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var f=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},F=(t,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!x.call(t,r)&&r!==o&&i(t,r,{get:()=>e[r],enumerable:!(u=p(e,r))||u.enumerable});return t};var h=t=>F(i({},"__esModule",{value:!0}),t);var w={};f(w,{createStudioBFFClient:()=>Q});module.exports=h(w);function Q(t){let{customHeaders:e,customPayload:o,resultDeserializerFn:u,url:r}=t,a=t.fetch||fetch;return{async execute(l,y){try{let n=await a(r,{body:JSON.stringify({customPayload:o,procedure:"query",query:l}),headers:{Accept:"application/json","Content-Type":"application/json",...e},method:"POST",signal:y?.abortSignal});if(!n.ok){let s;try{s=await n.text()}catch{s="unknown error"}return[new Error(s)]}let c=await n.json();return[null,u?.(c)||c]}catch(n){return[n]}}}}0&&(module.exports={createStudioBFFClient});
|
|
@@ -21,6 +21,12 @@ interface StudioBFFClientProps {
|
|
|
21
21
|
* e.g. for testing, or older Node.js versions.
|
|
22
22
|
*/
|
|
23
23
|
fetch?: typeof globalThis.fetch;
|
|
24
|
+
/**
|
|
25
|
+
* Function used to deserialize the results of queries.
|
|
26
|
+
*
|
|
27
|
+
* By default, the results are returned as is without any additional processing.
|
|
28
|
+
*/
|
|
29
|
+
resultDeserializerFn?(this: void, results: unknown): unknown[];
|
|
24
30
|
/**
|
|
25
31
|
* BFF endpoint URL.
|
|
26
32
|
*
|
package/dist/data/bff/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ interface StudioBFFClientProps {
|
|
|
21
21
|
* e.g. for testing, or older Node.js versions.
|
|
22
22
|
*/
|
|
23
23
|
fetch?: typeof globalThis.fetch;
|
|
24
|
+
/**
|
|
25
|
+
* Function used to deserialize the results of queries.
|
|
26
|
+
*
|
|
27
|
+
* By default, the results are returned as is without any additional processing.
|
|
28
|
+
*/
|
|
29
|
+
resultDeserializerFn?(this: void, results: unknown): unknown[];
|
|
24
30
|
/**
|
|
25
31
|
* BFF endpoint URL.
|
|
26
32
|
*
|
package/dist/data/bff/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-2FW6TKD6.js";function
|
|
1
|
+
import"../../chunk-2FW6TKD6.js";function p(r){let{customHeaders:n,customPayload:u,resultDeserializerFn:s,url:i}=r,c=r.fetch||fetch;return{async execute(a,l){try{let e=await c(i,{body:JSON.stringify({customPayload:u,procedure:"query",query:a}),headers:{Accept:"application/json","Content-Type":"application/json",...n},method:"POST",signal:l?.abortSignal});if(!e.ok){let t;try{t=await e.text()}catch{t="unknown error"}return[new Error(t)]}let o=await e.json();return[null,s?.(o)||o]}catch(e){return[e]}}}}export{p as createStudioBFFClient};
|