@teambit/workspace 1.0.124 → 1.0.126
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/preview/static/css/teambit.workspace/{workspace-preview.4f943af0.css → workspace-preview.65558198.css} +2 -2
- package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/dist/{preview-1704358107276.js → preview-1704511392073.js} +2 -2
- package/dist/workspace-aspects-loader.d.ts +1 -1
- package/dist/workspace-aspects-loader.js.map +1 -1
- package/dist/workspace-component/component-status-loader.d.ts +38 -0
- package/dist/workspace-component/component-status-loader.js +189 -0
- package/dist/workspace-component/component-status-loader.js.map +1 -0
- package/dist/workspace-component/component-status.d.ts +2 -2
- package/dist/workspace-component/component-status.js.map +1 -1
- package/dist/workspace.d.ts +11 -5
- package/dist/workspace.js +46 -11
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.main.runtime.d.ts +62 -9
- package/dist/workspace.main.runtime.js +252 -17
- package/dist/workspace.main.runtime.js.map +1 -1
- package/package.json +23 -23
- package/workspace-component/component-status-loader.ts +135 -0
- package/workspace-component/component-status.ts +2 -2
- package/dist/workspace.provider.d.ts +0 -54
- package/dist/workspace.provider.js +0 -263
- package/dist/workspace.provider.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentStatusLegacy } from './component-status-loader';
|
|
2
2
|
export type ModifyInfo = {
|
|
3
3
|
hasModifiedFiles: boolean;
|
|
4
4
|
hasModifiedDependencies: boolean;
|
|
@@ -71,5 +71,5 @@ export declare class ComponentStatus {
|
|
|
71
71
|
* the component is not authored and not imported.
|
|
72
72
|
*/
|
|
73
73
|
nested?: boolean);
|
|
74
|
-
static fromLegacy(status:
|
|
74
|
+
static fromLegacy(status: ComponentStatusLegacy, hasModifiedDependencies: boolean, isOutdated: boolean): ComponentStatus;
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentStatus","constructor","modifyInfo","isNew","isDeleted","isStaged","isInWorkspace","isInScope","isOutdated","nested","fromLegacy","status","hasModifiedDependencies","modify","hasModifiedFiles","modified","newlyCreated","deleted","staged","notExist","missingFromScope","exports"],"sources":["component-status.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["ComponentStatus","constructor","modifyInfo","isNew","isDeleted","isStaged","isInWorkspace","isInScope","isOutdated","nested","fromLegacy","status","hasModifiedDependencies","modify","hasModifiedFiles","modified","newlyCreated","deleted","staged","notExist","missingFromScope","exports"],"sources":["component-status.ts"],"sourcesContent":["import { ComponentStatusLegacy } from './component-status-loader';\n\nexport type ModifyInfo = {\n hasModifiedFiles: boolean;\n hasModifiedDependencies: boolean;\n};\n\nexport class ComponentStatus {\n constructor(\n /**\n * is the component modified.\n */\n readonly modifyInfo: ModifyInfo,\n\n /**\n * is the new component new.\n */\n readonly isNew: boolean,\n\n /**\n * is the component deleted from the workspace.\n */\n readonly isDeleted: boolean,\n\n /**\n * is the component staged.\n */\n readonly isStaged: boolean,\n\n /**\n * does the component exists in the workspace.\n */\n readonly isInWorkspace: boolean,\n\n /**\n * does the component exists in the scope.\n */\n readonly isInScope: boolean,\n\n /**\n * does the component is outdated (pending for update).\n */\n readonly isOutdated: boolean,\n\n /**\n * @deprecated this was relevant for legacy only. can be deleted if it's not used elsewhere\n * the component is not authored and not imported.\n */\n readonly nested?: boolean\n ) {}\n\n static fromLegacy(status: ComponentStatusLegacy, hasModifiedDependencies: boolean, isOutdated: boolean) {\n const modify: ModifyInfo = {\n hasModifiedFiles: !!status.modified,\n hasModifiedDependencies,\n };\n return new ComponentStatus(\n modify,\n !!status.newlyCreated,\n !!status.deleted,\n !!status.staged,\n !status.notExist,\n !status.missingFromScope,\n isOutdated\n );\n }\n}\n"],"mappings":";;;;;;AAOO,MAAMA,eAAe,CAAC;EAC3BC,WAAWA;EACT;AACJ;AACA;EACaC,UAAsB;EAE/B;AACJ;AACA;EACaC,KAAc;EAEvB;AACJ;AACA;EACaC,SAAkB;EAE3B;AACJ;AACA;EACaC,QAAiB;EAE1B;AACJ;AACA;EACaC,aAAsB;EAE/B;AACJ;AACA;EACaC,SAAkB;EAE3B;AACJ;AACA;EACaC,UAAmB;EAE5B;AACJ;AACA;AACA;EACaC,MAAgB,EACzB;IAAA,KArCSP,UAAsB,GAAtBA,UAAsB;IAAA,KAKtBC,KAAc,GAAdA,KAAc;IAAA,KAKdC,SAAkB,GAAlBA,SAAkB;IAAA,KAKlBC,QAAiB,GAAjBA,QAAiB;IAAA,KAKjBC,aAAsB,GAAtBA,aAAsB;IAAA,KAKtBC,SAAkB,GAAlBA,SAAkB;IAAA,KAKlBC,UAAmB,GAAnBA,UAAmB;IAAA,KAMnBC,MAAgB,GAAhBA,MAAgB;EACxB;EAEH,OAAOC,UAAUA,CAACC,MAA6B,EAAEC,uBAAgC,EAAEJ,UAAmB,EAAE;IACtG,MAAMK,MAAkB,GAAG;MACzBC,gBAAgB,EAAE,CAAC,CAACH,MAAM,CAACI,QAAQ;MACnCH;IACF,CAAC;IACD,OAAO,IAAIZ,eAAe,CACxBa,MAAM,EACN,CAAC,CAACF,MAAM,CAACK,YAAY,EACrB,CAAC,CAACL,MAAM,CAACM,OAAO,EAChB,CAAC,CAACN,MAAM,CAACO,MAAM,EACf,CAACP,MAAM,CAACQ,QAAQ,EAChB,CAACR,MAAM,CAACS,gBAAgB,EACxBZ,UACF,CAAC;EACH;AACF;AAACa,OAAA,CAAArB,eAAA,GAAAA,eAAA"}
|
package/dist/workspace.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { ComponentConfigFile } from './component-config-file';
|
|
|
30
30
|
import { OnComponentAdd, OnComponentChange, OnComponentEventResult, OnComponentLoad, OnComponentRemove } from './on-component-events';
|
|
31
31
|
import { WorkspaceExtConfig } from './types';
|
|
32
32
|
import { ComponentStatus } from './workspace-component/component-status';
|
|
33
|
-
import { OnAspectsResolve, OnAspectsResolveSlot, OnBitmapChange, OnBitmapChangeSlot, OnComponentAddSlot, OnComponentChangeSlot, OnComponentLoadSlot, OnComponentRemoveSlot, OnRootAspectAdded, OnRootAspectAddedSlot } from './workspace.
|
|
33
|
+
import { OnAspectsResolve, OnAspectsResolveSlot, OnBitmapChange, OnBitmapChangeSlot, OnWorkspaceConfigChange, OnWorkspaceConfigChangeSlot, OnComponentAddSlot, OnComponentChangeSlot, OnComponentLoadSlot, OnComponentRemoveSlot, OnRootAspectAdded, OnRootAspectAddedSlot } from './workspace.main.runtime';
|
|
34
34
|
import { ComponentLoadOptions, WorkspaceComponentLoader } from './workspace-component/workspace-component-loader';
|
|
35
35
|
import { ShouldLoadFunc } from './build-graph-from-fs';
|
|
36
36
|
import { BitMap } from './bit-map';
|
|
@@ -39,6 +39,7 @@ import { AspectPackage, GetConfiguredUserAspectsPackagesOptions, WorkspaceAspect
|
|
|
39
39
|
import { MergeConflictFile } from './merge-conflict-file';
|
|
40
40
|
import { CompFiles } from './workspace-component/comp-files';
|
|
41
41
|
import { Filter } from './filter';
|
|
42
|
+
import { ComponentStatusLegacy, ComponentStatusResult } from './workspace-component/component-status-loader';
|
|
42
43
|
export type EjectConfResult = {
|
|
43
44
|
configPath: string;
|
|
44
45
|
};
|
|
@@ -106,11 +107,13 @@ export declare class Workspace implements ComponentFactory {
|
|
|
106
107
|
private onRootAspectAddedSlot;
|
|
107
108
|
private graphql;
|
|
108
109
|
private onBitmapChangeSlot;
|
|
110
|
+
private onWorkspaceConfigChangeSlot;
|
|
109
111
|
private warnedAboutMisconfiguredEnvs;
|
|
110
112
|
priority: boolean;
|
|
111
113
|
owner?: string;
|
|
112
114
|
componentsScopeDirsMap: ComponentScopeDirMap;
|
|
113
115
|
componentLoader: WorkspaceComponentLoader;
|
|
116
|
+
private componentStatusLoader;
|
|
114
117
|
bitMap: BitMap;
|
|
115
118
|
/**
|
|
116
119
|
* Indicate that we are now running installation process
|
|
@@ -160,7 +163,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
160
163
|
/**
|
|
161
164
|
* on component add slot.
|
|
162
165
|
*/
|
|
163
|
-
onComponentAddSlot: OnComponentAddSlot, onComponentRemoveSlot: OnComponentRemoveSlot, onAspectsResolveSlot: OnAspectsResolveSlot, onRootAspectAddedSlot: OnRootAspectAddedSlot, graphql: GraphqlMain, onBitmapChangeSlot: OnBitmapChangeSlot);
|
|
166
|
+
onComponentAddSlot: OnComponentAddSlot, onComponentRemoveSlot: OnComponentRemoveSlot, onAspectsResolveSlot: OnAspectsResolveSlot, onRootAspectAddedSlot: OnRootAspectAddedSlot, graphql: GraphqlMain, onBitmapChangeSlot: OnBitmapChangeSlot, onWorkspaceConfigChangeSlot: OnWorkspaceConfigChangeSlot);
|
|
164
167
|
private validateConfig;
|
|
165
168
|
/**
|
|
166
169
|
* root path of the Workspace.
|
|
@@ -174,6 +177,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
174
177
|
registerOnComponentAdd(onComponentAddFunc: OnComponentAdd): this;
|
|
175
178
|
registerOnComponentRemove(onComponentRemoveFunc: OnComponentRemove): this;
|
|
176
179
|
registerOnBitmapChange(OnBitmapChangeFunc: OnBitmapChange): this;
|
|
180
|
+
registerOnWorkspaceConfigChange(onWorkspaceConfigChangeFunc: OnWorkspaceConfigChange): void;
|
|
177
181
|
registerOnAspectsResolve(onAspectsResolveFunc: OnAspectsResolve): this;
|
|
178
182
|
registerOnRootAspectAdded(onRootAspectAddedFunc: OnRootAspectAdded): this;
|
|
179
183
|
/**
|
|
@@ -182,6 +186,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
182
186
|
*/
|
|
183
187
|
get name(): string;
|
|
184
188
|
get icon(): string;
|
|
189
|
+
listAutoTagPendingComponentIds(): Promise<ComponentID[]>;
|
|
185
190
|
hasModifiedDependencies(component: Component): Promise<boolean>;
|
|
186
191
|
/**
|
|
187
192
|
* get Component issues
|
|
@@ -233,7 +238,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
233
238
|
/**
|
|
234
239
|
* list all modified components in the workspace.
|
|
235
240
|
*/
|
|
236
|
-
modified(): Promise<Component[]>;
|
|
241
|
+
modified(loadOpts?: ComponentLoadOptions): Promise<Component[]>;
|
|
237
242
|
/**
|
|
238
243
|
* list all new components in the workspace.
|
|
239
244
|
*/
|
|
@@ -287,8 +292,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
287
292
|
triggerOnComponentRemove(id: ComponentID): Promise<OnComponentEventResult[]>;
|
|
288
293
|
triggerOnBitmapChange(): Promise<void>;
|
|
289
294
|
/**
|
|
290
|
-
*
|
|
291
|
-
* currently, the purpose is to reload the workspace config when it changes, so entries like "defaultScope" are updated.
|
|
295
|
+
* the purpose is mostly to reload the workspace config when it changes, so entries like "defaultScope" are updated.
|
|
292
296
|
* it also updates the DependencyResolver config. I couldn't find a good way to update all aspects in workspace.jsonc.
|
|
293
297
|
*/
|
|
294
298
|
triggerOnWorkspaceConfigChange(): Promise<void>;
|
|
@@ -526,5 +530,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
526
530
|
getInjectedDirs(component: Component): Promise<string[]>;
|
|
527
531
|
getAutoDetectOverrides(configuredExtensions: ExtensionDataList, id: ComponentID, legacyFiles: SourceFile[]): Promise<import("@teambit/legacy/dist/consumer/config/component-overrides").DependenciesOverridesData>;
|
|
528
532
|
getAutoDetectConfigMerge(id: ComponentID): import("@teambit/legacy/dist/consumer/config/component-overrides").DependenciesOverridesData;
|
|
533
|
+
getManyComponentsStatuses(ids: ComponentID[]): Promise<ComponentStatusResult[]>;
|
|
534
|
+
getComponentStatusById(id: ComponentID): Promise<ComponentStatusLegacy>;
|
|
529
535
|
}
|
|
530
536
|
export default Workspace;
|
package/dist/workspace.js
CHANGED
|
@@ -319,6 +319,13 @@ function _filter() {
|
|
|
319
319
|
};
|
|
320
320
|
return data;
|
|
321
321
|
}
|
|
322
|
+
function _componentStatusLoader() {
|
|
323
|
+
const data = require("./workspace-component/component-status-loader");
|
|
324
|
+
_componentStatusLoader = function () {
|
|
325
|
+
return data;
|
|
326
|
+
};
|
|
327
|
+
return data;
|
|
328
|
+
}
|
|
322
329
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
323
330
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
324
331
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -367,7 +374,7 @@ class Workspace {
|
|
|
367
374
|
/**
|
|
368
375
|
* on component add slot.
|
|
369
376
|
*/
|
|
370
|
-
onComponentAddSlot, onComponentRemoveSlot, onAspectsResolveSlot, onRootAspectAddedSlot, graphql, onBitmapChangeSlot) {
|
|
377
|
+
onComponentAddSlot, onComponentRemoveSlot, onAspectsResolveSlot, onRootAspectAddedSlot, graphql, onBitmapChangeSlot, onWorkspaceConfigChangeSlot) {
|
|
371
378
|
this.pubsub = pubsub;
|
|
372
379
|
this.config = config;
|
|
373
380
|
this.consumer = consumer;
|
|
@@ -389,12 +396,14 @@ class Workspace {
|
|
|
389
396
|
this.onRootAspectAddedSlot = onRootAspectAddedSlot;
|
|
390
397
|
this.graphql = graphql;
|
|
391
398
|
this.onBitmapChangeSlot = onBitmapChangeSlot;
|
|
399
|
+
this.onWorkspaceConfigChangeSlot = onWorkspaceConfigChangeSlot;
|
|
392
400
|
_defineProperty(this, "warnedAboutMisconfiguredEnvs", []);
|
|
393
401
|
// cache env-ids that have been errored about not having "env" type
|
|
394
402
|
_defineProperty(this, "priority", true);
|
|
395
403
|
_defineProperty(this, "owner", void 0);
|
|
396
404
|
_defineProperty(this, "componentsScopeDirsMap", void 0);
|
|
397
405
|
_defineProperty(this, "componentLoader", void 0);
|
|
406
|
+
_defineProperty(this, "componentStatusLoader", void 0);
|
|
398
407
|
_defineProperty(this, "bitMap", void 0);
|
|
399
408
|
/**
|
|
400
409
|
* Indicate that we are now running installation process
|
|
@@ -427,6 +436,7 @@ class Workspace {
|
|
|
427
436
|
});
|
|
428
437
|
this.aspectsMerger = new (_aspectsMerger().AspectsMerger)(this, this.harmony);
|
|
429
438
|
this.filter = new (_filter().Filter)(this);
|
|
439
|
+
this.componentStatusLoader = new (_componentStatusLoader().ComponentStatusLoader)(this);
|
|
430
440
|
}
|
|
431
441
|
validateConfig() {
|
|
432
442
|
if (this.consumer.isLegacy) return;
|
|
@@ -470,6 +480,9 @@ class Workspace {
|
|
|
470
480
|
this.onBitmapChangeSlot.register(OnBitmapChangeFunc);
|
|
471
481
|
return this;
|
|
472
482
|
}
|
|
483
|
+
registerOnWorkspaceConfigChange(onWorkspaceConfigChangeFunc) {
|
|
484
|
+
this.onWorkspaceConfigChangeSlot.register(onWorkspaceConfigChangeFunc);
|
|
485
|
+
}
|
|
473
486
|
registerOnAspectsResolve(onAspectsResolveFunc) {
|
|
474
487
|
this.onAspectsResolveSlot.register(onAspectsResolveFunc);
|
|
475
488
|
return this;
|
|
@@ -491,10 +504,18 @@ class Workspace {
|
|
|
491
504
|
get icon() {
|
|
492
505
|
return this.config.icon;
|
|
493
506
|
}
|
|
494
|
-
async
|
|
507
|
+
async listAutoTagPendingComponentIds() {
|
|
495
508
|
const componentsList = new (_componentsList().default)(this.consumer);
|
|
496
|
-
const
|
|
497
|
-
const
|
|
509
|
+
const modifiedComponents = (await this.modified()).map(c => c.id);
|
|
510
|
+
const newComponents = await componentsList.listNewComponents();
|
|
511
|
+
if (!modifiedComponents || !modifiedComponents.length) return [];
|
|
512
|
+
const autoTagPending = await this.consumer.listComponentsForAutoTagging(_componentId().ComponentIdList.fromArray(modifiedComponents));
|
|
513
|
+
const comps = autoTagPending.filter(autoTagComp => !newComponents.has(autoTagComp.componentId));
|
|
514
|
+
return comps.map(c => c.id);
|
|
515
|
+
}
|
|
516
|
+
async hasModifiedDependencies(component) {
|
|
517
|
+
const listAutoTagPendingComponents = await this.listAutoTagPendingComponentIds();
|
|
518
|
+
const isAutoTag = listAutoTagPendingComponents.find(id => id.isEqualWithoutVersion(component.id));
|
|
498
519
|
if (isAutoTag) return true;
|
|
499
520
|
return false;
|
|
500
521
|
}
|
|
@@ -510,7 +531,7 @@ class Workspace {
|
|
|
510
531
|
* provides status of all components in the workspace.
|
|
511
532
|
*/
|
|
512
533
|
async getComponentStatus(component) {
|
|
513
|
-
const status = await this.
|
|
534
|
+
const status = await this.getComponentStatusById(component.id);
|
|
514
535
|
const hasModifiedDependencies = await this.hasModifiedDependencies(component);
|
|
515
536
|
return _componentStatus().ComponentStatus.fromLegacy(status, hasModifiedDependencies, component.isOutdated());
|
|
516
537
|
}
|
|
@@ -599,9 +620,11 @@ class Workspace {
|
|
|
599
620
|
/**
|
|
600
621
|
* list all modified components in the workspace.
|
|
601
622
|
*/
|
|
602
|
-
async modified() {
|
|
603
|
-
const
|
|
604
|
-
|
|
623
|
+
async modified(loadOpts) {
|
|
624
|
+
const {
|
|
625
|
+
components
|
|
626
|
+
} = await this.listWithInvalid(loadOpts);
|
|
627
|
+
const modifiedIncludeNulls = await (0, _pMapSeries().default)(components, async component => {
|
|
605
628
|
const modified = await this.isModified(component);
|
|
606
629
|
return modified ? component : null;
|
|
607
630
|
});
|
|
@@ -847,6 +870,7 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
|
|
|
847
870
|
this.logger.debug('clearing the workspace and scope caches');
|
|
848
871
|
delete this._cachedListIds;
|
|
849
872
|
this.componentLoader.clearCache();
|
|
873
|
+
this.componentStatusLoader.clearCache();
|
|
850
874
|
await this.scope.clearCache();
|
|
851
875
|
this.componentList = new (_componentsList().default)(this.consumer);
|
|
852
876
|
this.componentDefaultScopeFromComponentDirAndNameWithoutConfigFileMemoized.clear();
|
|
@@ -854,10 +878,12 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
|
|
|
854
878
|
clearAllComponentsCache() {
|
|
855
879
|
this.componentLoader.clearCache();
|
|
856
880
|
this.consumer.componentLoader.clearComponentsCache();
|
|
881
|
+
this.componentStatusLoader.clearCache();
|
|
857
882
|
this.componentList = new (_componentsList().default)(this.consumer);
|
|
858
883
|
}
|
|
859
884
|
clearComponentCache(id) {
|
|
860
885
|
this.componentLoader.clearComponentCache(id);
|
|
886
|
+
this.componentStatusLoader.clearOneComponentCache(id);
|
|
861
887
|
this.consumer.clearOneComponentCache(id);
|
|
862
888
|
this.componentList = new (_componentsList().default)(this.consumer);
|
|
863
889
|
}
|
|
@@ -937,8 +963,7 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
|
|
|
937
963
|
}
|
|
938
964
|
|
|
939
965
|
/**
|
|
940
|
-
*
|
|
941
|
-
* currently, the purpose is to reload the workspace config when it changes, so entries like "defaultScope" are updated.
|
|
966
|
+
* the purpose is mostly to reload the workspace config when it changes, so entries like "defaultScope" are updated.
|
|
942
967
|
* it also updates the DependencyResolver config. I couldn't find a good way to update all aspects in workspace.jsonc.
|
|
943
968
|
*/
|
|
944
969
|
async triggerOnWorkspaceConfigChange() {
|
|
@@ -953,6 +978,10 @@ it's possible that the version ${component.id.version} belong to ${idStr.split('
|
|
|
953
978
|
const configOfDepResolverAspect = workspaceConfig.extensions.findExtension(_dependencyResolver().DependencyResolverAspect.id);
|
|
954
979
|
if (configOfDepResolverAspect) this.dependencyResolver.setConfig(configOfDepResolverAspect.config);
|
|
955
980
|
this.dependencyResolver.clearCache();
|
|
981
|
+
const onWorkspaceConfigChangeEntries = this.onWorkspaceConfigChangeSlot.toArray(); // e.g. [ [ 'teambit.bit/compiler', [Function: bound onComponentChange] ] ]
|
|
982
|
+
await (0, _pMapSeries().default)(onWorkspaceConfigChangeEntries, async ([, onWorkspaceConfigFunc]) => {
|
|
983
|
+
await onWorkspaceConfigFunc();
|
|
984
|
+
});
|
|
956
985
|
}
|
|
957
986
|
getState(id, hash) {
|
|
958
987
|
return this.scope.getState(id, hash);
|
|
@@ -1407,7 +1436,7 @@ the following envs are used in this workspace: ${availableEnvs.join(', ')}`);
|
|
|
1407
1436
|
}
|
|
1408
1437
|
const consumerComp = component.state._consumer;
|
|
1409
1438
|
if (typeof consumerComp._isModified === 'boolean') return consumerComp._isModified;
|
|
1410
|
-
const componentStatus = await this.
|
|
1439
|
+
const componentStatus = await this.getComponentStatusById(component.id);
|
|
1411
1440
|
return componentStatus.modified === true;
|
|
1412
1441
|
}
|
|
1413
1442
|
async isModifiedOrNew(component) {
|
|
@@ -1995,6 +2024,12 @@ the following envs are used in this workspace: ${availableEnvs.join(', ')}`);
|
|
|
1995
2024
|
}
|
|
1996
2025
|
return undefined;
|
|
1997
2026
|
}
|
|
2027
|
+
async getManyComponentsStatuses(ids) {
|
|
2028
|
+
return this.componentStatusLoader.getManyComponentsStatuses(ids);
|
|
2029
|
+
}
|
|
2030
|
+
async getComponentStatusById(id) {
|
|
2031
|
+
return this.componentStatusLoader.getComponentStatusById(id);
|
|
2032
|
+
}
|
|
1998
2033
|
}
|
|
1999
2034
|
|
|
2000
2035
|
/**
|