feat: init doc monitor (#3320)

This commit is contained in:
Alex Yang authored and GitHub committed 2023-07-20 02:44:50 +00:00
1 parent 27edd7cd93
commit 604b53d9a4
20 files changed
+145 -76

No files matched your search

+16 -1
View File
@@ -21,8 +21,23 @@ const getChannel = () => {
}
};
const getDistribution = () => {
switch (process.env.DISTRIBUTION) {
case 'browser':
case 'desktop':
return process.env.DISTRIBUTION;
case undefined: {
console.log('DISTRIBUTION is not set, defaulting to browser');
return 'browser';
}
default: {
throw new Error('DISTRIBUTION must be one of browser, desktop');
}
}
};
const flags = {
distribution: 'browser',
distribution: getDistribution(),
mode: 'production',
channel: getChannel(),
coverage: process.env.COVERAGE === 'true',