@jsonjoy.com/json-pack 1.21.0 → 17.59.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 (323) hide show
  1. package/lib/JsonPackExtension.d.ts +8 -0
  2. package/lib/JsonPackExtension.js +8 -0
  3. package/lib/JsonPackExtension.js.map +1 -1
  4. package/lib/JsonPackMpint.d.ts +25 -0
  5. package/lib/JsonPackMpint.js +31 -1
  6. package/lib/JsonPackMpint.js.map +1 -1
  7. package/lib/JsonPackValue.d.ts +10 -0
  8. package/lib/JsonPackValue.js +10 -0
  9. package/lib/JsonPackValue.js.map +1 -1
  10. package/lib/avro/AvroDecoder.d.ts +67 -0
  11. package/lib/avro/AvroDecoder.js +77 -5
  12. package/lib/avro/AvroDecoder.js.map +1 -1
  13. package/lib/avro/AvroEncoder.d.ts +71 -0
  14. package/lib/avro/AvroEncoder.js +90 -12
  15. package/lib/avro/AvroEncoder.js.map +1 -1
  16. package/lib/avro/AvroSchemaDecoder.d.ts +53 -0
  17. package/lib/avro/AvroSchemaDecoder.js +60 -3
  18. package/lib/avro/AvroSchemaDecoder.js.map +1 -1
  19. package/lib/avro/AvroSchemaEncoder.d.ts +65 -0
  20. package/lib/avro/AvroSchemaEncoder.js +84 -5
  21. package/lib/avro/AvroSchemaEncoder.js.map +1 -1
  22. package/lib/avro/AvroSchemaValidator.d.ts +10 -0
  23. package/lib/avro/AvroSchemaValidator.js +18 -1
  24. package/lib/avro/AvroSchemaValidator.js.map +1 -1
  25. package/lib/avro/types.d.ts +31 -0
  26. package/lib/avro/types.js +4 -0
  27. package/lib/avro/types.js.map +1 -1
  28. package/lib/bencode/BencodeDecoder.js +9 -9
  29. package/lib/bencode/BencodeDecoder.js.map +1 -1
  30. package/lib/bencode/BencodeEncoder.d.ts +5 -0
  31. package/lib/bencode/BencodeEncoder.js +25 -20
  32. package/lib/bencode/BencodeEncoder.js.map +1 -1
  33. package/lib/bson/BsonDecoder.js +48 -33
  34. package/lib/bson/BsonDecoder.js.map +1 -1
  35. package/lib/bson/BsonEncoder.js +11 -3
  36. package/lib/bson/BsonEncoder.js.map +1 -1
  37. package/lib/cbor/CborDecoder.d.ts +24 -0
  38. package/lib/cbor/CborDecoder.js +94 -56
  39. package/lib/cbor/CborDecoder.js.map +1 -1
  40. package/lib/cbor/CborDecoderBase.d.ts +1 -0
  41. package/lib/cbor/CborDecoderBase.js +63 -53
  42. package/lib/cbor/CborDecoderBase.js.map +1 -1
  43. package/lib/cbor/CborEncoder.d.ts +5 -0
  44. package/lib/cbor/CborEncoder.js +9 -3
  45. package/lib/cbor/CborEncoder.js.map +1 -1
  46. package/lib/cbor/CborEncoderFast.d.ts +7 -0
  47. package/lib/cbor/CborEncoderFast.js +22 -14
  48. package/lib/cbor/CborEncoderFast.js.map +1 -1
  49. package/lib/cbor/CborEncoderStable.d.ts +1 -0
  50. package/lib/cbor/CborEncoderStable.js +2 -1
  51. package/lib/cbor/CborEncoderStable.js.map +1 -1
  52. package/lib/cbor/shared.d.ts +1 -1
  53. package/lib/codecs/Codecs.d.ts +1 -1
  54. package/lib/codecs/cbor.js +1 -1
  55. package/lib/codecs/cbor.js.map +1 -1
  56. package/lib/codecs/json.js +1 -1
  57. package/lib/codecs/json.js.map +1 -1
  58. package/lib/codecs/msgpack.js +1 -1
  59. package/lib/codecs/msgpack.js.map +1 -1
  60. package/lib/ejson/EjsonDecoder.d.ts +5 -0
  61. package/lib/ejson/EjsonDecoder.js +72 -37
  62. package/lib/ejson/EjsonDecoder.js.map +1 -1
  63. package/lib/ejson/EjsonEncoder.d.ts +5 -0
  64. package/lib/ejson/EjsonEncoder.js +149 -114
  65. package/lib/ejson/EjsonEncoder.js.map +1 -1
  66. package/lib/ejson/index.js +1 -0
  67. package/lib/ejson/index.js.map +1 -1
  68. package/lib/ion/Import.d.ts +1 -1
  69. package/lib/ion/Import.js.map +1 -1
  70. package/lib/ion/IonDecoder.d.ts +0 -1
  71. package/lib/ion/IonDecoder.js +4 -3
  72. package/lib/ion/IonDecoder.js.map +1 -1
  73. package/lib/ion/IonDecoderBase.js +29 -18
  74. package/lib/ion/IonDecoderBase.js.map +1 -1
  75. package/lib/ion/IonEncoderFast.d.ts +1 -1
  76. package/lib/ion/IonEncoderFast.js +30 -30
  77. package/lib/ion/IonEncoderFast.js.map +1 -1
  78. package/lib/ion/ast.d.ts +4 -1
  79. package/lib/ion/symbols.d.ts +1 -1
  80. package/lib/json/JsonDecoder.js +72 -66
  81. package/lib/json/JsonDecoder.js.map +1 -1
  82. package/lib/json/JsonDecoderDag.js +14 -0
  83. package/lib/json/JsonDecoderDag.js.map +1 -1
  84. package/lib/json/JsonDecoderPartial.d.ts +22 -0
  85. package/lib/json/JsonDecoderPartial.js +30 -8
  86. package/lib/json/JsonDecoderPartial.js.map +1 -1
  87. package/lib/json/JsonEncoder.d.ts +5 -0
  88. package/lib/json/JsonEncoder.js +59 -51
  89. package/lib/json/JsonEncoder.js.map +1 -1
  90. package/lib/json/JsonEncoderDag.d.ts +17 -0
  91. package/lib/json/JsonEncoderDag.js +27 -10
  92. package/lib/json/JsonEncoderDag.js.map +1 -1
  93. package/lib/json/JsonEncoderStable.js +5 -5
  94. package/lib/json/JsonEncoderStable.js.map +1 -1
  95. package/lib/json-binary/codec.d.ts +8 -1
  96. package/lib/json-binary/codec.js +7 -0
  97. package/lib/json-binary/codec.js.map +1 -1
  98. package/lib/msgpack/MsgPackDecoder.d.ts +27 -0
  99. package/lib/msgpack/MsgPackDecoder.js +55 -23
  100. package/lib/msgpack/MsgPackDecoder.js.map +1 -1
  101. package/lib/msgpack/MsgPackDecoderFast.d.ts +8 -0
  102. package/lib/msgpack/MsgPackDecoderFast.js +14 -5
  103. package/lib/msgpack/MsgPackDecoderFast.js.map +1 -1
  104. package/lib/msgpack/MsgPackEncoder.d.ts +3 -0
  105. package/lib/msgpack/MsgPackEncoder.js +7 -4
  106. package/lib/msgpack/MsgPackEncoder.js.map +1 -1
  107. package/lib/msgpack/MsgPackEncoderFast.d.ts +26 -4
  108. package/lib/msgpack/MsgPackEncoderFast.js +31 -0
  109. package/lib/msgpack/MsgPackEncoderFast.js.map +1 -1
  110. package/lib/msgpack/MsgPackEncoderStable.d.ts +3 -0
  111. package/lib/msgpack/MsgPackEncoderStable.js +3 -0
  112. package/lib/msgpack/MsgPackEncoderStable.js.map +1 -1
  113. package/lib/msgpack/MsgPackToJsonConverter.d.ts +30 -4
  114. package/lib/msgpack/MsgPackToJsonConverter.js +32 -5
  115. package/lib/msgpack/MsgPackToJsonConverter.js.map +1 -1
  116. package/lib/msgpack/index.d.ts +29 -0
  117. package/lib/msgpack/index.js +30 -0
  118. package/lib/msgpack/index.js.map +1 -1
  119. package/lib/msgpack/shallow-read.js +7 -7
  120. package/lib/msgpack/shallow-read.js.map +1 -1
  121. package/lib/msgpack/types.d.ts +1 -0
  122. package/lib/msgpack/util.d.ts +1 -1
  123. package/lib/nfs/v3/FullNfsv3Encoder.d.ts +3 -3
  124. package/lib/nfs/v3/FullNfsv3Encoder.js +3 -3
  125. package/lib/nfs/v3/FullNfsv3Encoder.js.map +1 -1
  126. package/lib/nfs/v3/Nfsv3Decoder.js +51 -50
  127. package/lib/nfs/v3/Nfsv3Decoder.js.map +1 -1
  128. package/lib/nfs/v3/Nfsv3Encoder.d.ts +2 -2
  129. package/lib/nfs/v3/Nfsv3Encoder.js +52 -52
  130. package/lib/nfs/v3/Nfsv3Encoder.js.map +1 -1
  131. package/lib/nfs/v3/constants.d.ts +34 -0
  132. package/lib/nfs/v3/constants.js +4 -0
  133. package/lib/nfs/v3/constants.js.map +1 -1
  134. package/lib/nfs/v3/locks/NlmDecoder.js +20 -20
  135. package/lib/nfs/v3/locks/NlmDecoder.js.map +1 -1
  136. package/lib/nfs/v3/locks/NlmEncoder.d.ts +2 -2
  137. package/lib/nfs/v3/locks/NlmEncoder.js +20 -20
  138. package/lib/nfs/v3/locks/NlmEncoder.js.map +1 -1
  139. package/lib/nfs/v3/locks/constants.d.ts +9 -0
  140. package/lib/nfs/v3/locks/messages.d.ts +58 -1
  141. package/lib/nfs/v3/locks/messages.js +54 -0
  142. package/lib/nfs/v3/locks/messages.js.map +1 -1
  143. package/lib/nfs/v3/locks/structs.d.ts +15 -0
  144. package/lib/nfs/v3/locks/structs.js +15 -0
  145. package/lib/nfs/v3/locks/structs.js.map +1 -1
  146. package/lib/nfs/v3/messages.d.ts +249 -0
  147. package/lib/nfs/v3/messages.js +249 -0
  148. package/lib/nfs/v3/messages.js.map +1 -1
  149. package/lib/nfs/v3/mount/MountDecoder.js +12 -12
  150. package/lib/nfs/v3/mount/MountEncoder.d.ts +2 -2
  151. package/lib/nfs/v3/mount/MountEncoder.js +13 -13
  152. package/lib/nfs/v3/mount/MountEncoder.js.map +1 -1
  153. package/lib/nfs/v3/mount/constants.d.ts +9 -0
  154. package/lib/nfs/v3/mount/messages.d.ts +31 -1
  155. package/lib/nfs/v3/mount/messages.js +27 -0
  156. package/lib/nfs/v3/mount/messages.js.map +1 -1
  157. package/lib/nfs/v3/mount/structs.d.ts +15 -0
  158. package/lib/nfs/v3/mount/structs.js +15 -0
  159. package/lib/nfs/v3/mount/structs.js.map +1 -1
  160. package/lib/nfs/v3/structs.d.ts +78 -0
  161. package/lib/nfs/v3/structs.js +78 -0
  162. package/lib/nfs/v3/structs.js.map +1 -1
  163. package/lib/nfs/v4/Nfsv4Decoder.d.ts +0 -2
  164. package/lib/nfs/v4/Nfsv4Decoder.js +96 -102
  165. package/lib/nfs/v4/Nfsv4Decoder.js.map +1 -1
  166. package/lib/nfs/v4/Nfsv4Encoder.d.ts +2 -2
  167. package/lib/nfs/v4/Nfsv4Encoder.js +1 -1
  168. package/lib/nfs/v4/Nfsv4Encoder.js.map +1 -1
  169. package/lib/nfs/v4/Nfsv4FullEncoder.d.ts +4 -4
  170. package/lib/nfs/v4/Nfsv4FullEncoder.js +4 -4
  171. package/lib/nfs/v4/Nfsv4FullEncoder.js.map +1 -1
  172. package/lib/nfs/v4/attributes.d.ts +62 -0
  173. package/lib/nfs/v4/attributes.js +209 -147
  174. package/lib/nfs/v4/attributes.js.map +1 -1
  175. package/lib/nfs/v4/builder.d.ts +274 -1
  176. package/lib/nfs/v4/builder.js +283 -10
  177. package/lib/nfs/v4/builder.js.map +1 -1
  178. package/lib/nfs/v4/client/NfsFsDir.d.ts +4 -1
  179. package/lib/nfs/v4/client/NfsFsDir.js +8 -5
  180. package/lib/nfs/v4/client/NfsFsDir.js.map +1 -1
  181. package/lib/nfs/v4/client/NfsFsDirent.d.ts +3 -0
  182. package/lib/nfs/v4/client/NfsFsDirent.js +10 -7
  183. package/lib/nfs/v4/client/NfsFsDirent.js.map +1 -1
  184. package/lib/nfs/v4/client/NfsFsFileHandle.d.ts +4 -3
  185. package/lib/nfs/v4/client/NfsFsFileHandle.js +13 -10
  186. package/lib/nfs/v4/client/NfsFsFileHandle.js.map +1 -1
  187. package/lib/nfs/v4/client/NfsFsStats.d.ts +3 -0
  188. package/lib/nfs/v4/client/NfsFsStats.js +10 -7
  189. package/lib/nfs/v4/client/NfsFsStats.js.map +1 -1
  190. package/lib/nfs/v4/client/Nfsv4FsClient.d.ts +2 -3
  191. package/lib/nfs/v4/client/Nfsv4FsClient.js +92 -92
  192. package/lib/nfs/v4/client/Nfsv4FsClient.js.map +1 -1
  193. package/lib/nfs/v4/client/Nfsv4TcpClient.d.ts +6 -6
  194. package/lib/nfs/v4/client/Nfsv4TcpClient.js +3 -3
  195. package/lib/nfs/v4/client/Nfsv4TcpClient.js.map +1 -1
  196. package/lib/nfs/v4/client/types.d.ts +1 -1
  197. package/lib/nfs/v4/constants.d.ts +78 -1
  198. package/lib/nfs/v4/format.d.ts +1 -1
  199. package/lib/nfs/v4/format.js +229 -229
  200. package/lib/nfs/v4/format.js.map +1 -1
  201. package/lib/nfs/v4/messages.js +101 -101
  202. package/lib/nfs/v4/messages.js.map +1 -1
  203. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.d.ts +20 -1
  204. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js +29 -8
  205. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js.map +1 -1
  206. package/lib/nfs/v4/server/Nfsv4Connection.d.ts +6 -3
  207. package/lib/nfs/v4/server/Nfsv4Connection.js +11 -8
  208. package/lib/nfs/v4/server/Nfsv4Connection.js.map +1 -1
  209. package/lib/nfs/v4/server/Nfsv4TcpServer.d.ts +2 -3
  210. package/lib/nfs/v4/server/Nfsv4TcpServer.js +1 -0
  211. package/lib/nfs/v4/server/Nfsv4TcpServer.js.map +1 -1
  212. package/lib/nfs/v4/server/operations/ByteRangeLock.d.ts +69 -1
  213. package/lib/nfs/v4/server/operations/ByteRangeLock.js +43 -1
  214. package/lib/nfs/v4/server/operations/ByteRangeLock.js.map +1 -1
  215. package/lib/nfs/v4/server/operations/ClientRecord.d.ts +98 -1
  216. package/lib/nfs/v4/server/operations/ClientRecord.js +54 -1
  217. package/lib/nfs/v4/server/operations/ClientRecord.js.map +1 -1
  218. package/lib/nfs/v4/server/operations/FilesystemStats.d.ts +22 -1
  219. package/lib/nfs/v4/server/operations/FilesystemStats.js +16 -1
  220. package/lib/nfs/v4/server/operations/FilesystemStats.js.map +1 -1
  221. package/lib/nfs/v4/server/operations/LockOwnerState.d.ts +75 -2
  222. package/lib/nfs/v4/server/operations/LockOwnerState.js +43 -1
  223. package/lib/nfs/v4/server/operations/LockOwnerState.js.map +1 -1
  224. package/lib/nfs/v4/server/operations/LockStateid.d.ts +55 -1
  225. package/lib/nfs/v4/server/operations/LockStateid.js +37 -1
  226. package/lib/nfs/v4/server/operations/LockStateid.js.map +1 -1
  227. package/lib/nfs/v4/server/operations/Nfsv4Operations.d.ts +2 -1
  228. package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.d.ts +2 -2
  229. package/lib/nfs/v4/server/operations/OpenFileState.d.ts +90 -2
  230. package/lib/nfs/v4/server/operations/OpenFileState.js +52 -1
  231. package/lib/nfs/v4/server/operations/OpenFileState.js.map +1 -1
  232. package/lib/nfs/v4/server/operations/OpenOwnerState.d.ts +76 -2
  233. package/lib/nfs/v4/server/operations/OpenOwnerState.js +44 -1
  234. package/lib/nfs/v4/server/operations/OpenOwnerState.js.map +1 -1
  235. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.d.ts +73 -3
  236. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js +261 -187
  237. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js.map +1 -1
  238. package/lib/nfs/v4/server/operations/node/attrs.d.ts +13 -1
  239. package/lib/nfs/v4/server/operations/node/attrs.js +75 -62
  240. package/lib/nfs/v4/server/operations/node/attrs.js.map +1 -1
  241. package/lib/nfs/v4/server/operations/node/fh.d.ts +67 -2
  242. package/lib/nfs/v4/server/operations/node/fh.js +83 -21
  243. package/lib/nfs/v4/server/operations/node/fh.js.map +1 -1
  244. package/lib/nfs/v4/server/operations/node/util.js +4 -4
  245. package/lib/nfs/v4/server/operations/node/util.js.map +1 -1
  246. package/lib/nfs/v4/server/util.d.ts +0 -1
  247. package/lib/nfs/v4/server/util.js +40 -40
  248. package/lib/nfs/v4/structs.d.ts +136 -4
  249. package/lib/nfs/v4/structs.js +129 -0
  250. package/lib/nfs/v4/structs.js.map +1 -1
  251. package/lib/resp/RespDecoder.d.ts +9 -0
  252. package/lib/resp/RespDecoder.js +93 -76
  253. package/lib/resp/RespDecoder.js.map +1 -1
  254. package/lib/resp/RespEncoder.d.ts +8 -0
  255. package/lib/resp/RespEncoder.js +107 -89
  256. package/lib/resp/RespEncoder.js.map +1 -1
  257. package/lib/resp/RespEncoderLegacy.d.ts +3 -0
  258. package/lib/resp/RespEncoderLegacy.js +7 -4
  259. package/lib/resp/RespEncoderLegacy.js.map +1 -1
  260. package/lib/resp/RespStreamingDecoder.d.ts +48 -0
  261. package/lib/resp/RespStreamingDecoder.js +48 -0
  262. package/lib/resp/RespStreamingDecoder.js.map +1 -1
  263. package/lib/resp/constants.d.ts +19 -19
  264. package/lib/rm/RmRecordEncoder.d.ts +15 -1
  265. package/lib/rm/RmRecordEncoder.js +15 -1
  266. package/lib/rm/RmRecordEncoder.js.map +1 -1
  267. package/lib/rpc/RpcMessageDecoder.d.ts +1 -1
  268. package/lib/rpc/RpcMessageDecoder.js +8 -7
  269. package/lib/rpc/RpcMessageDecoder.js.map +1 -1
  270. package/lib/rpc/RpcMessageEncoder.d.ts +2 -2
  271. package/lib/rpc/RpcMessageEncoder.js +6 -6
  272. package/lib/rpc/RpcMessageEncoder.js.map +1 -1
  273. package/lib/rpc/constants.d.ts +76 -28
  274. package/lib/rpc/constants.js +10 -0
  275. package/lib/rpc/constants.js.map +1 -1
  276. package/lib/ssh/SshDecoder.d.ts +46 -0
  277. package/lib/ssh/SshDecoder.js +52 -2
  278. package/lib/ssh/SshDecoder.js.map +1 -1
  279. package/lib/ssh/SshEncoder.d.ts +69 -0
  280. package/lib/ssh/SshEncoder.js +81 -8
  281. package/lib/ssh/SshEncoder.js.map +1 -1
  282. package/lib/ssh/index.d.ts +6 -0
  283. package/lib/ssh/index.js +6 -0
  284. package/lib/ssh/index.js.map +1 -1
  285. package/lib/ubjson/UbjsonDecoder.js +1 -1
  286. package/lib/ubjson/UbjsonDecoder.js.map +1 -1
  287. package/lib/ubjson/UbjsonEncoder.js +6 -5
  288. package/lib/ubjson/UbjsonEncoder.js.map +1 -1
  289. package/lib/util/CompressionTable.js +4 -4
  290. package/lib/util/CompressionTable.js.map +1 -1
  291. package/lib/util/DecompressionTable.js +3 -2
  292. package/lib/util/DecompressionTable.js.map +1 -1
  293. package/lib/ws/WsFrameDecoder.d.ts +18 -0
  294. package/lib/ws/WsFrameDecoder.js +18 -0
  295. package/lib/ws/WsFrameDecoder.js.map +1 -1
  296. package/lib/ws/WsFrameEncoder.d.ts +1 -1
  297. package/lib/ws/WsFrameEncoder.js +3 -3
  298. package/lib/ws/WsFrameEncoder.js.map +1 -1
  299. package/lib/ws/constants.js +5 -0
  300. package/lib/ws/constants.js.map +1 -1
  301. package/lib/xdr/XdrDecoder.d.ts +62 -0
  302. package/lib/xdr/XdrDecoder.js +73 -6
  303. package/lib/xdr/XdrDecoder.js.map +1 -1
  304. package/lib/xdr/XdrEncoder.d.ts +71 -0
  305. package/lib/xdr/XdrEncoder.js +88 -13
  306. package/lib/xdr/XdrEncoder.js.map +1 -1
  307. package/lib/xdr/XdrSchemaDecoder.d.ts +40 -0
  308. package/lib/xdr/XdrSchemaDecoder.js +52 -0
  309. package/lib/xdr/XdrSchemaDecoder.js.map +1 -1
  310. package/lib/xdr/XdrSchemaEncoder.d.ts +5 -0
  311. package/lib/xdr/XdrSchemaEncoder.js +9 -0
  312. package/lib/xdr/XdrSchemaEncoder.js.map +1 -1
  313. package/lib/xdr/XdrSchemaValidator.d.ts +9 -0
  314. package/lib/xdr/XdrSchemaValidator.js +42 -11
  315. package/lib/xdr/XdrSchemaValidator.js.map +1 -1
  316. package/lib/xdr/XdrUnion.d.ts +5 -0
  317. package/lib/xdr/XdrUnion.js +5 -0
  318. package/lib/xdr/XdrUnion.js.map +1 -1
  319. package/lib/xdr/index.d.ts +14 -0
  320. package/lib/xdr/index.js +14 -0
  321. package/lib/xdr/index.js.map +1 -1
  322. package/lib/xdr/types.d.ts +46 -0
  323. package/package.json +32 -55
