diff --git a/app/src/plugins/index.ts b/app/src/plugins/index.ts index 4eceeb1e..f1a11967 100644 --- a/app/src/plugins/index.ts +++ b/app/src/plugins/index.ts @@ -122,7 +122,10 @@ for (const t of CHART_TYPES) { } // 2. Validate compatibleWith references actual connector types. -const KNOWN_CONNECTORS = new Set(["neo4j", "postgresql"]); +// Uses the canonical CONNECTOR_TYPES from the connection package +// so new connectors are automatically recognized. +import { CONNECTOR_TYPES as KNOWN_CONNECTOR_LIST } from "@neoboard/connection"; +const KNOWN_CONNECTORS = new Set(KNOWN_CONNECTOR_LIST); for (const type of pluginRegistry.getTypes()) { const plugin = pluginRegistry.get(type); if (plugin?.compatibleWith) { diff --git a/cli/src/lib/manifest.ts b/cli/src/lib/manifest.ts index 2cf1b924..95eb9fd4 100644 --- a/cli/src/lib/manifest.ts +++ b/cli/src/lib/manifest.ts @@ -5,6 +5,7 @@ * concurrent processes or crashes mid-write. */ +import { randomUUID } from "node:crypto"; import { readFileSync, writeFileSync, @@ -27,10 +28,7 @@ type ManifestKey = "plugins" | "connectors"; * Rename is atomic on POSIX and near-atomic on Windows. */ function atomicWriteJson(filePath: string, data: unknown): void { - const tmpPath = join( - dirname(filePath), - ".tmp-" + Date.now() + "-" + Math.random().toString(36).slice(2), - ); + const tmpPath = join(dirname(filePath), ".tmp-" + randomUUID()); try { writeFileSync(tmpPath, JSON.stringify(data, null, 2) + "\n"); renameSync(tmpPath, filePath); diff --git a/component/src/charts/circle-packing-chart.tsx b/component/src/charts/circle-packing-chart.tsx index 7d7f061c..7d0c79a6 100644 --- a/component/src/charts/circle-packing-chart.tsx +++ b/component/src/charts/circle-packing-chart.tsx @@ -81,7 +81,7 @@ function CirclePackingChart({ // Build d3 hierarchy and run circle packing layout const h = hierarchy(root) - .sum((d) => d.value ?? 0) + .sum((d) => (d.children?.length ? 0 : (d.value ?? 0))) .sort((a, b) => (b.value ?? 0) - (a.value ?? 0)); const size = Math.min(width, height); diff --git a/connection/src/generalized/connector-plugin.ts b/connection/src/generalized/connector-plugin.ts index 4e732999..6d7b9b7c 100644 --- a/connection/src/generalized/connector-plugin.ts +++ b/connection/src/generalized/connector-plugin.ts @@ -136,6 +136,7 @@ export function createConnectorRegistry(): ConnectorRegistry { '": formField missing key/label/type:', field, ); + continue; // Skip duplicate check for invalid fields } if (keys.has(field.key)) { console.warn(