@fireproof/vendor 0.0.0-smoke → 0.0.2-dev-test

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 (489) hide show
  1. package/merge-package.ts +207 -0
  2. package/p-limit/index.d.ts +81 -0
  3. package/p-limit/index.js +104 -0
  4. package/p-limit/index.test-d.ts +19 -0
  5. package/p-limit/license +9 -0
  6. package/p-limit/package.json +59 -0
  7. package/p-limit/readme.md +128 -0
  8. package/p-limit/test.js +241 -0
  9. package/package.json +12 -9
  10. package/to-esm-transform.ts +42 -0
  11. package/patched/@ipld/dag-json/.github/dependabot.yml +0 -11
  12. package/patched/@ipld/dag-json/.github/workflows/js-test-and-release.yml +0 -28
  13. package/patched/@ipld/dag-json/CHANGELOG.md +0 -202
  14. package/patched/@ipld/dag-json/LICENSE +0 -4
  15. package/patched/@ipld/dag-json/LICENSE-APACHE +0 -5
  16. package/patched/@ipld/dag-json/LICENSE-MIT +0 -19
  17. package/patched/@ipld/dag-json/README.md +0 -58
  18. package/patched/@ipld/dag-json/ipld-dag-json-10.2.3.tgz +0 -0
  19. package/patched/@ipld/dag-json/package.json +0 -173
  20. package/patched/@ipld/dag-json/src/index.js +0 -291
  21. package/patched/@ipld/dag-json/test/test-basics.spec.js +0 -290
  22. package/patched/@ipld/dag-json/test/ts-use/package.json +0 -11
  23. package/patched/@ipld/dag-json/test/ts-use/src/main.ts +0 -54
  24. package/patched/@ipld/dag-json/test/ts-use/tsconfig.json +0 -9
  25. package/patched/@ipld/dag-json/tsconfig.json +0 -14
  26. package/patched/cborg/.github/dependabot.yml +0 -16
  27. package/patched/cborg/.github/workflows/test-and-release.yml +0 -52
  28. package/patched/cborg/CHANGELOG.md +0 -513
  29. package/patched/cborg/LICENSE +0 -13
  30. package/patched/cborg/README.md +0 -515
  31. package/patched/cborg/bench/bench.js +0 -117
  32. package/patched/cborg/bench/json.js +0 -124
  33. package/patched/cborg/bench/package.json +0 -8
  34. package/patched/cborg/cborg-4.2.7.tgz +0 -0
  35. package/patched/cborg/cborg.js +0 -31
  36. package/patched/cborg/example-bytestrings.js +0 -180
  37. package/patched/cborg/example-json.js +0 -6
  38. package/patched/cborg/example.js +0 -5
  39. package/patched/cborg/interface.ts +0 -56
  40. package/patched/cborg/lib/0uint.js +0 -227
  41. package/patched/cborg/lib/1negint.js +0 -111
  42. package/patched/cborg/lib/2bytes.js +0 -133
  43. package/patched/cborg/lib/3string.js +0 -90
  44. package/patched/cborg/lib/4array.js +0 -113
  45. package/patched/cborg/lib/5map.js +0 -113
  46. package/patched/cborg/lib/6tag.js +0 -80
  47. package/patched/cborg/lib/7float.js +0 -308
  48. package/patched/cborg/lib/bin.js +0 -189
  49. package/patched/cborg/lib/bl.js +0 -124
  50. package/patched/cborg/lib/byte-utils.js +0 -417
  51. package/patched/cborg/lib/common.js +0 -27
  52. package/patched/cborg/lib/decode.js +0 -209
  53. package/patched/cborg/lib/diagnostic.js +0 -156
  54. package/patched/cborg/lib/diagnostic_test.js +0 -117
  55. package/patched/cborg/lib/encode.js +0 -464
  56. package/patched/cborg/lib/is.js +0 -106
  57. package/patched/cborg/lib/json/decode.js +0 -462
  58. package/patched/cborg/lib/json/encode.js +0 -299
  59. package/patched/cborg/lib/json/json.js +0 -4
  60. package/patched/cborg/lib/jump.js +0 -209
  61. package/patched/cborg/lib/length.js +0 -61
  62. package/patched/cborg/lib/token.js +0 -76
  63. package/patched/cborg/package.json +0 -169
  64. package/patched/cborg/pnpm-lock.yaml +0 -6096
  65. package/patched/cborg/taglib.js +0 -73
  66. package/patched/cborg/test/appendix_a.js +0 -647
  67. package/patched/cborg/test/common.js +0 -18
  68. package/patched/cborg/test/node-test-bin.js +0 -402
  69. package/patched/cborg/test/noop-bin-test.js +0 -3
  70. package/patched/cborg/test/test-0uint.js +0 -103
  71. package/patched/cborg/test/test-1negint.js +0 -96
  72. package/patched/cborg/test/test-2bytes.js +0 -198
  73. package/patched/cborg/test/test-3string.js +0 -136
  74. package/patched/cborg/test/test-4array.js +0 -93
  75. package/patched/cborg/test/test-5map.js +0 -284
  76. package/patched/cborg/test/test-6tag.js +0 -85
  77. package/patched/cborg/test/test-7float.js +0 -131
  78. package/patched/cborg/test/test-bl.js +0 -37
  79. package/patched/cborg/test/test-cbor-vectors.js +0 -107
  80. package/patched/cborg/test/test-decode-errors.js +0 -65
  81. package/patched/cborg/test/test-fuzz.js +0 -42
  82. package/patched/cborg/test/test-json.js +0 -219
  83. package/patched/cborg/test/test-length.js +0 -65
  84. package/patched/cborg/test/test-partial.js +0 -111
  85. package/patched/cborg/tsconfig.json +0 -45
  86. package/patched/cborg/types/cborg.d.ts +0 -28
  87. package/patched/cborg/types/cborg.d.ts.map +0 -1
  88. package/patched/cborg/types/example.d.ts +0 -2
  89. package/patched/cborg/types/example.d.ts.map +0 -1
  90. package/patched/cborg/types/interface.d.ts +0 -47
  91. package/patched/cborg/types/interface.d.ts.map +0 -1
  92. package/patched/cborg/types/lib/0uint.d.ts +0 -100
  93. package/patched/cborg/types/lib/0uint.d.ts.map +0 -1
  94. package/patched/cborg/types/lib/1negint.d.ts +0 -58
  95. package/patched/cborg/types/lib/1negint.d.ts.map +0 -1
  96. package/patched/cborg/types/lib/2bytes.d.ts +0 -68
  97. package/patched/cborg/types/lib/2bytes.d.ts.map +0 -1
  98. package/patched/cborg/types/lib/3string.d.ts +0 -46
  99. package/patched/cborg/types/lib/3string.d.ts.map +0 -1
  100. package/patched/cborg/types/lib/4array.d.ts +0 -65
  101. package/patched/cborg/types/lib/4array.d.ts.map +0 -1
  102. package/patched/cborg/types/lib/5map.d.ts +0 -65
  103. package/patched/cborg/types/lib/5map.d.ts.map +0 -1
  104. package/patched/cborg/types/lib/6tag.d.ts +0 -61
  105. package/patched/cborg/types/lib/6tag.d.ts.map +0 -1
  106. package/patched/cborg/types/lib/7float.d.ts +0 -60
  107. package/patched/cborg/types/lib/7float.d.ts.map +0 -1
  108. package/patched/cborg/types/lib/bin.d.ts +0 -4
  109. package/patched/cborg/types/lib/bin.d.ts.map +0 -1
  110. package/patched/cborg/types/lib/bl.d.ts +0 -26
  111. package/patched/cborg/types/lib/bl.d.ts.map +0 -1
  112. package/patched/cborg/types/lib/byte-utils.d.ts +0 -53
  113. package/patched/cborg/types/lib/byte-utils.d.ts.map +0 -1
  114. package/patched/cborg/types/lib/common.d.ts +0 -10
  115. package/patched/cborg/types/lib/common.d.ts.map +0 -1
  116. package/patched/cborg/types/lib/decode.d.ts +0 -41
  117. package/patched/cborg/types/lib/decode.d.ts.map +0 -1
  118. package/patched/cborg/types/lib/diagnostic.d.ts +0 -12
  119. package/patched/cborg/types/lib/diagnostic.d.ts.map +0 -1
  120. package/patched/cborg/types/lib/diagnostic_test.d.ts +0 -2
  121. package/patched/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
  122. package/patched/cborg/types/lib/encode.d.ts +0 -50
  123. package/patched/cborg/types/lib/encode.d.ts.map +0 -1
  124. package/patched/cborg/types/lib/is.d.ts +0 -6
  125. package/patched/cborg/types/lib/is.d.ts.map +0 -1
  126. package/patched/cborg/types/lib/json/decode.d.ts +0 -67
  127. package/patched/cborg/types/lib/json/decode.d.ts.map +0 -1
  128. package/patched/cborg/types/lib/json/encode.d.ts +0 -11
  129. package/patched/cborg/types/lib/json/encode.d.ts.map +0 -1
  130. package/patched/cborg/types/lib/json/forward-cborg.d.ts +0 -6
  131. package/patched/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
  132. package/patched/cborg/types/lib/json/json.d.ts +0 -6
  133. package/patched/cborg/types/lib/json/json.d.ts.map +0 -1
  134. package/patched/cborg/types/lib/jump.d.ts +0 -12
  135. package/patched/cborg/types/lib/jump.d.ts.map +0 -1
  136. package/patched/cborg/types/lib/length.d.ts +0 -27
  137. package/patched/cborg/types/lib/length.d.ts.map +0 -1
  138. package/patched/cborg/types/lib/token.d.ts +0 -59
  139. package/patched/cborg/types/lib/token.d.ts.map +0 -1
  140. package/patched/cborg/types/taglib.d.ts +0 -18
  141. package/patched/cborg/types/taglib.d.ts.map +0 -1
  142. package/patched/cborg/types/tsconfig.tsbuildinfo +0 -1
  143. package/src/@ipld/car/car/LICENSE +0 -4
  144. package/src/@ipld/car/car/README.md +0 -1078
  145. package/src/@ipld/car/car/dist/index.min.js +0 -5
  146. package/src/@ipld/car/car/dist/src/api.d.ts +0 -72
  147. package/src/@ipld/car/car/dist/src/api.d.ts.map +0 -1
  148. package/src/@ipld/car/car/dist/src/buffer-decoder.d.ts +0 -67
  149. package/src/@ipld/car/car/dist/src/buffer-decoder.d.ts.map +0 -1
  150. package/src/@ipld/car/car/dist/src/buffer-reader-browser.d.ts +0 -116
  151. package/src/@ipld/car/car/dist/src/buffer-reader-browser.d.ts.map +0 -1
  152. package/src/@ipld/car/car/dist/src/buffer-reader.d.ts +0 -31
  153. package/src/@ipld/car/car/dist/src/buffer-reader.d.ts.map +0 -1
  154. package/src/@ipld/car/car/dist/src/buffer-writer.d.ts +0 -86
  155. package/src/@ipld/car/car/dist/src/buffer-writer.d.ts.map +0 -1
  156. package/src/@ipld/car/car/dist/src/coding.d.ts +0 -49
  157. package/src/@ipld/car/car/dist/src/coding.d.ts.map +0 -1
  158. package/src/@ipld/car/car/dist/src/decoder-common.d.ts +0 -43
  159. package/src/@ipld/car/car/dist/src/decoder-common.d.ts.map +0 -1
  160. package/src/@ipld/car/car/dist/src/decoder.d.ts +0 -87
  161. package/src/@ipld/car/car/dist/src/decoder.d.ts.map +0 -1
  162. package/src/@ipld/car/car/dist/src/encoder.d.ts +0 -17
  163. package/src/@ipld/car/car/dist/src/encoder.d.ts.map +0 -1
  164. package/src/@ipld/car/car/dist/src/header-validator.d.ts +0 -5
  165. package/src/@ipld/car/car/dist/src/header-validator.d.ts.map +0 -1
  166. package/src/@ipld/car/car/dist/src/index-browser.d.ts +0 -10
  167. package/src/@ipld/car/car/dist/src/index-browser.d.ts.map +0 -1
  168. package/src/@ipld/car/car/dist/src/index.d.ts +0 -11
  169. package/src/@ipld/car/car/dist/src/index.d.ts.map +0 -1
  170. package/src/@ipld/car/car/dist/src/indexed-reader-browser.d.ts +0 -5
  171. package/src/@ipld/car/car/dist/src/indexed-reader-browser.d.ts.map +0 -1
  172. package/src/@ipld/car/car/dist/src/indexed-reader.d.ts +0 -152
  173. package/src/@ipld/car/car/dist/src/indexed-reader.d.ts.map +0 -1
  174. package/src/@ipld/car/car/dist/src/indexer.d.ts +0 -95
  175. package/src/@ipld/car/car/dist/src/indexer.d.ts.map +0 -1
  176. package/src/@ipld/car/car/dist/src/iterator-channel.d.ts +0 -7
  177. package/src/@ipld/car/car/dist/src/iterator-channel.d.ts.map +0 -1
  178. package/src/@ipld/car/car/dist/src/iterator.d.ts +0 -174
  179. package/src/@ipld/car/car/dist/src/iterator.d.ts.map +0 -1
  180. package/src/@ipld/car/car/dist/src/reader-browser.d.ts +0 -151
  181. package/src/@ipld/car/car/dist/src/reader-browser.d.ts.map +0 -1
  182. package/src/@ipld/car/car/dist/src/reader.d.ts +0 -35
  183. package/src/@ipld/car/car/dist/src/reader.d.ts.map +0 -1
  184. package/src/@ipld/car/car/dist/src/writer-browser.d.ts +0 -155
  185. package/src/@ipld/car/car/dist/src/writer-browser.d.ts.map +0 -1
  186. package/src/@ipld/car/car/dist/src/writer.d.ts +0 -45
  187. package/src/@ipld/car/car/dist/src/writer.d.ts.map +0 -1
  188. package/src/@ipld/car/car/node_modules/.bin/cborg +0 -17
  189. package/src/@ipld/car/car/package.json +0 -235
  190. package/src/@ipld/car/car/src/api.ts +0 -90
  191. package/src/@ipld/car/car/src/buffer-decoder.js +0 -213
  192. package/src/@ipld/car/car/src/buffer-reader-browser.js +0 -144
  193. package/src/@ipld/car/car/src/buffer-reader.js +0 -51
  194. package/src/@ipld/car/car/src/buffer-writer.js +0 -286
  195. package/src/@ipld/car/car/src/coding.ts +0 -68
  196. package/src/@ipld/car/car/src/decoder-common.js +0 -82
  197. package/src/@ipld/car/car/src/decoder.js +0 -347
  198. package/src/@ipld/car/car/src/encoder.js +0 -76
  199. package/src/@ipld/car/car/src/header-validator.js +0 -214
  200. package/src/@ipld/car/car/src/header.ipldsch +0 -18
  201. package/src/@ipld/car/car/src/index-browser.js +0 -18
  202. package/src/@ipld/car/car/src/index.js +0 -21
  203. package/src/@ipld/car/car/src/indexed-reader-browser.js +0 -7
  204. package/src/@ipld/car/car/src/indexed-reader.js +0 -211
  205. package/src/@ipld/car/car/src/indexer.js +0 -130
  206. package/src/@ipld/car/car/src/iterator-channel.js +0 -91
  207. package/src/@ipld/car/car/src/iterator.js +0 -267
  208. package/src/@ipld/car/car/src/reader-browser.js +0 -194
  209. package/src/@ipld/car/car/src/reader.js +0 -56
  210. package/src/@ipld/car/car/src/writer-browser.js +0 -250
  211. package/src/@ipld/car/car/src/writer.js +0 -84
  212. package/src/@ipld/dag-cbor/dag-cbor/LICENSE +0 -4
  213. package/src/@ipld/dag-cbor/dag-cbor/README.md +0 -80
  214. package/src/@ipld/dag-cbor/dag-cbor/dist/index.min.js +0 -3
  215. package/src/@ipld/dag-cbor/dag-cbor/dist/src/index.d.ts +0 -67
  216. package/src/@ipld/dag-cbor/dag-cbor/dist/src/index.d.ts.map +0 -1
  217. package/src/@ipld/dag-cbor/dag-cbor/node_modules/.bin/cborg +0 -17
  218. package/src/@ipld/dag-cbor/dag-cbor/package.json +0 -171
  219. package/src/@ipld/dag-cbor/dag-cbor/src/index.js +0 -147
  220. package/src/@ipld/dag-json/dag-json/LICENSE +0 -4
  221. package/src/@ipld/dag-json/dag-json/README.md +0 -58
  222. package/src/@ipld/dag-json/dag-json/dist/index.min.js +0 -3
  223. package/src/@ipld/dag-json/dag-json/dist/src/index.d.ts +0 -12
  224. package/src/@ipld/dag-json/dag-json/dist/src/index.d.ts.map +0 -1
  225. package/src/@ipld/dag-json/dag-json/node_modules/.bin/cborg +0 -17
  226. package/src/@ipld/dag-json/dag-json/package.json +0 -173
  227. package/src/@ipld/dag-json/dag-json/src/index.js +0 -291
  228. package/src/@web3-storage/pail/pail/LICENSE.md +0 -232
  229. package/src/@web3-storage/pail/pail/README.md +0 -84
  230. package/src/@web3-storage/pail/pail/cli.js +0 -218
  231. package/src/@web3-storage/pail/pail/dist/src/api.d.ts +0 -59
  232. package/src/@web3-storage/pail/pail/dist/src/api.d.ts.map +0 -1
  233. package/src/@web3-storage/pail/pail/dist/src/batch/api.d.ts +0 -31
  234. package/src/@web3-storage/pail/pail/dist/src/batch/api.d.ts.map +0 -1
  235. package/src/@web3-storage/pail/pail/dist/src/batch/index.d.ts +0 -75
  236. package/src/@web3-storage/pail/pail/dist/src/batch/index.d.ts.map +0 -1
  237. package/src/@web3-storage/pail/pail/dist/src/batch/shard.d.ts +0 -3
  238. package/src/@web3-storage/pail/pail/dist/src/batch/shard.d.ts.map +0 -1
  239. package/src/@web3-storage/pail/pail/dist/src/block.d.ts +0 -35
  240. package/src/@web3-storage/pail/pail/dist/src/block.d.ts.map +0 -1
  241. package/src/@web3-storage/pail/pail/dist/src/clock/api.d.ts +0 -10
  242. package/src/@web3-storage/pail/pail/dist/src/clock/api.d.ts.map +0 -1
  243. package/src/@web3-storage/pail/pail/dist/src/clock/index.d.ts +0 -48
  244. package/src/@web3-storage/pail/pail/dist/src/clock/index.d.ts.map +0 -1
  245. package/src/@web3-storage/pail/pail/dist/src/crdt/api.d.ts +0 -26
  246. package/src/@web3-storage/pail/pail/dist/src/crdt/api.d.ts.map +0 -1
  247. package/src/@web3-storage/pail/pail/dist/src/crdt/batch/api.d.ts +0 -11
  248. package/src/@web3-storage/pail/pail/dist/src/crdt/batch/api.d.ts.map +0 -1
  249. package/src/@web3-storage/pail/pail/dist/src/crdt/batch/index.d.ts +0 -5
  250. package/src/@web3-storage/pail/pail/dist/src/crdt/batch/index.d.ts.map +0 -1
  251. package/src/@web3-storage/pail/pail/dist/src/crdt/index.d.ts +0 -9
  252. package/src/@web3-storage/pail/pail/dist/src/crdt/index.d.ts.map +0 -1
  253. package/src/@web3-storage/pail/pail/dist/src/diff.d.ts +0 -13
  254. package/src/@web3-storage/pail/pail/dist/src/diff.d.ts.map +0 -1
  255. package/src/@web3-storage/pail/pail/dist/src/index.d.ts +0 -10
  256. package/src/@web3-storage/pail/pail/dist/src/index.d.ts.map +0 -1
  257. package/src/@web3-storage/pail/pail/dist/src/merge.d.ts +0 -5
  258. package/src/@web3-storage/pail/pail/dist/src/merge.d.ts.map +0 -1
  259. package/src/@web3-storage/pail/pail/dist/src/shard.d.ts +0 -43
  260. package/src/@web3-storage/pail/pail/dist/src/shard.d.ts.map +0 -1
  261. package/src/@web3-storage/pail/pail/dist/tsconfig.tsbuildinfo +0 -1
  262. package/src/@web3-storage/pail/pail/node_modules/.bin/pail +0 -17
  263. package/src/@web3-storage/pail/pail/package.json +0 -173
  264. package/src/@web3-storage/pail/pail/src/api.js +0 -1
  265. package/src/@web3-storage/pail/pail/src/api.ts +0 -90
  266. package/src/@web3-storage/pail/pail/src/batch/api.js +0 -1
  267. package/src/@web3-storage/pail/pail/src/batch/api.ts +0 -59
  268. package/src/@web3-storage/pail/pail/src/batch/index.js +0 -258
  269. package/src/@web3-storage/pail/pail/src/batch/shard.js +0 -13
  270. package/src/@web3-storage/pail/pail/src/block.js +0 -75
  271. package/src/@web3-storage/pail/pail/src/clock/api.js +0 -1
  272. package/src/@web3-storage/pail/pail/src/clock/api.ts +0 -12
  273. package/src/@web3-storage/pail/pail/src/clock/index.js +0 -182
  274. package/src/@web3-storage/pail/pail/src/crdt/api.js +0 -1
  275. package/src/@web3-storage/pail/pail/src/crdt/api.ts +0 -33
  276. package/src/@web3-storage/pail/pail/src/crdt/batch/api.js +0 -1
  277. package/src/@web3-storage/pail/pail/src/crdt/batch/api.ts +0 -30
  278. package/src/@web3-storage/pail/pail/src/crdt/batch/index.js +0 -155
  279. package/src/@web3-storage/pail/pail/src/crdt/index.js +0 -354
  280. package/src/@web3-storage/pail/pail/src/diff.js +0 -151
  281. package/src/@web3-storage/pail/pail/src/index.js +0 -406
  282. package/src/@web3-storage/pail/pail/src/merge.js +0 -43
  283. package/src/@web3-storage/pail/pail/src/shard.js +0 -180
  284. package/src/cborg/cborg/.github/dependabot.yml +0 -16
  285. package/src/cborg/cborg/.github/workflows/test-and-release.yml +0 -52
  286. package/src/cborg/cborg/CHANGELOG.md +0 -513
  287. package/src/cborg/cborg/LICENSE +0 -13
  288. package/src/cborg/cborg/README.md +0 -515
  289. package/src/cborg/cborg/bench/bench.js +0 -117
  290. package/src/cborg/cborg/bench/json.js +0 -124
  291. package/src/cborg/cborg/bench/package.json +0 -8
  292. package/src/cborg/cborg/cborg.js +0 -31
  293. package/src/cborg/cborg/example-bytestrings.js +0 -180
  294. package/src/cborg/cborg/example-json.js +0 -6
  295. package/src/cborg/cborg/example.js +0 -5
  296. package/src/cborg/cborg/interface.ts +0 -56
  297. package/src/cborg/cborg/lib/0uint.js +0 -227
  298. package/src/cborg/cborg/lib/1negint.js +0 -111
  299. package/src/cborg/cborg/lib/2bytes.js +0 -133
  300. package/src/cborg/cborg/lib/3string.js +0 -90
  301. package/src/cborg/cborg/lib/4array.js +0 -113
  302. package/src/cborg/cborg/lib/5map.js +0 -113
  303. package/src/cborg/cborg/lib/6tag.js +0 -80
  304. package/src/cborg/cborg/lib/7float.js +0 -308
  305. package/src/cborg/cborg/lib/bin.js +0 -189
  306. package/src/cborg/cborg/lib/bl.js +0 -124
  307. package/src/cborg/cborg/lib/byte-utils.js +0 -417
  308. package/src/cborg/cborg/lib/common.js +0 -27
  309. package/src/cborg/cborg/lib/decode.js +0 -209
  310. package/src/cborg/cborg/lib/diagnostic.js +0 -156
  311. package/src/cborg/cborg/lib/diagnostic_test.js +0 -117
  312. package/src/cborg/cborg/lib/encode.js +0 -464
  313. package/src/cborg/cborg/lib/is.js +0 -106
  314. package/src/cborg/cborg/lib/json/decode.js +0 -462
  315. package/src/cborg/cborg/lib/json/encode.js +0 -299
  316. package/src/cborg/cborg/lib/json/json.js +0 -4
  317. package/src/cborg/cborg/lib/jump.js +0 -209
  318. package/src/cborg/cborg/lib/length.js +0 -61
  319. package/src/cborg/cborg/lib/token.js +0 -76
  320. package/src/cborg/cborg/node_modules/.bin/cborg +0 -17
  321. package/src/cborg/cborg/package.json +0 -168
  322. package/src/cborg/cborg/taglib.js +0 -73
  323. package/src/cborg/cborg/test/appendix_a.js +0 -647
  324. package/src/cborg/cborg/test/common.js +0 -18
  325. package/src/cborg/cborg/test/node-test-bin.js +0 -402
  326. package/src/cborg/cborg/test/noop-bin-test.js +0 -3
  327. package/src/cborg/cborg/test/test-0uint.js +0 -103
  328. package/src/cborg/cborg/test/test-1negint.js +0 -96
  329. package/src/cborg/cborg/test/test-2bytes.js +0 -198
  330. package/src/cborg/cborg/test/test-3string.js +0 -136
  331. package/src/cborg/cborg/test/test-4array.js +0 -93
  332. package/src/cborg/cborg/test/test-5map.js +0 -284
  333. package/src/cborg/cborg/test/test-6tag.js +0 -85
  334. package/src/cborg/cborg/test/test-7float.js +0 -131
  335. package/src/cborg/cborg/test/test-bl.js +0 -37
  336. package/src/cborg/cborg/test/test-cbor-vectors.js +0 -107
  337. package/src/cborg/cborg/test/test-decode-errors.js +0 -65
  338. package/src/cborg/cborg/test/test-fuzz.js +0 -42
  339. package/src/cborg/cborg/test/test-json.js +0 -219
  340. package/src/cborg/cborg/test/test-length.js +0 -65
  341. package/src/cborg/cborg/test/test-partial.js +0 -111
  342. package/src/cborg/cborg/tsconfig.json +0 -45
  343. package/src/cborg/cborg/types/cborg.d.ts +0 -28
  344. package/src/cborg/cborg/types/cborg.d.ts.map +0 -1
  345. package/src/cborg/cborg/types/example.d.ts +0 -2
  346. package/src/cborg/cborg/types/example.d.ts.map +0 -1
  347. package/src/cborg/cborg/types/interface.d.ts +0 -47
  348. package/src/cborg/cborg/types/interface.d.ts.map +0 -1
  349. package/src/cborg/cborg/types/lib/0uint.d.ts +0 -100
  350. package/src/cborg/cborg/types/lib/0uint.d.ts.map +0 -1
  351. package/src/cborg/cborg/types/lib/1negint.d.ts +0 -58
  352. package/src/cborg/cborg/types/lib/1negint.d.ts.map +0 -1
  353. package/src/cborg/cborg/types/lib/2bytes.d.ts +0 -68
  354. package/src/cborg/cborg/types/lib/2bytes.d.ts.map +0 -1
  355. package/src/cborg/cborg/types/lib/3string.d.ts +0 -46
  356. package/src/cborg/cborg/types/lib/3string.d.ts.map +0 -1
  357. package/src/cborg/cborg/types/lib/4array.d.ts +0 -65
  358. package/src/cborg/cborg/types/lib/4array.d.ts.map +0 -1
  359. package/src/cborg/cborg/types/lib/5map.d.ts +0 -65
  360. package/src/cborg/cborg/types/lib/5map.d.ts.map +0 -1
  361. package/src/cborg/cborg/types/lib/6tag.d.ts +0 -61
  362. package/src/cborg/cborg/types/lib/6tag.d.ts.map +0 -1
  363. package/src/cborg/cborg/types/lib/7float.d.ts +0 -60
  364. package/src/cborg/cborg/types/lib/7float.d.ts.map +0 -1
  365. package/src/cborg/cborg/types/lib/bin.d.ts +0 -4
  366. package/src/cborg/cborg/types/lib/bin.d.ts.map +0 -1
  367. package/src/cborg/cborg/types/lib/bl.d.ts +0 -26
  368. package/src/cborg/cborg/types/lib/bl.d.ts.map +0 -1
  369. package/src/cborg/cborg/types/lib/byte-utils.d.ts +0 -53
  370. package/src/cborg/cborg/types/lib/byte-utils.d.ts.map +0 -1
  371. package/src/cborg/cborg/types/lib/common.d.ts +0 -10
  372. package/src/cborg/cborg/types/lib/common.d.ts.map +0 -1
  373. package/src/cborg/cborg/types/lib/decode.d.ts +0 -41
  374. package/src/cborg/cborg/types/lib/decode.d.ts.map +0 -1
  375. package/src/cborg/cborg/types/lib/diagnostic.d.ts +0 -12
  376. package/src/cborg/cborg/types/lib/diagnostic.d.ts.map +0 -1
  377. package/src/cborg/cborg/types/lib/diagnostic_test.d.ts +0 -2
  378. package/src/cborg/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
  379. package/src/cborg/cborg/types/lib/encode.d.ts +0 -50
  380. package/src/cborg/cborg/types/lib/encode.d.ts.map +0 -1
  381. package/src/cborg/cborg/types/lib/is.d.ts +0 -6
  382. package/src/cborg/cborg/types/lib/is.d.ts.map +0 -1
  383. package/src/cborg/cborg/types/lib/json/decode.d.ts +0 -67
  384. package/src/cborg/cborg/types/lib/json/decode.d.ts.map +0 -1
  385. package/src/cborg/cborg/types/lib/json/encode.d.ts +0 -11
  386. package/src/cborg/cborg/types/lib/json/encode.d.ts.map +0 -1
  387. package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts +0 -6
  388. package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
  389. package/src/cborg/cborg/types/lib/json/json.d.ts +0 -6
  390. package/src/cborg/cborg/types/lib/json/json.d.ts.map +0 -1
  391. package/src/cborg/cborg/types/lib/jump.d.ts +0 -12
  392. package/src/cborg/cborg/types/lib/jump.d.ts.map +0 -1
  393. package/src/cborg/cborg/types/lib/length.d.ts +0 -27
  394. package/src/cborg/cborg/types/lib/length.d.ts.map +0 -1
  395. package/src/cborg/cborg/types/lib/token.d.ts +0 -59
  396. package/src/cborg/cborg/types/lib/token.d.ts.map +0 -1
  397. package/src/cborg/cborg/types/taglib.d.ts +0 -18
  398. package/src/cborg/cborg/types/taglib.d.ts.map +0 -1
  399. package/src/cborg/cborg/types/tsconfig.tsbuildinfo +0 -1
  400. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/LICENSE +0 -4
  401. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/README.md +0 -105
  402. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/index.min.js +0 -3
  403. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.d.ts +0 -57
  404. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.d.ts.map +0 -1
  405. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.js +0 -73
  406. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.js.map +0 -1
  407. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.d.ts +0 -355
  408. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.d.ts.map +0 -1
  409. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.js +0 -197
  410. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.js.map +0 -1
  411. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts +0 -4
  412. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map +0 -1
  413. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js +0 -9
  414. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js.map +0 -1
  415. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.d.ts +0 -4
  416. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.d.ts.map +0 -1
  417. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.js +0 -9
  418. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.js.map +0 -1
  419. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts +0 -4
  420. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map +0 -1
  421. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.js +0 -38
  422. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.js.map +0 -1
  423. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts +0 -4
  424. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map +0 -1
  425. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.js +0 -30
  426. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.js.map +0 -1
  427. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.d.ts +0 -4
  428. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.d.ts.map +0 -1
  429. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.js +0 -9
  430. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.js.map +0 -1
  431. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts +0 -4
  432. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map +0 -1
  433. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.js +0 -37
  434. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.js.map +0 -1
  435. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts +0 -4
  436. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map +0 -1
  437. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.js +0 -29
  438. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.js.map +0 -1
  439. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts +0 -4
  440. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map +0 -1
  441. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js +0 -153
  442. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js.map +0 -1
  443. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts +0 -4
  444. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map +0 -1
  445. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +0 -59
  446. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js.map +0 -1
  447. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts +0 -4
  448. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map +0 -1
  449. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.js +0 -25
  450. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.js.map +0 -1
  451. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts +0 -4
  452. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map +0 -1
  453. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.js +0 -104
  454. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.js.map +0 -1
  455. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts +0 -3
  456. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map +0 -1
  457. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.js +0 -20
  458. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.js.map +0 -1
  459. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts +0 -6
  460. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map +0 -1
  461. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.js +0 -116
  462. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.js.map +0 -1
  463. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.d.ts +0 -4
  464. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.d.ts.map +0 -1
  465. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.js +0 -57
  466. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.js.map +0 -1
  467. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts +0 -6
  468. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map +0 -1
  469. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js +0 -30
  470. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js.map +0 -1
  471. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/typedoc-urls.json +0 -58
  472. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/package.json +0 -180
  473. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/errors.ts +0 -87
  474. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/index.ts +0 -498
  475. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/dag-cbor.ts +0 -12
  476. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/dag-json.ts +0 -12
  477. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/identity.ts +0 -49
  478. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/index.ts +0 -35
  479. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/json.ts +0 -12
  480. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/raw.ts +0 -49
  481. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.ts +0 -39
  482. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.ts +0 -198
  483. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts +0 -76
  484. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.ts +0 -37
  485. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.ts +0 -121
  486. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/extract-data-from-block.ts +0 -24
  487. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.ts +0 -149
  488. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/resolve-object-path.ts +0 -62
  489. package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/validate-offset-and-length.ts +0 -38
