@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 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 = 1e4, ...fetchOptions } = options;
36
- const controller = new AbortController();
37
- const timeoutId = setTimeout(() => controller.abort(), timeout);
38
- try {
39
- const response = await fetch(url, {
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 = 1e4, ...fetchOptions } = options;
11
- const controller = new AbortController();
12
- const timeoutId = setTimeout(() => controller.abort(), timeout);
13
- try {
14
- const response = await fetch(url, {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thestatic-tv/dcl-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Connect your Decentraland scene to thestatic.tv - full channel lineup, metrics tracking, and interactions",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",