@@ -1 +1 @@
1
- {"version":3,"file":"ByteRangeLock.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/ByteRangeLock.ts"],"names":[],"mappings":";;;AAMA,MAAa,aAAa;IACxB,YAKkB,OAA4B,EAM5B,IAAY,EAOZ,QAAgB,EAMhB,MAAc,EAMd,MAAc,EAOd,YAAoB;QAhCpB,YAAO,GAAP,OAAO,CAAqB;QAM5B,SAAI,GAAJ,IAAI,CAAQ;QAOZ,aAAQ,GAAR,QAAQ,CAAQ;QAMhB,WAAM,GAAN,MAAM,CAAQ;QAMd,WAAM,GAAN,MAAM,CAAQ;QAOd,iBAAY,GAAZ,YAAY,CAAQ;IACnC,CAAC;IAQG,QAAQ,CAAC,MAAc,EAAE,MAAc;QAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACpF,MAAM,QAAQ,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,MAAM,GAAG,OAAO,CAAC;IACpD,CAAC;CACF;AArDD,sCAqDC"}
1
+ {"version":3,"file":"ByteRangeLock.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/ByteRangeLock.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,aAAa;IACxB;IACE;;;OAGG;IACa,OAA4B;IAE5C;;;OAGG;IACa,IAAY;IAE5B;;;;OAIG;IACa,QAAgB;IAEhC;;;OAGG;IACa,MAAc;IAE9B;;;OAGG;IACa,MAAc;IAE9B;;;;OAIG;IACa,YAAoB;QAhCpB,YAAO,GAAP,OAAO,CAAqB;QAM5B,SAAI,GAAJ,IAAI,CAAQ;QAOZ,aAAQ,GAAR,QAAQ,CAAQ;QAMhB,WAAM,GAAN,MAAM,CAAQ;QAMd,WAAM,GAAN,MAAM,CAAQ;QAOd,iBAAY,GAAZ,YAAY,CAAQ;IACnC,CAAC;IAEJ;;;;;OAKG;IACI,QAAQ,CAAC,MAAc,EAAE,MAAc;QAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACpF,MAAM,QAAQ,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,MAAM,GAAG,OAAO,CAAC;IACpD,CAAC;CACF;AArDD,sCAqDC"}
@@ -1,13 +1,110 @@
1
1
  import type * as msg from '../../messages';
