| 30 | "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); |
| 31 | |
| 32 | class s { |
| 33 | constructor(t) { |
| 34 | this.env = t |
| 35 | } |
| 36 | |
| 37 | send(t, e = "GET") { |
| 38 | t = "string" == typeof t ? {url: t} : t; |
| 39 | let s = this.get; |
| 40 | return "POST" === e && (s = this.post), new Promise((e, i) => { |
| 41 | s.call(this, t, (t, s, r) => { |
| 42 | t ? i(t) : e(s) |
| 43 | }) |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | get(t) { |
| 48 | return this.send.call(this.env, t) |
| 49 | } |
| 50 | |
| 51 | post(t) { |
| 52 | return this.send.call(this.env, t, "POST") |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | return new class { |
| 57 | constructor(t, e) { |