Skip to content

Conversation

zone117x
Copy link
Contributor

@zone117x zone117x 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 August 6, 2019 12:16
* develop:
  Bump to v19.2.5.
  Bump to v19.2.4 and include script-dist-file.md
…his is intended for use in third-party wallets or in DApps that register names." Also, this exposes AuthScope.

Signed-off-by: Mary Anthony <[email protected]>
Signed-off-by: Mary Anthony <[email protected]>
* 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
Copy link

codecov bot 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
Copy link

codecov bot 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 August 12, 2019 22:46
@zone117x zone117x added this to the DX Q3 Sprint 1 milestone Aug 20, 2019
@stackatron
Copy link

@zone117x needs to add some testing criteria for @timstackblock

* 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
Copy link
Contributor Author

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

Copy link
Contributor

@yknl yknl left a comment

Choose a reason for hiding this comment

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

LGTM

@moxiegirl moxiegirl added the docs Impacts docs or requires updated documentation label Aug 26, 2019
* develop:
  Update worldlist filter with single regex
  Exclude unused bip39 wordlists from dist bundle (saves around 240KB uncompressed)
@stackatron stackatron assigned timstackblock and unassigned zone117x Aug 30, 2019
@timstackblock
Copy link
Contributor

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

@timstackblock
Copy link
Contributor

This is complete and test passed

@zone117x zone117x merged commit 0b0b5c0 into develop Sep 10, 2019
@stackatron stackatron removed this from the DX Q3 Sprint 2 milestone Oct 4, 2019
@kyranjamie kyranjamie deleted the feature/file-api-additions branch June 21, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Impacts docs or requires updated documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants