@teambit/workspace
Version:
65 lines (64 loc) • 3.56 kB
TypeScript
import type { BundlerMain } from '@teambit/bundler';
import type { CLIMain } from '@teambit/cli';
import type { EnvsMain } from '@teambit/envs';
import type { GraphqlMain } from '@teambit/graphql';
import type { Harmony, SlotRegistry } from '@teambit/harmony';
import type { IsolatorMain } from '@teambit/isolator';
import type { LoggerMain } from '@teambit/logger';
import type { ScopeMain } from '@teambit/scope';
import type { UiMain } from '@teambit/ui';
import type { GlobalConfigMain } from '@teambit/global-config';
import type { AspectLoaderMain } from '@teambit/aspect-loader';
import type { DependencyResolverMain } from '@teambit/dependency-resolver';
import type { ComponentMain, Component } from '@teambit/component';
import type { VariantsMain } from '@teambit/variants';
import type { ComponentID } from '@teambit/component-id';
import type { OnComponentAdd, OnComponentChange, OnComponentRemove, OnComponentLoad } from './on-component-events';
import type { WorkspaceExtConfig } from './types';
import { Workspace } from './workspace';
import type { ConfigStoreMain } from '@teambit/config-store';
export type WorkspaceDeps = [
CLIMain,
ScopeMain,
ComponentMain,
IsolatorMain,
DependencyResolverMain,
VariantsMain,
LoggerMain,
GraphqlMain,
UiMain,
BundlerMain,
AspectLoaderMain,
EnvsMain,
GlobalConfigMain,
ConfigStoreMain
];
export type OnComponentLoadSlot = SlotRegistry<OnComponentLoad>;
export type OnComponentChangeSlot = SlotRegistry<OnComponentChange>;
export type OnComponentAddSlot = SlotRegistry<OnComponentAdd>;
export type OnComponentRemoveSlot = SlotRegistry<OnComponentRemove>;
export type OnBitmapChange = () => Promise<void>;
export type OnBitmapChangeSlot = SlotRegistry<OnBitmapChange>;
export type OnWorkspaceConfigChange = () => Promise<void>;
export type OnWorkspaceConfigChangeSlot = SlotRegistry<OnWorkspaceConfigChange>;
export type OnAspectsResolve = (aspectsComponents: Component[]) => Promise<void>;
export type OnAspectsResolveSlot = SlotRegistry<OnAspectsResolve>;
export type OnRootAspectAdded = (aspectsId: ComponentID, inWs: boolean) => Promise<void>;
export type OnRootAspectAddedSlot = SlotRegistry<OnRootAspectAdded>;
export declare class WorkspaceMain {
static runtime: import("@teambit/harmony").RuntimeDefinition;
static dependencies: import("@teambit/harmony").Aspect[];
static slots: (((registerFn: () => string) => SlotRegistry<OnComponentLoad>) | ((registerFn: () => string) => SlotRegistry<OnComponentChange>) | ((registerFn: () => string) => SlotRegistry<OnComponentAdd>) | ((registerFn: () => string) => SlotRegistry<OnComponentRemove>) | ((registerFn: () => string) => SlotRegistry<OnAspectsResolve>) | ((registerFn: () => string) => SlotRegistry<OnRootAspectAdded>))[];
static provider([cli, scope, component, isolator, dependencyResolver, variants, loggerExt, graphql, ui, bundler, aspectLoader, envs, globalConfig, configStore,]: WorkspaceDeps, config: WorkspaceExtConfig, [onComponentLoadSlot, onComponentChangeSlot, onComponentAddSlot, onComponentRemoveSlot, onAspectsResolveSlot, onRootAspectAddedSlot, onBitmapChangeSlot, onWorkspaceConfigChangeSlot,]: [
OnComponentLoadSlot,
OnComponentChangeSlot,
OnComponentAddSlot,
OnComponentRemoveSlot,
OnAspectsResolveSlot,
OnRootAspectAddedSlot,
OnBitmapChangeSlot,
OnWorkspaceConfigChangeSlot
], harmony: Harmony): Promise<Workspace | undefined>;
static defineRuntime: string;
}
export default WorkspaceMain;