Commit graph

22 commits

Author SHA1 Message Date
Sparsh
f08f65c6ad fix(desktop): drop --ignore-scripts so lbugjs.node install hook runs
Using --ignore-scripts with npm ci skips per-package install hooks,
including @ladybugdb/core's install.js that copies lbugjs.node into
the correct path. Without it, process.dlopen fails with ERR_DLOPEN_FAILED.
2026-05-19 12:12:43 +05:30
Sparsh
d3ba066016 fix(build): extend npm ci and build timeouts for gitnexus-web to prevent execution failures 2026-05-19 11:16:35 +05:30
Sparsh
b9b3ec6a63 fix(security): resolve CodeQL findings in package.mjs build script
TOCTOU (CWE-367): fs.statSync(entry.from).isDirectory() was called
before mirrorDirectory/cpSync without error handling. If the path
disappears between stat and use, the subsequent operation throws
unhandled. Wrap in try/catch and continue on error.

Indirect uncontrolled command line (CWE-78): appBuilderLibVersion is
read from desktopPackageLock (an external file) and embedded directly
in an npm pack CLI argument. Validate it matches a semver pattern
before use to prevent injection via a compromised lockfile.
2026-05-19 01:16:26 +05:30
Sparsh
377a96ffd5 fix(desktop): pin transitive deps in runtime repair via npm ci
repairGitNexusPackages used npm install --no-package-lock in a temp
directory, resolving all transitive dependencies freely from the live
npm registry. Each packaged build could therefore embed a different
transitive dependency graph, making builds non-reproducible and
vulnerable to a compromised transitive package.

Copy gitnexus/package-lock.json into the temp directory before
running npm ci so transitive deps are pinned to the versions already
resolved during workspace installation.
2026-05-19 01:16:24 +05:30
Sparsh
7fdfd91f3c Merge branch 'main' into feat/Desktop-app 2026-05-15 03:39:22 +05:30
Sparsh
4850be0838 feat(build): implement afterPack hook to copy node.exe for Windows builds 2026-05-11 21:44:18 +05:30
Sparsh
28ba9bb61d feat(runtime): bundle node.exe for Windows to prevent access violations with native modules 2026-05-11 12:50:03 +05:30
Sparsh
e39f95584c refactor(package.mjs): remove deprecated Node version checks and rebuild logic 2026-05-10 23:47:30 +05:30
Sparsh
22c728bc18 Build Windows NSIS 2026-05-10 20:58:23 +05:30
Sparsh
1290973cb3 refactor: update build scripts to use compileTypeScriptProject function and improve command execution 2026-05-05 18:01:52 +05:30
Sparsh
7ee45d6396 feat: update Node.js version to 22 and adjust electron-rebuild dependency handling 2026-04-27 15:28:18 +05:30
Sparsh
25d6daf04a feat: add electron-vite configuration and automated packaging script for desktop application 2026-04-25 14:35:09 +05:30
Sparsh
13eeab4601 feat(desktop): improve native module rebuild process by checking for runtime package.json
Co-authored-by: Copilot <copilot@github.com>
2026-04-25 11:28:44 +05:30
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
Sparsh
7c4e8ecf19 feat(desktop): add native module rebuilding for Electron and handle startup failures 2026-04-22 13:07:52 +05:30
Sparsh
ed83fd3e42 feat(desktop): enhance packaging workflow and add smoke test for desktop app 2026-04-21 19:24:21 +05:30
Sparsh
89f038fc67 fix(desktop): ensure-gitnexus-runtime: stop stale backend, repair runtime deps 2026-04-21 00:59:53 +05:30
Sparsh
a84380a7a5 fix(desktop): validate unpacked app startup in packaging flow 2026-04-20 21:58:01 +05:30
Sparsh
21fb1b9a0c style(desktop): format gitnexus-desktop package 2026-04-20 10:13:29 +05:30
Sparsh
b95eebca2e fix(desktop): restore native OS window controls (minimize/maximize/close) 2026-04-19 22:47:48 +05:30
Sparsh
31755de553 wired createserver 4747 into main.ts added scripts added predev hook 2026-04-19 15:22:05 +05:30
Sparsh
f5c6fd1b40 clean setup and ckeleton created at gitnexus-desktop 2026-04-19 14:38:36 +05:30