@builder.io/sdk 3.0.0 → 3.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.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 = "3.0.0";
129
+ var version = "3.0.1";
130
130
 
131
131
  var Subscription = /** @class */ (function () {
132
132
  function Subscription(listeners, listener) {
@@ -1226,6 +1226,9 @@ var Builder = /** @class */ (function () {
1226
1226
  }
1227
1227
  }
1228
1228
  Builder.register = function (type, info) {
1229
+ if (type === 'plugin') {
1230
+ info = this.serializeIncludingFunctions(info);
1231
+ }
1229
1232
  // TODO: all must have name and can't conflict?
1230
1233
  var typeList = this.registry[type];
1231
1234
  if (!typeList) {
@@ -1347,7 +1350,7 @@ var Builder = /** @class */ (function () {
1347
1350
  enumerable: false,
1348
1351
  configurable: true
1349
1352
  });
1350
- Builder.serializeComponentInfo = function (info) {
1353
+ Builder.serializeIncludingFunctions = function (info) {
1351
1354
  var serializeFn = function (fnValue) {
1352
1355
  var fnStr = fnValue.toString().trim();
1353
1356
  // we need to account for a few different fn syntaxes:
@@ -1365,7 +1368,7 @@ var Builder = /** @class */ (function () {
1365
1368
  }));
1366
1369
  };
1367
1370
  Builder.prepareComponentSpecToSend = function (spec) {
1368
- return tslib.__assign(tslib.__assign({}, this.serializeComponentInfo(spec)), { class: undefined });
1371
+ return tslib.__assign(tslib.__assign({}, this.serializeIncludingFunctions(spec)), { class: undefined });
1369
1372
  };
1370
1373
  Builder.registerBlock = function (component, options) {
1371
1374
  this.registerComponent(component, options);