plugin-tls 0.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +5 -5
  2. package/dist/extend/extend.d.ts +222 -0
  3. package/dist/extend/extend.d.ts.map +1 -0
  4. package/dist/extend/mixin.d.ts +105 -0
  5. package/dist/extend/mixin.d.ts.map +1 -0
  6. package/dist/index.d.ts +14 -4
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/options-manager/ModeOptions.d.ts +88 -0
  9. package/dist/options-manager/ModeOptions.d.ts.map +1 -0
  10. package/dist/options-manager/OptionsManager.d.ts +105 -0
  11. package/dist/options-manager/OptionsManager.d.ts.map +1 -0
  12. package/dist/options-manager/TierModeOptions.d.ts +69 -0
  13. package/dist/options-manager/TierModeOptions.d.ts.map +1 -0
  14. package/dist/options-manager/TierOptions.d.ts +48 -0
  15. package/dist/options-manager/TierOptions.d.ts.map +1 -0
  16. package/dist/{defaultOptions.d.ts → options-manager/defaultOptions.d.ts} +2 -1
  17. package/dist/options-manager/defaultOptions.d.ts.map +1 -0
  18. package/dist/options-manager/tools.d.ts +35 -0
  19. package/dist/options-manager/tools.d.ts.map +1 -0
  20. package/dist/plugin-host/PluginHost.d.ts +184 -0
  21. package/dist/plugin-host/PluginHost.d.ts.map +1 -0
  22. package/dist/plugin-host/TierModeOptionsPluginHost.d.ts +102 -0
  23. package/dist/plugin-host/TierModeOptionsPluginHost.d.ts.map +1 -0
  24. package/dist/plugin-host/TierOptionsPluginHost.d.ts +83 -0
  25. package/dist/plugin-host/TierOptionsPluginHost.d.ts.map +1 -0
  26. package/dist/plugin-manager/PluginManager.d.ts +119 -0
  27. package/dist/plugin-manager/PluginManager.d.ts.map +1 -0
  28. package/dist/plugin-manager/PluginManagerWithInit.d.ts +36 -0
  29. package/dist/plugin-manager/PluginManagerWithInit.d.ts.map +1 -0
  30. package/dist/plugin-tls.d.ts +1329 -0
  31. package/dist/plugin-tls.iife.js +1 -0
  32. package/dist/plugin-tls.mjs +1064 -0
  33. package/dist/plugin-tls.umd.js +1 -1
  34. package/dist/properties.d.ts +30 -0
  35. package/dist/properties.d.ts.map +1 -0
  36. package/dist/tsdoc-metadata.json +11 -0
  37. package/doc/{plugin-tls.adddefaultoptions.md → api/plugin-tls.adddefaultoptions.md} +3 -3
  38. package/doc/{plugin-tls.addinstoptions.md → api/plugin-tls.addinstoptions.md} +2 -2
  39. package/doc/api/plugin-tls.allfunctionapply.md +26 -0
  40. package/doc/api/plugin-tls.becomepluginhost.md +15 -0
  41. package/doc/api/plugin-tls.becomepluginhost_extends.md +38 -0
  42. package/doc/api/plugin-tls.becomepluginhost_proxy.md +29 -0
  43. package/doc/api/plugin-tls.becometiermodeoptionshost.md +15 -0
  44. package/doc/api/plugin-tls.becometieroptionshost.md +15 -0
  45. package/doc/api/plugin-tls.classextender.md +15 -0
  46. package/doc/api/plugin-tls.classextenderprivatemember._constructors.md +13 -0
  47. package/doc/api/plugin-tls.classextenderprivatemember._destroys.md +13 -0
  48. package/doc/api/plugin-tls.classextenderprivatemember.md +21 -0
  49. package/doc/api/plugin-tls.classextenderprivatememberwithinit._inits.md +13 -0
  50. package/doc/api/plugin-tls.classextenderprivatememberwithinit.md +21 -0
  51. package/doc/api/plugin-tls.classextenderwithinit.md +15 -0
  52. package/doc/api/plugin-tls.classtype._new_.md +22 -0
  53. package/doc/api/plugin-tls.classtype.md +20 -0
  54. package/doc/api/plugin-tls.commonmodename.md +18 -0
  55. package/doc/api/plugin-tls.createcallerofprivatememberofextend.md +30 -0
  56. package/doc/api/plugin-tls.createdefinemixin.md +23 -0
  57. package/doc/api/plugin-tls.createextendtarget.md +30 -0
  58. package/doc/api/plugin-tls.createextendtargetwithinit.md +30 -0
  59. package/doc/api/plugin-tls.createmixintarget.md +30 -0
  60. package/doc/api/plugin-tls.createpluginhost.md +35 -0
  61. package/doc/api/plugin-tls.createpropertysetter.md +30 -0
  62. package/doc/api/plugin-tls.createtargetextend.md +30 -0
  63. package/doc/api/plugin-tls.createtargetextendwithinit.md +30 -0
  64. package/doc/api/plugin-tls.createtargetmixin.md +30 -0
  65. package/doc/api/plugin-tls.createtiermodeoptionspluginhost.md +32 -0
  66. package/doc/api/plugin-tls.createtieroptionspluginhost.md +30 -0
  67. package/doc/api/plugin-tls.defineextend.md +35 -0
  68. package/doc/api/plugin-tls.defineextendwithinit.md +35 -0
  69. package/doc/api/plugin-tls.definemixin.md +31 -0
  70. package/doc/api/plugin-tls.extendtarget.md +31 -0
  71. package/doc/api/plugin-tls.extendtargetwithinit.md +31 -0
  72. package/doc/api/plugin-tls.formatuseparameters.md +13 -0
  73. package/doc/api/plugin-tls.formatusepluginparameters.md +15 -0
  74. package/doc/api/plugin-tls.getnormalizepluginoptions.md +15 -0
  75. package/doc/api/plugin-tls.getpluginoptions.md +15 -0
  76. package/doc/api/plugin-tls.getpropertyvalue.md +26 -0
  77. package/doc/api/plugin-tls.getpropertyvaluebypath.md +26 -0
  78. package/doc/api/plugin-tls.gettargetproperties.md +26 -0
  79. package/doc/{plugin-tls.hostinst.md → api/plugin-tls.hostinst.md} +2 -2
  80. package/doc/{plugin-tls.idefaultoptionshost.defaultoptions.md → api/plugin-tls.idefaultoptionshost.defaultoptions.md} +1 -1
  81. package/doc/{plugin-tls.idefaultoptionshost.md → api/plugin-tls.idefaultoptionshost.md} +1 -1
  82. package/doc/{plugin-tls.iidefaultoptionshostconstructor.md → api/plugin-tls.iidefaultoptionshostconstructor.md} +1 -1
  83. package/doc/{plugin-tls.iplugin.created.md → api/plugin-tls.iplugin.created.md} +4 -4
  84. package/doc/api/plugin-tls.iplugin.destroyed.md +25 -0
  85. package/doc/{plugin-tls.iplugin.md → api/plugin-tls.iplugin.md} +4 -3
  86. package/doc/{plugin-tls.iplugin.used.md → api/plugin-tls.iplugin.used.md} +4 -4
  87. package/doc/{plugin-tls.ipluginhost.md → api/plugin-tls.ipluginhost.md} +2 -2
  88. package/doc/{plugin-tls.ipluginhost.use.md → api/plugin-tls.ipluginhost.use.md} +6 -6
  89. package/doc/{plugin-tls.ipluginhostconstructor.md → api/plugin-tls.ipluginhostconstructor.md} +2 -2
  90. package/doc/{plugin-tls.ipluginhostconstructor.use.md → api/plugin-tls.ipluginhostconstructor.use.md} +6 -6
  91. package/doc/api/plugin-tls.ipluginwithinit.inited.md +25 -0
  92. package/doc/api/plugin-tls.ipluginwithinit.md +21 -0
  93. package/doc/api/plugin-tls.itiermodeoptionshost.md +21 -0
  94. package/doc/api/plugin-tls.itiermodeoptionshost.mode.md +11 -0
  95. package/doc/api/plugin-tls.itiermodeoptionshost.modeoptions.md +11 -0
  96. package/doc/api/plugin-tls.itiermodeoptionshostconstructor.md +13 -0
  97. package/doc/api/plugin-tls.itiermodeoptionspluginhost.md +15 -0
  98. package/doc/api/plugin-tls.itiermodeoptionspluginhostconstructor.md +15 -0
  99. package/doc/api/plugin-tls.itieroptionshost.defaultoptions.md +11 -0
  100. package/doc/api/plugin-tls.itieroptionshost.md +20 -0
  101. package/doc/api/plugin-tls.itieroptionshostconstructor.md +13 -0
  102. package/doc/api/plugin-tls.itieroptionspluginhost.md +15 -0
  103. package/doc/api/plugin-tls.itieroptionspluginhostconstructor.md +15 -0
  104. package/doc/api/plugin-tls.md +121 -0
  105. package/doc/api/plugin-tls.mergeproperties.md +25 -0
  106. package/doc/api/plugin-tls.mixin_4.md +33 -0
  107. package/doc/api/plugin-tls.mixintarget.md +31 -0
  108. package/doc/api/plugin-tls.modeoptions._constructor_.md +20 -0
  109. package/doc/api/plugin-tls.modeoptions._constructor__1.md +21 -0
  110. package/doc/api/plugin-tls.modeoptions._mode.md +11 -0
  111. package/doc/api/plugin-tls.modeoptions._modenames.md +11 -0
  112. package/doc/api/plugin-tls.modeoptions._plainfulloption.md +11 -0
  113. package/doc/api/plugin-tls.modeoptions.getfullmodeoption.md +29 -0
  114. package/doc/api/plugin-tls.modeoptions.getmodenames.md +18 -0
  115. package/doc/api/plugin-tls.modeoptions.getmodeoption.md +29 -0
  116. package/doc/api/plugin-tls.modeoptions.hasmode.md +25 -0
  117. package/doc/api/plugin-tls.modeoptions.md +57 -0
  118. package/doc/api/plugin-tls.modeoptions.mode.md +15 -0
  119. package/doc/api/plugin-tls.modeoptions.modenames.md +13 -0
  120. package/doc/api/plugin-tls.modeoptions.modes.md +13 -0
  121. package/doc/api/plugin-tls.modeoptions.option.md +13 -0
  122. package/doc/api/plugin-tls.modeoptions.optionmanager.md +13 -0
  123. package/doc/api/plugin-tls.modeoptions.plainfulloption.md +11 -0
  124. package/doc/api/plugin-tls.modeoptions.setmodeoption.md +27 -0
  125. package/doc/api/plugin-tls.modeoptions.updatefulloption.md +17 -0
  126. package/doc/api/plugin-tls.normalizepluginoptions.md +18 -0
  127. package/doc/api/plugin-tls.parsepropertypath.md +25 -0
  128. package/doc/{plugin-tls.plugincreatedreturntype.md → api/plugin-tls.plugincreatedreturntype.md} +3 -3
  129. package/doc/{plugin-tls.pluginhost._pluginmanager.md → api/plugin-tls.pluginhost._pluginmanager.md} +2 -2
  130. package/doc/api/plugin-tls.pluginhost.destroy.md +18 -0
  131. package/doc/api/plugin-tls.pluginhost.md +38 -0
  132. package/doc/{plugin-tls.pluginhost.pluginmanager.md → api/plugin-tls.pluginhost.pluginmanager.md} +2 -2
  133. package/doc/{plugin-tls.pluginhost.use.md → api/plugin-tls.pluginhost.use.md} +5 -5
  134. package/doc/api/plugin-tls.pluginmanager._constructor_.md +20 -0
  135. package/doc/{plugin-tls.pluginmanager.created.md → api/plugin-tls.pluginmanager.created.md} +4 -4
  136. package/doc/api/plugin-tls.pluginmanager.destroyed.md +28 -0
  137. package/doc/{plugin-tls.pluginmanager.host.md → api/plugin-tls.pluginmanager.host.md} +2 -2
  138. package/doc/api/plugin-tls.pluginmanager.instuse.md +30 -0
  139. package/doc/{plugin-tls.pluginmanager.md → api/plugin-tls.pluginmanager.md} +12 -5
  140. package/doc/{plugin-tls.pluginmanager.pluginoptsmap.md → api/plugin-tls.pluginmanager.pluginoptsmap.md} +2 -2
  141. package/doc/{plugin-tls.pluginmanager.plugins.md → api/plugin-tls.pluginmanager.plugins.md} +2 -2
  142. package/doc/{plugin-tls.pluginmanager.use.md → api/plugin-tls.pluginmanager.use.md} +6 -6
  143. package/doc/api/plugin-tls.pluginmanagerwithinit.inited.md +28 -0
  144. package/doc/api/plugin-tls.pluginmanagerwithinit.md +25 -0
  145. package/doc/{plugin-tls.pluginusereturntype.md → api/plugin-tls.pluginusereturntype.md} +3 -3
  146. package/doc/api/plugin-tls.privatememberofextend._constructor.md +32 -0
  147. package/doc/api/plugin-tls.privatememberofextend._destroy.md +25 -0
  148. package/doc/api/plugin-tls.privatememberofextend.md +21 -0
  149. package/doc/api/plugin-tls.privatememberofextendwithinit._init.md +28 -0
  150. package/doc/api/plugin-tls.privatememberofextendwithinit.md +21 -0
  151. package/doc/api/plugin-tls.replaceconstructorparameters.md +13 -0
  152. package/doc/api/plugin-tls.replaceconstructorreturn.md +13 -0
  153. package/doc/api/plugin-tls.setpropertyvalue.md +27 -0
  154. package/doc/api/plugin-tls.setpropertyvaluebypath.md +27 -0
  155. package/doc/api/plugin-tls.targetextend.md +31 -0
  156. package/doc/api/plugin-tls.targetextendwithinit.md +31 -0
  157. package/doc/api/plugin-tls.targetmixin.md +31 -0
  158. package/doc/api/plugin-tls.tiermodeoptions._constructor_.md +20 -0
  159. package/doc/api/plugin-tls.tiermodeoptions._constructor__1.md +22 -0
  160. package/doc/api/plugin-tls.tiermodeoptions._extends.md +11 -0
  161. package/doc/api/plugin-tls.tiermodeoptions.extends.md +15 -0
  162. package/doc/api/plugin-tls.tiermodeoptions.getfullmodeoption.md +29 -0
  163. package/doc/api/plugin-tls.tiermodeoptions.getmember.md +25 -0
  164. package/doc/api/plugin-tls.tiermodeoptions.getmodenames.md +18 -0
  165. package/doc/api/plugin-tls.tiermodeoptions.getmodeoptionmanager.md +25 -0
  166. package/doc/api/plugin-tls.tiermodeoptions.getvalue.md +25 -0
  167. package/doc/api/plugin-tls.tiermodeoptions.hasmodeontier.md +25 -0
  168. package/doc/api/plugin-tls.tiermodeoptions.md +45 -0
  169. package/doc/api/plugin-tls.tiermodeoptions.optionmanager.md +13 -0
  170. package/doc/api/plugin-tls.tiermodeoptionsdecorator.md +30 -0
  171. package/doc/api/plugin-tls.tiermodeoptionspluginhost._constructor_.md +20 -0
  172. package/doc/api/plugin-tls.tiermodeoptionspluginhost._modeoptions.md +11 -0
  173. package/doc/api/plugin-tls.tiermodeoptionspluginhost.md +37 -0
  174. package/doc/api/plugin-tls.tiermodeoptionspluginhost.mode.md +13 -0
  175. package/doc/api/plugin-tls.tiermodeoptionspluginhost.modeoptions.md +13 -0
  176. package/doc/api/plugin-tls.tiermodeoptionspluginhost.options.md +11 -0
  177. package/doc/api/plugin-tls.tieroptions._constructor_.md +21 -0
  178. package/doc/api/plugin-tls.tieroptions._extends.md +11 -0
  179. package/doc/api/plugin-tls.tieroptions._plainfulloption.md +11 -0
  180. package/doc/api/plugin-tls.tieroptions.extends.md +15 -0
  181. package/doc/api/plugin-tls.tieroptions.getmember.md +25 -0
  182. package/doc/api/plugin-tls.tieroptions.getvalue.md +25 -0
  183. package/doc/api/plugin-tls.tieroptions.md +37 -0
  184. package/doc/api/plugin-tls.tieroptions.option.md +13 -0
  185. package/doc/api/plugin-tls.tieroptions.plainfulloption.md +18 -0
  186. package/doc/api/plugin-tls.tieroptions.updatefulloption.md +17 -0
  187. package/doc/api/plugin-tls.tieroptionsdecorator.md +30 -0
  188. package/doc/api/plugin-tls.tieroptionspluginhost._constructor_.md +20 -0
  189. package/doc/api/plugin-tls.tieroptionspluginhost._defaultoptions.md +11 -0
  190. package/doc/api/plugin-tls.tieroptionspluginhost.defaultoptions.md +13 -0
  191. package/doc/api/plugin-tls.tieroptionspluginhost.md +35 -0
  192. package/package.json +23 -15
  193. package/dist/OptionsPluginHost.d.ts +0 -49
  194. package/dist/PluginHost.d.ts +0 -96
  195. package/dist/PluginManager.d.ts +0 -76
  196. package/dist/plugin-tls.es.js +0 -170
  197. package/doc/plugin-tls.createoptionspluginhost.md +0 -29
  198. package/doc/plugin-tls.createpluginhost.md +0 -30
  199. package/doc/plugin-tls.ioptionspluginhost.defaultoptions.md +0 -11
  200. package/doc/plugin-tls.ioptionspluginhost.md +0 -21
  201. package/doc/plugin-tls.ioptionspluginhostconstructor.md +0 -15
  202. package/doc/plugin-tls.md +0 -53
  203. package/doc/plugin-tls.optionspluginhost._defaultoptions.md +0 -11
  204. package/doc/plugin-tls.optionspluginhost.defaultoptions.md +0 -13
  205. package/doc/plugin-tls.optionspluginhost.md +0 -21
  206. package/doc/plugin-tls.pluginhost._constructor_.md +0 -13
  207. package/doc/plugin-tls.pluginhost.md +0 -25
  208. package/doc/plugin-tls.pluginmanager.instuse.md +0 -30
  209. package/doc/plugin-tls.pluginoptions.md +0 -11
  210. /package/doc/{index.md → api/index.md} +0 -0
