@breautek/storm 4.1.0 → 4.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.
- package/CHANGELOG.md +8 -1
- package/docs/README.md +6 -4
- package/docs/classes/Application.md +26 -26
- package/docs/classes/BackendAuthenticationMiddleware.md +2 -2
- package/docs/classes/CORSMiddleware.md +6 -6
- package/docs/classes/ConfigLoader.md +1 -1
- package/docs/classes/Database.md +12 -12
- package/docs/classes/DatabaseConnection.md +19 -19
- package/docs/classes/DatabaseQueryError.md +8 -8
- package/docs/classes/DiskSpaceError.md +8 -8
- package/docs/classes/DropTemporaryTableQuery.md +14 -8
- package/docs/classes/DumpStream.md +1 -1
- package/docs/classes/DuplicateEntryError.md +8 -8
- package/docs/classes/EntityNotFoundError.md +8 -8
- package/docs/classes/ExpiredTokenError.md +8 -8
- package/docs/classes/Handler.md +22 -22
- package/docs/classes/InternalError.md +8 -8
- package/docs/classes/InvalidCredentialsError.md +8 -8
- package/docs/classes/InvalidValueError.md +8 -8
- package/docs/classes/ManagedDatabaseConnection.md +19 -19
- package/docs/classes/Middleware.md +3 -3
- package/docs/classes/MissingConfigError.md +8 -8
- package/docs/classes/MissingParameterError.md +8 -8
- package/docs/classes/MySQLConnection.md +20 -20
- package/docs/classes/MySQLDatabase.md +13 -13
- package/docs/classes/NotImplementedError.md +301 -0
- package/docs/classes/Query.md +14 -8
- package/docs/classes/RawError.md +313 -0
- package/docs/classes/RawQuery.md +14 -8
- package/docs/classes/Request.md +18 -18
- package/docs/classes/Response.md +11 -11
- package/docs/classes/ResponseData.md +7 -7
- package/docs/classes/ServiceProvider.md +15 -15
- package/docs/classes/ServiceResponse.md +4 -4
- package/docs/classes/SetSessionVariableQuery.md +14 -8
- package/docs/classes/StormError.md +12 -8
- package/docs/classes/TemporaryTableQuery.md +14 -8
- package/docs/classes/Token.md +2 -2
- package/docs/classes/TokenManager.md +4 -4
- package/docs/classes/UnauthorizedAccessError.md +8 -8
- package/docs/enums/ErrorCode.md +9 -9
- package/docs/enums/ExitCode.md +2 -2
- package/docs/enums/HTTPMethod.md +4 -4
- package/docs/enums/JWTError.md +2 -2
- package/docs/enums/StatusCode.md +48 -48
- package/docs/interfaces/IConfig.md +8 -8
- package/docs/interfaces/IDatabaseConfig.md +6 -6
- package/docs/interfaces/IDatabaseConnection.md +14 -14
- package/docs/interfaces/IErrorResponse.md +4 -4
- package/docs/interfaces/IFormData.md +2 -2
- package/docs/interfaces/IHandler.md +1 -1
- package/docs/interfaces/IInsertQueryResult.md +3 -3
- package/docs/interfaces/IJWTVerifyOptions.md +1 -1
- package/docs/interfaces/IRequestResponse.md +2 -2
- package/docs/interfaces/ISetSessionVariableQueryInput.md +2 -2
- package/docs/interfaces/ITemporaryTableQueryInput.md +2 -2
- package/docs/interfaces/IUpdateQueryResult.md +2 -2
- package/lib/Application.d.ts +58 -0
- package/lib/Application.js +73 -0
- package/lib/Application.js.map +1 -1
- package/lib/ApplicationEvent.js +15 -0
- package/lib/ApplicationEvent.js.map +1 -1
- package/lib/BackendAuthenticationMiddleware.d.ts +12 -0
- package/lib/BackendAuthenticationMiddleware.js +28 -0
- package/lib/BackendAuthenticationMiddleware.js.map +1 -1
- package/lib/CORSMiddleware.d.ts +14 -0
- package/lib/CORSMiddleware.js +29 -0
- package/lib/CORSMiddleware.js.map +1 -1
- package/lib/ConfigLoader.js +16 -0
- package/lib/ConfigLoader.js.map +1 -1
- package/lib/Database.js +15 -0
- package/lib/Database.js.map +1 -1
- package/lib/DatabaseConnection.d.ts +115 -0
- package/lib/DatabaseConnection.js +71 -0
- package/lib/DatabaseConnection.js.map +1 -1
- package/lib/DatabaseQueryError.js +16 -0
- package/lib/DatabaseQueryError.js.map +1 -1
- package/lib/DiskSpaceError.js +15 -0
- package/lib/DiskSpaceError.js.map +1 -1
- package/lib/DropTemporaryTableQuery.js +15 -0
- package/lib/DropTemporaryTableQuery.js.map +1 -1
- package/lib/DumpStream.js +16 -0
- package/lib/DumpStream.js.map +1 -1
- package/lib/DuplicateEntryError.js +15 -0
- package/lib/DuplicateEntryError.js.map +1 -1
- package/lib/EntityNotFoundError.js +15 -0
- package/lib/EntityNotFoundError.js.map +1 -1
- package/lib/ErrorCode.js +15 -0
- package/lib/ErrorCode.js.map +1 -1
- package/lib/ExitCode.js +15 -0
- package/lib/ExitCode.js.map +1 -1
- package/lib/ExpiredTokenError.js +16 -0
- package/lib/ExpiredTokenError.js.map +1 -1
- package/lib/HTTPMethod.js +15 -0
- package/lib/HTTPMethod.js.map +1 -1
- package/lib/Handler.d.ts +22 -4
- package/lib/Handler.js +22 -6
- package/lib/Handler.js.map +1 -1
- package/lib/IAuthTokenData.js +15 -0
- package/lib/IAuthTokenData.js.map +1 -1
- package/lib/IConfig.js +15 -0
- package/lib/IConfig.js.map +1 -1
- package/lib/IDatabaseConfig.js +15 -0
- package/lib/IDatabaseConfig.js.map +1 -1
- package/lib/IDatabaseConnection.js +15 -0
- package/lib/IDatabaseConnection.js.map +1 -1
- package/lib/IDeleteQueryResult.js +15 -0
- package/lib/IDeleteQueryResult.js.map +1 -1
- package/lib/IFormData.js +15 -0
- package/lib/IFormData.js.map +1 -1
- package/lib/IHandler.js +15 -0
- package/lib/IHandler.js.map +1 -1
- package/lib/IInsertQueryResult.js +15 -0
- package/lib/IInsertQueryResult.js.map +1 -1
- package/lib/IJWTVerifyOptions.js +15 -0
- package/lib/IJWTVerifyOptions.js.map +1 -1
- package/lib/IRequestResponse.js +15 -0
- package/lib/IRequestResponse.js.map +1 -1
- package/lib/IServiceHeaders.js +15 -0
- package/lib/IServiceHeaders.js.map +1 -1
- package/lib/IUpdateQueryResult.js +15 -0
- package/lib/IUpdateQueryResult.js.map +1 -1
- package/lib/InternalError.js +16 -0
- package/lib/InternalError.js.map +1 -1
- package/lib/InvalidConfigError.js +15 -0
- package/lib/InvalidConfigError.js.map +1 -1
- package/lib/InvalidCredentialsError.js +16 -0
- package/lib/InvalidCredentialsError.js.map +1 -1
- package/lib/InvalidValueError.js +16 -0
- package/lib/InvalidValueError.js.map +1 -1
- package/lib/JWTError.js +15 -0
- package/lib/JWTError.js.map +1 -1
- package/lib/JWTVerifyOptionsParser.js +16 -0
- package/lib/JWTVerifyOptionsParser.js.map +1 -1
- package/lib/ManagedDatabaseConnection.d.ts +5 -0
- package/lib/ManagedDatabaseConnection.js +26 -0
- package/lib/ManagedDatabaseConnection.js.map +1 -1
- package/lib/Middleware.js +16 -0
- package/lib/Middleware.js.map +1 -1
- package/lib/MissingConfigError.js +15 -0
- package/lib/MissingConfigError.js.map +1 -1
- package/lib/MissingParameterError.js +15 -0
- package/lib/MissingParameterError.js.map +1 -1
- package/lib/MySQLConnection.js +24 -1
- package/lib/MySQLConnection.js.map +1 -1
- package/lib/MySQLDatabase.js +18 -0
- package/lib/MySQLDatabase.js.map +1 -1
- package/lib/NotImplementedError.d.ts +14 -0
- package/lib/NotImplementedError.js +40 -0
- package/lib/NotImplementedError.js.map +1 -0
- package/lib/Query.d.ts +21 -0
- package/lib/Query.js +37 -0
- package/lib/Query.js.map +1 -1
- package/lib/RawError.d.ts +14 -0
- package/lib/RawError.js +40 -0
- package/lib/RawError.js.map +1 -0
- package/lib/RawQuery.js +15 -0
- package/lib/RawQuery.js.map +1 -1
- package/lib/Request.js +15 -0
- package/lib/Request.js.map +1 -1
- package/lib/Response.js +17 -0
- package/lib/Response.js.map +1 -1
- package/lib/ResponseData.js +15 -0
- package/lib/ResponseData.js.map +1 -1
- package/lib/ServiceProvider.js +20 -0
- package/lib/ServiceProvider.js.map +1 -1
- package/lib/ServiceResponse.js +15 -0
- package/lib/ServiceResponse.js.map +1 -1
- package/lib/SetSessionVariableQuery.js +1 -0
- package/lib/SetSessionVariableQuery.js.map +1 -1
- package/lib/StatusCode.js +15 -0
- package/lib/StatusCode.js.map +1 -1
- package/lib/StormError.d.ts +7 -0
- package/lib/StormError.js +22 -0
- package/lib/StormError.js.map +1 -1
- package/lib/TemporaryTableQuery.js +15 -0
- package/lib/TemporaryTableQuery.js.map +1 -1
- package/lib/Token.js +15 -0
- package/lib/Token.js.map +1 -1
- package/lib/TokenManager.js +17 -0
- package/lib/TokenManager.js.map +1 -1
- package/lib/UnauthorizedAccessError.js +15 -0
- package/lib/UnauthorizedAccessError.js.map +1 -1
- package/lib/api.d.ts +2 -0
- package/lib/api.js +28 -1
- package/lib/api.js.map +1 -1
- package/lib/instance.js +15 -0
- package/lib/instance.js.map +1 -1
- package/lib/private/CommitQuery.js +15 -0
- package/lib/private/CommitQuery.js.map +1 -1
- package/lib/private/RollbackQuery.js +15 -0
- package/lib/private/RollbackQuery.js.map +1 -1
- package/lib/private/StartTransactionQuery.js +15 -0
- package/lib/private/StartTransactionQuery.js.map +1 -1
- package/package.json +1 -1
- package/src/Handler.ts +10 -9
- package/src/NotImplementedError.ts +45 -0
- package/src/Query.ts +8 -0
- package/src/RawError.ts +39 -0
- package/src/api.ts +2 -0
- package/tsconfig.json +0 -1
package/lib/ConfigLoader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigLoader.js","sourceRoot":"","sources":["../src/ConfigLoader.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ConfigLoader.js","sourceRoot":"","sources":["../src/ConfigLoader.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAEjD;;;;;;;;;;;;;;EAcE;AAEF,yCAAuC;AACvC,2CAAsC;AACtC,6BAA6B;AAG7B,6BAAsB;AACtB,sDAAsD;AACtD,6DAA0D;AAC1D,6DAA0D;AAE1D,MAAM,GAAG,GAAW,cAAc,CAAC;AAEnC,MAAa,YAAY;IACrB,gBAAuB,CAAC;IAEjB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAY;QACjC,IAAI,MAAM,GAAW,YAAY,CAAC,UAAU,EAAE,CAAC;QAE/C,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QAE3C,IAAI,MAAM,GAAY,EAAE,CAA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AAE,IAAI;oBAC1B,UAAU,EAAE,EAAE;iBACjB;aACJ;SACJ,CAAC,CAAC;QAEH,IAAI,OAAO,GAAY,QAAQ,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,EAAE;YACV,MAAM,IAAI,uCAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;SACzD;IACL,CAAC;IAEO,MAAM,CAAC,eAAe;QAC1B,IAAI,GAAG,GAAgB,IAAA,sBAAW,GAAE,CAAC;QACrC,IAAI,CAAC,GAAG,EAAE;YACN,OAAO,EAAE,CAAC;SACb;QAED,OAAO,GAAG,CAAC,cAAc,EAAE,CAAC;IAChC,CAAC;IAEO,MAAM,CAAC,UAAU;QACrB,IAAI,MAAc,CAAC;QAEnB,IAAI,CAAC,MAAM,EAAE;YACT,MAAM,GAAG,IAAI,eAAM,CAAC,cAAc,CAAC,CAAC;SACvC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAvLD,oCAuLC"}
|
package/lib/Database.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.Database = void 0;
|
|
4
19
|
const UUID = require("uuid");
|
package/lib/Database.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../src/Database.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../src/Database.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6BAA6B;AAE7B,yCAAyC;AAEzC,MAAM,WAAW,GAAW,QAAQ,CAAC;AACrC,MAAM,GAAG,GAAW,UAAU,CAAC;AAE/B,MAAsB,QAAQ;IAG1B;QACI,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;IAChC,CAAC;IAEM,SAAS,CAAC,MAAuB;QACpC,IAAI,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,SAAS,WAAW,mBAAmB,CAAC,CAAC;SAC5D;QAED,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IAEM,YAAY;QACf,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC3C,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAEM,QAAQ,CAAC,OAAe,EAAE,MAAuB;QACpD,IAAI,EAAE,GAAG,SAAS,IAAI,CAAC,EAAE,EAAE,IAAI,OAAO,EAAE,CAAC;QAEzC,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;QACpC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAE1B,OAAO,EAAE,CAAC;IACd,CAAC;IAEM,WAAW,CAAC,OAAe;QAC9B,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;YAClC,IAAA,sBAAW,GAAE,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,OAAO,iCAAiC,CAAC,CAAC;YACtF,OAAO;SACV;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAEM,aAAa,CAAC,qBAA8B,KAAK,EAAE,MAAe;QACrE,IAAI,KAAK,GAAW,QAAQ,CAAC;QAE7B,IAAI,MAAM,EAAE;YACR,KAAK,GAAG,MAAM,CAAC;SAClB;aACI,IAAI,kBAAkB,EAAE;YACzB,KAAK,GAAG,QAAQ,CAAC;SACpB;QAED,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;CAOJ;AA9DD,4BA8DC"}
|
|
@@ -4,6 +4,12 @@ import { IDatabaseConnection } from './IDatabaseConnection';
|
|
|
4
4
|
import { Query } from './Query';
|
|
5
5
|
export declare const LINGER_WARNING: number;
|
|
6
6
|
export declare const DEFAULT_QUERY_TIMEOUT: number;
|
|
7
|
+
/**
|
|
8
|
+
* Do not call `new Database` directly. Use `Database.getConnection` to create a `DatabaseConnection` object.
|
|
9
|
+
* @abstract
|
|
10
|
+
* @implements `IDatabaseConnection`
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
7
13
|
export declare abstract class DatabaseConnection<TAPI> implements IDatabaseConnection {
|
|
8
14
|
private $api;
|
|
9
15
|
private $readOnly;
|
|
@@ -14,22 +20,131 @@ export declare abstract class DatabaseConnection<TAPI> implements IDatabaseConne
|
|
|
14
20
|
constructor(api: TAPI, isReadOnly: boolean, instantiationStack: string);
|
|
15
21
|
private $triggerLingerWarning;
|
|
16
22
|
setInstantiationStack(stack: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the callback stacktrace to determine what opened
|
|
25
|
+
* this connection. Useful for debugging lingering connections.
|
|
26
|
+
* @returns string - A stacktrace
|
|
27
|
+
*/
|
|
17
28
|
getInstantiationStack(): string;
|
|
18
29
|
private $armLingerWarning;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the underlying Database API
|
|
32
|
+
* @returns any
|
|
33
|
+
*/
|
|
19
34
|
getAPI(): TAPI;
|
|
35
|
+
/**
|
|
36
|
+
* Returns true if connection was created without
|
|
37
|
+
* write access
|
|
38
|
+
* @returns boolean
|
|
39
|
+
*/
|
|
20
40
|
isReadOnly(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the timeout of this connectino
|
|
43
|
+
*
|
|
44
|
+
* @param timeout in milliseconds
|
|
45
|
+
*/
|
|
21
46
|
setTimeout(timeout: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the current timeout setting
|
|
49
|
+
* @returns number in milliseconds
|
|
50
|
+
*/
|
|
22
51
|
getTimeout(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Queries the database for a dataset.
|
|
54
|
+
*
|
|
55
|
+
* @param {Query} query The database query
|
|
56
|
+
* @async
|
|
57
|
+
* @returns Promise<TQueryResult>
|
|
58
|
+
*/
|
|
23
59
|
query<TQueryResult = any>(query: Query): Promise<TQueryResult>;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @param query The database query
|
|
63
|
+
* @param params Parameters for the query
|
|
64
|
+
* @param streamOptions Stream options
|
|
65
|
+
* @returns Readable
|
|
66
|
+
*/
|
|
24
67
|
stream(query: Query, streamOptions?: any): Readable;
|
|
68
|
+
/**
|
|
69
|
+
* Closes the connection. May error if connection has an active transaction.
|
|
70
|
+
* if `forceClose` boolean is true, it will force close the connection, regardless
|
|
71
|
+
* of transaction state.
|
|
72
|
+
*
|
|
73
|
+
* @param forceClose optional boolean
|
|
74
|
+
* @async
|
|
75
|
+
* @returns Promise<void>
|
|
76
|
+
*/
|
|
25
77
|
close(forceClose?: boolean): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Returns true if the connection has been closed.
|
|
80
|
+
*/
|
|
26
81
|
isClosed(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Implementation method to start a transaction.
|
|
84
|
+
*
|
|
85
|
+
* @abstract
|
|
86
|
+
* @async
|
|
87
|
+
* @returns Promise<void>
|
|
88
|
+
*/
|
|
27
89
|
abstract startTransaction(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Implementation method to determine if the connection is in an active transaction.
|
|
92
|
+
*
|
|
93
|
+
* @abstract
|
|
94
|
+
* @returns boolean
|
|
95
|
+
*/
|
|
28
96
|
abstract isTransaction(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Ends a transaction. if `requiresRollback` is `true`, then `rollback()` is invoked. Otherwise, `commit()` is invoked.
|
|
99
|
+
*
|
|
100
|
+
* @abstract
|
|
101
|
+
* @async
|
|
102
|
+
* @param requiresRollback optional boolean
|
|
103
|
+
* @returns Promise<void>
|
|
104
|
+
*/
|
|
29
105
|
abstract endTransaction(requiresRollback?: boolean): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Commits a transaction. This will end a transaction.
|
|
108
|
+
*
|
|
109
|
+
* @abstract
|
|
110
|
+
* @async
|
|
111
|
+
* @returns Promise<void>
|
|
112
|
+
*/
|
|
30
113
|
abstract commit(): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Rollsback a transaction. This will end a transaction.
|
|
116
|
+
*
|
|
117
|
+
* @abstract
|
|
118
|
+
* @async
|
|
119
|
+
* @returns Promise<void>
|
|
120
|
+
*/
|
|
31
121
|
abstract rollback(): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Implementation to close the connection, if `forceClose` is true, close the connection no matter what.
|
|
124
|
+
* Silently error if it means the connection is closed.
|
|
125
|
+
*
|
|
126
|
+
* @param forceClose boolean, if `true`, should close the connection no matter what.
|
|
127
|
+
* @async
|
|
128
|
+
* @returns Promise<void>
|
|
129
|
+
*/
|
|
32
130
|
protected abstract _close(forceClose: boolean): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Implementation method to return a dataset from the database
|
|
133
|
+
*
|
|
134
|
+
* @param query The database query
|
|
135
|
+
* @param params The query parameters
|
|
136
|
+
* @async
|
|
137
|
+
* @returns Promise
|
|
138
|
+
*/
|
|
33
139
|
protected abstract _query<TQueryResult>(query: string, params?: any): Promise<TQueryResult>;
|
|
140
|
+
/**
|
|
141
|
+
* Implementation method to return a dataset from the database like `query()`,
|
|
142
|
+
* but returns a `Readable` stream instead.
|
|
143
|
+
*
|
|
144
|
+
* @param query The database query
|
|
145
|
+
* @param params The query parameters
|
|
146
|
+
* @param streamOptions `Readable` stream options
|
|
147
|
+
* @returns `Readable`
|
|
148
|
+
*/
|
|
34
149
|
protected abstract _stream(query: string, params?: any, streamOptions?: any): Readable;
|
|
35
150
|
}
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DatabaseConnection = exports.DEFAULT_QUERY_TIMEOUT = exports.LINGER_WARNING = void 0;
|
|
4
19
|
const instance_1 = require("./instance");
|
|
5
20
|
exports.LINGER_WARNING = 10000;
|
|
6
21
|
exports.DEFAULT_QUERY_TIMEOUT = 3600000;
|
|
7
22
|
const TAG = 'DatabaseConnection';
|
|
23
|
+
/**
|
|
24
|
+
* Do not call `new Database` directly. Use `Database.getConnection` to create a `DatabaseConnection` object.
|
|
25
|
+
* @abstract
|
|
26
|
+
* @implements `IDatabaseConnection`
|
|
27
|
+
* @class
|
|
28
|
+
*/
|
|
8
29
|
class DatabaseConnection {
|
|
9
30
|
constructor(api, isReadOnly, instantiationStack) {
|
|
10
31
|
this.$api = api;
|
|
@@ -24,6 +45,11 @@ class DatabaseConnection {
|
|
|
24
45
|
setInstantiationStack(stack) {
|
|
25
46
|
this.$instantiationStack = stack;
|
|
26
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Gets the callback stacktrace to determine what opened
|
|
50
|
+
* this connection. Useful for debugging lingering connections.
|
|
51
|
+
* @returns string - A stacktrace
|
|
52
|
+
*/
|
|
27
53
|
getInstantiationStack() {
|
|
28
54
|
return this.$instantiationStack;
|
|
29
55
|
}
|
|
@@ -35,21 +61,46 @@ class DatabaseConnection {
|
|
|
35
61
|
this.$triggerLingerWarning();
|
|
36
62
|
}, exports.LINGER_WARNING);
|
|
37
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Gets the underlying Database API
|
|
66
|
+
* @returns any
|
|
67
|
+
*/
|
|
38
68
|
getAPI() {
|
|
39
69
|
return this.$api;
|
|
40
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns true if connection was created without
|
|
73
|
+
* write access
|
|
74
|
+
* @returns boolean
|
|
75
|
+
*/
|
|
41
76
|
isReadOnly() {
|
|
42
77
|
return this.$readOnly;
|
|
43
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Sets the timeout of this connectino
|
|
81
|
+
*
|
|
82
|
+
* @param timeout in milliseconds
|
|
83
|
+
*/
|
|
44
84
|
setTimeout(timeout) {
|
|
45
85
|
if (isNaN(timeout)) {
|
|
46
86
|
throw new TypeError('setTimeout expects a number in parameter 1.');
|
|
47
87
|
}
|
|
48
88
|
this.$timeout = timeout;
|
|
49
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Returns the current timeout setting
|
|
92
|
+
* @returns number in milliseconds
|
|
93
|
+
*/
|
|
50
94
|
getTimeout() {
|
|
51
95
|
return this.$timeout;
|
|
52
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Queries the database for a dataset.
|
|
99
|
+
*
|
|
100
|
+
* @param {Query} query The database query
|
|
101
|
+
* @async
|
|
102
|
+
* @returns Promise<TQueryResult>
|
|
103
|
+
*/
|
|
53
104
|
async query(query) {
|
|
54
105
|
this.$armLingerWarning();
|
|
55
106
|
let queryStr = null;
|
|
@@ -59,6 +110,14 @@ class DatabaseConnection {
|
|
|
59
110
|
let results = await this._query(queryStr, params);
|
|
60
111
|
return await query.onPostProcess(this, results);
|
|
61
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @param query The database query
|
|
116
|
+
* @param params Parameters for the query
|
|
117
|
+
* @param streamOptions Stream options
|
|
118
|
+
* @returns Readable
|
|
119
|
+
*/
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
62
121
|
stream(query, streamOptions) {
|
|
63
122
|
this.$armLingerWarning();
|
|
64
123
|
let queryStr = null;
|
|
@@ -66,6 +125,15 @@ class DatabaseConnection {
|
|
|
66
125
|
queryStr = query.getQuery(this);
|
|
67
126
|
return this._stream(queryStr, params, streamOptions);
|
|
68
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Closes the connection. May error if connection has an active transaction.
|
|
130
|
+
* if `forceClose` boolean is true, it will force close the connection, regardless
|
|
131
|
+
* of transaction state.
|
|
132
|
+
*
|
|
133
|
+
* @param forceClose optional boolean
|
|
134
|
+
* @async
|
|
135
|
+
* @returns Promise<void>
|
|
136
|
+
*/
|
|
69
137
|
close(forceClose = false) {
|
|
70
138
|
if (this.isClosed()) {
|
|
71
139
|
return Promise.resolve();
|
|
@@ -74,6 +142,9 @@ class DatabaseConnection {
|
|
|
74
142
|
clearTimeout(this.$lingerTimer);
|
|
75
143
|
return this._close(forceClose);
|
|
76
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Returns true if the connection has been closed.
|
|
147
|
+
*/
|
|
77
148
|
isClosed() {
|
|
78
149
|
return !this.$open;
|
|
79
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseConnection.js","sourceRoot":"","sources":["../src/DatabaseConnection.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DatabaseConnection.js","sourceRoot":"","sources":["../src/DatabaseConnection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,yCAEoB;AAMP,QAAA,cAAc,GAAW,KAAK,CAAC;AAC/B,QAAA,qBAAqB,GAAW,OAAO,CAAC;AACrD,MAAM,GAAG,GAAW,oBAAoB,CAAC;AAEzC;;;;;GAKG;AACH,MAAsB,kBAAkB;IAQpC,YAAmB,GAAS,EAAE,UAAmB,EAAE,kBAA0B;QACzE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;QAC5B,IAAI,CAAC,mBAAmB,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAElB,IAAI,MAAM,GAAY,IAAA,sBAAW,GAAE,CAAC,SAAS,EAAE,CAAC;QAEhD,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;QACvE,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACtB,IAAI,CAAC,QAAQ,GAAG,6BAAqB,CAAC;SACzC;QAED,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAEO,qBAAqB;QACzB,IAAA,sBAAW,GAAE,CAAC,SAAS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AAC;QAC7B,IAAI,OAAO,GAAiB,MAAM,IAAI,CAAC,MAAM,CAAe,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9E,OAAO,MAAY,KAAK,CAAC,aAAa,CAAC,IAAI,EAAO,OAAO,CAAE,CAAC;IAChE,CAAC;IAED;;;;;;OAMG;IACH,6EAA6E;IACtE,MAAM,CAAC,KAAY,EAAE,aAAmB;QAC3C,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,QAAQ,GAAW,IAAI,CAAC;QAC5B,IAAI,MAAM,GAAqB,KAAK,CAAC,qBAAqB,EAAE,CAAC;QAC7D,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,aAAsB,KAAK;QACpC,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC5B;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,QAAQ;QACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;IACvB,CAAC;CA+EJ;AAnOD,gDAmOC"}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DatabaseQueryError = void 0;
|
|
4
19
|
const StormError_1 = require("./StormError");
|
|
5
20
|
const StatusCode_1 = require("./StatusCode");
|
|
6
21
|
class DatabaseQueryError extends StormError_1.StormError {
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
7
23
|
constructor(query, error) {
|
|
8
24
|
super({
|
|
9
25
|
query: query,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseQueryError.js","sourceRoot":"","sources":["../src/DatabaseQueryError.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DatabaseQueryError.js","sourceRoot":"","sources":["../src/DatabaseQueryError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,6CAAwC;AAExC,MAAa,kBAAmB,SAAQ,uBAGtC;IACE,6EAA6E;IAC7E,YAAmB,KAAa,EAAE,KAAU;QACxC,KAAK,CAAC;YACF,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACf,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAEM,OAAO;QACV,OAAO,CAAC,CAAC;IACb,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,cAAc,CAAC;IACrC,CAAC;CACJ;AAvBD,gDAuBC"}
|
package/lib/DiskSpaceError.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DiskSpaceError = void 0;
|
|
4
19
|
const StormError_1 = require("./StormError");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiskSpaceError.js","sourceRoot":"","sources":["../src/DiskSpaceError.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DiskSpaceError.js","sourceRoot":"","sources":["../src/DiskSpaceError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,2CAAsC;AACtC,6CAAwC;AAExC,MAAa,cAAe,SAAQ,uBAAU;IAC1C,YAAmB,aAAqB;QACpC,KAAK,CAAC;YACF,KAAK,EAAE,aAAa;SACvB,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,OAAO,iBAAiB,CAAC;IAC7B,CAAC;IAEM,OAAO;QACV,OAAO,qBAAS,CAAC,uBAAuB,CAAC;IAC7C,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,cAAc,CAAC;IACrC,CAAC;CACJ;AAlBD,wCAkBC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DropTemporaryTableQuery = void 0;
|
|
4
19
|
const Query_1 = require("./Query");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropTemporaryTableQuery.js","sourceRoot":"","sources":["../src/DropTemporaryTableQuery.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DropTemporaryTableQuery.js","sourceRoot":"","sources":["../src/DropTemporaryTableQuery.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,mCAA8B;AAM9B,MAAa,uBAAwB,SAAQ,aAAoC;IAEtE,aAAa;QAChB,OAAsC,KAAK,CAAC,aAAa,EAAE,CAAC;IAChE,CAAC;IAES,SAAS;QACf,OAAO;qCACsB,IAAI,CAAC,aAAa,EAAE,CAAC,SAAS;SAC1D,CAAC;IACN,CAAC;CACJ;AAXD,0DAWC"}
|
package/lib/DumpStream.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DumpStream = void 0;
|
|
4
19
|
const FileSystem = require("fs");
|
|
5
20
|
class DumpStream {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
6
22
|
constructor() { }
|
|
7
23
|
static getWritable() {
|
|
8
24
|
return FileSystem.createWriteStream('/dev/null');
|
package/lib/DumpStream.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DumpStream.js","sourceRoot":"","sources":["../src/DumpStream.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DumpStream.js","sourceRoot":"","sources":["../src/DumpStream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,iCAAiC;AAGjC,MAAa,UAAU;IAEnB,gEAAgE;IAChE,gBAAuB,CAAC;IAEjB,MAAM,CAAC,WAAW;QACrB,OAAO,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;CACJ;AARD,gCAQC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.DuplicateEntryError = void 0;
|
|
4
19
|
const StormError_1 = require("./StormError");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DuplicateEntryError.js","sourceRoot":"","sources":["../src/DuplicateEntryError.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DuplicateEntryError.js","sourceRoot":"","sources":["../src/DuplicateEntryError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,2CAAsC;AACtC,6CAAwC;AAQxC,MAAa,mBAAoB,SAAQ,uBAAU;IAC/C,YAAmB,MAAc,EAAE,IAAY,EAAE,WAAmB,MAAM;QACtE,KAAK,CAAC;YACF,MAAM;YACN,IAAI;YACJ,QAAQ;SACX,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,IAAI,OAAO,GAAgC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO,GAAG,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,IAAI,mBAAmB,CAAC;IAC9F,CAAC;IAEM,OAAO;QACV,OAAO,qBAAS,CAAC,eAAe,CAAC;IACrC,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,eAAe,CAAC;IACtC,CAAC;CACJ;AArBD,kDAqBC"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.EntityNotFoundError = void 0;
|
|
4
19
|
const StormError_1 = require("./StormError");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityNotFoundError.js","sourceRoot":"","sources":["../src/EntityNotFoundError.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"EntityNotFoundError.js","sourceRoot":"","sources":["../src/EntityNotFoundError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,2CAAsC;AACtC,6CAAwC;AAExC,MAAa,mBAAoB,SAAQ,uBAAU;IAC/C,YAAmB,IAAY;QAC3B,KAAK,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IACxB,CAAC;IAEM,UAAU;QACb,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,mBAAmB,CAAC;IAC/D,CAAC;IAEM,OAAO;QACV,OAAO,qBAAS,CAAC,aAAa,CAAC;IACnC,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,aAAa,CAAC;IACpC,CAAC;CACJ;AAhBD,kDAgBC"}
|
package/lib/ErrorCode.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.ErrorCode = void 0;
|
|
4
19
|
var ErrorCode;
|
package/lib/ErrorCode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorCode.js","sourceRoot":"","sources":["../src/ErrorCode.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ErrorCode.js","sourceRoot":"","sources":["../src/ErrorCode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,IAAY,SAUX;AAVD,WAAY,SAAS;IACjB,iDAAQ,CAAA;IACR,mEAAiB,CAAA;IACjB,2DAAa,CAAA;IACb,uEAAmB,CAAA;IACnB,2DAAa,CAAA;IACb,+DAAe,CAAA;IACf,uEAAmB,CAAA;IACnB,+EAAuB,CAAA;IACvB,6DAAc,CAAA;AAClB,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB"}
|
package/lib/ExitCode.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.ExitCode = void 0;
|
|
4
19
|
var ExitCode;
|
package/lib/ExitCode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExitCode.js","sourceRoot":"","sources":["../src/ExitCode.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExitCode.js","sourceRoot":"","sources":["../src/ExitCode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,IAAY,QAGX;AAHD,WAAY,QAAQ;IAChB,2DAAkB,CAAA;IAClB,2DAAkB,CAAA;AACtB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB"}
|
package/lib/ExpiredTokenError.js
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.ExpiredTokenError = void 0;
|
|
4
19
|
const StormError_1 = require("./StormError");
|
|
5
20
|
const ErrorCode_1 = require("./ErrorCode");
|
|
6
21
|
const StatusCode_1 = require("./StatusCode");
|
|
7
22
|
class ExpiredTokenError extends StormError_1.StormError {
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
8
24
|
constructor(details) {
|
|
9
25
|
super(details);
|
|
10
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpiredTokenError.js","sourceRoot":"","sources":["../src/ExpiredTokenError.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExpiredTokenError.js","sourceRoot":"","sources":["../src/ExpiredTokenError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,2CAAsC;AACtC,6CAAwC;AAExC,MAAa,iBAAkB,SAAQ,uBAAe;IAClD,6EAA6E;IAC7E,YAAmB,OAAa;QAC5B,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAEM,UAAU;QACb,OAAO,iCAAiC,CAAC;IAC7C,CAAC;IAEM,OAAO;QACV,OAAO,qBAAS,CAAC,aAAa,CAAC;IACnC,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,gBAAgB,CAAC;IACvC,CAAC;CACJ;AAjBD,8CAiBC"}
|
package/lib/HTTPMethod.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2017-2021 Norman Breau
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.HTTPMethod = void 0;
|
|
4
19
|
var HTTPMethod;
|
package/lib/HTTPMethod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPMethod.js","sourceRoot":"","sources":["../src/HTTPMethod.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"HTTPMethod.js","sourceRoot":"","sources":["../src/HTTPMethod.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,yBAAe,CAAA;IACf,2BAAgB,CAAA;IAChB,yBAAe,CAAA;IACf,+BAAkB,CAAA;AACtB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"}
|