@prisma/studio-core 0.0.0-dev.202503251500 → 0.0.0-dev.202503251736
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 c=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var Q=(r,e)=>{for(var n in e)i(r,n,{get:e[n],enumerable:!0})},d=(r,e,n,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of y(e))!l.call(r,t)&&t!==n&&i(r,t,{get:()=>e[t],enumerable:!(u=c(e,t))||u.enumerable});return r};var F=r=>d(i({},"__esModule",{value:!0}),r);var R={};Q(R,{createStudioBFFClient:()=>f});module.exports=F(R);function f(r){let{customHeaders:e,customPayload:n,url:u}=r,t=r.fetch||fetch;return{async query(a){try{let o=await t(new URL("query",u),{body:JSON.stringify({customPayload:n,query:a}),headers:{Accept:"application/json","Content-Type":"application/json",...e},method:"POST"});if(!o.ok){let s;try{s=await o.text()}catch{s="unknown error"}return{error:new Error(s),results:[]}}return{error:null,results:await o.json()}}catch(o){return{error:o,results:[]}}}}}0&&(module.exports={createStudioBFFClient});
|
|
@@ -19,13 +19,13 @@ interface StudioBFFClientProps {
|
|
|
19
19
|
*
|
|
20
20
|
* e.g. for testing, or older Node.js versions.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
fetch?: typeof globalThis.fetch;
|
|
23
23
|
/**
|
|
24
24
|
* BFF endpoint URL.
|
|
25
25
|
*
|
|
26
26
|
* e.g. `https://api.example.com/studio`
|
|
27
27
|
*/
|
|
28
|
-
url: string;
|
|
28
|
+
url: string | URL;
|
|
29
29
|
}
|
|
30
30
|
interface StudioBFFClient {
|
|
31
31
|
/**
|
package/dist/data/bff/index.d.ts
CHANGED
|
@@ -19,13 +19,13 @@ interface StudioBFFClientProps {
|
|
|
19
19
|
*
|
|
20
20
|
* e.g. for testing, or older Node.js versions.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
fetch?: typeof globalThis.fetch;
|
|
23
23
|
/**
|
|
24
24
|
* BFF endpoint URL.
|
|
25
25
|
*
|
|
26
26
|
* e.g. `https://api.example.com/studio`
|
|
27
27
|
*/
|
|
28
|
-
url: string;
|
|
28
|
+
url: string | URL;
|
|
29
29
|
}
|
|
30
30
|
interface StudioBFFClient {
|
|
31
31
|
/**
|
package/dist/data/bff/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-2FW6TKD6.js";function
|
|
1
|
+
import"../../chunk-2FW6TKD6.js";function y(t){let{customHeaders:n,customPayload:o,url:u}=t,s=t.fetch||fetch;return{async query(i){try{let e=await s(new URL("query",u),{body:JSON.stringify({customPayload:o,query:i}),headers:{Accept:"application/json","Content-Type":"application/json",...n},method:"POST"});if(!e.ok){let r;try{r=await e.text()}catch{r="unknown error"}return{error:new Error(r),results:[]}}return{error:null,results:await e.json()}}catch(e){return{error:e,results:[]}}}}}export{y as createStudioBFFClient};
|