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

@plasmicapp/data-sources

Package Overview
Dependencies
Maintainers
1
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasmicapp/data-sources - npm Package Compare versions

Comparing version 0.1.2 to 0.1.4

6

dist/data-sources.cjs.development.js

@@ -887,8 +887,8 @@ 'use strict';

function getConfig(key, defaultValue) {
if (typeof window === 'undefined') {
if (typeof globalThis === 'undefined') {
return defaultValue;
} else {
var _window$key;
var _globalThis$key;
return (_window$key = window[key]) != null ? _window$key : defaultValue;
return (_globalThis$key = globalThis[key]) != null ? _globalThis$key : defaultValue;
}

@@ -895,0 +895,0 @@ }

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

"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@plasmicapp/host"),e=t(require("react")),n=require("@plasmicapp/data-sources-context"),o=require("@plasmicapp/query"),i=t(require("isomorphic-unfetch"));function a(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}function c(){return(c=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}function s(t,r){return t(r={exports:{}},r.exports),r.exports}var l=s((function(t){var r=function(t){var r=Object.prototype,e=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o=Object.create((r&&r.prototype instanceof f?r:f).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=x(a,e);if(u){if(u===l)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,i),o}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function h(){}function p(){}var d={};u(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(_([])));y&&y!==r&&e.call(y,o)&&(d=y);var m=p.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function w(t,r){var n;this._invoke=function(o,i){function a(){return new r((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&e.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):r.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,x(t,r),"throw"===r.method))return l;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,l;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,l)}function b(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(e.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,u(m,"constructor",p),u(p,"constructor",h),h.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===h||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),u(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new w(c(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),u(m,a,"Generator"),u(m,o,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=e.call(i,"catchLoc"),c=e.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),l},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),l}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:_(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}));function f(t,r){return h.apply(this,arguments)}function h(){return(h=u(l.mark((function t(r,e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=v("__PLASMIC_EXECUTE_DATA_OP",p),t.next=3,n(r,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,r){return d.apply(this,arguments)}function d(){return(d=u(l.mark((function t(r,e){var n,o,a,u;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=v("__PLASMIC_DATA_HOST","https://studio.plasmic.app"),a=o+"/api/v1/server-data/sources/"+r.sourceId+"/execute",t.next=4,i(a,{method:"POST",headers:c({"Content-Type":"application/json"},(null==e?void 0:e.userAuthToken)&&{"x-plasmic-data-user-auth-token":e.userAuthToken}),body:JSON.stringify({opId:r.opId,userArgs:null!=(n=r.userArgs)?n:{}})});case 4:if(200===(u=t.sent).status){t.next=10;break}return t.next=8,u.text();case 8:throw new Error(t.sent);case 10:return t.next=12,u.json();case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t,r){return"undefined"==typeof window?r:null!=(e=window[t])?e:r;var e}function y(t){var r=n.usePlasmicDataSourceContext();return o.useMutablePlasmicQueryData((function(){return t?JSON.stringify({sourceId:t.sourceId,opId:t.opId,args:t.userArgs}):null}),u(l.mark((function e(){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(t,{userAuthToken:null==r?void 0:r.userAuthToken});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))))}exports.Fetcher=function(t){var n,o=t.children,i=t.name,a=y(t.dataOp),u=a.data,c=a.error;return e.createElement(r.DataProvider,{name:null!=i?i:"data",data:u},c||null!=u&&u.error?e.createElement("div",null,"Error: ",(null==c?void 0:c.toString())||(null==u||null==(n=u.error)?void 0:n.message)):o)},exports.executePlasmicDataOp=f,exports.usePlasmicDataMutationOp=function(t){var r=null!=t?t:{},o=r.sourceId,i=r.opId,a=r.userArgs,c=n.usePlasmicDataSourceContext(),s=null==c?void 0:c.userAuthToken;return e.useCallback(u(l.mark((function t(){return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o&&i){t.next=2;break}return t.abrupt("return",void 0);case 2:return t.abrupt("return",f({sourceId:o,opId:i,userArgs:a},{userAuthToken:s}));case 3:case"end":return t.stop()}}),t)}))),[o,i,a,s])},exports.usePlasmicDataOp=y;
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("@plasmicapp/host"),e=t(require("react")),n=require("@plasmicapp/data-sources-context"),o=require("@plasmicapp/query"),i=t(require("isomorphic-unfetch"));function a(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function u(t){a(i,n,o,u,c,"next",t)}function c(t){a(i,n,o,u,c,"throw",t)}u(void 0)}))}}function c(){return(c=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t}).apply(this,arguments)}function s(t,r){return t(r={exports:{}},r.exports),r.exports}var l=s((function(t){var r=function(t){var r=Object.prototype,e=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o=Object.create((r&&r.prototype instanceof f?r:f).prototype),i=new E(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=x(a,e);if(u){if(u===l)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var c=s(t,r,e);if("normal"===c.type){if(n=e.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n="completed",e.method="throw",e.arg=c.arg)}}}(t,e,i),o}function s(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function h(){}function p(){}var d={};u(d,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(_([])));y&&y!==r&&e.call(y,o)&&(d=y);var g=p.prototype=f.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function w(t,r){var n;this._invoke=function(o,i){function a(){return new r((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&e.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):r.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,x(t,r),"throw"===r.method))return l;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,l;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,l):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,l)}function b(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(e.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=void 0,r.done=!0,r};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,u(g,"constructor",p),u(p,"constructor",h),h.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===h||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),u(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(r,e,n,o,i){void 0===i&&(i=Promise);var a=new w(c(r,e,n,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,o,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=_,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&e.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(e,n){return a.type="throw",a.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=e.call(i,"catchLoc"),c=e.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),l},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),L(e),l}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;L(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:_(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}));function f(t,r){return h.apply(this,arguments)}function h(){return(h=u(l.mark((function t(r,e){var n;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=v("__PLASMIC_EXECUTE_DATA_OP",p),t.next=3,n(r,e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,r){return d.apply(this,arguments)}function d(){return(d=u(l.mark((function t(r,e){var n,o,a,u;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=v("__PLASMIC_DATA_HOST","https://studio.plasmic.app"),a=o+"/api/v1/server-data/sources/"+r.sourceId+"/execute",t.next=4,i(a,{method:"POST",headers:c({"Content-Type":"application/json"},(null==e?void 0:e.userAuthToken)&&{"x-plasmic-data-user-auth-token":e.userAuthToken}),body:JSON.stringify({opId:r.opId,userArgs:null!=(n=r.userArgs)?n:{}})});case 4:if(200===(u=t.sent).status){t.next=10;break}return t.next=8,u.text();case 8:throw new Error(t.sent);case 10:return t.next=12,u.json();case 12:return t.abrupt("return",t.sent);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t,r){return"undefined"==typeof globalThis?r:null!=(e=globalThis[t])?e:r;var e}function y(t){var r=n.usePlasmicDataSourceContext();return o.useMutablePlasmicQueryData((function(){return t?JSON.stringify({sourceId:t.sourceId,opId:t.opId,args:t.userArgs}):null}),u(l.mark((function e(){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(t,{userAuthToken:null==r?void 0:r.userAuthToken});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)}))))}exports.Fetcher=function(t){var n,o=t.children,i=t.name,a=y(t.dataOp),u=a.data,c=a.error;return e.createElement(r.DataProvider,{name:null!=i?i:"data",data:u},c||null!=u&&u.error?e.createElement("div",null,"Error: ",(null==c?void 0:c.toString())||(null==u||null==(n=u.error)?void 0:n.message)):o)},exports.executePlasmicDataOp=f,exports.usePlasmicDataMutationOp=function(t){var r=null!=t?t:{},o=r.sourceId,i=r.opId,a=r.userArgs,c=n.usePlasmicDataSourceContext(),s=null==c?void 0:c.userAuthToken;return e.useCallback(u(l.mark((function t(){return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o&&i){t.next=2;break}return t.abrupt("return",void 0);case 2:return t.abrupt("return",f({sourceId:o,opId:i,userArgs:a},{userAuthToken:s}));case 3:case"end":return t.stop()}}),t)}))),[o,i,a,s])},exports.usePlasmicDataOp=y;
//# sourceMappingURL=data-sources.cjs.production.min.js.map

@@ -881,8 +881,8 @@ import { DataProvider } from '@plasmicapp/host';

function getConfig(key, defaultValue) {
if (typeof window === 'undefined') {
if (typeof globalThis === 'undefined') {
return defaultValue;
} else {
var _window$key;
var _globalThis$key;
return (_window$key = window[key]) != null ? _window$key : defaultValue;
return (_globalThis$key = globalThis[key]) != null ? _globalThis$key : defaultValue;
}

@@ -889,0 +889,0 @@ }

import { DataOp } from '../executor';
export declare function usePlasmicDataOp<T = any, E = any>(dataOp: DataOp | undefined): import("swr").SWRResponse<T, E>;
export declare function usePlasmicDataOp<T = any, E = any>(dataOp: DataOp | undefined): import("@plasmicapp/query").SWRResponse<T, E>;
export declare function usePlasmicDataMutationOp<T = any>(dataOp: DataOp | undefined): () => Promise<T | undefined>;
{
"version": "0.1.2",
"version": "0.1.4",
"license": "MIT",

@@ -63,3 +63,3 @@ "main": "dist/index.js",

"@plasmicapp/host": "1.0.80",
"@plasmicapp/query": "^0.1.53",
"@plasmicapp/query": "0.1.54",
"isomorphic-unfetch": "^3.1.0"

@@ -70,3 +70,3 @@ },

},
"gitHead": "87a23e5c533aaa3d0c10743d4e8ce794bd5bda58"
"gitHead": "d657d721692a60b1dd13b1d0a714b0baf6fbd352"
}

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

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