in src/scaffolding/wizard/ScaffoldFileStep.ts [56:97]
private async getInputPath(wizardContext: TWizardContext): Promise<string> {
const config = vscode.workspace.getConfiguration('docker');
const settingsTemplatesPath = config.get<string | undefined>('scaffolding.templatePath', undefined);
const defaultTemplatesPath = path.join(ext.context.asAbsolutePath('resources'), 'templates');
let subPath: string;
switch (wizardContext.platform) {
case 'Node.js':
subPath = path.join('node', `${this.fileType}.template`);
break;
case '.NET: ASP.NET Core':
case '.NET: Core Console':
subPath = path.join('netCore', `${this.fileType}.template`);
break;
case 'Python: Django':
case 'Python: FastAPI':
case 'Python: Flask':
case 'Python: General':
subPath = path.join('python', `${this.fileType}.template`);
break;
case 'Java':
subPath = path.join('java', `${this.fileType}.template`);
break;
case 'C++':
subPath = path.join('cpp', `${this.fileType}.template`);
break;
case 'Go':
subPath = path.join('go', `${this.fileType}.template`);
break;
case 'Ruby':
subPath = path.join('ruby', `${this.fileType}.template`);
break;
case 'Other':
subPath = path.join('other', `${this.fileType}.template`);
break;
default:
throw new Error(localize('vscode-docker.scaffold.scaffoldFileStep.unknownPlatform', 'Unknown platform \'{0}\'', wizardContext.platform));
}
return (settingsTemplatesPath && await this.scanUpwardForFile(path.join(settingsTemplatesPath, subPath))) ||
await this.scanUpwardForFile(path.join(defaultTemplatesPath, subPath));
}