@teambit/workspace 1.0.226 → 1.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/artifacts/schema.json +568 -2434
- package/dist/{preview-1712632644937.js → preview-1712719054377.js} +2 -2
- package/package.json +29 -29
- package/tsconfig.json +67 -1
- package/dist/aspects-merger.d.ts +0 -58
- package/dist/bit-map.d.ts +0 -75
- package/dist/build-graph-from-fs.d.ts +0 -64
- package/dist/build-graph-ids-from-fs.d.ts +0 -48
- package/dist/capsule.cmd.d.ts +0 -81
- package/dist/component-config-file/component-config-file.d.ts +0 -34
- package/dist/component-config-file/exceptions/already-exists.d.ts +0 -4
- package/dist/component-config-file/exceptions/index.d.ts +0 -1
- package/dist/component-config-file/index.d.ts +0 -2
- package/dist/component-tree.widget.d.ts +0 -4
- package/dist/constants.d.ts +0 -1
- package/dist/eject-conf.cmd.d.ts +0 -20
- package/dist/envs-subcommands/envs-replace.cmd.d.ts +0 -19
- package/dist/envs-subcommands/envs-set.cmd.d.ts +0 -20
- package/dist/envs-subcommands/envs-unset.cmd.d.ts +0 -16
- package/dist/envs-subcommands/envs-update.cmd.d.ts +0 -19
- package/dist/events/index.d.ts +0 -3
- package/dist/events/on-component-add-event.d.ts +0 -14
- package/dist/events/on-component-change-event.d.ts +0 -14
- package/dist/events/on-component-removed-event.d.ts +0 -12
- package/dist/exceptions/incorrect-env-aspect.d.ts +0 -4
- package/dist/exceptions/merge-config-conflict.d.ts +0 -4
- package/dist/exceptions/outside-workspace.d.ts +0 -4
- package/dist/filter.d.ts +0 -27
- package/dist/index.d.ts +0 -20
- package/dist/merge-conflict-file.d.ts +0 -23
- package/dist/on-component-events.d.ts +0 -16
- package/dist/pattern.cmd.d.ts +0 -19
- package/dist/scope-subcommands/scope-set.cmd.d.ts +0 -16
- package/dist/types.d.ts +0 -65
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/workspace/default-component.d.ts +0 -7
- package/dist/ui/workspace/index.d.ts +0 -1
- package/dist/ui/workspace/use-workspace.d.ts +0 -32
- package/dist/ui/workspace/workspace-context.d.ts +0 -3
- package/dist/ui/workspace/workspace-model.d.ts +0 -68
- package/dist/ui/workspace/workspace-overview/index.d.ts +0 -1
- package/dist/ui/workspace/workspace-overview/link-plugin.d.ts +0 -3
- package/dist/ui/workspace/workspace-overview/workspace-overview.d.ts +0 -6
- package/dist/ui/workspace/workspace-provider.d.ts +0 -16
- package/dist/ui/workspace/workspace.d.ts +0 -14
- package/dist/use.cmd.d.ts +0 -19
- package/dist/workspace-aspects-loader.d.ts +0 -121
- package/dist/workspace-component/comp-files.d.ts +0 -22
- package/dist/workspace-component/component-status-loader.d.ts +0 -38
- package/dist/workspace-component/component-status.d.ts +0 -75
- package/dist/workspace-component/index.d.ts +0 -2
- package/dist/workspace-component/workspace-component-loader.d.ts +0 -100
- package/dist/workspace-component/workspace-component.d.ts +0 -49
- package/dist/workspace-section.d.ts +0 -0
- package/dist/workspace.aspect.d.ts +0 -3
- package/dist/workspace.composition.d.ts +0 -1
- package/dist/workspace.d.ts +0 -543
- package/dist/workspace.graphql.d.ts +0 -44
- package/dist/workspace.main.runtime.d.ts +0 -64
- package/dist/workspace.ui-root.d.ts +0 -43
- package/dist/workspace.ui.drawer.d.ts +0 -13
- package/dist/workspace.ui.runtime.d.ts +0 -99
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from '../workspace';
|
|
3
|
-
export declare class EnvsUpdateCmd implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
arguments: {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
examples: {
|
|
12
|
-
cmd: string;
|
|
13
|
-
description: string;
|
|
14
|
-
}[];
|
|
15
|
-
options: never[];
|
|
16
|
-
group: string;
|
|
17
|
-
constructor(workspace: Workspace);
|
|
18
|
-
report([aspectId, pattern]: [string, string]): Promise<string>;
|
|
19
|
-
}
|
package/dist/events/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BitBaseEvent } from '@teambit/pubsub';
|
|
2
|
-
declare class OnComponentAddEventData {
|
|
3
|
-
readonly idStr: any;
|
|
4
|
-
readonly hook: any;
|
|
5
|
-
constructor(idStr: any, hook: any);
|
|
6
|
-
}
|
|
7
|
-
export declare class OnComponentAddEvent extends BitBaseEvent<OnComponentAddEventData> {
|
|
8
|
-
readonly timestamp: any;
|
|
9
|
-
readonly idStr: any;
|
|
10
|
-
readonly hook: any;
|
|
11
|
-
static readonly TYPE = "on-component-add";
|
|
12
|
-
constructor(timestamp: any, idStr: any, hook: any);
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BitBaseEvent } from '@teambit/pubsub';
|
|
2
|
-
declare class OnComponentChangeEventData {
|
|
3
|
-
readonly idStr: any;
|
|
4
|
-
readonly hook: any;
|
|
5
|
-
constructor(idStr: any, hook: any);
|
|
6
|
-
}
|
|
7
|
-
export declare class OnComponentChangeEvent extends BitBaseEvent<OnComponentChangeEventData> {
|
|
8
|
-
readonly timestamp: any;
|
|
9
|
-
readonly idStr: any;
|
|
10
|
-
readonly hook: any;
|
|
11
|
-
static readonly TYPE = "on-component-change";
|
|
12
|
-
constructor(timestamp: any, idStr: any, hook: any);
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BitBaseEvent } from '@teambit/pubsub';
|
|
2
|
-
declare class OnComponentRemovedEventData {
|
|
3
|
-
readonly idStr: any;
|
|
4
|
-
constructor(idStr: any);
|
|
5
|
-
}
|
|
6
|
-
export declare class OnComponentRemovedEvent extends BitBaseEvent<OnComponentRemovedEventData> {
|
|
7
|
-
readonly timestamp: any;
|
|
8
|
-
readonly idStr: any;
|
|
9
|
-
static readonly TYPE = "on-component-removed";
|
|
10
|
-
constructor(timestamp: any, idStr: any);
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/dist/filter.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ComponentID, ComponentIdList } from '@teambit/component-id';
|
|
2
|
-
import { Workspace } from './workspace';
|
|
3
|
-
export declare const statesFilter: readonly ["new", "modified", "deprecated", "deleted", "snappedOnMain", "softTagged", "codeModified"];
|
|
4
|
-
export type StatesFilter = typeof statesFilter[number];
|
|
5
|
-
export declare class Filter {
|
|
6
|
-
private workspace;
|
|
7
|
-
constructor(workspace: Workspace);
|
|
8
|
-
by(criteria: StatesFilter | string, ids: ComponentID[]): Promise<ComponentID[]>;
|
|
9
|
-
byState(state: StatesFilter, ids: ComponentID[]): Promise<ComponentID[]>;
|
|
10
|
-
byMultiParamState(state: string, ids: ComponentID[]): Promise<ComponentID[]>;
|
|
11
|
-
byEnv(env: string, withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
12
|
-
byModified(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
13
|
-
byCodeModified(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
14
|
-
byNew(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
15
|
-
byDeprecated(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
16
|
-
byDeleted(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
17
|
-
byDuringMergeState(): ComponentIdList;
|
|
18
|
-
/**
|
|
19
|
-
* list components that their head is a snap, not a tag.
|
|
20
|
-
* this is relevant only when the lane is the default (main), otherwise, the head is always a snap.
|
|
21
|
-
* components that are during-merge are filtered out, we don't want them during tag and don't want
|
|
22
|
-
* to show them in the "snapped" section in bit-status.
|
|
23
|
-
*/
|
|
24
|
-
bySnappedOnMain(withinIds?: ComponentID[]): Promise<ComponentID[]>;
|
|
25
|
-
bySoftTagged(withinIds?: ComponentID[]): ComponentID[];
|
|
26
|
-
private getModelComps;
|
|
27
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { WorkspaceAspect } from './workspace.aspect';
|
|
2
|
-
export type { default as Workspace, ExtensionsOrigin } from './workspace';
|
|
3
|
-
export type { ResolvedComponent } from '@teambit/harmony.modules.resolved-component';
|
|
4
|
-
export type { AlreadyExistsError as ComponentConfigFileAlreadyExistsError } from './component-config-file';
|
|
5
|
-
export type { WorkspaceMain } from './workspace.main.runtime';
|
|
6
|
-
export * from './events';
|
|
7
|
-
export type { WorkspaceUI } from './workspace.ui.runtime';
|
|
8
|
-
export type { SerializableResults, OnComponentLoad, OnComponentEventResult } from './on-component-events';
|
|
9
|
-
export { ComponentStatus } from './workspace-component';
|
|
10
|
-
export type { WorkspaceModelComponent } from './ui/workspace/workspace-model';
|
|
11
|
-
export { Workspace as WorkspaceModel } from './ui/workspace/workspace-model';
|
|
12
|
-
export { WorkspaceContext } from './ui/workspace/workspace-context';
|
|
13
|
-
export { OutsideWorkspaceError } from './exceptions/outside-workspace';
|
|
14
|
-
export type { WorkspaceComponent } from './workspace-component';
|
|
15
|
-
export type { ComponentConfigFile } from './component-config-file';
|
|
16
|
-
export type { CompFiles, FilesStatus } from './workspace-component/comp-files';
|
|
17
|
-
export type { MergeOptions as BitmapMergeOptions } from './bit-map';
|
|
18
|
-
export type { WorkspaceExtConfig } from './types';
|
|
19
|
-
export { WorkspaceAspect };
|
|
20
|
-
export default WorkspaceAspect;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type ConflictPerId = {
|
|
2
|
-
[compIdWithoutVersion: string]: string;
|
|
3
|
-
};
|
|
4
|
-
export declare class MergeConflictFile {
|
|
5
|
-
private workspacePath;
|
|
6
|
-
conflictPerId: ConflictPerId | undefined;
|
|
7
|
-
constructor(workspacePath: string);
|
|
8
|
-
addConflict(id: string, conflict: string): void;
|
|
9
|
-
removeConflict(id: string): void;
|
|
10
|
-
getConflict(id: string): Promise<string | undefined>;
|
|
11
|
-
getConflictAssumeIsLoaded(id: string): string | undefined;
|
|
12
|
-
getConflictParsed(id: string): Record<string, any> | undefined;
|
|
13
|
-
hasConflict(): boolean;
|
|
14
|
-
getPath(): string;
|
|
15
|
-
loadIfNeeded(): Promise<void>;
|
|
16
|
-
write(): Promise<void>;
|
|
17
|
-
delete(): Promise<void>;
|
|
18
|
-
private formatConflicts;
|
|
19
|
-
private stringHasConflictMarker;
|
|
20
|
-
private parseConflict;
|
|
21
|
-
private getFileContentIfExists;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, ComponentID, AspectData } from '@teambit/component';
|
|
2
|
-
import { ComponentLoadOptions } from '@teambit/legacy/dist/consumer/component/component-loader';
|
|
3
|
-
import type { PathOsBasedAbsolute } from '@teambit/legacy/dist/utils/path';
|
|
4
|
-
import { WatchOptions } from '@teambit/watcher';
|
|
5
|
-
export type SerializableResults = {
|
|
6
|
-
results: any;
|
|
7
|
-
toString: () => string;
|
|
8
|
-
};
|
|
9
|
-
export type OnComponentChange = (component: Component, files: PathOsBasedAbsolute[], removedFiles: PathOsBasedAbsolute[], watchOpts: WatchOptions) => Promise<SerializableResults | void>;
|
|
10
|
-
export type OnComponentAdd = (component: Component, files: string[], watchOpts: WatchOptions) => Promise<SerializableResults | void>;
|
|
11
|
-
export type OnComponentRemove = (componentId: ComponentID) => Promise<SerializableResults>;
|
|
12
|
-
export type OnComponentEventResult = {
|
|
13
|
-
extensionId: string;
|
|
14
|
-
results: SerializableResults;
|
|
15
|
-
};
|
|
16
|
-
export type OnComponentLoad = (component: Component, loadOpts?: ComponentLoadOptions) => Promise<AspectData | undefined>;
|
package/dist/pattern.cmd.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from './workspace';
|
|
3
|
-
export declare class PatternCommand implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
alias: string;
|
|
7
|
-
description: string;
|
|
8
|
-
extendedDescription: string;
|
|
9
|
-
examples: {
|
|
10
|
-
cmd: string;
|
|
11
|
-
description: string;
|
|
12
|
-
}[];
|
|
13
|
-
group: string;
|
|
14
|
-
private: boolean;
|
|
15
|
-
options: CommandOptions;
|
|
16
|
-
constructor(workspace: Workspace);
|
|
17
|
-
report([pattern]: [string]): Promise<string>;
|
|
18
|
-
json([pattern]: [string]): Promise<import("@teambit/component-id").ComponentID[]>;
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Command } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from '../workspace';
|
|
3
|
-
export declare class ScopeSetCmd implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
arguments: {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
options: never[];
|
|
12
|
-
group: string;
|
|
13
|
-
extendedDescription: string;
|
|
14
|
-
constructor(workspace: Workspace);
|
|
15
|
-
report([scopeName, pattern]: [string, string]): Promise<string>;
|
|
16
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
interface VendorConfig {
|
|
2
|
-
directory: string;
|
|
3
|
-
}
|
|
4
|
-
export interface WorkspaceExtConfig {
|
|
5
|
-
/**
|
|
6
|
-
* name of the workspace.
|
|
7
|
-
*/
|
|
8
|
-
name: string;
|
|
9
|
-
/**
|
|
10
|
-
* path to icon.
|
|
11
|
-
*/
|
|
12
|
-
icon: string;
|
|
13
|
-
/**
|
|
14
|
-
* set the default scope when there is no matching for the component in the components array.
|
|
15
|
-
*/
|
|
16
|
-
defaultScope: string;
|
|
17
|
-
/**
|
|
18
|
-
* set the default directory when there is no matching for the component in the components array.
|
|
19
|
-
*/
|
|
20
|
-
defaultDirectory: string;
|
|
21
|
-
/**
|
|
22
|
-
* set the default structure of components in your project
|
|
23
|
-
*/
|
|
24
|
-
vendor: VendorConfig;
|
|
25
|
-
/**
|
|
26
|
-
* All component extensions applied by default on all components in the workspace (except vendor components)
|
|
27
|
-
*/
|
|
28
|
-
extensions: {
|
|
29
|
-
[extensionsId: string]: string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* If set to
|
|
33
|
-
* `true`, it allows the workspace to resolve scope's aspects from node modules
|
|
34
|
-
* installed in the workspace's `node_modules` directory. If not set or set to `false`, aspects will only be resolved
|
|
35
|
-
* from the scope aspects capsule.
|
|
36
|
-
*/
|
|
37
|
-
resolveAspectsFromNodeModules?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* If set to `true`, it allows the workspace to resolve envs from node modules
|
|
40
|
-
* installed in the workspace's `node_modules` directory.
|
|
41
|
-
* the envs will be resolved from the node_modules of the env's root (workspace/node_modules/.bit_roots/{envId})
|
|
42
|
-
* and if not found (usually when the env was hoisted to the root node_modules) then from the node_modules of the
|
|
43
|
-
* workspace.
|
|
44
|
-
* If not set or set to `false`, envs will only be resolved from the scope envs capsule.
|
|
45
|
-
*/
|
|
46
|
-
resolveEnvsFromRoots?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* If set to `true`, bit will try to load aspects dependencies automatically.
|
|
49
|
-
* even if the aspects dependencies are not configured in the workspace.jsonc root config.
|
|
50
|
-
* for example having the aspect
|
|
51
|
-
* main aspect
|
|
52
|
-
* export class MainAspectMain {
|
|
53
|
-
* ...
|
|
54
|
-
* static dependencies = [MyDepAspect];
|
|
55
|
-
* }
|
|
56
|
-
* and the in the workspace.jsonc file:
|
|
57
|
-
* {
|
|
58
|
-
* ...
|
|
59
|
-
* main-aspect: {}
|
|
60
|
-
* }
|
|
61
|
-
* when set to true, bit will try to load MyDepAspect automatically.
|
|
62
|
-
*/
|
|
63
|
-
autoLoadAspectsDeps?: boolean;
|
|
64
|
-
}
|
|
65
|
-
export {};
|
package/dist/ui/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Workspace } from './workspace';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './workspace';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ComponentModel } from '@teambit/component';
|
|
2
|
-
import { ComponentID } from '@teambit/component-id';
|
|
3
|
-
import { Workspace } from './workspace-model';
|
|
4
|
-
type UseWorkspaceOptions = {
|
|
5
|
-
onComponentAdded?: (component: ComponentModel[]) => void;
|
|
6
|
-
onComponentUpdated?: (component: ComponentModel[]) => void;
|
|
7
|
-
onComponentRemoved?: (compId: ComponentID[]) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare function useWorkspace(options?: UseWorkspaceOptions): {
|
|
10
|
-
client: import("@apollo/client").ApolloClient<any>;
|
|
11
|
-
observable: import("@apollo/client").ObservableQuery<any, import("@apollo/client").OperationVariables>;
|
|
12
|
-
previousData?: any;
|
|
13
|
-
error?: import("@apollo/client").ApolloError | undefined;
|
|
14
|
-
loading: boolean;
|
|
15
|
-
networkStatus: import("@apollo/client").NetworkStatus;
|
|
16
|
-
called: boolean;
|
|
17
|
-
startPolling: (pollInterval: number) => void;
|
|
18
|
-
stopPolling: () => void;
|
|
19
|
-
updateQuery: <TVars extends import("@apollo/client").OperationVariables = import("@apollo/client").OperationVariables>(mapFn: (previousQueryResult: any, options: Pick<import("@apollo/client").WatchQueryOptions<TVars, any>, "variables">) => any) => void;
|
|
20
|
-
refetch: (variables?: Partial<import("@apollo/client").OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
21
|
-
reobserve: (newOptions?: Partial<import("@apollo/client").WatchQueryOptions<import("@apollo/client").OperationVariables, any>> | undefined, newNetworkStatus?: import("@apollo/client").NetworkStatus | undefined) => Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
22
|
-
variables: import("@apollo/client").OperationVariables | undefined;
|
|
23
|
-
fetchMore: <TFetchData = any, TFetchVars extends import("@apollo/client").OperationVariables = import("@apollo/client").OperationVariables>(fetchMoreOptions: import("@apollo/client").FetchMoreQueryOptions<TFetchVars, TFetchData> & {
|
|
24
|
-
updateQuery?: ((previousQueryResult: any, options: {
|
|
25
|
-
fetchMoreResult: TFetchData;
|
|
26
|
-
variables: TFetchVars;
|
|
27
|
-
}) => any) | undefined;
|
|
28
|
-
}) => Promise<import("@apollo/client").ApolloQueryResult<TFetchData>>;
|
|
29
|
-
workspace: Workspace | undefined;
|
|
30
|
-
subscribeToMore: <TSubscriptionData = any, TSubscriptionVariables extends import("@apollo/client").OperationVariables = import("@apollo/client").OperationVariables>(options: import("@apollo/client").SubscribeToMoreOptions<any, TSubscriptionVariables, TSubscriptionData>) => () => void;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ComponentID, ComponentModel, ComponentModelProps } from '@teambit/component';
|
|
2
|
-
import { ComponentDescriptor } from '@teambit/component-descriptor';
|
|
3
|
-
import { DeprecationInfo } from '@teambit/deprecation';
|
|
4
|
-
import { Descriptor } from '@teambit/envs';
|
|
5
|
-
import { ComponentStatus } from '../../workspace-component/component-status';
|
|
6
|
-
export type WorkspaceModelComponent = {
|
|
7
|
-
id: ComponentID;
|
|
8
|
-
status: ComponentStatus;
|
|
9
|
-
deprecation: DeprecationInfo;
|
|
10
|
-
env: Descriptor;
|
|
11
|
-
};
|
|
12
|
-
export type WorkspaceProps = {
|
|
13
|
-
name: string;
|
|
14
|
-
path: string;
|
|
15
|
-
components: (ComponentModelProps & {
|
|
16
|
-
aspects: Record<string, any>;
|
|
17
|
-
})[];
|
|
18
|
-
icon: string;
|
|
19
|
-
};
|
|
20
|
-
export declare class Workspace {
|
|
21
|
-
/**
|
|
22
|
-
* name of the workspace.
|
|
23
|
-
*/
|
|
24
|
-
readonly name: string;
|
|
25
|
-
/**
|
|
26
|
-
* absolute path of the workspace.
|
|
27
|
-
*/
|
|
28
|
-
readonly path: string;
|
|
29
|
-
/**
|
|
30
|
-
* icon of the workspace.
|
|
31
|
-
*/
|
|
32
|
-
readonly icon: string;
|
|
33
|
-
/**
|
|
34
|
-
* components container in the workspace.
|
|
35
|
-
*/
|
|
36
|
-
readonly components: ComponentModel[];
|
|
37
|
-
/**
|
|
38
|
-
* components contained in the workspace.
|
|
39
|
-
*/
|
|
40
|
-
readonly componentDescriptors: ComponentDescriptor[];
|
|
41
|
-
constructor(
|
|
42
|
-
/**
|
|
43
|
-
* name of the workspace.
|
|
44
|
-
*/
|
|
45
|
-
name: string,
|
|
46
|
-
/**
|
|
47
|
-
* absolute path of the workspace.
|
|
48
|
-
*/
|
|
49
|
-
path: string,
|
|
50
|
-
/**
|
|
51
|
-
* icon of the workspace.
|
|
52
|
-
*/
|
|
53
|
-
icon: string,
|
|
54
|
-
/**
|
|
55
|
-
* components container in the workspace.
|
|
56
|
-
*/
|
|
57
|
-
components: ComponentModel[],
|
|
58
|
-
/**
|
|
59
|
-
* components contained in the workspace.
|
|
60
|
-
*/
|
|
61
|
-
componentDescriptors: ComponentDescriptor[]);
|
|
62
|
-
/**
|
|
63
|
-
* return a component from the workspace.
|
|
64
|
-
*/
|
|
65
|
-
getComponent(id: ComponentID): ComponentModel | undefined;
|
|
66
|
-
static from({ name, path, components, icon }: WorkspaceProps): Workspace;
|
|
67
|
-
static empty(): Workspace;
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { WorkspaceOverview } from './workspace-overview';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ComponentModel } from '@teambit/component';
|
|
2
|
-
import type { ComponentCardPluginType, PluginProps } from '@teambit/explorer.ui.component-card';
|
|
3
|
-
export declare function WorkspaceOverview(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function useCardPlugins({ compModelsById, }: {
|
|
5
|
-
compModelsById: Map<string, ComponentModel>;
|
|
6
|
-
}): ComponentCardPluginType<PluginProps>[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Workspace } from './workspace-model';
|
|
3
|
-
export type WorkspaceProviderProps = {
|
|
4
|
-
/**
|
|
5
|
-
* workspace model.
|
|
6
|
-
*/
|
|
7
|
-
workspace: Workspace;
|
|
8
|
-
/**
|
|
9
|
-
* react children.
|
|
10
|
-
*/
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* context provider of the workspace
|
|
15
|
-
*/
|
|
16
|
-
export declare function WorkspaceProvider({ workspace, children }: WorkspaceProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import 'reset-css';
|
|
2
|
-
import type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
|
|
3
|
-
import { WorkspaceUI } from '../../workspace.ui.runtime';
|
|
4
|
-
export type WorkspaceProps = {
|
|
5
|
-
routeSlot: RouteSlot;
|
|
6
|
-
menuSlot: RouteSlot;
|
|
7
|
-
sidebar: JSX.Element;
|
|
8
|
-
workspaceUI: WorkspaceUI;
|
|
9
|
-
onSidebarTogglerChange: (callback: () => void) => void;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* main workspace component.
|
|
13
|
-
*/
|
|
14
|
-
export declare function Workspace({ routeSlot, menuSlot, sidebar, workspaceUI, onSidebarTogglerChange }: WorkspaceProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/use.cmd.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { Workspace } from './workspace';
|
|
3
|
-
export declare class UseCmd implements Command {
|
|
4
|
-
private workspace;
|
|
5
|
-
name: string;
|
|
6
|
-
group: string;
|
|
7
|
-
description: string;
|
|
8
|
-
helpUrl: string;
|
|
9
|
-
arguments: {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
}[];
|
|
13
|
-
alias: string;
|
|
14
|
-
options: CommandOptions;
|
|
15
|
-
loader: boolean;
|
|
16
|
-
remoteOp: boolean;
|
|
17
|
-
constructor(workspace: Workspace);
|
|
18
|
-
report([id]: [string]): Promise<any>;
|
|
19
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { GlobalConfigMain } from '@teambit/global-config';
|
|
2
|
-
import { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';
|
|
3
|
-
import { Harmony } from '@teambit/harmony';
|
|
4
|
-
import { AspectDefinition, AspectLoaderMain } from '@teambit/aspect-loader';
|
|
5
|
-
import { ComponentID } from '@teambit/component-id';
|
|
6
|
-
import { LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';
|
|
7
|
-
import { ScopeMain } from '@teambit/scope';
|
|
8
|
-
import { Logger } from '@teambit/logger';
|
|
9
|
-
import { EnvsMain } from '@teambit/envs';
|
|
10
|
-
import { DependencyResolverMain } from '@teambit/dependency-resolver';
|
|
11
|
-
import type { Workspace } from './workspace';
|
|
12
|
-
import { OnAspectsResolveSlot, OnRootAspectAddedSlot } from './workspace.main.runtime';
|
|
13
|
-
export type GetConfiguredUserAspectsPackagesOptions = {
|
|
14
|
-
externalsOnly?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type WorkspaceLoadAspectsOptions = LoadAspectsOptions & {
|
|
17
|
-
useScopeAspectsCapsule?: boolean;
|
|
18
|
-
runSubscribers?: boolean;
|
|
19
|
-
skipDeps?: boolean;
|
|
20
|
-
resolveEnvsFromRoots?: boolean;
|
|
21
|
-
};
|
|
22
|
-
export type AspectPackage = {
|
|
23
|
-
packageName: string;
|
|
24
|
-
version: string;
|
|
25
|
-
};
|
|
26
|
-
export declare class WorkspaceAspectsLoader {
|
|
27
|
-
private workspace;
|
|
28
|
-
private scope;
|
|
29
|
-
private aspectLoader;
|
|
30
|
-
private envs;
|
|
31
|
-
private dependencyResolver;
|
|
32
|
-
private logger;
|
|
33
|
-
private globalConfig;
|
|
34
|
-
private harmony;
|
|
35
|
-
private onAspectsResolveSlot;
|
|
36
|
-
private onRootAspectAddedSlot;
|
|
37
|
-
private resolveAspectsFromNodeModules;
|
|
38
|
-
private resolveEnvsFromRoots;
|
|
39
|
-
private consumer;
|
|
40
|
-
private resolvedInstalledAspects;
|
|
41
|
-
constructor(workspace: Workspace, scope: ScopeMain, aspectLoader: AspectLoaderMain, envs: EnvsMain, dependencyResolver: DependencyResolverMain, logger: Logger, globalConfig: GlobalConfigMain, harmony: Harmony, onAspectsResolveSlot: OnAspectsResolveSlot, onRootAspectAddedSlot: OnRootAspectAddedSlot, resolveAspectsFromNodeModules?: boolean, resolveEnvsFromRoots?: boolean);
|
|
42
|
-
/**
|
|
43
|
-
* load aspects from the workspace and if not exists in the workspace, load from the node_modules.
|
|
44
|
-
* keep in mind that the graph may have circles.
|
|
45
|
-
*/
|
|
46
|
-
loadAspects(ids?: string[], throwOnError?: boolean, neededFor?: string, opts?: WorkspaceLoadAspectsOptions): Promise<string[]>;
|
|
47
|
-
private loadFromScopeAspectsCapsule;
|
|
48
|
-
throwWsJsoncAspectNotFoundError(err: any): void;
|
|
49
|
-
private loadAspectDefsByOrder;
|
|
50
|
-
resolveAspects(runtimeName?: string, componentIds?: ComponentID[], opts?: ResolveAspectsOptions): Promise<AspectDefinition[]>;
|
|
51
|
-
shouldUseHashForCapsules(): boolean;
|
|
52
|
-
getCapsulePath(): string;
|
|
53
|
-
private logFoundWorkspaceVsScope;
|
|
54
|
-
use(aspectIdStr: string): Promise<string>;
|
|
55
|
-
getConfiguredUserAspectsPackages(options?: GetConfiguredUserAspectsPackagesOptions): Promise<AspectPackage[]>;
|
|
56
|
-
private aspectDefsToRequireableComponents;
|
|
57
|
-
private linkIfMissingWorkspaceAspects;
|
|
58
|
-
/**
|
|
59
|
-
* This will return a resolver that knows to resolve aspects which are part of the workspace.
|
|
60
|
-
* means aspects exist in the bitmap file
|
|
61
|
-
* @param stringIds
|
|
62
|
-
* @param runtimeName
|
|
63
|
-
* @returns
|
|
64
|
-
*/
|
|
65
|
-
private getWorkspaceAspectResolver;
|
|
66
|
-
private runOnAspectsResolveFunctions;
|
|
67
|
-
private getOnAspectsResolveFunctions;
|
|
68
|
-
private runOnRootAspectAddedFunctions;
|
|
69
|
-
private getOnRootAspectAddedFunctions;
|
|
70
|
-
/**
|
|
71
|
-
* This will return a resolver that knows to resolve aspects which are not part of the workspace.
|
|
72
|
-
* means aspects that does not exist in the bitmap file
|
|
73
|
-
* instead it will resolve them from the node_modules recursively
|
|
74
|
-
* @param graph
|
|
75
|
-
* @param rootIds
|
|
76
|
-
* @param runtimeName
|
|
77
|
-
* @returns
|
|
78
|
-
*/
|
|
79
|
-
private getInstalledAspectResolver;
|
|
80
|
-
private resolveInstalledAspectRecursively;
|
|
81
|
-
/**
|
|
82
|
-
* Create a graph of aspects without the core aspects.
|
|
83
|
-
* @param components
|
|
84
|
-
* @param isAspect
|
|
85
|
-
* @returns
|
|
86
|
-
*/
|
|
87
|
-
private getAspectsGraphWithoutCore;
|
|
88
|
-
/**
|
|
89
|
-
* Load all unloaded extensions from an extension list
|
|
90
|
-
* this will resolve the extensions from the scope aspects capsules if they are not in the ws
|
|
91
|
-
* Only use it for component extensions
|
|
92
|
-
* for workspace/scope root aspect use the load aspects directly
|
|
93
|
-
*
|
|
94
|
-
* The reason we are loading component extensions with "scope aspects capsules" is because for component extensions
|
|
95
|
-
* we might have the same extension in multiple versions
|
|
96
|
-
* (for example I might have 2 components using different versions of the same env)
|
|
97
|
-
* in such case, I can't install both version into the root of the node_modules so I need to place it somewhere else (capsules)
|
|
98
|
-
* @param extensions list of extensions with config to load
|
|
99
|
-
*/
|
|
100
|
-
loadComponentsExtensions(extensions: ExtensionDataList, originatedFrom?: ComponentID, opts?: WorkspaceLoadAspectsOptions): Promise<void>;
|
|
101
|
-
private isAspect;
|
|
102
|
-
/**
|
|
103
|
-
* same as `this.importAndGetMany()` with a specific error handling of ComponentNotFound
|
|
104
|
-
*/
|
|
105
|
-
private importAndGetAspects;
|
|
106
|
-
/**
|
|
107
|
-
* split the provided components into 2 groups, one which are workspace components and the other which are not.
|
|
108
|
-
* @param components
|
|
109
|
-
* @returns
|
|
110
|
-
*/
|
|
111
|
-
private groupComponentsByWorkspaceExistence;
|
|
112
|
-
private groupComponentsByLoadFromRootComps;
|
|
113
|
-
private shouldLoadFromRootComps;
|
|
114
|
-
/**
|
|
115
|
-
* split the provided components into 2 groups, one which are workspace components and the other which are not.
|
|
116
|
-
* @param components
|
|
117
|
-
* @returns
|
|
118
|
-
*/
|
|
119
|
-
private groupAspectDefsByWorkspaceExistence;
|
|
120
|
-
private groupIdsByWorkspaceExistence;
|
|
121
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentID } from '@teambit/component-id';
|
|
2
|
-
import { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';
|
|
3
|
-
import { SourceFileModel } from '@teambit/legacy/dist/scope/models/version';
|
|
4
|
-
import { Repository } from '@teambit/legacy/dist/scope/objects';
|
|
5
|
-
type FILE_STATUS = 'new' | 'modified' | 'deleted' | 'unchanged';
|
|
6
|
-
type PathLinux = string;
|
|
7
|
-
export type FilesStatus = {
|
|
8
|
-
[pathRelativeToCompDir: PathLinux]: FILE_STATUS;
|
|
9
|
-
};
|
|
10
|
-
export declare class CompFiles {
|
|
11
|
-
readonly id: ComponentID;
|
|
12
|
-
private repository;
|
|
13
|
-
private currentFiles;
|
|
14
|
-
readonly compDir: PathLinux;
|
|
15
|
-
private modelFiles;
|
|
16
|
-
constructor(id: ComponentID, repository: Repository, currentFiles: SourceFile[], compDir: PathLinux, modelFiles?: SourceFileModel[]);
|
|
17
|
-
isModified(): boolean;
|
|
18
|
-
getCurrentFiles(): SourceFile[];
|
|
19
|
-
getHeadFiles(): Promise<SourceFile[]>;
|
|
20
|
-
getFilesStatus(): FilesStatus;
|
|
21
|
-
}
|
|
22
|
-
export {};
|