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 2626 "test" : " jest"
2727 },
2828 "dependencies" : {
29- "async-mutex" : " 0.4.0" ,
3029 "cors" : " 2.8.5" ,
3130 "dotenv" : " 16.0.3" ,
3231 "express" : " 4.18.2" ,
3332 "joi" : " 17.7.0" ,
3433 "morgan" : " 1.10.0" ,
35- "simple-git" : " 3.16.0" ,
3634 "winston" : " 3.8.2"
3735 },
3836 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ require('dotenv').config();
33import express from 'express' ;
44
55import { registerCommonMiddlewares } from './middlewares/common' ;
6- import { registerMiddleware as registerLocalGit } from './middlewares/localGit' ;
76import { registerMiddleware as registerLocalFs } from './middlewares/localFs' ;
87import { createLogger } from './logger' ;
98
@@ -20,14 +19,7 @@ const level = process.env.LOG_LEVEL || 'info';
2019 registerCommonMiddlewares ( app , options ) ;
2120
2221 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 ) ;
3123 } catch ( e : any ) {
3224 logger . error ( e . message ) ;
3325 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change 11import { registerCommonMiddlewares } from './middlewares/common' ;
2- import { registerMiddleware as localGit } from './middlewares/localGit' ;
32import { registerMiddleware as localFs } from './middlewares/localFs' ;
43import { createLogger } from './logger' ;
54
@@ -15,12 +14,6 @@ function createOptions(options: Options) {
1514 } ;
1615}
1716
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-
2417export async function registerLocalFs ( app : express . Express , options : Options = { } ) {
2518 const opts = createOptions ( options ) ;
2619 registerCommonMiddlewares ( app , opts ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments