Socket
Socket
Sign inDemoInstall

@http-ext/core

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@http-ext/core - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

bundles/http-ext-core.umd.js

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

body: response.body,
status: response.status || 200,
status: response.status == null ? 200 : response.status,
statusText: response.statusText || 'OK',

@@ -464,0 +464,0 @@ headers: response.headers || {}

@@ -15,3 +15,3 @@ !function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@http-ext/core",["exports","rxjs","rxjs/operators"],r):r(((n=n||self)["http-ext"]=n["http-ext"]||{},n["http-ext"].core={}),n.rxjs,n.rxjs.operators)}(this,(function(n,r,e){"use strict";

and limitations under the License.
***************************************************************************** */function t(n,r){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var t,o,u=e.call(n),i=[];try{for(;(void 0===r||r-- >0)&&!(t=u.next()).done;)i.push(t.value)}catch(n){o={error:n}}finally{try{t&&!t.done&&(e=u.return)&&e.call(u)}finally{if(o)throw o.error}}return i}function o(n){var r=n.matchExpression,e=n.matcherList,t=n.errorFactory,o=e.find((function(n){return n.canHandle(r)}));if(null==o)throw t(r);return o}function u(n){return new Error("InvalidUrlError: "+n+" is not a valid URL.")}function i(n){return new Error("InvalidOriginMatchExpression: "+JSON.stringify(n)+" is an invalid origin match expression.")}var a=function(n){return Array.isArray(n)};function s(n){return function(r){return typeof r===n}}var c=function(n){return s("string")(n)},l={canHandle:function(n){return c(n)},handle:function(n){return n.value===n.matchExpression}},f={canHandle:function(n){return a(n)},handle:function(n){var r=n.value;return n.matchExpression.some((function(n){return o({matchExpression:n,matcherList:[l],errorFactory:i}).handle({value:r,matchExpression:n})}))}},h=function(n){return s("function")(n)},p={canHandle:function(n){return h(n)},handle:function(n){var r=n.value;return(0,n.matchExpression)(r)}},d={canHandle:function(n){return n instanceof RegExp},handle:function(n){var r=n.value;return n.matchExpression.test(r)}};function v(n){return new Error("InvalidMethodMatchExpression: "+JSON.stringify(n)+" is an invalid method match expression.")}var x={canHandle:function(n){return a(n)},handle:function(n){var r=n.value;return n.matchExpression.includes(r)}},m={canHandle:function(n){return c(n)},handle:function(n){return n.value===n.matchExpression}};var y=function(n){return r.iif((function(){return r=n,s("boolean")(r);var r}),r.of(n),r.throwError("InvalidPluginConditionError: expect boolean got "+typeof n+"."))};function E(n){return r.isObservable(n)?n:function(n){return n&&"function"==typeof n.then}(n)?r.from(n):r.of(n)}var g=function(){function n(n){var r=n.plugins;this._plugins=r}return n.prototype.handle=function(n){var r=n.request,e=n.httpHandler;return this._handle({request:r,plugins:this._plugins,httpHandler:e})},n.prototype._handle=function(n){var r=this,o=n.request,u=n.plugins,i=n.httpHandler;if(0===u.length)return i({request:o});var a=t(u,1)[0],s=a.handler,c=function(n){return E(r._handle({request:n.request,plugins:u.slice(1),httpHandler:i}))};return this._shouldHandle({request:o,plugin:a}).pipe(e.mergeMap(y),e.mergeMap((function(n){return!1===n?c({request:o}):E(s.handle({request:o,next:c}))})))},n.prototype._shouldHandle=function(n){var e=n.request,t=n.plugin;return h(t.condition)?E(t.condition({request:e})):r.of(!0)},n}();n.HttpExt=g,n.createRequest=function(n){return{url:n.url,method:n.method||"GET",body:n.body||null,headers:n.headers||{},params:n.params||{},responseType:n.responseType||"json"}},n.createResponse=function(n){return{body:n.body,status:n.status||200,statusText:n.statusText||"OK",headers:n.headers||{}}},n.matchMethod=function(n){return function(r){var e=r.request.method;return o({matchExpression:n,matcherList:[m,x],errorFactory:v}).handle({matchExpression:n,value:e})}},n.matchOrigin=function(n){return function(r){var e=function(n){var r=t(n.split("://"),2),e=r[0],o=r[1];if(null==e||null==o)throw u(n);var i=o.match(/^[a-z0-9.:-]+/);if(null==i)throw u(n);return e+"://"+i[0]}(r.request.url);return o({matchExpression:n,matcherList:[l,f,d,p],errorFactory:i}).handle({matchExpression:n,value:e})}},Object.defineProperty(n,"__esModule",{value:!0})}));
***************************************************************************** */function t(n,r){var e="function"==typeof Symbol&&n[Symbol.iterator];if(!e)return n;var t,o,u=e.call(n),i=[];try{for(;(void 0===r||r-- >0)&&!(t=u.next()).done;)i.push(t.value)}catch(n){o={error:n}}finally{try{t&&!t.done&&(e=u.return)&&e.call(u)}finally{if(o)throw o.error}}return i}function o(n){var r=n.matchExpression,e=n.matcherList,t=n.errorFactory,o=e.find((function(n){return n.canHandle(r)}));if(null==o)throw t(r);return o}function u(n){return new Error("InvalidUrlError: "+n+" is not a valid URL.")}function i(n){return new Error("InvalidOriginMatchExpression: "+JSON.stringify(n)+" is an invalid origin match expression.")}var a=function(n){return Array.isArray(n)};function s(n){return function(r){return typeof r===n}}var c=function(n){return s("string")(n)},l={canHandle:function(n){return c(n)},handle:function(n){return n.value===n.matchExpression}},f={canHandle:function(n){return a(n)},handle:function(n){var r=n.value;return n.matchExpression.some((function(n){return o({matchExpression:n,matcherList:[l],errorFactory:i}).handle({value:r,matchExpression:n})}))}},h=function(n){return s("function")(n)},p={canHandle:function(n){return h(n)},handle:function(n){var r=n.value;return(0,n.matchExpression)(r)}},d={canHandle:function(n){return n instanceof RegExp},handle:function(n){var r=n.value;return n.matchExpression.test(r)}};function v(n){return new Error("InvalidMethodMatchExpression: "+JSON.stringify(n)+" is an invalid method match expression.")}var x={canHandle:function(n){return a(n)},handle:function(n){var r=n.value;return n.matchExpression.includes(r)}},m={canHandle:function(n){return c(n)},handle:function(n){return n.value===n.matchExpression}};var y=function(n){return r.iif((function(){return r=n,s("boolean")(r);var r}),r.of(n),r.throwError("InvalidPluginConditionError: expect boolean got "+typeof n+"."))};function E(n){return r.isObservable(n)?n:function(n){return n&&"function"==typeof n.then}(n)?r.from(n):r.of(n)}var g=function(){function n(n){var r=n.plugins;this._plugins=r}return n.prototype.handle=function(n){var r=n.request,e=n.httpHandler;return this._handle({request:r,plugins:this._plugins,httpHandler:e})},n.prototype._handle=function(n){var r=this,o=n.request,u=n.plugins,i=n.httpHandler;if(0===u.length)return i({request:o});var a=t(u,1)[0],s=a.handler,c=function(n){return E(r._handle({request:n.request,plugins:u.slice(1),httpHandler:i}))};return this._shouldHandle({request:o,plugin:a}).pipe(e.mergeMap(y),e.mergeMap((function(n){return!1===n?c({request:o}):E(s.handle({request:o,next:c}))})))},n.prototype._shouldHandle=function(n){var e=n.request,t=n.plugin;return h(t.condition)?E(t.condition({request:e})):r.of(!0)},n}();n.HttpExt=g,n.createRequest=function(n){return{url:n.url,method:n.method||"GET",body:n.body||null,headers:n.headers||{},params:n.params||{},responseType:n.responseType||"json"}},n.createResponse=function(n){return{body:n.body,status:null==n.status?200:n.status,statusText:n.statusText||"OK",headers:n.headers||{}}},n.matchMethod=function(n){return function(r){var e=r.request.method;return o({matchExpression:n,matcherList:[m,x],errorFactory:v}).handle({matchExpression:n,value:e})}},n.matchOrigin=function(n){return function(r){var e=function(n){var r=t(n.split("://"),2),e=r[0],o=r[1];if(null==e||null==o)throw u(n);var i=o.match(/^[a-z0-9.:-]+/);if(null==i)throw u(n);return e+"://"+i[0]}(r.request.url);return o({matchExpression:n,matcherList:[l,f,d,p],errorFactory:i}).handle({matchExpression:n,value:e})}},Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=http-ext-core.umd.min.js.map