@@ -1,232 +0,0 @@
1
- The contents of this repository are Copyright (c) corresponding authors and
2
- contributors, licensed under the `Permissive License Stack` meaning either of:
3
-
4
- - Apache-2.0 Software License: https://www.apache.org/licenses/LICENSE-2.0
5
- ([...4tr2kfsq](https://dweb.link/ipfs/bafkreiankqxazcae4onkp436wag2lj3ccso4nawxqkkfckd6cg4tr2kfsq))
6
-
7
- - MIT Software License: https://opensource.org/licenses/MIT
8
- ([...vljevcba](https://dweb.link/ipfs/bafkreiepofszg4gfe2gzuhojmksgemsub2h4uy2gewdnr35kswvljevcba))
9
-
10
- You may not use the contents of this repository except in compliance
11
- with one of the listed Licenses. For an extended clarification of the
12
- intent behind the choice of Licensing please refer to
13
- https://protocol.ai/blog/announcing-the-permissive-license-stack/
14
-
15
- Unless required by applicable law or agreed to in writing, software
16
- distributed under the terms listed in this notice is distributed on
17
- an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
18
- either express or implied. See each License for the specific language
19
- governing permissions and limitations under that License.
20
-
21
- <!--- SPDX-License-Identifier: Apache-2.0 OR MIT -->
22
-
23
- `SPDX-License-Identifier: Apache-2.0 OR MIT`
24
-
25
- Verbatim copies of both licenses are included below:
26
-
27
- <details><summary>Apache-2.0 Software License</summary>
28
-
29
- ```
30
- Apache License
31
- Version 2.0, January 2004
32
- http://www.apache.org/licenses/
33
-
34
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
35
-
36
- 1. Definitions.
37
-
38
- "License" shall mean the terms and conditions for use, reproduction,
39
- and distribution as defined by Sections 1 through 9 of this document.
40
-
41
- "Licensor" shall mean the copyright owner or entity authorized by
42
- the copyright owner that is granting the License.
43
-
44
- "Legal Entity" shall mean the union of the acting entity and all
45
- other entities that control, are controlled by, or are under common
46
- control with that entity. For the purposes of this definition,
47
- "control" means (i) the power, direct or indirect, to cause the
48
- direction or management of such entity, whether by contract or
49
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
50
- outstanding shares, or (iii) beneficial ownership of such entity.
51
-
52
- "You" (or "Your") shall mean an individual or Legal Entity
53
- exercising permissions granted by this License.
54
-
55
- "Source" form shall mean the preferred form for making modifications,
56
- including but not limited to software source code, documentation
57
- source, and configuration files.
58
-
59
- "Object" form shall mean any form resulting from mechanical
60
- transformation or translation of a Source form, including but
61
- not limited to compiled object code, generated documentation,
62
- and conversions to other media types.
63
-
64
- "Work" shall mean the work of authorship, whether in Source or
65
- Object form, made available under the License, as indicated by a
66
- copyright notice that is included in or attached to the work
67
- (an example is provided in the Appendix below).
68
-
69
- "Derivative Works" shall mean any work, whether in Source or Object
70
- form, that is based on (or derived from) the Work and for which the
71
- editorial revisions, annotations, elaborations, or other modifications
72
- represent, as a whole, an original work of authorship. For the purposes
73
- of this License, Derivative Works shall not include works that remain
74
- separable from, or merely link (or bind by name) to the interfaces of,
75
- the Work and Derivative Works thereof.
76
-
77
- "Contribution" shall mean any work of authorship, including
78
- the original version of the Work and any modifications or additions
79
- to that Work or Derivative Works thereof, that is intentionally
80
- submitted to Licensor for inclusion in the Work by the copyright owner
81
- or by an individual or Legal Entity authorized to submit on behalf of
82
- the copyright owner. For the purposes of this definition, "submitted"
83
- means any form of electronic, verbal, or written communication sent
84
- to the Licensor or its representatives, including but not limited to
85
- communication on electronic mailing lists, source code control systems,
86
- and issue tracking systems that are managed by, or on behalf of, the
87
- Licensor for the purpose of discussing and improving the Work, but
88
- excluding communication that is conspicuously marked or otherwise
89
- designated in writing by the copyright owner as "Not a Contribution."
90
-
91
- "Contributor" shall mean Licensor and any individual or Legal Entity
92
- on behalf of whom a Contribution has been received by Licensor and
93
- subsequently incorporated within the Work.
94
-
95
- 2. Grant of Copyright License. Subject to the terms and conditions of
96
- this License, each Contributor hereby grants to You a perpetual,
97
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
98
- copyright license to reproduce, prepare Derivative Works of,
99
- publicly display, publicly perform, sublicense, and distribute the
100
- Work and such Derivative Works in Source or Object form.
101
-
102
- 3. Grant of Patent License. Subject to the terms and conditions of
103
- this License, each Contributor hereby grants to You a perpetual,
104
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
105
- (except as stated in this section) patent license to make, have made,
106
- use, offer to sell, sell, import, and otherwise transfer the Work,
107
- where such license applies only to those patent claims licensable
108
- by such Contributor that are necessarily infringed by their
109
- Contribution(s) alone or by combination of their Contribution(s)
110
- with the Work to which such Contribution(s) was submitted. If You
111
- institute patent litigation against any entity (including a
112
- cross-claim or counterclaim in a lawsuit) alleging that the Work
113
- or a Contribution incorporated within the Work constitutes direct
114
- or contributory patent infringement, then any patent licenses
115
- granted to You under this License for that Work shall terminate
116
- as of the date such litigation is filed.
117
-
118
- 4. Redistribution. You may reproduce and distribute copies of the
119
- Work or Derivative Works thereof in any medium, with or without
120
- modifications, and in Source or Object form, provided that You
121
- meet the following conditions:
122
-
123
- (a) You must give any other recipients of the Work or
124
- Derivative Works a copy of this License; and
125
-
126
- (b) You must cause any modified files to carry prominent notices
127
- stating that You changed the files; and
128
-
129
- (c) You must retain, in the Source form of any Derivative Works
130
- that You distribute, all copyright, patent, trademark, and
131
- attribution notices from the Source form of the Work,
132
- excluding those notices that do not pertain to any part of
133
- the Derivative Works; and
134
-
135
- (d) If the Work includes a "NOTICE" text file as part of its
136
- distribution, then any Derivative Works that You distribute must
137
- include a readable copy of the attribution notices contained
138
- within such NOTICE file, excluding those notices that do not
139
- pertain to any part of the Derivative Works, in at least one
140
- of the following places: within a NOTICE text file distributed
141
- as part of the Derivative Works; within the Source form or
142
- documentation, if provided along with the Derivative Works; or,
143
- within a display generated by the Derivative Works, if and
144
- wherever such third-party notices normally appear. The contents
145
- of the NOTICE file are for informational purposes only and
146
- do not modify the License. You may add Your own attribution
147
- notices within Derivative Works that You distribute, alongside
148
- or as an addendum to the NOTICE text from the Work, provided
149
- that such additional attribution notices cannot be construed
150
- as modifying the License.
151
-
152
- You may add Your own copyright statement to Your modifications and
153
- may provide additional or different license terms and conditions
154
- for use, reproduction, or distribution of Your modifications, or
155
- for any such Derivative Works as a whole, provided Your use,
156
- reproduction, and distribution of the Work otherwise complies with
157
- the conditions stated in this License.
158
-
159
- 5. Submission of Contributions. Unless You explicitly state otherwise,
160
- any Contribution intentionally submitted for inclusion in the Work
161
- by You to the Licensor shall be under the terms and conditions of
162
- this License, without any additional terms or conditions.
163
- Notwithstanding the above, nothing herein shall supersede or modify
164
- the terms of any separate license agreement you may have executed
165
- with Licensor regarding such Contributions.
166
-
167
- 6. Trademarks. This License does not grant permission to use the trade
168
- names, trademarks, service marks, or product names of the Licensor,
169
- except as required for reasonable and customary use in describing the
170
- origin of the Work and reproducing the content of the NOTICE file.
171
-
172
- 7. Disclaimer of Warranty. Unless required by applicable law or
173
- agreed to in writing, Licensor provides the Work (and each
174
- Contributor provides its Contributions) on an "AS IS" BASIS,
175
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
176
- implied, including, without limitation, any warranties or conditions
177
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
178
- PARTICULAR PURPOSE. You are solely responsible for determining the
179
- appropriateness of using or redistributing the Work and assume any
180
- risks associated with Your exercise of permissions under this License.
181
-
182
- 8. Limitation of Liability. In no event and under no legal theory,
183
- whether in tort (including negligence), contract, or otherwise,
184
- unless required by applicable law (such as deliberate and grossly
185
- negligent acts) or agreed to in writing, shall any Contributor be
186
- liable to You for damages, including any direct, indirect, special,
187
- incidental, or consequential damages of any character arising as a
188
- result of this License or out of the use or inability to use the
189
- Work (including but not limited to damages for loss of goodwill,
190
- work stoppage, computer failure or malfunction, or any and all
191
- other commercial damages or losses), even if such Contributor
192
- has been advised of the possibility of such damages.
193
-
194
- 9. Accepting Warranty or Additional Liability. While redistributing
195
- the Work or Derivative Works thereof, You may choose to offer,
196
- and charge a fee for, acceptance of support, warranty, indemnity,
197
- or other liability obligations and/or rights consistent with this
198
- License. However, in accepting such obligations, You may act only
199
- on Your own behalf and on Your sole responsibility, not on behalf
200
- of any other Contributor, and only if You agree to indemnify,
201
- defend, and hold each Contributor harmless for any liability
202
- incurred by, or claims asserted against, such Contributor by reason
203
- of your accepting any such warranty or additional liability.
204
-
205
- END OF TERMS AND CONDITIONS
206
- ```
207
-
208
- </details>
209
-
210
- <details><summary>MIT Software License</summary>
211
-
212
- ```
213
- Permission is hereby granted, free of charge, to any person obtaining a copy
214
- of this software and associated documentation files (the "Software"), to deal
215
- in the Software without restriction, including without limitation the rights
216
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
217
- copies of the Software, and to permit persons to whom the Software is
218
- furnished to do so, subject to the following conditions:
219
-
220
- The above copyright notice and this permission notice shall be included in
221
- all copies or substantial portions of the Software.
222
-
223
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
226
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
227
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
228
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
229
- THE SOFTWARE.
230
- ```
231
-
232
- </details>
@@ -1,84 +0,0 @@
1
- # pail
2
-
3
- [![Test](https://github.com/web3-storage/pail/actions/workflows/ci.yml/badge.svg)](https://github.com/web3-storage/pail/actions/workflows/ci.yml)
4
- [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
5
-
6
- DAG based key value store. Sharded DAG that minimises traversals and work to build shards.
7
-
8
- * 📖 [Read the SPEC](https://github.com/web3-storage/specs/blob/4163e28d7e6a7c44cff68db9d9bffb9b37707dc6/pail.md).
9
- * 🎬 [Watch the Presentation](https://youtu.be/f-BrtpYKZfg).
10
-
11
- ## Install
12
-
13
- ```
14
- npm install @web3-storage/pail
15
- ```
16
-
17
- ## Usage
18
-
19
- ```js
20
- import { put, get, del } from '@web3-storage/pail'
21
- import { ShardBlock } from '@web3-storage/pail/shard'
22
- import { MemoryBlockstore } from '@web3-storage/pail/block'
23
-
24
- // Initialize a new bucket
25
- const blocks = new MemoryBlockstore()
26
- const init = await ShardBlock.create() // empty root shard
27
- await blocks.put(init.cid, init.bytes)
28
-
29
- // Add a key and value to the bucket
30
- const { root, additions, removals } = await put(blocks, init.cid, 'path/to/data0', dataCID0)
31
-
32
- console.log(`new root: ${root}`)
33
-
34
- // Process the diff
35
- for (const block of additions) {
36
- await blocks.put(block.cid, block.bytes)
37
- }
38
- for (const block of removals) {
39
- await blocks.delete(block.cid)
40
- }
41
- ```
42
-
43
- ### Batch operations
44
-
45
- If adding many multiple items to the pail together, it is faster to batch them together.
46
-
47
- ```js
48
- import { put, get, del } from '@web3-storage/pail'
49
- import { ShardBlock } from '@web3-storage/pail/shard'
50
- import { MemoryBlockstore } from '@web3-storage/pail/block'
51
- import * as Batch from '@web3-storage/pail/batch'
52
-
53
- // Initialize a new bucket
54
- const blocks = new MemoryBlockstore()
55
- const init = await ShardBlock.create() // empty root shard
56
- await blocks.put(init.cid, init.bytes)
57
-
58
- const batch = await Batch.create(blocks, init.cid)
59
-
60
- // items is an array of `{ key: string, value: CID }` - the items to add to the pail
61
- for (const item of items) {
62
- await batch.put(item.key, item.value)
63
- }
64
-
65
- const { root, additions, removals } = await batch.commit()
66
-
67
- console.log(`new root: ${root}`)
68
-
69
- // Process the diff
70
- for (const block of additions) {
71
- await blocks.put(block.cid, block.bytes)
72
- }
73
- for (const block of removals) {
74
- await blocks.delete(block.cid)
75
- }
76
- ```
77
-
78
- ## Contributing
79
-
80
- Feel free to join in. All welcome. [Open an issue](https://github.com/web3-storage/pail/issues)!
81
-
82
- ## License
83
-
84
- Dual-licensed under [MIT or Apache 2.0](https://github.com/web3-storage/pail/blob/main/LICENSE.md)
@@ -1,218 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'fs'
3
- import os from 'os'
4
- import { join } from 'path'
5
- import { Readable, Writable } from 'stream'
6
- import sade from 'sade'
7
- import { CID } from 'multiformats/cid'
8
- import { CARReaderStream, CARWriterStream } from 'carstream'
9
- import clc from 'cli-color'
10
- import archy from 'archy'
11
- // eslint-disable-next-line no-unused-vars
12
- import * as API from './src/api.js'
13
- import { put, get, del, entries } from './src/index.js'
14
- import { ShardFetcher, ShardBlock, isShardLink } from './src/shard.js'
15
- import { difference } from './src/diff.js'
16
- import { merge } from './src/merge.js'
17
- import { MemoryBlockstore, MultiBlockFetcher } from './src/block.js'
18
-
19
- const cli = sade('pail')
20
- .option('--path', 'Path to data store.', './pail.car')
21
-
22
- cli.command('put <key> <value>')
23
- .describe('Put a value (a CID) for the given key. If the key exists it\'s value is overwritten.')
24
- .alias('set')
25
- .action(async (key, value, opts) => {
26
- const { root: prevRoot, blocks } = await openPail(opts.path)
27
- const { root, additions, removals } = await put(blocks, prevRoot, key, CID.parse(value))
28
- await updatePail(opts.path, blocks, root, { additions, removals })
29
-
30
- console.log(clc.red(`--- ${prevRoot}`))
31
- console.log(clc.green(`+++ ${root}`))
32
- console.log(clc.magenta('@@ -1 +1 @@'))
33
- additions.forEach(b => console.log(clc.green(`+${b.cid}`)))
34
- removals.forEach(b => console.log(clc.red(`-${b.cid}`)))
35
- })
36
-
37
- cli.command('get <key>')
38
- .describe('Get the stored value for the given key from the pail. If the key is not found, `undefined` is returned.')
39
- .action(async (key, opts) => {
40
- const { root, blocks } = await openPail(opts.path)
41
- const value = await get(blocks, root, key)
42
- if (value) console.log(value.toString())
43
- })
44
-
45
- cli.command('del <key>')
46
- .describe('Delete the value for the given key from the pail. If the key is not found no operation occurs.')
47
- .alias('delete', 'rm', 'remove')
48
- .action(async (key, opts) => {
49
- const { root: prevRoot, blocks } = await openPail(opts.path)
50
- const { root, additions, removals } = await del(blocks, prevRoot, key)
51
- await updatePail(opts.path, blocks, root, { additions, removals })
52
-
53
- console.log(clc.red(`--- ${prevRoot}`))
54
- console.log(clc.green(`+++ ${root}`))
55
- console.log(clc.magenta('@@ -1 +1 @@'))
56
- additions.forEach(b => console.log(clc.green(`+ ${b.cid}`)))
57
- removals.forEach(b => console.log(clc.red(`- ${b.cid}`)))
58
- })
59
-
60
- cli.command('ls')
61
- .describe('List entries in the pail.')
62
- .alias('list')
63
- .option('-p, --prefix', 'Key prefix to filter by.')
64
- .option('--gt', 'Filter results by keys greater than this string.')
65
- .option('--lt', 'Filter results by keys less than this string.')
66
- .option('--json', 'Format output as newline delimted JSON.')
67
- .action(async (opts) => {
68
- const { root, blocks } = await openPail(opts.path)
69
- let n = 0
70
- for await (const [k, v] of entries(blocks, root, { prefix: opts.prefix, gt: opts.gt, lt: opts.lt })) {
71
- console.log(opts.json ? JSON.stringify({ key: k, value: v.toString() }) : `${k}\t${v}`)
72
- n++
73
- }
74
- if (!opts.json) console.log(`total ${n}`)
75
- })
76
-
77
- cli.command('tree')
78
- .describe('Visualise the pail.')
79
- .alias('vis')
80
- .action(async (opts) => {
81
- const { root, blocks } = await openPail(opts.path)
82
- const shards = new ShardFetcher(blocks)
83
- const rshard = await shards.get(root)
84
-
85
- /** @type {archy.Data} */
86
- const archyRoot = { label: `Shard(${clc.yellow(rshard.cid.toString())}) ${rshard.bytes.length + 'b'}`, nodes: [] }
87
-
88
- /** @param {API.ShardEntry} entry */
89
- const getData = async ([k, v]) => {
90
- if (!Array.isArray(v)) {
91
- return { label: `Key(${clc.magenta(k)})`, nodes: [{ label: `Value(${clc.cyan(v)})` }] }
92
- }
93
- /** @type {archy.Data} */
94
- const data = { label: `Key(${clc.magenta(k)})`, nodes: [] }
95
- if (v[1]) data.nodes?.push({ label: `Value(${clc.cyan(v[1])})` })
96
- const blk = await shards.get(v[0])
97
- data.nodes?.push({
98
- label: `Shard(${clc.yellow(v[0])}) ${blk.bytes.length + 'b'}`,
99
- nodes: await Promise.all(blk.value.entries.map(e => getData(e)))
100
- })
101
- return data
102
- }
103
-
104
- for (const entry of rshard.value.entries) {
105
- archyRoot.nodes?.push(await getData(entry))
106
- }
107
-
108
- console.log(archy(archyRoot))
109
- })
110
-
111
- cli.command('diff <path>')
112
- .describe('Find the differences between this pail and the passed pail.')
113
- .option('-k, --keys', 'Output key/value diff.')
114
- .action(async (path, opts) => {
115
- const [
116
- { root: aroot, blocks: ablocks },
117
- { root: broot, blocks: bblocks }
118
- ] = await Promise.all([openPail(opts.path), openPail(path)])
119
- if (aroot.toString() === broot.toString()) return
120
-
121
- const fetcher = new MultiBlockFetcher(ablocks, bblocks)
122
- const { shards: { additions, removals }, keys } = await difference(fetcher, aroot, broot)
123
-
124
- console.log(clc.red(`--- ${aroot}`))
125
- console.log(clc.green(`+++ ${broot}`))
126
- console.log(clc.magenta('@@ -1 +1 @@'))
127
-
128
- if (opts.keys) {
129
- keys.forEach(([k, v]) => {
130
- if (v[0] != null) console.log(clc.red(`- ${k}\t${v[0]}`))
131
- if (v[1] != null) console.log(clc.green(`+ ${k}\t${v[1]}`))
132
- })
133
- } else {
134
- additions.forEach(b => console.log(clc.green(`+ ${b.cid}`)))
135
- removals.forEach(b => console.log(clc.red(`- ${b.cid}`)))
136
- }
137
- })
138
-
139
- cli.command('merge <path>')
140
- .describe('Merge the passed pail into this pail.')
141
- .action(async (path, opts) => {
142
- const [
143
- { root: aroot, blocks: ablocks },
144
- { root: broot, blocks: bblocks }
145
- ] = await Promise.all([openPail(opts.path), openPail(path)])
146
- if (aroot.toString() === broot.toString()) return
147
-
148
- const fetcher = new MultiBlockFetcher(ablocks, bblocks)
149
- const { root, additions, removals } = await merge(fetcher, aroot, [broot])
150
-
151
- await updatePail(opts.path, ablocks, root, { additions, removals })
152
-
153
- console.log(clc.red(`--- ${aroot}`))
154
- console.log(clc.green(`+++ ${root}`))
155
- console.log(clc.magenta('@@ -1 +1 @@'))
156
- additions.forEach(b => console.log(clc.green(`+ ${b.cid}`)))
157
- removals.forEach(b => console.log(clc.red(`- ${b.cid}`)))
158
- })
159
-
160
- cli.parse(process.argv)
161
-
162
- /**
163
- * @param {string} path
164
- * @returns {Promise<{ root: API.ShardLink, blocks: MemoryBlockstore }>}
165
- */
166
- async function openPail (path) {
167
- const blocks = new MemoryBlockstore()
168
- try {
169
- const carReader = new CARReaderStream()
170
- const readable = /** @type {ReadableStream<Uint8Array>} */ (Readable.toWeb(fs.createReadStream(path)))
171
- await readable.pipeThrough(carReader).pipeTo(new WritableStream({ write: b => blocks.put(b.cid, b.bytes) }))
172
- const header = await carReader.getHeader()
173
- if (!isShardLink(header.roots[0])) throw new Error(`not a shard: ${header.roots[0]}`)
174
- return { root: header.roots[0], blocks }
175
- } catch (err) {
176
- if (err.code !== 'ENOENT') throw new Error('failed to open bucket', { cause: err })
177
- const rootblk = await ShardBlock.create()
178
- blocks.put(rootblk.cid, rootblk.bytes)
179
- return { root: rootblk.cid, blocks }
180
- }
181
- }
182
-
183
- /**
184
- * @param {string} path
185
- * @param {MemoryBlockstore} blocks
186
- * @param {API.ShardLink} root
187
- * @param {API.ShardDiff} diff
188
- */
189
- async function updatePail (path, blocks, root, { additions, removals }) {
190
- const tmp = join(os.tmpdir(), `pail${Date.now()}.car`)
191
- const iterator = blocks.entries()
192
- const readable = new ReadableStream({
193
- start (controller) {
194
- for (const b of additions) controller.enqueue(b)
195
- },
196
- pull (controller) {
197
- for (const b of iterator) {
198
- if (removals.some(r => b.cid.toString() === r.cid.toString())) continue
199
- return controller.enqueue(b)
200
- }
201
- controller.close()
202
- }
203
- })
204
- await readable.pipeThrough(new CARWriterStream([root])).pipeTo(Writable.toWeb(fs.createWriteStream(tmp)))
205
-
206
- const old = `${path}-${new Date().toISOString()}`
207
- try {
208
- await fs.promises.rename(path, old)
209
- } catch (err) {
210
- if (err.code !== 'ENOENT') throw err
211
- }
212
- await fs.promises.rename(tmp, path)
213
- try {
214
- await fs.promises.rm(old)
215
- } catch (err) {
216
- if (err.code !== 'ENOENT') throw err
217
- }
218
- }
@@ -1,59 +0,0 @@
1
- import { Link, UnknownLink, BlockView, Block, Version } from 'multiformats';
2
- import { sha256 } from 'multiformats/hashes/sha2';
3
- import * as dagCBOR from '@ipld/dag-cbor';
4
- export { Link, UnknownLink, BlockView, Block, Version };
5
- export type ShardEntryValueValue = UnknownLink;
6
- export type ShardEntryLinkValue = [ShardLink];
7
- export type ShardEntryLinkAndValueValue = [ShardLink, UnknownLink];
8
- export type ShardValueEntry = [key: string, value: ShardEntryValueValue];
9
- export type ShardLinkEntry = [key: string, value: ShardEntryLinkValue | ShardEntryLinkAndValueValue];
10
- /** Single key/value entry within a shard. */
11
- export type ShardEntry = [key: string, value: ShardEntryValueValue | ShardEntryLinkValue | ShardEntryLinkAndValueValue];
12
- export interface Shard extends ShardConfig {
13
- entries: ShardEntry[];
14
- }
15
- export type ShardLink = Link<Shard, typeof dagCBOR.code, typeof sha256.code, 1>;
16
- export interface ShardBlockView extends BlockView<Shard, typeof dagCBOR.code, typeof sha256.code, 1> {
17
- }
18
- export interface ShardDiff {
19
- additions: ShardBlockView[];
20
- removals: ShardBlockView[];
21
- }
22
- export interface BlockFetcher {
23
- get<T = unknown, C extends number = number, A extends number = number, V extends Version = 1>(link: Link<T, C, A, V>): Promise<Block<T, C, A, V> | undefined>;
24
- }
25
- export interface ShardConfig {
26
- /** Shard compatibility version. */
27
- version: number;
28
- /**
29
- * Characters allowed in keys, referring to a known character set.
30
- * e.g. "ascii" refers to the printable ASCII characters in the code range 32-126.
31
- */
32
- keyChars: string;
33
- /** Max key size in bytes - default 4096 bytes. */
34
- maxKeySize: number;
35
- /** The key prefix from the root to this shard. */
36
- prefix: string;
37
- }
38
- export type ShardOptions = Partial<ShardConfig>;
39
- export interface KeyPrefixOption {
40
- /** Filter results to entries with keys prefixed with this string. */
41
- prefix: string;
42
- }
43
- export type KeyRangeOption = KeyLowerBoundRangeOption | KeyUpperBoundRangeOption | (KeyLowerBoundRangeOption & KeyUpperBoundRangeOption);
44
- export type KeyLowerBoundRangeOption = KeyLowerBoundRangeExclusiveOption | KeyLowerBoundRangeInclusiveOption;
45
- export interface KeyLowerBoundRangeExclusiveOption {
46
- gt: string;
47
- }
48
- export interface KeyLowerBoundRangeInclusiveOption {
49
- gte: string;
50
- }
51
- export type KeyUpperBoundRangeOption = KeyUpperBoundRangeExclusiveOption | KeyUpperBoundRangeInclusiveOption;
52
- export interface KeyUpperBoundRangeExclusiveOption {
53
- lt: string;
54
- }
55
- export interface KeyUpperBoundRangeInclusiveOption {
56
- lte: string;
57
- }
58
- export type EntriesOptions = KeyPrefixOption | KeyRangeOption;
59
- //# sourceMappingURL=api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAE9C,MAAM,MAAM,mBAAmB,GAAG,CAAC,SAAS,CAAC,CAAA;AAE7C,MAAM,MAAM,2BAA2B,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;AAElE,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAExE,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,2BAA2B,CAAC,CAAA;AAEpG,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,mBAAmB,GAAG,2BAA2B,CAAC,CAAA;AAEvH,MAAM,WAAW,KAAM,SAAQ,WAAW;IACxC,OAAO,EAAE,UAAU,EAAE,CAAA;CACtB;AAED,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;AAE/E,MAAM,WAAW,cAAe,SAAQ,SAAS,CAAC,KAAK,EAAE,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;CAAG;AAEvG,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,QAAQ,EAAE,cAAc,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,OAAO,GAAG,CAAC,EAAG,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GACnH,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,CAAA;CACzC;AAED,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAE/C,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,cAAc,GACtB,wBAAwB,GACxB,wBAAwB,GACxB,CAAC,wBAAwB,GAAG,wBAAwB,CAAC,CAAA;AAEzD,MAAM,MAAM,wBAAwB,GAChC,iCAAiC,GACjC,iCAAiC,CAAA;AAErC,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,iCAAiC;IAChD,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,wBAAwB,GAChC,iCAAiC,GACjC,iCAAiC,CAAA;AAErC,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,iCAAiC;IAChD,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,cAAc,GACtB,eAAe,GACf,cAAc,CAAA"}
@@ -1,31 +0,0 @@
1
- import { UnknownLink, ShardLink, ShardDiff, ShardEntry, ShardEntryValueValue, ShardEntryLinkValue, ShardEntryLinkAndValueValue, ShardConfig, ShardOptions, ShardBlockView, BlockFetcher } from '../api.js';
2
- export { UnknownLink, ShardLink, ShardDiff, ShardEntry, ShardEntryValueValue, ShardEntryLinkValue, ShardEntryLinkAndValueValue, ShardConfig, ShardOptions, ShardBlockView, BlockFetcher };
3
- export interface BatcherShard extends ShardConfig {
4
- base?: ShardBlockView;
5
- entries: BatcherShardEntry[];
6
- }
7
- export interface BatcherShardInit extends ShardOptions {
8
- base?: ShardBlockView;
9
- entries?: BatcherShardEntry[];
10
- }
11
- export type BatcherShardEntry = [
12
- key: string,
13
- value: ShardEntryValueValue | ShardEntryLinkValue | ShardEntryLinkAndValueValue | ShardEntryShardValue | ShardEntryShardAndValueValue
14
- ];
15
- export type ShardEntryShardValue = [BatcherShard];
16
- export type ShardEntryShardAndValueValue = [BatcherShard, UnknownLink];
17
- export interface Batcher {
18
- /**
19
- * Put a value (a CID) for the given key. If the key exists it's value is
20
- * overwritten.
21
- */
22
- put(key: string, value: UnknownLink): Promise<void>;
23
- /**
24
- * Encode all altered shards in the batch and return the new root CID and
25
- * difference blocks.
26
- */
27
- commit(): Promise<{
28
- root: ShardLink;
29
- } & ShardDiff>;
30
- }
31
- //# sourceMappingURL=api.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/batch/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,YAAY,EACZ,cAAc,EACd,YAAY,EACb,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,YAAY,EACZ,cAAc,EACd,YAAY,EACb,CAAA;AAED,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IACpD,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC9B;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,oBAAoB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,oBAAoB,GAAG,4BAA4B;CACtI,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,YAAY,CAAC,CAAA;AAEjD,MAAM,MAAM,4BAA4B,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,CAAA;AAEtE,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,GAAG,CAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD;;;OAGG;IACH,MAAM,IAAK,OAAO,CAAC;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;CACpD"}