azure-devops-extension-sdk
Advanced tools
Comparing version 2.0.3 to 2.0.4
{ | ||
"name": "azure-devops-extension-sdk", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Azure DevOps web extension JavaScript library.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -45,3 +45,3 @@ /** | ||
*/ | ||
export declare const enum HostType { | ||
export declare enum HostType { | ||
/** | ||
@@ -48,0 +48,0 @@ * The Deployment host |
18
SDK.js
@@ -51,2 +51,20 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
exports.sdkVersion = 3.0; | ||
/** | ||
* DevOps host level | ||
*/ | ||
var HostType; | ||
(function (HostType) { | ||
/** | ||
* The Deployment host | ||
*/ | ||
HostType[HostType["Deployment"] = 1] = "Deployment"; | ||
/** | ||
* The Enterprise host | ||
*/ | ||
HostType[HostType["Enterprise"] = 2] = "Enterprise"; | ||
/** | ||
* The organization host | ||
*/ | ||
HostType[HostType["Organization"] = 4] = "Organization"; | ||
})(HostType = exports.HostType || (exports.HostType = {})); | ||
var hostControlId = "DevOps.HostControl"; | ||
@@ -53,0 +71,0 @@ var serviceManagerId = "DevOps.ServiceManager"; |
@@ -1,1 +0,1 @@ | ||
var __assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,u)}c((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=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++,o=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],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,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 r(e,t){var n,r=window;"function"==typeof r.CustomEvent?n=new r.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 o(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,w]})})}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){d||((d=document.createElement("style")).type="text/css",document.head.appendChild(d));var t=[];if(e)for(var n in e)t.push("--"+n+": "+e[n]);d.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }",r("themeApplied",{detail:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.sdkVersion=3;var u,c,s,f,l,d,h,v="DevOps.HostControl",g="DevOps.ServiceManager",p=n.channelManager.addChannel(window.parent),w=new Promise(function(e){h=e});p.getObjectRegistry().register("DevOps.SdkClient",{dispatchEvent:r}),t.init=function(e){return new Promise(function(n){var r=__assign({},e,{sdkVersion:t.sdkVersion});p.invokeRemoteMethod("initialHandshake",v,[r]).then(function(e){c=e.initialConfig||{},s=e.contributionId;var t=e.context;u=t.extension,f=t.user,l=t.host,e.themeData&&(a(e.themeData),window.addEventListener("themeChanged",function(e){a(e.detail.data)})),h(),n()})})},t.ready=o,t.notifyLoadSucceeded=function(){return p.invokeRemoteMethod("notifyLoadSucceeded",v)},t.notifyLoadFailed=function(e){return p.invokeRemoteMethod("notifyLoadFailed",v,[e])},t.getConfiguration=function(){if(!c)throw new Error(i("getConfiguration"));return c},t.getContributionId=function(){if(!s)throw new Error(i("getContributionId"));return s},t.getUser=function(){if(!f)throw new Error(i("getUser"));return f},t.getHost=function(){if(!l)throw new Error(i("getHost"));return l},t.getExtensionContext=function(){if(!u)throw new Error(i("getExtensionContext"));return u},t.getService=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,o().then(function(){return p.invokeRemoteMethod("getService",g,[e])})]})})},t.register=function(e,t){p.getObjectRegistry().register(e,t)},t.unregister=function(e){p.getObjectRegistry().unregister(e)},t.getAccessToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,p.invokeRemoteMethod("getAccessToken",v).then(function(e){return e.token})]})})},t.getAppToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,p.invokeRemoteMethod("getAppToken",v).then(function(e){return e.token})]})})},t.resize=function(e,t){var n=document.body;if(n){var r="number"==typeof e?e:n?n.scrollWidth:void 0,o="number"==typeof t?t:n?n.scrollHeight:void 0;p.invokeRemoteMethod("resize",v,[r,o])}},t.applyTheme=a}); | ||
var __assign=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function u(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,u)}c((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,o&&(i=2&n[0]?o.return:n[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;switch(o=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++,o=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],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,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 r(e,t){var n,r=window;"function"==typeof r.CustomEvent?n=new r.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 o(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,w]})})}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){d||((d=document.createElement("style")).type="text/css",document.head.appendChild(d));var t=[];if(e)for(var n in e)t.push("--"+n+": "+e[n]);d.innerText=":root { "+t.join("; ")+" } body { color: var(--text-primary-color) }",r("themeApplied",{detail:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.sdkVersion=3;!function(e){e[e.Deployment=1]="Deployment",e[e.Enterprise=2]="Enterprise",e[e.Organization=4]="Organization"}(t.HostType||(t.HostType={}));var u,c,s,f,l,d,h,p="DevOps.HostControl",v="DevOps.ServiceManager",g=n.channelManager.addChannel(window.parent),w=new Promise(function(e){h=e});g.getObjectRegistry().register("DevOps.SdkClient",{dispatchEvent:r}),t.init=function(e){return new Promise(function(n){var r=__assign({},e,{sdkVersion:t.sdkVersion});g.invokeRemoteMethod("initialHandshake",p,[r]).then(function(e){c=e.initialConfig||{},s=e.contributionId;var t=e.context;u=t.extension,f=t.user,l=t.host,e.themeData&&(a(e.themeData),window.addEventListener("themeChanged",function(e){a(e.detail.data)})),h(),n()})})},t.ready=o,t.notifyLoadSucceeded=function(){return g.invokeRemoteMethod("notifyLoadSucceeded",p)},t.notifyLoadFailed=function(e){return g.invokeRemoteMethod("notifyLoadFailed",p,[e])},t.getConfiguration=function(){if(!c)throw new Error(i("getConfiguration"));return c},t.getContributionId=function(){if(!s)throw new Error(i("getContributionId"));return s},t.getUser=function(){if(!f)throw new Error(i("getUser"));return f},t.getHost=function(){if(!l)throw new Error(i("getHost"));return l},t.getExtensionContext=function(){if(!u)throw new Error(i("getExtensionContext"));return u},t.getService=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,o().then(function(){return g.invokeRemoteMethod("getService",v,[e])})]})})},t.register=function(e,t){g.getObjectRegistry().register(e,t)},t.unregister=function(e){g.getObjectRegistry().unregister(e)},t.getAccessToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,g.invokeRemoteMethod("getAccessToken",p).then(function(e){return e.token})]})})},t.getAppToken=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,g.invokeRemoteMethod("getAppToken",p).then(function(e){return e.token})]})})},t.resize=function(e,t){var n=document.body;if(n){var r="number"==typeof e?e:n?n.scrollWidth:void 0,o="number"==typeof t?t:n?n.scrollHeight:void 0;g.invokeRemoteMethod("resize",p,[r,o])}},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
68082
1188