@builder.io/sdk 3.0.0 → 3.0.2-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.
Files changed (34) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.browser.js +6 -3
  3. package/dist/index.browser.js.map +1 -1
  4. package/dist/index.cjs.js +6 -3
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm.js +6 -3
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/index.umd.js +6 -3
  9. package/dist/index.umd.js.map +1 -1
  10. package/dist/package.json +3 -2
  11. package/dist/src/builder.class.d.ts +2 -1
  12. package/dist/src/builder.class.js +5 -2
  13. package/dist/src/builder.class.js.map +1 -1
  14. package/dist/src/builder.class.test.js +5 -5
  15. package/dist/src/builder.class.test.js.map +1 -1
  16. package/dist/src/classes/promise.class.js +150 -154
  17. package/dist/src/classes/query-string.class.js +73 -74
  18. package/dist/src/classes/query-string.class.test.js +20 -20
  19. package/dist/src/functions/assign.function.js +19 -19
  20. package/dist/src/functions/fetch.function.js +97 -75
  21. package/dist/src/functions/finder.function.js +389 -274
  22. package/dist/src/functions/get-top-level-domain.js +8 -8
  23. package/dist/src/functions/next-tick.function.js +26 -23
  24. package/dist/src/functions/omit.function.js +13 -13
  25. package/dist/src/functions/server-only-require.function.js +10 -9
  26. package/dist/src/functions/throttle.function.js +35 -37
  27. package/dist/src/functions/to-error.js +5 -6
  28. package/dist/src/functions/uuid.js +9 -8
  29. package/dist/src/types/api-version.js +3 -3
  30. package/dist/src/types/element.js +3 -3
  31. package/dist/src/url.test.js +222 -118
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +4 -3
  34. package/.yarnrc.yml +0 -1
package/dist/index.esm.js CHANGED
@@ -118,7 +118,7 @@ function assertAllowedPropertyName(name) {
118
118
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
119
119
  }
120
120
 
121
- var version = "3.0.0";
121
+ var version = "3.0.2-0";
122
122
 
123
123
  var Subscription = /** @class */ (function () {
124
124
  function Subscription(listeners, listener) {
@@ -1218,6 +1218,9 @@ var Builder = /** @class */ (function () {
1218
1218
  }
1219
1219
  }
1220
1220
  Builder.register = function (type, info) {
1221
+ if (type === 'plugin') {
1222
+ info = this.serializeIncludingFunctions(info);
1223
+ }
1221
1224
  // TODO: all must have name and can't conflict?
1222
1225
  var typeList = this.registry[type];
1223
1226
  if (!typeList) {
@@ -1339,7 +1342,7 @@ var Builder = /** @class */ (function () {
1339
1342
  enumerable: false,
1340
1343
  configurable: true
1341
1344
  });
1342
- Builder.serializeComponentInfo = function (info) {
1345
+ Builder.serializeIncludingFunctions = function (info) {
1343
1346
  var serializeFn = function (fnValue) {
1344
1347
  var fnStr = fnValue.toString().trim();
1345
1348
  // we need to account for a few different fn syntaxes:
@@ -1357,7 +1360,7 @@ var Builder = /** @class */ (function () {
1357
1360
  }));
1358
1361
  };
1359
1362
  Builder.prepareComponentSpecToSend = function (spec) {
1360
- return __assign(__assign({}, this.serializeComponentInfo(spec)), { class: undefined });
1363
+ return __assign(__assign({}, this.serializeIncludingFunctions(spec)), { class: undefined });
1361
1364
  };
1362
1365
  Builder.registerBlock = function (component, options) {
1363
1366
  this.registerComponent(component, options);