@thestatic-tv/dcl-sdk 1.0.0 → 1.0.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/dist/index.js +6 -15
- package/dist/index.mjs +6 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,22 +32,13 @@ module.exports = __toCommonJS(index_exports);
|
|
|
32
32
|
|
|
33
33
|
// src/utils/http.ts
|
|
34
34
|
async function request(url, options = {}) {
|
|
35
|
-
const { timeout
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
...fetchOptions,
|
|
41
|
-
signal: controller.signal
|
|
42
|
-
});
|
|
43
|
-
if (!response.ok) {
|
|
44
|
-
const errorData = await response.json().catch(() => ({}));
|
|
45
|
-
throw new Error(errorData.error || `HTTP ${response.status}`);
|
|
46
|
-
}
|
|
47
|
-
return response.json();
|
|
48
|
-
} finally {
|
|
49
|
-
clearTimeout(timeoutId);
|
|
35
|
+
const { timeout: _timeout, ...fetchOptions } = options;
|
|
36
|
+
const response = await fetch(url, fetchOptions);
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
const errorData = await response.json().catch(() => ({}));
|
|
39
|
+
throw new Error(errorData.error || `HTTP ${response.status}`);
|
|
50
40
|
}
|
|
41
|
+
return response.json();
|
|
51
42
|
}
|
|
52
43
|
|
|
53
44
|
// src/modules/guide.ts
|
package/dist/index.mjs
CHANGED
|
@@ -7,22 +7,13 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
|
|
8
8
|
// src/utils/http.ts
|
|
9
9
|
async function request(url, options = {}) {
|
|
10
|
-
const { timeout
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...fetchOptions,
|
|
16
|
-
signal: controller.signal
|
|
17
|
-
});
|
|
18
|
-
if (!response.ok) {
|
|
19
|
-
const errorData = await response.json().catch(() => ({}));
|
|
20
|
-
throw new Error(errorData.error || `HTTP ${response.status}`);
|
|
21
|
-
}
|
|
22
|
-
return response.json();
|
|
23
|
-
} finally {
|
|
24
|
-
clearTimeout(timeoutId);
|
|
10
|
+
const { timeout: _timeout, ...fetchOptions } = options;
|
|
11
|
+
const response = await fetch(url, fetchOptions);
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
const errorData = await response.json().catch(() => ({}));
|
|
14
|
+
throw new Error(errorData.error || `HTTP ${response.status}`);
|
|
25
15
|
}
|
|
16
|
+
return response.json();
|
|
26
17
|
}
|
|
27
18
|
|
|
28
19
|
// src/modules/guide.ts
|
package/package.json
CHANGED