@breautek/storm 4.3.0 → 4.4.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 -0
- package/docs/README.md +28 -20
- package/docs/classes/Application.md +158 -76
- package/docs/classes/BackendAuthenticationMiddleware.md +3 -3
- package/docs/classes/CORSMiddleware.md +8 -8
- package/docs/classes/ConfigLoader.md +1 -1
- package/docs/classes/Database.md +12 -12
- package/docs/classes/DatabaseConnection.md +42 -40
- package/docs/classes/DatabaseQueryError.md +22 -18
- package/docs/classes/DeadLockError.md +349 -0
- package/docs/classes/DiskSpaceError.md +20 -18
- package/docs/classes/DropTemporaryTableQuery.md +8 -8
- package/docs/classes/DumpStream.md +1 -1
- package/docs/classes/DuplicateEntryError.md +20 -18
- package/docs/classes/EntityNotFoundError.md +20 -18
- package/docs/classes/ExpiredTokenError.md +20 -18
- package/docs/classes/Handler.md +14 -14
- package/docs/classes/InternalError.md +20 -18
- package/docs/classes/InvalidCredentialsError.md +20 -18
- package/docs/classes/InvalidValueError.md +20 -18
- package/docs/classes/ManagedDatabaseConnection.md +19 -19
- package/docs/classes/Middleware.md +3 -3
- package/docs/classes/MissingConfigError.md +20 -18
- package/docs/classes/MissingParameterError.md +20 -18
- package/docs/classes/MySQLConnection.md +73 -43
- package/docs/classes/MySQLDatabase.md +13 -13
- package/docs/classes/NotImplementedError.md +20 -18
- package/docs/classes/Query.md +8 -8
- package/docs/classes/RawError.md +20 -20
- package/docs/classes/RawQuery.md +8 -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 +8 -8
- package/docs/classes/StormError.md +20 -18
- package/docs/classes/TemporaryTableQuery.md +8 -8
- package/docs/classes/Token.md +2 -2
- package/docs/classes/TokenManager.md +4 -4
- package/docs/classes/UnauthorizedAccessError.md +20 -18
- package/docs/enums/ErrorCode.md +18 -18
- package/docs/enums/ExitCode.md +4 -4
- package/docs/enums/HTTPMethod.md +8 -8
- package/docs/enums/JWTError.md +4 -4
- package/docs/enums/StatusCode.md +96 -96
- 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 +5 -5
- 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/docs/interfaces/formidable.File.md +3 -1
- package/docs/interfaces/formidable.FileJSON.md +3 -1
- package/docs/interfaces/formidable.Options.md +33 -11
- package/docs/interfaces/formidable.Part.md +65 -35
- package/lib/DeadLockError.d.ts +6 -0
- package/lib/DeadLockError.js +26 -0
- package/lib/DeadLockError.js.map +1 -0
- package/lib/MySQLConnection.js +9 -1
- package/lib/MySQLConnection.js.map +1 -1
- package/lib/api.d.ts +1 -0
- package/lib/api.js +3 -1
- package/lib/api.js.map +1 -1
- package/package.json +19 -18
- package/src/DeadLockError.ts +22 -0
- package/src/MySQLConnection.ts +11 -1
- package/src/api.ts +1 -0
|
@@ -86,7 +86,9 @@ node_modules/@types/formidable/index.d.ts:187
|
|
|
86
86
|
|
|
87
87
|
Alias for `emitter.on(eventName, listener)`.
|
|
88
88
|
|
|
89
|
-
**`
|
|
89
|
+
**`Since`**
|
|
90
|
+
|
|
91
|
+
v0.1.26
|
|
90
92
|
|
|
91
93
|
#### Parameters
|
|
92
94
|
|
|
@@ -105,7 +107,7 @@ Stream.addListener
|
|
|
105
107
|
|
|
106
108
|
#### Defined in
|
|
107
109
|
|
|
108
|
-
node_modules/@types/node/events.d.ts:
|
|
110
|
+
node_modules/@types/node/ts4.8/events.d.ts:354
|
|
109
111
|
|
|
110
112
|
___
|
|
111
113
|
|
|
@@ -151,7 +153,9 @@ myEmitter.emit('event', 1, 2, 3, 4, 5);
|
|
|
151
153
|
// event with parameters 1, 2, 3, 4, 5 in third listener
|
|
152
154
|
```
|
|
153
155
|
|
|
154
|
-
**`
|
|
156
|
+
**`Since`**
|
|
157
|
+
|
|
158
|
+
v0.1.26
|
|
155
159
|
|
|
156
160
|
#### Parameters
|
|
157
161
|
|
|
@@ -170,7 +174,7 @@ Stream.emit
|
|
|
170
174
|
|
|
171
175
|
#### Defined in
|
|
172
176
|
|
|
173
|
-
node_modules/@types/node/events.d.ts:
|
|
177
|
+
node_modules/@types/node/ts4.8/events.d.ts:610
|
|
174
178
|
|
|
175
179
|
___
|
|
176
180
|
|
|
@@ -194,7 +198,9 @@ console.log(myEE.eventNames());
|
|
|
194
198
|
// Prints: [ 'foo', 'bar', Symbol(symbol) ]
|
|
195
199
|
```
|
|
196
200
|
|
|
197
|
-
**`
|
|
201
|
+
**`Since`**
|
|
202
|
+
|
|
203
|
+
v6.0.0
|
|
198
204
|
|
|
199
205
|
#### Returns
|
|
200
206
|
|
|
@@ -206,7 +212,7 @@ Stream.eventNames
|
|
|
206
212
|
|
|
207
213
|
#### Defined in
|
|
208
214
|
|
|
209
|
-
node_modules/@types/node/events.d.ts:
|
|
215
|
+
node_modules/@types/node/ts4.8/events.d.ts:669
|
|
210
216
|
|
|
211
217
|
___
|
|
212
218
|
|
|
@@ -215,9 +221,11 @@ ___
|
|
|
215
221
|
▸ **getMaxListeners**(): `number`
|
|
216
222
|
|
|
217
223
|
Returns the current max listener value for the `EventEmitter` which is either
|
|
218
|
-
set by `emitter.setMaxListeners(n)` or defaults to
|
|
224
|
+
set by `emitter.setMaxListeners(n)` or defaults to defaultMaxListeners.
|
|
225
|
+
|
|
226
|
+
**`Since`**
|
|
219
227
|
|
|
220
|
-
|
|
228
|
+
v1.0.0
|
|
221
229
|
|
|
222
230
|
#### Returns
|
|
223
231
|
|
|
@@ -229,7 +237,7 @@ Stream.getMaxListeners
|
|
|
229
237
|
|
|
230
238
|
#### Defined in
|
|
231
239
|
|
|
232
|
-
node_modules/@types/node/events.d.ts:
|
|
240
|
+
node_modules/@types/node/ts4.8/events.d.ts:526
|
|
233
241
|
|
|
234
242
|
___
|
|
235
243
|
|
|
@@ -239,7 +247,9 @@ ___
|
|
|
239
247
|
|
|
240
248
|
Returns the number of listeners listening to the event named `eventName`.
|
|
241
249
|
|
|
242
|
-
**`
|
|
250
|
+
**`Since`**
|
|
251
|
+
|
|
252
|
+
v3.2.0
|
|
243
253
|
|
|
244
254
|
#### Parameters
|
|
245
255
|
|
|
@@ -257,7 +267,7 @@ Stream.listenerCount
|
|
|
257
267
|
|
|
258
268
|
#### Defined in
|
|
259
269
|
|
|
260
|
-
node_modules/@types/node/events.d.ts:
|
|
270
|
+
node_modules/@types/node/ts4.8/events.d.ts:616
|
|
261
271
|
|
|
262
272
|
___
|
|
263
273
|
|
|
@@ -275,7 +285,9 @@ console.log(util.inspect(server.listeners('connection')));
|
|
|
275
285
|
// Prints: [ [Function] ]
|
|
276
286
|
```
|
|
277
287
|
|
|
278
|
-
**`
|
|
288
|
+
**`Since`**
|
|
289
|
+
|
|
290
|
+
v0.1.26
|
|
279
291
|
|
|
280
292
|
#### Parameters
|
|
281
293
|
|
|
@@ -293,7 +305,7 @@ Stream.listeners
|
|
|
293
305
|
|
|
294
306
|
#### Defined in
|
|
295
307
|
|
|
296
|
-
node_modules/@types/node/events.d.ts:
|
|
308
|
+
node_modules/@types/node/ts4.8/events.d.ts:539
|
|
297
309
|
|
|
298
310
|
___
|
|
299
311
|
|
|
@@ -303,7 +315,9 @@ ___
|
|
|
303
315
|
|
|
304
316
|
Alias for `emitter.removeListener()`.
|
|
305
317
|
|
|
306
|
-
**`
|
|
318
|
+
**`Since`**
|
|
319
|
+
|
|
320
|
+
v10.0.0
|
|
307
321
|
|
|
308
322
|
#### Parameters
|
|
309
323
|
|
|
@@ -322,7 +336,7 @@ Stream.off
|
|
|
322
336
|
|
|
323
337
|
#### Defined in
|
|
324
338
|
|
|
325
|
-
node_modules/@types/node/events.d.ts:
|
|
339
|
+
node_modules/@types/node/ts4.8/events.d.ts:499
|
|
326
340
|
|
|
327
341
|
___
|
|
328
342
|
|
|
@@ -356,7 +370,9 @@ myEE.emit('foo');
|
|
|
356
370
|
// a
|
|
357
371
|
```
|
|
358
372
|
|
|
359
|
-
**`
|
|
373
|
+
**`Since`**
|
|
374
|
+
|
|
375
|
+
v0.1.101
|
|
360
376
|
|
|
361
377
|
#### Parameters
|
|
362
378
|
|
|
@@ -375,7 +391,7 @@ Stream.on
|
|
|
375
391
|
|
|
376
392
|
#### Defined in
|
|
377
393
|
|
|
378
|
-
node_modules/@types/node/events.d.ts:
|
|
394
|
+
node_modules/@types/node/ts4.8/events.d.ts:385
|
|
379
395
|
|
|
380
396
|
___
|
|
381
397
|
|
|
@@ -407,7 +423,9 @@ myEE.emit('foo');
|
|
|
407
423
|
// a
|
|
408
424
|
```
|
|
409
425
|
|
|
410
|
-
**`
|
|
426
|
+
**`Since`**
|
|
427
|
+
|
|
428
|
+
v0.3.0
|
|
411
429
|
|
|
412
430
|
#### Parameters
|
|
413
431
|
|
|
@@ -426,7 +444,7 @@ Stream.once
|
|
|
426
444
|
|
|
427
445
|
#### Defined in
|
|
428
446
|
|
|
429
|
-
node_modules/@types/node/events.d.ts:
|
|
447
|
+
node_modules/@types/node/ts4.8/events.d.ts:414
|
|
430
448
|
|
|
431
449
|
___
|
|
432
450
|
|
|
@@ -458,7 +476,7 @@ Stream.pipe
|
|
|
458
476
|
|
|
459
477
|
#### Defined in
|
|
460
478
|
|
|
461
|
-
node_modules/@types/node/stream.d.ts:
|
|
479
|
+
node_modules/@types/node/ts4.8/stream.d.ts:26
|
|
462
480
|
|
|
463
481
|
___
|
|
464
482
|
|
|
@@ -479,7 +497,9 @@ server.prependListener('connection', (stream) => {
|
|
|
479
497
|
|
|
480
498
|
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
481
499
|
|
|
482
|
-
**`
|
|
500
|
+
**`Since`**
|
|
501
|
+
|
|
502
|
+
v6.0.0
|
|
483
503
|
|
|
484
504
|
#### Parameters
|
|
485
505
|
|
|
@@ -498,7 +518,7 @@ Stream.prependListener
|
|
|
498
518
|
|
|
499
519
|
#### Defined in
|
|
500
520
|
|
|
501
|
-
node_modules/@types/node/events.d.ts:
|
|
521
|
+
node_modules/@types/node/ts4.8/events.d.ts:634
|
|
502
522
|
|
|
503
523
|
___
|
|
504
524
|
|
|
@@ -506,7 +526,7 @@ ___
|
|
|
506
526
|
|
|
507
527
|
▸ **prependOnceListener**(`eventName`, `listener`): [`Part`](formidable.Part.md)
|
|
508
528
|
|
|
509
|
-
Adds a **one-time**`listener` function for the event named `eventName` to
|
|
529
|
+
Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
|
|
510
530
|
listener is removed, and then invoked.
|
|
511
531
|
|
|
512
532
|
```js
|
|
@@ -517,7 +537,9 @@ server.prependOnceListener('connection', (stream) => {
|
|
|
517
537
|
|
|
518
538
|
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
519
539
|
|
|
520
|
-
**`
|
|
540
|
+
**`Since`**
|
|
541
|
+
|
|
542
|
+
v6.0.0
|
|
521
543
|
|
|
522
544
|
#### Parameters
|
|
523
545
|
|
|
@@ -536,7 +558,7 @@ Stream.prependOnceListener
|
|
|
536
558
|
|
|
537
559
|
#### Defined in
|
|
538
560
|
|
|
539
|
-
node_modules/@types/node/events.d.ts:
|
|
561
|
+
node_modules/@types/node/ts4.8/events.d.ts:650
|
|
540
562
|
|
|
541
563
|
___
|
|
542
564
|
|
|
@@ -571,7 +593,9 @@ newListeners[0]();
|
|
|
571
593
|
emitter.emit('log');
|
|
572
594
|
```
|
|
573
595
|
|
|
574
|
-
**`
|
|
596
|
+
**`Since`**
|
|
597
|
+
|
|
598
|
+
v9.4.0
|
|
575
599
|
|
|
576
600
|
#### Parameters
|
|
577
601
|
|
|
@@ -589,7 +613,7 @@ Stream.rawListeners
|
|
|
589
613
|
|
|
590
614
|
#### Defined in
|
|
591
615
|
|
|
592
|
-
node_modules/@types/node/events.d.ts:
|
|
616
|
+
node_modules/@types/node/ts4.8/events.d.ts:569
|
|
593
617
|
|
|
594
618
|
___
|
|
595
619
|
|
|
@@ -605,7 +629,9 @@ component or module (e.g. sockets or file streams).
|
|
|
605
629
|
|
|
606
630
|
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
607
631
|
|
|
608
|
-
**`
|
|
632
|
+
**`Since`**
|
|
633
|
+
|
|
634
|
+
v0.1.26
|
|
609
635
|
|
|
610
636
|
#### Parameters
|
|
611
637
|
|
|
@@ -623,7 +649,7 @@ Stream.removeAllListeners
|
|
|
623
649
|
|
|
624
650
|
#### Defined in
|
|
625
651
|
|
|
626
|
-
node_modules/@types/node/events.d.ts:
|
|
652
|
+
node_modules/@types/node/ts4.8/events.d.ts:510
|
|
627
653
|
|
|
628
654
|
___
|
|
629
655
|
|
|
@@ -648,8 +674,8 @@ listener array for the specified `eventName`, then `removeListener()` must be
|
|
|
648
674
|
called multiple times to remove each instance.
|
|
649
675
|
|
|
650
676
|
Once an event is emitted, all listeners attached to it at the
|
|
651
|
-
time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting
|
|
652
|
-
not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
677
|
+
time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
|
|
678
|
+
will not remove them from`emit()` in progress. Subsequent events behave as expected.
|
|
653
679
|
|
|
654
680
|
```js
|
|
655
681
|
const myEmitter = new MyEmitter();
|
|
@@ -708,7 +734,9 @@ ee.emit('ping');
|
|
|
708
734
|
|
|
709
735
|
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
710
736
|
|
|
711
|
-
**`
|
|
737
|
+
**`Since`**
|
|
738
|
+
|
|
739
|
+
v0.1.26
|
|
712
740
|
|
|
713
741
|
#### Parameters
|
|
714
742
|
|
|
@@ -727,7 +755,7 @@ Stream.removeListener
|
|
|
727
755
|
|
|
728
756
|
#### Defined in
|
|
729
757
|
|
|
730
|
-
node_modules/@types/node/events.d.ts:
|
|
758
|
+
node_modules/@types/node/ts4.8/events.d.ts:494
|
|
731
759
|
|
|
732
760
|
___
|
|
733
761
|
|
|
@@ -742,7 +770,9 @@ modified for this specific `EventEmitter` instance. The value can be set to`Infi
|
|
|
742
770
|
|
|
743
771
|
Returns a reference to the `EventEmitter`, so that calls can be chained.
|
|
744
772
|
|
|
745
|
-
**`
|
|
773
|
+
**`Since`**
|
|
774
|
+
|
|
775
|
+
v0.3.5
|
|
746
776
|
|
|
747
777
|
#### Parameters
|
|
748
778
|
|
|
@@ -760,4 +790,4 @@ Stream.setMaxListeners
|
|
|
760
790
|
|
|
761
791
|
#### Defined in
|
|
762
792
|
|
|
763
|
-
node_modules/@types/node/events.d.ts:
|
|
793
|
+
node_modules/@types/node/ts4.8/events.d.ts:520
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DeadLockError = void 0;
|
|
19
|
+
const DatabaseQueryError_1 = require("./DatabaseQueryError");
|
|
20
|
+
/**
|
|
21
|
+
* DeadLockError is a DatabaseQueryError but is subclasses for typing purposes.
|
|
22
|
+
*/
|
|
23
|
+
class DeadLockError extends DatabaseQueryError_1.DatabaseQueryError {
|
|
24
|
+
}
|
|
25
|
+
exports.DeadLockError = DeadLockError;
|
|
26
|
+
//# sourceMappingURL=DeadLockError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeadLockError.js","sourceRoot":"","sources":["../src/DeadLockError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6DAAwD;AAExD;;GAEG;AACH,MAAa,aAAc,SAAQ,uCAAkB;CAAG;AAAxD,sCAAwD"}
|
package/lib/MySQLConnection.js
CHANGED
|
@@ -24,6 +24,7 @@ const CommitQuery_1 = require("./private/CommitQuery");
|
|
|
24
24
|
const RollbackQuery_1 = require("./private/RollbackQuery");
|
|
25
25
|
const SQLFormatter = require("sql-formatter");
|
|
26
26
|
const logger_1 = require("@arashi/logger");
|
|
27
|
+
const DeadLockError_1 = require("./DeadLockError");
|
|
27
28
|
const DEFAULT_HIGH_WATERMARK = 512; // in number of result objects
|
|
28
29
|
const TAG = 'MySQLConnection';
|
|
29
30
|
const SQL_FORMATTING_OPTIONS = {
|
|
@@ -80,7 +81,14 @@ class MySQLConnection extends DatabaseConnection_1.DatabaseConnection {
|
|
|
80
81
|
logger.warn(TAG, ex);
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
let e = null;
|
|
85
|
+
if (error.code === 'ER_LOCK_DEADLOCK') {
|
|
86
|
+
e = new DeadLockError_1.DeadLockError(sql, error);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
e = new DatabaseQueryError_1.DatabaseQueryError(sql, error);
|
|
90
|
+
}
|
|
91
|
+
return reject(e);
|
|
84
92
|
}
|
|
85
93
|
return resolve(results);
|
|
86
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MySQLConnection.js","sourceRoot":"","sources":["../src/MySQLConnection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6DAAwD;AACxD,6DAAwD;AACxD,yCAAuC;AAIvC,2EAAwE;AACxE,uDAAoD;AACpD,2DAAwD;AACxD,8CAA8C;AAC9C,2CAAkD;AAElD,MAAM,sBAAsB,GAAW,GAAG,CAAC,CAAC,8BAA8B;AAC1E,MAAM,GAAG,GAAW,iBAAiB,CAAC;AAEtC,MAAM,sBAAsB,GAA+B;IACvD,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,IAAI;CAClB,CAAC;AAEF,IAAI,qBAAqB,GAAU,IAAI,6CAAqB,EAAE,CAAC;AAC/D,IAAI,WAAW,GAAU,IAAI,yBAAW,EAAE,CAAC;AAC3C,IAAI,aAAa,GAAU,IAAI,6BAAa,EAAE,CAAC;AAE/C,MAAa,eAAgB,SAAQ,uCAAwC;IAIzE,YAAmB,UAAgC,EAAE,kBAA0B,EAAE,aAAsB,IAAI;QACvG,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;QAElD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1B,UAAU,CAAC,MAAM,CAAC,WAAW,GAAG,UAAS,KAAa,EAAE,MAAW;YAC/D,IAAI,CAAC,MAAM;gBAAE,OAAO,KAAK,CAAC;YAE1B,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,UAAoB,GAAW,EAAE,GAAW;gBACxE,iDAAiD;gBACjD,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBAC5B,OAAO,IAAI,CAAC,MAAM,CAA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AG,OAAO,CAAC,OAAO,EAAE,CAAC;aACvC;YAED,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE;gBACtB,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;gBACpB,IAAA,sBAAW,GAAE,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;gBAC5C,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA3LD,0CA2LC"}
|
package/lib/api.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { DuplicateEntryError } from './DuplicateEntryError';
|
|
|
30
30
|
export { MissingConfigError } from './MissingConfigError';
|
|
31
31
|
export { DatabaseQueryError } from './DatabaseQueryError';
|
|
32
32
|
export { NotImplementedError } from './NotImplementedError';
|
|
33
|
+
export { DeadLockError } from './DeadLockError';
|
|
33
34
|
export { StatusCode } from './StatusCode';
|
|
34
35
|
export { Middleware } from './Middleware';
|
|
35
36
|
export { Request, IParameterMap } from './Request';
|
package/lib/api.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.formidable = exports.DumpStream = exports.ExitCode = exports.TokenManager = exports.Token = exports.BackendAuthenticationMiddleware = exports.ServiceResponse = exports.HTTPMethod = exports.ServiceProvider = exports.CORSMiddleware = exports.Handler = exports.ResponseData = exports.Response = exports.Request = exports.Middleware = exports.StatusCode = exports.NotImplementedError = exports.DatabaseQueryError = exports.MissingConfigError = exports.DuplicateEntryError = exports.DiskSpaceError = exports.EntityNotFoundError = exports.UnauthorizedAccessError = exports.InvalidValueError = exports.ExpiredTokenError = exports.InternalError = exports.InvalidCredentialsError = exports.MissingParameterError = exports.JWTError = exports.StormError = exports.RawError = exports.ErrorCode = exports.SetSessionVariableQuery = exports.RawQuery = exports.DropTemporaryTableQuery = exports.TemporaryTableQuery = exports.Query = exports.ManagedDatabaseConnection = exports.MySQLConnection = exports.MySQLDatabase = exports.DatabaseConnection = exports.Database = exports.ConfigLoader = exports.Application = exports.getInstance = void 0;
|
|
18
|
+
exports.formidable = exports.DumpStream = exports.ExitCode = exports.TokenManager = exports.Token = exports.BackendAuthenticationMiddleware = exports.ServiceResponse = exports.HTTPMethod = exports.ServiceProvider = exports.CORSMiddleware = exports.Handler = exports.ResponseData = exports.Response = exports.Request = exports.Middleware = exports.StatusCode = exports.DeadLockError = exports.NotImplementedError = exports.DatabaseQueryError = exports.MissingConfigError = exports.DuplicateEntryError = exports.DiskSpaceError = exports.EntityNotFoundError = exports.UnauthorizedAccessError = exports.InvalidValueError = exports.ExpiredTokenError = exports.InternalError = exports.InvalidCredentialsError = exports.MissingParameterError = exports.JWTError = exports.StormError = exports.RawError = exports.ErrorCode = exports.SetSessionVariableQuery = exports.RawQuery = exports.DropTemporaryTableQuery = exports.TemporaryTableQuery = exports.Query = exports.ManagedDatabaseConnection = exports.MySQLConnection = exports.MySQLDatabase = exports.DatabaseConnection = exports.Database = exports.ConfigLoader = exports.Application = exports.getInstance = void 0;
|
|
19
19
|
// Application
|
|
20
20
|
var instance_1 = require("./instance");
|
|
21
21
|
Object.defineProperty(exports, "getInstance", { enumerable: true, get: function () { return instance_1.getInstance; } });
|
|
@@ -78,6 +78,8 @@ var DatabaseQueryError_1 = require("./DatabaseQueryError");
|
|
|
78
78
|
Object.defineProperty(exports, "DatabaseQueryError", { enumerable: true, get: function () { return DatabaseQueryError_1.DatabaseQueryError; } });
|
|
79
79
|
var NotImplementedError_1 = require("./NotImplementedError");
|
|
80
80
|
Object.defineProperty(exports, "NotImplementedError", { enumerable: true, get: function () { return NotImplementedError_1.NotImplementedError; } });
|
|
81
|
+
var DeadLockError_1 = require("./DeadLockError");
|
|
82
|
+
Object.defineProperty(exports, "DeadLockError", { enumerable: true, get: function () { return DeadLockError_1.DeadLockError; } });
|
|
81
83
|
// HTTP
|
|
82
84
|
var StatusCode_1 = require("./StatusCode");
|
|
83
85
|
Object.defineProperty(exports, "StatusCode", { enumerable: true, get: function () { return StatusCode_1.StatusCode; } });
|
package/lib/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,cAAc;AACd,uCAAuC;AAA/B,uGAAA,WAAW,OAAA;AACnB,6CAA0C;AAAlC,0GAAA,WAAW,OAAA;AAEnB,SAAS;AACT,+CAA4C;AAApC,4GAAA,YAAY,OAAA;AAEpB,WAAW;AACX,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAC1B,iDAA8C;AAAtC,8GAAA,aAAa,OAAA;AACrB,qDAAkD;AAA1C,kHAAA,eAAe,OAAA;AACvB,yEAAsE;AAA9D,sIAAA,yBAAyB,OAAA;AACjC,iCAA8B;AAAtB,8FAAA,KAAK,OAAA;AACb,6DAAqF;AAA7E,0HAAA,mBAAmB,OAAA;AAC3B,qEAAkE;AAA1D,kIAAA,uBAAuB,OAAA;AAC/B,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAIhB,qEAAiG;AAAzF,kIAAA,uBAAuB,OAAA;AAE/B,SAAS;AACT,yCAAsC;AAA9B,sGAAA,SAAS,OAAA;AACjB,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,2CAIsB;AAHlB,wGAAA,UAAU,OAAA;AAId,uCAAoC;AAA5B,oGAAA,QAAQ,OAAA;AAChB,iEAA8D;AAAtD,8HAAA,qBAAqB,OAAA;AAC7B,qEAAkE;AAA1D,kIAAA,uBAA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,QAAQ,OAAA;AAChB,2CAAwC;AAAhC,wGAAA,UAAU,OAAA;AAElB,cAAc;AACd,yCAAyC;AACjC,gCAAU"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breautek/storm",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Object-Oriented REST API framework",
|
|
5
5
|
"main": "lib/api.js",
|
|
6
6
|
"types": "lib/api.d.ts",
|
|
@@ -46,40 +46,41 @@
|
|
|
46
46
|
"@arashi/token": "1.0.1",
|
|
47
47
|
"@breautek/merge-change": "1.0.0",
|
|
48
48
|
"@types/body-parser": "1.19.2",
|
|
49
|
-
"@types/express": "4.17.
|
|
49
|
+
"@types/express": "4.17.14",
|
|
50
50
|
"@types/formidable": "1.2.3",
|
|
51
|
-
"@types/jsonwebtoken": "8.5.
|
|
51
|
+
"@types/jsonwebtoken": "8.5.9",
|
|
52
52
|
"@types/mysql": "2.15.21",
|
|
53
|
-
"@types/node": "
|
|
53
|
+
"@types/node": "18.11.7",
|
|
54
54
|
"@types/uuid": "8.3.4",
|
|
55
55
|
"ajv": "8.11.0",
|
|
56
|
-
"body-parser": "1.20.
|
|
56
|
+
"body-parser": "1.20.1",
|
|
57
57
|
"commander": "8.3.0",
|
|
58
|
-
"express": "4.18.
|
|
58
|
+
"express": "4.18.2",
|
|
59
59
|
"form-data": "4.0.0",
|
|
60
60
|
"formidable": "1.2.2",
|
|
61
61
|
"jsonwebtoken": "8.5.1",
|
|
62
62
|
"mysql": "2.18.1",
|
|
63
63
|
"sql-formatter": "4.0.2",
|
|
64
64
|
"tslib": "2.4.0",
|
|
65
|
-
"uuid": "
|
|
65
|
+
"uuid": "9.0.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@arashi/logger": "2.x"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@arashi/logger": "2.1.0",
|
|
72
|
-
"@totalpave/eslint-plugin": "6.0.
|
|
73
|
-
"@types/jest": "
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
75
|
-
"@typescript-eslint/parser": "5.
|
|
72
|
+
"@totalpave/eslint-plugin": "6.0.4",
|
|
73
|
+
"@types/jest": "29.2.0",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "5.41.0",
|
|
75
|
+
"@typescript-eslint/parser": "5.41.0",
|
|
76
76
|
"auto-changelog": "2.4.0",
|
|
77
|
-
"eslint": "8.
|
|
78
|
-
"jest": "
|
|
79
|
-
"
|
|
80
|
-
"ts-
|
|
81
|
-
"
|
|
82
|
-
"typedoc
|
|
83
|
-
"
|
|
77
|
+
"eslint": "8.26.0",
|
|
78
|
+
"jest": "29.2.2",
|
|
79
|
+
"jest-jasmine2": "29.2.2",
|
|
80
|
+
"ts-jest": "29.0.3",
|
|
81
|
+
"ts-node": "10.9.1",
|
|
82
|
+
"typedoc": "0.23.18",
|
|
83
|
+
"typedoc-plugin-markdown": "3.13.6",
|
|
84
|
+
"typescript": "4.8.4"
|
|
84
85
|
}
|
|
85
86
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2017-2021 Norman Breau
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {DatabaseQueryError} from './DatabaseQueryError';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* DeadLockError is a DatabaseQueryError but is subclasses for typing purposes.
|
|
21
|
+
*/
|
|
22
|
+
export class DeadLockError extends DatabaseQueryError {}
|
package/src/MySQLConnection.ts
CHANGED
|
@@ -25,6 +25,8 @@ import { CommitQuery } from './private/CommitQuery';
|
|
|
25
25
|
import { RollbackQuery } from './private/RollbackQuery';
|
|
26
26
|
import * as SQLFormatter from 'sql-formatter';
|
|
27
27
|
import { Logger, LogLevel } from '@arashi/logger';
|
|
28
|
+
import { StormError } from './StormError';
|
|
29
|
+
import { DeadLockError } from './DeadLockError';
|
|
28
30
|
|
|
29
31
|
const DEFAULT_HIGH_WATERMARK: number = 512; // in number of result objects
|
|
30
32
|
const TAG: string = 'MySQLConnection';
|
|
@@ -93,7 +95,15 @@ export class MySQLConnection extends DatabaseConnection<MySQL.PoolConnection> {
|
|
|
93
95
|
logger.warn(TAG, ex);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
|
-
|
|
98
|
+
|
|
99
|
+
let e: StormError = null;
|
|
100
|
+
if (error.code === 'ER_LOCK_DEADLOCK') {
|
|
101
|
+
e = new DeadLockError(sql, error);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
e = new DatabaseQueryError(sql, error);
|
|
105
|
+
}
|
|
106
|
+
return reject(e);
|
|
97
107
|
}
|
|
98
108
|
|
|
99
109
|
return resolve(results);
|
package/src/api.ts
CHANGED
|
@@ -57,6 +57,7 @@ export {DuplicateEntryError} from './DuplicateEntryError';
|
|
|
57
57
|
export {MissingConfigError} from './MissingConfigError';
|
|
58
58
|
export {DatabaseQueryError} from './DatabaseQueryError';
|
|
59
59
|
export {NotImplementedError} from './NotImplementedError';
|
|
60
|
+
export {DeadLockError} from './DeadLockError';
|
|
60
61
|
|
|
61
62
|
// HTTP
|
|
62
63
|
export {StatusCode} from './StatusCode';
|