Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@harnessio/ff-javascript-client-sdk",
"version": "1.31.0",
"version": "1.31.1",
"author": "Harness",
"license": "Apache-2.0",
"main": "dist/sdk.cjs.js",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getVariation } from './variation'
import Poller from './poller'
import { createCacheIdSeed, getCache } from './cache'

const SDK_VERSION = '1.31.0'
const SDK_VERSION = '1.31.1'
const SDK_INFO = `Javascript ${SDK_VERSION} Client`
const METRICS_VALID_COUNT_INTERVAL = 500
const fetch = globalThis.fetch
Expand Down Expand Up @@ -178,7 +178,7 @@ const initialize = (apiKey: string, target: Target, options?: Options): Result =
}

try {
const response = await fetch(url, requestOptions)
const response = await fetchWithMiddleware(url, requestOptions)

if (!response.ok) {
throw new Error(`${response.status}: ${response.statusText}`)
Expand Down
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ export interface Options {
* @default false
*/
pollingEnabled?: boolean
/**
* Whether to enable debug logging.
* @default false
*/
authRequestReadTimeout?: number
/**
* The timeout in milliseconds for the authentication request to read the response.
* If the request takes longer than this timeout, it will be aborted and the SDK will fail to initialize, and `ERROR_AUTH` and `ERROR` events will be emitted.
* @default 0 (no timeout)
*/
authRequestReadTimeout?: number
/**
* Whether to enable debug logging.
* @default false
*/
debug?: boolean
/**
* Whether to enable caching.
Expand Down