integration: remove unnecessary exports from internal helpers
Remove `export` from five internal helper functions that are not part of the published API and are only used within their own files. The `sleep` function in GitLabIntegration is kept exported for test access but marked as `@internal`. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -81,9 +81,8 @@ export class AwsCodeCommitIntegration implements ScmIntegration {
|
||||
*
|
||||
* @param url - The original URL
|
||||
* @param type - The desired type, e.g. 'blob', 'edit'
|
||||
* @public
|
||||
*/
|
||||
export function replaceCodeCommitUrlType(
|
||||
function replaceCodeCommitUrlType(
|
||||
url: string,
|
||||
repositoryName: string,
|
||||
type: 'browse' | 'edit',
|
||||
|
||||
@@ -209,11 +209,8 @@ export function buildGerritGitilesArchiveUrlFromLocation(
|
||||
* be used.
|
||||
*
|
||||
* @param config - A Gerrit provider config.
|
||||
* @public
|
||||
*/
|
||||
export function getAuthenticationPrefix(
|
||||
config: GerritIntegrationConfig,
|
||||
): string {
|
||||
function getAuthenticationPrefix(config: GerritIntegrationConfig): string {
|
||||
return config.password ? '/a/' : '/';
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ export function getGithubFileFetchUrl(
|
||||
}
|
||||
}
|
||||
|
||||
export function chooseEndpoint(
|
||||
function chooseEndpoint(
|
||||
config: GithubIntegrationConfig,
|
||||
credentials: GithubCredentials,
|
||||
): 'api' | 'raw' {
|
||||
|
||||
@@ -138,6 +138,7 @@ export class GitLabIntegration implements ScmIntegration {
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export async function sleep(
|
||||
durationMs: number,
|
||||
abortSignal: AbortSignal | null | undefined,
|
||||
|
||||
@@ -75,7 +75,7 @@ export function getGitLabRequestOptions(
|
||||
// Converts
|
||||
// from: https://gitlab.com/groupA/teams/teamA/subgroupA/repoA/-/blob/branch/filepath
|
||||
// to: https://gitlab.com/api/v4/projects/groupA%2Fteams%2FteamA%2FsubgroupA%2FrepoA/repository/files/filepath/raw?ref=branch
|
||||
export function buildProjectUrl(
|
||||
function buildProjectUrl(
|
||||
target: string,
|
||||
projectPathOrID: string | Number,
|
||||
config: GitLabIntegrationConfig,
|
||||
|
||||
Reference in New Issue
Block a user