@builder.io/sdk-qwik 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.
@@ -2958,7 +2958,7 @@ async function fetchOneEntry(options) {
2958
2958
  limit: 1
2959
2959
  });
2960
2960
  if (allContent)
2961
- return allContent.results[0] || null;
2961
+ return allContent[0] || null;
2962
2962
  return null;
2963
2963
  }
2964
2964
  const getContent = fetchOneEntry;
@@ -2972,9 +2972,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
2972
2972
  const canTrack = getDefaultCanTrack(options.canTrack);
2973
2973
  url.search.includes(`preview=`);
2974
2974
  if (!canTrack)
2975
- return content;
2975
+ return content.results;
2976
2976
  if (!(isBrowser() || TARGET === "reactNative"))
2977
- return content;
2977
+ return content.results;
2978
2978
  try {
2979
2979
  const newResults = [];
2980
2980
  for (const item of content.results)
@@ -2986,7 +2986,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
2986
2986
  } catch (e) {
2987
2987
  logger.error("Could not process A/B tests. ", e);
2988
2988
  }
2989
- return content;
2989
+ return content.results;
2990
2990
  };
2991
2991
  async function fetchEntries(options) {
2992
2992
  try {
@@ -3206,7 +3206,7 @@ const getInteractionPropertiesForEvent = (event) => {
3206
3206
  }
3207
3207
  };
3208
3208
  };
3209
- const SDK_VERSION = "0.9.0";
3209
+ const SDK_VERSION = "0.10.0";
3210
3210
  const registry = {};
3211
3211
  function register(type, info) {
3212
3212
  let typeList = registry[type];
@@ -2956,7 +2956,7 @@ async function fetchOneEntry(options) {
2956
2956
  limit: 1
2957
2957
  });
2958
2958
  if (allContent)
2959
- return allContent.results[0] || null;
2959
+ return allContent[0] || null;
2960
2960
  return null;
2961
2961
  }
2962
2962
  const getContent = fetchOneEntry;
@@ -2970,9 +2970,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
2970
2970
  const canTrack = getDefaultCanTrack(options.canTrack);
2971
2971
  url.search.includes(`preview=`);
2972
2972
  if (!canTrack)
2973
- return content;
2973
+ return content.results;
2974
2974
  if (!(isBrowser() || TARGET === "reactNative"))
2975
- return content;
2975
+ return content.results;
2976
2976
  try {
2977
2977
  const newResults = [];
2978
2978
  for (const item of content.results)
@@ -2984,7 +2984,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
2984
2984
  } catch (e) {
2985
2985
  logger.error("Could not process A/B tests. ", e);
2986
2986
  }
2987
- return content;
2987
+ return content.results;
2988
2988
  };
2989
2989
  async function fetchEntries(options) {
2990
2990
  try {
@@ -3204,7 +3204,7 @@ const getInteractionPropertiesForEvent = (event) => {
3204
3204
  }
3205
3205
  };
3206
3206
  };
3207
- const SDK_VERSION = "0.9.0";
3207
+ const SDK_VERSION = "0.10.0";
3208
3208
  const registry = {};
3209
3209
  function register(type, info) {
3210
3210
  let typeList = registry[type];
@@ -6189,7 +6189,7 @@ async function fetchOneEntry(options) {
6189
6189
  limit: 1
6190
6190
  });
6191
6191
  if (allContent)
6192
- return allContent.results[0] || null;
6192
+ return allContent[0] || null;
6193
6193
  return null;
6194
6194
  }
6195
6195
  const getContent = fetchOneEntry;
@@ -6203,9 +6203,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
6203
6203
  const canTrack = getDefaultCanTrack(options.canTrack);
6204
6204
  url.search.includes(`preview=`);
6205
6205
  if (!canTrack)
6206
- return content;
6206
+ return content.results;
6207
6207
  if (!(isBrowser() || TARGET === "reactNative"))
6208
- return content;
6208
+ return content.results;
6209
6209
  try {
6210
6210
  const newResults = [];
6211
6211
  for (const item of content.results)
@@ -6217,7 +6217,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
6217
6217
  } catch (e) {
6218
6218
  logger.error("Could not process A/B tests. ", e);
6219
6219
  }
6220
- return content;
6220
+ return content.results;
6221
6221
  };
6222
6222
  async function fetchEntries(options) {
6223
6223
  try {
@@ -6437,7 +6437,7 @@ const getInteractionPropertiesForEvent = (event) => {
6437
6437
  }
6438
6438
  };
6439
6439
  };
6440
- const SDK_VERSION = "0.9.0";
6440
+ const SDK_VERSION = "0.10.0";
6441
6441
  const registry = {};
6442
6442
  function register(type, info) {
6443
6443
  let typeList = registry[type];
@@ -6187,7 +6187,7 @@ async function fetchOneEntry(options) {
6187
6187
  limit: 1
6188
6188
  });
6189
6189
  if (allContent)
6190
- return allContent.results[0] || null;
6190
+ return allContent[0] || null;
6191
6191
  return null;
6192
6192
  }
6193
6193
  const getContent = fetchOneEntry;
@@ -6201,9 +6201,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
6201
6201
  const canTrack = getDefaultCanTrack(options.canTrack);
6202
6202
  url.search.includes(`preview=`);
