@anov/cic-standard-sdk 0.0.3 → 0.0.4

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.
@@ -4731,8 +4731,9 @@ const Rn = () => (vt || (vt = new kn({ allErrors: !0, strict: !1 }), In(vt)), vt
4731
4731
  }, ts = (e, t = "https://example.com/resource") => typeof e == "string" && /^https?:\/\//.test(e) ? e : t, rs = (e, t = "wss://example.com/socket") => typeof e == "string" && /^wss?:\/\//.test(e) ? e : t, wt = Pe("DataSourceItem"), ns = (e, t) => {
4732
4732
  const a = { ...t?.defaults || {} }, n = { ...e };
4733
4733
  if (t?.generateId && !n.id && (n.id = Xt()), !n.type) throw new Error("type is required");
4734
- return n.continueOnError = typeof n.continueOnError == "boolean" ? n.continueOnError : a.continueOnError ?? !1, n.type === "rest" ? (n.url = ts(n.url), n.method = n.method || "GET", n.headers = n.headers || {}, n.params = n.params || {}, n.body = n.body || {}, n.pollInterval = Oe(n.pollInterval) ? Math.round(n.pollInterval) : a.pollInterval ?? 1e3, n.timeout = Oe(n.timeout) ? Math.round(n.timeout) : a.timeout ?? 1e3) : n.type === "websocket" ? (n.url = rs(n.url), n.heartbeat && typeof n.heartbeat == "object" && (n.heartbeat.interval = Oe(n.heartbeat.interval) ? Math.round(n.heartbeat.interval) : a.heartbeatInterval ?? 1e3, n.heartbeat.message = n.heartbeat.message ?? {}), n.pollInterval = Oe(n.pollInterval) ? Math.round(n.pollInterval) : a.pollInterval ?? 1e3) : n.type === "static" ? n.value = n.value ?? {} : n.type === "function" && (n.code = typeof n.code == "string" ? n.code : "export default async function(ctx){ return null }", n.timeout = Oe(n.timeout) ? Math.round(n.timeout) : a.timeout ?? 1e3), n;
4734
+ return n.type === "rest" ? (n.url = ts(n.url), n.method = n.method || "GET", n.headers = n.headers || {}, n.params = n.params || {}, n.body = n.body || {}, n.pollInterval = Oe(n.pollInterval) ? Math.round(n.pollInterval) : a.pollInterval ?? 1e3, n.timeout = Oe(n.timeout) ? Math.round(n.timeout) : a.timeout ?? 1e3) : n.type === "websocket" ? (n.url = rs(n.url), n.heartbeat && typeof n.heartbeat == "object" && (n.heartbeat.interval = Oe(n.heartbeat.interval) ? Math.round(n.heartbeat.interval) : a.heartbeatInterval ?? 1e3, n.heartbeat.message = n.heartbeat.message ?? {}), n.pollInterval = Oe(n.pollInterval) ? Math.round(n.pollInterval) : a.pollInterval ?? 1e3) : n.type === "static" ? n.value = n.value ?? {} : n.type === "function" && (n.code = typeof n.code == "string" ? n.code : "export default async function(ctx){ return null }", n.timeout = Oe(n.timeout) ? Math.round(n.timeout) : a.timeout ?? 1e3), n;
4735
4735
  }, is = (e) => wt(e) ? { ok: !0 } : { ok: !1, errors: wt.errors || [] }, qn = (e, t) => {
4736
+ debugger;
4736
4737
  const a = ns(e, t);
4737
4738
  return wt(a) ? { ok: !0, value: a } : { ok: !1, errors: wt.errors || [] };
4738
4739
  }, ss = (e, t) => {