plugin-tls 5.1.0 → 5.2.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.
Files changed (34) hide show
  1. package/dist/{createTierModeOptionsPluginHost-D-fKYlcA.js → createTierModeOptionsPluginHost-Bvne8SqN.js} +90 -58
  2. package/dist/createTierModeOptionsPluginHost-D2REw5Vz.cjs +1 -0
  3. package/dist/index-node.cjs +1 -1
  4. package/dist/index-node.js +30 -14
  5. package/dist/index-web.cjs +1 -1
  6. package/dist/index-web.js +80 -64
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.d.ts +9 -2
  12. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.d.ts.map +1 -1
  13. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.d.ts +7 -1
  14. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.d.ts.map +1 -1
  15. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.d.ts +7 -1
  16. package/dist/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.d.ts.map +1 -1
  17. package/dist/options/options-plugin-host/tier-mode-options/createTierModeOptionsPluginHost.d.ts +7 -1
  18. package/dist/options/options-plugin-host/tier-mode-options/createTierModeOptionsPluginHost.d.ts.map +1 -1
  19. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHost.d.ts +12 -5
  20. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHost.d.ts.map +1 -1
  21. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.d.ts +7 -1
  22. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.d.ts.map +1 -1
  23. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.d.ts +7 -1
  24. package/dist/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.d.ts.map +1 -1
  25. package/dist/options/options-plugin-host/tier-options/createTierOptionsPluginHost.d.ts +7 -1
  26. package/dist/options/options-plugin-host/tier-options/createTierOptionsPluginHost.d.ts.map +1 -1
  27. package/dist/plugin-host/PluginHost.d.ts +0 -1
  28. package/dist/plugin-host/PluginHost.d.ts.map +1 -1
  29. package/dist/type.d.ts +2 -0
  30. package/dist/type.d.ts.map +1 -0
  31. package/package.json +2 -2
  32. package/dist/createTierModeOptionsPluginHost-DyDtXKNW.cjs +0 -1
  33. package/dist/index-com.d.ts +0 -3
  34. package/dist/index-com.d.ts.map +0 -1
package/dist/index-web.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { a as o } from "./Destroyable-mrBsNabq-D6TYs3Zn.js";
2
2
  import { serialCallAllFuns as g } from "com-tools";
