gremlin 3.6.4 → 3.6.6

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 (69) hide show
  1. package/doc/AnonymousTraversalSource.html +1 -1
  2. package/doc/Authenticator.html +1 -1
  3. package/doc/Bytecode.html +1 -1
  4. package/doc/CardinalityValue.html +711 -0
  5. package/doc/Client.html +1 -1
  6. package/doc/Connection.html +8 -8
  7. package/doc/DriverRemoteConnection.html +1 -1
  8. package/doc/EdgeLabelVerificationStrategy.html +1 -1
  9. package/doc/Graph.html +1 -1
  10. package/doc/GraphSON2Reader.html +1 -1
  11. package/doc/GraphSON2Writer.html +1 -1
  12. package/doc/GraphSON3Reader.html +1 -1
  13. package/doc/GraphSON3Writer.html +1 -1
  14. package/doc/GraphTraversal.html +1 -1
  15. package/doc/GraphTraversalSource.html +1 -1
  16. package/doc/HaltedTraverserStrategy.html +1 -1
  17. package/doc/MatchAlgorithmStrategy.html +1 -1
  18. package/doc/P.html +1 -1
  19. package/doc/PartitionStrategy.html +1 -1
  20. package/doc/Path.html +1 -1
  21. package/doc/PlainTextSaslAuthenticator.html +1 -1
  22. package/doc/ProductiveByStrategy.html +1 -1
  23. package/doc/RemoteConnection.html +1 -1
  24. package/doc/RemoteStrategy.html +1 -1
  25. package/doc/RemoteTraversal.html +1 -1
  26. package/doc/ReservedKeysVerificationStrategy.html +1 -1
  27. package/doc/ResponseError.html +1 -1
  28. package/doc/ResultSet.html +1 -1
  29. package/doc/SaslAuthenticator.html +1 -1
  30. package/doc/SaslMechanismBase.html +1 -1
  31. package/doc/SaslMechanismPlain.html +1 -1
  32. package/doc/SeedStrategy.html +1 -1
  33. package/doc/SubgraphStrategy.html +1 -1
  34. package/doc/TextP.html +1 -1
  35. package/doc/Transaction.html +1 -1
  36. package/doc/Translator.html +1 -1
  37. package/doc/TraversalStrategies.html +1 -1
  38. package/doc/TraversalStrategy.html +1 -1
  39. package/doc/TypeSerializer.html +1 -1
  40. package/doc/driver_auth_authenticator.js.html +1 -1
  41. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +1 -1
  42. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +1 -1
  43. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +1 -1
  44. package/doc/driver_auth_sasl-authenticator.js.html +1 -1
  45. package/doc/driver_client.js.html +1 -1
  46. package/doc/driver_connection.js.html +10 -1
  47. package/doc/driver_driver-remote-connection.js.html +1 -1
  48. package/doc/driver_remote-connection.js.html +1 -1
  49. package/doc/driver_response-error.js.html +1 -1
  50. package/doc/driver_result-set.js.html +1 -1
  51. package/doc/global.html +1 -1
  52. package/doc/index.html +1 -1
  53. package/doc/module.exports.html +1 -1
  54. package/doc/process_anonymous-traversal.js.html +1 -1
  55. package/doc/process_bytecode.js.html +1 -1
  56. package/doc/process_graph-traversal.js.html +1 -1
  57. package/doc/process_transaction.js.html +1 -1
  58. package/doc/process_translator.js.html +1 -1
  59. package/doc/process_traversal-strategy.js.html +1 -1
  60. package/doc/process_traversal.js.html +1 -1
  61. package/doc/structure_graph.js.html +1 -1
  62. package/doc/structure_io_binary_internals_DataType.js.html +1 -1
  63. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +1 -1
  64. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +1 -1
  65. package/doc/structure_io_graph-serializer.js.html +1 -1
  66. package/doc/structure_io_type-serializers.js.html +1 -1
  67. package/lib/driver/connection.js +9 -0
  68. package/lib/utils.js +3 -8
  69. package/package.json +6 -6
@@ -166,7 +166,7 @@ module.exports = Bytecode;
166
166
  <br class="clear">
167
167
 
168
168
  <footer>
169
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
169
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
170
170
  </footer>
171
171
 
172
172
  <script> prettyPrint(); </script>
