@breautek/storm 9.0.6 → 9.0.8
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 +12 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Application.html +45 -45
- package/docs/classes/ConfigLoader.html +3 -3
- package/docs/classes/Database.html +2 -2
- package/docs/classes/DatabaseCastObject.html +2 -2
- package/docs/classes/DatabaseConnection.html +21 -21
- package/docs/classes/DatabaseQueryError.html +8 -8
- package/docs/classes/DeadLockError.html +8 -8
- package/docs/classes/DiskSpaceError.html +7 -7
- package/docs/classes/DropTemporaryTableQuery.html +7 -7
- package/docs/classes/DuplicateEntryError.html +7 -7
- package/docs/classes/EntityNotFoundError.html +7 -7
- package/docs/classes/ExpiredTokenError.html +7 -7
- package/docs/classes/Handler.html +2 -2
- package/docs/classes/InternalError.html +7 -7
- package/docs/classes/InvalidCredentialsError.html +7 -7
- package/docs/classes/InvalidValueError.html +7 -7
- package/docs/classes/LineString.html +2 -2
- package/docs/classes/LockWaitTimeoutError.html +8 -8
- package/docs/classes/ManagedDatabaseConnection.html +5 -5
- package/docs/classes/Middleware.html +2 -2
- package/docs/classes/MissingConfigError.html +7 -7
- package/docs/classes/MissingParameterError.html +7 -7
- package/docs/classes/MySQLConnection.html +25 -25
- package/docs/classes/MySQLDatabase.html +2 -2
- package/docs/classes/NotImplementedError.html +7 -7
- package/docs/classes/Point.html +2 -2
- package/docs/classes/Polygon.html +2 -2
- package/docs/classes/Query.html +7 -7
- package/docs/classes/RawError.html +7 -7
- package/docs/classes/RawQuery.html +7 -7
- package/docs/classes/Request.html +3 -3
- package/docs/classes/Response.html +2 -2
- package/docs/classes/ResponseData.html +3 -3
- package/docs/classes/ServiceProvider.html +2 -2
- package/docs/classes/ServiceResponse.html +2 -2
- package/docs/classes/SetSessionVariableQuery.html +7 -7
- package/docs/classes/StormError.html +7 -7
- package/docs/classes/TemporaryTableQuery.html +7 -7
- package/docs/classes/TimeoutError.html +7 -7
- package/docs/classes/Token.html +2 -2
- package/docs/classes/TokenManager.html +2 -2
- package/docs/classes/Transaction.html +2 -2
- package/docs/classes/UnauthorizedAccessError.html +7 -7
- package/docs/enums/ErrorCode.html +2 -2
- package/docs/enums/ExitCode.html +2 -2
- package/docs/enums/HTTPMethod.html +2 -2
- package/docs/enums/IsolationLevel.html +2 -2
- package/docs/enums/JWTError.html +2 -2
- package/docs/enums/StatusCode.html +2 -2
- package/docs/enums/TransactionAccessLevel.html +2 -2
- package/docs/functions/getInstance.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/IAdditionalErrorDetails.html +1 -1
- package/docs/interfaces/ICloudwatchConfig.html +2 -2
- package/docs/interfaces/ICloudwatchCredentials.html +2 -2
- package/docs/interfaces/ICloudwatchStreamConfig.html +2 -2
- package/docs/interfaces/IConfig.html +2 -2
- package/docs/interfaces/IDatabaseConfig.html +2 -2
- package/docs/interfaces/IDatabaseConnection.html +5 -5
- package/docs/interfaces/IDatabasePosition.html +2 -2
- package/docs/interfaces/IErrorResponse.html +2 -2
- package/docs/interfaces/IFormData.html +2 -2
- package/docs/interfaces/IInsertQueryResult.html +2 -2
- package/docs/interfaces/IJWTVerifyOptions.html +2 -2
- package/docs/interfaces/IOKPacket.html +2 -2
- package/docs/interfaces/IParameterMap.html +1 -1
- package/docs/interfaces/IQueryable.html +2 -2
- package/docs/interfaces/IRequestResponse.html +2 -2
- package/docs/interfaces/ISetSessionVariableQueryInput.html +2 -2
- package/docs/interfaces/IStormCLIArgs.html +2 -2
- package/docs/interfaces/ITemporaryTableQueryInput.html +2 -2
- package/docs/interfaces/IUpdateQueryResult.html +2 -2
- package/docs/interfaces/formidable.FileJSON.html +7 -7
- package/docs/interfaces/formidable.Part.html +17 -17
- package/docs/types/IDeleteQueryResult.html +1 -1
- package/docs/types/IStoredProcedureResult.html +1 -1
- package/docs/types/TCoordinate.html +1 -1
- package/docs/types/TExpiresIn.html +1 -0
- package/docs/types/TSerializableResponse.html +1 -1
- package/docs/types/TSupportedResponsePrimitives.html +1 -1
- package/docs/types/TSupportedResponseTypes.html +1 -1
- package/lib/Application.js +4 -4
- package/lib/Application.js.map +1 -1
- package/lib/ManagedDatabaseConnection.js +3 -3
- package/lib/ManagedDatabaseConnection.js.map +1 -1
- package/lib/MySQLDatabase.js +1 -1
- package/lib/MySQLDatabase.js.map +1 -1
- package/lib/TokenManager.d.ts +2 -1
- package/lib/TokenManager.js +0 -1
- package/lib/TokenManager.js.map +1 -1
- package/lib/api.d.ts +1 -1
- package/lib/api.js.map +1 -1
- package/package.json +8 -7
- package/src/Application.ts +4 -4
- package/src/ManagedDatabaseConnection.ts +3 -3
- package/src/MySQLDatabase.ts +1 -1
- package/src/TokenManager.ts +3 -1
- package/src/api.ts +1 -1
package/src/MySQLDatabase.ts
CHANGED
package/src/TokenManager.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { StringValue } from 'ms';
|
|
|
24
24
|
|
|
25
25
|
// const TAG: string = 'TokenManager';
|
|
26
26
|
|
|
27
|
+
export type TExpiresIn = StringValue | number;
|
|
28
|
+
|
|
27
29
|
export class TokenManager<TAuthToken extends IAuthTokenData = IAuthTokenData> {
|
|
28
30
|
private $secret: string;
|
|
29
31
|
|
|
@@ -31,7 +33,7 @@ export class TokenManager<TAuthToken extends IAuthTokenData = IAuthTokenData> {
|
|
|
31
33
|
this.$secret = secret;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
public sign(payload: {[key: string]: any}, expiresIn:
|
|
36
|
+
public sign(payload: {[key: string]: any}, expiresIn: TExpiresIn): Promise<Token> {
|
|
35
37
|
return new Promise<Token>((resolve, reject) => {
|
|
36
38
|
randomBytes(64, (err: Error, buffer: Buffer) => {
|
|
37
39
|
if (err) {
|
package/src/api.ts
CHANGED
|
@@ -98,7 +98,7 @@ export {IDatabasePosition} from './IDatabasePosition';
|
|
|
98
98
|
|
|
99
99
|
// Token
|
|
100
100
|
export {Token} from './Token';
|
|
101
|
-
export {TokenManager} from './TokenManager';
|
|
101
|
+
export {TokenManager, TExpiresIn} from './TokenManager';
|
|
102
102
|
|
|
103
103
|
// Utils
|
|
104
104
|
export {ExitCode} from './ExitCode';
|