@builder.io/sdk-qwik 0.16.24 → 0.17.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.
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.24";
3
+ const SDK_VERSION = "0.17.0";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.24";
1
+ const SDK_VERSION = "0.17.0";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
54
54
  return content.results;
55
55
  };
56
56
  async function fetchEntries(options) {
57
- try {
58
- const url = generateContentUrl.generateContentUrl(options);
59
- const content = await _fetchContent(options);
60
- if (!checkContentHasResults(content)) {
61
- logger.logger.error("Error fetching data. ", {
62
- url,
63
- content,
64
- options
65
- });
66
- return null;
67
- }
68
- return _processContentResult(options, content);
69
- } catch (error) {
70
- logger.logger.error("Error fetching data. ", error);
71
- return null;
57
+ const url = generateContentUrl.generateContentUrl(options);
58
+ const content = await _fetchContent(options);
59
+ if (!checkContentHasResults(content)) {
60
+ logger.logger.error("Error fetching data. ", {
61
+ url,
62
+ content,
63
+ options
64
+ });
65
+ throw content;
72
66
  }
67
+ return _processContentResult(options, content);
73
68
  }
74
69
  exports._processContentResult = _processContentResult;
75
70
  exports.fetchEntries = fetchEntries;
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
52
52
  return content.results;
53
53
  };
54
54
  async function fetchEntries(options) {
55
- try {
56
- const url = generateContentUrl(options);
57
- const content = await _fetchContent(options);
58
- if (!checkContentHasResults(content)) {
59
- logger.error("Error fetching data. ", {
60
- url,
61
- content,
62
- options
63
- });
64
- return null;
65
- }
66
- return _processContentResult(options, content);
67
- } catch (error) {
68
- logger.error("Error fetching data. ", error);
69
- return null;
55
+ const url = generateContentUrl(options);
56
+ const content = await _fetchContent(options);
57
+ if (!checkContentHasResults(content)) {
58
+ logger.error("Error fetching data. ", {
59
+ url,
60
+ content,
61
+ options
62
+ });
63
+ throw content;
70
64
  }
65
+ return _processContentResult(options, content);
71
66
  }
72
67
  export {
73
68
  _processContentResult,
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.24";
3
+ const SDK_VERSION = "0.17.0";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.24";
1
+ const SDK_VERSION = "0.17.0";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
54
54
  return content.results;
55
55
  };
56
56
  async function fetchEntries(options) {
57
- try {
58
- const url = generateContentUrl.generateContentUrl(options);
59
- const content = await _fetchContent(options);
60
- if (!checkContentHasResults(content)) {
61
- logger.logger.error("Error fetching data. ", {
62
- url,
63
- content,
64
- options
65
- });
66
- return null;
67
- }
68
- return _processContentResult(options, content);
69
- } catch (error) {
70
- logger.logger.error("Error fetching data. ", error);
71
- return null;
57
+ const url = generateContentUrl.generateContentUrl(options);
58
+ const content = await _fetchContent(options);
59
+ if (!checkContentHasResults(content)) {
60
+ logger.logger.error("Error fetching data. ", {
61
+ url,
62
+ content,
63
+ options
64
+ });
65
+ throw content;
72
66
  }
67
+ return _processContentResult(options, content);
73
68
  }
74
69
  exports._processContentResult = _processContentResult;
75
70
  exports.fetchEntries = fetchEntries;
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
52
52
  return content.results;
53
53
  };
54
54
  async function fetchEntries(options) {
55
- try {
56
- const url = generateContentUrl(options);
57
- const content = await _fetchContent(options);
58
- if (!checkContentHasResults(content)) {
59
- logger.error("Error fetching data. ", {
60
- url,
61
- content,
62
- options
63
- });
64
- return null;
65
- }
66
- return _processContentResult(options, content);
67
- } catch (error) {
68
- logger.error("Error fetching data. ", error);
69
- return null;
55
+ const url = generateContentUrl(options);
56
+ const content = await _fetchContent(options);
57
+ if (!checkContentHasResults(content)) {
58
+ logger.error("Error fetching data. ", {
59
+ url,
60
+ content,
61
+ options
62
+ });
63
+ throw content;
70
64
  }
65
+ return _processContentResult(options, content);
71
66
  }
72
67
  export {
73
68
  _processContentResult,
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const SDK_VERSION = "0.16.24";
3
+ const SDK_VERSION = "0.17.0";
4
4
  exports.SDK_VERSION = SDK_VERSION;
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = "0.16.24";
1
+ const SDK_VERSION = "0.17.0";
2
2
  export {
3
3
  SDK_VERSION
4
4
  };
@@ -54,22 +54,17 @@ const _processContentResult = async (options, content, url = generateContentUrl.
54
54
  return content.results;
55
55
  };
56
56
  async function fetchEntries(options) {
57
- try {
58
- const url = generateContentUrl.generateContentUrl(options);
59
- const content = await _fetchContent(options);
60
- if (!checkContentHasResults(content)) {
61
- logger.logger.error("Error fetching data. ", {
62
- url,
63
- content,
64
- options
65
- });
66
- return null;
67
- }
68
- return _processContentResult(options, content);
69
- } catch (error) {
70
- logger.logger.error("Error fetching data. ", error);
71
- return null;
57
+ const url = generateContentUrl.generateContentUrl(options);
58
+ const content = await _fetchContent(options);
59
+ if (!checkContentHasResults(content)) {
60
+ logger.logger.error("Error fetching data. ", {
61
+ url,
62
+ content,
63
+ options
64
+ });
65
+ throw content;
72
66
  }
67
+ return _processContentResult(options, content);
73
68
  }
74
69
  exports._processContentResult = _processContentResult;
75
70
  exports.fetchEntries = fetchEntries;
@@ -52,22 +52,17 @@ const _processContentResult = async (options, content, url = generateContentUrl(
52
52
  return content.results;
53
53
  };
54
54
  async function fetchEntries(options) {
55
- try {
56
- const url = generateContentUrl(options);
57
- const content = await _fetchContent(options);
58
- if (!checkContentHasResults(content)) {
59
- logger.error("Error fetching data. ", {
60
- url,
61
- content,
62
- options
63
- });
64
- return null;
65
- }
66
- return _processContentResult(options, content);
67
- } catch (error) {
68
- logger.error("Error fetching data. ", error);
69
- return null;
55
+ const url = generateContentUrl(options);
56
+ const content = await _fetchContent(options);
57
+ if (!checkContentHasResults(content)) {
58
+ logger.error("Error fetching data. ", {
59
+ url,
60
+ content,
61
+ options
62
+ });
63
+ throw content;
70
64
  }
65
+ return _processContentResult(options, content);
71
66
  }
72
67
  export {
73
68
  _processContentResult,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.16.24",
3
+ "version": "0.17.0",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.24";
1
+ export declare const SDK_VERSION = "0.17.0";
@@ -14,5 +14,5 @@ export declare const _processContentResult: (options: GetContentOptions, content
14
14
  /**
15
15
  * Returns a paginated array of entries that match the given options.
16
16
  */
17
- export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[] | null>;
17
+ export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[]>;
18
18
  export {};