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
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A diagnostic CLI that measures Dependabot toil and CVE exposure across a GitHub org. It runs in the user's environment, crawls `api.github.com`, and writes a self-contained HTML report to a temporary directory. No data leaves the user's network unless they choose to share the generated report.

The single entrypoint is `patchwave-analysis [<org-or-user>]` — an interactive session that prompts for the target if omitted, then whether to share the report when the scan finishes. There are no other flags; the time window (90 days) is fixed.
The single entrypoint is `patchwave-analysis [<org-or-user>]` — an interactive session that prompts for the target if omitted, then opens the generated report when the scan finishes. There are no other flags; the time window (90 days) is fixed.

## Stack

Expand All @@ -24,7 +24,6 @@ patchwave-analysis/
│ ├── interactive/ Clack prompts: token walkthrough, share/open, banner, TTY gate
│ ├── prompt/ Prompter abstraction over @clack/prompts
│ ├── report/ report aggregation + `report/web/` React UI
│ ├── upload/ artifact sharing
│ ├── testHelpers/ shared test utilities
│ ├── context.ts CliContext DI root (see Conventions)
│ ├── cli.ts arg parsing + main()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [PatchWave](https://patchwave.ai) Analysis

PatchWave Analysis is a free diagnostic CLI that measures Dependabot toil and CVE exposure across a GitHub org. It reads from the GitHub API and writes a self-contained HTML report you can use on its own, no PatchWave account needed.
PatchWave Analysis is a diagnostic CLI that measures Dependabot toil and CVE exposure across a GitHub org. It reads from the GitHub API and writes a self-contained HTML report you can use on its own, no PatchWave account needed.

## Run it

Expand Down Expand Up @@ -77,7 +77,7 @@ The report is one self-contained file with every metric baked in. It carries no

## Telemetry & privacy

We send anonymous usage events and crash reports so we can improve the tool. Org names, repo names, tokens, report contents, and your hostname are never sent. We also do not ask if you want to share the report with us if you opt out of telemetry.
We send anonymous usage events and crash reports so we can improve the tool. Org names, repo names, tokens, report contents, and your hostname are never sent. The generated report stays on your machine.

To disable telemetry, set any of these in your environment:

Expand Down
4 changes: 0 additions & 4 deletions src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ test('writes a report when the GitHub calls succeed', async () => {
expect(result.code).toBe(0);

// Output lands in a temp dir, not the CWD; locate it via the returned paths.
expect(result.run.target).toBe('acme');
expect(result.run.htmlPath.endsWith('patchwave-report.html')).toBe(true);

const written = fs.read(result.run.htmlPath);
Expand All @@ -93,9 +92,6 @@ test('writes a report when the GitHub calls succeed', async () => {
const embedded = JSON.parse(match?.[1] ?? '') as { meta: { org: string } };
expect(embedded.meta.org).toBe('acme');

// The completed run hands the html back so the caller (index.ts) can drive
// the share prompt without re-reading the filesystem.
expect(result.run.html).toContain('<html');
expect(prompter.spinnerEvents).toContainEqual({ type: 'stop', message: 'Scanned acme.' });

expect(analytics.capturedEvents('run_started')[0]?.properties).toMatchObject({
Expand Down
4 changes: 1 addition & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ export interface CliOptions {
}

export interface CompletedRun {
readonly target: string;
readonly htmlPath: string;
readonly html: string;
}

export type MainResult =
Expand Down Expand Up @@ -136,7 +134,7 @@ export async function main(ctx: Context, argv: readonly string[]): Promise<MainR
warnings: stats.warnings,
duration_ms: elapsedMs(startedAt, clock.now()),
});
return { kind: 'completed', code: 0, run: { target, htmlPath, html: report } };
return { kind: 'completed', code: 0, run: { htmlPath } };
}

export type ParseCliResult = { kind: 'ok'; value: CliOptions } | { kind: 'err'; message: string };
Expand Down
182 changes: 0 additions & 182 deletions src/context/Uploader.test.ts

This file was deleted.

Loading
Loading