Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: upload/list items have a shards array property #229

Merged
merged 3 commits into from
Dec 5, 2022

Conversation

olizilla
Copy link
Contributor

@olizilla olizilla commented Dec 1, 2022

  • update tests and types to handle upload/list items with a shards array property.
  • update upload/add fn to return an UploadAddResponse as shards out may be more than shards in.
  • update README

see also: storacha/w3infra#56

- update tests and types to handle upload/list items with a shards array property.
- update upload/add fn to return an UploadAddResponse as shards out may be more than shards in.

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

License: MIT
Signed-off-by: Oli Evans <oli@protocol.ai>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 1, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d25f1b3
Status: ✅  Deploy successful!
Preview URL: https://57e985fa.ucan-protocol.pages.dev
Branch Preview URL: https://upload-add-shards-array.ucan-protocol.pages.dev

View logs

@olizilla
Copy link
Contributor Author

olizilla commented Dec 1, 2022

@alanshaw plz to eyes minor change to this PR since your review d25f1b3

shards are optional on upload/add invocation and response and updates the index.js test to echo back the root and shards sent in most cases. I made the first test check the dataCID and carCID against an expected car as it's the simplest one, and it seems reasonable to have a more concrete expectation there.... i then reaslised i didn't want to express any particular guarnatee about the expected CIDs for cars and roots for the other tests and figured out I could echo back the invocation nb (with an existence check to appease tsc).

If you prefer I can strip out the expected CAR from the first test here or leave it if useful.

@olizilla olizilla added this to the w3up phase 1 milestone Dec 1, 2022
Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alanshaw alanshaw merged commit c00da35 into main Dec 5, 2022
@alanshaw alanshaw deleted the upload-add-shards-array branch December 5, 2022 14:34
alanshaw pushed a commit that referenced this pull request Dec 6, 2022
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](upload-client-v2.1.0...upload-client-v3.0.0)
(2022-12-06)


### ⚠ BREAKING CHANGES

