galaxyrepowatch 2.0.7 → 2.5.1
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/README.md +23 -0
- package/dist/cli.d.ts +10 -0
- package/dist/cli.js +291 -186
- package/dist/codeImpactAnalyzer.d.ts +1 -0
- package/dist/databaseAnalyzer/cacheManager.d.ts +8 -0
- package/dist/databaseAnalyzer/formatter.d.ts +2 -0
- package/dist/databaseAnalyzer/geminiClient.d.ts +2 -0
- package/dist/databaseAnalyzer/index.d.ts +1 -0
- package/dist/databaseAnalyzer/promptBuilder.d.ts +2 -0
- package/dist/databaseAnalyzer/scanner.d.ts +12 -0
- package/dist/databaseAnalyzer/scoreCalculator.d.ts +12 -0
- package/dist/databaseAnalyzer/types.d.ts +20 -0
- package/package.json +12 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runCodeImpactAnalyzer(diff: string, stagedFiles: string[]): Promise<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScannedSchema } from "./types";
|
|
2
|
+
export declare function getSchemasHash(schemas: ScannedSchema[]): string;
|
|
3
|
+
export declare function hasSchemasChanged(schemas: ScannedSchema[]): boolean;
|
|
4
|
+
export declare function updateSchemasCache(schemas: ScannedSchema[], aiResponse: any, score: number): void;
|
|
5
|
+
export declare function getCachedReport(): {
|
|
6
|
+
lastResponse: any;
|
|
7
|
+
lastScore: number;
|
|
8
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runDatabaseAnalyzer(diff: string): Promise<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScannedSchema } from "./types";
|
|
2
|
+
export interface ResolvableGlob {
|
|
3
|
+
glob: string;
|
|
4
|
+
isConfig: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface OrmStrategy {
|
|
7
|
+
name: string;
|
|
8
|
+
detectDeps: string[];
|
|
9
|
+
resolveGlobs: (pkgData: any, workspaceDir: string) => ResolvableGlob[];
|
|
10
|
+
confirmContent: (contentChunk: string) => boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function scanDatabaseSchemas(): ScannedSchema[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DbAnalysisResponse } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Deterministically calculates the database health score based on AI findings.
|
|
4
|
+
* Start: 100
|
|
5
|
+
* Critical: -15
|
|
6
|
+
* High: -10
|
|
7
|
+
* Medium: -5
|
|
8
|
+
* Low: -2
|
|
9
|
+
* Info: -0
|
|
10
|
+
*/
|
|
11
|
+
export declare function calculateHealthScore(analysis: DbAnalysisResponse): number;
|
|
12
|
+
export declare function getScoreGrade(score: number): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface DbFinding {
|
|
2
|
+
category: "Performance" | "Architecture" | "Security" | "Best Practice";
|
|
3
|
+
severity: "Critical" | "High" | "Medium" | "Low" | "Info";
|
|
4
|
+
file: string;
|
|
5
|
+
object?: string;
|
|
6
|
+
description: string;
|
|
7
|
+
recommendation: string;
|
|
8
|
+
confidence: number;
|
|
9
|
+
}
|
|
10
|
+
export interface DbAnalysisResponse {
|
|
11
|
+
database_summary: string;
|
|
12
|
+
why_it_matters: string;
|
|
13
|
+
database_impact: DbFinding[];
|
|
14
|
+
recommended_optimizations: Omit<DbFinding, "file" | "object">[];
|
|
15
|
+
}
|
|
16
|
+
export interface ScannedSchema {
|
|
17
|
+
path: string;
|
|
18
|
+
content: string;
|
|
19
|
+
orm: "prisma" | "drizzle" | "sequelize" | "typeorm" | "mongoose" | "sql" | "laravel" | "django" | "sqlalchemy" | "kysely" | "supabase" | "knex" | "unknown";
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "galaxyrepowatch",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "AI-powered Git pre-commit guard. Blocks bad code, detects secrets, runs Gemini AI review on every commit.",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
|
+
"types": "dist/cli.d.ts",
|
|
6
7
|
"bin": {
|
|
7
|
-
"ai-guard": "dist/cli.js"
|
|
8
|
+
"ai-guard": "dist/cli.js",
|
|
9
|
+
"galaxyrepowatch": "dist/cli.js"
|
|
8
10
|
},
|
|
9
11
|
"files": [
|
|
10
|
-
"dist"
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
11
15
|
],
|
|
12
16
|
"scripts": {
|
|
13
17
|
"build": "esbuild src/cli.ts --bundle --platform=node --target=node18 --outfile=dist/cli.js --minify",
|
|
@@ -22,7 +26,11 @@
|
|
|
22
26
|
"code-review",
|
|
23
27
|
"security",
|
|
24
28
|
"linter",
|
|
25
|
-
"guard"
|
|
29
|
+
"guard",
|
|
30
|
+
"secret-scanner",
|
|
31
|
+
"git-hooks",
|
|
32
|
+
"static-analysis",
|
|
33
|
+
"developer-tools"
|
|
26
34
|
],
|
|
27
35
|
"author": "galaxyweblinks",
|
|
28
36
|
"repository": {
|