@helia/verified-fetch 2.6.14 → 2.6.16

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 (55) hide show
  1. package/README.md +7 -7
  2. package/dist/index.min.js +56 -56
  3. package/dist/index.min.js.map +4 -4
  4. package/dist/src/index.d.ts +12 -12
  5. package/dist/src/index.d.ts.map +1 -1
  6. package/dist/src/index.js +3 -6
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/plugins/plugin-handle-car.d.ts.map +1 -1
  9. package/dist/src/plugins/plugin-handle-car.js +5 -1
  10. package/dist/src/plugins/plugin-handle-car.js.map +1 -1
  11. package/dist/src/plugins/plugin-handle-raw.js +2 -2
  12. package/dist/src/plugins/plugin-handle-raw.js.map +1 -1
  13. package/dist/src/utils/get-stream-from-async-iterable.d.ts +1 -1
  14. package/dist/src/utils/get-stream-from-async-iterable.d.ts.map +1 -1
  15. package/dist/src/utils/get-stream-from-async-iterable.js.map +1 -1
  16. package/dist/src/utils/get-tar-stream.d.ts.map +1 -1
  17. package/dist/src/utils/get-tar-stream.js.map +1 -1
  18. package/dist/src/utils/handle-redirects.d.ts +2 -2
  19. package/dist/src/utils/handle-redirects.d.ts.map +1 -1
  20. package/dist/src/utils/handle-redirects.js +3 -5
  21. package/dist/src/utils/handle-redirects.js.map +1 -1
  22. package/dist/src/utils/libp2p-defaults.browser.d.ts.map +1 -1
  23. package/dist/src/utils/libp2p-defaults.browser.js.map +1 -1
  24. package/dist/src/utils/libp2p-defaults.d.ts.map +1 -1
  25. package/dist/src/utils/libp2p-defaults.js.map +1 -1
  26. package/dist/src/utils/parse-url-string.d.ts +1 -1
  27. package/dist/src/utils/parse-url-string.d.ts.map +1 -1
  28. package/dist/src/utils/parse-url-string.js +2 -2
  29. package/dist/src/utils/parse-url-string.js.map +1 -1
  30. package/dist/src/utils/set-content-type.d.ts +2 -2
  31. package/dist/src/utils/set-content-type.d.ts.map +1 -1
  32. package/dist/src/utils/set-content-type.js +0 -2
  33. package/dist/src/utils/set-content-type.js.map +1 -1
  34. package/dist/src/utils/walk-path.d.ts +3 -3
  35. package/dist/src/utils/walk-path.d.ts.map +1 -1
  36. package/dist/src/utils/walk-path.js +0 -2
  37. package/dist/src/utils/walk-path.js.map +1 -1
  38. package/dist/src/verified-fetch.d.ts +1 -1
  39. package/dist/src/verified-fetch.d.ts.map +1 -1
  40. package/dist/src/verified-fetch.js +0 -3
  41. package/dist/src/verified-fetch.js.map +1 -1
  42. package/package.json +54 -30
  43. package/src/index.ts +14 -12
  44. package/src/plugins/plugin-handle-car.ts +5 -1
  45. package/src/plugins/plugin-handle-raw.ts +2 -2
  46. package/src/utils/get-stream-from-async-iterable.ts +2 -1
  47. package/src/utils/get-tar-stream.ts +4 -2
  48. package/src/utils/handle-redirects.ts +5 -5
  49. package/src/utils/libp2p-defaults.browser.ts +2 -1
  50. package/src/utils/libp2p-defaults.ts +2 -1
  51. package/src/utils/parse-url-string.ts +4 -3
  52. package/src/utils/set-content-type.ts +2 -2
  53. package/src/utils/walk-path.ts +4 -3
  54. package/src/verified-fetch.ts +5 -4
  55. package/LICENSE +0 -4
package/README.md CHANGED
@@ -399,7 +399,7 @@ console.info(obj.buf) // Uint8Array(5) [ 0, 1, 2, 3, 4 ]
399
399
 
400
400
  [DAG-CBOR](https://ipld.io/docs/codecs/known/dag-cbor/) uses the [Concise Binary Object Representation](https://cbor.io/) format for serialization instead of JSON.
401
401
 
402
- This supports more datatypes in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
402
+ This supports more data types in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
403
403
 
404
404
  ##### Content-Type
405
405
 
@@ -479,7 +479,7 @@ const res = await verifiedFetch('ipfs://bafyfoo/path/to/dir')
479
479
  console.info(res.url) // ipfs://bafyfoo/path/to/dir/
480
480
  ```
481
481
 
482
- It's possible to prevent this behaviour and/or handle a redirect manually
482
+ It's possible to prevent this behavior and/or handle a redirect manually
483
483
  through use of the [redirect](https://developer.mozilla.org/en-US/docs/Web/API/fetch#redirect)
484
484
  option.
485
485
 
@@ -658,7 +658,7 @@ Known Errors that can be thrown:
658
658
  3. `TypeError` - If the options argument is passed and is malformed.
659
659
  4. `AbortError` - If the content request is aborted due to user aborting provided AbortSignal. Note that this is a `AbortError` from `@libp2p/interface` and not the standard `AbortError` from the Fetch API.
660
660
 
661
- ## Pluggability and Extensibility
661
+ ## Extensibility
662
662
 
663
663
  Verified‑fetch can now be extended to alter how it handles requests by using plugins.
664
664
  Plugins are classes that extend the `BasePlugin` class and implement the `VerifiedFetchPlugin`
@@ -858,7 +858,7 @@ $ npm i @helia/verified-fetch
858
858
 
859
859
  ## Browser `<script>` tag
860
860
 
861
- Loading this module through a script tag will make it's exports available as `HeliaVerifiedFetch` in the global namespace.
861
+ Loading this module through a script tag will make its exports available as `HeliaVerifiedFetch` in the global namespace.
862
862
 
863
863
  ```html
864
864
  <script src="https://unpkg.com/@helia/verified-fetch/dist/index.min.js"></script>
@@ -866,14 +866,14 @@ Loading this module through a script tag will make it's exports available as `He
866
866
 
867
867
  # API Docs
868
868
 
869
- - <https://ipfs.github.io/helia-verified-fetch/modules.html>
869
+ - <https://ipfs.github.io/helia-verified-fetch/modules/_helia_verified_fetch.html>
870
870
 
871
871
  # License
872
872
 
873
873
  Licensed under either of
874
874
 
875
- - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
876
- - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
875
+ - Apache 2.0, ([LICENSE-APACHE](https://github.com/ipfs/helia-verified-fetch/blob/main/packages/verified-fetch/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
876
+ - MIT ([LICENSE-MIT](https://github.com/ipfs/helia-verified-fetch/blob/main/packages/verified-fetch/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
877
877
 
878
878
  # Contribute
879
879