Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/commands/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function execute(options: ExecuteOptions = {}) {
const { debug: debugMode } = options;

if (debugMode) {
console.log(kleur.bgMagenta().bold(` > Debug mode enabled \n`));
console.log(kleur.bgMagenta().bold(" > Debug mode enabled \n"));
}

const [configResult] = await Promise.all([
Expand Down Expand Up @@ -83,7 +83,7 @@ function init() {
}

function debug(obj: any) {
const filePath = path.join(CONSTANTS.DIRS.REPORTS, `debug-pkg-repo.txt`);
const filePath = path.join(CONSTANTS.DIRS.REPORTS, "debug-pkg-repo.txt");
writeFileSync(filePath, inspect(obj, { showHidden: true, depth: null }), "utf8");
}

152 changes: 76 additions & 76 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
{
"name": "@nodesecure/report",
"version": "3.0.0",
"description": "NodeSecure HTML & PDF graphic security report",
"main": "./dist/src/index.js",
"type": "module",
"bin": {
"nreport": "./dist/bin/index.js"
},
"exports": {
".": {
"import": "./dist/src/index.js"
}
},
"scripts": {
"build": "tsc && npm run build:views && npm run build:public",
"build:views": "rimraf dist/views && cp -r views dist/views",
"build:public": "rimraf dist/public && cp -r public dist/public",
"lint": "eslint src test bin scripts",
"test-only": "glob -c \"tsx --test-reporter=spec --test\" \"./test/**/*.spec.ts\"",
"test": "c8 --all --src ./src -r html npm run test-only",
"preview:light": "tsx --no-warnings ./scripts/preview.js --theme light",
"preview:dark": "tsx --no-warnings ./scripts/preview.js --theme dark",
"prepublishOnly": "npm run build"
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/NodeSecure/report.git"
},
"keywords": [
"security",
"report",
"nodesecure",
"pdf",
"html",
"chart"
],
"author": "NodeSecure",
"license": "MIT",
"bugs": {
"url": "https://github.com/NodeSecure/report/issues"
},
"homepage": "https://github.com/NodeSecure/report#readme",
"dependencies": {
"@nodesecure/flags": "^2.4.0",
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
"@nodesecure/rc": "^4.0.0",
"@nodesecure/scanner": "^6.0.2",
"@nodesecure/utils": "^2.2.0",
"@openally/mutex": "^1.0.0",
"@topcli/spinner": "^2.1.2",
"esbuild": "^0.25.0",
"filenamify": "^6.0.0",
"kleur": "^4.1.5",
"puppeteer": "24.3.1",
"sade": "^1.8.1",
"zup": "0.0.2"
},
"devDependencies": {
"@openally/config.eslint": "^1.3.0",
"@openally/config.typescript": "^1.0.3",
"@types/node": "^22.2.0",
"c8": "^10.1.2",
"glob": "^11.0.0",
"open": "^10.1.0",
"rimraf": "^6.0.1",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=20"
}
}
{
"name": "@nodesecure/report",
"version": "3.0.0",
"description": "NodeSecure HTML & PDF graphic security report",
"main": "./dist/src/index.js",
"type": "module",
"bin": {
"nreport": "./dist/bin/index.js"
},
"exports": {
".": {
"import": "./dist/src/index.js"
}
},
"scripts": {
"build": "tsc && npm run build:views && npm run build:public",
"build:views": "rimraf dist/views && cp -r views dist/views",
"build:public": "rimraf dist/public && cp -r public dist/public",
"lint": "eslint src test bin scripts",
"test-only": "glob -c \"tsx --test-reporter=spec --test\" \"./test/**/*.spec.ts\"",
"test": "c8 --all --src ./src -r html npm run test-only",
"preview:light": "tsx --no-warnings ./scripts/preview.js --theme light",
"preview:dark": "tsx --no-warnings ./scripts/preview.js --theme dark",
"prepublishOnly": "npm run build"
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/NodeSecure/report.git"
},
"keywords": [
"security",
"report",
"nodesecure",
"pdf",
"html",
"chart"
],
"author": "NodeSecure",
"license": "MIT",
"bugs": {
"url": "https://github.com/NodeSecure/report/issues"
},
"homepage": "https://github.com/NodeSecure/report#readme",
"dependencies": {
"@nodesecure/flags": "^2.4.0",
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
"@nodesecure/rc": "^4.0.0",
"@nodesecure/scanner": "^6.0.2",
"@nodesecure/utils": "^2.2.0",
"@openally/mutex": "^1.0.0",
"@topcli/spinner": "^2.1.2",
"esbuild": "^0.25.0",
"filenamify": "^6.0.0",
"kleur": "^4.1.5",
"puppeteer": "24.3.1",
"sade": "^1.8.1",
"zup": "0.0.2"
},
"devDependencies": {
"@openally/config.eslint": "^2.1.0",
"@openally/config.typescript": "^1.0.3",
"@types/node": "^22.2.0",
"c8": "^10.1.2",
"glob": "^11.0.0",
"open": "^10.1.0",
"rimraf": "^6.0.1",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
},
"engines": {
"node": ">=20"
}
}
6 changes: 3 additions & 3 deletions scripts/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import path from "node:path";
import { mkdirSync, rmSync, writeFileSync } from "node:fs";
import { parseArgs } from "node:util";

// Import Third-party Dependencies
import open from "open";

// Import Internal Dependencies
import { HTMLTemplateGenerator } from "../src/reporting/template.js";
import { buildFrontAssets } from "../src/reporting/html.js";

// Import Third-party Dependencies
import open from "open";

// CONSTANTS
const kPreviewDir = path.join(import.meta.dirname, "..", "preview");

Expand Down
4 changes: 2 additions & 2 deletions src/analysis/extractScannerData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import * as localStorage from "../localStorage.js";
// CONSTANTS
const kFlagsList = Object.values(getManifest());
const kWantedFlags = getFlags();
const kScorecardVisualizerUrl = `https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects`;
const kNodeVisualizerUrl = `https://nodejs.org/dist/latest/docs/api`;
const kScorecardVisualizerUrl = "https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects";
const kNodeVisualizerUrl = "https://nodejs.org/dist/latest/docs/api";

function splitPackageWithOrg(pkg: string) {
// reverse here so if there is no orgPrefix, its value will be undefined
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/scanner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Import Node.js Dependencies
import path from "path";
import fs from "fs/promises";
import path from "node:path";
import fs from "node:fs/promises";

// Import Third-party Dependencies
import { Mutex } from "@openally/mutex";
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import path from "node:path";
import { fileURLToPath } from "node:url";

// Import Node.js Dependencies
// Import Third-party Dependencies
import * as rc from "@nodesecure/rc";

// CONSTANTS
Expand Down