@breautek/storm 5.0.1 → 6.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/CHANGELOG.md +24 -2
- package/bt-config-defaults.json +0 -1
- package/bt-config-sample.jsonc +41 -7
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/classes/Application.html +1278 -0
- package/docs/classes/BackendAuthenticationMiddleware.html +193 -0
- package/docs/classes/CORSMiddleware.html +259 -0
- package/docs/classes/ConfigLoader.html +168 -0
- package/docs/classes/Database.html +342 -0
- package/docs/classes/DatabaseCastObject.html +205 -0
- package/docs/classes/DatabaseConnection.html +552 -0
- package/docs/classes/DatabaseQueryError.html +374 -0
- package/docs/classes/DeadLockError.html +374 -0
- package/docs/classes/DiskSpaceError.html +364 -0
- package/docs/classes/DropTemporaryTableQuery.html +287 -0
- package/docs/classes/DuplicateEntryError.html +368 -0
- package/docs/classes/EntityNotFoundError.html +364 -0
- package/docs/classes/ExpiredTokenError.html +364 -0
- package/docs/classes/Handler.html +397 -0
- package/docs/classes/InternalError.html +364 -0
- package/docs/classes/InvalidCredentialsError.html +364 -0
- package/docs/classes/InvalidValueError.html +375 -0
- package/docs/classes/LineString.html +214 -0
- package/docs/classes/LockWaitTimeoutError.html +374 -0
- package/docs/classes/ManagedDatabaseConnection.html +412 -0
- package/docs/classes/Middleware.html +204 -0
- package/docs/classes/MissingConfigError.html +364 -0
- package/docs/classes/MissingParameterError.html +364 -0
- package/docs/classes/MySQLConnection.html +548 -0
- package/docs/classes/MySQLDatabase.html +355 -0
- package/docs/classes/NotImplementedError.html +364 -0
- package/docs/classes/Point.html +216 -0
- package/docs/classes/Polygon.html +214 -0
- package/docs/classes/Query.html +314 -0
- package/docs/classes/RawError.html +376 -0
- package/docs/classes/RawQuery.html +307 -0
- package/docs/classes/Request.html +377 -0
- package/docs/classes/Response.html +331 -0
- package/docs/classes/ResponseData.html +257 -0
- package/docs/classes/ServiceProvider.html +387 -0
- package/docs/classes/ServiceResponse.html +215 -0
- package/docs/classes/SetSessionVariableQuery.html +287 -0
- package/docs/classes/StormError.html +379 -0
- package/docs/classes/TemporaryTableQuery.html +292 -0
- package/docs/classes/Token.html +183 -0
- package/docs/classes/TokenManager.html +235 -0
- package/docs/classes/Transaction.html +269 -0
- package/docs/classes/UnauthorizedAccessError.html +364 -0
- package/docs/enums/ErrorCode.html +212 -0
- package/docs/enums/ExitCode.html +163 -0
- package/docs/enums/HTTPMethod.html +177 -0
- package/docs/enums/IsolationLevel.html +177 -0
- package/docs/enums/JWTError.html +163 -0
- package/docs/enums/StatusCode.html +485 -0
- package/docs/functions/formidable-1.html +145 -0
- package/docs/functions/getInstance.html +140 -0
- package/docs/index.html +228 -0
- package/docs/interfaces/IAdditionalErrorDetails.html +142 -0
- package/docs/interfaces/IAuthTokenData.html +174 -0
- package/docs/interfaces/ICloudwatchConfig.html +174 -0
- package/docs/interfaces/ICloudwatchCredentials.html +167 -0
- package/docs/interfaces/ICloudwatchStreamConfig.html +167 -0
- package/docs/interfaces/IConfig.html +227 -0
- package/docs/interfaces/IDatabaseConfig.html +200 -0
- package/docs/interfaces/IDatabaseConnection.html +334 -0
- package/docs/interfaces/IErrorResponse.html +188 -0
- package/docs/interfaces/IFormData.html +167 -0
- package/docs/interfaces/IHandler.html +173 -0
- package/docs/interfaces/IInsertQueryResult.html +174 -0
- package/docs/interfaces/IJWTVerifyOptions.html +160 -0
- package/docs/interfaces/IParameterMap.html +142 -0
- package/docs/interfaces/IQueryable.html +235 -0
- package/docs/interfaces/IRequestResponse.html +174 -0
- package/docs/interfaces/IServiceHeaders.html +142 -0
- package/docs/interfaces/ISetSessionVariableQueryInput.html +167 -0
- package/docs/interfaces/ITemporaryTableQueryInput.html +167 -0
- package/docs/interfaces/IUpdateQueryResult.html +167 -0
- package/docs/interfaces/formidable.EmitData.html +182 -0
- package/docs/interfaces/formidable.EventData.html +203 -0
- package/docs/interfaces/formidable.Fields.html +143 -0
- package/docs/interfaces/formidable.File.html +241 -0
- package/docs/interfaces/formidable.FileJSON.html +240 -0
- package/docs/interfaces/formidable.Files.html +143 -0
- package/docs/interfaces/formidable.Options.html +310 -0
- package/docs/interfaces/formidable.Part.html +693 -0
- package/docs/modules/formidable.html +161 -0
- package/docs/types/IDeleteQueryResult.html +136 -0
- package/docs/types/IHandlerError.html +141 -0
- package/docs/types/IHandlerResponse.html +147 -0
- package/docs/types/TCoordinate.html +136 -0
- package/docs/types/formidable.BufferEncoding.html +137 -0
- package/docs/types/formidable.DefaultOptions.html +137 -0
- package/docs/types/formidable.EnabledPlugins.html +137 -0
- package/docs/types/formidable.EventNames.html +137 -0
- package/docs/types/formidable.MappedParsers.html +137 -0
- package/docs/types/formidable.Plugin.html +137 -0
- package/docs/types/formidable.PluginFunction.html +152 -0
- package/docs/types/formidable.Plugins.html +137 -0
- package/lib/Application.d.ts +3 -0
- package/lib/Application.js +105 -63
- package/lib/Application.js.map +1 -1
- package/lib/IConfig.d.ts +15 -2
- package/lib/MySQLConnection.js +3 -3
- package/lib/MySQLConnection.js.map +1 -1
- package/lib/StatusCode.d.ts +1 -1
- package/lib/StatusCode.js +1 -1
- package/lib/Transaction.d.ts +4 -0
- package/lib/Transaction.js +4 -0
- package/lib/Transaction.js.map +1 -1
- package/lib/api.d.ts +1 -2
- package/lib/api.js +2 -4
- package/lib/api.js.map +1 -1
- package/package.json +18 -16
- package/src/Application.ts +131 -68
- package/src/IConfig.ts +18 -2
- package/src/MySQLConnection.ts +2 -1
- package/src/StatusCode.ts +1 -1
- package/src/Transaction.ts +4 -0
- package/src/api.ts +6 -2
- package/docs/README.md +0 -188
- package/docs/classes/Application.md +0 -1648
- package/docs/classes/BackendAuthenticationMiddleware.md +0 -49
- package/docs/classes/CORSMiddleware.md +0 -143
- package/docs/classes/ConfigLoader.md +0 -29
- package/docs/classes/Database.md +0 -259
- package/docs/classes/DatabaseCastObject.md +0 -79
- package/docs/classes/DatabaseConnection.md +0 -556
- package/docs/classes/DatabaseQueryError.md +0 -351
- package/docs/classes/DeadLockError.md +0 -349
- package/docs/classes/DiskSpaceError.md +0 -341
- package/docs/classes/DropTemporaryTableQuery.md +0 -207
- package/docs/classes/DumpStream.md +0 -23
- package/docs/classes/DuplicateEntryError.md +0 -343
- package/docs/classes/EntityNotFoundError.md +0 -341
- package/docs/classes/ExpiredTokenError.md +0 -341
- package/docs/classes/Handler.md +0 -302
- package/docs/classes/InternalError.md +0 -341
- package/docs/classes/InvalidCredentialsError.md +0 -341
- package/docs/classes/InvalidValueError.md +0 -349
- package/docs/classes/LineString.md +0 -101
- package/docs/classes/LockWaitTimeoutError.md +0 -349
- package/docs/classes/ManagedDatabaseConnection.md +0 -403
- package/docs/classes/Middleware.md +0 -72
- package/docs/classes/MissingConfigError.md +0 -341
- package/docs/classes/MissingParameterError.md +0 -341
- package/docs/classes/MySQLConnection.md +0 -569
- package/docs/classes/MySQLDatabase.md +0 -314
- package/docs/classes/NotImplementedError.md +0 -341
- package/docs/classes/Point.md +0 -102
- package/docs/classes/Polygon.md +0 -101
- package/docs/classes/Query.md +0 -227
- package/docs/classes/RawError.md +0 -351
- package/docs/classes/RawQuery.md +0 -224
- package/docs/classes/Request.md +0 -321
- package/docs/classes/Response.md +0 -242
- package/docs/classes/ResponseData.md +0 -144
- package/docs/classes/ServiceProvider.md +0 -296
- package/docs/classes/ServiceResponse.md +0 -89
- package/docs/classes/SetSessionVariableQuery.md +0 -207
- package/docs/classes/StormError.md +0 -343
- package/docs/classes/TemporaryTableQuery.md +0 -213
- package/docs/classes/Token.md +0 -43
- package/docs/classes/TokenManager.md +0 -105
- package/docs/classes/Transaction.md +0 -161
- package/docs/classes/UnauthorizedAccessError.md +0 -341
- package/docs/enums/ErrorCode.md +0 -107
- package/docs/enums/ExitCode.md +0 -30
- package/docs/enums/HTTPMethod.md +0 -52
- package/docs/enums/IsolationLevel.md +0 -52
- package/docs/enums/JWTError.md +0 -30
- package/docs/enums/StatusCode.md +0 -536
- package/docs/interfaces/IAdditionalErrorDetails.md +0 -7
- package/docs/interfaces/IAuthTokenData.md +0 -41
- package/docs/interfaces/IConfig.md +0 -112
- package/docs/interfaces/IDatabaseConfig.md +0 -80
- package/docs/interfaces/IDatabaseConnection.md +0 -262
- package/docs/interfaces/IErrorResponse.md +0 -63
- package/docs/interfaces/IFormData.md +0 -30
- package/docs/interfaces/IHandler.md +0 -31
- package/docs/interfaces/IInsertQueryResult.md +0 -41
- package/docs/interfaces/IJWTVerifyOptions.md +0 -19
- package/docs/interfaces/IParameterMap.md +0 -7
- package/docs/interfaces/IQueryable.md +0 -119
- package/docs/interfaces/IRequestResponse.md +0 -37
- package/docs/interfaces/IServiceHeaders.md +0 -7
- package/docs/interfaces/ISetSessionVariableQueryInput.md +0 -30
- package/docs/interfaces/ITemporaryTableQueryInput.md +0 -30
- package/docs/interfaces/IUpdateQueryResult.md +0 -30
- package/docs/interfaces/formidable.EmitData.md +0 -54
- package/docs/interfaces/formidable.EventData.md +0 -87
- package/docs/interfaces/formidable.Fields.md +0 -9
- package/docs/interfaces/formidable.File.md +0 -131
- package/docs/interfaces/formidable.FileJSON.md +0 -151
- package/docs/interfaces/formidable.Files.md +0 -9
- package/docs/interfaces/formidable.Options.md +0 -225
- package/docs/interfaces/formidable.Part.md +0 -793
- package/docs/modules/formidable.md +0 -122
- package/lib/DumpStream.d.ts +0 -6
- package/lib/DumpStream.js +0 -28
- package/lib/DumpStream.js.map +0 -1
- package/src/DumpStream.ts +0 -28
package/docs/README.md
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
@breautek/storm
|
|
2
|
-
|
|
3
|
-
# @breautek/storm
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Namespaces
|
|
8
|
-
|
|
9
|
-
- [formidable](modules/formidable.md)
|
|
10
|
-
|
|
11
|
-
### Enumerations
|
|
12
|
-
|
|
13
|
-
- [ErrorCode](enums/ErrorCode.md)
|
|
14
|
-
- [ExitCode](enums/ExitCode.md)
|
|
15
|
-
- [HTTPMethod](enums/HTTPMethod.md)
|
|
16
|
-
- [IsolationLevel](enums/IsolationLevel.md)
|
|
17
|
-
- [JWTError](enums/JWTError.md)
|
|
18
|
-
- [StatusCode](enums/StatusCode.md)
|
|
19
|
-
|
|
20
|
-
### Classes
|
|
21
|
-
|
|
22
|
-
- [Application](classes/Application.md)
|
|
23
|
-
- [BackendAuthenticationMiddleware](classes/BackendAuthenticationMiddleware.md)
|
|
24
|
-
- [CORSMiddleware](classes/CORSMiddleware.md)
|
|
25
|
-
- [ConfigLoader](classes/ConfigLoader.md)
|
|
26
|
-
- [Database](classes/Database.md)
|
|
27
|
-
- [DatabaseCastObject](classes/DatabaseCastObject.md)
|
|
28
|
-
- [DatabaseConnection](classes/DatabaseConnection.md)
|
|
29
|
-
- [DatabaseQueryError](classes/DatabaseQueryError.md)
|
|
30
|
-
- [DeadLockError](classes/DeadLockError.md)
|
|
31
|
-
- [DiskSpaceError](classes/DiskSpaceError.md)
|
|
32
|
-
- [DropTemporaryTableQuery](classes/DropTemporaryTableQuery.md)
|
|
33
|
-
- [DumpStream](classes/DumpStream.md)
|
|
34
|
-
- [DuplicateEntryError](classes/DuplicateEntryError.md)
|
|
35
|
-
- [EntityNotFoundError](classes/EntityNotFoundError.md)
|
|
36
|
-
- [ExpiredTokenError](classes/ExpiredTokenError.md)
|
|
37
|
-
- [Handler](classes/Handler.md)
|
|
38
|
-
- [InternalError](classes/InternalError.md)
|
|
39
|
-
- [InvalidCredentialsError](classes/InvalidCredentialsError.md)
|
|
40
|
-
- [InvalidValueError](classes/InvalidValueError.md)
|
|
41
|
-
- [LineString](classes/LineString.md)
|
|
42
|
-
- [LockWaitTimeoutError](classes/LockWaitTimeoutError.md)
|
|
43
|
-
- [ManagedDatabaseConnection](classes/ManagedDatabaseConnection.md)
|
|
44
|
-
- [Middleware](classes/Middleware.md)
|
|
45
|
-
- [MissingConfigError](classes/MissingConfigError.md)
|
|
46
|
-
- [MissingParameterError](classes/MissingParameterError.md)
|
|
47
|
-
- [MySQLConnection](classes/MySQLConnection.md)
|
|
48
|
-
- [MySQLDatabase](classes/MySQLDatabase.md)
|
|
49
|
-
- [NotImplementedError](classes/NotImplementedError.md)
|
|
50
|
-
- [Point](classes/Point.md)
|
|
51
|
-
- [Polygon](classes/Polygon.md)
|
|
52
|
-
- [Query](classes/Query.md)
|
|
53
|
-
- [RawError](classes/RawError.md)
|
|
54
|
-
- [RawQuery](classes/RawQuery.md)
|
|
55
|
-
- [Request](classes/Request.md)
|
|
56
|
-
- [Response](classes/Response.md)
|
|
57
|
-
- [ResponseData](classes/ResponseData.md)
|
|
58
|
-
- [ServiceProvider](classes/ServiceProvider.md)
|
|
59
|
-
- [ServiceResponse](classes/ServiceResponse.md)
|
|
60
|
-
- [SetSessionVariableQuery](classes/SetSessionVariableQuery.md)
|
|
61
|
-
- [StormError](classes/StormError.md)
|
|
62
|
-
- [TemporaryTableQuery](classes/TemporaryTableQuery.md)
|
|
63
|
-
- [Token](classes/Token.md)
|
|
64
|
-
- [TokenManager](classes/TokenManager.md)
|
|
65
|
-
- [Transaction](classes/Transaction.md)
|
|
66
|
-
- [UnauthorizedAccessError](classes/UnauthorizedAccessError.md)
|
|
67
|
-
|
|
68
|
-
### Interfaces
|
|
69
|
-
|
|
70
|
-
- [IAdditionalErrorDetails](interfaces/IAdditionalErrorDetails.md)
|
|
71
|
-
- [IAuthTokenData](interfaces/IAuthTokenData.md)
|
|
72
|
-
- [IConfig](interfaces/IConfig.md)
|
|
73
|
-
- [IDatabaseConfig](interfaces/IDatabaseConfig.md)
|
|
74
|
-
- [IDatabaseConnection](interfaces/IDatabaseConnection.md)
|
|
75
|
-
- [IErrorResponse](interfaces/IErrorResponse.md)
|
|
76
|
-
- [IFormData](interfaces/IFormData.md)
|
|
77
|
-
- [IHandler](interfaces/IHandler.md)
|
|
78
|
-
- [IInsertQueryResult](interfaces/IInsertQueryResult.md)
|
|
79
|
-
- [IJWTVerifyOptions](interfaces/IJWTVerifyOptions.md)
|
|
80
|
-
- [IParameterMap](interfaces/IParameterMap.md)
|
|
81
|
-
- [IQueryable](interfaces/IQueryable.md)
|
|
82
|
-
- [IRequestResponse](interfaces/IRequestResponse.md)
|
|
83
|
-
- [IServiceHeaders](interfaces/IServiceHeaders.md)
|
|
84
|
-
- [ISetSessionVariableQueryInput](interfaces/ISetSessionVariableQueryInput.md)
|
|
85
|
-
- [ITemporaryTableQueryInput](interfaces/ITemporaryTableQueryInput.md)
|
|
86
|
-
- [IUpdateQueryResult](interfaces/IUpdateQueryResult.md)
|
|
87
|
-
|
|
88
|
-
### Type Aliases
|
|
89
|
-
|
|
90
|
-
- [IDeleteQueryResult](README.md#ideletequeryresult)
|
|
91
|
-
- [IHandlerError](README.md#ihandlererror)
|
|
92
|
-
- [IHandlerResponse](README.md#ihandlerresponse)
|
|
93
|
-
- [TCoordinate](README.md#tcoordinate)
|
|
94
|
-
|
|
95
|
-
### Functions
|
|
96
|
-
|
|
97
|
-
- [formidable](README.md#formidable)
|
|
98
|
-
- [getInstance](README.md#getinstance)
|
|
99
|
-
|
|
100
|
-
## Type Aliases
|
|
101
|
-
|
|
102
|
-
### IDeleteQueryResult
|
|
103
|
-
|
|
104
|
-
Ƭ **IDeleteQueryResult**: [`IUpdateQueryResult`](interfaces/IUpdateQueryResult.md)
|
|
105
|
-
|
|
106
|
-
#### Defined in
|
|
107
|
-
|
|
108
|
-
[src/IDeleteQueryResult.ts:19](https://github.com/breautek/storm/blob/3dcafe4/src/IDeleteQueryResult.ts#L19)
|
|
109
|
-
|
|
110
|
-
___
|
|
111
|
-
|
|
112
|
-
### IHandlerError
|
|
113
|
-
|
|
114
|
-
Ƭ **IHandlerError**: [`StormError`](classes/StormError.md) \| `Error` \| `any`
|
|
115
|
-
|
|
116
|
-
Like IHandlerResponse, an IHandlerError can be any arbitrary type of object,
|
|
117
|
-
however it's recommended that the type be of a StormError.
|
|
118
|
-
|
|
119
|
-
If the type is not a StormError, the error will be wrapped in an InternalError object.
|
|
120
|
-
This is to avoid accidental leakage of privilege data (e.g. snippets of database queries with sensitive information)
|
|
121
|
-
|
|
122
|
-
#### Defined in
|
|
123
|
-
|
|
124
|
-
[src/Handler.ts:55](https://github.com/breautek/storm/blob/3dcafe4/src/Handler.ts#L55)
|
|
125
|
-
|
|
126
|
-
___
|
|
127
|
-
|
|
128
|
-
### IHandlerResponse
|
|
129
|
-
|
|
130
|
-
Ƭ **IHandlerResponse**: [`ResponseData`](classes/ResponseData.md) \| `ReadableStream` \| `ReadStream` \| `any` \| `void`
|
|
131
|
-
|
|
132
|
-
IHandlerResponse can actually accept any arbitrary object, however it may do
|
|
133
|
-
certain things depending on the type of object it receives.
|
|
134
|
-
|
|
135
|
-
- If the response object is a stream, it will pipe the stream to stream the HTTP response.
|
|
136
|
-
- If the response is ResponseData, the status code and response data will be passed as the HTTP response.
|
|
137
|
-
- Passing nothing/undefined will return a status code of 204 with no body content
|
|
138
|
-
- Primitive data types will be passed as is
|
|
139
|
-
- Buffers will be passed through
|
|
140
|
-
- Any other object will be passed through JSON.stringify
|
|
141
|
-
|
|
142
|
-
#### Defined in
|
|
143
|
-
|
|
144
|
-
[src/Handler.ts:46](https://github.com/breautek/storm/blob/3dcafe4/src/Handler.ts#L46)
|
|
145
|
-
|
|
146
|
-
___
|
|
147
|
-
|
|
148
|
-
### TCoordinate
|
|
149
|
-
|
|
150
|
-
Ƭ **TCoordinate**: [x: number, y: number]
|
|
151
|
-
|
|
152
|
-
#### Defined in
|
|
153
|
-
|
|
154
|
-
[src/TCoordinate.ts:17](https://github.com/breautek/storm/blob/3dcafe4/src/TCoordinate.ts#L17)
|
|
155
|
-
|
|
156
|
-
## Functions
|
|
157
|
-
|
|
158
|
-
### formidable
|
|
159
|
-
|
|
160
|
-
▸ **formidable**(`options?`): `IncomingForm`
|
|
161
|
-
|
|
162
|
-
#### Parameters
|
|
163
|
-
|
|
164
|
-
| Name | Type |
|
|
165
|
-
| :------ | :------ |
|
|
166
|
-
| `options?` | [`Options`](interfaces/formidable.Options.md) |
|
|
167
|
-
|
|
168
|
-
#### Returns
|
|
169
|
-
|
|
170
|
-
`IncomingForm`
|
|
171
|
-
|
|
172
|
-
#### Defined in
|
|
173
|
-
|
|
174
|
-
node_modules/@types/formidable/index.d.ts:282
|
|
175
|
-
|
|
176
|
-
___
|
|
177
|
-
|
|
178
|
-
### getInstance
|
|
179
|
-
|
|
180
|
-
▸ **getInstance**(): [`Application`](classes/Application.md)<[`IConfig`](interfaces/IConfig.md), [`IAuthTokenData`](interfaces/IAuthTokenData.md), `any`, `any`\>
|
|
181
|
-
|
|
182
|
-
#### Returns
|
|
183
|
-
|
|
184
|
-
[`Application`](classes/Application.md)<[`IConfig`](interfaces/IConfig.md), [`IAuthTokenData`](interfaces/IAuthTokenData.md), `any`, `any`\>
|
|
185
|
-
|
|
186
|
-
#### Defined in
|
|
187
|
-
|
|
188
|
-
[src/instance.ts:28](https://github.com/breautek/storm/blob/3dcafe4/src/instance.ts#L28)
|