@teambit/workspace 0.0.649 → 0.0.650
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/{__preview-1644981953366.js → __preview-1645068215823.js} +0 -0
- package/dist/envs-subcommands/envs-replace.cmd.d.ts +11 -0
- package/dist/envs-subcommands/envs-replace.cmd.js +56 -0
- package/dist/envs-subcommands/envs-replace.cmd.js.map +1 -0
- package/dist/envs-subcommands/envs-set.cmd.js +0 -1
- package/dist/envs-subcommands/envs-set.cmd.js.map +1 -1
- package/dist/pattern.cmd.js +2 -2
- package/dist/pattern.cmd.js.map +1 -1
- package/dist/workspace.d.ts +4 -3
- package/dist/workspace.js +33 -9
- package/dist/workspace.js.map +1 -1
- package/dist/workspace.provider.js +13 -2
- package/dist/workspace.provider.js.map +1 -1
- package/envs-subcommands/envs-replace.cmd.ts +21 -0
- package/envs-subcommands/envs-set.cmd.ts +0 -1
- package/package-tar/teambit-workspace-0.0.650.tgz +0 -0
- package/package.json +26 -26
- package/package-tar/teambit-workspace-0.0.649.tgz +0 -0
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@teambit/cli';
|
|
2
|
+
import { Workspace } from '../workspace';
|
|
3
|
+
export declare class EnvsReplaceCmd implements Command {
|
|
4
|
+
private workspace;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
options: never[];
|
|
8
|
+
group: string;
|
|
9
|
+
constructor(workspace: Workspace);
|
|
10
|
+
report([oldEnv, env]: [string, string]): Promise<string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.promise.js");
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
exports.EnvsReplaceCmd = void 0;
|
|
13
|
+
|
|
14
|
+
function _defineProperty2() {
|
|
15
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
|
|
17
|
+
_defineProperty2 = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _chalk() {
|
|
25
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
26
|
+
|
|
27
|
+
_chalk = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class EnvsReplaceCmd {
|
|
35
|
+
constructor(workspace) {
|
|
36
|
+
this.workspace = workspace;
|
|
37
|
+
(0, _defineProperty2().default)(this, "name", 'replace <old-env> <new-env>');
|
|
38
|
+
(0, _defineProperty2().default)(this, "description", 'replace an existing env with another env for all components using the old env');
|
|
39
|
+
(0, _defineProperty2().default)(this, "options", []);
|
|
40
|
+
(0, _defineProperty2().default)(this, "group", 'development');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async report([oldEnv, env]) {
|
|
44
|
+
const envId = await this.workspace.resolveComponentId(env);
|
|
45
|
+
const components = await this.workspace.getComponentsUsingEnv(oldEnv, true);
|
|
46
|
+
const componentIds = components.map(comp => comp.id);
|
|
47
|
+
await this.workspace.setEnvToComponents(envId, componentIds);
|
|
48
|
+
return `added ${_chalk().default.bold(envId.toString())} env to the following component(s):
|
|
49
|
+
${componentIds.map(compId => compId.toString()).join('\n')}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
exports.EnvsReplaceCmd = EnvsReplaceCmd;
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=envs-replace.cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["envs-replace.cmd.ts"],"names":["EnvsReplaceCmd","constructor","workspace","report","oldEnv","env","envId","resolveComponentId","components","getComponentsUsingEnv","componentIds","map","comp","id","setEnvToComponents","chalk","bold","toString","compId","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,cAAN,CAAwC;AAM7CC,EAAAA,WAAW,CAASC,SAAT,EAA+B;AAAA,SAAtBA,SAAsB,GAAtBA,SAAsB;AAAA,kDALnC,6BAKmC;AAAA,yDAJ5B,+EAI4B;AAAA,qDAHhC,EAGgC;AAAA,mDAFlC,aAEkC;AAAE;;AAEhC,QAANC,MAAM,CAAC,CAACC,MAAD,EAASC,GAAT,CAAD,EAAkC;AAC5C,UAAMC,KAAK,GAAG,MAAM,KAAKJ,SAAL,CAAeK,kBAAf,CAAkCF,GAAlC,CAApB;AACA,UAAMG,UAAU,GAAG,MAAM,KAAKN,SAAL,CAAeO,qBAAf,CAAqCL,MAArC,EAA6C,IAA7C,CAAzB;AACA,UAAMM,YAAY,GAAGF,UAAU,CAACG,GAAX,CAAgBC,IAAD,IAAUA,IAAI,CAACC,EAA9B,CAArB;AACA,UAAM,KAAKX,SAAL,CAAeY,kBAAf,CAAkCR,KAAlC,EAAyCI,YAAzC,CAAN;AACA,WAAQ,SAAQK,iBAAMC,IAAN,CAAWV,KAAK,CAACW,QAAN,EAAX,CAA6B;AACjD,EAAEP,YAAY,CAACC,GAAb,CAAkBO,MAAD,IAAYA,MAAM,CAACD,QAAP,EAA7B,EAAgDE,IAAhD,CAAqD,IAArD,CAA2D,EADzD;AAED;;AAf4C","sourcesContent":["import { Command } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { Workspace } from '../workspace';\n\nexport class EnvsReplaceCmd implements Command {\n name = 'replace <old-env> <new-env>';\n description = 'replace an existing env with another env for all components using the old env';\n options = [];\n group = 'development';\n\n constructor(private workspace: Workspace) {}\n\n async report([oldEnv, env]: [string, string]) {\n const envId = await this.workspace.resolveComponentId(env);\n const components = await this.workspace.getComponentsUsingEnv(oldEnv, true);\n const componentIds = components.map((comp) => comp.id);\n await this.workspace.setEnvToComponents(envId, componentIds);\n return `added ${chalk.bold(envId.toString())} env to the following component(s):\n${componentIds.map((compId) => compId.toString()).join('\\n')}`;\n }\n}\n"]}
|
|
@@ -54,7 +54,6 @@ class EnvsSetCmd {
|
|
|
54
54
|
async report([pattern, env]) {
|
|
55
55
|
const envId = await this.workspace.resolveComponentId(env);
|
|
56
56
|
const componentIds = await this.workspace.idsByPattern(pattern);
|
|
57
|
-
if (!componentIds.length) return _chalk().default.yellow(`unable to find any matching for ${_chalk().default.bold(pattern)} pattern`);
|
|
58
57
|
await this.workspace.setEnvToComponents(envId, componentIds);
|
|
59
58
|
return `added ${_chalk().default.bold(envId.toString())} env to the following component(s):
|
|
60
59
|
${componentIds.map(compId => compId.toString()).join('\n')}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["envs-set.cmd.ts"],"names":["EnvsSetCmd","constructor","workspace","report","pattern","env","envId","resolveComponentId","componentIds","idsByPattern","
|
|
1
|
+
{"version":3,"sources":["envs-set.cmd.ts"],"names":["EnvsSetCmd","constructor","workspace","report","pattern","env","envId","resolveComponentId","componentIds","idsByPattern","setEnvToComponents","chalk","bold","toString","map","compId","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,UAAN,CAAoC;AAOzCC,EAAAA,WAAW,CAASC,SAAT,EAA+B;AAAA,SAAtBA,SAAsB,GAAtBA,SAAsB;AAAA,kDANnC,qBAMmC;AAAA,yDAL5B,qCAK4B;AAAA,qDAJhC,EAIgC;AAAA,mDAHlC,aAGkC;AAAA,iEAFnB,GAAE,+BAAa,SAAb,CAAwB,EAEP;AAAE;;AAEhC,QAANC,MAAM,CAAC,CAACC,OAAD,EAAUC,GAAV,CAAD,EAAmC;AAC7C,UAAMC,KAAK,GAAG,MAAM,KAAKJ,SAAL,CAAeK,kBAAf,CAAkCF,GAAlC,CAApB;AACA,UAAMG,YAAY,GAAG,MAAM,KAAKN,SAAL,CAAeO,YAAf,CAA4BL,OAA5B,CAA3B;AACA,UAAM,KAAKF,SAAL,CAAeQ,kBAAf,CAAkCJ,KAAlC,EAAyCE,YAAzC,CAAN;AACA,WAAQ,SAAQG,iBAAMC,IAAN,CAAWN,KAAK,CAACO,QAAN,EAAX,CAA6B;AACjD,EAAEL,YAAY,CAACM,GAAb,CAAkBC,MAAD,IAAYA,MAAM,CAACF,QAAP,EAA7B,EAAgDG,IAAhD,CAAqD,IAArD,CAA2D,EADzD;AAED;;AAfwC","sourcesContent":["import { Command } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { Workspace } from '../workspace';\n\nexport class EnvsSetCmd implements Command {\n name = 'set <pattern> <env>';\n description = 'set an environment for component(s)';\n options = [];\n group = 'development';\n extendedDescription = `${PATTERN_HELP('env set')}`;\n\n constructor(private workspace: Workspace) {}\n\n async report([pattern, env]: [string, string]) {\n const envId = await this.workspace.resolveComponentId(env);\n const componentIds = await this.workspace.idsByPattern(pattern);\n await this.workspace.setEnvToComponents(envId, componentIds);\n return `added ${chalk.bold(envId.toString())} env to the following component(s):\n${componentIds.map((compId) => compId.toString()).join('\\n')}`;\n }\n}\n"]}
|
package/dist/pattern.cmd.js
CHANGED
|
@@ -43,7 +43,7 @@ class PatternCommand {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async report([pattern]) {
|
|
46
|
-
const ids = await this.
|
|
46
|
+
const ids = await this.json([pattern]);
|
|
47
47
|
|
|
48
48
|
const title = _chalk().default.green(`found ${_chalk().default.bold(ids.length.toString())} components matching the pattern`);
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ class PatternCommand {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
async json([pattern]) {
|
|
54
|
-
return this.workspace.idsByPattern(pattern);
|
|
54
|
+
return this.workspace.idsByPattern(pattern, false);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
}
|
package/dist/pattern.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["pattern.cmd.ts"],"names":["PatternCommand","constructor","workspace","report","pattern","ids","
|
|
1
|
+
{"version":3,"sources":["pattern.cmd.ts"],"names":["PatternCommand","constructor","workspace","report","pattern","ids","json","title","chalk","green","bold","length","toString","join","idsByPattern"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,cAAN,CAAwC;AAQ7CC,EAAAA,WAAW,CAASC,SAAT,EAA+B;AAAA,SAAtBA,SAAsB,GAAtBA,SAAsB;AAAA,kDAPnC,mBAOmC;AAAA,mDANlC,EAMkC;AAAA,yDAL5B,mDAK4B;AAAA,mDAJlC,aAIkC;AAAA,qDAHhC,KAGgC;AAAA,qDAFhC,CAAC,CAAC,GAAD,EAAM,MAAN,EAAc,2BAAd,CAAD,CAEgC;AAAE;;AAEhC,QAANC,MAAM,CAAC,CAACC,OAAD,CAAD,EAAsB;AAChC,UAAMC,GAAG,GAAG,MAAM,KAAKC,IAAL,CAAU,CAACF,OAAD,CAAV,CAAlB;;AACA,UAAMG,KAAK,GAAGC,iBAAMC,KAAN,CAAa,SAAQD,iBAAME,IAAN,CAAWL,GAAG,CAACM,MAAJ,CAAWC,QAAX,EAAX,CAAkC,kCAAvD,CAAd;;AACA,WAAQ,GAAEL,KAAM,KAAIF,GAAG,CAACQ,IAAJ,CAAS,IAAT,CAAe,EAAnC;AACD;;AAES,QAAJP,IAAI,CAAC,CAACF,OAAD,CAAD,EAAsB;AAC9B,WAAO,KAAKF,SAAL,CAAeY,YAAf,CAA4BV,OAA5B,EAAqC,KAArC,CAAP;AACD;;AAlB4C","sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { Workspace } from './workspace';\n\nexport class PatternCommand implements Command {\n name = 'pattern <pattern>';\n alias = '';\n description = 'list the component ids matching the given pattern';\n group = 'development';\n private = false;\n options = [['j', 'json', 'return the output as JSON']] as CommandOptions;\n\n constructor(private workspace: Workspace) {}\n\n async report([pattern]: [string]) {\n const ids = await this.json([pattern]);\n const title = chalk.green(`found ${chalk.bold(ids.length.toString())} components matching the pattern`);\n return `${title}\\n${ids.join('\\n')}`;\n }\n\n async json([pattern]: [string]) {\n return this.workspace.idsByPattern(pattern, false);\n }\n}\n"]}
|
package/dist/workspace.d.ts
CHANGED
|
@@ -289,7 +289,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
289
289
|
* get component-ids matching the given pattern. a pattern can have multiple patterns separated by a comma.
|
|
290
290
|
* it supports negate (!) character to exclude ids.
|
|
291
291
|
*/
|
|
292
|
-
idsByPattern(pattern: string): Promise<ComponentID[]>;
|
|
292
|
+
idsByPattern(pattern: string, throwForNoMatch?: boolean): Promise<ComponentID[]>;
|
|
293
293
|
/**
|
|
294
294
|
* useful for workspace commands, such as `bit build`, `bit compile`.
|
|
295
295
|
* by default, it should be running on new and modified components.
|
|
@@ -297,6 +297,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
297
297
|
* some commands such as build/test needs to run also on the dependents.
|
|
298
298
|
*/
|
|
299
299
|
getComponentsByUserInput(all?: boolean, pattern?: string, includeDependents?: boolean): Promise<Component[]>;
|
|
300
|
+
getComponentsUsingEnv(env: string, throwIfNotFound?: boolean): Promise<Component[]>;
|
|
300
301
|
getMany(ids: Array<ComponentID>, forCapsule?: boolean): Promise<Component[]>;
|
|
301
302
|
getManyByLegacy(components: ConsumerComponent[]): Promise<Component[]>;
|
|
302
303
|
/**
|
|
@@ -404,7 +405,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
404
405
|
* load aspects from the workspace and if not exists in the workspace, load from the scope.
|
|
405
406
|
* keep in mind that the graph may have circles.
|
|
406
407
|
*/
|
|
407
|
-
loadAspects(ids?: string[], throwOnError?: boolean): Promise<string[]>;
|
|
408
|
+
loadAspects(ids?: string[], throwOnError?: boolean, neededFor?: ComponentID): Promise<string[]>;
|
|
408
409
|
/**
|
|
409
410
|
* Note - this gets called from Harmony only.
|
|
410
411
|
* returns one graph that includes all dependencies types. each edge has a label of the dependency
|
|
@@ -418,7 +419,7 @@ export declare class Workspace implements ComponentFactory {
|
|
|
418
419
|
* Load all unloaded extensions from a list
|
|
419
420
|
* @param extensions list of extensions with config to load
|
|
420
421
|
*/
|
|
421
|
-
loadExtensions(extensions: ExtensionDataList, throwOnError?: boolean): Promise<void>;
|
|
422
|
+
loadExtensions(extensions: ExtensionDataList, originatedFrom?: ComponentID, throwOnError?: boolean): Promise<void>;
|
|
422
423
|
/**
|
|
423
424
|
* Provides a cache folder, unique per key.
|
|
424
425
|
* Return value may be undefined, if workspace folder is unconventional (bare-scope, no node_modules, etc)
|
package/dist/workspace.js
CHANGED
|
@@ -882,7 +882,7 @@ class Workspace {
|
|
|
882
882
|
try {
|
|
883
883
|
this.componentLoadedSelfAsAspects.set(component.id.toString(), true);
|
|
884
884
|
this.logger.debug(`trying to load self as aspect with id ${component.id.toString()}`);
|
|
885
|
-
await this.loadAspects([component.id.toString()]); // In most cases if the load self as aspect failed we don't care about it.
|
|
885
|
+
await this.loadAspects([component.id.toString()], undefined, component.id); // In most cases if the load self as aspect failed we don't care about it.
|
|
886
886
|
// we only need it in specific cases to work, but this workspace.get runs on different
|
|
887
887
|
// cases where it might fail (like when importing aspect, after the import objects
|
|
888
888
|
// when we write the package.json we run the applyTransformers which get to pkg which call
|
|
@@ -1118,11 +1118,13 @@ class Workspace {
|
|
|
1118
1118
|
*/
|
|
1119
1119
|
|
|
1120
1120
|
|
|
1121
|
-
async idsByPattern(pattern) {
|
|
1121
|
+
async idsByPattern(pattern, throwForNoMatch = true) {
|
|
1122
1122
|
if (!pattern.includes('*') && !pattern.includes(',')) {
|
|
1123
1123
|
// if it's not a pattern but just id, resolve it without multimatch to support specifying id without scope-name
|
|
1124
1124
|
const id = await this.resolveComponentId(pattern);
|
|
1125
|
-
return [id];
|
|
1125
|
+
if (this.exists(id)) return [id];
|
|
1126
|
+
if (throwForNoMatch) throw new (_bitError().BitError)(`unable to find "${pattern}" in the workspace`);
|
|
1127
|
+
return [];
|
|
1126
1128
|
}
|
|
1127
1129
|
|
|
1128
1130
|
const ids = await this.listIds();
|
|
@@ -1130,7 +1132,13 @@ class Workspace {
|
|
|
1130
1132
|
|
|
1131
1133
|
const idsToCheck = id => [id.toStringWithoutVersion(), id._legacy.toStringWithoutVersion()];
|
|
1132
1134
|
|
|
1133
|
-
|
|
1135
|
+
const idsFiltered = ids.filter(id => (0, _multimatch().default)(idsToCheck(id), patterns).length);
|
|
1136
|
+
|
|
1137
|
+
if (throwForNoMatch && !idsFiltered.length) {
|
|
1138
|
+
throw new (_bitError().BitError)(`unable to find any matching for "${pattern}" pattern`);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
return idsFiltered;
|
|
1134
1142
|
}
|
|
1135
1143
|
/**
|
|
1136
1144
|
* useful for workspace commands, such as `bit build`, `bit compile`.
|
|
@@ -1162,6 +1170,20 @@ class Workspace {
|
|
|
1162
1170
|
return newAndModified;
|
|
1163
1171
|
}
|
|
1164
1172
|
|
|
1173
|
+
async getComponentsUsingEnv(env, throwIfNotFound = false) {
|
|
1174
|
+
const allComps = await this.list();
|
|
1175
|
+
const allEnvs = await this.envs.createEnvironment(allComps);
|
|
1176
|
+
const foundEnv = allEnvs.runtimeEnvs.find(runtimeEnv => runtimeEnv.id === env);
|
|
1177
|
+
|
|
1178
|
+
if (!foundEnv && throwIfNotFound) {
|
|
1179
|
+
const availableEnvs = allEnvs.runtimeEnvs.map(runtimeEnv => runtimeEnv.id);
|
|
1180
|
+
throw new (_bitError().BitError)(`unable to find components that using "${env}" env.
|
|
1181
|
+
the following envs are used in this workspace: ${availableEnvs.join(', ')}`);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
return (foundEnv === null || foundEnv === void 0 ? void 0 : foundEnv.components) || [];
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1165
1187
|
async getMany(ids, forCapsule = false) {
|
|
1166
1188
|
return this.componentLoader.getMany(ids, forCapsule);
|
|
1167
1189
|
}
|
|
@@ -1453,7 +1475,7 @@ class Workspace {
|
|
|
1453
1475
|
const extsWithoutRemoved = extensions.filterRemovedExtensions();
|
|
1454
1476
|
const selfInMergedExtensions = extsWithoutRemoved.findExtension(componentId._legacy.toStringWithoutScopeAndVersion(), true, true);
|
|
1455
1477
|
const extsWithoutSelf = selfInMergedExtensions !== null && selfInMergedExtensions !== void 0 && selfInMergedExtensions.extensionId ? extsWithoutRemoved.remove(selfInMergedExtensions.extensionId) : extsWithoutRemoved;
|
|
1456
|
-
await this.loadExtensions(extsWithoutSelf);
|
|
1478
|
+
await this.loadExtensions(extsWithoutSelf, componentId);
|
|
1457
1479
|
const {
|
|
1458
1480
|
extensionDataListFiltered,
|
|
1459
1481
|
envIsCurrentlySet
|
|
@@ -1694,8 +1716,10 @@ class Workspace {
|
|
|
1694
1716
|
*/
|
|
1695
1717
|
|
|
1696
1718
|
|
|
1697
|
-
async loadAspects(ids = [], throwOnError = false) {
|
|
1698
|
-
this.logger.
|
|
1719
|
+
async loadAspects(ids = [], throwOnError = false, neededFor) {
|
|
1720
|
+
this.logger.info(`loadAspects, loading ${ids.length} aspects.
|
|
1721
|
+
ids: ${ids.join(', ')}
|
|
1722
|
+
needed-for: ${(neededFor === null || neededFor === void 0 ? void 0 : neededFor.toString()) || '<unknown>'}`);
|
|
1699
1723
|
const notLoadedIds = ids.filter(id => !this.aspectLoader.isAspectLoaded(id));
|
|
1700
1724
|
if (!notLoadedIds.length) return [];
|
|
1701
1725
|
const coreAspectsStringIds = this.aspectLoader.getCoreAspectIds();
|
|
@@ -1855,7 +1879,7 @@ class Workspace {
|
|
|
1855
1879
|
*/
|
|
1856
1880
|
|
|
1857
1881
|
|
|
1858
|
-
async loadExtensions(extensions, throwOnError = false) {
|
|
1882
|
+
async loadExtensions(extensions, originatedFrom, throwOnError = false) {
|
|
1859
1883
|
const extensionsIdsP = extensions.map(async extensionEntry => {
|
|
1860
1884
|
// Core extension
|
|
1861
1885
|
if (!extensionEntry.extensionId) {
|
|
@@ -1870,7 +1894,7 @@ class Workspace {
|
|
|
1870
1894
|
const loadedExtensions = this.harmony.extensionsIds;
|
|
1871
1895
|
const extensionsToLoad = (0, _lodash().difference)(extensionsIds, loadedExtensions);
|
|
1872
1896
|
if (!extensionsToLoad.length) return;
|
|
1873
|
-
await this.loadAspects(extensionsToLoad, throwOnError);
|
|
1897
|
+
await this.loadAspects(extensionsToLoad, throwOnError, originatedFrom);
|
|
1874
1898
|
}
|
|
1875
1899
|
/**
|
|
1876
1900
|
* Provides a cache folder, unique per key.
|