aerospike 5.12.1 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +3 -3
  2. package/benchmarks/alerts.js +1 -1
  3. package/benchmarks/inspect.js +1 -1
  4. package/benchmarks/logging.js +1 -1
  5. package/benchmarks/main.js +1 -1
  6. package/benchmarks/memory.js +1 -1
  7. package/benchmarks/stats.js +1 -1
  8. package/benchmarks/worker.js +1 -1
  9. package/examples/add.js +1 -1
  10. package/examples/append.js +1 -1
  11. package/examples/apply.js +1 -1
  12. package/examples/batch.js +1 -1
  13. package/examples/exists.js +1 -1
  14. package/examples/geospatialMonteCarlo.js +1 -1
  15. package/examples/get.js +1 -1
  16. package/examples/info.js +1 -1
  17. package/examples/operate.js +1 -1
  18. package/examples/put.js +1 -1
  19. package/examples/query.js +1 -1
  20. package/examples/remove.js +1 -1
  21. package/examples/run.js +1 -1
  22. package/examples/scan.js +1 -1
  23. package/examples/sindex.js +1 -1
  24. package/examples/udf.js +1 -1
  25. package/lib/aerospike.js +30 -2
  26. package/lib/batch_type.js +4 -4
  27. package/lib/bigint.js +1 -1
  28. package/lib/binding/glibc@2.31/node-v108-linux-arm64/aerospike.node +0 -0
  29. package/lib/binding/glibc@2.31/node-v108-linux-x64/aerospike.node +0 -0
  30. package/lib/binding/glibc@2.31/node-v115-linux-arm64/aerospike.node +0 -0
  31. package/lib/binding/glibc@2.31/node-v115-linux-x64/aerospike.node +0 -0
  32. package/lib/binding/glibc@2.31/node-v127-linux-arm64/aerospike.node +0 -0
  33. package/lib/binding/glibc@2.31/node-v127-linux-x64/aerospike.node +0 -0
  34. package/lib/binding/{glibc@2.39/node-v127-linux-arm64 → glibc@2.31/node-v131-linux-arm64}/aerospike.node +0 -0
  35. package/lib/binding/{glibc@2.39/node-v127-linux-x64 → glibc@2.31/node-v131-linux-x64}/aerospike.node +0 -0
  36. package/lib/binding/glibc@2.35/node-v108-linux-arm64/aerospike.node +0 -0
  37. package/lib/binding/glibc@2.35/node-v108-linux-x64/aerospike.node +0 -0
  38. package/lib/binding/glibc@2.35/node-v115-linux-arm64/aerospike.node +0 -0
  39. package/lib/binding/glibc@2.35/node-v115-linux-x64/aerospike.node +0 -0
  40. package/lib/binding/glibc@2.35/node-v127-linux-arm64/aerospike.node +0 -0
  41. package/lib/binding/glibc@2.35/node-v127-linux-x64/aerospike.node +0 -0
  42. package/lib/binding/{glibc@2.39/node-v115-linux-x64 → glibc@2.35/node-v131-linux-arm64}/aerospike.node +0 -0
  43. package/lib/binding/{glibc@2.39/node-v115-linux-arm64 → glibc@2.35/node-v131-linux-x64}/aerospike.node +0 -0
  44. package/lib/binding/node-v108-darwin-arm64/aerospike.node +0 -0
  45. package/lib/binding/node-v108-darwin-x64/aerospike.node +0 -0
  46. package/lib/binding/node-v108-win32-x64/aerospike.dll +0 -0
  47. package/lib/binding/node-v108-win32-x64/aerospike.node +0 -0
  48. package/lib/binding/node-v108-win32-x64/event_core.dll +0 -0
  49. package/lib/binding/node-v108-win32-x64/getopt.dll +0 -0
  50. package/lib/binding/node-v108-win32-x64/libeay32.dll +0 -0
  51. package/lib/binding/node-v108-win32-x64/pthreadVC2.dll +0 -0
  52. package/lib/binding/node-v108-win32-x64/ssleay32.dll +0 -0
  53. package/lib/binding/node-v108-win32-x64/zlib.dll +0 -0
  54. package/lib/binding/node-v115-darwin-arm64/aerospike.node +0 -0
  55. package/lib/binding/node-v115-darwin-x64/aerospike.node +0 -0
  56. package/lib/binding/node-v115-win32-x64/aerospike.dll +0 -0
  57. package/lib/binding/node-v115-win32-x64/aerospike.node +0 -0
  58. package/lib/binding/node-v115-win32-x64/event_core.dll +0 -0
  59. package/lib/binding/node-v115-win32-x64/getopt.dll +0 -0
  60. package/lib/binding/node-v115-win32-x64/libeay32.dll +0 -0
  61. package/lib/binding/node-v115-win32-x64/pthreadVC2.dll +0 -0
  62. package/lib/binding/node-v115-win32-x64/ssleay32.dll +0 -0
  63. package/lib/binding/node-v115-win32-x64/zlib.dll +0 -0
  64. package/lib/binding/node-v127-darwin-arm64/aerospike.node +0 -0
  65. package/lib/binding/node-v127-darwin-x64/aerospike.node +0 -0
  66. package/lib/binding/node-v127-win32-x64/aerospike.dll +0 -0
  67. package/lib/binding/node-v127-win32-x64/aerospike.node +0 -0
  68. package/lib/binding/node-v127-win32-x64/event_core.dll +0 -0
  69. package/lib/binding/node-v127-win32-x64/getopt.dll +0 -0
  70. package/lib/binding/node-v127-win32-x64/libeay32.dll +0 -0
  71. package/lib/binding/node-v127-win32-x64/pthreadVC2.dll +0 -0
  72. package/lib/binding/node-v127-win32-x64/ssleay32.dll +0 -0
  73. package/lib/binding/node-v127-win32-x64/zlib.dll +0 -0
  74. package/lib/binding/node-v131-darwin-arm64/aerospike.node +0 -0
  75. package/lib/binding/node-v131-darwin-x64/aerospike.node +0 -0
  76. package/lib/binding/node-v131-win32-x64/aerospike.dll +0 -0
  77. package/lib/binding/node-v131-win32-x64/aerospike.node +0 -0
  78. package/lib/binding/node-v131-win32-x64/event_core.dll +0 -0
  79. package/lib/binding/node-v131-win32-x64/getopt.dll +0 -0
  80. package/lib/binding/node-v131-win32-x64/libeay32.dll +0 -0
  81. package/lib/binding/node-v131-win32-x64/pthreadVC2.dll +0 -0
  82. package/lib/binding/node-v131-win32-x64/ssleay32.dll +0 -0
  83. package/lib/binding/node-v131-win32-x64/zlib.dll +0 -0
  84. package/lib/bitwise.js +1 -1
  85. package/lib/client.js +12 -2
  86. package/lib/commands/batch_command.js +4 -3
  87. package/lib/commands/command.js +1 -1
  88. package/lib/commands/connect_command.js +1 -1
  89. package/lib/commands/exists_command.js +21 -2
  90. package/lib/commands/index.js +1 -1
  91. package/lib/commands/query_background_command.js +1 -1
  92. package/lib/commands/read_record_command.js +1 -1
  93. package/lib/commands/stream_command.js +1 -1
  94. package/lib/commands/write_record_command.js +1 -1
  95. package/lib/config.js +1 -1
  96. package/lib/double.js +1 -1
  97. package/lib/error.js +1 -1
  98. package/lib/event_loop.js +1 -1
  99. package/lib/exp_lists.js +8 -1
  100. package/lib/exp_maps.js +11 -2
  101. package/lib/exp_operations.js +0 -2
  102. package/lib/filter.js +1 -1
  103. package/lib/geojson.js +1 -1
  104. package/lib/index_job.js +1 -1
  105. package/lib/info.js +1 -1
  106. package/lib/job.js +1 -1
  107. package/lib/key.js +1 -1
  108. package/lib/lists.js +1 -1
  109. package/lib/maps.js +1 -1
  110. package/lib/policies/apply_policy.js +1 -1
  111. package/lib/policies/base_policy.js +1 -1
  112. package/lib/policies/batch_policy.js +1 -1
  113. package/lib/policies/command_queue_policy.js +1 -1
  114. package/lib/policies/info_policy.js +1 -1
  115. package/lib/policies/map_policy.js +1 -1
  116. package/lib/policies/operate_policy.js +1 -1
  117. package/lib/policies/query_policy.js +1 -1
  118. package/lib/policies/read_policy.js +1 -1
  119. package/lib/policies/remove_policy.js +1 -1
  120. package/lib/policies/scan_policy.js +1 -1
  121. package/lib/policies/write_policy.js +1 -1
  122. package/lib/policy.js +18 -12
  123. package/lib/query.js +2 -2
  124. package/lib/record.js +1 -1
  125. package/lib/record_stream.js +1 -1
  126. package/lib/scan.js +2 -2
  127. package/lib/status.js +14 -2
  128. package/lib/typedefs.js +1 -1
  129. package/lib/udf_job.js +1 -1
  130. package/lib/utils.js +1 -1
  131. package/package.json +15 -6
  132. package/scripts/build-package.ps1 +8 -8
  133. package/scripts/build-package.sh +1 -1
  134. package/scripts/prebuiltBinding.js +47 -41
  135. package/src/main/enums/status.cc +1 -0
  136. package/test/admin.js +1 -1
  137. package/test/aerospike.js +1 -1
  138. package/test/apply.js +1 -1
  139. package/test/batch_exists.js +1 -1
  140. package/test/batch_get.js +1 -1
  141. package/test/batch_read.js +1 -1
  142. package/test/batch_select.js +1 -1
  143. package/test/bigint.js +1 -1
  144. package/test/cdt_context.js +1 -1
  145. package/test/client.js +1 -1
  146. package/test/command.js +1 -1
  147. package/test/command_queue.js +1 -1
  148. package/test/config.js +1 -1
  149. package/test/double.js +1 -1
  150. package/test/enterprise.js +1 -1
  151. package/test/error.js +1 -1
  152. package/test/exists.js +1 -1
  153. package/test/exp.js +2 -2
  154. package/test/generators/key.js +1 -1
  155. package/test/generators/metadata.js +1 -1
  156. package/test/generators/put.js +1 -1
  157. package/test/generators/record.js +1 -1
  158. package/test/generators/util.js +1 -1
  159. package/test/generators/value.js +1 -1
  160. package/test/geojson.js +1 -1
  161. package/test/get.js +1 -1
  162. package/test/index.js +1 -1
  163. package/test/index_job.js +1 -1
  164. package/test/info.js +1 -1
  165. package/test/key.js +1 -1
  166. package/test/lists.js +1 -1
  167. package/test/maps.js +1 -1
  168. package/test/operate.js +1 -1
  169. package/test/policy.js +1 -1
  170. package/test/put.js +1 -1
  171. package/test/query.js +1 -1
  172. package/test/remove.js +1 -1
  173. package/test/remove_bin.js +1 -1
  174. package/test/scan.js +1 -1
  175. package/test/select.js +1 -1
  176. package/test/stress/perfdata.js +1 -1
  177. package/test/stress/query.js +1 -1
  178. package/test/stress/scan.js +1 -1
  179. package/test/test_helper.js +1 -1
  180. package/test/truncate.js +1 -1
  181. package/test/udf.js +1 -1
  182. package/test/util/options.js +1 -1
  183. package/test/util/run_in_new_process.js +1 -1
  184. package/test/util/statefulAsyncTest.js +1 -1
  185. package/test/utils.js +1 -1
  186. package/typings/index.d.ts +16173 -1930
  187. package/lib/binding/glibc@2.39/node-v108-linux-arm64/aerospike.node +0 -0
  188. package/lib/binding/glibc@2.39/node-v108-linux-x64/aerospike.node +0 -0
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/double.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/error.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/event_loop.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/exp_lists.js CHANGED
@@ -26,6 +26,10 @@ const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
26
26
  *********************************************************************************/
