-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
128 changed files
with
1,443 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Opt into dotfile linting | ||
!.* | ||
|
||
# Compiled sources | ||
.github | ||
.yarn | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
mocha: true, | ||
node: true, | ||
}, | ||
extends: ['@fuelrats/eslint-config'], | ||
rules: { | ||
// Core | ||
indent: ['error', 'tab'], | ||
'new-parens': ['error', 'never'], | ||
'no-param-reassign': ['error', { | ||
props: false, | ||
}], | ||
|
||
// Import | ||
'import/extensions': ['error', 'ignorePackages'], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['tests/**/*.js'], | ||
env: { | ||
jest: true, | ||
}, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: GH Actions - Lint | ||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Test | ||
run: yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
parallel: true, | ||
recursive: true, | ||
require: ['test/setup.js'] | ||
require: ['test/setup.js'], | ||
} |
Binary file not shown.
Binary file added
BIN
+19.5 KB
.yarn/cache/@babel-eslint-parser-npm-7.15.4-2ec88bccd6-e4406f3eee.zip
Binary file not shown.
Binary file added
BIN
+6.84 KB
.yarn/cache/@babel-eslint-plugin-npm-7.14.5-14bd4cffba-7aa5868ee9.zip
Binary file not shown.
Binary file added
BIN
+17.9 KB
.yarn/cache/@es-joy-jsdoccomment-npm-0.10.8-d03c65b162-3e144ef393.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+22.2 KB
.yarn/cache/@fuelrats-eslint-config-npm-2.3.0-01bd11e735-553771c08f.zip
Binary file not shown.
Binary file added
BIN
+8.64 KB
.yarn/cache/@fuelrats-eslint-plugin-npm-2.3.0-a21d69936a-4f4277722f.zip
Binary file not shown.
Binary file added
BIN
+12.3 KB
.yarn/cache/@humanwhocodes-config-array-npm-0.5.0-5ded120470-44ee6a9f05.zip
Binary file not shown.
Binary file added
BIN
+11.5 KB
.yarn/cache/@humanwhocodes-object-schema-npm-1.2.0-6bc0ff9fda-40b7548037.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.35 KB
.yarn/cache/eslint-import-resolver-node-npm-0.3.6-d9426786c6-6266733af1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.78 KB
.yarn/cache/eslint-restricted-globals-npm-0.2.0-182c454bae-7e61e24c89.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+11.7 KB
.yarn/cache/functional-red-black-tree-npm-1.0.1-ccfe924dcd-ca6c170f37.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+82.9 KB
.yarn/cache/jsdoc-type-pratt-parser-npm-1.1.1-175a8a89e4-90522d1da1.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+9.24 KB
.yarn/cache/json-stable-stringify-without-jsonify-npm-1.0.1-b65772b28b-cff44156dd.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+10.2 KB
.yarn/cache/string.prototype.trimend-npm-1.0.4-a656b8fe24-17e5aa45c3.zip
Binary file not shown.
Binary file added
BIN
+10.3 KB
.yarn/cache/string.prototype.trimstart-npm-1.0.4-b31f5e7c85-3fb06818d3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable */ | ||
// Module imports | ||
import fetch from 'node-fetch' | ||
import fs from 'fs/promises' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
/* eslint-disable no-magic-numbers */ | ||
const HttpStatus = { | ||
// Informational | ||
CONTINUE: 100, | ||
SWITCHING_PROTOCOLS: 101, | ||
PROCESSING: 102, | ||
|
||
// Success | ||
OK: 200, | ||
CREATED: 201, | ||
ACCEPTED: 202, | ||
NON_AUTHORITATIVE_INFORMATION: 203, | ||
NO_CONTENT: 204, | ||
RESET_CONTENT: 205, | ||
PARTIAL_CONTENT: 206, | ||
MULTI_STATUS: 207, | ||
ALREADY_REPORTED: 208, | ||
IM_USED: 226, | ||
|
||
// Redirection | ||
MULTIPLE_CHOICES: 300, | ||
MOVED_PERMANENTLY: 301, | ||
FOUND: 302, | ||
SEE_OTHER: 303, | ||
NOT_MODIFIED: 304, | ||
USE_PROXY: 305, | ||
TEMPORARY_REDIRECT: 307, | ||
PERMANENT_REDIRECT: 308, | ||
|
||
// Client Error | ||
BAD_REQUEST: 400, | ||
UNAUTHORIZED: 401, | ||
PAYMENT_REQUIRED: 402, | ||
FORBIDDEN: 403, | ||
NOT_FOUND: 404, | ||
METHOD_NOT_ALLOWED: 405, | ||
NOT_ACCEPTABLE: 406, | ||
PROXY_AUTHENTICATION_REQUIRED: 407, | ||
REQUEST_TIMEOUT: 408, | ||
CONFLICT: 409, | ||
GONE: 410, | ||
LENGTH_REQUIRED: 411, | ||
PRECONDITION_FAILED: 412, | ||
PAYLOAD_TOO_LARGE: 413, | ||
URI_TOO_LONG: 414, | ||
UNSUPPORTED_MEDIA_TYPE: 415, | ||
RANGE_NOT_SATISFIABLE: 416, | ||
EXPECTATION_FAILED: 417, | ||
IM_A_TEAPOT: 418, | ||
MISDIRECTED_REQUEST: 421, | ||
UNPROCESSABLE_ENTITY: 422, | ||
LOCKED: 423, | ||
FAILED_DEPENDENCY: 424, | ||
UPGRADE_REQUIRED: 426, | ||
PRECONDITION_REQUIRED: 428, | ||
TOO_MANY_REQUESTS: 429, | ||
HEADER_FIELDS_TOO_LARGE: 431, | ||
CLOSED_WITHOUT_RESPONSE: 444, | ||
UNAVAILABLE_FOR_LEGAL_REASONS: 451, | ||
CLIENT_CLOSED_REQUEST: 499, | ||
|
||
// Server Error | ||
INTERNAL_SERVER_ERROR: 500, | ||
NOT_IMPLEMENTED: 501, | ||
BAD_GATEWAY: 502, | ||
SERVICE_UNAVAILABLE: 503, | ||
GATEWAY_TIMEOUT: 504, | ||
HTTP_VERSION_NOT_SUPPORTED: 505, | ||
VARIANT_ALSO_NEGOTIATES: 506, | ||
INSUFFICIENT_STORAGE: 507, | ||
LOOP_DETECTED: 508, | ||
NOT_EXTENDED: 510, | ||
NETWORK_AUTHENTICATION_REQUIRED: 511, | ||
NETWORK_CONNECTION_TIMEOUT_ERROR: 599, | ||
|
||
// Helper Functions | ||
isInformational: (code) => { | ||
return code >= 100 && code < 200 | ||
}, | ||
|
||
isSuccess: (code) => { | ||
return code >= 200 && code < 300 | ||
}, | ||
|
||
isRedirection: (code) => { | ||
return code >= 300 && code < 400 | ||
}, | ||
|
||
isError: (code) => { | ||
return code >= 400 && code < 600 | ||
}, | ||
|
||
isClientError: (code) => { | ||
return code >= 400 && code < 500 | ||
}, | ||
|
||
isServerError: (code) => { | ||
return code >= 500 && code < 600 | ||
}, | ||
} | ||
|
||
|
||
|
||
|
||
|
||
Object.freeze(HttpStatus) | ||
|
||
|
||
|
||
|
||
|
||
export default HttpStatus |
Oops, something went wrong.