
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@seneca/doc
Advanced tools

Seneca Doc is a plugin for Seneca
Provides generated documentation for Seneca plugins and injects this documentation into the plugin README.md markdown file.
![]() | This open source module is sponsored and supported by Voxgig. |
|---|
Documentation helper for Seneca plugins.
$ npm install @seneca/doc -D
Add to your package.json:
{
"scripts": {
"seneca-doc": "seneca-doc"
}
}
And run with
$ npm run seneca-doc
This utility plugin updates the README.md file in a Seneca plugin
repository with auto-generated documentation. Special HTML comment
markers are used to indicate the insertion point, and all markdown
within these markers is replaced.
In the top level folder of your project, create a module called
plugin-doc.js where plugin is the name of your plugin. This should
return an object whose keys are the names of the action functions in
your plugin. Each key should define an action description with
properties as defined below. For an example,
see doc-doc.js which defines the documentation for this
plugin.
Alternatively, return the same data structure from your plugin
definition under the doc property.
The export doc/generating will be true if documentation is being
generated. You can use this handle cases where your plugin has
additional dependencies that fail when it is loaded direcly by
seneca-doc.
See the unit tests for examples of usage.
NOTE: Plugins must be loaded via seneca.use() for validation to
activate (as well as depending on a validation plugin such as as
seneca-joi). In particular, when testing, ensure that the plugin
under test is loaded with seneca.use('..') (assuming tests are
within a test subfolder).
NOTE: must be loaded before seneca-joi so that the rules are
available to seneca-joi.
The seneca-doc command takes the following command line arguments:
seneca-doc -p seneca-entity -p @seneca/graph -p @seneca/owner
The following properties can be optionally attached to the action function of a given message:
desc: String describing the action.examples: An object, where the keys are example paramers, and the values are description strings.validate: The validation object supported by seneca-joi.reply: A literal object showing the reply object structure.See the source of seneca-doc.js itself for a good example of using these.
NOTE: plugin options are not currently supported - that would make a great pull request! :)
The Action Patterns and Action Descriptions sections below are examples of the generated output, run on the seneca-doc plugin itself.
test : booleanerrors : objectinit$ : booleansys:doc,describe:pin »Provide introspection data for actions matching a pin (a sub pattern).
sys:doc,describe:pin,pin:"a:1,b:2"
a:1,b:2.{
pin: 'pin parameter',
actions: [
'{ Seneca action definition }'
]
}
sys:doc,describe:plugin »Provide introspection data for a plugin and its actions.
sys:doc,describe:plugin,plugin:entity
sys:doc,describe:plugin,plugin:entity$foo
{
plugin: 'plugin parameter',
actions: [
'{ Seneca action definition }'
]
}
FAQs
Documentation helper for Seneca plugins.
The npm package @seneca/doc receives a total of 248 weekly downloads. As such, @seneca/doc popularity was classified as not popular.
We found that @seneca/doc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Google’s UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.