remult 0.13.18 → 0.13.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.13.18",
3
+ "version": "0.13.19",
4
4
  "description": "remult core lib",
5
5
  "homepage": "https://remult.dev/",
6
6
  "repository": {
@@ -176,7 +176,18 @@ db_tests_setup_1.testAll("transactions", function (_a) {
176
176
  });
177
177
  });
178
178
  var client = new mongodb_1.MongoClient("mongodb://localhost:27017/local");
179
- var mongoDbPromise = client.connect().then(function (c) { return c.db("test"); });
179
+ var done;
180
+ var mongoDbPromise = client.connect().then(function (c) {
181
+ done = c;
182
+ return c.db("test");
183
+ });
184
+ afterAll(function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
185
+ return tslib_1.__generator(this, function (_a) {
186
+ if (done)
187
+ done.close();
188
+ return [2 /*return*/];
189
+ });
190
+ }); });
180
191
  function testMongo(key, what, focus) {
181
192
  var _this = this;
182
193
  if (focus === void 0) { focus = false; }
@@ -1900,11 +1900,12 @@ var FieldRefImplementation = /** @class */ (function () {
1900
1900
  };
1901
1901
  FieldRefImplementation.prototype.__performValidation = function () {
1902
1902
  return tslib_1.__awaiter(this, void 0, void 0, function () {
1903
- var x, _a, _b, v, e_30_1;
1903
+ var x, _a, _b, v, e_30_1, error_1;
1904
1904
  var e_30, _c;
1905
1905
  return tslib_1.__generator(this, function (_d) {
1906
1906
  switch (_d.label) {
1907
1907
  case 0:
1908
+ _d.trys.push([0, 12, , 13]);
1908
1909
  x = typeof (this.settings.validate);
1909
1910
  if (!Array.isArray(this.settings.validate)) return [3 /*break*/, 9];
1910
1911
  _d.label = 1;
@@ -1940,7 +1941,15 @@ var FieldRefImplementation = /** @class */ (function () {
1940
1941
  case 10:
1941
1942
  _d.sent();
1942
1943
  _d.label = 11;
1943
- case 11: return [2 /*return*/];
1944
+ case 11: return [3 /*break*/, 13];
1945
+ case 12:
1946
+ error_1 = _d.sent();
1947
+ if (typeof error_1 === "string")
1948
+ this.error = error_1;
1949
+ else
1950
+ this.error = error_1.message;
1951
+ return [3 /*break*/, 13];
1952
+ case 13: return [2 /*return*/];
1944
1953
  }
1945
1954
  });
1946
1955
  });