@xata.io/client 0.25.0 → 0.25.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/.turbo/turbo-add-version.log +1 -1
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
|
2
|
-
> @xata.io/client@0.25.
|
2
|
+
> @xata.io/client@0.25.1 build /home/runner/work/client-ts/client-ts/packages/client
|
3
3
|
> rimraf dist && rollup -c
|
4
4
|
|
5
5
|
[36m
|
6
6
|
[1msrc/index.ts[22m → [1mdist/index.cjs[22m...[39m
|
7
|
-
[32mcreated [1mdist/index.cjs[22m in [
|
7
|
+
[32mcreated [1mdist/index.cjs[22m in [1m1s[22m[39m
|
8
8
|
[36m
|
9
9
|
[1msrc/index.ts[22m → [1mdist/index.mjs[22m...[39m
|
10
|
-
[32mcreated [1mdist/index.mjs[22m in [
|
10
|
+
[32mcreated [1mdist/index.mjs[22m in [1m590ms[22m[39m
|
11
11
|
[36m
|
12
12
|
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
13
13
|
[1m[33m(!) Circular dependencies[39m[22m
|
@@ -15,4 +15,4 @@ src/api/index.ts -> src/plugins.ts -> src/api/index.ts
|
|
15
15
|
src/api/index.ts -> src/api/client.ts -> src/api/components.ts -> src/api/controlPlaneFetcher.ts -> src/api/errors.ts -> src/api/index.ts
|
16
16
|
src/schema/record.ts -> src/schema/files.ts -> src/schema/record.ts
|
17
17
|
...and 7 more
|
18
|
-
[32mcreated [1mdist/index.d.ts[22m in [
|
18
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m4.9s[22m[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# @xata.io/client
|
2
2
|
|
3
|
+
## 0.25.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#1101](https://github.com/xataio/client-ts/pull/1101) [`321c33ff`](https://github.com/xataio/client-ts/commit/321c33ff684c416a6cc813be2a970fd8f826b885) Thanks [@SferaDev](https://github.com/SferaDev)! - Fix bug with cancellable timeouts
|
8
|
+
|
3
9
|
## 0.25.0
|
4
10
|
|
5
11
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
@@ -88,6 +88,18 @@ function chunk(array, chunkSize) {
|
|
88
88
|
async function timeout(ms) {
|
89
89
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
90
90
|
}
|
91
|
+
function timeoutWithCancel(ms) {
|
92
|
+
let timeoutId;
|
93
|
+
const promise = new Promise((resolve) => {
|
94
|
+
timeoutId = setTimeout(() => {
|
95
|
+
resolve();
|
96
|
+
}, ms);
|
97
|
+
});
|
98
|
+
return {
|
99
|
+
cancel: () => clearTimeout(timeoutId),
|
100
|
+
promise
|
101
|
+
};
|
102
|
+
}
|
91
103
|
function promiseMap(inputValues, mapper) {
|
92
104
|
const reducer = (acc$, inputValue) => acc$.then(
|
93
105
|
(acc) => mapper(inputValue).then((result) => {
|
@@ -290,7 +302,8 @@ class ApiRequestPool {
|
|
290
302
|
const start = /* @__PURE__ */ new Date();
|
291
303
|
const fetchImpl = this.getFetch();
|
292
304
|
const runRequest = async (stalled = false) => {
|
293
|
-
const
|
305
|
+
const { promise, cancel } = timeoutWithCancel(REQUEST_TIMEOUT);
|
306
|
+
const response = await Promise.race([fetchImpl(url, options), promise.then(() => null)]).finally(cancel);
|
294
307
|
if (!response) {
|
295
308
|
throw new Error("Request timed out");
|
296
309
|
}
|
@@ -516,7 +529,7 @@ function defaultOnOpen(response) {
|
|
516
529
|
}
|
517
530
|
}
|
518
531
|
|
519
|
-
const VERSION = "0.25.
|
532
|
+
const VERSION = "0.25.1";
|
520
533
|
|
521
534
|
var __defProp$7 = Object.defineProperty;
|
522
535
|
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|