data-peek/apps/desktop/package.json

124 lines
4.2 KiB
JSON
Raw Normal View History

2025-11-26 10:23:53 +00:00
{
"name": "@data-peek/desktop",
2026-04-10 10:34:53 +00:00
"version": "0.19.1",
"description": "A minimal, fast database client",
2025-11-26 10:23:53 +00:00
"main": "./out/main/index.js",
2025-11-28 12:58:31 +00:00
"author": "Rohith Gilla",
"homepage": "https://github.com/Rohithgilla12/data-peek",
2025-11-26 10:23:53 +00:00
"scripts": {
"format": "prettier --write .",
"lint": "eslint --cache .",
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
"typecheck": "pnpm run typecheck:node && pnpm run typecheck:web",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
2025-11-26 10:23:53 +00:00
"start": "electron-vite preview",
"dev": "electron-vite dev",
"build": "pnpm run typecheck && electron-vite build",
"postinstall": "electron-builder install-app-deps || true",
"build:unpack": "pnpm run build && electron-builder --dir",
"build:win": "pnpm run build && electron-builder --win",
"build:mac": "pnpm run build && electron-builder --mac",
"build:linux": "pnpm run build && electron-builder --linux"
2025-11-26 10:23:53 +00:00
},
"dependencies": {
"@ai-sdk/anthropic": "^2.0.17",
"@ai-sdk/google": "^2.0.12",
"@ai-sdk/groq": "^2.0.8",
"@ai-sdk/openai": "^2.0.24",
2025-11-28 05:23:55 +00:00
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
2025-11-26 10:23:53 +00:00
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
"@faker-js/faker": "^9.8.0",
2025-11-28 05:37:26 +00:00
"@fontsource-variable/geist": "^5.2.8",
"@fontsource-variable/geist-mono": "^5.2.7",
2025-11-28 02:57:08 +00:00
"@monaco-editor/react": "^4.7.0",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-checkbox": "^1.3.3",
2025-11-26 10:23:53 +00:00
"@radix-ui/react-collapsible": "^1.1.12",
2025-11-28 05:23:55 +00:00
"@radix-ui/react-context-menu": "^2.2.16",
2025-11-26 10:23:53 +00:00
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
2025-11-26 10:23:53 +00:00
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
2025-11-26 10:23:53 +00:00
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
2025-11-26 10:23:53 +00:00
"@radix-ui/react-tooltip": "^1.2.8",
"@radix-ui/react-visually-hidden": "^1.2.4",
2025-11-26 10:23:53 +00:00
"@tailwindcss/vite": "^4.1.17",
Add Tanstack Hotkeys (#129) * chore: replace manual keyboard handlers with tanstack react-hotkeys integration Co-authored-by: Rohith <gillarohith1@gmail.com> * Address review: add conflictBehavior and simplify callback * Add image sharing to dashboards (#128) * feat(health-monitor): add ability to share health dashboard panels as images and share query results as images Co-authored-by: Rohith <gillarohith1@gmail.com> * Address review: extract share components, deduplicate ShareQueryDialog, fix capture transitions - Extract renderShareContent into ShareActiveQueries, ShareTableSizes, ShareCacheStats, ShareLocks components in health-share-content.tsx - Move shareDialogTitles/shareDialogPrefixes to module-level constants - Use single TooltipProvider wrapping the card grid - Remove transition-all duration-200 from ShareImageDialog capture target to prevent intermediate-state captures - Refactor ShareQueryDialog to use ShareImageDialog as its base, eliminating ~250 lines of duplicated background/padding/branding/capture logic - Add header and extraOptions props to ShareImageDialog for composition - Add privacy notices about connection names and sensitive data in share dialog descriptions --------- Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com> Co-authored-by: Rohith <gillarohith1@gmail.com> Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> * chore: replace manual keyboard handlers with tanstack react-hotkeys integration Co-authored-by: Rohith <gillarohith1@gmail.com> * Address review: add conflictBehavior and simplify callback --------- Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com> Co-authored-by: Rohith <gillarohith1@gmail.com> Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-authored-by: tembo[bot] <208362400+tembo-io[bot]@users.noreply.github.com>
2026-04-02 09:41:11 +00:00
"@tanstack/react-hotkeys": "^0.9.1",
2025-11-28 02:57:08 +00:00
"@tanstack/react-router": "^1.139.7",
2025-11-26 10:23:53 +00:00
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-virtual": "^3.13.12",
"@types/ssh2": "^1.15.5",
"@xyflow/react": "^12.9.3",
"ai": "^5.0.0",
2025-11-28 02:57:08 +00:00
"better-sqlite3": "^12.4.6",
2025-11-26 10:23:53 +00:00
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"cron-parser": "^5.4.0",
"dotenv": "^17.2.3",
2025-12-06 10:04:08 +00:00
"electron-log": "^5.4.3",
2025-11-28 02:57:08 +00:00
"electron-store": "^11.0.2",
2025-11-26 10:23:53 +00:00
"electron-updater": "^6.3.9",
"html-to-image": "^1.11.11",
2025-11-26 10:23:53 +00:00
"lucide-react": "^0.555.0",
2025-11-28 03:27:19 +00:00
"monaco-editor": "^0.55.1",
"mssql": "^11.0.1",
"mysql2": "^3.15.3",
"nanoid": "^5.1.7",
2025-12-17 03:04:49 +00:00
"node-cron": "^3.0.3",
feat: add 6 new features — stats, masking, CSV import, data gen, notifications, health monitor (#119) * docs: add design spec for 6 new features Column Statistics, Data Masking, CSV Import, Data Generator, DB Notifications, and Connection Health Monitor. * docs: update spec with review fixes Resolve all 15 review issues: naming conflicts, preload layer, batch insert interface, guard clauses, confirmation dialogs, etc. * docs: add implementation plan for 6 features Fix critical issues from review: adapter connection pattern, preload event subscription pattern, tab interface definitions, ColumnStatsRequest type, and implementation notes. * feat: add column statistics panel (Tasks 1.1-1.8) Implement the Column Statistics feature allowing users to right-click a column header and view min/max/nulls/distinct/histogram in a right sidebar panel. Supports PostgreSQL (full implementation with median + histogram), MySQL (CASE WHEN histogram, no median), and MSSQL (NTILE histogram + PERCENTILE_CONT median). Includes shared types, IPC handler, Zustand store, stats panel UI, and DataTable integration via onColumnStatsClick. * feat: add Data Masking feature (renderer-only) Adds blur-based data masking so users can hide sensitive columns during demos, screenshots, and pair programming. Entirely renderer-only — no IPC or main process changes. - masking-store: Zustand store with manual per-tab masking, auto-mask rules (email/password/ssn/token etc.), hover-to-peek, and persist middleware for rules/settings only (runtime maskedColumns not persisted) - masking-toolbar: dropdown UI for toggling auto-mask, managing rules, adding custom regex patterns, and unmasking all columns for a tab - data-table: accepts optional tabId, shows lock icon on masked headers, adds Mask/Unmask to column dropdown, applies blur(5px) + userSelect:none to masked cells with alt-hover peek support - editable-data-table: same masking UX; masked cells block editing - tab-query-editor: wires tabId into DataTable, renders MaskingToolbar near Export, intercepts exports when masked columns are present and shows an AlertDialog to confirm exporting with [MASKED] values * feat(csv-import): implement CSV import feature (Tasks 3.1-3.5) - Add shared types: CsvColumnMapping, CsvImportOptions, CsvImportRequest, CsvImportProgress, CsvImportResult, BatchInsertOptions, BatchInsertResult - Install papaparse for CSV parsing in renderer - Create batch-insert.ts: parameterized INSERT with per-dialect placeholder syntax (pg: $1/$2, mysql: ?, mssql: @p1/@p2), ON CONFLICT handling, and cancellation support - Add import-handlers.ts IPC handler for db:import-csv and db:import-cancel; progress events pushed via event.sender.send('db:import-progress') - Add import-store.ts Zustand store with 5-step wizard state, type inference for new tables (integer/numeric/timestamp/boolean/text), and auto-mapping - Create csv-import-dialog.tsx Sheet dialog: file drop zone, target selection, column mapping, options (batch size/conflict/truncate/transaction), and progress/result step - Add "Import CSV" to schema explorer table context menu (both virtualized and non-virtualized paths) * feat: add Data Generator feature (Tasks 4.1-4.5) Adds schema-aware fake data generation using @faker-js/faker. Users can open a data-generator tab from the schema explorer context menu on any table, configure per-column generators (faker, random-int/float/bool/date, uuid, auto-increment, fk-reference, fixed, null), preview 5 sample rows, and insert up to 10 000 rows in configurable batches with live progress. - packages/shared: GeneratorType, ColumnGenerator, DataGenConfig, DataGenProgress, DataGenResult types - main: data-generator.ts engine with heuristics + faker dispatch - main: data-gen-handlers.ts IPC for generate, cancel, preview - preload + preload d.ts: generateData, cancelGenerate, generatePreview, onGenerateProgress on window.api.db - stores: DataGeneratorTab type added to tab-store; data-gen-store for per-tab generator state and actions - renderer: data-generator.tsx UI; schema-explorer "Generate Data" menu item; tab-query-editor dispatch for data-generator tab type * feat: add PostgreSQL LISTEN/NOTIFY dashboard (Chunk 5) Implements a full LISTEN/NOTIFY panel for PostgreSQL connections: - Shared types: PgNotificationEvent, PgNotificationChannel, PgNotificationStats - Main process: dedicated pg.Client listener per connection with SSH tunnel support, auto-reconnect with exponential backoff, and SQLite event history (capped at 10k events per connection) - IPC handlers under pg-notify: prefix; cleanup on app quit - Preload: pgNotify namespace exposing subscribe/unsubscribe/send/getChannels/ getHistory/clearHistory/onEvent - Store: usePgNotificationStore with rolling 60s stats and in-memory event cap - Tab type: pg-notifications added to TabType union with deduplication - UI: channel subscription bar, scrollable event log with JSON highlighting, collapsible send panel and stats; PostgreSQL-only guard - Sidebar: Notifications entry visible only for PostgreSQL connections * feat(shared): add health monitor types (Task 6.1) Add ActiveQuery, TableSizeInfo, CacheStats, LockInfo, and DatabaseSizeInfo types to the shared package for IPC contract. * feat(adapters): implement health monitor queries (Task 6.2) Add getActiveQueries, getTableSizes, getCacheStats, getLocks, and killQuery to DatabaseAdapter interface with implementations for PostgreSQL, MySQL, MSSQL, and SQLite stub. * feat(ipc): add health monitor IPC handlers (Task 6.3) Register IPC handlers for db:active-queries, db:table-sizes, db:cache-stats, db:locks, and db:kill-query channels. * feat(preload): expose health monitor API to renderer (Task 6.4) Add health namespace to preload bridge with activeQueries, tableSizes, cacheStats, locks, and killQuery methods plus type declarations. * feat(store): add health monitor Zustand store (Task 6.5) Create useHealthStore with polling, fetch actions for all health metrics, and kill query support. * feat(ui): add health monitor dashboard tab (Task 6.6) Add HealthMonitor component with 4-panel dashboard: active queries with kill support, table sizes with sorting, cache hit ratios with color coding, and lock/blocking detection. Integrate into tab system and sidebar navigation. * chore: apply prettier formatting * fix: resolve empty block statement lint errors * fix: add column stats to editable table and fix masking infinite loop Column statistics dropdown now available in table preview (editable) mode. Fixed MaskingToolbar infinite re-render caused by creating a new empty array reference on every store snapshot. * docs: update README, features, roadmap, and marketing site for 6 new features Add Column Statistics, Data Masking, CSV Import, Data Generator, Connection Health Monitor, and PostgreSQL Notifications to all documentation and the marketing website features grid. * Apply suggestions from code review Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com> --------- Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
2026-03-18 02:48:55 +00:00
"papaparse": "^5.5.3",
2025-11-26 10:23:53 +00:00
"pg": "^8.16.3",
2025-12-17 03:04:49 +00:00
"react-grid-layout": "^2.1.0",
"recharts": "^3.5.1",
2025-11-28 03:27:19 +00:00
"sql-formatter": "^15.6.10",
"ssh2": "^1.17.0",
2025-11-26 10:23:53 +00:00
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.17",
2025-11-28 02:57:08 +00:00
"tw-animate-css": "^1.4.0",
"uuid": "^11.1.0",
"zod": "^3.25.42",
2025-11-28 02:57:08 +00:00
"zustand": "^5.0.8"
2025-11-26 10:23:53 +00:00
},
"devDependencies": {
"@data-peek/shared": "workspace:*",
"@data-peek/ui": "workspace:*",
2025-11-26 10:23:53 +00:00
"@electron-toolkit/eslint-config-prettier": "^3.0.0",
"@electron-toolkit/eslint-config-ts": "^3.1.0",
"@electron-toolkit/tsconfig": "^2.0.0",
"@types/mssql": "^9.1.5",
"@types/node": "^22.19.1",
"@types/node-cron": "^3.0.11",
feat: add 6 new features — stats, masking, CSV import, data gen, notifications, health monitor (#119) * docs: add design spec for 6 new features Column Statistics, Data Masking, CSV Import, Data Generator, DB Notifications, and Connection Health Monitor. * docs: update spec with review fixes Resolve all 15 review issues: naming conflicts, preload layer, batch insert interface, guard clauses, confirmation dialogs, etc. * docs: add implementation plan for 6 features Fix critical issues from review: adapter connection pattern, preload event subscription pattern, tab interface definitions, ColumnStatsRequest type, and implementation notes. * feat: add column statistics panel (Tasks 1.1-1.8) Implement the Column Statistics feature allowing users to right-click a column header and view min/max/nulls/distinct/histogram in a right sidebar panel. Supports PostgreSQL (full implementation with median + histogram), MySQL (CASE WHEN histogram, no median), and MSSQL (NTILE histogram + PERCENTILE_CONT median). Includes shared types, IPC handler, Zustand store, stats panel UI, and DataTable integration via onColumnStatsClick. * feat: add Data Masking feature (renderer-only) Adds blur-based data masking so users can hide sensitive columns during demos, screenshots, and pair programming. Entirely renderer-only — no IPC or main process changes. - masking-store: Zustand store with manual per-tab masking, auto-mask rules (email/password/ssn/token etc.), hover-to-peek, and persist middleware for rules/settings only (runtime maskedColumns not persisted) - masking-toolbar: dropdown UI for toggling auto-mask, managing rules, adding custom regex patterns, and unmasking all columns for a tab - data-table: accepts optional tabId, shows lock icon on masked headers, adds Mask/Unmask to column dropdown, applies blur(5px) + userSelect:none to masked cells with alt-hover peek support - editable-data-table: same masking UX; masked cells block editing - tab-query-editor: wires tabId into DataTable, renders MaskingToolbar near Export, intercepts exports when masked columns are present and shows an AlertDialog to confirm exporting with [MASKED] values * feat(csv-import): implement CSV import feature (Tasks 3.1-3.5) - Add shared types: CsvColumnMapping, CsvImportOptions, CsvImportRequest, CsvImportProgress, CsvImportResult, BatchInsertOptions, BatchInsertResult - Install papaparse for CSV parsing in renderer - Create batch-insert.ts: parameterized INSERT with per-dialect placeholder syntax (pg: $1/$2, mysql: ?, mssql: @p1/@p2), ON CONFLICT handling, and cancellation support - Add import-handlers.ts IPC handler for db:import-csv and db:import-cancel; progress events pushed via event.sender.send('db:import-progress') - Add import-store.ts Zustand store with 5-step wizard state, type inference for new tables (integer/numeric/timestamp/boolean/text), and auto-mapping - Create csv-import-dialog.tsx Sheet dialog: file drop zone, target selection, column mapping, options (batch size/conflict/truncate/transaction), and progress/result step - Add "Import CSV" to schema explorer table context menu (both virtualized and non-virtualized paths) * feat: add Data Generator feature (Tasks 4.1-4.5) Adds schema-aware fake data generation using @faker-js/faker. Users can open a data-generator tab from the schema explorer context menu on any table, configure per-column generators (faker, random-int/float/bool/date, uuid, auto-increment, fk-reference, fixed, null), preview 5 sample rows, and insert up to 10 000 rows in configurable batches with live progress. - packages/shared: GeneratorType, ColumnGenerator, DataGenConfig, DataGenProgress, DataGenResult types - main: data-generator.ts engine with heuristics + faker dispatch - main: data-gen-handlers.ts IPC for generate, cancel, preview - preload + preload d.ts: generateData, cancelGenerate, generatePreview, onGenerateProgress on window.api.db - stores: DataGeneratorTab type added to tab-store; data-gen-store for per-tab generator state and actions - renderer: data-generator.tsx UI; schema-explorer "Generate Data" menu item; tab-query-editor dispatch for data-generator tab type * feat: add PostgreSQL LISTEN/NOTIFY dashboard (Chunk 5) Implements a full LISTEN/NOTIFY panel for PostgreSQL connections: - Shared types: PgNotificationEvent, PgNotificationChannel, PgNotificationStats - Main process: dedicated pg.Client listener per connection with SSH tunnel support, auto-reconnect with exponential backoff, and SQLite event history (capped at 10k events per connection) - IPC handlers under pg-notify: prefix; cleanup on app quit - Preload: pgNotify namespace exposing subscribe/unsubscribe/send/getChannels/ getHistory/clearHistory/onEvent - Store: usePgNotificationStore with rolling 60s stats and in-memory event cap - Tab type: pg-notifications added to TabType union with deduplication - UI: channel subscription bar, scrollable event log with JSON highlighting, collapsible send panel and stats; PostgreSQL-only guard - Sidebar: Notifications entry visible only for PostgreSQL connections * feat(shared): add health monitor types (Task 6.1) Add ActiveQuery, TableSizeInfo, CacheStats, LockInfo, and DatabaseSizeInfo types to the shared package for IPC contract. * feat(adapters): implement health monitor queries (Task 6.2) Add getActiveQueries, getTableSizes, getCacheStats, getLocks, and killQuery to DatabaseAdapter interface with implementations for PostgreSQL, MySQL, MSSQL, and SQLite stub. * feat(ipc): add health monitor IPC handlers (Task 6.3) Register IPC handlers for db:active-queries, db:table-sizes, db:cache-stats, db:locks, and db:kill-query channels. * feat(preload): expose health monitor API to renderer (Task 6.4) Add health namespace to preload bridge with activeQueries, tableSizes, cacheStats, locks, and killQuery methods plus type declarations. * feat(store): add health monitor Zustand store (Task 6.5) Create useHealthStore with polling, fetch actions for all health metrics, and kill query support. * feat(ui): add health monitor dashboard tab (Task 6.6) Add HealthMonitor component with 4-panel dashboard: active queries with kill support, table sizes with sorting, cache hit ratios with color coding, and lock/blocking detection. Integrate into tab system and sidebar navigation. * chore: apply prettier formatting * fix: resolve empty block statement lint errors * fix: add column stats to editable table and fix masking infinite loop Column statistics dropdown now available in table preview (editable) mode. Fixed MaskingToolbar infinite re-render caused by creating a new empty array reference on every store snapshot. * docs: update README, features, roadmap, and marketing site for 6 new features Add Column Statistics, Data Masking, CSV Import, Data Generator, Connection Health Monitor, and PostgreSQL Notifications to all documentation and the marketing website features grid. * Apply suggestions from code review Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com> --------- Co-authored-by: tembo[bot] <208362400+tembo[bot]@users.noreply.github.com>
2026-03-18 02:48:55 +00:00
"@types/papaparse": "^5.5.2",
2025-11-26 10:23:53 +00:00
"@types/pg": "^8.15.6",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
2025-12-17 03:04:49 +00:00
"@types/react-grid-layout": "^1.3.6",
"@types/uuid": "^11.0.0",
2025-11-26 10:23:53 +00:00
"@vitejs/plugin-react": "^5.0.3",
"@vitest/coverage-v8": "^4.0.15",
"electron": "38.7.1",
2025-11-26 10:23:53 +00:00
"electron-builder": "^25.1.8",
"electron-vite": "^4.0.1",
"eslint": "^9.36.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"prettier": "^3.6.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"typescript": "^5.9.2",
"vite": "^7.1.6",
"vitest": "^4.0.15"
2025-11-26 10:23:53 +00:00
}
}