@mdbase-dev/sdk 0.1.21 → 0.1.22

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.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "runtime": {
3
- "sha256": "3c14689c6b0f38c3b151981c25a6a2b39129ae07f2a606ed5188442c631ad5b4",
4
- "bytes": 3982455,
5
- "maxBytes": 3982455,
3
+ "sha256": "6b32d1e00b1282e908c14b7831816cda77aa9b9f6d6b82c3a7a5686698a4ed6b",
4
+ "bytes": 3983181,
5
+ "maxBytes": 3983181,
6
6
  "source": {
7
7
  "repository": "mdbase-dev/mdbase-connect",
8
- "commit": "a8eb987856eb3b76ff7310688aeea328d58b4f39"
8
+ "commit": "f098508b75998959e1b5f081924a67418660da63"
9
9
  }
10
10
  },
11
11
  "sqlite": {
@@ -15693,12 +15693,12 @@ function appReleaseTrust() {
15693
15693
  // src/application/asset-pins.json
15694
15694
  var asset_pins_default = {
15695
15695
  runtime: {
15696
- sha256: "3c14689c6b0f38c3b151981c25a6a2b39129ae07f2a606ed5188442c631ad5b4",
15697
- bytes: 3982455,
15698
- maxBytes: 3982455,
15696
+ sha256: "6b32d1e00b1282e908c14b7831816cda77aa9b9f6d6b82c3a7a5686698a4ed6b",
15697
+ bytes: 3983181,
15698
+ maxBytes: 3983181,
15699
15699
  source: {
15700
15700
  repository: "mdbase-dev/mdbase-connect",
15701
- commit: "a8eb987856eb3b76ff7310688aeea328d58b4f39"
15701
+ commit: "f098508b75998959e1b5f081924a67418660da63"
15702
15702
  }
15703
15703
  },
15704
15704
  sqlite: {
@@ -36912,7 +36912,7 @@ ${end.comment}` : end.comment;
36912
36912
  }
36913
36913
  ws.binaryType = "arraybuffer";
36914
36914
  let opened = false;
36915
- let settled2 = false;
36915
+ let terminal;
36916
36916
  let buf = new Uint8Array(0);
36917
36917
  let onmessage = null;
36918
36918
  let onclose = null;
@@ -36928,8 +36928,10 @@ ${end.comment}` : end.comment;
36928
36928
  },
36929
36929
  set onclose(f) {
36930
36930
  onclose = f;
36931
+ if (f && terminal) f(terminal);
36931
36932
  },
36932
36933
  send(m2) {
36934
+ if (terminal) throw terminal;
36933
36935
  if (m2.length > 65535) throw mdbaseError("too_large", "Noise message over 65535 bytes");
36934
36936
  const f = new Uint8Array(4 + m2.length);
36935
36937
  new DataView(f.buffer).setUint32(0, m2.length);
@@ -36944,8 +36946,9 @@ ${end.comment}` : end.comment;
36944
36946
  }
36945
36947
  };
36946
36948
  const fail20 = (e) => {
36947
- if (!settled2) {
36948
- settled2 = true;
36949
+ if (terminal) return;
36950
+ terminal = e;
36951
+ if (!opened) {
36949
36952
  signal?.removeEventListener("abort", onAbort);
36950
36953
  reject(e);
36951
36954
  } else onclose?.(e);
@@ -36968,6 +36971,7 @@ ${end.comment}` : end.comment;
36968
36971
  );
36969
36972
  };
36970
36973
  ws.onmessage = (ev) => {
36974
+ if (terminal) return;
36971
36975
  const d = ev.data;
36972
36976
  if (typeof d === "string") {
36973
36977
  let msg;
@@ -36978,12 +36982,11 @@ ${end.comment}` : end.comment;
36978
36982
  }
36979
36983
  if (msg.type === "pipe_opened" && !opened) {
36980
36984
  opened = true;
36981
- settled2 = true;
36982
36985
  signal?.removeEventListener("abort", onAbort);
36983
36986
  resolve2(carrier);
36984
36987
  } else if (msg.type === "pipe_close") {
36985
- ws.close();
36986
36988
  fail20(pipeCloseError(4e3, msg.reason));
36989
+ ws.close();
36987
36990
  }
36988
36991
  return;
36989
36992
  }
@@ -50775,12 +50778,12 @@ ${end.comment}` : end.comment;
50775
50778
  // src/application/asset-pins.json
50776
50779
  var asset_pins_default = {
50777
50780
  runtime: {
50778
- sha256: "3c14689c6b0f38c3b151981c25a6a2b39129ae07f2a606ed5188442c631ad5b4",
50779
- bytes: 3982455,
50780
- maxBytes: 3982455,
50781
+ sha256: "6b32d1e00b1282e908c14b7831816cda77aa9b9f6d6b82c3a7a5686698a4ed6b",
50782
+ bytes: 3983181,
50783
+ maxBytes: 3983181,
50781
50784
  source: {
50782
50785
  repository: "mdbase-dev/mdbase-connect",
50783
- commit: "a8eb987856eb3b76ff7310688aeea328d58b4f39"
50786
+ commit: "f098508b75998959e1b5f081924a67418660da63"
50784
50787
  }
50785
50788
  },
50786
50789
  sqlite: {