
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@mongodb-js/dl-center
Advanced tools
Provides a set of functions to aid releases to the download center.
import { DownloadCenter } from '@mongodb-js/dl-center';
const bucketConfig = {
bucket: `${process.env.MONGODB_DOWNLOADS_BUCKET_NAME}`,
accessKeyId: `${process.env.MONGODB_DOWNLOADS_AWS_ACCESS_KEY_ID}`,
secretAccessKey: `${process.env.MONGODB_DOWNLOADS_AWS_SECRET_ACCESS_KEY}`
};
const downloadCenter = new DownloadCenter(bucketConfig);
downloadCenter.uploadConfig
validates a configuration against a json schema, checks that all the download links are reacheable and uploads the configuration to the download center.
const compassConfig = {
versions: [ /* ... */ ],
// ...
};
await downloadCenter.uploadConfig('compass/compass.json', compassConfig);
const config = await downloadCenter.downloadConfig('compass/compass.json');
assert(config.versions.length > 1);
const config = await downloadCenter.uploadAsset(
'compass/assets/compass.tgz',
fs.createReadStream('./compass.tgz'),
{ contentType: 'application/gzip' } // contentType is optional
);
const buffer = await downloadCenter.downloadAsset(
'compass/assets/compass.tgz'
);
fs.writeFileSync('./compass.tgz', buffer);
import { validateConfig } from '@mongodb-js/dl-center';
await validateConfig({ /* ... */ });
This can be used to wait for the assets of a release to be available before publishing a new configuration:
const { ok, status } = await probePlatformDownloadLink(platform);
FAQs
mongodb download center internal tools
The npm package @mongodb-js/dl-center receives a total of 33,646 weekly downloads. As such, @mongodb-js/dl-center popularity was classified as popular.
We found that @mongodb-js/dl-center demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 25 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.