6203
6203
  if (!canTrack)
6204
- return content;
6204
+ return content.results;
6205
6205
  if (!(isBrowser() || TARGET === "reactNative"))
6206
- return content;
6206
+ return content.results;
6207
6207
  try {
6208
6208
  const newResults = [];
6209
6209
  for (const item of content.results)
@@ -6215,7 +6215,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
6215
6215
  } catch (e) {
6216
6216
  logger.error("Could not process A/B tests. ", e);
6217
6217
  }
6218
- return content;
6218
+ return content.results;
6219
6219
  };
6220
6220
  async function fetchEntries(options) {
6221
6221
  try {
@@ -6435,7 +6435,7 @@ const getInteractionPropertiesForEvent = (event) => {
6435
6435
  }
6436
6436
  };
6437
6437
  };
6438
- const SDK_VERSION = "0.9.0";
6438
+ const SDK_VERSION = "0.10.0";
6439
6439
  const registry = {};
6440
6440
  function register(type, info) {
6441
6441
  let typeList = registry[type];
@@ -3059,7 +3059,7 @@ async function fetchOneEntry(options) {
3059
3059
  limit: 1
3060
3060
  });
3061
3061
  if (allContent)
3062
- return allContent.results[0] || null;
3062
+ return allContent[0] || null;
3063
3063
  return null;
3064
3064
  }
3065
3065
  const getContent = fetchOneEntry;
@@ -3073,9 +3073,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
3073
3073
  const canTrack = getDefaultCanTrack(options.canTrack);
3074
3074
  url.search.includes(`preview=`);
3075
3075
  if (!canTrack)
3076
- return content;
3076
+ return content.results;
3077
3077
  if (!(isBrowser() || TARGET === "reactNative"))
3078
- return content;
3078
+ return content.results;
3079
3079
  try {
3080
3080
  const newResults = [];
3081
3081
  for (const item of content.results)
@@ -3087,7 +3087,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
3087
3087
  } catch (e) {
3088
3088
  logger.error("Could not process A/B tests. ", e);
3089
3089
  }
3090
- return content;
3090
+ return content.results;
3091
3091
  };
3092
3092
  async function fetchEntries(options) {
3093
3093
  try {
@@ -3307,7 +3307,7 @@ const getInteractionPropertiesForEvent = (event) => {
3307
3307
  }
3308
3308
  };
3309
3309
  };
3310
- const SDK_VERSION = "0.9.0";
3310
+ const SDK_VERSION = "0.10.0";
3311
3311
  const registry = {};
3312
3312
  function register(type, info) {
3313
3313
  let typeList = registry[type];
@@ -3057,7 +3057,7 @@ async function fetchOneEntry(options) {
3057
3057
  limit: 1
3058
3058
  });
3059
3059
  if (allContent)
3060
- return allContent.results[0] || null;
3060
+ return allContent[0] || null;
3061
3061
  return null;
3062
3062
  }
3063
3063
  const getContent = fetchOneEntry;
@@ -3071,9 +3071,9 @@ const _processContentResult = async (options, content, url = generateContentUrl(
3071
3071
  const canTrack = getDefaultCanTrack(options.canTrack);
3072
3072
  url.search.includes(`preview=`);
3073
3073
  if (!canTrack)
3074
- return content;
3074
+ return content.results;
3075
3075
  if (!(isBrowser() || TARGET === "reactNative"))
3076
- return content;
3076
+ return content.results;
3077
3077
  try {
3078
3078
  const newResults = [];
3079
3079
  for (const item of content.results)
@@ -3085,7 +3085,7 @@ const _processContentResult = async (options, content, url = generateContentUrl(
3085
3085
  } catch (e) {
3086
3086
  logger.error("Could not process A/B tests. ", e);
3087
3087
  }
3088
- return content;
3088
+ return content.results;
3089
3089
  };
3090
3090
  async function fetchEntries(options) {
3091
3091
  try {
@@ -3305,7 +3305,7 @@ const getInteractionPropertiesForEvent = (event) => {
3305
3305
  }
3306
3306
  };
3307
3307
  };
3308
- const SDK_VERSION = "0.9.0";
3308
+ const SDK_VERSION = "0.10.0";
3309
3309
  const registry = {};
3310
3310
  function register(type, info) {
3311
3311
  let typeList = registry[type];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.9.0",
3
+ "version": "0.10.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.9.0";
1
+ export declare const SDK_VERSION = "0.10.0";
@@ -16,11 +16,11 @@ type ContentResults = {
16
16
  /**
17
17
  * @internal Exported only for testing purposes. Do not use.
18
18
  */
19
- export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<ContentResults>;
19
+ export declare const _processContentResult: (options: GetContentOptions, content: ContentResults, url?: URL) => Promise<BuilderContent[]>;
20
20
  /**
21
21
  * Returns a paginated array of entries that match the given options.
22
22
  */
23
- export declare function fetchEntries(options: GetContentOptions): Promise<ContentResults | null>;
23
+ export declare function fetchEntries(options: GetContentOptions): Promise<BuilderContent[] | null>;
24
24
  /**
25
25
  * @deprecated `getAllContent` was renamed to `fetchEntries`. This is a temporary alias to avoid breaking changes.
26
26
  */