gremlin 3.5.2 → 3.5.3
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/.eslintrc.js +154 -0
- package/.prettierrc.js +29 -0
- package/Gruntfile.js +15 -16
- package/doc/AnonymousTraversalSource.html +4 -4
- package/doc/Authenticator.html +1 -1
- package/doc/Bytecode.html +6 -6
- package/doc/Client.html +137 -63
- package/doc/Connection.html +88 -4
- package/doc/DriverRemoteConnection.html +10 -10
- package/doc/EdgeLabelVerificationStrategy.html +1 -1
- package/doc/Graph.html +1 -1
- package/doc/GraphSON2Reader.html +3 -3
- package/doc/GraphSON2Writer.html +2 -2
- package/doc/GraphSON3Reader.html +2 -2
- package/doc/GraphSON3Writer.html +2 -2
- package/doc/GraphTraversal.html +106 -106
- package/doc/GraphTraversalSource.html +18 -18
- package/doc/HaltedTraverserStrategy.html +2 -2
- package/doc/MatchAlgorithmStrategy.html +2 -2
- package/doc/P.html +12 -12
- package/doc/PartitionStrategy.html +2 -2
- package/doc/Path.html +1 -1
- package/doc/PlainTextSaslAuthenticator.html +1 -1
- package/doc/ProductiveByStrategy.html +1 -1
- package/doc/RemoteConnection.html +9 -9
- package/doc/RemoteStrategy.html +3 -3
- package/doc/RemoteTraversal.html +2 -2
- package/doc/ReservedKeysVerificationStrategy.html +2 -2
- package/doc/ResponseError.html +1 -1
- package/doc/ResultSet.html +6 -6
- package/doc/SaslAuthenticator.html +1 -1
- package/doc/SaslMechanismBase.html +1 -1
- package/doc/SaslMechanismPlain.html +5 -5
- package/doc/SeedStrategy.html +2 -2
- package/doc/SubgraphStrategy.html +2 -2
- package/doc/TextP.html +9 -9
- package/doc/Transaction.html +5 -5
- package/doc/Translator.html +1 -1
- package/doc/TraversalStrategies.html +4 -4
- package/doc/TraversalStrategy.html +2 -2
- package/doc/TypeSerializer.html +1 -1
- package/doc/driver_auth_authenticator.js.html +3 -3
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +2 -2
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +25 -16
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +6 -6
- package/doc/driver_auth_sasl-authenticator.js.html +2 -2
- package/doc/driver_client.js.html +69 -23
- package/doc/driver_connection.js.html +107 -88
- package/doc/driver_driver-remote-connection.js.html +11 -10
- package/doc/driver_remote-connection.js.html +3 -4
- package/doc/driver_response-error.js.html +4 -3
- package/doc/driver_result-set.js.html +3 -3
- package/doc/global.html +199 -2
- package/doc/index.html +1 -1
- package/doc/process_anonymous-traversal.js.html +3 -3
- package/doc/process_bytecode.js.html +10 -8
- package/doc/process_graph-traversal.js.html +193 -142
- package/doc/process_transaction.js.html +15 -8
- package/doc/process_translator.js.html +13 -10
- package/doc/process_traversal-strategy.js.html +59 -53
- package/doc/process_traversal.js.html +100 -107
- package/doc/structure_graph.js.html +6 -6
- package/doc/structure_io_graph-serializer.js.html +64 -17
- package/doc/structure_io_type-serializers.js.html +85 -88
- package/index.js +5 -5
- package/lib/driver/auth/authenticator.js +2 -2
- package/lib/driver/auth/mechanisms/sasl-mechanism-base.js +1 -1
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +24 -15
- package/lib/driver/auth/plain-text-sasl-authenticator.js +5 -5
- package/lib/driver/auth/sasl-authenticator.js +1 -1
- package/lib/driver/client.js +68 -22
- package/lib/driver/connection.js +106 -87
- package/lib/driver/driver-remote-connection.js +10 -9
- package/lib/driver/remote-connection.js +2 -3
- package/lib/driver/response-error.js +2 -2
- package/lib/driver/result-set.js +1 -2
- package/lib/process/anonymous-traversal.js +1 -2
- package/lib/process/bytecode.js +9 -7
- package/lib/process/graph-traversal.js +191 -141
- package/lib/process/transaction.js +13 -7
- package/lib/process/translator.js +11 -9
- package/lib/process/traversal-strategy.js +57 -52
- package/lib/process/traversal.js +99 -106
- package/lib/structure/graph.js +5 -5
- package/lib/structure/io/graph-serializer.js +62 -16
- package/lib/structure/io/type-serializers.js +84 -87
- package/lib/utils.js +15 -10
- package/package.json +10 -5
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
|
|
376
376
|
<dt class="tag-source">Source:</dt>
|
|
377
377
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
378
|
-
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#
|
|
378
|
+
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#line50">line 50</a>
|
|
379
379
|
</li></ul></dd>
|
|
380
380
|
|
|
381
381
|
|
|
@@ -504,7 +504,7 @@
|
|
|
504
504
|
|
|
505
505
|
<dt class="tag-source">Source:</dt>
|
|
506
506
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
507
|
-
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#
|
|
507
|
+
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#line97">line 97</a>
|
|
508
508
|
</li></ul></dd>
|
|
509
509
|
|
|
510
510
|
|
|
@@ -705,7 +705,7 @@
|
|
|
705
705
|
|
|
706
706
|
<dt class="tag-source">Source:</dt>
|
|
707
707
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
708
|
-
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#
|
|
708
|
+
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#line78">line 78</a>
|
|
709
709
|
</li></ul></dd>
|
|
710
710
|
|
|
711
711
|
|
|
@@ -842,7 +842,7 @@
|
|
|
842
842
|
|
|
843
843
|
<dt class="tag-source">Source:</dt>
|
|
844
844
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
845
|
-
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#
|
|
845
|
+
<a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html">driver/auth/mechanisms/sasl-mechanism-plain.js</a>, <a href="driver_auth_mechanisms_sasl-mechanism-plain.js.html#line59">line 59</a>
|
|
846
846
|
</li></ul></dd>
|
|
847
847
|
|
|
848
848
|
|
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
<br class="clear">
|
|
917
917
|
|
|
918
918
|
<footer>
|
|
919
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
919
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
920
920
|
</footer>
|
|
921
921
|
|
|
922
922
|
<script> prettyPrint(); </script>
|
package/doc/SeedStrategy.html
CHANGED
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
|
|
212
212
|
<dt class="tag-source">Source:</dt>
|
|
213
213
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
214
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
214
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line311">line 311</a>
|
|
215
215
|
</li></ul></dd>
|
|
216
216
|
|
|
217
217
|
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
<br class="clear">
|
|
280
280
|
|
|
281
281
|
<footer>
|
|
282
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
282
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 05 2022 16:20:08 GMT-0400 (Eastern Daylight Time)
|
|
283
283
|
</footer>
|
|
284
284
|
|
|
285
285
|
<script> prettyPrint(); </script>
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
|
|
311
311
|
<dt class="tag-source">Source:</dt>
|
|
312
312
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
313
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
313
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line140">line 140</a>
|
|
314
314
|
</li></ul></dd>
|
|
315
315
|
|
|
316
316
|
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
<br class="clear">
|
|
379
379
|
|
|
380
380
|
<footer>
|
|
381
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
381
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
382
382
|
</footer>
|
|
383
383
|
|
|
384
384
|
<script> prettyPrint(); </script>
|
package/doc/TextP.html
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
<dt class="tag-source">Source:</dt>
|
|
95
95
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
96
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
96
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line364">line 364</a>
|
|
97
97
|
</li></ul></dd>
|
|
98
98
|
|
|
99
99
|
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
|
|
259
259
|
<dt class="tag-source">Source:</dt>
|
|
260
260
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
261
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
261
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line397">line 397</a>
|
|
262
262
|
</li></ul></dd>
|
|
263
263
|
|
|
264
264
|
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
|
|
404
404
|
<dt class="tag-source">Source:</dt>
|
|
405
405
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
406
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
406
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line402">line 402</a>
|
|
407
407
|
</li></ul></dd>
|
|
408
408
|
|
|
409
409
|
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
|
|
549
549
|
<dt class="tag-source">Source:</dt>
|
|
550
550
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
551
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
551
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line407">line 407</a>
|
|
552
552
|
</li></ul></dd>
|
|
553
553
|
|
|
554
554
|
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
|
|
694
694
|
<dt class="tag-source">Source:</dt>
|
|
695
695
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
696
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
696
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line412">line 412</a>
|
|
697
697
|
</li></ul></dd>
|
|
698
698
|
|
|
699
699
|
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
|
|
839
839
|
<dt class="tag-source">Source:</dt>
|
|
840
840
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
841
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
841
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line417">line 417</a>
|
|
842
842
|
</li></ul></dd>
|
|
843
843
|
|
|
844
844
|
|
|
@@ -983,7 +983,7 @@
|
|
|
983
983
|
|
|
984
984
|
<dt class="tag-source">Source:</dt>
|
|
985
985
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
986
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
986
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line422">line 422</a>
|
|
987
987
|
</li></ul></dd>
|
|
988
988
|
|
|
989
989
|
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
|
|
1072
1072
|
<dt class="tag-source">Source:</dt>
|
|
1073
1073
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1074
|
-
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#
|
|
1074
|
+
<a href="process_traversal.js.html">process/traversal.js</a>, <a href="process_traversal.js.html#line374">line 374</a>
|
|
1075
1075
|
</li></ul></dd>
|
|
1076
1076
|
|
|
1077
1077
|
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
<br class="clear">
|
|
1142
1142
|
|
|
1143
1143
|
<footer>
|
|
1144
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
1144
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
1145
1145
|
</footer>
|
|
1146
1146
|
|
|
1147
1147
|
<script> prettyPrint(); </script>
|
package/doc/Transaction.html
CHANGED
|
@@ -190,7 +190,7 @@ then close the transaction and thus, the session. This feature only works with t
|
|
|
190
190
|
|
|
191
191
|
<dt class="tag-source">Source:</dt>
|
|
192
192
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
193
|
-
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#
|
|
193
|
+
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#line76">line 76</a>
|
|
194
194
|
</li></ul></dd>
|
|
195
195
|
|
|
196
196
|
|
|
@@ -372,7 +372,7 @@ then close the transaction and thus, the session. This feature only works with t
|
|
|
372
372
|
|
|
373
373
|
<dt class="tag-source">Source:</dt>
|
|
374
374
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
375
|
-
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#
|
|
375
|
+
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#line83">line 83</a>
|
|
376
376
|
</li></ul></dd>
|
|
377
377
|
|
|
378
378
|
|
|
@@ -474,7 +474,7 @@ then close the transaction and thus, the session. This feature only works with t
|
|
|
474
474
|
|
|
475
475
|
<dt class="tag-source">Source:</dt>
|
|
476
476
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
477
|
-
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#
|
|
477
|
+
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#line61">line 61</a>
|
|
478
478
|
</li></ul></dd>
|
|
479
479
|
|
|
480
480
|
|
|
@@ -576,7 +576,7 @@ then close the transaction and thus, the session. This feature only works with t
|
|
|
576
576
|
|
|
577
577
|
<dt class="tag-source">Source:</dt>
|
|
578
578
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
579
|
-
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#
|
|
579
|
+
<a href="process_transaction.js.html">process/transaction.js</a>, <a href="process_transaction.js.html#line68">line 68</a>
|
|
580
580
|
</li></ul></dd>
|
|
581
581
|
|
|
582
582
|
|
|
@@ -646,7 +646,7 @@ then close the transaction and thus, the session. This feature only works with t
|
|
|
646
646
|
<br class="clear">
|
|
647
647
|
|
|
648
648
|
<footer>
|
|
649
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
649
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
650
650
|
</footer>
|
|
651
651
|
|
|
652
652
|
<script> prettyPrint(); </script>
|
package/doc/Translator.html
CHANGED
|
@@ -518,7 +518,7 @@
|
|
|
518
518
|
<br class="clear">
|
|
519
519
|
|
|
520
520
|
<footer>
|
|
521
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
521
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
522
522
|
</footer>
|
|
523
523
|
|
|
524
524
|
<script> prettyPrint(); </script>
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
|
|
308
308
|
<dt class="tag-source">Source:</dt>
|
|
309
309
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
310
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
310
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line43">line 43</a>
|
|
311
311
|
</li></ul></dd>
|
|
312
312
|
|
|
313
313
|
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
|
|
441
441
|
<dt class="tag-source">Source:</dt>
|
|
442
442
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
443
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
443
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line61">line 61</a>
|
|
444
444
|
</li></ul></dd>
|
|
445
445
|
|
|
446
446
|
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
|
|
592
592
|
<dt class="tag-source">Source:</dt>
|
|
593
593
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
594
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
594
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line48">line 48</a>
|
|
595
595
|
</li></ul></dd>
|
|
596
596
|
|
|
597
597
|
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
<br class="clear">
|
|
644
644
|
|
|
645
645
|
<footer>
|
|
646
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
646
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
647
647
|
</footer>
|
|
648
648
|
|
|
649
649
|
<script> prettyPrint(); </script>
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
|
|
315
315
|
<dt class="tag-source">Source:</dt>
|
|
316
316
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
317
|
-
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#
|
|
317
|
+
<a href="process_traversal-strategy.js.html">process/traversal-strategy.js</a>, <a href="process_traversal-strategy.js.html#line86">line 86</a>
|
|
318
318
|
</li></ul></dd>
|
|
319
319
|
|
|
320
320
|
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
<br class="clear">
|
|
385
385
|
|
|
386
386
|
<footer>
|
|
387
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
387
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
388
388
|
</footer>
|
|
389
389
|
|
|
390
390
|
<script> prettyPrint(); </script>
|
package/doc/TypeSerializer.html
CHANGED
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<br class="clear">
|
|
158
158
|
|
|
159
159
|
<footer>
|
|
160
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
160
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
161
161
|
</footer>
|
|
162
162
|
|
|
163
163
|
<script> prettyPrint(); </script>
|
|
@@ -52,14 +52,14 @@ class Authenticator {
|
|
|
52
52
|
constructor(options) {
|
|
53
53
|
this._options = options;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
/**
|
|
57
57
|
* @abstract
|
|
58
58
|
* Evaluates the challenge from the server and returns appropriate response.
|
|
59
59
|
* @param {String} challenge Challenge string presented by the server.
|
|
60
60
|
*/
|
|
61
61
|
evaluateChallenge(challenge) {
|
|
62
|
-
throw new Error(
|
|
62
|
+
throw new Error('evaluateChallenge should be implemented');
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -80,7 +80,7 @@ module.exports = Authenticator;
|
|
|
80
80
|
<br class="clear">
|
|
81
81
|
|
|
82
82
|
<footer>
|
|
83
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
83
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
84
84
|
</footer>
|
|
85
85
|
|
|
86
86
|
<script> prettyPrint(); </script>
|
|
@@ -73,7 +73,7 @@ class SaslMechanismBase {
|
|
|
73
73
|
* @param {String} challenge Challenge string presented by the server
|
|
74
74
|
*/
|
|
75
75
|
evaluateChallenge(challenge) {
|
|
76
|
-
throw new Error(
|
|
76
|
+
throw new Error('evaluateChallenge should be implemented');
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -94,7 +94,7 @@ module.exports = SaslMechanismBase;
|
|
|
94
94
|
<br class="clear">
|
|
95
95
|
|
|
96
96
|
<footer>
|
|
97
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
97
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
98
98
|
</footer>
|
|
99
99
|
|
|
100
100
|
<script> prettyPrint(); </script>
|
|
@@ -60,12 +60,13 @@ class SaslMechanismPlain extends SaslMechanismBase {
|
|
|
60
60
|
constructor(options) {
|
|
61
61
|
super(options);
|
|
62
62
|
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
if (
|
|
64
|
+
this._options.username === undefined ||
|
|
65
|
+
this._options.username === null ||
|
|
66
|
+
this._options.username.length === 0 ||
|
|
67
|
+
this._options.password === undefined ||
|
|
68
|
+
this._options.password === null ||
|
|
69
|
+
this._options.password.length === 0
|
|
69
70
|
) {
|
|
70
71
|
throw new Error('Missing credentials for SASL PLAIN mechanism');
|
|
71
72
|
}
|
|
@@ -77,7 +78,7 @@ class SaslMechanismPlain extends SaslMechanismBase {
|
|
|
77
78
|
get name() {
|
|
78
79
|
return 'PLAIN';
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
|
|
81
82
|
/**
|
|
82
83
|
* Evaluates the challenge from the server and returns appropriate response.
|
|
83
84
|
* @param {String} challenge Challenge string presented by the server.
|
|
@@ -86,12 +87,14 @@ class SaslMechanismPlain extends SaslMechanismBase {
|
|
|
86
87
|
evaluateChallenge(challenge) {
|
|
87
88
|
if (this._hasInitialResponse(challenge)) {
|
|
88
89
|
return Promise.resolve({
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
saslMechanism: this.name,
|
|
91
|
+
sasl: this._saslArgument(this._options.authzid, this._options.username, this._options.password),
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
-
return Promise.resolve({
|
|
94
|
+
|
|
95
|
+
return Promise.resolve({
|
|
96
|
+
sasl: this._saslArgument(this._options.authzid, this._options.username, this._options.password),
|
|
97
|
+
});
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
/**
|
|
@@ -101,11 +104,17 @@ class SaslMechanismPlain extends SaslMechanismBase {
|
|
|
101
104
|
* @param {String} password The password of user with access to server.
|
|
102
105
|
*/
|
|
103
106
|
_saslArgument(authzid, username, password) {
|
|
104
|
-
if (authzid === undefined || authzid === null)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
if (authzid === undefined || authzid === null) {
|
|
108
|
+
authzid = '';
|
|
109
|
+
}
|
|
110
|
+
if (username === undefined || username === null) {
|
|
111
|
+
username = '';
|
|
112
|
+
}
|
|
113
|
+
if (password === undefined || password.length === null) {
|
|
114
|
+
password = '';
|
|
115
|
+
}
|
|
107
116
|
|
|
108
|
-
return
|
|
117
|
+
return Buffer.from(`${authzid}\0${username}\0${password}`).toString('base64');
|
|
109
118
|
}
|
|
110
119
|
|
|
111
120
|
/**
|
|
@@ -138,7 +147,7 @@ module.exports = SaslMechanismPlain;
|
|
|
138
147
|
<br class="clear">
|
|
139
148
|
|
|
140
149
|
<footer>
|
|
141
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
150
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
142
151
|
</footer>
|
|
143
152
|
|
|
144
153
|
<script> prettyPrint(); </script>
|
|
@@ -61,15 +61,15 @@ class PlainTextSaslAuthenticator extends Authenticator {
|
|
|
61
61
|
constructor(username, password, authzid) {
|
|
62
62
|
const options = {
|
|
63
63
|
mechanism: new SaslMechanismPlain({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
})
|
|
64
|
+
username: username,
|
|
65
|
+
password: password,
|
|
66
|
+
authzid: authzid,
|
|
67
|
+
}),
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
super(options);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
/**
|
|
74
74
|
* Evaluates the challenge from the server and returns appropriate response.
|
|
75
75
|
* @param {String} challenge Challenge string presented by the server.
|
|
@@ -97,7 +97,7 @@ module.exports = PlainTextSaslAuthenticator;
|
|
|
97
97
|
<br class="clear">
|
|
98
98
|
|
|
99
99
|
<footer>
|
|
100
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
100
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
101
101
|
</footer>
|
|
102
102
|
|
|
103
103
|
<script> prettyPrint(); </script>
|
|
@@ -63,7 +63,7 @@ class SaslAuthenticator extends Authenticator {
|
|
|
63
63
|
throw new Error('No Sasl Mechanism Specified');
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
/**
|
|
68
68
|
* Evaluates the challenge from the server and returns appropriate response.
|
|
69
69
|
* @param {String} challenge Challenge string presented by the server.
|
|
@@ -91,7 +91,7 @@ module.exports = SaslAuthenticator;
|
|
|
91
91
|
<br class="clear">
|
|
92
92
|
|
|
93
93
|
<footer>
|
|
94
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
94
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
95
95
|
</footer>
|
|
96
96
|
|
|
97
97
|
<script> prettyPrint(); </script>
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
* distributed with this work for additional information
|
|
33
33
|
* regarding copyright ownership. The ASF licenses this file
|
|
34
34
|
* to you under the Apache License, Version 2.0 (the
|
|
35
|
-
*
|
|
35
|
+
* 'License'); you may not use this file except in compliance
|
|
36
36
|
* with the License. You may obtain a copy of the License at
|
|
37
37
|
*
|
|
38
38
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
39
39
|
*
|
|
40
40
|
* Unless required by applicable law or agreed to in writing,
|
|
41
41
|
* software distributed under the License is distributed on an
|
|
42
|
-
*
|
|
42
|
+
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
43
43
|
* KIND, either express or implied. See the License for the
|
|
44
44
|
* specific language governing permissions and limitations
|
|
45
45
|
* under the License.
|
|
@@ -54,7 +54,6 @@ const Bytecode = require('../process/bytecode');
|
|
|
54
54
|
* A {@link Client} contains methods to send messages to a Gremlin Server.
|
|
55
55
|
*/
|
|
56
56
|
class Client {
|
|
57
|
-
|
|
58
57
|
/**
|
|
59
58
|
* Creates a new instance of {@link Client}.
|
|
60
59
|
* @param {String} url The resource uri.
|
|
@@ -101,25 +100,35 @@ class Client {
|
|
|
101
100
|
return this._connection.isOpen;
|
|
102
101
|
}
|
|
103
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Configuration specific to the current request.
|
|
105
|
+
* @typedef {Object} RequestOptions
|
|
106
|
+
* @property {String} requestId - User specified request identifier which must be a UUID.
|
|
107
|
+
* @property {Number} batchSize - Indicates whether the Power component is present.
|
|
108
|
+
* @property {String} userAgent - The size in which the result of a request is to be 'batched' back to the client
|
|
109
|
+
* @property {Number} evaluationTimeout - The timeout for the evaluation of the request.
|
|
110
|
+
*/
|
|
111
|
+
|
|
104
112
|
/**
|
|
105
113
|
* Send a request to the Gremlin Server, can send a script or bytecode steps.
|
|
106
114
|
* @param {Bytecode|string} message The bytecode or script to send
|
|
107
115
|
* @param {Object} [bindings] The script bindings, if any.
|
|
108
|
-
* @param {
|
|
109
|
-
* @param {String} [requestOptions.requestId] User specified request identifier which must be a UUID.
|
|
110
|
-
* @param {Number} [requestOptions.batchSize] The size in which the result of a request is to be "batched" back to the client
|
|
111
|
-
* @param {String} [requestOptions.userAgent] A custom string that specifies to the server where the request came from.
|
|
112
|
-
* @param {Number} [requestOptions.evaluationTimeout] The timeout for the evaluation of the request.
|
|
116
|
+
* @param {RequestOptions} [requestOptions] Configuration specific to the current request.
|
|
113
117
|
* @returns {Promise}
|
|
114
118
|
*/
|
|
115
119
|
submit(message, bindings, requestOptions) {
|
|
116
|
-
const requestIdOverride = requestOptions && requestOptions.requestId
|
|
117
|
-
if (requestIdOverride)
|
|
120
|
+
const requestIdOverride = requestOptions && requestOptions.requestId;
|
|
121
|
+
if (requestIdOverride) {
|
|
122
|
+
delete requestOptions['requestId'];
|
|
123
|
+
}
|
|
118
124
|
|
|
119
|
-
const args = Object.assign(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
const args = Object.assign(
|
|
126
|
+
{
|
|
127
|
+
gremlin: message,
|
|
128
|
+
aliases: { g: this._options.traversalSource || 'g' },
|
|
129
|
+
},
|
|
130
|
+
requestOptions,
|
|
131
|
+
);
|
|
123
132
|
|
|
124
133
|
if (this._options.session && this._options.processor === 'session') {
|
|
125
134
|
args['session'] = this._options.session;
|
|
@@ -128,17 +137,54 @@ class Client {
|
|
|
128
137
|
if (message instanceof Bytecode) {
|
|
129
138
|
if (this._options.session && this._options.processor === 'session') {
|
|
130
139
|
return this._connection.submit('session', 'bytecode', args, requestIdOverride);
|
|
131
|
-
} else {
|
|
132
|
-
return this._connection.submit('traversal', 'bytecode', args, requestIdOverride);
|
|
133
140
|
}
|
|
141
|
+
return this._connection.submit('traversal', 'bytecode', args, requestIdOverride);
|
|
142
|
+
} else if (typeof message === 'string') {
|
|
143
|
+
args['bindings'] = bindings;
|
|
144
|
+
args['language'] = 'gremlin-groovy';
|
|
145
|
+
args['accept'] = this._connection.mimeType;
|
|
146
|
+
return this._connection.submit(this._options.processor || '', 'eval', args, requestIdOverride);
|
|
147
|
+
}
|
|
148
|
+
throw new TypeError('message must be of type Bytecode or string');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Send a request to the Gremlin Server and receive a stream for the results, can send a script or bytecode steps.
|
|
153
|
+
* @param {Bytecode|string} message The bytecode or script to send
|
|
154
|
+
* @param {Object} [bindings] The script bindings, if any.
|
|
155
|
+
* @param {RequestOptions} [requestOptions] Configuration specific to the current request.
|
|
156
|
+
* @returns {ReadableStream}
|
|
157
|
+
*/
|
|
158
|
+
stream(message, bindings, requestOptions) {
|
|
159
|
+
const requestIdOverride = requestOptions && requestOptions.requestId;
|
|
160
|
+
if (requestIdOverride) {
|
|
161
|
+
delete requestOptions['requestId'];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const args = Object.assign(
|
|
165
|
+
{
|
|
166
|
+
gremlin: message,
|
|
167
|
+
aliases: { g: this._options.traversalSource || 'g' },
|
|
168
|
+
},
|
|
169
|
+
requestOptions,
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
if (this._options.session && this._options.processor === 'session') {
|
|
173
|
+
args['session'] = this._options.session;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (message instanceof Bytecode) {
|
|
177
|
+
if (this._options.session && this._options.processor === 'session') {
|
|
178
|
+
return this._connection.stream('session', 'bytecode', args, requestIdOverride);
|
|
179
|
+
}
|
|
180
|
+
return this._connection.stream('traversal', 'bytecode', args, requestIdOverride);
|
|
134
181
|
} else if (typeof message === 'string') {
|
|
135
182
|
args['bindings'] = bindings;
|
|
136
183
|
args['language'] = 'gremlin-groovy';
|
|
137
184
|
args['accept'] = this._connection.mimeType;
|
|
138
|
-
return this._connection.
|
|
139
|
-
} else {
|
|
140
|
-
throw new TypeError("message must be of type Bytecode or string");
|
|
185
|
+
return this._connection.stream(this._options.processor || '', 'eval', args, requestIdOverride);
|
|
141
186
|
}
|
|
187
|
+
throw new TypeError('message must be of type Bytecode or string');
|
|
142
188
|
}
|
|
143
189
|
|
|
144
190
|
/**
|
|
@@ -148,7 +194,7 @@ class Client {
|
|
|
148
194
|
*/
|
|
149
195
|
close() {
|
|
150
196
|
if (this._options.session && this._options.processor === 'session') {
|
|
151
|
-
const args = {
|
|
197
|
+
const args = { session: this._options.session };
|
|
152
198
|
return this._connection.submit(this._options.processor, 'close', args, null).then(() => this._connection.close());
|
|
153
199
|
}
|
|
154
200
|
return this._connection.close();
|
|
@@ -160,7 +206,7 @@ class Client {
|
|
|
160
206
|
* @param {Function} handler The callback to be called when the event occurs.
|
|
161
207
|
*/
|
|
162
208
|
addListener(event, handler) {
|
|
163
|
-
this._connection.on(event, handler)
|
|
209
|
+
this._connection.on(event, handler);
|
|
164
210
|
}
|
|
165
211
|
|
|
166
212
|
/**
|
|
@@ -169,7 +215,7 @@ class Client {
|
|
|
169
215
|
* @param {Function} handler The event handler to be removed.
|
|
170
216
|
*/
|
|
171
217
|
removeListener(event, handler) {
|
|
172
|
-
this._connection.removeListener(event, handler)
|
|
218
|
+
this._connection.removeListener(event, handler);
|
|
173
219
|
}
|
|
174
220
|
}
|
|
175
221
|
|
|
@@ -190,7 +236,7 @@ module.exports = Client;
|
|
|
190
236
|
<br class="clear">
|
|
191
237
|
|
|
192
238
|
<footer>
|
|
193
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.
|
|
239
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Apr 11 2022 07:21:14 GMT-0400 (Eastern Daylight Time)
|
|
194
240
|
</footer>
|
|
195
241
|
|
|
196
242
|
<script> prettyPrint(); </script>
|