launch-doctor 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -1
- package/README.md +155 -30
- package/dist/src/checks/costs.d.ts +1 -0
- package/dist/src/checks/costs.js +40 -5
- package/dist/src/checks/database.js +122 -3
- package/dist/src/checks/first-impressions.js +227 -117
- package/dist/src/checks/legal.js +27 -13
- package/dist/src/checks/monitoring.js +39 -10
- package/dist/src/checks/payments.js +131 -4
- package/dist/src/checks/secrets.js +103 -7
- package/dist/src/cli.js +90 -3
- package/dist/src/demo.d.ts +13 -0
- package/dist/src/demo.js +58 -2
- package/dist/src/detect.js +4 -1
- package/dist/src/fixes.js +2 -2
- package/dist/src/github.d.ts +80 -0
- package/dist/src/github.js +288 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/init.d.ts +1 -1
- package/dist/src/init.js +2 -2
- package/dist/src/mcp.d.ts +140 -0
- package/dist/src/mcp.js +381 -0
- package/dist/src/project.d.ts +8 -0
- package/dist/src/project.js +102 -6
- package/dist/src/report.d.ts +2 -0
- package/dist/src/report.js +12 -1
- package/dist/src/summary.d.ts +3 -0
- package/dist/src/summary.js +17 -13
- package/dist/src/types.d.ts +2 -0
- package/dist/src/util.d.ts +2 -0
- package/dist/src/util.js +2 -0
- package/package.json +2 -2
package/dist/src/summary.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { Report } from './types.js';
|
|
2
|
+
export declare function escapeCell(text: string): string;
|
|
3
|
+
/** The per-category Markdown table shared by the job summary and the pull request comment. */
|
|
4
|
+
export declare function categoryTable(report: Report): string[];
|
|
2
5
|
/**
|
|
3
6
|
* Markdown for the GitHub Actions job summary page (the GITHUB_STEP_SUMMARY file):
|
|
4
7
|
* the grade, a category table, and the critical and warning titles with file:line.
|
package/dist/src/summary.js
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { shortWhere } from './checks/common.js';
|
|
2
|
-
function escapeCell(text) {
|
|
2
|
+
export function escapeCell(text) {
|
|
3
3
|
return text.replace(/\|/g, '\\|').replace(/\r?\n/g, ' ');
|
|
4
4
|
}
|
|
5
5
|
function findingLine(f) {
|
|
6
6
|
const where = f.location ? ` (\`${shortWhere(f.location)}\`)` : '';
|
|
7
7
|
return `- ${escapeCell(f.title)}${where}`;
|
|
8
8
|
}
|
|
9
|
+
/** The per-category Markdown table shared by the job summary and the pull request comment. */
|
|
10
|
+
export function categoryTable(report) {
|
|
11
|
+
const out = ['| Category | Grade | Critical | Warnings | To check |', '|---|:---:|---:|---:|---:|'];
|
|
12
|
+
for (const c of report.categories) {
|
|
13
|
+
if (c.skipped || !c.applicable) {
|
|
14
|
+
out.push(`| ${c.name} | - | | | ${c.skipped ? 'skipped' : escapeCell(c.note ?? 'not used')} |`);
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
const crit = c.findings.filter((f) => f.severity === 'critical').length;
|
|
18
|
+
const warn = c.findings.filter((f) => f.severity === 'warning').length;
|
|
19
|
+
out.push(`| ${c.name} | ${c.grade ?? '-'} | ${crit} | ${warn} | ${c.manual.length} |`);
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
}
|
|
9
23
|
/**
|
|
10
24
|
* Markdown for the GitHub Actions job summary page (the GITHUB_STEP_SUMMARY file):
|
|
11
25
|
* the grade, a category table, and the critical and warning titles with file:line.
|
|
@@ -19,19 +33,9 @@ export function renderStepSummary(report) {
|
|
|
19
33
|
'',
|
|
20
34
|
`**${escapeCell(report.verdict)}** · ${report.projectName} · ${report.filesScanned} ${report.mode === 'live' ? 'requests' : 'files'} checked`,
|
|
21
35
|
'',
|
|
22
|
-
|
|
23
|
-
'
|
|
36
|
+
...categoryTable(report),
|
|
37
|
+
'',
|
|
24
38
|
];
|
|
25
|
-
for (const c of report.categories) {
|
|
26
|
-
if (c.skipped || !c.applicable) {
|
|
27
|
-
out.push(`| ${c.name} | - | | | ${c.skipped ? 'skipped' : escapeCell(c.note ?? 'not used')} |`);
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
const crit = c.findings.filter((f) => f.severity === 'critical').length;
|
|
31
|
-
const warn = c.findings.filter((f) => f.severity === 'warning').length;
|
|
32
|
-
out.push(`| ${c.name} | ${c.grade ?? '-'} | ${crit} | ${warn} | ${c.manual.length} |`);
|
|
33
|
-
}
|
|
34
|
-
out.push('');
|
|
35
39
|
if (critical.length) {
|
|
36
40
|
out.push(`### Critical (${critical.length})`, '', ...critical.map(findingLine), '');
|
|
37
41
|
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export interface Report {
|
|
|
67
67
|
ignored: number;
|
|
68
68
|
/** Ids in .launchdoctorignore that no check can produce (probably typos). */
|
|
69
69
|
unknownIgnoreIds: string[];
|
|
70
|
+
/** Folders left out because they are separate git repositories (they have their own .git folder). */
|
|
71
|
+
nestedRepos?: string[];
|
|
70
72
|
score: number;
|
|
71
73
|
grade: Grade;
|
|
72
74
|
verdict: string;
|
package/dist/src/util.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Where people report false alarms, misses and crashes. */
|
|
2
|
+
export declare const ISSUES_URL = "https://github.com/SHARAJ379/launch-doctor/issues/new/choose";
|
|
1
3
|
/** 1-based line number of a character index. */
|
|
2
4
|
export declare function lineAt(text: string, index: number): number;
|
|
3
5
|
/** The full text of the line containing `index`. */
|
package/dist/src/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "launch-doctor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A pre-launch checkup for vibe-coded apps. Grades your project A-F on secrets, database safety, payments, AI costs, email, error tracking, legal pages and first impressions, with a copy-paste fix prompt for every issue.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"author": "Sharaj R Shetty",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@biomejs/biome": "2.6.
|
|
59
|
+
"@biomejs/biome": "2.6.7",
|
|
60
60
|
"@types/node": "^26.6.6",
|
|
61
61
|
"typescript": "^7.0.2"
|
|
62
62
|
}
|