mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
1be43911b4
Set Prettier's "trailingComma" setting to "es5" GitOrigin-RevId: 9f14150511929a855b27467ad17be6ab262fe5d5
29 lines
693 B
JavaScript
29 lines
693 B
JavaScript
let userOptions
|
|
try {
|
|
userOptions = require('../../data/onesky.json')
|
|
} catch (err) {
|
|
if (!process.env.ONE_SKY_PUBLIC_KEY) {
|
|
console.error(
|
|
'Cannot detect onesky credentials.\n\tDevelopers: see the docs at',
|
|
'https://github.com/overleaf/developer-manual/blob/master/code/translations.md#testing-translations-scripts',
|
|
'\n\tOps: environment variable ONE_SKY_PUBLIC_KEY is not set'
|
|
)
|
|
process.exit(1)
|
|
}
|
|
}
|
|
|
|
function withAuth(options) {
|
|
return Object.assign(
|
|
options,
|
|
{
|
|
apiKey: process.env.ONE_SKY_PUBLIC_KEY,
|
|
secret: process.env.ONE_SKY_PRIVATE_KEY,
|
|
projectId: '25049',
|
|
},
|
|
userOptions
|
|
)
|
|
}
|
|
|
|
module.exports = {
|
|
withAuth,
|
|
}
|