LotteryAutoScript/lib/data/env.js
shanmite 6c75d57adb
Some checks failed
Build and push Docker images / docker (push) Failing after 2m16s
Mirror and run GitLab CI / build (push) Failing after 1m44s
Publishing to NPM / publish (push) Failing after 14s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Failing after 1m41s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Failing after 52s
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Failing after 52s
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
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
lint: eslint
2024-06-21 16:55:12 +08:00

34 lines
648 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']
});
},
/**
* @returns {Object[]}
*/
get_multiple_account() {
return this.raw_env()['multiple_account_parm'];
},
setEnv(o) {
process.env = {
...process.env,
...o
};
}
};
module.exports = env;