@mls-digital/highwire
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "@mls-digital/highwire", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A high level HTTP client", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -94,10 +94,14 @@ # Highwire | ||
import throttle from 'lodash.throttle' | ||
import highwire from '@mls-digital/highwire' | ||
import highwireFactory from '@kkemple/highwire' | ||
const { get } = highwire() | ||
const { get } = highwireFactory() | ||
const headers = { authorization: `token ${process.env.GITHUB_AUTH_TOKEN}` } | ||
const retries = 5 | ||
const getRepos = () => get('https://api.github.com/repos', { headers, retries }) | ||
function getRepos() { | ||
return get('https://api.github.com/repos', { headers, retries }) | ||
} | ||
/* action types */ | ||
const REPOS_REQUEST = 'REPOS_REQUEST' | ||
@@ -108,10 +112,3 @@ const REPOS_REQUEST_SUCCESS = 'REPOS_REQUEST_SUCCESS' | ||
const defaultState = { | ||
isComplete: false, | ||
hasError: false, | ||
isWorking: false, | ||
errorMessage: undefined, | ||
repos: [], | ||
} | ||
/* action creators */ | ||
let currentRequest | ||
@@ -137,2 +134,11 @@ | ||
/* reducer */ | ||
const defaultState = { | ||
isComplete: false, | ||
hasError: false, | ||
isWorking: false, | ||
errorMessage: undefined, | ||
repos: [], | ||
} | ||
export default function reducer(state = defaultState, action) { | ||
@@ -139,0 +145,0 @@ switch (action.type) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24227
190