MCPcopy Create free account
hub / github.com/SAP/ui5-project / getWorkspaceFrameworkLibraryMetadata

Function getWorkspaceFrameworkLibraryMetadata

lib/graph/helpers/ui5Framework.js:247–266  ·  view source on GitHub ↗
({workspace, projectGraph})

Source from the content-addressed store, hash-verified

245 return {dependencies, optionalDependencies};
246 },
247 async getWorkspaceFrameworkLibraryMetadata({workspace, projectGraph}) {
248 const libraryMetadata = Object.create(null);
249 const ui5Modules = await workspace.getModules();
250 for (const ui5Module of ui5Modules) {
251 const {project} = await ui5Module.getSpecifications();
252 // Only framework projects that are not already part of the projectGraph should be handled.
253 // Otherwise they would be available twice which is checked
254 // after installing via checkForDuplicateFrameworkProjects
255 if (project?.isFrameworkProject?.() && !projectGraph.getProject(project.getName())) {
256 const metadata = libraryMetadata[project.getName()] = Object.create(null);
257 metadata.id = project.getId();
258 metadata.path = project.getRootPath();
259 metadata.version = project.getVersion();
260 const {dependencies, optionalDependencies} = await utils.getFrameworkLibraryDependencies(project);
261 metadata.dependencies = dependencies;
262 metadata.optionalDependencies = optionalDependencies;
263 }
264 }
265 return libraryMetadata;
266 },
267 ProjectProcessor
268};
269

Callers

nothing calls this directly

Calls 9

createMethod · 0.80
getModulesMethod · 0.80
getSpecificationsMethod · 0.80
isFrameworkProjectMethod · 0.80
getProjectMethod · 0.80
getNameMethod · 0.45
getIdMethod · 0.45
getRootPathMethod · 0.45
getVersionMethod · 0.45

Tested by

no test coverage detected