Corella NPM and PHP Composer Package Backup Posted On February 17, 2021 A command line tool to create offline backups of packages from your projects. Currently supports NPM and PHP Composer package files. NPMScans all dependencies and devDependenciesFor each found dependency, moves it’s dependencies into bundleDependenciesInstalls the package with bundled dependencies, skipping scriptsPacks the package so that it can then be installed from archive using npm install archived.tar.gzComposerCopies only the requires, requires-dev and config attributes of the supplied composer.json file to a new fileRuns composer installLeaves you with an uncompressed vendor folder with the required packagesUsage–phpBinPath must be a valid path to your PHP installation if you’re backing up composer.jsonMultiple package files can be supplied, each with their own backup destination by repeating –type, –filePath, –backupFolderPath options, at least one set of these is required–doNotRemoveTemp will leave behind the corella_temp directory in each backupFolderPathExamplecorella.exe backup –phpBinPath=”/path/to/bin/php” –type=”npm” –filePath=”/path/to/package.json” –backupFolderPath=”/path/to/npmBackup” –type=”composer” –filePath=”/path/to/composer.json” –backupFolderPath=”/path/to/composerBackup”Notescomposer install is RAM hungry. If it runs out of memory, the tool tends to just crashAdd it to a batch/bash script with paths to all of your projects, and run it whenever you like, or add it to your task schedulerPHP must have openssl module enabled , and if on windows the MS Visual C++ 2015 redistributable must be installedbackupFolderPath will be written to and deleted from by the backup process so don’t point it anywhere importantIt’s not the greatest tool, but it’s handy if you want to keep your own copies of the packages you use in case they get unpublished. For more complex projects or for finer control over which versions of dependencies are used, or for maintainng your own copies of a packages full history, a caching package proxy like Verdaccio (NPM) or Satis (composer) might be betterIf this program gives your errors, let me know. Pretty much everything it does is based on hacky workarounds (npm and composer were not meant to be bundled and used this way!), but I’ll take a look at them and see what I can do.Download (64 bit only)1.0.0 Windows1.0.0 Mac1.0.0 LinuxProvided ‘as-is’ with no warranty expressed or implied. I assume no liability or responsibility for any damage this software causes. Use at your own risk. Find this useful? Drop me an email and let me know 🙂 Share this:TwitterFacebookRedditLike this:Like Loading... Tags:JavaScript, PHP, Tools Related Posts Donuts. Download E-Record ATO Tax Software Can It Run Doom? AWS S3 Edition About The Author Brad Leave a ReplyCancel reply