plugin-tls 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@gby/destroyable"),c=require("com-tools"),s=require("./createTierModeOptionsPluginHost-C3kmxB00.cjs");function u(n,...t){for(const e of t){const i=Object.getOwnPropertyDescriptors(e);Object.defineProperties(n,i)}return n}function P(n,t,e){let i=Object.getOwnPropertyDescriptors(t);return e&&c.omitMembers(i,e),Object.defineProperties(n,i),n}function m(n,t,e){let i=Object.getOwnPropertyDescriptors(t);return e?Object.defineProperties(n,c.removeUndefined(c.pickMembers(i,e))):Object.defineProperties(n,i),n}function x(n,t){return t}function y(){return function(t){return t}}function T(n,t){return u(n,t),t}function b(n){return function(e){return u(n,e),e}}function a(n,t){return u(n,t),n}function E(n){return function(e){return u(n,e),n}}function w(n,t){return t}function D(){return function(t){return t}}function H(n,t){return u(n.prototype,t),t}function _(n){return function(e){return u(n.prototype,e),e}}function C(n,t){return u(n.prototype,t),n}function U(n){return function(e){return u(n.prototype,e),n}}class j extends h.Destroyable{host;plugins=new Map;constructor(t){super(),t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.plugins.has(t)}use(t,...e){const{plugins:i}=this;if(i.has(t))return i.get(t);const r=t.onUse(this.host,...e);return i.set(t,r),r}instUse(t,e,...i){const{plugins:r}=this;if(r.has(e))return r.get(e);const o=this.use(e,...i);return e.onCreate?.(t),o}onCreate(t,...e){const i=[];for(const[r]of this.plugins)r.onCreate&&i.push(r.onCreate.bind(r));return c.serialCallFuns(i,void 0,[t,...e])}onInit(t,...e){const i=[];for(const[r]of this.plugins)r.onInit&&i.push(r.onInit.bind(r));return c.serialCallFuns(i,void 0,[t,...e])}onDestroy(t){const e=[];for(const[i]of this.plugins)i.onDestroy&&e.push(i.onDestroy.bind(i));return e.reverse(),c.serialCallFuns(e,void 0,[t])}}class v extends h.Destroyable{host;plugins=new Set;constructor(t){super(),t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.plugins.has(t)}use(t){const{plugins:e}=this;return e.has(t)||(s.mixinIExtend(this.host.prototype,t),e.add(t)),t}instUse(t,e,...i){const{plugins:r}=this;return r.has(e)||(this.use(e),e.onCreate?.call(t,t,...i)),e}onCreate(t,...e){const i=[];for(const r of this.plugins)r.onCreate&&i.push(r.onCreate);return c.serialCallFuns(i,t,[t,...e])}onInit(t,...e){const i=[];for(const r of this.plugins)r.onInit&&i.push(r.onInit);return c.serialCallFuns(i,t,[t,...e])}onDestroy(t){const e=[];for(const i of this.plugins)i.onDestroy&&e.push(i.onDestroy);return e.reverse(),c.serialCallFuns(e,t,[t])}}function f(n,t){const e=[{target:n,props:t}];let i;for(;i=e.shift();){const{target:r,props:o}=i;for(const[g,p]of Object.entries(o)){if(p!=null&&typeof p=="object"&&(!p.constructor||p.constructor===Object)){e.push({target:r[g],props:p});continue}r[g]=p}}return n}function O(n,t){const e={},i=[{target:n,props:t,targetProps:e}];let r;for(;r=i.shift();){const{target:o,props:g,targetProps:p}=r;for(const[d,l]of Object.entries(g)){if(l!=null&&typeof l=="object"&&(!l.constructor||l.constructor===Object)){i.push({target:o[d],props:l,targetProps:p[d]={}});continue}p[d]=o[d]}}return e}function I(n,t){const e=O(n,t);function i(){f(n,t)}function r(){f(n,e)}return{set:i,unset:r}}function k(n,t){const e=t??"defaultOptions",i=`_${e}`;return function(o){const g=a(o,{get[e](){return n}});a(g.prototype,{get[e](){return this[i]||(this[i]=structuredClone(g.defaultOptions))}})}}function B(n,t,e){const i=`_${t}`;return a(n.prototype,{get[t](){return this[i]||(this[i]=structuredClone(n[t]))}}),e}function V(n,t,e){const i=a(n,{modeOptions:new s.TierModeOptions(t,e)});return a(i.prototype,{get modeOptions(){return this._modeOptions||(this._modeOptions=new s.TierModeOptions(t,void 0,this.constructor.modeOptions))},get mode(){return this.modeOptions.mode},set mode(r){this.modeOptions.mode=r},get options(){return this.modeOptions.fullOption}}),n}const F={onUse(n,t,e){const i=t??s.commonModeName;u(n,{modeOptions:new s.TierModeOptions(i,void 0,e)}),u(n.prototype,{get modeOptions(){const r=this,o=n;return r._modeOptions||(r._modeOptions=new s.TierModeOptions(o.modeOptions.mode,void 0,o.modeOptions))},get mode(){return this.modeOptions.mode},set mode(r){const o=this;o.modeOptions.mode=r},get options(){return this.modeOptions.plainFullOption}})},onCreate(n,t){n.modeOptions.setOption(t)}},N={onUse(n,t,e){u(n,{defaultOptions:new s.TierOptions(t,e)}),u(n.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new s.TierOptions(void 0,n.defaultOptions))}})},onCreate(n,t){n.defaultOptions.option=t}};function q(n,t){const e=a(n,{defaultOptions:new s.TierOptions(t)});return a(e.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new s.TierOptions(void 0,this.constructor.defaultOptions))}}),n}function M(n){const t=a(n,{isolatedPluginManager:!1,get pluginManager(){return(!this._pluginManager||this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager"))&&(this._pluginManager=new s.PluginExtendManager(this)),this._pluginManager},usePlugin(e,...i){return this.pluginManager.usePlugin(e,...i)},useExtend(e){return this.pluginManager.useExtend(e)},hasUsed(e){return this.pluginManager.hasUsed(e)}});return a(t.prototype,{get pluginManager(){return this.constructor.pluginManager},usePlugin(e,...i){return this.pluginManager.instUsePlugin(this,e,...i)},useExtend(e,...i){return this.pluginManager.instUseExtend(this,e,...i)},async init(...e){return super.init&&await super.init(...e),this.pluginManager.onInit(this,...e)},async destroy(){if(await this.pluginManager.onDestroy(this),super.destroy)return super.destroy()}}),n}function S(n){const t=M(n);return new Proxy(t,{construct:function(e,i,r){const o=new e(...i);return t.pluginManager.onCreate(this,...i),o}})}function $(n){return class extends n{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new s.PluginExtendManager(this)),this._pluginManager}static _pluginManager=new s.PluginExtendManager(this);get pluginManager(){return this.constructor.pluginManager}static usePlugin(e,...i){return this.pluginManager.usePlugin(e,...i)}static useExtend(e){return this.pluginManager.useExtend(e)}static hasUsed(e){return this.pluginManager.hasUsed(e)}constructor(...e){super(...e),this.pluginManager.onCreate(this,...e)}usePlugin(e,...i){return this.pluginManager.instUsePlugin(this,e,...i)}useExtend(e,...i){return this.pluginManager.instUseExtend(this,e,...i)}init(...e){if(super.init){const i=super.init(...e);if(i instanceof Promise)return i.then(()=>this.pluginManager.onInit(this,...e))}return this.pluginManager.onInit(this,...e)}destroy(){const e=this.pluginManager.onDestroy(this);return super.destroy?e instanceof Promise?e.finally(()=>super.destroy()):super.destroy():e}}}exports.ModeOptions=s.ModeOptions;exports.PluginExtendManager=s.PluginExtendManager;exports.PluginHost=s.PluginHost;exports.TierModeOptions=s.TierModeOptions;exports.TierModeOptionsPluginHost=s.TierModeOptionsPluginHost;exports.TierOptions=s.TierOptions;exports.TierOptionsPluginHost=s.TierOptionsPluginHost;exports.commonModeName=s.commonModeName;exports.createPluginHost=s.createPluginHost;exports.createTierModeOptionsPluginHost=s.createTierModeOptionsPluginHost;exports.createTierOptionsPluginHost=s.createTierOptionsPluginHost;exports.extendMark=s.extendMark;exports.getPropertyValue=s.getPropertyValue;exports.getPropertyValueByPath=s.getPropertyValueByPath;exports.isPlugin=s.isPlugin;exports.mixinIExtend=s.mixinIExtend;exports.parsePropertyPath=s.parsePropertyPath;exports.pickHostExtendMembers=s.pickHostExtendMembers;exports.setPropertyValue=s.setPropertyValue;exports.setPropertyValueByPath=s.setPropertyValueByPath;exports.tierModeOptionsDecorator=s.tierModeOptionsDecorator;exports.tierOptionsDecorator=s.tierOptionsDecorator;exports.ExtendManager=v;exports.PluginManager=j;exports.addDefaultOptions=k;exports.addInstOptions=B;exports.becomePluginHost=M;exports.becomePluginHost_Extends=$;exports.becomePluginHost_Proxy=S;exports.becomeTierModeOptionsHost=V;exports.becomeTierOptionsHost=q;exports.createDefineExtend=D;exports.createDefineMixin=y;exports.createExtendTarget=U;exports.createMixinTarget=E;exports.createPropertySetter=I;exports.createTargetExtend=_;exports.createTargetMixin=b;exports.defineExtend=w;exports.defineMixin=x;exports.extendTarget=C;exports.getTargetProperties=O;exports.mergeProperties=f;exports.mixin=u;exports.mixinByOmit=P;exports.mixinByPick=m;exports.mixinTarget=a;exports.targetExtend=H;exports.targetMixin=T;exports.tierModeOptionsPlugin=F;exports.tierOptionsPlugin=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@gby/destroyable"),c=require("com-tools"),s=require("./createTierModeOptionsPluginHost-C3kmxB00.cjs");function u(n,...t){for(const e of t){const i=Object.getOwnPropertyDescriptors(e);Object.defineProperties(n,i)}return n}function P(n,t,e){let i=Object.getOwnPropertyDescriptors(t);return e&&c.omitMembers(i,e),Object.defineProperties(n,i),n}function m(n,t,e){let i=Object.getOwnPropertyDescriptors(t);return e?Object.defineProperties(n,c.removeUndefined(c.pickMembers(i,e))):Object.defineProperties(n,i),n}function x(n,t){return t}function y(n){return function(e){return e}}function T(n,t){return u(n,t),t}function b(n){return function(e){return u(n,e),e}}function a(n,t){return u(n,t),n}function E(n){return function(e){return u(n,e),n}}function w(n,t){return t}function D(n){return function(e){return e}}function H(n,t){return u(n.prototype,t),t}function C(n){return function(e){return u(n.prototype,e),e}}function _(n,t){return u(n.prototype,t),n}function U(n){return function(e){return u(n.prototype,e),n}}class j extends h.Destroyable{host;plugins=new Map;constructor(t){super(),t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.plugins.has(t)}use(t,...e){const{plugins:i}=this;if(i.has(t))return i.get(t);const r=t.onUse(this.host,...e);return i.set(t,r),r}instUse(t,e,...i){const{plugins:r}=this;if(r.has(e))return r.get(e);const o=this.use(e,...i);return e.onCreate?.(t),o}onCreate(t,...e){const i=[];for(const[r]of this.plugins)r.onCreate&&i.push(r.onCreate.bind(r));return c.serialCallFuns(i,void 0,[t,...e])}onInit(t,...e){const i=[];for(const[r]of this.plugins)r.onInit&&i.push(r.onInit.bind(r));return c.serialCallFuns(i,void 0,[t,...e])}onDestroy(t){const e=[];for(const[i]of this.plugins)i.onDestroy&&e.push(i.onDestroy.bind(i));return e.reverse(),c.serialCallFuns(e,void 0,[t])}}class v extends h.Destroyable{host;plugins=new Set;constructor(t){super(),t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.plugins.has(t)}use(t){const{plugins:e}=this;return e.has(t)||(s.mixinIExtend(this.host.prototype,t),e.add(t)),t}instUse(t,e,...i){const{plugins:r}=this;return r.has(e)||(this.use(e),e.onCreate?.call(t,t,...i)),e}onCreate(t,...e){const i=[];for(const r of this.plugins)r.onCreate&&i.push(r.onCreate);return c.serialCallFuns(i,t,[t,...e])}onInit(t,...e){const i=[];for(const r of this.plugins)r.onInit&&i.push(r.onInit);return c.serialCallFuns(i,t,[t,...e])}onDestroy(t){const e=[];for(const i of this.plugins)i.onDestroy&&e.push(i.onDestroy);return e.reverse(),c.serialCallFuns(e,t,[t])}}function f(n,t){const e=[{target:n,props:t}];let i;for(;i=e.shift();){const{target:r,props:o}=i;for(const[g,p]of Object.entries(o)){if(p!=null&&typeof p=="object"&&(!p.constructor||p.constructor===Object)){e.push({target:r[g],props:p});continue}r[g]=p}}return n}function O(n,t){const e={},i=[{target:n,props:t,targetProps:e}];let r;for(;r=i.shift();){const{target:o,props:g,targetProps:p}=r;for(const[d,l]of Object.entries(g)){if(l!=null&&typeof l=="object"&&(!l.constructor||l.constructor===Object)){i.push({target:o[d],props:l,targetProps:p[d]={}});continue}p[d]=o[d]}}return e}function I(n,t){const e=O(n,t);function i(){f(n,t)}function r(){f(n,e)}return{set:i,unset:r}}function k(n,t){const e=t??"defaultOptions",i=`_${e}`;return function(o){const g=a(o,{get[e](){return n}});a(g.prototype,{get[e](){return this[i]||(this[i]=structuredClone(g.defaultOptions))}})}}function B(n,t,e){const i=`_${t}`;return a(n.prototype,{get[t](){return this[i]||(this[i]=structuredClone(n[t]))}}),e}function V(n,t,e){const i=a(n,{modeOptions:new s.TierModeOptions(t,e)});return a(i.prototype,{get modeOptions(){return this._modeOptions||(this._modeOptions=new s.TierModeOptions(t,void 0,this.constructor.modeOptions))},get mode(){return this.modeOptions.mode},set mode(r){this.modeOptions.mode=r},get options(){return this.modeOptions.fullOption}}),n}const F={onUse(n,t,e){const i=t??s.commonModeName;u(n,{modeOptions:new s.TierModeOptions(i,void 0,e)}),u(n.prototype,{get modeOptions(){const r=this,o=n;return r._modeOptions||(r._modeOptions=new s.TierModeOptions(o.modeOptions.mode,void 0,o.modeOptions))},get mode(){return this.modeOptions.mode},set mode(r){const o=this;o.modeOptions.mode=r},get options(){return this.modeOptions.plainFullOption}})},onCreate(n,t){n.modeOptions.setOption(t)}},N={onUse(n,t,e){u(n,{defaultOptions:new s.TierOptions(t,e)}),u(n.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new s.TierOptions(void 0,n.defaultOptions))}})},onCreate(n,t){n.defaultOptions.option=t}};function q(n,t){const e=a(n,{defaultOptions:new s.TierOptions(t)});return a(e.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new s.TierOptions(void 0,this.constructor.defaultOptions))}}),n}function M(n){const t=a(n,{isolatedPluginManager:!1,get pluginManager(){return(!this._pluginManager||this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager"))&&(this._pluginManager=new s.PluginExtendManager(this)),this._pluginManager},usePlugin(e,...i){return this.pluginManager.usePlugin(e,...i)},useExtend(e){return this.pluginManager.useExtend(e)},hasUsed(e){return this.pluginManager.hasUsed(e)}});return a(t.prototype,{get pluginManager(){return this.constructor.pluginManager},usePlugin(e,...i){return this.pluginManager.instUsePlugin(this,e,...i)},useExtend(e,...i){return this.pluginManager.instUseExtend(this,e,...i)},async init(...e){return super.init&&await super.init(...e),this.pluginManager.onInit(this,...e)},async destroy(){if(await this.pluginManager.onDestroy(this),super.destroy)return super.destroy()}}),n}function S(n){const t=M(n);return new Proxy(t,{construct:function(e,i,r){const o=new e(...i);return t.pluginManager.onCreate(this,...i),o}})}function $(n){return class extends n{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new s.PluginExtendManager(this)),this._pluginManager}static _pluginManager=new s.PluginExtendManager(this);get pluginManager(){return this.constructor.pluginManager}static usePlugin(e,...i){return this.pluginManager.usePlugin(e,...i)}static useExtend(e){return this.pluginManager.useExtend(e)}static hasUsed(e){return this.pluginManager.hasUsed(e)}constructor(...e){super(...e),this.pluginManager.onCreate(this,...e)}usePlugin(e,...i){return this.pluginManager.instUsePlugin(this,e,...i)}useExtend(e,...i){return this.pluginManager.instUseExtend(this,e,...i)}init(...e){if(super.init){const i=super.init(...e);if(i instanceof Promise)return i.then(()=>this.pluginManager.onInit(this,...e))}return this.pluginManager.onInit(this,...e)}destroy(){const e=this.pluginManager.onDestroy(this);return super.destroy?e instanceof Promise?e.finally(()=>super.destroy()):super.destroy():e}}}exports.ModeOptions=s.ModeOptions;exports.PluginExtendManager=s.PluginExtendManager;exports.PluginHost=s.PluginHost;exports.TierModeOptions=s.TierModeOptions;exports.TierModeOptionsPluginHost=s.TierModeOptionsPluginHost;exports.TierOptions=s.TierOptions;exports.TierOptionsPluginHost=s.TierOptionsPluginHost;exports.commonModeName=s.commonModeName;exports.createPluginHost=s.createPluginHost;exports.createTierModeOptionsPluginHost=s.createTierModeOptionsPluginHost;exports.createTierOptionsPluginHost=s.createTierOptionsPluginHost;exports.extendMark=s.extendMark;exports.getPropertyValue=s.getPropertyValue;exports.getPropertyValueByPath=s.getPropertyValueByPath;exports.isPlugin=s.isPlugin;exports.mixinIExtend=s.mixinIExtend;exports.parsePropertyPath=s.parsePropertyPath;exports.pickHostExtendMembers=s.pickHostExtendMembers;exports.setPropertyValue=s.setPropertyValue;exports.setPropertyValueByPath=s.setPropertyValueByPath;exports.tierModeOptionsDecorator=s.tierModeOptionsDecorator;exports.tierOptionsDecorator=s.tierOptionsDecorator;exports.ExtendManager=v;exports.PluginManager=j;exports.addDefaultOptions=k;exports.addInstOptions=B;exports.becomePluginHost=M;exports.becomePluginHost_Extends=$;exports.becomePluginHost_Proxy=S;exports.becomeTierModeOptionsHost=V;exports.becomeTierOptionsHost=q;exports.createDefineExtend=D;exports.createDefineMixin=y;exports.createExtendTarget=U;exports.createMixinTarget=E;exports.createPropertySetter=I;exports.createTargetExtend=C;exports.createTargetMixin=b;exports.defineExtend=w;exports.defineMixin=x;exports.extendTarget=_;exports.getTargetProperties=O;exports.mergeProperties=f;exports.mixin=u;exports.mixinByOmit=P;exports.mixinByPick=m;exports.mixinTarget=a;exports.targetExtend=H;exports.targetMixin=T;exports.tierModeOptionsPlugin=F;exports.tierOptionsPlugin=N;
package/dist/index.js CHANGED
@@ -20,9 +20,9 @@ function U(n, e, t) {
20
20
  function j(n, e) {
21
21
  return e;
22
22
  }
23
- function v() {
24
- return function(e) {
25
- return e;
23
+ function v(n) {
24
+ return function(t) {
25
+ return t;
26
26
  };
27
27
  }
28
28
  function H(n, e) {
@@ -44,9 +44,9 @@ function k(n) {
44
44
  function B(n, e) {
45
45
  return e;
46
46
  }
47
- function N() {
48
- return function(e) {
49
- return e;
47
+ function N(n) {
48
+ return function(t) {
49
+ return t;
50
50
  };
51
51
  }
52
52
  function V(n, e) {
@@ -36,7 +36,7 @@ export declare function defineExtend<HostClass extends AbstractConstructor, Ext>
36
36
  *
37
37
  * @returns 可以用于 定义扩展的 类型便利函数
38
38
  */
39
- export declare function createDefineExtend<HostClass extends AbstractConstructor>(): <Ext>(ext: ExtendOptions<HostClass, Ext>) => ExtendOptions<HostClass, Ext>;
39
+ export declare function createDefineExtend<HostClass extends AbstractConstructor>(hostClass: HostClass): <Ext>(ext: ExtendOptions<HostClass, Ext>) => ExtendOptions<HostClass, Ext>;
40
40
  /**
41
41
  * 扩展目标
42
42
  *
@@ -1 +1 @@
1
- {"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../src/plugin-manager/extend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAM/D;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,mBAAmB,EAAE,GAAG,IAAI,GAAG,GAAG,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,GAAG,CAAC,CAAC;AAKtH;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,CAAC,SAAS,SAAS,mBAAmB,EAAE,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;AAMhL;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,SAAS,SAAS,mBAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,CAEhK;AAID;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,mBAAmB,MACvC,GAAG,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,KAAG,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,CAGvG;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,mBAAmB,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAG1H;AAMD;;;;;;;;GAQG;AACH,w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AE,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,CAEhK;AAID;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,mBAAmB,EAAE,SAAS,EAAE,SAAS,IAC7D,GAAG,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,KAAG,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,CAGvG;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,mBAAmB,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,GAAG,CAAC,CAG1H;AAMD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,mBAAmB,EAAE,GAAG,EAAE,CAAC,IACxC,CAAC,EAAE,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAIhF;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,mBAAmB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAGlH;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,CAAC,IAC7B,CAAC,EAAG,KAAK,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,KAAI,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAIjF"}
@@ -79,7 +79,7 @@ export declare function defineMixin<T, M>(target: T, mixin: MixinOptions<T, M>):
79
79
  *
80
80
  * @returns 可以用于 定义混合的 类型便利函数
81
81
  */
82
- export declare function createDefineMixin<T>(): <M>(mixin: MixinOptions<T, M>) => MixinOptions<T, M>;
82
+ export declare function createDefineMixin<T>(target: T): <M>(mixin: MixinOptions<T, M>) => MixinOptions<T, M>;
83
83
  /**
84
84
  * 混合目标
85
85
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mixin.d.ts","sourceRoot":"","sources":["../../src/plugin-manager/mixin.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACzD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AACnF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACzG;;;GAGG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAC/H;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AAU3D;;;;;;;;GAQG;AACH,wB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ED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,IAChB,CAAC,EAAE,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAIhF;AAKD;;GAEG;AACH,MAAM,MAAM,4BAA4B,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAAE,QAAQ,SAAS,GAAG,EAAE,IAAI,KAAK,GAAG,IAAI,EAAE,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC;AAEnJ;;GAEG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAAE,SAAS,IAAI,KAAK,GAAG,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugin-tls",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",