azure-devops-extension-api
Advanced tools
Comparing version 1.149.1 to 1.149.2
@@ -0,1 +1,2 @@ | ||
import "whatwg-fetch"; | ||
import { IAuthorizationTokenProvider } from "./Context"; | ||
@@ -2,0 +3,0 @@ /** |
@@ -41,3 +41,3 @@ /* | ||
}; | ||
define(["require", "exports"], function (require, exports) { | ||
define(["require", "exports", "whatwg-fetch"], function (require, exports) { | ||
"use strict"; | ||
@@ -44,0 +44,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,1 +0,1 @@ | ||
var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))(function(a,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?a(e.value):new t(function(r){r(e.value)}).then(o,i)}c((n=n.apply(e,r||[])).next())})},__generator=this&&this.__generator||function(e,r){function t(t){return function(o){return function(t){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return i.label++,{value:t[1],done:!1};case 5:i.label++,a=t[1],t=[0];continue;case 7:t=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(6===t[0]||2===t[0])){i=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){i.label=t[1];break}if(6===t[0]&&i.label<s[1]){i.label=s[1],s=t;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(t);break}s[2]&&i.ops.pop(),i.trys.pop();continue}t=r.call(e,i)}catch(e){t=[6,e],a=0}finally{n=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,o])}}var n,a,s,o,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o};define(["require","exports"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.issueRequest=function(e,r,t){return __awaiter(this,void 0,void 0,function(){var n,a,s,o,i,c,u,l,p,h,f,d;return __generator(this,function(w){switch(w.label){case 0:if(n=void 0,r||(r={}),r.headers){if(r.headers instanceof Headers)a=r.headers;else if(a=new Headers,"function"==typeof r.headers.hasOwnProperty)for(s in r.headers)r.headers.hasOwnProperty(s)&&a.append(s,r.headers[s])}else a=new Headers;r.headers=a,a.append("X-VSS-ReauthenticationAction","Suppress"),t&&(o=t.sessionId,i=t.command,o&&(i?a.append("X-TFS-Session",o+","+i):a.append("X-TFS-Session",o))),r.credentials="same-origin",c=!1,w.label=1;case 1:return t&&t.authTokenProvider?(l=(u=a).append,p=["Authorization"],[4,t.authTokenProvider.getAuthorizationHeader(c)]):[3,3];case 2:l.apply(u,p.concat([w.sent()])),a.append("X-TFS-FedAuthRedirect","Suppress"),w.label=3;case 3:return w.trys.push([3,5,,6]),[4,fetch(e,r)];case 4:return n=w.sent(),[3,6];case 5:throw h=w.sent(),console.warn("Unhandled exception in fetch for "+e+": "+(h&&h.toString())),f=new Error("TF400893: Unable to contact the server. Please check your network connection and try again."),f.name="NetworkException",f;case 6:if(401===n.status&&!c&&t&&t.authTokenProvider)return c=!0,[3,7];w.label=7;case 7:w.label=8;case 8:return n.ok?[3,10]:(f=new Error,f.name="TFS.WebApi.Exception",f.status=n.status,d=f,[4,n.text()]);case 9:if(d.responseText=w.sent(),f.responseText&&""!==f.responseText)try{f.serverError=JSON.parse(f.responseText),f.serverError&&f.serverError.message&&(f.message=f.serverError.message)}catch(e){}throw f.message||(f.message=n.status+": "+n.statusText),f;case 10:return[2,n]}})})}}); | ||
var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))(function(a,s){function o(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){e.done?a(e.value):new t(function(r){r(e.value)}).then(o,i)}c((n=n.apply(e,r||[])).next())})},__generator=this&&this.__generator||function(e,r){function t(t){return function(o){return function(t){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return i.label++,{value:t[1],done:!1};case 5:i.label++,a=t[1],t=[0];continue;case 7:t=i.ops.pop(),i.trys.pop();continue;default:if(s=i.trys,!(s=s.length>0&&s[s.length-1])&&(6===t[0]||2===t[0])){i=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){i.label=t[1];break}if(6===t[0]&&i.label<s[1]){i.label=s[1],s=t;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(t);break}s[2]&&i.ops.pop(),i.trys.pop();continue}t=r.call(e,i)}catch(e){t=[6,e],a=0}finally{n=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,o])}}var n,a,s,o,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return o={next:t(0),throw:t(1),return:t(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o};define(["require","exports","whatwg-fetch"],function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.issueRequest=function(e,r,t){return __awaiter(this,void 0,void 0,function(){var n,a,s,o,i,c,u,l,h,p,f,d;return __generator(this,function(w){switch(w.label){case 0:if(n=void 0,r||(r={}),r.headers){if(r.headers instanceof Headers)a=r.headers;else if(a=new Headers,"function"==typeof r.headers.hasOwnProperty)for(s in r.headers)r.headers.hasOwnProperty(s)&&a.append(s,r.headers[s])}else a=new Headers;r.headers=a,a.append("X-VSS-ReauthenticationAction","Suppress"),t&&(o=t.sessionId,i=t.command,o&&(i?a.append("X-TFS-Session",o+","+i):a.append("X-TFS-Session",o))),r.credentials="same-origin",c=!1,w.label=1;case 1:return t&&t.authTokenProvider?(l=(u=a).append,h=["Authorization"],[4,t.authTokenProvider.getAuthorizationHeader(c)]):[3,3];case 2:l.apply(u,h.concat([w.sent()])),a.append("X-TFS-FedAuthRedirect","Suppress"),w.label=3;case 3:return w.trys.push([3,5,,6]),[4,fetch(e,r)];case 4:return n=w.sent(),[3,6];case 5:throw p=w.sent(),console.warn("Unhandled exception in fetch for "+e+": "+(p&&p.toString())),f=new Error("TF400893: Unable to contact the server. Please check your network connection and try again."),f.name="NetworkException",f;case 6:if(401===n.status&&!c&&t&&t.authTokenProvider)return c=!0,[3,7];w.label=7;case 7:w.label=8;case 8:return n.ok?[3,10]:(f=new Error,f.name="TFS.WebApi.Exception",f.status=n.status,d=f,[4,n.text()]);case 9:if(d.responseText=w.sent(),f.responseText&&""!==f.responseText)try{f.serverError=JSON.parse(f.responseText),f.serverError&&f.serverError.message&&(f.message=f.serverError.message)}catch(e){}throw f.message||(f.message=n.status+": "+n.statusText),f;case 10:return[2,n]}})})}}); |
{ | ||
"name": "azure-devops-extension-api", | ||
"version": "1.149.1", | ||
"version": "1.149.2", | ||
"description": "REST client libraries and contracts for Azure DevOps web extension developers.", | ||
@@ -24,3 +24,4 @@ "repository": { | ||
"dependencies": { | ||
"azure-devops-extension-sdk": "~2.0.4" | ||
"azure-devops-extension-sdk": "~2.0.5", | ||
"whatwg-fetch": "~3.0.0" | ||
}, | ||
@@ -27,0 +28,0 @@ "devDependencies": { |
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
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
3675024
79440
2
+ Addedwhatwg-fetch@~3.0.0
+ Addedwhatwg-fetch@3.0.1(transitive)