mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-14 13:22:37 +00:00
* perf(server): bound Git process starts Git refresh bursts could keep creating short-lived processes at the concurrency ceiling, causing sustained process churn on constrained hosts. Apply one daemon-global start-rate and concurrency policy to every Git command while preserving the legacy concurrency environment variable. * build(nix): update npm dependency hash * fix(server): hold Git slots until process exit * fix(server): enforce Git limits across process lifetime * fix(server): align Git metrics with process exit * Fix Git limiter test deadlocks * Tune default Git process rate
67 lines
2.0 KiB
TypeScript
67 lines
2.0 KiB
TypeScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { configDefaults, defineConfig } from "vitest/config";
|
|
|
|
const appDir = path.resolve(__dirname, "packages/app");
|
|
const appNodeModules = path.resolve(appDir, "node_modules");
|
|
const rootNodeModules = path.resolve(__dirname, "node_modules");
|
|
const resolvePackageEntry = (packageName: string) => {
|
|
const appPackagePath = path.resolve(appNodeModules, packageName);
|
|
return fs.existsSync(appPackagePath)
|
|
? appPackagePath
|
|
: path.resolve(rootNodeModules, packageName);
|
|
};
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
extensions: [
|
|
".web.mjs",
|
|
".web.js",
|
|
".web.mts",
|
|
".web.ts",
|
|
".web.jsx",
|
|
".web.tsx",
|
|
".mjs",
|
|
".js",
|
|
".mts",
|
|
".ts",
|
|
".jsx",
|
|
".tsx",
|
|
".json",
|
|
],
|
|
alias: [
|
|
{
|
|
find: /^@getpaseo\/relay\/e2ee$/,
|
|
replacement: path.resolve(__dirname, "packages/relay/src/e2ee.ts"),
|
|
},
|
|
{
|
|
find: /^@getpaseo\/relay$/,
|
|
replacement: path.resolve(__dirname, "packages/relay/src/index.ts"),
|
|
},
|
|
{ find: "@", replacement: path.resolve(appDir, "src") },
|
|
{ find: "@server", replacement: path.resolve(__dirname, "packages/server/src") },
|
|
{
|
|
find: "react-native",
|
|
replacement: path.resolve(rootNodeModules, "react-native-web/dist/index.js"),
|
|
},
|
|
{ find: "react", replacement: resolvePackageEntry("react") },
|
|
{ find: "react-dom", replacement: resolvePackageEntry("react-dom") },
|
|
{
|
|
find: /^@xterm\/addon-ligatures\/lib\/addon-ligatures\.mjs$/,
|
|
replacement: path.resolve(appDir, "test-stubs/xterm-addon-ligatures.ts"),
|
|
},
|
|
{
|
|
find: /^@xterm\/addon-ligatures$/,
|
|
replacement: path.resolve(appDir, "test-stubs/xterm-addon-ligatures.ts"),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
// Fake-timer suites freeze p-throttle's clock, so a real per-second cap deadlocks them.
|
|
env: {
|
|
PASEO_GIT_MAX_PROCESSES_PER_SECOND: "10000",
|
|
},
|
|
exclude: [...configDefaults.exclude, "**/.claude/**", "**/.dev/**"],
|
|
},
|
|
});
|