2
2
  import type * as struct from '../../structs';
3
+ /** Client state record for NFS v4 client registration. */
3
4
  export declare class ClientRecord {
5
+ /**
6
+ * Principal associated with this client (from RPC credentials).
7
+ */
4
8
  readonly principal: string;
9
+ /**
10
+ * Client verifier - used to detect client reboots.
11
+ * If client sends SETCLIENTID with same clientIdString but different verifier,
12
+ * it indicates the client rebooted and old state should be discarded.
13
+ * Size 8 bytes (NFS4_VERIFIER_SIZE) buffer.
14
+ */
5
15
  readonly verifier: Uint8Array;
16
+ /**
17
+ * Client identifier string - globally unique client identity.
18
+ * Typically contains hostname or other unique data.
19
+ * Used to find existing client records across SETCLIENTID calls.
20
+ */
6
21
  readonly clientIdString: Uint8Array;
22
+ /**
23
+ * Callback information - RPC program number and network address.
24
+ * Used by server to initiate callbacks to client (e.g., for delegation recalls).
25
+ * Server opens new TCP connection to client using this address when needed.
26
+ */
7
27
  readonly callback: struct.Nfsv4CbClient;
28
+ /**
29
+ * Callback identifier - client-provided value.
30
+ * Sent by server in callback RPCs to help client distinguish which
31
+ * server is calling back (useful if client talks to multiple servers).
32
+ */
8
33
  readonly callbackIdent: number;
34
+ /**
35
+ * SETCLIENTID confirmation verifier - random 8-byte token.
36
+ * Generated by server, returned to client, must be echoed back in
37
+ * SETCLIENTID_CONFIRM to prove client received the SETCLIENTID response.
38
+ * Prevents race conditions and stale client ID reuse.
39
+ *
40
+ * const NFS4_VERIFIER_SIZE = 8;
41
+ * typedef opaque verifier4[NFS4_VERIFIER_SIZE];
42
+ */
9
43
  readonly setclientidConfirm: Uint8Array;
44
+ /**
45
+ * Cached SETCLIENTID response for duplicate request handling.
46
+ * If a client repeats a SETCLIENTID request (same clientIdString and verifier),
47
+ * server can return this cached response instead of creating a new record.
48
+ * This helps handle network retries and duplicate requests gracefully.
49
+ */
10
50
  cache: msg.Nfsv4SetclientidResponse | undefined;
51
+ /**
52
+ * Last time this client renewed its lease (in milliseconds since epoch).
53
+ * Per RFC 7530 §9.5, any stateful operation from the client renews the lease.
54
+ * The server must track this to detect expired leases and revoke client state.
55
+ */
11
56
  lastRenew: number;
12
- constructor(principal: string, verifier: Uint8Array, clientIdString: Uint8Array, callback: struct.Nfsv4CbClient, callbackIdent: number, setclientidConfirm: Uint8Array, cache?: msg.Nfsv4SetclientidResponse | undefined, lastRenew?: number);
57
+ constructor(
58
+ /**
59
+ * Principal associated with this client (from RPC credentials).
60
+ */
61
+ principal: string,
62
+ /**
63
+ * Client verifier - used to detect client reboots.
64
+ * If client sends SETCLIENTID with same clientIdString but different verifier,
65
+ * it indicates the client rebooted and old state should be discarded.
66
+ * Size 8 bytes (NFS4_VERIFIER_SIZE) buffer.
67
+ */
68
+ verifier: Uint8Array,
69
+ /**
70
+ * Client identifier string - globally unique client identity.
71
+ * Typically contains hostname or other unique data.
72
+ * Used to find existing client records across SETCLIENTID calls.
73
+ */
74
+ clientIdString: Uint8Array,
75
+ /**
76
+ * Callback information - RPC program number and network address.
77
+ * Used by server to initiate callbacks to client (e.g., for delegation recalls).
78
+ * Server opens new TCP connection to client using this address when needed.
79
+ */
80
+ callback: struct.Nfsv4CbClient,
81
+ /**
82
+ * Callback identifier - client-provided value.
83
+ * Sent by server in callback RPCs to help client distinguish which
84
+ * server is calling back (useful if client talks to multiple servers).
85
+ */
86
+ callbackIdent: number,
87
+ /**
88
+ * SETCLIENTID confirmation verifier - random 8-byte token.
89
+ * Generated by server, returned to client, must be echoed back in
90
+ * SETCLIENTID_CONFIRM to prove client received the SETCLIENTID response.
91
+ * Prevents race conditions and stale client ID reuse.
92
+ *
93
+ * const NFS4_VERIFIER_SIZE = 8;
94
+ * typedef opaque verifier4[NFS4_VERIFIER_SIZE];
95
+ */
96
+ setclientidConfirm: Uint8Array,
97
+ /**
98
+ * Cached SETCLIENTID response for duplicate request handling.
99
+ * If a client repeats a SETCLIENTID request (same clientIdString and verifier),
100
+ * server can return this cached response instead of creating a new record.
101
+ * This helps handle network retries and duplicate requests gracefully.
102
+ */
103
+ cache?: msg.Nfsv4SetclientidResponse | undefined,
104
+ /**
105
+ * Last time this client renewed its lease (in milliseconds since epoch).
106
+ * Per RFC 7530 §9.5, any stateful operation from the client renews the lease.
107
+ * The server must track this to detect expired leases and revoke client state.
108
+ */
109
+ lastRenew?: number);
13
110
  }
