Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/src/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>(KNOWN_CONNECTOR_LIST);
for (const type of pluginRegistry.getTypes()) {
const plugin = pluginRegistry.get(type);
if (plugin?.compatibleWith) {
Expand Down
6 changes: 2 additions & 4 deletions cli/src/lib/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* concurrent processes or crashes mid-write.
*/

import { randomUUID } from "node:crypto";
import {
readFileSync,
writeFileSync,
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion component/src/charts/circle-packing-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions connection/src/generalized/connector-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading