gremlin 3.7.0 → 3.7.2

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.
Files changed (122) hide show
  1. package/.eslintrc.js +3 -4
  2. package/.nvmrc +1 -0
  3. package/LICENSE +9 -1
  4. package/NOTICE +1 -1
  5. package/README.md +1 -1
  6. package/doc/AnonymousTraversalSource.html +2 -2
  7. package/doc/Authenticator.html +2 -2
  8. package/doc/Bytecode.html +2 -2
  9. package/doc/CardinalityValue.html +6 -6
  10. package/doc/Client.html +12 -78
  11. package/doc/Connection.html +12 -166
  12. package/doc/DataType.js.html +149 -0
  13. package/doc/DriverRemoteConnection.html +15 -81
  14. package/doc/EdgeLabelVerificationStrategy.html +2 -2
  15. package/doc/Graph.html +2 -2
  16. package/doc/GraphBinaryReader.js.html +132 -0
  17. package/doc/GraphBinaryWriter.js.html +135 -0
  18. package/doc/GraphSON2Reader.html +4 -4
  19. package/doc/GraphSON2Writer.html +5 -5
  20. package/doc/GraphSON3Reader.html +3 -3
  21. package/doc/GraphSON3Writer.html +3 -3
  22. package/doc/GraphTraversal.html +4306 -298
  23. package/doc/GraphTraversalSource.html +2 -2
  24. package/doc/HaltedTraverserStrategy.html +2 -2
  25. package/doc/MatchAlgorithmStrategy.html +2 -2
  26. package/doc/P.html +2 -2
  27. package/doc/PartitionStrategy.html +2 -2
  28. package/doc/Path.html +2 -2
  29. package/doc/PlainTextSaslAuthenticator.html +2 -2
  30. package/doc/ProductiveByStrategy.html +2 -2
  31. package/doc/RemoteConnection.html +2 -2
  32. package/doc/RemoteStrategy.html +2 -2
  33. package/doc/RemoteTraversal.html +2 -2
  34. package/doc/ReservedKeysVerificationStrategy.html +2 -2
  35. package/doc/ResponseError.html +2 -2
  36. package/doc/ResultSet.html +7 -95
  37. package/doc/SaslAuthenticator.html +2 -2
  38. package/doc/SaslMechanismBase.html +2 -2
  39. package/doc/SaslMechanismPlain.html +7 -7
  40. package/doc/SeedStrategy.html +2 -2
  41. package/doc/SubgraphStrategy.html +2 -2
  42. package/doc/TextP.html +2 -2
  43. package/doc/Transaction.html +5 -5
  44. package/doc/Translator.html +2 -2
  45. package/doc/TraversalStrategies.html +2 -2
  46. package/doc/TraversalStrategy.html +2 -2
  47. package/doc/TypeSerializer.html +2 -2
  48. package/doc/driver_auth_authenticator.js.html +2 -2
  49. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
  50. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +3 -2
  51. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +2 -2
  52. package/doc/driver_auth_sasl-authenticator.js.html +2 -2
  53. package/doc/driver_client.js.html +3 -5
  54. package/doc/driver_connection.js.html +91 -116
  55. package/doc/driver_driver-remote-connection.js.html +3 -5
  56. package/doc/driver_remote-connection.js.html +2 -2
  57. package/doc/driver_response-error.js.html +2 -2
  58. package/doc/driver_result-set.js.html +2 -11
  59. package/doc/global.html +159 -4
  60. package/doc/index.html +3 -3
  61. package/doc/module.exports.html +4 -4
  62. package/doc/process_anonymous-traversal.js.html +2 -2
  63. package/doc/process_bytecode.js.html +2 -2
  64. package/doc/process_graph-traversal.js.html +259 -2
  65. package/doc/process_transaction.js.html +12 -4
  66. package/doc/process_translator.js.html +2 -2
  67. package/doc/process_traversal-strategy.js.html +2 -2
  68. package/doc/process_traversal.js.html +3 -2
  69. package/doc/structure_graph.js.html +2 -2
  70. package/doc/structure_io_binary_internals_DataType.js.html +3 -2
  71. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +4 -2
  72. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +4 -2
  73. package/doc/structure_io_graph-serializer.js.html +3 -2
  74. package/doc/structure_io_type-serializers.js.html +2 -2
  75. package/doc/utils.js.html +181 -0
  76. package/index.js +1 -0
  77. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +1 -0
  78. package/lib/driver/client.js +1 -3
  79. package/lib/driver/connection.js +89 -114
  80. package/lib/driver/driver-remote-connection.js +1 -3
  81. package/lib/driver/result-set.js +0 -9
  82. package/lib/process/graph-traversal.js +257 -0
  83. package/lib/process/transaction.js +10 -2
  84. package/lib/process/traversal.js +1 -0
  85. package/lib/structure/io/binary/internals/AnySerializer.js +2 -0
  86. package/lib/structure/io/binary/internals/ArraySerializer.js +2 -0
  87. package/lib/structure/io/binary/internals/BigIntegerSerializer.js +2 -0
  88. package/lib/structure/io/binary/internals/BooleanSerializer.js +2 -0
  89. package/lib/structure/io/binary/internals/BulkSetSerializer.js +2 -0
  90. package/lib/structure/io/binary/internals/ByteBufferSerializer.js +2 -0
  91. package/lib/structure/io/binary/internals/ByteSerializer.js +2 -0
  92. package/lib/structure/io/binary/internals/BytecodeSerializer.js +1 -0
  93. package/lib/structure/io/binary/internals/DataType.js +1 -0
  94. package/lib/structure/io/binary/internals/DateSerializer.js +2 -0
  95. package/lib/structure/io/binary/internals/DoubleSerializer.js +2 -0
  96. package/lib/structure/io/binary/internals/EdgeSerializer.js +1 -0
  97. package/lib/structure/io/binary/internals/EnumSerializer.js +2 -0
  98. package/lib/structure/io/binary/internals/FloatSerializer.js +2 -0
  99. package/lib/structure/io/binary/internals/GraphBinaryReader.js +2 -0
  100. package/lib/structure/io/binary/internals/GraphBinaryWriter.js +2 -0
  101. package/lib/structure/io/binary/internals/IntSerializer.js +2 -0
  102. package/lib/structure/io/binary/internals/LambdaSerializer.js +1 -0
  103. package/lib/structure/io/binary/internals/LongSerializer.js +2 -0
  104. package/lib/structure/io/binary/internals/LongSerializerNg.js +2 -0
  105. package/lib/structure/io/binary/internals/MapSerializer.js +2 -0
  106. package/lib/structure/io/binary/internals/PSerializer.js +1 -0
  107. package/lib/structure/io/binary/internals/PathSerializer.js +1 -0
  108. package/lib/structure/io/binary/internals/PropertySerializer.js +1 -0
  109. package/lib/structure/io/binary/internals/ShortSerializer.js +2 -0
  110. package/lib/structure/io/binary/internals/StringSerializer.js +2 -0
  111. package/lib/structure/io/binary/internals/TextPSerializer.js +1 -0
  112. package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +2 -0
  113. package/lib/structure/io/binary/internals/TraverserSerializer.js +1 -0
  114. package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +2 -0
  115. package/lib/structure/io/binary/internals/UuidSerializer.js +2 -0
  116. package/lib/structure/io/binary/internals/VertexPropertySerializer.js +1 -0
  117. package/lib/structure/io/binary/internals/VertexSerializer.js +1 -0
  118. package/lib/structure/io/binary/internals/utils.js +2 -0
  119. package/lib/structure/io/graph-serializer.js +1 -0
  120. package/lib/utils.js +40 -29
  121. package/licenses/chai +21 -0
  122. package/package.json +8 -4
