
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
doxdox-fetch
Advanced tools
Fetch utilities for doxdox server.
$ npm install doxdox-fetch --save
.env
GITHUB_API_TOKEN_READONLY=xxxxx
package.json
{
"type": "module",
"dependencies": {
"doxdox-fetch": "2.0.0"
},
"devDependencies": {
"dotenv": "16.0.0"
},
"scripts": {
"test": "node -r dotenv/config index.js"
},
"private": true
}
index.js
import { downloadFile, getRepoData, parseFiles } from 'doxdox-fetch';
import { parseString } from 'doxdox-parser-custom';
import { Doc } from 'doxdox-core';
(async () => {
const repoData = await getRepoData(username, repo, {
GITHUB_API_TOKEN: process.env.GITHUB_API_TOKEN_READONLY
});
const selectedBranch =
branch && [repoData.default_branch, ...repoData.tags].includes(branch)
? branch
: repoData.default_branch;
const files = await downloadFile(username, repo, selectedBranch, [
/.[jt]s$/,
/package.json$/,
/\.doxdoxignore$/
]);
const jsFiles = files.filter(
({ path }) =>
path.match(/\.[jt]sx?$/) &&
!path.match(/\.min\.[jt]sx?$/) &&
!path.match(/\.test\.[jt]sx?$/) &&
!path.match(/^dist\//) &&
!path.match(/__tests__\//)
);
const pkgFile = files.find(({ path }) => path.match(/^package\.json$/));
const pkgFileContents = JSON.parse(pkgFile?.content || '{}');
const doc: Doc = {
name: pkgFileContents.name || repoData.name,
description: pkgFileContents.description || repoData.description,
homepage: pkgFileContents.homepage || repoData.html_url,
files: await parseFiles(jsFiles, parseString)
};
console.log(doc);
})();
FAQs
> Fetch utilities for doxdox server.
The npm package doxdox-fetch receives a total of 0 weekly downloads. As such, doxdox-fetch popularity was classified as not popular.
We found that doxdox-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.