Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
faux-knox-2
Advanced tools
[] (https://travis-ci.org/AppPress/node-faux-knox-2)
A mock knox wrapper
Froked from https://github.com/wlaurance/faux-knox
###Installation
npm install faux-knox-2
###Testing
npm test
###API
var knox = process.env.NODE_ENV === 'production'
? require('knox') : require('faux-knox');
var client = knox.createClient({
bucket: 'local/filesystem/dir'
//... other settings
});
//use client everywhere a regular knox client will be used.
####Implemented
#####getFile
function(uri, headers, callback)
callback(err, cres)
cres
is a readable stream with headers attached.
#####putFile
function(from, to, callback)
callback(err, res)
from
is the path to a local file to be read
to
is the path to write the from bytes mounted in the bucket specified.
res.headers.statusCode
is 201 on successful creation.
#####putBuffer
function(buffer, to, headers, callback)
callback(err, res)
buffer
is the buffer to write
to
is where the buffer is written
headers
used by knox module, ignored here
res.headers.statusCode
is 201 on successful creation.
#####deleteFile
function(file, callback)
callback(err, res)
file
path in bucket to delete
res.headers.statusCode
is 204 on successful deletion.
###TODO
All of the other knox functionality
FAQs
Mock requests to knox module using file system
The npm package faux-knox-2 receives a total of 2 weekly downloads. As such, faux-knox-2 popularity was classified as not popular.
We found that faux-knox-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.