Skip to content

Commit af724ee

Browse files
committed
fix: env-paths change to v2.2.1 which support require and minor code fix
1 parent e98c90b commit af724ee

3 files changed

Lines changed: 13 additions & 19 deletions

File tree

package-lock.json

Lines changed: 5 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 0 deletions
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)