remult 0.9.10 → 0.9.14
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/package.json +1 -1
- package/remult-knex/index.d.ts +1 -0
- package/remult-knex/index.js +56 -3
- package/remult-knex/index.js.map +1 -1
- package/src/backend-tests/backend-database-test-setup.backend-spec.js +31 -0
- package/src/backend-tests/backend-database-test-setup.backend-spec.js.map +1 -1
- package/src/entity.d.ts +1 -1
- package/src/remult3/RepositoryImplementation.js +147 -109
- package/src/remult3/RepositoryImplementation.js.map +1 -1
- package/src/shared-tests/db-tests.db-tests.js +22 -0
- package/src/shared-tests/db-tests.db-tests.js.map +1 -1
|
@@ -9,6 +9,34 @@ var sort_1 = require("../sort");
|
|
|
9
9
|
var valueConverters_1 = require("../../valueConverters");
|
|
10
10
|
var filter_interfaces_2 = require("../filter/filter-interfaces");
|
|
11
11
|
var assign_1 = require("../../assign");
|
|
12
|
+
var classValidatorValidate = undefined;
|
|
13
|
+
Promise.resolve().then(function () { return require("class-validator".toString()); }).then(function (v) {
|
|
14
|
+
classValidatorValidate = function (item, ref) {
|
|
15
|
+
return v.validate(item).then(function (errors) {
|
|
16
|
+
var e_1, _a;
|
|
17
|
+
try {
|
|
18
|
+
for (var errors_1 = tslib_1.__values(errors), errors_1_1 = errors_1.next(); !errors_1_1.done; errors_1_1 = errors_1.next()) {
|
|
19
|
+
var err = errors_1_1.value;
|
|
20
|
+
for (var key in err.constraints) {
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(err.constraints, key)) {
|
|
22
|
+
var element = err.constraints[key];
|
|
23
|
+
ref.fields.find(err.property).error = element;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
29
|
+
finally {
|
|
30
|
+
try {
|
|
31
|
+
if (errors_1_1 && !errors_1_1.done && (_a = errors_1.return)) _a.call(errors_1);
|
|
32
|
+
}
|
|
33
|
+
finally { if (e_1) throw e_1.error; }
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
})
|
|
38
|
+
.catch(function () {
|
|
39
|
+
});
|
|
12
40
|
var RepositoryImplementation = /** @class */ (function () {
|
|
13
41
|
function RepositoryImplementation(entity, remult, dataProvider) {
|
|
14
42
|
this.entity = entity;
|
|
@@ -21,7 +49,7 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
21
49
|
RepositoryImplementation.prototype.createAfterFilter = function (orderBy, lastRow) {
|
|
22
50
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
23
51
|
var values, _a, _b, s, existingVal, r, equalToColumn, _c, _d, s, ff, f, equalToColumn_1, equalToColumn_1_1, c;
|
|
24
|
-
var
|
|
52
|
+
var e_2, _e, e_3, _f, e_4, _g;
|
|
25
53
|
return tslib_1.__generator(this, function (_h) {
|
|
26
54
|
values = new Map();
|
|
27
55
|
try {
|
|
@@ -39,12 +67,12 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
39
67
|
values.set(s.field.key, existingVal);
|
|
40
68
|
}
|
|
41
69
|
}
|
|
42
|
-
catch (
|
|
70
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
43
71
|
finally {
|
|
44
72
|
try {
|
|
45
73
|
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
46
74
|
}
|
|
47
|
-
finally { if (
|
|
75
|
+
finally { if (e_2) throw e_2.error; }
|
|
48
76
|
}
|
|
49
77
|
r = { $or: [] };
|
|
50
78
|
equalToColumn = [];
|
|
@@ -54,17 +82,17 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
54
82
|
ff = new filter_interfaces_2.filterHelper(s.field);
|
|
55
83
|
f = {};
|
|
56
84
|
try {
|
|
57
|
-
for (equalToColumn_1 = (
|
|
85
|
+
for (equalToColumn_1 = (e_4 = void 0, tslib_1.__values(equalToColumn)), equalToColumn_1_1 = equalToColumn_1.next(); !equalToColumn_1_1.done; equalToColumn_1_1 = equalToColumn_1.next()) {
|
|
58
86
|
c = equalToColumn_1_1.value;
|
|
59
87
|
f[c.key] = values.get(c.key);
|
|
60
88
|
}
|
|
61
89
|
}
|
|
62
|
-
catch (
|
|
90
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
63
91
|
finally {
|
|
64
92
|
try {
|
|
65
93
|
if (equalToColumn_1_1 && !equalToColumn_1_1.done && (_g = equalToColumn_1.return)) _g.call(equalToColumn_1);
|
|
66
94
|
}
|
|
67
|
-
finally { if (
|
|
95
|
+
finally { if (e_4) throw e_4.error; }
|
|
68
96
|
}
|
|
69
97
|
equalToColumn.push(s.field);
|
|
70
98
|
if (s.isDescending) {
|
|
@@ -75,12 +103,12 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
75
103
|
r.$or.push(f);
|
|
76
104
|
}
|
|
77
105
|
}
|
|
78
|
-
catch (
|
|
106
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
79
107
|
finally {
|
|
80
108
|
try {
|
|
81
109
|
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
82
110
|
}
|
|
83
|
-
finally { if (
|
|
111
|
+
finally { if (e_3) throw e_3.error; }
|
|
84
112
|
}
|
|
85
113
|
return [2 /*return*/, r];
|
|
86
114
|
});
|
|
@@ -223,8 +251,8 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
223
251
|
};
|
|
224
252
|
RepositoryImplementation.prototype.find = function (options) {
|
|
225
253
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
226
|
-
var opt, _a, rawRows, loadFields, _b, _c, col, ei, load, repo, toLoad, rawRows_1, rawRows_1_1, r, val, rows, rows_1, rows_1_1, r,
|
|
227
|
-
var
|
|
254
|
+
var opt, _a, rawRows, loadFields, _b, _c, col, ei, load, repo, toLoad, rawRows_1, rawRows_1_1, r, val, rows, rows_1, rows_1_1, r, e_5_1, result;
|
|
255
|
+
var e_5, _d, e_6, _e, _f, e_7, _g;
|
|
228
256
|
var _this = this;
|
|
229
257
|
return tslib_1.__generator(this, function (_h) {
|
|
230
258
|
switch (_h.label) {
|
|
@@ -266,7 +294,7 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
266
294
|
repo = this.remult.repo(col.valueType);
|
|
267
295
|
toLoad = [];
|
|
268
296
|
try {
|
|
269
|
-
for (rawRows_1 = (
|
|
297
|
+
for (rawRows_1 = (e_6 = void 0, tslib_1.__values(rawRows)), rawRows_1_1 = rawRows_1.next(); !rawRows_1_1.done; rawRows_1_1 = rawRows_1.next()) {
|
|
270
298
|
r = rawRows_1_1.value;
|
|
271
299
|
val = r[col.key];
|
|
272
300
|
if (val !== undefined && val !== null && !toLoad.includes(val) && !repo.idCache.has(val)) {
|
|
@@ -274,29 +302,29 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
274
302
|
}
|
|
275
303
|
}
|
|
276
304
|
}
|
|
277
|
-
catch (
|
|
305
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
278
306
|
finally {
|
|
279
307
|
try {
|
|
280
308
|
if (rawRows_1_1 && !rawRows_1_1.done && (_e = rawRows_1.return)) _e.call(rawRows_1);
|
|
281
309
|
}
|
|
282
|
-
finally { if (
|
|
310
|
+
finally { if (e_6) throw e_6.error; }
|
|
283
311
|
}
|
|
284
312
|
if (!(toLoad.length > 0)) return [3 /*break*/, 6];
|
|
285
313
|
return [4 /*yield*/, repo.find({ where: (_f = repo.metadata.idMetadata).getIdFilter.apply(_f, tslib_1.__spread(toLoad)) })];
|
|
286
314
|
case 5:
|
|
287
315
|
rows = _h.sent();
|
|
288
316
|
try {
|
|
289
|
-
for (rows_1 = (
|
|
317
|
+
for (rows_1 = (e_7 = void 0, tslib_1.__values(rows)), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
|
|
290
318
|
r = rows_1_1.value;
|
|
291
319
|
repo.addToCache(r);
|
|
292
320
|
}
|
|
293
321
|
}
|
|
294
|
-
catch (
|
|
322
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
295
323
|
finally {
|
|
296
324
|
try {
|
|
297
325
|
if (rows_1_1 && !rows_1_1.done && (_g = rows_1.return)) _g.call(rows_1);
|
|
298
326
|
}
|
|
299
|
-
finally { if (
|
|
327
|
+
finally { if (e_7) throw e_7.error; }
|
|
300
328
|
}
|
|
301
329
|
_h.label = 6;
|
|
302
330
|
case 6:
|
|
@@ -304,14 +332,14 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
304
332
|
return [3 /*break*/, 4];
|
|
305
333
|
case 7: return [3 /*break*/, 10];
|
|
306
334
|
case 8:
|
|
307
|
-
|
|
308
|
-
|
|
335
|
+
e_5_1 = _h.sent();
|
|
336
|
+
e_5 = { error: e_5_1 };
|
|
309
337
|
return [3 /*break*/, 10];
|
|
310
338
|
case 9:
|
|
311
339
|
try {
|
|
312
340
|
if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
|
|
313
341
|
}
|
|
314
|
-
finally { if (
|
|
342
|
+
finally { if (e_5) throw e_5.error; }
|
|
315
343
|
return [7 /*endfinally*/];
|
|
316
344
|
case 10: return [4 /*yield*/, Promise.all(rawRows.map(function (r) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
|
|
317
345
|
switch (_a.label) {
|
|
@@ -446,7 +474,7 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
446
474
|
RepositoryImplementation.prototype.fromJson = function (json, newRow) {
|
|
447
475
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
448
476
|
var obj, _a, _b, col, r, helper;
|
|
449
|
-
var
|
|
477
|
+
var e_8, _c;
|
|
450
478
|
return tslib_1.__generator(this, function (_d) {
|
|
451
479
|
switch (_d.label) {
|
|
452
480
|
case 0:
|
|
@@ -459,12 +487,12 @@ var RepositoryImplementation = /** @class */ (function () {
|
|
|
459
487
|
}
|
|
460
488
|
}
|
|
461
489
|
}
|
|
462
|
-
catch (
|
|
490
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
463
491
|
finally {
|
|
464
492
|
try {
|
|
465
493
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
466
494
|
}
|
|
467
|
-
finally { if (
|
|
495
|
+
finally { if (e_8) throw e_8.error; }
|
|
468
496
|
}
|
|
469
497
|
if (!newRow) return [3 /*break*/, 2];
|
|
470
498
|
r = this.create();
|
|
@@ -568,7 +596,7 @@ function createOldEntity(entity, remult) {
|
|
|
568
596
|
var key = getEntityKey(entity);
|
|
569
597
|
var base = Object.getPrototypeOf(entity);
|
|
570
598
|
var _loop_1 = function () {
|
|
571
|
-
var
|
|
599
|
+
var e_9, _a;
|
|
572
600
|
var baseCols = exports.columnsOfType.get(base);
|
|
573
601
|
if (baseCols) {
|
|
574
602
|
r.unshift.apply(r, tslib_1.__spread(baseCols.filter(function (x) { return !r.find(function (y) { return y.key == x.key; }); })));
|
|
@@ -588,17 +616,17 @@ function createOldEntity(entity, remult) {
|
|
|
588
616
|
}
|
|
589
617
|
};
|
|
590
618
|
try {
|
|
591
|
-
for (var _b = (
|
|
619
|
+
for (var _b = (e_9 = void 0, tslib_1.__values(functions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
592
620
|
var key_1 = _c.value;
|
|
593
621
|
_loop_2(key_1);
|
|
594
622
|
}
|
|
595
623
|
}
|
|
596
|
-
catch (
|
|
624
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
597
625
|
finally {
|
|
598
626
|
try {
|
|
599
627
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
600
628
|
}
|
|
601
|
-
finally { if (
|
|
629
|
+
finally { if (e_9) throw e_9.error; }
|
|
602
630
|
}
|
|
603
631
|
}
|
|
604
632
|
base = Object.getPrototypeOf(base);
|
|
@@ -611,7 +639,7 @@ function createOldEntity(entity, remult) {
|
|
|
611
639
|
exports.createOldEntity = createOldEntity;
|
|
612
640
|
var rowHelperBase = /** @class */ (function () {
|
|
613
641
|
function rowHelperBase(columnsInfo, instance, remult) {
|
|
614
|
-
var
|
|
642
|
+
var e_10, _a;
|
|
615
643
|
var _this = this;
|
|
616
644
|
this.columnsInfo = columnsInfo;
|
|
617
645
|
this.instance = instance;
|
|
@@ -648,12 +676,12 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
648
676
|
_loop_3(col);
|
|
649
677
|
}
|
|
650
678
|
}
|
|
651
|
-
catch (
|
|
679
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
652
680
|
finally {
|
|
653
681
|
try {
|
|
654
682
|
if (columnsInfo_1_1 && !columnsInfo_1_1.done && (_a = columnsInfo_1.return)) _a.call(columnsInfo_1);
|
|
655
683
|
}
|
|
656
|
-
finally { if (
|
|
684
|
+
finally { if (e_10) throw e_10.error; }
|
|
657
685
|
}
|
|
658
686
|
}
|
|
659
687
|
Object.defineProperty(rowHelperBase.prototype, "error", {
|
|
@@ -677,7 +705,7 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
677
705
|
this._subscribers.forEach(function (x) { return x.reportObserved(); });
|
|
678
706
|
};
|
|
679
707
|
rowHelperBase.prototype.subscribe = function (listener) {
|
|
680
|
-
var
|
|
708
|
+
var e_11, _a;
|
|
681
709
|
var _this = this;
|
|
682
710
|
var list;
|
|
683
711
|
if (typeof listener === "function")
|
|
@@ -715,12 +743,12 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
715
743
|
_loop_4(col);
|
|
716
744
|
}
|
|
717
745
|
}
|
|
718
|
-
catch (
|
|
746
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
719
747
|
finally {
|
|
720
748
|
try {
|
|
721
749
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
722
750
|
}
|
|
723
|
-
finally { if (
|
|
751
|
+
finally { if (e_11) throw e_11.error; }
|
|
724
752
|
}
|
|
725
753
|
}
|
|
726
754
|
this._subscribers.push(list);
|
|
@@ -751,7 +779,7 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
751
779
|
});
|
|
752
780
|
};
|
|
753
781
|
rowHelperBase.prototype.__assertValidity = function () {
|
|
754
|
-
var
|
|
782
|
+
var e_12, _a;
|
|
755
783
|
if (!this.hasErrors()) {
|
|
756
784
|
var error = {
|
|
757
785
|
modelState: Object.assign({}, this.errors),
|
|
@@ -768,12 +796,12 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
768
796
|
}
|
|
769
797
|
}
|
|
770
798
|
}
|
|
771
|
-
catch (
|
|
799
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
772
800
|
finally {
|
|
773
801
|
try {
|
|
774
802
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
775
803
|
}
|
|
776
|
-
finally { if (
|
|
804
|
+
finally { if (e_12) throw e_12.error; }
|
|
777
805
|
}
|
|
778
806
|
}
|
|
779
807
|
throw error;
|
|
@@ -812,7 +840,7 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
812
840
|
return !!!this.error && this.errors == undefined;
|
|
813
841
|
};
|
|
814
842
|
rowHelperBase.prototype.copyDataToObject = function () {
|
|
815
|
-
var
|
|
843
|
+
var e_13, _a;
|
|
816
844
|
var d = {};
|
|
817
845
|
try {
|
|
818
846
|
for (var _b = tslib_1.__values(this.columnsInfo), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -831,12 +859,12 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
831
859
|
d[col.key] = val;
|
|
832
860
|
}
|
|
833
861
|
}
|
|
834
|
-
catch (
|
|
862
|
+
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
835
863
|
finally {
|
|
836
864
|
try {
|
|
837
865
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
838
866
|
}
|
|
839
|
-
finally { if (
|
|
867
|
+
finally { if (e_13) throw e_13.error; }
|
|
840
868
|
}
|
|
841
869
|
return d;
|
|
842
870
|
};
|
|
@@ -850,8 +878,13 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
850
878
|
switch (_a.label) {
|
|
851
879
|
case 0:
|
|
852
880
|
this.__clearErrors();
|
|
853
|
-
return [
|
|
881
|
+
if (!classValidatorValidate) return [3 /*break*/, 2];
|
|
882
|
+
return [4 /*yield*/, classValidatorValidate(this.instance, this)];
|
|
854
883
|
case 1:
|
|
884
|
+
_a.sent();
|
|
885
|
+
_a.label = 2;
|
|
886
|
+
case 2: return [4 /*yield*/, this.__performColumnAndEntityValidations()];
|
|
887
|
+
case 3:
|
|
855
888
|
_a.sent();
|
|
856
889
|
r = this.hasErrors();
|
|
857
890
|
return [2 /*return*/, r];
|
|
@@ -865,8 +898,13 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
865
898
|
switch (_a.label) {
|
|
866
899
|
case 0:
|
|
867
900
|
this.__clearErrors();
|
|
868
|
-
return [
|
|
901
|
+
if (!classValidatorValidate) return [3 /*break*/, 2];
|
|
902
|
+
return [4 /*yield*/, classValidatorValidate(this.instance, this)];
|
|
869
903
|
case 1:
|
|
904
|
+
_a.sent();
|
|
905
|
+
_a.label = 2;
|
|
906
|
+
case 2: return [4 /*yield*/, this.__performColumnAndEntityValidations()];
|
|
907
|
+
case 3:
|
|
870
908
|
_a.sent();
|
|
871
909
|
this.__assertValidity();
|
|
872
910
|
return [2 /*return*/];
|
|
@@ -882,7 +920,7 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
882
920
|
});
|
|
883
921
|
};
|
|
884
922
|
rowHelperBase.prototype.toApiJson = function () {
|
|
885
|
-
var
|
|
923
|
+
var e_14, _a;
|
|
886
924
|
var result = {};
|
|
887
925
|
try {
|
|
888
926
|
for (var _b = tslib_1.__values(this.columnsInfo), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -907,19 +945,19 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
907
945
|
}
|
|
908
946
|
}
|
|
909
947
|
}
|
|
910
|
-
catch (
|
|
948
|
+
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
911
949
|
finally {
|
|
912
950
|
try {
|
|
913
951
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
914
952
|
}
|
|
915
|
-
finally { if (
|
|
953
|
+
finally { if (e_14) throw e_14.error; }
|
|
916
954
|
}
|
|
917
955
|
return result;
|
|
918
956
|
};
|
|
919
957
|
rowHelperBase.prototype._updateEntityBasedOnApi = function (body) {
|
|
920
958
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
921
959
|
var keys, _a, _b, col, lu;
|
|
922
|
-
var
|
|
960
|
+
var e_15, _c;
|
|
923
961
|
return tslib_1.__generator(this, function (_d) {
|
|
924
962
|
switch (_d.label) {
|
|
925
963
|
case 0:
|
|
@@ -939,12 +977,12 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
939
977
|
}
|
|
940
978
|
}
|
|
941
979
|
}
|
|
942
|
-
catch (
|
|
980
|
+
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
943
981
|
finally {
|
|
944
982
|
try {
|
|
945
983
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
946
984
|
}
|
|
947
|
-
finally { if (
|
|
985
|
+
finally { if (e_15) throw e_15.error; }
|
|
948
986
|
}
|
|
949
987
|
return [4 /*yield*/, Promise.all(tslib_1.__spread(this.fields).map(function (x) { return x.load(); }))];
|
|
950
988
|
case 1:
|
|
@@ -959,7 +997,7 @@ var rowHelperBase = /** @class */ (function () {
|
|
|
959
997
|
var rowHelperImplementation = /** @class */ (function (_super) {
|
|
960
998
|
tslib_1.__extends(rowHelperImplementation, _super);
|
|
961
999
|
function rowHelperImplementation(info, instance, repository, edp, remult, _isNew) {
|
|
962
|
-
var
|
|
1000
|
+
var e_16, _a;
|
|
963
1001
|
var _this = _super.call(this, info.columnsInfo, instance, remult) || this;
|
|
964
1002
|
_this.info = info;
|
|
965
1003
|
_this.repository = repository;
|
|
@@ -980,12 +1018,12 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
980
1018
|
}
|
|
981
1019
|
}
|
|
982
1020
|
}
|
|
983
|
-
catch (
|
|
1021
|
+
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
984
1022
|
finally {
|
|
985
1023
|
try {
|
|
986
1024
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
987
1025
|
}
|
|
988
|
-
finally { if (
|
|
1026
|
+
finally { if (e_16) throw e_16.error; }
|
|
989
1027
|
}
|
|
990
1028
|
}
|
|
991
1029
|
if (_this.info.options.entityRefInit)
|
|
@@ -1050,7 +1088,7 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1050
1088
|
};
|
|
1051
1089
|
Object.defineProperty(rowHelperImplementation.prototype, "fields", {
|
|
1052
1090
|
get: function () {
|
|
1053
|
-
var _a,
|
|
1091
|
+
var _a, e_17, _b;
|
|
1054
1092
|
if (!this._columns) {
|
|
1055
1093
|
var _items_1 = [];
|
|
1056
1094
|
var r_1 = (_a = {
|
|
@@ -1064,12 +1102,12 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1064
1102
|
_items_1.push(r_1[c.key] = new FieldRefImplementation(c, this.info.fields[c.key], this.instance, this, this));
|
|
1065
1103
|
}
|
|
1066
1104
|
}
|
|
1067
|
-
catch (
|
|
1105
|
+
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
1068
1106
|
finally {
|
|
1069
1107
|
try {
|
|
1070
1108
|
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
1071
1109
|
}
|
|
1072
|
-
finally { if (
|
|
1110
|
+
finally { if (e_17) throw e_17.error; }
|
|
1073
1111
|
}
|
|
1074
1112
|
this._columns = r_1;
|
|
1075
1113
|
}
|
|
@@ -1081,7 +1119,7 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1081
1119
|
rowHelperImplementation.prototype.save = function () {
|
|
1082
1120
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1083
1121
|
var doNotSave_1, d, ignoreKeys, _a, _b, field, f, updatedRow, changesOnly, wasChanged, key, element, err_1;
|
|
1084
|
-
var
|
|
1122
|
+
var e_18, _c;
|
|
1085
1123
|
return tslib_1.__generator(this, function (_d) {
|
|
1086
1124
|
switch (_d.label) {
|
|
1087
1125
|
case 0:
|
|
@@ -1111,12 +1149,12 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1111
1149
|
}
|
|
1112
1150
|
}
|
|
1113
1151
|
}
|
|
1114
|
-
catch (
|
|
1152
|
+
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
1115
1153
|
finally {
|
|
1116
1154
|
try {
|
|
1117
1155
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
1118
1156
|
}
|
|
1119
|
-
finally { if (
|
|
1157
|
+
finally { if (e_18) throw e_18.error; }
|
|
1120
1158
|
}
|
|
1121
1159
|
if (this.info.idMetadata.field instanceof column_1.CompoundIdField)
|
|
1122
1160
|
d.id = undefined;
|
|
@@ -1186,8 +1224,8 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1186
1224
|
};
|
|
1187
1225
|
rowHelperImplementation.prototype.delete = function () {
|
|
1188
1226
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1189
|
-
var _a, _b, listener,
|
|
1190
|
-
var
|
|
1227
|
+
var _a, _b, listener, e_19_1, err_2;
|
|
1228
|
+
var e_19, _c;
|
|
1191
1229
|
return tslib_1.__generator(this, function (_d) {
|
|
1192
1230
|
switch (_d.label) {
|
|
1193
1231
|
case 0:
|
|
@@ -1229,14 +1267,14 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1229
1267
|
return [3 /*break*/, 8];
|
|
1230
1268
|
case 11: return [3 /*break*/, 14];
|
|
1231
1269
|
case 12:
|
|
1232
|
-
|
|
1233
|
-
|
|
1270
|
+
e_19_1 = _d.sent();
|
|
1271
|
+
e_19 = { error: e_19_1 };
|
|
1234
1272
|
return [3 /*break*/, 14];
|
|
1235
1273
|
case 13:
|
|
1236
1274
|
try {
|
|
1237
1275
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
1238
1276
|
}
|
|
1239
|
-
finally { if (
|
|
1277
|
+
finally { if (e_19) throw e_19.error; }
|
|
1240
1278
|
return [7 /*endfinally*/];
|
|
1241
1279
|
case 14:
|
|
1242
1280
|
this._wasDeleted = true;
|
|
@@ -1254,8 +1292,8 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1254
1292
|
};
|
|
1255
1293
|
rowHelperImplementation.prototype.loadDataFrom = function (data, loadItems) {
|
|
1256
1294
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1257
|
-
var _a, _b, col, lu,
|
|
1258
|
-
var
|
|
1295
|
+
var _a, _b, col, lu, e_20_1;
|
|
1296
|
+
var e_20, _c;
|
|
1259
1297
|
return tslib_1.__generator(this, function (_d) {
|
|
1260
1298
|
switch (_d.label) {
|
|
1261
1299
|
case 0:
|
|
@@ -1290,14 +1328,14 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1290
1328
|
return [3 /*break*/, 1];
|
|
1291
1329
|
case 9: return [3 /*break*/, 12];
|
|
1292
1330
|
case 10:
|
|
1293
|
-
|
|
1294
|
-
|
|
1331
|
+
e_20_1 = _d.sent();
|
|
1332
|
+
e_20 = { error: e_20_1 };
|
|
1295
1333
|
return [3 /*break*/, 12];
|
|
1296
1334
|
case 11:
|
|
1297
1335
|
try {
|
|
1298
1336
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
1299
1337
|
}
|
|
1300
|
-
finally { if (
|
|
1338
|
+
finally { if (e_20) throw e_20.error; }
|
|
1301
1339
|
return [7 /*endfinally*/];
|
|
1302
1340
|
case 12: return [4 /*yield*/, this.calcServerExpression()];
|
|
1303
1341
|
case 13:
|
|
@@ -1317,8 +1355,8 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1317
1355
|
};
|
|
1318
1356
|
rowHelperImplementation.prototype.calcServerExpression = function () {
|
|
1319
1357
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1320
|
-
var _a, _b, col, _c, _d,
|
|
1321
|
-
var
|
|
1358
|
+
var _a, _b, col, _c, _d, e_21_1;
|
|
1359
|
+
var e_21, _e;
|
|
1322
1360
|
return tslib_1.__generator(this, function (_f) {
|
|
1323
1361
|
switch (_f.label) {
|
|
1324
1362
|
case 0:
|
|
@@ -1343,14 +1381,14 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1343
1381
|
return [3 /*break*/, 2];
|
|
1344
1382
|
case 5: return [3 /*break*/, 8];
|
|
1345
1383
|
case 6:
|
|
1346
|
-
|
|
1347
|
-
|
|
1384
|
+
e_21_1 = _f.sent();
|
|
1385
|
+
e_21 = { error: e_21_1 };
|
|
1348
1386
|
return [3 /*break*/, 8];
|
|
1349
1387
|
case 7:
|
|
1350
1388
|
try {
|
|
1351
1389
|
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
1352
1390
|
}
|
|
1353
|
-
finally { if (
|
|
1391
|
+
finally { if (e_21) throw e_21.error; }
|
|
1354
1392
|
return [7 /*endfinally*/];
|
|
1355
1393
|
case 8: return [2 /*return*/];
|
|
1356
1394
|
}
|
|
@@ -1362,7 +1400,7 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1362
1400
|
return this._isNew;
|
|
1363
1401
|
};
|
|
1364
1402
|
rowHelperImplementation.prototype.wasChanged = function () {
|
|
1365
|
-
var
|
|
1403
|
+
var e_22, _a;
|
|
1366
1404
|
this._reportObserved();
|
|
1367
1405
|
try {
|
|
1368
1406
|
for (var _b = tslib_1.__values(this.fields), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
@@ -1371,19 +1409,19 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1371
1409
|
return true;
|
|
1372
1410
|
}
|
|
1373
1411
|
}
|
|
1374
|
-
catch (
|
|
1412
|
+
catch (e_22_1) { e_22 = { error: e_22_1 }; }
|
|
1375
1413
|
finally {
|
|
1376
1414
|
try {
|
|
1377
1415
|
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1378
1416
|
}
|
|
1379
|
-
finally { if (
|
|
1417
|
+
finally { if (e_22) throw e_22.error; }
|
|
1380
1418
|
}
|
|
1381
1419
|
return false;
|
|
1382
1420
|
};
|
|
1383
1421
|
rowHelperImplementation.prototype.__performColumnAndEntityValidations = function () {
|
|
1384
1422
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1385
|
-
var _a, _b, c, col,
|
|
1386
|
-
var
|
|
1423
|
+
var _a, _b, c, col, e_23_1, _c, _d, listener, e_24_1;
|
|
1424
|
+
var e_23, _e, e_24, _f;
|
|
1387
1425
|
return tslib_1.__generator(this, function (_g) {
|
|
1388
1426
|
switch (_g.label) {
|
|
1389
1427
|
case 0:
|
|
@@ -1404,18 +1442,18 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1404
1442
|
return [3 /*break*/, 1];
|
|
1405
1443
|
case 4: return [3 /*break*/, 7];
|
|
1406
1444
|
case 5:
|
|
1407
|
-
|
|
1408
|
-
|
|
1445
|
+
e_23_1 = _g.sent();
|
|
1446
|
+
e_23 = { error: e_23_1 };
|
|
1409
1447
|
return [3 /*break*/, 7];
|
|
1410
1448
|
case 6:
|
|
1411
1449
|
try {
|
|
1412
1450
|
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
1413
1451
|
}
|
|
1414
|
-
finally { if (
|
|
1452
|
+
finally { if (e_23) throw e_23.error; }
|
|
1415
1453
|
return [7 /*endfinally*/];
|
|
1416
1454
|
case 7:
|
|
1417
1455
|
if (!this.info.entityInfo.validation) return [3 /*break*/, 9];
|
|
1418
|
-
return [4 /*yield*/, this.info.entityInfo.validation(this.instance)];
|
|
1456
|
+
return [4 /*yield*/, this.info.entityInfo.validation(this.instance, this)];
|
|
1419
1457
|
case 8:
|
|
1420
1458
|
_g.sent();
|
|
1421
1459
|
_g.label = 9;
|
|
@@ -1438,14 +1476,14 @@ var rowHelperImplementation = /** @class */ (function (_super) {
|
|
|
1438
1476
|
return [3 /*break*/, 11];
|
|
1439
1477
|
case 14: return [3 /*break*/, 17];
|
|
1440
1478
|
case 15:
|
|
1441
|
-
|
|
1442
|
-
|
|
1479
|
+
e_24_1 = _g.sent();
|
|
1480
|
+
e_24 = { error: e_24_1 };
|
|
1443
1481
|
return [3 /*break*/, 17];
|
|
1444
1482
|
case 16:
|
|
1445
1483
|
try {
|
|
1446
1484
|
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
1447
1485
|
}
|
|
1448
|
-
finally { if (
|
|
1486
|
+
finally { if (e_24) throw e_24.error; }
|
|
1449
1487
|
return [7 /*endfinally*/];
|
|
1450
1488
|
case 17: return [2 /*return*/];
|
|
1451
1489
|
}
|
|
@@ -1487,7 +1525,7 @@ exports.getControllerRef = getControllerRef;
|
|
|
1487
1525
|
var controllerRefImpl = /** @class */ (function (_super) {
|
|
1488
1526
|
tslib_1.__extends(controllerRefImpl, _super);
|
|
1489
1527
|
function controllerRefImpl(columnsInfo, instance, remult) {
|
|
1490
|
-
var _a,
|
|
1528
|
+
var _a, e_25, _b;
|
|
1491
1529
|
var _this = _super.call(this, columnsInfo, instance, remult) || this;
|
|
1492
1530
|
var _items = [];
|
|
1493
1531
|
var r = (_a = {
|
|
@@ -1501,20 +1539,20 @@ var controllerRefImpl = /** @class */ (function (_super) {
|
|
|
1501
1539
|
_items.push(r[col.key] = new FieldRefImplementation(col, new columnDefsImpl(col, undefined, remult), instance, undefined, _this));
|
|
1502
1540
|
}
|
|
1503
1541
|
}
|
|
1504
|
-
catch (
|
|
1542
|
+
catch (e_25_1) { e_25 = { error: e_25_1 }; }
|
|
1505
1543
|
finally {
|
|
1506
1544
|
try {
|
|
1507
1545
|
if (columnsInfo_2_1 && !columnsInfo_2_1.done && (_b = columnsInfo_2.return)) _b.call(columnsInfo_2);
|
|
1508
1546
|
}
|
|
1509
|
-
finally { if (
|
|
1547
|
+
finally { if (e_25) throw e_25.error; }
|
|
1510
1548
|
}
|
|
1511
1549
|
_this.fields = r;
|
|
1512
1550
|
return _this;
|
|
1513
1551
|
}
|
|
1514
1552
|
controllerRefImpl.prototype.__performColumnAndEntityValidations = function () {
|
|
1515
1553
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1516
|
-
var _a, _b, col,
|
|
1517
|
-
var
|
|
1554
|
+
var _a, _b, col, e_26_1;
|
|
1555
|
+
var e_26, _c;
|
|
1518
1556
|
return tslib_1.__generator(this, function (_d) {
|
|
1519
1557
|
switch (_d.label) {
|
|
1520
1558
|
case 0:
|
|
@@ -1534,14 +1572,14 @@ var controllerRefImpl = /** @class */ (function (_super) {
|
|
|
1534
1572
|
return [3 /*break*/, 1];
|
|
1535
1573
|
case 4: return [3 /*break*/, 7];
|
|
1536
1574
|
case 5:
|
|
1537
|
-
|
|
1538
|
-
|
|
1575
|
+
e_26_1 = _d.sent();
|
|
1576
|
+
e_26 = { error: e_26_1 };
|
|
1539
1577
|
return [3 /*break*/, 7];
|
|
1540
1578
|
case 6:
|
|
1541
1579
|
try {
|
|
1542
1580
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
1543
1581
|
}
|
|
1544
|
-
finally { if (
|
|
1582
|
+
finally { if (e_26) throw e_26.error; }
|
|
1545
1583
|
return [7 /*endfinally*/];
|
|
1546
1584
|
case 7: return [2 /*return*/];
|
|
1547
1585
|
}
|
|
@@ -1681,8 +1719,8 @@ var FieldRefImplementation = /** @class */ (function () {
|
|
|
1681
1719
|
};
|
|
1682
1720
|
FieldRefImplementation.prototype.__performValidation = function () {
|
|
1683
1721
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
1684
|
-
var x, _a, _b, v,
|
|
1685
|
-
var
|
|
1722
|
+
var x, _a, _b, v, e_27_1;
|
|
1723
|
+
var e_27, _c;
|
|
1686
1724
|
return tslib_1.__generator(this, function (_d) {
|
|
1687
1725
|
switch (_d.label) {
|
|
1688
1726
|
case 0:
|
|
@@ -1705,14 +1743,14 @@ var FieldRefImplementation = /** @class */ (function () {
|
|
|
1705
1743
|
return [3 /*break*/, 2];
|
|
1706
1744
|
case 5: return [3 /*break*/, 8];
|
|
1707
1745
|
case 6:
|
|
1708
|
-
|
|
1709
|
-
|
|
1746
|
+
e_27_1 = _d.sent();
|
|
1747
|
+
e_27 = { error: e_27_1 };
|
|
1710
1748
|
return [3 /*break*/, 8];
|
|
1711
1749
|
case 7:
|
|
1712
1750
|
try {
|
|
1713
1751
|
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
1714
1752
|
}
|
|
1715
|
-
finally { if (
|
|
1753
|
+
finally { if (e_27) throw e_27.error; }
|
|
1716
1754
|
return [7 /*endfinally*/];
|
|
1717
1755
|
case 8: return [3 /*break*/, 11];
|
|
1718
1756
|
case 9:
|
|
@@ -1839,7 +1877,7 @@ var columnDefsImpl = /** @class */ (function () {
|
|
|
1839
1877
|
exports.columnDefsImpl = columnDefsImpl;
|
|
1840
1878
|
var EntityFullInfo = /** @class */ (function () {
|
|
1841
1879
|
function EntityFullInfo(columnsInfo, entityInfo, remult, entityType, key) {
|
|
1842
|
-
var _a,
|
|
1880
|
+
var _a, e_28, _b;
|
|
1843
1881
|
var _this = this;
|
|
1844
1882
|
this.columnsInfo = columnsInfo;
|
|
1845
1883
|
this.entityInfo = entityInfo;
|
|
@@ -1908,12 +1946,12 @@ var EntityFullInfo = /** @class */ (function () {
|
|
|
1908
1946
|
_items.push(r[x.key] = new columnDefsImpl(x, this, remult));
|
|
1909
1947
|
}
|
|
1910
1948
|
}
|
|
1911
|
-
catch (
|
|
1949
|
+
catch (e_28_1) { e_28 = { error: e_28_1 }; }
|
|
1912
1950
|
finally {
|
|
1913
1951
|
try {
|
|
1914
1952
|
if (columnsInfo_3_1 && !columnsInfo_3_1.done && (_b = columnsInfo_3.return)) _b.call(columnsInfo_3);
|
|
1915
1953
|
}
|
|
1916
|
-
finally { if (
|
|
1954
|
+
finally { if (e_28) throw e_28.error; }
|
|
1917
1955
|
}
|
|
1918
1956
|
this.fields = r;
|
|
1919
1957
|
this.dbAutoIncrementId = entityInfo.dbAutoIncrementId;
|
|
@@ -2080,7 +2118,7 @@ function Field() {
|
|
|
2080
2118
|
exports.Field = Field;
|
|
2081
2119
|
var storableMember = Symbol("storableMember");
|
|
2082
2120
|
function buildOptions(options, remult) {
|
|
2083
|
-
var
|
|
2121
|
+
var e_29, _a;
|
|
2084
2122
|
var r = {};
|
|
2085
2123
|
try {
|
|
2086
2124
|
for (var options_1 = tslib_1.__values(options), options_1_1 = options_1.next(); !options_1_1.done; options_1_1 = options_1.next()) {
|
|
@@ -2093,12 +2131,12 @@ function buildOptions(options, remult) {
|
|
|
2093
2131
|
}
|
|
2094
2132
|
}
|
|
2095
2133
|
}
|
|
2096
|
-
catch (
|
|
2134
|
+
catch (e_29_1) { e_29 = { error: e_29_1 }; }
|
|
2097
2135
|
finally {
|
|
2098
2136
|
try {
|
|
2099
2137
|
if (options_1_1 && !options_1_1.done && (_a = options_1.return)) _a.call(options_1);
|
|
2100
2138
|
}
|
|
2101
|
-
finally { if (
|
|
2139
|
+
finally { if (e_29) throw e_29.error; }
|
|
2102
2140
|
}
|
|
2103
2141
|
return r;
|
|
2104
2142
|
}
|
|
@@ -2181,7 +2219,7 @@ function Entity(key) {
|
|
|
2181
2219
|
}
|
|
2182
2220
|
}
|
|
2183
2221
|
var factory = function (remult) {
|
|
2184
|
-
var
|
|
2222
|
+
var e_30, _a;
|
|
2185
2223
|
var r = {};
|
|
2186
2224
|
try {
|
|
2187
2225
|
for (var options_2 = tslib_1.__values(options), options_2_1 = options_2.next(); !options_2_1.done; options_2_1 = options_2.next()) {
|
|
@@ -2194,12 +2232,12 @@ function Entity(key) {
|
|
|
2194
2232
|
}
|
|
2195
2233
|
}
|
|
2196
2234
|
}
|
|
2197
|
-
catch (
|
|
2235
|
+
catch (e_30_1) { e_30 = { error: e_30_1 }; }
|
|
2198
2236
|
finally {
|
|
2199
2237
|
try {
|
|
2200
2238
|
if (options_2_1 && !options_2_1.done && (_a = options_2.return)) _a.call(options_2);
|
|
2201
2239
|
}
|
|
2202
|
-
finally { if (
|
|
2240
|
+
finally { if (e_30) throw e_30.error; }
|
|
2203
2241
|
}
|
|
2204
2242
|
var base = Object.getPrototypeOf(target);
|
|
2205
2243
|
if (base) {
|
|
@@ -2288,9 +2326,9 @@ var QueryResultImpl = /** @class */ (function () {
|
|
|
2288
2326
|
});
|
|
2289
2327
|
};
|
|
2290
2328
|
QueryResultImpl.prototype.forEach = function (what) {
|
|
2291
|
-
var
|
|
2329
|
+
var e_31, _a;
|
|
2292
2330
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
2293
|
-
var i, _b, _c, x,
|
|
2331
|
+
var i, _b, _c, x, e_31_1;
|
|
2294
2332
|
return tslib_1.__generator(this, function (_d) {
|
|
2295
2333
|
switch (_d.label) {
|
|
2296
2334
|
case 0:
|
|
@@ -2312,8 +2350,8 @@ var QueryResultImpl = /** @class */ (function () {
|
|
|
2312
2350
|
case 5: return [3 /*break*/, 2];
|
|
2313
2351
|
case 6: return [3 /*break*/, 13];
|
|
2314
2352
|
case 7:
|
|
2315
|
-
|
|
2316
|
-
|
|
2353
|
+
e_31_1 = _d.sent();
|
|
2354
|
+
e_31 = { error: e_31_1 };
|
|
2317
2355
|
return [3 /*break*/, 13];
|
|
2318
2356
|
case 8:
|
|
2319
2357
|
_d.trys.push([8, , 11, 12]);
|
|
@@ -2324,7 +2362,7 @@ var QueryResultImpl = /** @class */ (function () {
|
|
|
2324
2362
|
_d.label = 10;
|
|
2325
2363
|
case 10: return [3 /*break*/, 12];
|
|
2326
2364
|
case 11:
|
|
2327
|
-
if (
|
|
2365
|
+
if (e_31) throw e_31.error;
|
|
2328
2366
|
return [7 /*endfinally*/];
|
|
2329
2367
|
case 12: return [7 /*endfinally*/];
|
|
2330
2368
|
case 13: return [2 /*return*/, i];
|