@teambit/workspace 0.0.554 → 0.0.555
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/dist/build-graph-from-fs.d.ts +30 -0
- package/dist/install.cmd.d.ts +17 -3
- package/dist/install.cmd.js.map +1 -1
- package/dist/link/link.cmd.d.ts +15 -1
- package/dist/types.d.ts +21 -0
- package/dist/ui/workspace/workspace-model.d.ts +32 -1
- package/dist/ui/workspace/workspace-provider.d.ts +9 -0
- package/dist/ui/workspace/workspace.d.ts +3 -0
- package/dist/watch/output-formatter.d.ts +6 -0
- package/dist/watch/watch.cmd.d.ts +22 -1
- package/dist/watch/watcher.d.ts +9 -0
- package/dist/workspace-component/component-status.d.ts +57 -1
- package/dist/workspace-component/workspace-component-loader.d.ts +7 -0
- package/dist/workspace-component/workspace-component.d.ts +36 -1
- package/dist/workspace.d.ts +236 -3
- package/dist/workspace.js +6 -0
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.ui-root.d.ts +18 -1
- package/dist/workspace.ui.runtime.d.ts +32 -1
- package/install.cmd.tsx +2 -2
- package/package-tar/teambit-workspace-0.0.555.tgz +0 -0
- package/package.json +50 -50
- package/tsconfig.json +0 -1
- package/workspace.ts +9 -4
- package/package-tar/teambit-workspace-0.0.554.tgz +0 -0
|
@@ -11,16 +11,47 @@ import { RouteProps } from 'react-router-dom';
|
|
|
11
11
|
import { CommandBarUI, ComponentSearcher } from '@teambit/command-bar';
|
|
12
12
|
export declare type SidebarWidgetSlot = SlotRegistry<ComponentTreeNode>;
|
|
13
13
|
export declare class WorkspaceUI {
|
|
14
|
+
/**
|
|
15
|
+
* route slot.
|
|
16
|
+
*/
|
|
14
17
|
private routeSlot;
|
|
18
|
+
/**
|
|
19
|
+
* component ui extension.
|
|
20
|
+
*/
|
|
15
21
|
private componentUi;
|
|
22
|
+
/**
|
|
23
|
+
* menu slot
|
|
24
|
+
*/
|
|
16
25
|
private menuSlot;
|
|
17
26
|
private menuItemSlot;
|
|
18
27
|
private sidebar;
|
|
19
28
|
private sidebarSlot;
|
|
29
|
+
/**
|
|
30
|
+
* sidebar link slot
|
|
31
|
+
*/
|
|
20
32
|
private sidebarItemSlot;
|
|
21
33
|
private commandBarUI;
|
|
22
|
-
constructor(
|
|
34
|
+
constructor(
|
|
35
|
+
/**
|
|
36
|
+
* route slot.
|
|
37
|
+
*/
|
|
38
|
+
routeSlot: RouteSlot,
|
|
39
|
+
/**
|
|
40
|
+
* component ui extension.
|
|
41
|
+
*/
|
|
42
|
+
componentUi: ComponentUI,
|
|
43
|
+
/**
|
|
44
|
+
* menu slot
|
|
45
|
+
*/
|
|
46
|
+
menuSlot: RouteSlot, menuItemSlot: MenuItemSlot, sidebar: SidebarUI, sidebarSlot: SidebarWidgetSlot,
|
|
47
|
+
/**
|
|
48
|
+
* sidebar link slot
|
|
49
|
+
*/
|
|
50
|
+
sidebarItemSlot: SidebarItemSlot, commandBarUI: CommandBarUI, reactRouterUI: ReactRouterUI);
|
|
23
51
|
private setKeyBindHandler;
|
|
52
|
+
/**
|
|
53
|
+
* register a route to the workspace.
|
|
54
|
+
*/
|
|
24
55
|
registerRoute(route: RouteProps): this;
|
|
25
56
|
registerSidebarWidget(componentTreeNode: ComponentTreeNode): this;
|
|
26
57
|
registerMenuItem: (menuItems: MenuItem[]) => void;
|
package/install.cmd.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkspaceDependencyLifecycleType } from '@teambit/dependency-resolver';
|
|
3
3
|
import { Logger } from '@teambit/logger';
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ import { Workspace, WorkspaceInstallOptions } from './workspace';
|
|
|
7
7
|
|
|
8
8
|
type InstallCmdOptions = {
|
|
9
9
|
variants: string;
|
|
10
|
-
type:
|
|
10
|
+
type: WorkspaceDependencyLifecycleType;
|
|
11
11
|
skipDedupe: boolean;
|
|
12
12
|
skipImport: boolean;
|
|
13
13
|
updateExisting: boolean;
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.555",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.555"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash.compact": "3.0.1",
|
|
@@ -34,55 +34,55 @@
|
|
|
34
34
|
"@teambit/base-ui.surfaces.split-pane.hover-splitter": "1.0.0",
|
|
35
35
|
"@teambit/base-ui.surfaces.split-pane.split-pane": "1.0.0",
|
|
36
36
|
"@teambit/base-ui.graph.tree.recursive-tree": "1.0.0",
|
|
37
|
-
"@teambit/bit-error": "0.0.
|
|
38
|
-
"@teambit/legacy-bit-id": "0.0.
|
|
39
|
-
"@teambit/logger": "0.0.
|
|
40
|
-
"@teambit/scope": "0.0.
|
|
41
|
-
"@teambit/cli": "0.0.
|
|
42
|
-
"@teambit/isolator": "0.0.
|
|
43
|
-
"@teambit/component-tree": "0.0.
|
|
44
|
-
"@teambit/component.ui.component-status-resolver": "0.0.
|
|
45
|
-
"@teambit/harmony.modules.resolved-component": "0.0.
|
|
46
|
-
"@teambit/dependency-resolver": "0.0.
|
|
47
|
-
"@teambit/compiler": "0.0.
|
|
48
|
-
"@teambit/component": "0.0.
|
|
49
|
-
"@teambit/graphql": "0.0.
|
|
50
|
-
"@teambit/aspect-loader": "0.0.
|
|
51
|
-
"@teambit/bundler": "0.0.
|
|
52
|
-
"@teambit/envs": "0.0.
|
|
53
|
-
"@teambit/pubsub": "0.0.
|
|
54
|
-
"@teambit/ui": "0.0.
|
|
55
|
-
"@teambit/variants": "0.0.
|
|
56
|
-
"@teambit/component-issues": "0.0.
|
|
57
|
-
"@teambit/config": "0.0.
|
|
58
|
-
"@teambit/harmony.modules.requireable-component": "0.0.
|
|
59
|
-
"@teambit/importer": "0.0.
|
|
60
|
-
"@teambit/workspace.modules.match-pattern": "0.0.
|
|
61
|
-
"@teambit/command-bar": "0.0.
|
|
37
|
+
"@teambit/bit-error": "0.0.372",
|
|
38
|
+
"@teambit/legacy-bit-id": "0.0.375",
|
|
39
|
+
"@teambit/logger": "0.0.471",
|
|
40
|
+
"@teambit/scope": "0.0.555",
|
|
41
|
+
"@teambit/cli": "0.0.386",
|
|
42
|
+
"@teambit/isolator": "0.0.555",
|
|
43
|
+
"@teambit/component-tree": "0.0.372",
|
|
44
|
+
"@teambit/component.ui.component-status-resolver": "0.0.467",
|
|
45
|
+
"@teambit/harmony.modules.resolved-component": "0.0.461",
|
|
46
|
+
"@teambit/dependency-resolver": "0.0.555",
|
|
47
|
+
"@teambit/compiler": "0.0.555",
|
|
48
|
+
"@teambit/component": "0.0.555",
|
|
49
|
+
"@teambit/graphql": "0.0.555",
|
|
50
|
+
"@teambit/aspect-loader": "0.0.555",
|
|
51
|
+
"@teambit/bundler": "0.0.555",
|
|
52
|
+
"@teambit/envs": "0.0.555",
|
|
53
|
+
"@teambit/pubsub": "0.0.555",
|
|
54
|
+
"@teambit/ui": "0.0.555",
|
|
55
|
+
"@teambit/variants": "0.0.473",
|
|
56
|
+
"@teambit/component-issues": "0.0.21",
|
|
57
|
+
"@teambit/config": "0.0.397",
|
|
58
|
+
"@teambit/harmony.modules.requireable-component": "0.0.461",
|
|
59
|
+
"@teambit/importer": "0.0.13",
|
|
60
|
+
"@teambit/workspace.modules.match-pattern": "0.0.465",
|
|
61
|
+
"@teambit/command-bar": "0.0.555",
|
|
62
62
|
"@teambit/design.ui.surfaces.menu.link-item": "0.0.374",
|
|
63
|
-
"@teambit/graph": "0.0.
|
|
64
|
-
"@teambit/react-router": "0.0.
|
|
65
|
-
"@teambit/sidebar": "0.0.
|
|
66
|
-
"@teambit/ui-foundation.ui.main-dropdown": "0.0.
|
|
67
|
-
"@teambit/ui-foundation.ui.menu": "0.0.
|
|
68
|
-
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.
|
|
69
|
-
"@teambit/toolbox.time.time-format": "0.0.
|
|
70
|
-
"@teambit/component-id": "0.0.
|
|
71
|
-
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.
|
|
72
|
-
"@teambit/deprecation": "0.0.
|
|
73
|
-
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.
|
|
74
|
-
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.
|
|
75
|
-
"@teambit/ui-foundation.ui.corner": "0.0.
|
|
76
|
-
"@teambit/ui-foundation.ui.notifications.notification-context": "0.0.
|
|
77
|
-
"@teambit/ui-foundation.ui.top-bar": "0.0.
|
|
63
|
+
"@teambit/graph": "0.0.555",
|
|
64
|
+
"@teambit/react-router": "0.0.555",
|
|
65
|
+
"@teambit/sidebar": "0.0.555",
|
|
66
|
+
"@teambit/ui-foundation.ui.main-dropdown": "0.0.463",
|
|
67
|
+
"@teambit/ui-foundation.ui.menu": "0.0.463",
|
|
68
|
+
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.465",
|
|
69
|
+
"@teambit/toolbox.time.time-format": "0.0.460",
|
|
70
|
+
"@teambit/component-id": "0.0.376",
|
|
71
|
+
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.464",
|
|
72
|
+
"@teambit/deprecation": "0.0.555",
|
|
73
|
+
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.463",
|
|
74
|
+
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.168",
|
|
75
|
+
"@teambit/ui-foundation.ui.corner": "0.0.470",
|
|
76
|
+
"@teambit/ui-foundation.ui.notifications.notification-context": "0.0.464",
|
|
77
|
+
"@teambit/ui-foundation.ui.top-bar": "0.0.465",
|
|
78
78
|
"@teambit/design.ui.styles.ellipsis": "0.0.346",
|
|
79
79
|
"@teambit/design.ui.styles.muted-italic": "0.0.35",
|
|
80
|
-
"@teambit/ui-foundation.ui.full-loader": "0.0.
|
|
81
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.
|
|
82
|
-
"@teambit/ui-foundation.ui.tree.drawer": "0.0.
|
|
83
|
-
"@teambit/explorer.ui.gallery.component-grid": "0.0.
|
|
84
|
-
"@teambit/workspace.ui.empty-workspace": "0.0.
|
|
85
|
-
"@teambit/workspace.ui.workspace-component-card": "0.0.
|
|
80
|
+
"@teambit/ui-foundation.ui.full-loader": "0.0.463",
|
|
81
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.469",
|
|
82
|
+
"@teambit/ui-foundation.ui.tree.drawer": "0.0.463",
|
|
83
|
+
"@teambit/explorer.ui.gallery.component-grid": "0.0.463",
|
|
84
|
+
"@teambit/workspace.ui.empty-workspace": "0.0.465",
|
|
85
|
+
"@teambit/workspace.ui.workspace-component-card": "0.0.466"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@types/lodash.compact": "3.0.6",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@apollo/client": "^3.0.0",
|
|
105
|
-
"@teambit/legacy": "1.0.
|
|
105
|
+
"@teambit/legacy": "1.0.172",
|
|
106
106
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
107
107
|
"react": "^16.8.0 || ^17.0.0"
|
|
108
108
|
},
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"react": "-"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
|
-
"@teambit/legacy": "1.0.
|
|
133
|
+
"@teambit/legacy": "1.0.172",
|
|
134
134
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
135
135
|
"react": "^16.8.0 || ^17.0.0"
|
|
136
136
|
}
|
package/tsconfig.json
CHANGED
package/workspace.ts
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import { Importer } from '@teambit/importer';
|
|
21
21
|
import { ComponentScopeDirMap, Config } from '@teambit/config';
|
|
22
22
|
import {
|
|
23
|
-
|
|
23
|
+
WorkspaceDependencyLifecycleType,
|
|
24
24
|
DependencyResolverMain,
|
|
25
25
|
PackageManagerInstallOptions,
|
|
26
26
|
ComponentDependency,
|
|
@@ -107,7 +107,7 @@ export interface EjectConfOptions {
|
|
|
107
107
|
|
|
108
108
|
export type WorkspaceInstallOptions = {
|
|
109
109
|
variants?: string;
|
|
110
|
-
lifecycleType?:
|
|
110
|
+
lifecycleType?: WorkspaceDependencyLifecycleType;
|
|
111
111
|
dedupe: boolean;
|
|
112
112
|
import: boolean;
|
|
113
113
|
copyPeerToRuntimeOnRoot?: boolean;
|
|
@@ -1192,8 +1192,8 @@ export class Workspace implements ComponentFactory {
|
|
|
1192
1192
|
*/
|
|
1193
1193
|
async install(packages?: string[], options?: WorkspaceInstallOptions) {
|
|
1194
1194
|
if (packages && packages.length) {
|
|
1195
|
-
if (!options?.variants && options?.lifecycleType === 'dev') {
|
|
1196
|
-
throw new DependencyTypeNotSupportedInPolicy(options?.lifecycleType);
|
|
1195
|
+
if (!options?.variants && (options?.lifecycleType as string) === 'dev') {
|
|
1196
|
+
throw new DependencyTypeNotSupportedInPolicy(options?.lifecycleType as string);
|
|
1197
1197
|
}
|
|
1198
1198
|
this.logger.debug(`installing the following packages: ${packages.join()}`);
|
|
1199
1199
|
const resolver = this.dependencyResolver.getVersionResolver();
|
|
@@ -1288,6 +1288,8 @@ export class Workspace implements ComponentFactory {
|
|
|
1288
1288
|
private async generateFilterFnForDepsFromLocalRemote() {
|
|
1289
1289
|
// TODO: once scope create a new API for this, replace it with the new one
|
|
1290
1290
|
const remotes = await this.scope._legacyRemotes();
|
|
1291
|
+
const reg = await this.dependencyResolver.getRegistries();
|
|
1292
|
+
const packageScopes = Object.keys(reg.scopes);
|
|
1291
1293
|
return (dependencyList: DependencyList): DependencyList => {
|
|
1292
1294
|
const filtered = dependencyList.filter((dep) => {
|
|
1293
1295
|
if (!(dep instanceof ComponentDependency)) {
|
|
@@ -1296,6 +1298,9 @@ export class Workspace implements ComponentFactory {
|
|
|
1296
1298
|
if (remotes.isHub(dep.componentId.scope)) {
|
|
1297
1299
|
return true;
|
|
1298
1300
|
}
|
|
1301
|
+
if (packageScopes.some((scope) => dep.packageName.startsWith(`@${scope}/`))) {
|
|
1302
|
+
return true;
|
|
1303
|
+
}
|
|
1299
1304
|
return false;
|
|
1300
1305
|
});
|
|
1301
1306
|
return filtered;
|
|
Binary file
|