This commit is contained in:
2026-04-07 14:50:23 +09:00
commit b4e485502b
4778 changed files with 2017091 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/**
* @description Get a Base URL for Snyk APIs
* @export
* @param {string} defaultUrl URL to default to, should be the one defined in the config.default.json file
* @param {(string | undefined)} envvarDefinedApiUrl if there is an URL defined in the SNYK_API envvar
* @param {(string | undefined)} configDefinedApiUrl if there is an URL defined in the 'endpoint' key of the config
* @returns {string} Returns a Base URL - without the /v1. Use this to construct derived URLs
*/
export declare function getBaseApiUrl(defaultUrl: string, envvarDefinedApiUrl?: string, configDefinedApiUrl?: string): string;
export declare function getV1ApiUrl(baseApiUrl: string): string;
/**
* @description Return Snyk REST API URL
* @export
* @param {string} baseApiUrl
* @param {string} envvarDefinedRestApiUrl
* @param {string} envvarDefinedRestV3Url
* @returns {string}
*/
export declare function getRestApiUrl(baseApiUrl: string, envvarDefinedRestApiUrl?: string, envvarDefinedRestV3Url?: string): string;
export declare function getHiddenApiUrl(restUrl: string): string;
export declare function getRootUrl(apiUrlString: string): string;

View File

@@ -0,0 +1,28 @@
interface Config {
PRUNE_DEPS_THRESHOLD: number;
MAX_PATH_COUNT: number;
API: string;
api: string;
API_REST_URL: string;
API_HIDDEN_URL: string;
API_V3_URL?: string;
disableSuggestions: string;
org: string;
orgId?: string;
ROOT: string;
timeout: number;
PROJECT_NAME: string;
TOKEN: string;
CODE_CLIENT_PROXY_URL: string;
DISABLE_ANALYTICS: unknown;
CACHE_PATH?: string;
DRIFTCTL_PATH?: string;
DRIFTCTL_URL?: string;
IAC_BUNDLE_PATH?: string;
IAC_POLICY_ENGINE_PATH?: string;
IAC_RULES_CLIENT_URL?: string;
PUBLIC_VULN_DB_URL: string;
PUBLIC_LICENSE_URL: string;
}
declare const config: Config;
export default config;