- Add search profiles (DB, API, settings UI) and wire into scorer/pipeline search terms. - Add cover letter generation (service, job action, JobDetail UI). - Align JobSpy Indeed country with country-level search geography when settings conflict; warn in logs. - Infer country from search cities via inferCountryKeyFromSearchGeography (shared). - Ignore extractor venv/storage and local data in Biome; ignore orchestrator/storage and JobSpy .venv in git. - Vite: do not watch orchestrator/storage (prevents reloads during startup.jobs pipeline). - JobSpy: document Python 3.10+ and venv setup in README/requirements. - Onboarding and settings: local resume path handling, orchestrator .env.example for Vite. Made-with: Cursor
94 lines
2.4 KiB
TypeScript
94 lines
2.4 KiB
TypeScript
/// <reference types="vitest" />
|
|
|
|
import { readFileSync } from "node:fs";
|
|
import path from "node:path";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
function readAppVersion(): string {
|
|
const packageJsonPath = new URL("./package.json", import.meta.url);
|
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8")) as {
|
|
version?: unknown;
|
|
};
|
|
|
|
if (
|
|
typeof packageJson.version !== "string" ||
|
|
!/^\d+\.\d+\.\d+$/.test(packageJson.version)
|
|
) {
|
|
throw new Error(
|
|
"orchestrator/package.json must contain a semver version in x.y.z format",
|
|
);
|
|
}
|
|
|
|
return `v${packageJson.version}`;
|
|
}
|
|
|
|
const appVersion = readAppVersion();
|
|
|
|
declare global {
|
|
// eslint-disable-next-line no-var
|
|
var __APP_VERSION__: string;
|
|
}
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
// Stable local date/time for chart and backup filename tests across machines.
|
|
env: { TZ: "UTC" },
|
|
setupFiles: "./src/setupTests.ts",
|
|
maxWorkers: 1,
|
|
testTimeout: 30_000,
|
|
hookTimeout: 30_000,
|
|
include: [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.test.tsx",
|
|
"../docs-site/src/**/*.test.ts",
|
|
"../docs-site/src/**/*.test.tsx",
|
|
"../shared/src/**/*.test.ts",
|
|
"../extractors/**/tests/**/*.test.ts",
|
|
],
|
|
exclude: ["node_modules/**", "dist/**"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"@client": path.resolve(__dirname, "./src/client"),
|
|
"@server": path.resolve(__dirname, "./src/server"),
|
|
"@infra": path.resolve(__dirname, "./src/server/infra"),
|
|
"@shared": path.resolve(__dirname, "../shared/src"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
// Extractors (e.g. startup.jobs / Apify-style KV) write under ./storage during
|
|
// pipeline runs; watching those files causes spurious full page reloads.
|
|
watch: {
|
|
ignored: [path.resolve(__dirname, "storage")],
|
|
},
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:3001",
|
|
changeOrigin: true,
|
|
},
|
|
"/pdfs": {
|
|
target: "http://localhost:3001",
|
|
changeOrigin: true,
|
|
},
|
|
"/stats": {
|
|
target: "http://localhost:3001",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist/client",
|
|
emptyOutDir: true,
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(appVersion),
|
|
},
|
|
});
|