@teambit/lanes
Version:
361 lines (360 loc) • 10.4 kB
TypeScript
import type { ScopeMain } from '@teambit/scope';
import type { LaneId } from '@teambit/lane-id';
import type { Workspace } from '@teambit/workspace';
import type { Command, CommandOptions } from '@teambit/cli';
import type { CreateLaneOptions, LanesMain } from './lanes.main.runtime';
import type { SwitchCmd } from './switch.cmd';
import type { FetchCmd } from '@teambit/importer';
type LaneOptions = {
details?: boolean;
remote?: string;
merged?: boolean;
notMerged?: boolean;
json?: boolean;
};
export declare class LaneListCmd implements Command {
private lanes;
private workspace;
private scope;
name: string;
description: string;
alias: string;
options: CommandOptions;
loader: boolean;
remoteOp: boolean;
skipWorkspace: boolean;
constructor(lanes: LanesMain, workspace: Workspace, scope: ScopeMain);
report(args: any, laneOptions: LaneOptions): Promise<string>;
json(args: any, laneOptions: LaneOptions): Promise<{
lanes: {
components: {
id: string;
head: string;
}[];
readmeComponent: {
id: string;
head: string | undefined;
} | undefined;
name: string;
remote: string | null;
id: LaneId;
alias?: string | null;
isMerged: boolean | null;
log?: import("@teambit/objects").LaneLog;
hash: string;
}[];
currentLane: string | null;
}>;
}
export declare class LaneShowCmd implements Command {
private lanes;
private workspace;
private scope;
name: string;
description: string;
alias: string;
options: CommandOptions;
loader: boolean;
remoteOp: boolean;
skipWorkspace: boolean;
constructor(lanes: LanesMain, workspace: Workspace, scope: ScopeMain);
report([name]: [string], laneOptions: LaneOptions): Promise<string>;
private geLanesData;
json([name]: [string], laneOptions: LaneOptions): Promise<{
components: {
id: string;
head: string;
}[];
readmeComponent: {
id: string;
head: string | undefined;
} | undefined;
name: string;
remote: string | null;
id: LaneId;
alias?: string | null;
isMerged: boolean | null;
log?: import("@teambit/objects").LaneLog;
hash: string;
}>;
}
export declare class LaneCreateCmd implements Command {
private lanes;
name: string;
arguments: {
name: string;
description: string;
}[];
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([name]: [string], createLaneOptions: CreateLaneOptions & {
remoteScope?: string;
}): Promise<string>;
}
export declare class LaneAliasCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([laneName, alias]: [string, string, string]): Promise<string>;
}
export declare class CatLaneHistoryCmd implements Command {
private lanes;
name: string;
description: string;
private: boolean;
alias: string;
options: CommandOptions;
loader: boolean;
group: string;
constructor(lanes: LanesMain);
report([laneName]: [string]): Promise<string>;
}
export type LaneCheckoutOpts = {
skipDependencyInstallation?: boolean;
};
export declare class LaneCheckoutCmd implements Command {
private lanes;
name: string;
description: string;
arguments: {
name: string;
description: string;
}[];
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string>;
}
export declare class LaneRevertCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
arguments: {
name: string;
description: string;
}[];
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([historyId]: [string], opts: LaneCheckoutOpts): Promise<string>;
json([historyId]: [string], opts: LaneCheckoutOpts): Promise<{
components: {
id: string;
filesStatus: Record<string, string>;
}[] | undefined;
removedComponents: string[] | undefined;
addedComponents: string[] | undefined;
newComponents: string[] | undefined;
failedComponents: {
id: string;
unchangedMessage: string;
unchangedLegitimately: boolean | undefined;
}[] | undefined;
leftUnresolvedConflicts: boolean | undefined;
newFromLane: string[] | undefined;
newFromLaneAdded: boolean | undefined;
version: string | undefined;
resolvedComponents: string[] | undefined;
abortedComponents: {
id: string;
filesStatus: Record<string, string>;
}[] | undefined;
installationError: string | undefined;
compilationError: string | undefined;
mergeSnapError: string | undefined;
mergeSnapResults: {
snappedComponents: string[];
removedComponents: string[] | undefined;
exportedIds: string[] | undefined;
} | null;
workspaceConfigUpdateResult: {
logs: string[] | undefined;
} | undefined;
historyId: string;
}>;
}
export declare class LaneHistoryCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
private getHistoryData;
private getDateString;
report([laneName]: [string], { id }: {
id?: string;
}): Promise<string>;
json([laneName]: [string], { id }: {
id?: string;
}): Promise<{
id: string;
date: string;
username: string | undefined;
message: string | undefined;
components: string[];
}[] | {
id: string;
date: string;
username: string | undefined;
message: string | undefined;
components: string[];
}>;
}
export declare class LaneEjectCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
arguments: {
name: string;
description: string;
}[];
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([pattern]: [string]): Promise<string>;
}
export declare class LaneChangeScopeCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([remoteScope]: [string], { laneName }: {
laneName?: string;
}): Promise<string>;
}
export declare class LaneRenameCmd implements Command {
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([newName]: [string], { laneName }: {
laneName?: string;
}): Promise<string>;
}
export declare class LaneRemoveCmd implements Command {
private lanes;
name: string;
arguments: {
name: string;
description: string;
}[];
description: string;
group: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(lanes: LanesMain);
report([names]: [string[]], { remote, force, silent, }: {
remote: boolean;
force: boolean;
silent: boolean;
}): Promise<string>;
}
export type RemoveCompsOpts = {
workspaceOnly?: boolean;
updateMain?: boolean;
};
export declare class LaneRemoveCompCmd implements Command {
private workspace;
private lanes;
name: string;
arguments: {
name: string;
description: string;
}[];
description: string;
group: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(workspace: Workspace, lanes: LanesMain);
report(): Promise<string>;
}
export declare class LaneImportCmd implements Command {
private switchCmd;
name: string;
description: string;
arguments: {
name: string;
description: string;
}[];
alias: string;
options: CommandOptions;
loader: boolean;
constructor(switchCmd: SwitchCmd);
report([lane]: [string], { skipDependencyInstallation, pattern, branch, }: {
skipDependencyInstallation: boolean;
pattern?: string;
branch?: boolean;
}): Promise<string>;
}
export declare class LaneFetchCmd implements Command {
private fetchCmd;
private lanes;
name: string;
description: string;
extendedDescription: string;
alias: string;
options: CommandOptions;
loader: boolean;
constructor(fetchCmd: FetchCmd, lanes: LanesMain);
report([laneId]: [string], { all }: {
all?: boolean;
}): Promise<string>;
}
export declare class LaneCmd implements Command {
private lanes;
private workspace;
private scope;
name: string;
description: string;
alias: string;
options: CommandOptions;
loader: boolean;
group: string;
remoteOp: boolean;
skipWorkspace: boolean;
helpUrl: string;
commands: Command[];
constructor(lanes: LanesMain, workspace: Workspace, scope: ScopeMain);
report([name]: [string], laneOptions: LaneOptions): Promise<string>;
}
/**
* @deprecated - only use it to revert the add-readme command changes
*/
export declare class LaneRemoveReadmeCmd implements Command {
private lanes;
name: string;
description: string;
options: CommandOptions;
loader: boolean;
skipWorkspace: boolean;
constructor(lanes: LanesMain);
report([laneName]: [string]): Promise<string>;
}
export {};