@prisma/studio-core 0.0.0-dev.202503251921 → 0.0.0-dev.202503252017
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/chunk-2FW6TKD6.js +1 -0
- package/dist/data/accelerate/index.cjs +1 -30
- package/dist/data/accelerate/index.d.cts +2 -2
- package/dist/data/accelerate/index.d.ts +2 -2
- package/dist/data/accelerate/index.js +1 -30
- package/dist/data/index.d.cts +0 -3
- package/dist/data/index.d.ts +0 -3
- package/dist/data/index.js +1 -1
- package/dist/data/postgres-core/index.d.cts +1 -1
- package/dist/data/postgres-core/index.d.ts +1 -1
- package/dist/data/postgres-core/index.js +1 -1
- package/dist/{query-L1_vLuFd.d.cts → query-YoAEw-K9.d.cts} +1 -1
- package/dist/{query-L1_vLuFd.d.ts → query-YoAEw-K9.d.ts} +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -11
- package/dist/chunk-2GA4C2EY.js +0 -1
- package/dist/data/bff/index.cjs +0 -1
- package/dist/data/bff/index.d.cts +0 -52
- package/dist/data/bff/index.d.ts +0 -52
- package/dist/data/bff/index.js +0 -1
package/dist/ui/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../chunk-2FW6TKD6.js";import{jsx as t}from"react/jsx-runtime";function e(){return t("h1",{className:"tw-preflight ps:p-10",children:"Hello, world!"})}export{e as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/studio-core",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.202503252017",
|
|
4
4
|
"description": "Modular Prisma Studio components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,16 +25,6 @@
|
|
|
25
25
|
"default": "./dist/data/accelerate/index.cjs"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"./data/bff": {
|
|
29
|
-
"import": {
|
|
30
|
-
"types": "./dist/data/bff/index.d.ts",
|
|
31
|
-
"default": "./dist/data/bff/index.js"
|
|
32
|
-
},
|
|
33
|
-
"require": {
|
|
34
|
-
"types": "./dist/data/bff/index.d.cts",
|
|
35
|
-
"default": "./dist/data/bff/index.cjs"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
28
|
"./data/postgres-core": {
|
|
39
29
|
"import": {
|
|
40
30
|
"types": "./dist/data/postgres-core/index.d.ts",
|
package/dist/chunk-2GA4C2EY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var l=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var m=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var q=(a,b,c)=>(c=a!=null?g(j(a)):{},m(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));var t,o=l(()=>{t={postgres:{encoded:"ZGF0YXNvdXJjZSBkYiB7CiAgICBwcm92aWRlciA9ICJwb3N0Z3JlcyIKICAgIHVybCAgICAgID0gZW52KCJEQVRBQkFTRV9VUkwiKQp9CiAgICAKZ2VuZXJhdG9yIGNsaWVudCB7CiAgICBwcm92aWRlciA9ICJwcmlzbWEtY2xpZW50LWpzIgp9",hash:"54195896aeafa3318ca33f5a8bb44c6b4d89c368cb15288f3bd5ace35a3f9227"}}});export{p as a,q as b,o as c,t as d};
|
package/dist/data/bff/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Q as Query, a as QueryResult } from '../../query-L1_vLuFd.cjs';
|
|
2
|
-
import 'kysely';
|
|
3
|
-
|
|
4
|
-
interface StudioBFFClientProps {
|
|
5
|
-
/**
|
|
6
|
-
* Allows passing custom headers to the BFF.
|
|
7
|
-
*
|
|
8
|
-
* e.g. authorization token.
|
|
9
|
-
*/
|
|
10
|
-
customHeaders?: Record<string, string>;
|
|
11
|
-
/**
|
|
12
|
-
* Allows passing custom payload to the BFF via `body.customPayload`.
|
|
13
|
-
*
|
|
14
|
-
* e.g. tenant id.
|
|
15
|
-
*/
|
|
16
|
-
customPayload?: Record<string, unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* Allows overriding the fetch function implementation.
|
|
19
|
-
*
|
|
20
|
-
* e.g. for testing, or older Node.js versions.
|
|
21
|
-
*/
|
|
22
|
-
fetch?: typeof globalThis.fetch;
|
|
23
|
-
/**
|
|
24
|
-
* BFF endpoint URL.
|
|
25
|
-
*
|
|
26
|
-
* e.g. `https://api.example.com/studio`
|
|
27
|
-
*/
|
|
28
|
-
url: string | URL;
|
|
29
|
-
}
|
|
30
|
-
interface StudioBFFClient {
|
|
31
|
-
/**
|
|
32
|
-
* Requests BFF to query the database.
|
|
33
|
-
*
|
|
34
|
-
* The query is sent as `body.query`.
|
|
35
|
-
*/
|
|
36
|
-
query<Q extends Query>(query: Q): Promise<StudioBFFQueryResponse<Q>>;
|
|
37
|
-
}
|
|
38
|
-
interface StudioBFFQueryRequest {
|
|
39
|
-
customPayload?: Record<string, unknown>;
|
|
40
|
-
procedure: "query";
|
|
41
|
-
query: Query<unknown>;
|
|
42
|
-
}
|
|
43
|
-
interface StudioBFFQueryResponse<Q extends Query> {
|
|
44
|
-
error: unknown;
|
|
45
|
-
results: QueryResult<Q>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates a Studio BFF client. BFF stands for "Backend For Frontend" btw.
|
|
49
|
-
*/
|
|
50
|
-
declare function createStudioBFFClient(props: StudioBFFClientProps): StudioBFFClient;
|
|
51
|
-
|
|
52
|
-
export { type StudioBFFClient, type StudioBFFClientProps, type StudioBFFQueryRequest, type StudioBFFQueryResponse, createStudioBFFClient };
|
package/dist/data/bff/index.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Q as Query, a as QueryResult } from '../../query-L1_vLuFd.js';
|
|
2
|
-
import 'kysely';
|
|
3
|
-
|
|
4
|
-
interface StudioBFFClientProps {
|
|
5
|
-
/**
|
|
6
|
-
* Allows passing custom headers to the BFF.
|
|
7
|
-
*
|
|
8
|
-
* e.g. authorization token.
|
|
9
|
-
*/
|
|
10
|
-
customHeaders?: Record<string, string>;
|
|
11
|
-
/**
|
|
12
|
-
* Allows passing custom payload to the BFF via `body.customPayload`.
|
|
13
|
-
*
|
|
14
|
-
* e.g. tenant id.
|
|
15
|
-
*/
|
|
16
|
-
customPayload?: Record<string, unknown>;
|
|
17
|
-
/**
|
|
18
|
-
* Allows overriding the fetch function implementation.
|
|
19
|
-
*
|
|
20
|
-
* e.g. for testing, or older Node.js versions.
|
|
21
|
-
*/
|
|
22
|
-
fetch?: typeof globalThis.fetch;
|
|
23
|
-
/**
|
|
24
|
-
* BFF endpoint URL.
|
|
25
|
-
*
|
|
26
|
-
* e.g. `https://api.example.com/studio`
|
|
27
|
-
*/
|
|
28
|
-
url: string | URL;
|
|
29
|
-
}
|
|
30
|
-
interface StudioBFFClient {
|
|
31
|
-
/**
|
|
32
|
-
* Requests BFF to query the database.
|
|
33
|
-
*
|
|
34
|
-
* The query is sent as `body.query`.
|
|
35
|
-
*/
|
|
36
|
-
query<Q extends Query>(query: Q): Promise<StudioBFFQueryResponse<Q>>;
|
|
37
|
-
}
|
|
38
|
-
interface StudioBFFQueryRequest {
|
|
39
|
-
customPayload?: Record<string, unknown>;
|
|
40
|
-
procedure: "query";
|
|
41
|
-
query: Query<unknown>;
|
|
42
|
-
}
|
|
43
|
-
interface StudioBFFQueryResponse<Q extends Query> {
|
|
44
|
-
error: unknown;
|
|
45
|
-
results: QueryResult<Q>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates a Studio BFF client. BFF stands for "Backend For Frontend" btw.
|
|
49
|
-
*/
|
|
50
|
-
declare function createStudioBFFClient(props: StudioBFFClientProps): StudioBFFClient;
|
|
51
|
-
|
|
52
|
-
export { type StudioBFFClient, type StudioBFFClientProps, type StudioBFFQueryRequest, type StudioBFFQueryResponse, createStudioBFFClient };
|
package/dist/data/bff/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"../../chunk-2GA4C2EY.js";r();r();function l(o){let{customHeaders:n,customPayload:u,url:s}=o,i=o.fetch||fetch;return{async query(a){try{let e=await i(s,{body:JSON.stringify({customPayload:u,procedure:"query",query:a}),headers:{Accept:"application/json","Content-Type":"application/json",...n},method:"POST"});if(!e.ok){let t;try{t=await e.text()}catch{t="unknown error"}return{error:new Error(t),results:[]}}return{error:null,results:await e.json()}}catch(e){return{error:e,results:[]}}}}}export{l as createStudioBFFClient};
|