@teambit/workspace 0.0.825 → 0.0.828
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.js +3 -11
- package/dist/build-graph-from-fs.js.map +1 -1
- package/dist/ui/workspace/use-workspace.d.ts +3 -3
- package/dist/workspace.provider.js +0 -19
- package/dist/workspace.provider.js.map +1 -1
- package/package-tar/teambit-workspace-0.0.828.tgz +0 -0
- package/package.json +32 -32
- package/{preview-1661284518387.js → preview-1661553386796.js} +2 -2
- package/package-tar/teambit-workspace-0.0.825.tgz +0 -0
|
@@ -237,17 +237,9 @@ class GraphFromFsBuilder {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
async loadComponent(componentId) {
|
|
240
|
-
const
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
if (isOnWorkspace) {
|
|
244
|
-
return this.consumer.loadComponent(componentId);
|
|
245
|
-
} // a dependency might have been installed as a package in the workspace, and as such doesn't
|
|
246
|
-
// have a componentMap.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
const componentFromModel = await this.consumer.loadComponentFromModel(componentId);
|
|
250
|
-
return componentFromModel.clone();
|
|
240
|
+
const compId = await this.workspace.resolveComponentId(componentId);
|
|
241
|
+
const comp = await this.workspace.get(compId);
|
|
242
|
+
return comp.state._consumer;
|
|
251
243
|
}
|
|
252
244
|
|
|
253
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["GraphFromFsBuilder","constructor","workspace","logger","ignoreIds","BitIds","shouldLoadItsDeps","LegacyGraph","consumer","buildGraph","ids","debug","length","start","Date","now","components","loadManyComponents","processManyComponents","graph","getAllDepsUnfiltered","component","getAllDependenciesIds","difference","getAllDepsFiltered","depsWithoutIgnore","shouldLoadFunc","deps","mapSeries","depId","shouldLoad","push","fromArray","compact","depth","importObjects","allDependencies","processOneComponent","allDependenciesFlattened","flatten","allDeps","map","c","flat","allDepsWithScope","filter","dep","hasScope","scopeComponentsImporter","ScopeComponentsImporter","scope","importMany","uniqFromArray","throwForDependencyNotFound","shouldThrowOnMissingDep","idStr","id","toString","completed","includes","allIds","Object","entries","depsIdsGroupedByType","forEach","depType","depsIds","has","hasNode","Error","setEdge","componentsIds","dependenciesOf","comp","fromGraph","node","loadComponent","setNode","err","ComponentNotFound","BitError","error","componentId","componentMap","bitMap","getComponentIfExist","isOnWorkspace","Boolean","componentFromModel","loadComponentFromModel","clone"],"sources":["build-graph-from-fs.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { flatten } from 'lodash';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport BitIds from '@teambit/legacy/dist/bit-id/bit-ids';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport LegacyGraph from '@teambit/legacy/dist/scope/graph/graph';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport compact from 'lodash.compact';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { Logger } from '@teambit/logger';\nimport { ComponentNotFound } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Workspace } from './workspace';\n\nexport type ShouldLoadFunc = (bitId: BitId) => Promise<boolean>;\n\nexport class GraphFromFsBuilder {\n private graph = new LegacyGraph();\n private completed: string[] = [];\n private depth = 1;\n private shouldThrowOnMissingDep = true;\n private consumer: Consumer;\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private ignoreIds = new BitIds(),\n private shouldLoadItsDeps?: ShouldLoadFunc\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n /**\n * create a graph with all dependencies and flattened dependencies of the given components.\n * the nodes are components and the edges has a label of the dependency type.\n *\n * the way how it is done is iterations by depths. each depth we gather all the dependencies of\n * that depths, make sure all objects exist and then check their dependencies for the next depth.\n * once there is no dependency left, we're on the last depth level and the graph is ready.\n *\n * for example, imagine the following graph:\n * A1 -> A2 -> A3\n * B1 -> B2 -> B3\n * C1 -> C2 -> C3\n *\n * where the buildGraph is given [A1, B1, C1].\n * first, it saves all these components as nodes in the graph. then, it finds the dependencies of\n * the next level, in this case they're [A2, B2, C2]. it runs `importMany` in case some objects\n * are missing. then, it loads them all (some from FS, some from the model) and sets the edges\n * between the component and the dependencies.\n * once done, it finds all their dependencies, which are [A3, B3, C3] and repeat the process\n * above. since there are no more dependencies, the graph is completed.\n * in this case, the total depth levels are 3.\n *\n * even with a huge project, there are not many depth levels. by iterating through depth levels\n * we keep performance sane as the importMany doesn't run multiple time and therefore the round\n * trips to the remotes are minimal.\n *\n * normally, one importMany of the seeders is enough as importMany knows to fetch all flattened.\n * however, since this buildGraph is performed on the workspace, a dependency may be new or\n * modified and as such, we don't know its flattened yet.\n */\n async buildGraph(ids: BitId[]): Promise<LegacyGraph> {\n this.logger.debug(`GraphFromFsBuilder, buildGraph with ${ids.length} seeders`);\n const start = Date.now();\n const components = await this.loadManyComponents(ids, '<none>');\n await this.processManyComponents(components);\n this.logger.debug(\n `GraphFromFsBuilder, buildGraph with ${ids.length} seeders completed (${(Date.now() - start) / 1000} sec)`\n );\n return this.graph;\n }\n\n private getAllDepsUnfiltered(component: Component) {\n return component.getAllDependenciesIds().difference(this.ignoreIds);\n }\n\n private async getAllDepsFiltered(component: Component): Promise<BitIds> {\n const depsWithoutIgnore = this.getAllDepsUnfiltered(component);\n const shouldLoadFunc = this.shouldLoadItsDeps;\n if (!shouldLoadFunc) return depsWithoutIgnore;\n const deps = await mapSeries(depsWithoutIgnore, async (depId) => {\n const shouldLoad = await shouldLoadFunc(depId);\n if (!shouldLoad) this.ignoreIds.push(depId);\n return shouldLoad ? depId : null;\n });\n return BitIds.fromArray(compact(deps));\n }\n\n private async processManyComponents(components: Component[]) {\n this.logger.debug(`GraphFromFsBuilder.processManyComponents depth ${this.depth}, ${components.length} components`);\n this.depth += 1;\n await this.importObjects(components);\n const allDependencies = await mapSeries(components, (component) => this.processOneComponent(component));\n const allDependenciesFlattened = flatten(allDependencies);\n if (allDependenciesFlattened.length) await this.processManyComponents(allDependenciesFlattened);\n }\n\n private async importObjects(components: Component[]) {\n const allDeps = components.map((c) => this.getAllDepsUnfiltered(c)).flat();\n const allDepsWithScope = allDeps.filter((dep) => dep.hasScope());\n const scopeComponentsImporter = new ScopeComponentsImporter(this.consumer.scope);\n await scopeComponentsImporter.importMany({\n ids: BitIds.uniqFromArray(allDepsWithScope),\n throwForDependencyNotFound: this.shouldThrowOnMissingDep,\n });\n }\n\n private async processOneComponent(component: Component) {\n const idStr = component.id.toString();\n if (this.completed.includes(idStr)) return [];\n const allIds = await this.getAllDepsFiltered(component);\n\n const allDependencies = await this.loadManyComponents(allIds, idStr);\n Object.entries(component.depsIdsGroupedByType).forEach(([depType, depsIds]) => {\n depsIds.forEach((depId) => {\n if (this.ignoreIds.has(depId)) return;\n if (!this.graph.hasNode(depId.toString())) {\n throw new Error(`buildOneComponent: missing node of ${depId.toString()}`);\n }\n this.graph.setEdge(idStr, depId.toString(), depType);\n });\n });\n this.completed.push(idStr);\n return allDependencies;\n }\n\n private async loadManyComponents(componentsIds: BitId[], dependenciesOf: string): Promise<Component[]> {\n const components = await mapSeries(componentsIds, async (comp: BitId) => {\n const idStr = comp.toString();\n const fromGraph = this.graph.node(idStr);\n if (fromGraph) return fromGraph;\n try {\n const component = await this.loadComponent(comp);\n this.graph.setNode(idStr, component);\n return component;\n } catch (err: any) {\n if (err instanceof ComponentNotFound) {\n throw new BitError(\n `error: component \"${idStr}\" was not found.\\nthis component is a dependency of \"${dependenciesOf}\" and is needed as part of the graph generation`\n );\n }\n this.logger.error(`failed loading dependencies of ${dependenciesOf}`);\n throw err;\n }\n });\n return components;\n }\n private async loadComponent(componentId: BitId): Promise<Component> {\n const componentMap = this.consumer.bitMap.getComponentIfExist(componentId);\n const isOnWorkspace = Boolean(componentMap);\n if (isOnWorkspace) {\n return this.consumer.loadComponent(componentId);\n }\n // a dependency might have been installed as a package in the workspace, and as such doesn't\n // have a componentMap.\n const componentFromModel = await this.consumer.loadCom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UAAP;EACD;;EAC0B,MAAb4D,aAAa,CAACM,WAAD,EAAyC;IAClE,MAAMC,YAAY,GAAG,KAAK3E,QAAL,CAAc4E,MAAd,CAAqBC,mBAArB,CAAyCH,WAAzC,CAArB;IACA,MAAMI,aAAa,GAAGC,OAAO,CAACJ,YAAD,CAA7B;;IACA,IAAIG,aAAJ,EAAmB;MACjB,OAAO,KAAK9E,QAAL,CAAcoE,aAAd,CAA4BM,WAA5B,CAAP;IACD,CALiE,CAMlE;IACA;;;IACA,MAAMM,kBAAkB,GAAG,MAAM,KAAKhF,QAAL,CAAciF,sBAAd,CAAqCP,WAArC,CAAjC;IACA,OAAOM,kBAAkB,CAACE,KAAnB,EAAP;EACD;;AA7I6B"}
|
|
1
|
+
{"version":3,"names":["GraphFromFsBuilder","constructor","workspace","logger","ignoreIds","BitIds","shouldLoadItsDeps","LegacyGraph","consumer","buildGraph","ids","debug","length","start","Date","now","components","loadManyComponents","processManyComponents","graph","getAllDepsUnfiltered","component","getAllDependenciesIds","difference","getAllDepsFiltered","depsWithoutIgnore","shouldLoadFunc","deps","mapSeries","depId","shouldLoad","push","fromArray","compact","depth","importObjects","allDependencies","processOneComponent","allDependenciesFlattened","flatten","allDeps","map","c","flat","allDepsWithScope","filter","dep","hasScope","scopeComponentsImporter","ScopeComponentsImporter","scope","importMany","uniqFromArray","throwForDependencyNotFound","shouldThrowOnMissingDep","idStr","id","toString","completed","includes","allIds","Object","entries","depsIdsGroupedByType","forEach","depType","depsIds","has","hasNode","Error","setEdge","componentsIds","dependenciesOf","comp","fromGraph","node","loadComponent","setNode","err","ComponentNotFound","BitError","error","componentId","compId","resolveComponentId","get","state","_consumer"],"sources":["build-graph-from-fs.ts"],"sourcesContent":["import mapSeries from 'p-map-series';\nimport { flatten } from 'lodash';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport BitIds from '@teambit/legacy/dist/bit-id/bit-ids';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport LegacyGraph from '@teambit/legacy/dist/scope/graph/graph';\nimport ScopeComponentsImporter from '@teambit/legacy/dist/scope/component-ops/scope-components-importer';\nimport compact from 'lodash.compact';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { Logger } from '@teambit/logger';\nimport { ComponentNotFound } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Workspace } from './workspace';\n\nexport type ShouldLoadFunc = (bitId: BitId) => Promise<boolean>;\n\nexport class GraphFromFsBuilder {\n private graph = new LegacyGraph();\n private completed: string[] = [];\n private depth = 1;\n private shouldThrowOnMissingDep = true;\n private consumer: Consumer;\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private ignoreIds = new BitIds(),\n private shouldLoadItsDeps?: ShouldLoadFunc\n ) {\n this.consumer = this.workspace.consumer;\n }\n\n /**\n * create a graph with all dependencies and flattened dependencies of the given components.\n * the nodes are components and the edges has a label of the dependency type.\n *\n * the way how it is done is iterations by depths. each depth we gather all the dependencies of\n * that depths, make sure all objects exist and then check their dependencies for the next depth.\n * once there is no dependency left, we're on the last depth level and the graph is ready.\n *\n * for example, imagine the following graph:\n * A1 -> A2 -> A3\n * B1 -> B2 -> B3\n * C1 -> C2 -> C3\n *\n * where the buildGraph is given [A1, B1, C1].\n * first, it saves all these components as nodes in the graph. then, it finds the dependencies of\n * the next level, in this case they're [A2, B2, C2]. it runs `importMany` in case some objects\n * are missing. then, it loads them all (some from FS, some from the model) and sets the edges\n * between the component and the dependencies.\n * once done, it finds all their dependencies, which are [A3, B3, C3] and repeat the process\n * above. since there are no more dependencies, the graph is completed.\n * in this case, the total depth levels are 3.\n *\n * even with a huge project, there are not many depth levels. by iterating through depth levels\n * we keep performance sane as the importMany doesn't run multiple time and therefore the round\n * trips to the remotes are minimal.\n *\n * normally, one importMany of the seeders is enough as importMany knows to fetch all flattened.\n * however, since this buildGraph is performed on the workspace, a dependency may be new or\n * modified and as such, we don't know its flattened yet.\n */\n async buildGraph(ids: BitId[]): Promise<LegacyGraph> {\n this.logger.debug(`GraphFromFsBuilder, buildGraph with ${ids.length} seeders`);\n const start = Date.now();\n const components = await this.loadManyComponents(ids, '<none>');\n await this.processManyComponents(components);\n this.logger.debug(\n `GraphFromFsBuilder, buildGraph with ${ids.length} seeders completed (${(Date.now() - start) / 1000} sec)`\n );\n return this.graph;\n }\n\n private getAllDepsUnfiltered(component: Component) {\n return component.getAllDependenciesIds().difference(this.ignoreIds);\n }\n\n private async getAllDepsFiltered(component: Component): Promise<BitIds> {\n const depsWithoutIgnore = this.getAllDepsUnfiltered(component);\n const shouldLoadFunc = this.shouldLoadItsDeps;\n if (!shouldLoadFunc) return depsWithoutIgnore;\n const deps = await mapSeries(depsWithoutIgnore, async (depId) => {\n const shouldLoad = await shouldLoadFunc(depId);\n if (!shouldLoad) this.ignoreIds.push(depId);\n return shouldLoad ? depId : null;\n });\n return BitIds.fromArray(compact(deps));\n }\n\n private async processManyComponents(components: Component[]) {\n this.logger.debug(`GraphFromFsBuilder.processManyComponents depth ${this.depth}, ${components.length} components`);\n this.depth += 1;\n await this.importObjects(components);\n const allDependencies = await mapSeries(components, (component) => this.processOneComponent(component));\n const allDependenciesFlattened = flatten(allDependencies);\n if (allDependenciesFlattened.length) await this.processManyComponents(allDependenciesFlattened);\n }\n\n private async importObjects(components: Component[]) {\n const allDeps = components.map((c) => this.getAllDepsUnfiltered(c)).flat();\n const allDepsWithScope = allDeps.filter((dep) => dep.hasScope());\n const scopeComponentsImporter = new ScopeComponentsImporter(this.consumer.scope);\n await scopeComponentsImporter.importMany({\n ids: BitIds.uniqFromArray(allDepsWithScope),\n throwForDependencyNotFound: this.shouldThrowOnMissingDep,\n });\n }\n\n private async processOneComponent(component: Component) {\n const idStr = component.id.toString();\n if (this.completed.includes(idStr)) return [];\n const allIds = await this.getAllDepsFiltered(component);\n\n const allDependencies = await this.loadManyComponents(allIds, idStr);\n Object.entries(component.depsIdsGroupedByType).forEach(([depType, depsIds]) => {\n depsIds.forEach((depId) => {\n if (this.ignoreIds.has(depId)) return;\n if (!this.graph.hasNode(depId.toString())) {\n throw new Error(`buildOneComponent: missing node of ${depId.toString()}`);\n }\n this.graph.setEdge(idStr, depId.toString(), depType);\n });\n });\n this.completed.push(idStr);\n return allDependencies;\n }\n\n private async loadManyComponents(componentsIds: BitId[], dependenciesOf: string): Promise<Component[]> {\n const components = await mapSeries(componentsIds, async (comp: BitId) => {\n const idStr = comp.toString();\n const fromGraph = this.graph.node(idStr);\n if (fromGraph) return fromGraph;\n try {\n const component = await this.loadComponent(comp);\n this.graph.setNode(idStr, component);\n return component;\n } catch (err: any) {\n if (err instanceof ComponentNotFound) {\n throw new BitError(\n `error: component \"${idStr}\" was not found.\\nthis component is a dependency of \"${dependenciesOf}\" and is needed as part of the graph generation`\n );\n }\n this.logger.error(`failed loading dependencies of ${dependenciesOf}`);\n throw err;\n }\n });\n return components;\n }\n private async loadComponent(componentId: BitId): Promise<Component> {\n const compId = await this.workspace.resolveComponentId(componentId);\n const comp = await this.workspace.get(compId);\n return comp.state._consumer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKO,MAAMA,kBAAN,CAAyB;EAM9BC,WAAW,CACDC,SADC,EAEDC,MAFC,EAGDC,SAAS,GAAG,KAAIC,iBAAJ,GAHX,EAIDC,iBAJC,EAKT;IAAA,KAJQJ,SAIR,GAJQA,SAIR;IAAA,KAHQC,MAGR,GAHQA,MAGR;IA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,CAAChB,QAAL,EAAd;MACA,MAAMiB,SAAS,GAAG,KAAKvD,KAAL,CAAWwD,IAAX,CAAgBpB,KAAhB,CAAlB;MACA,IAAImB,SAAJ,EAAe,OAAOA,SAAP;;MACf,IAAI;QACF,MAAMrD,SAAS,GAAG,MAAM,KAAKuD,aAAL,CAAmBH,IAAnB,CAAxB;QACA,KAAKtD,KAAL,CAAW0D,OAAX,CAAmBtB,KAAnB,EAA0BlC,SAA1B;QACA,OAAOA,SAAP;MACD,CAJD,CAIE,OAAOyD,GAAP,EAAiB;QACjB,IAAIA,GAAG,YAAYC,0BAAnB,EAAsC;UACpC,MAAM,KAAIC,oBAAJ,EACH,qBAAoBzB,KAAM,wDAAuDiB,cAAe,iDAD7F,CAAN;QAGD;;QACD,KAAKrE,MAAL,CAAY8E,KAAZ,CAAmB,kCAAiCT,cAAe,EAAnE;QACA,MAAMM,GAAN;MACD;IACF,CAjBwB,CAAzB;IAkBA,OAAO9D,UAAP;EACD;;EAC0B,MAAb4D,aAAa,CAACM,WAAD,EAAyC;IAClE,MAAMC,MAAM,GAAG,MAAM,KAAKjF,SAAL,CAAekF,kBAAf,CAAkCF,WAAlC,CAArB;IACA,MAAMT,IAAI,GAAG,MAAM,KAAKvE,SAAL,CAAemF,GAAf,CAAmBF,MAAnB,CAAnB;IACA,OAAOV,IAAI,CAACa,KAAL,CAAWC,SAAlB;EACD;;AAvI6B"}
|
|
@@ -13,14 +13,14 @@ export declare function useWorkspace(options?: UseWorkspaceOptions): {
|
|
|
13
13
|
loading: boolean;
|
|
14
14
|
networkStatus: import("@apollo/client").NetworkStatus;
|
|
15
15
|
called: true;
|
|
16
|
+
variables: import("@apollo/client").OperationVariables | undefined;
|
|
16
17
|
startPolling: (pollInterval: number) => void;
|
|
17
18
|
stopPolling: () => void;
|
|
18
19
|
updateQuery: <TVars = import("@apollo/client").OperationVariables>(mapFn: (previousQueryResult: any, options: Pick<import("@apollo/client").WatchQueryOptions<TVars, any>, "variables">) => any) => void;
|
|
19
20
|
refetch: (variables?: Partial<import("@apollo/client").OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<any>>;
|
|
20
|
-
|
|
21
|
-
fetchMore: (<K extends string>(fetchMoreOptions: import("@apollo/client").FetchMoreQueryOptions<import("@apollo/client").OperationVariables, K, any> & import("@apollo/client").FetchMoreOptions<any, import("@apollo/client").OperationVariables>) => Promise<import("@apollo/client").ApolloQueryResult<any>>) & (<TData2, TVariables2, K_1 extends keyof TVariables2>(fetchMoreOptions: {
|
|
21
|
+
fetchMore: ((fetchMoreOptions: import("@apollo/client").FetchMoreQueryOptions<import("@apollo/client").OperationVariables, any> & import("@apollo/client").FetchMoreOptions<any, import("@apollo/client").OperationVariables>) => Promise<import("@apollo/client").ApolloQueryResult<any>>) & (<TData2, TVariables2>(fetchMoreOptions: {
|
|
22
22
|
query?: import("@apollo/client").DocumentNode | import("@graphql-typed-document-node/core").TypedDocumentNode<any, import("@apollo/client").OperationVariables> | undefined;
|
|
23
|
-
} & import("@apollo/client").FetchMoreQueryOptions<TVariables2,
|
|
23
|
+
} & import("@apollo/client").FetchMoreQueryOptions<TVariables2, any> & import("@apollo/client").FetchMoreOptions<TData2, TVariables2>) => Promise<import("@apollo/client").ApolloQueryResult<TData2>>);
|
|
24
24
|
workspace: Workspace | undefined;
|
|
25
25
|
subscribeToMore: <TSubscriptionData = any, TSubscriptionVariables = import("@apollo/client").OperationVariables>(options: import("@apollo/client").SubscribeToMoreOptions<any, TSubscriptionVariables, TSubscriptionData>) => () => void;
|
|
26
26
|
};
|
|
@@ -31,16 +31,6 @@ function _component() {
|
|
|
31
31
|
return data;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function _consumer2() {
|
|
35
|
-
const data = require("@teambit/legacy/dist/api/consumer");
|
|
36
|
-
|
|
37
|
-
_consumer2 = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
34
|
function _manyComponentsWriter() {
|
|
45
35
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/consumer/component-ops/many-components-writer"));
|
|
46
36
|
|
|
@@ -318,16 +308,7 @@ async function provideWorkspace([pubsub, cli, scope, component, isolator, depend
|
|
|
318
308
|
extensions: _extensionData().ExtensionDataList.fromArray(extensionsWithLegacyIds)
|
|
319
309
|
};
|
|
320
310
|
});
|
|
321
|
-
/**
|
|
322
|
-
* Add default scope from harmony during export.
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
311
|
|
|
326
|
-
(0, _consumer2().registerDefaultScopeGetter)(async id => {
|
|
327
|
-
const componentId = await workspace.resolveComponentId(id);
|
|
328
|
-
const defaultScope = await workspace.componentDefaultScope(componentId);
|
|
329
|
-
return defaultScope;
|
|
330
|
-
});
|
|
331
312
|
const workspaceSchema = (0, _workspace2().default)(workspace, graphql);
|
|
332
313
|
ui.registerUiRoot(new (_workspace3().WorkspaceUIRoot)(workspace, bundler));
|
|
333
314
|
graphql.register(workspaceSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["provideWorkspace","pubsub","cli","scope","component","isolator","dependencyResolver","variants","loggerExt","graphql","ui","bundler","aspectLoader","envs","community","config","onComponentLoadSlot","onComponentChangeSlot","onComponentAddSlot","onComponentRemoveSlot","onPreWatchSlot","harmony","bitConfig","get","consumer","getConsumer","cwd","undefined","logger","createLogger","EXT_NAME","workspace","Workspace","getWorkspacePolicyFromPackageJson","packageJson","packageJsonObject","policyFromPackageJson","registerRootPolicy","ManyComponentsWriter","registerExternalInstaller","install","installOpts","dedupe","updateExisting","import","onCacheClear","push","clearCache","LegacyComponentLoader","registerOnComponentLoadSubscriber","legacyComponent","opts","id","resolveComponentId","newComponent","state","_consumer","ConsumerComponent","registerOnComponentConfigLoading","componentId","componentFromScope","extensions","componentExtensions","defaultScope","componentDefaultScope","extensionsWithLegacyIdsP","map","extension","legacyEntry","clone","extensionId","compId","_legacy","newExtensionId","extensionsWithLegacyIds","Promise","all","ExtensionDataList","fromArray","registerDefaultScopeGetter","workspaceSchema","getWorkspaceSchema","registerUiRoot","WorkspaceUIRoot","register","capsuleCmd","CapsuleCmd","commands","CapsuleListCmd","CapsuleCreateCmd","CapsuleDeleteCmd","InstallCmd","UpdateCmd","UninstallCmd","EjectConfCmd","watcher","Watcher","WatchCommand","LinkCommand","getDocsDomain","UseCmd","PatternCommand","registerHost","registerOnStart","importCurrentLaneIfMissing","loadAspects","getNotLoadedConfiguredExtensions","envsCommand","getCommand","EnvsSetCmd","EnvsUnsetCmd","EnvsReplaceCmd","scopeCommand","ScopeSetCmd","path","loadConsumerIfExist"],"sources":["workspace.provider.ts"],"sourcesContent":["import { PubsubMain } from '@teambit/pubsub';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport { BundlerMain } from '@teambit/bundler';\nimport { CLIMain, CommandList } from '@teambit/cli';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { EnvsMain } from '@teambit/envs';\nimport { GraphqlMain } from '@teambit/graphql';\nimport { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { IsolatorMain } from '@teambit/isolator';\nimport { LoggerMain } from '@teambit/logger';\nimport type { ScopeMain } from '@teambit/scope';\nimport { UiMain } from '@teambit/ui';\nimport type { VariantsMain } from '@teambit/variants';\nimport { Consumer, loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport { registerDefaultScopeGetter } from '@teambit/legacy/dist/api/consumer';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport ManyComponentsWriter from '@teambit/legacy/dist/consumer/component-ops/many-components-writer';\nimport LegacyComponentLoader from '@teambit/legacy/dist/consumer/component/component-loader';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';\nimport { CommunityMain } from '@teambit/community';\nimport { EXT_NAME } from './constants';\nimport EjectConfCmd from './eject-conf.cmd';\nimport InstallCmd from './install.cmd';\nimport UninstallCmd from './uninstall.cmd';\nimport UpdateCmd from './update.cmd';\nimport { OnComponentLoad, OnComponentAdd, OnComponentChange, OnComponentRemove } from './on-component-events';\nimport { WorkspaceExtConfig } from './types';\nimport { WatchCommand } from './watch/watch.cmd';\nimport { LinkCommand } from './link';\nimport { Watcher, WatchOptions } from './watch/watcher';\nimport { Workspace, WorkspaceInstallOptions } from './workspace';\nimport getWorkspaceSchema from './workspace.graphql';\nimport { WorkspaceUIRoot } from './workspace.ui-root';\nimport { CapsuleCmd, CapsuleCreateCmd, CapsuleDeleteCmd, CapsuleListCmd } from './capsule.cmd';\nimport { EnvsSetCmd } from './envs-subcommands/envs-set.cmd';\nimport { EnvsUnsetCmd } from './envs-subcommands/envs-unset.cmd';\nimport { PatternCommand } from './pattern.cmd';\nimport { EnvsReplaceCmd } from './envs-subcommands/envs-replace.cmd';\nimport { ScopeSetCmd } from './scope-subcommands/scope-set.cmd';\nimport { UseCmd } from './use.cmd';\n\nexport type WorkspaceDeps = [\n PubsubMain,\n CLIMain,\n ScopeMain,\n ComponentMain,\n IsolatorMain,\n DependencyResolverMain,\n VariantsMain,\n LoggerMain,\n GraphqlMain,\n UiMain,\n BundlerMain,\n AspectLoaderMain,\n EnvsMain,\n CommunityMain\n];\n\nexport type OnComponentLoadSlot = SlotRegistry<OnComponentLoad>;\n\nexport type OnComponentChangeSlot = SlotRegistry<OnComponentChange>;\n\nexport type OnComponentAddSlot = SlotRegistry<OnComponentAdd>;\n\nexport type OnComponentRemoveSlot = SlotRegistry<OnComponentRemove>;\n\nexport type OnPreWatch = (components: Component[], watchOpts: WatchOptions) => Promise<void>;\nexport type OnPreWatchSlot = SlotRegistry<OnPreWatch>;\n\nexport default async function provideWorkspace(\n [\n pubsub,\n cli,\n scope,\n component,\n isolator,\n dependencyResolver,\n variants,\n loggerExt,\n graphql,\n ui,\n bundler,\n aspectLoader,\n envs,\n community,\n ]: WorkspaceDeps,\n config: WorkspaceExtConfig,\n [onComponentLoadSlot, onComponentChangeSlot, onComponentAddSlot, onComponentRemoveSlot, onPreWatchSlot]: [\n OnComponentLoadSlot,\n OnComponentChangeSlot,\n OnComponentAddSlot,\n OnComponentRemoveSlot,\n OnPreWatchSlot\n ],\n harmony: Harmony\n) {\n const bitConfig: any = harmony.config.get('teambit.harmony/bit');\n const consumer = await getConsumer(bitConfig.cwd);\n if (!consumer) return undefined;\n // TODO: get the 'workspace' name in a better way\n const logger = loggerExt.createLogger(EXT_NAME);\n const workspace = new Workspace(\n pubsub,\n config,\n consumer,\n scope,\n component,\n isolator,\n dependencyResolver,\n variants,\n aspectLoader,\n logger,\n undefined,\n harmony,\n onComponentLoadSlot,\n onComponentChangeSlot,\n envs,\n onComponentAddSlot,\n onComponentRemoveSlot,\n onPreWatchSlot,\n graphql\n );\n\n const getWorkspacePolicyFromPackageJson = () => {\n const packageJson = workspace.consumer.packageJson?.packageJsonObject || {};\n const policyFromPackageJson = dependencyResolver.getWorkspacePolicyFromPackageJson(packageJson);\n return policyFromPackageJson;\n };\n\n dependencyResolver.registerRootPolicy(getWorkspacePolicyFromPackageJson());\n\n ManyComponentsWriter.registerExternalInstaller({\n install: async () => {\n // TODO: think how we should pass this options\n const installOpts: WorkspaceInstallOptions = {\n dedupe: true,\n updateExisting: false,\n import: false,\n };\n return workspace.install(undefined, installOpts);\n },\n });\n\n consumer.onCacheClear.push(() => workspace.clearCache());\n\n LegacyComponentLoader.registerOnComponentLoadSubscriber(\n async (legacyComponent: ConsumerComponent, opts?: { loadDocs?: boolean }) => {\n const id = await workspace.resolveComponentId(legacyComponent.id);\n const newComponent = await workspace.get(id, legacyComponent, true, true, opts);\n return newComponent.state._consumer;\n }\n );\n\n ConsumerComponent.registerOnComponentConfigLoading(EXT_NAME, async (id) => {\n const componentId = await workspace.resolveComponentId(id);\n // We call here directly workspace.scope.get instead of workspace.get because part of the workspace get is loading consumer component\n // which in turn run this event, which will make an infinite loop\n // This component from scope here are only used for merging the extensions with the workspace components\n const componentFromScope = await workspace.scope.get(componentId);\n const { extensions } = await workspace.componentExtensions(componentId, componentFromScope);\n const defaultScope = await workspace.componentDefaultScope(componentId);\n\n const extensionsWithLegacyIdsP = extensions.map(async (extension) => {\n const legacyEntry = extension.clone();\n if (legacyEntry.extensionId) {\n const compId = await workspace.resolveComponentId(legacyEntry.extensionId);\n legacyEntry.extensionId = compId._legacy;\n legacyEntry.newExtensionId = compId;\n }\n\n return legacyEntry;\n });\n const extensionsWithLegacyIds = await Promise.all(extensionsWithLegacyIdsP);\n\n return {\n defaultScope,\n extensions: ExtensionDataList.fromArray(extensionsWithLegacyIds),\n };\n });\n\n /**\n * Add default scope from harmony during export.\n */\n registerDefaultScopeGetter(async (id: BitId) => {\n const componentId = await workspace.resolveComponentId(id);\n const defaultScope = await workspace.componentDefaultScope(componentId);\n return defaultScope;\n });\n\n const workspaceSchema = getWorkspaceSchema(workspace, graphql);\n ui.registerUiRoot(new WorkspaceUIRoot(workspace, bundler));\n graphql.register(workspaceSchema);\n const capsuleCmd = new CapsuleCmd();\n capsuleCmd.commands = [\n new CapsuleListCmd(isolator, workspace),\n new CapsuleCreateCmd(workspace, isolator),\n new CapsuleDeleteCmd(isolator, workspace),\n ];\n const commands: CommandList = [\n new InstallCmd(workspace, logger),\n new UpdateCmd(workspace),\n new UninstallCmd(workspace),\n new EjectConfCmd(workspace),\n capsuleCmd,\n ];\n const watcher = new Watcher(workspace, pubsub);\n if (workspace) {\n commands.push(new WatchCommand(pubsub, logger, watcher));\n commands.push(new LinkCommand(workspace, logger, community.getDocsDomain()));\n commands.push(new UseCmd(workspace));\n }\n commands.push(new PatternCommand(workspace));\n cli.register(...commands);\n component.registerHost(workspace);\n\n cli.registerOnStart(async () => {\n await workspace.importCurrentLaneIfMissing();\n await workspace.loadAspects(\n aspectLoader.getNotLoadedConfiguredExtensions(),\n undefined,\n 'workspace.cli.registerOnStart'\n );\n });\n\n // add sub-commands \"set\" and \"unset\" to envs command.\n const envsCommand = cli.getCommand('envs');\n envsCommand?.commands?.push(new EnvsSetCmd(workspace)); // bit envs set\n envsCommand?.commands?.push(new EnvsUnsetCmd(workspace)); // bit envs unset\n envsCommand?.commands?.push(new EnvsReplaceCmd(workspace)); // bit envs replace\n\n // add sub-command \"set\" to scope command.\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeSetCmd(workspace));\n\n return workspace;\n}\n\n/**\n * don't use loadConsumer() here, which throws ConsumerNotFound because some commands don't require\n * the consumer to be available. such as, `bit init` or `bit list --remote`.\n * most of the commands do need the consumer. the legacy commands that need the consumer throw an\n * error when is missing. in the new/Harmony commands, such as `bis compile`, the workspace object\n * is passed to the provider, so before using it, make sure it exists.\n * keep in mind that you can't verify it in the provider itself, because the provider is running\n * always for all commands before anything else is happening.\n */\nasync function getConsumer(path?: string): Promise<Consumer | undefined> {\n return loadConsumerIfExist(path);\n}\n"],"mappings":";;;;;;;;;;;;;AAcA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAA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li","scope","component","isolator","dependencyResolver","variants","loggerExt","graphql","ui","bundler","aspectLoader","envs","community","config","onComponentLoadSlot","onComponentChangeSlot","onComponentAddSlot","onComponentRemoveSlot","onPreWatchSlot","harmony","bitConfig","get","consumer","getConsumer","cwd","undefined","logger","createLogger","EXT_NAME","workspace","Workspace","getWorkspacePolicyFromPackageJson","packageJson","packageJsonObject","policyFromPackageJson","registerRootPolicy","ManyComponentsWriter","registerExternalInstaller","install","installOpts","dedupe","updateExisting","import","onCacheClear","push","clearCache","LegacyComponentLoader","registerOnComponentLoadSubscriber","legacyComponent","opts","id","resolveComponentId","newComponent","state","_consumer","ConsumerComponent","registerOnComponentConfigLoading","componentId","componentFromScope","extensions","componentExtensions","defaultScope","componentDefaultScope","extensionsWithLegacyIdsP","map","extension","legacyEntry","clone","extensionId","compId","_legacy","newExtensionId","extensionsWithLegacyIds","Promise","all","ExtensionDataList","fromArray","workspaceSchema","getWorkspaceSchema","registerUiRoot","WorkspaceUIRoot","register","capsuleCmd","CapsuleCmd","commands","CapsuleListCmd","CapsuleCreateCmd","CapsuleDeleteCmd","InstallCmd","UpdateCmd","UninstallCmd","EjectConfCmd","watcher","Watcher","WatchCommand","LinkCommand","getDocsDomain","UseCmd","PatternCommand","registerHost","registerOnStart","importCurrentLaneIfMissing","loadAspects","getNotLoadedConfiguredExtensions","envsCommand","getCommand","EnvsSetCmd","EnvsUnsetCmd","EnvsReplaceCmd","scopeCommand","ScopeSetCmd","path","loadConsumerIfExist"],"sources":["workspace.provider.ts"],"sourcesContent":["import { PubsubMain } from '@teambit/pubsub';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport { BundlerMain } from '@teambit/bundler';\nimport { CLIMain, CommandList } from '@teambit/cli';\nimport type { ComponentMain, Component } from '@teambit/component';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { EnvsMain } from '@teambit/envs';\nimport { GraphqlMain } from '@teambit/graphql';\nimport { Harmony, SlotRegistry } from '@teambit/harmony';\nimport { IsolatorMain } from '@teambit/isolator';\nimport { LoggerMain } from '@teambit/logger';\nimport type { ScopeMain } from '@teambit/scope';\nimport { UiMain } from '@teambit/ui';\nimport type { VariantsMain } from '@teambit/variants';\nimport { Consumer, loadConsumerIfExist } from '@teambit/legacy/dist/consumer';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport ManyComponentsWriter from '@teambit/legacy/dist/consumer/component-ops/many-components-writer';\nimport LegacyComponentLoader from '@teambit/legacy/dist/consumer/component/component-loader';\nimport { ExtensionDataList } from '@teambit/legacy/dist/consumer/config/extension-data';\nimport { CommunityMain } from '@teambit/community';\nimport { EXT_NAME } from './constants';\nimport EjectConfCmd from './eject-conf.cmd';\nimport InstallCmd from './install.cmd';\nimport UninstallCmd from './uninstall.cmd';\nimport UpdateCmd from './update.cmd';\nimport { OnComponentLoad, OnComponentAdd, OnComponentChange, OnComponentRemove } from './on-component-events';\nimport { WorkspaceExtConfig } from './types';\nimport { WatchCommand } from './watch/watch.cmd';\nimport { LinkCommand } from './link';\nimport { Watcher, WatchOptions } from './watch/watcher';\nimport { Workspace, WorkspaceInstallOptions } from './workspace';\nimport getWorkspaceSchema from './workspace.graphql';\nimport { WorkspaceUIRoot } from './workspace.ui-root';\nimport { CapsuleCmd, CapsuleCreateCmd, CapsuleDeleteCmd, CapsuleListCmd } from './capsule.cmd';\nimport { EnvsSetCmd } from './envs-subcommands/envs-set.cmd';\nimport { EnvsUnsetCmd } from './envs-subcommands/envs-unset.cmd';\nimport { PatternCommand } from './pattern.cmd';\nimport { EnvsReplaceCmd } from './envs-subcommands/envs-replace.cmd';\nimport { ScopeSetCmd } from './scope-subcommands/scope-set.cmd';\nimport { UseCmd } from './use.cmd';\n\nexport type WorkspaceDeps = [\n PubsubMain,\n CLIMain,\n ScopeMain,\n ComponentMain,\n IsolatorMain,\n DependencyResolverMain,\n VariantsMain,\n LoggerMain,\n GraphqlMain,\n UiMain,\n BundlerMain,\n AspectLoaderMain,\n EnvsMain,\n CommunityMain\n];\n\nexport type OnComponentLoadSlot = SlotRegistry<OnComponentLoad>;\n\nexport type OnComponentChangeSlot = SlotRegistry<OnComponentChange>;\n\nexport type OnComponentAddSlot = SlotRegistry<OnComponentAdd>;\n\nexport type OnComponentRemoveSlot = SlotRegistry<OnComponentRemove>;\n\nexport type OnPreWatch = (components: Component[], watchOpts: WatchOptions) => Promise<void>;\nexport type OnPreWatchSlot = SlotRegistry<OnPreWatch>;\n\nexport default async function provideWorkspace(\n [\n pubsub,\n cli,\n scope,\n component,\n isolator,\n dependencyResolver,\n variants,\n loggerExt,\n graphql,\n ui,\n bundler,\n aspectLoader,\n envs,\n community,\n ]: WorkspaceDeps,\n config: WorkspaceExtConfig,\n [onComponentLoadSlot, onComponentChangeSlot, onComponentAddSlot, onComponentRemoveSlot, onPreWatchSlot]: [\n OnComponentLoadSlot,\n OnComponentChangeSlot,\n OnComponentAddSlot,\n OnComponentRemoveSlot,\n OnPreWatchSlot\n ],\n harmony: Harmony\n) {\n const bitConfig: any = harmony.config.get('teambit.harmony/bit');\n const consumer = await getConsumer(bitConfig.cwd);\n if (!consumer) return undefined;\n // TODO: get the 'workspace' name in a better way\n const logger = loggerExt.createLogger(EXT_NAME);\n const workspace = new Workspace(\n pubsub,\n config,\n consumer,\n scope,\n component,\n isolator,\n dependencyResolver,\n variants,\n aspectLoader,\n logger,\n undefined,\n harmony,\n onComponentLoadSlot,\n onComponentChangeSlot,\n envs,\n onComponentAddSlot,\n onComponentRemoveSlot,\n onPreWatchSlot,\n graphql\n );\n\n const getWorkspacePolicyFromPackageJson = () => {\n const packageJson = workspace.consumer.packageJson?.packageJsonObject || {};\n const policyFromPackageJson = dependencyResolver.getWorkspacePolicyFromPackageJson(packageJson);\n return policyFromPackageJson;\n };\n\n dependencyResolver.registerRootPolicy(getWorkspacePolicyFromPackageJson());\n\n ManyComponentsWriter.registerExternalInstaller({\n install: async () => {\n // TODO: think how we should pass this options\n const installOpts: WorkspaceInstallOptions = {\n dedupe: true,\n updateExisting: false,\n import: false,\n };\n return workspace.install(undefined, installOpts);\n },\n });\n\n consumer.onCacheClear.push(() => workspace.clearCache());\n\n LegacyComponentLoader.registerOnComponentLoadSubscriber(\n async (legacyComponent: ConsumerComponent, opts?: { loadDocs?: boolean }) => {\n const id = await workspace.resolveComponentId(legacyComponent.id);\n const newComponent = await workspace.get(id, legacyComponent, true, true, opts);\n return newComponent.state._consumer;\n }\n );\n\n ConsumerComponent.registerOnComponentConfigLoading(EXT_NAME, async (id) => {\n const componentId = await workspace.resolveComponentId(id);\n // We call here directly workspace.scope.get instead of workspace.get because part of the workspace get is loading consumer component\n // which in turn run this event, which will make an infinite loop\n // This component from scope here are only used for merging the extensions with the workspace components\n const componentFromScope = await workspace.scope.get(componentId);\n const { extensions } = await workspace.componentExtensions(componentId, componentFromScope);\n const defaultScope = await workspace.componentDefaultScope(componentId);\n\n const extensionsWithLegacyIdsP = extensions.map(async (extension) => {\n const legacyEntry = extension.clone();\n if (legacyEntry.extensionId) {\n const compId = await workspace.resolveComponentId(legacyEntry.extensionId);\n legacyEntry.extensionId = compId._legacy;\n legacyEntry.newExtensionId = compId;\n }\n\n return legacyEntry;\n });\n const extensionsWithLegacyIds = await Promise.all(extensionsWithLegacyIdsP);\n\n return {\n defaultScope,\n extensions: ExtensionDataList.fromArray(extensionsWithLegacyIds),\n };\n });\n\n const workspaceSchema = getWorkspaceSchema(workspace, graphql);\n ui.registerUiRoot(new WorkspaceUIRoot(workspace, bundler));\n graphql.register(workspaceSchema);\n const capsuleCmd = new CapsuleCmd();\n capsuleCmd.commands = [\n new CapsuleListCmd(isolator, workspace),\n new CapsuleCreateCmd(workspace, isolator),\n new CapsuleDeleteCmd(isolator, workspace),\n ];\n const commands: CommandList = [\n new InstallCmd(workspace, logger),\n new UpdateCmd(workspace),\n new UninstallCmd(workspace),\n new EjectConfCmd(workspace),\n capsuleCmd,\n ];\n const watcher = new Watcher(workspace, pubsub);\n if (workspace) {\n commands.push(new WatchCommand(pubsub, logger, watcher));\n commands.push(new LinkCommand(workspace, logger, community.getDocsDomain()));\n commands.push(new UseCmd(workspace));\n }\n commands.push(new PatternCommand(workspace));\n cli.register(...commands);\n component.registerHost(workspace);\n\n cli.registerOnStart(async () => {\n await workspace.importCurrentLaneIfMissing();\n await workspace.loadAspects(\n aspectLoader.getNotLoadedConfiguredExtensions(),\n undefined,\n 'workspace.cli.registerOnStart'\n );\n });\n\n // add sub-commands \"set\" and \"unset\" to envs command.\n const envsCommand = cli.getCommand('envs');\n envsCommand?.commands?.push(new EnvsSetCmd(workspace)); // bit envs set\n envsCommand?.commands?.push(new EnvsUnsetCmd(workspace)); // bit envs unset\n envsCommand?.commands?.push(new EnvsReplaceCmd(workspace)); // bit envs replace\n\n // add sub-command \"set\" to scope command.\n const scopeCommand = cli.getCommand('scope');\n scopeCommand?.commands?.push(new ScopeSetCmd(workspace));\n\n return workspace;\n}\n\n/**\n * don't use loadConsumer() here, which throws ConsumerNotFound because some commands don't require\n * the consumer to be available. such as, `bit init` or `bit list --remote`.\n * most of the commands do need the consumer. the legacy commands that need the consumer throw an\n * error when is missing. in the new/Harmony commands, such as `bis compile`, the workspace object\n * is passed to the provider, so before using it, make sure it exists.\n * keep in mind that you can't verify it in the provider itself, because the provider is running\n * always for all commands before anything else is happening.\n */\nasync function getConsumer(path?: string): Promise<Consumer | undefined> {\n return loadConsumerIfExist(path);\n}\n"],"mappings":";;;;;;;;;;;;;AAcA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;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ED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.828",
|
|
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.828"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -38,49 +38,49 @@
|
|
|
38
38
|
"@teambit/base-ui.surfaces.split-pane.split-pane": "1.0.0",
|
|
39
39
|
"@teambit/bit-error": "0.0.394",
|
|
40
40
|
"@teambit/component-id": "0.0.405",
|
|
41
|
-
"@teambit/lane-id": "0.0.
|
|
41
|
+
"@teambit/lane-id": "0.0.74",
|
|
42
42
|
"@teambit/legacy-bit-id": "0.0.402",
|
|
43
|
-
"@teambit/logger": "0.0.
|
|
44
|
-
"@teambit/scope": "0.0.
|
|
45
|
-
"@teambit/cli": "0.0.
|
|
46
|
-
"@teambit/isolator": "0.0.
|
|
47
|
-
"@teambit/component-tree": "0.0.
|
|
43
|
+
"@teambit/logger": "0.0.648",
|
|
44
|
+
"@teambit/scope": "0.0.828",
|
|
45
|
+
"@teambit/cli": "0.0.555",
|
|
46
|
+
"@teambit/isolator": "0.0.828",
|
|
47
|
+
"@teambit/component-tree": "0.0.616",
|
|
48
48
|
"@teambit/component.ui.component-status-resolver": "0.0.493",
|
|
49
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
|
49
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.8",
|
|
50
50
|
"@teambit/harmony.modules.resolved-component": "0.0.484",
|
|
51
|
-
"@teambit/dependency-resolver": "0.0.
|
|
52
|
-
"@teambit/compiler": "0.0.
|
|
53
|
-
"@teambit/component": "0.0.
|
|
54
|
-
"@teambit/graphql": "0.0.
|
|
55
|
-
"@teambit/aspect-loader": "0.0.
|
|
56
|
-
"@teambit/bundler": "0.0.
|
|
57
|
-
"@teambit/community": "0.0.
|
|
58
|
-
"@teambit/envs": "0.0.
|
|
59
|
-
"@teambit/pubsub": "0.0.
|
|
60
|
-
"@teambit/ui": "0.0.
|
|
61
|
-
"@teambit/variants": "0.0.
|
|
51
|
+
"@teambit/dependency-resolver": "0.0.828",
|
|
52
|
+
"@teambit/compiler": "0.0.828",
|
|
53
|
+
"@teambit/component": "0.0.828",
|
|
54
|
+
"@teambit/graphql": "0.0.828",
|
|
55
|
+
"@teambit/aspect-loader": "0.0.828",
|
|
56
|
+
"@teambit/bundler": "0.0.828",
|
|
57
|
+
"@teambit/community": "0.0.103",
|
|
58
|
+
"@teambit/envs": "0.0.828",
|
|
59
|
+
"@teambit/pubsub": "0.0.828",
|
|
60
|
+
"@teambit/ui": "0.0.828",
|
|
61
|
+
"@teambit/variants": "0.0.652",
|
|
62
62
|
"@teambit/component-issues": "0.0.60",
|
|
63
|
-
"@teambit/config": "0.0.
|
|
63
|
+
"@teambit/config": "0.0.568",
|
|
64
64
|
"@teambit/harmony.modules.requireable-component": "0.0.484",
|
|
65
|
-
"@teambit/importer": "0.0.
|
|
65
|
+
"@teambit/importer": "0.0.257",
|
|
66
66
|
"@teambit/workspace.modules.match-pattern": "0.0.489",
|
|
67
|
-
"@teambit/component.ui.component-drawer": "0.0.
|
|
67
|
+
"@teambit/component.ui.component-drawer": "0.0.104",
|
|
68
68
|
"@teambit/design.ui.tree": "0.0.6",
|
|
69
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.
|
|
70
|
-
"@teambit/command-bar": "0.0.
|
|
69
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.621",
|
|
70
|
+
"@teambit/command-bar": "0.0.828",
|
|
71
71
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.1",
|
|
72
72
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.1",
|
|
73
73
|
"@teambit/component.ui.component-filters.env-filter": "0.0.1",
|
|
74
|
-
"@teambit/graph": "0.0.
|
|
75
|
-
"@teambit/sidebar": "0.0.
|
|
74
|
+
"@teambit/graph": "0.0.828",
|
|
75
|
+
"@teambit/sidebar": "0.0.828",
|
|
76
76
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.487",
|
|
77
77
|
"@teambit/ui-foundation.ui.menu": "0.0.487",
|
|
78
78
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.490",
|
|
79
79
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.499",
|
|
80
80
|
"@teambit/toolbox.time.time-format": "0.0.483",
|
|
81
|
-
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.
|
|
82
|
-
"@teambit/component-descriptor": "0.0.
|
|
83
|
-
"@teambit/deprecation": "0.0.
|
|
81
|
+
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.489",
|
|
82
|
+
"@teambit/component-descriptor": "0.0.118",
|
|
83
|
+
"@teambit/deprecation": "0.0.828",
|
|
84
84
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.488",
|
|
85
85
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.195",
|
|
86
86
|
"@teambit/ui-foundation.ui.corner": "0.0.498",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"react-router-dom": "^6.0.0",
|
|
109
|
-
"@apollo/client": "^3.
|
|
110
|
-
"@teambit/legacy": "1.0.
|
|
109
|
+
"@apollo/client": "^3.4.0",
|
|
110
|
+
"@teambit/legacy": "1.0.338",
|
|
111
111
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
112
112
|
"react": "^16.8.0 || ^17.0.0"
|
|
113
113
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.828/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.828/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|