@seneca/doc
Advanced tools
+11
-10
| #!/usr/bin/env node | ||
| /* Copyright (c) 2019 voxgig and other contributors, MIT License */ | ||
| /* Copyright (c) 2019-2023 voxgig and other contributors, MIT License */ | ||
| 'use strict' | ||
@@ -8,3 +8,3 @@ | ||
| var Minimist = require('minimist') | ||
| const Minimist = require('minimist') | ||
@@ -23,14 +23,15 @@ const Inspect = require('../lib/inspect.js') | ||
| async function inspect_local_plugin() { | ||
| var extra_plugins = Array.isArray(argv.p) | ||
| ? argv.p | ||
| : 'string' === typeof p | ||
| ? [argv.p] | ||
| let parg = argv.p | ||
| const extra_plugins = Array.isArray(parg) | ||
| ? parg | ||
| : 'string' === typeof parg | ||
| ? [parg] | ||
| : null | ||
| // NOTE: use -t for further top level names | ||
| var top = ['role', 'sys'] | ||
| const top = ['role', 'sys'] | ||
| .concat((argv.t || '').split(',')) | ||
| .filter(x => '' != x) | ||
| var options = { | ||
| const options = { | ||
| plugins: extra_plugins, | ||
@@ -40,3 +41,3 @@ top: top | ||
| var plugin = await Inspect(LocalFolder, LocalPackage, options) | ||
| const plugin = await Inspect(LocalFolder, LocalPackage, options) | ||
@@ -47,3 +48,3 @@ // props to ignore | ||
| var inj = Object.keys(Render).reduce((acc, prop) => { | ||
| const inj = Object.keys(Render).reduce((acc, prop) => { | ||
| if (!prop.match(re)) { | ||
@@ -50,0 +51,0 @@ acc[prop.replace(/_+/, '-')] = Render[prop](plugin, options) |
+2
-1
@@ -1,2 +0,2 @@ | ||
| /* Copyright (c) 2019 Voxgig Ltd. and other contributors, MIT License */ | ||
| /* Copyright (c) 2019-2023 Voxgig Ltd. and other contributors, MIT License */ | ||
| 'use strict' | ||
@@ -6,2 +6,3 @@ | ||
| // TODO: replace Joi with Gubu | ||
| const Joi = require('@hapi/joi') | ||
@@ -8,0 +9,0 @@ |
+1
-1
| { | ||
| "name": "@seneca/doc", | ||
| "version": "4.3.0", | ||
| "version": "5.0.0", | ||
| "description": "Documentation helper for Seneca plugins.", | ||
@@ -5,0 +5,0 @@ "main": "doc.js", |
+13
-4
@@ -1,6 +0,15 @@ | ||
| # seneca-doc | ||
|  | ||
| [![Npm][BadgeNpm]][Npm] | ||
| [![Travis][BadgeTravis]][Travis] | ||
| [![Coveralls][BadgeCoveralls]][Coveralls] | ||
| > _Seneca Doc_ is a plugin for [Seneca](http://senecajs.org) | ||
| Provides generated documentation for Seneca plugins and injects this | ||
| documentation into the plugin README.md markdown file. | ||
| [](https://npmjs.com/package/@seneca/doc) | ||
| [](https://github.com/senecajs/seneca-doc/actions/workflows/build.yml) | ||
| [](https://coveralls.io/github/senecajs/seneca-doc?branch=main) | ||
| [](https://snyk.io/test/github/senecajs/seneca-doc) | ||
| [](https://deepscan.io/dashboard#view=project&tid=5016&pid=21342&bid=611017) | ||
| [](https://codeclimate.com/github/voxgig/seneca-doc/maintainability) | ||
@@ -7,0 +16,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
26187
3.7%575
0.35%229
4.09%