@@ -22,11 +22,11 @@
22
22
  */
23
23
  'use strict';
24
24
 
25
- const EventEmitter = require('events');
26
- const Stream = require('stream');
27
- const WebSocket = require('ws');
28
- const util = require('util');
25
+ const { Buffer } = require('buffer');
26
+ const EventEmitter = require('eventemitter3');
27
+ const Stream = require('readable-stream');
29
28
  const utils = require('../utils');
29
+ const { DeferredPromise } = utils;
30
30
  const serializer = require('../structure/io/graph-serializer');
31
31
  const { graphBinaryReader, graphBinaryWriter } = require('../structure/io/binary/GraphBinary');
32
32
  const ResultSet = require('./result-set');
@@ -43,8 +43,7 @@ const defaultMimeType = 'application/vnd.gremlin-v3.0+json';
43
43
  const graphSON2MimeType = 'application/vnd.gremlin-v2.0+json';
44
44
  const graphBinaryMimeType = 'application/vnd.graphbinary-v1.0';
45
45
 
46
- const pingIntervalDelay = 60 * 1000;
47
- const pongTimeoutDelay = 30 * 1000;
46
+ const uuidPattern = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
48
47
 
49
48
  /**
50
49
  * Represents a single connection to a Gremlin Server.
@@ -65,9 +64,7 @@ class Connection extends EventEmitter {
65
64
  * @param {Authenticator} [options.authenticator] The authentication handler to use.
66
65
  * @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
67
66
  * @param {Boolean} [options.enableUserAgentOnConnect] Determines if a user agent will be sent during connection handshake. Defaults to: true
68
- * @param {Boolean} [options.pingEnabled] Setup ping interval. Defaults to: true.
69
- * @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
70
- * @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
67
+ * @param {http.Agent} [options.agent] The http.Agent implementation to use.
71
68
  * @constructor
72
69
  */
