neo4j-driver 5.2.0 → 5.3.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.
@@ -4879,6 +4879,7 @@ var WebSocketChannel = /** @class */ (function () {
4879
4879
  return new Promise(function (resolve, reject) {
4880
4880
  if (_this._ws && _this._ws.readyState !== WS_CLOSED) {
4881
4881
  _this._open = false;
4882
+ _this.stopReceiveTimeout();
4882
4883
  _this._clearConnectionTimeout();
4883
4884
  _this._ws.onclose = function () { return resolve(); };
4884
4885
  _this._ws.close();
@@ -4915,7 +4916,7 @@ var WebSocketChannel = /** @class */ (function () {
4915
4916
  * Start the receive timeout for the channel.
4916
4917
  */
4917
4918
  WebSocketChannel.prototype.startReceiveTimeout = function () {
4918
- if (this._receiveTimeout !== null && !this._receiveTimeoutStarted) {
4919
+ if (this._open && this._receiveTimeout !== null && !this._receiveTimeoutStarted) {
4919
4920
  this._receiveTimeoutStarted = true;
4920
4921
  this._resetTimeout();
4921
4922
  }
@@ -10287,14 +10288,13 @@ var BookmarkManager = /** @class */ (function () {
10287
10288
  * Method called when the bookmarks get updated when a transaction finished.
10288
10289
  *
10289
10290
  * This method will be called when auto-commit queries finish and when explicit transactions
10290
- * get commited.
10291
+ * get committed.
10291
10292
  *
10292
- * @param {string} database The database which the bookmarks belongs to
10293
10293
  * @param {Iterable<string>} previousBookmarks The bookmarks used when starting the transaction
10294
10294
  * @param {Iterable<string>} newBookmarks The new bookmarks received at the end of the transaction.
10295
10295
  * @returns {void}
10296
10296
  */
10297
- BookmarkManager.prototype.updateBookmarks = function (database, previousBookmarks, newBookmarks) {
10297
+ BookmarkManager.prototype.updateBookmarks = function (previousBookmarks, newBookmarks) {
10298
10298
  return __awaiter(this, void 0, void 0, function () {
10299
10299
  return __generator(this, function (_a) {
10300
10300
  throw new Error('Not implemented');
@@ -10302,40 +10302,11 @@ var BookmarkManager = /** @class */ (function () {
10302
10302
  });
10303
10303
  };
10304
10304
  /**
10305
- * Method called by the driver to get the bookmarks for one specific database
10305
+ * Method called by the driver to get the bookmarks.
10306
10306
  *
10307
- * @param {string} database The database which the bookmarks belong to
10308
10307
  * @returns {Iterable<string>} The set of bookmarks
10309
10308
  */
10310
- BookmarkManager.prototype.getBookmarks = function (database) {
10311
- return __awaiter(this, void 0, void 0, function () {
10312
- return __generator(this, function (_a) {
10313
- throw new Error('Not implemented');
10314
- });
10315
- });
10316
- };
10317
- /**
10318
- * Method called by the driver for getting all the bookmarks.
10319
- *
10320
- * This method should return all bookmarks for all databases present in the BookmarkManager.
10321
- *
10322
- * @returns {Iterable<string>} The set of bookmarks
10323
- */
10324
- BookmarkManager.prototype.getAllBookmarks = function () {
10325
- return __awaiter(this, void 0, void 0, function () {
10326
- return __generator(this, function (_a) {
10327
- throw new Error('Not implemented');
10328
- });
10329
- });
10330
- };
10331
- /**
10332
- * Forget the databases and its bookmarks
10333
- *
10334
- * This method is not called by the driver. Forgetting unused databases is the user's responsibility.
10335
- *
10336
- * @param {Iterable<string>} databases The databases which the bookmarks will be removed for.
10337
- */
10338
- BookmarkManager.prototype.forget = function (databases) {
10309
+ BookmarkManager.prototype.getBookmarks = function () {
10339
10310
  return __awaiter(this, void 0, void 0, function () {
10340
10311
  return __generator(this, function (_a) {
10341
10312
  throw new Error('Not implemented');
@@ -10350,11 +10321,9 @@ exports.default = BookmarkManager;
10350
10321
  *
10351
10322
  * @since 5.0
10352
10323
  * @experimental
10353
- * @property {Map<string,Iterable<string>>} [initialBookmarks@experimental] Defines the initial set of bookmarks. The key is the database name and the values are the bookmarks.
10354
- * @property {function([database]: string):Promise<Iterable<string>>} [bookmarksSupplier] Called for supplying extra bookmarks to the BookmarkManager
10355
- * 1. supplying bookmarks from the given database when the default BookmarkManager's `.getBookmarks(database)` gets called.
10356
- * 2. supplying all the bookmarks when the default BookmarkManager's `.getAllBookmarks()` gets called
10357
- * @property {function(database: string, bookmarks: Iterable<string>): Promise<void>} [bookmarksConsumer] Called when the set of bookmarks for database get updated
10324
+ * @property {Iterable<string>} [initialBookmarks] Defines the initial set of bookmarks. The key is the database name and the values are the bookmarks.
10325
+ * @property {function():Promise<Iterable<string>>} [bookmarksSupplier] Called for supplying extra bookmarks to the BookmarkManager
10326
+ * @property {function(bookmarks: Iterable<string>): Promise<void>} [bookmarksConsumer] Called when the set of bookmarks get updated
10358
10327
  */
10359
10328
  /**
10360
10329
  * Provides an configured {@link BookmarkManager} instance.
@@ -10365,27 +10334,25 @@ exports.default = BookmarkManager;
10365
10334
  * @returns {BookmarkManager}
10366
10335
  */
10367
10336
  function bookmarkManager(config) {
10368
- var _a;
10369
10337
  if (config === void 0) { config = {}; }
10370
- var initialBookmarks = new Map();
10371
- (_a = config.initialBookmarks) === null || _a === void 0 ? void 0 : _a.forEach(function (v, k) { return initialBookmarks.set(k, new Set(v)); });
10338
+ var initialBookmarks = new Set(config.initialBookmarks);
10372
10339
  return new Neo4jBookmarkManager(initialBookmarks, config.bookmarksSupplier, config.bookmarksConsumer);
10373
10340
  }
10374
10341
  exports.bookmarkManager = bookmarkManager;
10375
10342
  var Neo4jBookmarkManager = /** @class */ (function () {
10376
- function Neo4jBookmarkManager(_bookmarksPerDb, _bookmarksSupplier, _bookmarksConsumer) {
10377
- this._bookmarksPerDb = _bookmarksPerDb;
10343
+ function Neo4jBookmarkManager(_bookmarks, _bookmarksSupplier, _bookmarksConsumer) {
10344
+ this._bookmarks = _bookmarks;
10378
10345
  this._bookmarksSupplier = _bookmarksSupplier;
10379
10346
  this._bookmarksConsumer = _bookmarksConsumer;
10380
10347
  }
10381
- Neo4jBookmarkManager.prototype.updateBookmarks = function (database, previousBookmarks, newBookmarks) {
10348
+ Neo4jBookmarkManager.prototype.updateBookmarks = function (previousBookmarks, newBookmarks) {
10382
10349
  return __awaiter(this, void 0, void 0, function () {
10383
10350
  var bookmarks, previousBookmarks_1, previousBookmarks_1_1, bm, newBookmarks_1, newBookmarks_1_1, bm;
10384
10351
  var e_1, _a, e_2, _b;
10385
10352
  return __generator(this, function (_c) {
10386
10353
  switch (_c.label) {
10387
10354
  case 0:
10388
- bookmarks = this._getOrInitializeBookmarks(database);
10355
+ bookmarks = this._bookmarks;
10389
10356
  try {
10390
10357
  for (previousBookmarks_1 = __values(previousBookmarks), previousBookmarks_1_1 = previousBookmarks_1.next(); !previousBookmarks_1_1.done; previousBookmarks_1_1 = previousBookmarks_1.next()) {
10391
10358
  bm = previousBookmarks_1_1.value;
@@ -10413,7 +10380,7 @@ var Neo4jBookmarkManager = /** @class */ (function () {
10413
10380
  finally { if (e_2) throw e_2.error; }
10414
10381
  }
10415
10382
  if (!(typeof this._bookmarksConsumer === 'function')) return [3 /*break*/, 2];
10416
- return [4 /*yield*/, this._bookmarksConsumer(database, __spreadArray([], __read(bookmarks), false))];
10383
+ return [4 /*yield*/, this._bookmarksConsumer(__spreadArray([], __read(bookmarks), false))];
10417
10384
  case 1:
10418
10385
  _c.sent();
10419
10386
  _c.label = 2;
@@ -10422,15 +10389,7 @@ var Neo4jBookmarkManager = /** @class */ (function () {
10422
10389
  });
10423
10390
  });
10424
10391
  };
10425
- Neo4jBookmarkManager.prototype._getOrInitializeBookmarks = function (database) {
10426
- var maybeBookmarks = this._bookmarksPerDb.get(database);
10427
- if (maybeBookmarks === undefined) {
10428
- maybeBookmarks = new Set();
10429
- this._bookmarksPerDb.set(database, maybeBookmarks);
10430
- }
10431
- return maybeBookmarks;
10432
- };
10433
- Neo4jBookmarkManager.prototype.getBookmarks = function (database) {
10392
+ Neo4jBookmarkManager.prototype.getBookmarks = function () {
10434
10393
  var _a;
10435
10394
  return __awaiter(this, void 0, void 0, function () {
10436
10395
  var bookmarks, suppliedBookmarks, suppliedBookmarks_1, suppliedBookmarks_1_1, bm;
@@ -10438,9 +10397,9 @@ var Neo4jBookmarkManager = /** @class */ (function () {
10438
10397
  return __generator(this, function (_c) {
10439
10398
  switch (_c.label) {
10440
10399
  case 0:
10441
- bookmarks = new Set(this._bookmarksPerDb.get(database));
10400
+ bookmarks = new Set(this._bookmarks);
10442
10401
  if (!(typeof this._bookmarksSupplier === 'function')) return [3 /*break*/, 2];
10443
- return [4 /*yield*/, this._bookmarksSupplier(database)];
10402
+ return [4 /*yield*/, this._bookmarksSupplier()];
10444
10403
  case 1:
10445
10404
  suppliedBookmarks = (_a = _c.sent()) !== null && _a !== void 0 ? _a : [];
10446
10405
  try {
@@ -10462,85 +10421,6 @@ var Neo4jBookmarkManager = /** @class */ (function () {
10462
10421
  });
10463
10422
  });
10464
10423
  };
10465
- Neo4jBookmarkManager.prototype.getAllBookmarks = function () {
10466
- var _a;
10467
- return __awaiter(this, void 0, void 0, function () {
10468
- var bookmarks, _b, _c, _d, dbBookmarks, dbBookmarks_1, dbBookmarks_1_1, bm, suppliedBookmarks, suppliedBookmarks_2, suppliedBookmarks_2_1, bm;
10469
- var e_4, _e, e_5, _f, e_6, _g;
10470
- return __generator(this, function (_h) {
10471
- switch (_h.label) {
10472
- case 0:
10473
- bookmarks = new Set();
10474
- try {
10475
- for (_b = __values(this._bookmarksPerDb), _c = _b.next(); !_c.done; _c = _b.next()) {
10476
- _d = __read(_c.value, 2), dbBookmarks = _d[1];
10477
- try {
10478
- for (dbBookmarks_1 = (e_5 = void 0, __values(dbBookmarks)), dbBookmarks_1_1 = dbBookmarks_1.next(); !dbBookmarks_1_1.done; dbBookmarks_1_1 = dbBookmarks_1.next()) {
10479
- bm = dbBookmarks_1_1.value;
10480
- bookmarks.add(bm);
10481
- }
10482
- }
10483
- catch (e_5_1) { e_5 = { error: e_5_1 }; }
10484
- finally {
10485
- try {
10486
- if (dbBookmarks_1_1 && !dbBookmarks_1_1.done && (_f = dbBookmarks_1.return)) _f.call(dbBookmarks_1);
10487
- }
10488
- finally { if (e_5) throw e_5.error; }
10489
- }
10490
- }
10491
- }
10492
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
10493
- finally {
10494
- try {
10495
- if (_c && !_c.done && (_e = _b.return)) _e.call(_b);
10496
- }
10497
- finally { if (e_4) throw e_4.error; }
10498
- }
10499
- if (!(typeof this._bookmarksSupplier === 'function')) return [3 /*break*/, 2];
10500
- return [4 /*yield*/, this._bookmarksSupplier()];
10501
- case 1:
10502
- suppliedBookmarks = (_a = _h.sent()) !== null && _a !== void 0 ? _a : [];
10503
- try {
10504
- for (suppliedBookmarks_2 = __values(suppliedBookmarks), suppliedBookmarks_2_1 = suppliedBookmarks_2.next(); !suppliedBookmarks_2_1.done; suppliedBookmarks_2_1 = suppliedBookmarks_2.next()) {
10505
- bm = suppliedBookmarks_2_1.value;
10506
- bookmarks.add(bm);
10507
- }
10508
- }
10509
- catch (e_6_1) { e_6 = { error: e_6_1 }; }
10510
- finally {
10511
- try {
10512
- if (suppliedBookmarks_2_1 && !suppliedBookmarks_2_1.done && (_g = suppliedBookmarks_2.return)) _g.call(suppliedBookmarks_2);
10513
- }
10514
- finally { if (e_6) throw e_6.error; }
10515
- }
10516
- _h.label = 2;
10517
- case 2: return [2 /*return*/, bookmarks];
10518
- }
10519
- });
10520
- });
10521
- };
10522
- Neo4jBookmarkManager.prototype.forget = function (databases) {
10523
- return __awaiter(this, void 0, void 0, function () {
10524
- var databases_1, databases_1_1, database;
10525
- var e_7, _a;
10526
- return __generator(this, function (_b) {
10527
- try {
10528
- for (databases_1 = __values(databases), databases_1_1 = databases_1.next(); !databases_1_1.done; databases_1_1 = databases_1.next()) {
10529
- database = databases_1_1.value;
10530
- this._bookmarksPerDb.delete(database);
10531
- }
10532
- }
10533
- catch (e_7_1) { e_7 = { error: e_7_1 }; }
10534
- finally {
10535
- try {
10536
- if (databases_1_1 && !databases_1_1.done && (_a = databases_1.return)) _a.call(databases_1);
10537
- }
10538
- finally { if (e_7) throw e_7.error; }
10539
- }
10540
- return [2 /*return*/];
10541
- });
10542
- });
10543
- };
10544
10424
  return Neo4jBookmarkManager;
10545
10425
  }());
10546
10426
 
@@ -10795,7 +10675,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10795
10675
  return (mod && mod.__esModule) ? mod : { "default": mod };
10796
10676
  };
10797
10677
  Object.defineProperty(exports, "__esModule", { value: true });
10798
- exports.WRITE = exports.READ = exports.Driver = void 0;
10678
+ exports.SessionConfig = exports.WRITE = exports.READ = exports.Driver = void 0;
10799
10679
  var bookmarks_1 = require("./internal/bookmarks");
10800
10680
  var configured_custom_resolver_1 = __importDefault(require("./internal/resolver/configured-custom-resolver"));
10801
10681
  var constants_1 = require("./internal/constants");
@@ -10849,6 +10729,44 @@ var SessionConfig = /** @class */ (function () {
10849
10729
  /**
10850
10730
  * The database this session will operate on.
10851
10731
  *
10732
+ * This option has no explicit value by default, but it is recommended to set
10733
+ * one if the target database is known in advance. This has the benefit of
10734
+ * ensuring a consistent target database name throughout the session in a
10735
+ * straightforward way and potentially simplifies driver logic as well as
10736
+ * reduces network communication resulting in better performance.
10737
+ *
10738
+ * Usage of Cypher clauses like USE is not a replacement for this option.
10739
+ * The driver does not parse any Cypher.
10740
+ *
10741
+ * When no explicit name is set, the driver behavior depends on the connection
10742
+ * URI scheme supplied to the driver on instantiation and Bolt protocol
10743
+ * version.
10744
+ *
10745
+ * Specifically, the following applies:
10746
+ *
10747
+ * - **bolt schemes** - queries are dispatched to the server for execution
10748
+ * without explicit database name supplied, meaning that the target database
10749
+ * name for query execution is determined by the server. It is important to
10750
+ * note that the target database may change (even within the same session),
10751
+ * for instance if the user's home database is changed on the server.
10752
+ *
10753
+ * - **neo4j schemes** - providing that Bolt protocol version 4.4, which was
10754
+ * introduced with Neo4j server 4.4, or above is available, the driver
10755
+ * fetches the user's home database name from the server on first query
10756
+ * execution within the session and uses the fetched database name
10757
+ * explicitly for all queries executed within the session. This ensures that
10758
+ * the database name remains consistent within the given session. For
10759
+ * instance, if the user's home database name is 'movies' and the server
10760
+ * supplies it to the driver upon database name fetching for the session,
10761
+ * all queries within that session are executed with the explicit database
10762
+ * name 'movies' supplied. Any change to the user’s home database is
10763
+ * reflected only in sessions created after such change takes effect. This
10764
+ * behavior requires additional network communication. In clustered
10765
+ * environments, it is strongly recommended to avoid a single point of
10766
+ * failure. For instance, by ensuring that the connection URI resolves to
10767
+ * multiple endpoints. For older Bolt protocol versions the behavior is the
10768
+ * same as described for the **bolt schemes** above.
10769
+ *
10852
10770
  * @type {string|undefined}
10853
10771
  */
10854
10772
  this.database = '';
@@ -10874,10 +10792,10 @@ var SessionConfig = /** @class */ (function () {
10874
10792
  * Enabling it is done by supplying an BookmarkManager implementation instance to this param.
10875
10793
  * A default implementation could be acquired by calling the factory function {@link bookmarkManager}.
10876
10794
  *
10877
- * **Warning**: Share the same BookmarkManager instance accross all session can have a negative impact
10795
+ * **Warning**: Sharing the same BookmarkManager instance across multiple sessions can have a negative impact
10878
10796
  * on performance since all the queries will wait for the latest changes being propagated across the cluster.
10879
10797
  * For keeping consistency between a group of queries, use {@link Session} for grouping them.
10880
- * For keeping consistency between a group of sessions, use {@link BookmarkManager} instance for groupping them.
10798
+ * For keeping consistency between a group of sessions, use {@link BookmarkManager} instance for grouping them.
10881
10799
  *
10882
10800
  * @example
10883
10801
  * const bookmarkManager = neo4j.bookmarkManager()
@@ -10894,7 +10812,7 @@ var SessionConfig = /** @class */ (function () {
10894
10812
  *
10895
10813
  * // Reading Driver User will wait of the changes being propagated to the server before RUN the query
10896
10814
  * // So the 'Driver User' person should exist in the Result, unless deleted.
10897
- * const linkedSesssion2 = await linkedSession2.run('CREATE (p:Person {name: $name}) RETURN p', { name: 'Driver User'})
10815
+ * const linkedResult = await linkedSession2.run('CREATE (p:Person {name: $name}) RETURN p', { name: 'Driver User'})
10898
10816
  *
10899
10817
  * await linkedSession1.close()
10900
10818
  * await linkedSession2.close()
@@ -10908,6 +10826,7 @@ var SessionConfig = /** @class */ (function () {
10908
10826
  }
10909
10827
  return SessionConfig;
10910
10828
  }());
10829
+ exports.SessionConfig = SessionConfig;
10911
10830
  /**
10912
10831
  * A driver maintains one or more {@link Session}s with a remote
10913
10832
  * Neo4j instance. Through the {@link Session}s you can send queries
@@ -11860,6 +11779,7 @@ var auth_1 = __importDefault(require("./auth"));
11860
11779
  exports.auth = auth_1.default;
11861
11780
  var bookmark_manager_1 = __importStar(require("./bookmark-manager"));
11862
11781
  Object.defineProperty(exports, "bookmarkManager", { enumerable: true, get: function () { return bookmark_manager_1.bookmarkManager; } });
11782
+ var driver_2 = require("./driver");
11863
11783
  var types = __importStar(require("./types"));
11864
11784
  exports.types = types;
11865
11785
  var json = __importStar(require("./json"));
@@ -15878,9 +15798,7 @@ var Record = /** @class */ (function () {
15878
15798
  if (!(typeof key === 'number')) {
15879
15799
  index = this._fieldLookup[key];
15880
15800
  if (index === undefined) {
15881
- throw (0, error_1.newError)("This record has no field with key '" +
15882
- key +
15883
- "', available key are: [" +
15801
+ throw (0, error_1.newError)("This record has no field with key '".concat(key.toString(), "', available keys are: [") +
15884
15802
  this.keys.toString() +
15885
15803
  '].');
15886
15804
  }
@@ -17368,7 +17286,7 @@ var Session = /** @class */ (function () {
17368
17286
  var bookmarks;
17369
17287
  return __generator(this, function (_b) {
17370
17288
  switch (_b.label) {
17371
- case 0: return [4 /*yield*/, ((_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.getAllBookmarks())];
17289
+ case 0: return [4 /*yield*/, ((_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.getBookmarks())];
17372
17290
  case 1:
17373
17291
  bookmarks = _b.sent();
17374
17292
  if (bookmarks === undefined) {
@@ -17491,7 +17409,7 @@ var Session = /** @class */ (function () {
17491
17409
  var bookmarks;
17492
17410
  return __generator(this, function (_b) {
17493
17411
  switch (_b.label) {
17494
- case 0: return [4 /*yield*/, ((_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.getBookmarks('system'))];
17412
+ case 0: return [4 /*yield*/, ((_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.getBookmarks())];
17495
17413
  case 1:
17496
17414
  bookmarks = _b.sent();
17497
17415
  if (bookmarks === undefined) {
@@ -17511,7 +17429,7 @@ var Session = /** @class */ (function () {
17511
17429
  Session.prototype._updateBookmarks = function (newBookmarks, previousBookmarks, database) {
17512
17430
  var _a, _b, _c;
17513
17431
  if ((newBookmarks != null) && !newBookmarks.isEmpty()) {
17514
- (_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.updateBookmarks(database !== null && database !== void 0 ? database : this._database, (_b = previousBookmarks === null || previousBookmarks === void 0 ? void 0 : previousBookmarks.values()) !== null && _b !== void 0 ? _b : [], (_c = newBookmarks === null || newBookmarks === void 0 ? void 0 : newBookmarks.values()) !== null && _c !== void 0 ? _c : []);
17432
+ (_a = this._bookmarkManager) === null || _a === void 0 ? void 0 : _a.updateBookmarks((_b = previousBookmarks === null || previousBookmarks === void 0 ? void 0 : previousBookmarks.values()) !== null && _b !== void 0 ? _b : [], (_c = newBookmarks === null || newBookmarks === void 0 ? void 0 : newBookmarks.values()) !== null && _c !== void 0 ? _c : []);
17515
17433
  this._lastBookmarks = newBookmarks;
17516
17434
  this._configuredBookmarks = bookmarks_1.Bookmarks.empty();
17517
17435
  }
@@ -30479,85 +30397,6 @@ function simpleEnd(buf) {
30479
30397
  return buf && buf.length ? this.write(buf) : '';
30480
30398
  }
30481
30399
  },{"safe-buffer":346}],348:[function(require,module,exports){
30482
- (function (setImmediate,clearImmediate){(function (){
30483
- var nextTick = require('process/browser.js').nextTick;
30484
- var apply = Function.prototype.apply;
30485
- var slice = Array.prototype.slice;
30486
- var immediateIds = {};
30487
- var nextImmediateId = 0;
30488
-
30489
- // DOM APIs, for completeness
30490
-
30491
- exports.setTimeout = function() {
30492
- return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
30493
- };
30494
- exports.setInterval = function() {
30495
- return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
30496
- };
30497
- exports.clearTimeout =
30498
- exports.clearInterval = function(timeout) { timeout.close(); };
30499
-
30500
- function Timeout(id, clearFn) {
30501
- this._id = id;
30502
- this._clearFn = clearFn;
30503
- }
30504
- Timeout.prototype.unref = Timeout.prototype.ref = function() {};
30505
- Timeout.prototype.close = function() {
30506
- this._clearFn.call(window, this._id);
30507
- };
30508
-
30509
- // Does not start the time, just sets up the members needed.
30510
- exports.enroll = function(item, msecs) {
30511
- clearTimeout(item._idleTimeoutId);
30512
- item._idleTimeout = msecs;
30513
- };
30514
-
30515
- exports.unenroll = function(item) {
30516
- clearTimeout(item._idleTimeoutId);
30517
- item._idleTimeout = -1;
30518
- };
30519
-
30520
- exports._unrefActive = exports.active = function(item) {
30521
- clearTimeout(item._idleTimeoutId);
30522
-
30523
- var msecs = item._idleTimeout;
30524
- if (msecs >= 0) {
30525
- item._idleTimeoutId = setTimeout(function onTimeout() {
30526
- if (item._onTimeout)
30527
- item._onTimeout();
30528
- }, msecs);
30529
- }
30530
- };
30531
-
30532
- // That's not how node.js implements it but the exposed api is the same.
30533
- exports.setImmediate = typeof setImmediate === "function" ? setImmediate : function(fn) {
30534
- var id = nextImmediateId++;
30535
- var args = arguments.length < 2 ? false : slice.call(arguments, 1);
30536
-
30537
- immediateIds[id] = true;
30538
-
30539
- nextTick(function onNextTick() {
30540
- if (immediateIds[id]) {
30541
- // fn.call() is faster so we optimize for the common use-case
30542
- // @see http://jsperf.com/call-apply-segu
30543
- if (args) {
30544
- fn.apply(null, args);
30545
- } else {
30546
- fn.call(null);
30547
- }
30548
- // Prevent ids from leaking
30549
- exports.clearImmediate(id);
30550
- }
30551
- });
30552
-
30553
- return id;
30554
- };
30555
-
30556
- exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : function(id) {
30557
- delete immediateIds[id];
30558
- };
30559
- }).call(this)}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
30560
- },{"process/browser.js":118,"timers":348}],349:[function(require,module,exports){
30561
30400
  "use strict";
30562
30401
 
30563
30402
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -30679,7 +30518,7 @@ function validateFetchSizeValue(rawValue, defaultWhenAbsent) {
30679
30518
  var _default = Driver;
30680
30519
  exports["default"] = _default;
30681
30520
 
30682
- },{"./session-rx":353,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/getPrototypeOf":108,"@babel/runtime/helpers/inherits":109,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/helpers/possibleConstructorReturn":111,"neo4j-driver-core":75}],350:[function(require,module,exports){
30521
+ },{"./session-rx":352,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/getPrototypeOf":108,"@babel/runtime/helpers/inherits":109,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/helpers/possibleConstructorReturn":111,"neo4j-driver-core":75}],349:[function(require,module,exports){
30683
30522
  (function (global){(function (){
30684
30523
  "use strict";
30685
30524
 
@@ -31431,7 +31270,7 @@ var _default = forExport;
31431
31270
  exports["default"] = _default;
31432
31271
 
31433
31272
  }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
31434
- },{"./driver":349,"./result-rx":352,"./session-rx":353,"./transaction-managed-rx":354,"./transaction-rx":355,"./version":356,"@babel/runtime/helpers/asyncToGenerator":105,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/regenerator":114,"neo4j-driver-bolt-connection":51,"neo4j-driver-core":75}],351:[function(require,module,exports){
31273
+ },{"./driver":348,"./result-rx":351,"./session-rx":352,"./transaction-managed-rx":353,"./transaction-rx":354,"./version":355,"@babel/runtime/helpers/asyncToGenerator":105,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/regenerator":114,"neo4j-driver-bolt-connection":51,"neo4j-driver-core":75}],350:[function(require,module,exports){
31435
31274
  "use strict";
31436
31275
 
31437
31276
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -31572,8 +31411,7 @@ function valueOrDefault(value, defaultValue) {
31572
31411
  return defaultValue;
31573
31412
  }
31574
31413
 
31575
- },{"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345}],352:[function(require,module,exports){
31576
- (function (setImmediate){(function (){
31414
+ },{"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345}],351:[function(require,module,exports){
31577
31415
  "use strict";
31578
31416
 
31579
31417
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -31900,20 +31738,20 @@ function createFullyControlledSubject(iterator, completeObserver) {
31900
31738
  var subject = new _rxjs.Subject();
31901
31739
 
31902
31740
  var pushNextValue = /*#__PURE__*/function () {
31903
- var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(result) {
31741
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(result) {
31904
31742
  var _yield$result, done, value;
31905
31743
 
31906
- return _regenerator["default"].wrap(function _callee3$(_context3) {
31744
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
31907
31745
  while (1) {
31908
- switch (_context3.prev = _context3.next) {
31746
+ switch (_context2.prev = _context2.next) {
31909
31747
  case 0:
31910
- _context3.prev = 0;
31748
+ _context2.prev = 0;
31911
31749
  streamControl.pushing = true;
31912
- _context3.next = 4;
31750
+ _context2.next = 4;
31913
31751
  return result;
31914
31752
 
31915
31753
  case 4:
31916
- _yield$result = _context3.sent;
31754
+ _yield$result = _context2.sent;
31917
31755
  done = _yield$result.done;
31918
31756
  value = _yield$result.value;
31919
31757
 
@@ -31924,47 +31762,30 @@ function createFullyControlledSubject(iterator, completeObserver) {
31924
31762
  subject.next(value);
31925
31763
 
31926
31764
  if (!streamControl.paused) {
31927
- setImmediate( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
31928
- return _regenerator["default"].wrap(function _callee2$(_context2) {
31929
- while (1) {
31930
- switch (_context2.prev = _context2.next) {
31931
- case 0:
31932
- _context2.next = 2;
31933
- return pushNextValue(iterator.next());
31934
-
31935
- case 2:
31936
- return _context2.abrupt("return", _context2.sent);
31937
-
31938
- case 3:
31939
- case "end":
31940
- return _context2.stop();
31941
- }
31942
- }
31943
- }, _callee2);
31944
- })));
31765
+ pushNextValue(iterator.next())["catch"](function () {});
31945
31766
  }
31946
31767
  }
31947
31768
 
31948
- _context3.next = 14;
31769
+ _context2.next = 14;
31949
31770
  break;
31950
31771
 
31951
31772
  case 10:
31952
- _context3.prev = 10;
31953
- _context3.t0 = _context3["catch"](0);
31954
- subject.error(_context3.t0);
31955
- completeObserver.error(_context3.t0);
31773
+ _context2.prev = 10;
31774
+ _context2.t0 = _context2["catch"](0);
31775
+ subject.error(_context2.t0);
31776
+ completeObserver.error(_context2.t0);
31956
31777
 
31957
31778
  case 14:
31958
- _context3.prev = 14;
31779
+ _context2.prev = 14;
31959
31780
  streamControl.pushing = false;
31960
- return _context3.finish(14);
31781
+ return _context2.finish(14);
31961
31782
 
31962
31783
  case 17:
31963
31784
  case "end":
31964
- return _context3.stop();
31785
+ return _context2.stop();
31965
31786
  }
31966
31787
  }
31967
- }, _callee3, null, [[0, 10, 14, 17]]);
31788
+ }, _callee2, null, [[0, 10, 14, 17]]);
31968
31789
  }));
31969
31790
 
31970
31791
  return function pushNextValue(_x) {
@@ -31977,20 +31798,20 @@ function createFullyControlledSubject(iterator, completeObserver) {
31977
31798
  }
31978
31799
 
31979
31800
  function _push() {
31980
- _push = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(value) {
31981
- return _regenerator["default"].wrap(function _callee4$(_context4) {
31801
+ _push = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(value) {
31802
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
31982
31803
  while (1) {
31983
- switch (_context4.prev = _context4.next) {
31804
+ switch (_context3.prev = _context3.next) {
31984
31805
  case 0:
31985
- _context4.next = 2;
31806
+ _context3.next = 2;
31986
31807
  return pushNextValue(iterator.next(value));
31987
31808
 
31988
31809
  case 2:
31989
31810
  case "end":
31990
- return _context4.stop();
31811
+ return _context3.stop();
31991
31812
  }
31992
31813
  }
31993
- }, _callee4);
31814
+ }, _callee3);
31994
31815
  }));
31995
31816
  return _push.apply(this, arguments);
31996
31817
  }
@@ -32002,16 +31823,16 @@ function createFullyControlledSubject(iterator, completeObserver) {
32002
31823
 
32003
31824
  var StreamControl = /*#__PURE__*/function () {
32004
31825
  function StreamControl() {
32005
- var push = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
32006
- return _regenerator["default"].wrap(function _callee5$(_context5) {
31826
+ var push = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
31827
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
32007
31828
  while (1) {
32008
- switch (_context5.prev = _context5.next) {
31829
+ switch (_context4.prev = _context4.next) {
32009
31830
  case 0:
32010
31831
  case "end":
32011
- return _context5.stop();
31832
+ return _context4.stop();
32012
31833
  }
32013
31834
  }
32014
- }, _callee5);
31835
+ }, _callee4);
32015
31836
  }));
32016
31837
  (0, _classCallCheck2["default"])(this, StreamControl);
32017
31838
  this._paused = false;
@@ -32040,29 +31861,29 @@ var StreamControl = /*#__PURE__*/function () {
32040
31861
  }, {
32041
31862
  key: "resume",
32042
31863
  value: function () {
32043
- var _resume = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
31864
+ var _resume = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
32044
31865
  var wasPaused;
32045
- return _regenerator["default"].wrap(function _callee6$(_context6) {
31866
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
32046
31867
  while (1) {
32047
- switch (_context6.prev = _context6.next) {
31868
+ switch (_context5.prev = _context5.next) {
32048
31869
  case 0:
32049
31870
  wasPaused = this._paused;
32050
31871
  this._paused = false;
32051
31872
 
32052
31873
  if (!(wasPaused && !this._pushing)) {
32053
- _context6.next = 5;
31874
+ _context5.next = 5;
32054
31875
  break;
32055
31876
  }
32056
31877
 
32057
- _context6.next = 5;
31878
+ _context5.next = 5;
32058
31879
  return this._push();
32059
31880
 
32060
31881
  case 5:
32061
31882
  case "end":
32062
- return _context6.stop();
31883
+ return _context5.stop();
32063
31884
  }
32064
31885
  }
32065
- }, _callee6, this);
31886
+ }, _callee5, this);
32066
31887
  }));
32067
31888
 
32068
31889
  function resume() {
@@ -32074,24 +31895,24 @@ var StreamControl = /*#__PURE__*/function () {
32074
31895
  }, {
32075
31896
  key: "push",
32076
31897
  value: function () {
32077
- var _push2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
32078
- return _regenerator["default"].wrap(function _callee7$(_context7) {
31898
+ var _push2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
31899
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
32079
31900
  while (1) {
32080
- switch (_context7.prev = _context7.next) {
31901
+ switch (_context6.prev = _context6.next) {
32081
31902
  case 0:
32082
31903
  this.pause();
32083
- _context7.next = 3;
31904
+ _context6.next = 3;
32084
31905
  return this._push();
32085
31906
 
32086
31907
  case 3:
32087
- return _context7.abrupt("return", _context7.sent);
31908
+ return _context6.abrupt("return", _context6.sent);
32088
31909
 
32089
31910
  case 4:
32090
31911
  case "end":
32091
- return _context7.stop();
31912
+ return _context6.stop();
32092
31913
  }
32093
31914
  }
32094
- }, _callee7, this);
31915
+ }, _callee6, this);
32095
31916
  }));
32096
31917
 
32097
31918
  function push() {
@@ -32112,8 +31933,7 @@ var StreamControl = /*#__PURE__*/function () {
32112
31933
  return StreamControl;
32113
31934
  }();
32114
31935
 
32115
- }).call(this)}).call(this,require("timers").setImmediate)
32116
- },{"@babel/runtime/helpers/asyncToGenerator":105,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/regenerator":114,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345,"timers":348}],353:[function(require,module,exports){
31936
+ },{"@babel/runtime/helpers/asyncToGenerator":105,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"@babel/runtime/regenerator":114,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345}],352:[function(require,module,exports){
32117
31937
  "use strict";
32118
31938
 
32119
31939
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -32433,7 +32253,7 @@ function _createRetryLogic(config) {
32433
32253
  });
32434
32254
  }
32435
32255
 
32436
- },{"./internal/retry-logic-rx":351,"./result-rx":352,"./transaction-managed-rx":354,"./transaction-rx":355,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345}],354:[function(require,module,exports){
32256
+ },{"./internal/retry-logic-rx":350,"./result-rx":351,"./transaction-managed-rx":353,"./transaction-rx":354,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120,"rxjs/operators":345}],353:[function(require,module,exports){
32437
32257
  "use strict";
32438
32258
 
32439
32259
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -32521,7 +32341,7 @@ var RxManagedTransaction = /*#__PURE__*/function () {
32521
32341
  var _default = RxManagedTransaction;
32522
32342
  exports["default"] = _default;
32523
32343
 
32524
- },{"./result-rx":352,"./transaction-rx":355,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110}],355:[function(require,module,exports){
32344
+ },{"./result-rx":351,"./transaction-rx":354,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110}],354:[function(require,module,exports){
32525
32345
  "use strict";
32526
32346
 
32527
32347
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -32677,7 +32497,7 @@ var RxTransaction = /*#__PURE__*/function () {
32677
32497
 
32678
32498
  exports["default"] = RxTransaction;
32679
32499
 
32680
- },{"./result-rx":352,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120}],356:[function(require,module,exports){
32500
+ },{"./result-rx":351,"@babel/runtime/helpers/classCallCheck":106,"@babel/runtime/helpers/createClass":107,"@babel/runtime/helpers/interopRequireDefault":110,"neo4j-driver-core":75,"rxjs":120}],355:[function(require,module,exports){
32681
32501
  "use strict";
32682
32502
 
32683
32503
  Object.defineProperty(exports, "__esModule", {
@@ -32711,8 +32531,8 @@ exports["default"] = void 0;
32711
32531
  // This is set up this way to keep the version in the code in
32712
32532
  // sync with the npm package version, and to allow the build
32713
32533
  // system to control version names at packaging time.
32714
- var _default = '5.2.0';
32534
+ var _default = '5.3.0';
32715
32535
  exports["default"] = _default;
32716
32536
 
32717
- },{}]},{},[350])(350)
32537
+ },{}]},{},[349])(349)
32718
32538
  });