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

Function graphFromStaticFile

lib/graph/graph.js:107–135  ·  view source on GitHub ↗
({
	filePath = "projectDependencies.yaml", cwd,
	rootConfiguration, rootConfigPath,
	versionOverride, cacheMode, resolveFrameworkDependencies = true
})

Source from the content-addressed store, hash-verified

105 * @returns {Promise<@ui5/project/graph/ProjectGraph>} Promise resolving to a Project Graph instance
106 */
107export async function graphFromStaticFile({
108 filePath = "projectDependencies.yaml", cwd,
109 rootConfiguration, rootConfigPath,
110 versionOverride, cacheMode, resolveFrameworkDependencies = true
111}) {
112 log.verbose(`Creating project graph using static file...`);
113 const {
114 default: DependencyTreeProvider
115 } = await import("./providers/DependencyTree.js");
116
117 cwd = cwd ? path.resolve(cwd) : process.cwd();
118 rootConfigPath = utils.resolveConfigPath(cwd, rootConfigPath);
119
120 const dependencyTree = await utils.readDependencyConfigFile(cwd, filePath);
121
122 const provider = new DependencyTreeProvider({
123 dependencyTree,
124 rootConfiguration,
125 rootConfigPath
126 });
127
128 const projectGraph = await projectGraphBuilder(provider);
129
130 if (resolveFrameworkDependencies) {
131 await ui5Framework.enrichProjectGraph(projectGraph, {versionOverride, cacheMode});
132 }
133
134 return projectGraph;
135}
136
137/**
138 * Generates a [@ui5/project/graph/ProjectGraph]{@link @ui5/project/graph/ProjectGraph} from the

Callers 2

graph.jsFile · 0.85

Calls 1

projectGraphBuilderFunction · 0.85

Tested by

no test coverage detected