27
27
 
28
28
  function getListType (type, returnType, isMulti) {
29
+ if (!Object.values(exp.type).includes(type)) {
30
+ throw new TypeError('invalid value for valueType parameter')
31
+ }
32
+
29
33
  let expected = type
30
34
 
31
35
  switch (returnType & ~lists.returnType.INVERTED) {
@@ -43,9 +47,12 @@ function getListType (type, returnType, isMulti) {
43
47
  expected = exp.type.LIST
44
48
  }
45
49
  break
50
+ case lists.returnType.EXISTS:
51
+ expected = exp.type.BOOL
52
+ break
46
53
  case lists.returnType.NONE:
47
54
  default:
48
- throw new TypeError('either set the value type as auto or match with return object data type')
55
+ throw new TypeError('either set the return type as auto or match with return object data type')
49
56
  }
50
57
 
51
58
  if (type === exp.type.AUTO || type === expected) {
package/lib/exp_maps.js CHANGED
@@ -11,6 +11,10 @@ const _rtype = _valueExp(exp.ops.VAL_RTYPE, 'intVal')
11
11
  *********************************************************************************/
12
12
 
13
13
  function getMapType (type, returnType, isMulti) {
14
+ if (!Object.values(exp.type).includes(type)) {
15
+ throw new TypeError('invalid value for valueType parameter')
16
+ }
17
+
14
18
  let expected = type
15
19
 
16
20
  switch (returnType & ~maps.returnType.INVERTED) {
@@ -29,15 +33,20 @@ function getMapType (type, returnType, isMulti) {
29
33
  expected = exp.type.LIST
30
34
  }
31
35
  break
36
+ case maps.returnType.EXISTS:
37
+ expected = exp.type.BOOL
38
+ break
32
39
  case maps.returnType.KEY_VALUE:
40
+ case maps.returnType.ORDERED_MAP:
41
+ case maps.returnType.UNORDERED_MAP:
33
42
  expected = exp.type.MAP
34
43
  break
35
44
  case maps.returnType.NONE:
36
45
  default:
37
- throw new TypeError('either set the value type as auto or match with return object data type')
46
+ throw new TypeError('either set the return type as auto or match with return object data type')
38
47
  }
39
48
 
40
- if (type === exp.type.AUTO || type === expected) {
49
+ if ((type === exp.type.AUTO || type === expected)) {
41
50
  return expected
42
51
  }
43
52
 
@@ -109,8 +109,6 @@ exports.read = function (bin, exp, flags) {
109
109
  * @summary Update the value of the bin.
110
110
  *
111
111
  * @param {string} bin - The name of the bin.
112
- * @param {any} value - The value to set the bin to.
113
- * @param {string} binName - The variable name of read expression result. This name can be used as the bin name when retrieving bin results from the record.
114
112
  * @param {AerospikeExp} exp - The expression to evaluate
115
113
  * @param flags - Expression write flags. <code>flags</code> must be an integer. See {@link exp.expWriteFlags} for more information.
116
114
  * @returns {Operation} Operation that can be passed to the {@link Client#operate} command.
package/lib/filter.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/geojson.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/index_job.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the 'License')
5
5
  // you may not use this file except in compliance with the License.
package/lib/info.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the 'License')
5
5
  // you may not use this file except in compliance with the License.
package/lib/job.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/key.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/lists.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/maps.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/policy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -17,27 +17,27 @@
17
17
  'use strict'
18
18
 
19
19
  const as = require('bindings')('aerospike.node')
20
-
21
- const BasePolicy = require('./policies/base_policy')
20
+ const AdminPolicy = require('./policies/admin_policy')
22
21
  const ApplyPolicy = require('./policies/apply_policy')
23
- const OperatePolicy = require('./policies/operate_policy')
24
- const QueryPolicy = require('./policies/query_policy')
25
- const ReadPolicy = require('./policies/read_policy')
26
- const RemovePolicy = require('./policies/remove_policy')
27
- const ScanPolicy = require('./policies/scan_policy')
28
- const WritePolicy = require('./policies/write_policy')
29
- const BatchPolicy = require('./policies/batch_policy')
22
+ const BasePolicy = require('./policies/base_policy')
30
23
  const BatchApplyPolicy = require('./policies/batch_apply_policy')
24
+ const BatchPolicy = require('./policies/batch_policy')
31
25
  const BatchReadPolicy = require('./policies/batch_read_policy')
32
26
  const BatchRemovePolicy = require('./policies/batch_remove_policy')
33
27
  const BatchWritePolicy = require('./policies/batch_write_policy')
34
-
28
+ const BitwisePolicy = require('./policies/bitwise_policy')
35
29
  const CommandQueuePolicy = require('./policies/command_queue_policy')
36
30
  const HLLPolicy = require('./policies/hll_policy')
37
31
  const InfoPolicy = require('./policies/info_policy')
38
32
  const ListPolicy = require('./policies/list_policy')
39
33
  const MapPolicy = require('./policies/map_policy')
40
- const AdminPolicy = require('./policies/admin_policy')
34
+ const OperatePolicy = require('./policies/operate_policy')
35
+ const QueryPolicy = require('./policies/query_policy')
36
+ const ReadPolicy = require('./policies/read_policy')
37
+ const RemovePolicy = require('./policies/remove_policy')
38
+ const ScanPolicy = require('./policies/scan_policy')
39
+ const WritePolicy = require('./policies/write_policy')
40
+
41
41
  /**
42
42
  * @module aerospike/policy
43
43
  *
@@ -395,6 +395,12 @@ exports.BatchRemovePolicy = BatchRemovePolicy
395
395
  */
396
396
  exports.BatchWritePolicy = BatchWritePolicy
397
397
 
398
+ /**
399
+ * A policy affecting the behavior of batchWrite operations.
400
+ *
401
+ * @summary {@link BitwisePolicy} class
402
+ */
403
+ exports.BitwisePolicy = BitwisePolicy
398
404
  /**
399
405
  * A policy affecting the use of the global command queue.
400
406
  *
package/lib/query.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -405,7 +405,7 @@ function Query (client, ns, set, options) {
405
405
  * 0 (defined Aerospike.ttl.NAMESPACE_DEFAULT), which means that the
406
406
  * record will adopt the default TTL value from the namespace.
407
407
  *
408
- * -1 (defined Aerospike.ttl.NEVER_EXIRE), which means that the record
408
+ * -1 (defined Aerospike.ttl.NEVER_EXPIRE), which means that the record
409
409
  * will get an internal "void_time" of zero, and thus will never expire.
410
410
  *
411
411
  * -2 (defined Aerospike.ttl.DONT_UPDATE), which means that the record
package/lib/record.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/scan.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
@@ -299,7 +299,7 @@ function Scan (client, ns, set, options) {
299
299
  * 0 (defined Aerospike.ttl.NAMESPACE_DEFAULT), which means that the
300
300
  * record will adopt the default TTL value from the namespace.
301
301
  *
302
- * -1 (defined Aerospike.ttl.NEVER_EXIRE), which means that the record
302
+ * -1 (defined Aerospike.ttl.NEVER_EXPIRE), which means that the record
303
303
  * will get an internal "void_time" of zero, and thus will never expire.
304
304
  *
305
305
  * -2 (defined Aerospike.ttl.DONT_UPDATE), which means that the record
package/lib/status.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the 'License')
5
5
  // you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ exports.ERR_ASYNC_QUEUE_FULL = exports.AEROSPIKE_ERR_ASYNC_QUEUE_FULL = as.statu
67
67
  */
68
68
  exports.ERR_CONNECTION = exports.AEROSPIKE_ERR_CONNECTION = as.status.AEROSPIKE_ERR_CONNECTION
69
69
 
70
+ /**
71
+ * TLS related error
72
+ * @const {number}
73
+ */
74
+ exports.ERR_TLS_ERROR = exports.AEROSPIKE_ERR_TLS_ERROR = as.status.AEROSPIKE_ERR_TLS_ERROR
75
+
70
76
  /**
71
77
  * Node invalid or could not be found.
72
78
  * @const {number}
@@ -375,6 +381,12 @@ exports.FORBIDDEN_PASSWORD = exports.AEROSPIKE_FORBIDDEN_PASSWORD = as.status.AE
375
381
  */
376
382
  exports.INVALID_CREDENTIAL = exports.AEROSPIKE_INVALID_CREDENTIAL = as.status.AEROSPIKE_INVALID_CREDENTIAL
377
383
 
384
+ /**
385
+ * Login session expired.
386
+ * @const {number}
387
+ */
388
+ exports.EXPIRED_SESSION = exports.AEROSPIKE_EXPIRED_SESSION = as.status.AEROSPIKE_EXPIRED_SESSION
389
+
378
390
  /**
379
391
  * Role name is invalid.
380
392
  * @const {number}
@@ -536,7 +548,7 @@ exports.ERR_LUA_FILE_NOT_FOUND = exports.AEROSPIKE_ERR_LUA_FILE_NOT_FOUND = as.s
536
548
  // ========================================================================
537
549
 
538
550
  /**
539
- * Prodeces a human-readable error message for the given status code.
551
+ * Produces a human-readable error message for the given status code.
540
552
  */
541
553
  exports.getMessage = function (code) {
542
554
  /* istanbul ignore next */
package/lib/typedefs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/lib/udf_job.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the 'License')
5
5
  // you may not use this file except in compliance with the License.
package/lib/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // *****************************************************************************
2
- // Copyright 2013-2023 Aerospike, Inc.
2
+ // Copyright 2013-2024 Aerospike, Inc.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License")
5
5
  // you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aerospike",
3
- "version": "5.12.1",
3
+ "version": "5.13.0",
4
4
  "description": "Aerospike Client Library",
5
5
  "keywords": [
6
6
  "aerospike",
@@ -41,34 +41,39 @@
41
41
  "preinstall": "npm install @mapbox/node-pre-gyp",
42
42
  "install": "npm-run-all removeExtraBinaries build",
43
43
  "build": "node-pre-gyp install --fallback-to-build",
44
- "test": "mocha",
44
+ "test": "rm -rf ts-test/dist; cd ts-test; npx tsc ; cp tests/udf.lua dist/udf.lua ; mocha",
45
45
  "test-dry-run": "mocha --dry-run",
46
46
  "test-noserver": "GLOBAL_CLIENT=false mocha -g '#noserver'",
47
47
  "lint": "standard",
48
48
  "posttest": "npm run lint",
49
49
  "coverage": "nyc npm test && nyc --reporter=lcov report",
50
50
  "codecov": "codecov",
51
- "prepush": "npm test",
51
+ "prepush": "npm run test dist",
52
52
  "apidocs": "jsdoc -c jsdoc.json",
53
+ "build-docs": "npx typedoc --plugin typedoc-plugin-rename-defaults --entryPointStrategy expand typings/index.d.ts",
53
54
  "cppcheck": "cppcheck --quiet --enable=warning,style -I src/include src/main/",
54
55
  "valgrind": "valgrind node ./node_modules/mocha/bin/_mocha -R dot -g '#slow' -i",
55
56
  "prepare": "husky install",
56
57
  "removeExtraBinaries": "node ./scripts/prebuiltBinding.js"
57
58
  },
58
59
  "dependencies": {
59
- "@mapbox/node-pre-gyp": "^1.0.11",
60
+ "ansi-colors": "^4.1.3",
60
61
  "bindings": "^1.5.0",
61
62
  "minimatch": "^3.1.2",
62
- "nan": "^2.19.0",
63
+ "nan": "^2.22.0",
63
64
  "node-gyp": "^10.1.0",
64
65
  "npm-run-all": "^4.1.5"
65
66
  },
66
67
  "devDependencies": {
67
- "@types/node": "^20.12.7",
68
+ "@eslint/js": "^9.12.0",
69
+ "@mapbox/node-pre-gyp": "^1.0.11",
70
+ "@types/node": "^22.7.4",
68
71
  "chai": "^4.4.1",
69
72
  "choma": "^1.2.1",
70
73
  "codecov": "^3.8.3",
71
74
  "deep-eql": "^4.1.3",
75
+ "eslint": "^8.57.1",
76
+ "globals": "^15.11.0",
72
77
  "husky": "^9.0.11",
73
78
  "mocha": "^10.4.0",
74
79
  "mocha-clean": "^1.0.0",
@@ -77,6 +82,10 @@
77
82
  "semver": "^7.6.0",
78
83
  "standard": "^17.1.0",
79
84
  "tmp": "^0.2.3",
85
+ "typedoc": "^0.26.7",
86
+ "typedoc-plugin-rename-defaults": "^0.7.1",
87
+ "typescript": "^5.6.2",
88
+ "typescript-eslint": "^8.8.1",
80
89
  "yargs": "^17.7.2"
81
90
  },
82
91
  "standard": {
@@ -48,13 +48,6 @@ Remove-Item .\lib\binding\node-v115-win32-x64\aerospike.pdb
48
48
  Remove-Item .\lib\binding\node-v115-win32-x64\aerospike.ipdb
49
49
  Remove-Item .\lib\binding\node-v115-win32-x64\aerospike.iobj
50
50
 
51
- build_nodejs_client v21
52
- Copy-Item -Recurse build\release\* lib\binding\node-v120-win32-x64
53
- Remove-Item -Recurse .\lib\binding\node-v120-win32-x64\obj
54
- Remove-Item .\lib\binding\node-v120-win32-x64\aerospike.pdb
55
- Remove-Item .\lib\binding\node-v120-win32-x64\aerospike.ipdb
56
- Remove-Item .\lib\binding\node-v120-win32-x64\aerospike.iobj
57
-
58
51
  build_nodejs_client v22
59
52
  Copy-Item -Recurse build\release\* lib\binding\node-v127-win32-x64
60
53
  Remove-Item -Recurse .\lib\binding\node-v127-win32-x64\obj
@@ -62,4 +55,11 @@ Remove-Item .\lib\binding\node-v127-win32-x64\aerospike.pdb
62
55
  Remove-Item .\lib\binding\node-v127-win32-x64\aerospike.ipdb
63
56
  Remove-Item .\lib\binding\node-v127-win32-x64\aerospike.iobj
64
57
 
65
- nvm use v18.12.1
58
+ build_nodejs_client v23
59
+ Copy-Item -Recurse build\release\* lib\binding\node-v131-win32-x64
60
+ Remove-Item -Recurse .\lib\binding\node-v131-win32-x64\obj
61
+ Remove-Item .\lib\binding\node-v131-win32-x64\aerospike.pdb
62
+ Remove-Item .\lib\binding\node-v131-win32-x64\aerospike.ipdb
63
+ Remove-Item .\lib\binding\node-v131-win32-x64\aerospike.iobj
64
+
65
+ nvm use v23.0.0
@@ -56,8 +56,8 @@ rm -rf ${AEROSPIKE_NODEJS_RELEASE_HOME}/node-*-${OS_FLAVOR}-*
56
56
 
57
57
  build_nodejs_client v18
58
58
  build_nodejs_client v20
59
- build_nodejs_client v21
60
59
  build_nodejs_client v22
60
+ build_nodejs_client v23
61
61
 
62
62
  nvm use v22
63
63