@yuneta/gobj-js 7.28.0 → 7.29.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.
@@ -255,7 +255,7 @@ var R = class {
255
255
  };
256
256
  var V = 1;
257
257
  function W(e) {
258
- Ko(e) && (e = JSON.stringify(e)), ir(" ".repeat(Math.max(1, 2 * m)) + String(e));
258
+ Ko(e) && (e = JSON.stringify(e)), ir(" ".repeat(Math.max(1, 4 * m)) + String(e));
259
259
  }
260
260
  var K = Object.freeze({
261
261
  TRACE_MACHINE: 65536,
@@ -4000,9 +4000,10 @@ exports.GObj = k, exports.SDATA = x, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
4000
4000
  return p;
4001
4001
  }
4002
4002
  }), exports.build_command_response = r, exports.build_path = function(...e) {
4003
- let t = "", n = 0;
4004
- for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
4005
- return t;
4003
+ let t = null, n = [];
4004
+ for (let r of e) if (null != r && "" !== r) if (r = String(r), null !== t) for (let e of r.split("/")) "" !== e && "." !== e && (".." !== e ? n.push(e) : n.pop());
4005
+ else t = r.replace(/(.)\/+$/, "$1");
4006
+ return null === t ? "" : 0 === n.length ? t : t + (t.endsWith("/") ? "" : "/") + n.join("/");
4006
4007
  }, exports.build_stats_response = o, exports.clean_name = function(e) {
4007
4008
  return e.replace(/[?# ^:]/g, "_");
4008
4009
  }, exports.clear_timeout = yl, exports.cmp_two_simple_json = ns, exports.command_parameter_from_json = xe, exports.command_parameter_from_text = function(e, t) {