Add GitHub authentication provider extension, closes #90384

This commit is contained in:
Rachel Macfarlane
2020-02-20 10:56:16 -08:00
committed by GitHub
parent ebb6aaa8f4
commit eed39324b6
18 changed files with 1087 additions and 0 deletions
+12
View File
@@ -74,6 +74,7 @@ function compileTask(src, out, build) {
if (src === 'src') {
generator.execute();
}
generateGitHubAuthConfig();
return srcPipe
.pipe(generator.stream)
.pipe(compile())
@@ -96,6 +97,17 @@ function watchTask(out, build) {
}
exports.watchTask = watchTask;
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
function generateGitHubAuthConfig() {
const schemes = ['OSS', 'INSIDERS'];
let content = {};
schemes.forEach(scheme => {
content[scheme] = {
id: process.env[`${scheme}_GITHUB_ID`],
secret: process.env[`${scheme}_GITHUB_SECRET`]
};
});
fs.writeFileSync(path.join(__dirname, '../../extensions/github-authentication/src/common/config.json'), JSON.stringify(content));
}
class MonacoGenerator {
constructor(isWatch) {
this._executeSoonTimer = null;