@nhtio/encoder 0.1.0-master-ab456424 → 1.20251201.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/index.mjs CHANGED
@@ -5,7 +5,7 @@ var xr = (r) => {
5
5
  var Yr = (r, o, u) => o in r ? zr(r, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : r[o] = u;
6
6
  var dt = (r, o, u) => Yr(r, typeof o != "symbol" ? o + "" : o, u), wr = (r, o, u) => o.has(r) || xr("Cannot " + u);
7
7
  var Lt = (r, o, u) => (wr(r, o, "read from private field"), u ? u.call(r) : o.get(r)), kt = (r, o, u) => o.has(r) ? xr("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, u), Bt = (r, o, u, h) => (wr(r, o, "write to private field"), h ? h.call(r, u) : o.set(r, u), u), fr = (r, o, u) => (wr(r, o, "access private method"), u);
8
- import { E as E_UNENCODABLE_VALUE, a as E_CIRCULAR_REFERENCE, b as E_ENCODING_FAILED, B as BaseException, c as E_UNDECODABLE_VALUE, d as E_NOT_AN_ENCODED_VALUE, e as E_INVALID_VERSION, f as E_INCOMPATIBLE_VERSION } from "./exceptions-BHfZbUPp.mjs";
8
+ import { E as E_UNENCODABLE_VALUE, a as E_CIRCULAR_REFERENCE, b as E_ENCODING_FAILED, B as BaseException, c as E_UNDECODABLE_VALUE, d as E_NOT_AN_ENCODED_VALUE, e as E_INVALID_VERSION, f as E_INCOMPATIBLE_VERSION } from "./exceptions-BXzLxffe.mjs";
9
9
  var re$2 = { exports: {} };
10
10
  const SEMVER_SPEC_VERSION = "2.0.0", MAX_LENGTH$1 = 256, MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
11
11
  9007199254740991, MAX_SAFE_COMPONENT_LENGTH = 16, MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6, RELEASE_TYPES = [
@@ -54591,8 +54591,8 @@ const VOID = -1, PRIMITIVE = 0, ARRAY = 1, OBJECT = 2, DATE = 3, REGEXP = 4, MAP
54591
54591
  }
54592
54592
  };
54593
54593
  /*! (c) Andrea Giammarchi - ISC */
54594
- const { parse: $parse, stringify: $stringify } = JSON, options = { json: !0, lossy: !0 }, parse = (r) => deserialize($parse(r)), stringify = (r) => $stringify(serialize(r, options)), version = "0.1.0-master-ab456424", encode = (r) => {
54595
- const o = toStructuredData(r), u = serialize(o, { lossy: !0, json: !0 }), h = stringify({ version: "0.1.0-master-ab456424", serialized: u });
54594
+ const { parse: $parse, stringify: $stringify } = JSON, options = { json: !0, lossy: !0 }, parse = (r) => deserialize($parse(r)), stringify = (r) => $stringify(serialize(r, options)), version = "1.20251201.0", encode = (r) => {
54595
+ const o = toStructuredData(r), u = serialize(o, { lossy: !0, json: !0 }), h = stringify({ version: "1.20251201.0", serialized: u });
54596
54596
  return utoa(h);
54597
54597
  }, decode = (r) => {
54598
54598
  try {
@@ -54600,10 +54600,10 @@ const { parse: $parse, stringify: $stringify } = JSON, options = { json: !0, los
54600
54600
  if (!isObject$1(u) || !("version" in u) || typeof u.version != "string" || !("serialized" in u))
54601
54601
  throw new E_NOT_AN_ENCODED_VALUE(r);
54602
54602
  const { version: h, serialized: m } = u;
54603
- if (semver.valid("0.1.0-master-ab456424")) {
54603
+ if (semver.valid("1.20251201.0")) {
54604
54604
  if (!semver.valid(semver.coerce(h)))
54605
54605
  throw new E_INVALID_VERSION(h);
54606
- if (semver.gt(semver.coerce(h), "0.1.0-master-ab456424"))
54606
+ if (semver.gt(semver.coerce(h), "1.20251201.0"))
54607
54607
  throw new E_INCOMPATIBLE_VERSION(h);
54608
54608
  }
54609
54609
  const p = deserialize(m);