| 79 | const __dirname = getRelativePath(import.meta.url); |
| 80 | |
| 81 | const request = options => { |
| 82 | return fetch(options.url, options).then(resp => { |
| 83 | if (resp.status !== 200) { |
| 84 | throw ERRORS.INVALID_STATUS_CODE(options.url, resp.status); |
| 85 | } |
| 86 | |
| 87 | return options.json ? resp.json() : resp.text(); |
| 88 | }); |
| 89 | }; |
| 90 | |
| 91 | const explicitVersion = version => |
| 92 | new Promise((resolve, reject) => |
no test coverage detected