brakit 0.6.1 → 0.7.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/README.md +2 -2
- package/dist/{index.d.ts → api.d.ts} +2 -7
- package/dist/{index.js → api.js} +959 -1161
- package/dist/bin/brakit.js +445 -4723
- package/dist/runtime/index.js +6490 -0
- package/package.json +8 -7
- package/dist/instrument/preload.js +0 -739
- /package/dist/{instrument/preload.d.ts → runtime/index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Brakit
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**See what your app is actually doing.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One command. Every request, query, and security issue — before you ship.
|
|
6
6
|
|
|
7
7
|
Open source · Local only · Zero config · 2 dependencies
|
|
8
8
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { IncomingMessage, ServerResponse, Server } from 'node:http';
|
|
2
|
-
|
|
3
1
|
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | (string & {});
|
|
4
2
|
type FlatHeaders = Record<string, string>;
|
|
5
3
|
interface TracedRequest {
|
|
@@ -142,7 +140,7 @@ declare class SecurityScanner {
|
|
|
142
140
|
declare function createDefaultScanner(): SecurityScanner;
|
|
143
141
|
|
|
144
142
|
type InsightSeverity = "critical" | "warning" | "info";
|
|
145
|
-
type InsightType = "n1" | "cross-endpoint" | "redundant-query" | "error" | "error-hotspot" | "duplicate" | "slow" | "query-heavy" | "
|
|
143
|
+
type InsightType = "n1" | "cross-endpoint" | "redundant-query" | "error" | "error-hotspot" | "duplicate" | "slow" | "query-heavy" | "select-star" | "high-rows" | "large-response" | "response-overfetch" | "security";
|
|
146
144
|
interface Insight {
|
|
147
145
|
severity: InsightSeverity;
|
|
148
146
|
type: InsightType;
|
|
@@ -161,9 +159,6 @@ interface InsightContext {
|
|
|
161
159
|
}
|
|
162
160
|
declare function computeInsights(ctx: InsightContext): Insight[];
|
|
163
161
|
|
|
164
|
-
type DashboardHandler = (req: IncomingMessage, res: ServerResponse, config: BrakitConfig) => void;
|
|
165
|
-
declare function createProxyServer(config: BrakitConfig, handleDashboard: DashboardHandler): Server;
|
|
166
|
-
|
|
167
162
|
declare function detectProject(rootDir: string): Promise<DetectedProject>;
|
|
168
163
|
|
|
169
164
|
declare class AdapterRegistry {
|
|
@@ -200,4 +195,4 @@ declare class AnalysisEngine {
|
|
|
200
195
|
|
|
201
196
|
declare const VERSION: string;
|
|
202
197
|
|
|
203
|
-
export { AdapterRegistry, AnalysisEngine, type BrakitAdapter, type BrakitConfig, type DetectedProject, type FlatHeaders, type Framework, type HttpMethod, type Insight, type InsightContext, type NormalizedOp, type RequestCategory, type RequestListener, type SecurityContext, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type TracedRequest, VERSION, computeInsights, createDefaultScanner,
|
|
198
|
+
export { AdapterRegistry, AnalysisEngine, type BrakitAdapter, type BrakitConfig, type DetectedProject, type FlatHeaders, type Framework, type HttpMethod, type Insight, type InsightContext, type NormalizedOp, type RequestCategory, type RequestListener, type SecurityContext, type SecurityFinding, type SecurityRule, SecurityScanner, type SecuritySeverity, type TracedRequest, VERSION, computeInsights, createDefaultScanner, detectProject };
|