-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.cjs
More file actions
37 lines (31 loc) · 943 Bytes
/
env.cjs
File metadata and controls
37 lines (31 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const path = require('path')
const { STAKE_PAGE_URL, STAKE_LOG_FOLDER, STAKE_CRXS_DOWNLOAD_DIR } = process.env
const defaultPageUrl = 'http://localhost:3826/'
const defaultLogFolder = path.resolve(__dirname, '../../logs')
const defaultCrxsDownloadDir = path.resolve(__dirname, '../crxs/downloaded/')
const envConfig = {
pageUrl: STAKE_PAGE_URL || defaultPageUrl,
logFolder: STAKE_LOG_FOLDER || defaultLogFolder,
crxsDownloadDir: STAKE_CRXS_DOWNLOAD_DIR || defaultCrxsDownloadDir,
filenamePrefix: 'auto-test-stake',
fileHeaderTextFlag: 'AUTO-TEST-STAKE',
// Please enter your TG channel data
tgInfo: {
botToken: 'your botToken',
channelId: 'your channelId',
},
}
const getEnvConfig = () => {
return envConfig
}
const getShellParams = (params) => {
let res = ''
for (let key in params) {
res += ` --${key}=${params[key]}`
}
return res.slice(1)
}
module.exports = {
getEnvConfig,
getShellParams,
}