@builder.io/sdk 2.0.8 → 2.1.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.
package/dist/index.cjs.js CHANGED
@@ -126,7 +126,7 @@ function assertAllowedPropertyName(name) {
126
126
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
127
127
  }
128
128
 
129
- var version = "2.0.7";
129
+ var version = "2.0.8";
130
130
 
131
131
  var Subscription = /** @class */ (function () {
132
132
  function Subscription(listeners, listener) {
@@ -2304,9 +2304,12 @@ var Builder = /** @class */ (function () {
2304
2304
  if (queue[0].format) {
2305
2305
  queryParams.format = queue[0].format;
2306
2306
  }
2307
+ if ('noTraverse' in queue[0]) {
2308
+ queryParams.noTraverse = queue[0].noTraverse;
2309
+ }
2307
2310
  var pageQueryParams = typeof location !== 'undefined'
2308
2311
  ? QueryString.parseDeep(location.search.substr(1))
2309
- : {};
2312
+ : {}; // TODO: WHAT about SSR (this.request) ?
2310
2313
  var userAttributes =
2311
2314
  // FIXME: HACK: only checks first in queue for user attributes overrides, should check all
2312
2315
  // TODO: merge user attributes provided here with defaults and current user attiributes (?)
@@ -2558,6 +2561,10 @@ var Builder = /** @class */ (function () {
2558
2561
  this.apiVersion = options.apiVersion;
2559
2562
  }
2560
2563
  }
2564
+ // Set noTraverse=true if NOT already passed by user, for query performance
2565
+ if (!('noTraverse' in options)) {
2566
+ options.noTraverse = true;
2567
+ }
2561
2568
  return instance
2562
2569
  .getContent(modelName, tslib.__assign(tslib.__assign({ limit: 30 }, options), { key: options.key ||
2563
2570
  // Make the key include all options, so we don't reuse cache for the same content fetched