1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

refactor: proxy/frontend api in feature oriented architecture (#6487)

This commit is contained in:
Mateusz Kwasniewski 2024-03-11 09:28:40 +01:00 committed by GitHub
parent 7d827442ee
commit 2a3959082c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 17 additions and 17 deletions

View File

@ -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';

View File

@ -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';

View File

@ -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,

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';