@odata2ts/http-client-jquery 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/lib/JQueryClient.d.ts +10 -1
- package/lib/JQueryClient.js +31 -6
- package/lib/JQueryClient.js.map +1 -1
- package/lib/JQueryRequestConfig.js.map +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.14.1](https://github.com/odata2ts/http-client/compare/@odata2ts/http-client-jquery-v0.14.0...@odata2ts/http-client-jquery-v0.14.1) (2026-08-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Dependencies
|
|
10
|
+
|
|
11
|
+
* The following workspace dependencies were updated
|
|
12
|
+
* dependencies
|
|
13
|
+
* @odata2ts/http-client-base bumped from ^0.6.0 to ^0.6.1
|
|
14
|
+
* @odata2ts/http-client-common bumped from ^0.1.0 to ^0.1.1
|
|
15
|
+
|
|
16
|
+
## [0.14.0](https://github.com/odata2ts/http-client/compare/@odata2ts/http-client-jquery-v0.13.0...@odata2ts/http-client-jquery-v0.14.0) (2026-08-08)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ⚠ BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* the responseData of an error thrown for a binary request is no longer the Blob or the ReadableStream the successful response would have carried, but the parsed error document - or its text, if it is not JSON. Code decoding that Blob itself has to stop doing so.
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* surface the server's message when a binary request fails ([#47](https://github.com/odata2ts/http-client/issues/47)) ([c69ef66](https://github.com/odata2ts/http-client/commit/c69ef662171e7f2480fc928474b831fd18855133))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @odata2ts/http-client-base bumped from ^0.5.8 to ^0.6.0
|
|
33
|
+
|
|
6
34
|
## [0.13.0](https://github.com/odata2ts/http-client/compare/@odata2ts/http-client-jquery-v0.12.0...@odata2ts/http-client-jquery-v0.13.0) (2026-08-02)
|
|
7
35
|
|
|
8
36
|
|
package/lib/JQueryClient.d.ts
CHANGED
|
@@ -2,12 +2,21 @@ import { HttpResponseModel, ODataHttpClient, ODataHttpClientOptions, ODataHttpMe
|
|
|
2
2
|
import { BaseHttpClient, BaseRequestConfig } from "@odata2ts/http-client-base";
|
|
3
3
|
import { JQueryRequestConfig } from "./JQueryRequestConfig";
|
|
4
4
|
import jqXHR = JQuery.jqXHR;
|
|
5
|
-
export
|
|
5
|
+
export { DEFAULT_ERROR_MESSAGE } from "@odata2ts/http-client-common";
|
|
6
6
|
export declare const FAILURE_STREAM_UNSUPPORTED: string;
|
|
7
7
|
export declare class JQueryClient extends BaseHttpClient<JQueryRequestConfig> implements ODataHttpClient<JQueryRequestConfig> {
|
|
8
8
|
private readonly client;
|
|
9
9
|
private readonly config;
|
|
10
10
|
constructor(jquery: JQueryStatic, config?: JQueryRequestConfig, clientOptions?: ODataHttpClientOptions);
|
|
11
11
|
protected mapHeaders(jqXhr: jqXHR): Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Turns a failed request into the error to reject with.
|
|
14
|
+
*
|
|
15
|
+
* `responseJSON` is jQuery's own parsing of the response and covers the ordinary case. It stays empty
|
|
16
|
+
* for a binary request though: with `responseType: "blob"` XmlHttpRequest offers neither `responseText`
|
|
17
|
+
* nor anything jQuery could have parsed, and the server's error document sits in `response` as binary.
|
|
18
|
+
* Reading it there is what keeps a failing `getBlob` from reporting the default message.
|
|
19
|
+
*/
|
|
20
|
+
private buildFailure;
|
|
12
21
|
protected executeRequest<ResponseModel>(method: ODataHttpMethods, url: string, data: any, requestConfig: JQueryRequestConfig | undefined, internalConfig: BaseRequestConfig): Promise<HttpResponseModel<ResponseModel>>;
|
|
13
22
|
}
|
package/lib/JQueryClient.js
CHANGED
|
@@ -4,9 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.JQueryClient = exports.FAILURE_STREAM_UNSUPPORTED = exports.DEFAULT_ERROR_MESSAGE = void 0;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
6
|
const http_client_base_1 = require("@odata2ts/http-client-base");
|
|
7
|
+
const http_client_common_1 = require("@odata2ts/http-client-common");
|
|
7
8
|
const JQueryClientError_1 = require("./JQueryClientError");
|
|
8
9
|
const JQueryRequestConfig_1 = require("./JQueryRequestConfig");
|
|
9
|
-
|
|
10
|
+
var http_client_common_2 = require("@odata2ts/http-client-common");
|
|
11
|
+
Object.defineProperty(exports, "DEFAULT_ERROR_MESSAGE", { enumerable: true, get: function () { return http_client_common_2.DEFAULT_ERROR_MESSAGE; } });
|
|
10
12
|
exports.FAILURE_STREAM_UNSUPPORTED = "Streaming is not supported by the JqueryClient! XmlHttpRequest, which jQuery's ajax method builds " +
|
|
11
13
|
"upon, has no streaming API at all - neither for reading a response nor for sending a request body. " +
|
|
12
14
|
"Use the FetchClient for streams.";
|
|
@@ -31,6 +33,32 @@ class JQueryClient extends http_client_base_1.BaseHttpClient {
|
|
|
31
33
|
return collector;
|
|
32
34
|
}, {});
|
|
33
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Turns a failed request into the error to reject with.
|
|
38
|
+
*
|
|
39
|
+
* `responseJSON` is jQuery's own parsing of the response and covers the ordinary case. It stays empty
|
|
40
|
+
* for a binary request though: with `responseType: "blob"` XmlHttpRequest offers neither `responseText`
|
|
41
|
+
* nor anything jQuery could have parsed, and the server's error document sits in `response` as binary.
|
|
42
|
+
* Reading it there is what keeps a failing `getBlob` from reporting the default message.
|
|
43
|
+
*/
|
|
44
|
+
buildFailure(jqXHR, thrownError) {
|
|
45
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a;
|
|
47
|
+
let responseData;
|
|
48
|
+
try {
|
|
49
|
+
// `response` belongs to XmlHttpRequest itself, which jQuery's typing does not carry over
|
|
50
|
+
const rawResponse = jqXHR === null || jqXHR === void 0 ? void 0 : jqXHR.response;
|
|
51
|
+
responseData = (_a = jqXHR === null || jqXHR === void 0 ? void 0 : jqXHR.responseJSON) !== null && _a !== void 0 ? _a : (yield (0, http_client_base_1.parseErrorResponseBody)(rawResponse));
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
responseData = undefined;
|
|
55
|
+
}
|
|
56
|
+
const responseMessage = this.retrieveErrorMessage(responseData);
|
|
57
|
+
const failMsg = responseMessage || thrownError || http_client_common_1.DEFAULT_ERROR_MESSAGE;
|
|
58
|
+
const errorMessage = responseMessage ? http_client_common_1.FAILURE_RESPONSE_MESSAGE + responseMessage : failMsg;
|
|
59
|
+
return new JQueryClientError_1.JQueryClientError(errorMessage, jqXHR.status, this.mapHeaders(jqXHR), new Error(failMsg), jqXHR);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
34
62
|
executeRequest(method, url, data, requestConfig, internalConfig) {
|
|
35
63
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
36
64
|
const { headers } = internalConfig;
|
|
@@ -69,11 +97,8 @@ class JQueryClient extends http_client_base_1.BaseHttpClient {
|
|
|
69
97
|
data: response,
|
|
70
98
|
});
|
|
71
99
|
}, error: (jqXHR, textStatus, thrownError) => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const errorMessage = responseMessage ? "OData server responded with error: " + responseMessage : failMsg;
|
|
75
|
-
const responseHeaders = this.mapHeaders(jqXHR);
|
|
76
|
-
reject(new JQueryClientError_1.JQueryClientError(errorMessage, jqXHR.status, responseHeaders, new Error(failMsg), jqXHR));
|
|
100
|
+
// decoding the error document may take a turn of the event loop, hence the detour
|
|
101
|
+
this.buildFailure(jqXHR, thrownError).then(reject, reject);
|
|
77
102
|
} }));
|
|
78
103
|
});
|
|
79
104
|
});
|
package/lib/JQueryClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JQueryClient.js","sourceRoot":"","sources":["../src/JQueryClient.ts"],"names":[],"mappings":";AAAA,8EAA8E;;;;AAQ9E,
|
|
1
|
+
{"version":3,"file":"JQueryClient.js","sourceRoot":"","sources":["../src/JQueryClient.ts"],"names":[],"mappings":";AAAA,8EAA8E;;;;AAQ9E,iEAAuG;AACvG,qEAA+F;AAC/F,2DAAwD;AACxD,+DAA0E;AAI1E,mEAAqE;AAA5D,2HAAA,qBAAqB,OAAA;AACjB,QAAA,0BAA0B,GACrC,oGAAoG;IACpG,qGAAqG;IACrG,kCAAkC,CAAC;AAOrC,MAAa,YAAa,SAAQ,iCAAmC;IAInE,YAAY,MAAoB,EAAE,MAA4B,EAAE,aAAsC;QACpG,KAAK,CAAC,aAAa,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;IAC7B,CAAC;IAES,UAAU,CAAC,KAAY;QAC/B,OAAO,KAAK;aACT,qBAAqB,EAAE;aACvB,IAAI,EAAE;aACN,KAAK,CAAC,SAAS,CAAC;aAChB,MAAM,CAAC,CAAC,SAAiC,EAAE,IAAY,EAAE,EAAE;YAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAE/B,IAAI,MAAM,EAAE,CAAC;gBACX,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;YAC1C,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAA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AAU,EAAE,KAAK,CAAC,UAAU;4BAC5B,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;4BAC/B,IAAI,EAAE,QAAQ;yBACf,CAAC,CAAC;oBACL,CAAC,EACD,KAAK,EAAE,CAAC,KAAmB,EAAE,UAAkB,EAAE,WAAmB,EAAE,EAAE;wBACtE,kFAAkF;wBAClF,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;oBAC7D,CAAC,IACD,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AA/GD,oCA+GC","sourcesContent":["/// <reference path=\"../../../node_modules/@types/jquery/JQueryStatic.d.ts\" />\n\nimport {\n HttpResponseModel,\n ODataHttpClient,\n ODataHttpClientOptions,\n ODataHttpMethods,\n} from \"@odata2ts/http-client-api\";\nimport { BaseHttpClient, BaseRequestConfig, parseErrorResponseBody } from \"@odata2ts/http-client-base\";\nimport { DEFAULT_ERROR_MESSAGE, FAILURE_RESPONSE_MESSAGE } from \"@odata2ts/http-client-common\";\nimport { JQueryClientError } from \"./JQueryClientError\";\nimport { JQueryRequestConfig, mergeConfigs } from \"./JQueryRequestConfig\";\n\nimport jqXHR = JQuery.jqXHR;\n\nexport { DEFAULT_ERROR_MESSAGE } from \"@odata2ts/http-client-common\";\nexport const FAILURE_STREAM_UNSUPPORTED =\n \"Streaming is not supported by the JqueryClient! XmlHttpRequest, which jQuery's ajax method builds \" +\n \"upon, has no streaming API at all - neither for reading a response nor for sending a request body. \" +\n \"Use the FetchClient for streams.\";\n\ninterface InternalRequestConfig\n extends\n JQueryRequestConfig,\n Pick<JQuery.AjaxSettings, \"url\" | \"data\" | \"dataType\" | \"method\" | \"xhrFields\" | \"processData\" | \"contentType\"> {}\n\nexport class JQueryClient extends BaseHttpClient<JQueryRequestConfig> implements ODataHttpClient<JQueryRequestConfig> {\n private readonly client: JQueryStatic;\n private readonly config: JQueryRequestConfig;\n\n constructor(jquery: JQueryStatic, config?: JQueryRequestConfig, clientOptions?: ODataHttpClientOptions) {\n super(clientOptions);\n this.client = jquery;\n this.config = config ?? {};\n }\n\n protected mapHeaders(jqXhr: jqXHR): Record<string, string> {\n return jqXhr\n .getAllResponseHeaders()\n .trim()\n .split(/[\\r\\n]+/)\n .reduce((collector: Record<string, string>, line: string) => {\n const parts = line.split(\": \");\n const header = parts.shift();\n const value = parts.join(\": \");\n\n if (header) {\n collector[header.toLowerCase()] = value;\n }\n return collector;\n }, {});\n }\n\n /**\n * Turns a failed request into the error to reject with.\n *\n * `responseJSON` is jQuery's own parsing of the response and covers the ordinary case. It stays empty\n * for a binary request though: with `responseType: \"blob\"` XmlHttpRequest offers neither `responseText`\n * nor anything jQuery could have parsed, and the server's error document sits in `response` as binary.\n * Reading it there is what keeps a failing `getBlob` from reporting the default message.\n */\n private async buildFailure(jqXHR: jqXHR, thrownError: string): Promise<JQueryClientError> {\n let responseData: unknown;\n try {\n // `response` belongs to XmlHttpRequest itself, which jQuery's typing does not carry over\n const rawResponse = (jqXHR as unknown as Partial<XMLHttpRequest> | undefined)?.response;\n responseData = jqXHR?.responseJSON ?? (await parseErrorResponseBody(rawResponse));\n } catch (e) {\n responseData = undefined;\n }\n\n const responseMessage = this.retrieveErrorMessage(responseData);\n const failMsg = responseMessage || thrownError || DEFAULT_ERROR_MESSAGE;\n const errorMessage = responseMessage ? FAILURE_RESPONSE_MESSAGE + responseMessage : failMsg;\n\n return new JQueryClientError(errorMessage, jqXHR.status, this.mapHeaders(jqXHR), new Error(failMsg), jqXHR);\n }\n\n protected async executeRequest<ResponseModel>(\n method: ODataHttpMethods,\n url: string,\n data: any,\n requestConfig: JQueryRequestConfig | undefined,\n internalConfig: BaseRequestConfig,\n ): Promise<HttpResponseModel<ResponseModel>> {\n const { headers } = internalConfig;\n const { params, ...mergedConfig } = mergeConfigs(this.config, mergeConfigs({ headers }, requestConfig));\n const isBinary = internalConfig.dataType === \"blob\";\n\n // set core inputs for request\n const resultConfig: InternalRequestConfig = {\n ...mergedConfig,\n method,\n // only binary data and an explicitly plain text body are passed through as they are\n data: isBinary || this.isPlainTextBody(internalConfig.headers) ? data : JSON.stringify(data),\n url,\n };\n\n // apply additional query params to the URL\n if (params && Object.values(params).length) {\n resultConfig.url +=\n (url.match(/\\?/) ? \"&\" : \"?\") +\n // @ts-ignore\n new URLSearchParams(params).toString();\n }\n\n // handling of extra data types: blob and stream (not supported)\n if (isBinary) {\n resultConfig.xhrFields = { responseType: \"blob\" };\n // jQuery would otherwise turn the blob into a query string (processData defaults to true)\n // and add its own urlencoded content type; the actual mime type is already part of the headers\n resultConfig.processData = false;\n resultConfig.contentType = false;\n } else if (internalConfig.dataType === \"stream\") {\n // a refusal is a failure of this client like any other, hence it carries the same error type\n throw new JQueryClientError(FAILURE_STREAM_UNSUPPORTED);\n }\n\n // the actual request\n return new Promise((resolve, reject) => {\n this.client.ajax({\n ...resultConfig,\n success: (response: any, textStatus: string, jqXHR: JQuery.jqXHR) => {\n resolve({\n status: jqXHR.status,\n statusText: jqXHR.statusText,\n headers: this.mapHeaders(jqXHR),\n data: response,\n });\n },\n error: (jqXHR: JQuery.jqXHR, textStatus: string, thrownError: string) => {\n // decoding the error document may take a turn of the event loop, hence the detour\n this.buildFailure(jqXHR, thrownError).then(reject, reject);\n },\n });\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JQueryRequestConfig.js","sourceRoot":"","sources":["../src/JQueryRequestConfig.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"JQueryRequestConfig.js","sourceRoot":"","sources":["../src/JQueryRequestConfig.ts"],"names":[],"mappings":";;AAOA,oCAWC;;AAXD,SAAgB,YAAY,CAAC,MAA4B,EAAE,OAA6B;IACtF,MAAM,KAA8B,MAAM,IAAI,EAAE,EAA1C,EAAE,OAAO,OAAiC,EAA5B,WAAW,sBAAzB,WAA2B,CAAe,CAAC;IACjD,MAAM,KAAyC,OAAO,IAAI,EAAE,EAAtD,EAAE,OAAO,EAAE,QAAQ,OAAmC,EAA9B,YAAY,sBAApC,WAAsC,CAAgB,CAAC;IAC7D,qDACK,WAAW,GACX,YAAY,KACf,OAAO,kCACF,OAAO,GACP,QAAQ,KAEb;AACJ,CAAC","sourcesContent":["import { ODataRequestConfig } from \"@odata2ts/http-client-api\";\n\nexport interface JQueryRequestConfig\n extends\n ODataRequestConfig,\n Pick<JQuery.AjaxSettings, \"complete\" | \"beforeSend\" | \"statusCode\" | \"timeout\" | \"cache\"> {}\n\nexport function mergeConfigs(config?: JQueryRequestConfig, toMerge?: JQueryRequestConfig): JQueryRequestConfig {\n const { headers, ...passThrough } = config || {};\n const { headers: headers2, ...passThrough2 } = toMerge || {};\n return {\n ...passThrough,\n ...passThrough2,\n headers: {\n ...headers,\n ...headers2,\n },\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odata2ts/http-client-jquery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "JQuery based http client usable by odata2ts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"http client",
|
|
@@ -26,20 +26,23 @@
|
|
|
26
26
|
"check-circular-deps": "madge ./src --extensions ts --circular",
|
|
27
27
|
"clean": "rimraf lib coverage",
|
|
28
28
|
"compile": "tsc",
|
|
29
|
-
"int-test": "vitest run --dir int-test",
|
|
30
29
|
"test": "vitest run",
|
|
31
30
|
"unit-test": "vitest run --dir test"
|
|
32
31
|
},
|
|
33
32
|
"dependencies": {
|
|
34
|
-
"@odata2ts/http-client-base": "^0.
|
|
33
|
+
"@odata2ts/http-client-base": "^0.6.1",
|
|
34
|
+
"@odata2ts/http-client-common": "^0.1.1",
|
|
35
35
|
"tslib": "^2.8.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jquery": "^3.5.34",
|
|
39
39
|
"@types/node": "^24",
|
|
40
40
|
"jquery": "~3.6.4",
|
|
41
|
+
"jsdom": "^30.0.0",
|
|
42
|
+
"madge": "^8.0.0",
|
|
41
43
|
"rimraf": "^6.1.3",
|
|
42
|
-
"typescript": "6.0.3"
|
|
44
|
+
"typescript": "6.0.3",
|
|
45
|
+
"vitest": "^4.1.10"
|
|
43
46
|
},
|
|
44
47
|
"peerDependencies": {
|
|
45
48
|
"jquery": ">1.0"
|