INNER CODE UNIT · TypeScript
getAllNamedTemplatesFromParentCharts
tim-koehler/Helm-Intellisense · src/utils.ts:87
export async function getAllNamedTemplatesFromParentCharts(filePath: string): Promise<Map<string, string>> {
const templates = new Map<string, string>();
const chartYamlPath = getChartBasePath(filePath) + path.sep + 'Chart.yaml';
if (!fs.existsSync(chartYamlPath)) {
return templates;
}
const chartYaml = yaml.load(chartYamlPath);
if (chartYaml === undefined) {
return templates;
}
const relativeDependencyChartPaths = getRelativeDependencyChartPaths(chartYaml);
for (const chartPath of relativeDependencyChartPaths) {
const chartTemplatesPath = path.join(getChartBasePath(filePath) + path.sep, chartPath, 'templates');