@glvnzn/web-sdk
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -1,1 +0,1 @@ | ||
function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var e=/*#__PURE__*/t(require("isomorphic-unfetch"));function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},r.apply(this,arguments)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var n="posts",i=/*#__PURE__*/function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,o(e,r);var s=i.prototype;return s.getPostById=function(t){return this.request("/posts/"+t)},s.getPosts=function(){return this.request("/"+n)},s.createPost=function(t){return this.request("/"+n,{method:"POST",body:JSON.stringify(t)})},i}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,o){var n=""+this.baseUrl+t,i=r({},o,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return e.default(n,i).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());exports.ScaleCMS=function(t){this.posts=void 0,this.posts=new i(t)}; | ||
function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}require("isomorphic-unfetch");var r="posts",o=/*#__PURE__*/function(t){var o,n;function s(){return t.apply(this,arguments)||this}n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,e(o,n);var i=s.prototype;return i.getPostById=function(t){return this.request("/posts/"+t)},i.getPosts=function(){return this.request("/"+r)},i.createPost=function(t){return this.request("/"+r,{method:"POST",body:JSON.stringify(t)})},s}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return e.prototype.request=function(e,r){var o=""+this.baseUrl+e,n=t({},r,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return fetch(o,n).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}());exports.ScaleCMS=function(t){this.posts=void 0,this.posts=new o(t)}; |
@@ -1,1 +0,1 @@ | ||
import t from"isomorphic-unfetch";function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},e.apply(this,arguments)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var o="posts",n=/*#__PURE__*/function(t){var e,n;function s(){return t.apply(this,arguments)||this}n=t,(e=s).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var i=s.prototype;return i.getPostById=function(t){return this.request("/posts/"+t)},i.getPosts=function(){return this.request("/"+o)},i.createPost=function(t){return this.request("/"+o,{method:"POST",body:JSON.stringify(t)})},s}(/*#__PURE__*/function(){function r(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return r.prototype.request=function(r,o){var n=""+this.baseUrl+r,s=e({},o,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return t(n,s).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},r}()),s=function(t){this.posts=void 0,this.posts=new n(t)};export{s as ScaleCMS}; | ||
import"isomorphic-unfetch";function t(){return t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},t.apply(this,arguments)}function e(t,r){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,r)}var r="posts",o=/*#__PURE__*/function(t){var o,n;function s(){return t.apply(this,arguments)||this}n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,e(o,n);var i=s.prototype;return i.getPostById=function(t){return this.request("/posts/"+t)},i.getPosts=function(){return this.request("/"+r)},i.createPost=function(t){return this.request("/"+r,{method:"POST",body:JSON.stringify(t)})},s}(/*#__PURE__*/function(){function e(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return e.prototype.request=function(e,r){var o=""+this.baseUrl+e,n=t({},r,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return fetch(o,n).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},e}()),n=function(t){this.posts=void 0,this.posts=new o(t)};export{n as ScaleCMS}; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("isomorphic-unfetch")):"function"==typeof define&&define.amd?define(["exports","isomorphic-unfetch"],e):e((t||self).webSdk={},t.isomorphicUnfetch)}(this,function(t,e){function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=/*#__PURE__*/o(e);function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},r.apply(this,arguments)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var s="posts",p=/*#__PURE__*/function(t){var e,o;function n(){return t.apply(this,arguments)||this}o=t,(e=n).prototype=Object.create(o.prototype),e.prototype.constructor=e,i(e,o);var r=n.prototype;return r.getPostById=function(t){return this.request("/posts/"+t)},r.getPosts=function(){return this.request("/"+s)},r.createPost=function(t){return this.request("/"+s,{method:"POST",body:JSON.stringify(t)})},n}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,e){var o=""+this.baseUrl+t,i=r({},e,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return n.default(o,i).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());t.ScaleCMS=function(t){this.posts=void 0,this.posts=new p(t)}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("isomorphic-unfetch")):"function"==typeof define&&define.amd?define(["exports","isomorphic-unfetch"],e):e((t||self).webSdk={})}(this,function(t){function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},e.apply(this,arguments)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var n="posts",r=/*#__PURE__*/function(t){var e,r;function i(){return t.apply(this,arguments)||this}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,o(e,r);var s=i.prototype;return s.getPostById=function(t){return this.request("/posts/"+t)},s.getPosts=function(){return this.request("/"+n)},s.createPost=function(t){return this.request("/"+n,{method:"POST",body:JSON.stringify(t)})},i}(/*#__PURE__*/function(){function t(t){this.apiKey=void 0,this.baseUrl=void 0,this.apiKey=t.apiKey,this.baseUrl=t.baseUrl||"https://jsonplaceholder.typicode.com"}return t.prototype.request=function(t,o){var n=""+this.baseUrl+t,r=e({},o,{headers:{"Content-Type":"application/json","api-key":this.apiKey}});return fetch(n,r).then(function(t){if(t.ok)return t.json();throw new Error(t.statusText)})},t}());t.ScaleCMS=function(t){this.posts=void 0,this.posts=new r(t)}}); |
@@ -0,1 +1,2 @@ | ||
import "isomorphic-unfetch"; | ||
type Config = { | ||
@@ -2,0 +3,0 @@ apiKey: string; |
{ | ||
"name": "@glvnzn/web-sdk", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
6419
58
4