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

@covalent/http

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalent/http - npm Package Compare versions

Comparing version 1.0.0-rc.4 to 1.0.0-rc.5

8

bundles/covalent-http.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/http'), require('rxjs/Observable'), require('rxjs/operators/map'), require('rxjs/operators/catchError')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/http', 'rxjs/Observable', 'rxjs/operators/map', 'rxjs/operators/catchError'], factory) :
(factory((global.covalent = global.covalent || {}, global.covalent.http = {}),global.ng.core,global.ng.http,global.Rx,global.Rx.Observable.prototype,global.Rx.Observable.prototype));
}(this, (function (exports,core,http,Observable,map,catchError) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/http'), require('rxjs/Observable'), require('@angular/core'), require('rxjs/operators/map'), require('rxjs/operators/catchError')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/http', 'rxjs/Observable', '@angular/core', 'rxjs/operators/map', 'rxjs/operators/catchError'], factory) :
(factory((global.covalent = global.covalent || {}, global.covalent.http = {}),global.ng.http,global.Rx,global.ng.core,global.Rx.Observable.prototype,global.Rx.Observable.prototype));
}(this, (function (exports,http,Observable,core,map,catchError) { 'use strict';

@@ -7,0 +7,0 @@ /**

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/http"),require("rxjs/Observable"),require("rxjs/operators/map"),require("rxjs/operators/catchError")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/http","rxjs/Observable","rxjs/operators/map","rxjs/operators/catchError"],e):e((t.covalent=t.covalent||{},t.covalent.http={}),t.ng.core,t.ng.http,t.Rx,t.Rx.Observable.prototype,t.Rx.Observable.prototype)}(this,function(t,e,r,o,n,s){"use strict";var u=function(){function t(t,e,r,o){var n=this;this._http=t,this._injector=e,this._httpInterceptorMatcher=r,this._requestInterceptors=[],o.forEach(function(t){n._requestInterceptors.push({interceptor:e.get(t.interceptor),paths:t.paths})})}return t.prototype["delete"]=function(t,e){return void 0===e&&(e={}),e.url=t,e.method=r.RequestMethod.Delete,this.request(t,e)},t.prototype.get=function(t,e){return void 0===e&&(e={}),e.url=t,e.method=r.RequestMethod.Get,this.request(t,e)},t.prototype.head=function(t,e){return void 0===e&&(e={}),e.url=t,e.method=r.RequestMethod.Head,this.request(t,e)},t.prototype.patch=function(t,e,o){return void 0===o&&(o={}),o.url=t,o.method=r.RequestMethod.Patch,o.body=e,this.request(t,o)},t.prototype.post=function(t,e,o){return void 0===o&&(o={}),o.url=t,o.method=r.RequestMethod.Post,o.body=e,this.request(t,o)},t.prototype.put=function(t,e,o){return void 0===o&&(o={}),o.url=t,o.method=r.RequestMethod.Put,o.body=e,this.request(t,o)},t.prototype.request=function(t,e){var o,n=this;void 0===e&&(e={}),o=t instanceof r.Request?t.url?t.url:e.url:t,e.url||(e.url=o);var s=this._requestInterceptors.filter(function(t){return n._httpInterceptorMatcher.matches(e,t)}).map(function(t){return t.interceptor});return this._setupRequest(t,e,s)},t.prototype._setupRequest=function(t,e,r){var n=this;try{e=this._requestResolve(e,r)}catch(s){return new o.Observable(function(t){t.error(s)})}return new o.Observable(function(o){n._http.request(t,e).subscribe(function(t){o.next(n._responseResolve(t,r)),o.complete()},function(t){o.error(n._responseErrorResolve(t,r))})})},t.prototype._requestResolve=function(t,e){return e.forEach(function(e){if(e.onRequest)try{t=e.onRequest(t)}catch(r){if(!e.onRequestError)throw r;if(!(t=e.onRequestError(t)))throw r}}),t},t.prototype._responseResolve=function(t,e){return e.forEach(function(e){e.onResponse&&(t=e.onResponse(t))}),t},t.prototype._responseErrorResolve=function(t,e){return e.forEach(function(e){e.onResponseError&&(t=e.onResponseError(t))}),t},t}(),i=function(){function t(){}return t.prototype.matches=function(t,e){return e.paths.filter(function(e){return!!(e=e.replace(/\*\*/gi,"<>").replace(/\*/gi,"[a-zA-Z0-9\\-_]+").replace(/<>/gi,"[a-zA-Z0-9\\-_/]*"))&&(e+="(\\?{1}.*)?$",new RegExp(e).test(t.url))}).length>0},t}(),c=new e.InjectionToken("HTTP_CONFIG");function p(t,e,r){return new u(t,e,new i,r.interceptors)}var a={provide:u,useFactory:p,deps:[r.Http,e.Injector,c]},h=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={interceptors:[]}),{ngModule:t,providers:[{provide:c,useValue:e},a]}},t}();h.decorators=[{type:e.NgModule,args:[{imports:[r.HttpModule]}]}],h.ctorParameters=function(){return[]};var f=function(){function t(t,e){this.http=t,this._base=e.baseUrl.replace(/\/$/,""),this._path=e.path.replace(/^\//,""),this._baseHeaders=e.baseHeaders?e.baseHeaders:new r.Headers,this._dynamicHeaders=e.dynamicHeaders?e.dynamicHeaders:function(){return new r.Headers},this.transform=e.transform?e.transform:function(t){return t.json()}}return t.prototype.query=function(t,e){var r=this;return this.http.get(this.buildUrl(undefined,t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new o.Observable(function(e){try{e.error(r.transform(t))}catch(o){e.error(t)}})}),n.map(function(t){return e?e(t):r.transform(t)}))},t.prototype.get=function(t,e){var r=this;return this.http.get(this.buildUrl(t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new o.Observable(function(e){try{e.error(r.transform(t))}catch(o){e.error(t)}})}),n.map(function(t){return e?e(t):r.transform(t)}))},t.prototype.create=function(t,e){var r=this,u=this.buildRequestOptions();return this.http.post(this.buildUrl(),t,u).pipe(s.catchError(function(t){return new o.Observable(function(e){try{e.error(r.transform(t))}catch(o){e.error(t)}})}),n.map(function(t){return 201===t.status?e?e(t):r.transform(t):t}))},t.prototype.update=function(t,e,r){var u=this,i=this.buildRequestOptions();return this.http.patch(this.buildUrl(t),e,i).pipe(s.catchError(function(t){return new o.Observable(function(e){try{e.error(u.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return 200===t.status?r?r(t):u.transform(t):t}))},t.prototype["delete"]=function(t,e){var r=this;return this.http["delete"](this.buildUrl(t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new o.Observable(function(e){try{e.error(r.transform(t))}catch(o){e.error(t)}})}),n.map(function(t){return 200===t.status?e?e(t):r.transform(t):t}))},t.prototype.buildRequestOptions=function(){var t=new r.Headers;return this._baseHeaders.forEach(function(e,r){t.set(r,e)}),this._dynamicHeaders().forEach(function(e,r){t.set(r,e)}),{headers:t}},t.prototype.buildUrl=function(t,e){var r=this._path?this._path:"";return t&&(r+="/"+t),e&&(r+=this.buildQuery(e)),r=this._base+"/"+r},t.prototype.buildQuery=function(t){var e="";if(t){e+="?";var r=[];for(var o in t){var n=t[o];n!==undefined&&r.push(o+"="+n)}e+=r.join("&")}return e},t}();t.HTTP_CONFIG=c,t.httpFactory=p,t.HTTP_INTERCEPTOR_PROVIDER=a,t.CovalentHttpModule=h,t.RESTService=f,t.URLRegExpInterceptorMatcher=i,t.HttpInterceptorService=u,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/http"),require("rxjs/Observable"),require("@angular/core"),require("rxjs/operators/map"),require("rxjs/operators/catchError")):"function"==typeof define&&define.amd?define(["exports","@angular/http","rxjs/Observable","@angular/core","rxjs/operators/map","rxjs/operators/catchError"],e):e((t.covalent=t.covalent||{},t.covalent.http={}),t.ng.http,t.Rx,t.ng.core,t.Rx.Observable.prototype,t.Rx.Observable.prototype)}(this,function(t,e,r,o,n,s){"use strict";var u=function(){function t(t,e,r,o){var n=this;this._http=t,this._injector=e,this._httpInterceptorMatcher=r,this._requestInterceptors=[],o.forEach(function(t){n._requestInterceptors.push({interceptor:e.get(t.interceptor),paths:t.paths})})}return t.prototype["delete"]=function(t,r){return void 0===r&&(r={}),r.url=t,r.method=e.RequestMethod.Delete,this.request(t,r)},t.prototype.get=function(t,r){return void 0===r&&(r={}),r.url=t,r.method=e.RequestMethod.Get,this.request(t,r)},t.prototype.head=function(t,r){return void 0===r&&(r={}),r.url=t,r.method=e.RequestMethod.Head,this.request(t,r)},t.prototype.patch=function(t,r,o){return void 0===o&&(o={}),o.url=t,o.method=e.RequestMethod.Patch,o.body=r,this.request(t,o)},t.prototype.post=function(t,r,o){return void 0===o&&(o={}),o.url=t,o.method=e.RequestMethod.Post,o.body=r,this.request(t,o)},t.prototype.put=function(t,r,o){return void 0===o&&(o={}),o.url=t,o.method=e.RequestMethod.Put,o.body=r,this.request(t,o)},t.prototype.request=function(t,r){var o,n=this;void 0===r&&(r={}),o=t instanceof e.Request?t.url?t.url:r.url:t,r.url||(r.url=o);var s=this._requestInterceptors.filter(function(t){return n._httpInterceptorMatcher.matches(r,t)}).map(function(t){return t.interceptor});return this._setupRequest(t,r,s)},t.prototype._setupRequest=function(t,e,o){var n=this;try{e=this._requestResolve(e,o)}catch(s){return new r.Observable(function(t){t.error(s)})}return new r.Observable(function(r){n._http.request(t,e).subscribe(function(t){r.next(n._responseResolve(t,o)),r.complete()},function(t){r.error(n._responseErrorResolve(t,o))})})},t.prototype._requestResolve=function(t,e){return e.forEach(function(e){if(e.onRequest)try{t=e.onRequest(t)}catch(r){if(!e.onRequestError)throw r;if(!(t=e.onRequestError(t)))throw r}}),t},t.prototype._responseResolve=function(t,e){return e.forEach(function(e){e.onResponse&&(t=e.onResponse(t))}),t},t.prototype._responseErrorResolve=function(t,e){return e.forEach(function(e){e.onResponseError&&(t=e.onResponseError(t))}),t},t}(),i=function(){function t(){}return t.prototype.matches=function(t,e){return e.paths.filter(function(e){return!!(e=e.replace(/\*\*/gi,"<>").replace(/\*/gi,"[a-zA-Z0-9\\-_]+").replace(/<>/gi,"[a-zA-Z0-9\\-_/]*"))&&(e+="(\\?{1}.*)?$",new RegExp(e).test(t.url))}).length>0},t}(),c=new o.InjectionToken("HTTP_CONFIG");function p(t,e,r){return new u(t,e,new i,r.interceptors)}var a={provide:u,useFactory:p,deps:[e.Http,o.Injector,c]},h=function(){function t(){}return t.forRoot=function(e){return void 0===e&&(e={interceptors:[]}),{ngModule:t,providers:[{provide:c,useValue:e},a]}},t}();h.decorators=[{type:o.NgModule,args:[{imports:[e.HttpModule]}]}],h.ctorParameters=function(){return[]};var f=function(){function t(t,r){this.http=t,this._base=r.baseUrl.replace(/\/$/,""),this._path=r.path.replace(/^\//,""),this._baseHeaders=r.baseHeaders?r.baseHeaders:new e.Headers,this._dynamicHeaders=r.dynamicHeaders?r.dynamicHeaders:function(){return new e.Headers},this.transform=r.transform?r.transform:function(t){return t.json()}}return t.prototype.query=function(t,e){var o=this;return this.http.get(this.buildUrl(undefined,t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new r.Observable(function(e){try{e.error(o.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return e?e(t):o.transform(t)}))},t.prototype.get=function(t,e){var o=this;return this.http.get(this.buildUrl(t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new r.Observable(function(e){try{e.error(o.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return e?e(t):o.transform(t)}))},t.prototype.create=function(t,e){var o=this,u=this.buildRequestOptions();return this.http.post(this.buildUrl(),t,u).pipe(s.catchError(function(t){return new r.Observable(function(e){try{e.error(o.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return 201===t.status?e?e(t):o.transform(t):t}))},t.prototype.update=function(t,e,o){var u=this,i=this.buildRequestOptions();return this.http.patch(this.buildUrl(t),e,i).pipe(s.catchError(function(t){return new r.Observable(function(e){try{e.error(u.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return 200===t.status?o?o(t):u.transform(t):t}))},t.prototype["delete"]=function(t,e){var o=this;return this.http["delete"](this.buildUrl(t),this.buildRequestOptions()).pipe(s.catchError(function(t){return new r.Observable(function(e){try{e.error(o.transform(t))}catch(r){e.error(t)}})}),n.map(function(t){return 200===t.status?e?e(t):o.transform(t):t}))},t.prototype.buildRequestOptions=function(){var t=new e.Headers;return this._baseHeaders.forEach(function(e,r){t.set(r,e)}),this._dynamicHeaders().forEach(function(e,r){t.set(r,e)}),{headers:t}},t.prototype.buildUrl=function(t,e){var r=this._path?this._path:"";return t&&(r+="/"+t),e&&(r+=this.buildQuery(e)),r=this._base+"/"+r},t.prototype.buildQuery=function(t){var e="";if(t){e+="?";var r=[];for(var o in t){var n=t[o];n!==undefined&&r.push(o+"="+n)}e+=r.join("&")}return e},t}();t.HTTP_CONFIG=c,t.httpFactory=p,t.HTTP_INTERCEPTOR_PROVIDER=a,t.CovalentHttpModule=h,t.RESTService=f,t.URLRegExpInterceptorMatcher=i,t.HttpInterceptorService=u,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=covalent-http.umd.min.js.map

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

import { InjectionToken, Injector, NgModule } from '@angular/core';
import { Headers, Http, HttpModule, Request, RequestMethod } from '@angular/http';
import { Observable as Observable$1 } from 'rxjs/Observable';
import { map as map$1 } from 'rxjs/operators/map';
import { catchError as catchError$1 } from 'rxjs/operators/catchError';
import { Request, RequestMethod, HttpModule, Http, Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { NgModule, Injector, InjectionToken } from '@angular/core';
import { map } from 'rxjs/operators/map';
import { catchError } from 'rxjs/operators/catchError';

@@ -134,7 +134,7 @@ /**

catch (/** @type {?} */ e) {
return new Observable$1((subscriber) => {
return new Observable((subscriber) => {
subscriber.error(e);
});
}
return new Observable$1((subscriber) => {
return new Observable((subscriber) => {
this._http.request(url, requestOptions)

@@ -242,4 +242,4 @@ .subscribe((response) => {

*/
function httpFactory(http$$1, injector, config) {
return new HttpInterceptorService(http$$1, injector, new URLRegExpInterceptorMatcher(), config.interceptors);
function httpFactory(http, injector, config) {
return new HttpInterceptorService(http, injector, new URLRegExpInterceptorMatcher(), config.interceptors);
}

@@ -306,4 +306,4 @@ const HTTP_INTERCEPTOR_PROVIDER = {

*/
constructor(http$$1, config) {
this.http = http$$1;
constructor(http, config) {
this.http = http;
this._base = config.baseUrl.replace(/\/$/, '');

@@ -322,4 +322,4 @@ this._path = config.path.replace(/^\//, '');

let /** @type {?} */ request = this.http.get(this.buildUrl(undefined, query), this.buildRequestOptions());
return request.pipe(catchError$1((error) => {
return new Observable$1((subscriber) => {
return request.pipe(catchError((error) => {
return new Observable((subscriber) => {
try {

@@ -332,3 +332,3 @@ subscriber.error(this.transform(error));

});
}), map$1((res) => {
}), map((res) => {
if (transform) {

@@ -347,4 +347,4 @@ return transform(res);

let /** @type {?} */ request = this.http.get(this.buildUrl(id), this.buildRequestOptions());
return request.pipe(catchError$1((error) => {
return new Observable$1((subscriber) => {
return request.pipe(catchError((error) => {
return new Observable((subscriber) => {
try {

@@ -357,3 +357,3 @@ subscriber.error(this.transform(error));

});
}), map$1((res) => {
}), map((res) => {
if (transform) {

@@ -373,4 +373,4 @@ return transform(res);

let /** @type {?} */ request = this.http.post(this.buildUrl(), obj, requestOptions);
return request.pipe(catchError$1((error) => {
return new Observable$1((subscriber) => {
return request.pipe(catchError((error) => {
return new Observable((subscriber) => {
try {

@@ -383,3 +383,3 @@ subscriber.error(this.transform(error));

});
}), map$1((res) => {
}), map((res) => {
if (res.status === 201) {

@@ -405,4 +405,4 @@ if (transform) {

let /** @type {?} */ request = this.http.patch(this.buildUrl(id), obj, requestOptions);
return request.pipe(catchError$1((error) => {
return new Observable$1((subscriber) => {
return request.pipe(catchError((error) => {
return new Observable((subscriber) => {
try {

@@ -415,3 +415,3 @@ subscriber.error(this.transform(error));

});
}), map$1((res) => {
}), map((res) => {
if (res.status === 200) {

@@ -435,4 +435,4 @@ if (transform) {

let /** @type {?} */ request = this.http.delete(this.buildUrl(id), this.buildRequestOptions());
return request.pipe(catchError$1((error) => {
return new Observable$1((subscriber) => {
return request.pipe(catchError((error) => {
return new Observable((subscriber) => {
try {

@@ -445,3 +445,3 @@ subscriber.error(this.transform(error));

});
}), map$1((res) => {
}), map((res) => {
if (res.status === 200) {

@@ -448,0 +448,0 @@ if (transform) {

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

import { InjectionToken, Injector, NgModule } from '@angular/core';
import { Headers, Http, HttpModule, Request, RequestMethod } from '@angular/http';
import { Observable as Observable$1 } from 'rxjs/Observable';
import { map as map$1 } from 'rxjs/operators/map';
import { catchError as catchError$1 } from 'rxjs/operators/catchError';
import { Request, RequestMethod, HttpModule, Http, Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { NgModule, Injector, InjectionToken } from '@angular/core';
import { map } from 'rxjs/operators/map';
import { catchError } from 'rxjs/operators/catchError';
/**

@@ -142,7 +142,7 @@ * @fileoverview added by tsickle

catch (e) {
return new Observable$1(function (subscriber) {
return new Observable(function (subscriber) {
subscriber.error(e);
});
}
return new Observable$1(function (subscriber) {
return new Observable(function (subscriber) {
_this._http.request(url, requestOptions)

@@ -252,4 +252,4 @@ .subscribe(function (response) {

*/
function httpFactory(http$$1, injector, config) {
return new HttpInterceptorService(http$$1, injector, new URLRegExpInterceptorMatcher(), config.interceptors);
function httpFactory(http, injector, config) {
return new HttpInterceptorService(http, injector, new URLRegExpInterceptorMatcher(), config.interceptors);
}

@@ -315,4 +315,4 @@ var HTTP_INTERCEPTOR_PROVIDER = {

*/
function RESTService(http$$1, config) {
this.http = http$$1;
function RESTService(http, config) {
this.http = http;
this._base = config.baseUrl.replace(/\/$/, '');

@@ -332,4 +332,4 @@ this._path = config.path.replace(/^\//, '');

var /** @type {?} */ request = this.http.get(this.buildUrl(undefined, query), this.buildRequestOptions());
return request.pipe(catchError$1(function (error) {
return new Observable$1(function (subscriber) {
return request.pipe(catchError(function (error) {
return new Observable(function (subscriber) {
try {

@@ -342,3 +342,3 @@ subscriber.error(_this.transform(error));

});
}), map$1(function (res) {
}), map(function (res) {
if (transform) {

@@ -358,4 +358,4 @@ return transform(res);

var /** @type {?} */ request = this.http.get(this.buildUrl(id), this.buildRequestOptions());
return request.pipe(catchError$1(function (error) {
return new Observable$1(function (subscriber) {
return request.pipe(catchError(function (error) {
return new Observable(function (subscriber) {
try {

@@ -368,3 +368,3 @@ subscriber.error(_this.transform(error));

});
}), map$1(function (res) {
}), map(function (res) {
if (transform) {

@@ -385,4 +385,4 @@ return transform(res);

var /** @type {?} */ request = this.http.post(this.buildUrl(), obj, requestOptions);
return request.pipe(catchError$1(function (error) {
return new Observable$1(function (subscriber) {
return request.pipe(catchError(function (error) {
return new Observable(function (subscriber) {
try {

@@ -395,3 +395,3 @@ subscriber.error(_this.transform(error));

});
}), map$1(function (res) {
}), map(function (res) {
if (res.status === 201) {

@@ -418,4 +418,4 @@ if (transform) {

var /** @type {?} */ request = this.http.patch(this.buildUrl(id), obj, requestOptions);
return request.pipe(catchError$1(function (error) {
return new Observable$1(function (subscriber) {
return request.pipe(catchError(function (error) {
return new Observable(function (subscriber) {
try {

@@ -428,3 +428,3 @@ subscriber.error(_this.transform(error));

});
}), map$1(function (res) {
}), map(function (res) {
if (res.status === 200) {

@@ -449,4 +449,4 @@ if (transform) {

var /** @type {?} */ request = this.http.delete(this.buildUrl(id), this.buildRequestOptions());
return request.pipe(catchError$1(function (error) {
return new Observable$1(function (subscriber) {
return request.pipe(catchError(function (error) {
return new Observable(function (subscriber) {
try {

@@ -459,3 +459,3 @@ subscriber.error(_this.transform(error));

});
}), map$1(function (res) {
}), map(function (res) {
if (res.status === 200) {

@@ -462,0 +462,0 @@ if (transform) {

{
"name": "@covalent/http",
"version": "1.0.0-rc.4",
"version": "1.0.0-rc.5",
"description": "Teradata UI Platform Http Helper Module",

@@ -5,0 +5,0 @@ "keywords": [

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