@@ -1,8 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClientRecord = void 0;
4
+ /** Client state record for NFS v4 client registration. */
4
5
  class ClientRecord {
5
- constructor(principal, verifier, clientIdString, callback, callbackIdent, setclientidConfirm, cache = undefined, lastRenew = Date.now()) {
6
+ constructor(
7
+ /**
8
+ * Principal associated with this client (from RPC credentials).
9
+ */
10
+ principal,
11
+ /**
12
+ * Client verifier - used to detect client reboots.
13
+ * If client sends SETCLIENTID with same clientIdString but different verifier,
14
+ * it indicates the client rebooted and old state should be discarded.
15
+ * Size 8 bytes (NFS4_VERIFIER_SIZE) buffer.
16
+ */
17
+ verifier,
18
+ /**
19
+ * Client identifier string - globally unique client identity.
20
+ * Typically contains hostname or other unique data.
21
+ * Used to find existing client records across SETCLIENTID calls.
22
+ */
23
+ clientIdString,
24
+ /**
25
+ * Callback information - RPC program number and network address.
26
+ * Used by server to initiate callbacks to client (e.g., for delegation recalls).
27
+ * Server opens new TCP connection to client using this address when needed.
28
+ */
29
+ callback,
30
+ /**
31
+ * Callback identifier - client-provided value.
32
+ * Sent by server in callback RPCs to help client distinguish which
33
+ * server is calling back (useful if client talks to multiple servers).
34
+ */
35
+ callbackIdent,
36
+ /**
37
+ * SETCLIENTID confirmation verifier - random 8-byte token.
38
+ * Generated by server, returned to client, must be echoed back in
39
+ * SETCLIENTID_CONFIRM to prove client received the SETCLIENTID response.
40
+ * Prevents race conditions and stale client ID reuse.
41
+ *
42
+ * const NFS4_VERIFIER_SIZE = 8;
43
+ * typedef opaque verifier4[NFS4_VERIFIER_SIZE];
44
+ */
45
+ setclientidConfirm,
46
+ /**
47
+ * Cached SETCLIENTID response for duplicate request handling.
48
+ * If a client repeats a SETCLIENTID request (same clientIdString and verifier),
49
+ * server can return this cached response instead of creating a new record.
50
+ * This helps handle network retries and duplicate requests gracefully.
51
+ */
52
+ cache = undefined,
53
+ /**
54
+ * Last time this client renewed its lease (in milliseconds since epoch).
55
+ * Per RFC 7530 §9.5, any stateful operation from the client renews the lease.
56
+ * The server must track this to detect expired leases and revoke client state.
57
+ */
58
+ lastRenew = Date.now()) {
6
59
  this.principal = principal;
7
60
  this.verifier = verifier;
8
61
  this.clientIdString = clientIdString;
@@ -1 +1 @@
1
- {"version":3,"file":"ClientRecord.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/ClientRecord.ts"],"names":[],"mappings":";;;AAIA,MAAa,YAAY;IACvB,YAIkB,SAAiB,EAQjB,QAAoB,EAOpB,cAA0B,EAO1B,QAA8B,EAO9B,aAAqB,EAWrB,kBAA8B,EAQvC,QAAkD,SAAS,EAO3D,YAAoB,IAAI,CAAC,GAAG,EAAE;QAvDrB,cAAS,GAAT,SAAS,CAAQ;QAQjB,aAAQ,GAAR,QAAQ,CAAY;QAOpB,mBAAc,GAAd,cAAc,CAAY;QAO1B,aAAQ,GAAR,QAAQ,CAAsB;QAO9B,kBAAa,GAAb,aAAa,CAAQ;QAWrB,uBAAkB,GAAlB,kBAAkB,CAAY;QAQvC,UAAK,GAAL,KAAK,CAAsD;QAO3D,cAAS,GAAT,SAAS,CAAqB;IACpC,CAAC;CACL;AA9DD,oCA8DC"}
1
+ {"version":3,"file":"ClientRecord.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/ClientRecord.ts"],"names":[],"mappings":";;;AAGA,0DAA0D;AAC1D,MAAa,YAAY;IACvB;IACE;;OAEG;IACa,SAAiB;IAEjC;;;;;OAKG;IACa,QAAoB;IAEpC;;;;OAIG;IACa,cAA0B;IAE1C;;;;OAIG;IACa,QAA8B;IAE9C;;;;OAIG;IACa,aAAqB;IAErC;;;;;;;;OAQG;IACa,kBAA8B;IAE9C;;;;;OAKG;IACI,QAAkD,SAAS;IAElE;;;;OAIG;IACI,YAAoB,IAAI,CAAC,GAAG,EAAE;QAvDrB,cAAS,GAAT,SAAS,CAAQ;QAQjB,aAAQ,GAAR,QAAQ,CAAY;QAOpB,mBAAc,GAAd,cAAc,CAAY;QAO1B,aAAQ,GAAR,QAAQ,CAAsB;QAO9B,kBAAa,GAAb,aAAa,CAAQ;QAWrB,uBAAkB,GAAlB,kBAAkB,CAAY;QAQvC,UAAK,GAAL,KAAK,CAAsD;QAO3D,cAAS,GAAT,SAAS,CAAqB;IACpC,CAAC;CACL;AA9DD,oCA8DC"}
@@ -1,9 +1,30 @@
1
+ /**
2
+ * Filesystem statistics for NFSv4 space and file count attributes.
3
+ */
1
4
  export declare class FilesystemStats {
5
+ /** Available space in bytes for unprivileged users */
2
6
  readonly spaceAvail: bigint;
7
+ /** Free space in bytes on the filesystem */
3
8
  readonly spaceFree: bigint;
9
+ /** Total space in bytes on the filesystem */
4
10
  readonly spaceTotal: bigint;
11
+ /** Available file slots (inodes) */
5
12
  readonly filesAvail: bigint;
13
+ /** Free file slots (inodes) */
6
14
  readonly filesFree: bigint;
15
+ /** Total file slots (inodes) */
7
16
  readonly filesTotal: bigint;
8
- constructor(spaceAvail: bigint, spaceFree: bigint, spaceTotal: bigint, filesAvail: bigint, filesFree: bigint, filesTotal: bigint);
17
+ constructor(
18
+ /** Available space in bytes for unprivileged users */
19
+ spaceAvail: bigint,
20
+ /** Free space in bytes on the filesystem */
21
+ spaceFree: bigint,
22
+ /** Total space in bytes on the filesystem */
23
+ spaceTotal: bigint,
24
+ /** Available file slots (inodes) */
25
+ filesAvail: bigint,
26
+ /** Free file slots (inodes) */
27
+ filesFree: bigint,
28
+ /** Total file slots (inodes) */
29
+ filesTotal: bigint);
9
30
  }
@@ -1,8 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FilesystemStats = void 0;
4
+ /**
5
+ * Filesystem statistics for NFSv4 space and file count attributes.
6
+ */
4
7
  class FilesystemStats {
5
- constructor(spaceAvail, spaceFree, spaceTotal, filesAvail, filesFree, filesTotal) {
8
+ constructor(
9
+ /** Available space in bytes for unprivileged users */
10
+ spaceAvail,
11
+ /** Free space in bytes on the filesystem */
12
+ spaceFree,
13
+ /** Total space in bytes on the filesystem */
14
+ spaceTotal,
15
+ /** Available file slots (inodes) */
16
+ filesAvail,
17
+ /** Free file slots (inodes) */
18
+ filesFree,
19
+ /** Total file slots (inodes) */
20
+ filesTotal) {
6
21
  this.spaceAvail = spaceAvail;
7
22
  this.spaceFree = spaceFree;
8
23
  this.spaceTotal = spaceTotal;
@@ -1 +1 @@
1
- {"version":3,"file":"FilesystemStats.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/FilesystemStats.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAC1B,YAEkB,UAAkB,EAElB,SAAiB,EAEjB,UAAkB,EAElB,UAAkB,EAElB,SAAiB,EAEjB,UAAkB;QAVlB,eAAU,GAAV,UAAU,CAAQ;QAElB,cAAS,GAAT,SAAS,CAAQ;QAEjB,eAAU,GAAV,UAAU,CAAQ;QAElB,eAAU,GAAV,UAAU,CAAQ;QAElB,cAAS,GAAT,SAAS,CAAQ;QAEjB,eAAU,GAAV,UAAU,CAAQ;IACjC,CAAC;CACL;AAfD,0CAeC"}
1
+ {"version":3,"file":"FilesystemStats.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/FilesystemStats.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,eAAe;IAC1B;IACE,sDAAsD;IACtC,UAAkB;IAClC,4CAA4C;IAC5B,SAAiB;IACjC,6CAA6C;IAC7B,UAAkB;IAClC,oCAAoC;IACpB,UAAkB;IAClC,+BAA+B;IACf,SAAiB;IACjC,gCAAgC;IAChB,UAAkB;QAVlB,eAAU,GAAV,UAAU,CAAQ;QAElB,cAAS,GAAT,SAAS,CAAQ;QAEjB,eAAU,GAAV,UAAU,CAAQ;QAElB,eAAU,GAAV,UAAU,CAAQ;QAElB,cAAS,GAAT,SAAS,CAAQ;QAEjB,eAAU,GAAV,UAAU,CAAQ;IACjC,CAAC;CACL;AAfD,0CAeC"}
@@ -1,9 +1,82 @@
1
+ /**
2
+ * Lock-owner state record for NFSv4 LOCK operations.
3
+ * A lock-owner represents a single entity (process, thread) on a client
4
+ * that can acquire byte-range locks on files. Tracks all locks held by this owner.
5
+ */
1
6
  export declare class LockOwnerState {
7
+ /**
8
+ * Client ID that owns this lock-owner.
9
+ * Links the owner back to the specific NFS client that created it.
10
+ */
2
11
  readonly clientid: bigint;
12
+ /**
13
+ * Opaque lock-owner identifier provided by the client.
14
+ * Typically represents a process or thread ID on the client.
15
+ * Combined with clientid, uniquely identifies this lock-owner.
16
+ */
3
17
  readonly owner: Uint8Array;
18
+ /**
19
+ * Sequence number for operations from this lock-owner.
20
+ * Used to serialize LOCK/LOCKU operations.
21
+ * Incremented after each successful stateful operation.
22
+ * Server rejects operations with incorrect sequence numbers to prevent replays.
23
+ */
4
24
  seqid: number;
25
+ /**
26
+ * Set of lock keys for all byte-range locks currently held by this owner.
27
+ * Format: lock keys are `${stateid}:${offset}:${length}`.
28
+ * Used to track all active locks and clean them up if the owner goes away.
29
+ */
5
30
  readonly locks: Set<string>;
6
- lastResponse?: any;
31
+ /**
32
+ * Cached response from the last successful operation.
33
+ * Per RFC 7530 §9.1.7, when a client retries with the same seqid (replay),
34
+ * the server must return the cached response instead of re-executing the operation.
35
+ * This ensures idempotency for LOCK and LOCKU operations.
36
+ */
37
+ lastResponse?: any | undefined;
38
+ /**
39
+ * Signature of the last request to validate true replays.
40
+ * Used to detect mismatched replays where the client reuses a seqid but changes
41
+ * the request parameters, which must be rejected with NFS4ERR_BAD_SEQID.
42
+ */
7
43
  lastRequestKey?: string | undefined;
8
- constructor(clientid: bigint, owner: Uint8Array, seqid: number, locks?: Set<string>, lastResponse?: any, lastRequestKey?: string | undefined);
44
+ constructor(
45
+ /**
46
+ * Client ID that owns this lock-owner.
47
+ * Links the owner back to the specific NFS client that created it.
48
+ */
49
+ clientid: bigint,
50
+ /**
51
+ * Opaque lock-owner identifier provided by the client.
52
+ * Typically represents a process or thread ID on the client.
53
+ * Combined with clientid, uniquely identifies this lock-owner.
54
+ */
55
+ owner: Uint8Array,
56
+ /**
57
+ * Sequence number for operations from this lock-owner.
58
+ * Used to serialize LOCK/LOCKU operations.
59
+ * Incremented after each successful stateful operation.
60
+ * Server rejects operations with incorrect sequence numbers to prevent replays.
61
+ */
62
+ seqid: number,
63
+ /**
64
+ * Set of lock keys for all byte-range locks currently held by this owner.
65
+ * Format: lock keys are `${stateid}:${offset}:${length}`.
66
+ * Used to track all active locks and clean them up if the owner goes away.
67
+ */
68
+ locks?: Set<string>,
69
+ /**
70
+ * Cached response from the last successful operation.
71
+ * Per RFC 7530 §9.1.7, when a client retries with the same seqid (replay),
72
+ * the server must return the cached response instead of re-executing the operation.
73
+ * This ensures idempotency for LOCK and LOCKU operations.
74
+ */
75
+ lastResponse?: any | undefined,
76
+ /**
77
+ * Signature of the last request to validate true replays.
78
+ * Used to detect mismatched replays where the client reuses a seqid but changes
79
+ * the request parameters, which must be rejected with NFS4ERR_BAD_SEQID.
80
+ */
81
+ lastRequestKey?: string | undefined);
9
82
  }
@@ -1,8 +1,50 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LockOwnerState = void 0;
4
+ /**
5
+ * Lock-owner state record for NFSv4 LOCK operations.
6
+ * A lock-owner represents a single entity (process, thread) on a client
7
+ * that can acquire byte-range locks on files. Tracks all locks held by this owner.
8
+ */
4
9
  class LockOwnerState {
5
- constructor(clientid, owner, seqid, locks = new Set(), lastResponse, lastRequestKey) {
10
+ constructor(
11
+ /**
12
+ * Client ID that owns this lock-owner.
13
+ * Links the owner back to the specific NFS client that created it.
14
+ */
15
+ clientid,
16
+ /**
17
+ * Opaque lock-owner identifier provided by the client.
18
+ * Typically represents a process or thread ID on the client.
19
+ * Combined with clientid, uniquely identifies this lock-owner.
20
+ */
21
+ owner,
22
+ /**
23
+ * Sequence number for operations from this lock-owner.
24
+ * Used to serialize LOCK/LOCKU operations.
25
+ * Incremented after each successful stateful operation.
26
+ * Server rejects operations with incorrect sequence numbers to prevent replays.
27
+ */
28
+ seqid,
29
+ /**
30
+ * Set of lock keys for all byte-range locks currently held by this owner.
31
+ * Format: lock keys are `${stateid}:${offset}:${length}`.
32
+ * Used to track all active locks and clean them up if the owner goes away.
33
+ */
34
+ locks = new Set(),
35
+ /**
36
+ * Cached response from the last successful operation.
37
+ * Per RFC 7530 §9.1.7, when a client retries with the same seqid (replay),
38
+ * the server must return the cached response instead of re-executing the operation.
39
+ * This ensures idempotency for LOCK and LOCKU operations.
40
+ */
41
+ lastResponse,
42
+ /**
43
+ * Signature of the last request to validate true replays.
44
+ * Used to detect mismatched replays where the client reuses a seqid but changes
45
+ * the request parameters, which must be rejected with NFS4ERR_BAD_SEQID.
46
+ */
47
+ lastRequestKey) {
6
48
  this.clientid = clientid;
7
49
  this.owner = owner;
8
50
  this.seqid = seqid;
@@ -1 +1 @@
1
- {"version":3,"file":"LockOwnerState.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/LockOwnerState.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IACzB,YAKkB,QAAgB,EAOhB,KAAiB,EAQ1B,KAAa,EAOJ,QAAqB,IAAI,GAAG,EAAE,EAQvC,YAAkB,EAOlB,cAAuB;QArCd,aAAQ,GAAR,QAAQ,CAAQ;QAOhB,UAAK,GAAL,KAAK,CAAY;QAQ1B,UAAK,GAAL,KAAK,CAAQ;QAOJ,UAAK,GAAL,KAAK,CAAyB;QAQvC,iBAAY,GAAZ,YAAY,CAAM;QAOlB,mBAAc,GAAd,cAAc,CAAS;IAC7B,CAAC;CACL;AA7CD,wCA6CC"}
1
+ {"version":3,"file":"LockOwnerState.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/LockOwnerState.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,cAAc;IACzB;IACE;;;OAGG;IACa,QAAgB;IAEhC;;;;OAIG;IACa,KAAiB;IAEjC;;;;;OAKG;IACI,KAAa;IAEpB;;;;OAIG;IACa,QAAqB,IAAI,GAAG,EAAE;IAE9C;;;;;OAKG;IACI,YAAkB;IAEzB;;;;OAIG;IACI,cAAuB;QArCd,aAAQ,GAAR,QAAQ,CAAQ;QAOhB,UAAK,GAAL,KAAK,CAAY;QAQ1B,UAAK,GAAL,KAAK,CAAQ;QAOJ,UAAK,GAAL,KAAK,CAAyB;QAQvC,iBAAY,GAAZ,YAAY,CAAM;QAOlB,mBAAc,GAAd,cAAc,CAAS;IAC7B,CAAC;CACL;AA7CD,wCA6CC"}
@@ -1,10 +1,64 @@
1
1
  import * as struct from '../../structs';
2
+ /**
3
+ * Lock stateid record for NFSv4 lock operations.
4
+ * Per RFC 7530 §9.1.4.1, all locks held on a particular file by a particular
5
+ * owner share a single stateid, with the seqid incremented on each LOCK/LOCKU.
6
+ * The stateid remains valid even after all locks are freed, as long as the
7
+ * associated open file remains open.
8
+ */
2
9
  export declare class LockStateid {
10
+ /**
11
+ * The "other" field of the stateid (96 bits).
12
+ * Uniquely identifies this lock-owner+file combination.
13
+ * Remains constant across all LOCK/LOCKU operations.
14
+ */
3
15
  readonly other: Uint8Array;
16
+ /**
17
+ * Current seqid value for this lock stateid.
18
+ * Incremented on each LOCK or LOCKU operation that affects locks.
19
+ * Starts at 1 when first created.
20
+ */
4
21
  seqid: number;
22
+ /**
23
+ * Key identifying the lock-owner that owns this stateid.
24
+ * Format: `${clientid}:${hex(owner)}`.
25
+ */
5
26
  readonly lockOwnerKey: string;
27
+ /**
28
+ * Absolute file system path of the file this stateid applies to.
29
+ * A lock-owner can have different stateids for different files.
30
+ */
6
31
  readonly path: string;
7
- constructor(other: Uint8Array, seqid: number, lockOwnerKey: string, path: string);
32
+ constructor(
33
+ /**
34
+ * The "other" field of the stateid (96 bits).
35
+ * Uniquely identifies this lock-owner+file combination.
36
+ * Remains constant across all LOCK/LOCKU operations.
37
+ */
38
+ other: Uint8Array,
39
+ /**
40
+ * Current seqid value for this lock stateid.
41
+ * Incremented on each LOCK or LOCKU operation that affects locks.
42
+ * Starts at 1 when first created.
43
+ */
44
+ seqid: number,
45
+ /**
46
+ * Key identifying the lock-owner that owns this stateid.
47
+ * Format: `${clientid}:${hex(owner)}`.
48
+ */
49
+ lockOwnerKey: string,
50
+ /**
51
+ * Absolute file system path of the file this stateid applies to.
52
+ * A lock-owner can have different stateids for different files.
53
+ */
54
+ path: string);
55
+ /**
56
+ * Get the full stateid with current seqid.
57
+ */
8
58
  toStateid(): struct.Nfsv4Stateid;
59
+ /**
60
+ * Increment seqid and return new stateid.
61
+ * Per RFC 7530, seqid wraps from 0xFFFFFFFF to 1 (not 0).
62
+ */
9
63
  incrementAndGetStateid(): struct.Nfsv4Stateid;
10
64
  }
@@ -3,16 +3,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LockStateid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const struct = tslib_1.__importStar(require("../../structs"));
6
+ /**
7
+ * Lock stateid record for NFSv4 lock operations.
8
+ * Per RFC 7530 §9.1.4.1, all locks held on a particular file by a particular
9
+ * owner share a single stateid, with the seqid incremented on each LOCK/LOCKU.
10
+ * The stateid remains valid even after all locks are freed, as long as the
11
+ * associated open file remains open.
12
+ */
6
13
  class LockStateid {
7
- constructor(other, seqid, lockOwnerKey, path) {
14
+ constructor(
15
+ /**
16
+ * The "other" field of the stateid (96 bits).
17
+ * Uniquely identifies this lock-owner+file combination.
18
+ * Remains constant across all LOCK/LOCKU operations.
19
+ */
20
+ other,
21
+ /**
22
+ * Current seqid value for this lock stateid.
23
+ * Incremented on each LOCK or LOCKU operation that affects locks.
24
+ * Starts at 1 when first created.
25
+ */
26
+ seqid,
27
+ /**
28
+ * Key identifying the lock-owner that owns this stateid.
29
+ * Format: `${clientid}:${hex(owner)}`.
30
+ */
31
+ lockOwnerKey,
32
+ /**
33
+ * Absolute file system path of the file this stateid applies to.
34
+ * A lock-owner can have different stateids for different files.
35
+ */
36
+ path) {
8
37
  this.other = other;
9
38
  this.seqid = seqid;
10
39
  this.lockOwnerKey = lockOwnerKey;
11
40
  this.path = path;
12
41
  }
42
+ /**
43
+ * Get the full stateid with current seqid.
44
+ */
13
45
  toStateid() {
14
46
  return new struct.Nfsv4Stateid(this.seqid, this.other);
15
47
  }
48
+ /**
49
+ * Increment seqid and return new stateid.
50
+ * Per RFC 7530, seqid wraps from 0xFFFFFFFF to 1 (not 0).
51
+ */
16
52
  incrementAndGetStateid() {
17
53
  this.seqid = this.seqid === 0xffffffff ? 1 : this.seqid + 1;
18
54
  return this.toStateid();
@@ -1 +1 @@
1
- {"version":3,"file":"LockStateid.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/LockStateid.ts"],"names":[],"mappings":";;;;AAAA,8DAAwC;AASxC,MAAa,WAAW;IACtB,YAMkB,KAAiB,EAO1B,KAAa,EAMJ,YAAoB,EAMpB,IAAY;QAnBZ,UAAK,GAAL,KAAK,CAAY;QAO1B,UAAK,GAAL,KAAK,CAAQ;QAMJ,iBAAY,GAAZ,YAAY,CAAQ;QAMpB,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;IAKJ,SAAS;QACP,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAMD,sBAAsB;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;CACF;AA5CD,kCA4CC"}
1
+ {"version":3,"file":"LockStateid.js","sourceRoot":"","sources":["../../../../../src/nfs/v4/server/operations/LockStateid.ts"],"names":[],"mappings":";;;;AAAA,8DAAwC;AAExC;;;;;;GAMG;AACH,MAAa,WAAW;IACtB;IACE;;;;OAIG;IACa,KAAiB;IAEjC;;;;OAIG;IACI,KAAa;IAEpB;;;OAGG;IACa,YAAoB;IAEpC;;;OAGG;IACa,IAAY;QAnBZ,UAAK,GAAL,KAAK,CAAY;QAO1B,UAAK,GAAL,KAAK,CAAQ;QAMJ,iBAAY,GAAZ,YAAY,CAAQ;QAMpB,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;IAEJ;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,sBAAsB;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAC5D,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;CACF;AA5CD,kCA4CC"}
@@ -1,4 +1,4 @@
1
- import * as msg from '../../messages';
1
+ import type * as msg from '../../messages';
2
2
  import type { Nfsv4CompoundProcCtx } from '../Nfsv4CompoundProcCtx';
3
3
  export type Nfsv4OperationCtx = Pick<Nfsv4CompoundProcCtx, 'cfh' | 'sfh' | 'req' | 'getPrincipal' | 'connection'>;
4
4
  export type Nfsv4OperationFn<Req extends msg.Nfsv4Request, Res extends msg.Nfsv4Response> = (request: Req, ctx: Nfsv4OperationCtx) => Promise<Res>;
@@ -35,6 +35,7 @@ export interface Nfsv4Operations {
35
35
  SAVEFH: Nfsv4OperationFn<msg.Nfsv4SavefhRequest, msg.Nfsv4SavefhResponse>;
36
36
  SECINFO: Nfsv4OperationFn<msg.Nfsv4SecinfoRequest, msg.Nfsv4SecinfoResponse>;
37
37
  SETATTR: Nfsv4OperationFn<msg.Nfsv4SetattrRequest, msg.Nfsv4SetattrResponse>;
38
+ /** @see {@link https://datatracker.ietf.org/doc/html/rfc7530#section-16.33} */
38
39
  SETCLIENTID: Nfsv4OperationFn<msg.Nfsv4SetclientidRequest, msg.Nfsv4SetclientidResponse>;
39
40
  SETCLIENTID_CONFIRM: Nfsv4OperationFn<msg.Nfsv4SetclientidConfirmRequest, msg.Nfsv4SetclientidConfirmResponse>;
40
41
  VERIFY: Nfsv4OperationFn<msg.Nfsv4VerifyRequest, msg.Nfsv4VerifyResponse>;
@@ -1,5 +1,5 @@
1
- import * as msg from '../../messages';
2
- import { Nfsv4OperationCtx, Nfsv4Operations } from './Nfsv4Operations';
1
+ import type * as msg from '../../messages';
2
+ import type { Nfsv4OperationCtx, Nfsv4Operations } from './Nfsv4Operations';
3
3
  export declare class Nfsv4OperationsNotImpl implements Nfsv4Operations {
4
4
  ACCESS(request: msg.Nfsv4AccessRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4AccessResponse>;
5
5
  CLOSE(request: msg.Nfsv4CloseRequest, ctx: Nfsv4OperationCtx): Promise<msg.Nfsv4CloseResponse>;
@@ -1,14 +1,102 @@
1
- /// <reference types="node" />
2
1
  import type * as struct from '../../structs';
3
2
  import type { FileHandle } from 'node:fs/promises';
3
+ /**
4
+ * Open file state record for NFSv4 OPEN operations.
5
+ * Tracks state for an individual file that has been opened by a client,
6
+ * including the stateid, file descriptor, share reservations, and confirmation status.
7
+ */
4
8
  export declare class OpenFileState {
9
+ /**
10
+ * Stateid assigned to this open file.
11
+ * Used by client to identify this particular open in subsequent operations
12
+ * (CLOSE, OPEN_DOWNGRADE, READ, WRITE, etc.).
13
+ */
5
14
  readonly stateid: struct.Nfsv4Stateid;
15
+ /**
16
+ * Absolute file system path of the opened file.
17
+ * Used to identify the file and check for share reservation conflicts.
18
+ */
6
19
  readonly path: string;
20
+ /**
21
+ * Node.js file descriptor/handle for the opened file.
22
+ * Used to perform I/O operations and must be closed when the file is closed.
23
+ */
7
24
  readonly fd: FileHandle;
25
+ /**
26
+ * Share access mode - which operations this open allows.
27
+ * Bitwise OR of OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_ACCESS_WRITE.
28
+ * Controls what the opener can do with the file.
29
+ */
8
30
  shareAccess: number;
31
+ /**
32
+ * Share deny mode - which operations this open denies to others.
33
+ * Bitwise OR of OPEN4_SHARE_DENY_READ, OPEN4_SHARE_DENY_WRITE, or OPEN4_SHARE_DENY_NONE.
34
+ * Controls what conflicting operations are blocked for other opens.
35
+ */
9
36
  shareDeny: number;
37
+ /**
38
+ * Key identifying the open-owner that opened this file.
39
+ * Format: `${clientid}:${base64(owner)}`.
40
+ * Links this open back to the owner for sequence number management.
41
+ */
10
42
  readonly openOwnerKey: string;
43
+ /**
44
+ * Sequence number for this open.
45
+ * Used to detect replayed or out-of-order operations.
46
+ * Incremented on OPEN_CONFIRM and OPEN_DOWNGRADE.
47
+ */
11
48
  seqid: number;
49
+ /**
50
+ * Whether this open has been confirmed via OPEN_CONFIRM.
51
+ * NFSv4.0 requires new opens from new open-owners to be confirmed.
52
+ * Once confirmed, the open can be used for READ/WRITE operations.
53
+ */
12
54
  confirmed: boolean;
13
- constructor(stateid: struct.Nfsv4Stateid, path: string, fd: FileHandle, shareAccess: number, shareDeny: number, openOwnerKey: string, seqid: number, confirmed: boolean);
55
+ constructor(
56
+ /**
57
+ * Stateid assigned to this open file.
58
+ * Used by client to identify this particular open in subsequent operations
59
+ * (CLOSE, OPEN_DOWNGRADE, READ, WRITE, etc.).
60
+ */
61
+ stateid: struct.Nfsv4Stateid,
62
+ /**
63
+ * Absolute file system path of the opened file.
64
+ * Used to identify the file and check for share reservation conflicts.
65
+ */
66
+ path: string,
67
+ /**
68
+ * Node.js file descriptor/handle for the opened file.
69
+ * Used to perform I/O operations and must be closed when the file is closed.
70
+ */
71
+ fd: FileHandle,
72
+ /**
73
+ * Share access mode - which operations this open allows.
74
+ * Bitwise OR of OPEN4_SHARE_ACCESS_READ, OPEN4_SHARE_ACCESS_WRITE.
75
+ * Controls what the opener can do with the file.
76
+ */
77
+ shareAccess: number,
78
+ /**
79
+ * Share deny mode - which operations this open denies to others.
80
+ * Bitwise OR of OPEN4_SHARE_DENY_READ, OPEN4_SHARE_DENY_WRITE, or OPEN4_SHARE_DENY_NONE.
81
+ * Controls what conflicting operations are blocked for other opens.
82
+ */
83
+ shareDeny: number,
84
+ /**
85
+ * Key identifying the open-owner that opened this file.
86
+ * Format: `${clientid}:${base64(owner)}`.
87
+ * Links this open back to the owner for sequence number management.
88
+ */
89
+ openOwnerKey: string,
90
+ /**
91
+ * Sequence number for this open.
92
+ * Used to detect replayed or out-of-order operations.
93
+ * Incremented on OPEN_CONFIRM and OPEN_DOWNGRADE.
94
+ */
95
+ seqid: number,
96
+ /**
97
+ * Whether this open has been confirmed via OPEN_CONFIRM.
98
+ * NFSv4.0 requires new opens from new open-owners to be confirmed.
99
+ * Once confirmed, the open can be used for READ/WRITE operations.
100
+ */
101
+ confirmed: boolean);
14
102
  }