Closed Metizik closed 5 years ago
Can you please comment on the new dependencies and why they are needed
@sschiessl-bcp , sure:
archiver
is used to compress sources of charting_library into zip fileextract-zip
is used to decompress downloaded zip file, since archiver
can only compress fileshttps
is used to download file over HTTPS URL from assetsmd5-file
is used to calculate MD5 digest and verify the downloaded file extract-zip
is not able to also compress? Two dependencies seem over the top. Isn't there one (that is properly maintained) that can do both?
extract-zip
is not able to compress. Most relevant node modules related to ZIP compression are all splitted into zippers and unzippers separately, the only found alternative would be to use zlib
module, but it requires much more logic with manual iterating over files, excluding files we want to skip and combining separate zipped files streams into single write stream there is an example of GZip https://medium.com/@harrietty/zipping-and-unzipping-files-with-nodejs-375d2750c5e4
Another possible implementation will be to use TAR and ZIP, but it does not match current assets/charting_library.zip format of archive
Thanks
General
Closes #128
https://bitshares.org/assets/charting_library.zip
verifies the downloaded file against the .md5 file checksum unpacks it such that the charting_library folder is fully restored locallyGeneral
Please make sure the following is done:
Code Preparation
Please review all your changes one last time before committing
Testing
The branch has been tested on the following browsers (desktop and mobile view)
User interface changes
Delete this section if there weren't any UI changes. Please make sure you tested your changes in all themes
Please provide screenshots/licecap of your changes below