azure-devops-extension-sdk
Advanced tools
Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "azure-devops-extension-sdk", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Azure DevOps web extension JavaScript library.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -120,3 +120,4 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
parentChannel.invokeRemoteMethod("initialHandshake", hostControlId, [initOptions]).then(function (handshakeData) { | ||
hostPageContext = handshakeData.pageContext; | ||
var context = handshakeData.context; | ||
hostPageContext = context.pageContext; | ||
webContext = hostPageContext ? hostPageContext.webContext : undefined; | ||
@@ -126,3 +127,2 @@ teamContext = webContext ? webContext.team : undefined; | ||
initialContributionId = handshakeData.contributionId; | ||
var context = handshakeData.context; | ||
extensionContext = context.extension; | ||
@@ -129,0 +129,0 @@ userContext = context.user; |
@@ -1,1 +0,1 @@ | ||
var __assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},__awaiter=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function u(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(a,u)}c((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){u.label=n[1];break}if(6===n[0]&&u.label<i[1]){u.label=i[1],i=n;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(n);break}i[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var o,r,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","./XDM"],function(e,t,n){"use strict";function o(e,t){var n,o=window;"function"==typeof o.CustomEvent?n=new o.CustomEvent(e,t):(t=t||{bubbles:!1,cancelable:!1},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail)),window.dispatchEvent(n)}function r(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,_]})})}function i(e){return"Attempted to call "+e+"() before init() was complete. Wait for init to complete or place within a ready() callback."}function a(e){p||((p=document.createElement("style")).type="text/css",document.head.appendChild(p));var t=[];if(e)for(var n in e)t.push("--"+n+": "+e[n]);p.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }",o("themeApplied",{detail:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.sdkVersion=3.1;var u=window;u._AzureDevOpsSDKVersion&&console.error("The AzureDevOps SDK is already loaded. Only one version of this module can be loaded in a given document."),u._AzureDevOpsSDKVersion=t.sdkVersion;!function(e){e[e.Unknown=0]="Unknown",e[e.Deployment=1]="Deployment",e[e.Enterprise=2]="Enterprise",e[e.Organization=4]="Organization"}(t.HostType||(t.HostType={}));var c,s,f,d,l,h,g,v,p,w,b="DevOps.HostControl",y="DevOps.ServiceManager",m=n.channelManager.addChannel(window.parent),_=new Promise(function(e){w=e});m.getObjectRegistry().register("DevOps.SdkClient",{dispatchEvent:o}),t.init=function(e){return new Promise(function(n){var o=__assign({},e,{sdkVersion:t.sdkVersion});m.invokeRemoteMethod("initialHandshake",b,[o]).then(function(e){f=e.pageContext,s=f?f.webContext:void 0,c=s?s.team:void 0,l=e.initialConfig||{},h=e.contributionId;var t=e.context;d=t.extension,g=t.user,v=t.host,e.themeData&&(a(e.themeData),window.addEventListener("themeChanged",function(e){a(e.detail.data)})),w(),n()})})},t.ready=r,t.notifyLoadSucceeded=function(){return m.invokeRemoteMethod("notifyLoadSucceeded",b)},t.notifyLoadFailed=function(e){return m.invokeRemoteMethod("notifyLoadFailed",b,[e])},t.getConfiguration=function(){if(!l)throw new Error(i("getConfiguration"));return l},t.getContributionId=function(){if(!h)throw new Error(i("getContributionId"));return h},t.getUser=function(){if(!g)throw new Error(i("getUser"));return g},t.getHost=function(){if(!v)throw new Error(i("getHost"));return v},t.getExtensionContext=function(){if(!d)throw new Error(i("getExtensionContext"));return d},t.getTeamContext=function(){if(!c)throw new Error(i("getTeamContext"));return c},t.getPageContext=function(){if(!f)throw new Error(i("getPageContext"));return f},t.getWebContext=function(){if(!s)throw new Error(i("getWebContext"));return s},t.getService=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,r().then(function(){return m.invokeRemoteMethod("getService",y,[e])})]})})},t.register=function(e,t){m.getObjectRegistry().register(e,t)},t.unregister=function(e){m.getObjectRegistry().unregister(e)},t.getAccessToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,m.invokeRemoteMethod("getAccessToken",b).then(function(e){return e.token})]})})},t.getAppToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,m.invokeRemoteMethod("getAppToken",b).then(function(e){return e.token})]})})},t.resize=function(e,t){var n=document.body;if(n){var o="number"==typeof e?e:n?n.scrollWidth:void 0,r="number"==typeof t?t:n?n.scrollHeight:void 0;m.invokeRemoteMethod("resize",b,[o,r])}},t.applyTheme=a}); | ||
var __assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},__awaiter=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(r,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function u(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){e.done?r(e.value):new n(function(t){t(e.value)}).then(a,u)}c((o=o.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(i=2&n[0]?r.return:n[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,n[1])).done)return i;switch(r=0,i&&(n=[2&n[0],i.value]),n[0]){case 0:case 1:i=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(i=u.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){u.label=n[1];break}if(6===n[0]&&u.label<i[1]){u.label=i[1],i=n;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(n);break}i[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],r=0}finally{o=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var o,r,i,a,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};define(["require","exports","./XDM"],function(e,t,n){"use strict";function o(e,t){var n,o=window;"function"==typeof o.CustomEvent?n=new o.CustomEvent(e,t):(t=t||{bubbles:!1,cancelable:!1},(n=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail)),window.dispatchEvent(n)}function r(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,_]})})}function i(e){return"Attempted to call "+e+"() before init() was complete. Wait for init to complete or place within a ready() callback."}function a(e){p||((p=document.createElement("style")).type="text/css",document.head.appendChild(p));var t=[];if(e)for(var n in e)t.push("--"+n+": "+e[n]);p.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }",o("themeApplied",{detail:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.sdkVersion=3.1;var u=window;u._AzureDevOpsSDKVersion&&console.error("The AzureDevOps SDK is already loaded. Only one version of this module can be loaded in a given document."),u._AzureDevOpsSDKVersion=t.sdkVersion;!function(e){e[e.Unknown=0]="Unknown",e[e.Deployment=1]="Deployment",e[e.Enterprise=2]="Enterprise",e[e.Organization=4]="Organization"}(t.HostType||(t.HostType={}));var c,s,f,d,l,h,g,v,p,w,b="DevOps.HostControl",y="DevOps.ServiceManager",m=n.channelManager.addChannel(window.parent),_=new Promise(function(e){w=e});m.getObjectRegistry().register("DevOps.SdkClient",{dispatchEvent:o}),t.init=function(e){return new Promise(function(n){var o=__assign({},e,{sdkVersion:t.sdkVersion});m.invokeRemoteMethod("initialHandshake",b,[o]).then(function(e){var t=e.context;f=t.pageContext,s=f?f.webContext:void 0,c=s?s.team:void 0,l=e.initialConfig||{},h=e.contributionId,d=t.extension,g=t.user,v=t.host,e.themeData&&(a(e.themeData),window.addEventListener("themeChanged",function(e){a(e.detail.data)})),w(),n()})})},t.ready=r,t.notifyLoadSucceeded=function(){return m.invokeRemoteMethod("notifyLoadSucceeded",b)},t.notifyLoadFailed=function(e){return m.invokeRemoteMethod("notifyLoadFailed",b,[e])},t.getConfiguration=function(){if(!l)throw new Error(i("getConfiguration"));return l},t.getContributionId=function(){if(!h)throw new Error(i("getContributionId"));return h},t.getUser=function(){if(!g)throw new Error(i("getUser"));return g},t.getHost=function(){if(!v)throw new Error(i("getHost"));return v},t.getExtensionContext=function(){if(!d)throw new Error(i("getExtensionContext"));return d},t.getTeamContext=function(){if(!c)throw new Error(i("getTeamContext"));return c},t.getPageContext=function(){if(!f)throw new Error(i("getPageContext"));return f},t.getWebContext=function(){if(!s)throw new Error(i("getWebContext"));return s},t.getService=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,r().then(function(){return m.invokeRemoteMethod("getService",y,[e])})]})})},t.register=function(e,t){m.getObjectRegistry().register(e,t)},t.unregister=function(e){m.getObjectRegistry().unregister(e)},t.getAccessToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,m.invokeRemoteMethod("getAccessToken",b).then(function(e){return e.token})]})})},t.getAppToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,m.invokeRemoteMethod("getAppToken",b).then(function(e){return e.token})]})})},t.resize=function(e,t){var n=document.body;if(n){var o="number"==typeof e?e:n?n.scrollWidth:void 0,r="number"==typeof t?t:n?n.scrollHeight:void 0;m.invokeRemoteMethod("resize",b,[o,r])}},t.applyTheme=a}); |
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
73175