| 148 | function Env(t, e) { |
| 149 | "undefined" != typeof process && JSON.stringify(process.env).indexOf("GIT_HUB") > -1 && process.exit(0); |
| 150 | class s { |
| 151 | constructor(t) { |
| 152 | this.env = t |
| 153 | } |
| 154 | send(t, e = "GET") { |
| 155 | t = "string" == typeof t ? { |
| 156 | url: t |
| 157 | } : t; |
| 158 | let s = this.get; |
| 159 | return "POST" === e && (s = this.post), new Promise((e, i) => { |
| 160 | s.call(this, t, (t, s, r) => { |
| 161 | t ? i(t) : e(s) |
| 162 | }) |
| 163 | }) |
| 164 | } |
| 165 | get(t) { |
| 166 | return this.send.call(this.env, t) |
| 167 | } |
| 168 | post(t) { |
| 169 | return this.send.call(this.env, t, "POST") |
| 170 | } |
| 171 | } |
| 172 | return new class { |
| 173 | constructor(t, e) { |
| 174 | this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) |