@@ -6,2 +6,10 @@ # Change Log

# [1.1.0](https://github.com/jscutlery/http-ext/compare/v1.0.0...v1.1.0) (2020-01-14)
**Note:** Version bump only for package @http-ext/core
# [1.0.0](https://github.com/jscutlery/http-ext/compare/v0.1.1...v1.0.0) (2020-01-06)

@@ -8,0 +16,0 @@

export function createResponse(response) {
return {
body: response.body,
status: response.status || 200,
status: response.status == null ? 200 : response.status,
statusText: response.statusText || 'OK',

@@ -9,2 +9,2 @@ headers: response.headers || {}

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzcG9uc2UuanMiLCJz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R1czogbnVtYmVyOyBzdGF0dXNUZXh0OiBzdHJpbmcgfSk7XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVSZXNwb25zZTxUQm9keT4oXG4gIHJlc3BvbnNlOiBSZXNwb25zZUFyZ3M8VEJvZHk+XG4pOiBIdHRwRXh0UmVzcG9uc2Uge1xuICByZXR1cm4ge1xuICAgIGJvZHk6IHJlc3BvbnNlLmJvZHksXG4gICAgc3RhdHVzOiByZXNwb25zZS5zdGF0dXMgPT0gbnVsbCA/IDIwMCA6IHJlc3BvbnNlLnN0YXR1cyxcbiAgICBzdGF0dXNUZXh0OiByZXNwb25zZS5zdGF0dXNUZXh0IHx8ICdPSycsXG4gICAgaGVhZGVyczogcmVzcG9uc2UuaGVhZGVycyB8fCB7fVxuICB9O1xufVxuIl19
export function createResponse(response) {
return {
body: response.body,
status: response.status || 200,
status: response.status == null ? 200 : response.status,
statusText: response.statusText || 'OK',

@@ -9,2 +9,2 @@ headers: response.headers || {}

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzcG9uc2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaHR0cC1leHQvY29yZS8iLCJzb3VyY2VzIjpbImxpYi9yZXNwb25zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZQSxNQUFNLFVBQVUsY0FBYyxDQUM1QixRQUE2QjtJQUU3QixPQUFPO1FBQ0wsSUFBSSxFQUFFLFFBQVEsQ0FBQyxJQUFJO1FBQ25CLE1BQU0sRUFBRSxRQUFRLENBQUMsTUFBTSxJQUFJLEdBQUc7UUFDOUIsVUFBVSxFQUFFLFFBQVEsQ0FBQyxVQUFVLElBQUksSUFBSTtRQUN2QyxPQUFPLEVBQUUsUUFBUSxDQUFDLE9BQU8sSUFBSSxFQUFFO0tBQ2hDLENBQUM7QUFDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSGVhZGVycyB9IGZy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servable, from } from 'rxjs';

body: response.body,
status: response.status || 200,
status: response.status == null ? 200 : response.status,
statusText: response.statusText || 'OK',

@@ -239,0 +239,0 @@ headers: response.headers || {}

@@ -262,3 +262,3 @@ import { __read } from 'tslib';

body: response.body,
status: response.status || 200,
status: response.status == null ? 200 : response.status,
statusText: response.statusText || 'OK',

@@ -265,0 +265,0 @@ headers: response.headers || {}

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

{"__symbolic":"module","version":4,"exports":[{"export":[{"name":"matchOrigin","as":"matchOrigin"}],"from":"./lib/match-origin/match-origin"},{"export":[{"name":"matchMethod","as":"matchMethod"}],"from":"./lib/match-method/match-method"}],"metadata":{"HttpExtPlugin":{"__symbolic":"interface"},"RequestCondition":{"__symbolic":"interface"},"PluginHandlerArgs":{"__symbolic":"interface"},"PluginHandler":{"__symbolic":"interface"},"HttpExt":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Expression form not supported","line":14,"character":27,"module":"./lib/http-ext"}]}],"handle":[{"__symbolic":"method"}],"_handle":[{"__symbolic":"method"}],"_shouldHandle":[{"__symbolic":"method"}]}},"NextFn":{"__symbolic":"interface"},"HttpExtRequest":{"__symbolic":"interface"},"createRequest":{"__symbolic":"function","parameters":["request"],"value":{"url":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"url"},"method":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"method"},"right":"GET"},"body":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"body"},"right":null},"headers":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"headers"},"right":{}},"params":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"params"},"right":{}},"responseType":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"responseType"},"right":"json"}}},"HttpMethod":{"__symbolic":"interface"},"HttpExtResponse":{"__symbolic":"interface"},"createResponse":{"__symbolic":"function","parameters":["response"],"value":{"body":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"body"},"status":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"status"},"right":200},"statusText":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"statusText"},"right":"OK"},"headers":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"headers"},"right":{}}}}},"origins":{"HttpExtPlugin":"./lib/plugin","RequestCondition":"./lib/plugin","PluginHandlerArgs":"./lib/handler","PluginHandler":"./lib/handler","HttpExt":"./lib/http-ext","NextFn":"./lib/request-handler","HttpExtRequest":"./lib/request","createRequest":"./lib/request","HttpMethod":"./lib/request","HttpExtResponse":"./lib/response","createResponse":"./lib/response"},"importAs":"@http-ext/core"}
{"__symbolic":"module","version":4,"exports":[{"export":[{"name":"matchOrigin","as":"matchOrigin"}],"from":"./lib/match-origin/match-origin"},{"export":[{"name":"matchMethod","as":"matchMethod"}],"from":"./lib/match-method/match-method"}],"metadata":{"HttpExtPlugin":{"__symbolic":"interface"},"RequestCondition":{"__symbolic":"interface"},"PluginHandlerArgs":{"__symbolic":"interface"},"PluginHandler":{"__symbolic":"interface"},"HttpExt":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Expression form not supported","line":14,"character":27,"module":"./lib/http-ext"}]}],"handle":[{"__symbolic":"method"}],"_handle":[{"__symbolic":"method"}],"_shouldHandle":[{"__symbolic":"method"}]}},"NextFn":{"__symbolic":"interface"},"HttpExtRequest":{"__symbolic":"interface"},"createRequest":{"__symbolic":"function","parameters":["request"],"value":{"url":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"url"},"method":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"method"},"right":"GET"},"body":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"body"},"right":null},"headers":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"headers"},"right":{}},"params":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"params"},"right":{}},"responseType":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"request"},"member":"responseType"},"right":"json"}}},"HttpMethod":{"__symbolic":"interface"},"HttpExtResponse":{"__symbolic":"interface"},"createResponse":{"__symbolic":"function","parameters":["response"],"value":{"body":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"body"},"status":{"__symbolic":"if","condition":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"status"},"right":null},"thenExpression":200,"elseExpression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"status"}},"statusText":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"statusText"},"right":"OK"},"headers":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"response"},"member":"headers"},"right":{}}}}},"origins":{"HttpExtPlugin":"./lib/plugin","RequestCondition":"./lib/plugin","PluginHandlerArgs":"./lib/handler","PluginHandler":"./lib/handler","HttpExt":"./lib/http-ext","NextFn":"./lib/request-handler","HttpExtRequest":"./lib/request","createRequest":"./lib/request","HttpMethod":"./lib/request","HttpExtResponse":"./lib/response","createResponse":"./lib/response"},"importAs":"@http-ext/core"}
{
"name": "@http-ext/core",
"version": "1.0.0",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "private": false,

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

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