@helia/unixfs 0.0.0 → 1.0.1

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 (110) hide show
  1. package/README.md +10 -4
  2. package/dist/index.min.js +1 -1
  3. package/dist/src/commands/cat.d.ts +1 -1
  4. package/dist/src/commands/cat.d.ts.map +1 -1
  5. package/dist/src/commands/cat.js +1 -1
  6. package/dist/src/commands/cat.js.map +1 -1
  7. package/dist/src/commands/chmod.d.ts.map +1 -1
  8. package/dist/src/commands/chmod.js +14 -12
  9. package/dist/src/commands/chmod.js.map +1 -1
  10. package/dist/src/commands/cp.d.ts +1 -1
  11. package/dist/src/commands/cp.d.ts.map +1 -1
  12. package/dist/src/commands/cp.js +5 -2
  13. package/dist/src/commands/cp.js.map +1 -1
  14. package/dist/src/commands/ls.d.ts +2 -1
  15. package/dist/src/commands/ls.d.ts.map +1 -1
  16. package/dist/src/commands/ls.js +1 -1
  17. package/dist/src/commands/ls.js.map +1 -1
  18. package/dist/src/commands/mkdir.d.ts.map +1 -1
  19. package/dist/src/commands/mkdir.js +4 -2
  20. package/dist/src/commands/mkdir.js.map +1 -1
  21. package/dist/src/commands/rm.d.ts +1 -1
  22. package/dist/src/commands/rm.d.ts.map +1 -1
  23. package/dist/src/commands/rm.js +9 -3
  24. package/dist/src/commands/rm.js.map +1 -1
  25. package/dist/src/commands/stat.d.ts +1 -1
  26. package/dist/src/commands/stat.d.ts.map +1 -1
  27. package/dist/src/commands/stat.js +19 -15
  28. package/dist/src/commands/stat.js.map +1 -1
  29. package/dist/src/commands/touch.d.ts.map +1 -1
  30. package/dist/src/commands/touch.js +15 -13
  31. package/dist/src/commands/touch.js.map +1 -1
  32. package/dist/src/commands/utils/add-link.d.ts +4 -2
  33. package/dist/src/commands/utils/add-link.d.ts.map +1 -1
  34. package/dist/src/commands/utils/add-link.js +24 -24
  35. package/dist/src/commands/utils/add-link.js.map +1 -1
  36. package/dist/src/commands/utils/cid-to-directory.d.ts +3 -3
  37. package/dist/src/commands/utils/cid-to-directory.d.ts.map +1 -1
  38. package/dist/src/commands/utils/cid-to-directory.js +1 -1
  39. package/dist/src/commands/utils/cid-to-directory.js.map +1 -1
  40. package/dist/src/commands/utils/cid-to-pblink.d.ts +3 -3
  41. package/dist/src/commands/utils/cid-to-pblink.d.ts.map +1 -1
  42. package/dist/src/commands/utils/cid-to-pblink.js.map +1 -1
  43. package/dist/src/commands/utils/constants.d.ts +2 -0
  44. package/dist/src/commands/utils/constants.d.ts.map +1 -0
  45. package/dist/src/commands/utils/constants.js +2 -0
  46. package/dist/src/commands/utils/constants.js.map +1 -0
  47. package/dist/src/commands/utils/dir-sharded.d.ts +47 -41
  48. package/dist/src/commands/utils/dir-sharded.d.ts.map +1 -1
  49. package/dist/src/commands/utils/dir-sharded.js +99 -15
  50. package/dist/src/commands/utils/dir-sharded.js.map +1 -1
  51. package/dist/src/commands/utils/errors.d.ts +22 -6
  52. package/dist/src/commands/utils/errors.d.ts.map +1 -1
  53. package/dist/src/commands/utils/errors.js +34 -8
  54. package/dist/src/commands/utils/errors.js.map +1 -1
  55. package/dist/src/commands/utils/hamt-constants.d.ts +1 -1
  56. package/dist/src/commands/utils/hamt-constants.d.ts.map +1 -1
  57. package/dist/src/commands/utils/hamt-constants.js +1 -1
  58. package/dist/src/commands/utils/hamt-constants.js.map +1 -1
  59. package/dist/src/commands/utils/hamt-utils.d.ts +15 -12
  60. package/dist/src/commands/utils/hamt-utils.d.ts.map +1 -1
  61. package/dist/src/commands/utils/hamt-utils.js +40 -39
  62. package/dist/src/commands/utils/hamt-utils.js.map +1 -1
  63. package/dist/src/commands/utils/is-over-shard-threshold.d.ts +10 -0
  64. package/dist/src/commands/utils/is-over-shard-threshold.d.ts.map +1 -0
  65. package/dist/src/commands/utils/is-over-shard-threshold.js +62 -0
  66. package/dist/src/commands/utils/is-over-shard-threshold.js.map +1 -0
  67. package/dist/src/commands/utils/persist.d.ts +7 -6
  68. package/dist/src/commands/utils/persist.d.ts.map +1 -1
  69. package/dist/src/commands/utils/persist.js +6 -3
  70. package/dist/src/commands/utils/persist.js.map +1 -1
  71. package/dist/src/commands/utils/remove-link.d.ts +6 -2
  72. package/dist/src/commands/utils/remove-link.d.ts.map +1 -1
  73. package/dist/src/commands/utils/remove-link.js +143 -55
  74. package/dist/src/commands/utils/remove-link.js.map +1 -1
  75. package/dist/src/commands/utils/resolve.d.ts +6 -3
  76. package/dist/src/commands/utils/resolve.d.ts.map +1 -1
  77. package/dist/src/commands/utils/resolve.js +4 -4
  78. package/dist/src/commands/utils/resolve.js.map +1 -1
  79. package/dist/src/index.d.ts +14 -7
  80. package/dist/src/index.d.ts.map +1 -1
  81. package/dist/src/index.js +0 -7
  82. package/dist/src/index.js.map +1 -1
  83. package/dist/typedoc-urls.json +14 -0
  84. package/package.json +8 -7
  85. package/src/commands/cat.ts +3 -2
  86. package/src/commands/chmod.ts +13 -10
  87. package/src/commands/cp.ts +7 -4
  88. package/src/commands/ls.ts +4 -3
  89. package/src/commands/mkdir.ts +5 -3
  90. package/src/commands/rm.ts +9 -5
  91. package/src/commands/stat.ts +22 -17
  92. package/src/commands/touch.ts +15 -12
  93. package/src/commands/utils/add-link.ts +32 -31
  94. package/src/commands/utils/cid-to-directory.ts +4 -4
  95. package/src/commands/utils/cid-to-pblink.ts +3 -3
  96. package/src/commands/utils/constants.ts +2 -0
  97. package/src/commands/utils/dir-sharded.ts +162 -63
  98. package/src/commands/utils/errors.ts +42 -8
  99. package/src/commands/utils/hamt-constants.ts +1 -1
  100. package/src/commands/utils/hamt-utils.ts +59 -50
  101. package/src/commands/utils/is-over-shard-threshold.ts +78 -0
  102. package/src/commands/utils/persist.ts +13 -8
  103. package/src/commands/utils/remove-link.ts +178 -77
  104. package/src/commands/utils/resolve.ts +12 -7
  105. package/src/index.ts +15 -17
  106. package/dist/src/commands/add.d.ts +0 -6
  107. package/dist/src/commands/add.d.ts.map +0 -1
  108. package/dist/src/commands/add.js +0 -38
  109. package/dist/src/commands/add.js.map +0 -1
  110. package/src/commands/add.ts +0 -46
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
+ <p align="center">
2
+ <a href="https://github.com/ipfs/helia" title="Helia">
3
+ <img src="https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png" alt="Helia logo" width="300" />
4
+ </a>
5
+ </p>
6
+
1
7
  # @helia/unixfs <!-- omit in toc -->
