@acrobits/ipc-sdk 0.7.2-alpha.1 → 0.7.2-alpha.3

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/lib/ipc-sdk.js CHANGED
@@ -1,5 +1,5 @@
1
- var Ie = Object.defineProperty;
2
- var Pe = (n, t, e) => t in n ? Ie(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
1
+ var Re = Object.defineProperty;
2
+ var Pe = (n, t, e) => t in n ? Re(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var T = (n, t, e) => (Pe(n, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  var m = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(m || {}), B = function(n, t) {
5
5
  return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
@@ -80,7 +80,7 @@ function k(n, t) {
80
80
  0 <= e && n.splice(e, 1);
81
81
  }
82
82
  }
83
- var R = function() {
83
+ var I = function() {
84
84
  function n(t) {
85
85
  this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
86
86
  }
@@ -170,9 +170,9 @@ var R = function() {
170
170
  var t = new n();
171
171
  return t.closed = !0, t;
172
172
  }(), n;
173
- }(), be = R.EMPTY;
173
+ }(), be = I.EMPTY;
174
174
  function me(n) {
175
- return n instanceof R || n && "closed" in n && w(n.remove) && w(n.add) && w(n.unsubscribe);
175
+ return n instanceof I || n && "closed" in n && w(n.remove) && w(n.add) && w(n.unsubscribe);
176
176
  }
177
177
  function ie(n) {
178
178
  w(n) ? n() : n.unsubscribe();
@@ -236,7 +236,7 @@ var Z = function(n) {
236
236
  this.unsubscribe();
237
237
  }
238
238
  }, t;
239
- }(R), Oe = Function.prototype.bind;
239
+ }(I), Oe = Function.prototype.bind;
240
240
  function H(n, t) {
241
241
  return Oe.call(n, t);
242
242
  }
@@ -515,7 +515,7 @@ var He = function(n) {
515
515
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
516
516
  }, t.prototype._innerSubscribe = function(e) {
517
517
  var r = this, i = this, s = i.hasError, o = i.isStopped, c = i.observers;
518
- return s || o ? be : (this.currentObservers = null, c.push(e), new R(function() {
518
+ return s || o ? be : (this.currentObservers = null, c.push(e), new I(function() {
519
519
  r.currentObservers = null, k(c, e);
520
520
  }));
521
521
  }, t.prototype._checkFinalizedStatuses = function(e) {
@@ -559,7 +559,7 @@ var He = function(n) {
559
559
  return t.prototype.schedule = function(e, r) {
560
560
  return this;
561
561
  }, t;
562
- }(R), Y = {
562
+ }(I), Y = {
563
563
  setInterval: function(n, t) {
564
564
  for (var e = [], r = 2; r < arguments.length; r++)
565
565
  e[r - 2] = arguments[r];
@@ -752,7 +752,7 @@ function E(n) {
752
752
  function it(n) {
753
753
  return E(n == null ? void 0 : n.lift);
754
754
  }
755
- function I(n) {
755
+ function R(n) {
756
756
  return function(t) {
757
757
  if (it(t))
758
758
  return t.lift(function(e) {
@@ -1070,11 +1070,11 @@ var dt = {
1070
1070
  }, pt = function() {
1071
1071
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
1072
1072
  }();
1073
- function Re(n) {
1073
+ function Ie(n) {
1074
1074
  return n;
1075
1075
  }
1076
1076
  function ft(n) {
1077
- return n.length === 0 ? Re : n.length === 1 ? n[0] : function(t) {
1077
+ return n.length === 0 ? Ie : n.length === 1 ? n[0] : function(t) {
1078
1078
  return n.reduce(function(e, r) {
1079
1079
  return r(e);
1080
1080
  }, t);
@@ -1190,7 +1190,7 @@ var bt = function(n) {
1190
1190
  }, t;
1191
1191
  }(re);
1192
1192
  function h(n, t) {
1193
- return I(function(e, r) {
1193
+ return R(function(e, r) {
1194
1194
  var i = 0;
1195
1195
  e.subscribe(P(r, function(s) {
1196
1196
  r.next(n.call(t, s, i++));
@@ -1203,7 +1203,7 @@ var mt = new gt(function(n) {
1203
1203
  function b(n) {
1204
1204
  return n <= 0 ? function() {
1205
1205
  return mt;
1206
- } : I(function(t, e) {
1206
+ } : R(function(t, e) {
1207
1207
  var r = 0;
1208
1208
  t.subscribe(P(e, function(i) {
1209
1209
  ++r <= n && (e.next(i), n <= r && e.complete());
@@ -1211,7 +1211,7 @@ function b(n) {
1211
1211
  });
1212
1212
  }
1213
1213
  function p(n, t) {
1214
- return I(function(e, r) {
1214
+ return R(function(e, r) {
1215
1215
  var i = 0;
1216
1216
  e.subscribe(P(r, function(s) {
1217
1217
  return n.call(t, s, i++) && r.next(s);
@@ -1219,7 +1219,7 @@ function p(n, t) {
1219
1219
  });
1220
1220
  }
1221
1221
  function wt(n, t) {
1222
- return t === void 0 && (t = !1), I(function(e, r) {
1222
+ return t === void 0 && (t = !1), R(function(e, r) {
1223
1223
  var i = 0;
1224
1224
  e.subscribe(P(r, function(s) {
1225
1225
  var o = n(s, i++);
@@ -1229,7 +1229,7 @@ function wt(n, t) {
1229
1229
  }
1230
1230
  function d(n, t, e) {
1231
1231
  var r = E(n) || t || e ? { next: n, error: t, complete: e } : n;
1232
- return r ? I(function(i, s) {
1232
+ return r ? R(function(i, s) {
1233
1233
  var o;
1234
1234
  (o = r.subscribe) === null || o === void 0 || o.call(r);
1235
1235
  var c = !0;
@@ -1246,7 +1246,7 @@ function d(n, t, e) {
1246
1246
  var a, u;
1247
1247
  c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
1248
1248
  }));
1249
- }) : Re;
1249
+ }) : Ie;
1250
1250
  }
1251
1251
  const St = /^(\d+)\.(\d+)$/;
1252
1252
  function Et(n) {
@@ -2003,7 +2003,7 @@ class xt {
2003
2003
  if (!this.isEmbedded())
2004
2004
  throw new l(this.currentContext);
2005
2005
  const s = "FILE REQUEST", o = this.createMessage(s);
2006
- if (o.fileHash = t.toLowerCase(), o.intent = e, o.maxChunkSize = i, e === "attachment") {
2006
+ if (o.fileHash = t.toLowerCase(), o.intent = e, o.maxChunkSizeInBytes = i, e === "attachment") {
2007
2007
  if (!r)
2008
2008
  throw new x(
2009
2009
  "streamId",
@@ -2021,7 +2021,7 @@ class xt {
2021
2021
  d(this.logReceived(s)),
2022
2022
  d(() => c++),
2023
2023
  h((u) => (u.result === "success" && (u.chunkHash = u.chunkHash.toLowerCase()), u)),
2024
- wt((u) => u.result === "success" && c < u.totalChunks)
2024
+ wt((u) => u.result === "success" && c <= u.totalChunks)
2025
2025
  );
2026
2026
  return this.port2.postMessage(o), this.logSent(s, o), a;
2027
2027
  }
@@ -2050,7 +2050,7 @@ class xt {
2050
2050
  if (!this.isEmbedded())
2051
2051
  throw new l(this.currentContext);
2052
2052
  const o = "FILE SELECTION", c = this.createMessage(o);
2053
- if (c.intent = t, c.maxCount = r, c.maxFileSize = i, c.mimeTypes = s, t === "attachment") {
2053
+ if (c.intent = t, c.maxCount = r, c.maxFileSizeInBytes = i, c.mimeTypes = s, t === "attachment") {
2054
2054
  if (!e)
2055
2055
  throw new x(
2056
2056
  "streamId",
@@ -2281,7 +2281,7 @@ class xt {
2281
2281
  }
2282
2282
  }
2283
2283
  const Tt = ["2.0"];
2284
- class Rt {
2284
+ class It {
2285
2285
  /**
2286
2286
  * A class that manages the IPC communication between the `Client` and the `Host`.
2287
2287
  *
@@ -2496,5 +2496,5 @@ class Rt {
2496
2496
  }
2497
2497
  export {
2498
2498
  m as IPCEvents,
2499
- Rt as IPCManager
2499
+ It as IPCManager
2500
2500
  };