mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix more documentation issues
This commit is contained in:
parent
f7e08bbea8
commit
86f82d6065
3 changed files with 4 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ let cachedPath = null;
|
||||||
* - Includes Safe Chain CA (for MITM of known registries)
|
* - Includes Safe Chain CA (for MITM of known registries)
|
||||||
* - Includes Mozilla roots via npm `certifi` (public HTTPS)
|
* - Includes Mozilla roots via npm `certifi` (public HTTPS)
|
||||||
* - Includes Node's built-in root certificates as a portable fallback
|
* - Includes Node's built-in root certificates as a portable fallback
|
||||||
|
* @returns {string} Path to the combined CA bundle PEM file
|
||||||
*/
|
*/
|
||||||
export function getCombinedCaBundlePath() {
|
export function getCombinedCaBundlePath() {
|
||||||
if (cachedPath && fs.existsSync(cachedPath)) return cachedPath;
|
if (cachedPath && fs.existsSync(cachedPath)) return cachedPath;
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export function parsePackageFromUrl(url) {
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @param {string} registry
|
* @param {string} registry
|
||||||
|
* @returns {{packageName: string | undefined, version: string | undefined}}
|
||||||
*/
|
*/
|
||||||
function parseJsPackageFromUrl(url, registry) {
|
function parseJsPackageFromUrl(url, registry) {
|
||||||
let packageName, version;
|
let packageName, version;
|
||||||
|
|
@ -78,6 +79,7 @@ function parseJsPackageFromUrl(url, registry) {
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @param {string} url
|
||||||
* @param {string} registry
|
* @param {string} registry
|
||||||
|
* @returns {{packageName: string | undefined, version: string | undefined}}
|
||||||
*/
|
*/
|
||||||
function parsePipPackageFromUrl(url, registry) {
|
function parsePipPackageFromUrl(url, registry) {
|
||||||
let packageName, version
|
let packageName, version
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ let cachedMalwareDatabase = null;
|
||||||
* For Python packages (PEP-503): lowercase and replace _, -, . with -
|
* For Python packages (PEP-503): lowercase and replace _, -, . with -
|
||||||
* For js packages: keep as-is (case-sensitive)
|
* For js packages: keep as-is (case-sensitive)
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function normalizePackageName(name) {
|
function normalizePackageName(name) {
|
||||||
const ecosystem = getEcoSystem();
|
const ecosystem = getEcoSystem();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue