New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microlink/mql

Package Overview
Dependencies
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microlink/mql - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [0.6.5](https://github.com/microlinkhq/mql/compare/v0.6.4...v0.6.5) (2020-03-11)
### Bug Fixes
* remove module field ([56e17d7](https://github.com/microlinkhq/mql/commit/56e17d71bdbb91c2ff8f4b2dc1ae3212e990f01a)), closes [#50](https://github.com/microlinkhq/mql/issues/50)
### [0.6.4](https://github.com/microlinkhq/mql/compare/v0.6.3...v0.6.4) (2020-03-09)

@@ -7,0 +14,0 @@

4

dist/mql.js

@@ -1013,3 +1013,3 @@ (function (global, factory) {

mql.version = VERSION;
mql.stream = (url, opts) => got.stream(url, { retry: 3, timeout: 30000, ...opts });
mql.stream = (url, opts) => got.stream(url, { retry: 2, timeout: 30000, ...opts });

@@ -1060,3 +1060,3 @@ return mql

flatten: flat,
VERSION: '0.6.4'
VERSION: '0.6.5'
});

@@ -1063,0 +1063,0 @@

@@ -10,3 +10,3 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("url")):"function"==typeof define&&define.amd?define(["url"],e):(t=t||self).mql=e(t.url)}(this,(function(t){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.default||t}var o=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,r){t.exports=function(){

*/
var U=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},k=D;function N(t){return t}function D(t,e){const r=(e=e||{}).delimiter||".",o=e.maxDepth,s=e.transformKey||N,n={};return function t(i,a,c){c=c||1,Object.keys(i).forEach((function(u){const p=i[u],f=e.safe&&Array.isArray(p),h=Object.prototype.toString.call(p),l=U(p),d="[object Object]"===h||"[object Array]"===h,y=a?a+r+s(u):s(u);if(!f&&!l&&d&&Object.keys(p).length&&(!e.maxDepth||c<o))return t(p,y,c+1);n[y]=p}))}(t),n}D.flatten=D,D.unflatten=function t(e,r){const o=(r=r||{}).delimiter||".",s=r.overwrite||!1,n=r.transformKey||N,i={};if(U(e)||"[object Object]"!==Object.prototype.toString.call(e))return e;function a(t){const e=Number(t);return isNaN(e)||-1!==t.indexOf(".")||r.object?t:e}return e=Object.keys(e).reduce((t,s)=>{const n=Object.prototype.toString.call(e[s]);return!("[object Object]"===n||"[object Array]"===n)||function(t){const e=Object.prototype.toString.call(t),r="[object Array]"===e,o="[object Object]"===e;if(!t)return!0;if(r)return!t.length;if(o)return!Object.keys(t).length}(e[s])?(t[s]=e[s],t):function(t,e,r){return Object.keys(r).reduce((function(e,s){return e[t+o+s]=r[s],e}),e)}(s,t,D(e[s],r))},{}),Object.keys(e).forEach((function(c){const u=c.split(o).map(n);let p=a(u.shift()),f=a(u[0]),h=i;for(;void 0!==f;){const t=Object.prototype.toString.call(h[p]),e="[object Object]"===t||"[object Array]"===t;if(!s&&!e&&void 0!==h[p])return;(s&&!e||!s&&null==h[p])&&(h[p]="number"!=typeof f||r.object?{}:[]),h=h[p],u.length>0&&(p=a(u.shift()),f=a(u[0]))}h[p]=t(e[c],r)})),i};const L={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"};var I=({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n})=>{const i=t=>{if("object"!=typeof t)return;const e=n(t);return Object.keys(e).reduce((t,r)=>({...t,[`data.${r}`]:e[r]}),{})},a=async(t,r={})=>{try{const e=await s(t,r),{body:o}=e;return{...o,response:e}}catch(o){const{name:s,message:n,response:i={}}=o,{statusCode:a=500,body:c,headers:u,url:p=t}=i,f=Number((r.retry*r.timeout).toFixed(0)),h="TimeoutError"===s;if(((t,e)=>"TimeoutError"===t.name||"HTTPError"===t.name&&"5"===e.toString()[0]||"invalid-json"===t.type)(o,a)){const t=`The request reached timeout after ${f}ms.`;throw new e({url:p,data:{url:t},status:"fail",code:h?"ETIMEOUTCLIENT":"ETIMEOUT",message:t,more:`https://microlink.io/${h?"etimeoutclient":"etimeout"}`,statusCode:a,headers:u})}const l=c?"string"==typeof c||Buffer.isBuffer(c)?JSON.parse(c):c:{message:n,status:"fail"};throw e({...l,message:l.message,url:p,statusCode:a,headers:u})}},c=(t,{data:e,apiKey:r,endpoint:s,retry:a=3,timeout:c=3e4,responseType:u="json",...p}={})=>{const f=!!r;var h;return[`${s||L[f?"PRO":"FREE"]}?${o({url:t,...i(e),...n((h=p,Object.keys(h).forEach(t=>null==h[t]&&delete h[t]),h))})}`,{retry:a,timeout:c,responseType:u,headers:f?{"x-api-key":r}:{}}]},u=async(t,o={})=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({url:t,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(t);const[s,n]=c(t,o);return a(s,{...o,...n})};return u.MicrolinkError=e,u.getApiUrl=c,u.fetchFromApi=a,u.mapRules=i,u.version=t,u.stream=(t,e)=>s.stream(t,{retry:3,timeout:3e4,...e}),u},$=r(a);const F=o.default||o,{encode:H}=$;return I({MicrolinkError:T("MicrolinkError"),isUrlHttp:t=>{try{return n.test(new s(t).href)}catch(t){return!1}},stringify:H,got:async(t,{responseType:e,...r})=>{try{const e=await F(t,r),o=await e.json(),{headers:s,status:n,statusText:i}=e;return{url:e.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:[...e.headers.entries()].reduce((t,[e,r])=>({...t,[e]:r}),{}),statusCode:e.status,body:await e.json()}}throw t}},flatten:k,VERSION:"0.6.4"})}));
var U=function(t){return null!=t&&null!=t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},k=D;function N(t){return t}function D(t,e){const r=(e=e||{}).delimiter||".",o=e.maxDepth,s=e.transformKey||N,n={};return function t(i,a,c){c=c||1,Object.keys(i).forEach((function(u){const p=i[u],f=e.safe&&Array.isArray(p),h=Object.prototype.toString.call(p),l=U(p),d="[object Object]"===h||"[object Array]"===h,y=a?a+r+s(u):s(u);if(!f&&!l&&d&&Object.keys(p).length&&(!e.maxDepth||c<o))return t(p,y,c+1);n[y]=p}))}(t),n}D.flatten=D,D.unflatten=function t(e,r){const o=(r=r||{}).delimiter||".",s=r.overwrite||!1,n=r.transformKey||N,i={};if(U(e)||"[object Object]"!==Object.prototype.toString.call(e))return e;function a(t){const e=Number(t);return isNaN(e)||-1!==t.indexOf(".")||r.object?t:e}return e=Object.keys(e).reduce((t,s)=>{const n=Object.prototype.toString.call(e[s]);return!("[object Object]"===n||"[object Array]"===n)||function(t){const e=Object.prototype.toString.call(t),r="[object Array]"===e,o="[object Object]"===e;if(!t)return!0;if(r)return!t.length;if(o)return!Object.keys(t).length}(e[s])?(t[s]=e[s],t):function(t,e,r){return Object.keys(r).reduce((function(e,s){return e[t+o+s]=r[s],e}),e)}(s,t,D(e[s],r))},{}),Object.keys(e).forEach((function(c){const u=c.split(o).map(n);let p=a(u.shift()),f=a(u[0]),h=i;for(;void 0!==f;){const t=Object.prototype.toString.call(h[p]),e="[object Object]"===t||"[object Array]"===t;if(!s&&!e&&void 0!==h[p])return;(s&&!e||!s&&null==h[p])&&(h[p]="number"!=typeof f||r.object?{}:[]),h=h[p],u.length>0&&(p=a(u.shift()),f=a(u[0]))}h[p]=t(e[c],r)})),i};const L={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"};var I=({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n})=>{const i=t=>{if("object"!=typeof t)return;const e=n(t);return Object.keys(e).reduce((t,r)=>({...t,[`data.${r}`]:e[r]}),{})},a=async(t,r={})=>{try{const e=await s(t,r),{body:o}=e;return{...o,response:e}}catch(o){const{name:s,message:n,response:i={}}=o,{statusCode:a=500,body:c,headers:u,url:p=t}=i,f=Number((r.retry*r.timeout).toFixed(0)),h="TimeoutError"===s;if(((t,e)=>"TimeoutError"===t.name||"HTTPError"===t.name&&"5"===e.toString()[0]||"invalid-json"===t.type)(o,a)){const t=`The request reached timeout after ${f}ms.`;throw new e({url:p,data:{url:t},status:"fail",code:h?"ETIMEOUTCLIENT":"ETIMEOUT",message:t,more:`https://microlink.io/${h?"etimeoutclient":"etimeout"}`,statusCode:a,headers:u})}const l=c?"string"==typeof c||Buffer.isBuffer(c)?JSON.parse(c):c:{message:n,status:"fail"};throw e({...l,message:l.message,url:p,statusCode:a,headers:u})}},c=(t,{data:e,apiKey:r,endpoint:s,retry:a=3,timeout:c=3e4,responseType:u="json",...p}={})=>{const f=!!r;var h;return[`${s||L[f?"PRO":"FREE"]}?${o({url:t,...i(e),...n((h=p,Object.keys(h).forEach(t=>null==h[t]&&delete h[t]),h))})}`,{retry:a,timeout:c,responseType:u,headers:f?{"x-api-key":r}:{}}]},u=async(t,o={})=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({url:t,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(t);const[s,n]=c(t,o);return a(s,{...o,...n})};return u.MicrolinkError=e,u.getApiUrl=c,u.fetchFromApi=a,u.mapRules=i,u.version=t,u.stream=(t,e)=>s.stream(t,{retry:2,timeout:3e4,...e}),u},$=r(a);const F=o.default||o,{encode:H}=$;return I({MicrolinkError:T("MicrolinkError"),isUrlHttp:t=>{try{return n.test(new s(t).href)}catch(t){return!1}},stringify:H,got:async(t,{responseType:e,...r})=>{try{const e=await F(t,r),o=await e.json(),{headers:s,status:n,statusText:i}=e;return{url:e.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:[...e.headers.entries()].reduce((t,[e,r])=>({...t,[e]:r}),{}),statusCode:e.status,body:await e.json()}}throw t}},flatten:k,VERSION:"0.6.5"})}));
//# sourceMappingURL=mql.min.js.map

@@ -5,6 +5,5 @@ {

"homepage": "https://nicedoc.io/microlinkhq/mql",
"version": "0.6.4",
"version": "0.6.5",
"browser": "src/browser.js",
"main": "src/node.js",
"module": "src/browser.js",
"author": {

@@ -11,0 +10,0 @@ "email": "josefrancisco.verdu@gmail.com",

@@ -112,3 +112,3 @@ const ENDPOINT = {

mql.version = VERSION
mql.stream = (url, opts) => got.stream(url, { retry: 3, timeout: 30000, ...opts })
mql.stream = (url, opts) => got.stream(url, { retry: 2, timeout: 30000, ...opts })

@@ -115,0 +115,0 @@ return mql

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