gremlin 3.8.1 → 4.0.0-beta.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/README.md +18 -4
- package/build/cjs/driver/auth.cjs +76 -0
- package/build/cjs/driver/auth.d.cts +9 -0
- package/build/cjs/driver/client.cjs +178 -0
- package/build/cjs/driver/client.d.cts +88 -0
- package/build/cjs/driver/connection.cjs +363 -0
- package/build/cjs/driver/connection.d.cts +106 -0
- package/build/cjs/driver/dispatcher.browser.cjs +57 -0
- package/build/cjs/driver/dispatcher.browser.d.cts +35 -0
- package/build/cjs/driver/dispatcher.cjs +101 -0
- package/build/cjs/driver/dispatcher.d.cts +48 -0
- package/build/cjs/driver/driver-remote-connection.cjs +153 -0
- package/build/cjs/driver/driver-remote-connection.d.cts +39 -0
- package/build/cjs/driver/http-request.cjs +64 -0
- package/build/cjs/driver/http-request.d.cts +28 -0
- package/build/cjs/driver/logger.cjs +45 -0
- package/build/cjs/driver/logger.d.cts +29 -0
- package/build/cjs/driver/remote-connection.cjs +72 -0
- package/build/cjs/driver/remote-connection.d.cts +57 -0
- package/build/cjs/driver/request-message.cjs +246 -0
- package/build/cjs/driver/request-message.d.cts +79 -0
- package/build/cjs/driver/response-error.cjs +45 -0
- package/build/cjs/driver/response-error.d.cts +13 -0
- package/build/cjs/driver/result-set.cjs +111 -0
- package/build/cjs/driver/result-set.d.cts +29 -0
- package/build/cjs/index.cjs +146 -0
- package/build/cjs/index.d.cts +440 -0
- package/build/cjs/language/grammar/GremlinLexer.cjs +1905 -0
- package/build/cjs/language/grammar/GremlinLexer.d.cts +349 -0
- package/build/cjs/language/grammar/GremlinListener.cjs +4804 -0
- package/build/cjs/language/grammar/GremlinListener.d.cts +5239 -0
- package/build/cjs/language/grammar/GremlinParser.cjs +38146 -0
- package/build/cjs/language/grammar/GremlinParser.d.cts +6260 -0
- package/build/cjs/language/index.cjs +48 -0
- package/build/cjs/language/index.d.cts +12 -0
- package/build/cjs/language/translator/AnonymizedTranslateVisitor.cjs +166 -0
- package/build/cjs/language/translator/AnonymizedTranslateVisitor.d.cts +39 -0
- package/build/cjs/language/translator/DotNetTranslateVisitor.cjs +935 -0
- package/build/cjs/language/translator/DotNetTranslateVisitor.d.cts +166 -0
- package/build/cjs/language/translator/GoTranslateVisitor.cjs +421 -0
- package/build/cjs/language/translator/GoTranslateVisitor.d.cts +40 -0
- package/build/cjs/language/translator/GremlinTranslator.cjs +96 -0
- package/build/cjs/language/translator/GremlinTranslator.d.cts +18 -0
- package/build/cjs/language/translator/GroovyTranslateVisitor.cjs +310 -0
- package/build/cjs/language/translator/GroovyTranslateVisitor.d.cts +37 -0
- package/build/cjs/language/translator/JavaTranslateVisitor.cjs +270 -0
- package/build/cjs/language/translator/JavaTranslateVisitor.d.cts +26 -0
- package/build/cjs/language/translator/JavascriptTranslateVisitor.cjs +231 -0
- package/build/cjs/language/translator/JavascriptTranslateVisitor.d.cts +28 -0
- package/build/cjs/language/translator/PythonTranslateVisitor.cjs +340 -0
- package/build/cjs/language/translator/PythonTranslateVisitor.d.cts +31 -0
- package/build/cjs/language/translator/TranslateVisitor.cjs +398 -0
- package/build/cjs/language/translator/TranslateVisitor.d.cts +94 -0
- package/build/cjs/language/translator/Translation.cjs +47 -0
- package/build/cjs/language/translator/Translation.d.cts +13 -0
- package/build/cjs/language/translator/Translator.cjs +46 -0
- package/build/cjs/language/translator/Translator.d.cts +24 -0
- package/build/cjs/language/translator/TranslatorException.cjs +31 -0
- package/build/cjs/language/translator/TranslatorException.d.cts +6 -0
- package/build/cjs/process/anonymous-traversal.cjs +82 -0
- package/build/cjs/process/anonymous-traversal.d.cts +40 -0
- package/build/cjs/process/graph-traversal.cjs +1833 -0
- package/build/cjs/process/graph-traversal.d.cts +1215 -0
- package/build/cjs/process/gremlin-lang.cjs +308 -0
- package/build/cjs/process/gremlin-lang.d.cts +20 -0
- package/{lib/driver/response-error.js → build/cjs/process/gvalue.cjs} +23 -28
- package/build/cjs/process/gvalue.d.cts +7 -0
- package/build/cjs/process/transaction.cjs +171 -0
- package/build/cjs/process/transaction.d.cts +70 -0
- package/build/cjs/process/traversal-strategy.cjs +360 -0
- package/build/cjs/process/traversal-strategy.d.cts +211 -0
- package/build/cjs/process/traversal.cjs +539 -0
- package/build/cjs/process/traversal.d.cts +212 -0
- package/build/cjs/structure/PDTRegistry.cjs +116 -0
- package/build/cjs/structure/PDTRegistry.d.cts +34 -0
- package/build/cjs/structure/graph.cjs +500 -0
- package/build/cjs/structure/graph.d.cts +176 -0
- package/build/cjs/structure/io/binary/GraphBinary.cjs +177 -0
- package/build/cjs/structure/io/binary/GraphBinary.d.cts +105 -0
- package/build/cjs/structure/io/binary/internals/AnySerializer.cjs +97 -0
- package/build/cjs/structure/io/binary/internals/AnySerializer.d.cts +18 -0
- package/build/cjs/structure/io/binary/internals/ArraySerializer.cjs +108 -0
- package/build/cjs/structure/io/binary/internals/ArraySerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.cjs +116 -0
- package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/BinarySerializer.cjs +92 -0
- package/build/cjs/structure/io/binary/internals/BinarySerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/BooleanSerializer.cjs +79 -0
- package/build/cjs/structure/io/binary/internals/BooleanSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/ByteSerializer.cjs +74 -0
- package/build/cjs/structure/io/binary/internals/ByteSerializer.d.cts +18 -0
- package/build/cjs/structure/io/binary/internals/CompositePDTSerializer.cjs +81 -0
- package/build/cjs/structure/io/binary/internals/CompositePDTSerializer.d.cts +10 -0
- package/build/cjs/structure/io/binary/internals/DataType.cjs +63 -0
- package/build/cjs/structure/io/binary/internals/DataType.d.cts +35 -0
- package/build/cjs/structure/io/binary/internals/DateTimeSerializer.cjs +122 -0
- package/build/cjs/structure/io/binary/internals/DateTimeSerializer.d.cts +20 -0
- package/build/cjs/structure/io/binary/internals/DoubleSerializer.cjs +77 -0
- package/build/cjs/structure/io/binary/internals/DoubleSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/EdgeSerializer.cjs +146 -0
- package/build/cjs/structure/io/binary/internals/EdgeSerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/EnumSerializer.cjs +115 -0
- package/build/cjs/structure/io/binary/internals/EnumSerializer.d.cts +39 -0
- package/build/cjs/structure/io/binary/internals/FloatSerializer.cjs +77 -0
- package/build/cjs/structure/io/binary/internals/FloatSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryReader.cjs +171 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryReader.d.cts +43 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.cjs +85 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.d.cts +9 -0
- package/build/cjs/structure/io/binary/internals/GraphSerializer.cjs +184 -0
- package/build/cjs/structure/io/binary/internals/GraphSerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/IntSerializer.cjs +98 -0
- package/build/cjs/structure/io/binary/internals/IntSerializer.d.cts +28 -0
- package/build/cjs/structure/io/binary/internals/LongSerializer.cjs +82 -0
- package/build/cjs/structure/io/binary/internals/LongSerializer.d.cts +20 -0
- package/build/cjs/structure/io/binary/internals/MapSerializer.cjs +110 -0
- package/build/cjs/structure/io/binary/internals/MapSerializer.d.cts +20 -0
- package/build/cjs/structure/io/binary/internals/MarkerSerializer.cjs +60 -0
- package/build/cjs/structure/io/binary/internals/MarkerSerializer.d.cts +17 -0
- package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.cjs +92 -0
- package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.d.cts +6 -0
- package/build/cjs/structure/io/binary/internals/PathSerializer.cjs +88 -0
- package/build/cjs/structure/io/binary/internals/PathSerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/PrimitivePDTSerializer.cjs +80 -0
- package/build/cjs/structure/io/binary/internals/PrimitivePDTSerializer.d.cts +10 -0
- package/build/cjs/structure/io/binary/internals/PropertySerializer.cjs +93 -0
- package/build/cjs/structure/io/binary/internals/PropertySerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/SetSerializer.cjs +104 -0
- package/build/cjs/structure/io/binary/internals/SetSerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/ShortSerializer.cjs +77 -0
- package/build/cjs/structure/io/binary/internals/ShortSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/StreamReader.cjs +184 -0
- package/build/cjs/structure/io/binary/internals/StreamReader.d.cts +69 -0
- package/build/cjs/structure/io/binary/internals/StringSerializer.cjs +88 -0
- package/build/cjs/structure/io/binary/internals/StringSerializer.d.cts +21 -0
- package/build/cjs/structure/io/binary/internals/StubSerializer.cjs +33 -0
- package/build/cjs/structure/io/binary/internals/StubSerializer.d.cts +7 -0
- package/build/cjs/structure/io/binary/internals/TreeSerializer.cjs +139 -0
- package/build/cjs/structure/io/binary/internals/TreeSerializer.d.cts +54 -0
- package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.cjs +47 -0
- package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.d.cts +13 -0
- package/build/cjs/structure/io/binary/internals/UuidSerializer.cjs +93 -0
- package/build/cjs/structure/io/binary/internals/UuidSerializer.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.cjs +105 -0
- package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/VertexSerializer.cjs +101 -0
- package/build/cjs/structure/io/binary/internals/VertexSerializer.d.cts +22 -0
- package/build/cjs/structure/io/binary/internals/utils.cjs +53 -0
- package/build/cjs/structure/io/binary/internals/utils.d.cts +6 -0
- package/build/cjs/utils.cjs +259 -0
- package/build/cjs/utils.d.cts +78 -0
- package/build/esm/driver/auth.d.ts +9 -0
- package/build/esm/driver/auth.js +72 -0
- package/build/esm/driver/client.d.ts +88 -0
- package/build/esm/driver/client.js +172 -0
- package/build/esm/driver/connection.d.ts +106 -0
- package/build/esm/driver/connection.js +323 -0
- package/build/esm/driver/dispatcher.browser.d.ts +35 -0
- package/build/esm/driver/dispatcher.browser.js +53 -0
- package/build/esm/driver/dispatcher.d.ts +48 -0
- package/build/esm/driver/dispatcher.js +94 -0
- package/build/esm/driver/driver-remote-connection.d.ts +39 -0
- package/build/esm/driver/driver-remote-connection.js +114 -0
- package/build/esm/driver/http-request.d.ts +28 -0
- package/build/esm/driver/http-request.js +60 -0
- package/build/esm/driver/logger.d.ts +29 -0
- package/build/esm/driver/logger.js +42 -0
- package/build/esm/driver/remote-connection.d.ts +57 -0
- package/build/esm/driver/remote-connection.js +66 -0
- package/build/esm/driver/request-message.d.ts +79 -0
- package/build/esm/driver/request-message.js +238 -0
- package/build/esm/driver/response-error.d.ts +13 -0
- package/{lib/driver/auth/mechanisms/sasl-mechanism-base.js → build/esm/driver/response-error.js} +24 -34
- package/build/esm/driver/result-set.d.ts +29 -0
- package/build/esm/driver/result-set.js +75 -0
- package/build/esm/index.d.ts +440 -0
- package/{index.js → build/esm/index.js} +44 -33
- package/build/esm/language/grammar/GremlinLexer.d.ts +349 -0
- package/build/esm/language/grammar/GremlinLexer.js +1868 -0
- package/build/esm/language/grammar/GremlinListener.d.ts +5239 -0
- package/build/esm/language/grammar/GremlinListener.js +4800 -0
- package/build/esm/language/grammar/GremlinParser.d.ts +6260 -0
- package/build/esm/language/grammar/GremlinParser.js +37579 -0
- package/build/esm/language/index.d.ts +12 -0
- package/build/esm/language/index.js +30 -0
- package/build/esm/language/translator/AnonymizedTranslateVisitor.d.ts +39 -0
- package/build/esm/language/translator/AnonymizedTranslateVisitor.js +160 -0
- package/build/esm/language/translator/DotNetTranslateVisitor.d.ts +166 -0
- package/build/esm/language/translator/DotNetTranslateVisitor.js +929 -0
- package/build/esm/language/translator/GoTranslateVisitor.d.ts +40 -0
- package/build/esm/language/translator/GoTranslateVisitor.js +415 -0
- package/build/esm/language/translator/GremlinTranslator.d.ts +18 -0
- package/build/esm/language/translator/GremlinTranslator.js +89 -0
- package/build/esm/language/translator/GroovyTranslateVisitor.d.ts +37 -0
- package/build/esm/language/translator/GroovyTranslateVisitor.js +304 -0
- package/build/esm/language/translator/JavaTranslateVisitor.d.ts +26 -0
- package/build/esm/language/translator/JavaTranslateVisitor.js +264 -0
- package/build/esm/language/translator/JavascriptTranslateVisitor.d.ts +28 -0
- package/build/esm/language/translator/JavascriptTranslateVisitor.js +225 -0
- package/build/esm/language/translator/PythonTranslateVisitor.d.ts +31 -0
- package/build/esm/language/translator/PythonTranslateVisitor.js +334 -0
- package/build/esm/language/translator/TranslateVisitor.d.ts +94 -0
- package/build/esm/language/translator/TranslateVisitor.js +395 -0
- package/build/esm/language/translator/Translation.d.ts +13 -0
- package/build/esm/language/translator/Translation.js +43 -0
- package/build/esm/language/translator/Translator.d.ts +24 -0
- package/build/esm/language/translator/Translator.js +40 -0
- package/build/esm/language/translator/TranslatorException.d.ts +6 -0
- package/build/esm/language/translator/TranslatorException.js +27 -0
- package/build/esm/process/anonymous-traversal.d.ts +40 -0
- package/build/esm/process/anonymous-traversal.js +76 -0
- package/build/esm/process/graph-traversal.d.ts +1215 -0
- package/build/esm/process/graph-traversal.js +1824 -0
- package/build/esm/process/gremlin-lang.d.ts +20 -0
- package/build/esm/process/gremlin-lang.js +305 -0
- package/build/esm/process/gvalue.d.ts +7 -0
- package/{lib/driver/auth/authenticator.js → build/esm/process/gvalue.js} +19 -19
- package/build/esm/process/transaction.d.ts +70 -0
- package/build/esm/process/transaction.js +164 -0
- package/build/esm/process/traversal-strategy.d.ts +211 -0
- package/build/esm/process/traversal-strategy.js +319 -0
- package/build/esm/process/traversal.d.ts +212 -0
- package/build/esm/process/traversal.js +526 -0
- package/build/esm/structure/PDTRegistry.d.ts +34 -0
- package/build/esm/structure/PDTRegistry.js +112 -0
- package/build/esm/structure/graph.d.ts +176 -0
- package/build/esm/structure/graph.js +488 -0
- package/build/esm/structure/io/binary/GraphBinary.d.ts +105 -0
- package/build/esm/structure/io/binary/GraphBinary.js +136 -0
- package/build/esm/structure/io/binary/internals/AnySerializer.d.ts +18 -0
- package/build/esm/structure/io/binary/internals/AnySerializer.js +94 -0
- package/build/esm/structure/io/binary/internals/ArraySerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/ArraySerializer.js +105 -0
- package/build/esm/structure/io/binary/internals/BigIntegerSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/BigIntegerSerializer.js +113 -0
- package/build/esm/structure/io/binary/internals/BinarySerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/BinarySerializer.js +89 -0
- package/build/esm/structure/io/binary/internals/BooleanSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/BooleanSerializer.js +76 -0
- package/build/esm/structure/io/binary/internals/ByteSerializer.d.ts +18 -0
- package/build/esm/structure/io/binary/internals/ByteSerializer.js +71 -0
- package/build/esm/structure/io/binary/internals/CompositePDTSerializer.d.ts +10 -0
- package/build/esm/structure/io/binary/internals/CompositePDTSerializer.js +78 -0
- package/build/esm/structure/io/binary/internals/DataType.d.ts +35 -0
- package/build/esm/structure/io/binary/internals/DataType.js +61 -0
- package/build/esm/structure/io/binary/internals/DateTimeSerializer.d.ts +20 -0
- package/build/esm/structure/io/binary/internals/DateTimeSerializer.js +119 -0
- package/build/esm/structure/io/binary/internals/DoubleSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/DoubleSerializer.js +74 -0
- package/build/esm/structure/io/binary/internals/EdgeSerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/EdgeSerializer.js +143 -0
- package/build/esm/structure/io/binary/internals/EnumSerializer.d.ts +39 -0
- package/build/esm/structure/io/binary/internals/EnumSerializer.js +112 -0
- package/build/esm/structure/io/binary/internals/FloatSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/FloatSerializer.js +74 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryReader.d.ts +43 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryReader.js +165 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryWriter.d.ts +9 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryWriter.js +82 -0
- package/build/esm/structure/io/binary/internals/GraphSerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/GraphSerializer.js +181 -0
- package/build/esm/structure/io/binary/internals/IntSerializer.d.ts +28 -0
- package/build/esm/structure/io/binary/internals/IntSerializer.js +95 -0
- package/build/esm/structure/io/binary/internals/LongSerializer.d.ts +20 -0
- package/build/esm/structure/io/binary/internals/LongSerializer.js +79 -0
- package/build/esm/structure/io/binary/internals/MapSerializer.d.ts +20 -0
- package/build/esm/structure/io/binary/internals/MapSerializer.js +107 -0
- package/build/esm/structure/io/binary/internals/MarkerSerializer.d.ts +17 -0
- package/build/esm/structure/io/binary/internals/MarkerSerializer.js +56 -0
- package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.d.ts +6 -0
- package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.js +89 -0
- package/build/esm/structure/io/binary/internals/PathSerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/PathSerializer.js +85 -0
- package/build/esm/structure/io/binary/internals/PrimitivePDTSerializer.d.ts +10 -0
- package/build/esm/structure/io/binary/internals/PrimitivePDTSerializer.js +77 -0
- package/build/esm/structure/io/binary/internals/PropertySerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/PropertySerializer.js +90 -0
- package/build/esm/structure/io/binary/internals/SetSerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/SetSerializer.js +101 -0
- package/build/esm/structure/io/binary/internals/ShortSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/ShortSerializer.js +74 -0
- package/build/esm/structure/io/binary/internals/StreamReader.d.ts +69 -0
- package/build/esm/structure/io/binary/internals/StreamReader.js +181 -0
- package/build/esm/structure/io/binary/internals/StringSerializer.d.ts +21 -0
- package/build/esm/structure/io/binary/internals/StringSerializer.js +85 -0
- package/build/esm/structure/io/binary/internals/StubSerializer.d.ts +7 -0
- package/{.prettierrc.js → build/esm/structure/io/binary/internals/StubSerializer.js} +12 -11
- package/build/esm/structure/io/binary/internals/TreeSerializer.d.ts +54 -0
- package/build/esm/structure/io/binary/internals/TreeSerializer.js +136 -0
- package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.d.ts +13 -0
- package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.js +44 -0
- package/build/esm/structure/io/binary/internals/UuidSerializer.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/UuidSerializer.js +90 -0
- package/build/esm/structure/io/binary/internals/VertexPropertySerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/VertexPropertySerializer.js +102 -0
- package/build/esm/structure/io/binary/internals/VertexSerializer.d.ts +22 -0
- package/build/esm/structure/io/binary/internals/VertexSerializer.js +98 -0
- package/build/esm/structure/io/binary/internals/utils.d.ts +6 -0
- package/{lib → build/esm}/structure/io/binary/internals/utils.js +23 -35
- package/build/esm/utils.d.ts +78 -0
- package/build/esm/utils.js +237 -0
- package/package.json +71 -26
- package/.nvmrc +0 -1
- package/NOTICE +0 -5
- package/doc/AnonymousTraversalSource.html +0 -793
- package/doc/Authenticator.html +0 -303
- package/doc/Bytecode.html +0 -941
- package/doc/CardinalityValue.html +0 -711
- package/doc/Client.html +0 -1869
- package/doc/Connection.html +0 -1192
- package/doc/DriverRemoteConnection.html +0 -1528
- package/doc/EdgeLabelVerificationStrategy.html +0 -238
- package/doc/Graph.html +0 -343
- package/doc/GraphSON2Reader.html +0 -407
- package/doc/GraphSON2Writer.html +0 -558
- package/doc/GraphSON3Reader.html +0 -170
- package/doc/GraphSON3Writer.html +0 -170
- package/doc/GraphTraversal.html +0 -22974
- package/doc/GraphTraversalSource.html +0 -3683
- package/doc/HaltedTraverserStrategy.html +0 -215
- package/doc/MatchAlgorithmStrategy.html +0 -210
- package/doc/P.html +0 -2020
- package/doc/PartitionStrategy.html +0 -387
- package/doc/Path.html +0 -242
- package/doc/PlainTextSaslAuthenticator.html +0 -456
- package/doc/ProductiveByStrategy.html +0 -258
- package/doc/RemoteConnection.html +0 -1086
- package/doc/RemoteStrategy.html +0 -307
- package/doc/RemoteTraversal.html +0 -170
- package/doc/ReservedKeysVerificationStrategy.html +0 -261
- package/doc/ResponseError.html +0 -360
- package/doc/ResultSet.html +0 -633
- package/doc/SaslAuthenticator.html +0 -455
- package/doc/SaslMechanismBase.html +0 -506
- package/doc/SaslMechanismPlain.html +0 -925
- package/doc/SeedStrategy.html +0 -288
- package/doc/SubgraphStrategy.html +0 -387
- package/doc/TextP.html +0 -1440
- package/doc/Transaction.html +0 -655
- package/doc/Translator.html +0 -527
- package/doc/TraversalStrategies.html +0 -652
- package/doc/TraversalStrategy.html +0 -393
- package/doc/TypeSerializer.html +0 -166
- package/doc/driver_auth_authenticator.js.html +0 -89
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +0 -103
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +0 -157
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +0 -106
- package/doc/driver_auth_sasl-authenticator.js.html +0 -100
- package/doc/driver_client.js.html +0 -250
- package/doc/driver_connection.js.html +0 -518
- package/doc/driver_driver-remote-connection.js.html +0 -193
- package/doc/driver_remote-connection.js.html +0 -198
- package/doc/driver_response-error.js.html +0 -98
- package/doc/driver_result-set.js.html +0 -134
- package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/doc/global.html +0 -728
- package/doc/index.html +0 -185
- package/doc/module.exports.html +0 -301
- package/doc/process_anonymous-traversal.js.html +0 -138
- package/doc/process_bytecode.js.html +0 -175
- package/doc/process_graph-traversal.js.html +0 -1936
- package/doc/process_transaction.js.html +0 -151
- package/doc/process_translator.js.html +0 -172
- package/doc/process_traversal-strategy.js.html +0 -466
- package/doc/process_traversal.js.html +0 -592
- package/doc/scripts/linenumber.js +0 -25
- package/doc/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/doc/scripts/prettify/lang-css.js +0 -2
- package/doc/scripts/prettify/prettify.js +0 -28
- package/doc/structure_graph.js.html +0 -233
- package/doc/structure_io_binary_internals_DataType.js.html +0 -151
- package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +0 -133
- package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +0 -136
- package/doc/structure_io_graph-serializer.js.html +0 -354
- package/doc/structure_io_type-serializers.js.html +0 -617
- package/doc/styles/jsdoc-default.css +0 -358
- package/doc/styles/prettify-jsdoc.css +0 -111
- package/doc/styles/prettify-tomorrow.css +0 -132
- package/doc/utils.js.html +0 -181
- package/docker-compose.yml +0 -76
- package/eslint.config.mjs +0 -143
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +0 -106
- package/lib/driver/auth/plain-text-sasl-authenticator.js +0 -55
- package/lib/driver/auth/sasl-authenticator.js +0 -49
- package/lib/driver/client.js +0 -199
- package/lib/driver/connection.js +0 -467
- package/lib/driver/driver-remote-connection.js +0 -142
- package/lib/driver/remote-connection.js +0 -147
- package/lib/driver/result-set.js +0 -83
- package/lib/process/anonymous-traversal.js +0 -87
- package/lib/process/bytecode.js +0 -124
- package/lib/process/graph-traversal.js +0 -1885
- package/lib/process/transaction.js +0 -100
- package/lib/process/translator.js +0 -121
- package/lib/process/traversal-strategy.js +0 -415
- package/lib/process/traversal.js +0 -541
- package/lib/structure/graph.js +0 -182
- package/lib/structure/io/binary/GraphBinary.js +0 -110
- package/lib/structure/io/binary/internals/AnySerializer.js +0 -100
- package/lib/structure/io/binary/internals/ArraySerializer.js +0 -137
- package/lib/structure/io/binary/internals/BigIntegerSerializer.js +0 -153
- package/lib/structure/io/binary/internals/BooleanSerializer.js +0 -105
- package/lib/structure/io/binary/internals/BulkSetSerializer.js +0 -126
- package/lib/structure/io/binary/internals/ByteBufferSerializer.js +0 -126
- package/lib/structure/io/binary/internals/ByteSerializer.js +0 -97
- package/lib/structure/io/binary/internals/BytecodeSerializer.js +0 -250
- package/lib/structure/io/binary/internals/ClassSerializer.js +0 -60
- package/lib/structure/io/binary/internals/DataType.js +0 -100
- package/lib/structure/io/binary/internals/DateSerializer.js +0 -105
- package/lib/structure/io/binary/internals/DoubleSerializer.js +0 -101
- package/lib/structure/io/binary/internals/EdgeSerializer.js +0 -216
- package/lib/structure/io/binary/internals/EnumSerializer.js +0 -152
- package/lib/structure/io/binary/internals/FloatSerializer.js +0 -101
- package/lib/structure/io/binary/internals/GraphBinaryReader.js +0 -82
- package/lib/structure/io/binary/internals/GraphBinaryWriter.js +0 -85
- package/lib/structure/io/binary/internals/IntSerializer.js +0 -114
- package/lib/structure/io/binary/internals/LambdaSerializer.js +0 -71
- package/lib/structure/io/binary/internals/LongSerializer.js +0 -109
- package/lib/structure/io/binary/internals/LongSerializerNg.js +0 -104
- package/lib/structure/io/binary/internals/MapSerializer.js +0 -155
- package/lib/structure/io/binary/internals/NumberSerializationStrategy.js +0 -73
- package/lib/structure/io/binary/internals/OffsetDateTimeSerializer.js +0 -151
- package/lib/structure/io/binary/internals/PSerializer.js +0 -152
- package/lib/structure/io/binary/internals/PathSerializer.js +0 -124
- package/lib/structure/io/binary/internals/PropertySerializer.js +0 -142
- package/lib/structure/io/binary/internals/SetSerializer.js +0 -134
- package/lib/structure/io/binary/internals/ShortSerializer.js +0 -101
- package/lib/structure/io/binary/internals/StringSerializer.js +0 -116
- package/lib/structure/io/binary/internals/TextPSerializer.js +0 -146
- package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +0 -69
- package/lib/structure/io/binary/internals/TraverserSerializer.js +0 -124
- package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +0 -77
- package/lib/structure/io/binary/internals/UuidSerializer.js +0 -121
- package/lib/structure/io/binary/internals/VertexPropertySerializer.js +0 -176
- package/lib/structure/io/binary/internals/VertexSerializer.js +0 -139
- package/lib/structure/io/graph-serializer.js +0 -303
- package/lib/structure/io/type-serializers.js +0 -566
- package/lib/utils.js +0 -130
|
@@ -16,46 +16,34 @@
|
|
|
16
16
|
* specific language governing permissions and limitations
|
|
17
17
|
* under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
19
|
/**
|
|
21
20
|
* @author Igor Ostapenko
|
|
22
21
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const { Buffer } = require('buffer');
|
|
26
|
-
|
|
22
|
+
import { Buffer } from 'buffer';
|
|
27
23
|
/*
|
|
28
24
|
* Deserialization error general constructor.
|
|
29
25
|
*/
|
|
30
|
-
const des_error = ({ serializer, args, cursor, err }) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
let cursor_tail = '';
|
|
35
|
-
if (cursor instanceof Buffer) {
|
|
36
|
-
if (cursor.length > 32) {
|
|
37
|
-
cursor_tail = '...';
|
|
26
|
+
export const des_error = ({ serializer, args, cursor, err }) => {
|
|
27
|
+
if (cursor === undefined) {
|
|
28
|
+
cursor = args[0]; // buffer
|
|
38
29
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
module.exports = {
|
|
60
|
-
des_error,
|
|
30
|
+
let cursor_tail = '';
|
|
31
|
+
if (cursor instanceof Buffer) {
|
|
32
|
+
if (cursor.length > 32) {
|
|
33
|
+
cursor_tail = '...';
|
|
34
|
+
}
|
|
35
|
+
cursor = cursor.slice(0, 32).toString('hex');
|
|
36
|
+
}
|
|
37
|
+
const fullyQualifiedFormat = args[1];
|
|
38
|
+
const nullable = args[2];
|
|
39
|
+
let m = `${serializer.constructor.name}.deserialize(cursor=${cursor}${cursor_tail}`;
|
|
40
|
+
if (fullyQualifiedFormat !== undefined) {
|
|
41
|
+
m += `, fullyQualifiedFormat=${fullyQualifiedFormat}`;
|
|
42
|
+
}
|
|
43
|
+
if (nullable !== undefined) {
|
|
44
|
+
m += `, nullable=${nullable}`;
|
|
45
|
+
}
|
|
46
|
+
m += `): ${err.message.replace(/\.$/, '')}.`;
|
|
47
|
+
err.message = m;
|
|
48
|
+
return err;
|
|
61
49
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare const INT32_MIN = -2147483648;
|
|
2
|
+
export declare const INT32_MAX = 2147483647;
|
|
3
|
+
export declare function toLong(value: number | string | bigint): Long;
|
|
4
|
+
export declare class Long {
|
|
5
|
+
readonly value: number | string | bigint;
|
|
6
|
+
readonly type = "long";
|
|
7
|
+
constructor(value: number | string | bigint);
|
|
8
|
+
valueOf(): number;
|
|
9
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
10
|
+
toJSON(): string | number;
|
|
11
|
+
}
|
|
12
|
+
export declare class Int {
|
|
13
|
+
readonly value: number;
|
|
14
|
+
readonly type = "int";
|
|
15
|
+
constructor(value: number);
|
|
16
|
+
valueOf(): number;
|
|
17
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
18
|
+
toJSON(): number;
|
|
19
|
+
}
|
|
20
|
+
export declare class Float {
|
|
21
|
+
readonly value: number;
|
|
22
|
+
readonly type = "float";
|
|
23
|
+
constructor(value: number);
|
|
24
|
+
valueOf(): number;
|
|
25
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
26
|
+
toJSON(): number;
|
|
27
|
+
}
|
|
28
|
+
export declare class Double {
|
|
29
|
+
readonly value: number;
|
|
30
|
+
readonly type = "double";
|
|
31
|
+
constructor(value: number);
|
|
32
|
+
valueOf(): number;
|
|
33
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
34
|
+
toJSON(): number;
|
|
35
|
+
}
|
|
36
|
+
export declare class Short {
|
|
37
|
+
readonly value: number;
|
|
38
|
+
readonly type = "short";
|
|
39
|
+
constructor(value: number);
|
|
40
|
+
valueOf(): number;
|
|
41
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
42
|
+
toJSON(): number;
|
|
43
|
+
}
|
|
44
|
+
export declare class Byte {
|
|
45
|
+
readonly value: number;
|
|
46
|
+
readonly type = "byte";
|
|
47
|
+
constructor(value: number);
|
|
48
|
+
valueOf(): number;
|
|
49
|
+
[Symbol.toPrimitive](hint: string): string | number;
|
|
50
|
+
toJSON(): number;
|
|
51
|
+
}
|
|
52
|
+
export declare function toInt(value: number): Int;
|
|
53
|
+
export declare function toFloat(value: number): Float;
|
|
54
|
+
export declare function toDouble(value: number): Double;
|
|
55
|
+
export declare function toShort(value: number): Short;
|
|
56
|
+
export declare function toByte(value: number): Byte;
|
|
57
|
+
export declare function unwrap(value: Float): number;
|
|
58
|
+
export declare function unwrap(value: Double): number;
|
|
59
|
+
export declare function unwrap(value: Int): number;
|
|
60
|
+
export declare function unwrap(value: Long): number | string | bigint;
|
|
61
|
+
export declare function unwrap(value: Short): number;
|
|
62
|
+
export declare function unwrap(value: Byte): number;
|
|
63
|
+
export declare function unwrap<T>(value: T): T;
|
|
64
|
+
export declare function getUuid(): `${string}-${string}-${string}-${string}-${string}`;
|
|
65
|
+
export declare const emptyArray: any[];
|
|
66
|
+
export declare class ImmutableMap<K, V> extends Map<K, V> implements ReadonlyMap<K, V> {
|
|
67
|
+
constructor(iterable?: Iterable<[K, V]>);
|
|
68
|
+
set(): this;
|
|
69
|
+
['delete'](): boolean;
|
|
70
|
+
clear(): void;
|
|
71
|
+
}
|
|
72
|
+
export declare function getUserAgentHeader(): string;
|
|
73
|
+
export declare const getUserAgent: () => Promise<string | undefined>;
|
|
74
|
+
export declare const toArrayBuffer: (buffer: Buffer) => ArrayBuffer | SharedArrayBuffer;
|
|
75
|
+
export declare const DeferredPromise: <T>() => Promise<T> & {
|
|
76
|
+
resolve: (value: T) => void;
|
|
77
|
+
reject: (reason: unknown) => void;
|
|
78
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* A module containing any utility functions.
|
|
21
|
+
* @author Jorge Bay Gondra
|
|
22
|
+
*/
|
|
23
|
+
const gremlinVersion = '4.0.0-beta.3'; // DO NOT MODIFY - Configured automatically by Maven Replacer Plugin
|
|
24
|
+
const INT64_MIN = -9223372036854775808n;
|
|
25
|
+
const INT64_MAX = 9223372036854775807n;
|
|
26
|
+
export const INT32_MIN = -2147483648;
|
|
27
|
+
export const INT32_MAX = 2147483647;
|
|
28
|
+
export function toLong(value) {
|
|
29
|
+
return new Long(value);
|
|
30
|
+
}
|
|
31
|
+
export class Long {
|
|
32
|
+
value;
|
|
33
|
+
type = 'long';
|
|
34
|
+
constructor(value) {
|
|
35
|
+
this.value = value;
|
|
36
|
+
if (typeof value !== 'string' && typeof value !== 'number' && typeof value !== 'bigint') {
|
|
37
|
+
throw new TypeError('The value must be a string, a number, or a bigint');
|
|
38
|
+
}
|
|
39
|
+
if (typeof value === 'string') {
|
|
40
|
+
if (!/^(?:0|-?[1-9]\d*)$/.test(value)) {
|
|
41
|
+
throw new TypeError('Long value must be a valid integer');
|
|
42
|
+
}
|
|
43
|
+
const n = BigInt(value);
|
|
44
|
+
if (n < INT64_MIN || n > INT64_MAX) {
|
|
45
|
+
throw new RangeError('Long value is outside int64 range');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (typeof value === 'number') {
|
|
49
|
+
if (!Number.isInteger(value)) {
|
|
50
|
+
throw new TypeError('Long value must be an integer');
|
|
51
|
+
}
|
|
52
|
+
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER) {
|
|
53
|
+
throw new RangeError('Long number values outside safe integer range lose precision; use string or bigint');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (typeof value === 'bigint') {
|
|
57
|
+
if (value < INT64_MIN || value > INT64_MAX) {
|
|
58
|
+
throw new RangeError('Long value is outside int64 range');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
valueOf() {
|
|
63
|
+
if (typeof this.value === 'number')
|
|
64
|
+
return this.value;
|
|
65
|
+
const big = typeof this.value === 'bigint' ? this.value : BigInt(this.value);
|
|
66
|
+
if (big > BigInt(Number.MAX_SAFE_INTEGER) || big < BigInt(Number.MIN_SAFE_INTEGER)) {
|
|
67
|
+
throw new RangeError('Long value is outside safe integer range');
|
|
68
|
+
}
|
|
69
|
+
return Number(big);
|
|
70
|
+
}
|
|
71
|
+
[Symbol.toPrimitive](hint) {
|
|
72
|
+
if (hint === 'string')
|
|
73
|
+
return String(this.value);
|
|
74
|
+
return this.valueOf();
|
|
75
|
+
}
|
|
76
|
+
toJSON() {
|
|
77
|
+
if (typeof this.value === 'bigint')
|
|
78
|
+
return this.value.toString();
|
|
79
|
+
return this.value;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export class Int {
|
|
83
|
+
value;
|
|
84
|
+
type = 'int';
|
|
85
|
+
constructor(value) {
|
|
86
|
+
this.value = value;
|
|
87
|
+
if (typeof value !== 'number') {
|
|
88
|
+
throw new TypeError('Int value must be a number');
|
|
89
|
+
}
|
|
90
|
+
if (!Number.isFinite(value) || !Number.isInteger(value)) {
|
|
91
|
+
throw new TypeError('Int value must be a finite integer');
|
|
92
|
+
}
|
|
93
|
+
if (value < INT32_MIN || value > INT32_MAX) {
|
|
94
|
+
throw new RangeError('Int value must be within int32 range');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
valueOf() { return this.value; }
|
|
98
|
+
[Symbol.toPrimitive](hint) { return hint === 'string' ? String(this.value) : this.value; }
|
|
99
|
+
toJSON() { return this.value; }
|
|
100
|
+
}
|
|
101
|
+
export class Float {
|
|
102
|
+
value;
|
|
103
|
+
type = 'float';
|
|
104
|
+
constructor(value) {
|
|
105
|
+
this.value = value;
|
|
106
|
+
if (typeof value !== 'number') {
|
|
107
|
+
throw new TypeError('Float value must be a number');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
valueOf() { return this.value; }
|
|
111
|
+
[Symbol.toPrimitive](hint) { return hint === 'string' ? String(this.value) : this.value; }
|
|
112
|
+
toJSON() { return this.value; }
|
|
113
|
+
}
|
|
114
|
+
export class Double {
|
|
115
|
+
value;
|
|
116
|
+
type = 'double';
|
|
117
|
+
constructor(value) {
|
|
118
|
+
this.value = value;
|
|
119
|
+
if (typeof value !== 'number') {
|
|
120
|
+
throw new TypeError('Double value must be a number');
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
valueOf() { return this.value; }
|
|
124
|
+
[Symbol.toPrimitive](hint) { return hint === 'string' ? String(this.value) : this.value; }
|
|
125
|
+
toJSON() { return this.value; }
|
|
126
|
+
}
|
|
127
|
+
export class Short {
|
|
128
|
+
value;
|
|
129
|
+
type = 'short';
|
|
130
|
+
constructor(value) {
|
|
131
|
+
this.value = value;
|
|
132
|
+
if (typeof value !== 'number') {
|
|
133
|
+
throw new TypeError('Short value must be a number');
|
|
134
|
+
}
|
|
135
|
+
if (!Number.isFinite(value) || !Number.isInteger(value)) {
|
|
136
|
+
throw new TypeError('Short value must be a finite integer');
|
|
137
|
+
}
|
|
138
|
+
if (value < -32768 || value > 32767) {
|
|
139
|
+
throw new RangeError('Short value must be within int16 range');
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
valueOf() { return this.value; }
|
|
143
|
+
[Symbol.toPrimitive](hint) { return hint === 'string' ? String(this.value) : this.value; }
|
|
144
|
+
toJSON() { return this.value; }
|
|
145
|
+
}
|
|
146
|
+
export class Byte {
|
|
147
|
+
value;
|
|
148
|
+
type = 'byte';
|
|
149
|
+
constructor(value) {
|
|
150
|
+
this.value = value;
|
|
151
|
+
if (typeof value !== 'number') {
|
|
152
|
+
throw new TypeError('Byte value must be a number');
|
|
153
|
+
}
|
|
154
|
+
if (!Number.isFinite(value) || !Number.isInteger(value)) {
|
|
155
|
+
throw new TypeError('Byte value must be a finite integer');
|
|
156
|
+
}
|
|
157
|
+
if (value < -128 || value > 127) {
|
|
158
|
+
throw new RangeError('Byte value must be within int8 range');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
valueOf() { return this.value; }
|
|
162
|
+
[Symbol.toPrimitive](hint) { return hint === 'string' ? String(this.value) : this.value; }
|
|
163
|
+
toJSON() { return this.value; }
|
|
164
|
+
}
|
|
165
|
+
export function toInt(value) { return new Int(value); }
|
|
166
|
+
export function toFloat(value) { return new Float(value); }
|
|
167
|
+
export function toDouble(value) { return new Double(value); }
|
|
168
|
+
export function toShort(value) { return new Short(value); }
|
|
169
|
+
export function toByte(value) { return new Byte(value); }
|
|
170
|
+
export function unwrap(value) {
|
|
171
|
+
if (value instanceof Long || value instanceof Int || value instanceof Float ||
|
|
172
|
+
value instanceof Double || value instanceof Short || value instanceof Byte) {
|
|
173
|
+
return value.value;
|
|
174
|
+
}
|
|
175
|
+
return value;
|
|
176
|
+
}
|
|
177
|
+
export function getUuid() {
|
|
178
|
+
return globalThis.crypto.randomUUID();
|
|
179
|
+
}
|
|
180
|
+
export const emptyArray = Object.freeze([]);
|
|
181
|
+
export class ImmutableMap extends Map {
|
|
182
|
+
constructor(iterable) {
|
|
183
|
+
super(iterable);
|
|
184
|
+
}
|
|
185
|
+
set() {
|
|
186
|
+
return this;
|
|
187
|
+
}
|
|
188
|
+
['delete']() {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
clear() { }
|
|
192
|
+
}
|
|
193
|
+
async function generateNodeUserAgent() {
|
|
194
|
+
const os = await import('node:os');
|
|
195
|
+
const applicationName = (process?.env.npm_package_name ?? 'NotAvailable').replace('_', ' ');
|
|
196
|
+
let runtimeVersion;
|
|
197
|
+
let osName;
|
|
198
|
+
let osVersion;
|
|
199
|
+
let cpuArch;
|
|
200
|
+
runtimeVersion = osName = osVersion = cpuArch = 'NotAvailable';
|
|
201
|
+
if (process != null) {
|
|
202
|
+
if (process.version) {
|
|
203
|
+
runtimeVersion = process.version.replace(' ', '_');
|
|
204
|
+
}
|
|
205
|
+
if (process.arch) {
|
|
206
|
+
cpuArch = process.arch.replace(' ', '_');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (os != null) {
|
|
210
|
+
osName = os.platform().replace(' ', '_');
|
|
211
|
+
osVersion = os.release().replace(' ', '_');
|
|
212
|
+
}
|
|
213
|
+
const userAgent = `${applicationName} Gremlin-Javascript.${gremlinVersion} ${runtimeVersion} ${osName}.${osVersion} ${cpuArch}`;
|
|
214
|
+
return userAgent;
|
|
215
|
+
}
|
|
216
|
+
export function getUserAgentHeader() {
|
|
217
|
+
return 'User-Agent';
|
|
218
|
+
}
|
|
219
|
+
export const getUserAgent = async () => {
|
|
220
|
+
if ('navigator' in globalThis) {
|
|
221
|
+
return globalThis.navigator.userAgent;
|
|
222
|
+
}
|
|
223
|
+
if (process?.versions?.node !== undefined) {
|
|
224
|
+
return await generateNodeUserAgent();
|
|
225
|
+
}
|
|
226
|
+
return undefined;
|
|
227
|
+
};
|
|
228
|
+
export const toArrayBuffer = (buffer) => buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength);
|
|
229
|
+
export const DeferredPromise = () => {
|
|
230
|
+
let resolve = (value) => { };
|
|
231
|
+
let reject = (reason) => { };
|
|
232
|
+
const promise = new Promise((_resolve, _reject) => {
|
|
233
|
+
resolve = _resolve;
|
|
234
|
+
reject = _reject;
|
|
235
|
+
});
|
|
236
|
+
return Object.assign(promise, { resolve, reject });
|
|
237
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gremlin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.3",
|
|
4
4
|
"description": "JavaScript Gremlin Language Variant",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Apache TinkerPop team"
|
|
@@ -17,28 +17,69 @@
|
|
|
17
17
|
"graphdb"
|
|
18
18
|
],
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "./build/cjs/index.cjs",
|
|
22
|
+
"types": "./build/esm/index.d.ts",
|
|
23
|
+
"browser": {
|
|
24
|
+
"./build/esm/driver/dispatcher.js": "./build/esm/driver/dispatcher.browser.js",
|
|
25
|
+
"./build/cjs/driver/dispatcher.cjs": "./build/cjs/driver/dispatcher.browser.cjs"
|
|
26
|
+
},
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./build/esm/index.js",
|
|
30
|
+
"require": "./build/cjs/index.cjs",
|
|
31
|
+
"types": "./build/esm/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./language": {
|
|
34
|
+
"import": "./build/esm/language/index.js",
|
|
35
|
+
"types": "./build/esm/language/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./io": {
|
|
38
|
+
"import": "./build/esm/structure/io/binary/GraphBinary.js",
|
|
39
|
+
"types": "./build/esm/structure/io/binary/GraphBinary.d.ts"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"typesVersions": {
|
|
43
|
+
"*": {
|
|
44
|
+
"language": [
|
|
45
|
+
"./build/esm/language/index.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"build"
|
|
51
|
+
],
|
|
20
52
|
"dependencies": {
|
|
53
|
+
"antlr4ng": "3.0.16",
|
|
21
54
|
"buffer": "^6.0.3",
|
|
22
55
|
"eventemitter3": "^5.0.1",
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
56
|
+
"undici": "6.27.0"
|
|
57
|
+
},
|
|
58
|
+
"optionalDependencies": {
|
|
59
|
+
"@aws-sdk/credential-providers": "^3.967.0",
|
|
60
|
+
"@smithy/hash-node": "^4.2.12",
|
|
61
|
+
"@smithy/signature-v4": "^5.3.12"
|
|
26
62
|
},
|
|
27
63
|
"devDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
64
|
+
"@cucumber/cucumber": "~13.0.0",
|
|
65
|
+
"@eslint/js": "^10.0.1",
|
|
66
|
+
"@knighted/duel": "^4.1.1",
|
|
67
|
+
"@tsconfig/node18": "^18.2.2",
|
|
68
|
+
"antlr-ng": "^1.0.10",
|
|
69
|
+
"chai": "^6.2.2",
|
|
70
|
+
"chai-string": "^2.0.0",
|
|
30
71
|
"colors": "1.4.0",
|
|
31
72
|
"cross-env": "^10.1.0",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"eslint": "^9.36.0",
|
|
73
|
+
"deep-eql": "^5.0.2",
|
|
74
|
+
"eslint": "^10.3.0",
|
|
35
75
|
"eslint-config-prettier": "^10.0.1",
|
|
36
76
|
"eslint-plugin-prettier": "^5.0.0",
|
|
37
|
-
"globals": "^
|
|
38
|
-
"jsdoc": "^4.0.5",
|
|
39
|
-
"js-yaml": "^3.14.2",
|
|
77
|
+
"globals": "^17.5.0",
|
|
40
78
|
"mocha": "^11.7.5",
|
|
41
|
-
"prettier": "^3.0.0"
|
|
79
|
+
"prettier": "^3.0.0",
|
|
80
|
+
"ts-node": "^10.9.2",
|
|
81
|
+
"typedoc": "^0.28.18",
|
|
82
|
+
"typescript": "~6.0.3"
|
|
42
83
|
},
|
|
43
84
|
"repository": {
|
|
44
85
|
"type": "git",
|
|
@@ -49,22 +90,26 @@
|
|
|
49
90
|
"url": "https://issues.apache.org/jira/browse/TINKERPOP"
|
|
50
91
|
},
|
|
51
92
|
"scripts": {
|
|
93
|
+
"generate": "mkdir -p lib/language/grammar && antlr-ng -Dlanguage=TypeScript -visitor --generate-listener --exact-output-dir -o lib/language/grammar ../../gremlin-language/src/main/antlr4/Gremlin.g4",
|
|
94
|
+
"prebuild": "node scripts/patch-antlr4ng.js && npm run generate",
|
|
95
|
+
"_prebuild_note": "patch-antlr4ng.js is a build-time stop-gap for antlr4ng missing .d.cts CJS type declarations (antlr4ng issues #23/#26). antlr4ng is pinned to an exact version in dependencies. Before upgrading antlr4ng, verify the patch still applies or that upstream has fixed the issue.",
|
|
96
|
+
"build": "rm -rf build && duel --dirs",
|
|
97
|
+
"prepare": "npm run generate && npm run build",
|
|
52
98
|
"test": "npm run unit-test && npm run integration-test",
|
|
53
|
-
"unit-test": "mocha test/unit
|
|
54
|
-
"integration-test": "npm run integration-test-
|
|
55
|
-
"integration-test-
|
|
56
|
-
"integration-test-graphbinary": "cross-env CLIENT_MIMETYPE='application/vnd.graphbinary-v1.0' ./node_modules/mocha/bin/mocha.js test/integration -t 5000",
|
|
99
|
+
"unit-test": "cross-env TS_NODE_PROJECT='tsconfig.test.json' mocha 'test/unit/**/*.{js,ts}'",
|
|
100
|
+
"integration-test": "npm run integration-test-graphbinary",
|
|
101
|
+
"integration-test-graphbinary": "cross-env TS_NODE_PROJECT='tsconfig.test.json' CLIENT_MIMETYPE='application/vnd.graphbinary-v4.0' mocha test/integration -t 5000",
|
|
57
102
|
"TODO": "# test other mime types like graphbinary stringd",
|
|
58
|
-
"features": "npm run features-
|
|
59
|
-
"features-
|
|
60
|
-
"features-graphbinary": "cross-env CLIENT_MIMETYPE='application/vnd.graphbinary-
|
|
61
|
-
"features-docker": "npm run features-
|
|
62
|
-
"features-
|
|
63
|
-
"features-graphbinary-docker": "cross-env CLIENT_MIMETYPE='application/vnd.graphbinary-
|
|
64
|
-
"lint": "eslint .",
|
|
65
|
-
"doc": "
|
|
103
|
+
"features": "npm run features-graphbinary && npm run features-graphbinary-params",
|
|
104
|
+
"features-graphbinary": "cross-env NODE_OPTIONS='--loader ts-node/esm' TS_NODE_PROJECT='tsconfig.test.json' CLIENT_MIMETYPE='application/vnd.graphbinary-v4.0' cucumber-js --tags \"not @DataBigDecimal and not @DataBigInt and not @DataUUID and not @DataLong and not @StepWrite\" --import test/cucumber ../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/",
|
|
105
|
+
"features-graphbinary-params": "cross-env NODE_OPTIONS='--loader ts-node/esm' TS_NODE_PROJECT='tsconfig.test.json' CLIENT_MIMETYPE='application/vnd.graphbinary-v4.0' PARAMETERIZE=true cucumber-js --tags \"not @DataBigDecimal and not @DataBigInt and not @DataUUID and not @DataLong and not @StepWrite\" --import test/cucumber ../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/",
|
|
106
|
+
"features-docker": "npm run features-graphbinary-docker && npm run features-graphbinary-params-docker",
|
|
107
|
+
"features-graphbinary-docker": "cross-env NODE_OPTIONS='--loader ts-node/esm' TS_NODE_PROJECT='tsconfig.test.json' CLIENT_MIMETYPE='application/vnd.graphbinary-v4.0' cucumber-js --tags \"not @DataBigDecimal and not @DataBigInt and not @DataUUID and not @DataLong and not @StepWrite\" --import test/cucumber /gremlin-test/",
|
|
108
|
+
"features-graphbinary-params-docker": "cross-env NODE_OPTIONS='--loader ts-node/esm' TS_NODE_PROJECT='tsconfig.test.json' CLIENT_MIMETYPE='application/vnd.graphbinary-v4.0' PARAMETERIZE=true cucumber-js --tags \"not @DataBigDecimal and not @DataBigInt and not @DataUUID and not @DataLong and not @StepWrite\" --import test/cucumber /gremlin-test/",
|
|
109
|
+
"lint": "eslint --ext .js .",
|
|
110
|
+
"doc": "typedoc --out doc --readme README.md --entryPointStrategy expand --entryPoints 'lib/**/*.ts' --tsconfig tsconfig.json --exclude 'lib/language/grammar/**'"
|
|
66
111
|
},
|
|
67
112
|
"engines": {
|
|
68
|
-
"node": ">=
|
|
113
|
+
"node": ">=22"
|
|
69
114
|
}
|
|
70
115
|
}
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18
|