flowlint 0.3.2 → 0.3.4
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/dist/commands/init.js +1 -1
- package/dist/commands/scan.js +1 -1
- package/dist/packages/config/flowlint-config.d.ts +64 -0
- package/dist/packages/config/flowlint-config.js +103 -0
- package/dist/packages/config/flowlint-config.js.map +1 -0
- package/dist/packages/config/index.d.ts +4 -0
- package/dist/packages/config/index.js +21 -0
- package/dist/packages/config/index.js.map +1 -0
- package/dist/packages/github/client.d.ts +2 -0
- package/dist/packages/github/client.js +94 -0
- package/dist/packages/github/client.js.map +1 -0
- package/dist/packages/logger/index.d.ts +11 -0
- package/dist/packages/logger/index.js +40 -0
- package/dist/packages/logger/index.js.map +1 -0
- package/dist/packages/observability/collectors.d.ts +40 -0
- package/dist/packages/observability/collectors.js +75 -0
- package/dist/packages/observability/collectors.js.map +1 -0
- package/dist/packages/observability/index.d.ts +10 -0
- package/dist/packages/observability/index.js +35 -0
- package/dist/packages/observability/index.js.map +1 -0
- package/dist/packages/observability/metrics.d.ts +119 -0
- package/dist/packages/observability/metrics.js +194 -0
- package/dist/packages/observability/metrics.js.map +1 -0
- package/dist/packages/observability/middleware.d.ts +32 -0
- package/dist/packages/observability/middleware.js +58 -0
- package/dist/packages/observability/middleware.js.map +1 -0
- package/dist/packages/review/analysis-engine.d.ts +19 -0
- package/dist/packages/review/analysis-engine.js +111 -0
- package/dist/packages/review/analysis-engine.js.map +1 -0
- package/dist/packages/review/index.d.ts +12 -0
- package/dist/packages/review/index.js +29 -0
- package/dist/packages/review/index.js.map +1 -0
- package/dist/packages/review/parser-n8n.d.ts +2 -0
- package/dist/packages/review/parser-n8n.js +118 -0
- package/dist/packages/review/parser-n8n.js.map +1 -0
- package/dist/packages/review/providers/github.d.ts +62 -0
- package/dist/packages/review/providers/github.js +275 -0
- package/dist/packages/review/providers/github.js.map +1 -0
- package/dist/packages/review/providers.d.ts +106 -0
- package/dist/packages/review/providers.js +12 -0
- package/dist/packages/review/providers.js.map +1 -0
- package/dist/packages/review/reporter.d.ts +17 -0
- package/dist/packages/review/reporter.js +62 -0
- package/dist/packages/review/reporter.js.map +1 -0
- package/dist/packages/review/rules/index.d.ts +9 -0
- package/dist/packages/review/rules/index.js +313 -0
- package/dist/packages/review/rules/index.js.map +1 -0
- package/dist/packages/review/rules/rule-utils.d.ts +36 -0
- package/dist/packages/review/rules/rule-utils.js +75 -0
- package/dist/packages/review/rules/rule-utils.js.map +1 -0
- package/dist/packages/review/schemas/index.d.ts +17 -0
- package/dist/packages/review/schemas/index.js +139 -0
- package/dist/packages/review/schemas/index.js.map +1 -0
- package/dist/packages/review/schemas/n8n-workflow.schema.json +177 -0
- package/dist/packages/review/sniffer.d.ts +15 -0
- package/dist/packages/review/sniffer.js +47 -0
- package/dist/packages/review/sniffer.js.map +1 -0
- package/dist/packages/review/types.d.ts +38 -0
- package/dist/packages/review/types.js +3 -0
- package/dist/packages/review/types.js.map +1 -0
- package/dist/packages/review/utils/findings.d.ts +23 -0
- package/dist/packages/review/utils/findings.js +34 -0
- package/dist/packages/review/utils/findings.js.map +1 -0
- package/dist/packages/review/utils/merge.d.ts +12 -0
- package/dist/packages/review/utils/merge.js +40 -0
- package/dist/packages/review/utils/merge.js.map +1 -0
- package/dist/packages/review/utils.d.ts +60 -0
- package/dist/packages/review/utils.js +214 -0
- package/dist/packages/review/utils.js.map +1 -0
- package/dist/packages/tracing/github-tracer.d.ts +38 -0
- package/dist/packages/tracing/github-tracer.js +79 -0
- package/dist/packages/tracing/github-tracer.js.map +1 -0
- package/dist/packages/tracing/index.d.ts +81 -0
- package/dist/packages/tracing/index.js +240 -0
- package/dist/packages/tracing/index.js.map +1 -0
- package/dist/packages/tracing/tracer.d.ts +30 -0
- package/dist/packages/tracing/tracer.js +141 -0
- package/dist/packages/tracing/tracer.js.map +1 -0
- package/dist/providers/local-config-provider.js +2 -2
- package/dist/reporters/console-reporter.js +1 -1
- package/dist/reporters/json-reporter.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prometheus Metrics Definitions for FlowLint
|
|
3
|
+
*
|
|
4
|
+
* This module defines all custom Prometheus metrics for FlowLint observability.
|
|
5
|
+
* Metrics follow Prometheus naming conventions and are designed for low cardinality.
|
|
6
|
+
*
|
|
7
|
+
* @module packages/observability/metrics
|
|
8
|
+
*/
|
|
9
|
+
import { Registry, Counter, Histogram, Gauge } from 'prom-client';
|
|
10
|
+
export declare const register: Registry<"text/plain; version=0.0.4; charset=utf-8">;
|
|
11
|
+
/**
|
|
12
|
+
* Metric 1: Webhook Counter
|
|
13
|
+
*
|
|
14
|
+
* Tracks total webhooks received from GitHub, labeled by event type and action.
|
|
15
|
+
*
|
|
16
|
+
* Example usage:
|
|
17
|
+
* webhookCounter.labels('pull_request', 'opened').inc();
|
|
18
|
+
*/
|
|
19
|
+
export declare const webhookCounter: Counter<"event_type" | "action">;
|
|
20
|
+
/**
|
|
21
|
+
* Metric 2: Jobs Queued Counter
|
|
22
|
+
*
|
|
23
|
+
* Tracks total review jobs added to BullMQ queue.
|
|
24
|
+
*
|
|
25
|
+
* Example usage:
|
|
26
|
+
* jobsQueuedCounter.labels('acme-corp/api-gateway').inc();
|
|
27
|
+
*/
|
|
28
|
+
export declare const jobsQueuedCounter: Counter<"repo">;
|
|
29
|
+
/**
|
|
30
|
+
* Metric 3: Jobs Completed Counter
|
|
31
|
+
*
|
|
32
|
+
* Tracks total review jobs completed (success or failure).
|
|
33
|
+
*
|
|
34
|
+
* Example usage:
|
|
35
|
+
* jobsCompletedCounter.labels('success', 'acme-corp/api-gateway').inc();
|
|
36
|
+
*/
|
|
37
|
+
export declare const jobsCompletedCounter: Counter<"repo" | "status">;
|
|
38
|
+
/**
|
|
39
|
+
* Metric 4: Job Duration Histogram
|
|
40
|
+
*
|
|
41
|
+
* Distribution of job processing time in seconds.
|
|
42
|
+
* Buckets optimized for typical workflow review times (0.1s to 120s).
|
|
43
|
+
*
|
|
44
|
+
* Example usage:
|
|
45
|
+
* const timer = jobDurationHistogram.startTimer({ repo: 'acme-corp/api-gateway' });
|
|
46
|
+
* // ... process job
|
|
47
|
+
* timer(); // Records duration
|
|
48
|
+
*/
|
|
49
|
+
export declare const jobDurationHistogram: Histogram<"repo">;
|
|
50
|
+
/**
|
|
51
|
+
* Metric 5: Queue Depth Gauge
|
|
52
|
+
*
|
|
53
|
+
* Current number of jobs in queue by state.
|
|
54
|
+
* Updated periodically by collector (every 10 seconds).
|
|
55
|
+
*
|
|
56
|
+
* Example usage:
|
|
57
|
+
* queueDepthGauge.set({ state: 'waiting' }, 10);
|
|
58
|
+
*/
|
|
59
|
+
export declare const queueDepthGauge: Gauge<"state">;
|
|
60
|
+
/**
|
|
61
|
+
* Metric 6: GitHub API Calls Counter
|
|
62
|
+
*
|
|
63
|
+
* Tracks GitHub API calls made by FlowLint, labeled by method and status.
|
|
64
|
+
*
|
|
65
|
+
* Example usage:
|
|
66
|
+
* githubApiCallsCounter.labels('GET', '200', '/repos/:owner/:repo/pulls/:number/files').inc();
|
|
67
|
+
*/
|
|
68
|
+
export declare const githubApiCallsCounter: Counter<"status" | "method" | "endpoint">;
|
|
69
|
+
/**
|
|
70
|
+
* Metric 7: Findings Generated Counter
|
|
71
|
+
*
|
|
72
|
+
* Tracks lint findings generated, labeled by rule and severity.
|
|
73
|
+
*
|
|
74
|
+
* Example usage:
|
|
75
|
+
* findingsGeneratedCounter.labels('rate_limit_retry', 'must').inc();
|
|
76
|
+
*/
|
|
77
|
+
export declare const findingsGeneratedCounter: Counter<"rule" | "severity">;
|
|
78
|
+
/**
|
|
79
|
+
* Metric 8: Redis Operations Counter (Optional)
|
|
80
|
+
*
|
|
81
|
+
* Tracks Redis operations performed by BullMQ.
|
|
82
|
+
*
|
|
83
|
+
* Example usage:
|
|
84
|
+
* redisOpsCounter.labels('zadd', 'success').inc();
|
|
85
|
+
*/
|
|
86
|
+
export declare const redisOpsCounter: Counter<"status" | "operation">;
|
|
87
|
+
/**
|
|
88
|
+
* HTTP Request Duration Histogram
|
|
89
|
+
*
|
|
90
|
+
* Automatically populated by metricsMiddleware.
|
|
91
|
+
* Tracks HTTP request latency by method, route, and status.
|
|
92
|
+
*/
|
|
93
|
+
export declare const httpRequestDuration: Histogram<"status" | "method" | "route">;
|
|
94
|
+
/**
|
|
95
|
+
* Get all metrics in Prometheus exposition format
|
|
96
|
+
*
|
|
97
|
+
* @returns Prometheus-formatted metrics string
|
|
98
|
+
*/
|
|
99
|
+
export declare function getMetrics(): Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* Get metrics content type header
|
|
102
|
+
*
|
|
103
|
+
* @returns Prometheus content type string
|
|
104
|
+
*/
|
|
105
|
+
export declare function getContentType(): string;
|
|
106
|
+
/**
|
|
107
|
+
* Clear all metrics (useful for testing)
|
|
108
|
+
*
|
|
109
|
+
* WARNING: This removes all metrics from the registry.
|
|
110
|
+
* Only use in test environments.
|
|
111
|
+
*/
|
|
112
|
+
export declare function clearMetrics(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Get single metric by name (for testing)
|
|
115
|
+
*
|
|
116
|
+
* @param name - Metric name
|
|
117
|
+
* @returns Metric instance or undefined
|
|
118
|
+
*/
|
|
119
|
+
export declare function getMetric(name: string): import("prom-client").Metric<string> | undefined;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Prometheus Metrics Definitions for FlowLint
|
|
4
|
+
*
|
|
5
|
+
* This module defines all custom Prometheus metrics for FlowLint observability.
|
|
6
|
+
* Metrics follow Prometheus naming conventions and are designed for low cardinality.
|
|
7
|
+
*
|
|
8
|
+
* @module packages/observability/metrics
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.httpRequestDuration = exports.redisOpsCounter = exports.findingsGeneratedCounter = exports.githubApiCallsCounter = exports.queueDepthGauge = exports.jobDurationHistogram = exports.jobsCompletedCounter = exports.jobsQueuedCounter = exports.webhookCounter = exports.register = void 0;
|
|
12
|
+
exports.getMetrics = getMetrics;
|
|
13
|
+
exports.getContentType = getContentType;
|
|
14
|
+
exports.clearMetrics = clearMetrics;
|
|
15
|
+
exports.getMetric = getMetric;
|
|
16
|
+
const prom_client_1 = require("prom-client");
|
|
17
|
+
// Create dedicated registry for FlowLint metrics
|
|
18
|
+
exports.register = new prom_client_1.Registry();
|
|
19
|
+
// Enable default process and Node.js metrics
|
|
20
|
+
(0, prom_client_1.collectDefaultMetrics)({ register: exports.register });
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// Custom Application Metrics
|
|
23
|
+
// ============================================================================
|
|
24
|
+
/**
|
|
25
|
+
* Metric 1: Webhook Counter
|
|
26
|
+
*
|
|
27
|
+
* Tracks total webhooks received from GitHub, labeled by event type and action.
|
|
28
|
+
*
|
|
29
|
+
* Example usage:
|
|
30
|
+
* webhookCounter.labels('pull_request', 'opened').inc();
|
|
31
|
+
*/
|
|
32
|
+
exports.webhookCounter = new prom_client_1.Counter({
|
|
33
|
+
name: 'flowlint_webhook_received_total',
|
|
34
|
+
help: 'Total number of webhooks received from GitHub',
|
|
35
|
+
labelNames: ['event_type', 'action'],
|
|
36
|
+
registers: [exports.register]
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Metric 2: Jobs Queued Counter
|
|
40
|
+
*
|
|
41
|
+
* Tracks total review jobs added to BullMQ queue.
|
|
42
|
+
*
|
|
43
|
+
* Example usage:
|
|
44
|
+
* jobsQueuedCounter.labels('acme-corp/api-gateway').inc();
|
|
45
|
+
*/
|
|
46
|
+
exports.jobsQueuedCounter = new prom_client_1.Counter({
|
|
47
|
+
name: 'flowlint_jobs_queued_total',
|
|
48
|
+
help: 'Total number of review jobs queued for processing',
|
|
49
|
+
labelNames: ['repo'],
|
|
50
|
+
registers: [exports.register]
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Metric 3: Jobs Completed Counter
|
|
54
|
+
*
|
|
55
|
+
* Tracks total review jobs completed (success or failure).
|
|
56
|
+
*
|
|
57
|
+
* Example usage:
|
|
58
|
+
* jobsCompletedCounter.labels('success', 'acme-corp/api-gateway').inc();
|
|
59
|
+
*/
|
|
60
|
+
exports.jobsCompletedCounter = new prom_client_1.Counter({
|
|
61
|
+
name: 'flowlint_jobs_completed_total',
|
|
62
|
+
help: 'Total number of review jobs completed',
|
|
63
|
+
labelNames: ['status', 'repo'],
|
|
64
|
+
registers: [exports.register]
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* Metric 4: Job Duration Histogram
|
|
68
|
+
*
|
|
69
|
+
* Distribution of job processing time in seconds.
|
|
70
|
+
* Buckets optimized for typical workflow review times (0.1s to 120s).
|
|
71
|
+
*
|
|
72
|
+
* Example usage:
|
|
73
|
+
* const timer = jobDurationHistogram.startTimer({ repo: 'acme-corp/api-gateway' });
|
|
74
|
+
* // ... process job
|
|
75
|
+
* timer(); // Records duration
|
|
76
|
+
*/
|
|
77
|
+
exports.jobDurationHistogram = new prom_client_1.Histogram({
|
|
78
|
+
name: 'flowlint_job_duration_seconds',
|
|
79
|
+
help: 'Duration of job processing in seconds',
|
|
80
|
+
labelNames: ['repo'],
|
|
81
|
+
buckets: [0.1, 0.5, 1, 2, 5, 10, 30, 60, 120],
|
|
82
|
+
registers: [exports.register]
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* Metric 5: Queue Depth Gauge
|
|
86
|
+
*
|
|
87
|
+
* Current number of jobs in queue by state.
|
|
88
|
+
* Updated periodically by collector (every 10 seconds).
|
|
89
|
+
*
|
|
90
|
+
* Example usage:
|
|
91
|
+
* queueDepthGauge.set({ state: 'waiting' }, 10);
|
|
92
|
+
*/
|
|
93
|
+
exports.queueDepthGauge = new prom_client_1.Gauge({
|
|
94
|
+
name: 'flowlint_queue_depth',
|
|
95
|
+
help: 'Current number of jobs in queue by state',
|
|
96
|
+
labelNames: ['state'],
|
|
97
|
+
registers: [exports.register]
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* Metric 6: GitHub API Calls Counter
|
|
101
|
+
*
|
|
102
|
+
* Tracks GitHub API calls made by FlowLint, labeled by method and status.
|
|
103
|
+
*
|
|
104
|
+
* Example usage:
|
|
105
|
+
* githubApiCallsCounter.labels('GET', '200', '/repos/:owner/:repo/pulls/:number/files').inc();
|
|
106
|
+
*/
|
|
107
|
+
exports.githubApiCallsCounter = new prom_client_1.Counter({
|
|
108
|
+
name: 'flowlint_github_api_calls_total',
|
|
109
|
+
help: 'Total GitHub API calls made by FlowLint',
|
|
110
|
+
labelNames: ['method', 'status', 'endpoint'],
|
|
111
|
+
registers: [exports.register]
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* Metric 7: Findings Generated Counter
|
|
115
|
+
*
|
|
116
|
+
* Tracks lint findings generated, labeled by rule and severity.
|
|
117
|
+
*
|
|
118
|
+
* Example usage:
|
|
119
|
+
* findingsGeneratedCounter.labels('rate_limit_retry', 'must').inc();
|
|
120
|
+
*/
|
|
121
|
+
exports.findingsGeneratedCounter = new prom_client_1.Counter({
|
|
122
|
+
name: 'flowlint_findings_generated_total',
|
|
123
|
+
help: 'Total lint findings generated by rule and severity',
|
|
124
|
+
labelNames: ['rule', 'severity'],
|
|
125
|
+
registers: [exports.register]
|
|
126
|
+
});
|
|
127
|
+
/**
|
|
128
|
+
* Metric 8: Redis Operations Counter (Optional)
|
|
129
|
+
*
|
|
130
|
+
* Tracks Redis operations performed by BullMQ.
|
|
131
|
+
*
|
|
132
|
+
* Example usage:
|
|
133
|
+
* redisOpsCounter.labels('zadd', 'success').inc();
|
|
134
|
+
*/
|
|
135
|
+
exports.redisOpsCounter = new prom_client_1.Counter({
|
|
136
|
+
name: 'flowlint_redis_operations_total',
|
|
137
|
+
help: 'Total Redis operations performed',
|
|
138
|
+
labelNames: ['operation', 'status'],
|
|
139
|
+
registers: [exports.register]
|
|
140
|
+
});
|
|
141
|
+
// ============================================================================
|
|
142
|
+
// HTTP Metrics (Automatic via middleware)
|
|
143
|
+
// ============================================================================
|
|
144
|
+
/**
|
|
145
|
+
* HTTP Request Duration Histogram
|
|
146
|
+
*
|
|
147
|
+
* Automatically populated by metricsMiddleware.
|
|
148
|
+
* Tracks HTTP request latency by method, route, and status.
|
|
149
|
+
*/
|
|
150
|
+
exports.httpRequestDuration = new prom_client_1.Histogram({
|
|
151
|
+
name: 'http_request_duration_seconds',
|
|
152
|
+
help: 'Duration of HTTP requests in seconds',
|
|
153
|
+
labelNames: ['method', 'route', 'status'],
|
|
154
|
+
buckets: [0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5],
|
|
155
|
+
registers: [exports.register]
|
|
156
|
+
});
|
|
157
|
+
// ============================================================================
|
|
158
|
+
// Utility Functions
|
|
159
|
+
// ============================================================================
|
|
160
|
+
/**
|
|
161
|
+
* Get all metrics in Prometheus exposition format
|
|
162
|
+
*
|
|
163
|
+
* @returns Prometheus-formatted metrics string
|
|
164
|
+
*/
|
|
165
|
+
async function getMetrics() {
|
|
166
|
+
return exports.register.metrics();
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get metrics content type header
|
|
170
|
+
*
|
|
171
|
+
* @returns Prometheus content type string
|
|
172
|
+
*/
|
|
173
|
+
function getContentType() {
|
|
174
|
+
return exports.register.contentType;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Clear all metrics (useful for testing)
|
|
178
|
+
*
|
|
179
|
+
* WARNING: This removes all metrics from the registry.
|
|
180
|
+
* Only use in test environments.
|
|
181
|
+
*/
|
|
182
|
+
function clearMetrics() {
|
|
183
|
+
exports.register.clear();
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get single metric by name (for testing)
|
|
187
|
+
*
|
|
188
|
+
* @param name - Metric name
|
|
189
|
+
* @returns Metric instance or undefined
|
|
190
|
+
*/
|
|
191
|
+
function getMetric(name) {
|
|
192
|
+
return exports.register.getSingleMetric(name);
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../packages/observability/metrics.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAsKH,gCAEC;AAOD,wCAEC;AAQD,oCAEC;AAQD,8BAEC;AAnMD,6CAAyF;AAEzF,iDAAiD;AACpC,QAAA,QAAQ,GAAG,IAAI,sBAAQ,EAAE,CAAC;AAEvC,6CAA6C;AAC7C,IAAA,mCAAqB,EAAC,EAAE,QAAQ,EAAR,gBAAQ,EAAE,CAAC,CAAC;AAEpC,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;;;;;GAOG;AACU,QAAA,cAAc,GAAG,IAAI,qBAAO,CAAC;IACxC,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE,+CAA+C;IACrD,UAAU,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;IACpC,SAAS,EAAE,CAAC,gBAAQ,CAAC;CACtB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,IAAI,qBAAO,CAAC;IAC3C,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,mDAAmD;IACzD,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,SAAS,EAAE,CAAC,gBAAQ,CAAC;CACtB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,IAAI,qBAAO,CAAC;IAC9C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,uCAAuC;IAC7C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,CAAC,gBAAQ,CAAC;CACtB,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACU,QAAA,oBAAoB,GAAG,IAAI,uBAAS,CAAC;IAChD,IAAI,EAAE,+BAA+B;IACrC,IA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uBAAS,CAAC;IAC/C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE,sCAAsC;IAC5C,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;IACnD,SAAS,EAAE,CAAC,gBAAQ,CAAC;CACtB,CAAC,CAAC;AAEH,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;;;GAIG;AACI,KAAK,UAAU,UAAU;IAC9B,OAAO,gBAAQ,CAAC,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,OAAO,gBAAQ,CAAC,WAAW,CAAC;AAC9B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,YAAY;IAC1B,gBAAQ,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,IAAY;IACpC,OAAO,gBAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Express Middleware for HTTP Metrics Collection
|
|
3
|
+
*
|
|
4
|
+
* This middleware automatically tracks HTTP request metrics including:
|
|
5
|
+
* - Request duration (latency)
|
|
6
|
+
* - Request count by method, route, status
|
|
7
|
+
*
|
|
8
|
+
* @module packages/observability/middleware
|
|
9
|
+
*/
|
|
10
|
+
import { Request, Response, NextFunction } from 'express';
|
|
11
|
+
/**
|
|
12
|
+
* Express middleware to collect HTTP request metrics
|
|
13
|
+
*
|
|
14
|
+
* Automatically instruments all HTTP requests with Prometheus metrics.
|
|
15
|
+
* Metrics are labeled by HTTP method, route path, and response status code.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* import { metricsMiddleware } from './packages/observability/middleware';
|
|
19
|
+
* app.use(metricsMiddleware);
|
|
20
|
+
*
|
|
21
|
+
* @param req - Express request object
|
|
22
|
+
* @param res - Express response object
|
|
23
|
+
* @param next - Express next function
|
|
24
|
+
*/
|
|
25
|
+
export declare function metricsMiddleware(req: Request, res: Response, next: NextFunction): void;
|
|
26
|
+
/**
|
|
27
|
+
* Middleware error handler
|
|
28
|
+
*
|
|
29
|
+
* Ensures metrics failures don't crash the application.
|
|
30
|
+
* Logs errors and continues processing.
|
|
31
|
+
*/
|
|
32
|
+
export declare function metricsErrorHandler(err: Error, req: Request, res: Response, next: NextFunction): void;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Express Middleware for HTTP Metrics Collection
|
|
4
|
+
*
|
|
5
|
+
* This middleware automatically tracks HTTP request metrics including:
|
|
6
|
+
* - Request duration (latency)
|
|
7
|
+
* - Request count by method, route, status
|
|
8
|
+
*
|
|
9
|
+
* @module packages/observability/middleware
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.metricsMiddleware = metricsMiddleware;
|
|
13
|
+
exports.metricsErrorHandler = metricsErrorHandler;
|
|
14
|
+
const metrics_1 = require("./metrics");
|
|
15
|
+
/**
|
|
16
|
+
* Express middleware to collect HTTP request metrics
|
|
17
|
+
*
|
|
18
|
+
* Automatically instruments all HTTP requests with Prometheus metrics.
|
|
19
|
+
* Metrics are labeled by HTTP method, route path, and response status code.
|
|
20
|
+
*
|
|
21
|
+
* Usage:
|
|
22
|
+
* import { metricsMiddleware } from './packages/observability/middleware';
|
|
23
|
+
* app.use(metricsMiddleware);
|
|
24
|
+
*
|
|
25
|
+
* @param req - Express request object
|
|
26
|
+
* @param res - Express response object
|
|
27
|
+
* @param next - Express next function
|
|
28
|
+
*/
|
|
29
|
+
function metricsMiddleware(req, res, next) {
|
|
30
|
+
// Start timer for this request
|
|
31
|
+
const timer = metrics_1.httpRequestDuration.startTimer({
|
|
32
|
+
method: req.method,
|
|
33
|
+
route: req.route?.path || req.path,
|
|
34
|
+
status: '0' // Will be updated on response finish
|
|
35
|
+
});
|
|
36
|
+
// Record duration when response finishes
|
|
37
|
+
res.on('finish', () => {
|
|
38
|
+
try {
|
|
39
|
+
timer({ status: res.statusCode.toString() });
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
// Don't let metrics errors crash the application
|
|
43
|
+
console.error('Failed to record HTTP metrics:', error);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
next();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Middleware error handler
|
|
50
|
+
*
|
|
51
|
+
* Ensures metrics failures don't crash the application.
|
|
52
|
+
* Logs errors and continues processing.
|
|
53
|
+
*/
|
|
54
|
+
function metricsErrorHandler(err, req, res, next) {
|
|
55
|
+
console.error('Metrics middleware error:', err);
|
|
56
|
+
next(err); // Pass error to next error handler
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../packages/observability/middleware.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAmBH,8CAmBC;AAQD,kDAGC;AA9CD,uCAAgD;AAEhD;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;IAC/E,+BAA+B;IAC/B,MAAM,KAAK,GAAG,6BAAmB,CAAC,UAAU,CAAC;QAC3C,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,IAAI,IAAI,GAAG,CAAC,IAAI;QAClC,MAAM,EAAE,GAAG,CAAC,qCAAqC;KAClD,CAAC,CAAC;IAEH,yCAAyC;IACzC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpB,IAAI,CAAC;YACH,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iDAAiD;YACjD,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,EAAE,CAAC;AACT,CAAC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAU,EAAE,GAAY,EAAE,GAAa,EAAE,IAAkB;IAC7F,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;IAChD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,mCAAmC;AAChD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowLint Analysis Engine
|
|
3
|
+
*
|
|
4
|
+
* Orchestrates the linting workflow:
|
|
5
|
+
* 1. Load configuration
|
|
6
|
+
* 2. Fetch files to analyze
|
|
7
|
+
* 3. Parse each file into a graph
|
|
8
|
+
* 4. Run rules against the graph
|
|
9
|
+
* 5. Report results
|
|
10
|
+
*/
|
|
11
|
+
import type { AnalysisEngine, AnalysisSummary, ConfigProvider, FileSource, Reporter } from './providers';
|
|
12
|
+
export declare class DefaultAnalysisEngine implements AnalysisEngine {
|
|
13
|
+
private fileSource;
|
|
14
|
+
private configProvider;
|
|
15
|
+
private reporter;
|
|
16
|
+
constructor(fileSource: FileSource, configProvider: ConfigProvider, reporter: Reporter);
|
|
17
|
+
analyze(): Promise<AnalysisSummary>;
|
|
18
|
+
private formatParseError;
|
|
19
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FlowLint Analysis Engine
|
|
4
|
+
*
|
|
5
|
+
* Orchestrates the linting workflow:
|
|
6
|
+
* 1. Load configuration
|
|
7
|
+
* 2. Fetch files to analyze
|
|
8
|
+
* 3. Parse each file into a graph
|
|
9
|
+
* 4. Run rules against the graph
|
|
10
|
+
* 5. Report results
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.DefaultAnalysisEngine = void 0;
|
|
14
|
+
const parser_n8n_1 = require("./parser-n8n");
|
|
15
|
+
const rules_1 = require("./rules");
|
|
16
|
+
const schemas_1 = require("./schemas");
|
|
17
|
+
const logger_1 = require("../logger");
|
|
18
|
+
const findings_1 = require("./utils/findings");
|
|
19
|
+
const utils_1 = require("./utils");
|
|
20
|
+
class DefaultAnalysisEngine {
|
|
21
|
+
constructor(fileSource, configProvider, reporter) {
|
|
22
|
+
this.fileSource = fileSource;
|
|
23
|
+
this.configProvider = configProvider;
|
|
24
|
+
this.reporter = reporter;
|
|
25
|
+
}
|
|
26
|
+
async analyze() {
|
|
27
|
+
// 1. Load configuration
|
|
28
|
+
const cfg = await this.configProvider.load();
|
|
29
|
+
logger_1.logger.debug({ rules: Object.keys(cfg.rules) }, 'loaded configuration');
|
|
30
|
+
// 2. Fetch files to analyze
|
|
31
|
+
const files = await this.fileSource.getFiles(cfg.files);
|
|
32
|
+
logger_1.logger.info({ count: files.length }, 'fetched files for analysis');
|
|
33
|
+
// 3. Analyze each file
|
|
34
|
+
const results = [];
|
|
35
|
+
let errorCount = 0;
|
|
36
|
+
for (const file of files) {
|
|
37
|
+
try {
|
|
38
|
+
// Parse file to graph
|
|
39
|
+
const graph = (0, parser_n8n_1.parseN8n)(file.content);
|
|
40
|
+
logger_1.logger.debug({ file: file.path, nodes: graph.nodes.length }, 'parsed file');
|
|
41
|
+
// Run all rules
|
|
42
|
+
const findings = (0, rules_1.runAllRules)(graph, {
|
|
43
|
+
path: file.path,
|
|
44
|
+
cfg,
|
|
45
|
+
nodeLines: graph.meta.nodeLines,
|
|
46
|
+
});
|
|
47
|
+
// Inject documentation URLs into findings
|
|
48
|
+
findings.forEach((f) => {
|
|
49
|
+
f.documentationUrl = (0, utils_1.getExampleLink)(f.rule);
|
|
50
|
+
});
|
|
51
|
+
results.push({
|
|
52
|
+
file,
|
|
53
|
+
graph,
|
|
54
|
+
findings,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
errorCount++;
|
|
59
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
60
|
+
const raw_details = this.formatParseError(error);
|
|
61
|
+
logger_1.logger.warn({ file: file.path, error: message }, 'failed to parse file');
|
|
62
|
+
// Add error finding
|
|
63
|
+
const errorFinding = {
|
|
64
|
+
rule: 'PARSE',
|
|
65
|
+
severity: 'must',
|
|
66
|
+
path: file.path,
|
|
67
|
+
message,
|
|
68
|
+
raw_details,
|
|
69
|
+
line: 1,
|
|
70
|
+
};
|
|
71
|
+
results.push({
|
|
72
|
+
file,
|
|
73
|
+
graph: { nodes: [], edges: [], meta: {} },
|
|
74
|
+
findings: [errorFinding],
|
|
75
|
+
errors: [{ error: message, details: raw_details }],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// 4. Calculate summary
|
|
80
|
+
const allFindings = results.flatMap((r) => r.findings);
|
|
81
|
+
const summary = (0, findings_1.countFindingsBySeverity)(allFindings);
|
|
82
|
+
// 5. Report results
|
|
83
|
+
logger_1.logger.info({ totalResults: results.length, totalFindings: summary.total }, 'reporting results');
|
|
84
|
+
await this.reporter.report(results);
|
|
85
|
+
// 6. Return summary
|
|
86
|
+
return {
|
|
87
|
+
totalFiles: files.length,
|
|
88
|
+
totalFindings: summary.total,
|
|
89
|
+
findingsBySeverity: { must: summary.must, should: summary.should, nit: summary.nit },
|
|
90
|
+
errors: errorCount,
|
|
91
|
+
hasBlockingIssues: summary.must > 0,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
formatParseError(error) {
|
|
95
|
+
if (error instanceof schemas_1.ValidationError && Array.isArray(error.errors) && error.errors.length > 0) {
|
|
96
|
+
return error.errors
|
|
97
|
+
.map((err) => {
|
|
98
|
+
const suggestion = err.suggestion ? ` (suggestion: ${err.suggestion})` : '';
|
|
99
|
+
return `- ${err.path}: ${err.message}${suggestion}`;
|
|
100
|
+
})
|
|
101
|
+
.join('\n')
|
|
102
|
+
.slice(0, 64000);
|
|
103
|
+
}
|
|
104
|
+
if (error instanceof Error && error.stack) {
|
|
105
|
+
return error.stack.slice(0, 64000);
|
|
106
|
+
}
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.DefaultAnalysisEngine = DefaultAnalysisEngine;
|
|
111
|
+
//# sourceMappingURL=analysis-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analysis-engine.js","sourceRoot":"","sources":["../../../packages/review/analysis-engine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAGH,6CAAwC;AACxC,mCAAsC;AACtC,uCAA4C;AAE5C,sCAAmC;AACnC,+CAA2D;AAC3D,mCAAyC;AAEzC,MAAa,qBAAqB;IAChC,YACU,UAAsB,EACtB,cAA8B,EAC9B,QAAkB;QAFlB,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,aAAQ,GAAR,QAAQ,CAAU;IACzB,CAAC;IAEJ,KAAK,CAAC,OAAO;QACX,wBAAwB;QACxB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QAC7C,eAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;QAExE,4BAA4B;QAC5B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxD,eAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,E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AAG,CAAC;SACpC,CAAC;IACJ,CAAC;IAEO,gBAAgB,CAAC,KAAc;QACrC,IAAI,KAAK,YAAY,yBAAe,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/F,OAAO,KAAK,CAAC,MAAM;iBAChB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACX,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5E,OAAO,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,GAAG,UAAU,EAAE,CAAC;YACtD,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC;iBACV,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACrB,CAAC;QAED,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC1C,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxGD,sDAwGC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main exports from packages/review
|
|
3
|
+
*/
|
|
4
|
+
export * from './types';
|
|
5
|
+
export * from './providers';
|
|
6
|
+
export * from './analysis-engine';
|
|
7
|
+
export * from './parser-n8n';
|
|
8
|
+
export * from './rules';
|
|
9
|
+
export * from './reporter';
|
|
10
|
+
export * from './sniffer';
|
|
11
|
+
export * from './schemas';
|
|
12
|
+
export * from './providers/github';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Main exports from packages/review
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./types"), exports);
|
|
21
|
+
__exportStar(require("./providers"), exports);
|
|
22
|
+
__exportStar(require("./analysis-engine"), exports);
|
|
23
|
+
__exportStar(require("./parser-n8n"), exports);
|
|
24
|
+
__exportStar(require("./rules"), exports);
|
|
25
|
+
__exportStar(require("./reporter"), exports);
|
|
26
|
+
__exportStar(require("./sniffer"), exports);
|
|
27
|
+
__exportStar(require("./schemas"), exports);
|
|
28
|
+
__exportStar(require("./providers/github"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/review/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,8CAA4B;AAC5B,oDAAkC;AAClC,+CAA6B;AAC7B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,qDAAmC"}
|