2
8
 
3
9
  [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
4
10
  [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
5
- [![codecov](https://img.shields.io/codecov/c/github/ipfs/helia.svg?style=flat-square)](https://codecov.io/gh/ipfs/helia)
6
- [![CI](https://img.shields.io/github/actions/workflow/status/ipfs/helia/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/helia/actions/workflows/js-test-and-release.yml?query=branch%3Amain)
11
+ [![codecov](https://img.shields.io/codecov/c/github/ipfs/helia-unixfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/helia-unixfs)
12
+ [![CI](https://img.shields.io/github/actions/workflow/status/ipfs/helia-unixfs/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipfs/helia-unixfs/actions/workflows/js-test-and-release.yml?query=branch%3Amain)
7
13
 
8
14
  > A Helia-compatible wrapper for UnixFS
9
15
 
@@ -31,7 +37,7 @@ Loading this module through a script tag will make it's exports available as `He
31
37
 
32
38
  ## API Docs
33
39
 
34
- - <https://ipfs.github.io/helia/modules/_helia_unixfs.html>
40
+ - <https://ipfs.github.io/helia-unixfs>
35
41
 
36
42
  ## License
37
43
 
@@ -42,7 +48,7 @@ Licensed under either of
42
48
 
43
49
  ## Contribute
44
50
 
45
- Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia/issues).
51
+ Contributions welcome! Please check out [the issues](https://github.com/ipfs/helia-unixfs/issues).
46
52
 
47
53
  Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.
48
54