plugin-tls 3.6.0 → 4.0.1
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/Destroyable-BqvuD4gL-Cmk1ocqj.cjs +1 -0
- package/dist/Destroyable-BqvuD4gL-D50ZO9eN.js +129 -0
- package/dist/createTierModeOptionsPluginHost-C3kmxB00.cjs +1 -0
- package/dist/createTierModeOptionsPluginHost-CeND_z6P.js +852 -0
- package/dist/index-node.cjs +1 -1
- package/dist/index-node.d.ts +0 -1
- package/dist/index-node.d.ts.map +1 -1
- package/dist/index-node.js +254 -56
- package/dist/index-web.cjs +1 -1
- package/dist/index-web.d.ts +0 -1
- package/dist/index-web.d.ts.map +1 -1
- package/dist/index-web.js +324 -56
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +628 -60
- package/dist/options/index-node.d.ts +0 -1
- package/dist/options/index-node.d.ts.map +1 -1
- package/dist/options/index-web.d.ts +0 -1
- package/dist/options/index-web.d.ts.map +1 -1
- package/dist/options/{index-com.d.ts → index.d.ts} +1 -1
- package/dist/options/index.d.ts.map +1 -0
- package/dist/options/plugins/tier-mode-options/type.d.ts +1 -1
- package/dist/options/plugins/tier-mode-options/type.d.ts.map +1 -1
- package/dist/options/plugins/tier-options/type.d.ts +1 -1
- package/dist/options/plugins/tier-options/type.d.ts.map +1 -1
- package/dist/plugin-host/PluginHostEventEmitter.d.ts +2 -2
- package/dist/plugin-host/PluginHostEventEmitter.d.ts.map +1 -1
- package/dist/plugin-host/PluginHostEventTarget.d.ts +1 -1
- package/dist/plugin-host/PluginHostEventTarget.d.ts.map +1 -1
- package/dist/plugin-host/index-node.d.ts +0 -1
- package/dist/plugin-host/index-node.d.ts.map +1 -1
- package/dist/plugin-host/index-web.d.ts +0 -1
- package/dist/plugin-host/index-web.d.ts.map +1 -1
- package/dist/plugin-host/{index-com.d.ts → index.d.ts} +1 -1
- package/dist/plugin-host/index.d.ts.map +1 -0
- package/package.json +2 -7
- package/dist/TierOptionsPluginHostEventEmitter-BjGVIRN6.cjs +0 -1
- package/dist/TierOptionsPluginHostEventEmitter-DXTNpSmS.js +0 -131
- package/dist/TierOptionsPluginHostEventTarget-Bok_zzQ1.js +0 -131
- package/dist/TierOptionsPluginHostEventTarget-DqfVEP_L.cjs +0 -1
- package/dist/decorator-Culqv4k6.js +0 -1454
- package/dist/decorator-Wf_x4qDo.cjs +0 -1
- package/dist/options/index-com.d.ts.map +0 -1
- package/dist/plugin-host/index-com.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/options/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iBAAiB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AbstractConstructor } from "type-tls";
|
|
2
2
|
import { TierModeOptions } from "../../options-manager/TierModeOptions";
|
|
3
|
-
import type { IPluginHost, IPluginHostClass } from "../../../plugin-host
|
|
3
|
+
import type { IPluginHost, IPluginHostClass } from "../../../plugin-host";
|
|
4
4
|
export type WithTierModeOptions<C extends AbstractConstructor, Options extends {} = any, Mode extends string | number = string> = C & ITierModeOptionsHostClass<Options, Mode> & {
|
|
5
5
|
prototype: InstanceType<C> & ITierModeOptionsHost<Options, Mode>;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/options/plugins/tier-mode-options/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceR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WAAW,CAAC,IAAI,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,EAAC,SAAS,CAAC,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEtS;;GAEG;AACH,MAAM,MAAM,+BAA+B,CAAC,IAAI,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,EAAE,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AbstractConstructor } from "type-tls";
|
|
2
2
|
import type { TierOptions } from "../../options-manager/index";
|
|
3
|
-
import type { IPluginHost, IPluginHostClass } from "../../../plugin-host
|
|
3
|
+
import type { IPluginHost, IPluginHostClass } from "../../../plugin-host";
|
|
4
4
|
/**
|
|
5
5
|
* 类型辅助:为宿主类增加 TierOptions 能力后的类型
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/options/plugins/tier-options/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/options/plugins/tier-options/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAsB1E;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,mBAAmB,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG;IACxH,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAC1D,CAAC;AAMF;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,OAAO,SAAS,EAAE,GAAG,GAAG;IAC3D;;OAEG;IACH,IAAI,cAAc,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;CAC9C;AAGD;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,EAAE,GAAG,GAAG;IACtD;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjD;AAQD;;GAEG;AACH,MAAM,MAAM,sBAAsB,CAAC,IAAI,EAAC,SAAS,SAAS,mBAAmB,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,IAAI,WAAW,CAAC,IAAI,GAAG,gBAAgB,CAAC,OAAO,CAAC,EAAC,SAAS,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAEnO;;GAEG;AACH,MAAM,MAAM,2BAA2B,CAAC,IAAI,EAAE,OAAO,SAAS,EAAE,GAAG,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PluginExtendManager } from "../plugin-manager";
|
|
2
2
|
import type { ExtendOptions, IAnyExtend, IPlugin, PluginUseArgs, PluginUseReturn } from "../plugin-manager/index";
|
|
3
|
-
import { DestroyableEventEmitter } from "@gby/destroyable";
|
|
4
|
-
import type { EventMap } from "@gby/destroyable";
|
|
3
|
+
import { DestroyableEventEmitter } from "@gby/destroyable/node";
|
|
4
|
+
import type { EventMap } from "@gby/destroyable/node";
|
|
5
5
|
import type { IPluginHost } from "./type";
|
|
6
6
|
import type { AbstractConstructor, ClassType } from "type-tls";
|
|
7
7
|
export type { EventMap };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHostEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAElH,OAAO,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PluginHostEventEmitter.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHostEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAElH,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE/D,YAAY,EAAE,QAAQ,EAAC,CAAA;AAGvB;;;;;;;;;;GAUG;AACH,qBAAa,sBAAsB,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,CAAE,SAAQ,uBAAuB,CAAC,EAAE,CAAE,YAAW,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC;IACjN;;;O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ExtendManager } from "../plugin-manager";
|
|
2
2
|
import type { ExtendOptions, IAnyExtend, IPlugin, PluginUseArgs, PluginUseReturn } from "../plugin-manager/index";
|
|
3
|
-
import { DestroyableEventTarget } from "@gby/destroyable";
|
|
3
|
+
import { DestroyableEventTarget } from "@gby/destroyable/web";
|
|
4
4
|
import type { IPluginHost } from "./type";
|
|
5
5
|
import type { AbstractConstructor, ClassType } from "type-tls";
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHostEventTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAElH,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PluginHostEventTarget.d.ts","sourceRoot":"","sources":["../../src/plugin-host/PluginHostEventTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAElH,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAK/D;;;;;;;;;;GAUG;AACH,qBAAa,qBAAqB,CAAC,IAAI,EAAE,SAAS,SAAS,mBAAmB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM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,CAAC,GAAG,IAAI,EAAC,GAAG,GAAG,GAAG;IAItB;;;OAGG;IACM,WAAW;CAQrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/plugin-host/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/plugin-host/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-web.d.ts","sourceRoot":"","sources":["../../src/plugin-host/index-web.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index-web.d.ts","sourceRoot":"","sources":["../../src/plugin-host/index-web.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin-host/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plugin-tls",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -17,11 +17,6 @@
|
|
|
17
17
|
"import": "./dist/index-node.js"
|
|
18
18
|
},
|
|
19
19
|
".": {
|
|
20
|
-
"browser": {
|
|
21
|
-
"require": "./dist/index-web.cjs",
|
|
22
|
-
"types": "./dist/index-web.d.ts",
|
|
23
|
-
"import": "./dist/index-web.js"
|
|
24
|
-
},
|
|
25
20
|
"require": "./dist/index.cjs",
|
|
26
21
|
"types": "./dist/index.d.ts",
|
|
27
22
|
"import": "./dist/index.js"
|
|
@@ -69,7 +64,7 @@
|
|
|
69
64
|
"vite-node": "latest"
|
|
70
65
|
},
|
|
71
66
|
"dependencies": {
|
|
72
|
-
"@gby/destroyable": "^
|
|
67
|
+
"@gby/destroyable": "^4.0.0",
|
|
73
68
|
"com-tools": "^2.22.1",
|
|
74
69
|
"deepmerge-ts": "^7.1.5",
|
|
75
70
|
"type-tls": "^3.11.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./decorator-Wf_x4qDo.cjs"),r=require("@gby/destroyable");class i extends r.DestroyableEventEmitter{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new e.PluginExtendManager(this)),this._pluginManager}static _pluginManager=new e.PluginExtendManager(this);get pluginManager(){return this.constructor.pluginManager}static usePlugin(t,...n){return this.pluginManager.usePlugin(t,...n)}static useExtend(t){return this.pluginManager.useExtend(t)}static hasUsed(t){return this.pluginManager.hasUsed(t)}usePlugin(t,...n){return this.pluginManager.instUsePlugin(this,t,...n)}useExtend(t,...n){return this.pluginManager.instUseExtend(this,t,...n)}init(...t){return this.pluginManager.onInit(this,...t)}destroyThis(){const t=this.pluginManager.onDestroy(this);return t instanceof Promise?t.finally(()=>super.destroyThis()):super.destroyThis()}}class o extends i{static modeOptions=new e.TierModeOptions(e.commonModeName);get modeOptions(){return this._modeOptions||(this._modeOptions=new e.TierModeOptions(e.commonModeName,void 0,this.constructor.modeOptions))}_modeOptions;get mode(){return this.modeOptions.mode}set mode(t){this.modeOptions.mode=t}get options(){return this.modeOptions.plainFullOption}constructor(t){super(),this.modeOptions.setOption(t)}}class u extends i{static defaultOptions=new e.TierOptions;get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new e.TierOptions(void 0,this.constructor.defaultOptions))}_defaultOptions;constructor(t){super(),this.defaultOptions.option=t}}exports.PluginHostEventEmitter=i;exports.TierModeOptionsPluginHostEventEmitter=o;exports.TierOptionsPluginHostEventEmitter=u;
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { P as n, T as i, m as r, d as o } from "./decorator-Culqv4k6.js";
|
|
2
|
-
import { DestroyableEventEmitter as u } from "@gby/destroyable";
|
|
3
|
-
class a extends u {
|
|
4
|
-
/**
|
|
5
|
-
* 是否使用独立的插件管理器
|
|
6
|
-
* @defaultValue false
|
|
7
|
-
*/
|
|
8
|
-
static isolatedPluginManager = !1;
|
|
9
|
-
/**
|
|
10
|
-
* 插件管理器
|
|
11
|
-
*/
|
|
12
|
-
static get pluginManager() {
|
|
13
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new n(this)), this._pluginManager;
|
|
14
|
-
}
|
|
15
|
-
static _pluginManager = new n(this);
|
|
16
|
-
/**
|
|
17
|
-
* 插件管理器 {@link PluginHost.pluginManager}
|
|
18
|
-
*/
|
|
19
|
-
get pluginManager() {
|
|
20
|
-
return this.constructor.pluginManager;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
24
|
-
*/
|
|
25
|
-
static usePlugin(t, ...e) {
|
|
26
|
-
return this.pluginManager.usePlugin(t, ...e);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
30
|
-
*/
|
|
31
|
-
static useExtend(t) {
|
|
32
|
-
return this.pluginManager.useExtend(t);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 是否注册了插件 或 扩展
|
|
36
|
-
* @param plugin - 插件 或 扩展
|
|
37
|
-
* @returns 是否注册了插件 或 扩展
|
|
38
|
-
*/
|
|
39
|
-
static hasUsed(t) {
|
|
40
|
-
return this.pluginManager.hasUsed(t);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 需要在子类中调用
|
|
44
|
-
*
|
|
45
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this,...args)` 通常会在构建函数执行的最后时才调用;
|
|
46
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this,...args)` 不是在最后的执行;
|
|
47
|
-
*/
|
|
48
|
-
// constructor(...args:any) {
|
|
49
|
-
// super();
|
|
50
|
-
// // @ts-ignore
|
|
51
|
-
// this.pluginManager.onCreate(this,...args);
|
|
52
|
-
// }
|
|
53
|
-
/**
|
|
54
|
-
* 实例的注册插件的方法
|
|
55
|
-
* @param plugin
|
|
56
|
-
* @param args
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
usePlugin(t, ...e) {
|
|
60
|
-
return this.pluginManager.instUsePlugin(this, t, ...e);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
64
|
-
*/
|
|
65
|
-
useExtend(t, ...e) {
|
|
66
|
-
return this.pluginManager.instUseExtend(this, t, ...e);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* 初始化实例
|
|
70
|
-
* @remarks
|
|
71
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
72
|
-
* @param args
|
|
73
|
-
*/
|
|
74
|
-
init(...t) {
|
|
75
|
-
return this.pluginManager.onInit(this, ...t);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 销毁实例
|
|
79
|
-
* @returns
|
|
80
|
-
*/
|
|
81
|
-
destroyThis() {
|
|
82
|
-
const t = this.pluginManager.onDestroy(this);
|
|
83
|
-
return t instanceof Promise ? t.finally(() => super.destroyThis()) : super.destroyThis();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
class l extends a {
|
|
87
|
-
/**
|
|
88
|
-
* 全局级别的默认选项
|
|
89
|
-
*/
|
|
90
|
-
static modeOptions = new i(r);
|
|
91
|
-
/**
|
|
92
|
-
* 实例级的默认选项
|
|
93
|
-
*/
|
|
94
|
-
get modeOptions() {
|
|
95
|
-
return this._modeOptions || (this._modeOptions = new i(r, void 0, this.constructor.modeOptions));
|
|
96
|
-
}
|
|
97
|
-
_modeOptions;
|
|
98
|
-
get mode() {
|
|
99
|
-
return this.modeOptions.mode;
|
|
100
|
-
}
|
|
101
|
-
set mode(t) {
|
|
102
|
-
this.modeOptions.mode = t;
|
|
103
|
-
}
|
|
104
|
-
get options() {
|
|
105
|
-
return this.modeOptions.plainFullOption;
|
|
106
|
-
}
|
|
107
|
-
constructor(t) {
|
|
108
|
-
super(), this.modeOptions.setOption(t);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
class d extends a {
|
|
112
|
-
/**
|
|
113
|
-
* 全局级别的默认选项
|
|
114
|
-
*/
|
|
115
|
-
static defaultOptions = new o();
|
|
116
|
-
/**
|
|
117
|
-
* 实例级的默认选项
|
|
118
|
-
*/
|
|
119
|
-
get defaultOptions() {
|
|
120
|
-
return this._defaultOptions || (this._defaultOptions = new o(void 0, this.constructor.defaultOptions));
|
|
121
|
-
}
|
|
122
|
-
_defaultOptions;
|
|
123
|
-
constructor(t) {
|
|
124
|
-
super(), this.defaultOptions.option = t;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
export {
|
|
128
|
-
a as P,
|
|
129
|
-
l as T,
|
|
130
|
-
d as a
|
|
131
|
-
};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { P as n, T as i, m as r, d as o } from "./decorator-Culqv4k6.js";
|
|
2
|
-
import { DestroyableEventTarget as u } from "@gby/destroyable";
|
|
3
|
-
class a extends u {
|
|
4
|
-
/**
|
|
5
|
-
* 是否使用独立的插件管理器
|
|
6
|
-
* @defaultValue false
|
|
7
|
-
*/
|
|
8
|
-
static isolatedPluginManager = !1;
|
|
9
|
-
/**
|
|
10
|
-
* 插件管理器
|
|
11
|
-
*/
|
|
12
|
-
static get pluginManager() {
|
|
13
|
-
return this.isolatedPluginManager && !this.hasOwnProperty("_pluginManager") && (this._pluginManager = new n(this)), this._pluginManager;
|
|
14
|
-
}
|
|
15
|
-
static _pluginManager = new n(this);
|
|
16
|
-
/**
|
|
17
|
-
* 插件管理器 {@link PluginHost.pluginManager}
|
|
18
|
-
*/
|
|
19
|
-
get pluginManager() {
|
|
20
|
-
return this.constructor.pluginManager;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* {@inheritDoc PluginExtendManager.usePlugin}
|
|
24
|
-
*/
|
|
25
|
-
static usePlugin(t, ...e) {
|
|
26
|
-
return this.pluginManager.usePlugin(t, ...e);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
30
|
-
*/
|
|
31
|
-
static useExtend(t) {
|
|
32
|
-
return this.pluginManager.useExtend(t);
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 是否注册了插件 或 扩展
|
|
36
|
-
* @param plugin - 插件 或 扩展
|
|
37
|
-
* @returns 是否注册了插件 或 扩展
|
|
38
|
-
*/
|
|
39
|
-
static hasUsed(t) {
|
|
40
|
-
return this.pluginManager.hasUsed(t);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 需要在子类中调用
|
|
44
|
-
*
|
|
45
|
-
* 之所以没写在该类中的函数中,是因为 `this.pluginManager.onCreate(this,...args)` 通常会在构建函数执行的最后时才调用;
|
|
46
|
-
* 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.onCreate(this,...args)` 不是在最后的执行;
|
|
47
|
-
*/
|
|
48
|
-
// constructor(...args:any) {
|
|
49
|
-
// super();
|
|
50
|
-
// // @ts-ignore
|
|
51
|
-
// this.pluginManager.onCreate(this,...args);
|
|
52
|
-
// }
|
|
53
|
-
/**
|
|
54
|
-
* 实例的注册插件的方法
|
|
55
|
-
* @param plugin
|
|
56
|
-
* @param args
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
usePlugin(t, ...e) {
|
|
60
|
-
return this.pluginManager.instUsePlugin(this, t, ...e);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* {@inheritDoc PluginExtendManager.useExtend}
|
|
64
|
-
*/
|
|
65
|
-
useExtend(t, ...e) {
|
|
66
|
-
return this.pluginManager.instUseExtend(this, t, ...e);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* 初始化实例
|
|
70
|
-
* @remarks
|
|
71
|
-
* 会调用 {@link PluginExtendManager.onInit}
|
|
72
|
-
* @param args
|
|
73
|
-
*/
|
|
74
|
-
init(...t) {
|
|
75
|
-
return this.pluginManager.onInit(this, ...t);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* 销毁实例
|
|
79
|
-
* @returns
|
|
80
|
-
*/
|
|
81
|
-
destroyThis() {
|
|
82
|
-
const t = this.pluginManager.onDestroy(this);
|
|
83
|
-
return t instanceof Promise ? t.finally(() => super.destroyThis()) : super.destroyThis();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
class l extends a {
|
|
87
|
-
/**
|
|
88
|
-
* 全局级别的默认选项
|
|
89
|
-
*/
|
|
90
|
-
static modeOptions = new i(r);
|
|
91
|
-
/**
|
|
92
|
-
* 实例级的默认选项
|
|
93
|
-
*/
|
|
94
|
-
get modeOptions() {
|
|
95
|
-
return this._modeOptions || (this._modeOptions = new i(r, void 0, this.constructor.modeOptions));
|
|
96
|
-
}
|
|
97
|
-
_modeOptions;
|
|
98
|
-
get mode() {
|
|
99
|
-
return this.modeOptions.mode;
|
|
100
|
-
}
|
|
101
|
-
set mode(t) {
|
|
102
|
-
this.modeOptions.mode = t;
|
|
103
|
-
}
|
|
104
|
-
get options() {
|
|
105
|
-
return this.modeOptions.plainFullOption;
|
|
106
|
-
}
|
|
107
|
-
constructor(t) {
|
|
108
|
-
super(), this.modeOptions.setOption(t);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
class d extends a {
|
|
112
|
-
/**
|
|
113
|
-
* 全局级别的默认选项
|
|
114
|
-
*/
|
|
115
|
-
static defaultOptions = new o();
|
|
116
|
-
/**
|
|
117
|
-
* 实例级的默认选项
|
|
118
|
-
*/
|
|
119
|
-
get defaultOptions() {
|
|
120
|
-
return this._defaultOptions || (this._defaultOptions = new o(void 0, this.constructor.defaultOptions));
|
|
121
|
-
}
|
|
122
|
-
_defaultOptions;
|
|
123
|
-
constructor(t) {
|
|
124
|
-
super(), this.defaultOptions.option = t;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
export {
|
|
128
|
-
a as P,
|
|
129
|
-
l as T,
|
|
130
|
-
d as a
|
|
131
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./decorator-Wf_x4qDo.cjs"),r=require("@gby/destroyable");class s extends r.DestroyableEventTarget{static isolatedPluginManager=!1;static get pluginManager(){return this.isolatedPluginManager&&!this.hasOwnProperty("_pluginManager")&&(this._pluginManager=new e.PluginExtendManager(this)),this._pluginManager}static _pluginManager=new e.PluginExtendManager(this);get pluginManager(){return this.constructor.pluginManager}static usePlugin(t,...n){return this.pluginManager.usePlugin(t,...n)}static useExtend(t){return this.pluginManager.useExtend(t)}static hasUsed(t){return this.pluginManager.hasUsed(t)}usePlugin(t,...n){return this.pluginManager.instUsePlugin(this,t,...n)}useExtend(t,...n){return this.pluginManager.instUseExtend(this,t,...n)}init(...t){return this.pluginManager.onInit(this,...t)}destroyThis(){const t=this.pluginManager.onDestroy(this);return t instanceof Promise?t.finally(()=>super.destroyThis()):super.destroyThis()}}class o extends s{static modeOptions=new e.TierModeOptions(e.commonModeName);get modeOptions(){return this._modeOptions||(this._modeOptions=new e.TierModeOptions(e.commonModeName,void 0,this.constructor.modeOptions))}_modeOptions;get mode(){return this.modeOptions.mode}set mode(t){this.modeOptions.mode=t}get options(){return this.modeOptions.plainFullOption}constructor(t){super(),this.modeOptions.setOption(t)}}class a extends s{static defaultOptions=new e.TierOptions;get defaultOptions(){return this._defaultOptions||(this._defaultOptions=new e.TierOptions(void 0,this.constructor.defaultOptions))}_defaultOptions;constructor(t){super(),this.defaultOptions.option=t}}exports.PluginHostEventTarget=s;exports.TierModeOptionsPluginHostEventTarget=o;exports.TierOptionsPluginHostEventTarget=a;
|