Socket
Socket
Sign inDemoInstall

@govflanders/vl-widget-plugin

Package Overview
Dependencies
Maintainers
13
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govflanders/vl-widget-plugin - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

2

dist/index.esm.js

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

import{Error as t}from"@govflanders/vl-widget-utility";import{EventBase as n,EventScope as e,EventSourceBase as r}from"@govflanders/vl-widget-event";var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])};function i(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function u(t,n,e,r){return new(e||(e=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new e(function(n){n(t.value)}).then(u,s)}c((r=r.apply(t,n||[])).next())})}function s(t,n){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(t,u)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a,l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(n),p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(l),f=function(t){function n(n,r,o,i){void 0===i&&(i=e.Broadcast);var u=t.call(this,n,r,i)||this;return u.pluginExtension=o,u}return i(n,t),n.prototype.getExtension=function(){return this.pluginExtension},n}(l),h=function(t){function n(n,r,o,i){void 0===i&&(i=e.Broadcast);var u=t.call(this,n,r,i)||this;return u.error=o,u}return i(n,t),n.prototype.getError=function(){return this.error},n}(l),g=function(){function t(t,n){this.pluginHost=t,this.pluginDiscovery=n,this.pluginRegistry=[]}return t.prototype.getPluginHost=function(){return this.pluginHost},t.prototype.getPluginDiscovery=function(){return this.pluginDiscovery},t.prototype.createPluginInstance=function(t){return u(this,void 0,void 0,function(){var n;return s(this,function(e){switch(e.label){case 0:return[4,this.getPluginDiscovery().resolvePluginFactory(t)];case 1:return[4,e.sent().createPluginInstance(this.getPluginHost(),t)];case 2:return[4,(n=e.sent()).initialize()];case 3:return e.sent(),this.pluginRegistry.push(n),[2,n]}})})},t.prototype.list=function(t){for(var n=[],e="function"==typeof t?t:null,r=0,o=this.pluginRegistry;r<o.length;r++){var i=o[r];(null===e||e(i))&&n.push(i)}return n},t.prototype.each=function(t){return u(this,void 0,void 0,function(){var n,e,r,o;return s(this,function(i){for(n=[],e=0,r=this.pluginRegistry;e<r.length;e++)o=r[e],n.push(t(o));return[2,Promise.all(n)]})})},t.prototype.has=function(t){return null!==this.get(t)},t.prototype.get=function(t){return this.pluginRegistry.find(function(n){return n.getPluginId()===t})||null},t}(),y=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(g),v=function(){function t(t,n){this.pluginExtensionManager=t,this.createPluginInstanceCallback=n}return t.prototype.getPluginHost=function(){return this.pluginExtensionManager.getPluginHost()},t.prototype.getPluginDiscovery=function(){return this.pluginExtensionManager.getPluginDiscovery()},t.prototype.createPluginInstance=function(t){return this.pluginExtensionManager.createPluginInstance(t).then(this.createPluginInstanceCallback)},t.prototype.has=function(t){return this.pluginExtensionManager.has(t)},t.prototype.get=function(t){return this.pluginExtensionManager.get(t)},t.prototype.list=function(t){return this.pluginExtensionManager.list(t)},t.prototype.each=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.pluginExtensionManager.each(t)]})})},t}();!function(t){t.None="none",t.Initialize="initialize",t.Ready="ready",t.Failed="failed"}(a||(a={}));var d,P,x=function(t){function n(e,r,o,i){void 0===i&&(i=null);var u=t.call(this,o,i)||this;return Object.setPrototypeOf(u,n.prototype),u.pluginHost=e,u.pluginContext=r,u}return i(n,t),n}(t.RuntimeError),m=function(t){function n(e,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,n.prototype),i.pluginContext=e,i}return i(n,t),n}(t.RuntimeError),E=function(t){function n(e,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,n.prototype),i.plugin=e,i}return i(n,t),n}(t.RuntimeError),C=function(t){function n(n,e){var r=t.call(this)||this;return r.pluginHost=n,r.pluginContext=e,r.pluginState=a.None,r}return i(n,t),n.prototype.onBeforeInitialize=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return this.validatePluginContext(this.getPluginContext()),[2]})})},n.prototype.onInitialize=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onBeforeReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onFailed=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onError=function(t){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.createHookEvent=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];switch(t){case"error":return new h(t,this,n[0]);default:return new p(t,this)}},n.prototype.invokeHook=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return u(this,void 0,void 0,function(){var e,r,o,i;return s(this,function(u){switch(u.label){case 0:return t.length>0?(r=[],"function"==typeof this[o="on"+(t.charAt(0).toUpperCase()+t.slice(1))]&&r.push((e=this)[o].apply(e,n)),this.getPluginState()===a.Ready&&(i=this.createHookEvent.apply(this,[t].concat(n)),r.push(this.getEventEmitter().emit(i))),[4,Promise.all(r).then(function(){})]):[3,2];case 1:u.sent(),u.label=2;case 2:return[2]}})})},n.prototype.validatePluginContext=function(t){if("string"!=typeof t.pluginTypeId)throw new E(this,'Context property "pluginTypeId" should be a string')},n.prototype.initialize=function(){var t=this;return void 0===this.pluginInitPromise?(this.pluginState=a.Initialize,this.pluginInitPromise=Promise.resolve().then(function(){return t.invokeHook("beforeInitialize")}).then(function(){return t.invokeHook("initialize")}).then(function(){return t.invokeHook("beforeReady")}).then(function(){return t.pluginState=a.Ready,t.invokeHook("ready")}).catch(function(n){return t.pluginState=a.Failed,t.invokeHook("failed",n).then(function(){return Promise.reject(n)})})):this.invokeHook("error",new E(this,'Plugin "'+this.getPluginTypeId()+'" is being initialized multiple times')),this.pluginInitPromise},n.prototype.getPluginState=function(){return this.pluginState},n.prototype.getPluginHost=function(){return this.pluginHost},n.prototype.getPluginContext=function(){return this.pluginContext},n.prototype.getPluginTypeId=function(){return this.getPluginContext().pluginTypeId},n.prototype.toString=function(){return this.getPluginTypeId()+":"+this.getPluginId()},n}(r);!function(t){t.Internal="internal",t.Required="required",t.Optional="optional"}(d||(d={})),function(t){t.UnSafe="unsafe",t.Safe="safe"}(P||(P={}));var w=function(n){function e(t,e){var r=n.call(this,t,e)||this;return r.extensionPromiseCache={},r}return i(e,n),e.prototype.createHookEvent=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];switch(t){case"extension":return new f(t,this,e[0]);default:return n.prototype.createHookEvent.apply(this,[t].concat(e))}},e.prototype.onBeforeReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,n.prototype.onBeforeReady.call(this)];case 1:return t.sent(),[4,this.createExtensionsByConstraint(d.Internal)];case 2:return t.sent(),[2]}})})},e.prototype.onReady=function(){return u(this,void 0,void 0,function(){var t=this;return s(this,function(e){switch(e.label){case 0:return[4,n.prototype.onReady.call(this)];case 1:return e.sent(),[4,this.createExtensionsByConstraint(d.Required)];case 2:return e.sent(),this.createExtensionsByConstraint(d.Optional).catch(function(n){return t.invokeHook("error",n)}),[2]}})})},e.prototype.onExtension=function(t){return u(this,void 0,void 0,function(){var n,e;return s(this,function(r){return n=t.getPluginId(),null!==(e=this.extensionPromiseCache[n]||null)&&null!==e.resolve&&(e.resolve(t),delete this.extensionPromiseCache[n]),[2]})})},e.prototype.createExtensionsByConstraint=function(t){return u(this,void 0,void 0,function(){var n;return s(this,function(e){switch(e.label){case 0:return[4,this.resolveExtensionContexts(t)];case 1:return n=e.sent(),[2,this.createExtensionsByContexts(n)]}})})},e.prototype.createExtensionsByContexts=function(t){var n=this;return Promise.resolve().then(function(){for(var e=[],r=n.getExtensionManager(),o=0,i=t;o<i.length;o++){var u=i[o],s=r.createPluginInstance(u);e.push(s)}return Promise.all(e)})},e.prototype.getExtensionManager=function(){var t=this;if(void 0===this.extensionManager){var n=this.createExtensionManager();this.extensionManager=new v(n,function(n){return t.invokeHook("extension",n).then(function(){return n})})}return this.extensionManager},e.prototype.getExtensionSafe=function(t){var n=this;return Promise.resolve().then(function(){return n.tryGetExtensionUnsafe(t)}).then(function(e){if(null===e){var r=n.extensionPromiseCache[t]||null;return null!==r&&null!==r.promise||((r=n.extensionPromiseCache[t]={promise:null,resolve:null}).promise=new Promise(function(t){r.resolve=t})),r.promise}return e})},e.prototype.tryGetExtensionUnsafe=function(n){if(this.getPluginState()!==a.Ready)throw new t.RuntimeError('Cannot retrieve "'+n+'" extension as plugin is not ready');return this.getExtensionManager().get(n)},e.prototype.getExtensionUnsafe=function(n){var e=this.tryGetExtensionUnsafe(n);if(null===e)throw new t.RuntimeError('Failed to resolve "'+n+'" extension');return e},e.prototype.getExtension=function(t,n){void 0===n&&(n=P.Safe);var e=b(t);switch(n){case P.UnSafe:return I(this.getExtensionUnsafe(e.id),e.nested);default:return this.getExtensionSafe(e.id).then(function(t){return S(t,e.nested)})}},e}(C);function b(t){var n=t.split(".");return{id:n.shift()||"",nested:n.join(".")||null}}function I(n,e){if(e){if("function"!=typeof n.getExtension)throw new t.RuntimeError('Plugin "'+n.getPluginId()+'" does not support retrieving nested extensions');return n.getExtension(e,P.UnSafe)}return n}function S(n,e){if(e){if("function"!=typeof n.getExtension)throw new t.RuntimeError('Plugin "'+n.getPluginId()+'" does not support retrieving nested extensions');return n.getExtension(e,P.Safe)}return Promise.resolve(n)}function k(t,n){return Promise.resolve().then(function(){switch(c(n)){case"string":return t.import(n);default:return n}}).then(function(n){return t.install(n)})}function F(t,n){return Promise.resolve().then(function(){var e=n.pluginModule||null;return k(t,e)}).then(function(){return n})}var M=function(){function t(t,n){this.container=t,this.pluginFactoryServiceId=n}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginFactoryServiceId=function(){return this.pluginFactoryServiceId},t.prototype.getPluginFactoryFromContainer=function(t){var n=this.getPluginFactoryServiceId();return this.getContainer().getNamed(n,t.pluginTypeId)},t.prototype.resolvePluginFactory=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.getPluginFactoryFromContainer(t)]})})},t}(),R=function(t){function n(n,e,r){var o=t.call(this,e,r)||this;return o.moduleManager=n,o}return i(n,t),n.prototype.getModuleManager=function(){return this.moduleManager},n.prototype.resolvePluginFactory=function(n){return u(this,void 0,void 0,function(){var e;return s(this,function(r){switch(r.label){case 0:return[4,F(this.getModuleManager(),n)];case 1:return e=r.sent(),[2,t.prototype.resolvePluginFactory.call(this,e)]}})})},n}(M),H=function(){function t(t,n){this.container=t,this.processorFactoryServiceId=n}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginContextProcessorFactoryServiceId=function(){return this.processorFactoryServiceId},t.prototype.getPluginContextProcessorFactoryFromContainer=function(t){var n=this.getPluginContextProcessorFactoryServiceId();return this.getContainer().getNamed(n,t.pluginTypeId)},t.prototype.resolvePluginContextProcessorFactory=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.getPluginContextProcessorFactoryFromContainer(t)]})})},t}(),B=function(t){function n(n,e,r){var o=t.call(this,e,r)||this;return o.moduleManager=n,o}return i(n,t),n.prototype.getModuleManager=function(){return this.moduleManager},n.prototype.resolvePluginContextProcessorFactory=function(n){var e=this;return Promise.resolve().then(function(){return F(e.getModuleManager(),n)}).then(function(n){return t.prototype.resolvePluginContextProcessorFactory.call(e,n)})},n}(H),O=function(){function t(t){this.processorDiscovery=t}return t.prototype.getProcessorDiscovery=function(){return this.processorDiscovery},t.prototype.process=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.getProcessorDiscovery().resolvePluginContextProcessorFactory(t)];case 1:return[4,n.sent().createPluginContextProcessor(t)];case 2:return[2,n.sent().process(t,this)]}})})},t}(),z=function(){function t(){}return t.prototype.onPreProcess=function(t,n){return Promise.resolve(t)},t.prototype.onProcess=function(t,n){return Promise.resolve(t)},t.prototype.onPostProcess=function(t,n){return Promise.resolve(t)},t.prototype.process=function(t,n){var e=this;return Promise.resolve(t).then(function(t){return e.onPreProcess(t,n)}).then(function(t){return e.onProcess(t,n)}).then(function(t){return e.onPostProcess(t,n)})},t}();export{H as ContainerPluginContextProcessorDiscovery,M as ContainerPluginDiscovery,w as ExtensiblePluginBase,h as GenericPluginErrorEvent,p as GenericPluginEvent,f as GenericPluginExtensionEvent,v as HookablePluginExtensionManager,B as ModulePluginContextProcessorDiscovery,R as ModulePluginDiscovery,C as PluginBase,m as PluginContextError,O as PluginContextPipelineBase,z as PluginContextProcessorBase,E as PluginError,l as PluginEventBase,d as PluginExtensionConstraint,y as PluginExtensionManagerBase,P as PluginExtensionResolveMethod,x as PluginFactoryError,g as PluginManagerBase,a as PluginState,b as extractPluginExtensionPathInfo,F as installPluginContext,k as installPluginModule,S as resolveNestedPluginExtensionSafe,I as resolveNestedPluginExtensionUnsafe};
import{Error as t}from"@govflanders/vl-widget-utility";import{EventBase as n,EventScope as e,EventSourceBase as r}from"@govflanders/vl-widget-event";var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])};function i(t,n){function e(){this.constructor=t}o(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function u(t,n,e,r){return new(e||(e=Promise))(function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new e(function(n){n(t.value)}).then(u,s)}c((r=r.apply(t,n||[])).next())})}function s(t,n){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(t,u)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a,l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(n),p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(l),f=function(t){function n(n,r,o,i){void 0===i&&(i=e.Broadcast);var u=t.call(this,n,r,i)||this;return u.pluginExtension=o,u}return i(n,t),n.prototype.getExtension=function(){return this.pluginExtension},n}(l),h=function(t){function n(n,r,o,i){void 0===i&&(i=e.Broadcast);var u=t.call(this,n,r,i)||this;return u.error=o,u}return i(n,t),n.prototype.getError=function(){return this.error},n}(l),g=function(){function t(t,n){this.pluginHost=t,this.pluginDiscovery=n,this.pluginRegistry=[]}return t.prototype.getPluginHost=function(){return this.pluginHost},t.prototype.getPluginDiscovery=function(){return this.pluginDiscovery},t.prototype.createPluginInstance=function(t){return u(this,void 0,void 0,function(){var n;return s(this,function(e){switch(e.label){case 0:return[4,this.getPluginDiscovery().resolvePluginFactory(t)];case 1:return[4,e.sent().createPluginInstance(this.getPluginHost(),t)];case 2:return[4,(n=e.sent()).initialize()];case 3:return e.sent(),this.pluginRegistry.push(n),[2,n]}})})},t.prototype.list=function(t){for(var n=[],e="function"==typeof t?t:null,r=0,o=this.pluginRegistry;r<o.length;r++){var i=o[r];(null===e||e(i))&&n.push(i)}return n},t.prototype.each=function(t){return u(this,void 0,void 0,function(){var n,e,r,o;return s(this,function(i){for(n=[],e=0,r=this.pluginRegistry;e<r.length;e++)o=r[e],n.push(t(o));return[2,Promise.all(n)]})})},t.prototype.has=function(t){return null!==this.get(t)},t.prototype.get=function(t){return this.pluginRegistry.find(function(n){return n.getPluginId()===t})||null},t}(),y=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n}(g),v=function(){function t(t,n){this.pluginExtensionManager=t,this.createPluginInstanceCallback=n}return t.prototype.getPluginHost=function(){return this.pluginExtensionManager.getPluginHost()},t.prototype.getPluginDiscovery=function(){return this.pluginExtensionManager.getPluginDiscovery()},t.prototype.createPluginInstance=function(t){return this.pluginExtensionManager.createPluginInstance(t).then(this.createPluginInstanceCallback)},t.prototype.has=function(t){return this.pluginExtensionManager.has(t)},t.prototype.get=function(t){return this.pluginExtensionManager.get(t)},t.prototype.list=function(t){return this.pluginExtensionManager.list(t)},t.prototype.each=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.pluginExtensionManager.each(t)]})})},t}();!function(t){t.None="none",t.Initialize="initialize",t.Ready="ready",t.Failed="failed"}(a||(a={}));var d,P,x=function(t){function n(e,r,o,i){void 0===i&&(i=null);var u=t.call(this,o,i)||this;return Object.setPrototypeOf(u,n.prototype),u.pluginHost=e,u.pluginContext=r,u}return i(n,t),n}(t.RuntimeError),m=function(t){function n(e,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,n.prototype),i.pluginContext=e,i}return i(n,t),n}(t.RuntimeError),E=function(t){function n(e,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,n.prototype),i.plugin=e,i}return i(n,t),n}(t.RuntimeError),C=function(t){function n(n,e){var r=t.call(this)||this;return r.pluginHost=n,r.pluginContext=e,r.pluginState=a.None,r}return i(n,t),n.prototype.onBeforeInitialize=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return this.validatePluginContext(this.getPluginContext()),[2]})})},n.prototype.onInitialize=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onBeforeReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onFailed=function(){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.onError=function(t){return u(this,void 0,void 0,function(){return s(this,function(t){return[2]})})},n.prototype.createHookEvent=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];switch(t){case"error":return new h(t,this,n[0]);default:return new p(t,this)}},n.prototype.invokeHook=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return u(this,void 0,void 0,function(){var e,r,o,i;return s(this,function(u){switch(u.label){case 0:return t.length>0?(e=[],"function"==typeof this[r="on"+(t.charAt(0).toUpperCase()+t.slice(1))]&&e.push((i=this)[r].apply(i,n)),this.getPluginState()===a.Ready&&(o=this.createHookEvent.apply(this,[t].concat(n)),e.push(this.getEventEmitter().emit(o))),[4,Promise.all(e).then(function(){})]):[3,2];case 1:u.sent(),u.label=2;case 2:return[2]}})})},n.prototype.validatePluginContext=function(t){if("string"!=typeof t.pluginTypeId)throw new E(this,'Context property "pluginTypeId" should be a string')},n.prototype.initialize=function(){var t=this;return void 0===this.pluginInitPromise?(this.pluginState=a.Initialize,this.pluginInitPromise=Promise.resolve().then(function(){return t.invokeHook("beforeInitialize")}).then(function(){return t.invokeHook("initialize")}).then(function(){return t.invokeHook("beforeReady")}).then(function(){return t.pluginState=a.Ready,t.invokeHook("ready")}).catch(function(n){return t.pluginState=a.Failed,t.invokeHook("failed",n).then(function(){return Promise.reject(n)})})):this.invokeHook("error",new E(this,'Plugin "'+this.getPluginTypeId()+'" is being initialized multiple times')),this.pluginInitPromise},n.prototype.getPluginState=function(){return this.pluginState},n.prototype.getPluginHost=function(){return this.pluginHost},n.prototype.getPluginContext=function(){return this.pluginContext},n.prototype.getPluginTypeId=function(){return this.getPluginContext().pluginTypeId},n.prototype.toString=function(){return this.getPluginTypeId()+":"+this.getPluginId()},n}(r);!function(t){t.Internal="internal",t.Required="required",t.Optional="optional"}(d||(d={})),function(t){t.UnSafe="unsafe",t.Safe="safe"}(P||(P={}));var w=function(n){function e(t,e){var r=n.call(this,t,e)||this;return r.extensionPromiseCache={},r}return i(e,n),e.prototype.createHookEvent=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];switch(t){case"extension":return new f(t,this,e[0]);default:return n.prototype.createHookEvent.apply(this,[t].concat(e))}},e.prototype.onBeforeReady=function(){return u(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,n.prototype.onBeforeReady.call(this)];case 1:return t.sent(),[4,this.createExtensionsByConstraint(d.Internal)];case 2:return t.sent(),[2]}})})},e.prototype.onReady=function(){return u(this,void 0,void 0,function(){var t=this;return s(this,function(e){switch(e.label){case 0:return[4,n.prototype.onReady.call(this)];case 1:return e.sent(),[4,this.createExtensionsByConstraint(d.Required)];case 2:return e.sent(),this.createExtensionsByConstraint(d.Optional).catch(function(n){return t.invokeHook("error",n)}),[2]}})})},e.prototype.onExtension=function(t){return u(this,void 0,void 0,function(){var n,e;return s(this,function(r){return n=t.getPluginId(),null!==(e=this.extensionPromiseCache[n]||null)&&null!==e.resolve&&(e.resolve(t),delete this.extensionPromiseCache[n]),[2]})})},e.prototype.createExtensionsByConstraint=function(t){return u(this,void 0,void 0,function(){var n;return s(this,function(e){switch(e.label){case 0:return[4,this.resolveExtensionContexts(t)];case 1:return n=e.sent(),[2,this.createExtensionsByContexts(n)]}})})},e.prototype.createExtensionsByContexts=function(t){var n=this;return Promise.resolve().then(function(){for(var e=[],r=n.getExtensionManager(),o=0,i=t;o<i.length;o++){var u=i[o],s=r.createPluginInstance(u);e.push(s)}return Promise.all(e)})},e.prototype.getExtensionManager=function(){var t=this;if(void 0===this.extensionManager){var n=this.createExtensionManager();this.extensionManager=new v(n,function(n){return t.invokeHook("extension",n).then(function(){return n})})}return this.extensionManager},e.prototype.getExtensionSafe=function(t){var n=this;return Promise.resolve().then(function(){return n.tryGetExtensionUnsafe(t)}).then(function(e){if(null===e){var r=n.extensionPromiseCache[t]||null;return null!==r&&null!==r.promise||((r=n.extensionPromiseCache[t]={promise:null,resolve:null}).promise=new Promise(function(t){r.resolve=t})),r.promise}return e})},e.prototype.tryGetExtensionUnsafe=function(n){if(this.getPluginState()!==a.Ready)throw new t.RuntimeError('Cannot retrieve "'+n+'" extension as plugin is not ready');return this.getExtensionManager().get(n)},e.prototype.getExtensionUnsafe=function(n){var e=this.tryGetExtensionUnsafe(n);if(null===e)throw new t.RuntimeError('Failed to resolve "'+n+'" extension');return e},e.prototype.getExtension=function(t,n){void 0===n&&(n=P.Safe);var e=b(t);switch(n){case P.UnSafe:return I(this.getExtensionUnsafe(e.id),e.nested);default:return this.getExtensionSafe(e.id).then(function(t){return S(t,e.nested)})}},e}(C);function b(t){var n=t.split(".");return{id:n.shift()||"",nested:n.join(".")||null}}function I(n,e){if(e){if("function"!=typeof n.getExtension)throw new t.RuntimeError('Plugin "'+n.getPluginId()+'" does not support retrieving nested extensions');return n.getExtension(e,P.UnSafe)}return n}function S(n,e){if(e){if("function"!=typeof n.getExtension)throw new t.RuntimeError('Plugin "'+n.getPluginId()+'" does not support retrieving nested extensions');return n.getExtension(e,P.Safe)}return Promise.resolve(n)}function k(t,n){return Promise.resolve().then(function(){switch(c(n)){case"string":return t.import(n);default:return n}}).then(function(n){return t.install(n)})}function F(t,n){return Promise.resolve().then(function(){var e=n.pluginModule||null;return k(t,e)}).then(function(){return n})}var M=function(){function t(t,n){this.container=t,this.pluginFactoryServiceId=n}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginFactoryServiceId=function(){return this.pluginFactoryServiceId},t.prototype.getPluginFactoryFromContainer=function(t){var n=this.getPluginFactoryServiceId();return this.getContainer().getNamed(n,t.pluginTypeId)},t.prototype.resolvePluginFactory=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.getPluginFactoryFromContainer(t)]})})},t}(),R=function(t){function n(n,e,r){var o=t.call(this,e,r)||this;return o.moduleManager=n,o}return i(n,t),n.prototype.getModuleManager=function(){return this.moduleManager},n.prototype.resolvePluginFactory=function(n){return u(this,void 0,void 0,function(){var e;return s(this,function(r){switch(r.label){case 0:return[4,F(this.getModuleManager(),n)];case 1:return e=r.sent(),[2,t.prototype.resolvePluginFactory.call(this,e)]}})})},n}(M),H=function(){function t(t,n){this.container=t,this.processorFactoryServiceId=n}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginContextProcessorFactoryServiceId=function(){return this.processorFactoryServiceId},t.prototype.getPluginContextProcessorFactoryFromContainer=function(t){var n=this.getPluginContextProcessorFactoryServiceId();return this.getContainer().getNamed(n,t.pluginTypeId)},t.prototype.resolvePluginContextProcessorFactory=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){return[2,this.getPluginContextProcessorFactoryFromContainer(t)]})})},t}(),B=function(t){function n(n,e,r){var o=t.call(this,e,r)||this;return o.moduleManager=n,o}return i(n,t),n.prototype.getModuleManager=function(){return this.moduleManager},n.prototype.resolvePluginContextProcessorFactory=function(n){var e=this;return Promise.resolve().then(function(){return F(e.getModuleManager(),n)}).then(function(n){return t.prototype.resolvePluginContextProcessorFactory.call(e,n)})},n}(H),O=function(){function t(t){this.processorDiscovery=t}return t.prototype.getProcessorDiscovery=function(){return this.processorDiscovery},t.prototype.process=function(t){return u(this,void 0,void 0,function(){return s(this,function(n){switch(n.label){case 0:return[4,this.getProcessorDiscovery().resolvePluginContextProcessorFactory(t)];case 1:return[4,n.sent().createPluginContextProcessor(t)];case 2:return[2,n.sent().process(t,this)]}})})},t}(),z=function(){function t(){}return t.prototype.onPreProcess=function(t,n){return Promise.resolve(t)},t.prototype.onProcess=function(t,n){return Promise.resolve(t)},t.prototype.onPostProcess=function(t,n){return Promise.resolve(t)},t.prototype.process=function(t,n){var e=this;return Promise.resolve(t).then(function(t){return e.onPreProcess(t,n)}).then(function(t){return e.onProcess(t,n)}).then(function(t){return e.onPostProcess(t,n)})},t}();export{H as ContainerPluginContextProcessorDiscovery,M as ContainerPluginDiscovery,w as ExtensiblePluginBase,h as GenericPluginErrorEvent,p as GenericPluginEvent,f as GenericPluginExtensionEvent,v as HookablePluginExtensionManager,B as ModulePluginContextProcessorDiscovery,R as ModulePluginDiscovery,C as PluginBase,m as PluginContextError,O as PluginContextPipelineBase,z as PluginContextProcessorBase,E as PluginError,l as PluginEventBase,d as PluginExtensionConstraint,y as PluginExtensionManagerBase,P as PluginExtensionResolveMethod,x as PluginFactoryError,g as PluginManagerBase,a as PluginState,b as extractPluginExtensionPathInfo,F as installPluginContext,k as installPluginModule,S as resolveNestedPluginExtensionSafe,I as resolveNestedPluginExtensionUnsafe};

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var vlWidgetUtility=require("@govflanders/vl-widget-utility"),vlWidgetEvent=require("@govflanders/vl-widget-event"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function __awaiter(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,u)}a((r=r.apply(t,e||[])).next())})}function __generator(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var PluginEventBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(vlWidgetEvent.EventBase),GenericPluginEvent=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginEventBase),GenericPluginExtensionEvent=function(t){function e(e,n,r,o){void 0===o&&(o=vlWidgetEvent.EventScope.Broadcast);var i=t.call(this,e,n,o)||this;return i.pluginExtension=r,i}return __extends(e,t),e.prototype.getExtension=function(){return this.pluginExtension},e}(PluginEventBase),GenericPluginErrorEvent=function(t){function e(e,n,r,o){void 0===o&&(o=vlWidgetEvent.EventScope.Broadcast);var i=t.call(this,e,n,o)||this;return i.error=r,i}return __extends(e,t),e.prototype.getError=function(){return this.error},e}(PluginEventBase),PluginManagerBase=function(){function t(t,e){this.pluginHost=t,this.pluginDiscovery=e,this.pluginRegistry=[]}return t.prototype.getPluginHost=function(){return this.pluginHost},t.prototype.getPluginDiscovery=function(){return this.pluginDiscovery},t.prototype.createPluginInstance=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return[4,this.getPluginDiscovery().resolvePluginFactory(t)];case 1:return[4,n.sent().createPluginInstance(this.getPluginHost(),t)];case 2:return[4,(e=n.sent()).initialize()];case 3:return n.sent(),this.pluginRegistry.push(e),[2,e]}})})},t.prototype.list=function(t){for(var e=[],n="function"==typeof t?t:null,r=0,o=this.pluginRegistry;r<o.length;r++){var i=o[r];(null===n||n(i))&&e.push(i)}return e},t.prototype.each=function(t){return __awaiter(this,void 0,void 0,function(){var e,n,r,o;return __generator(this,function(i){for(e=[],n=0,r=this.pluginRegistry;n<r.length;n++)o=r[n],e.push(t(o));return[2,Promise.all(e)]})})},t.prototype.has=function(t){return null!==this.get(t)},t.prototype.get=function(t){return this.pluginRegistry.find(function(e){return e.getPluginId()===t})||null},t}(),PluginExtensionManagerBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginManagerBase),HookablePluginExtensionManager=function(){function t(t,e){this.pluginExtensionManager=t,this.createPluginInstanceCallback=e}return t.prototype.getPluginHost=function(){return this.pluginExtensionManager.getPluginHost()},t.prototype.getPluginDiscovery=function(){return this.pluginExtensionManager.getPluginDiscovery()},t.prototype.createPluginInstance=function(t){return this.pluginExtensionManager.createPluginInstance(t).then(this.createPluginInstanceCallback)},t.prototype.has=function(t){return this.pluginExtensionManager.has(t)},t.prototype.get=function(t){return this.pluginExtensionManager.get(t)},t.prototype.list=function(t){return this.pluginExtensionManager.list(t)},t.prototype.each=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.pluginExtensionManager.each(t)]})})},t}();!function(t){t.None="none",t.Initialize="initialize",t.Ready="ready",t.Failed="failed"}(exports.PluginState||(exports.PluginState={}));var PluginFactoryError=function(t){function e(n,r,o,i){void 0===i&&(i=null);var s=t.call(this,o,i)||this;return Object.setPrototypeOf(s,e.prototype),s.pluginHost=n,s.pluginContext=r,s}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginContextError=function(t){function e(n,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,e.prototype),i.pluginContext=n,i}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginError=function(t){function e(n,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,e.prototype),i.plugin=n,i}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginBase=function(t){function e(e,n){var r=t.call(this)||this;return r.pluginHost=e,r.pluginContext=n,r.pluginState=exports.PluginState.None,r}return __extends(e,t),e.prototype.onBeforeInitialize=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return this.validatePluginContext(this.getPluginContext()),[2]})})},e.prototype.onInitialize=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onBeforeReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onFailed=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onError=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.createHookEvent=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];switch(t){case"error":return new GenericPluginErrorEvent(t,this,e[0]);default:return new GenericPluginEvent(t,this)}},e.prototype.invokeHook=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return __awaiter(this,void 0,void 0,function(){var n,r,o,i;return __generator(this,function(s){switch(s.label){case 0:return t.length>0?(r=[],"function"==typeof this[o="on"+(t.charAt(0).toUpperCase()+t.slice(1))]&&r.push((n=this)[o].apply(n,e)),this.getPluginState()===exports.PluginState.Ready&&(i=this.createHookEvent.apply(this,[t].concat(e)),r.push(this.getEventEmitter().emit(i))),[4,Promise.all(r).then(function(){})]):[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},e.prototype.validatePluginContext=function(t){if("string"!=typeof t.pluginTypeId)throw new PluginError(this,'Context property "pluginTypeId" should be a string')},e.prototype.initialize=function(){var t=this;return void 0===this.pluginInitPromise?(this.pluginState=exports.PluginState.Initialize,this.pluginInitPromise=Promise.resolve().then(function(){return t.invokeHook("beforeInitialize")}).then(function(){return t.invokeHook("initialize")}).then(function(){return t.invokeHook("beforeReady")}).then(function(){return t.pluginState=exports.PluginState.Ready,t.invokeHook("ready")}).catch(function(e){return t.pluginState=exports.PluginState.Failed,t.invokeHook("failed",e).then(function(){return Promise.reject(e)})})):this.invokeHook("error",new PluginError(this,'Plugin "'+this.getPluginTypeId()+'" is being initialized multiple times')),this.pluginInitPromise},e.prototype.getPluginState=function(){return this.pluginState},e.prototype.getPluginHost=function(){return this.pluginHost},e.prototype.getPluginContext=function(){return this.pluginContext},e.prototype.getPluginTypeId=function(){return this.getPluginContext().pluginTypeId},e.prototype.toString=function(){return this.getPluginTypeId()+":"+this.getPluginId()},e}(vlWidgetEvent.EventSourceBase);!function(t){t.Internal="internal",t.Required="required",t.Optional="optional"}(exports.PluginExtensionConstraint||(exports.PluginExtensionConstraint={})),function(t){t.UnSafe="unsafe",t.Safe="safe"}(exports.PluginExtensionResolveMethod||(exports.PluginExtensionResolveMethod={}));var ExtensiblePluginBase=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.extensionPromiseCache={},r}return __extends(e,t),e.prototype.createHookEvent=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];switch(e){case"extension":return new GenericPluginExtensionEvent(e,this,n[0]);default:return t.prototype.createHookEvent.apply(this,[e].concat(n))}},e.prototype.onBeforeReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.prototype.onBeforeReady.call(this)];case 1:return e.sent(),[4,this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Internal)];case 2:return e.sent(),[2]}})})},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return n.sent(),[4,this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Required)];case 2:return n.sent(),this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Optional).catch(function(t){return e.invokeHook("error",t)}),[2]}})})},e.prototype.onExtension=function(t){return __awaiter(this,void 0,void 0,function(){var e,n;return __generator(this,function(r){return e=t.getPluginId(),null!==(n=this.extensionPromiseCache[e]||null)&&null!==n.resolve&&(n.resolve(t),delete this.extensionPromiseCache[e]),[2]})})},e.prototype.createExtensionsByConstraint=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return[4,this.resolveExtensionContexts(t)];case 1:return e=n.sent(),[2,this.createExtensionsByContexts(e)]}})})},e.prototype.createExtensionsByContexts=function(t){var e=this;return Promise.resolve().then(function(){for(var n=[],r=e.getExtensionManager(),o=0,i=t;o<i.length;o++){var s=i[o],u=r.createPluginInstance(s);n.push(u)}return Promise.all(n)})},e.prototype.getExtensionManager=function(){var t=this;if(void 0===this.extensionManager){var e=this.createExtensionManager();this.extensionManager=new HookablePluginExtensionManager(e,function(e){return t.invokeHook("extension",e).then(function(){return e})})}return this.extensionManager},e.prototype.getExtensionSafe=function(t){var e=this;return Promise.resolve().then(function(){return e.tryGetExtensionUnsafe(t)}).then(function(n){if(null===n){var r=e.extensionPromiseCache[t]||null;return null!==r&&null!==r.promise||((r=e.extensionPromiseCache[t]={promise:null,resolve:null}).promise=new Promise(function(t){r.resolve=t})),r.promise}return n})},e.prototype.tryGetExtensionUnsafe=function(t){if(this.getPluginState()!==exports.PluginState.Ready)throw new vlWidgetUtility.Error.RuntimeError('Cannot retrieve "'+t+'" extension as plugin is not ready');return this.getExtensionManager().get(t)},e.prototype.getExtensionUnsafe=function(t){var e=this.tryGetExtensionUnsafe(t);if(null===e)throw new vlWidgetUtility.Error.RuntimeError('Failed to resolve "'+t+'" extension');return e},e.prototype.getExtension=function(t,e){void 0===e&&(e=exports.PluginExtensionResolveMethod.Safe);var n=extractPluginExtensionPathInfo(t);switch(e){case exports.PluginExtensionResolveMethod.UnSafe:return resolveNestedPluginExtensionUnsafe(this.getExtensionUnsafe(n.id),n.nested);default:return this.getExtensionSafe(n.id).then(function(t){return resolveNestedPluginExtensionSafe(t,n.nested)})}},e}(PluginBase);function extractPluginExtensionPathInfo(t){var e=t.split(".");return{id:e.shift()||"",nested:e.join(".")||null}}function resolveNestedPluginExtensionUnsafe(t,e){if(e){if("function"!=typeof t.getExtension)throw new vlWidgetUtility.Error.RuntimeError('Plugin "'+t.getPluginId()+'" does not support retrieving nested extensions');return t.getExtension(e,exports.PluginExtensionResolveMethod.UnSafe)}return t}function resolveNestedPluginExtensionSafe(t,e){if(e){if("function"!=typeof t.getExtension)throw new vlWidgetUtility.Error.RuntimeError('Plugin "'+t.getPluginId()+'" does not support retrieving nested extensions');return t.getExtension(e,exports.PluginExtensionResolveMethod.Safe)}return Promise.resolve(t)}function installPluginModule(t,e){return Promise.resolve().then(function(){switch(_typeof(e)){case"string":return t.import(e);default:return e}}).then(function(e){return t.install(e)})}function installPluginContext(t,e){return Promise.resolve().then(function(){var n=e.pluginModule||null;return installPluginModule(t,n)}).then(function(){return e})}var ContainerPluginDiscovery=function(){function t(t,e){this.container=t,this.pluginFactoryServiceId=e}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginFactoryServiceId=function(){return this.pluginFactoryServiceId},t.prototype.getPluginFactoryFromContainer=function(t){var e=this.getPluginFactoryServiceId();return this.getContainer().getNamed(e,t.pluginTypeId)},t.prototype.resolvePluginFactory=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getPluginFactoryFromContainer(t)]})})},t}(),ModulePluginDiscovery=function(t){function e(e,n,r){var o=t.call(this,n,r)||this;return o.moduleManager=e,o}return __extends(e,t),e.prototype.getModuleManager=function(){return this.moduleManager},e.prototype.resolvePluginFactory=function(e){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){switch(r.label){case 0:return[4,installPluginContext(this.getModuleManager(),e)];case 1:return n=r.sent(),[2,t.prototype.resolvePluginFactory.call(this,n)]}})})},e}(ContainerPluginDiscovery),ContainerPluginContextProcessorDiscovery=function(){function t(t,e){this.container=t,this.processorFactoryServiceId=e}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginContextProcessorFactoryServiceId=function(){return this.processorFactoryServiceId},t.prototype.getPluginContextProcessorFactoryFromContainer=function(t){var e=this.getPluginContextProcessorFactoryServiceId();return this.getContainer().getNamed(e,t.pluginTypeId)},t.prototype.resolvePluginContextProcessorFactory=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getPluginContextProcessorFactoryFromContainer(t)]})})},t}(),ModulePluginContextProcessorDiscovery=function(t){function e(e,n,r){var o=t.call(this,n,r)||this;return o.moduleManager=e,o}return __extends(e,t),e.prototype.getModuleManager=function(){return this.moduleManager},e.prototype.resolvePluginContextProcessorFactory=function(e){var n=this;return Promise.resolve().then(function(){return installPluginContext(n.getModuleManager(),e)}).then(function(e){return t.prototype.resolvePluginContextProcessorFactory.call(n,e)})},e}(ContainerPluginContextProcessorDiscovery),PluginContextPipelineBase=function(){function t(t){this.processorDiscovery=t}return t.prototype.getProcessorDiscovery=function(){return this.processorDiscovery},t.prototype.process=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,this.getProcessorDiscovery().resolvePluginContextProcessorFactory(t)];case 1:return[4,e.sent().createPluginContextProcessor(t)];case 2:return[2,e.sent().process(t,this)]}})})},t}(),PluginContextProcessorBase=function(){function t(){}return t.prototype.onPreProcess=function(t,e){return Promise.resolve(t)},t.prototype.onProcess=function(t,e){return Promise.resolve(t)},t.prototype.onPostProcess=function(t,e){return Promise.resolve(t)},t.prototype.process=function(t,e){var n=this;return Promise.resolve(t).then(function(t){return n.onPreProcess(t,e)}).then(function(t){return n.onProcess(t,e)}).then(function(t){return n.onPostProcess(t,e)})},t}();exports.ContainerPluginContextProcessorDiscovery=ContainerPluginContextProcessorDiscovery,exports.ContainerPluginDiscovery=ContainerPluginDiscovery,exports.ExtensiblePluginBase=ExtensiblePluginBase,exports.GenericPluginErrorEvent=GenericPluginErrorEvent,exports.GenericPluginEvent=GenericPluginEvent,exports.GenericPluginExtensionEvent=GenericPluginExtensionEvent,exports.HookablePluginExtensionManager=HookablePluginExtensionManager,exports.ModulePluginContextProcessorDiscovery=ModulePluginContextProcessorDiscovery,exports.ModulePluginDiscovery=ModulePluginDiscovery,exports.PluginBase=PluginBase,exports.PluginContextError=PluginContextError,exports.PluginContextPipelineBase=PluginContextPipelineBase,exports.PluginContextProcessorBase=PluginContextProcessorBase,exports.PluginError=PluginError,exports.PluginEventBase=PluginEventBase,exports.PluginExtensionManagerBase=PluginExtensionManagerBase,exports.PluginFactoryError=PluginFactoryError,exports.PluginManagerBase=PluginManagerBase,exports.extractPluginExtensionPathInfo=extractPluginExtensionPathInfo,exports.installPluginContext=installPluginContext,exports.installPluginModule=installPluginModule,exports.resolveNestedPluginExtensionSafe=resolveNestedPluginExtensionSafe,exports.resolveNestedPluginExtensionUnsafe=resolveNestedPluginExtensionUnsafe;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var vlWidgetUtility=require("@govflanders/vl-widget-utility"),vlWidgetEvent=require("@govflanders/vl-widget-event"),extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function __extends(t,e){function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function __awaiter(t,e,n,r){return new(n||(n=Promise))(function(o,i){function s(t){try{a(r.next(t))}catch(t){i(t)}}function u(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(s,u)}a((r=r.apply(t,e||[])).next())})}function __generator(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=r[2&i[0]?"return":i[0]?"throw":"next"])&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[0,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var PluginEventBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(vlWidgetEvent.EventBase),GenericPluginEvent=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginEventBase),GenericPluginExtensionEvent=function(t){function e(e,n,r,o){void 0===o&&(o=vlWidgetEvent.EventScope.Broadcast);var i=t.call(this,e,n,o)||this;return i.pluginExtension=r,i}return __extends(e,t),e.prototype.getExtension=function(){return this.pluginExtension},e}(PluginEventBase),GenericPluginErrorEvent=function(t){function e(e,n,r,o){void 0===o&&(o=vlWidgetEvent.EventScope.Broadcast);var i=t.call(this,e,n,o)||this;return i.error=r,i}return __extends(e,t),e.prototype.getError=function(){return this.error},e}(PluginEventBase),PluginManagerBase=function(){function t(t,e){this.pluginHost=t,this.pluginDiscovery=e,this.pluginRegistry=[]}return t.prototype.getPluginHost=function(){return this.pluginHost},t.prototype.getPluginDiscovery=function(){return this.pluginDiscovery},t.prototype.createPluginInstance=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return[4,this.getPluginDiscovery().resolvePluginFactory(t)];case 1:return[4,n.sent().createPluginInstance(this.getPluginHost(),t)];case 2:return[4,(e=n.sent()).initialize()];case 3:return n.sent(),this.pluginRegistry.push(e),[2,e]}})})},t.prototype.list=function(t){for(var e=[],n="function"==typeof t?t:null,r=0,o=this.pluginRegistry;r<o.length;r++){var i=o[r];(null===n||n(i))&&e.push(i)}return e},t.prototype.each=function(t){return __awaiter(this,void 0,void 0,function(){var e,n,r,o;return __generator(this,function(i){for(e=[],n=0,r=this.pluginRegistry;n<r.length;n++)o=r[n],e.push(t(o));return[2,Promise.all(e)]})})},t.prototype.has=function(t){return null!==this.get(t)},t.prototype.get=function(t){return this.pluginRegistry.find(function(e){return e.getPluginId()===t})||null},t}(),PluginExtensionManagerBase=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(PluginManagerBase),HookablePluginExtensionManager=function(){function t(t,e){this.pluginExtensionManager=t,this.createPluginInstanceCallback=e}return t.prototype.getPluginHost=function(){return this.pluginExtensionManager.getPluginHost()},t.prototype.getPluginDiscovery=function(){return this.pluginExtensionManager.getPluginDiscovery()},t.prototype.createPluginInstance=function(t){return this.pluginExtensionManager.createPluginInstance(t).then(this.createPluginInstanceCallback)},t.prototype.has=function(t){return this.pluginExtensionManager.has(t)},t.prototype.get=function(t){return this.pluginExtensionManager.get(t)},t.prototype.list=function(t){return this.pluginExtensionManager.list(t)},t.prototype.each=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.pluginExtensionManager.each(t)]})})},t}();!function(t){t.None="none",t.Initialize="initialize",t.Ready="ready",t.Failed="failed"}(exports.PluginState||(exports.PluginState={}));var PluginFactoryError=function(t){function e(n,r,o,i){void 0===i&&(i=null);var s=t.call(this,o,i)||this;return Object.setPrototypeOf(s,e.prototype),s.pluginHost=n,s.pluginContext=r,s}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginContextError=function(t){function e(n,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,e.prototype),i.pluginContext=n,i}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginError=function(t){function e(n,r,o){void 0===o&&(o=null);var i=t.call(this,r,o)||this;return Object.setPrototypeOf(i,e.prototype),i.plugin=n,i}return __extends(e,t),e}(vlWidgetUtility.Error.RuntimeError),PluginBase=function(t){function e(e,n){var r=t.call(this)||this;return r.pluginHost=e,r.pluginContext=n,r.pluginState=exports.PluginState.None,r}return __extends(e,t),e.prototype.onBeforeInitialize=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return this.validatePluginContext(this.getPluginContext()),[2]})})},e.prototype.onInitialize=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onBeforeReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onFailed=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.onError=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2]})})},e.prototype.createHookEvent=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];switch(t){case"error":return new GenericPluginErrorEvent(t,this,e[0]);default:return new GenericPluginEvent(t,this)}},e.prototype.invokeHook=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return __awaiter(this,void 0,void 0,function(){var n,r,o,i;return __generator(this,function(s){switch(s.label){case 0:return t.length>0?(n=[],"function"==typeof this[r="on"+(t.charAt(0).toUpperCase()+t.slice(1))]&&n.push((i=this)[r].apply(i,e)),this.getPluginState()===exports.PluginState.Ready&&(o=this.createHookEvent.apply(this,[t].concat(e)),n.push(this.getEventEmitter().emit(o))),[4,Promise.all(n).then(function(){})]):[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},e.prototype.validatePluginContext=function(t){if("string"!=typeof t.pluginTypeId)throw new PluginError(this,'Context property "pluginTypeId" should be a string')},e.prototype.initialize=function(){var t=this;return void 0===this.pluginInitPromise?(this.pluginState=exports.PluginState.Initialize,this.pluginInitPromise=Promise.resolve().then(function(){return t.invokeHook("beforeInitialize")}).then(function(){return t.invokeHook("initialize")}).then(function(){return t.invokeHook("beforeReady")}).then(function(){return t.pluginState=exports.PluginState.Ready,t.invokeHook("ready")}).catch(function(e){return t.pluginState=exports.PluginState.Failed,t.invokeHook("failed",e).then(function(){return Promise.reject(e)})})):this.invokeHook("error",new PluginError(this,'Plugin "'+this.getPluginTypeId()+'" is being initialized multiple times')),this.pluginInitPromise},e.prototype.getPluginState=function(){return this.pluginState},e.prototype.getPluginHost=function(){return this.pluginHost},e.prototype.getPluginContext=function(){return this.pluginContext},e.prototype.getPluginTypeId=function(){return this.getPluginContext().pluginTypeId},e.prototype.toString=function(){return this.getPluginTypeId()+":"+this.getPluginId()},e}(vlWidgetEvent.EventSourceBase);!function(t){t.Internal="internal",t.Required="required",t.Optional="optional"}(exports.PluginExtensionConstraint||(exports.PluginExtensionConstraint={})),function(t){t.UnSafe="unsafe",t.Safe="safe"}(exports.PluginExtensionResolveMethod||(exports.PluginExtensionResolveMethod={}));var ExtensiblePluginBase=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.extensionPromiseCache={},r}return __extends(e,t),e.prototype.createHookEvent=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];switch(e){case"extension":return new GenericPluginExtensionEvent(e,this,n[0]);default:return t.prototype.createHookEvent.apply(this,[e].concat(n))}},e.prototype.onBeforeReady=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,t.prototype.onBeforeReady.call(this)];case 1:return e.sent(),[4,this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Internal)];case 2:return e.sent(),[2]}})})},e.prototype.onReady=function(){return __awaiter(this,void 0,void 0,function(){var e=this;return __generator(this,function(n){switch(n.label){case 0:return[4,t.prototype.onReady.call(this)];case 1:return n.sent(),[4,this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Required)];case 2:return n.sent(),this.createExtensionsByConstraint(exports.PluginExtensionConstraint.Optional).catch(function(t){return e.invokeHook("error",t)}),[2]}})})},e.prototype.onExtension=function(t){return __awaiter(this,void 0,void 0,function(){var e,n;return __generator(this,function(r){return e=t.getPluginId(),null!==(n=this.extensionPromiseCache[e]||null)&&null!==n.resolve&&(n.resolve(t),delete this.extensionPromiseCache[e]),[2]})})},e.prototype.createExtensionsByConstraint=function(t){return __awaiter(this,void 0,void 0,function(){var e;return __generator(this,function(n){switch(n.label){case 0:return[4,this.resolveExtensionContexts(t)];case 1:return e=n.sent(),[2,this.createExtensionsByContexts(e)]}})})},e.prototype.createExtensionsByContexts=function(t){var e=this;return Promise.resolve().then(function(){for(var n=[],r=e.getExtensionManager(),o=0,i=t;o<i.length;o++){var s=i[o],u=r.createPluginInstance(s);n.push(u)}return Promise.all(n)})},e.prototype.getExtensionManager=function(){var t=this;if(void 0===this.extensionManager){var e=this.createExtensionManager();this.extensionManager=new HookablePluginExtensionManager(e,function(e){return t.invokeHook("extension",e).then(function(){return e})})}return this.extensionManager},e.prototype.getExtensionSafe=function(t){var e=this;return Promise.resolve().then(function(){return e.tryGetExtensionUnsafe(t)}).then(function(n){if(null===n){var r=e.extensionPromiseCache[t]||null;return null!==r&&null!==r.promise||((r=e.extensionPromiseCache[t]={promise:null,resolve:null}).promise=new Promise(function(t){r.resolve=t})),r.promise}return n})},e.prototype.tryGetExtensionUnsafe=function(t){if(this.getPluginState()!==exports.PluginState.Ready)throw new vlWidgetUtility.Error.RuntimeError('Cannot retrieve "'+t+'" extension as plugin is not ready');return this.getExtensionManager().get(t)},e.prototype.getExtensionUnsafe=function(t){var e=this.tryGetExtensionUnsafe(t);if(null===e)throw new vlWidgetUtility.Error.RuntimeError('Failed to resolve "'+t+'" extension');return e},e.prototype.getExtension=function(t,e){void 0===e&&(e=exports.PluginExtensionResolveMethod.Safe);var n=extractPluginExtensionPathInfo(t);switch(e){case exports.PluginExtensionResolveMethod.UnSafe:return resolveNestedPluginExtensionUnsafe(this.getExtensionUnsafe(n.id),n.nested);default:return this.getExtensionSafe(n.id).then(function(t){return resolveNestedPluginExtensionSafe(t,n.nested)})}},e}(PluginBase);function extractPluginExtensionPathInfo(t){var e=t.split(".");return{id:e.shift()||"",nested:e.join(".")||null}}function resolveNestedPluginExtensionUnsafe(t,e){if(e){if("function"!=typeof t.getExtension)throw new vlWidgetUtility.Error.RuntimeError('Plugin "'+t.getPluginId()+'" does not support retrieving nested extensions');return t.getExtension(e,exports.PluginExtensionResolveMethod.UnSafe)}return t}function resolveNestedPluginExtensionSafe(t,e){if(e){if("function"!=typeof t.getExtension)throw new vlWidgetUtility.Error.RuntimeError('Plugin "'+t.getPluginId()+'" does not support retrieving nested extensions');return t.getExtension(e,exports.PluginExtensionResolveMethod.Safe)}return Promise.resolve(t)}function installPluginModule(t,e){return Promise.resolve().then(function(){switch(_typeof(e)){case"string":return t.import(e);default:return e}}).then(function(e){return t.install(e)})}function installPluginContext(t,e){return Promise.resolve().then(function(){var n=e.pluginModule||null;return installPluginModule(t,n)}).then(function(){return e})}var ContainerPluginDiscovery=function(){function t(t,e){this.container=t,this.pluginFactoryServiceId=e}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginFactoryServiceId=function(){return this.pluginFactoryServiceId},t.prototype.getPluginFactoryFromContainer=function(t){var e=this.getPluginFactoryServiceId();return this.getContainer().getNamed(e,t.pluginTypeId)},t.prototype.resolvePluginFactory=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getPluginFactoryFromContainer(t)]})})},t}(),ModulePluginDiscovery=function(t){function e(e,n,r){var o=t.call(this,n,r)||this;return o.moduleManager=e,o}return __extends(e,t),e.prototype.getModuleManager=function(){return this.moduleManager},e.prototype.resolvePluginFactory=function(e){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){switch(r.label){case 0:return[4,installPluginContext(this.getModuleManager(),e)];case 1:return n=r.sent(),[2,t.prototype.resolvePluginFactory.call(this,n)]}})})},e}(ContainerPluginDiscovery),ContainerPluginContextProcessorDiscovery=function(){function t(t,e){this.container=t,this.processorFactoryServiceId=e}return t.prototype.getContainer=function(){return this.container},t.prototype.getPluginContextProcessorFactoryServiceId=function(){return this.processorFactoryServiceId},t.prototype.getPluginContextProcessorFactoryFromContainer=function(t){var e=this.getPluginContextProcessorFactoryServiceId();return this.getContainer().getNamed(e,t.pluginTypeId)},t.prototype.resolvePluginContextProcessorFactory=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){return[2,this.getPluginContextProcessorFactoryFromContainer(t)]})})},t}(),ModulePluginContextProcessorDiscovery=function(t){function e(e,n,r){var o=t.call(this,n,r)||this;return o.moduleManager=e,o}return __extends(e,t),e.prototype.getModuleManager=function(){return this.moduleManager},e.prototype.resolvePluginContextProcessorFactory=function(e){var n=this;return Promise.resolve().then(function(){return installPluginContext(n.getModuleManager(),e)}).then(function(e){return t.prototype.resolvePluginContextProcessorFactory.call(n,e)})},e}(ContainerPluginContextProcessorDiscovery),PluginContextPipelineBase=function(){function t(t){this.processorDiscovery=t}return t.prototype.getProcessorDiscovery=function(){return this.processorDiscovery},t.prototype.process=function(t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return[4,this.getProcessorDiscovery().resolvePluginContextProcessorFactory(t)];case 1:return[4,e.sent().createPluginContextProcessor(t)];case 2:return[2,e.sent().process(t,this)]}})})},t}(),PluginContextProcessorBase=function(){function t(){}return t.prototype.onPreProcess=function(t,e){return Promise.resolve(t)},t.prototype.onProcess=function(t,e){return Promise.resolve(t)},t.prototype.onPostProcess=function(t,e){return Promise.resolve(t)},t.prototype.process=function(t,e){var n=this;return Promise.resolve(t).then(function(t){return n.onPreProcess(t,e)}).then(function(t){return n.onProcess(t,e)}).then(function(t){return n.onPostProcess(t,e)})},t}();exports.ContainerPluginContextProcessorDiscovery=ContainerPluginContextProcessorDiscovery,exports.ContainerPluginDiscovery=ContainerPluginDiscovery,exports.ExtensiblePluginBase=ExtensiblePluginBase,exports.GenericPluginErrorEvent=GenericPluginErrorEvent,exports.GenericPluginEvent=GenericPluginEvent,exports.GenericPluginExtensionEvent=GenericPluginExtensionEvent,exports.HookablePluginExtensionManager=HookablePluginExtensionManager,exports.ModulePluginContextProcessorDiscovery=ModulePluginContextProcessorDiscovery,exports.ModulePluginDiscovery=ModulePluginDiscovery,exports.PluginBase=PluginBase,exports.PluginContextError=PluginContextError,exports.PluginContextPipelineBase=PluginContextPipelineBase,exports.PluginContextProcessorBase=PluginContextProcessorBase,exports.PluginError=PluginError,exports.PluginEventBase=PluginEventBase,exports.PluginExtensionManagerBase=PluginExtensionManagerBase,exports.PluginFactoryError=PluginFactoryError,exports.PluginManagerBase=PluginManagerBase,exports.extractPluginExtensionPathInfo=extractPluginExtensionPathInfo,exports.installPluginContext=installPluginContext,exports.installPluginModule=installPluginModule,exports.resolveNestedPluginExtensionSafe=resolveNestedPluginExtensionSafe,exports.resolveNestedPluginExtensionUnsafe=resolveNestedPluginExtensionUnsafe;
{
"name": "@govflanders/vl-widget-plugin",
"version": "1.3.4",
"version": "1.3.5",
"license": "MIT",

@@ -27,7 +27,7 @@ "contributors": [

"dependencies": {
"@govflanders/vl-widget-dependency-injection": "^1.3.4",
"@govflanders/vl-widget-event": "^1.3.4",
"@govflanders/vl-widget-module": "^1.3.4",
"@govflanders/vl-widget-utility": "^1.3.4"
"@govflanders/vl-widget-dependency-injection": "^1.3.5",
"@govflanders/vl-widget-event": "^1.3.5",
"@govflanders/vl-widget-module": "^1.3.5",
"@govflanders/vl-widget-utility": "^1.3.5"
}
}
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