@@ -1589,7 +1589,7 @@ module.exports = {
1589
1589
  <br class="clear">
1590
1590
 
1591
1591
  <footer>
1592
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
1592
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
1593
1593
  </footer>
1594
1594
 
1595
1595
  <script> prettyPrint(); </script>
@@ -134,7 +134,7 @@ module.exports = {
134
134
  <br class="clear">
135
135
 
136
136
  <footer>
137
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
137
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
138
138
  </footer>
139
139
 
140
140
  <script> prettyPrint(); </script>
@@ -163,7 +163,7 @@ module.exports = Translator;
163
163
  <br class="clear">
164
164
 
165
165
  <footer>
166
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
166
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
167
167
  </footer>
168
168
 
169
169
  <script> prettyPrint(); </script>
@@ -395,7 +395,7 @@ module.exports = {
395
395
  <br class="clear">
396
396
 
397
397
  <footer>
398
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
398
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
399
399
  </footer>
400
400
 
401
401
  <script> prettyPrint(); </script>
@@ -565,7 +565,7 @@ module.exports = {
565
565
  <br class="clear">
566
566
 
567
567
  <footer>
568
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
568
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
569
569
  </footer>
570
570
 
571
571
  <script> prettyPrint(); </script>
@@ -232,7 +232,7 @@ module.exports = {
232
232
  <br class="clear">
233
233
 
234
234
  <footer>
235
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
235
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
236
236
  </footer>
237
237
 
238
238
  <script> prettyPrint(); </script>
@@ -140,7 +140,7 @@ module.exports = DataType;
140
140
  <br class="clear">
141
141
 
142
142
  <footer>
143
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
143
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
144
144
  </footer>
145
145
 
146
146
  <script> prettyPrint(); </script>
@@ -122,7 +122,7 @@ module.exports = class GraphBinaryReader {
122
122
  <br class="clear">
123
123
 
124
124
  <footer>
125
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
125
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
126
126
  </footer>
127
127
 
128
128
  <script> prettyPrint(); </script>
@@ -125,7 +125,7 @@ module.exports = class GraphBinaryWriter {
125
125
  <br class="clear">
126
126
 
127
127
  <footer>
128
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
128
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
129
129
  </footer>
130
130
 
131
131
  <script> prettyPrint(); </script>
@@ -342,7 +342,7 @@ module.exports = {
342
342
  <br class="clear">
343
343
 
344
344
  <footer>
345
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
345
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
346
346
  </footer>
347
347
 
348
348
  <script> prettyPrint(); </script>
@@ -546,7 +546,7 @@ module.exports = {
546
546
  <br class="clear">
547
547
 
548
548
  <footer>
549
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Wed May 17 2023 11:09:10 GMT-0700 (Pacific Daylight Time)
549
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Mon Dec 04 2023 11:42:07 GMT-0800 (Pacific Standard Time)
550
550
  </footer>
551
551
 
552
552
  <script> prettyPrint(); </script>
@@ -46,6 +46,8 @@ const graphBinaryMimeType = 'application/vnd.graphbinary-v1.0';
46
46
  const pingIntervalDelay = 60 * 1000;
47
47
  const pongTimeoutDelay = 30 * 1000;
48
48
 
49
+ const uuidPattern = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}';
50
+
49
51
  /**
50
52
  * Represents a single connection to a Gremlin Server.
51
53
  */
@@ -175,6 +177,10 @@ class Connection extends EventEmitter {
175
177
  submit(processor, op, args, requestId) {
176
178
  // TINKERPOP-2847: Use lower case to prevent string comparison issues.
177
179
  const rid = (requestId || utils.getUuid()).toLowerCase();
180
+ if (!rid.match(uuidPattern)) {
181
+ throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
182
+ }
183
+
178
184
  return this.open().then(
179
185
  () =>
180
186
  new Promise((resolve, reject) => {
@@ -204,6 +210,9 @@ class Connection extends EventEmitter {
204
210
  stream(processor, op, args, requestId) {
205
211
  // TINKERPOP-2847: Use lower case to prevent string comparison issues.
206
212
  const rid = (requestId || utils.getUuid()).toLowerCase();
213
+ if (!rid.match(uuidPattern)) {
214
+ throw new Error('Provided requestId "' + rid + '" is not a valid UUID.');
215
+ }
207
216
 
208
217
  const readableStream = new Stream.Readable({
209
218
  objectMode: true,
package/lib/utils.js CHANGED
@@ -25,7 +25,8 @@
25
25
 
26
26
  const crypto = require('crypto');
27
27
  const os = require('os');
28
- const { readFileSync } = require('fs');
28
+
29
+ const gremlinVersion = '3.6.6'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
29
30
 
30
31
  exports.toLong = function toLong(value) {
31
32
  return new Long(value);
@@ -84,12 +85,6 @@ exports.ImmutableMap = ImmutableMap;
84
85
 
85
86
  function generateUserAgent() {
86
87
  const applicationName = (process.env.npm_package_name || 'NotAvailable').replace('_', ' ');
87
- let driverVersion;
88
- try {
89
- driverVersion = JSON.parse(readFileSync(__dirname + '/../package.json')).version.replace('_', ' ');
90
- } catch (e) {
91
- driverVersion = 'NotAvailable';
92
- }
93
88
  let runtimeVersion;
94
89
  let osName;
95
90
  let osVersion;
@@ -108,7 +103,7 @@ function generateUserAgent() {
108
103
  osVersion = os.release().replace(' ', '_');
109
104
  }
110
105
 
111
- const userAgent = `${applicationName} Gremlin-Javascript.${driverVersion} ${runtimeVersion} ${osName}.${osVersion} ${cpuArch}`;
106
+ const userAgent = `${applicationName} Gremlin-Javascript.${gremlinVersion} ${runtimeVersion} ${osName}.${osVersion} ${cpuArch}`;
112
107
 
113
108
  return userAgent;
114
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gremlin",
3
- "version": "3.6.4",
3
+ "version": "3.6.6",
4
4
  "description": "JavaScript Gremlin Language Variant",
5
5
  "author": "Apache TinkerPop team",
6
6
  "keywords": [
@@ -22,14 +22,14 @@
22
22
  "colors": "1.4.0",
23
23
  "cross-env": "^7.0.3",
24
24
  "cucumber": "~6.0.7",
25
- "eslint": "^8.30.0",
26
- "eslint-config-prettier": "^8.5.0",
27
- "eslint-plugin-prettier": "^4.0.0",
25
+ "eslint": "^8.42.0",
26
+ "eslint-config-prettier": "^9.0.0",
27
+ "eslint-plugin-prettier": "^5.0.0",
28
28
  "grunt": "^1.5.3",
29
29
  "grunt-cli": "~1.4.3",
30
30
  "grunt-jsdoc": "~2.4.1",
31
31
  "mocha": "^10.2.0",
32
- "prettier": "^2.7.1"
32
+ "prettier": "^3.0.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -55,6 +55,6 @@
55
55
  "lint": "eslint --ext .js ."
56
56
  },
57
57
  "engines": {
58
- "node": ">=10"
58
+ "node": ">=16"
59
59
  }
60
60
  }