@plitzi/sdk-interactions 0.39.4 → 0.39.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @plitzi/sdk-interactions
2
2
 
3
+ ## 0.39.6
4
+
5
+ ### Patch Changes
6
+
7
+ - @plitzi/sdk-auth@0.39.6
8
+ - @plitzi/sdk-event-bridge@0.39.6
9
+ - @plitzi/sdk-shared@0.39.6
10
+
11
+ ## 0.39.5
12
+
13
+ ### Patch Changes
14
+
15
+ - 4427674: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
16
+ `@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
17
+ - Updated dependencies [4427674]
18
+ - @plitzi/sdk-auth@0.39.5
19
+ - @plitzi/sdk-event-bridge@0.39.5
20
+ - @plitzi/sdk-shared@0.39.5
21
+
3
22
  ## 0.39.4
4
23
 
5
24
  ### Patch Changes
@@ -4,7 +4,7 @@ var e = "/_plitzi/queued", t = (e) => typeof e == "object" && !!e && !Array.isAr
4
4
  ticket: n.ticket
5
5
  } : void 0, r = (e) => t(e) ? e : {}, i = () => {
6
6
  let e = /* @__PURE__ */ new Uint8Array(16);
7
- return crypto.getRandomValues(e), `kept-${Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("")}`;
7
+ return crypto.getRandomValues(e), `call-${Array.from(e, (e) => e.toString(16).padStart(2, "0")).join("")}`;
8
8
  }, a = (e, t) => new Promise((n, r) => {
9
9
  if (t.aborted) {
10
10
  r(/* @__PURE__ */ Error("The call was stopped"));
@@ -54,27 +54,27 @@ var e = "/_plitzi/queued", t = (e) => typeof e == "object" && !!e && !Array.isAr
54
54
  }
55
55
  }
56
56
  }, c = async ({ endpoint: t, call: r, signal: a, keepalive: c = !1, onQueued: l }) => {
57
- let u;
57
+ let u = {
58
+ ...r,
59
+ idempotencyKey: r.idempotencyKey || i()
60
+ }, d;
58
61
  try {
59
- u = await o(t, JSON.stringify(r), a, c);
62
+ d = await o(t, JSON.stringify(u), a, c);
60
63
  } catch (e) {
61
64
  if (a.aborted) throw e;
62
65
  }
63
- if (!u || u.status === 502 || u.status === 503) {
64
- let t = u;
66
+ if (!d || d.status === 502 || d.status === 503) {
67
+ let t = d;
65
68
  try {
66
- let n = await o(e, JSON.stringify({
67
- ...r,
68
- idempotencyKey: r.idempotencyKey || i()
69
- }), a, c);
69
+ let n = await o(e, JSON.stringify(u), a, c);
70
70
  if (n.status === 404) return t ?? { unreachable: /* @__PURE__ */ Error("No worker answered, and this server keeps no calls for later") };
71
- u = n;
71
+ d = n;
72
72
  } catch (e) {
73
73
  if (a.aborted) throw e;
74
74
  return t ?? { unreachable: e };
75
75
  }
76
76
  }
77
- let d = n(u.status, u.payload);
78
- return d ? (l(), s(d, a)) : u;
77
+ let f = n(d.status, d.payload);
78
+ return f ? (l(), s(f, a)) : d;
79
79
  };
80
80
  export { e as QUEUED_CALLS_PATH, c as deliverCall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-interactions",
3
- "version": "0.39.4",
3
+ "version": "0.39.6",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -34,15 +34,15 @@
34
34
  "eslint": "^9.39.5",
35
35
  "react": "^19.3.1",
36
36
  "typescript": "^6.0.3",
37
- "vite": "^8.3.7",
37
+ "vite": "^8.3.8",
38
38
  "vitest": "^5.1.0"
39
39
  },
40
40
  "dependencies": {
41
- "@plitzi/nexus": "^1.4.0",
42
- "@plitzi/plitzi-ui": "^1.6.39",
43
- "@plitzi/sdk-auth": "0.39.4",
44
- "@plitzi/sdk-event-bridge": "0.39.4",
45
- "@plitzi/sdk-shared": "0.39.4"
41
+ "@plitzi/nexus": "^1.5.1",
42
+ "@plitzi/plitzi-ui": "^1.6.40",
43
+ "@plitzi/sdk-auth": "0.39.6",
44
+ "@plitzi/sdk-event-bridge": "0.39.6",
45
+ "@plitzi/sdk-shared": "0.39.6"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": "^19"