73
70
  constructor(url, options) {
@@ -84,14 +81,12 @@ class Connection extends EventEmitter {
84
81
 
85
82
  // A map containing the request id and the handler. The id should be in lower case to prevent string comparison issues.
86
83
  this._responseHandlers = {};
87
- this._reader = options.reader || this._getDefaultReader(this.mimeType);
88
- this._writer = options.writer || this._getDefaultWriter(this.mimeType);
84
+ this._reader = options.reader || this.#getDefaultReader(this.mimeType);
85
+ this._writer = options.writer || this.#getDefaultWriter(this.mimeType);
89
86
  this._openPromise = null;
90
87
  this._openCallback = null;
91
88
  this._closePromise = null;
92
89
  this._closeCallback = null;
93
- this._pingInterval = null;
94
- this._pongTimeout = null;
95
90
 
96
91
  this._header = String.fromCharCode(this.mimeType.length) + this.mimeType; // TODO: what if mimeType.length > 255
97
92
  this._header_buf = Buffer.from(this._header);
@@ -99,75 +94,71 @@ class Connection extends EventEmitter {
99
94
  this.traversalSource = options.traversalSource || 'g';
100
95
  this._authenticator = options.authenticator;
101
96
  this._enableUserAgentOnConnect = options.enableUserAgentOnConnect !== false;
102
-
103
- this._pingEnabled = this.options.pingEnabled === false ? false : true;
104
- this._pingIntervalDelay = this.options.pingInterval || pingIntervalDelay;
105
- this._pongTimeoutDelay = this.options.pongTimeout || pongTimeoutDelay;
106
97
  }
107
98
 
108
99
  /**
109
100
  * Opens the connection, if its not already opened.
110
101
  * @returns {Promise}
111
102
  */
112
- open() {
103
+ async open() {
113
104
  if (this.isOpen) {
114
- return Promise.resolve();
105
+ return;
115
106
  }
116
107
  if (this._openPromise) {
117
108
  return this._openPromise;
118
109
  }
119
110
 
111
+ this._openPromise = DeferredPromise();
112
+
120
113
  this.emit('log', 'ws open');
121
114
  let headers = this.options.headers;
122
115
  if (this._enableUserAgentOnConnect) {
123
116
  if (!headers) {
124
117
  headers = [];
125
118
  }
126
- headers[utils.getUserAgentHeader()] = utils.getUserAgent();
119
+
120
+ const userAgent = await utils.getUserAgent();
121
+ if (userAgent !== undefined) {
122
+ headers[utils.getUserAgentHeader()] = await utils.getUserAgent();
123
+ }
127
124
  }
128
125
 
129
- this._ws = new WebSocket(this.url, {
130
- headers: headers,
131
- ca: this.options.ca,
132
- cert: this.options.cert,
133
- pfx: this.options.pfx,
134
- rejectUnauthorized: this.options.rejectUnauthorized,
135
- });
126
+ const WebSocket = globalThis.WebSocket ?? (await import('ws')).default;
127
+
128
+ this._ws = new WebSocket(
129
+ this.url,
130
+ globalThis.WebSocket === undefined
131
+ ? {
132
+ headers: headers,
133
+ ca: this.options.ca,
134
+ cert: this.options.cert,
135
+ pfx: this.options.pfx,
136
+ rejectUnauthorized: this.options.rejectUnauthorized,
137
+ agent: this.options.agent,
138
+ }
139
+ : undefined,
140
+ );
136
141
 
137
- this._ws.on('message', (data) => this._handleMessage(data));
138
- this._ws.on('close', (code, message) => this._handleClose(code, message));
142
+ if ('binaryType' in this._ws) {
143
+ this._ws.binaryType = 'arraybuffer';
144
+ }
139
145
 
140
- this._ws.on('pong', () => {
141
- this.emit('log', 'ws pong received');
142
- if (this._pongTimeout) {
143
- clearTimeout(this._pongTimeout);
144
- this._pongTimeout = null;
145
- }
146
- });
147
- this._ws.on('ping', () => {
148
- this.emit('log', 'ws ping received');
149
- this._ws.pong();
150
- });
146
+ this._ws.addEventListener('open', this.#handleOpen);
147
+ this._ws.addEventListener('error', this.#handleError);
148
+ this._ws.addEventListener('message', this.#handleMessage);
149
+ this._ws.addEventListener('close', this.#handleClose);
151
150
 
152
- return (this._openPromise = new Promise((resolve, reject) => {
153
- this._ws.on('open', () => {
154
- this.isOpen = true;
155
- if (this._pingEnabled) {
156
- this._pingHeartbeat();
157
- }
158
- resolve();
159
- });
160
- this._ws.on('error', (err) => {
161
- this._handleError(err);
162
- reject(err);
163
- });
164
- }));
151
+ return await this._openPromise;
165
152
  }
166
153
 
167
154
  /** @override */
168
155
  submit(processor, op, args, requestId) {
169
156
  // TINKERPOP-2847: Use lower case to prevent string comparison issues.
170
157
  const rid = (requestId || utils.getUuid()).toLowerCase();
158
+ if (!rid.match(uuidPattern)) {
159
+ throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
160
+ }
161
+
171
162
  return this.open().then(
172
163
  () =>
173
164
  new Promise((resolve, reject) => {
@@ -187,7 +178,7 @@ class Connection extends EventEmitter {
187
178
  };
188
179
 
189
180
  const request_buf = this._writer.writeRequest(request);
190
- const message = Buffer.concat([this._header_buf, request_buf]);
181
+ const message = utils.toArrayBuffer(Buffer.concat([this._header_buf, request_buf]));
191
182
  this._ws.send(message);
192
183
  }),
193
184
  );
@@ -197,6 +188,9 @@ class Connection extends EventEmitter {
197
188
  stream(processor, op, args, requestId) {
198
189
  // TINKERPOP-2847: Use lower case to prevent string comparison issues.
199
190
  const rid = (requestId || utils.getUuid()).toLowerCase();
191
+ if (!rid.match(uuidPattern)) {
192
+ throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
193
+ }
200
194
 
201
195
  const readableStream = new Stream.Readable({
202
196
  objectMode: true,
@@ -219,7 +213,7 @@ class Connection extends EventEmitter {
219
213
  };
220
214
 
221
215
  const request_buf = this._writer.writeRequest(request);
222
- const message = Buffer.concat([this._header_buf, request_buf]);
216
+ const message = utils.toArrayBuffer(Buffer.concat([this._header_buf, request_buf]));
223
217
  this._ws.send(message);
224
218
  })
225
219
  .catch((err) => readableStream.destroy(err));
@@ -227,7 +221,7 @@ class Connection extends EventEmitter {
227
221
  return readableStream;
228
222
  }
229
223
 
230
- _getDefaultReader(mimeType) {
224
+ #getDefaultReader(mimeType) {
231
225
  if (mimeType === graphBinaryMimeType) {
232
226
  return graphBinaryReader;
233
227
  }
@@ -235,7 +229,7 @@ class Connection extends EventEmitter {
235
229
  return mimeType === graphSON2MimeType ? new serializer.GraphSON2Reader() : new serializer.GraphSONReader();
236
230
  }
237
231
 
238
- _getDefaultWriter(mimeType) {
232
+ #getDefaultWriter(mimeType) {
239
233
  if (mimeType === graphBinaryMimeType) {
240
234
  return graphBinaryWriter;
241
235
  }
@@ -243,68 +237,58 @@ class Connection extends EventEmitter {
243
237
  return mimeType === graphSON2MimeType ? new serializer.GraphSON2Writer() : new serializer.GraphSONWriter();
244
238
  }
245
239
 
246
- _pingHeartbeat() {
247
- if (this._pingInterval) {
248
- clearInterval(this._pingInterval);
249
- this._pingInterval = null;
250
- }
240
+ #handleOpen = () => {
241
+ this._openPromise.resolve();
242
+ this.isOpen = true;
243
+ };
251
244
 
252
- this._pingInterval = setInterval(() => {
253
- if (this.isOpen === false) {
254
- // in case of if not open..
255
- if (this._pingInterval) {
256
- clearInterval(this._pingInterval);
257
- this._pingInterval = null;
258
- }
259
- }
260
-
261
- this._pongTimeout = setTimeout(() => {
262
- this._ws.terminate();
263
- }, this._pongTimeoutDelay);
264
-
265
- this._ws.ping();
266
- }, this._pingIntervalDelay);
267
- }
268
-
269
- _handleError(err) {
270
- this.emit('log', `ws error ${err}`);
271
- this._cleanupWebsocket(err);
272
- this.emit('socketError', err);
273
- }
245
+ /**
246
+ * @param {Event} event
247
+ */
248
+ #handleError = ({ error }) => {
249
+ this._openPromise.reject(error);
250
+ this.emit('log', `ws error ${error}`);
251
+ this.#cleanupWebsocket(error);
252
+ this.emit('socketError', error);
253
+ };
274
254
 
275
- _handleClose(code, message) {
255
+ /**
256
+ * @param {CloseEvent} event
257
+ */
258
+ #handleClose = ({ code, message }) => {
276
259
  this.emit('log', `ws close code=${code} message=${message}`);
277
- this._cleanupWebsocket();
260
+ this.#cleanupWebsocket();
278
261
  if (this._closeCallback) {
279
262
  this._closeCallback();
280
263
  }
281
264
  this.emit('close', code, message);
282
- }
265
+ };
266
+
267
+ /**
268
+ * @param {MessageEvent<any>} event
269
+ */
270
+ #handleMessage = ({ data: _data }) => {
271
+ const data = _data instanceof ArrayBuffer ? Buffer.from(_data) : _data;
283
272
 
284
- _handleMessage(data) {
285
273
  const response = this._reader.readResponse(data);
286
274
  if (response.requestId === null || response.requestId === undefined) {
287
275
  // There was a serialization issue on the server that prevented the parsing of the request id
288
276
  // We invoke any of the pending handlers with an error
289
277
  Object.keys(this._responseHandlers).forEach((requestId) => {
290
278
  const handler = this._responseHandlers[requestId];
291
- this._clearHandler(requestId);
279
+ this.#clearHandler(requestId);
292
280
  if (response.status !== undefined && response.status.message) {
293
281
  return handler.callback(
294
282
  // TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
295
283
  new ResponseError(
296
- util.format(
297
- 'Server error (no request information): %s (%d)',
298
- response.status.message,
299
- response.status.code,
300
- ),
284
+ `Server error (no request information): ${response.status.message} (${response.status.code})`,
301
285
  response.status,
302
286
  ),
303
287
  );
304
288
  }
305
289
  // TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
306
290
  return handler.callback(
307
- new ResponseError(util.format('Server error (no request information): %j', response), response.status),
291
+ new ResponseError(`Server error (no request information): ${JSON.stringify(response)}`, response.status),
308
292
  );
309
293
  });
310
294
  return;
@@ -331,10 +315,7 @@ class Connection extends EventEmitter {
331
315
  // callback in error
332
316
  return handler.callback(
333
317
  // TINKERPOP-2285: keep the old server error message in case folks are parsing that - fix in a future breaking version
334
- new ResponseError(
335
- util.format('Server error: %s (%d)', response.status.message, response.status.code),
336
- response.status,
337
- ),
318
+ new ResponseError(`Server error: ${response.status.message} (${response.status.code})`, response.status),
338
319
  );
339
320
  }
340
321
 
@@ -342,7 +323,7 @@ class Connection extends EventEmitter {
342
323
 
343
324
  switch (response.status.code) {
344
325
  case responseStatusCode.noContent:
345
- this._clearHandler(response.requestId);
326
+ this.#clearHandler(response.requestId);
346
327
  if (isStreamingResponse) {
347
328
  handler.result.push(new ResultSet(utils.emptyArray, response.status.attributes));
348
329
  return handler.callback(null);
@@ -366,24 +347,15 @@ class Connection extends EventEmitter {
366
347
  } else {
367
348
  handler.result = response.result.data;
368
349
  }
369
- this._clearHandler(response.requestId);
350
+ this.#clearHandler(response.requestId);
370
351
  return handler.callback(null, new ResultSet(handler.result, response.status.attributes));
371
352
  }
372
- }
353
+ };
373
354
 
374
355
  /**
375
356
  * clean websocket context
376
357
  */
377
- _cleanupWebsocket(err) {
378
- if (this._pingInterval) {
379
- clearInterval(this._pingInterval);
380
- }
381
- this._pingInterval = null;
382
- if (this._pongTimeout) {
383
- clearTimeout(this._pongTimeout);
384
- }
385
- this._pongTimeout = null;
386
-
358
+ #cleanupWebsocket(err) {
387
359
  // Invoke waiting callbacks to complete Promises when closing the websocket
388
360
  Object.keys(this._responseHandlers).forEach((requestId) => {
389
361
  const handler = this._responseHandlers[requestId];
@@ -395,7 +367,10 @@ class Connection extends EventEmitter {
395
367
  handler.callback(cause);
396
368
  }
397
369
  });
398
- this._ws.removeAllListeners();
370
+ this._ws.removeEventListener('open', this.#handleOpen);
371
+ this._ws.removeEventListener('error', this.#handleError);
372
+ this._ws.removeEventListener('message', this.#handleMessage);
373
+ this._ws.removeEventListener('close', this.#handleClose);
399
374
  this._openPromise = null;
400
375
  this._closePromise = null;
401
376
  this.isOpen = false;
@@ -406,7 +381,7 @@ class Connection extends EventEmitter {
406
381
  * @param requestId
407
382
  * @private
408
383
  */
409
- _clearHandler(requestId) {
384
+ #clearHandler(requestId) {
410
385
  delete this._responseHandlers[requestId];
411
386
  }
412
387
 
@@ -49,9 +49,7 @@ class DriverRemoteConnection extends RemoteConnection {
49
49
  * @param {Authenticator} [options.authenticator] The authentication handler to use.
50
50
  * @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
51
51
  * @param {Boolean} [options.enableUserAgentOnConnect] Determines if a user agent will be sent during connection handshake. Defaults to: true
52
- * @param {Boolean} [options.pingEnabled] Setup ping interval. Defaults to: true.
53
- * @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
54
- * @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
52
+ * @param {http.Agent} [options.agent] The http.Agent implementation to use.
55
53
  * @constructor
56
54
  */
57
55
  constructor(url, options = {}) {
@@ -22,8 +22,6 @@
22
22
  */
23
23
  'use strict';
24
24
 
25
- const util = require('util');
26
- const inspect = util.inspect.custom || 'inspect';
27
25
  const utils = require('../utils');
28
26
  const emptyMap = Object.freeze(new utils.ImmutableMap());
29
27
 
@@ -64,13 +62,6 @@ class ResultSet {
64
62
  return this._items[Symbol.iterator]();
65
63
  }
66
64
 
67
- /**
68
- * Provides a representation useful for debug and tracing.
69
- */
70
- [inspect]() {
71
- return this._items;
72
- }
73
-
74
65
  /**
75
66
  * Gets an array of result items.
76
67
  * @returns {Array}