plugin-tls 0.0.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/LICENSE +21 -0
- package/README.md +93 -0
- package/dist/OptionsPluginHost.d.ts +49 -0
- package/dist/PluginHost.d.ts +96 -0
- package/dist/PluginManager.d.ts +76 -0
- package/dist/defaultOptions.d.ts +33 -0
- package/dist/index.d.ts +22 -0
- package/dist/plugin-tls.es.js +170 -0
- package/dist/plugin-tls.umd.js +1 -0
- package/doc/index.md +12 -0
- package/doc/plugin-tls.adddefaultoptions.md +30 -0
- package/doc/plugin-tls.addinstoptions.md +31 -0
- package/doc/plugin-tls.createoptionspluginhost.md +29 -0
- package/doc/plugin-tls.createpluginhost.md +30 -0
- package/doc/plugin-tls.hostinst.md +13 -0
- package/doc/plugin-tls.idefaultoptionshost.defaultoptions.md +11 -0
- package/doc/plugin-tls.idefaultoptionshost.md +20 -0
- package/doc/plugin-tls.iidefaultoptionshostconstructor.md +13 -0
- package/doc/plugin-tls.ioptionspluginhost.defaultoptions.md +11 -0
- package/doc/plugin-tls.ioptionspluginhost.md +21 -0
- package/doc/plugin-tls.ioptionspluginhostconstructor.md +15 -0
- package/doc/plugin-tls.iplugin.created.md +25 -0
- package/doc/plugin-tls.iplugin.md +21 -0
- package/doc/plugin-tls.iplugin.used.md +25 -0
- package/doc/plugin-tls.ipluginhost.md +20 -0
- package/doc/plugin-tls.ipluginhost.use.md +26 -0
- package/doc/plugin-tls.ipluginhostconstructor.md +20 -0
- package/doc/plugin-tls.ipluginhostconstructor.use.md +25 -0
- package/doc/plugin-tls.md +53 -0
- package/doc/plugin-tls.optionspluginhost._defaultoptions.md +11 -0
- package/doc/plugin-tls.optionspluginhost.defaultoptions.md +13 -0
- package/doc/plugin-tls.optionspluginhost.md +21 -0
- package/doc/plugin-tls.plugincreatedreturntype.md +15 -0
- package/doc/plugin-tls.pluginhost._constructor_.md +13 -0
- package/doc/plugin-tls.pluginhost._pluginmanager.md +11 -0
- package/doc/plugin-tls.pluginhost.md +25 -0
- package/doc/plugin-tls.pluginhost.pluginmanager.md +13 -0
- package/doc/plugin-tls.pluginhost.use.md +25 -0
- package/doc/plugin-tls.pluginmanager.created.md +28 -0
- package/doc/plugin-tls.pluginmanager.host.md +13 -0
- package/doc/plugin-tls.pluginmanager.instuse.md +30 -0
- package/doc/plugin-tls.pluginmanager.md +34 -0
- package/doc/plugin-tls.pluginmanager.pluginoptsmap.md +13 -0
- package/doc/plugin-tls.pluginmanager.plugins.md +13 -0
- package/doc/plugin-tls.pluginmanager.use.md +25 -0
- package/doc/plugin-tls.pluginoptions.md +11 -0
- package/doc/plugin-tls.pluginusereturntype.md +15 -0
- package/package.json +58 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [createPluginHost](./plugin-tls.createpluginhost.md)
|
|
4
|
+
|
|
5
|
+
## createPluginHost() function
|
|
6
|
+
|
|
7
|
+
创建插件的缩主类
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function createPluginHost<HOST>(): {
|
|
13
|
+
new (): {
|
|
14
|
+
readonly pluginManager: PluginManager<HOST>;
|
|
15
|
+
use<Options extends unknown, Plugin_1 extends IPlugin<HOST, Options>>(plugin: Plugin_1, options?: Options | undefined): PluginCreatedReturnType<Plugin_1> | undefined;
|
|
16
|
+
};
|
|
17
|
+
readonly pluginManager: PluginManager<HOST>;
|
|
18
|
+
_pluginManager: PluginManager<HOST>;
|
|
19
|
+
use<Options_1>(plugin: IPlugin<HOST, Options_1>, options: Options_1): any;
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
{ new (): { readonly pluginManager: [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><HOST>; use<Options extends unknown, Plugin\_1 extends [IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, Options>>(plugin: Plugin\_1, options?: Options \| undefined): [PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><Plugin\_1> \| undefined; }; readonly pluginManager: [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><HOST>; \_pluginManager: [PluginManager](./plugin-tls.pluginmanager.md)<!-- --><HOST>; use<Options\_1>(plugin: [IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, Options\_1>, options: Options\_1): any; }
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
比 直接使用 PluginHost 提供了完善的类型推导
|
|
30
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [HostInst](./plugin-tls.hostinst.md)
|
|
4
|
+
|
|
5
|
+
## HostInst type
|
|
6
|
+
|
|
7
|
+
插件宿主的实例类型
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare type HostInst<H> = H extends new (...args: any) => any ? InstanceType<H> : H;
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IDefaultOptionsHost](./plugin-tls.idefaultoptionshost.md) > [defaultOptions](./plugin-tls.idefaultoptionshost.defaultoptions.md)
|
|
4
|
+
|
|
5
|
+
## IDefaultOptionsHost.defaultOptions property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
readonly defaultOptions: Options;
|
|
11
|
+
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IDefaultOptionsHost](./plugin-tls.idefaultoptionshost.md)
|
|
4
|
+
|
|
5
|
+
## IDefaultOptionsHost interface
|
|
6
|
+
|
|
7
|
+
默认选项宿主接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IDefaultOptionsHost<Options>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Modifiers | Type | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| [defaultOptions](./plugin-tls.idefaultoptionshost.defaultoptions.md) | <code>readonly</code> | Options | |
|
|
20
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IIDefaultOptionsHostConstructor](./plugin-tls.iidefaultoptionshostconstructor.md)
|
|
4
|
+
|
|
5
|
+
## IIDefaultOptionsHostConstructor interface
|
|
6
|
+
|
|
7
|
+
默认选项宿主的构建函数接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IIDefaultOptionsHostConstructor<Options>
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IOptionsPluginHost](./plugin-tls.ioptionspluginhost.md) > [defaultOptions](./plugin-tls.ioptionspluginhost.defaultoptions.md)
|
|
4
|
+
|
|
5
|
+
## IOptionsPluginHost.defaultOptions property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
readonly defaultOptions: Options;
|
|
11
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IOptionsPluginHost](./plugin-tls.ioptionspluginhost.md)
|
|
4
|
+
|
|
5
|
+
## IOptionsPluginHost interface
|
|
6
|
+
|
|
7
|
+
选项插件宿主接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IOptionsPluginHost<Options, HOST> extends IPluginHost<HOST>
|
|
13
|
+
```
|
|
14
|
+
<b>Extends:</b> [IPluginHost](./plugin-tls.ipluginhost.md)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [defaultOptions](./plugin-tls.ioptionspluginhost.defaultoptions.md) | <code>readonly</code> | Options | |
|
|
21
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IOptionsPluginHostConstructor](./plugin-tls.ioptionspluginhostconstructor.md)
|
|
4
|
+
|
|
5
|
+
## IOptionsPluginHostConstructor interface
|
|
6
|
+
|
|
7
|
+
选项插件宿主的构建函数接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IOptionsPluginHostConstructor<Options, HOST> extends IPluginHostConstructor<HOST>
|
|
13
|
+
```
|
|
14
|
+
<b>Extends:</b> [IPluginHostConstructor](./plugin-tls.ipluginhostconstructor.md)
|
|
15
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPlugin](./plugin-tls.iplugin.md) > [created](./plugin-tls.iplugin.created.md)
|
|
4
|
+
|
|
5
|
+
## IPlugin.created() method
|
|
6
|
+
|
|
7
|
+
当宿主实例被创建时调用
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
created?(host: HostInst<HOST>, options?: Options): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| host | [HostInst](./plugin-tls.hostinst.md)<!-- --><HOST> | 新建的宿主实例 |
|
|
20
|
+
| options | Options | <i>(Optional)</i> 注册插件时的选项 |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
any
|
|
25
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPlugin](./plugin-tls.iplugin.md)
|
|
4
|
+
|
|
5
|
+
## IPlugin interface
|
|
6
|
+
|
|
7
|
+
插件的接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IPlugin<HOST, Options = any>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [created(host, options)?](./plugin-tls.iplugin.created.md) | <i>(Optional)</i> 当宿主实例被创建时调用 |
|
|
20
|
+
| [used(Host, options)](./plugin-tls.iplugin.used.md) | 当插件被注册时调用 |
|
|
21
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPlugin](./plugin-tls.iplugin.md) > [used](./plugin-tls.iplugin.used.md)
|
|
4
|
+
|
|
5
|
+
## IPlugin.used() method
|
|
6
|
+
|
|
7
|
+
当插件被注册时调用
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
used(Host: HOST, options?: Options): any;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| Host | HOST | 宿主的类型 |
|
|
20
|
+
| options | Options | <i>(Optional)</i> 注册插件时的选项 |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
any
|
|
25
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPluginHost](./plugin-tls.ipluginhost.md)
|
|
4
|
+
|
|
5
|
+
## IPluginHost interface
|
|
6
|
+
|
|
7
|
+
插件宿主的接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IPluginHost<HOST>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [use(plugin, options)](./plugin-tls.ipluginhost.use.md) | 实例的注册插件的方法 |
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPluginHost](./plugin-tls.ipluginhost.md) > [use](./plugin-tls.ipluginhost.use.md)
|
|
4
|
+
|
|
5
|
+
## IPluginHost.use() method
|
|
6
|
+
|
|
7
|
+
实例的注册插件的方法
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
use<Options extends PluginOptions, Plugin extends IPlugin<HOST, Options>>(plugin: Plugin, options?: Options): PluginCreatedReturnType<Plugin> | undefined;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| plugin | Plugin | |
|
|
20
|
+
| options | Options | <i>(Optional)</i> |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
[PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><Plugin> \| undefined
|
|
25
|
+
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPluginHostConstructor](./plugin-tls.ipluginhostconstructor.md)
|
|
4
|
+
|
|
5
|
+
## IPluginHostConstructor interface
|
|
6
|
+
|
|
7
|
+
插件宿主构造函数的接口
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface IPluginHostConstructor<HOST>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [use(plugin, options)](./plugin-tls.ipluginhostconstructor.use.md) | 使用插件、注册插件 |
|
|
20
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [IPluginHostConstructor](./plugin-tls.ipluginhostconstructor.md) > [use](./plugin-tls.ipluginhostconstructor.use.md)
|
|
4
|
+
|
|
5
|
+
## IPluginHostConstructor.use() method
|
|
6
|
+
|
|
7
|
+
使用插件、注册插件
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
use<Plugin extends IPlugin<HOST, Options>, Options>(plugin: Plugin, options: Options): PluginUseReturnType<Plugin> | undefined;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| plugin | Plugin | 插件 |
|
|
20
|
+
| options | Options | 传递给插件的选项 |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
[PluginUseReturnType](./plugin-tls.pluginusereturntype.md)<!-- --><Plugin> \| undefined
|
|
25
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md)
|
|
4
|
+
|
|
5
|
+
## plugin-tls package
|
|
6
|
+
|
|
7
|
+
插件系统
|
|
8
|
+
|
|
9
|
+
## Remarks
|
|
10
|
+
|
|
11
|
+
主要负责 SDK 的插件机制的实现 插件系统应该具备以下功能: - 注册插件 - 可扩展类的静态级功能 - 可扩展类的实例级功能 - 可自定义暴露的功能 - 可拥有私有自身的API
|
|
12
|
+
|
|
13
|
+
额外的也提供了其它的功能 - 全局选项 - 实例选项
|
|
14
|
+
|
|
15
|
+
## Classes
|
|
16
|
+
|
|
17
|
+
| Class | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [OptionsPluginHost](./plugin-tls.optionspluginhost.md) | |
|
|
20
|
+
| [PluginHost](./plugin-tls.pluginhost.md) | 插件的宿主 |
|
|
21
|
+
| [PluginManager](./plugin-tls.pluginmanager.md) | 插件管理者 |
|
|
22
|
+
|
|
23
|
+
## Functions
|
|
24
|
+
|
|
25
|
+
| Function | Description |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| [addDefaultOptions(options, name)](./plugin-tls.adddefaultoptions.md) | 创建增加带有选项机制的装饰器 |
|
|
28
|
+
| [addInstOptions(target, propertyKey, descriptor)](./plugin-tls.addinstoptions.md) | 创建增加带有选项机制的装饰器 |
|
|
29
|
+
| [createOptionsPluginHost()](./plugin-tls.createoptionspluginhost.md) | 创建带有选项机制的插件宿主类 比 直接使用 OptionsPluginHost 提供了完善的类型推导 |
|
|
30
|
+
| [createPluginHost()](./plugin-tls.createpluginhost.md) | 创建插件的缩主类 |
|
|
31
|
+
| [pluginHost(target)](./plugin-tls.pluginhost.md) | 插件缩主类的装饰器 |
|
|
32
|
+
|
|
33
|
+
## Interfaces
|
|
34
|
+
|
|
35
|
+
| Interface | Description |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| [IDefaultOptionsHost](./plugin-tls.idefaultoptionshost.md) | 默认选项宿主接口 |
|
|
38
|
+
| [IIDefaultOptionsHostConstructor](./plugin-tls.iidefaultoptionshostconstructor.md) | 默认选项宿主的构建函数接口 |
|
|
39
|
+
| [IOptionsPluginHost](./plugin-tls.ioptionspluginhost.md) | 选项插件宿主接口 |
|
|
40
|
+
| [IOptionsPluginHostConstructor](./plugin-tls.ioptionspluginhostconstructor.md) | 选项插件宿主的构建函数接口 |
|
|
41
|
+
| [IPlugin](./plugin-tls.iplugin.md) | 插件的接口 |
|
|
42
|
+
| [IPluginHost](./plugin-tls.ipluginhost.md) | 插件宿主的接口 |
|
|
43
|
+
| [IPluginHostConstructor](./plugin-tls.ipluginhostconstructor.md) | 插件宿主构造函数的接口 |
|
|
44
|
+
|
|
45
|
+
## Type Aliases
|
|
46
|
+
|
|
47
|
+
| Type Alias | Description |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| [HostInst](./plugin-tls.hostinst.md) | 插件宿主的实例类型 |
|
|
50
|
+
| [PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md) | 插件的 created 方法的返回值类型 |
|
|
51
|
+
| [PluginOptions](./plugin-tls.pluginoptions.md) | |
|
|
52
|
+
| [PluginUseReturnType](./plugin-tls.pluginusereturntype.md) | 插件的 used 方法的返回值类型 |
|
|
53
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [OptionsPluginHost](./plugin-tls.optionspluginhost.md) > [\_defaultOptions](./plugin-tls.optionspluginhost._defaultoptions.md)
|
|
4
|
+
|
|
5
|
+
## OptionsPluginHost.\_defaultOptions property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
protected _defaultOptions: Options;
|
|
11
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [OptionsPluginHost](./plugin-tls.optionspluginhost.md) > [defaultOptions](./plugin-tls.optionspluginhost.defaultoptions.md)
|
|
4
|
+
|
|
5
|
+
## OptionsPluginHost.defaultOptions property
|
|
6
|
+
|
|
7
|
+
全局级别的默认选项
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static readonly defaultOptions: any;
|
|
13
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [OptionsPluginHost](./plugin-tls.optionspluginhost.md)
|
|
4
|
+
|
|
5
|
+
## OptionsPluginHost class
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
export declare class OptionsPluginHost<Options = any> extends PluginHost
|
|
11
|
+
```
|
|
12
|
+
<b>Extends:</b> [PluginHost](./plugin-tls.pluginhost.md)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
| Property | Modifiers | Type | Description |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| [\_defaultOptions](./plugin-tls.optionspluginhost._defaultoptions.md) | <code>protected</code> | Options | |
|
|
19
|
+
| [defaultOptions](./plugin-tls.optionspluginhost.defaultoptions.md) | <code>readonly</code> | Options | 实例级的默认选项 |
|
|
20
|
+
| [defaultOptions](./plugin-tls.optionspluginhost.defaultoptions.md) | <p><code>readonly</code></p><p><code>static</code></p> | any | 全局级别的默认选项 |
|
|
21
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)
|
|
4
|
+
|
|
5
|
+
## PluginCreatedReturnType type
|
|
6
|
+
|
|
7
|
+
插件的 created 方法的返回值类型
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare type PluginCreatedReturnType<P extends IPlugin<any>> = P["created"] extends AnyFunction ? ReturnType<P["created"]> : void;
|
|
13
|
+
```
|
|
14
|
+
<b>References:</b> [IPlugin](./plugin-tls.iplugin.md)
|
|
15
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md) > [(constructor)](./plugin-tls.pluginhost._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost.(constructor)
|
|
6
|
+
|
|
7
|
+
Constructs a new instance of the `PluginHost` class
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor();
|
|
13
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md) > [\_pluginManager](./plugin-tls.pluginhost._pluginmanager.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost.\_pluginManager property
|
|
6
|
+
|
|
7
|
+
<b>Signature:</b>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
static _pluginManager: PluginManager<any>;
|
|
11
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [pluginHost](./plugin-tls.pluginhost.md)
|
|
4
|
+
|
|
5
|
+
## pluginHost() function
|
|
6
|
+
|
|
7
|
+
插件缩主类的装饰器
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function pluginHost<HOST extends new (...args: any) => any>(target: HOST): HOST;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| target | HOST | |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
HOST
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md) > [pluginManager](./plugin-tls.pluginhost.pluginmanager.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost.pluginManager property
|
|
6
|
+
|
|
7
|
+
插件管理器
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static get pluginManager(): PluginManager<any>;
|
|
13
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginHost](./plugin-tls.pluginhost.md) > [use](./plugin-tls.pluginhost.use.md)
|
|
4
|
+
|
|
5
|
+
## PluginHost.use() method
|
|
6
|
+
|
|
7
|
+
使用插件、注册插件
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static use<Plugin extends IPlugin<HOST, Options>, Options extends PluginOptions, HOST = typeof PluginHost>(plugin: Plugin, options: Options): ReturnType<Plugin["used"]> | undefined;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| plugin | Plugin | 插件 |
|
|
20
|
+
| options | Options | 传递给插件的选项 |
|
|
21
|
+
|
|
22
|
+
<b>Returns:</b>
|
|
23
|
+
|
|
24
|
+
ReturnType<Plugin\["used"\]> \| undefined
|
|
25
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [created](./plugin-tls.pluginmanager.created.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.created() method
|
|
6
|
+
|
|
7
|
+
插件宿主创建实例时调用
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
created(hostInst: HostInst<HOST>): void;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><HOST> | 插件宿主的新实例 |
|
|
20
|
+
|
|
21
|
+
<b>Returns:</b>
|
|
22
|
+
|
|
23
|
+
void
|
|
24
|
+
|
|
25
|
+
## Remarks
|
|
26
|
+
|
|
27
|
+
会调用每个插件的 [IPlugin.created()](./plugin-tls.iplugin.created.md) 方法
|
|
28
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [host](./plugin-tls.pluginmanager.host.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.host property
|
|
6
|
+
|
|
7
|
+
插件的宿主
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
host: HOST;
|
|
13
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [instUse](./plugin-tls.pluginmanager.instuse.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.instUse() method
|
|
6
|
+
|
|
7
|
+
插件宿主实例的注册插件的方法
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
instUse<Options extends PluginOptions, Plugin extends IPlugin<HOST, Options>>(hostInst: HostInst<HOST>, plugin: Plugin, options?: Options): PluginCreatedReturnType<Plugin> | undefined;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| hostInst | [HostInst](./plugin-tls.hostinst.md)<!-- --><HOST> | 插件宿主的新实例 |
|
|
20
|
+
| plugin | Plugin | |
|
|
21
|
+
| options | Options | <i>(Optional)</i> |
|
|
22
|
+
|
|
23
|
+
<b>Returns:</b>
|
|
24
|
+
|
|
25
|
+
[PluginCreatedReturnType](./plugin-tls.plugincreatedreturntype.md)<!-- --><Plugin> \| undefined
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
会调用每个插件的 [IPlugin.created()](./plugin-tls.iplugin.created.md) 方法
|
|
30
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager class
|
|
6
|
+
|
|
7
|
+
插件管理者
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class PluginManager<HOST>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Remarks
|
|
16
|
+
|
|
17
|
+
负责管理插件的注册、应用 等
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
| Property | Modifiers | Type | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| [host](./plugin-tls.pluginmanager.host.md) | | HOST | 插件的宿主 |
|
|
24
|
+
| [pluginOptsMap](./plugin-tls.pluginmanager.pluginoptsmap.md) | | Map<[IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST, any>, any> | 插件与插件选项的映射 |
|
|
25
|
+
| [plugins](./plugin-tls.pluginmanager.plugins.md) | | [IPlugin](./plugin-tls.iplugin.md)<!-- --><HOST>\[\] | 注册的插件 |
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
| Method | Modifiers | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| [created(hostInst)](./plugin-tls.pluginmanager.created.md) | | 插件宿主创建实例时调用 |
|
|
32
|
+
| [instUse(hostInst, plugin, options)](./plugin-tls.pluginmanager.instuse.md) | | 插件宿主实例的注册插件的方法 |
|
|
33
|
+
| [use(plugin, options)](./plugin-tls.pluginmanager.use.md) | | 使用插件、注册插件 |
|
|
34
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [plugin-tls](./plugin-tls.md) > [PluginManager](./plugin-tls.pluginmanager.md) > [pluginOptsMap](./plugin-tls.pluginmanager.pluginoptsmap.md)
|
|
4
|
+
|
|
5
|
+
## PluginManager.pluginOptsMap property
|
|
6
|
+
|
|
7
|
+
插件与插件选项的映射
|
|
8
|
+
|
|
9
|
+
<b>Signature:</b>
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
pluginOptsMap: Map<IPlugin<HOST, any>, any>;
|
|
13
|
+
```
|