Skip to content

Commit 7dea019

Browse files
committed
fix: env-paths change to v2.2.1 which support require and minor code fix
1 parent 8d161a6 commit 7dea019

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

package-lock.json

+5-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"connect-mongo": "^5.1.0",
4747
"cors": "^2.8.5",
4848
"diff2html": "^3.4.33",
49-
"env-paths": "^3.0.0",
49+
"env-paths": "^2.2.1",
5050
"express": "^4.18.2",
5151
"express-http-proxy": "^2.0.0",
5252
"express-rate-limit": "^7.1.5",

src/config/ConfigLoader.js

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ class ConfigLoader extends EventEmitter {
3939
this.config = initialConfig;
4040
this.reloadTimer = null;
4141
this.isReloading = false;
42+
this.cacheDir = null;
43+
}
44+
45+
async initialize() {
46+
// Initialize cache directory using env-paths
47+
const paths = envPaths('git-proxy', { suffix: '' });
48+
this.cacheDir = paths.cache;
4249
}
4350

4451
async start() {

0 commit comments

Comments
 (0)