GitNexus/gitnexus-desktop/package.json
Sparsh 610a102397 feat: add validation job to GitHub Actions for desktop packaging
- Introduced a new job `validate` in the GitHub Actions workflow to validate the desktop package.
- Added steps for checking out the repository, setting up Node.js, installing dependencies, type checking, and running unit tests.
- Updated the `package` job to depend on the `validate` job.

chore: update package-lock.json and package.json for vitest integration

- Added `vitest` as a development dependency in `package.json`.
- Updated `typecheck` script to include a new TypeScript configuration for vitest.
- Updated `package-lock.json` to reflect the new dependencies.

refactor: modularize runtime path handling in main process

- Created a new module `runtime-paths.ts` to handle static path normalization and request handling.
- Refactored `main.ts` to utilize the new `normalizeStaticPath`, `getRequestedPath`, and `getPackagedRendererEntry` functions.

test: add unit tests for runtime path utilities

- Implemented tests for `normalizeStaticPath`, `getRequestedPath`, and `getPackagedRendererEntry` using Vitest.
- Ensured coverage for directory traversal attempts and null-byte paths.

chore: configure Vitest for testing

- Added `vitest.config.ts` for Vitest configuration.
- Created `tsconfig.vitest.json` to include types for Vitest in TypeScript compilation.

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 13:45:23 +05:30

39 lines
1.5 KiB
JSON

{
"name": "gitnexus-desktop",
"version": "0.1.0",
"private": true,
"description": "Electron desktop shell for GitNexus",
"author": "Abhigyan Patwari",
"license": "PolyForm-Noncommercial-1.0.0",
"type": "module",
"main": "dist/main/main.js",
"engines": {
"node": ">=20.0.0"
},
"scripts": {
"predev": "node scripts/ensure-gitnexus-runtime.mjs --cleanup-dev-port",
"dev": "npx --yes -p electron@41.2.1 -p electron-vite@5.0.0 electron-vite dev --outDir=dist",
"start": "npx --yes -p electron@41.2.1 -p electron-vite@5.0.0 electron-vite preview --outDir=dist",
"bundle": "npx --yes -p electron@41.2.1 -p electron-vite@5.0.0 electron-vite build --outDir=dist",
"build": "node scripts/package.mjs --dir",
"build:dir": "node scripts/package.mjs --dir",
"build:win": "node scripts/package.mjs --win nsis",
"build:mac": "node scripts/package.mjs --mac dmg",
"build:linux": "node scripts/package.mjs --linux AppImage",
"build:all": "node scripts/package.mjs --win nsis --mac dmg --linux AppImage",
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.renderer.json && tsc --noEmit -p tsconfig.vitest.json",
"test": "vitest run"
},
"devDependencies": {
"@types/node": "^25.6.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.1",
"electron": "41.2.1",
"electron-builder": "26.8.1",
"electron-vite": "^5.0.0",
"typescript": "^6.0.3",
"vite": "^7.0.0",
"vitest": "^4.0.18"
}
}