
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
____ _ __ _ ____
|####`--|#|---|##|---|#|--'##|#|
_ |____,--|#|---|##|---|#|--.__|_|
_|#)_____________________________________,--'EEEEEEEEEEEEEE'_=-.
((_____((_________________________,--------[JW](___(____(____(_==) _________
.--|##,----o o o o o o o__|/`---,-,-'=========`=+==.
|##|_Y__,__.-._,__, __,-.___/ J \ .----.#############|##|
|##| `-.|#|##|#|`===l##\ _\############|##|
=======-===l |_|__|_| \##`-"__,=======.###|##|
\__," '======'
npm install -g sniper
CLI Server for Snippets (Visualization examples).
package.json "sniper": {
"js": ["/build/msa.js"],
"css": ["/css/msa.css"],
"first": "msa_show_menu"
}
js: (array) all js dependencies (paths starting with /build will be ignored at the BioJS registry) (required)
first: name of the snippet to be displayed as first example on the BioJS registry (required)
css: all css files you need (optional)
snippets: (optional) all snippet folders (default: ["snippets"])
More attributes:
buildCSS (will replace css)buildJS (will replace js)The build attributes can be used to specify alternative locations - in any case the registry will ignore js resources starting with build.
Create js files in the examples folder.
var app = require("your-awesome-component");
var instance = new app(yourDiv);
You can safely assume that the variable yourDiv is your main div. Use yourDiv.id if your component expects an id.
If you dislike this handy wrapping, you can create your own <same-filename>.html file.
(In case there is no <same-filename>.html the sniper will automatically generate one with a div and a randomId - you have access to this div as DOM reference via yourDiv).
sniper <your-dir>
If is ., you don't need to have this argument.
Now you can open localhost:9090.
There are there modes:
(will use the published npm source)
The files are refreshed on every reload.
use:
sniper -c
This will compile all the snippets to a minimal HTML version, remember that only the example snippets will be uploaded to the registry.
... just create the ```same_filename.json`.
{js: ["<more js dependencies>"]}
Usage: sniper [options] [pkgdir]
Options:
-h, --help output usage information
-V, --version output the version number
-p, --port <number> port to run
-c, --compile [directory] Creates static output
-v, --verbose Increase verbosity
If you want to download data via XHR you might normally write data/data.json - make it relative by appending ./.
So you would have ./data/data.json
add this line somewhere after you created your application instance in the snippet. E.g. if you make an XHR request it has to be in the callback.
//@biojs-instance=<variable name of your component>
(this is - under the hood - replaced with instance.onAll and then sends messages to the parent frame).
yourDiv (a predefined variable pointing to a div container) or define a custom, minimal .htmlAn example can be found at biojs-vis-msa.
Reason: visually appealing example files in the registry (inspired by Angular JS )
FAQs
Renders snippets on demand
The npm package sniper receives a total of 378 weekly downloads. As such, sniper popularity was classified as not popular.
We found that sniper 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.