@theotherwillembotha/node-red-plugincore 0.1.0 → 0.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 (134) hide show
  1. package/README.md +616 -220
  2. package/build/GenerateNodes.js +3 -6
  3. package/build/Nodes.html +3 -1504
  4. package/build/Nodes.js +5 -15
  5. package/build/Plugins.html +227 -0
  6. package/build/Plugins.js +18 -8
  7. package/build/core/NodeConstructor.d.ts +9 -16
  8. package/build/core/NodeConstructor.d.ts.map +1 -1
  9. package/build/core/NodeConstructor.js +109 -146
  10. package/build/core/NodeGenerator.d.ts.map +1 -1
  11. package/build/core/NodeGenerator.js +79 -28
  12. package/build/core/NodeManagerRuntime.d.ts +44 -0
  13. package/build/core/NodeManagerRuntime.d.ts.map +1 -0
  14. package/build/core/NodeManagerRuntime.js +140 -0
  15. package/build/core/Utils.d.ts.map +1 -1
  16. package/build/core/logger/service/LoggerService.d.ts +6 -5
  17. package/build/core/logger/service/LoggerService.d.ts.map +1 -1
  18. package/build/core/logger/service/LoggerService.js +51 -20
  19. package/build/core/logger/template/LoggerTemplate.d.ts.map +1 -1
  20. package/build/core/metrics/MetricsDecorator.d.ts +1 -2
  21. package/build/core/metrics/MetricsDecorator.d.ts.map +1 -1
  22. package/build/core/metrics/MetricsDecorator.js +89 -116
  23. package/build/core/metrics/node/CounterMetricConfigNode.d.ts.map +1 -1
  24. package/build/core/metrics/node/CounterMetricConfigNode.js +4 -5
  25. package/build/core/metrics/node/GaugeMetricConfigNode.d.ts.map +1 -1
  26. package/build/core/metrics/node/GaugeMetricConfigNode.js +5 -6
  27. package/build/core/metrics/node/MetricsConfigNode.d.ts +19 -9
  28. package/build/core/metrics/node/MetricsConfigNode.d.ts.map +1 -1
  29. package/build/core/metrics/node/MetricsConfigNode.js +14 -45
  30. package/build/core/metrics/node/TimerMetricConfigNode.d.ts.map +1 -1
  31. package/build/core/metrics/node/TimerMetricConfigNode.js +11 -17
  32. package/build/core/metrics/service/MetricsService.d.ts +110 -114
  33. package/build/core/metrics/service/MetricsService.d.ts.map +1 -1
  34. package/build/core/metrics/service/MetricsService.js +122 -339
  35. package/build/core/metrics/template/CounterMetricTemplate.d.ts.map +1 -1
  36. package/build/core/metrics/template/GaugeMetricTemplate.d.ts.map +1 -1
  37. package/build/core/metrics/template/MetricsTemplate.d.ts.map +1 -1
  38. package/build/core/metrics/template/MetricsTemplate.js +1 -2
  39. package/build/core/metrics/template/TimerMetricTemplate.d.ts.map +1 -1
  40. package/build/core/other/node/DelegatedConfigReferenceNode.d.ts +1 -1
  41. package/build/core/other/node/DelegatedConfigReferenceNode.d.ts.map +1 -1
  42. package/build/core/other/node/DelegatedConfigReferenceNode.js +1 -1
  43. package/build/core/other/service/InputService.d.ts.map +1 -1
  44. package/build/core/other/service/SettingsService.d.ts +1 -2
  45. package/build/core/other/service/SettingsService.d.ts.map +1 -1
  46. package/build/core/other/service/SettingsService.js +19 -5
  47. package/build/core/other/template/BasicTemplate.d.ts.map +1 -1
  48. package/build/core/other/template/SettingsTemplate.d.ts.map +1 -1
  49. package/build/core/state/node/InternalStateConfigNode.d.ts +16 -0
  50. package/build/core/state/node/InternalStateConfigNode.d.ts.map +1 -0
  51. package/build/core/state/node/InternalStateConfigNode.js +89 -0
  52. package/build/core/state/node/StateConfigNode.d.ts +24 -0
  53. package/build/core/state/node/StateConfigNode.d.ts.map +1 -0
  54. package/build/core/state/node/StateConfigNode.js +22 -0
  55. package/build/core/state/service/StateService.d.ts +34 -0
  56. package/build/core/state/service/StateService.d.ts.map +1 -0
  57. package/build/core/state/service/StateService.js +201 -0
  58. package/build/core/state/template/StateTemplate.d.ts +8 -0
  59. package/build/core/state/template/StateTemplate.d.ts.map +1 -0
  60. package/build/core/state/template/StateTemplate.js +11 -0
  61. package/build/core/tagging/ServiceDescriptionDecorator.d.ts +10 -0
  62. package/build/core/tagging/ServiceDescriptionDecorator.d.ts.map +1 -0
  63. package/build/core/tagging/ServiceDescriptionDecorator.js +10 -0
  64. package/build/core/tagging/service/NodeTypeService.d.ts +1 -2
  65. package/build/core/tagging/service/NodeTypeService.d.ts.map +1 -1
  66. package/build/core/tagging/service/NodeTypeService.js +19 -5
  67. package/build/core/ui/template/ScriptEditorTemplate.d.ts.map +1 -1
  68. package/build/core/ui/template/UIHelperTemplate.d.ts.map +1 -1
  69. package/build/core/webhook/node/WebhookServerConfigNode.d.ts.map +1 -1
  70. package/build/core/webhook/service/ReverseProxyTypeService.d.ts.map +1 -1
  71. package/build/core/webhook/service/WebhookServerService.d.ts +3 -4
  72. package/build/core/webhook/service/WebhookServerService.d.ts.map +1 -1
  73. package/build/core/webhook/service/WebhookServerService.js +48 -18
  74. package/build/core/webhook/template/WebhookTemplate.d.ts.map +1 -1
  75. package/build/index.d.ts +5 -2
  76. package/build/index.d.ts.map +1 -1
  77. package/build/index.js +6 -2
  78. package/build/runtime/NodeManagerRuntime.js +140 -0
  79. package/documentation/CounterMetricConfigNode.png +0 -0
  80. package/documentation/GaugeMetricConfigNode.png +0 -0
  81. package/documentation/LoggerTemplate.png +0 -0
  82. package/documentation/MetricsTemplate.png +0 -0
  83. package/documentation/StateTemplate.png +0 -0
  84. package/documentation/TimerMetricConfigNode_histogram.png +0 -0
  85. package/documentation/TimerMetricConfigNode_summary.png +0 -0
  86. package/documentation/WebhookServerConfigNode.png +0 -0
  87. package/documentation/WebhookTemplate.png +0 -0
  88. package/package.json +4 -10
  89. package/src/GenerateNodes.ts +7 -11
  90. package/src/core/NodeConstructor.ts +130 -186
  91. package/src/core/NodeGenerator.ts +88 -33
  92. package/src/core/NodeManagerRuntime.ts +179 -0
  93. package/src/core/logger/service/LoggerService.ts +39 -26
  94. package/src/core/logger/template/LoggerTemplate.html +11 -6
  95. package/src/core/metrics/MetricsDecorator.ts +140 -168
  96. package/src/core/metrics/node/CounterMetricConfigNode.ts +20 -20
  97. package/src/core/metrics/node/GaugeMetricConfigNode.ts +24 -25
  98. package/src/core/metrics/node/MetricsConfigNode.ts +29 -48
  99. package/src/core/metrics/node/TimerMetricConfigNode.ts +50 -59
  100. package/src/core/metrics/service/MetricsService.ts +214 -489
  101. package/src/core/metrics/template/CounterMetricTemplate.html +0 -1
  102. package/src/core/metrics/template/GaugeMetricTemplate.html +1 -1
  103. package/src/core/metrics/template/MetricsTemplate.html +132 -13
  104. package/src/core/metrics/template/MetricsTemplate.ts +3 -4
  105. package/src/core/other/node/DelegatedConfigReferenceNode.ts +1 -1
  106. package/src/core/other/service/SettingsService.ts +6 -10
  107. package/src/core/other/template/BasicTemplate.html +1 -1
  108. package/src/core/state/node/InternalStateConfigNode.html +77 -0
  109. package/src/core/state/node/InternalStateConfigNode.ts +102 -0
  110. package/src/core/state/node/StateConfigNode.ts +29 -0
  111. package/src/core/state/service/StateService.ts +180 -0
  112. package/src/core/state/template/StateTemplate.html +244 -0
  113. package/src/core/state/template/StateTemplate.ts +17 -0
  114. package/src/core/tagging/ServiceDescriptionDecorator.ts +23 -0
  115. package/src/core/tagging/service/NodeTypeService.ts +6 -11
  116. package/src/core/ui/template/UIHelperTemplate.html +41 -26
  117. package/src/core/webhook/service/WebhookServerService.ts +39 -23
  118. package/src/core/webhook/template/WebhookTemplate.html +28 -35
  119. package/src/index.ts +7 -2
  120. package/build/core/logger/node/ConsoleLoggerConfigNode.d.ts +0 -20
  121. package/build/core/logger/node/ConsoleLoggerConfigNode.d.ts.map +0 -1
  122. package/build/core/logger/node/ConsoleLoggerConfigNode.js +0 -62
  123. package/build/core/logger/node/RestLoggerConfigNode.d.ts +0 -40
  124. package/build/core/logger/node/RestLoggerConfigNode.d.ts.map +0 -1
  125. package/build/core/logger/node/RestLoggerConfigNode.js +0 -128
  126. package/documentation/ConsoleLoggerConfigNode.png +0 -0
  127. package/documentation/MetricsConfigNode.png +0 -0
  128. package/documentation/RestLoggerConfigNode.png +0 -0
  129. package/documentation/TimerMetricConfigNode.png +0 -0
  130. package/documentation/WebhookNode.png +0 -0
  131. package/src/core/logger/node/ConsoleLoggerConfigNode.html +0 -90
  132. package/src/core/logger/node/ConsoleLoggerConfigNode.ts +0 -71
  133. package/src/core/logger/node/RestLoggerConfigNode.html +0 -183
  134. package/src/core/logger/node/RestLoggerConfigNode.ts +0 -170
