@teambit/scope 0.0.1088 → 0.0.1089
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/{preview-1687750044063.js → preview-1687793316338.js} +2 -2
- package/dist/scope-aspects-loader.d.ts +0 -7
- package/dist/scope-aspects-loader.js +2 -56
- package/dist/scope-aspects-loader.js.map +1 -1
- package/package-tar/teambit-scope-0.0.1089.tgz +0 -0
- package/package.json +36 -36
- package/package-tar/teambit-scope-0.0.1088.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@0.0.1089/dist/scope.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@0.0.1089/dist/scope.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -21,13 +21,7 @@ export declare class ScopeAspectsLoader {
|
|
|
21
21
|
private isolator;
|
|
22
22
|
private logger;
|
|
23
23
|
private globalConfig;
|
|
24
|
-
private resolvedInstalledAspects;
|
|
25
24
|
constructor(scope: ScopeMain, aspectLoader: AspectLoaderMain, envs: EnvsMain, isolator: IsolatorMain, logger: Logger, globalConfig: GlobalConfigMain);
|
|
26
|
-
private parseLocalAspect;
|
|
27
|
-
private findRuntime;
|
|
28
|
-
private findAspectFile;
|
|
29
|
-
private loadAspectFromPath;
|
|
30
|
-
private localAspects;
|
|
31
25
|
loadAspects(ids: string[], throwOnError?: boolean, neededFor?: string, lane?: Lane, opts?: ScopeLoadAspectsOptions): Promise<string[]>;
|
|
32
26
|
/**
|
|
33
27
|
* This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list
|
|
@@ -46,7 +40,6 @@ export declare class ScopeAspectsLoader {
|
|
|
46
40
|
potentialPluginsIds: string[];
|
|
47
41
|
}>;
|
|
48
42
|
private getNonLoadedAspects;
|
|
49
|
-
private resolveLocalAspects;
|
|
50
43
|
getResolvedAspects(components: Component[], opts?: {
|
|
51
44
|
skipIfExists?: boolean;
|
|
52
45
|
packageManagerConfigRootDir?: string;
|
|
@@ -5,8 +5,6 @@ require("core-js/modules/es.array.flat-map.js");
|
|
|
5
5
|
require("core-js/modules/es.array.iterator.js");
|
|
6
6
|
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
7
7
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
9
|
-
require("core-js/modules/es.string.replace.js");
|
|
10
8
|
Object.defineProperty(exports, "__esModule", {
|
|
11
9
|
value: true
|
|
12
10
|
});
|
|
@@ -46,13 +44,6 @@ function _constants() {
|
|
|
46
44
|
};
|
|
47
45
|
return data;
|
|
48
46
|
}
|
|
49
|
-
function _aspectLoader() {
|
|
50
|
-
const data = require("@teambit/aspect-loader");
|
|
51
|
-
_aspectLoader = function () {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
return data;
|
|
55
|
-
}
|
|
56
47
|
function _lodash() {
|
|
57
48
|
const data = require("lodash");
|
|
58
49
|
_lodash = function () {
|
|
@@ -84,40 +75,6 @@ class ScopeAspectsLoader {
|
|
|
84
75
|
this.isolator = isolator;
|
|
85
76
|
this.logger = logger;
|
|
86
77
|
this.globalConfig = globalConfig;
|
|
87
|
-
(0, _defineProperty2().default)(this, "resolvedInstalledAspects", void 0);
|
|
88
|
-
(0, _defineProperty2().default)(this, "localAspects", []);
|
|
89
|
-
}
|
|
90
|
-
parseLocalAspect(localAspects) {
|
|
91
|
-
const dirPaths = localAspects.map(localAspect => (0, _path().resolve)(localAspect.replace('file://', '')));
|
|
92
|
-
const nonExistsDirPaths = dirPaths.filter(path => !(0, _fsExtra().existsSync)(path));
|
|
93
|
-
nonExistsDirPaths.forEach(path => this.logger.warn(`no such file or directory: ${path}`));
|
|
94
|
-
const existsDirPaths = dirPaths.filter(path => (0, _fsExtra().existsSync)(path));
|
|
95
|
-
return existsDirPaths;
|
|
96
|
-
}
|
|
97
|
-
findRuntime(dirPath, runtime) {
|
|
98
|
-
const files = (0, _fsExtra().readdirSync)((0, _path().join)(dirPath, 'dist'));
|
|
99
|
-
return files.find(path => path.includes(`${runtime}.runtime.js`));
|
|
100
|
-
}
|
|
101
|
-
findAspectFile(dirPath) {
|
|
102
|
-
const files = (0, _fsExtra().readdirSync)((0, _path().join)(dirPath, 'dist'));
|
|
103
|
-
return files.find(path => path.includes(`.aspect.js`));
|
|
104
|
-
}
|
|
105
|
-
async loadAspectFromPath(localAspects) {
|
|
106
|
-
const dirPaths = this.parseLocalAspect(localAspects);
|
|
107
|
-
const manifests = dirPaths.map(dirPath => {
|
|
108
|
-
const scopeRuntime = this.findRuntime(dirPath, 'scope');
|
|
109
|
-
if (scopeRuntime) {
|
|
110
|
-
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
111
|
-
const module = require((0, _path().join)(dirPath, 'dist', scopeRuntime));
|
|
112
|
-
return module.default || module;
|
|
113
|
-
}
|
|
114
|
-
// eslint-disable-next-line global-require, import/no-dynamic-require
|
|
115
|
-
const module = require(dirPath);
|
|
116
|
-
return module.default || module;
|
|
117
|
-
});
|
|
118
|
-
await this.aspectLoader.loadExtensionsByManifests(manifests, undefined, {
|
|
119
|
-
throwOnError: true
|
|
120
|
-
});
|
|
121
78
|
}
|
|
122
79
|
async loadAspects(ids, throwOnError = false, neededFor, lane, opts) {
|
|
123
80
|
var _grouped$envs, _grouped$other;
|
|
@@ -214,7 +171,7 @@ needed-for: ${neededFor || '<unknown>'}`);
|
|
|
214
171
|
const localAspects = ids.filter(id => id.startsWith('file://'));
|
|
215
172
|
this.scope.localAspects = (0, _lodash().uniq)(this.scope.localAspects.concat(localAspects));
|
|
216
173
|
// load local aspects for debugging purposes.
|
|
217
|
-
await this.loadAspectFromPath(localAspects);
|
|
174
|
+
await this.aspectLoader.loadAspectFromPath(localAspects);
|
|
218
175
|
const componentIds = await this.scope.resolveMultipleComponentIds(aspectIds);
|
|
219
176
|
if (!componentIds || !componentIds.length) return [];
|
|
220
177
|
const components = await this.scope.import(componentIds, {
|
|
@@ -224,17 +181,6 @@ needed-for: ${neededFor || '<unknown>'}`);
|
|
|
224
181
|
});
|
|
225
182
|
return components;
|
|
226
183
|
}
|
|
227
|
-
async resolveLocalAspects(ids, runtime) {
|
|
228
|
-
const dirs = this.parseLocalAspect(ids);
|
|
229
|
-
return dirs.map(dir => {
|
|
230
|
-
const srcRuntimeManifest = runtime ? this.findRuntime(dir, runtime) : undefined;
|
|
231
|
-
const srcAspectFilePath = runtime ? this.findAspectFile(dir) : undefined;
|
|
232
|
-
const aspectFilePath = srcAspectFilePath ? (0, _path().join)(dir, 'dist', srcAspectFilePath) : null;
|
|
233
|
-
const runtimeManifest = srcRuntimeManifest ? (0, _path().join)(dir, 'dist', srcRuntimeManifest) : null;
|
|
234
|
-
const aspectId = aspectFilePath ? this.aspectLoader.getAspectIdFromAspectFile(aspectFilePath) : undefined;
|
|
235
|
-
return new (_aspectLoader().AspectDefinition)(dir, aspectFilePath, runtimeManifest, undefined, aspectId, true);
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
184
|
async getResolvedAspects(components, opts) {
|
|
239
185
|
var _opts$skipIfExists;
|
|
240
186
|
if (!components || !components.length) return [];
|
|
@@ -443,7 +389,7 @@ needed-for: ${neededFor || '<unknown>'}`);
|
|
|
443
389
|
} else {
|
|
444
390
|
userAspectsIds = await this.scope.resolveMultipleComponentIds(this.aspectLoader.getUserAspects());
|
|
445
391
|
}
|
|
446
|
-
const localResolved = await this.resolveLocalAspects(this.scope.localAspects, runtimeName);
|
|
392
|
+
const localResolved = await this.aspectLoader.resolveLocalAspects(this.scope.localAspects, runtimeName);
|
|
447
393
|
const withoutLocalAspects = userAspectsIds.filter(aspectId => {
|
|
448
394
|
return !localResolved.find(localAspect => {
|
|
449
395
|
return localAspect.id === aspectId.toStringWithoutVersion();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ScopeAspectsLoader","constructor","scope","aspectLoader","envs","isolator","logger","globalConfig","parseLocalAspect","localAspects","dirPaths","map","localAspect","resolve","replace","nonExistsDirPaths","filter","path","existsSync","forEach","warn","existsDirPaths","findRuntime","dirPath","runtime","files","readdirSync","join","find","includes","findAspectFile","loadAspectFromPath","manifests","scopeRuntime","module","require","default","loadExtensionsByManifests","undefined","throwOnError","loadAspects","ids","neededFor","lane","opts","length","callId","Math","floor","random","loggerPrefix","info","grouped","groupAspectIdsByEnvOfTheList","envsManifestsIds","getManifestsAndLoadAspects","other","otherManifestsIds","debug","concat","components","getNonLoadedAspects","envsIds","uniq","component","getEnvId","envId","isCoreEnv","groupBy","id","scopeManifests","potentialPluginsIds","getManifestsGraphRecursively","scopePluginsManifests","allManifests","compact","manifest","visited","nonVisitedId","customEnvsIds","push","requireAspects","index","isValidAspect","toString","depsToLoad","mapSeries","dependencies","_runtimes","depIds","d","loaded","notLoadedIds","isAspectLoaded","coreAspectsStringIds","getCoreAspectIds","idsWithoutCore","difference","aspectIds","startsWith","componentIds","resolveMultipleComponentIds","import","reFetchUnBuiltVersion","preferDependencyGraph","resolveLocalAspects","dirs","dir","srcRuntimeManifest","srcAspectFilePath","aspectFilePath","runtimeManifest","aspectId","getAspectIdFromAspectFile","AspectDefinition","getResolvedAspects","useHash","shouldUseHashForCapsules","useDatedDirs","shouldUseDatedCapsules","network","isolateComponents","c","baseDir","getAspectCapsulePath","skipIfExists","seedersOnly","includeFromNestedHosts","installOptions","copyPeerToRuntimeOnRoot","packageManagerConfigRootDir","useNesting","copyPeerToRuntimeOnComponents","installPeersFromEnvs","context","aspects","workspaceName","legacyScope","capsules","seedersCapsules","capsule","RequireableComponent","plugins","getPlugins","has","compileIfNoDist","load","MainRuntime","name","aspect","getRuntimePath","mainRuntime","runtimePath","env","getEnv","compiler","getCompiler","distDir","DEFAULT_DIST_DIRNAME","distExists","compiledCode","filesystem","flatMap","file","isFileSupported","outputText","contents","outputPath","transpileFile","filePath","componentDir","Promise","all","compiledFile","getDistPathBySrcPath","outputFile","tryCompile","requirableAspect","requireableExtensions","error","erroredId","requireWithCatch","requireableAspects","requireableExtension","doRequire","err","code","newErr","resolvedAspectsAgain","manifestAgain","handleExtensionLoadingError","getSync","CFG_USE_DATED_CAPSULES","defaultPath","isGlobalScope","CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR","CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR","resolveUserAspects","runtimeName","userAspectsIds","getMany","host","aspectDefs","resolveAspects","getCapsule","Error","localPath","getAspectFilePath","aspectPath","originalStringIds","defaultOpts","excludeCore","requestedOnly","filterByRuntime","mergedOpts","coreAspectsIds","groupedByIsCore","false","getUserAspects","localResolved","withoutLocalAspects","toStringWithoutVersion","userAspectsDefs","coreAspectsDefs","getCoreAspectDefs","allDefs","filteredDefs","filterAspectDefs"],"sources":["scope-aspects-loader.ts"],"sourcesContent":["import { GlobalConfigMain } from '@teambit/global-config';\nimport mapSeries from 'p-map-series';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { readdirSync, existsSync } from 'fs-extra';\nimport { resolve, join } from 'path';\nimport {\n DEFAULT_DIST_DIRNAME,\n CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR,\n CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR,\n CFG_USE_DATED_CAPSULES,\n} from '@teambit/legacy/dist/constants';\nimport { Compiler } from '@teambit/compiler';\nimport { Capsule, IsolatorMain } from '@teambit/isolator';\nimport { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';\nimport { compact, uniq, difference, groupBy } from 'lodash';\nimport { MainRuntime } from '@teambit/cli';\nimport { RequireableComponent } from '@teambit/harmony.modules.requireable-component';\nimport { ExtensionManifest, Aspect } from '@teambit/harmony';\nimport { Component, ComponentID, LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';\nimport { ScopeMain } from '@teambit/scope';\nimport { Logger } from '@teambit/logger';\nimport { EnvsMain } from '@teambit/envs';\n\ntype ManifestOrAspect = ExtensionManifest | Aspect;\n\nexport type ScopeLoadAspectsOptions = LoadAspectsOptions & {\n useScopeAspectsCapsule?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n};\n\nexport class ScopeAspectsLoader {\n private resolvedInstalledAspects: Map<string, string | null>;\n\n constructor(\n private scope: ScopeMain,\n private aspectLoader: AspectLoaderMain,\n private envs: EnvsMain,\n private isolator: IsolatorMain,\n private logger: Logger,\n private globalConfig: GlobalConfigMain\n ) {}\n private parseLocalAspect(localAspects: string[]) {\n const dirPaths = localAspects.map((localAspect) => resolve(localAspect.replace('file://', '')));\n const nonExistsDirPaths = dirPaths.filter((path) => !existsSync(path));\n nonExistsDirPaths.forEach((path) => this.logger.warn(`no such file or directory: ${path}`));\n const existsDirPaths = dirPaths.filter((path) => existsSync(path));\n return existsDirPaths;\n }\n\n private findRuntime(dirPath: string, runtime: string) {\n const files = readdirSync(join(dirPath, 'dist'));\n return files.find((path) => path.includes(`${runtime}.runtime.js`));\n }\n\n private findAspectFile(dirPath: string) {\n const files = readdirSync(join(dirPath, 'dist'));\n return files.find((path) => path.includes(`.aspect.js`));\n }\n\n private async loadAspectFromPath(localAspects: string[]) {\n const dirPaths = this.parseLocalAspect(localAspects);\n const manifests = dirPaths.map((dirPath) => {\n const scopeRuntime = this.findRuntime(dirPath, 'scope');\n if (scopeRuntime) {\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const module = require(join(dirPath, 'dist', scopeRuntime));\n return module.default || module;\n }\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const module = require(dirPath);\n return module.default || module;\n });\n\n await this.aspectLoader.loadExtensionsByManifests(manifests, undefined, { throwOnError: true });\n }\n\n private localAspects: string[] = [];\n\n async loadAspects(\n ids: string[],\n throwOnError = false,\n neededFor?: string,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n if (!ids.length) return [];\n // generate a random callId to be able to identify the call from the logs\n const callId = Math.floor(Math.random() * 1000);\n const loggerPrefix = `[${callId}] loadAspects,`;\n this.logger.info(`${loggerPrefix} loading ${ids.length} aspects.\nids: ${ids.join(', ')}\nneeded-for: ${neededFor || '<unknown>'}`);\n const grouped = await this.groupAspectIdsByEnvOfTheList(ids, lane);\n this.logger.info(`${loggerPrefix} getManifestsAndLoadAspects for grouped.envs, total ${grouped.envs?.length || 0}`);\n const envsManifestsIds = await this.getManifestsAndLoadAspects(grouped.envs, throwOnError, lane, opts);\n this.logger.info(\n `${loggerPrefix} getManifestsAndLoadAspects for grouped.other, total ${grouped.other?.length || 0}`\n );\n const otherManifestsIds = await this.getManifestsAndLoadAspects(grouped.other, throwOnError, lane, opts);\n this.logger.debug(`${loggerPrefix} finish loading aspects`);\n return envsManifestsIds.concat(otherManifestsIds);\n }\n\n /**\n * This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list\n * @param ids\n */\n async groupAspectIdsByEnvOfTheList(ids: string[], lane?: Lane): Promise<{ envs?: string[]; other?: string[] }> {\n const components = await this.getNonLoadedAspects(ids, lane);\n const envsIds = uniq(\n components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId))\n );\n const grouped = groupBy(ids, (id) => {\n if (envsIds.includes(id)) return 'envs';\n return 'other';\n });\n return grouped as { envs: string[]; other: string[] };\n }\n\n private async getManifestsAndLoadAspects(\n ids: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n const { manifests: scopeManifests, potentialPluginsIds } = await this.getManifestsGraphRecursively(\n ids,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopeManifests);\n const { manifests: scopePluginsManifests } = await this.getManifestsGraphRecursively(\n potentialPluginsIds,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopePluginsManifests);\n const allManifests = scopeManifests.concat(scopePluginsManifests);\n return compact(allManifests.map((manifest) => manifest.id));\n }\n\n async getManifestsGraphRecursively(\n ids: string[],\n visited: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts: {\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n } = {}\n ): Promise<{ manifests: ManifestOrAspect[]; potentialPluginsIds: string[] }> {\n ids = uniq(ids);\n this.logger.debug(`getManifestsGraphRecursively, ids:\\n${ids.join('\\n')}`);\n const nonVisitedId = ids.filter((id) => !visited.includes(id));\n if (!nonVisitedId.length) {\n return { manifests: [], potentialPluginsIds: [] };\n }\n const components = await this.getNonLoadedAspects(nonVisitedId, lane);\n // Adding all the envs ids to the array to support case when one (or more) of the aspects has custom aspect env\n const customEnvsIds = components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId));\n // In case there is custom env we need to load it right away, otherwise we will fail during the require aspects\n await this.getManifestsAndLoadAspects(customEnvsIds, undefined, lane);\n visited.push(...nonVisitedId);\n const manifests = await this.requireAspects(components, throwOnError, opts);\n const potentialPluginsIds = compact(\n manifests.map((manifest, index) => {\n if (this.aspectLoader.isValidAspect(manifest)) return undefined;\n // return index;\n return components[index].id.toString();\n })\n );\n\n const depsToLoad: Array<ExtensionManifest | Aspect> = [];\n await mapSeries(manifests, async (manifest) => {\n depsToLoad.push(...(manifest.dependencies || []));\n // @ts-ignore\n (manifest._runtimes || []).forEach((runtime) => {\n depsToLoad.push(...(runtime.dependencies || []));\n });\n const depIds = depsToLoad.map((d) => d.id).filter((id) => id) as string[];\n this.logger.debug(\n `getManifestsGraphRecursively, id: ${manifest.id || '<unknown>'}, found ${depIds.length}: ${depIds.join(', ')}`\n );\n const { manifests: loaded } = await this.getManifestsGraphRecursively(depIds, visited, throwOnError, lane);\n manifests.push(...loaded);\n });\n\n return { manifests, potentialPluginsIds };\n }\n\n private async getNonLoadedAspects(ids: string[], lane?: Lane): Promise<Component[]> {\n const notLoadedIds = ids.filter((id) => !this.aspectLoader.isAspectLoaded(id));\n if (!notLoadedIds.length) return [];\n const coreAspectsStringIds = this.aspectLoader.getCoreAspectIds();\n const idsWithoutCore: string[] = difference(ids, coreAspectsStringIds);\n const aspectIds = idsWithoutCore.filter((id) => !id.startsWith('file://'));\n // TODO: use diff instead of filter twice\n const localAspects = ids.filter((id) => id.startsWith('file://'));\n this.scope.localAspects = uniq(this.scope.localAspects.concat(localAspects));\n // load local aspects for debugging purposes.\n await this.loadAspectFromPath(localAspects);\n const componentIds = await this.scope.resolveMultipleComponentIds(aspectIds);\n if (!componentIds || !componentIds.length) return [];\n const components = await this.scope.import(componentIds, {\n reFetchUnBuiltVersion: false,\n preferDependencyGraph: true,\n lane,\n });\n\n return components;\n }\n\n private async resolveLocalAspects(ids: string[], runtime?: string): Promise<AspectDefinition[]> {\n const dirs = this.parseLocalAspect(ids);\n\n return dirs.map((dir) => {\n const srcRuntimeManifest = runtime ? this.findRuntime(dir, runtime) : undefined;\n const srcAspectFilePath = runtime ? this.findAspectFile(dir) : undefined;\n const aspectFilePath = srcAspectFilePath ? join(dir, 'dist', srcAspectFilePath) : null;\n const runtimeManifest = srcRuntimeManifest ? join(dir, 'dist', srcRuntimeManifest) : null;\n const aspectId = aspectFilePath ? this.aspectLoader.getAspectIdFromAspectFile(aspectFilePath) : undefined;\n\n return new AspectDefinition(dir, aspectFilePath, runtimeManifest, undefined, aspectId, true);\n });\n }\n\n async getResolvedAspects(\n components: Component[],\n opts?: { skipIfExists?: boolean; packageManagerConfigRootDir?: string; workspaceName?: string }\n ): Promise<RequireableComponent[]> {\n if (!components || !components.length) return [];\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const network = await this.isolator.isolateComponents(\n components.map((c) => c.id),\n // includeFromNestedHosts - to support case when you are in a workspace, trying to load aspect defined in the workspace.jsonc but not part of the workspace\n {\n baseDir: this.getAspectCapsulePath(),\n useHash,\n useDatedDirs,\n skipIfExists: opts?.skipIfExists ?? true,\n seedersOnly: true,\n includeFromNestedHosts: true,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n packageManagerConfigRootDir: opts?.packageManagerConfigRootDir,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n context: {\n aspects: true,\n workspaceName: opts?.workspaceName,\n },\n },\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n\n return capsules.map((capsule) => {\n return new RequireableComponent(\n capsule.component,\n async () => {\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const plugins = this.aspectLoader.getPlugins(capsule.component, capsule.path);\n if (plugins.has()) {\n await this.compileIfNoDist(capsule, capsule.component);\n return plugins.load(MainRuntime.name);\n }\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const aspect = require(capsule.path);\n const scopeRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, 'scope');\n const mainRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, MainRuntime.name);\n const runtimePath = scopeRuntime || mainRuntime;\n // eslint-disable-next-line global-require, import/no-dynamic-require\n if (runtimePath) require(runtimePath);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n return aspect;\n },\n capsule\n );\n });\n }\n\n private async compileIfNoDist(capsule: Capsule, component: Component) {\n const env = this.envs.getEnv(component);\n const compiler: Compiler = env.env.getCompiler();\n const distDir = compiler?.distDir || DEFAULT_DIST_DIRNAME;\n const distExists = existsSync(join(capsule.path, distDir));\n if (distExists) return;\n\n const compiledCode = component.filesystem.files.flatMap((file) => {\n if (!compiler.isFileSupported(file.path)) {\n return [\n {\n outputText: file.contents.toString('utf8'),\n outputPath: file.path,\n },\n ];\n }\n\n if (compiler.transpileFile) {\n return compiler.transpileFile(file.contents.toString('utf8'), {\n filePath: file.path,\n componentDir: capsule.path,\n });\n }\n\n return [];\n });\n\n await Promise.all(\n compact(compiledCode).map((compiledFile) => {\n const path = compiler.getDistPathBySrcPath(compiledFile.outputPath);\n return capsule?.outputFile(path, compiledFile.outputText);\n })\n );\n }\n\n private async tryCompile(requirableAspect: RequireableComponent) {\n if (requirableAspect.capsule) return this.compileIfNoDist(requirableAspect.capsule, requirableAspect.component);\n return undefined;\n }\n\n async requireAspects(\n components: Component[],\n throwOnError = false,\n opts: { packageManagerConfigRootDir?: string; workspaceName?: string } = {}\n ): Promise<Array<ExtensionManifest | Aspect>> {\n const requireableExtensions = await this.getResolvedAspects(components, opts);\n if (!requireableExtensions) {\n return [];\n }\n let error: any;\n let erroredId = '';\n const requireWithCatch = async (requireableAspects: RequireableComponent[]) => {\n error = undefined;\n try {\n const manifests = await mapSeries(requireableAspects, async (requireableExtension) => {\n try {\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (err: any) {\n erroredId = requireableExtension.component.id.toString();\n if (err.code === 'MODULE_NOT_FOUND') {\n try {\n await this.tryCompile(requireableExtension);\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (newErr: any) {\n error = newErr;\n throw newErr;\n }\n }\n error = err;\n throw err;\n }\n });\n return manifests;\n } catch (err) {\n return null;\n }\n };\n const manifests = await requireWithCatch(requireableExtensions);\n if (!error) {\n return compact(manifests);\n }\n if (error.code === 'MODULE_NOT_FOUND') {\n this.logger.warn(\n `failed loading aspects from capsules due to MODULE_NOT_FOUND error, re-creating the capsules and trying again`\n );\n const resolvedAspectsAgain = await this.getResolvedAspects(components, {\n ...opts,\n skipIfExists: false,\n });\n const manifestAgain = await requireWithCatch(resolvedAspectsAgain);\n if (!error) {\n return compact(manifestAgain);\n }\n }\n\n this.aspectLoader.handleExtensionLoadingError(error, erroredId, throwOnError);\n return [];\n }\n\n shouldUseDatedCapsules(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_USE_DATED_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n getAspectCapsulePath() {\n const defaultPath = `${this.scope.path}-aspects`;\n if (this.scope.isGlobalScope) {\n return this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR) || defaultPath;\n }\n return this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR) || defaultPath;\n }\n\n shouldUseHashForCapsules(): boolean {\n if (this.scope.isGlobalScope) {\n return !this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR);\n }\n return !this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR);\n }\n\n private async resolveUserAspects(\n runtimeName?: string,\n userAspectsIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n if (!userAspectsIds || !userAspectsIds.length) return [];\n const components = await this.scope.getMany(userAspectsIds);\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const network = await this.isolator.isolateComponents(\n userAspectsIds,\n {\n baseDir: this.getAspectCapsulePath(),\n useHash,\n useDatedDirs,\n skipIfExists: true,\n // for some reason this needs to be false, otherwise tagging components in some workspaces\n // result in error during Preview task:\n // \"No matching version found for <some-component-on-the-workspace>\"\n seedersOnly: true,\n includeFromNestedHosts: true,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n host: this.scope,\n context: {\n aspects: true,\n workspaceName: opts?.workspaceName,\n },\n },\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n const aspectDefs = await this.aspectLoader.resolveAspects(components, async (component) => {\n const capsule = capsules.getCapsule(component.id);\n if (!capsule) throw new Error(`failed loading aspect: ${component.id.toString()}`);\n const localPath = capsule.path;\n const runtimePath = runtimeName\n ? await this.aspectLoader.getRuntimePath(component, localPath, runtimeName)\n : null;\n const aspectFilePath = await this.aspectLoader.getAspectFilePath(component, localPath);\n\n this.logger.debug(\n `scope resolveUserAspects, resolving id: ${component.id.toString()}, localPath: ${localPath}, runtimePath: ${runtimePath}`\n );\n\n return {\n id: capsule.component.id,\n aspectPath: localPath,\n aspectFilePath,\n runtimePath,\n };\n });\n return aspectDefs;\n }\n\n async resolveAspects(\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n const originalStringIds = componentIds?.map((id) => id.toString());\n this.logger.debug(`scope resolveAspects, runtimeName: ${runtimeName}, componentIds: ${originalStringIds}`);\n\n const defaultOpts: ResolveAspectsOptions = {\n excludeCore: false,\n requestedOnly: false,\n filterByRuntime: true,\n };\n const mergedOpts = { ...defaultOpts, ...opts };\n const coreAspectsIds = this.aspectLoader.getCoreAspectIds();\n let userAspectsIds: ComponentID[];\n // let requestedCoreStringIds;\n if (componentIds && componentIds.length) {\n const groupedByIsCore = groupBy(componentIds, (id) => coreAspectsIds.includes(id.toString()));\n userAspectsIds = groupedByIsCore.false || [];\n // requestedCoreStringIds = groupedByIsCore.true?.map((id) => id.toStringWithoutVersion()) || [];\n } else {\n userAspectsIds = await this.scope.resolveMultipleComponentIds(this.aspectLoader.getUserAspects());\n }\n const localResolved = await this.resolveLocalAspects(this.scope.localAspects, runtimeName);\n\n const withoutLocalAspects = userAspectsIds.filter((aspectId) => {\n return !localResolved.find((localAspect) => {\n return localAspect.id === aspectId.toStringWithoutVersion();\n });\n });\n const userAspectsDefs = await this.resolveUserAspects(runtimeName, withoutLocalAspects, opts);\n const coreAspectsDefs = await this.aspectLoader.getCoreAspectDefs(runtimeName);\n\n const allDefs = userAspectsDefs.concat(coreAspectsDefs).concat(localResolved);\n // const userAspectsIdsWithoutVersion = userAspectsIds.map((aspectId) => aspectId.toStringWithoutVersion());\n // const userAspectsIdsWithoutVersionAndCoreRequested = userAspectsIdsWithoutVersion.concat(requestedCoreStringIds);\n const filteredDefs = this.aspectLoader.filterAspectDefs(\n allDefs,\n componentIds || userAspectsIds,\n runtimeName,\n mergedOpts\n );\n return filteredDefs;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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;AAQA;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;AAAsF;AAAA;AAe/E,MAAMA,kBAAkB,CAAC;EAG9BC,WAAW,CACDC,KAAgB,EAChBC,YAA8B,EAC9BC,IAAc,EACdC,QAAsB,EACtBC,MAAc,EACdC,YAA8B,EACtC;IAAA,KANQL,KAAgB,GAAhBA,KAAgB;IAAA,KAChBC,YAA8B,GAA9BA,YAA8B;IAAA,KAC9BC,IAAc,GAAdA,IAAc;IAAA,KACdC,QAAsB,GAAtBA,QAAsB;IAAA,KACtBC,MAAc,GAAdA,MAAc;IAAA,KACdC,YAA8B,GAA9BA,YAA8B;IAAA;IAAA,sDAqCP,EAAE;EApChC;EACKC,gBAAgB,CAACC,YAAsB,EAAE;IAC/C,MAAMC,QAAQ,GAAGD,YAAY,CAACE,GAAG,CAAEC,WAAW,IAAK,IAAAC,eAAO,EAACD,WAAW,CAACE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/F,MAAMC,iBAAiB,GAAGL,QAAQ,CAACM,MAAM,CAAEC,IAAI,IAAK,CAAC,IAAAC,qBAAU,EAACD,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AACuN,cAAc,EAAE,CAAC;IACnG;IACA,MAAMC,aAAa,GAAG,MAAM,IAAI,CAAClH,mBAAmB,CAAC,IAAI,CAACvG,KAAK,CAACO,YAAY,EAAE6L,WAAW,CAAC;IAE1F,MAAMsB,mBAAmB,GAAGrB,cAAc,CAACvL,MAAM,CAAEgG,QAAQ,IAAK;MAC9D,OAAO,CAAC2G,aAAa,CAAC/L,IAAI,CAAEhB,WAAW,IAAK;QAC1C,OAAOA,WAAW,CAACyD,EAAE,KAAK2C,QAAQ,CAAC6G,sBAAsB,EAAE;MAC7D,CAAC,CAAC;IACJ,CAAC,CAAC;IACF,MAAMC,eAAe,GAAG,MAAM,IAAI,CAACzB,kBAAkB,CAACC,WAAW,EAAEsB,mBAAmB,EAAEhL,IAAI,CAAC;IAC7F,MAAMmL,eAAe,GAAG,MAAM,IAAI,CAAC5N,YAAY,CAAC6N,iBAAiB,CAAC1B,WAAW,CAAC;IAE9E,MAAM2B,OAAO,GAAGH,eAAe,CAACnK,MAAM,CAACoK,eAAe,CAAC,CAACpK,MAAM,CAACgK,aAAa,CAAC;IAC7E;IACA;IACA,MAAMO,YAAY,GAAG,IAAI,CAAC/N,YAAY,CAACgO,gBAAgB,CACrDF,OAAO,EACP7H,YAAY,IAAImG,cAAc,EAC9BD,WAAW,EACXgB,UAAU,CACX;IACD,OAAOY,YAAY;EACrB;AACF;AAAC"}
|
|
1
|
+
{"version":3,"names":["ScopeAspectsLoader","constructor","scope","aspectLoader","envs","isolator","logger","globalConfig","loadAspects","ids","throwOnError","neededFor","lane","opts","length","callId","Math","floor","random","loggerPrefix","info","join","grouped","groupAspectIdsByEnvOfTheList","envsManifestsIds","getManifestsAndLoadAspects","other","otherManifestsIds","debug","concat","components","getNonLoadedAspects","envsIds","uniq","map","component","getEnvId","filter","envId","isCoreEnv","groupBy","id","includes","manifests","scopeManifests","potentialPluginsIds","getManifestsGraphRecursively","loadExtensionsByManifests","scopePluginsManifests","allManifests","compact","manifest","visited","nonVisitedId","customEnvsIds","undefined","push","requireAspects","index","isValidAspect","toString","depsToLoad","mapSeries","dependencies","_runtimes","forEach","runtime","depIds","d","loaded","notLoadedIds","isAspectLoaded","coreAspectsStringIds","getCoreAspectIds","idsWithoutCore","difference","aspectIds","startsWith","localAspects","loadAspectFromPath","componentIds","resolveMultipleComponentIds","import","reFetchUnBuiltVersion","preferDependencyGraph","getResolvedAspects","useHash","shouldUseHashForCapsules","useDatedDirs","shouldUseDatedCapsules","network","isolateComponents","c","baseDir","getAspectCapsulePath","skipIfExists","seedersOnly","includeFromNestedHosts","installOptions","copyPeerToRuntimeOnRoot","packageManagerConfigRootDir","useNesting","copyPeerToRuntimeOnComponents","installPeersFromEnvs","context","aspects","workspaceName","legacyScope","capsules","seedersCapsules","capsule","RequireableComponent","plugins","getPlugins","path","has","compileIfNoDist","load","MainRuntime","name","aspect","require","scopeRuntime","getRuntimePath","mainRuntime","runtimePath","env","getEnv","compiler","getCompiler","distDir","DEFAULT_DIST_DIRNAME","distExists","existsSync","compiledCode","filesystem","files","flatMap","file","isFileSupported","outputText","contents","outputPath","transpileFile","filePath","componentDir","Promise","all","compiledFile","getDistPathBySrcPath","outputFile","tryCompile","requirableAspect","requireableExtensions","error","erroredId","requireWithCatch","requireableAspects","requireableExtension","doRequire","err","code","newErr","warn","resolvedAspectsAgain","manifestAgain","handleExtensionLoadingError","getSync","CFG_USE_DATED_CAPSULES","defaultPath","isGlobalScope","CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR","CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR","resolveUserAspects","runtimeName","userAspectsIds","getMany","host","aspectDefs","resolveAspects","getCapsule","Error","localPath","aspectFilePath","getAspectFilePath","aspectPath","originalStringIds","defaultOpts","excludeCore","requestedOnly","filterByRuntime","mergedOpts","coreAspectsIds","groupedByIsCore","false","getUserAspects","localResolved","resolveLocalAspects","withoutLocalAspects","aspectId","find","localAspect","toStringWithoutVersion","userAspectsDefs","coreAspectsDefs","getCoreAspectDefs","allDefs","filteredDefs","filterAspectDefs"],"sources":["scope-aspects-loader.ts"],"sourcesContent":["import { GlobalConfigMain } from '@teambit/global-config';\nimport mapSeries from 'p-map-series';\nimport { Lane } from '@teambit/legacy/dist/scope/models';\nimport { existsSync } from 'fs-extra';\nimport { join } from 'path';\nimport {\n DEFAULT_DIST_DIRNAME,\n CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR,\n CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR,\n CFG_USE_DATED_CAPSULES,\n} from '@teambit/legacy/dist/constants';\nimport { Compiler } from '@teambit/compiler';\nimport { Capsule, IsolatorMain } from '@teambit/isolator';\nimport { AspectLoaderMain, AspectDefinition } from '@teambit/aspect-loader';\nimport { compact, uniq, difference, groupBy } from 'lodash';\nimport { MainRuntime } from '@teambit/cli';\nimport { RequireableComponent } from '@teambit/harmony.modules.requireable-component';\nimport { ExtensionManifest, Aspect } from '@teambit/harmony';\nimport { Component, ComponentID, LoadAspectsOptions, ResolveAspectsOptions } from '@teambit/component';\nimport { ScopeMain } from '@teambit/scope';\nimport { Logger } from '@teambit/logger';\nimport { EnvsMain } from '@teambit/envs';\n\ntype ManifestOrAspect = ExtensionManifest | Aspect;\n\nexport type ScopeLoadAspectsOptions = LoadAspectsOptions & {\n useScopeAspectsCapsule?: boolean;\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n};\n\nexport class ScopeAspectsLoader {\n constructor(\n private scope: ScopeMain,\n private aspectLoader: AspectLoaderMain,\n private envs: EnvsMain,\n private isolator: IsolatorMain,\n private logger: Logger,\n private globalConfig: GlobalConfigMain\n ) {}\n\n async loadAspects(\n ids: string[],\n throwOnError = false,\n neededFor?: string,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n if (!ids.length) return [];\n // generate a random callId to be able to identify the call from the logs\n const callId = Math.floor(Math.random() * 1000);\n const loggerPrefix = `[${callId}] loadAspects,`;\n this.logger.info(`${loggerPrefix} loading ${ids.length} aspects.\nids: ${ids.join(', ')}\nneeded-for: ${neededFor || '<unknown>'}`);\n const grouped = await this.groupAspectIdsByEnvOfTheList(ids, lane);\n this.logger.info(`${loggerPrefix} getManifestsAndLoadAspects for grouped.envs, total ${grouped.envs?.length || 0}`);\n const envsManifestsIds = await this.getManifestsAndLoadAspects(grouped.envs, throwOnError, lane, opts);\n this.logger.info(\n `${loggerPrefix} getManifestsAndLoadAspects for grouped.other, total ${grouped.other?.length || 0}`\n );\n const otherManifestsIds = await this.getManifestsAndLoadAspects(grouped.other, throwOnError, lane, opts);\n this.logger.debug(`${loggerPrefix} finish loading aspects`);\n return envsManifestsIds.concat(otherManifestsIds);\n }\n\n /**\n * This function get's a list of aspect ids and return them grouped by whether any of them is the env of other from the list\n * @param ids\n */\n async groupAspectIdsByEnvOfTheList(ids: string[], lane?: Lane): Promise<{ envs?: string[]; other?: string[] }> {\n const components = await this.getNonLoadedAspects(ids, lane);\n const envsIds = uniq(\n components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId))\n );\n const grouped = groupBy(ids, (id) => {\n if (envsIds.includes(id)) return 'envs';\n return 'other';\n });\n return grouped as { envs: string[]; other: string[] };\n }\n\n private async getManifestsAndLoadAspects(\n ids: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts?: ScopeLoadAspectsOptions\n ): Promise<string[]> {\n const { manifests: scopeManifests, potentialPluginsIds } = await this.getManifestsGraphRecursively(\n ids,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopeManifests);\n const { manifests: scopePluginsManifests } = await this.getManifestsGraphRecursively(\n potentialPluginsIds,\n [],\n throwOnError,\n lane,\n opts\n );\n await this.aspectLoader.loadExtensionsByManifests(scopePluginsManifests);\n const allManifests = scopeManifests.concat(scopePluginsManifests);\n return compact(allManifests.map((manifest) => manifest.id));\n }\n\n async getManifestsGraphRecursively(\n ids: string[],\n visited: string[] = [],\n throwOnError = false,\n lane?: Lane,\n opts: {\n packageManagerConfigRootDir?: string;\n workspaceName?: string;\n } = {}\n ): Promise<{ manifests: ManifestOrAspect[]; potentialPluginsIds: string[] }> {\n ids = uniq(ids);\n this.logger.debug(`getManifestsGraphRecursively, ids:\\n${ids.join('\\n')}`);\n const nonVisitedId = ids.filter((id) => !visited.includes(id));\n if (!nonVisitedId.length) {\n return { manifests: [], potentialPluginsIds: [] };\n }\n const components = await this.getNonLoadedAspects(nonVisitedId, lane);\n // Adding all the envs ids to the array to support case when one (or more) of the aspects has custom aspect env\n const customEnvsIds = components\n .map((component) => this.envs.getEnvId(component))\n .filter((envId) => !this.aspectLoader.isCoreEnv(envId));\n // In case there is custom env we need to load it right away, otherwise we will fail during the require aspects\n await this.getManifestsAndLoadAspects(customEnvsIds, undefined, lane);\n visited.push(...nonVisitedId);\n const manifests = await this.requireAspects(components, throwOnError, opts);\n const potentialPluginsIds = compact(\n manifests.map((manifest, index) => {\n if (this.aspectLoader.isValidAspect(manifest)) return undefined;\n // return index;\n return components[index].id.toString();\n })\n );\n\n const depsToLoad: Array<ExtensionManifest | Aspect> = [];\n await mapSeries(manifests, async (manifest) => {\n depsToLoad.push(...(manifest.dependencies || []));\n // @ts-ignore\n (manifest._runtimes || []).forEach((runtime) => {\n depsToLoad.push(...(runtime.dependencies || []));\n });\n const depIds = depsToLoad.map((d) => d.id).filter((id) => id) as string[];\n this.logger.debug(\n `getManifestsGraphRecursively, id: ${manifest.id || '<unknown>'}, found ${depIds.length}: ${depIds.join(', ')}`\n );\n const { manifests: loaded } = await this.getManifestsGraphRecursively(depIds, visited, throwOnError, lane);\n manifests.push(...loaded);\n });\n\n return { manifests, potentialPluginsIds };\n }\n\n private async getNonLoadedAspects(ids: string[], lane?: Lane): Promise<Component[]> {\n const notLoadedIds = ids.filter((id) => !this.aspectLoader.isAspectLoaded(id));\n if (!notLoadedIds.length) return [];\n const coreAspectsStringIds = this.aspectLoader.getCoreAspectIds();\n const idsWithoutCore: string[] = difference(ids, coreAspectsStringIds);\n const aspectIds = idsWithoutCore.filter((id) => !id.startsWith('file://'));\n // TODO: use diff instead of filter twice\n const localAspects = ids.filter((id) => id.startsWith('file://'));\n this.scope.localAspects = uniq(this.scope.localAspects.concat(localAspects));\n // load local aspects for debugging purposes.\n await this.aspectLoader.loadAspectFromPath(localAspects);\n const componentIds = await this.scope.resolveMultipleComponentIds(aspectIds);\n if (!componentIds || !componentIds.length) return [];\n const components = await this.scope.import(componentIds, {\n reFetchUnBuiltVersion: false,\n preferDependencyGraph: true,\n lane,\n });\n\n return components;\n }\n\n async getResolvedAspects(\n components: Component[],\n opts?: { skipIfExists?: boolean; packageManagerConfigRootDir?: string; workspaceName?: string }\n ): Promise<RequireableComponent[]> {\n if (!components || !components.length) return [];\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const network = await this.isolator.isolateComponents(\n components.map((c) => c.id),\n // includeFromNestedHosts - to support case when you are in a workspace, trying to load aspect defined in the workspace.jsonc but not part of the workspace\n {\n baseDir: this.getAspectCapsulePath(),\n useHash,\n useDatedDirs,\n skipIfExists: opts?.skipIfExists ?? true,\n seedersOnly: true,\n includeFromNestedHosts: true,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n packageManagerConfigRootDir: opts?.packageManagerConfigRootDir,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n context: {\n aspects: true,\n workspaceName: opts?.workspaceName,\n },\n },\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n\n return capsules.map((capsule) => {\n return new RequireableComponent(\n capsule.component,\n async () => {\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const plugins = this.aspectLoader.getPlugins(capsule.component, capsule.path);\n if (plugins.has()) {\n await this.compileIfNoDist(capsule, capsule.component);\n return plugins.load(MainRuntime.name);\n }\n // eslint-disable-next-line global-require, import/no-dynamic-require\n const aspect = require(capsule.path);\n const scopeRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, 'scope');\n const mainRuntime = await this.aspectLoader.getRuntimePath(capsule.component, capsule.path, MainRuntime.name);\n const runtimePath = scopeRuntime || mainRuntime;\n // eslint-disable-next-line global-require, import/no-dynamic-require\n if (runtimePath) require(runtimePath);\n // eslint-disable-next-line global-require, import/no-dynamic-require\n return aspect;\n },\n capsule\n );\n });\n }\n\n private async compileIfNoDist(capsule: Capsule, component: Component) {\n const env = this.envs.getEnv(component);\n const compiler: Compiler = env.env.getCompiler();\n const distDir = compiler?.distDir || DEFAULT_DIST_DIRNAME;\n const distExists = existsSync(join(capsule.path, distDir));\n if (distExists) return;\n\n const compiledCode = component.filesystem.files.flatMap((file) => {\n if (!compiler.isFileSupported(file.path)) {\n return [\n {\n outputText: file.contents.toString('utf8'),\n outputPath: file.path,\n },\n ];\n }\n\n if (compiler.transpileFile) {\n return compiler.transpileFile(file.contents.toString('utf8'), {\n filePath: file.path,\n componentDir: capsule.path,\n });\n }\n\n return [];\n });\n\n await Promise.all(\n compact(compiledCode).map((compiledFile) => {\n const path = compiler.getDistPathBySrcPath(compiledFile.outputPath);\n return capsule?.outputFile(path, compiledFile.outputText);\n })\n );\n }\n\n private async tryCompile(requirableAspect: RequireableComponent) {\n if (requirableAspect.capsule) return this.compileIfNoDist(requirableAspect.capsule, requirableAspect.component);\n return undefined;\n }\n\n async requireAspects(\n components: Component[],\n throwOnError = false,\n opts: { packageManagerConfigRootDir?: string; workspaceName?: string } = {}\n ): Promise<Array<ExtensionManifest | Aspect>> {\n const requireableExtensions = await this.getResolvedAspects(components, opts);\n if (!requireableExtensions) {\n return [];\n }\n let error: any;\n let erroredId = '';\n const requireWithCatch = async (requireableAspects: RequireableComponent[]) => {\n error = undefined;\n try {\n const manifests = await mapSeries(requireableAspects, async (requireableExtension) => {\n try {\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (err: any) {\n erroredId = requireableExtension.component.id.toString();\n if (err.code === 'MODULE_NOT_FOUND') {\n try {\n await this.tryCompile(requireableExtension);\n return await this.aspectLoader.doRequire(requireableExtension);\n } catch (newErr: any) {\n error = newErr;\n throw newErr;\n }\n }\n error = err;\n throw err;\n }\n });\n return manifests;\n } catch (err) {\n return null;\n }\n };\n const manifests = await requireWithCatch(requireableExtensions);\n if (!error) {\n return compact(manifests);\n }\n if (error.code === 'MODULE_NOT_FOUND') {\n this.logger.warn(\n `failed loading aspects from capsules due to MODULE_NOT_FOUND error, re-creating the capsules and trying again`\n );\n const resolvedAspectsAgain = await this.getResolvedAspects(components, {\n ...opts,\n skipIfExists: false,\n });\n const manifestAgain = await requireWithCatch(resolvedAspectsAgain);\n if (!error) {\n return compact(manifestAgain);\n }\n }\n\n this.aspectLoader.handleExtensionLoadingError(error, erroredId, throwOnError);\n return [];\n }\n\n shouldUseDatedCapsules(): boolean {\n const globalConfig = this.globalConfig.getSync(CFG_USE_DATED_CAPSULES);\n // @ts-ignore\n return globalConfig === true || globalConfig === 'true';\n }\n\n getAspectCapsulePath() {\n const defaultPath = `${this.scope.path}-aspects`;\n if (this.scope.isGlobalScope) {\n return this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR) || defaultPath;\n }\n return this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR) || defaultPath;\n }\n\n shouldUseHashForCapsules(): boolean {\n if (this.scope.isGlobalScope) {\n return !this.globalConfig.getSync(CFG_CAPSULES_GLOBAL_SCOPE_ASPECTS_BASE_DIR);\n }\n return !this.globalConfig.getSync(CFG_CAPSULES_SCOPES_ASPECTS_BASE_DIR);\n }\n\n private async resolveUserAspects(\n runtimeName?: string,\n userAspectsIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n if (!userAspectsIds || !userAspectsIds.length) return [];\n const components = await this.scope.getMany(userAspectsIds);\n const useHash = this.shouldUseHashForCapsules();\n const useDatedDirs = this.shouldUseDatedCapsules();\n const network = await this.isolator.isolateComponents(\n userAspectsIds,\n {\n baseDir: this.getAspectCapsulePath(),\n useHash,\n useDatedDirs,\n skipIfExists: true,\n // for some reason this needs to be false, otherwise tagging components in some workspaces\n // result in error during Preview task:\n // \"No matching version found for <some-component-on-the-workspace>\"\n seedersOnly: true,\n includeFromNestedHosts: true,\n installOptions: {\n copyPeerToRuntimeOnRoot: true,\n useNesting: true,\n copyPeerToRuntimeOnComponents: true,\n installPeersFromEnvs: true,\n },\n host: this.scope,\n context: {\n aspects: true,\n workspaceName: opts?.workspaceName,\n },\n },\n this.scope.legacyScope\n );\n\n const capsules = network.seedersCapsules;\n const aspectDefs = await this.aspectLoader.resolveAspects(components, async (component) => {\n const capsule = capsules.getCapsule(component.id);\n if (!capsule) throw new Error(`failed loading aspect: ${component.id.toString()}`);\n const localPath = capsule.path;\n const runtimePath = runtimeName\n ? await this.aspectLoader.getRuntimePath(component, localPath, runtimeName)\n : null;\n const aspectFilePath = await this.aspectLoader.getAspectFilePath(component, localPath);\n\n this.logger.debug(\n `scope resolveUserAspects, resolving id: ${component.id.toString()}, localPath: ${localPath}, runtimePath: ${runtimePath}`\n );\n\n return {\n id: capsule.component.id,\n aspectPath: localPath,\n aspectFilePath,\n runtimePath,\n };\n });\n return aspectDefs;\n }\n\n async resolveAspects(\n runtimeName?: string,\n componentIds?: ComponentID[],\n opts?: ResolveAspectsOptions\n ): Promise<AspectDefinition[]> {\n const originalStringIds = componentIds?.map((id) => id.toString());\n this.logger.debug(`scope resolveAspects, runtimeName: ${runtimeName}, componentIds: ${originalStringIds}`);\n\n const defaultOpts: ResolveAspectsOptions = {\n excludeCore: false,\n requestedOnly: false,\n filterByRuntime: true,\n };\n const mergedOpts = { ...defaultOpts, ...opts };\n const coreAspectsIds = this.aspectLoader.getCoreAspectIds();\n let userAspectsIds: ComponentID[];\n // let requestedCoreStringIds;\n if (componentIds && componentIds.length) {\n const groupedByIsCore = groupBy(componentIds, (id) => coreAspectsIds.includes(id.toString()));\n userAspectsIds = groupedByIsCore.false || [];\n // requestedCoreStringIds = groupedByIsCore.true?.map((id) => id.toStringWithoutVersion()) || [];\n } else {\n userAspectsIds = await this.scope.resolveMultipleComponentIds(this.aspectLoader.getUserAspects());\n }\n const localResolved = await this.aspectLoader.resolveLocalAspects(this.scope.localAspects, runtimeName);\n\n const withoutLocalAspects = userAspectsIds.filter((aspectId) => {\n return !localResolved.find((localAspect) => {\n return localAspect.id === aspectId.toStringWithoutVersion();\n });\n });\n const userAspectsDefs = await this.resolveUserAspects(runtimeName, withoutLocalAspects, opts);\n const coreAspectsDefs = await this.aspectLoader.getCoreAspectDefs(runtimeName);\n\n const allDefs = userAspectsDefs.concat(coreAspectsDefs).concat(localResolved);\n // const userAspectsIdsWithoutVersion = userAspectsIds.map((aspectId) => aspectId.toStringWithoutVersion());\n // const userAspectsIdsWithoutVersionAndCoreRequested = userAspectsIdsWithoutVersion.concat(requestedCoreStringIds);\n const filteredDefs = this.aspectLoader.filterAspectDefs(\n allDefs,\n componentIds || userAspectsIds,\n runtimeName,\n mergedOpts\n );\n return filteredDefs;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;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;AASA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsF;AAAA;AAe/E,MAAMA,kBAAkB,CAAC;EAC9BC,WAAW,CACDC,KAAgB,EAChBC,YAA8B,EAC9BC,IAAc,EACdC,QAAsB,EACtBC,MAAc,EACdC,YAA8B,EACtC;IAAA,KANQL,KAAgB,GAAhBA,KAAgB;IAAA,KAChBC,YAA8B,GAA9BA,YAA8B;IAAA,KAC9BC,IAAc,GAAdA,IAAc;IAA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4
|
"homepage": "https://bit.cloud/teambit/scope/scope",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "scope",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1089"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -32,55 +32,55 @@
|
|
|
32
32
|
"@teambit/base-ui.utils.composer": "1.0.0",
|
|
33
33
|
"@teambit/explorer.ui.gallery.component-grid": "0.0.496",
|
|
34
34
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.512",
|
|
35
|
-
"@teambit/scope.models.scope-model": "0.0.
|
|
36
|
-
"@teambit/scope.ui.hooks.scope-context": "0.0.
|
|
37
|
-
"@teambit/aspect-loader": "0.0.
|
|
38
|
-
"@teambit/cli": "0.0.
|
|
39
|
-
"@teambit/compiler": "0.0.
|
|
40
|
-
"@teambit/component": "0.0.
|
|
41
|
-
"@teambit/envs": "0.0.
|
|
42
|
-
"@teambit/global-config": "0.0.
|
|
35
|
+
"@teambit/scope.models.scope-model": "0.0.390",
|
|
36
|
+
"@teambit/scope.ui.hooks.scope-context": "0.0.390",
|
|
37
|
+
"@teambit/aspect-loader": "0.0.1089",
|
|
38
|
+
"@teambit/cli": "0.0.732",
|
|
39
|
+
"@teambit/compiler": "0.0.1089",
|
|
40
|
+
"@teambit/component": "0.0.1089",
|
|
41
|
+
"@teambit/envs": "0.0.1089",
|
|
42
|
+
"@teambit/global-config": "0.0.734",
|
|
43
43
|
"@teambit/harmony.modules.requireable-component": "0.0.491",
|
|
44
|
-
"@teambit/isolator": "0.0.
|
|
45
|
-
"@teambit/logger": "0.0.
|
|
44
|
+
"@teambit/isolator": "0.0.1089",
|
|
45
|
+
"@teambit/logger": "0.0.825",
|
|
46
46
|
"@teambit/bit-error": "0.0.402",
|
|
47
|
-
"@teambit/builder": "0.0.
|
|
48
|
-
"@teambit/dependency-resolver": "0.0.
|
|
49
|
-
"@teambit/express": "0.0.
|
|
50
|
-
"@teambit/graph": "0.0.
|
|
51
|
-
"@teambit/graphql": "0.0.
|
|
52
|
-
"@teambit/ui": "0.0.
|
|
47
|
+
"@teambit/builder": "0.0.1089",
|
|
48
|
+
"@teambit/dependency-resolver": "0.0.1089",
|
|
49
|
+
"@teambit/express": "0.0.830",
|
|
50
|
+
"@teambit/graph": "0.0.1089",
|
|
51
|
+
"@teambit/graphql": "0.0.1089",
|
|
52
|
+
"@teambit/ui": "0.0.1089",
|
|
53
53
|
"@teambit/workspace.modules.match-pattern": "0.0.498",
|
|
54
|
-
"@teambit/component.ui.component-drawer": "0.0.
|
|
55
|
-
"@teambit/lanes.hooks.use-lane-components": "0.0.
|
|
56
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
|
57
|
-
"@teambit/lanes.ui.models.lanes-model": "0.0.
|
|
58
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.
|
|
59
|
-
"@teambit/command-bar": "0.0.
|
|
60
|
-
"@teambit/component-tree": "0.0.
|
|
54
|
+
"@teambit/component.ui.component-drawer": "0.0.291",
|
|
55
|
+
"@teambit/lanes.hooks.use-lane-components": "0.0.195",
|
|
56
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.196",
|
|
57
|
+
"@teambit/lanes.ui.models.lanes-model": "0.0.149",
|
|
58
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.808",
|
|
59
|
+
"@teambit/command-bar": "0.0.1089",
|
|
60
|
+
"@teambit/component-tree": "0.0.877",
|
|
61
61
|
"@teambit/component.modules.component-url": "0.0.151",
|
|
62
|
-
"@teambit/component.ui.component-filters.component-filter-context": "0.0.
|
|
63
|
-
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.
|
|
64
|
-
"@teambit/component.ui.component-filters.env-filter": "0.0.
|
|
65
|
-
"@teambit/component.ui.component-filters.show-main-filter": "0.0.
|
|
66
|
-
"@teambit/sidebar": "0.0.
|
|
62
|
+
"@teambit/component.ui.component-filters.component-filter-context": "0.0.156",
|
|
63
|
+
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.156",
|
|
64
|
+
"@teambit/component.ui.component-filters.env-filter": "0.0.162",
|
|
65
|
+
"@teambit/component.ui.component-filters.show-main-filter": "0.0.149",
|
|
66
|
+
"@teambit/sidebar": "0.0.1089",
|
|
67
67
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.497",
|
|
68
68
|
"@teambit/ui-foundation.ui.menu": "0.0.497",
|
|
69
69
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.501",
|
|
70
|
-
"@teambit/lane-id": "0.0.
|
|
70
|
+
"@teambit/lane-id": "0.0.249",
|
|
71
71
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.499",
|
|
72
|
-
"@teambit/scope.ui.hooks.use-scope": "0.0.
|
|
72
|
+
"@teambit/scope.ui.hooks.use-scope": "0.0.395",
|
|
73
73
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.207",
|
|
74
74
|
"@teambit/ui-foundation.ui.corner": "0.0.508",
|
|
75
75
|
"@teambit/ui-foundation.ui.full-loader": "0.0.495",
|
|
76
76
|
"@teambit/ui-foundation.ui.hooks.use-is-mobile": "0.0.188",
|
|
77
77
|
"@teambit/ui-foundation.ui.top-bar": "0.0.506",
|
|
78
|
+
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.133",
|
|
79
|
+
"@teambit/ui-foundation.ui.use-box.scope-menu": "0.0.134",
|
|
78
80
|
"@teambit/explorer.ui.gallery.component-card": "0.0.507",
|
|
79
81
|
"@teambit/preview.ui.preview-placeholder": "0.0.496",
|
|
80
82
|
"@teambit/scope.ui.empty-scope": "0.0.504",
|
|
81
|
-
"@teambit/scope.ui.scope-details": "0.0.515"
|
|
82
|
-
"@teambit/ui-foundation.ui.use-box.dropdown": "0.0.133",
|
|
83
|
-
"@teambit/ui-foundation.ui.use-box.scope-menu": "0.0.134"
|
|
83
|
+
"@teambit/scope.ui.scope-details": "0.0.515"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@types/react": "^17.0.8",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"react-router-dom": "^6.0.0",
|
|
100
|
-
"@teambit/legacy": "1.0.
|
|
100
|
+
"@teambit/legacy": "1.0.513",
|
|
101
101
|
"react": "^16.8.0 || ^17.0.0",
|
|
102
102
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
103
103
|
},
|
|
Binary file
|