@@ -0,0 +1,30 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [tierModeOptionsDecorator](./plugin-tls.tiermodeoptionsdecorator.md)
4
+
5
+ ## tierModeOptionsDecorator() function
6
+
7
+ 层级模式选项主机装饰器
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare function tierModeOptionsDecorator<This, Value>(value: ClassAccessorDecoratorTarget<This, Value>, context: ClassAccessorDecoratorContext<This, Value>): ClassAccessorDecoratorResult<This, Value>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | value | ClassAccessorDecoratorTarget&lt;This, Value&gt; | |
20
+ | context | ClassAccessorDecoratorContext&lt;This, Value&gt; | |
21
+
22
+ **Returns:**
23
+
24
+ ClassAccessorDecoratorResult&lt;This, Value&gt;
25
+
26
+
27
+ ## Remarks
28
+
29
+ 可让宿主具备层级模式选项; 需要宿主有静态的同名属性;
30
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md) &gt; [(constructor)](./plugin-tls.tiermodeoptionspluginhost._constructor_.md)
4
+
5
+ ## TierModeOptionsPluginHost.(constructor)
6
+
7
+ Constructs a new instance of the `TierModeOptionsPluginHost` class
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ constructor(options: Options);
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | options | Options | |
20
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md) &gt; [\_modeOptions](./plugin-tls.tiermodeoptionspluginhost._modeoptions.md)
4
+
5
+ ## TierModeOptionsPluginHost.\_modeOptions property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ protected _modeOptions: TierModeOptions<Mode, Options>;
11
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md)
4
+
5
+ ## TierModeOptionsPluginHost class
6
+
7
+ 层级模式选项插件的宿主
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare class TierModeOptionsPluginHost<Options extends {} = any, Mode extends string | number = string> extends PluginHost
13
+ ```
14
+ **Extends:** [PluginHost](./plugin-tls.pluginhost.md)
15
+
16
+ ## Remarks
17
+
18
+ 子类需要在构建函数中调用 `this.pluginManager.created(this);`
19
+
20
+ 之所以没写在该类中的函数中,是因为 `this.pluginManager.created(this)` 通常会在构建函数执行的最后时才调用; 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
21
+
22
+ ## Constructors
23
+
24
+ | Constructor | Modifiers | Description |
25
+ | --- | --- | --- |
26
+ | [(constructor)(options)](./plugin-tls.tiermodeoptionspluginhost._constructor_.md) | | Constructs a new instance of the <code>TierModeOptionsPluginHost</code> class |
27
+
28
+ ## Properties
29
+
30
+ | Property | Modifiers | Type | Description |
31
+ | --- | --- | --- | --- |
32
+ | [\_modeOptions](./plugin-tls.tiermodeoptionspluginhost._modeoptions.md) | <code>protected</code> | [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- -->&lt;Mode, Options&gt; | |
33
+ | [mode](./plugin-tls.tiermodeoptionspluginhost.mode.md) | | Mode | |
34
+ | [modeOptions](./plugin-tls.tiermodeoptionspluginhost.modeoptions.md) | <code>readonly</code> | [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- -->&lt;Mode, Options&gt; | 实例级的默认选项 |
35
+ | [modeOptions](./plugin-tls.tiermodeoptionspluginhost.modeoptions.md) | <p><code>static</code></p><p><code>readonly</code></p> | [TierModeOptions](./plugin-tls.tiermodeoptions.md)<!-- -->&lt;string, any&gt; | 全局级别的默认选项 |
36
+ | [options](./plugin-tls.tiermodeoptionspluginhost.options.md) | <code>readonly</code> | Options | |
37
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md) &gt; [mode](./plugin-tls.tiermodeoptionspluginhost.mode.md)
4
+
5
+ ## TierModeOptionsPluginHost.mode property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ get mode(): Mode;
11
+
12
+ set mode(value: Mode);
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md) &gt; [modeOptions](./plugin-tls.tiermodeoptionspluginhost.modeoptions.md)
4
+
5
+ ## TierModeOptionsPluginHost.modeOptions property
6
+
7
+ 全局级别的默认选项
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ static readonly modeOptions: TierModeOptions<string, any>;
13
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierModeOptionsPluginHost](./plugin-tls.tiermodeoptionspluginhost.md) &gt; [options](./plugin-tls.tiermodeoptionspluginhost.options.md)
4
+
5
+ ## TierModeOptionsPluginHost.options property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ get options(): Options;
11
+ ```
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [(constructor)](./plugin-tls.tieroptions._constructor_.md)
4
+
5
+ ## TierOptions.(constructor)
6
+
7
+ Constructs a new instance of the `TierOptions` class
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ constructor(option?: Option, extend?: TierOptions<Option>);
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | option | Option | _(Optional)_ |
20
+ | extend | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;Option&gt; | _(Optional)_ |
21
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [\_extends](./plugin-tls.tieroptions._extends.md)
4
+
5
+ ## TierOptions.\_extends property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ protected _extends: TierOptions<Option> | null;
11
+ ```
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [\_plainFullOption](./plugin-tls.tieroptions._plainfulloption.md)
4
+
5
+ ## TierOptions.\_plainFullOption property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ protected _plainFullOption: Option | null;
11
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [extends](./plugin-tls.tieroptions.extends.md)
4
+
5
+ ## TierOptions.extends property
6
+
7
+ 继承的选项
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get extends(): TierOptions<Option> | null;
13
+
14
+ set extends(value: TierOptions<Option> | null);
15
+ ```
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [getMember](./plugin-tls.tieroptions.getmember.md)
4
+
5
+ ## TierOptions.getMember() method
6
+
7
+ 获取选项成员
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getMember<Key extends keyof Option>(key: Key): Option[Key] | undefined | null;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | key | Key | |
20
+
21
+ **Returns:**
22
+
23
+ Option\[Key\] \| undefined \| null
24
+
25
+
@@ -0,0 +1,25 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [getValue](./plugin-tls.tieroptions.getvalue.md)
4
+
5
+ ## TierOptions.getValue() method
6
+
7
+ 获取属性路径对应的值
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getValue(propPath: string[]): any;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | propPath | string\[\] | |
20
+
21
+ **Returns:**
22
+
23
+ any
24
+
25
+
@@ -0,0 +1,37 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md)
4
+
5
+ ## TierOptions class
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ export declare class TierOptions<Option extends {} = any> extends OptionsManager<Option>
11
+ ```
12
+ **Extends:** OptionsManager&lt;Option&gt;
13
+
14
+ ## Constructors
15
+
16
+ | Constructor | Modifiers | Description |
17
+ | --- | --- | --- |
18
+ | [(constructor)(option, extend)](./plugin-tls.tieroptions._constructor_.md) | | Constructs a new instance of the <code>TierOptions</code> class |
19
+
20
+ ## Properties
21
+
22
+ | Property | Modifiers | Type | Description |
23
+ | --- | --- | --- | --- |
24
+ | [\_extends](./plugin-tls.tieroptions._extends.md) | <code>protected</code> | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;Option&gt; \| null | |
25
+ | [\_plainFullOption](./plugin-tls.tieroptions._plainfulloption.md) | <code>protected</code> | Option \| null | |
26
+ | [extends](./plugin-tls.tieroptions.extends.md) | | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;Option&gt; \| null | 继承的选项 |
27
+ | [option](./plugin-tls.tieroptions.option.md) | | Option | 选项 |
28
+ | [plainFullOption](./plugin-tls.tieroptions.plainfulloption.md) | <code>readonly</code> | Option | 获取完整的选项 |
29
+
30
+ ## Methods
31
+
32
+ | Method | Modifiers | Description |
33
+ | --- | --- | --- |
34
+ | [getMember(key)](./plugin-tls.tieroptions.getmember.md) | | 获取选项成员 |
35
+ | [getValue(propPath)](./plugin-tls.tieroptions.getvalue.md) | | 获取属性路径对应的值 |
36
+ | [updateFullOption()](./plugin-tls.tieroptions.updatefulloption.md) | | 更新 |
37
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [option](./plugin-tls.tieroptions.option.md)
4
+
5
+ ## TierOptions.option property
6
+
7
+ 选项
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ option: Option;
13
+ ```
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [plainFullOption](./plugin-tls.tieroptions.plainfulloption.md)
4
+
5
+ ## TierOptions.plainFullOption property
6
+
7
+ 获取完整的选项
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get plainFullOption(): Option;
13
+ ```
14
+
15
+ ## Remarks
16
+
17
+ 会与继承来的选项进行合并
18
+
@@ -0,0 +1,17 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptions](./plugin-tls.tieroptions.md) &gt; [updateFullOption](./plugin-tls.tieroptions.updatefulloption.md)
4
+
5
+ ## TierOptions.updateFullOption() method
6
+
7
+ 更新
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ updateFullOption(): void;
13
+ ```
14
+ **Returns:**
15
+
16
+ void
17
+
@@ -0,0 +1,30 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [tierOptionsDecorator](./plugin-tls.tieroptionsdecorator.md)
4
+
5
+ ## tierOptionsDecorator() function
6
+
7
+ 层级选项主机装饰器
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare function tierOptionsDecorator<This, Value>(value: ClassAccessorDecoratorTarget<This, Value>, context: ClassAccessorDecoratorContext<This, Value>): ClassAccessorDecoratorResult<This, Value>;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | value | ClassAccessorDecoratorTarget&lt;This, Value&gt; | |
20
+ | context | ClassAccessorDecoratorContext&lt;This, Value&gt; | |
21
+
22
+ **Returns:**
23
+
24
+ ClassAccessorDecoratorResult&lt;This, Value&gt;
25
+
26
+
27
+ ## Remarks
28
+
29
+ 可让宿主具备层级选项; 需要宿主有静态的同名属性;
30
+
@@ -0,0 +1,20 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptionsPluginHost](./plugin-tls.tieroptionspluginhost.md) &gt; [(constructor)](./plugin-tls.tieroptionspluginhost._constructor_.md)
4
+
5
+ ## TierOptionsPluginHost.(constructor)
6
+
7
+ Constructs a new instance of the `TierOptionsPluginHost` class
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ constructor(options: Options);
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | options | Options | |
20
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptionsPluginHost](./plugin-tls.tieroptionspluginhost.md) &gt; [\_defaultOptions](./plugin-tls.tieroptionspluginhost._defaultoptions.md)
4
+
5
+ ## TierOptionsPluginHost.\_defaultOptions property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ protected _defaultOptions: TierOptions<Options>;
11
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptionsPluginHost](./plugin-tls.tieroptionspluginhost.md) &gt; [defaultOptions](./plugin-tls.tieroptionspluginhost.defaultoptions.md)
4
+
5
+ ## TierOptionsPluginHost.defaultOptions property
6
+
7
+ 全局级别的默认选项
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ static readonly defaultOptions: TierOptions<any>;
13
+ ```
@@ -0,0 +1,35 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [plugin-tls](./plugin-tls.md) &gt; [TierOptionsPluginHost](./plugin-tls.tieroptionspluginhost.md)
4
+
5
+ ## TierOptionsPluginHost class
6
+
7
+ 层级选项插件的宿主
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare class TierOptionsPluginHost<Options extends {} = any> extends PluginHost
13
+ ```
14
+ **Extends:** [PluginHost](./plugin-tls.pluginhost.md)
15
+
16
+ ## Remarks
17
+
18
+ 子类需要在构建函数中调用 `this.pluginManager.created(this);`
19
+
20
+ 之所以没写在该类中的函数中,是因为 `this.pluginManager.created(this)` 通常会在构建函数执行的最后时才调用; 如果像下面写在该类的构建函数中,然后子类通过 `super()` 来调用,这样就会导致 `this.pluginManager.created(this)` 不是在最后的执行;
21
+
22
+ ## Constructors
23
+
24
+ | Constructor | Modifiers | Description |
25
+ | --- | --- | --- |
26
+ | [(constructor)(options)](./plugin-tls.tieroptionspluginhost._constructor_.md) | | Constructs a new instance of the <code>TierOptionsPluginHost</code> class |
27
+
28
+ ## Properties
29
+
30
+ | Property | Modifiers | Type | Description |
31
+ | --- | --- | --- | --- |
32
+ | [\_defaultOptions](./plugin-tls.tieroptionspluginhost._defaultoptions.md) | <code>protected</code> | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;Options&gt; | |
33
+ | [defaultOptions](./plugin-tls.tieroptionspluginhost.defaultoptions.md) | <code>readonly</code> | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;Options&gt; | 实例级的默认选项 |
34
+ | [defaultOptions](./plugin-tls.tieroptionspluginhost.defaultoptions.md) | <p><code>static</code></p><p><code>readonly</code></p> | [TierOptions](./plugin-tls.tieroptions.md)<!-- -->&lt;any&gt; | 全局级别的默认选项 |
35
+
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "plugin-tls",
3
- "version": "0.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "plugin-tls 是插件系统相应的工具,可快速地让任何模块具备插件机制",
5
- "main": "dist/plugin-tls.umd.js",
6
- "module": "dist/plugin-tls.es.js",
7
- "types": "dist/index.d.ts",
5
+ "main": "./dist/plugin-tls.umd.js",
6
+ "module": "./dist/plugin-tls.mjs",
7
+ "exports": {
8
+ "import": "./dist/plugin-tls.mjs",
9
+ "require": "./dist/plugin-tls.umd.js"
10
+ },
11
+ "types": "./dist/index.d.ts",
8
12
  "sideEffects": false,
