@prisma/studio-core 0.0.0-dev.202503251749 → 0.0.0-dev.202503251759

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 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});
1
+ "use strict";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(r,e)=>{for(var o in e)i(r,o,{get:e[o],enumerable:!0})},Q=(r,e,o,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of y(e))!l.call(r,t)&&t!==o&&i(r,t,{get:()=>e[t],enumerable:!(u=c(e,t))||u.enumerable});return r};var p=r=>Q(i({},"__esModule",{value:!0}),r);var R={};d(R,{createStudioBFFClient:()=>f});module.exports=p(R);function f(r){let{customHeaders:e,customPayload:o,url:u}=r,t=r.fetch||fetch;return{async query(a){try{let n=await t(u,{body:JSON.stringify({customPayload:o,procedure:"query",query:a}),headers:{Accept:"application/json","Content-Type":"application/json",...e},method:"POST"});if(!n.ok){let s;try{s=await n.text()}catch{s="unknown error"}return{error:new Error(s),results:[]}}return{error:null,results:await n.json()}}catch(n){return{error:n,results:[]}}}}}0&&(module.exports={createStudioBFFClient});
@@ -29,7 +29,7 @@ interface StudioBFFClientProps {
29
29
  }
30
30
  interface StudioBFFClient {
31
31
  /**
32
- * Requests BFF to query the database at `${url}/query`.
32
+ * Requests BFF to query the database.
33
33
  *
34
34
  * The query is sent as `body.query`.
35
35
  */
@@ -37,6 +37,7 @@ interface StudioBFFClient {
37
37
  }
38
38
  interface StudioBFFQueryRequest {
39
39
  customPayload?: Record<string, unknown>;
40
+ procedure: "query";
40
41
  query: Query<unknown>;
41
42
  }
42
43
  interface StudioBFFQueryResponse<Q extends Query> {
@@ -29,7 +29,7 @@ interface StudioBFFClientProps {
29
29
  }
30
30
  interface StudioBFFClient {
31
31
  /**
32
- * Requests BFF to query the database at `${url}/query`.
32
+ * Requests BFF to query the database.
33
33
  *
34
34
  * The query is sent as `body.query`.
35
35
  */
@@ -37,6 +37,7 @@ interface StudioBFFClient {
37
37
  }
38
38
  interface StudioBFFQueryRequest {
39
39
  customPayload?: Record<string, unknown>;
40
+ procedure: "query";
40
41
  query: Query<unknown>;
41
42
  }
42
43
  interface StudioBFFQueryResponse<Q extends Query> {
@@ -1 +1 @@
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};
1
+ import"../../chunk-2FW6TKD6.js";function y(t){let{customHeaders:o,customPayload:n,url:u}=t,s=t.fetch||fetch;return{async query(i){try{let e=await s(u,{body:JSON.stringify({customPayload:n,procedure:"query",query:i}),headers:{Accept:"application/json","Content-Type":"application/json",...o},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.202503251749",
3
+ "version": "0.0.0-dev.202503251759",
4
4
  "description": "Modular Prisma Studio components",
5
5
  "type": "module",
6
6
  "sideEffects": false,