This repository was archived by the owner on Sep 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +3662
-4229
lines changed Expand file tree Collapse file tree 6 files changed +3662
-4229
lines changed Original file line number Diff line number Diff line change 26
26
"test" : " jest"
27
27
},
28
28
"dependencies" : {
29
- "async-mutex" : " 0.4.0" ,
30
29
"cors" : " 2.8.5" ,
31
30
"dotenv" : " 16.0.3" ,
32
31
"express" : " 4.18.2" ,
33
32
"joi" : " 17.7.0" ,
34
33
"morgan" : " 1.10.0" ,
35
- "simple-git" : " 3.16.0" ,
36
34
"winston" : " 3.8.2"
37
35
},
38
36
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ require('dotenv').config();
3
3
import express from 'express' ;
4
4
5
5
import { registerCommonMiddlewares } from './middlewares/common' ;
6
- import { registerMiddleware as registerLocalGit } from './middlewares/localGit' ;
7
6
import { registerMiddleware as registerLocalFs } from './middlewares/localFs' ;
8
7
import { createLogger } from './logger' ;
9
8
@@ -20,14 +19,7 @@ const level = process.env.LOG_LEVEL || 'info';
20
19
registerCommonMiddlewares ( app , options ) ;
21
20
22
21
try {
23
- const mode = process . env . MODE || 'fs' ;
24
- if ( mode === 'fs' ) {
25
- registerLocalFs ( app , options ) ;
26
- } else if ( mode === 'git' ) {
27
- registerLocalGit ( app , options ) ;
28
- } else {
29
- throw new Error ( `Unknown proxy mode '${ mode } '` ) ;
30
- }
22
+ registerLocalFs ( app , options ) ;
31
23
} catch ( e : any ) {
32
24
logger . error ( e . message ) ;
33
25
process . exit ( 1 ) ;
Original file line number Diff line number Diff line change 1
1
import { registerCommonMiddlewares } from './middlewares/common' ;
2
- import { registerMiddleware as localGit } from './middlewares/localGit' ;
3
2
import { registerMiddleware as localFs } from './middlewares/localFs' ;
4
3
import { createLogger } from './logger' ;
5
4
@@ -15,12 +14,6 @@ function createOptions(options: Options) {
15
14
} ;
16
15
}
17
16
18
- export async function registerLocalGit ( app : express . Express , options : Options = { } ) {
19
- const opts = createOptions ( options ) ;
20
- registerCommonMiddlewares ( app , opts ) ;
21
- await localGit ( app , opts ) ;
22
- }
23
-
24
17
export async function registerLocalFs ( app : express . Express , options : Options = { } ) {
25
18
const opts = createOptions ( options ) ;
26
19
registerCommonMiddlewares ( app , opts ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments