@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.
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var l=(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 c(e))!Q.call(r,t)&&t!==n&&i(r,t,{get:()=>e[t],enumerable:!(u=y(e,t))||u.enumerable});return r};var F=r=>d(i({},"__esModule",{value:!0}),r);var R={};l(R,{createStudioBFFClient:()=>f});module.exports=F(R);function f(r){let{customHeaders:e,customPayload:n,fetchFn:u=fetch,url:t}=r;return{async query(a){try{let o=await u(new URL("query",t),{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});
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
- fetchFn?: typeof fetch;
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
  /**
@@ -19,13 +19,13 @@ interface StudioBFFClientProps {
19
19
  *
20
20
  * e.g. for testing, or older Node.js versions.
21
21
  */
22
- fetchFn?: typeof fetch;
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
  /**
@@ -1 +1 @@
1
- import"../../chunk-2FW6TKD6.js";function c(t){let{customHeaders:n,customPayload:o,fetchFn:u=fetch,url:s}=t;return{async query(i){try{let e=await u(new URL("query",s),{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{c as createStudioBFFClient};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/studio-core",
3
- "version": "0.0.0-dev.202503251500",
3
+ "version": "0.0.0-dev.202503251736",
4
4
  "description": "Modular Prisma Studio components",
5
5
  "type": "module",
6
6
  "sideEffects": false,