9
13
  "homepage": "https://github.com/GuoBinyong/plugin-tls#readme",
10
14
  "repository": {
@@ -35,24 +39,28 @@
35
39
  "doc/[^.]*"
36
40
  ],
37
41
  "devDependencies": {
38
- "@microsoft/api-documenter": "^7.17.15",
39
- "@microsoft/api-extractor": "^7.24.1",
40
- "build-tls": "^1.3.11",
41
- "dts-bundle-generator": "^6.12.0",
42
- "package-tls": "^1.2.2",
43
- "typescript": "^4.5.4",
44
- "vite": "^2.9.9"
42
+ "@microsoft/api-documenter": "^7.23.12",
43
+ "@microsoft/api-extractor": "^7.38.3",
44
+ "build-tls": "^1.3.12",
45
+ "dts-bundle-generator": "^9.0.0",
46
+ "package-tls": "^1.3.2",
47
+ "rollup-plugin-preserve-shebang": "^1.0.1",
48
+ "typescript": "^5.3.2",
49
+ "vite": "^5.0.4"
45
50
  },
46
51
  "dependencies": {
47
- "@gby/deep-copy": "^4.0.0",
48
- "type-tls": "^2.2.1"
52
+ "deepmerge-ts": "^5.1.0",
53
+ "type-tls": "^2.7.0"
49
54
  },
