@fireproof/vendor 0.0.0-smoke → 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.
- package/package.json +155 -8
- package/src/@ipld/car/{car/README.md → README.md} +229 -175
- package/src/@ipld/car/dist/src/reader.d.ts.map +1 -0
- package/src/@ipld/car/{car/src → src}/reader.js +19 -2
- package/src/cborg/cborg/{lib/bin.js → bin.js} +2 -2
- package/src/cborg/cborg/common.js +28 -0
- package/{patched/cborg/lib → src/cborg/cborg}/decode.js +24 -22
- package/src/cborg/cborg/{lib/diagnostic.js → diagnostic.js} +6 -4
- package/{patched/cborg/lib → src/cborg/cborg}/diagnostic_test.js +1 -1
- package/src/cborg/cborg/{lib/encode.js → encode.js} +23 -21
- package/{patched/cborg/cborg.js → src/cborg/cborg/index.js} +12 -10
- package/src/cborg/cborg/{lib/length.js → length.js} +3 -2
- package/{patched → src}/cborg/interface.ts +7 -4
- package/src/cborg/{cborg/lib/json → json}/decode.js +25 -25
- package/src/cborg/{cborg/lib/json → json}/encode.js +19 -16
- package/src/cborg/{cborg/package.json → package.json} +15 -11
- package/src/cborg/{cborg/taglib.js → taglib.js} +3 -1
- package/src/cborg/{cborg/test → test}/common.js +1 -1
- package/{patched → src}/cborg/test/noop-bin-test.js +1 -1
- package/{patched → src}/cborg/test/test-0uint.js +2 -2
- package/src/cborg/{cborg/test → test}/test-1negint.js +2 -2
- package/src/cborg/{cborg/test → test}/test-2bytes.js +2 -2
- package/src/cborg/{cborg/test → test}/test-3string.js +2 -2
- package/{patched → src}/cborg/test/test-4array.js +2 -2
- package/{patched → src}/cborg/test/test-5map.js +2 -2
- package/src/cborg/{cborg/test → test}/test-6tag.js +2 -3
- package/{patched → src}/cborg/test/test-7float.js +2 -2
- package/{patched → src}/cborg/test/test-bl.js +1 -1
- package/src/cborg/{cborg/test → test}/test-cbor-vectors.js +2 -2
- package/src/cborg/{cborg/test → test}/test-decode-errors.js +2 -2
- package/{patched → src}/cborg/test/test-fuzz.js +1 -1
- package/src/cborg/{cborg/test → test}/test-json.js +25 -25
- package/{patched → src}/cborg/test/test-length.js +3 -3
- package/src/cborg/{cborg/test → test}/test-partial.js +2 -2
- package/src/cborg/{cborg/tsconfig.json → tsconfig.json} +5 -2
- package/{patched/cborg/types/lib → src/cborg/types/cborg}/decode.d.ts +5 -3
- package/src/cborg/types/cborg/decode.d.ts.map +1 -0
- package/{patched/cborg/types/lib → src/cborg/types/cborg}/encode.d.ts +4 -3
- package/src/cborg/types/cborg/encode.d.ts.map +1 -0
- package/src/cborg/types/cborg/index.d.ts +26 -0
- package/src/cborg/types/cborg/index.d.ts.map +1 -0
- package/src/cborg/types/cborg/is.d.ts.map +1 -0
- package/src/cborg/{cborg/types → types}/interface.d.ts +6 -4
- package/src/cborg/types/interface.d.ts.map +1 -0
- package/{patched/cborg/types/lib → src/cborg/types}/json/decode.d.ts +7 -7
- package/src/cborg/types/json/decode.d.ts.map +1 -0
- package/src/cborg/types/json/encode.d.ts +11 -0
- package/src/cborg/types/json/encode.d.ts.map +1 -0
- package/src/cborg/types/json/json.d.ts.map +1 -0
- package/{patched → src}/cborg/types/taglib.d.ts +1 -1
- package/{patched → src}/cborg/types/taglib.d.ts.map +1 -1
- package/src/cborg/types/tsconfig.tsbuildinfo +1 -0
- package/{patched/cborg/types/lib → src/cborg/types/utils}/0uint.d.ts +6 -4
- package/src/cborg/types/utils/0uint.d.ts.map +1 -0
- package/{patched/cborg/types/lib → src/cborg/types/utils}/1negint.d.ts +4 -3
- package/src/cborg/types/utils/1negint.d.ts.map +1 -0
- package/src/cborg/{cborg/types/lib → types/utils}/2bytes.d.ts +5 -4
- package/src/cborg/types/utils/2bytes.d.ts.map +1 -0
- package/src/cborg/{cborg/types/lib → types/utils}/3string.d.ts +1 -1
- package/src/cborg/types/utils/3string.d.ts.map +1 -0
- package/{patched/cborg/types/lib → src/cborg/types/utils}/4array.d.ts +3 -2
- package/src/cborg/types/utils/4array.d.ts.map +1 -0
- package/src/cborg/{cborg/types/lib → types/utils}/5map.d.ts +3 -2
- package/src/cborg/types/utils/5map.d.ts.map +1 -0
- package/{patched/cborg/types/lib → src/cborg/types/utils}/6tag.d.ts +4 -3
- package/src/cborg/types/utils/6tag.d.ts.map +1 -0
- package/src/cborg/{cborg/types/lib → types/utils}/7float.d.ts +2 -2
- package/src/cborg/types/utils/7float.d.ts.map +1 -0
- package/src/cborg/types/utils/bl.d.ts.map +1 -0
- package/src/cborg/types/utils/byte-utils.d.ts.map +1 -0
- package/src/cborg/types/utils/common.d.ts +8 -0
- package/src/cborg/types/utils/common.d.ts.map +1 -0
- package/src/cborg/types/utils/index.d.ts +13 -0
- package/src/cborg/types/utils/index.d.ts.map +1 -0
- package/src/cborg/types/utils/jump.d.ts +16 -0
- package/src/cborg/types/utils/jump.d.ts.map +1 -0
- package/src/cborg/types/utils/token.d.ts.map +1 -0
- package/src/cborg/{cborg/lib → utils}/0uint.js +16 -14
- package/src/cborg/{cborg/lib → utils}/1negint.js +5 -5
- package/src/cborg/{cborg/lib → utils}/2bytes.js +16 -14
- package/src/cborg/{cborg/lib → utils}/3string.js +4 -4
- package/src/cborg/{cborg/lib → utils}/4array.js +7 -6
- package/{patched/cborg/lib → src/cborg/utils}/5map.js +6 -6
- package/{patched/cborg/lib → src/cborg/utils}/6tag.js +4 -3
- package/src/cborg/{cborg/lib → utils}/7float.js +23 -21
- package/{patched/cborg/lib → src/cborg/utils}/bl.js +1 -1
- package/src/cborg/utils/common.js +11 -0
- package/src/cborg/utils/index.js +12 -0
- package/src/cborg/utils/jump.js +222 -0
- package/patched/@ipld/dag-json/.github/dependabot.yml +0 -11
- package/patched/@ipld/dag-json/.github/workflows/js-test-and-release.yml +0 -28
- package/patched/@ipld/dag-json/CHANGELOG.md +0 -202
- package/patched/@ipld/dag-json/LICENSE-APACHE +0 -5
- package/patched/@ipld/dag-json/LICENSE-MIT +0 -19
- package/patched/@ipld/dag-json/ipld-dag-json-10.2.3.tgz +0 -0
- package/patched/@ipld/dag-json/src/index.js +0 -291
- package/patched/@ipld/dag-json/test/test-basics.spec.js +0 -290
- package/patched/@ipld/dag-json/test/ts-use/package.json +0 -11
- package/patched/@ipld/dag-json/test/ts-use/src/main.ts +0 -54
- package/patched/@ipld/dag-json/test/ts-use/tsconfig.json +0 -9
- package/patched/@ipld/dag-json/tsconfig.json +0 -14
- package/patched/cborg/cborg-4.2.7.tgz +0 -0
- package/patched/cborg/example-json.js +0 -6
- package/patched/cborg/example.js +0 -5
- package/patched/cborg/lib/0uint.js +0 -227
- package/patched/cborg/lib/1negint.js +0 -111
- package/patched/cborg/lib/2bytes.js +0 -133
- package/patched/cborg/lib/3string.js +0 -90
- package/patched/cborg/lib/4array.js +0 -113
- package/patched/cborg/lib/7float.js +0 -308
- package/patched/cborg/lib/bin.js +0 -189
- package/patched/cborg/lib/common.js +0 -27
- package/patched/cborg/lib/diagnostic.js +0 -156
- package/patched/cborg/lib/encode.js +0 -464
- package/patched/cborg/lib/json/decode.js +0 -462
- package/patched/cborg/lib/json/encode.js +0 -299
- package/patched/cborg/lib/jump.js +0 -209
- package/patched/cborg/lib/length.js +0 -61
- package/patched/cborg/package.json +0 -169
- package/patched/cborg/pnpm-lock.yaml +0 -6096
- package/patched/cborg/taglib.js +0 -73
- package/patched/cborg/test/common.js +0 -18
- package/patched/cborg/test/test-1negint.js +0 -96
- package/patched/cborg/test/test-2bytes.js +0 -198
- package/patched/cborg/test/test-3string.js +0 -136
- package/patched/cborg/test/test-6tag.js +0 -85
- package/patched/cborg/test/test-cbor-vectors.js +0 -107
- package/patched/cborg/test/test-decode-errors.js +0 -65
- package/patched/cborg/test/test-json.js +0 -219
- package/patched/cborg/test/test-partial.js +0 -111
- package/patched/cborg/tsconfig.json +0 -45
- package/patched/cborg/types/cborg.d.ts +0 -28
- package/patched/cborg/types/cborg.d.ts.map +0 -1
- package/patched/cborg/types/interface.d.ts +0 -47
- package/patched/cborg/types/interface.d.ts.map +0 -1
- package/patched/cborg/types/lib/0uint.d.ts.map +0 -1
- package/patched/cborg/types/lib/1negint.d.ts.map +0 -1
- package/patched/cborg/types/lib/2bytes.d.ts +0 -68
- package/patched/cborg/types/lib/2bytes.d.ts.map +0 -1
- package/patched/cborg/types/lib/3string.d.ts +0 -46
- package/patched/cborg/types/lib/3string.d.ts.map +0 -1
- package/patched/cborg/types/lib/4array.d.ts.map +0 -1
- package/patched/cborg/types/lib/5map.d.ts +0 -65
- package/patched/cborg/types/lib/5map.d.ts.map +0 -1
- package/patched/cborg/types/lib/6tag.d.ts.map +0 -1
- package/patched/cborg/types/lib/7float.d.ts +0 -60
- package/patched/cborg/types/lib/7float.d.ts.map +0 -1
- package/patched/cborg/types/lib/bin.d.ts +0 -4
- package/patched/cborg/types/lib/bin.d.ts.map +0 -1
- package/patched/cborg/types/lib/bl.d.ts.map +0 -1
- package/patched/cborg/types/lib/byte-utils.d.ts.map +0 -1
- package/patched/cborg/types/lib/common.d.ts +0 -10
- package/patched/cborg/types/lib/common.d.ts.map +0 -1
- package/patched/cborg/types/lib/decode.d.ts.map +0 -1
- package/patched/cborg/types/lib/diagnostic.d.ts +0 -12
- package/patched/cborg/types/lib/diagnostic.d.ts.map +0 -1
- package/patched/cborg/types/lib/diagnostic_test.d.ts +0 -2
- package/patched/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
- package/patched/cborg/types/lib/encode.d.ts.map +0 -1
- package/patched/cborg/types/lib/is.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/decode.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/encode.d.ts +0 -11
- package/patched/cborg/types/lib/json/encode.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/forward-cborg.d.ts +0 -6
- package/patched/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/json.d.ts.map +0 -1
- package/patched/cborg/types/lib/jump.d.ts +0 -12
- package/patched/cborg/types/lib/jump.d.ts.map +0 -1
- package/patched/cborg/types/lib/length.d.ts +0 -27
- package/patched/cborg/types/lib/length.d.ts.map +0 -1
- package/patched/cborg/types/lib/token.d.ts.map +0 -1
- package/patched/cborg/types/tsconfig.tsbuildinfo +0 -1
- package/src/@ipld/car/car/dist/src/reader.d.ts.map +0 -1
- package/src/@ipld/car/car/node_modules/.bin/cborg +0 -17
- package/src/@ipld/dag-cbor/dag-cbor/node_modules/.bin/cborg +0 -17
- package/src/@ipld/dag-json/dag-json/README.md +0 -58
- package/src/@ipld/dag-json/dag-json/node_modules/.bin/cborg +0 -17
- package/src/@ipld/dag-json/dag-json/package.json +0 -173
- package/src/@web3-storage/pail/pail/node_modules/.bin/pail +0 -17
- package/src/cborg/cborg/.github/dependabot.yml +0 -16
- package/src/cborg/cborg/.github/workflows/test-and-release.yml +0 -52
- package/src/cborg/cborg/CHANGELOG.md +0 -513
- package/src/cborg/cborg/LICENSE +0 -13
- package/src/cborg/cborg/README.md +0 -515
- package/src/cborg/cborg/bench/bench.js +0 -117
- package/src/cborg/cborg/bench/json.js +0 -124
- package/src/cborg/cborg/bench/package.json +0 -8
- package/src/cborg/cborg/cborg.js +0 -31
- package/src/cborg/cborg/example-bytestrings.js +0 -180
- package/src/cborg/cborg/interface.ts +0 -56
- package/src/cborg/cborg/lib/5map.js +0 -113
- package/src/cborg/cborg/lib/6tag.js +0 -80
- package/src/cborg/cborg/lib/bl.js +0 -124
- package/src/cborg/cborg/lib/byte-utils.js +0 -417
- package/src/cborg/cborg/lib/common.js +0 -27
- package/src/cborg/cborg/lib/decode.js +0 -209
- package/src/cborg/cborg/lib/diagnostic_test.js +0 -117
- package/src/cborg/cborg/lib/is.js +0 -106
- package/src/cborg/cborg/lib/json/json.js +0 -4
- package/src/cborg/cborg/lib/jump.js +0 -209
- package/src/cborg/cborg/lib/token.js +0 -76
- package/src/cborg/cborg/node_modules/.bin/cborg +0 -17
- package/src/cborg/cborg/test/appendix_a.js +0 -647
- package/src/cborg/cborg/test/node-test-bin.js +0 -402
- package/src/cborg/cborg/test/noop-bin-test.js +0 -3
- package/src/cborg/cborg/test/test-0uint.js +0 -103
- package/src/cborg/cborg/test/test-4array.js +0 -93
- package/src/cborg/cborg/test/test-5map.js +0 -284
- package/src/cborg/cborg/test/test-7float.js +0 -131
- package/src/cborg/cborg/test/test-bl.js +0 -37
- package/src/cborg/cborg/test/test-fuzz.js +0 -42
- package/src/cborg/cborg/test/test-length.js +0 -65
- package/src/cborg/cborg/types/cborg.d.ts +0 -28
- package/src/cborg/cborg/types/cborg.d.ts.map +0 -1
- package/src/cborg/cborg/types/example.d.ts +0 -2
- package/src/cborg/cborg/types/example.d.ts.map +0 -1
- package/src/cborg/cborg/types/interface.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/0uint.d.ts +0 -100
- package/src/cborg/cborg/types/lib/0uint.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/1negint.d.ts +0 -58
- package/src/cborg/cborg/types/lib/1negint.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/2bytes.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/3string.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/4array.d.ts +0 -65
- package/src/cborg/cborg/types/lib/4array.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/5map.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/6tag.d.ts +0 -61
- package/src/cborg/cborg/types/lib/6tag.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/7float.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/bin.d.ts +0 -4
- package/src/cborg/cborg/types/lib/bin.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/bl.d.ts +0 -26
- package/src/cborg/cborg/types/lib/bl.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/byte-utils.d.ts +0 -53
- package/src/cborg/cborg/types/lib/byte-utils.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/common.d.ts +0 -10
- package/src/cborg/cborg/types/lib/common.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/decode.d.ts +0 -41
- package/src/cborg/cborg/types/lib/decode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/diagnostic.d.ts +0 -12
- package/src/cborg/cborg/types/lib/diagnostic.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/diagnostic_test.d.ts +0 -2
- package/src/cborg/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/encode.d.ts +0 -50
- package/src/cborg/cborg/types/lib/encode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/is.d.ts +0 -6
- package/src/cborg/cborg/types/lib/is.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/decode.d.ts +0 -67
- package/src/cborg/cborg/types/lib/json/decode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/encode.d.ts +0 -11
- package/src/cborg/cborg/types/lib/json/encode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts +0 -6
- package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/json.d.ts +0 -6
- package/src/cborg/cborg/types/lib/json/json.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/jump.d.ts +0 -12
- package/src/cborg/cborg/types/lib/jump.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/length.d.ts +0 -27
- package/src/cborg/cborg/types/lib/length.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/token.d.ts +0 -59
- package/src/cborg/cborg/types/lib/token.d.ts.map +0 -1
- package/src/cborg/cborg/types/taglib.d.ts +0 -18
- package/src/cborg/cborg/types/taglib.d.ts.map +0 -1
- package/src/cborg/cborg/types/tsconfig.tsbuildinfo +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/LICENSE +0 -4
- /package/{patched/@ipld/dag-json → src/@ipld/car}/LICENSE +0 -0
- /package/src/@ipld/car/{car/dist → dist}/index.min.js +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/api.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/api.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-decoder.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-decoder.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-reader-browser.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-reader-browser.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-reader.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-reader.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-writer.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/buffer-writer.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/coding.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/coding.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/decoder-common.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/decoder-common.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/decoder.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/decoder.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/encoder.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/encoder.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/header-validator.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/header-validator.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/index-browser.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/index-browser.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/index.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/index.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexed-reader-browser.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexed-reader-browser.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexed-reader.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexed-reader.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexer.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/indexer.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/iterator-channel.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/iterator-channel.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/iterator.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/iterator.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/reader-browser.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/reader-browser.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/reader.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/writer-browser.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/writer-browser.d.ts.map +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/writer.d.ts +0 -0
- /package/src/@ipld/car/{car/dist → dist}/src/writer.d.ts.map +0 -0
- /package/src/@ipld/car/{car/package.json → package.json} +0 -0
- /package/src/@ipld/car/{car/src → src}/api.ts +0 -0
- /package/src/@ipld/car/{car/src → src}/buffer-decoder.js +0 -0
- /package/src/@ipld/car/{car/src → src}/buffer-reader-browser.js +0 -0
- /package/src/@ipld/car/{car/src → src}/buffer-reader.js +0 -0
- /package/src/@ipld/car/{car/src → src}/buffer-writer.js +0 -0
- /package/src/@ipld/car/{car/src → src}/coding.ts +0 -0
- /package/src/@ipld/car/{car/src → src}/decoder-common.js +0 -0
- /package/src/@ipld/car/{car/src → src}/decoder.js +0 -0
- /package/src/@ipld/car/{car/src → src}/encoder.js +0 -0
- /package/src/@ipld/car/{car/src → src}/header-validator.js +0 -0
- /package/src/@ipld/car/{car/src → src}/header.ipldsch +0 -0
- /package/src/@ipld/car/{car/src → src}/index-browser.js +0 -0
- /package/src/@ipld/car/{car/src → src}/index.js +0 -0
- /package/src/@ipld/car/{car/src → src}/indexed-reader-browser.js +0 -0
- /package/src/@ipld/car/{car/src → src}/indexed-reader.js +0 -0
- /package/src/@ipld/car/{car/src → src}/indexer.js +0 -0
- /package/src/@ipld/car/{car/src → src}/iterator-channel.js +0 -0
- /package/src/@ipld/car/{car/src → src}/iterator.js +0 -0
- /package/src/@ipld/car/{car/src → src}/reader-browser.js +0 -0
- /package/src/@ipld/car/{car/src → src}/writer-browser.js +0 -0
- /package/src/@ipld/car/{car/src → src}/writer.js +0 -0
- /package/src/@ipld/{car/car → dag-cbor}/LICENSE +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/README.md → README.md} +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/dist → dist}/index.min.js +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/dist → dist}/src/index.d.ts +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/dist → dist}/src/index.d.ts.map +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/package.json → package.json} +0 -0
- /package/src/@ipld/dag-cbor/{dag-cbor/src → src}/index.js +0 -0
- /package/src/@ipld/{dag-cbor/dag-cbor → dag-json}/LICENSE +0 -0
- /package/{patched → src}/@ipld/dag-json/README.md +0 -0
- /package/src/@ipld/dag-json/{dag-json/dist → dist}/index.min.js +0 -0
- /package/src/@ipld/dag-json/{dag-json/dist → dist}/src/index.d.ts +0 -0
- /package/src/@ipld/dag-json/{dag-json/dist → dist}/src/index.d.ts.map +0 -0
- /package/{patched → src}/@ipld/dag-json/package.json +0 -0
- /package/src/@ipld/dag-json/{dag-json/src → src}/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/LICENSE.md → LICENSE.md} +0 -0
- /package/src/@web3-storage/pail/{pail/README.md → README.md} +0 -0
- /package/src/@web3-storage/pail/{pail/cli.js → cli.js} +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/api.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/api.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/api.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/api.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/index.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/index.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/shard.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/batch/shard.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/block.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/block.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/clock/api.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/clock/api.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/clock/index.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/clock/index.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/api.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/api.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/batch/api.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/batch/api.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/batch/index.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/batch/index.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/index.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/crdt/index.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/diff.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/diff.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/index.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/index.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/merge.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/merge.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/shard.d.ts +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/src/shard.d.ts.map +0 -0
- /package/src/@web3-storage/pail/{pail/dist → dist}/tsconfig.tsbuildinfo +0 -0
- /package/src/@web3-storage/pail/{pail/package.json → package.json} +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/api.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/api.ts +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/batch/api.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/batch/api.ts +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/batch/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/batch/shard.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/block.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/clock/api.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/clock/api.ts +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/clock/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/api.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/api.ts +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/batch/api.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/batch/api.ts +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/batch/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/crdt/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/diff.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/index.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/merge.js +0 -0
- /package/src/@web3-storage/pail/{pail/src → src}/shard.js +0 -0
- /package/{patched → src}/cborg/.github/dependabot.yml +0 -0
- /package/{patched → src}/cborg/.github/workflows/test-and-release.yml +0 -0
- /package/{patched → src}/cborg/CHANGELOG.md +0 -0
- /package/{patched → src}/cborg/LICENSE +0 -0
- /package/{patched → src}/cborg/README.md +0 -0
- /package/{patched → src}/cborg/bench/bench.js +0 -0
- /package/{patched → src}/cborg/bench/json.js +0 -0
- /package/{patched → src}/cborg/bench/package.json +0 -0
- /package/{patched/cborg/lib → src/cborg/cborg}/is.js +0 -0
- /package/{patched → src}/cborg/example-bytestrings.js +0 -0
- /package/src/cborg/{cborg/example-json.js → example-json.js} +0 -0
- /package/src/cborg/{cborg/example.js → example.js} +0 -0
- /package/{patched/cborg/lib → src/cborg}/json/json.js +0 -0
- /package/{patched → src}/cborg/test/appendix_a.js +0 -0
- /package/{patched → src}/cborg/test/node-test-bin.js +0 -0
- /package/{patched/cborg/types/lib → src/cborg/types/cborg}/is.d.ts +0 -0
- /package/{patched → src}/cborg/types/example.d.ts +0 -0
- /package/{patched → src}/cborg/types/example.d.ts.map +0 -0
- /package/{patched/cborg/types/lib → src/cborg/types}/json/json.d.ts +0 -0
- /package/{patched/cborg/types/lib → src/cborg/types/utils}/bl.d.ts +0 -0
- /package/{patched/cborg/types/lib → src/cborg/types/utils}/byte-utils.d.ts +0 -0
- /package/{patched/cborg/types/lib → src/cborg/types/utils}/token.d.ts +0 -0
- /package/{patched/cborg/lib → src/cborg/utils}/byte-utils.js +0 -0
- /package/{patched/cborg/lib → src/cborg/utils}/token.js +0 -0
- /package/src/{@ipld/dag-json/dag-json → ipfs-unixfs-exporter}/LICENSE +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/README.md → README.md} +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/index.min.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/errors.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/errors.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/errors.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/errors.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/index.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/index.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/index.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/index.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-cbor.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-cbor.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-cbor.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-cbor.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-json.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-json.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-json.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/dag-json.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/identity.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/identity.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/identity.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/identity.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/index.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/index.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/index.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/index.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/json.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/json.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/json.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/json.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/raw.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/raw.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/raw.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/raw.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/directory.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/directory.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/directory.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/directory.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/file.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/file.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/file.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/file.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/raw.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/raw.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/raw.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/content/raw.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/index.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/index.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/index.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/resolvers/unixfs-v1/index.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/extract-data-from-block.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/extract-data-from-block.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/extract-data-from-block.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/extract-data-from-block.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/find-cid-in-shard.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/find-cid-in-shard.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/find-cid-in-shard.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/find-cid-in-shard.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/resolve-object-path.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/resolve-object-path.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/resolve-object-path.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/resolve-object-path.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/validate-offset-and-length.d.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/validate-offset-and-length.d.ts.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/validate-offset-and-length.js +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/src/utils/validate-offset-and-length.js.map +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/dist → dist}/typedoc-urls.json +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/package.json → package.json} +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/errors.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/index.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/dag-cbor.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/dag-json.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/identity.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/index.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/json.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/raw.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/unixfs-v1/content/directory.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/unixfs-v1/content/file.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/unixfs-v1/content/hamt-sharded-directory.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/unixfs-v1/content/raw.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/resolvers/unixfs-v1/index.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/utils/extract-data-from-block.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/utils/find-cid-in-shard.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/utils/resolve-object-path.ts +0 -0
- /package/src/ipfs-unixfs-exporter/{ipfs-unixfs-exporter/src → src}/utils/validate-offset-and-length.ts +0 -0
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
## [10.2.3](https://github.com/ipld/js-dag-json/compare/v10.2.2...v10.2.3) (2024-10-29)
|
|
2
|
-
|
|
3
|
-
### Dependencies
|
|
4
|
-
|
|
5
|
-
* **dev:** bump aegir from 44.1.4 to 45.0.1 ([250d25d](https://github.com/ipld/js-dag-json/commit/250d25d8f00cfea36b4f79f5bcc2b609bc54592d))
|
|
6
|
-
|
|
7
|
-
## [10.2.2](https://github.com/ipld/js-dag-json/compare/v10.2.1...v10.2.2) (2024-06-24)
|
|
8
|
-
|
|
9
|
-
### Dependencies
|
|
10
|
-
|
|
11
|
-
* **dev:** bump aegir from 43.0.3 to 44.0.0 ([c69a787](https://github.com/ipld/js-dag-json/commit/c69a787a81af7e40b19b5027f496277145b8c1e6))
|
|
12
|
-
|
|
13
|
-
## [10.2.1](https://github.com/ipld/js-dag-json/compare/v10.2.0...v10.2.1) (2024-06-01)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Dependencies
|
|
17
|
-
|
|
18
|
-
* **dev:** bump aegir from 42.2.11 to 43.0.1 ([6c660c2](https://github.com/ipld/js-dag-json/commit/6c660c2ce83c06530b1cf18160dcbd56e149de21))
|
|
19
|
-
|
|
20
|
-
## [10.2.0](https://github.com/ipld/js-dag-json/compare/v10.1.7...v10.2.0) (2024-02-16)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Features
|
|
24
|
-
|
|
25
|
-
* support decoding ArrayBuffers ([#127](https://github.com/ipld/js-dag-json/issues/127)) ([1e6cc99](https://github.com/ipld/js-dag-json/commit/1e6cc99fa3a7d6c7c7a43597a28ff66be35e2eb0))
|
|
26
|
-
|
|
27
|
-
## [10.1.7](https://github.com/ipld/js-dag-json/compare/v10.1.6...v10.1.7) (2024-01-10)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Dependencies
|
|
31
|
-
|
|
32
|
-
* **dev:** bump aegir from 41.3.5 to 42.1.0 ([20a7afe](https://github.com/ipld/js-dag-json/commit/20a7afebf7dd50b7d537733582be660b3b51a945))
|
|
33
|
-
|
|
34
|
-
## [10.1.6](https://github.com/ipld/js-dag-json/compare/v10.1.5...v10.1.6) (2023-12-30)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Dependencies
|
|
38
|
-
|
|
39
|
-
* bump multiformats from 12.1.3 to 13.0.0 ([#124](https://github.com/ipld/js-dag-json/issues/124)) ([aa07066](https://github.com/ipld/js-dag-json/commit/aa07066ed36bf9a8d1956b07f1880860b3709af2))
|
|
40
|
-
|
|
41
|
-
## [10.1.5](https://github.com/ipld/js-dag-json/compare/v10.1.4...v10.1.5) (2023-10-03)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Dependencies
|
|
45
|
-
|
|
46
|
-
* **dev:** bump aegir from 40.0.13 to 41.0.0 ([9ca7d3b](https://github.com/ipld/js-dag-json/commit/9ca7d3b426105562b780a707efd06072ba7a3e0c))
|
|
47
|
-
|
|
48
|
-
## [10.1.4](https://github.com/ipld/js-dag-json/compare/v10.1.3...v10.1.4) (2023-09-12)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Trivial Changes
|
|
52
|
-
|
|
53
|
-
* add or force update .github/workflows/js-test-and-release.yml ([043a680](https://github.com/ipld/js-dag-json/commit/043a680ebc0b56b21d57fcfcf9b87bd780a1924b))
|
|
54
|
-
* delete templates [skip ci] ([#117](https://github.com/ipld/js-dag-json/issues/117)) ([94ee02b](https://github.com/ipld/js-dag-json/commit/94ee02b09482ca0a471c0f4220df0601e2729348))
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Dependencies
|
|
58
|
-
|
|
59
|
-
* bump cborg from 2.0.5 to 4.0.0 ([29452a4](https://github.com/ipld/js-dag-json/commit/29452a479fce2b139c84a4ae65d6b2ed29d59f1a))
|
|
60
|
-
|
|
61
|
-
## [10.1.3](https://github.com/ipld/js-dag-json/compare/v10.1.2...v10.1.3) (2023-08-08)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Dependencies
|
|
65
|
-
|
|
66
|
-
* **dev:** bump aegir from 39.0.13 to 40.0.8 ([363da2a](https://github.com/ipld/js-dag-json/commit/363da2a9c9ce9739cae35add8a74c36b5ed4a836))
|
|
67
|
-
|
|
68
|
-
## [10.1.2](https://github.com/ipld/js-dag-json/compare/v10.1.1...v10.1.2) (2023-06-19)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Dependencies
|
|
72
|
-
|
|
73
|
-
* bump multiformats from 11.0.2 to 12.0.1 ([8db6696](https://github.com/ipld/js-dag-json/commit/8db669695f8c1f213c29536c3f57c77cb57d76c8))
|
|
74
|
-
|
|
75
|
-
## [10.1.1](https://github.com/ipld/js-dag-json/compare/v10.1.0...v10.1.1) (2023-06-14)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Dependencies
|
|
79
|
-
|
|
80
|
-
* bump cborg from 1.10.2 to 2.0.1 ([91c3e3f](https://github.com/ipld/js-dag-json/commit/91c3e3fe1ad813b3a804e846a25be7a4d5fed7eb))
|
|
81
|
-
|
|
82
|
-
## [10.1.0](https://github.com/ipld/js-dag-json/compare/v10.0.1...v10.1.0) (2023-05-23)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### Features
|
|
86
|
-
|
|
87
|
-
* TypedArray type conversions (and address other new lint complaints) ([94bd7ef](https://github.com/ipld/js-dag-json/commit/94bd7ef76b3effefbd12f4d2be2fe37a100ffa1e))
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### Dependencies
|
|
91
|
-
|
|
92
|
-
* **dev:** bump aegir from 38.1.8 to 39.0.7 ([71b54c6](https://github.com/ipld/js-dag-json/commit/71b54c6ca38ad6dbc90eb5f11f1340ea97031750))
|
|
93
|
-
|
|
94
|
-
## [10.0.1](https://github.com/ipld/js-dag-json/compare/v10.0.0...v10.0.1) (2023-02-08)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Dependencies
|
|
98
|
-
|
|
99
|
-
* **dev:** bump aegir from 37.12.1 to 38.1.2 ([7385c6e](https://github.com/ipld/js-dag-json/commit/7385c6e747a13baae885501f3773cd041e914027))
|
|
100
|
-
|
|
101
|
-
## [10.0.0](https://github.com/ipld/js-dag-json/compare/v9.1.1...v10.0.0) (2023-01-06)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### ⚠ BREAKING CHANGES
|
|
105
|
-
|
|
106
|
-
* reject duplicate map keys
|
|
107
|
-
|
|
108
|
-
### Bug Fixes
|
|
109
|
-
|
|
110
|
-
* reject duplicate map keys ([65a37bc](https://github.com/ipld/js-dag-json/commit/65a37bc17fd8cea11b36d6e30dcd6d16df462884))
|
|
111
|
-
|
|
112
|
-
## [9.1.1](https://github.com/ipld/js-dag-json/compare/v9.1.0...v9.1.1) (2023-01-03)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### Dependencies
|
|
116
|
-
|
|
117
|
-
* bump multiformats from 10.0.3 to 11.0.0 ([ba9c3a4](https://github.com/ipld/js-dag-json/commit/ba9c3a4fe43e5474786a2cf1d95b5375b8578177))
|
|
118
|
-
|
|
119
|
-
## [9.1.0](https://github.com/ipld/js-dag-json/compare/v9.0.1...v9.1.0) (2022-12-19)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### Features
|
|
123
|
-
|
|
124
|
-
* export parse / stringify functions ([#88](https://github.com/ipld/js-dag-json/issues/88)) ([1ae3f70](https://github.com/ipld/js-dag-json/commit/1ae3f708a624d5aaa5548a3360d7ccd8004e46e5))
|
|
125
|
-
|
|
126
|
-
## [9.0.1](https://github.com/ipld/js-dag-json/compare/v9.0.0...v9.0.1) (2022-10-24)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### Bug Fixes
|
|
130
|
-
|
|
131
|
-
* bring back asCID check for backward compat with multiformats@<10 ([#83](https://github.com/ipld/js-dag-json/issues/83)) ([fe19208](https://github.com/ipld/js-dag-json/commit/fe19208aef881769470d5e9730ba434a3076346e))
|
|
132
|
-
|
|
133
|
-
## [9.0.0](https://github.com/ipld/js-dag-json/compare/v8.0.11...v9.0.0) (2022-10-19)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### ⚠ BREAKING CHANGES
|
|
137
|
-
|
|
138
|
-
* publish as esm-only (#80)
|
|
139
|
-
|
|
140
|
-
### Features
|
|
141
|
-
|
|
142
|
-
* publish as esm-only ([#80](https://github.com/ipld/js-dag-json/issues/80)) ([131ea8e](https://github.com/ipld/js-dag-json/commit/131ea8e91fba1845ff755f8e8e6672fdf0919ca3))
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
### Trivial Changes
|
|
146
|
-
|
|
147
|
-
* **no-release:** bump actions/setup-node from 3.4.1 to 3.5.0 ([#76](https://github.com/ipld/js-dag-json/issues/76)) ([30578b4](https://github.com/ipld/js-dag-json/commit/30578b4f3dc7f2d3b1517ba69965115d17d74e16))
|
|
148
|
-
* **no-release:** bump actions/setup-node from 3.5.0 to 3.5.1 ([#79](https://github.com/ipld/js-dag-json/issues/79)) ([a59b710](https://github.com/ipld/js-dag-json/commit/a59b710d3585ea6f07cbc4890a1c4d100a8bec4e))
|
|
149
|
-
* **no-release:** bump ipld-garbage from 4.0.10 to 5.0.0 ([#72](https://github.com/ipld/js-dag-json/issues/72)) ([6e428e1](https://github.com/ipld/js-dag-json/commit/6e428e1ad953495c2c6546b020faeb898ab812d7))
|
|
150
|
-
* update project config ([cf08c02](https://github.com/ipld/js-dag-json/commit/cf08c02c1ada814e43c34c6df24d464718d581d8))
|
|
151
|
-
|
|
152
|
-
## [8.0.11](https://github.com/ipld/js-dag-json/compare/v8.0.10...v8.0.11) (2022-08-27)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
### Trivial Changes
|
|
156
|
-
|
|
157
|
-
* **deps-dev:** bump typescript from 4.7.4 to 4.8.2 ([#75](https://github.com/ipld/js-dag-json/issues/75)) ([fbd68b9](https://github.com/ipld/js-dag-json/commit/fbd68b92b6169f1bb27e3f05befe80827de752d1))
|
|
158
|
-
* **no-release:** bump actions/setup-node from 3.2.0 to 3.3.0 ([#71](https://github.com/ipld/js-dag-json/issues/71)) ([26cd28a](https://github.com/ipld/js-dag-json/commit/26cd28a6bfe8a895b1c102587402dfb558ae30e5))
|
|
159
|
-
* **no-release:** bump actions/setup-node from 3.3.0 to 3.4.0 ([#73](https://github.com/ipld/js-dag-json/issues/73)) ([4734dec](https://github.com/ipld/js-dag-json/commit/4734dec409786ec00479d3988a6d471f20b348cd))
|
|
160
|
-
* **no-release:** bump actions/setup-node from 3.4.0 to 3.4.1 ([#74](https://github.com/ipld/js-dag-json/issues/74)) ([546502c](https://github.com/ipld/js-dag-json/commit/546502ca9fc03ae0799a9b47c999c66612ea2035))
|
|
161
|
-
|
|
162
|
-
### [8.0.10](https://github.com/ipld/js-dag-json/compare/v8.0.9...v8.0.10) (2022-05-25)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### Trivial Changes
|
|
166
|
-
|
|
167
|
-
* **deps-dev:** bump typescript from 4.6.4 to 4.7.2 ([645255c](https://github.com/ipld/js-dag-json/commit/645255c916104dc5129f1d701eac40119bebf996))
|
|
168
|
-
* **no-release:** bump actions/setup-node from 3.1.0 to 3.1.1 ([#64](https://github.com/ipld/js-dag-json/issues/64)) ([9e3eb91](https://github.com/ipld/js-dag-json/commit/9e3eb91079105d435129de7bf364d75f60dfbb91))
|
|
169
|
-
* **no-release:** bump actions/setup-node from 3.1.1 to 3.2.0 ([#69](https://github.com/ipld/js-dag-json/issues/69)) ([46bf66d](https://github.com/ipld/js-dag-json/commit/46bf66d1d9f6e03fd3e051c61abb9f7625b1c664))
|
|
170
|
-
* **no-release:** bump mocha from 9.2.2 to 10.0.0 ([#66](https://github.com/ipld/js-dag-json/issues/66)) ([cf98d70](https://github.com/ipld/js-dag-json/commit/cf98d701a650baf50ddbe30d777aad1c71ec8867))
|
|
171
|
-
* **no-release:** bump polendina from 2.0.15 to 3.0.0 ([#67](https://github.com/ipld/js-dag-json/issues/67)) ([3993975](https://github.com/ipld/js-dag-json/commit/3993975dff22b013664348caf94df83e3976a8d5))
|
|
172
|
-
* **no-release:** bump polendina from 3.0.0 to 3.1.0 ([#68](https://github.com/ipld/js-dag-json/issues/68)) ([3724268](https://github.com/ipld/js-dag-json/commit/37242680dde12d83f0de38d181312298f80469d8))
|
|
173
|
-
* **no-release:** bump standard from 16.0.4 to 17.0.0 ([#65](https://github.com/ipld/js-dag-json/issues/65)) ([80dcb64](https://github.com/ipld/js-dag-json/commit/80dcb64ef7502d1b353707d9e58fc9fe939cc263))
|
|
174
|
-
|
|
175
|
-
### [8.0.9](https://github.com/ipld/js-dag-json/compare/v8.0.8...v8.0.9) (2022-04-05)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Bug Fixes
|
|
179
|
-
|
|
180
|
-
* typo in the readme ([#63](https://github.com/ipld/js-dag-json/issues/63)) ([1168651](https://github.com/ipld/js-dag-json/commit/1168651de0b0977b369faaac0a39495eb39e63b1))
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
### Trivial Changes
|
|
184
|
-
|
|
185
|
-
* **no-release:** bump actions/setup-node from 3.0.0 to 3.1.0 ([#62](https://github.com/ipld/js-dag-json/issues/62)) ([67c71d6](https://github.com/ipld/js-dag-json/commit/67c71d6a5f60d202c5dd4ace5b3766d4c812f3c6))
|
|
186
|
-
|
|
187
|
-
### [8.0.8](https://github.com/ipld/js-dag-json/compare/v8.0.7...v8.0.8) (2022-03-02)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
### Trivial Changes
|
|
191
|
-
|
|
192
|
-
* **deps-dev:** bump typescript from 4.5.5 to 4.6.2 ([#61](https://github.com/ipld/js-dag-json/issues/61)) ([6b2d04f](https://github.com/ipld/js-dag-json/commit/6b2d04fd6a3429f5e10adc7f3d8094785be6a08a))
|
|
193
|
-
* **no-release:** bump actions/checkout from 2.4.0 to 3 ([#60](https://github.com/ipld/js-dag-json/issues/60)) ([2e69f96](https://github.com/ipld/js-dag-json/commit/2e69f965c08882b3a31db52341662d8ca51582f1))
|
|
194
|
-
* **no-release:** bump actions/setup-node from 2.5.0 to 2.5.1 ([#57](https://github.com/ipld/js-dag-json/issues/57)) ([fd88425](https://github.com/ipld/js-dag-json/commit/fd884252f6cf655234f4bd0323140cc1394adf87))
|
|
195
|
-
* **no-release:** bump actions/setup-node from 2.5.1 to 3.0.0 ([#59](https://github.com/ipld/js-dag-json/issues/59)) ([91d068c](https://github.com/ipld/js-dag-json/commit/91d068cbfa1dc621fdf65f5871da54458a55c5f4))
|
|
196
|
-
|
|
197
|
-
### [8.0.7](https://github.com/ipld/js-dag-json/compare/v8.0.6...v8.0.7) (2021-12-10)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### Bug Fixes
|
|
201
|
-
|
|
202
|
-
* bad double-release ([22fc1fe](https://github.com/ipld/js-dag-json/commit/22fc1fee8a494290670919b403cf2cc6ad0a14d6))
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
2
|
-
|
|
3
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
|
|
5
|
-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
|
11
|
-
all copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
-
THE SOFTWARE.
|
|
Binary file
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
/* eslint max-depth: ["error", 7] */
|
|
2
|
-
import { Token, Type } from 'cborg'
|
|
3
|
-
import * as cborgJson from 'cborg/json'
|
|
4
|
-
import { CID } from 'multiformats'
|
|
5
|
-
import { base64 } from 'multiformats/bases/base64'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @template T
|
|
9
|
-
* @typedef {import('multiformats/codecs/interface').ByteView<T>} ByteView
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @template T
|
|
13
|
-
* @typedef {import('multiformats/codecs/interface').ArrayBufferView<T>} ArrayBufferView
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* @template T
|
|
17
|
-
* @typedef {import('multiformats').ToString<T>} ToString
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* @typedef {import('cborg/interface').DecodeTokenizer} DecodeTokenizer
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @template T
|
|
25
|
-
* @param {ByteView<T> | ArrayBufferView<T>} buf
|
|
26
|
-
* @returns {ByteView<T>}
|
|
27
|
-
*/
|
|
28
|
-
function toByteView (buf) {
|
|
29
|
-
if (buf instanceof ArrayBuffer) {
|
|
30
|
-
return new Uint8Array(buf, 0, buf.byteLength)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return buf
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* cidEncoder will receive all Objects during encode, it needs to filter out
|
|
38
|
-
* anything that's not a CID and return `null` for that so it's encoded as
|
|
39
|
-
* normal. Encoding a CID means replacing it with a `{"/":"<CidString>}`
|
|
40
|
-
* object as per the DAG-JSON spec.
|
|
41
|
-
*
|
|
42
|
-
* @param {any} obj
|
|
43
|
-
* @returns {Token[]|null}
|
|
44
|
-
*/
|
|
45
|
-
function cidEncoder (obj) {
|
|
46
|
-
if (obj.asCID !== obj && obj['/'] !== obj.bytes) {
|
|
47
|
-
return null // any other kind of object
|
|
48
|
-
}
|
|
49
|
-
const cid = CID.asCID(obj)
|
|
50
|
-
/* c8 ignore next 4 */
|
|
51
|
-
// very unlikely case, and it'll probably throw a recursion error in cborg
|
|
52
|
-
if (!cid) {
|
|
53
|
-
return null
|
|
54
|
-
}
|
|
55
|
-
const cidString = cid.toString()
|
|
56
|
-
|
|
57
|
-
return [
|
|
58
|
-
new Token(Type.map, Infinity, 1),
|
|
59
|
-
new Token(Type.string, '/', 1), // key
|
|
60
|
-
new Token(Type.string, cidString, cidString.length), // value
|
|
61
|
-
new Token(Type.break, undefined, 1)
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* bytesEncoder will receive all Uint8Arrays (and friends) during encode, it
|
|
67
|
-
* needs to replace it with a `{"/":{"bytes":"Base64ByteString"}}` object as
|
|
68
|
-
* per the DAG-JSON spec.
|
|
69
|
-
*
|
|
70
|
-
* @param {Uint8Array} bytes
|
|
71
|
-
* @returns {Token[]|null}
|
|
72
|
-
*/
|
|
73
|
-
function bytesEncoder (bytes) {
|
|
74
|
-
const bytesString = base64.encode(bytes).slice(1) // no mbase prefix
|
|
75
|
-
return [
|
|
76
|
-
new Token(Type.map, Infinity, 1),
|
|
77
|
-
new Token(Type.string, '/', 1), // key
|
|
78
|
-
new Token(Type.map, Infinity, 1), // value
|
|
79
|
-
new Token(Type.string, 'bytes', 5), // inner key
|
|
80
|
-
new Token(Type.string, bytesString, bytesString.length), // inner value
|
|
81
|
-
new Token(Type.break, undefined, 1),
|
|
82
|
-
new Token(Type.break, undefined, 1)
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* taBytesEncoder wraps bytesEncoder() but for the more exotic typed arrays so
|
|
88
|
-
* that we access the underlying ArrayBuffer data
|
|
89
|
-
*
|
|
90
|
-
* @param {Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array|Float64Array|Uint8ClampedArray|BigInt64Array|BigUint64Array} obj
|
|
91
|
-
* @returns {Token[]|null}
|
|
92
|
-
*/
|
|
93
|
-
function taBytesEncoder (obj) {
|
|
94
|
-
return bytesEncoder(new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength))
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* abBytesEncoder wraps bytesEncoder() but for plain ArrayBuffers
|
|
99
|
-
*
|
|
100
|
-
* @param {ArrayBuffer} ab
|
|
101
|
-
* @returns {Token[]|null}
|
|
102
|
-
*/
|
|
103
|
-
function abBytesEncoder (ab) {
|
|
104
|
-
return bytesEncoder(new Uint8Array(ab))
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// eslint-disable-next-line jsdoc/require-returns-check
|
|
108
|
-
/**
|
|
109
|
-
* Intercept all `undefined` values from an object walk and reject the entire
|
|
110
|
-
* object if we find one.
|
|
111
|
-
*
|
|
112
|
-
* @returns {null}
|
|
113
|
-
*/
|
|
114
|
-
function undefinedEncoder () {
|
|
115
|
-
throw new Error('`undefined` is not supported by the IPLD Data Model and cannot be encoded')
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Intercept all `number` values from an object walk and reject the entire
|
|
120
|
-
* object if we find something that doesn't fit the IPLD data model (NaN &
|
|
121
|
-
* Infinity).
|
|
122
|
-
*
|
|
123
|
-
* @param {number} num
|
|
124
|
-
* @returns {null}
|
|
125
|
-
*/
|
|
126
|
-
function numberEncoder (num) {
|
|
127
|
-
if (Number.isNaN(num)) {
|
|
128
|
-
throw new Error('`NaN` is not supported by the IPLD Data Model and cannot be encoded')
|
|
129
|
-
}
|
|
130
|
-
if (num === Infinity || num === -Infinity) {
|
|
131
|
-
throw new Error('`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded')
|
|
132
|
-
}
|
|
133
|
-
return null // process with standard number encoder
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const encodeOptions = {
|
|
137
|
-
typeEncoders: {
|
|
138
|
-
Object: cidEncoder,
|
|
139
|
-
Buffer: bytesEncoder,
|
|
140
|
-
Uint8Array: bytesEncoder,
|
|
141
|
-
Int8Array: taBytesEncoder,
|
|
142
|
-
Uint16Array: taBytesEncoder,
|
|
143
|
-
Int16Array: taBytesEncoder,
|
|
144
|
-
Uint32Array: taBytesEncoder,
|
|
145
|
-
Int32Array: taBytesEncoder,
|
|
146
|
-
Float32Array: taBytesEncoder,
|
|
147
|
-
Float64Array: taBytesEncoder,
|
|
148
|
-
Uint8ClampedArray: taBytesEncoder,
|
|
149
|
-
BigInt64Array: taBytesEncoder,
|
|
150
|
-
BigUint64Array: taBytesEncoder,
|
|
151
|
-
DataView: taBytesEncoder,
|
|
152
|
-
ArrayBuffer: abBytesEncoder,
|
|
153
|
-
undefined: undefinedEncoder,
|
|
154
|
-
number: numberEncoder
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @implements {DecodeTokenizer}
|
|
160
|
-
*/
|
|
161
|
-
class DagJsonTokenizer extends cborgJson.Tokenizer {
|
|
162
|
-
/**
|
|
163
|
-
* @param {Uint8Array} data
|
|
164
|
-
* @param {object} [options]
|
|
165
|
-
*/
|
|
166
|
-
constructor (data, options) {
|
|
167
|
-
super(data, options)
|
|
168
|
-
/** @type {Token[]} */
|
|
169
|
-
this.tokenBuffer = []
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @returns {boolean}
|
|
174
|
-
*/
|
|
175
|
-
done () {
|
|
176
|
-
return this.tokenBuffer.length === 0 && super.done()
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* @returns {Token}
|
|
181
|
-
*/
|
|
182
|
-
_next () {
|
|
183
|
-
if (this.tokenBuffer.length > 0) {
|
|
184
|
-
// @ts-ignore https://github.com/Microsoft/TypeScript/issues/30406
|
|
185
|
-
return this.tokenBuffer.pop()
|
|
186
|
-
}
|
|
187
|
-
return super.next()
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Implements rules outlined in https://github.com/ipld/specs/pull/356
|
|
192
|
-
*
|
|
193
|
-
* @returns {Token}
|
|
194
|
-
*/
|
|
195
|
-
next () {
|
|
196
|
-
const token = this._next()
|
|
197
|
-
|
|
198
|
-
if (token.type.compare(Type.map) === 0) {
|
|
199
|
-
const keyToken = this._next()
|
|
200
|
-
if (keyToken.type.compare(Type.string) === 0 && keyToken.value === '/') {
|
|
201
|
-
const valueToken = this._next()
|
|
202
|
-
if (valueToken.type.compare(Type.string) === 0) { // *must* be a CID
|
|
203
|
-
const breakToken = this._next() // swallow the end-of-map token
|
|
204
|
-
if (breakToken.type.compare(Type.break)) {
|
|
205
|
-
throw new Error('Invalid encoded CID form')
|
|
206
|
-
}
|
|
207
|
-
this.tokenBuffer.push(valueToken) // CID.parse will pick this up after our tag token
|
|
208
|
-
return new Token(Type.tag, 42, 0)
|
|
209
|
-
}
|
|
210
|
-
if (valueToken.type.compare(Type.map) === 0) {
|
|
211
|
-
const innerKeyToken = this._next()
|
|
212
|
-
if (innerKeyToken.type.compare(Type.string) === 0 && innerKeyToken.value === 'bytes') {
|
|
213
|
-
const innerValueToken = this._next()
|
|
214
|
-
if (innerValueToken.type.compare(Type.string) === 0) { // *must* be Bytes
|
|
215
|
-
for (let i = 0; i < 2; i++) {
|
|
216
|
-
const breakToken = this._next() // swallow two end-of-map tokens
|
|
217
|
-
if (breakToken.type.compare(Type.break)) {
|
|
218
|
-
throw new Error('Invalid encoded Bytes form')
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
const bytes = base64.decode(`m${innerValueToken.value}`)
|
|
222
|
-
return new Token(Type.bytes, bytes, innerValueToken.value.length)
|
|
223
|
-
}
|
|
224
|
-
this.tokenBuffer.push(innerValueToken) // bail
|
|
225
|
-
}
|
|
226
|
-
this.tokenBuffer.push(innerKeyToken) // bail
|
|
227
|
-
}
|
|
228
|
-
this.tokenBuffer.push(valueToken) // bail
|
|
229
|
-
}
|
|
230
|
-
this.tokenBuffer.push(keyToken) // bail
|
|
231
|
-
}
|
|
232
|
-
return token
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const decodeOptions = {
|
|
237
|
-
allowIndefinite: false,
|
|
238
|
-
allowUndefined: false,
|
|
239
|
-
allowNaN: false,
|
|
240
|
-
allowInfinity: false,
|
|
241
|
-
allowBigInt: true, // this will lead to BigInt for ints outside of
|
|
242
|
-
// safe-integer range, which may surprise users
|
|
243
|
-
strict: true,
|
|
244
|
-
useMaps: false,
|
|
245
|
-
rejectDuplicateMapKeys: true,
|
|
246
|
-
/** @type {import('cborg').TagDecoder[]} */
|
|
247
|
-
tags: []
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// we're going to get TAG(42)STRING("bafy...") from the tokenizer so we only need
|
|
251
|
-
// to deal with the STRING("bafy...") at this point
|
|
252
|
-
decodeOptions.tags[42] = CID.parse
|
|
253
|
-
|
|
254
|
-
export const name = 'dag-json'
|
|
255
|
-
export const code = 0x0129
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* @template T
|
|
259
|
-
* @param {T} node
|
|
260
|
-
* @returns {ByteView<T>}
|
|
261
|
-
*/
|
|
262
|
-
export const encode = (node) => cborgJson.encode(node, encodeOptions)
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @template T
|
|
266
|
-
* @param {ByteView<T> | ArrayBufferView<T>} data
|
|
267
|
-
* @returns {T}
|
|
268
|
-
*/
|
|
269
|
-
export const decode = (data) => {
|
|
270
|
-
const buf = toByteView(data)
|
|
271
|
-
// the tokenizer is stateful so we need a single instance of it
|
|
272
|
-
const options = Object.assign(decodeOptions, { tokenizer: new DagJsonTokenizer(buf, decodeOptions) })
|
|
273
|
-
return cborgJson.decode(buf, options)
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* @template T
|
|
278
|
-
* @param {T} node
|
|
279
|
-
* @returns {ToString<T>}
|
|
280
|
-
*/
|
|
281
|
-
export const format = (node) => utf8Decoder.decode(encode(node))
|
|
282
|
-
export { format as stringify }
|
|
283
|
-
const utf8Decoder = new TextDecoder()
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* @template T
|
|
287
|
-
* @param {ToString<T>} data
|
|
288
|
-
* @returns {T}
|
|
289
|
-
*/
|
|
290
|
-
export const parse = (data) => decode(utf8Encoder.encode(data))
|
|
291
|
-
const utf8Encoder = new TextEncoder()
|