@cloudparse/up-miniapps-sdk 0.9.0 → 0.10.0
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.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +17 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/style.css +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3665,7 +3665,7 @@ var RoutingService = {
|
|
|
3665
3665
|
};
|
|
3666
3666
|
|
|
3667
3667
|
// package.json
|
|
3668
|
-
var version = "0.
|
|
3668
|
+
var version = "0.10.0";
|
|
3669
3669
|
|
|
3670
3670
|
// src/sdk.ts
|
|
3671
3671
|
function deepFreeze(obj) {
|
|
@@ -3859,9 +3859,22 @@ var MiniAppSDK = class {
|
|
|
3859
3859
|
/**
|
|
3860
3860
|
* Performs a network request via the host shell.
|
|
3861
3861
|
* @param options Request method, URL, headers, and body.
|
|
3862
|
+
*
|
|
3863
|
+
* Real bug, caught by reviewer-strict: `options.timeoutMs` only ever
|
|
3864
|
+
* reached the shell's own `fetchWithTimeout` call — this `bridge.send`
|
|
3865
|
+
* has an entirely separate client-side promise timeout (its own
|
|
3866
|
+
* `timeoutMs` param, default 30000ms) waiting for the native reply,
|
|
3867
|
+
* previously left at that default regardless of what `options.timeoutMs`
|
|
3868
|
+
* said. A slow-but-legitimate call given a longer `options.timeoutMs`
|
|
3869
|
+
* (e.g. 50000ms for an LLM-backed endpoint) would still get this
|
|
3870
|
+
* bridge-level promise rejected ("Bridge request timeout") at 30s,
|
|
3871
|
+
* reintroducing the exact same "aborted before it could finish" bug
|
|
3872
|
+
* this field exists to fix, one layer up. Forwarding it here means both
|
|
3873
|
+
* ceilings move together; omitted (`undefined`, every other caller)
|
|
3874
|
+
* falls through to `send`'s own unchanged 30000ms default.
|
|
3862
3875
|
*/
|
|
3863
3876
|
request: async (options) => {
|
|
3864
|
-
return this.bridge.send("NETWORK_REQUEST", options);
|
|
3877
|
+
return this.bridge.send("NETWORK_REQUEST", options, options.timeoutMs);
|
|
3865
3878
|
}
|
|
3866
3879
|
});
|
|
3867
3880
|
/**
|
|
@@ -5690,10 +5703,11 @@ function createApiService(options) {
|
|
|
5690
5703
|
method: "PATCH",
|
|
5691
5704
|
url: buildUrl(getBaseUrl(), path)
|
|
5692
5705
|
}),
|
|
5693
|
-
post: (path, body) => sdk.network.request({
|
|
5706
|
+
post: (path, body, timeoutMs) => sdk.network.request({
|
|
5694
5707
|
body,
|
|
5695
5708
|
headers: { "Content-Type": "application/json" },
|
|
5696
5709
|
method: "POST",
|
|
5710
|
+
timeoutMs,
|
|
5697
5711
|
url: buildUrl(getBaseUrl(), path)
|
|
5698
5712
|
}),
|
|
5699
5713
|
get wsUrl() {
|