@yldmag/sdk-local
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).TestPurrKittens=e()}(this,function(){"use strict";function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,r,n;e=o,n=i[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],0<=e.indexOf(r)||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],0<=e.indexOf(r)||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function f(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r=require("node-fetch");module.exports=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),r.call(this,t,e)},t.fetch||(t.fetch=module.exports,t.Response=r.Response,t.Headers=r.Headers,t.Request=r.Request);function l(){u(this,l);var t=!0,e=!1,r=void 0;try{for(var n,o=Object.getOwnPropertyNames(this.constructor.prototype)[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var i=n.value,s=this[i];"constructor"!==i&&"function"==typeof s&&(this[i]=s.bind(this))}}catch(t){e=!0,r=t}finally{try{t||null==o.return||o.return()}finally{if(e)throw r}}}var n=c({},{getAllPosts:function(t,e){return this.get("/posts",{params:{scope:"all",page:t,limit:e}})},getPost:function(t){return this.get("/posts/".concat(t))}},{},{getCategories:function(){return this.get("/categories",{params:{scope:"all"}})}},{},{getAuthors:function(){return this.get("/authors")},getAuthorById:function(t){return this.get("/authors/".concat(t))},getAuthorPosts:function(t,e){var r=(1<arguments.length&&void 0!==e?e:{}).sort,n={sort:void 0!==r&&r||"asc"};return this.get("/authors/".concat(t,"/posts"),{params:n})}}),p=function(){function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(u(this,r),t=f(this,i(r).call(this)),!Object.prototype.hasOwnProperty.call(e,"baseURL"))throw new TypeError("Cannot instance CuidateMorra client without baseURL property");return t.baseURL=e.baseURL.concat("/"),t}var t,e,n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(r,l),t=r,(e=[{key:"request",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this.baseURL.concat(t),n=new Headers(e.headers||{});"POST"!==e.method&&"UPDATE"!==e.method&&"PATCH"!==e.method||(e.body=JSON.stringify(e.body)||{},n.set("Content-Type","application/json"));var o=new Request(r,c({},e,{headers:n}));return fetch(o).then(function(t){if(300<=t.status||t.status<200)throw new Error(t.statusText);return t.json().then(function(t){return t})})}},{key:"get",value:function(t,e){var r,n=1<arguments.length&&void 0!==e?e:{},o=n.params,i=void 0===o?{}:o,s=a(n,["params"]),u=0<Object.keys(i).length?t.concat("?",(r=i,Object.entries(r).map(function(t){return t[0].concat("=",t[1])}).join("&"))):t;return this.request(u,c({method:"GET"},s))}},{key:"post",value:function(t,e){var r=1<arguments.length&&void 0!==e?e:{};return this.request(t,c({method:"POST",body:JSON.stringify(r.body)},r))}},{key:"patch",value:function(t,e){var r=1<arguments.length&&void 0!==e?e:{};return this.request(t,{method:"PATCH",params:r})}}])&&o(t.prototype,e),n&&o(t,n),r}();return Object.keys(n).forEach(function(t){p.prototype[t]=n[t]}),p}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).TestPurrKittens=e()}(this,function(){"use strict";function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(o){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,r,n;e=o,n=i[r=t],r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(i,t))})}return o}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],0<=e.indexOf(r)||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],0<=e.indexOf(r)||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function f(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r=require("node-fetch");module.exports=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),r.call(this,t,e)},t.fetch||(t.fetch=module.exports,t.Response=r.Response,t.Headers=r.Headers,t.Request=r.Request);function l(){u(this,l);var t=!0,e=!1,r=void 0;try{for(var n,o=Object.getOwnPropertyNames(this.constructor.prototype)[Symbol.iterator]();!(t=(n=o.next()).done);t=!0){var i=n.value,s=this[i];"constructor"!==i&&"function"==typeof s&&(this[i]=s.bind(this))}}catch(t){e=!0,r=t}finally{try{t||null==o.return||o.return()}finally{if(e)throw r}}}var n=c({},{getAllPosts:function(t,e){return this.get("/posts",{params:{scope:"all",page:t,limit:e}})},getPost:function(t){return this.get("/posts/".concat(t))}},{},{getCategories:function(){return this.get("/categories",{params:{scope:"all"}})}},{},{getAuthors:function(){return this.get("/authors")},getAuthorById:function(t){return this.get("/authors/".concat(t))},getAuthorPosts:function(t,e){var r=(1<arguments.length&&void 0!==e?e:{}).sort,n={sort:void 0!==r&&r||"asc"};return this.get("/authors/".concat(t,"/posts"),{params:n})}},{},{getReactionsByURL:function(t){return this.get("/posts/".concat(t,"/reactions"))}}),p=function(){function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(u(this,r),t=f(this,i(r).call(this)),!Object.prototype.hasOwnProperty.call(e,"baseURL"))throw new TypeError("Cannot instance CuidateMorra client without baseURL property");return t.baseURL=e.baseURL.concat("/"),t}var t,e,n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(r,l),t=r,(e=[{key:"request",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this.baseURL.concat(t),n=new Headers(e.headers||{});"POST"!==e.method&&"UPDATE"!==e.method&&"PATCH"!==e.method||(e.body=JSON.stringify(e.body)||{},n.set("Content-Type","application/json"));var o=new Request(r,c({},e,{headers:n}));return fetch(o).then(function(t){if(300<=t.status||t.status<200)throw new Error(t.statusText);return t.json().then(function(t){return t})})}},{key:"get",value:function(t,e){var r,n=1<arguments.length&&void 0!==e?e:{},o=n.params,i=void 0===o?{}:o,s=a(n,["params"]),u=0<Object.keys(i).length?t.concat("?",(r=i,Object.entries(r).map(function(t){return t[0].concat("=",t[1])}).join("&"))):t;return this.request(u,c({method:"GET"},s))}},{key:"post",value:function(t,e){var r=1<arguments.length&&void 0!==e?e:{};return this.request(t,c({method:"POST",body:JSON.stringify(r.body)},r))}},{key:"patch",value:function(t,e){var r=1<arguments.length&&void 0!==e?e:{};return this.request(t,{method:"PATCH",params:r})}}])&&o(t.prototype,e),n&&o(t,n),r}();return Object.keys(n).forEach(function(t){p.prototype[t]=n[t]}),p}); | ||
//# sourceMappingURL=bundle.js.map |
{ | ||
"name": "@yldmag/sdk-local", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "build/bundle.js", | ||
@@ -12,3 +12,8 @@ "author": "elaineeeit@gmail.com", | ||
"release": "bash scripts/publish.sh $1", | ||
"test": "jest --no-cache" | ||
"release:major": "changelog -M && git add . && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags", | ||
"release:minor": "changelog -m && git add . && git commit -m 'updated CHANGELOG.md' && npm version minor && git push origin && git push origin --tags", | ||
"release:patch": "changelog -p && git add . && git commit -m 'updated CHANGELOG.md' && npm version patch && git push origin && git push origin --tags", | ||
"test": "jest --watch-all --no-cache", | ||
"test:coverage": "jest --no-cache --collect-coverage", | ||
"test:init": "jest --init" | ||
}, | ||
@@ -18,8 +23,11 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@babel/core": "^7.6.0", | ||
"@babel/preset-env": "^7.6.0", | ||
"@babel/core": "^7.8.3", | ||
"@babel/preset-env": "^7.8.3", | ||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^25.1.0", | ||
"babel-runtime": "^6.26.0", | ||
"es6-promise": "^4.2.8", | ||
"eslint": "^6.4.0", | ||
"eslint-config-prettier": "^6.3.0", | ||
"generate-changelog": "^1.8.0", | ||
"husky": "^3.0.5", | ||
@@ -26,0 +34,0 @@ "isomorphic-fetch": "^2.2.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20774
5
167
23
2