meir017 / node-tgz-downloader Goto Github PK
View Code? Open in Web Editor NEWDownloads all of the node_modules tgz files based on a package-lock.json / pacakge.json file
License: MIT License
Downloads all of the node_modules tgz files based on a package-lock.json / pacakge.json file
License: MIT License
_enumerateDependencies(tarballs, packageLock.packages ?? packageLock.dependencies, options);
in order to simplify using a proxy we should move all http related function to a seperate module
#12
Hello,
I've tried your tool to download react-scripts package and the tool freeze at some point... Any idea ?
download-tgz package react-scripts
Regards,
Is it possible to allow the tarballs download directory structure to mirror npm registry? Specifically the .tgz
would be in a -
directory (e.g. node-tgz-downloader/-/node-tgz-downloader-3.11.2-preview1.tgz
)?
The intent is for mirroring npm packages into AirGap environment, something like package-bundle, however package-bundle
does not allow you to download packages according to package-lock.json
file.
when I run this command download-tgz package-json ./package.json --directory ./test --registry https://registry.npmjs.org/
, it run successfully. but it seems the https turn to http in zsh
,and there is no tarballs
directory in the ./test directory in the end.
download-tgz package-lock
is ok
Hi, I am using the downloader to pack all packages and dependencies, and upload them to a private NPM repository. It would be much easier to do so if the downloader would put all the tgz
files in the same folder, instead of a different folder for each file.
Is it possible to apply this behaviour as an optional argument to the downloader?
Hi. for version of package show error.
download-tgz package @tensorflow/[email protected]
Hello when I user this command, I can' download the tgz。
download-tgz package-lock ./package-lock.json
[failed download tgz] undefined https://registry.npm.taobao.org/@vue/babel-helper-vue-jsx-merge-props/download/@vue/babel-helper-vue-jsx-merge-props-1.2.1.tgz?cache=0&sync_timestamp=1602851122331&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vue%2Fbabel-helper-vue-jsx-merge-props%2Fdownload%2F%40vue%2Fbabel-helper-vue-jsx-merge-props-1.2.1.tgz 10
[failed download tgz] undefined https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz 10
Possible to limit download concurrency (e.g. using p-limit) as I suspect I'm hitting the rate-limit for npm registry? I need to run several times (as previously downloaded tgz are skipped) before the download ran to completion.
Tried monkey-patching the original download
node-tgz-downloader/lib/downloader.js
Lines 52 to 58 in 9c144bf
with the following and it worked flawlessly.
const asyncSequentialDownload = async () => {
for (let i = 0; i < tarballs.length; i++) {
const { url, directory } = tarballs[i];
const position = `${i + 1}/${tarballs.length}`;
logger(['downloading'.cyan, position], url);
await _downloadFileWithRetry(url, join(baseDirectory, directory), position, 10);
}
}
return asyncSequentialDownload();
Not working with proxy server, proxy wrote in .npmrc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.