@evalvcr/storage-neon 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +10 -2
- package/dist/adapter.d.ts +42 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +175 -0
- package/dist/adapter.js.map +1 -0
- package/dist/branch.d.ts +13 -0
- package/dist/branch.d.ts.map +1 -0
- package/dist/branch.js +60 -0
- package/dist/branch.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +3 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +27 -0
- package/dist/schema.js.map +1 -0
- package/package.json +50 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 evalvcr contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @evalvcr/storage-neon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Optional Neon Postgres PR-branch evaluation history storage adapter for `evalvcr` (zero third-party runtime dependencies; compatible with Neon's SQL-over-HTTP endpoint or any injected SQL executor).
|
|
4
|
+
|
|
5
|
+
Local `evalvcr` runs require **no** database server (they default to `node:sqlite` / JSON). Add `@evalvcr/storage-neon` only when you want branch-per-PR run history in Neon Postgres.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D evalvcr @evalvcr/storage-neon
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Full documentation: https://github.com/evalvcr/evalvcr
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { EvalStorage, ReportV1, RunSummaryRecord } from "evalvcr/types";
|
|
2
|
+
import { type BranchContext } from "./branch.js";
|
|
3
|
+
export interface SqlQueryResult<TRow = Record<string, unknown>> {
|
|
4
|
+
rows: TRow[];
|
|
5
|
+
rowCount?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SqlExecutor {
|
|
8
|
+
query<TRow = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<SqlQueryResult<TRow>>;
|
|
9
|
+
close?(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface NeonHttpExecutorOptions {
|
|
12
|
+
connectionString: string;
|
|
13
|
+
endpoint?: string;
|
|
14
|
+
fetchImpl?: typeof fetch;
|
|
15
|
+
}
|
|
16
|
+
export interface NeonStorageAdapterOptions {
|
|
17
|
+
executor?: SqlExecutor;
|
|
18
|
+
connectionString?: string;
|
|
19
|
+
branch?: string;
|
|
20
|
+
gitSha?: string;
|
|
21
|
+
scopeToBranch?: boolean;
|
|
22
|
+
autoInit?: boolean;
|
|
23
|
+
env?: Record<string, string | undefined>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createHttpSqlExecutor(options: NeonHttpExecutorOptions): SqlExecutor;
|
|
26
|
+
export declare class NeonStorageAdapter implements EvalStorage {
|
|
27
|
+
private readonly executor;
|
|
28
|
+
private readonly autoInit;
|
|
29
|
+
private readonly scopeToBranch;
|
|
30
|
+
private initialized;
|
|
31
|
+
readonly branchContext: BranchContext;
|
|
32
|
+
constructor(options: NeonStorageAdapterOptions);
|
|
33
|
+
init(): Promise<void>;
|
|
34
|
+
saveRun(report: ReportV1): Promise<void>;
|
|
35
|
+
getRun(runId: string): Promise<ReportV1 | null>;
|
|
36
|
+
listRuns(opts?: {
|
|
37
|
+
limit?: number;
|
|
38
|
+
branch?: string;
|
|
39
|
+
}): Promise<RunSummaryRecord[]>;
|
|
40
|
+
close(): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAgB,QAAQ,EAAE,gBAAgB,EAAW,MAAM,eAAe,CAAC;AACpG,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAGvE,MAAM,WAAW,cAAc,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5D,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,OAAO,EAAE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CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAkCjF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// packages/storage-neon/src/adapter.ts
|
|
2
|
+
// language: TypeScript | runtime: Node >= 20 (ESM) | Neon Postgres EvalStorage adapter
|
|
3
|
+
import { resolveBranchContext } from "./branch.js";
|
|
4
|
+
import { NEON_SCHEMA_SQL } from "./schema.js";
|
|
5
|
+
function resolveHttpEndpoint(connectionString, explicitEndpoint) {
|
|
6
|
+
if (explicitEndpoint) {
|
|
7
|
+
const parsed = new URL(explicitEndpoint);
|
|
8
|
+
const isLocal = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1";
|
|
9
|
+
if (parsed.protocol !== "https:" && !isLocal) {
|
|
10
|
+
throw new Error("Neon HTTP SQL endpoint must use HTTPS.");
|
|
11
|
+
}
|
|
12
|
+
return parsed.toString();
|
|
13
|
+
}
|
|
14
|
+
let parsedConn;
|
|
15
|
+
try {
|
|
16
|
+
parsedConn = new URL(connectionString);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
throw new Error("Invalid Neon connectionString URL.");
|
|
20
|
+
}
|
|
21
|
+
if (!parsedConn.hostname || !/^postgres(?:ql)?:$/.test(parsedConn.protocol)) {
|
|
22
|
+
throw new Error("Neon connectionString must use postgres:// or postgresql://.");
|
|
23
|
+
}
|
|
24
|
+
return `https://${parsedConn.hostname}/sql`;
|
|
25
|
+
}
|
|
26
|
+
export function createHttpSqlExecutor(options) {
|
|
27
|
+
const endpoint = resolveHttpEndpoint(options.connectionString, options.endpoint);
|
|
28
|
+
const fetchFn = options.fetchImpl ?? globalThis.fetch;
|
|
29
|
+
if (typeof fetchFn !== "function") {
|
|
30
|
+
throw new Error("Global fetch is unavailable; provide fetchImpl.");
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
async query(sql, params = []) {
|
|
34
|
+
const response = await fetchFn(endpoint, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
headers: {
|
|
37
|
+
"Content-Type": "application/json",
|
|
38
|
+
"Neon-Connection-String": options.connectionString,
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify({ query: sql, params }),
|
|
41
|
+
});
|
|
42
|
+
if (!response.ok) {
|
|
43
|
+
const text = await response.text().catch(() => "");
|
|
44
|
+
throw new Error(`Neon HTTP SQL error (${response.status}): ${text || response.statusText}`);
|
|
45
|
+
}
|
|
46
|
+
const payload = (await response.json());
|
|
47
|
+
return {
|
|
48
|
+
rows: Array.isArray(payload.rows) ? payload.rows : [],
|
|
49
|
+
rowCount: payload.rowCount,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export class NeonStorageAdapter {
|
|
55
|
+
executor;
|
|
56
|
+
autoInit;
|
|
57
|
+
scopeToBranch;
|
|
58
|
+
initialized = false;
|
|
59
|
+
branchContext;
|
|
60
|
+
constructor(options) {
|
|
61
|
+
if (options.executor) {
|
|
62
|
+
this.executor = options.executor;
|
|
63
|
+
}
|
|
64
|
+
else if (options.connectionString) {
|
|
65
|
+
this.executor = createHttpSqlExecutor({ connectionString: options.connectionString });
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
throw new Error("NeonStorageAdapter requires either an executor or connectionString.");
|
|
69
|
+
}
|
|
70
|
+
this.autoInit = options.autoInit ?? false;
|
|
71
|
+
this.scopeToBranch = options.scopeToBranch ?? false;
|
|
72
|
+
this.branchContext = resolveBranchContext({ branch: options.branch, gitSha: options.gitSha }, options.env);
|
|
73
|
+
}
|
|
74
|
+
async init() {
|
|
75
|
+
if (this.initialized)
|
|
76
|
+
return;
|
|
77
|
+
const statements = NEON_SCHEMA_SQL.split(/;\s*(?:\r?\n|$)/)
|
|
78
|
+
.map((s) => s.trim())
|
|
79
|
+
.filter((s) => s.length > 0);
|
|
80
|
+
for (const stmt of statements) {
|
|
81
|
+
await this.executor.query(stmt);
|
|
82
|
+
}
|
|
83
|
+
this.initialized = true;
|
|
84
|
+
}
|
|
85
|
+
async saveRun(report) {
|
|
86
|
+
if (this.autoInit && !this.initialized) {
|
|
87
|
+
await this.init();
|
|
88
|
+
}
|
|
89
|
+
const branch = report.runtime.branch ?? this.branchContext.branch;
|
|
90
|
+
const gitSha = report.runtime.gitSha ?? this.branchContext.gitSha ?? null;
|
|
91
|
+
const sql = `
|
|
92
|
+
INSERT INTO evalvcr_runs (
|
|
93
|
+
run_id, branch, git_sha, status, mode,
|
|
94
|
+
average_score, pass_rate, duration_ms,
|
|
95
|
+
cases_total, cases_passed, findings_count,
|
|
96
|
+
created_at, report_json
|
|
97
|
+
) VALUES (
|
|
98
|
+
$1, $2, $3, $4, $5,
|
|
99
|
+
$6, $7, $8,
|
|
100
|
+
$9, $10, $11,
|
|
101
|
+
$12, $13::jsonb
|
|
102
|
+
)
|
|
103
|
+
ON CONFLICT (run_id) DO UPDATE SET
|
|
104
|
+
branch = EXCLUDED.branch,
|
|
105
|
+
git_sha = EXCLUDED.git_sha,
|
|
106
|
+
status = EXCLUDED.status,
|
|
107
|
+
mode = EXCLUDED.mode,
|
|
108
|
+
average_score = EXCLUDED.average_score,
|
|
109
|
+
pass_rate = EXCLUDED.pass_rate,
|
|
110
|
+
duration_ms = EXCLUDED.duration_ms,
|
|
111
|
+
cases_total = EXCLUDED.cases_total,
|
|
112
|
+
cases_passed = EXCLUDED.cases_passed,
|
|
113
|
+
findings_count = EXCLUDED.findings_count,
|
|
114
|
+
created_at = EXCLUDED.created_at,
|
|
115
|
+
report_json = EXCLUDED.report_json`.trim();
|
|
116
|
+
await this.executor.query(sql, [
|
|
117
|
+
report.runId,
|
|
118
|
+
branch,
|
|
119
|
+
gitSha,
|
|
120
|
+
report.status,
|
|
121
|
+
report.mode,
|
|
122
|
+
report.summary.averageScore,
|
|
123
|
+
report.summary.passRate,
|
|
124
|
+
Math.round(report.durationMs),
|
|
125
|
+
report.summary.casesTotal,
|
|
126
|
+
report.summary.casesPassed,
|
|
127
|
+
report.summary.findingsCount,
|
|
128
|
+
report.createdAt,
|
|
129
|
+
JSON.stringify(report),
|
|
130
|
+
]);
|
|
131
|
+
}
|
|
132
|
+
async getRun(runId) {
|
|
133
|
+
const res = await this.executor.query("SELECT report_json FROM evalvcr_runs WHERE run_id = $1 LIMIT 1", [runId]);
|
|
134
|
+
const row = res.rows[0];
|
|
135
|
+
if (!row)
|
|
136
|
+
return null;
|
|
137
|
+
return typeof row.report_json === "string"
|
|
138
|
+
? JSON.parse(row.report_json)
|
|
139
|
+
: row.report_json;
|
|
140
|
+
}
|
|
141
|
+
async listRuns(opts) {
|
|
142
|
+
const limit = Math.max(1, Math.min(500, Math.floor(opts?.limit ?? 50)));
|
|
143
|
+
const branchFilter = opts?.branch ?? (this.scopeToBranch ? this.branchContext.branch : undefined);
|
|
144
|
+
const sql = branchFilter !== undefined
|
|
145
|
+
? `SELECT run_id, created_at, status, mode, average_score, pass_rate, duration_ms, cases_total, cases_passed, findings_count, branch, git_sha
|
|
146
|
+
FROM evalvcr_runs
|
|
147
|
+
WHERE branch = $1
|
|
148
|
+
ORDER BY created_at DESC
|
|
149
|
+
LIMIT $2`
|
|
150
|
+
: `SELECT run_id, created_at, status, mode, average_score, pass_rate, duration_ms, cases_total, cases_passed, findings_count, branch, git_sha
|
|
151
|
+
FROM evalvcr_runs
|
|
152
|
+
ORDER BY created_at DESC
|
|
153
|
+
LIMIT $1`;
|
|
154
|
+
const params = branchFilter !== undefined ? [branchFilter, limit] : [limit];
|
|
155
|
+
const res = await this.executor.query(sql, params);
|
|
156
|
+
return res.rows.map((row) => ({
|
|
157
|
+
runId: row.run_id,
|
|
158
|
+
createdAt: row.created_at instanceof Date ? row.created_at.toISOString() : String(row.created_at),
|
|
159
|
+
status: row.status,
|
|
160
|
+
mode: row.mode,
|
|
161
|
+
averageScore: Number(row.average_score),
|
|
162
|
+
passRate: Number(row.pass_rate),
|
|
163
|
+
durationMs: Number(row.duration_ms),
|
|
164
|
+
casesTotal: Number(row.cases_total),
|
|
165
|
+
casesPassed: Number(row.cases_passed),
|
|
166
|
+
findingsCount: Number(row.findings_count),
|
|
167
|
+
branch: row.branch,
|
|
168
|
+
...(row.git_sha ? { gitSha: row.git_sha } : {}),
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
async close() {
|
|
172
|
+
await this.executor.close?.();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,uFAAuF;AAGvF,OAAO,EAAE,oBAAoB,EAAsB,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8C9C,SAAS,mBAAmB,CAAC,gBAAwB,EAAE,gBAAyB;IAC9E,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,KAAK,WAAW,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW,CAAC;QACnF,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IACD,IAAI,UAAe,CAAC;IACpB,IAAI,CAAC;QACH,UAAU,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,QAAQ,IAA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AAM;YACjB,SAAS,EAAE,GAAG,CAAC,UAAU,YAAY,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;YACjG,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,YAAY,EAAE,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC;YACvC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;YAC/B,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;YACnC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC;YACnC,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;YACrC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC;YACzC,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChD,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC;IAChC,CAAC;CACF"}
|
package/dist/branch.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BranchContextOptions {
|
|
2
|
+
branch?: string;
|
|
3
|
+
gitSha?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BranchContext {
|
|
6
|
+
branch: string;
|
|
7
|
+
gitSha?: string;
|
|
8
|
+
isPullRequest: boolean;
|
|
9
|
+
source: "explicit" | "neon" | "ci" | "default";
|
|
10
|
+
}
|
|
11
|
+
export declare function normalizeBranchName(raw: string): string;
|
|
12
|
+
export declare function resolveBranchContext(options?: BranchContextOptions, env?: Record<string, string | undefined>): BranchContext;
|
|
13
|
+
//# sourceMappingURL=branch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../src/branch.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAChD;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,oBAAyB,EAClC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,aAAa,CA0Df"}
|
package/dist/branch.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// packages/storage-neon/src/branch.ts
|
|
2
|
+
// language: TypeScript | runtime: Node >= 20 (ESM) | PR-branch context resolution for Neon
|
|
3
|
+
export function normalizeBranchName(raw) {
|
|
4
|
+
return raw
|
|
5
|
+
.trim()
|
|
6
|
+
.replace(/^refs\/heads\//, "")
|
|
7
|
+
.replace(/^refs\/remotes\/origin\//, "");
|
|
8
|
+
}
|
|
9
|
+
export function resolveBranchContext(options = {}, env = process.env) {
|
|
10
|
+
const explicitBranch = options.branch ? normalizeBranchName(options.branch) : "";
|
|
11
|
+
const explicitSha = options.gitSha?.trim() || undefined;
|
|
12
|
+
const ciSha = explicitSha ??
|
|
13
|
+
(env.GITHUB_SHA?.trim() ||
|
|
14
|
+
env.VERCEL_GIT_COMMIT_SHA?.trim() ||
|
|
15
|
+
env.GIT_SHA?.trim() ||
|
|
16
|
+
undefined);
|
|
17
|
+
if (explicitBranch) {
|
|
18
|
+
return {
|
|
19
|
+
branch: explicitBranch,
|
|
20
|
+
...(ciSha ? { gitSha: ciSha } : {}),
|
|
21
|
+
isPullRequest: Boolean(env.GITHUB_HEAD_REF?.trim()),
|
|
22
|
+
source: "explicit",
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (env.NEON_BRANCH?.trim()) {
|
|
26
|
+
return {
|
|
27
|
+
branch: normalizeBranchName(env.NEON_BRANCH),
|
|
28
|
+
...(ciSha ? { gitSha: ciSha } : {}),
|
|
29
|
+
isPullRequest: Boolean(env.GITHUB_HEAD_REF?.trim()),
|
|
30
|
+
source: "neon",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const prHead = env.GITHUB_HEAD_REF?.trim();
|
|
34
|
+
if (prHead) {
|
|
35
|
+
return {
|
|
36
|
+
branch: normalizeBranchName(prHead),
|
|
37
|
+
...(ciSha ? { gitSha: ciSha } : {}),
|
|
38
|
+
isPullRequest: true,
|
|
39
|
+
source: "ci",
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const ciBranch = env.VERCEL_GIT_COMMIT_REF?.trim() ||
|
|
43
|
+
env.GITHUB_REF_NAME?.trim() ||
|
|
44
|
+
env.GIT_BRANCH?.trim();
|
|
45
|
+
if (ciBranch) {
|
|
46
|
+
return {
|
|
47
|
+
branch: normalizeBranchName(ciBranch),
|
|
48
|
+
...(ciSha ? { gitSha: ciSha } : {}),
|
|
49
|
+
isPullRequest: false,
|
|
50
|
+
source: "ci",
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
branch: "main",
|
|
55
|
+
...(ciSha ? { gitSha: ciSha } : {}),
|
|
56
|
+
isPullRequest: false,
|
|
57
|
+
source: "default",
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=branch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.js","sourceR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AAC;YACnC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC;YACnD,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAI,MAAM,EAAE,CAAC;QACX,OAAO;YACL,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC;YACnC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,aAAa,EAAE,IAAI;YACnB,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GACZ,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE;QACjC,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE;QAC3B,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IAEzB,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;YACL,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC;YACrC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,aAAa,EAAE,KAAK;YACpB,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;IAED,OAAO;QACL,MAAM,EAAE,MAAM;QACd,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,aAAa,EAAE,KAAK;QACpB,MAAM,EAAE,SAAS;KAClB,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { NEON_RUNS_TABLE, NEON_SCHEMA_SQL } from "./schema.js";
|
|
2
|
+
export { normalizeBranchName, resolveBranchContext, type BranchContext, type BranchContextOptions, } from "./branch.js";
|
|
3
|
+
export { NeonStorageAdapter, createHttpSqlExecutor, type NeonHttpExecutorOptions, type NeonStorageAdapterOptions, type SqlExecutor, type SqlQueryResult, } from "./adapter.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// packages/storage-neon/src/index.ts
|
|
2
|
+
// language: TypeScript | runtime: Node >= 20 (ESM) | barrel exports for @evalvcr/storage-neon
|
|
3
|
+
export { NEON_RUNS_TABLE, NEON_SCHEMA_SQL } from "./schema.js";
|
|
4
|
+
export { normalizeBranchName, resolveBranchContext, } from "./branch.js";
|
|
5
|
+
export { NeonStorageAdapter, createHttpSqlExecutor, } from "./adapter.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,8FAA8F;AAE9F,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GAGrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GAKtB,MAAM,cAAc,CAAC"}
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAE9C,eAAO,MAAM,eAAe,QAsBpB,CAAC"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// packages/storage-neon/src/schema.ts
|
|
2
|
+
// language: TypeScript | runtime: Node >= 20 (ESM) | Neon Postgres schema DDL for evalvcr
|
|
3
|
+
export const NEON_RUNS_TABLE = "evalvcr_runs";
|
|
4
|
+
export const NEON_SCHEMA_SQL = `
|
|
5
|
+
CREATE TABLE IF NOT EXISTS evalvcr_runs (
|
|
6
|
+
run_id TEXT PRIMARY KEY,
|
|
7
|
+
branch TEXT NOT NULL DEFAULT 'main',
|
|
8
|
+
git_sha TEXT,
|
|
9
|
+
status TEXT NOT NULL,
|
|
10
|
+
mode TEXT NOT NULL,
|
|
11
|
+
average_score DOUBLE PRECISION NOT NULL,
|
|
12
|
+
pass_rate DOUBLE PRECISION NOT NULL,
|
|
13
|
+
duration_ms INTEGER NOT NULL,
|
|
14
|
+
cases_total INTEGER NOT NULL,
|
|
15
|
+
cases_passed INTEGER NOT NULL,
|
|
16
|
+
findings_count INTEGER NOT NULL,
|
|
17
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
18
|
+
report_json JSONB NOT NULL
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
CREATE INDEX IF NOT EXISTS idx_evalvcr_runs_branch_created
|
|
22
|
+
ON evalvcr_runs (branch, created_at DESC);
|
|
23
|
+
|
|
24
|
+
CREATE INDEX IF NOT EXISTS idx_evalvcr_runs_created
|
|
25
|
+
ON evalvcr_runs (created_at DESC);
|
|
26
|
+
`.trim();
|
|
27
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0FAA0F;AAE1F,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB9B,CAAC,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evalvcr/storage-neon",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Optional Neon Postgres PR-branch storage adapter for evalvcr",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "evalvcr contributors",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/evalvcr/evalvcr.git",
|
|
11
|
+
"directory": "packages/storage-neon"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/evalvcr/evalvcr#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/evalvcr/evalvcr/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"evalvcr",
|
|
19
|
+
"neon",
|
|
20
|
+
"postgres",
|
|
21
|
+
"ai-evals",
|
|
22
|
+
"storage"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20"
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"evalvcr": "0.1.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^22.15.0",
|
|
45
|
+
"typescript": "^5.8.0",
|
|
46
|
+
"vitest": "^3.1.0"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc -p tsconfig.json",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"test": "vitest run"
|
|
52
|
+
}
|
|
6
53
|
}
|