@voltro/api-client 0.81.0 → 0.82.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1520 -6
  2. package/dist/index.js +12 -4
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -397,6 +397,8 @@ var e = (e) => {
397
397
  }, j = (e) => (e.startsWith("/") ? e.slice(1) : e).replace(/~1/g, "/").replace(/~0/g, "~"), M = (e, t, n = {}) => {
398
398
  let r = /* @__PURE__ */ new Map();
399
399
  for (let t of e) r.set(t.id, t);
400
+ let i = /* @__PURE__ */ new Map();
401
+ for (let e of t.ops) e.op === "mergeCells" && i.set(j(e.path), Object.keys(e.value));
400
402
  for (let e of t.ops) {
401
403
  if (e.op === "mergeCells") {
402
404
  let t = j(e.path), i = r.get(t) ?? r.get(Number(t)), a = r.has(t) ? t : Number(t);
@@ -406,14 +408,20 @@ var e = (e) => {
406
408
  r.set(a, o);
407
409
  continue;
408
410
  }
409
- (e.op === "add" || e.op === "replace") && r.set(e.value.id, e.value);
411
+ if (e.op === "add" && r.set(e.value.id, e.value), e.op === "replace") {
412
+ let t = r.get(e.value.id), n = (t === void 0 ? [] : i.get(String(e.value.id)) ?? []).filter((n) => !(n in e.value) && n in t);
413
+ r.set(e.value.id, n.length === 0 ? e.value : {
414
+ ...e.value,
415
+ ...Object.fromEntries(n.map((e) => [e, t[e]]))
416
+ });
417
+ }
410
418
  }
411
- let i = [];
419
+ let a = [];
412
420
  for (let e of t.order) {
413
421
  let t = r.get(e);
414
- t !== void 0 && i.push(t);
422
+ t !== void 0 && a.push(t);
415
423
  }
416
- return i;
424
+ return a;
417
425
  }, N = (e) => {
418
426
  let t = new URL(e);
419
427
  return t.protocol = t.protocol === "https:" ? "wss:" : "ws:", t.pathname = "/ws", t.search = "", t.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/api-client",
3
- "version": "0.81.0",
3
+ "version": "0.82.0",
4
4
  "description": "The runtime of a generated TypeScript client for a Voltro public API (`voltro build api --target typescript`): the REST surface spoken profile-aware — typed errors as plain classes, dates, envelopes, pagination, a 429 as a wait, idempotency keys — with no dependencies, not on a schema library and not on Effect. Runs in Node, Bun, Deno and the browser. The Effect flavor is `@voltro/api-client-effect`.",
5
5
  "keywords": [
6
6
  "voltro",