Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

1.4 KB
Raw Blame
import path from "node:path";
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vitest/config";

export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      "@": path.resolve(import.meta.dirname, "apps/desktop/src"),
      "@dbx-app/mongo-shell": path.resolve(import.meta.dirname, "packages/mongo-shell/src/index.ts"),
      // sql-formatter's `exports` map only declares ".", so deep imports into its
      // bundled parser/tokenizer are rejected by Vite's exports handling. The
      // The default layout engine needs that AST; see lib/sql/layout/internals.ts.
      "sql-formatter/dist/": `${path.resolve(import.meta.dirname, "node_modules/sql-formatter/dist")}/`,
    },
  },
  test: {
    include: ["packages/app-tests/*.test.ts", "apps/desktop/src/**/*.spec.ts", "docs/lib/*.test.ts"],
    globalSetup: "packages/test-globals.ts",
    // Many specs dynamically import the large store modules (connectionStore,
    // queryStore) inside test bodies; when several workers pay that first
    // import at once, CPU contention can stall a worker's event loop past the
    // old 5s default and flake deferred-promise tests. A 10s timeout absorbs
    // that without capping throughput, so workers can scale past 4. CI keeps
    // 4 workers to match each runner's CPU count.
    testTimeout: 10_000,
    maxWorkers: process.env.CI ? 4 : 8,
  },
});