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

Support additional types in putFile #693

Merged
merged 15 commits into from Sep 10, 2019

Conversation

@zone117x
Copy link
Member

commented Aug 12, 2019

Closes #689

Adds support for File, Blob, and TypedArrays to the putFile function.

When encryption is not enabled, the stream types are sent directly through to the fetch POST body and streamed from disk -> network when appropriate.

However, this PR does not improve the encryption related issues. When encryption is enabled, the stream types are buffered into memory, then encrypted and POSTed.

Support for the ReadableStream type is blocked by web browsers having yet to implement whatwg/fetch#425.

jsdom is used in the unit tests to polyfill the DOM File APIs

Acceptance criteria

zone117x and others added 11 commits Aug 6, 2019
* develop:
  Bump to v19.2.5.
  Bump to v19.2.4 and include script-dist-file.md
… typedoc and typescript minor versions
…his is intended for use in third-party wallets or in DApps that register names." Also, this exposes AuthScope.

Signed-off-by: Mary Anthony <mary@blockstack.com>
Signed-off-by: Mary Anthony <mary@blockstack.com>
* develop:
  Remove extra console log from tests.
  Update bitcoinjs-lib -- includes improvements to the native secp256k1 depedencies
  Throw error on user session overwrite.
  Update to typed `jsontokens` lib, fix all typing errors

# Conflicts:
#	package-lock.json
* network-reveal:
  Fixing line length
  Exposing the Blockstack network. Adding the caveat to the getName* "This is intended for use in third-party wallets or in DApps that register names."  Also, this exposes AuthScope.
  Expose the `BlockstackNetwork` class and the default instance, update typedoc and typescript minor versions
  Remove jsdoc types from network.ts

# Conflicts:
#	mdincludes/script-dist-file.md
@zone117x zone117x self-assigned this Aug 12, 2019
@codecov

This comment has been minimized.

Copy link

commented Aug 12, 2019

Codecov Report

Merging #693 into develop will increase coverage by 0.14%.
The diff coverage is 94.02%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #693      +/-   ##
===========================================
+ Coverage    75.34%   75.49%   +0.14%     
===========================================
  Files           57       57              
  Lines         2868     2897      +29     
  Branches       220      221       +1     
===========================================
+ Hits          2161     2187      +26     
- Misses         679      682       +3     
  Partials        28       28
Impacted Files Coverage Δ
src/auth/userSession.ts 58.75% <ø> (ø) ⬆️
src/operations/txbuild.ts 93.25% <ø> (ø) ⬆️
src/auth/authProvider.ts 47.05% <100%> (ø) ⬆️
src/profiles/services/twitter.ts 77.77% <100%> (ø) ⬆️
src/operations/skeletons.ts 88.35% <100%> (ø) ⬆️
src/encryption/ec.ts 95.52% <100%> (ø) ⬆️
src/storage/hub.ts 76.11% <100%> (ø) ⬆️
src/fetchUtil.ts 100% <100%> (ø) ⬆️
src/profiles/profile.ts 82.35% <100%> (ø) ⬆️
src/profiles/services/instagram.ts 84.61% <100%> (ø) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ee8292...8b9ee0f. Read the comment docs.

@codecov

This comment has been minimized.

Copy link

commented Aug 12, 2019

Codecov Report

Merging #693 into develop will increase coverage by 0.15%.
The diff coverage is 89.36%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #693      +/-   ##
===========================================
+ Coverage    68.98%   69.14%   +0.15%     
===========================================
  Files           57       57              
  Lines         3321     3354      +33     
  Branches       596      601       +5     
===========================================
+ Hits          2291     2319      +28     
- Misses         745      748       +3     
- Partials       285      287       +2
Impacted Files Coverage Δ
src/auth/userSession.ts 50% <ø> (ø) ⬆️
src/fetchUtil.ts 100% <100%> (ø) ⬆️
src/storage/hub.ts 75.67% <100%> (ø) ⬆️
src/utils.ts 47.05% <100%> (ø) ⬆️
src/storage/index.ts 73.78% <86.84%> (+1.32%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59de36e...647e5f2. Read the comment docs.

@zone117x zone117x requested review from yknl and timstackblock Aug 12, 2019
@zone117x zone117x added this to the DX Q3 Sprint 1 milestone Aug 20, 2019
@jeffdomke

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

@zone117x needs to add some testing criteria for @timstackblock

zone117x added 2 commits Aug 23, 2019
* develop:
  Bump version to v19.3.0-beta.1
  PR template formatting changes
  Use case and acceptance criteria in pull request template.
  More pull request template changes.
  More pull request template changes.
  Pull request template changes.
  Add checklist to pull request template
  More pull request template updates.
  More pull request template updates.
  Update pull request template
  Add a pull request template.
@zone117x

This comment has been minimized.

Copy link
Member Author

commented Aug 25, 2019

@timstackblock @yknl Created a draft PR against the app-generator with example usages -- see the updated PR acceptance criteria for links

@yknl
yknl approved these changes Aug 26, 2019
Copy link
Collaborator

left a comment

LGTM

* develop:
  Update worldlist filter with single regex
  Exclude unused bip39 wordlists from dist bundle (saves around 240KB uncompressed)
@jeffdomke jeffdomke assigned timstackblock and unassigned zone117x Aug 30, 2019
@timstackblock

This comment has been minimized.

Copy link

commented Sep 4, 2019

@zone117x The app-generator PR was helpful looks good so far I should be finish with this shortly

@timstackblock

This comment has been minimized.

Copy link

commented Sep 10, 2019

This is complete and test passed

@zone117x zone117x merged commit 0b0b5c0 into develop Sep 10, 2019
3 checks passed
3 checks passed
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 69.14% (+0.15%) compared to 59de36e
Details
license/cla Contributor License Agreement is signed.
Details
@jeffdomke jeffdomke removed this from the DX Q3 Sprint 2 milestone Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.