diff --git a/package.json b/package.json index 782d645df..52905a2af 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,11 @@ "types": "./dist/src/utils/errors.d.ts", "import": "./dist/src/utils/errors.js", "require": "./dist/src/utils/errors.js" + }, + "./service": { + "types": "./dist/src/service/index.d.ts", + "import": "./dist/src/service/index.js", + "require": "./dist/src/service/index.js" } }, "scripts": { diff --git a/src/config/index.ts b/src/config/index.ts index 694259241..658bd5b82 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -22,9 +22,12 @@ import { ConfigLoader } from './ConfigLoader'; import { Configuration } from './types'; import { serverConfig } from './env'; import { getConfigFile } from './file'; + import { validateConfig } from './validators'; import { handleErrorAndLog, handleErrorAndThrow } from '../utils/errors'; +export { setConfigFile, getConfigFile, validate } from './file'; + // Deprecated compatibility fields are still optional because the defaults do not set them. type OptionalTopLevelConfigKey = 'proxyUrl' | 'sslCertPemPath' | 'sslKeyPemPath'; type RequiredTopLevelConfigKey = Exclude; @@ -223,6 +226,11 @@ export const getAuthorisedList = () => { return config.authorisedList; }; +// Get GIT_PROXY_UI_PORT +export const getUIPort = (): number => { + return Number(serverConfig.GIT_PROXY_UI_PORT); +}; + // Gets a list of authorised repositories export const getTempPasswordConfig = () => { const config = loadFullConfiguration();