@petercatai/whisker-client 0.1.202508060707-dev → 0.1.202508110245
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/dist/api.js +14 -9
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -198,15 +198,20 @@ class HttpClient {
|
|
|
198
198
|
[ContentType.Text]: (input) => input !== null && typeof input !== "string"
|
|
199
199
|
? JSON.stringify(input)
|
|
200
200
|
: input,
|
|
201
|
-
[ContentType.FormData]: (input) =>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
[ContentType.FormData]: (input) => {
|
|
202
|
+
if (input instanceof FormData) {
|
|
203
|
+
return input;
|
|
204
|
+
}
|
|
205
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
206
|
+
const property = input[key];
|
|
207
|
+
formData.append(key, property instanceof Blob
|
|
208
|
+
? property
|
|
209
|
+
: typeof property === "object" && property !== null
|
|
210
|
+
? JSON.stringify(property)
|
|
211
|
+
: `${property}`);
|
|
212
|
+
return formData;
|
|
213
|
+
}, new FormData());
|
|
214
|
+
},
|
|
210
215
|
[ContentType.UrlEncoded]: (input) => this.toQueryString(input),
|
|
211
216
|
};
|
|
212
217
|
this.createAbortSignal = (cancelToken) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercatai/whisker-client",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Generated API client (
|
|
3
|
+
"version": "0.1.202508110245",
|
|
4
|
+
"description": "Generated API client (Production)",
|
|
5
5
|
"main": "dist/api.js",
|
|
6
6
|
"types": "dist/api.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public",
|
|
16
|
-
"tag": "
|
|
16
|
+
"tag": "latest"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/node": "^24.2.
|
|
19
|
+
"@types/node": "^24.2.1",
|
|
20
20
|
"axios": "^1.11.0",
|
|
21
21
|
"typescript": "^5.9.2"
|
|
22
22
|
}
|