3
- import { P as a, T as u, c as l, d } from "./createTierModeOptionsPluginHost-D-fKYlcA.js";
4
- import { f as P, g as D, p as b, q as x } from "./createTierModeOptionsPluginHost-D-fKYlcA.js";
3
+ import { P as d, T as a, c as u, d as l } from "./createTierModeOptionsPluginHost-Bvne8SqN.js";
4
+ import { f as P, g as D, p as b, q as x } from "./createTierModeOptionsPluginHost-Bvne8SqN.js";
5
5
  if (!globalThis.CustomEvent) {
6
- class e extends Event {
6
+ class s extends Event {
7
7
  detail;
8
- constructor(s, n) {
9
- super(s, n), this.detail = n?.detail;
8
+ constructor(e, i) {
9
+ super(e, i), this.detail = i?.detail;
10
10
  }
11
11
  }
12
- globalThis.CustomEvent = e;
12
+ globalThis.CustomEvent = s;
13
13
  }
14
- class y extends EventTarget {
14
+ class f extends EventTarget {
15
15
  /**
16
16
  * 添加事件监听器;会返回一个用于移除事件监听器的函数;
17
17
  * @remarks
@@ -23,20 +23,20 @@ class y extends EventTarget {
23
23
  * @param options - 选项
24
24
  * @returns 返回用于移除事件监听器的函数; 也可以通过 `EventTarget#removeEventListener` 方法移除
25
25
  */
26
- addEventListener(t, s, n) {
27
- const r = n?.times;
26
+ addEventListener(t, e, i) {
27
+ const r = i?.times;
28
28
  if (r) {
29
- const i = typeof s == "function" ? s : s?.handleEvent;
30
- if (i)
31
- return this.multipleListen(t, i, r);
29
+ const n = typeof e == "function" ? e : e?.handleEvent;
30
+ if (n)
31
+ return this.multipleListen(t, n, r);
32
32
  }
33
- return super.addEventListener(t, s, n), () => {
34
- this.removeEventListener(t, s, n);
33
+ return super.addEventListener(t, e, i), () => {
34
+ this.removeEventListener(t, e, i);
35
35
  };
36
36
  }
37
- dispatchEvent(t, s) {
38
- const n = t instanceof Event ? t : new CustomEvent(t, { detail: s, bubbles: !1, cancelable: !0, composed: !1 });
39
- return super.dispatchEvent(n);
37
+ dispatchEvent(t, e) {
38
+ const i = t instanceof Event ? t : new CustomEvent(t, { detail: e, bubbles: !1, cancelable: !0, composed: !1 });
39
+ return super.dispatchEvent(i);
40
40
  }
41
41
  /**
42
42
  * 添加一次性的事件监听器;
@@ -49,8 +49,8 @@ class y extends EventTarget {
49
49
  * @param options - 选项
50
50
  * @returns removeEventListener():void; 返回用于移除一次性事件监听器的函数; 也可以通过 EventTarget 的 removeEventListener 方法移除
51
51
  */
52
- onceListen(t, s, n) {
53
- return this.addEventListener(t, s, { ...n, once: !0 });
52
+ onceListen(t, e, i) {
53
+ return this.addEventListener(t, e, { ...i, once: !0 });
54
54
  }
55
55
  /**
56
56
  * 添加监听指定次数的事件监听器;
@@ -63,17 +63,17 @@ class y extends EventTarget {
63
63
  * @param times 需要监听的次数,如果小于 1 ,永远不会自动移除事件监听器,需要手动移除
64
64
  * @returns removeEventListener():void; 返回用于移除事件监听器的函数; 不能通过 EventTarget 的 removeEventListener 方法移除
65
65
  */
66
- multipleListen(t, s, n) {
66
+ multipleListen(t, e, i) {
67
67
  let r = 0;
68
- const i = new AbortController(), p = i.signal;
68
+ const n = new AbortController(), p = n.signal;
69
69
  return super.addEventListener(t, (c) => {
70
- ++r >= n && i.abort(), s.call(this, c);
70
+ ++r >= i && n.abort(), e.call(this, c);
71
71
  }, { signal: p }), function() {
72
- i.abort();
72
+ n.abort();
73
73
  };
74
74
  }
75
75
  }
76
- var f = class extends y {
76
+ var O = class extends f {
77
77
  refCount = 0;
78
78
  get isDestroyed() {
79
79
  return this._isDestroyed;
@@ -83,42 +83,42 @@ var f = class extends y {
83
83
  return !this.isDestroyed && this.refCount <= 0;
84
84
  }
85
85
  _destroyers = [];
86
- disposeFun(e) {
87
- return this._destroyers.push(e), e;
86
+ disposeFun(s) {
87
+ return this._destroyers.push(s), s;
88
88
  }
89
- cancelDisposeFun(e) {
90
- let t = this._destroyers.indexOf(e);
91
- return this._destroyers.splice(t, 1), e;
89
+ cancelDisposeFun(s) {
90
+ let t = this._destroyers.indexOf(s);
91
+ return this._destroyers.splice(t, 1), s;
92
92
  }
93
- disposeObj(e, t) {
94
- let s = t ? function() {
95
- return e.destroySync();
93
+ disposeObj(s, t) {
94
+ let e = t ? function() {
95
+ return s.destroySync();
96
96
  } : function() {
97
- return e.destroy();
97
+ return s.destroy();
98
98
  };
99
- return this.disposeFun(s), e.__destroyable_destroyer = s, e;
99
+ return this.disposeFun(e), s.__destroyable_destroyer = e, s;
100
100
  }
101
- cancelDisposeObj(e) {
102
- let t = e.__destroyable_destroyer;
103
- return t && this.cancelDisposeFun(t), e;
101
+ cancelDisposeObj(s) {
102
+ let t = s.__destroyable_destroyer;
103
+ return t && this.cancelDisposeFun(t), s;
104
104
  }
105
- dispose(e, t) {
106
- return typeof e == "function" ? this.disposeFun(e) : this.disposeObj(e, t);
105
+ dispose(s, t) {
106
+ return typeof s == "function" ? this.disposeFun(s) : this.disposeObj(s, t);
107
107
  }
108
- cancelDispose(e) {
109
- return typeof e == "function" ? this.cancelDisposeFun(e) : this.cancelDisposeObj(e);
108
+ cancelDispose(s) {
109
+ return typeof s == "function" ? this.cancelDisposeFun(s) : this.cancelDisposeObj(s);
110
110
  }
111
111
  destroyThis() {
112
112
  }
113
113
  destroySync() {
114
114
  if (!this.canDestroy) return this.isDestroyed;
115
- let e = this._destroyers.length;
116
- for (; --e >= 0; ) {
117
- let t = this._destroyers[e];
115
+ let s = this._destroyers.length;
116
+ for (; --s >= 0; ) {
117
+ let t = this._destroyers[s];
118
118
  try {
119
119
  t();
120
- } catch (s) {
121
- console.error("销毁函数在同步销毁时出错", this, t, s);
120
+ } catch (e) {
121
+ console.error("销毁函数在同步销毁时出错", this, t, e);
122
122
  }
123
123
  }
124
124
  this._destroyers.length = 0;
@@ -131,15 +131,15 @@ var f = class extends y {
131
131
  }
132
132
  destroy() {
133
133
  if (!this.canDestroy) return this.isDestroyed;
134
- let e = this._destroyers.toReversed();
135
- e.push(this.destroyThis), this._destroyers.length = 0;
136
- let t = g(e, this, null, (s, n) => {
137
- console.error("销毁函数在串行销毁时出错", this, n, s);
134
+ let s = this._destroyers.toReversed();
135
+ s.push(this.destroyThis), this._destroyers.length = 0;
136
+ let t = g(s, this, null, (e, i) => {
137
+ console.error("销毁函数在串行销毁时出错", this, i, e);
138
138
  });
139
139
  return t instanceof Promise ? t.then(() => (o(this), !0)) : (o(this), !0);
140
140
  }
141
141
  };
142
- class h extends f {
142
+ class h extends O {
143
143
  /**
144
144
  * 是否使用独立的插件管理器
145
145
  * @defaultValue false
@@ -149,9 +149,9 @@ class h extends f {
149
149
  * 插件管理器
150
150
  */
151
151
  static get pluginManager() {
152
- return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new a(this, this._pluginManager)), this._pluginManager;
152
+ return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new d(this, this._pluginManager)), this._pluginManager;
153
153
  }
154
- static _pluginManager = new a(this);
154
+ static _pluginManager = new d(this);
155
155
  /**
156
156
  * 插件管理器 {@link PluginHost.pluginManager}
157
157
  */
@@ -161,8 +161,8 @@ class h extends f {
161
161
  /**
162
162
  * {@inheritDoc PluginExtendManager.usePlugin}
163
163
  */
164
- static usePlugin(t, ...s) {
165
- return this.pluginManager.usePlugin(t, ...s);
164
+ static usePlugin(t, ...e) {
165
+ return this.pluginManager.usePlugin(t, ...e);
166
166
  }
167
167
  /**
168
168
  * {@inheritDoc PluginExtendManager.useExtend}
@@ -195,14 +195,14 @@ class h extends f {
195
195
  * @param args
196
196
  * @returns
197
197
  */
198
- usePlugin(t, ...s) {
199
- return this.pluginManager.instUsePlugin(this, t, ...s);
198
+ usePlugin(t, ...e) {
199
+ return this.pluginManager.instUsePlugin(this, t, ...e);
200
200
  }
201
201
  /**
202
202
  * {@inheritDoc PluginExtendManager.useExtend}
203
203
  */
204
- useExtend(t, ...s) {
205
- return this.pluginManager.instUseExtend(this, t, ...s);
204
+ useExtend(t, ...e) {
205
+ return this.pluginManager.instUseExtend(this, t, ...e);
206
206
  }
207
207
  /**
208
208
  * 初始化实例
@@ -223,15 +223,23 @@ class h extends f {
223
223
  }
224
224
  }
225
225
  class M extends h {
226
+ /**
227
+ * 是否使用独立的选项
228
+ * @defaultValue false
229
+ */
230
+ static isolatedOptions = !1;
226
231
  /**
227
232
  * 全局级别的默认选项
228
233
  */
229
- static modeOptions = new u(l);
234
+ static get modeOptions() {
235
+ return this.isolatedOptions && !this.hasOwnProperty("_modeOptions") && (this._modeOptions = new a(u, null, this._modeOptions)), this._modeOptions;
236
+ }
237
+ static _modeOptions = new a(u);
230
238
  /**
231
239
  * 实例级的默认选项
232
240
  */
233
241
  get modeOptions() {
234
- return this._modeOptions || (this._modeOptions = new u(l, void 0, this.constructor.modeOptions));
242
+ return this._modeOptions || (this._modeOptions = new a(u, void 0, this.constructor.modeOptions));
235
243
  }
236
244
  _modeOptions;
237
245
  get mode() {
@@ -248,15 +256,23 @@ class M extends h {
248
256
  }
249
257
  }
250
258
  class v extends h {
259
+ /**
260
+ * 是否使用独立的选项
261
+ * @defaultValue false
262
+ */
263
+ static isolatedOptions = !1;
251
264
  /**
252
265
  * 全局级别的默认选项
253
266
  */
254
- static defaultOptions = new d();
267
+ static get defaultOptions() {
268
+ return this.isolatedOptions && !this.hasOwnProperty("_defaultOptions") && (this._defaultOptions = new l(this, this._defaultOptions)), this._defaultOptions;
269
+ }
270
+ static _defaultOptions = new l();
255
271
  /**
256
272
  * 实例级的默认选项
257
273
  */
258
274
  get defaultOptions() {
259
- return this._defaultOptions || (this._defaultOptions = new d(void 0, this.constructor.defaultOptions));
275
+ return this._defaultOptions || (this._defaultOptions = new l(void 0, this.constructor.defaultOptions));
260
276
  }
261
277
  _defaultOptions;
262
278
  constructor(t) {
@@ -269,7 +285,7 @@ export {
269
285
  M as TierModeOptionsPluginHostEventTarget,
270
286
  D as TierOptionsPluginHost,
271
287
  v as TierOptionsPluginHostEventTarget,
272
- l as commonModeName,
288
+ u as commonModeName,
273
289
  b as createTierModeOptionsPluginHost,
274
290
  x as createTierOptionsPluginHost
275
291
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@gby/destroyable"),p=require("com-tools"),n=require("./createTierModeOptionsPluginHost-DyDtXKNW.cjs"),g=require("type-tls");function m(r,t){return t}function M(r){return function(e){return e}}function O(r,t){return n.mixin(r.prototype,t),t}function P(r){return function(e){return n.mixin(r.prototype,e),e}}function y(r,t){return n.mixin(r.prototype,t),r}function T(r){return function(e){return n.mixin(r.prototype,e),r}}class E extends h.Destroyable{parent;host;plugins=new Map;constructor(t,e){super(),this.parent=e,t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.parent?.hasUsed(t)||this.plugins.has(t)}getUseReturn(t){const{parent:e}=this;return e?.hasUsed(t)?e.getUseReturn(t):this.plugins.get(t)}use(t,...e){if(this.hasUsed(t))return this.getUseReturn(t);const i=t.onUse(this.host,...e);return this.plugins.set(t,i),i}instUse(t,e,...i){const{plugins:s}=this;if(this.hasUsed(e))return this.getUseReturn(e);const o=this.use(e,...i);return e.onCreate?.(t),o}onCreate(t,...e){const i=this.parent?.onCreate(t,...e),s=[];for(const[o]of this.plugins)o.onCreate&&s.push(o.onCreate.bind(o));return g.waitAsyncable(i,()=>p.serialCallFuns(s,void 0,[t,...e]))}onInit(t,...e){const i=this.parent?.onInit(t,...e),s=[];for(const[o]of this.plugins)o.onInit&&s.push(o.onInit.bind(o));return g.waitAsyncable(i,()=>p.serialCallFuns(s,void 0,[t,...e]))}onDestroy(t){const e=[];for(const[o]of this.plugins)o.onDestroy&&e.push(o.onDestroy.bind(o));e.reverse();const i=p.serialCallFuns(e,void 0,[t]),{parent:s}=this;return s?g.waitAsyncable(i,()=>s.onDestroy(t)):i}}class b extends h.Destroyable{parent;host;plugins=new Set;constructor(t,e){super(),this.parent=e,t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.parent?.hasUsed(t)||this.plugins.has(t)}use(t){return this.hasUsed(t)||(n.mixinIExtend(this.host.prototype,t),this.plugins.add(t)),t}instUse(t,e,...i){return this.hasUsed(e)||(this.use(e),e.onCreate?.call(t,t,...i)),e}onCreate(t,...e){const i=this.parent?.onCreate(t,...e),s=[];for(const o of this.plugins)o.onCreate&&s.push(o.onCreate);return g.waitAsyncable(i,()=>p.serialCallFuns(s,t,[t,...e]))}onInit(t,...e){const i=this.parent?.onInit(t,...e),s=[];for(const o of this.plugins)o.onInit&&s.push(o.onInit);return g.waitAsyncable(i,()=>p.serialCallFuns(s,t,[t,...e]))}onDestroy(t){const e=[];for(const o of this.plugins)o.onDestroy&&e.push(o.onDestroy);e.reverse();const i=p.serialCallFuns(e,t,[t]),{parent:s}=this;return s?g.waitAsyncable(i,()=>s.onDestroy(t)):i}}function d(r,t){const e=[{target:r,props:t}];let i;for(;i=e.shift();){const{target:s,props:o}=i;for(const[u,a]of Object.entries(o)){if(a!=null&&typeof a=="object"&&(!a.constructor||a.constructor===Object)){e.push({target:s[u],props:a});continue}s[u]=a}}return r}function f(r,t){const e={},i=[{target:r,props:t,targetProps:e}];let s;for(;s=i.shift();){const{target:o,props:u,targetProps:a}=s;for(const[c,l]of Object.entries(u)){if(l!=null&&typeof l=="object"&&(!l.constructor||l.constructor===Object)){i.push({target:o[c],props:l,targetProps:a[c]={}});continue}a[c]=o[c]}}return e}function w(r,t){const e=f(r,t);function i(){d(r,t)}function s(){d(r,e)}return{set:i,unset:s}}function U(r,t){const e=t??"defaultOptions",i=`_${e}`;return function(o){const u=n.mixinTarget(o,{get[e](){return r}});n.mixinTarget(u.prototype,{get[e](){return this[i]||(this[i]=structuredClone(u.defaultOptions))}})}}function C(r,t,e){const i=`_${t}`;return n.mixinTarget(r.prototype,{get[t](){return this[i]||(this[i]=structuredClone(r[t]))}}),e}function D(r,t,e){const i=n.mixinTarget(r,{modeOptions:new n.TierModeOptions(t,e)});return n.mixinTarget(i.prototype,{get modeOptions(){return this._modeOptions||(this._modeOptions=new n.TierModeOptions(t,void 0,this.constructor.modeOptions))},get mode(){return this.modeOptions.mode},set mode(s){this.modeOptions.mode=s},get options(){return this.modeOptions.fullOption}}),r}const _={onUse(r,t,e){const i=t??n.commonModeName;n.mixin(r,{modeOptions:new n.TierModeOptions(i,void 0,e)}),n.mixin(r.prototype,{get modeOptions(){const s=this,o=r;return s._modeOptions||(s._modeOptions=new n.TierModeOptions(o.modeOptions.mode,void 0,o.modeOptions))},get mode(){return this.modeOptions.mode},set mode(s){const o=this;o.modeOptions.mode=s},get options(){return this.modeOptions.plainFullOption}})},onCreate(r,t){r.modeOptions.setOption(t)}},H={onUse(r,t,e){n.mixin(r,{defaultOptions:new n.TierOptions(t,e)}),n.mixin(r.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new n.TierOptions(void 0,r.defaultOptions))}})},onCreate(r,t){r.defaultOptions.option=t}};function I(r,t){const e=n.mixinTarget(r,{defaultOptions:new n.TierOptions(t)});return n.mixinTarget(e.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new n.TierOptions(void 0,this.constructor.defaultOptions))}}),r}function x(r){const t=n.mixinTarget(r,{isolatedPluginManager:!1,get pluginManager(){return(!this._pluginManager||this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager"))&&(this._pluginManager=new n.PluginExtendManager(this,this._pluginManager)),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 n.mixinTarget(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()}}),r}function v(r){const t=x(r);return new Proxy(t,{construct:function(e,i,s){const o=new e(...i);return t.pluginManager.onCreate(this,...i),o}})}function j(r){return class extends r{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new n.PluginExtendManager(this,this._pluginManager)),this._pluginManager}static _pluginManager=new n.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=n.ModeOptions;exports.PluginExtendManager=n.PluginExtendManager;exports.PluginHost=n.PluginHost;exports.TierModeOptions=n.TierModeOptions;exports.TierModeOptionsPluginHost=n.TierModeOptionsPluginHost;exports.TierOptions=n.TierOptions;exports.TierOptionsPluginHost=n.TierOptionsPluginHost;exports.commonModeName=n.commonModeName;exports.createDefineIExtend=n.createDefineIExtend;exports.createDefineMixin=n.createDefineMixin;exports.createIExtendTarget=n.createIExtendTarget;exports.createMixinTarget=n.createMixinTarget;exports.createPluginHost=n.createPluginHost;exports.createTargetIExtend=n.createTargetIExtend;exports.createTargetMixin=n.createTargetMixin;exports.createTierModeOptionsPluginHost=n.createTierModeOptionsPluginHost;exports.createTierOptionsPluginHost=n.createTierOptionsPluginHost;exports.defineIExtend=n.defineIExtend;exports.defineMixin=n.defineMixin;exports.extendMark=n.extendMark;exports.getPropertyValue=n.getPropertyValue;exports.getPropertyValueByPath=n.getPropertyValueByPath;exports.iextendTarget=n.iextendTarget;exports.isPlugin=n.isPlugin;exports.mixin=n.mixin;exports.mixinByOmit=n.mixinByOmit;exports.mixinByPick=n.mixinByPick;exports.mixinIExtend=n.mixinIExtend;exports.mixinTarget=n.mixinTarget;exports.parsePropertyPath=n.parsePropertyPath;exports.pickHostExtendMembers=n.pickHostExtendMembers;exports.setPropertyValue=n.setPropertyValue;exports.setPropertyValueByPath=n.setPropertyValueByPath;exports.targetIExtend=n.targetIExtend;exports.targetMixin=n.targetMixin;exports.tierModeOptionsDecorator=n.tierModeOptionsDecorator;exports.tierOptionsDecorator=n.tierOptionsDecorator;exports.ExtendManager=b;exports.PluginManager=E;exports.addDefaultOptions=U;exports.addInstOptions=C;exports.becomePluginHost=x;exports.becomePluginHost_Extends=j;exports.becomePluginHost_Proxy=v;exports.becomeTierModeOptionsHost=D;exports.becomeTierOptionsHost=I;exports.createDefineExtend=M;exports.createExtendTarget=T;exports.createPropertySetter=w;exports.createTargetExtend=P;exports.defineExtend=m;exports.extendTarget=y;exports.getTargetProperties=f;exports.mergeProperties=d;exports.targetExtend=O;exports.tierModeOptionsPlugin=_;exports.tierOptionsPlugin=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@gby/destroyable"),p=require("com-tools"),n=require("./createTierModeOptionsPluginHost-D2REw5Vz.cjs"),g=require("type-tls");function m(r,t){return t}function M(r){return function(e){return e}}function O(r,t){return n.mixin(r.prototype,t),t}function P(r){return function(e){return n.mixin(r.prototype,e),e}}function y(r,t){return n.mixin(r.prototype,t),r}function T(r){return function(e){return n.mixin(r.prototype,e),r}}class E extends h.Destroyable{parent;host;plugins=new Map;constructor(t,e){super(),this.parent=e,t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.parent?.hasUsed(t)||this.plugins.has(t)}getUseReturn(t){const{parent:e}=this;return e?.hasUsed(t)?e.getUseReturn(t):this.plugins.get(t)}use(t,...e){if(this.hasUsed(t))return this.getUseReturn(t);const i=t.onUse(this.host,...e);return this.plugins.set(t,i),i}instUse(t,e,...i){const{plugins:s}=this;if(this.hasUsed(e))return this.getUseReturn(e);const o=this.use(e,...i);return e.onCreate?.(t),o}onCreate(t,...e){const i=this.parent?.onCreate(t,...e),s=[];for(const[o]of this.plugins)o.onCreate&&s.push(o.onCreate.bind(o));return g.waitAsyncable(i,()=>p.serialCallFuns(s,void 0,[t,...e]))}onInit(t,...e){const i=this.parent?.onInit(t,...e),s=[];for(const[o]of this.plugins)o.onInit&&s.push(o.onInit.bind(o));return g.waitAsyncable(i,()=>p.serialCallFuns(s,void 0,[t,...e]))}onDestroy(t){const e=[];for(const[o]of this.plugins)o.onDestroy&&e.push(o.onDestroy.bind(o));e.reverse();const i=p.serialCallFuns(e,void 0,[t]),{parent:s}=this;return s?g.waitAsyncable(i,()=>s.onDestroy(t)):i}}class b extends h.Destroyable{parent;host;plugins=new Set;constructor(t,e){super(),this.parent=e,t&&(this.host=t)}destroyThis(){return this.plugins.clear(),this.host=null,super.destroyThis()}hasUsed(t){return this.parent?.hasUsed(t)||this.plugins.has(t)}use(t){return this.hasUsed(t)||(n.mixinIExtend(this.host.prototype,t),this.plugins.add(t)),t}instUse(t,e,...i){return this.hasUsed(e)||(this.use(e),e.onCreate?.call(t,t,...i)),e}onCreate(t,...e){const i=this.parent?.onCreate(t,...e),s=[];for(const o of this.plugins)o.onCreate&&s.push(o.onCreate);return g.waitAsyncable(i,()=>p.serialCallFuns(s,t,[t,...e]))}onInit(t,...e){const i=this.parent?.onInit(t,...e),s=[];for(const o of this.plugins)o.onInit&&s.push(o.onInit);return g.waitAsyncable(i,()=>p.serialCallFuns(s,t,[t,...e]))}onDestroy(t){const e=[];for(const o of this.plugins)o.onDestroy&&e.push(o.onDestroy);e.reverse();const i=p.serialCallFuns(e,t,[t]),{parent:s}=this;return s?g.waitAsyncable(i,()=>s.onDestroy(t)):i}}function d(r,t){const e=[{target:r,props:t}];let i;for(;i=e.shift();){const{target:s,props:o}=i;for(const[u,a]of Object.entries(o)){if(a!=null&&typeof a=="object"&&(!a.constructor||a.constructor===Object)){e.push({target:s[u],props:a});continue}s[u]=a}}return r}function f(r,t){const e={},i=[{target:r,props:t,targetProps:e}];let s;for(;s=i.shift();){const{target:o,props:u,targetProps:a}=s;for(const[c,l]of Object.entries(u)){if(l!=null&&typeof l=="object"&&(!l.constructor||l.constructor===Object)){i.push({target:o[c],props:l,targetProps:a[c]={}});continue}a[c]=o[c]}}return e}function w(r,t){const e=f(r,t);function i(){d(r,t)}function s(){d(r,e)}return{set:i,unset:s}}function U(r,t){const e=t??"defaultOptions",i=`_${e}`;return function(o){const u=n.mixinTarget(o,{get[e](){return r}});n.mixinTarget(u.prototype,{get[e](){return this[i]||(this[i]=structuredClone(u.defaultOptions))}})}}function C(r,t,e){const i=`_${t}`;return n.mixinTarget(r.prototype,{get[t](){return this[i]||(this[i]=structuredClone(r[t]))}}),e}function D(r,t,e){const i=n.mixinTarget(r,{modeOptions:new n.TierModeOptions(t,e)});return n.mixinTarget(i.prototype,{get modeOptions(){return this._modeOptions||(this._modeOptions=new n.TierModeOptions(t,void 0,this.constructor.modeOptions))},get mode(){return this.modeOptions.mode},set mode(s){this.modeOptions.mode=s},get options(){return this.modeOptions.fullOption}}),r}const _={onUse(r,t,e){const i=t??n.commonModeName;n.mixin(r,{modeOptions:new n.TierModeOptions(i,void 0,e)}),n.mixin(r.prototype,{get modeOptions(){const s=this,o=r;return s._modeOptions||(s._modeOptions=new n.TierModeOptions(o.modeOptions.mode,void 0,o.modeOptions))},get mode(){return this.modeOptions.mode},set mode(s){const o=this;o.modeOptions.mode=s},get options(){return this.modeOptions.plainFullOption}})},onCreate(r,t){r.modeOptions.setOption(t)}},H={onUse(r,t,e){n.mixin(r,{defaultOptions:new n.TierOptions(t,e)}),n.mixin(r.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new n.TierOptions(void 0,r.defaultOptions))}})},onCreate(r,t){r.defaultOptions.option=t}};function I(r,t){const e=n.mixinTarget(r,{defaultOptions:new n.TierOptions(t)});return n.mixinTarget(e.prototype,{get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new n.TierOptions(void 0,this.constructor.defaultOptions))}}),r}function x(r){const t=n.mixinTarget(r,{isolatedPluginManager:!1,get pluginManager(){return(!this._pluginManager||this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager"))&&(this._pluginManager=new n.PluginExtendManager(this,this._pluginManager)),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 n.mixinTarget(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()}}),r}function v(r){const t=x(r);return new Proxy(t,{construct:function(e,i,s){const o=new e(...i);return t.pluginManager.onCreate(this,...i),o}})}function j(r){return class extends r{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new n.PluginExtendManager(this,this._pluginManager)),this._pluginManager}static _pluginManager=new n.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=n.ModeOptions;exports.PluginExtendManager=n.PluginExtendManager;exports.PluginHost=n.PluginHost;exports.TierModeOptions=n.TierModeOptions;exports.TierModeOptionsPluginHost=n.TierModeOptionsPluginHost;exports.TierOptions=n.TierOptions;exports.TierOptionsPluginHost=n.TierOptionsPluginHost;exports.commonModeName=n.commonModeName;exports.createDefineIExtend=n.createDefineIExtend;exports.createDefineMixin=n.createDefineMixin;exports.createIExtendTarget=n.createIExtendTarget;exports.createMixinTarget=n.createMixinTarget;exports.createPluginHost=n.createPluginHost;exports.createTargetIExtend=n.createTargetIExtend;exports.createTargetMixin=n.createTargetMixin;exports.createTierModeOptionsPluginHost=n.createTierModeOptionsPluginHost;exports.createTierOptionsPluginHost=n.createTierOptionsPluginHost;exports.defineIExtend=n.defineIExtend;exports.defineMixin=n.defineMixin;exports.extendMark=n.extendMark;exports.getPropertyValue=n.getPropertyValue;exports.getPropertyValueByPath=n.getPropertyValueByPath;exports.iextendTarget=n.iextendTarget;exports.isPlugin=n.isPlugin;exports.mixin=n.mixin;exports.mixinByOmit=n.mixinByOmit;exports.mixinByPick=n.mixinByPick;exports.mixinIExtend=n.mixinIExtend;exports.mixinTarget=n.mixinTarget;exports.parsePropertyPath=n.parsePropertyPath;exports.pickHostExtendMembers=n.pickHostExtendMembers;exports.setPropertyValue=n.setPropertyValue;exports.setPropertyValueByPath=n.setPropertyValueByPath;exports.targetIExtend=n.targetIExtend;exports.targetMixin=n.targetMixin;exports.tierModeOptionsDecorator=n.tierModeOptionsDecorator;exports.tierOptionsDecorator=n.tierOptionsDecorator;exports.ExtendManager=b;exports.PluginManager=E;exports.addDefaultOptions=U;exports.addInstOptions=C;exports.becomePluginHost=x;exports.becomePluginHost_Extends=j;exports.becomePluginHost_Proxy=v;exports.becomeTierModeOptionsHost=D;exports.becomeTierOptionsHost=I;exports.createDefineExtend=M;exports.createExtendTarget=T;exports.createPropertySetter=w;exports.createTargetExtend=P;exports.defineExtend=m;exports.extendTarget=y;exports.getTargetProperties=f;exports.mergeProperties=d;exports.targetExtend=O;exports.tierModeOptionsPlugin=_;exports.tierOptionsPlugin=H;
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@
18
18
  */
19
19
  export * from "./plugin-manager/index";
20
20
  export * from "./properties";
21
+ export * from "./type";
21
22
  export * from "./options/index";
22
23
  export * from "./plugin-host/index";
23
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAE5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,cAAc,wBAAwB,CAAA;AACtC,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AAEtB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Destroyable as O } from "@gby/destroyable";
2
2
  import { serialCallFuns as c } from "com-tools";
3
- import { m as a, a as y, b as u, T as d, c as P, d as f, P as M } from "./createTierModeOptionsPluginHost-D-fKYlcA.js";
4
- import { M as J, e as Q, f as X, g as Y, h as Z, i as L, j as K, k as tt, l as et, n as nt, o as st, p as rt, q as it, r as ot, s as ut, t as at, u as pt, v as ct, w as gt, x as lt, y as ht, z as dt, A as ft, B as Mt, C as mt, D as Ot, E as yt, F as Pt, G as xt, H as Tt } from "./createTierModeOptionsPluginHost-D-fKYlcA.js";
3
+ import { m as a, a as y, b as u, T as d, c as P, d as f, P as M } from "./createTierModeOptionsPluginHost-Bvne8SqN.js";
4
+ import { M as J, e as Q, f as X, g as Y, h as Z, i as L, j as K, k as tt, l as et, n as nt, o as st, p as rt, q as it, r as ot, s as ut, t as at, u as pt, v as ct, w as gt, x as lt, y as ht, z as dt, A as ft, B as Mt, C as mt, D as Ot, E as yt, F as Pt, G as xt, H as Tt } from "./createTierModeOptionsPluginHost-Bvne8SqN.js";
5
5
  import { waitAsyncable as g } from "type-tls";
6
6
  function C(s, e) {
7
7
  return e;
@@ -1,6 +1,7 @@
1
1
  import type { AbstractConstructor, ClassType } from "type-tls";
2
2
  import { TierModeOptions } from "../../options-manager/TierModeOptions";
3
- import { PluginHost, type EventMap } from "../../../plugin-host/PluginHost";
3
+ import { PluginHost } from "../../../plugin-host/PluginHost";
4
+ import type { EventMap } from "@gby/destroyable";
4
5
  /**
5
6
  * 层级模式选项插件的宿主
6
7
  * @remarks
@@ -11,10 +12,16 @@ import { PluginHost, type EventMap } from "../../../plugin-host/PluginHost";
11
12
  * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
12
13
  */
13
14
  export declare class TierModeOptionsPluginHost<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, Mode extends string | number = string, EM extends EventMap<EM> = any> extends PluginHost<Host, HostClass, EM> {
15
+ /**
16
+ * 是否使用独立的选项
17
+ * @defaultValue false
18
+ */
19
+ static isolatedOptions: boolean;
14
20
  /**
15
21
  * 全局级别的默认选项
16
22
  */
17
- static readonly modeOptions: TierModeOptions<string, any>;
23
+ static get modeOptions(): TierModeOptions<string, any>;
24
+ static _modeOptions: TierModeOptions<string, any>;
18
25
  /**
19
26
  * 实例级的默认选项
20
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierModeOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAK5E;;;;;;;;GAQG;AACH,qBAAa,yBAAyB,CAAC,IAAI,EAAC,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAC,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAG,SAAQ,UAAU,CAAC,IAAI,EAAC,SAAS,EAAC,EAAE,CAAC;IAC7O;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,WAAW,+BAAoD;IAE/E;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierModeOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD;;;;;;;;GAQG;AACH,qBAAa,yBAAyB,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAEjP;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,WAAW,iCAKrB;IACD,MAAM,CAAC,YAAY,+BAAoD;IAGvE;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
@@ -12,10 +12,16 @@ import type { EventMap } from "@gby/destroyable";
12
12
  * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
13
13
  */
14
14
  export declare class TierModeOptionsPluginHostEventEmitter<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, Mode extends string | number = string, EM extends EventMap<EM> = any> extends PluginHostEventEmitter<Host, HostClass, EM> {
15
+ /**
16
+ * 是否使用独立的选项
17
+ * @defaultValue false
18
+ */
19
+ static isolatedOptions: boolean;
15
20
  /**
16
21
  * 全局级别的默认选项
17
22
  */
18
- static readonly modeOptions: TierModeOptions<string, any>;
23
+ static get modeOptions(): TierModeOptions<string, any>;
24
+ static _modeOptions: TierModeOptions<string, any>;
19
25
  /**
20
26
  * 实例级的默认选项
21
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierModeOptionsPluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,qCAAqC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACzQ;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,WAAW,+BAAoD;IAE/E;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierModeOptionsPluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;;GAQG;AACH,qBAAa,qCAAqC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IACzQ;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,WAAW,iCAKrB;IACD,MAAM,CAAC,YAAY,+BAAoD;IAEvE;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
@@ -11,10 +11,16 @@ import type { AbstractConstructor, ClassType } from "type-tls";
11
11
  * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
12
12
  */
13
13
  export declare class TierModeOptionsPluginHostEventTarget<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, Mode extends string | number = string, EM extends Record<string, any> = Record<string, any>> extends PluginHostEventTarget<Host, HostClass, EM> {
14
+ /**
15
+ * 是否使用独立的选项
16
+ * @defaultValue false
17
+ */
18
+ static isolatedOptions: boolean;
14
19
  /**
15
20
  * 全局级别的默认选项
16
21
  */
17
- static readonly modeOptions: TierModeOptions<string, any>;
22
+ static get modeOptions(): TierModeOptions<string, any>;
23
+ static _modeOptions: TierModeOptions<string, any>;
18
24
  /**
19
25
  * 实例级的默认选项
20
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierModeOptionsPluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAEnF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAI9D;;;;;;;;GAQG;AACH,qBAAa,oCAAoC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAC7R;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,WAAW,+BAAoD;IAE/E;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierModeOptionsPluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/TierModeOptionsPluginHostEventTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAEnF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAI9D;;;;;;;;GAQG;AACH,qBAAa,oCAAoC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAC7R;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,WAAW,iCAKrB;IACD,MAAM,CAAC,YAAY,+BAAoD;IAEvE;;OAEG;IACH,IAAI,WAAW,mCAEd;IACD,SAAS,CAAC,YAAY,EAAG,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAExD,IAAI,IAAI,SAEP;IACD,IAAI,IAAI,CAAC,KAAK,MAAA,EAEb;IAED,IAAI,OAAO,YAEV;gBAGW,OAAO,EAAE,OAAO;CAI7B"}
@@ -47,10 +47,16 @@ export declare function createTierModeOptionsPluginHost<P extends new (...args:
47
47
  isPrototypeOf: ((v: Object) => boolean) & ((v: Object) => boolean);
48
48
  propertyIsEnumerable: ((v: PropertyKey) => boolean) & ((v: PropertyKey) => boolean);
49
49
  };
50
+ /**
51
+ * 是否使用独立的选项
52
+ * @defaultValue false
53
+ */
54
+ isolatedOptions: boolean;
50
55
  /**
51
56
  * 全局级别的默认选项
52
57
  */
53
- readonly modeOptions: TierModeOptions<string, Options>;
58
+ get modeOptions(): TierModeOptions<string, any>;
59
+ _modeOptions: TierModeOptions<string, any>;
54
60
  isolatedPluginManager: boolean;
55
61
  get pluginManager(): import("../../..").PluginExtendManager<any, any, any>;
56
62
  _pluginManager: import("../../..").PluginExtendManager<any, any, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"createTierModeOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/createTierModeOptionsPluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,EAAC,OAAO,SAAS,EAAE,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC;SAEpH,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,kCA0BpE,OAAO;QApB5B;;WAEG;;sBAIY,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAX7C;;OAEG;;;;;;;;MA4BN"}
1
+ {"version":3,"file":"createTierModeOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-mode-options/createTierModeOptionsPluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,EAAC,OAAO,SAAS,EAAE,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC;SAEpH,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,kCAsCpE,OAAO;QApB5B;;WAEG;;sBAIY,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAvB7C;;;OAGG;;IAGH;;OAEG;;;;;;;;;MAkCN"}
@@ -1,20 +1,27 @@
1
1
  import { TierOptions } from "../../options-manager/index";
2
- import { PluginHost, type EventMap } from "../../../plugin-host/PluginHost";
2
+ import { PluginHost } from "../../../plugin-host/PluginHost";
3
3
  import type { AbstractConstructor, ClassType } from "type-tls";
4
+ import type { EventMap } from "@gby/destroyable";
4
5
  /**
5
6
  * 层级选项插件的宿主
6
7
  * @remarks
7
8
  *
8
- * 子类需要在构建函数中调用 `this.pluginManager.created(this);`
9
+ * 子类需要在构建函数中调用 `this.defaultOptions.created(this);`
9
10
  *
10
- * 之所以没写在该类中的函数中,是因为 `this.pluginManager.created(this)` 通常会在构建函数执行的最后时才调用;
11
- * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
11
+ * 之所以没写在该类中的函数中,是因为 `this.defaultOptions.created(this)` 通常会在构建函数执行的最后时才调用;
12
+ * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.defaultOptions.created(this)` 不是在最后的执行;
12
13
  */
13
14
  export declare class TierOptionsPluginHost<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, EM extends EventMap<EM> = any> extends PluginHost<Host, HostClass, EM> {
15
+ /**
16
+ * 是否使用独立的选项
17
+ * @defaultValue false
18
+ */
19
+ static isolatedOptions: boolean;
14
20
  /**
15
21
  * 全局级别的默认选项
16
22
  */
17
- static readonly defaultOptions: TierOptions<any>;
23
+ static get defaultOptions(): TierOptions<any>;
24
+ static _defaultOptions: TierOptions<any>;
18
25
  /**
19
26
  * 实例级的默认选项
20
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAO9D;;;;;;;;GAQG;AACH,qBAAa,qBAAqB,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,UAAU,CAAC,IAAI,EAAE,SAAS,EAAC,EAAE,CAAC;IACpM;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,mBAA0B;IAGxD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOjD;;;;;;;;GAQG;AACH,qBAAa,qBAAqB,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,UAAU,CAAC,IAAI,EAAE,SAAS,EAAC,EAAE,CAAC;IAEpM;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,cAAc,qBAKxB;IACD,MAAM,CAAC,eAAe,mBAA0B;IAEhD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
@@ -12,10 +12,16 @@ import type { EventMap } from "@gby/destroyable";
12
12
  * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
13
13
  */
14
14
  export declare class TierOptionsPluginHostEventEmitter<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, EM extends EventMap<EM> = any> extends PluginHostEventEmitter<Host, HostClass, EM> {
15
+ /**
16
+ * 是否使用独立的选项
17
+ * @defaultValue false
18
+ */
19
+ static isolatedOptions: boolean;
15
20
  /**
16
21
  * 全局级别的默认选项
17
22
  */
18
- static readonly defaultOptions: TierOptions<any>;
23
+ static get defaultOptions(): TierOptions<any>;
24
+ static _defaultOptions: TierOptions<any>;
19
25
  /**
20
26
  * 实例级的默认选项
21
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierOptionsPluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMjD;;;;;;;;GAQG;AACH,qBAAa,iCAAiC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAC7N;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,mBAA0B;IAGxD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierOptionsPluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHostEventEmitter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMjD;;;;;;;;GAQG;AACH,qBAAa,iCAAiC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAC7N;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,cAAc,qBAKxB;IACD,MAAM,CAAC,eAAe,mBAA0B;IAGhD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
@@ -11,10 +11,16 @@ import type { AbstractConstructor, ClassType } from "type-tls";
11
11
  * 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
12
12
  */
13
13
  export declare class TierOptionsPluginHostEventTarget<Host, HostClass extends AbstractConstructor<Host> = ClassType<Host>, Options extends {} = any, EM extends Record<string, any> = Record<string, any>> extends PluginHostEventTarget<Host, HostClass, EM> {
14
+ /**
15
+ * 是否使用独立的选项
16
+ * @defaultValue false
17
+ */
18
+ static isolatedOptions: boolean;
14
19
  /**
15
20
  * 全局级别的默认选项
16
21
  */
17
- static readonly defaultOptions: TierOptions<any>;
22
+ static get defaultOptions(): TierOptions<any>;
23
+ static _defaultOptions: TierOptions<any>;
18
24
  /**
19
25
  * 实例级的默认选项
20
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TierOptionsPluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAO/D;;;;;;;;GAQG;AACH,qBAAa,gCAAgC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAClP;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,cAAc,mBAA0B;IAGxD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
1
+ {"version":3,"file":"TierOptionsPluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/TierOptionsPluginHostEventTarget.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAO/D;;;;;;;;GAQG;AACH,qBAAa,gCAAgC,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAC,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,qBAAqB,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC;IAClP;;;OAGG;IACH,MAAM,CAAC,eAAe,UAAS;IAE/B;;OAEG;IACH,MAAM,KAAK,cAAc,qBAKxB;IACD,MAAM,CAAC,eAAe,mBAA0B;IAGhD;;OAEG;IACH,IAAI,cAAc,yBAEjB;IACD,SAAS,CAAC,eAAe,EAAG,WAAW,CAAC,OAAO,CAAC,CAAC;gBAErC,OAAO,EAAE,OAAO;CAI7B"}
@@ -44,10 +44,16 @@ export declare function createTierOptionsPluginHost<P extends new (...args: any)
44
44
  isPrototypeOf: ((v: Object) => boolean) & ((v: Object) => boolean);
45
45
  propertyIsEnumerable: ((v: PropertyKey) => boolean) & ((v: PropertyKey) => boolean);
46
46
  };
47
+ /**
48
+ * 是否使用独立的选项
49
+ * @defaultValue false
50
+ */
51
+ isolatedOptions: boolean;
47
52
  /**
48
53
  * 全局级别的默认选项
49
54
  */
50
- readonly defaultOptions: TierOptions<Options>;
55
+ get defaultOptions(): TierOptions<any>;
56
+ _defaultOptions: TierOptions<any>;
51
57
  isolatedPluginManager: boolean;
52
58
  get pluginManager(): import("../../..").PluginExtendManager<any, any, any>;
53
59
  _pluginManager: import("../../..").PluginExtendManager<any, any, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"createTierOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/createTierOptionsPluginHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAC,SAAS,EAAE,MAAM,UAAU,CAAC;AAG9D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,CAAC;SAG9E,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,kCAkBhE,OAAO;QAX5B;;WAEG;;yBAOe,WAAW,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAftC;;OAEG;;;;;;;;MAqBN"}
1
+ {"version":3,"file":"createTierOptionsPluginHost.d.ts","sourceRoot":"","sources":["../../../../src/options/options-plugin-host/tier-options/createTierOptionsPluginHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE,OAAO,SAAS,EAAE,EAAE,WAAW,EAAE,CAAC;SAG9E,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,kCA8BhE,OAAO;QAX5B;;WAEG;;yBAOe,WAAW,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA3BtC;;;OAGG;;IAGH;;OAEG;;;;;;;;;MA2BN"}
@@ -2,7 +2,6 @@ import { PluginExtendManager } from "../plugin-manager";
2
2
  import type { ExtendOptions, AnyIExtend, AnyIPlugin, PluginUseArgs, PluginUseReturn } from "../plugin-manager/index";
3
3
  import { Destroyable } from "@gby/destroyable";
4
4
  import type { EventMap } from "@gby/destroyable";
5
- export type { EventMap };
6
5
  import type { IPluginHost } from "./type";
7
6
  import type { AbstractConstructor, ClassType } from "type-tls";
8
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PluginHost.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAC,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEpH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,QAAQ,EAAC,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,UAAU,CAAC,IAAI,EAAC,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,WAAW,CAAC,EAAE,CAAE,YAAW,WAAW,CAAC,IAAI,EAAC,SAAS,CAAC;IACvL;;;OAGG;IACH,MAAM,CAAC,qBAAqB,UAAS;IAErC;;OAEG;IACH,MAAM,KAAK,aAAa,uCAKvB;IACD,MAAM,CAAC,cAAc,qCAA0C;IAE/D;;OAEG;IACH,IAAI,aAAa,IAAI,mBAAmB,CAAC,IAAI,EAAC,SAAS,CAAC,CAEvD;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,SAAS,SAAS,mBAAmB,EAAC,MAAM,SAAS,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,EAAC,SAAS,CAAC,EAAE,IAAI,EAAC,SAAS,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;IAIlL;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,SAAS,SAAS,mBAAmB,EAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,SAAS,EAAC,GAAG,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,GAAE,CAAC;IAI1I;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,GAAE,OAAO;IAMnC;;;;;OAKG;IAOH;;;;;OAKG;IACH,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,IAAI,EAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;IAIzG;;OAEG;IACH,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,EAAC,GAAG,IAAI,EAAC,qBAAqB,CAAC,SAAS,CAAC,GAAE,CAAC;IAKvH;;;;;OAKG;IACH,IAAI,CAAC,GAAG,IAAI,EAAC,GAAG,GAAE,GAAG;IAIrB;;;OAGG;IACM,WAAW;CAQrB"}
1
+ {"version":3,"file":"PluginHost.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAC,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEpH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,UAAU,CAAC,IAAI,EAAC,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,WAAW,CAAC,EAAE,CAAE,YAAW,WAAW,CAAC,IAAI,EAAC,SAAS,CAAC;IACvL;;;OAGG;IACH,MAAM,CAAC,qBAAqB,UAAS;IAErC;;OAEG;IACH,MAAM,KAAK,aAAa,uCAKvB;IACD,MAAM,CAAC,cAAc,qCAA0C;IAE/D;;OAEG;IACH,IAAI,aAAa,IAAI,mBAAmB,CAAC,IAAI,EAAC,SAAS,CAAC,CAEvD;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,SAAS,SAAS,mBAAmB,EAAC,MAAM,SAAS,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,EAAC,SAAS,CAAC,EAAE,IAAI,EAAC,SAAS,EAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;IAIlL;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,SAAS,SAAS,mBAAmB,EAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,SAAS,EAAC,GAAG,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,GAAE,CAAC;IAI1I;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,GAAE,OAAO;IAMnC;;;;;OAKG;IAOH;;;;;OAKG;IACH,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,IAAI,EAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;IAIzG;;OAEG;IACH,SAAS,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC,EAAC,GAAG,IAAI,EAAC,qBAAqB,CAAC,SAAS,CAAC,GAAE,CAAC;IAKvH;;;;;OAKG;IACH,IAAI,CAAC,GAAG,IAAI,EAAC,GAAG,GAAE,GAAG;IAIrB;;;OAGG;IACM,WAAW;CAQrB"}
package/dist/type.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export type { EventMap } from "@gby/destroyable";
2
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../src/type.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}