Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
gulp-deploy-azure-cdn
Advanced tools
A Gulp plugin for for uploading files to Azure Blob Storage. Wraps a vanilla node package https://github.com/bestander/deploy-azure-cdn. It is perfect for deploying compiled assets to Microsoft Azure CDN as a last step in a Continuous Integration setup.
npm install gulp-deploy-azure-cdn
var deployCdn = require('gulp-deploy-azure-cdn');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('upload-app-to-azure', function () {
return gulp.src(['*.js','*.json'], {
base: 'node_modules/deploy-azure-cdn' // optional, the base directory in which the file is located. The relative path of file to this directory is used as the destination path
}).pipe(deployCdn({
containerName: 'test', // container name in blob
serviceOptions: ['blobstoragename', '/OwQ/MyLongSecretStringFromAzureConfigPanel'], // custom arguments to azure.createBlobService
folder: '1.2.35-b27', // path within container
zip: true, // gzip files if they become smaller after zipping, content-encoding header will change if file is zipped
deleteExistingBlobs: true, // true means recursively deleting anything under folder
concurrentUploadThreads: 10, // number of concurrent uploads, choose best for your network condition
metadata: {
cacheControl: 'public, max-age=31530000', // cache in browser
cacheControlHeader: 'public, max-age=31530000' // cache in azure CDN. As this data does not change, we set it to 1 year
},
testRun: false // test run - means no blobs will be actually deleted or uploaded, see log messages for details
})).on('error', gutil.log);
});
gulp.src {base}
- use standard gulp configurations to skip some folders from relative file paths (example)deployCdn function argument
- azure cdn and upload configs
serviceOptions
: [] - Custom arguments to azure.createBlobService. If this array contains a single argument it will be interpreted as a blob connection string. If it contains two arguments then they will be interpreted as a blob account name and access key, respectively.containerName
: null - container name, requiredcontainerOptions
: {publicAccessLevel: "blob"} - container optionsfolder
: '', // path within container. Default is root directory of containerdeleteExistingBlobs
: true, // set it to false to skip recursive deleting blobs in folderconcurrentUploadThreads
: 10, // number of concurrent uploads, choose best for your network conditionzip
: false, // true if want to gzip the files before uploading. File will be zipped only if compressed file is smaller than originalmetadata
: {cacheControl: 'public, max-age=31556926'} // metadata for each uploaded filetestRun
: false, // set to true if you just want to check connectivity and see deployment logs. No blobs will be removed or uplaoded.FAQs
Gulp plugin for uploading files to Azure Blob Storage
We found that gulp-deploy-azure-cdn demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.