Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
An ES7 [CAS designed](https://en.wikipedia.org/wiki/Content-addressable_storage) file storage for nodejs with a simple API and robust implementation.
An ES7 CAS designed file storage for nodejs with a simple API and robust implementation.
const Storage = require('castor');
// castor internal index file path
var store = new Storage('./some/path/index.json');
// return an *index* to write and fetch file into
var index = store.getIndex('medias');
// download, if needed, the requested file, store it in CAS and reference it into current index
// file_url can be an url.parse'd object
await index.checkEntry("some/storage/path/file.mp4", "http://remoteurl.com/20320930293", "[CURRENT_MD5]");
// retrieve a file information from current index
index.get("some/storage/path/file.mp4")
/* retrieve {
file_size : (an integer),
file_path : './some/path/00/1/[FULL_MD5]',
file_md5 : '[FULL_MD5]',
}
*/
// expose an http/express middleware to delivers content from an existing path
server.use(index.send.bind(index)) // (req, res, next)
// move all existing (and non indexed files) files to CAS design
await store.warmup();
//reset a local index file_path => hash mapping (no files are deleted at this time)
index.reset();
//remove all unlinked file (files not referenced in any index) from storage folder
await storage.purge();
FAQs
An ES7 [CAS designed](https://en.wikipedia.org/wiki/Content-addressable_storage) file storage for nodejs with a simple API and robust implementation.
We found that castor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.