@rapidrest/core 1.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/LICENSE +23 -0
- package/README.rst +37 -0
- package/dist/lib/AlertUtils.js +239 -0
- package/dist/lib/AlertUtils.js.map +1 -0
- package/dist/lib/ApiError.js +34 -0
- package/dist/lib/ApiError.js.map +1 -0
- package/dist/lib/ClassLoader.js +159 -0
- package/dist/lib/ClassLoader.js.map +1 -0
- package/dist/lib/FileUtils.js +190 -0
- package/dist/lib/FileUtils.js.map +1 -0
- package/dist/lib/JWTUtils.js +111 -0
- package/dist/lib/JWTUtils.js.map +1 -0
- package/dist/lib/Logger.js +28 -0
- package/dist/lib/Logger.js.map +1 -0
- package/dist/lib/MessagingUtils.js +218 -0
- package/dist/lib/MessagingUtils.js.map +1 -0
- package/dist/lib/NotificationsUtils.js +52 -0
- package/dist/lib/NotificationsUtils.js.map +1 -0
- package/dist/lib/OASUtils.js +207 -0
- package/dist/lib/OASUtils.js.map +1 -0
- package/dist/lib/ObjectFactory.js +302 -0
- package/dist/lib/ObjectFactory.js.map +1 -0
- package/dist/lib/ObjectUtils.js +49 -0
- package/dist/lib/ObjectUtils.js.map +1 -0
- package/dist/lib/StringUtils.js +104 -0
- package/dist/lib/StringUtils.js.map +1 -0
- package/dist/lib/TelemetryUtils.js +159 -0
- package/dist/lib/TelemetryUtils.js.map +1 -0
- package/dist/lib/UserUtils.js +138 -0
- package/dist/lib/UserUtils.js.map +1 -0
- package/dist/lib/ValidationUtils.js +130 -0
- package/dist/lib/ValidationUtils.js.map +1 -0
- package/dist/lib/decorators/ObjectDecorators.js +95 -0
- package/dist/lib/decorators/ObjectDecorators.js.map +1 -0
- package/dist/lib/decorators/index.js +2 -0
- package/dist/lib/decorators/index.js.map +1 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/sleep.js +15 -0
- package/dist/lib/sleep.js.map +1 -0
- package/dist/lib/threads/ThreadLogger.js +43 -0
- package/dist/lib/threads/ThreadLogger.js.map +1 -0
- package/dist/lib/threads/ThreadPool.js +270 -0
- package/dist/lib/threads/ThreadPool.js.map +1 -0
- package/dist/lib/threads/ThreadWorker.js +25 -0
- package/dist/lib/threads/ThreadWorker.js.map +1 -0
- package/dist/lib/threads/ThreadWorkerEntry.js +77 -0
- package/dist/lib/threads/ThreadWorkerEntry.js.map +1 -0
- package/dist/lib/threads/index.js +3 -0
- package/dist/lib/threads/index.js.map +1 -0
- package/dist/types/AlertUtils.d.ts +132 -0
- package/dist/types/ApiError.d.ts +13 -0
- package/dist/types/ClassLoader.d.ts +87 -0
- package/dist/types/FileUtils.d.ts +46 -0
- package/dist/types/JWTUtils.d.ts +139 -0
- package/dist/types/Logger.d.ts +7 -0
- package/dist/types/MessagingUtils.d.ts +77 -0
- package/dist/types/NotificationsUtils.d.ts +32 -0
- package/dist/types/OASUtils.d.ts +54 -0
- package/dist/types/ObjectFactory.d.ts +77 -0
- package/dist/types/ObjectUtils.d.ts +17 -0
- package/dist/types/StringUtils.d.ts +52 -0
- package/dist/types/TelemetryUtils.d.ts +84 -0
- package/dist/types/UserUtils.d.ts +61 -0
- package/dist/types/ValidationUtils.d.ts +66 -0
- package/dist/types/decorators/ObjectDecorators.d.ts +55 -0
- package/dist/types/decorators/index.d.ts +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/sleep.d.ts +5 -0
- package/dist/types/threads/ThreadLogger.d.ts +15 -0
- package/dist/types/threads/ThreadPool.d.ts +115 -0
- package/dist/types/threads/ThreadWorker.d.ts +41 -0
- package/dist/types/threads/ThreadWorkerEntry.d.ts +1 -0
- package/dist/types/threads/index.d.ts +2 -0
- package/docs/Makefile +20 -0
- package/docs/conf.py +58 -0
- package/docs/index.rst +17 -0
- package/docs/make.bat +35 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/README.md +21 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +47 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +33 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +45 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +39 -0
- package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +31 -0
- package/docs/reference/README.md +73 -0
- package/docs/reference/classes/AlertUtils.md +158 -0
- package/docs/reference/classes/ApiError.md +263 -0
- package/docs/reference/classes/ClassLoader.md +224 -0
- package/docs/reference/classes/Event.md +109 -0
- package/docs/reference/classes/EventUtils.md +123 -0
- package/docs/reference/classes/FileUtils.md +193 -0
- package/docs/reference/classes/JWTUtils.md +91 -0
- package/docs/reference/classes/MessagingUtils.md +145 -0
- package/docs/reference/classes/OASUtils.md +213 -0
- package/docs/reference/classes/ObjectFactory.md +274 -0
- package/docs/reference/classes/ObjectUtils.md +60 -0
- package/docs/reference/classes/StringUtils.md +169 -0
- package/docs/reference/classes/ThreadPool.md +249 -0
- package/docs/reference/classes/ThreadWorker.md +91 -0
- package/docs/reference/classes/UserUtils.md +239 -0
- package/docs/reference/classes/ValidationUtils.md +294 -0
- package/docs/reference/enumerations/AlertPriority.md +61 -0
- package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +21 -0
- package/docs/reference/enumerations/WorkerMessageType.md +43 -0
- package/docs/reference/functions/sleep.md +25 -0
- package/docs/reference/interfaces/Alert.md +101 -0
- package/docs/reference/interfaces/AlertAttachment.md +51 -0
- package/docs/reference/interfaces/AlertClose.md +31 -0
- package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +42 -0
- package/docs/reference/interfaces/AlertUtilsOptions.md +41 -0
- package/docs/reference/interfaces/InstanceOptions.md +35 -0
- package/docs/reference/interfaces/JWTPayload.md +143 -0
- package/docs/reference/interfaces/JWTUser.md +55 -0
- package/docs/reference/interfaces/JWTUtilsConfig.md +45 -0
- package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +68 -0
- package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +40 -0
- package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +78 -0
- package/docs/reference/interfaces/NewEvent.md +25 -0
- package/docs/reference/interfaces/OriginSettings.md +25 -0
- package/docs/reference/interfaces/SlackConfig.md +33 -0
- package/docs/reference/interfaces/SmtpAuth.md +25 -0
- package/docs/reference/interfaces/SmtpConfig.md +41 -0
- package/docs/reference/interfaces/Template.md +81 -0
- package/docs/reference/interfaces/TemplateMapBase.md +13 -0
- package/docs/reference/interfaces/TwilioConfig.md +33 -0
- package/docs/reference/interfaces/WorkerMessage.md +31 -0
- package/docs/reference/interfaces/WorkerOptions.md +61 -0
- package/docs/reference/type-aliases/BooleanFunc.md +23 -0
- package/docs/reference/type-aliases/TemplateMap.md +17 -0
- package/docs/reference/type-aliases/WorkerCallback.md +31 -0
- package/docs/reference/variables/Logger.md +21 -0
- package/package.json +96 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / JWTUtilsPayloadPasswordOptions
|
|
6
|
+
|
|
7
|
+
# Interface: JWTUtilsPayloadPasswordOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/JWTUtils.ts:83
|
|
10
|
+
|
|
11
|
+
Describes the configuration options to be used with the `JWTUtilsConfig.payload` property when performing password
|
|
12
|
+
based encryption.
|
|
13
|
+
|
|
14
|
+
## Author
|
|
15
|
+
|
|
16
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
17
|
+
|
|
18
|
+
## Extends
|
|
19
|
+
|
|
20
|
+
- [`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md)
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
### algorithm
|
|
25
|
+
|
|
26
|
+
> **algorithm**: `string`
|
|
27
|
+
|
|
28
|
+
Defined in: src/JWTUtils.ts:87
|
|
29
|
+
|
|
30
|
+
The cryptographic cipher algorithm to use during encryption/decryption of a JWT token payload.
|
|
31
|
+
|
|
32
|
+
***
|
|
33
|
+
|
|
34
|
+
### compress?
|
|
35
|
+
|
|
36
|
+
> `optional` **compress**: [`ZLIB`](../enumerations/JWTUtilsCompressionMethods.md#zlib)
|
|
37
|
+
|
|
38
|
+
Defined in: src/JWTUtils.ts:69
|
|
39
|
+
|
|
40
|
+
Set the method to use for compressing the payload profile, otherwise set to `null` for no compression.
|
|
41
|
+
|
|
42
|
+
#### Inherited from
|
|
43
|
+
|
|
44
|
+
[`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md).[`compress`](JWTUtilsPayloadOptions.md#compress)
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### encrypt?
|
|
49
|
+
|
|
50
|
+
> `optional` **encrypt**: `boolean`
|
|
51
|
+
|
|
52
|
+
Defined in: src/JWTUtils.ts:74
|
|
53
|
+
|
|
54
|
+
Set to `true` to indicate that the JWT token payload is encrypted, otherwise set to `false`.
|
|
55
|
+
|
|
56
|
+
#### Inherited from
|
|
57
|
+
|
|
58
|
+
[`JWTUtilsPayloadOptions`](JWTUtilsPayloadOptions.md).[`encrypt`](JWTUtilsPayloadOptions.md#encrypt)
|
|
59
|
+
|
|
60
|
+
***
|
|
61
|
+
|
|
62
|
+
### iv
|
|
63
|
+
|
|
64
|
+
> **iv**: `Buffer`
|
|
65
|
+
|
|
66
|
+
Defined in: src/JWTUtils.ts:92
|
|
67
|
+
|
|
68
|
+
The initialization vector to use during encryption and decryption.
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### password
|
|
73
|
+
|
|
74
|
+
> **password**: `string`
|
|
75
|
+
|
|
76
|
+
Defined in: src/JWTUtils.ts:97
|
|
77
|
+
|
|
78
|
+
The password to use when encrypting or decrypting JWT token payloads.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / NewEvent
|
|
6
|
+
|
|
7
|
+
# Interface: NewEvent
|
|
8
|
+
|
|
9
|
+
Defined in: src/TelemetryUtils.ts:13
|
|
10
|
+
|
|
11
|
+
Describes the required fields when creating a new telemetry event.
|
|
12
|
+
|
|
13
|
+
## Author
|
|
14
|
+
|
|
15
|
+
Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### type
|
|
20
|
+
|
|
21
|
+
> **type**: `string`
|
|
22
|
+
|
|
23
|
+
Defined in: src/TelemetryUtils.ts:15
|
|
24
|
+
|
|
25
|
+
The type of event begin recorded.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / OriginSettings
|
|
6
|
+
|
|
7
|
+
# Interface: OriginSettings
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:7
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### email
|
|
14
|
+
|
|
15
|
+
> **email**: `string`
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:8
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### sms
|
|
22
|
+
|
|
23
|
+
> **sms**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:9
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / SlackConfig
|
|
6
|
+
|
|
7
|
+
# Interface: SlackConfig
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:41
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### name
|
|
14
|
+
|
|
15
|
+
> **name**: `string`
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:42
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### signingSecret
|
|
22
|
+
|
|
23
|
+
> **signingSecret**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:44
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### token
|
|
30
|
+
|
|
31
|
+
> **token**: `string`
|
|
32
|
+
|
|
33
|
+
Defined in: src/MessagingUtils.ts:43
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / SmtpAuth
|
|
6
|
+
|
|
7
|
+
# Interface: SmtpAuth
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:47
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### pass
|
|
14
|
+
|
|
15
|
+
> **pass**: `string`
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:49
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### user
|
|
22
|
+
|
|
23
|
+
> **user**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:48
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / SmtpConfig
|
|
6
|
+
|
|
7
|
+
# Interface: SmtpConfig
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:52
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### auth?
|
|
14
|
+
|
|
15
|
+
> `optional` **auth**: [`SmtpAuth`](SmtpAuth.md)
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:56
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### host
|
|
22
|
+
|
|
23
|
+
> **host**: `string`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:53
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### port
|
|
30
|
+
|
|
31
|
+
> **port**: `number`
|
|
32
|
+
|
|
33
|
+
Defined in: src/MessagingUtils.ts:54
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### secure
|
|
38
|
+
|
|
39
|
+
> **secure**: `boolean`
|
|
40
|
+
|
|
41
|
+
Defined in: src/MessagingUtils.ts:55
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / Template
|
|
6
|
+
|
|
7
|
+
# Interface: Template
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:20
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### email\_options?
|
|
14
|
+
|
|
15
|
+
> `optional` **email\_options**: `any`
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:24
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### enabled
|
|
22
|
+
|
|
23
|
+
> **enabled**: `boolean`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:22
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### html?
|
|
30
|
+
|
|
31
|
+
> `optional` **html**: `string`
|
|
32
|
+
|
|
33
|
+
Defined in: src/MessagingUtils.ts:28
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### slack\_channel?
|
|
38
|
+
|
|
39
|
+
> `optional` **slack\_channel**: `string`
|
|
40
|
+
|
|
41
|
+
Defined in: src/MessagingUtils.ts:30
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### slack\_text?
|
|
46
|
+
|
|
47
|
+
> `optional` **slack\_text**: `string`
|
|
48
|
+
|
|
49
|
+
Defined in: src/MessagingUtils.ts:32
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### sms?
|
|
54
|
+
|
|
55
|
+
> `optional` **sms**: `string`
|
|
56
|
+
|
|
57
|
+
Defined in: src/MessagingUtils.ts:34
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### sms\_options?
|
|
62
|
+
|
|
63
|
+
> `optional` **sms\_options**: `any`
|
|
64
|
+
|
|
65
|
+
Defined in: src/MessagingUtils.ts:36
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### subject?
|
|
70
|
+
|
|
71
|
+
> `optional` **subject**: `string`
|
|
72
|
+
|
|
73
|
+
Defined in: src/MessagingUtils.ts:26
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### text?
|
|
78
|
+
|
|
79
|
+
> `optional` **text**: `string`
|
|
80
|
+
|
|
81
|
+
Defined in: src/MessagingUtils.ts:38
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / TwilioConfig
|
|
6
|
+
|
|
7
|
+
# Interface: TwilioConfig
|
|
8
|
+
|
|
9
|
+
Defined in: src/MessagingUtils.ts:59
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
### accountSid
|
|
14
|
+
|
|
15
|
+
> **accountSid**: `string`
|
|
16
|
+
|
|
17
|
+
Defined in: src/MessagingUtils.ts:60
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### options?
|
|
22
|
+
|
|
23
|
+
> `optional` **options**: `any`
|
|
24
|
+
|
|
25
|
+
Defined in: src/MessagingUtils.ts:62
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### token
|
|
30
|
+
|
|
31
|
+
> **token**: `string`
|
|
32
|
+
|
|
33
|
+
Defined in: src/MessagingUtils.ts:61
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / WorkerMessage
|
|
6
|
+
|
|
7
|
+
# Interface: WorkerMessage
|
|
8
|
+
|
|
9
|
+
Defined in: src/threads/ThreadWorker.ts:17
|
|
10
|
+
|
|
11
|
+
Describes a single message sent from the thread pool managger to a worker thread.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### data?
|
|
16
|
+
|
|
17
|
+
> `optional` **data**: `any`
|
|
18
|
+
|
|
19
|
+
Defined in: src/threads/ThreadWorker.ts:19
|
|
20
|
+
|
|
21
|
+
The data associated with the message.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### type
|
|
26
|
+
|
|
27
|
+
> **type**: [`WorkerMessageType`](../enumerations/WorkerMessageType.md)
|
|
28
|
+
|
|
29
|
+
Defined in: src/threads/ThreadWorker.ts:21
|
|
30
|
+
|
|
31
|
+
The type of message sent.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / WorkerOptions
|
|
6
|
+
|
|
7
|
+
# Interface: WorkerOptions
|
|
8
|
+
|
|
9
|
+
Defined in: src/threads/ThreadPool.ts:22
|
|
10
|
+
|
|
11
|
+
Describes the various options that can be used when creating worker threads.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### allowTs?
|
|
16
|
+
|
|
17
|
+
> `optional` **allowTs**: `boolean`
|
|
18
|
+
|
|
19
|
+
Defined in: src/threads/ThreadPool.ts:30
|
|
20
|
+
|
|
21
|
+
Set to `true` to enable support for importing TypeScript modules in the worker. Default is `true`.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### args?
|
|
26
|
+
|
|
27
|
+
> `optional` **args**: `any`
|
|
28
|
+
|
|
29
|
+
Defined in: src/threads/ThreadPool.ts:24
|
|
30
|
+
|
|
31
|
+
The list of initialization arguments to pass into the worker thread.
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### entry?
|
|
36
|
+
|
|
37
|
+
> `optional` **entry**: `string`
|
|
38
|
+
|
|
39
|
+
Defined in: src/threads/ThreadPool.ts:26
|
|
40
|
+
|
|
41
|
+
The path to the entry file create a worker thread from. Default is `ThreadWorkerEntry.js`.
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### restartOnExit?
|
|
46
|
+
|
|
47
|
+
> `optional` **restartOnExit**: `boolean`
|
|
48
|
+
|
|
49
|
+
Defined in: src/threads/ThreadPool.ts:28
|
|
50
|
+
|
|
51
|
+
Indicates if a worker thread should automatically be restarted on exit.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### worker?
|
|
56
|
+
|
|
57
|
+
> `optional` **worker**: `string`
|
|
58
|
+
|
|
59
|
+
Defined in: src/threads/ThreadPool.ts:32
|
|
60
|
+
|
|
61
|
+
The path to the worker file. This must be set when using `ThreadWorkerEntry` as the default entry file.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / BooleanFunc
|
|
6
|
+
|
|
7
|
+
# Type Alias: BooleanFunc()
|
|
8
|
+
|
|
9
|
+
> **BooleanFunc** = (`val`) => `boolean`
|
|
10
|
+
|
|
11
|
+
Defined in: src/ValidationUtils.ts:9
|
|
12
|
+
|
|
13
|
+
A simple validation function that returns a boolean success or fail.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### val
|
|
18
|
+
|
|
19
|
+
`any`
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`boolean`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / TemplateMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: TemplateMap
|
|
8
|
+
|
|
9
|
+
> **TemplateMap** = `Omit`\<[`TemplateMapBase`](../interfaces/TemplateMapBase.md), `"from"`\> & `object`
|
|
10
|
+
|
|
11
|
+
Defined in: src/MessagingUtils.ts:16
|
|
12
|
+
|
|
13
|
+
## Type Declaration
|
|
14
|
+
|
|
15
|
+
### from
|
|
16
|
+
|
|
17
|
+
> **from**: [`OriginSettings`](../interfaces/OriginSettings.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / WorkerCallback
|
|
6
|
+
|
|
7
|
+
# Type Alias: WorkerCallback()
|
|
8
|
+
|
|
9
|
+
> **WorkerCallback** = (`threadId`, `msg?`) => `void`
|
|
10
|
+
|
|
11
|
+
Defined in: src/threads/ThreadPool.ts:17
|
|
12
|
+
|
|
13
|
+
Callback function for `ThreadPool` events.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### threadId
|
|
18
|
+
|
|
19
|
+
`number`
|
|
20
|
+
|
|
21
|
+
The id of the thread that originated the event.
|
|
22
|
+
|
|
23
|
+
### msg?
|
|
24
|
+
|
|
25
|
+
`any`
|
|
26
|
+
|
|
27
|
+
The optional message data associated with the event.
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`void`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@rapidrest/core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/core](../README.md) / Logger
|
|
6
|
+
|
|
7
|
+
# Variable: Logger
|
|
8
|
+
|
|
9
|
+
> `const` **Logger**: `any`
|
|
10
|
+
|
|
11
|
+
Defined in: src/Logger.ts:17
|
|
12
|
+
|
|
13
|
+
Creates a new logger with the specified level and file name to output logs to.
|
|
14
|
+
|
|
15
|
+
## Param
|
|
16
|
+
|
|
17
|
+
The logging level to create the logger with.
|
|
18
|
+
|
|
19
|
+
## Param
|
|
20
|
+
|
|
21
|
+
The name (without an extension) of the file to output logs to.
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rapidrest/core",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A collection of common utilities and core functionality for rapidly building RESTful applications.",
|
|
5
|
+
"repository": "https://github.com/rapidrest/core.git",
|
|
6
|
+
"author": "RapidREST <rapidrests@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"contributors": [
|
|
9
|
+
"Jean-Philippe Steinmetz",
|
|
10
|
+
"Arthur Thompson",
|
|
11
|
+
"Thomas Buscaglia"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "rimraf dist && tsc",
|
|
15
|
+
"deploy-docs": "ts-node tools/gh-pages-publish",
|
|
16
|
+
"docs": "typedoc --plugin typedoc-plugin-markdown --out docs/reference src",
|
|
17
|
+
"lint": "eslint ./src ./test",
|
|
18
|
+
"local-audit": "yarn install && yarn npm audit -A -R \"$@\"",
|
|
19
|
+
"checkup": "yarn dlx @yarnpkg/doctor \"$@\"",
|
|
20
|
+
"dependency-check": "yarn dlx depcheck \"$@\"",
|
|
21
|
+
"report-coverage": "cat ./coverage/lcov.info | coveralls",
|
|
22
|
+
"test": "node --loader ts-node/esm ./node_modules/vitest/vitest.mjs run",
|
|
23
|
+
"test:prod": "npm run lint && node --loader ts-node/esm ./node_modules/vitest/vitest.mjs run",
|
|
24
|
+
"postversion": "git push && git push --tags"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"form-data": "^4.0.5",
|
|
28
|
+
"handlebars": "^4.7.8",
|
|
29
|
+
"js-yaml": "^4.1.1",
|
|
30
|
+
"jsonwebtoken": "^9.0.3",
|
|
31
|
+
"jszip": "^3.10.1",
|
|
32
|
+
"mkdirp": "^3.0.1",
|
|
33
|
+
"readline": "^1.3.0",
|
|
34
|
+
"triple-beam": "^1.4.1",
|
|
35
|
+
"uuid": "^13.0.0",
|
|
36
|
+
"validator": "^13.15.26"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"axios": "1.x",
|
|
40
|
+
"reflect-metadata": "0.2.x",
|
|
41
|
+
"winston": "3.x",
|
|
42
|
+
"winston-transport": "4.x"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@slack/bolt": "^4.6.0",
|
|
46
|
+
"@slack/web-api": "^7.13.0",
|
|
47
|
+
"@types/eslint": "^9.6.1",
|
|
48
|
+
"@types/express": "^5.0.6",
|
|
49
|
+
"@types/js-yaml": "^4.0.9",
|
|
50
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
51
|
+
"@types/node": "^25.2.0",
|
|
52
|
+
"@types/nodemailer": "^7.0.9",
|
|
53
|
+
"@types/triple-beam": "^1.3.5",
|
|
54
|
+
"@types/validator": "^13.15.10",
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
56
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
57
|
+
"axios": "^1.13.4",
|
|
58
|
+
"coveralls": "^3.1.1",
|
|
59
|
+
"eslint": "^9.39.2",
|
|
60
|
+
"eslint-config-prettier": "^10.1.8",
|
|
61
|
+
"eslint-plugin-import": "^2.32.0",
|
|
62
|
+
"eslint-plugin-jsdoc": "^62.5.0",
|
|
63
|
+
"mkdirp": "^3.0.1",
|
|
64
|
+
"nconf": "^0.13.0",
|
|
65
|
+
"nock": "^14.0.10",
|
|
66
|
+
"nodemailer": "^7.0.13",
|
|
67
|
+
"prettier": "^3.8.1",
|
|
68
|
+
"reflect-metadata": "^0.2.2",
|
|
69
|
+
"rimraf": "^6.1.2",
|
|
70
|
+
"ts-node": "^10.9.2",
|
|
71
|
+
"twilio": "^5.12.0",
|
|
72
|
+
"typedoc": "^0.28.16",
|
|
73
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
74
|
+
"typescript": "^5.9.3",
|
|
75
|
+
"vitest": "^4.0.18",
|
|
76
|
+
"winston": "^3.19.0",
|
|
77
|
+
"winston-transport": "^4.9.0"
|
|
78
|
+
},
|
|
79
|
+
"resolutions": {
|
|
80
|
+
"cross-spawn": "^7.0.5"
|
|
81
|
+
},
|
|
82
|
+
"packageManager": "yarn@4.5.0",
|
|
83
|
+
"engines": {
|
|
84
|
+
"node": ">=20.0.0"
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"registry": "https://registry.npmjs.org/"
|
|
88
|
+
},
|
|
89
|
+
"main": "dist/lib/index.js",
|
|
90
|
+
"type": "module",
|
|
91
|
+
"typings": "dist/types/index.d.ts",
|
|
92
|
+
"files": [
|
|
93
|
+
"dist",
|
|
94
|
+
"docs"
|
|
95
|
+
]
|
|
96
|
+
}
|