mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled
* feat: ai content * style: 更改ai调用方式
35 lines
683 B
JavaScript
35 lines
683 B
JavaScript
const { env_file } = require('../utils');
|
|
|
|
const env = {
|
|
/**
|
|
* 原始环境
|
|
* @returns {Object}
|
|
*/
|
|
raw_env() {
|
|
delete require.cache[env_file];
|
|
return require(env_file);
|
|
},
|
|
init() {
|
|
const raw_env = this.raw_env();
|
|
this.setEnv({
|
|
...raw_env['account_parm'],
|
|
...raw_env['push_parm'],
|
|
...raw_env['ai_parm']
|
|
});
|
|
},
|
|
/**
|
|
* @returns {Object[]}
|
|
*/
|
|
get_multiple_account() {
|
|
return this.raw_env()['multiple_account_parm'];
|
|
},
|
|
setEnv(o) {
|
|
process.env = {
|
|
...process.env,
|
|
...o
|
|
};
|
|
}
|
|
};
|
|
|
|
|
|
module.exports = env; |