UNPKG

@teambit/workspace

Version:
29 lines (28 loc) 1.68 kB
import { ComponentID, ComponentIdList } from '@teambit/component-id'; import type { Workspace } from './workspace'; export declare const statesFilter: readonly ["new", "modified", "deprecated", "deleted", "snappedOnMain", "softTagged", "codeModified", "localOnly"]; export type StatesFilter = (typeof statesFilter)[number]; export declare class Filter { private workspace; constructor(workspace: Workspace); by(criteria: StatesFilter | string, ids: ComponentID[]): Promise<ComponentID[]>; byState(state: StatesFilter, ids: ComponentID[]): Promise<ComponentID[]>; byMultiParamState(state: string, ids: ComponentID[]): Promise<ComponentID[]>; byEnv(env: string, withinIds?: ComponentID[]): Promise<ComponentID[]>; byModified(withinIds?: ComponentID[]): Promise<ComponentID[]>; byCodeModified(withinIds?: ComponentID[]): Promise<ComponentID[]>; byLocalOnly(withinIds?: ComponentID[]): ComponentID[]; byNew(withinIds?: ComponentID[]): Promise<ComponentID[]>; byDeprecated(withinIds?: ComponentID[]): Promise<ComponentID[]>; byDeleted(withinIds?: ComponentID[]): Promise<ComponentID[]>; byDuringMergeState(): ComponentIdList; /** * list components that their head is a snap, not a tag. * this is relevant only when the lane is the default (main), otherwise, the head is always a snap. * components that are during-merge are filtered out, we don't want them during tag and don't want * to show them in the "snapped" section in bit-status. */ bySnappedOnMain(withinIds?: ComponentID[]): Promise<ComponentID[]>; bySoftTagged(withinIds?: ComponentID[]): ComponentID[]; private getModelComps; }