* upload/list items have a shards array property
([#229](#229))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
* follow up on the capabilities extract
([#239](#239))

### Features

* **access-client:** cli and recover
([#207](#207))
([adb3a8d](adb3a8d))
* follow up on the capabilities extract
([#239](#239))
([ef5e779](ef5e779))
* Revert "feat!: upgrade to `@ucanto/{interface,principal}`@^4.0.0"
([#245](#245))
([c182bbe](c182bbe))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
([2f3bab8](2f3bab8))
* upload/list items have a shards array property
([#229](#229))
([c00da35](c00da35))


### Bug Fixes

* list response results return type
([#206](#206))
([4bca6c1](4bca6c1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
gobengo pushed a commit that referenced this pull request Dec 7, 2022
🤖 I have created a release *beep* *boop*
---


##
[5.0.0](upload-client-v4.0.0...upload-client-v5.0.0)
(2022-12-07)


### ⚠ BREAKING CHANGES

* upgrade access-api @ucanto/* and @ipld/dag-ucan major versions
([#246](#246))
* upload/list items have a shards array property
([#229](#229))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
* follow up on the capabilities extract
([#239](#239))
* rename callback
([#198](#198))

### Features

* [#153](#153)
([#177](#177))
([d6d448c](d6d448c))
* a base for a new web3.storage upload-client
([#141](#141))
([9d4b5be](9d4b5be))
* **access-client:** cli and recover
([#207](#207))
([adb3a8d](adb3a8d))
* account recover with email
([#149](#149))
([6c659ba](6c659ba))
* add static uploads API
([#148](#148))
([d85d051](d85d051))
* allow custom shard size
([#185](#185))
([0cada8a](0cada8a))
* explicit resource
([#181](#181))
([785924b](785924b))
* follow up on the capabilities extract
([#239](#239))
([ef5e779](ef5e779))
* Revert "feat!: upgrade to `@ucanto/{interface,principal}`@^4.0.0"
([#245](#245))
([c182bbe](c182bbe))
* support pagination
([#204](#204))
([a5296a6](a5296a6)),
closes [#201](#201)
* upgrade access-api @ucanto/* and @ipld/dag-ucan major versions
([#246](#246))
([5e663d1](5e663d1))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
([2f3bab8](2f3bab8))
* upload/list items have a shards array property
([#229](#229))
([c00da35](c00da35))


### Bug Fixes

* export types
([c8d0a3f](c8d0a3f))
* list response results return type
([#206](#206))
([4bca6c1](4bca6c1))
* store export
([#197](#197))
([9b836e6](9b836e6))
* upload client list needs empty nb
([#194](#194))
([ff7fbb8](ff7fbb8))
* uploadFile requires BlobLike not Blob
([1cc7681](1cc7681))


### Code Refactoring

* rename callback
([#198](#198))
([5b8ef7d](5b8ef7d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
gobengo pushed a commit that referenced this pull request Apr 11, 2023
- update tests and types to handle upload/list items with a shards array
property.
- update upload/add fn to return an UploadAddResponse as shards out may
be more than shards in.
- update README

see also: storacha/w3infra#56

Signed-off-by: Oli Evans <oli@protocol.ai>
gobengo pushed a commit that referenced this pull request Apr 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](upload-client-v2.1.0...upload-client-v3.0.0)
(2022-12-06)


### ⚠ BREAKING CHANGES

* upload/list items have a shards array property
([#229](#229))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
* follow up on the capabilities extract
([#239](#239))

### Features

* **access-client:** cli and recover
([#207](#207))
([720dafb](720dafb))
* follow up on the capabilities extract
([#239](#239))
([717fcaa](717fcaa))
* Revert "feat!: upgrade to `@ucanto/{interface,principal}`@^4.0.0"
([#245](#245))
([197439e](197439e))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
([309aff0](309aff0))
* upload/list items have a shards array property
([#229](#229))
([723b281](723b281))


### Bug Fixes

* list response results return type
([#206](#206))
([e49c685](e49c685))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
gobengo pushed a commit that referenced this pull request Apr 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[5.0.0](upload-client-v4.0.0...upload-client-v5.0.0)
(2022-12-07)


### ⚠ BREAKING CHANGES

* upgrade access-api @ucanto/* and @ipld/dag-ucan major versions
([#246](#246))
* upload/list items have a shards array property
([#229](#229))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
* follow up on the capabilities extract
([#239](#239))
* rename callback
([#198](#198))

### Features

* [#153](#153)
([#177](#177))
([7fbf2a1](7fbf2a1))
* a base for a new web3.storage upload-client
([#141](#141))
([72c08d7](72c08d7))
* **access-client:** cli and recover
([#207](#207))
([720dafb](720dafb))
* account recover with email
([#149](#149))
([91ad47d](91ad47d))
* add static uploads API
([#148](#148))
([8b735fa](8b735fa))
* allow custom shard size
([#185](#185))
([2130405](2130405))
* explicit resource
([#181](#181))
([c127431](c127431))
* follow up on the capabilities extract
([#239](#239))
([717fcaa](717fcaa))
* Revert "feat!: upgrade to `@ucanto/{interface,principal}`@^4.0.0"
([#245](#245))
([197439e](197439e))
* support pagination
([#204](#204))
([363e3ac](363e3ac)),
closes [#201](#201)
* upgrade access-api @ucanto/* and @ipld/dag-ucan major versions
([#246](#246))
([65d191c](65d191c))
* upgrade to `@ucanto/{interface,principal}`@^4.0.0
([#238](#238))
([309aff0](309aff0))
* upload/list items have a shards array property
([#229](#229))
([723b281](723b281))


### Bug Fixes

* export types
([c44a252](c44a252))
* list response results return type
([#206](#206))
([e49c685](e49c685))
* store export
([#197](#197))
([d2296c5](d2296c5))
* upload client list needs empty nb
([#194](#194))
([7894fb9](7894fb9))
* uploadFile requires BlobLike not Blob
([56ec496](56ec496))


### Code Refactoring

* rename callback
([#198](#198))
([2349763](2349763))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants