UNPKG

git-command-helper

Version:
28 lines (27 loc) 1.18 kB
import { ExtendedSpawnOptions } from "./infoOptions"; /** * Apply a username to a remote Git URL and update the remote config if possible. * * @param remote - The remote URL string. * @param user - The username to apply. * @param originName - The remote name, defaults to "origin". * @param spawnOpt - Options for the spawn function (optional). * @returns True if user was applied and remote updated, false otherwise. */ export declare function applyUserToOriginUrl(remote?: string, user?: string, originName?: string, spawnOpt?: ExtendedSpawnOptions): Promise<{ error: boolean; message: string; }>; /** * Apply a token (as password) to a remote Git URL and update the remote config if possible. * * @param remote - The remote URL string. * @param token - The token to apply as password. * @param originName - The remote name, defaults to "origin". * @param spawnOpt - Options for the spawn function (optional). * @returns An object with error status and message. */ export declare function applyTokenToOriginUrl(remote?: string, token?: string, originName?: string, spawnOpt?: ExtendedSpawnOptions): Promise<{ error: boolean; message: string; }>;