-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor: Move blob index logic from upload-api to blob-index lib #1434
Conversation
124f574
to
ddf591a
Compare
* @param {Uint8Array} carData | ||
* @returns {Promise<ShardedDAGIndex>} | ||
*/ | ||
export const fromArchive = async (carData) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what extract
does above no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract expects to read from a ReadableStream
whereas fromArchive
reads from a UInt8Array
in memory. Does this mean that fromArchive
should just convert the Uint8Array
into a ReadableStream
?
Also, extract
will not know how to do things like discarding the overall dag shard from the encoded shards, before building the ShardedDAGIndex.
- Add fromArchive method - Fix imports/exports
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
The blob index logic should be an independent module as it will be used in both client and service code. --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
The blob index logic should be an independent module as it will be used in both client and service code. --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
The blob index logic should be an independent module as it will be used in both client and service code. --------- Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2024-05-14) ### Features * move blob index logic from upload-api to blob-index lib ([#1434](#1434)) ([797f628](797f628)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## [14.0.0](upload-api-v13.0.2...upload-api-v14.0.0) (2024-05-14) ### ⚠ BREAKING CHANGES * deprecate issuer ([#1344](#1344)) ### Features * add "plan/create-admin-session" capability ([#1411](#1411)) ([50eeeb5](50eeeb5)) * add blob protocol to upload-client ([#1425](#1425)) ([49aef56](49aef56)) * deprecate issuer ([#1344](#1344)) ([afbbde3](afbbde3)) * move blob index logic from upload-api to blob-index lib ([#1434](#1434)) ([797f628](797f628)) * remove issuer row ([#1345](#1345)) ([cf5b0db](cf5b0db)) ### Fixes * `encodeURIComponent` on bucket origin ([#1448](#1448)) ([5618644](5618644)) * add format specifier to blob location claim URL ([#1445](#1445)) ([9982d12](9982d12)) * test against actual api ([#1438](#1438)) ([f8132ca](f8132ca)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
🤖 I have created a release *beep* *boop* --- ## 1.0.0 (2024-12-02) ### Features * move blob index logic from upload-api to blob-index lib ([storacha#1434](https://github.com/storacha/upload-service/issues/1434)) ([797f628](797f628)) * router ([#11](#11)) ([c810735](c810735)) ### Fixes * check for blob/accept receipts before blob/add is concluded ([storacha#1459](https://github.com/storacha/upload-service/issues/1459)) ([462518c](462518c)) * missing blob-index deps ([storacha#1467](https://github.com/storacha/upload-service/issues/1467)) ([deb8cc9](deb8cc9)) * repo URLs ([storacha#1550](https://github.com/storacha/upload-service/issues/1550)) ([e02ddf3](e02ddf3)) * trigger release ([0bf74f4](0bf74f4)) * upload API test fixes ([6b0d72d](6b0d72d)) * use one-webcrypto from npm ([storacha#1525](https://github.com/storacha/upload-service/issues/1525)) ([9345c54](9345c54)) ### Other Changes * Add `pnpm dev` to watch-build all packages ([storacha#1533](https://github.com/storacha/upload-service/issues/1533)) ([07970ef](07970ef)) * **main:** release blob-index 1.0.0 ([storacha#1449](https://github.com/storacha/upload-service/issues/1449)) ([094442b](094442b)) * **main:** release blob-index 1.0.1 ([storacha#1452](https://github.com/storacha/upload-service/issues/1452)) ([3d9809f](3d9809f)) * **main:** release blob-index 1.0.2 ([storacha#1468](https://github.com/storacha/upload-service/issues/1468)) ([fb6e5a1](fb6e5a1)) * **main:** release blob-index 1.0.3 ([storacha#1489](https://github.com/storacha/upload-service/issues/1489)) ([fc71d31](fc71d31)) * **main:** release blob-index 1.0.4 ([storacha#1526](https://github.com/storacha/upload-service/issues/1526)) ([a79ea18](a79ea18)) * package renames ([0f797ed](0f797ed)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The blob index logic should be an independent module as it will be used in both client and service code.