Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ftp-deploy-package
Advanced tools
This package is made to deploy an npm package to a remote server through FTP. It copies the package files and package.json
to a temporary directory where the production dependencies are installed. ftp-deploy-package
then uploads all the useful files to the remote server.
Add this package to your devDependencies: npm install --save-dev fetch-github-app
.
ftp-deploy-package
package is a wrapper around ftp. You can thus pass it all the options accepted by its connect
method.
"deploy": "ftp-deploy-package"
to your package.json
scripts
npm run deploy
Example:
npm run deploy -- --path site/wwwroot/app --host your.host.com --user "deploy\user"
const ftpDeployPackage = require('ftp-deploy-package');
// Path to the directory containing your package.json.
const packageDirectory = 'local/path';
const ftpConfig = {
host: 'your.host.com',
path: 'site/wwwroot/app',
user: 'deploy\\user'
};
ftpDeployPackage(packageDirectory, ftpConfig).then(() => {
console.log('deploy successful');
});
To test the package on your machine:
npm install
.env
file respecting the dotenv guidelines and add the environment variables mentioned by index.test.js
.npm test
FAQs
Deploy an npm package with its production dependencies through FTP
We found that ftp-deploy-package demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.