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

View File

@@ -88,6 +88,8 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
generator.execute();
}
generateGitHubAuthConfig();
return srcPipe
.pipe(generator.stream)
.pipe(compile())
@@ -115,6 +117,19 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
function generateGitHubAuthConfig() {
const schemes = ['OSS', 'INSIDERS'];
let content: { [key: string]: { id?: string, secret?: string }} = {};
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 {
private readonly _isWatch: boolean;
public readonly stream: NodeJS.ReadWriteStream;