@floegence/floe-webapp-protocol 0.40.18 → 0.40.20
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/dist/index3.js +22 -22
- package/package.json +2 -2
package/dist/index3.js
CHANGED
|
@@ -12,43 +12,43 @@ class p extends Error {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
function y(c) {
|
|
15
|
-
const o = async (
|
|
15
|
+
const o = async (t, e) => {
|
|
16
16
|
const n = c.rpcTransport();
|
|
17
17
|
if (!n) throw new d();
|
|
18
|
-
let
|
|
18
|
+
let r;
|
|
19
19
|
try {
|
|
20
|
-
|
|
20
|
+
r = await n.call(t, e, (s) => s);
|
|
21
21
|
} catch (s) {
|
|
22
|
-
throw new p({ typeId:
|
|
22
|
+
throw new p({ typeId: t, code: -1, message: "RPC transport error", cause: s });
|
|
23
23
|
}
|
|
24
|
-
if (!
|
|
24
|
+
if (!r.ok)
|
|
25
25
|
throw new p({
|
|
26
|
-
typeId:
|
|
27
|
-
code:
|
|
28
|
-
message:
|
|
29
|
-
cause:
|
|
26
|
+
typeId: t,
|
|
27
|
+
code: r.error.code,
|
|
28
|
+
message: r.error.message ?? `RPC error: ${r.error.code}`,
|
|
29
|
+
cause: r.error
|
|
30
30
|
});
|
|
31
|
-
return
|
|
32
|
-
}, a = async (
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
31
|
+
return r.payload;
|
|
32
|
+
}, a = async (t, e, n) => {
|
|
33
|
+
const r = c.rpcTransport();
|
|
34
|
+
if (!r) {
|
|
35
35
|
if (n.detached === "ignore") return;
|
|
36
36
|
throw new d();
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
await
|
|
39
|
+
await r.notify(t, e);
|
|
40
40
|
} catch (s) {
|
|
41
|
-
throw new p({ typeId:
|
|
41
|
+
throw new p({ typeId: t, code: -1, message: "RPC notify transport error", cause: s });
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
return { call: o, notify: async (
|
|
45
|
-
await a(
|
|
46
|
-
}, notifyBestEffort: async (
|
|
47
|
-
await a(
|
|
48
|
-
}, onNotify: (
|
|
44
|
+
return { call: o, notify: async (t, e) => {
|
|
45
|
+
await a(t, e, { detached: "throw" });
|
|
46
|
+
}, notifyBestEffort: async (t, e) => {
|
|
47
|
+
await a(t, e, { detached: "ignore" });
|
|
48
|
+
}, onNotify: (t, e) => {
|
|
49
49
|
const n = c.rpcTransport();
|
|
50
|
-
return n ? n.onNotify(r, (
|
|
51
|
-
e(
|
|
50
|
+
return n ? n.onNotify(t, (r) => r, (r) => {
|
|
51
|
+
e(r);
|
|
52
52
|
}) : () => {
|
|
53
53
|
};
|
|
54
54
|
} };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floegence/floe-webapp-protocol",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"solid-js": "^1.8.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@floegence/flowersec-core": "2.
|
|
36
|
+
"@floegence/flowersec-core": "2.4.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"solid-js": "^1.9.11",
|