@embeddable.com/sdk-utils 0.4.0 → 0.4.2

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/lib/index.js CHANGED
@@ -596,16 +596,13 @@ PERFORMANCE OF THIS SOFTWARE.
596
596
  ***************************************************************************** */
597
597
 
598
598
  function __classPrivateFieldGet(receiver, state, kind, f) {
599
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
600
599
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
601
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
600
+ return state.get(receiver);
602
601
  }
603
602
 
604
603
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
605
- if (kind === "m") throw new TypeError("Private method is not writable");
606
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
607
604
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
608
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
605
+ return (state.set(receiver, value)), value;
609
606
  }
610
607
 
611
608
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
@@ -3547,10 +3544,10 @@ class ZodEnum extends ZodType {
3547
3544
  });
3548
3545
  return INVALID;
3549
3546
  }
3550
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
3551
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
3547
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache)) {
3548
+ __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values));
3552
3549
  }
3553
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3550
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache).has(input.data)) {
3554
3551
  const ctx = this._getOrReturnCtx(input);
3555
3552
  const expectedValues = this._def.values;
3556
3553
  addIssueToContext(ctx, {
@@ -3619,10 +3616,10 @@ class ZodNativeEnum extends ZodType {
3619
3616
  });
3620
3617
  return INVALID;
3621
3618
  }
3622
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
3623
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
3619
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache)) {
3620
+ __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)));
3624
3621
  }
3625
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3622
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache).has(input.data)) {
3626
3623
  const expectedValues = util.objectValues(nativeEnumValues);
3627
3624
  addIssueToContext(ctx, {
3628
3625
  received: ctx.data,