@@ -1,183 +0,0 @@
1
-
2
- <script type="text/javascript" template-section="onCompose">
3
- node
4
- .addDefault("name", {value:"Logger Example", required:true})
5
- .addDefault("template", {value:`message:{{msg}}`, required:true})
6
- .addDefault("level", {value:"info", required:true})
7
-
8
- // platform rest:
9
- .addDefault("rest_url", {})
10
- .addDefault("rest_ignoresslerror", {})
11
- .addDefault("rest_auth_type", {})
12
- .addDefault("rest_auth_basic_username", {})
13
- .addDefault("rest_auth_basic_password", {})
14
- .addDefault("rest_auth_apikey_mechanism", {})
15
- .addDefault("rest_auth_apikey_name", {})
16
- .addDefault("rest_auth_apikey_value", {})
17
-
18
- .setPaletteLabel("Rest Logger Config Node")
19
- .setLabel(function() {return this.name })
20
-
21
- </script>
22
-
23
- <script type="text/javascript" template-section="onIncludeEditPrepare">
24
- {
25
- let node = this;
26
-
27
- let showSelectedRestAuthMethod = (value) => {
28
- $("#LoggerConfig")
29
- .find(".platform.platform-rest").first()
30
- .find(".platform-rest-auth")
31
- .each((i, t) => {
32
- t = $(t);
33
- if(t.hasClass(`auth-${value}`)){ t.show(); }
34
- else { t.hide(); }
35
- });
36
- }
37
-
38
- let levelSelection = $("#node-config-input-level");
39
- levelSelection.typedInput({type:"level", types:[{
40
- value: "level",
41
- options: [
42
- { value: "DEBUG", label: "debug"},
43
- { value: "INFO", label: "info"},
44
- { value: "WARNING", label: "warning"},
45
- { value: "ERROR", label: "error"},
46
- ]
47
- }]});
48
-
49
- let platformRestAuthType = $("#node-config-input-rest_auth_type");
50
- platformRestAuthType.typedInput({type:"authtype", types:[{
51
- value: "authtype",
52
- options: [
53
- { value: "none", label: "None"},
54
- { value: "basic", label: "Basic"},
55
- { value: "apikey", label: "ApiKey"}
56
- ]
57
- }]});
58
- platformRestAuthType.on("change", () => showSelectedRestAuthMethod(platformRestAuthType.val()));
59
-
60
- let apiKeyMechanism = $("#node-config-input-rest_auth_apikey_mechanism");
61
- apiKeyMechanism.typedInput({type:"apikeymechansim", types:[{
62
- value: "apikeymechansim",
63
- options: [
64
- { value: "header", label: "Header"},
65
- { value: "queryparam", label: "Query Param"},
66
- { value: "matrixparam", label: "Matrix Param"}
67
- ]
68
- }]});
69
-
70
- this.editor = RED.editor.createEditor({
71
- id: 'node-config-input-templateEditor',
72
- mode: 'ace/mode/handlebars',
73
- value: this.template
74
- });
75
- }
76
- </script>
77
-
78
- <script type="text/javascript" template-section="onIncludeEditSave">
79
- {
80
- let node = this;
81
- this.template = this.editor.getValue();
82
- this.editor.destroy();
83
- delete this.editor;
84
- }
85
-
86
- </script>
87
-
88
- <script type="text/html" template-section="onIncludeEditForm">
89
- <div id="LoggerConfig">
90
- <div class="form-row">
91
- <label class="towb_editorlabel" for="node-config-input-name"><i class="fa fa-font"></i> Name</label>
92
- <input type="text" id="node-config-input-name" />
93
- </div>
94
-
95
- <div class="form-row">
96
- <label class="towb_editorlabel" for="node-config-input-level"><i class="fa fa-signal"></i> Level</label>
97
- <input type="text" id="node-config-input-level" />
98
- </div>
99
-
100
- <div class="platform platform-rest">
101
- <div class="form-row">
102
- <label class="towb_editorlabel" for="node-config-input-rest_url"><i class="fa fa-link"></i> URL</label>
103
- <input class="platform-rest-input required" type="text" id="node-config-input-rest_url" />
104
- </div>
105
- <div class="form-row">
106
- <label class="towb_editorlabel"></label>
107
- <input type="checkbox" id="node-config-input-rest_ignoresslerror" style="width:20px; margin-right:5px;" />
108
- <label style="width:auto" for="node-config-input-rest_ignoresslerror"><span>Ignore Invalid SSL certificates</span></label>
109
- </div>
110
- <div class="form-row">
111
- <label class="towb_editorlabel" for="node-config-input-rest_auth_type"><i class="fa fa-lock"></i> Authentication</label>
112
- <input class="platform-rest-input required" type="text" id="node-config-input-rest_auth_type" />
113
- </div>
114
- <div class="form-row platform-rest-auth auth-basic">
115
- <label class="towb_editorlabel" for="node-config-input-rest_auth_basic_username"><i class="fa fa-user"></i> Username</label>
116
- <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_basic_username" />
117
- </div>
118
- <div class="form-row platform-rest-auth auth-basic">
119
- <label class="towb_editorlabel" for="node-config-input-rest_auth_basic_password"><i class="fa fa-key"></i> Password</label>
120
- <input class="platform-rest-input" type="password" id="node-config-input-rest_auth_basic_password" />
121
- </div>
122
- <div class="form-row platform-rest-auth auth-apikey">
123
- <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_mechanism"><i class="fa fa-exchange"></i> Mechanism</label>
124
- <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_mechanism" />
125
- </div>
126
- <div class="form-row platform-rest-auth auth-apikey">
127
- <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_name"><i class="fa fa-id-badge"></i> APIKey name</label>
128
- <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_name" />
129
- </div>
130
- <div class="form-row platform-rest-auth auth-apikey">
131
- <label class="towb_editorlabel" for="node-config-input-rest_auth_apikey_value"><i class="fa fa-lock"></i> APIKey value</label>
132
- <input class="platform-rest-input" type="text" id="node-config-input-rest_auth_apikey_value" />
133
- </div>
134
- </div>
135
-
136
- <div class="form-row">
137
- <label class="towb_editorlabel" for="node-config-input-templateEditor"><i class="fa fa-code"></i> Template</label>
138
- <div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-config-input-templateEditor"></div>
139
- </div>
140
- </div>
141
- </script>
142
-
143
- <script type="text/markdown" template-section="onIncludeDocumentation">
144
- Posts log messages to an HTTP or HTTPS endpoint as a JSON payload.
145
-
146
- ### Properties
147
- : *name* (string) : A descriptive name for this logger configuration.
148
- : *level* (level) : The minimum log level. Messages below this threshold are suppressed. Options: DEBUG, INFO, WARNING, ERROR.
149
- : *url* (url) : The endpoint that log messages will be POSTed to.
150
- : *ignore SSL errors* (boolean) : When enabled, invalid SSL certificates are accepted.
151
- : *authentication* (select) : The authentication strategy applied to each request. Options: None, Basic, ApiKey.
152
- : *template* (mustache) : A Mustache/Handlebars template that formats the log message body.
153
-
154
- ### Authentication
155
- #### Basic
156
- Authenticates using the HTTP `Authorization` header (RFC 7617).
157
- : *username* (string) : The username credential.
158
- : *password* (string) : The password credential.
159
-
160
- #### ApiKey
161
- Authenticates by injecting a key/value pair into the request.
162
- : *mechanism* (select) : Where the key is injected — Header, Query Param, or Matrix Param.
163
- : *APIKey name* (string) : The name of the key (e.g. `x-api-key`).
164
- : *APIKey value* (string) : The value of the key.
165
-
166
- ### Mustache Templating
167
- Mustache/Handlebars templates build the message string POSTed to the endpoint.
168
-
169
- #### Provided Properties
170
- : *msg* (object) : The Node-RED message object passed through the node.
171
- : *currentTime* (string) : The current time in ISO 8601 format.
172
-
173
- #### Helpers
174
- : *json* (helper) : Serialises an object to a JSON string using `JSON.stringify`.
175
-
176
- #### Examples
177
- - `{{{json msg}}}` — serialises the full message object as JSON.
178
-
179
- #### References
180
- - [Mustache — Wikipedia](https://en.wikipedia.org/wiki/Mustache_(template_system))
181
- - [Mustache — Playground](https://jgonggrijp.gitlab.io/wontache/playground.html)
182
- </script>
183
-
@@ -1,170 +0,0 @@
1
-
2
- import { Node } from "node-red";
3
- import {ConfigNodeConfig } from "../../NodeConstructor"
4
- import { LoggerService, LoggerConfigNode, AbstractLogger, BaseLoggerConfig, TagMap, Log } from "../service/LoggerService"
5
- import { SourceUtility } from "../../NodeGenerator";
6
- import { ApiKeyMechanismType, Level, RestAuthType } from "../service/LoggerService";
7
- import { NodeDescription } from "../../tagging/NodeDescriptionDecorator";
8
- import { LoggerTemplateConfig } from "../template/LoggerTemplate";
9
- import { parseURL, URLRecord } from "whatwg-url";
10
- import { HttpTransportOptions } from "winston/lib/winston/transports";
11
- import { createLogger, format, transports, Logger } from "winston";
12
-
13
- interface RestLoggerConfigNodeConfig extends ConfigNodeConfig {
14
-
15
- id: string;
16
- level:Level;
17
- template:string;
18
-
19
- rest_url: string;
20
- rest_ignoresslerror:boolean;
21
- rest_auth_type: RestAuthType;
22
- rest_auth_basic_username:string;
23
- rest_auth_basic_password:string;
24
- rest_auth_apikey_mechanism:ApiKeyMechanismType;
25
- rest_auth_apikey_name:string;
26
- rest_auth_apikey_value:string;
27
- }
28
-
29
- @NodeDescription({
30
- id:"RestLoggerConfigNode",
31
- name:"Rest Endpoint Logger",
32
- group:"config",
33
- sourceFile:SourceUtility.getSourcePath("/build/", "/src/") + "RestLoggerConfigNode.html",
34
- package: "@theotherwillembotha/node-red-plugincore",
35
- dependencies:[ LoggerService ],
36
- tags: [ "LoggerType" ]
37
- })
38
- export class RestLoggerConfigNode extends LoggerConfigNode<RestLoggerConfigNodeConfig, RestLogger> {
39
-
40
- private _logger!: RestLogger;
41
-
42
- constructor(node: Node, config: RestLoggerConfigNodeConfig){
43
- super(node, config);
44
- let _this = this;
45
-
46
- // instantiate the logger.
47
- let loggerConfig:RestLoggerConfig = {
48
- id:this.id(),
49
- type:"REST",
50
- level:config.level,
51
- template:config.template,
52
-
53
- // additional properties.
54
- url: config.rest_url,
55
- ignoresslerror:config.rest_ignoresslerror,
56
- auth_type: config.rest_auth_type,
57
- auth_basic_username:config.rest_auth_basic_username,
58
- auth_basic_password:config.rest_auth_basic_password,
59
- auth_apikey_mechanism:config.rest_auth_apikey_mechanism,
60
- auth_apikey_name:config.rest_auth_apikey_name,
61
- auth_apikey_value:config.rest_auth_apikey_value,
62
- };
63
-
64
- this._logger = new RestLogger(loggerConfig);
65
- }
66
-
67
- protected logger():RestLogger{
68
- return this._logger;
69
- }
70
- }
71
-
72
- class RestLogger extends AbstractLogger<RestLoggerConfig> {
73
-
74
- private winston:Logger;
75
-
76
- constructor(config:RestLoggerConfig){
77
- super(config);
78
-
79
- // get the url.
80
- let hosturl:URLRecord|null = parseURL(config.url);
81
- if(!hosturl){
82
- throw Error("could not parse url: " + config.url);
83
- }
84
-
85
- // get the options
86
- let httpOptions:{[key:string]:any} = {}
87
-
88
- // get the params.
89
- let httpParams:HttpTransportOptions = {
90
- host:hosturl.host?.toString(),
91
- path:"/" + (hosturl.path ? [...hosturl.path].join("/") : "") + (hosturl.query ? ("?" + hosturl.query) : ""),
92
- port:(hosturl.port) ? hosturl.port : undefined,
93
- ssl:hosturl.scheme.toLowerCase() === "https",
94
- headers: {},
95
- };
96
- (httpParams as any).options = httpOptions;
97
-
98
- // add the ignore ssl error flag if need be.
99
- if(config.ignoresslerror){
100
- httpOptions.rejectUnauthorized = false;
101
- }
102
-
103
- // configure "none" authentication.
104
- if(config.auth_type === RestAuthType.none){}
105
-
106
-
107
- // configure "basic" authentication.
108
- if(config.auth_type === RestAuthType.basic){
109
- httpParams.auth = {
110
- username: config.auth_basic_username,
111
- password: config.auth_basic_password
112
- }
113
- }
114
-
115
- // configure "apikey" authentication.
116
- if(config.auth_type === RestAuthType.apikey){
117
- if(config.auth_apikey_mechanism === ApiKeyMechanismType.header) {
118
- (httpParams.headers as any)[config.auth_apikey_name] = config.auth_apikey_value;
119
- }
120
- if(config.auth_apikey_mechanism === ApiKeyMechanismType.matrixparam) {
121
- httpParams.path = httpParams.path?.replace(`:${config.auth_apikey_name}`, config.auth_apikey_value);
122
- }
123
- if(config.auth_apikey_mechanism === ApiKeyMechanismType.queryparam) {
124
- httpParams.path = httpParams.path + (httpParams.path?.includes("?") ? "&" : "?") + config.auth_apikey_name + "=" + config.auth_apikey_value;
125
- }
126
- };
127
-
128
- this.winston = createLogger({
129
- level: config.level.toString().toLowerCase(),
130
- format: format.json(),
131
- defaultMeta: {},
132
- transports: [
133
- new transports.Http(httpParams),
134
- ],
135
- });
136
- }
137
-
138
- protected createLogger(config: LoggerTemplateConfig): Log {
139
- return new RestAppender(config, this.winston);
140
- }
141
- }
142
-
143
- class RestAppender extends Log {
144
- private winston: Logger;
145
-
146
- constructor(config:LoggerTemplateConfig, winston:Logger){
147
- super(config);
148
- this.winston = winston;
149
- }
150
-
151
- protected writeToLog(level:string, message: string, tags: { [key: string]: string | boolean | number; }): void {
152
- this.winston.log({
153
- level:level,
154
- message:message,
155
- labels:tags
156
- });
157
- }
158
-
159
- }
160
-
161
- interface RestLoggerConfig extends BaseLoggerConfig {
162
- url: string;
163
- ignoresslerror:boolean;
164
- auth_type: RestAuthType;
165
- auth_basic_username:string;
166
- auth_basic_password:string;
167
- auth_apikey_mechanism:ApiKeyMechanismType;
168
- auth_apikey_name:string;
169
- auth_apikey_value:string;
170
- }