Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prisma/studio

Package Overview
Dependencies
Maintainers
4
Versions
530
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/studio - npm Package Compare versions

Comparing version 0.114.0 to 0.115.0

build/studioBundle.5793440770cf3451b9b4.css

2

build/electronBus.js

@@ -1,2 +0,2 @@

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=468)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r="photon",s="-photon";let o=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[o]={resolve:n,reject:s},window.transport.send(r,{requestId:o,action:e,data:t}),o++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r="project",s="-project";class o{async open(e){window.transport.send(r,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(r,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(r,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(r,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.114.0"}}).call(this,n(92))},468:function(e,t,n){n(175),e.exports=n(474)},474:function(e,t,n){"use strict";n.r(t);const r=require("electron").ipcRenderer;var s=n(155),o=n(156);const i="window";const c="update",a="-update";window.transport=new class{constructor(){this.type="electron",this.listeners={},this.fireListenersForChannel=(e,t)=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))}}once(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t}),r.once(e,this.onMessage.bind(this,e))}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t}),r.on(e,this.onMessage.bind(this,e))}send(e,t){r.send(e,t)}reconnect(){}onMessage(e,t,n){this.fireListenersForChannel(e,n)}},window.bus={photon:new s.a,project:new o.a,window:new class{resize({width:e,height:t}){window.transport.send(i,{action:"resize",data:{width:e,height:t}})}},update:new class{constructor(){window.transport.once(a,({action:e})=>{})}install(){window.transport.send(c,{action:"install"})}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=468)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r="photon",s="-photon";let o=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[o]={resolve:n,reject:s},window.transport.send(r,{requestId:o,action:e,data:t}),o++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r="project",s="-project";class o{async open(e){window.transport.send(r,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(r,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(r,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(r,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.115.0"}}).call(this,n(92))},468:function(e,t,n){n(175),e.exports=n(474)},474:function(e,t,n){"use strict";n.r(t);const r=require("electron").ipcRenderer;var s=n(155),o=n(156);const i="window";const c="update",a="-update";window.transport=new class{constructor(){this.type="electron",this.listeners={},this.fireListenersForChannel=(e,t)=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))}}once(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t}),r.once(e,this.onMessage.bind(this,e))}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t}),r.on(e,this.onMessage.bind(this,e))}send(e,t){r.send(e,t)}reconnect(){}onMessage(e,t,n){this.fireListenersForChannel(e,n)}},window.bus={photon:new s.a,project:new o.a,window:new class{resize({width:e,height:t}){window.transport.send(i,{action:"resize",data:{width:e,height:t}})}},update:new class{constructor(){window.transport.once(a,({action:e})=>{})}install(){window.transport.send(c,{action:"install"})}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
//# sourceMappingURL=electronBus.js.map

@@ -1,2 +0,2 @@

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=470)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r="photon",s="-photon";let o=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[o]={resolve:n,reject:s},window.transport.send(r,{requestId:o,action:e,data:t}),o++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r="project",s="-project";class o{async open(e){window.transport.send(r,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(r,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(r,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(r,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.114.0"}}).call(this,n(92))},470:function(e,t,n){n(175),e.exports=n(476)},476:function(e,t,n){"use strict";n.r(t);var r=n(155),s=n(156);window.transport=new class{constructor(e){this.type="http",this.listeners={},this.fireListenersForChannel=(e,t)=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))},this.baseUrl=e}once(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t})}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t})}send(e,t){const n=`-${e}`,r=new URL(this.baseUrl);r.pathname=e,fetch(r.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(e=>200===e.status?e.json():(console.log("Non-200 Status Code in HTTPTransport.send. Body:",e.body),{error:{message:"Error in HTTP Request",status:e.status,body:e.body}})).then(e=>{if(e.error)throw e.error;return this.fireListenersForChannel(n,e.data)})}reconnect(){}}(`https://prisma-studio.now.sh${location.search}`),window.bus={photon:new r.a,project:new s.a,window:{resize:async()=>{}},update:{install:async()=>{}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=470)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r="photon",s="-photon";let o=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[o]={resolve:n,reject:s},window.transport.send(r,{requestId:o,action:e,data:t}),o++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const r="project",s="-project";class o{async open(e){window.transport.send(r,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(r,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(r,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(r,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:r})=>n?t(n):e(r)),window.transport.send(r,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.115.0"}}).call(this,n(92))},470:function(e,t,n){n(175),e.exports=n(476)},476:function(e,t,n){"use strict";n.r(t);var r=n(155),s=n(156);window.transport=new class{constructor(e){this.type="http",this.listeners={},this.fireListenersForChannel=(e,t)=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))},this.baseUrl=e}once(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t})}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t})}send(e,t){const n=`-${e}`,r=new URL(this.baseUrl);r.pathname=e,fetch(r.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(e=>200===e.status?e.json():(console.log("Non-200 Status Code in HTTPTransport.send. Body:",e.body),{error:{message:"Error in HTTP Request",status:e.status,body:e.body}})).then(e=>{if(e.error)throw e.error;return this.fireListenersForChannel(n,e.data)})}reconnect(){}}(`https://prisma-studio.now.sh${location.search}`),window.bus={photon:new r.a,project:new s.a,window:{resize:async()=>{}},update:{install:async()=>{}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
//# sourceMappingURL=previewBus.js.map

@@ -1,2 +0,2 @@

!function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=469)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const o="photon",s="-photon";let r=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[r]={resolve:n,reject:s},window.transport.send(o,{requestId:r,action:e,data:t}),r++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const o="project",s="-project";class r{async open(e){window.transport.send(o,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(o,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(o,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(o,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:o})=>n?t(n):e(o)),window.transport.send(o,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:o})=>n?t(n):e(o)),window.transport.send(o,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.114.0"}}).call(this,n(92))},469:function(e,t,n){n(175),e.exports=n(475)},475:function(e,t,n){"use strict";n.r(t);const o=15;var s=n(155),r=n(156);window.transport=new class{constructor(){this.type="websocket",this.listeners={},this.queuedEvents=[],this.once=(e,t)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t})},this.on=(e,t)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t})},this.send=(e,t)=>{if(this.socket.readyState!==WebSocket.OPEN)return console.log("Websocket not open. Queueing this event:",JSON.stringify(t)),void this.queuedEvents.push({channel:e,payload:t});this.socket.send(JSON.stringify({channel:e,payload:t}))},this.onOpen=()=>{console.log("Socket connection established"),this.fireListenersForChannel("connect"),this.reconnectTimeoutHandle&&(clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0,this.fireListenersForChannel("reconnect")),this.queuedEvents.length>0&&(console.log("Replaying queued events"),this.queuedEvents.forEach(e=>this.send(e.channel,e.payload)),this.queuedEvents=[])},this.onClose=()=>{this.reconnectTimeoutHandle||(console.log("Socket connection interrupted"),this.fireListenersForChannel("disconnect"))},this.onMessage=e=>{try{const{channel:t,payload:n={}}=JSON.parse(e.data);this.fireListenersForChannel(t,n)}catch(t){console.log("Malformed response from server, ignoring",e.data,t)}},this.fireListenersForChannel=(e,t={})=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))},this.connect()}reconnect(){console.log("Attempting to reconnect");let e=0;clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;const t=()=>{const n=100*Math.pow(2,e);e!==o?(console.log(`Retry connect after ${n}ms`),this.connect(),this.reconnectTimeoutHandle=setTimeout(()=>{e++,t()},n)):console.log(`${o} retry attempts failed. Giving up.`)};t()}connect(){const{protocol:e,host:t}=window.location,n=`${e.replace(/http/,"ws")}//${t}`;this.socket=new WebSocket(n),this.socket.addEventListener("open",this.onOpen),this.socket.addEventListener("message",this.onMessage),this.socket.addEventListener("close",this.onClose)}},window.bus={photon:new s.a,project:new r.a,window:{resize:async()=>{}},update:{install:async()=>{}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=469)}({155:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const o="photon",s="-photon";let r=0;class i{constructor(){this.requests={},this._onMessage=({requestId:e,data:t,error:n})=>{if(this.requests[e])return n?this.requests[e].reject(n):this.requests[e].resolve(t),void delete this.requests[e]},window.transport.on(s,this._onMessage)}connect(e){return this._execute("connect",{credentials:e})}disconnect(){return this._execute("disconnect")}request(e){return this._execute("request",{query:e})}_execute(e,t={}){return new Promise(async(n,s)=>{this.requests[r]={resolve:n,reject:s},window.transport.send(o,{requestId:r,action:e,data:t}),r++})}}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const o="project",s="-project";class r{async open(e){window.transport.send(o,{action:"open",data:{id:e}})}async create(e,t){window.transport.send(o,{action:"create",data:Object.assign({credentials:e},t)})}async connectOnly(e){window.transport.send(o,{action:"connect",data:{credentials:e}})}async validate(e){return new Promise(async t=>{window.transport.once(s,({error:e})=>t({error:e})),window.transport.send(o,{action:"validate",data:{credentials:e}})})}async getProject(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:o})=>n?t(n):e(o)),window.transport.send(o,{action:"get",data:{}})})}async getAll(){return new Promise(async(e,t)=>{window.transport.once(s,({error:n,data:o})=>n?t(n):e(o)),window.transport.send(o,{action:"get-all",data:{}})})}}},175:function(e,t,n){(function(e){("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.115.0"}}).call(this,n(92))},469:function(e,t,n){n(175),e.exports=n(475)},475:function(e,t,n){"use strict";n.r(t);const o=15;var s=n(155),r=n(156);window.transport=new class{constructor(){this.type="websocket",this.listeners={},this.queuedEvents=[],this.once=(e,t)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!0,callback:t})},this.on=(e,t)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({once:!1,callback:t})},this.send=(e,t)=>{if(this.socket.readyState!==WebSocket.OPEN)return console.log("Websocket not open. Queueing this event:",JSON.stringify(t)),void this.queuedEvents.push({channel:e,payload:t});this.socket.send(JSON.stringify({channel:e,payload:t}))},this.onOpen=()=>{console.log("Socket connection established"),this.fireListenersForChannel("connect"),this.reconnectTimeoutHandle&&(clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0,this.fireListenersForChannel("reconnect")),this.queuedEvents.length>0&&(console.log("Replaying queued events"),this.queuedEvents.forEach(e=>this.send(e.channel,e.payload)),this.queuedEvents=[])},this.onClose=()=>{this.reconnectTimeoutHandle||(console.log("Socket connection interrupted"),this.fireListenersForChannel("disconnect"))},this.onMessage=e=>{try{const{channel:t,payload:n={}}=JSON.parse(e.data);this.fireListenersForChannel(t,n)}catch(t){console.log("Malformed response from server, ignoring",e.data,t)}},this.fireListenersForChannel=(e,t={})=>{const n=this.listeners[e];n&&(this.listeners[e]=n.filter(({once:e,callback:n})=>(n(t),!e)))},this.connect()}reconnect(){console.log("Attempting to reconnect");let e=0;clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;const t=()=>{const n=100*Math.pow(2,e);e!==o?(console.log(`Retry connect after ${n}ms`),this.connect(),this.reconnectTimeoutHandle=setTimeout(()=>{e++,t()},n)):console.log(`${o} retry attempts failed. Giving up.`)};t()}connect(){const{protocol:e,host:t}=window.location,n=`${e.replace(/http/,"ws")}//${t}`;this.socket=new WebSocket(n),this.socket.addEventListener("open",this.onOpen),this.socket.addEventListener("message",this.onMessage),this.socket.addEventListener("close",this.onClose)}},window.bus={photon:new s.a,project:new r.a,window:{resize:async()=>{}},update:{install:async()=>{}}}},92:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}});
//# sourceMappingURL=serverBus.js.map
{
"name": "@prisma/studio",
"version": "0.114.0",
"version": "0.115.0",
"description": "Moden database IDE",

@@ -65,3 +65,3 @@ "author": "Siddhant <me@madebysid.com>",

"@babel/preset-typescript": "^7.3.3",
"@prisma/studio-transports": "0.114.0",
"@prisma/studio-transports": "0.115.0",
"@sentry/browser": "^5.6.2",

@@ -68,0 +68,0 @@ "@sentry/webpack-plugin": "^1.9.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc