@teambit/workspace 1.0.579 → 1.0.581
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/filter.d.ts +1 -1
- package/dist/filter.js.map +1 -1
- package/dist/{preview-1743045659475.js → preview-1743563977810.js} +2 -2
- package/dist/workspace-aspects-loader.js +3 -3
- package/dist/workspace-aspects-loader.js.map +1 -1
- package/dist/workspace-component/workspace-component-loader.js +14 -14
- package/dist/workspace-component/workspace-component-loader.js.map +1 -1
- package/dist/workspace.js +3 -1
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.ui.runtime.d.ts +1 -1
- package/package.json +37 -37
- package/workspace-component/workspace-component-loader.ts +14 -14
|
@@ -77,7 +77,7 @@ export declare class WorkspaceUI {
|
|
|
77
77
|
private menuItems;
|
|
78
78
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
79
79
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
80
|
-
static slots: (((registerFn: () => string) => SlotRegistry<
|
|
80
|
+
static slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<ComponentTreeNode>) | ((registerFn: () => string) => SlotRegistry<MenuItemSlot>) | ((registerFn: () => string) => SlotRegistry<DrawerWidgetSlot>) | ((registerFn: () => string) => SlotRegistry<MenuWidgetSlot>))[];
|
|
81
81
|
static provider([ui, componentUi, sidebar, componentTree, commandBarUI, graphUI]: [
|
|
82
82
|
UiUI,
|
|
83
83
|
ComponentUI,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.581",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.581"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -52,46 +52,46 @@
|
|
|
52
52
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.496",
|
|
53
53
|
"@teambit/scopes.scope-id": "0.0.7",
|
|
54
54
|
"@teambit/workspace.ui.empty-workspace": "0.0.509",
|
|
55
|
-
"@teambit/component": "1.0.
|
|
56
|
-
"@teambit/dependency-resolver": "1.0.
|
|
57
|
-
"@teambit/envs": "1.0.
|
|
58
|
-
"@teambit/legacy.extension-data": "0.0.
|
|
59
|
-
"@teambit/legacy.scope": "0.0.
|
|
60
|
-
"@teambit/legacy.consumer-component": "0.0.
|
|
61
|
-
"@teambit/legacy.consumer": "0.0.
|
|
62
|
-
"@teambit/legacy.bit-map": "0.0.
|
|
55
|
+
"@teambit/component": "1.0.581",
|
|
56
|
+
"@teambit/dependency-resolver": "1.0.581",
|
|
57
|
+
"@teambit/envs": "1.0.581",
|
|
58
|
+
"@teambit/legacy.extension-data": "0.0.47",
|
|
59
|
+
"@teambit/legacy.scope": "0.0.45",
|
|
60
|
+
"@teambit/legacy.consumer-component": "0.0.46",
|
|
61
|
+
"@teambit/legacy.consumer": "0.0.45",
|
|
62
|
+
"@teambit/legacy.bit-map": "0.0.102",
|
|
63
63
|
"@teambit/toolbox.fs.last-modified": "0.0.5",
|
|
64
64
|
"@teambit/toolbox.path.path": "0.0.8",
|
|
65
|
-
"@teambit/logger": "0.0.
|
|
66
|
-
"@teambit/objects": "0.0.
|
|
67
|
-
"@teambit/scope": "1.0.
|
|
68
|
-
"@teambit/graph": "1.0.
|
|
69
|
-
"@teambit/cli": "0.0.
|
|
70
|
-
"@teambit/isolator": "1.0.
|
|
71
|
-
"@teambit/component-tree": "1.0.
|
|
65
|
+
"@teambit/logger": "0.0.1251",
|
|
66
|
+
"@teambit/objects": "0.0.88",
|
|
67
|
+
"@teambit/scope": "1.0.581",
|
|
68
|
+
"@teambit/graph": "1.0.581",
|
|
69
|
+
"@teambit/cli": "0.0.1158",
|
|
70
|
+
"@teambit/isolator": "1.0.581",
|
|
71
|
+
"@teambit/component-tree": "1.0.581",
|
|
72
72
|
"@teambit/legacy.constants": "0.0.11",
|
|
73
73
|
"@teambit/harmony.modules.resolved-component": "0.0.502",
|
|
74
74
|
"@teambit/legacy.utils": "0.0.19",
|
|
75
|
-
"@teambit/watcher": "1.0.
|
|
76
|
-
"@teambit/aspect-loader": "1.0.
|
|
77
|
-
"@teambit/config-store": "0.0.
|
|
78
|
-
"@teambit/config": "0.0.
|
|
75
|
+
"@teambit/watcher": "1.0.581",
|
|
76
|
+
"@teambit/aspect-loader": "1.0.581",
|
|
77
|
+
"@teambit/config-store": "0.0.38",
|
|
78
|
+
"@teambit/config": "0.0.1332",
|
|
79
79
|
"@teambit/harmony.modules.requireable-component": "0.0.502",
|
|
80
80
|
"@teambit/toolbox.modules.module-resolver": "0.0.11",
|
|
81
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.
|
|
82
|
-
"@teambit/graphql": "1.0.
|
|
83
|
-
"@teambit/bundler": "1.0.
|
|
84
|
-
"@teambit/global-config": "0.0.
|
|
85
|
-
"@teambit/legacy.consumer-config": "0.0.
|
|
86
|
-
"@teambit/ui": "1.0.
|
|
87
|
-
"@teambit/variants": "0.0.
|
|
81
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.273",
|
|
82
|
+
"@teambit/graphql": "1.0.581",
|
|
83
|
+
"@teambit/bundler": "1.0.581",
|
|
84
|
+
"@teambit/global-config": "0.0.1161",
|
|
85
|
+
"@teambit/legacy.consumer-config": "0.0.45",
|
|
86
|
+
"@teambit/ui": "1.0.581",
|
|
87
|
+
"@teambit/variants": "0.0.1425",
|
|
88
88
|
"@teambit/component-issues": "0.0.157",
|
|
89
|
-
"@teambit/component.sources": "0.0.
|
|
89
|
+
"@teambit/component.sources": "0.0.97",
|
|
90
90
|
"@teambit/harmony.modules.in-memory-cache": "0.0.13",
|
|
91
|
-
"@teambit/legacy.component-list": "0.0.
|
|
92
|
-
"@teambit/legacy.scope-api": "0.0.
|
|
93
|
-
"@teambit/scope.network": "0.0.
|
|
94
|
-
"@teambit/scope.remotes": "0.0.
|
|
91
|
+
"@teambit/legacy.component-list": "0.0.99",
|
|
92
|
+
"@teambit/legacy.scope-api": "0.0.100",
|
|
93
|
+
"@teambit/scope.network": "0.0.45",
|
|
94
|
+
"@teambit/scope.remotes": "0.0.45",
|
|
95
95
|
"@teambit/toolbox.path.is-path-inside": "0.0.500",
|
|
96
96
|
"@teambit/workspace.modules.match-pattern": "0.0.509",
|
|
97
97
|
"@teambit/component.ui.component-drawer": "0.0.442",
|
|
@@ -99,19 +99,19 @@
|
|
|
99
99
|
"@teambit/lanes.hooks.use-lanes": "0.0.285",
|
|
100
100
|
"@teambit/lanes.ui.models.lanes-model": "0.0.225",
|
|
101
101
|
"@teambit/ui-foundation.ui.side-bar": "0.0.906",
|
|
102
|
-
"@teambit/command-bar": "1.0.
|
|
102
|
+
"@teambit/command-bar": "1.0.581",
|
|
103
103
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.235",
|
|
104
104
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.233",
|
|
105
105
|
"@teambit/component.ui.component-filters.env-filter": "0.0.250",
|
|
106
106
|
"@teambit/component.ui.component-filters.show-main-filter": "0.0.226",
|
|
107
|
-
"@teambit/sidebar": "1.0.
|
|
107
|
+
"@teambit/sidebar": "1.0.581",
|
|
108
108
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.516",
|
|
109
|
-
"@teambit/pubsub": "1.0.
|
|
109
|
+
"@teambit/pubsub": "1.0.581",
|
|
110
110
|
"@teambit/harmony.modules.concurrency": "0.0.12",
|
|
111
111
|
"@teambit/toolbox.promise.map-pool": "0.0.6",
|
|
112
112
|
"@teambit/workspace.ui.use-workspace-mode": "0.0.2",
|
|
113
113
|
"@teambit/component-descriptor": "0.0.433",
|
|
114
|
-
"@teambit/deprecation": "1.0.
|
|
114
|
+
"@teambit/deprecation": "1.0.581",
|
|
115
115
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.227",
|
|
116
116
|
"@teambit/workspace.ui.preserve-workspace-mode": "0.0.2",
|
|
117
117
|
"@teambit/cloud.hooks.use-cloud-scopes": "0.0.8",
|
|
@@ -121,7 +121,7 @@ export class WorkspaceComponentLoader {
|
|
|
121
121
|
return { components: [], invalidComponents: [] };
|
|
122
122
|
}
|
|
123
123
|
const callId = Math.floor(Math.random() * 1000); // generate a random callId to be able to identify the call from the logs
|
|
124
|
-
this.logger.
|
|
124
|
+
this.logger.profileTrace(`getMany-${callId}`);
|
|
125
125
|
this.logger.setStatusLine(`loading ${ids.length} component(s)`);
|
|
126
126
|
const loadOptsWithDefaults: ComponentLoadOptions = Object.assign(
|
|
127
127
|
// We don't want to load extension or execute the load slot at this step
|
|
@@ -167,7 +167,7 @@ export class WorkspaceComponentLoader {
|
|
|
167
167
|
(comp) =>
|
|
168
168
|
idsWithEmptyStrs.includes(comp.id.toString()) || idsWithEmptyStrs.includes(comp.id.toStringWithoutVersion())
|
|
169
169
|
);
|
|
170
|
-
this.logger.
|
|
170
|
+
this.logger.profileTrace(`getMany-${callId}`);
|
|
171
171
|
this.logger.clearStatusLine();
|
|
172
172
|
return { components: requestedComponents, invalidComponents };
|
|
173
173
|
}
|
|
@@ -180,9 +180,9 @@ export class WorkspaceComponentLoader {
|
|
|
180
180
|
if (!ids?.length) return { components: [], invalidComponents: [] };
|
|
181
181
|
|
|
182
182
|
const workspaceScopeIdsMap: WorkspaceScopeIdsMap = await this.groupAndUpdateIds(ids);
|
|
183
|
-
this.logger.
|
|
183
|
+
this.logger.profileTrace('buildLoadGroups');
|
|
184
184
|
const groupsToHandle = await this.buildLoadGroups(workspaceScopeIdsMap);
|
|
185
|
-
this.logger.
|
|
185
|
+
this.logger.profileTrace('buildLoadGroups');
|
|
186
186
|
// prefix your command with "BIT_LOG=*" to see the detailed groups
|
|
187
187
|
if (process.env.BIT_LOG) {
|
|
188
188
|
printGroupsToHandle(groupsToHandle, this.logger);
|
|
@@ -191,12 +191,12 @@ export class WorkspaceComponentLoader {
|
|
|
191
191
|
await mapSeries(groupsToHandle, async (group, index) => {
|
|
192
192
|
const { scopeIds, workspaceIds, aspects, core, seeders, envs } = group;
|
|
193
193
|
const groupDesc = `getMany-${callId} group ${index + 1}/${groupsToHandle.length} - ${loadGroupToStr(group)}`;
|
|
194
|
-
this.logger.
|
|
194
|
+
this.logger.profileTrace(groupDesc);
|
|
195
195
|
if (!workspaceIds.length && !scopeIds.length) {
|
|
196
196
|
throw new Error('getAndLoadSlotOrdered - group has no ids to load');
|
|
197
197
|
}
|
|
198
198
|
const res = await this.getAndLoadSlot(workspaceIds, scopeIds, { ...loadOpts, core, seeders, aspects, envs });
|
|
199
|
-
this.logger.
|
|
199
|
+
this.logger.profileTrace(groupDesc);
|
|
200
200
|
// We don't want to return components that were not asked originally (we do want to load them)
|
|
201
201
|
if (!group.seeders) return undefined;
|
|
202
202
|
return res;
|
|
@@ -411,17 +411,17 @@ export class WorkspaceComponentLoader {
|
|
|
411
411
|
return !loadOpts.idsToNotLoadAsAspects?.includes(ext.stringId);
|
|
412
412
|
});
|
|
413
413
|
if (loadOpts.loadExtensions) {
|
|
414
|
-
this.logger.
|
|
414
|
+
this.logger.profileTrace('loadComponentsExtensions');
|
|
415
415
|
await this.workspace.loadComponentsExtensions(filteredMergeExtensions);
|
|
416
|
-
this.logger.
|
|
416
|
+
this.logger.profileTrace('loadComponentsExtensions');
|
|
417
417
|
}
|
|
418
418
|
let wsComponentsWithAspects = workspaceComponents;
|
|
419
419
|
// if (loadOpts.seeders) {
|
|
420
|
-
this.logger.
|
|
420
|
+
this.logger.profileTrace('executeLoadSlot');
|
|
421
421
|
wsComponentsWithAspects = await pMapPool(workspaceComponents, (component) => this.executeLoadSlot(component), {
|
|
422
422
|
concurrency: concurrentComponentsLimit(),
|
|
423
423
|
});
|
|
424
|
-
this.logger.
|
|
424
|
+
this.logger.profileTrace('executeLoadSlot');
|
|
425
425
|
await this.warnAboutMisconfiguredEnvs(wsComponentsWithAspects);
|
|
426
426
|
// }
|
|
427
427
|
|
|
@@ -430,7 +430,7 @@ export class WorkspaceComponentLoader {
|
|
|
430
430
|
// It's important to load the workspace components as aspects here
|
|
431
431
|
// otherwise the envs from the workspace won't be loaded at time
|
|
432
432
|
// so we will get wrong dependencies from component who uses envs from the workspace
|
|
433
|
-
this.logger.
|
|
433
|
+
this.logger.profileTrace('loadCompsAsAspects');
|
|
434
434
|
if (loadOpts.loadSeedersAsAspects || (loadOpts.core && loadOpts.aspects)) {
|
|
435
435
|
await this.loadCompsAsAspects(workspaceComponents.concat(scopeComponents), {
|
|
436
436
|
loadApps: true,
|
|
@@ -441,7 +441,7 @@ export class WorkspaceComponentLoader {
|
|
|
441
441
|
idsToNotLoadAsAspects: loadOpts.idsToNotLoadAsAspects,
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
this.logger.
|
|
444
|
+
this.logger.profileTrace('loadCompsAsAspects');
|
|
445
445
|
|
|
446
446
|
return { components: withAspects, invalidComponents };
|
|
447
447
|
}
|
|
@@ -581,7 +581,7 @@ export class WorkspaceComponentLoader {
|
|
|
581
581
|
workspaceIds.forEach((id) => {
|
|
582
582
|
idsIndex[id.toString()] = id;
|
|
583
583
|
});
|
|
584
|
-
this.logger.
|
|
584
|
+
this.logger.profileTrace('consumer.loadComponents');
|
|
585
585
|
const {
|
|
586
586
|
components: legacyComponents,
|
|
587
587
|
invalidComponents: legacyInvalidComponents,
|
|
@@ -591,7 +591,7 @@ export class WorkspaceComponentLoader {
|
|
|
591
591
|
false,
|
|
592
592
|
loadOptsWithDefaults
|
|
593
593
|
);
|
|
594
|
-
this.logger.
|
|
594
|
+
this.logger.profileTrace('consumer.loadComponents');
|
|
595
595
|
const allLegacyComponents = legacyComponents.concat(removedComponents);
|
|
596
596
|
legacyInvalidComponents.forEach((invalidComponent) => {
|
|
597
597
|
const entry = { id: idsIndex[invalidComponent.id.toString()], err: invalidComponent.error };
|