Comparing version 0.12.1-beta.2 to 0.12.2
@@ -6,2 +6,8 @@ All notable changes to this project will be documented in this file. | ||
## [0.12.2] - 2022-06-03 | ||
### Fixed | ||
- `abort` not available when using shorthand get/post/etc functions | ||
### Dev | ||
- bump deps | ||
## [0.12.1-beta.2] - 2021-09-23 | ||
@@ -8,0 +14,0 @@ ### Fixed |
@@ -14,7 +14,7 @@ import type { CustomError } from "better-custom-error"; | ||
private _buildUrl; | ||
get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
post<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
patch<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
head<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
post<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
patch<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
head<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
request<T = unknown>(method: string, url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
@@ -21,0 +21,0 @@ private _request; |
@@ -148,15 +148,15 @@ "use strict"; | ||
} | ||
async get(url, queryParams, options) { | ||
get(url, queryParams, options) { | ||
return this.request("GET", url, queryParams, null, options); | ||
} | ||
async post(url, queryParams, body, options) { | ||
post(url, queryParams, body, options) { | ||
return this.request("POST", url, queryParams, body, options); | ||
} | ||
async patch(url, queryParams, body, options) { | ||
patch(url, queryParams, body, options) { | ||
return this.request("PATCH", url, queryParams, body, options); | ||
} | ||
async delete(url, queryParams, body, options) { | ||
delete(url, queryParams, body, options) { | ||
return this.request("DELETE", url, queryParams, body, options); | ||
} | ||
async head(url, queryParams, body, options) { | ||
head(url, queryParams, body, options) { | ||
return this.request("HEAD", url, queryParams, body, options); | ||
@@ -163,0 +163,0 @@ } |
@@ -14,7 +14,7 @@ import type { CustomError } from "better-custom-error"; | ||
private _buildUrl; | ||
get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
post<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
patch<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
head<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): Promise<PossibleNonErrorResponses>; | ||
get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
post<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
patch<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
head<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
request<T = unknown>(method: string, url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null): AbortablePromise<PossibleNonErrorResponses>; | ||
@@ -21,0 +21,0 @@ private _request; |
@@ -138,15 +138,15 @@ import f, { Headers } from "light-isomorphic-fetch"; | ||
} | ||
async get(url, queryParams, options) { | ||
get(url, queryParams, options) { | ||
return this.request("GET", url, queryParams, null, options); | ||
} | ||
async post(url, queryParams, body, options) { | ||
post(url, queryParams, body, options) { | ||
return this.request("POST", url, queryParams, body, options); | ||
} | ||
async patch(url, queryParams, body, options) { | ||
patch(url, queryParams, body, options) { | ||
return this.request("PATCH", url, queryParams, body, options); | ||
} | ||
async delete(url, queryParams, body, options) { | ||
delete(url, queryParams, body, options) { | ||
return this.request("DELETE", url, queryParams, body, options); | ||
} | ||
async head(url, queryParams, body, options) { | ||
head(url, queryParams, body, options) { | ||
return this.request("HEAD", url, queryParams, body, options); | ||
@@ -153,0 +153,0 @@ } |
{ | ||
"name": "api-reach", | ||
"version": "0.12.1-beta.2", | ||
"version": "0.12.2", | ||
"repository": "git@github.com:dzek69/api-reach.git", | ||
@@ -47,3 +47,4 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>", | ||
"@dzek69/eslint-config-typescript": "^0.4.0", | ||
"@keyv/sqlite": "^2.0.2", | ||
"@keyv/sqlite": "^3.5.2", | ||
"@types/jest": "^26.0.23", | ||
"@types/keyv": "^3.1.1", | ||
@@ -58,13 +59,12 @@ "@types/node-fetch": "^2.5.8", | ||
"fs-extra": "^9.0.1", | ||
"husky": "^4.3.0", | ||
"jest": "^27.0.6", | ||
"husky": "^7.0.4", | ||
"jest": "^27.5.1", | ||
"keyv": "^4.0.3", | ||
"must": "^0.13.4", | ||
"node-fetch": "^2.6.0", | ||
"nodemon": "^2.0.6", | ||
"node-fetch": "^2.6.7", | ||
"nodemon": "^2.0.15", | ||
"ts-node": "^9.0.0", | ||
"typedoc": "^0.21.2", | ||
"typescript": "^4.2.4", | ||
"@types/jest": "^26.0.23", | ||
"typedoc-plugin-pages-fork-fork": "^0.0.3" | ||
"typedoc": "^0.21.10", | ||
"typedoc-plugin-pages-fork-fork": "^0.0.3", | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -80,3 +80,3 @@ "peerDependencies": { | ||
"libraryTemplate": { | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"language": "typescript", | ||
@@ -83,0 +83,0 @@ "fixDefaultForCommonJS": true, |
@@ -224,3 +224,3 @@ /* eslint-disable max-lines */ | ||
*/ | ||
public async get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null) { | ||
public get<T>(url: URLArgument, queryParams?: Data | null, options?: Options | null) { | ||
return this.request<T>("GET", url, queryParams, null, options); | ||
@@ -245,3 +245,3 @@ } | ||
*/ | ||
public async post<T>( | ||
public post<T>( | ||
url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null, | ||
@@ -268,3 +268,3 @@ ) { | ||
*/ | ||
public async patch<T>( | ||
public patch<T>( | ||
url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null, | ||
@@ -291,3 +291,3 @@ ) { | ||
*/ | ||
public async delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null) { | ||
public delete<T>(url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null) { | ||
return this.request<T>("DELETE", url, queryParams, body, options); | ||
@@ -312,3 +312,3 @@ } | ||
*/ | ||
public async head<T>( | ||
public head<T>( | ||
url: URLArgument, queryParams?: Data | null, body?: BodyArgument, options?: Options | null, | ||
@@ -315,0 +315,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
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
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
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
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
773081