@faasjs/react 8.0.0-beta.27 → 8.0.0-beta.28
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/index.mjs +2 -4
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -454,7 +454,6 @@ function normalizeMockResponse(response) {
|
|
|
454
454
|
return new Response(response || {});
|
|
455
455
|
}
|
|
456
456
|
async function resolveMockResponse(action, params, options) {
|
|
457
|
-
console.debug(`[FaasJS] Mock request: ${action} %j`, params);
|
|
458
457
|
if (typeof mock === "function") return normalizeMockResponse(await mock(action, params, options));
|
|
459
458
|
return normalizeMockResponse(mock);
|
|
460
459
|
}
|
|
@@ -659,7 +658,6 @@ var FaasBrowserClient = class {
|
|
|
659
658
|
this.id = `FBC-${generateId()}`;
|
|
660
659
|
this.baseUrl = baseUrl;
|
|
661
660
|
this.defaultOptions = options;
|
|
662
|
-
console.debug(`[FaasJS] Initialize with baseUrl: ${this.baseUrl}`);
|
|
663
661
|
}
|
|
664
662
|
/**
|
|
665
663
|
* Makes a request to a FaasJS function.
|
|
@@ -1262,7 +1260,7 @@ function useFaasRequest({ action, defaultParams, options, beforeSend, onSuccess,
|
|
|
1262
1260
|
if (typeof e?.message === "string" && e.message.toLowerCase().includes("aborted")) return;
|
|
1263
1261
|
if (!failedOnceRef.current && typeof e?.message === "string" && e.message.includes("Failed to fetch")) {
|
|
1264
1262
|
failedOnceRef.current = true;
|
|
1265
|
-
console.warn(`FaasReactClient: ${e.message} retry...`);
|
|
1263
|
+
console.warn(`[FaasJS] FaasReactClient: ${e.message} retry...`);
|
|
1266
1264
|
run();
|
|
1267
1265
|
return;
|
|
1268
1266
|
}
|
|
@@ -1512,7 +1510,7 @@ function FaasReactClient(options = { baseUrl: "/" }) {
|
|
|
1512
1510
|
function getClient(host) {
|
|
1513
1511
|
const client = clients[host || Object.keys(clients)[0]];
|
|
1514
1512
|
if (!client) {
|
|
1515
|
-
console.warn("FaasReactClient is not initialized manually, use default.");
|
|
1513
|
+
console.warn("[FaasJS] FaasReactClient is not initialized manually, use default.");
|
|
1516
1514
|
return FaasReactClient();
|
|
1517
1515
|
}
|
|
1518
1516
|
return client;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/react",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.28",
|
|
4
4
|
"homepage": "https://faasjs.com/doc/react/",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/faasjs/faasjs/issues"
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@faasjs/types": ">=8.0.0-beta.
|
|
29
|
+
"@faasjs/types": ">=8.0.0-beta.28",
|
|
30
30
|
"@types/react": "^19.0.0",
|
|
31
31
|
"react": "^19.0.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@faasjs/types": ">=8.0.0-beta.
|
|
34
|
+
"@faasjs/types": ">=8.0.0-beta.28"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=24.0.0",
|