50
55
  "scripts": {
51
56
  "dev": "vite",
52
57
  "build": "vite build",
53
- "stage": "vite build --mode stage",
58
+ "bunch": "vite build --mode bunch",
59
+ "debug": "debug=true vite build",
60
+ "debug:bunch": "debug=true vite build --mode bunch",
54
61
  "preview": "vite preview",
55
62
  "api": "api-extractor run -c api-extractor.jsonc -l -v",
56
- "doc": "npm run api ; api-documenter markdown -i ./temp -o doc"
63
+ "doc": "api-documenter markdown -i ./temp -o doc/api",
64
+ "apidoc": "npm run api ; npm run doc"
57
65
  }
58
66
  }
@@ -1,49 +0,0 @@
1
- import { PluginHost, IPluginHost, IPluginHostConstructor } from "./PluginHost";
2
- /**
3
- * 选项插件宿主接口
4
- */
5
- export interface IOptionsPluginHost<Options, HOST> extends IPluginHost<HOST> {
6
- readonly defaultOptions: Options;
7
- }
8
- /**
9
- * 选项插件宿主的构建函数接口
10
- */
11
- export interface IOptionsPluginHostConstructor<Options, HOST> extends IPluginHostConstructor<HOST> {
12
- get defaultOptions(): Options;
13
- }
14
- export declare class OptionsPluginHost<Options = any> extends PluginHost {
15
- /**
16
- * 全局级别的默认选项
17
- */
18
- static readonly defaultOptions: any;
19
- /**
20
- * 实例级的默认选项
21
- */
22
- get defaultOptions(): Options;
23
- protected _defaultOptions: Options;
24
- }
25
- /**
26
- * 创建带有选项机制的插件宿主类
27
- * @remakers
28
- * 比 直接使用 OptionsPluginHost 提供了完善的类型推导
29
- *
30
- * @returns
31
- */
32
- export declare function createOptionsPluginHost<HOST, Options>(): {
33
- new (): {
34
- /**
35
- * 实例级的默认选项
36
- */
37
- readonly defaultOptions: Options;
38
- _defaultOptions: Options;
39
- readonly pluginManager: import("./PluginManager").PluginManager<HOST>;
40
- use<Options_1 extends unknown, Plugin_1 extends import("./PluginManager").IPlugin<HOST, Options_1>>(plugin: Plugin_1, options?: Options_1 | undefined): import("./PluginManager").PluginCreatedReturnType<Plugin_1> | undefined;
41
- };
42
- /**
43
- * 全局级别的默认选项
44
- */
45
- readonly defaultOptions: Options;
46
- readonly pluginManager: import("./PluginManager").PluginManager<HOST>;
47
- _pluginManager: import("./PluginManager").PluginManager<HOST>;
48
- use<Options_2>(plugin: import("./PluginManager").IPlugin<HOST, Options_2>, options: Options_2): any;
49
- };