mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	refactor: proxy/frontend api in feature oriented architecture (#6487)
This commit is contained in:
		
							parent
							
								
									7d827442ee
								
							
						
					
					
						commit
						2a3959082c
					
				| @ -1,8 +1,8 @@ | ||||
| import { Request, Response } from 'express'; | ||||
| import Controller from '../controller'; | ||||
| import { IUnleashConfig, IUnleashServices, NONE } from '../../types'; | ||||
| import { Logger } from '../../logger'; | ||||
| import { IApiUser } from '../../types/api-user'; | ||||
| import Controller from '../routes/controller'; | ||||
| import { IUnleashConfig, IUnleashServices, NONE } from '../types'; | ||||
| import { Logger } from '../logger'; | ||||
| import { IApiUser } from '../types/api-user'; | ||||
| import { | ||||
|     ClientMetricsSchema, | ||||
|     createRequestSchema, | ||||
| @ -13,12 +13,12 @@ import { | ||||
|     ProxyFeatureSchema, | ||||
|     proxyFeaturesSchema, | ||||
|     ProxyFeaturesSchema, | ||||
| } from '../../openapi'; | ||||
| } from '../openapi'; | ||||
| import { Context } from 'unleash-client'; | ||||
| import { enrichContextWithIp } from '../../proxy'; | ||||
| import { corsOriginMiddleware } from '../../middleware'; | ||||
| import NotImplementedError from '../../error/not-implemented-error'; | ||||
| import NotFoundError from '../../error/notfound-error'; | ||||
| import { enrichContextWithIp } from './index'; | ||||
| import { corsOriginMiddleware } from '../middleware'; | ||||
| import NotImplementedError from '../error/not-implemented-error'; | ||||
| import NotFoundError from '../error/notfound-error'; | ||||
| import rateLimit from 'express-rate-limit'; | ||||
| import { minutesToMilliseconds } from 'date-fns'; | ||||
| import isEqual from 'lodash.isequal'; | ||||
| @ -1,5 +1,5 @@ | ||||
| import { ProxyService, Config } from './proxy-service'; | ||||
| import { GlobalFrontendApiCache } from '../proxy/global-frontend-api-cache'; | ||||
| import { GlobalFrontendApiCache } from './global-frontend-api-cache'; | ||||
| import { IApiUser } from '../types'; | ||||
| import { FeatureInterface } from 'unleash-client/lib/feature'; | ||||
| import noLogger from '../../test/fixtures/no-logger'; | ||||
| @ -16,9 +16,9 @@ import { | ||||
| import { validateOrigins } from '../util'; | ||||
| import { BadDataError, InvalidTokenError } from '../error'; | ||||
| import { PROXY_REPOSITORY_CREATED } from '../metric-events'; | ||||
| import { ProxyRepository } from '../proxy'; | ||||
| import { FrontendApiRepository } from '../proxy/frontend-api-repository'; | ||||
| import { GlobalFrontendApiCache } from '../proxy/global-frontend-api-cache'; | ||||
| import { ProxyRepository } from './index'; | ||||
| import { FrontendApiRepository } from './frontend-api-repository'; | ||||
| import { GlobalFrontendApiCache } from './global-frontend-api-cache'; | ||||
| 
 | ||||
| export type Config = Pick< | ||||
|     IUnleashConfig, | ||||
| @ -41,7 +41,7 @@ import { | ||||
|     emptyResponse, | ||||
|     getStandardResponses, | ||||
| } from '../../openapi/util/standard-responses'; | ||||
| import { ProxyService } from '../../services/proxy-service'; | ||||
| import { ProxyService } from '../../proxy/proxy-service'; | ||||
| import { extractUserId, extractUsername } from '../../util'; | ||||
| import { OperationDeniedError } from '../../error'; | ||||
| 
 | ||||
|  | ||||
| @ -9,7 +9,7 @@ import { AdminApi } from './admin-api'; | ||||
| import ClientApi from './client-api'; | ||||
| 
 | ||||
| import { HealthCheckController } from './health-check'; | ||||
| import FrontendAPIController from './proxy-api'; | ||||
| import FrontendAPIController from '../proxy/proxy-controller'; | ||||
| import EdgeController from './edge-api'; | ||||
| import { PublicInviteController } from './public-invite'; | ||||
| import { Db } from '../db/db'; | ||||
|  | ||||
| @ -31,7 +31,7 @@ import { OpenApiService } from './openapi-service'; | ||||
| import { ClientSpecService } from './client-spec-service'; | ||||
| import { PlaygroundService } from '../features/playground/playground-service'; | ||||
| import { GroupService } from './group-service'; | ||||
| import { ProxyService } from './proxy-service'; | ||||
| import { ProxyService } from '../proxy/proxy-service'; | ||||
| import EdgeService from './edge-service'; | ||||
| import PatService from './pat-service'; | ||||
| import { PublicSignupTokenService } from './public-signup-token-service'; | ||||
|  | ||||
| @ -28,7 +28,7 @@ import { OpenApiService } from '../services/openapi-service'; | ||||
| import { ClientSpecService } from '../services/client-spec-service'; | ||||
| import { PlaygroundService } from '../features/playground/playground-service'; | ||||
| import { GroupService } from '../services/group-service'; | ||||
| import { ProxyService } from '../services/proxy-service'; | ||||
| import { ProxyService } from '../proxy/proxy-service'; | ||||
| import EdgeService from '../services/edge-service'; | ||||
| import PatService from '../services/pat-service'; | ||||
| import { PublicSignupTokenService } from '../services/public-signup-token-service'; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user