Comparing version 5.2.0 to 5.2.1
@@ -0,1 +1,8 @@ | ||
### v5.2.1 (2022-02-28) | ||
<a id="v5.2.1"></a> | ||
#### 🐛 Bug Fixes | ||
* [#128](https://github.com/groupon/gofer/pull/128) fix: export type for registerEndpoints ([@JimLiu](https://github.com/JimLiu)) | ||
### v5.2.0 (2021-07-13) | ||
@@ -2,0 +9,0 @@ <a id="v5.2.0"></a> |
@@ -13,2 +13,12 @@ import { SecureContext } from 'tls'; | ||
type Fetch = (path: string, opts?: Gofer.FetchOpts, cb?: any) => FetchResponse; | ||
type EndpointFnReturn = | ||
| ((...args: any[]) => FetchResponse) | ||
| { | ||
[key: string]: (...args: any[]) => FetchResponse; | ||
}; | ||
export type EndpointFn = (fetch: Fetch) => EndpointFnReturn; | ||
declare class Gofer { | ||
@@ -27,2 +37,4 @@ constructor( | ||
): Gofer.FetchOpts; | ||
registerEndpoint(name: string, endpointFn: EndpointFn): this; | ||
registerEndpoints(endpoints: { [name: string]: EndpointFn }): this; | ||
@@ -33,3 +45,3 @@ clone(): this; | ||
fetch(path: string, opts?: Gofer.FetchOpts): FetchResponse; | ||
fetch: Fetch; | ||
get(path: string, opts?: Gofer.FetchOpts): FetchResponse; | ||
@@ -36,0 +48,0 @@ post(path: string, opts?: Gofer.FetchOpts): FetchResponse; |
{ | ||
"name": "gofer", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "A general purpose service client library", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
[![nlm-github](https://img.shields.io/badge/github-groupon%2Fgofer%2Fissues-F4D03F?logo=github&logoColor=white)](https://github.com/groupon/gofer/issues) | ||
![nlm-node](https://img.shields.io/badge/node-%3E%3D10.13-blue?logo=node.js&logoColor=white) | ||
![nlm-version](https://img.shields.io/badge/version-5.2.0-blue?logo=version&logoColor=white) | ||
![nlm-version](https://img.shields.io/badge/version-5.2.1-blue?logo=version&logoColor=white) | ||
[![Build Status](https://travis-ci.com/groupon/gofer.svg?branch=main)](https://travis-ci.com/groupon/gofer) | ||
@@ -5,0 +5,0 @@ |
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
82367
1370