({
filePath = "projectDependencies.yaml", cwd,
rootConfiguration, rootConfigPath,
versionOverride, cacheMode, resolveFrameworkDependencies = true
})
| 105 | * @returns {Promise<@ui5/project/graph/ProjectGraph>} Promise resolving to a Project Graph instance |
| 106 | */ |
| 107 | export 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 |
no test coverage detected