fix lint errors (no-control-regex, no-base-to-string) and bump to 2026.2.15-1.2
This commit is contained in:
parent
37f5d255c0
commit
39ba1aeaeb
@ -11,6 +11,13 @@ import {
|
||||
export const dynamic = "force-dynamic";
|
||||
export const runtime = "nodejs";
|
||||
|
||||
/** Safely convert an unknown DB value to a display string. */
|
||||
function dbStr(val: unknown): string {
|
||||
if (val == null) {return "";}
|
||||
if (typeof val === "object") {return JSON.stringify(val);}
|
||||
return String(val as string | number | boolean);
|
||||
}
|
||||
|
||||
// --- Types ---
|
||||
|
||||
export type SearchIndexItem = {
|
||||
@ -209,15 +216,15 @@ async function buildEntryItems(): Promise<SearchIndexItem[]> {
|
||||
}
|
||||
|
||||
for (const entry of entries) {
|
||||
const entryId = String(entry.entry_id ?? "");
|
||||
const entryId = dbStr(entry.entry_id);
|
||||
if (!entryId) {continue;}
|
||||
|
||||
const displayValue = String(entry[displayField] ?? "");
|
||||
const displayValue = dbStr(entry[displayField]);
|
||||
const fieldPreview: Record<string, string> = {};
|
||||
for (const f of previewFields) {
|
||||
const val = entry[f.name];
|
||||
if (val != null && val !== "") {
|
||||
fieldPreview[f.name] = String(val);
|
||||
fieldPreview[f.name] = dbStr(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -492,10 +492,8 @@ export function parseErrorFromStderr(stderr: string): string | undefined {
|
||||
if (!stderr) {return undefined;}
|
||||
|
||||
// Strip ANSI escape codes
|
||||
const clean = stderr.replace(
|
||||
/\x1B\[[0-9;]*[A-Za-z]/g,
|
||||
"",
|
||||
);
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const clean = stderr.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "");
|
||||
|
||||
// Look for JSON error bodies (e.g. from API responses)
|
||||
const jsonMatch = clean.match(/\{"error":\{[^}]*"message":"([^"]+)"[^}]*\}/);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ironclaw",
|
||||
"version": "2026.2.15-1.1",
|
||||
"version": "2026.2.15-1.2",
|
||||
"description": "AI-powered CRM platform with multi-channel agent gateway, DuckDB workspace, and knowledge management",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user