unleash-client
Advanced tools
Comparing version 6.5.0 to 6.6.0
@@ -1,1 +0,1 @@ | ||
{ "name": "unleash-client-node", "version": "6.5.0", "sdkVersion": "unleash-client-node:6.5.0" } | ||
{ "name": "unleash-client-node", "version": "6.6.0", "sdkVersion": "unleash-client-node:6.6.0" } |
@@ -36,2 +36,3 @@ import { EventEmitter } from 'events'; | ||
instanceId: string; | ||
connectionId: string; | ||
platformName: PlatformName; | ||
@@ -38,0 +39,0 @@ platformVersion: string; |
@@ -130,2 +130,3 @@ "use strict"; | ||
connectionId: this.connectionId, | ||
interval: this.metricsInterval, | ||
headers, | ||
@@ -225,2 +226,3 @@ timeout: this.timeout, | ||
instanceId: this.instanceId, | ||
connectionId: this.connectionId, | ||
bucket, | ||
@@ -256,2 +258,3 @@ platformName: this.platformData.name, | ||
interval: this.metricsInterval, | ||
connectionId: this.connectionId, | ||
platformName: this.platformData.name, | ||
@@ -258,0 +261,0 @@ platformVersion: this.platformData.version, |
@@ -289,2 +289,3 @@ "use strict"; | ||
connectionId: this.connectionId, | ||
interval: this.refreshInterval, | ||
headers, | ||
@@ -291,0 +292,0 @@ httpOptions: this.httpOptions, |
@@ -17,2 +17,3 @@ import * as http from 'http'; | ||
httpOptions?: HttpOptions; | ||
interval?: number; | ||
} | ||
@@ -27,2 +28,3 @@ export interface Data { | ||
connectionId?: string; | ||
interval?: number; | ||
httpOptions?: HttpOptions; | ||
@@ -39,7 +41,8 @@ } | ||
connectionId?: string; | ||
interval?: number; | ||
}; | ||
export declare const buildHeaders: ({ appName, instanceId, etag, contentType, custom, specVersionSupported, connectionId, }: HeaderOptions) => Record<string, string>; | ||
export declare const post: ({ url, appName, timeout, instanceId, connectionId, headers, json, httpOptions, }: PostRequestOptions) => Promise<import("node-fetch").Response>; | ||
export declare const get: ({ url, etag, appName, timeout, instanceId, connectionId, headers, httpOptions, supportedSpecVersion, }: GetRequestOptions) => Promise<import("node-fetch").Response>; | ||
export declare const buildHeaders: ({ appName, instanceId, etag, contentType, custom, specVersionSupported, connectionId, interval, }: HeaderOptions) => Record<string, string>; | ||
export declare const post: ({ url, appName, timeout, instanceId, connectionId, interval, headers, json, httpOptions, }: PostRequestOptions) => Promise<import("node-fetch").Response>; | ||
export declare const get: ({ url, etag, appName, timeout, instanceId, connectionId, interval, headers, httpOptions, supportedSpecVersion, }: GetRequestOptions) => Promise<import("node-fetch").Response>; | ||
export {}; | ||
//# sourceMappingURL=request.d.ts.map |
@@ -29,3 +29,3 @@ "use strict"; | ||
exports.getDefaultAgent = getDefaultAgent; | ||
const buildHeaders = ({ appName, instanceId, etag, contentType, custom, specVersionSupported, connectionId, }) => { | ||
const buildHeaders = ({ appName, instanceId, etag, contentType, custom, specVersionSupported, connectionId, interval, }) => { | ||
const head = {}; | ||
@@ -58,6 +58,9 @@ if (appName) { | ||
} | ||
// expressed in milliseconds to match refreshInterval and metricsInterval units | ||
// attach when set explicitly to non-zero value | ||
head['unleash-interval'] = String(interval); | ||
return head; | ||
}; | ||
exports.buildHeaders = buildHeaders; | ||
const post = ({ url, appName, timeout, instanceId, connectionId, headers, json, httpOptions, }) => fetch(url, { | ||
const post = ({ url, appName, timeout, instanceId, connectionId, interval, headers, json, httpOptions, }) => fetch(url, { | ||
timeout: timeout || 10000, | ||
@@ -70,2 +73,3 @@ method: 'POST', | ||
connectionId, | ||
interval, | ||
etag: undefined, | ||
@@ -79,3 +83,3 @@ contentType: 'application/json', | ||
exports.post = post; | ||
const get = ({ url, etag, appName, timeout, instanceId, connectionId, headers, httpOptions, supportedSpecVersion, }) => fetch(url, { | ||
const get = ({ url, etag, appName, timeout, instanceId, connectionId, interval, headers, httpOptions, supportedSpecVersion, }) => fetch(url, { | ||
method: 'GET', | ||
@@ -87,2 +91,3 @@ timeout: timeout || 10000, | ||
instanceId, | ||
interval, | ||
etag, | ||
@@ -89,0 +94,0 @@ contentType: undefined, |
{ | ||
"name": "unleash-client", | ||
"version": "6.5.0", | ||
"version": "6.6.0", | ||
"description": "Unleash Client for Node", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
253077
3215