sshclient-wasm 0.1.4 → 0.1.5

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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Transport } from './transport';
2
-
3
2
  export type { Transport } from './transport';
4
3
  export { WebSocketTransport, CustomTransport } from './transport';
5
4
  export { SecureTunnelTransport, TunnelMessageType } from './aws-iot-tunnel';
package/dist/index.esm.js CHANGED
@@ -215,7 +215,7 @@ EventEmitter.prototype.emit = function(t) {
215
215
  };
216
216
  var float = factory(factory);
217
217
  function factory(o) {
218
- return typeof Float32Array < "u" ? function() {
218
+ return typeof Float32Array < "u" ? (function() {
219
219
  var t = new Float32Array([-0]), n = new Uint8Array(t.buffer), l = n[3] === 128;
220
220
  function r(s, c, u) {
221
221
  t[0] = s, c[u] = n[0], c[u + 1] = n[1], c[u + 2] = n[2], c[u + 3] = n[3];
@@ -231,7 +231,7 @@ function factory(o) {
231
231
  return n[3] = s[c], n[2] = s[c + 1], n[1] = s[c + 2], n[0] = s[c + 3], t[0];
232
232
  }
233
233
  o.readFloatLE = l ? e : i, o.readFloatBE = l ? i : e;
234
- }() : function() {
234
+ })() : (function() {
235
235
  function t(l, r, a, e) {
236
236
  var i = r < 0 ? 1 : 0;
237
237
  if (i && (r = -r), r === 0)
@@ -259,7 +259,7 @@ function factory(o) {
259
259
  return s === 255 ? c ? NaN : i * (1 / 0) : s === 0 ? i * 1401298464324817e-60 * c : i * Math.pow(2, s - 150) * (c + 8388608);
260
260
  }
261
261
  o.readFloatLE = n.bind(null, readUintLE), o.readFloatBE = n.bind(null, readUintBE);
262
- }(), typeof Float64Array < "u" ? function() {
262
+ })(), typeof Float64Array < "u" ? (function() {
263
263
  var t = new Float64Array([-0]), n = new Uint8Array(t.buffer), l = n[7] === 128;
264
264
  function r(s, c, u) {
265
265
  t[0] = s, c[u] = n[0], c[u + 1] = n[1], c[u + 2] = n[2], c[u + 3] = n[3], c[u + 4] = n[4], c[u + 5] = n[5], c[u + 6] = n[6], c[u + 7] = n[7];
@@ -275,7 +275,7 @@ function factory(o) {
275
275
  return n[7] = s[c], n[6] = s[c + 1], n[5] = s[c + 2], n[4] = s[c + 3], n[3] = s[c + 4], n[2] = s[c + 5], n[1] = s[c + 6], n[0] = s[c + 7], t[0];
276
276
  }
277
277
  o.readDoubleLE = l ? e : i, o.readDoubleBE = l ? i : e;
278
- }() : function() {
278
+ })() : (function() {
279
279
  function t(l, r, a, e, i, s) {
280
280
  var c = e < 0 ? 1 : 0;
281
281
  if (c && (e = -e), e === 0)
@@ -306,7 +306,7 @@ function factory(o) {
306
306
  return f === 2047 ? d ? NaN : u * (1 / 0) : f === 0 ? u * 5e-324 * d : u * Math.pow(2, f - 1075) * (d + 4503599627370496);
307
307
  }
308
308
  o.readDoubleLE = n.bind(null, readUintLE, 0, 4), o.readDoubleBE = n.bind(null, readUintBE, 4, 0);
309
- }(), o;
309
+ })(), o;
310
310
  }
311
311
  function writeUintLE(o, t, n) {
312
312
  t[n] = o & 255, t[n + 1] = o >>> 8 & 255, t[n + 2] = o >>> 16 & 255, t[n + 3] = o >>> 24;
@@ -433,7 +433,7 @@ function requireLongbits() {
433
433
  }
434
434
  var hasRequiredMinimal;
435
435
  function requireMinimal() {
436
- return hasRequiredMinimal || (hasRequiredMinimal = 1, function(o) {
436
+ return hasRequiredMinimal || (hasRequiredMinimal = 1, (function(o) {
437
437
  var t = o;
438
438
  t.asPromise = aspromise, t.base64 = base64$1, t.EventEmitter = eventemitter, t.float = float, t.inquire = inquire_1, t.utf8 = utf8$2, t.pool = pool_1, t.LongBits = requireLongbits(), t.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), t.global = t.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || commonjsGlobal, t.emptyArray = Object.freeze ? Object.freeze([]) : (
439
439
  /* istanbul ignore next */
@@ -457,7 +457,7 @@ function requireMinimal() {
457
457
  t.isSet = function(a, e) {
458
458
  var i = a[e];
459
459
  return i != null && a.hasOwnProperty(e) ? typeof i != "object" || (Array.isArray(i) ? i.length : Object.keys(i).length) > 0 : !1;
460
- }, t.Buffer = function() {
460
+ }, t.Buffer = (function() {
461
461
  try {
462
462
  var r = t.inquire("buffer").Buffer;
463
463
  return r.prototype.utf8Write ? r : (
@@ -467,7 +467,7 @@ function requireMinimal() {
467
467
  } catch {
468
468
  return null;
469
469
  }
470
- }(), t._Buffer_from = null, t._Buffer_allocUnsafe = null, t.newBuffer = function(a) {
470
+ })(), t._Buffer_from = null, t._Buffer_allocUnsafe = null, t.newBuffer = function(a) {
471
471
  return typeof a == "number" ? t.Buffer ? t._Buffer_allocUnsafe(a) : new t.Array(a) : t.Buffer ? t._Buffer_from(a) : typeof Uint8Array > "u" ? a : new Uint8Array(a);
472
472
  }, t.Array = typeof Uint8Array < "u" ? Uint8Array : Array, t.Long = /* istanbul ignore next */
473
473
  t.global.dcodeIO && /* istanbul ignore next */
@@ -555,7 +555,7 @@ function requireMinimal() {
555
555
  return new r(e);
556
556
  };
557
557
  };
558
- }(minimal$1)), minimal$1;
558
+ })(minimal$1)), minimal$1;
559
559
  }
560
560
  var writer = Writer$1, util$4 = requireMinimal(), BufferWriter$1, LongBits$1 = util$4.LongBits, base64 = util$4.base64, utf8$1 = util$4.utf8;
561
561
  function Op(o, t, n) {
@@ -740,7 +740,7 @@ var create_array = typeof Uint8Array < "u" ? function o(t) {
740
740
  Reader$1.create = create();
741
741
  Reader$1.prototype._slice = util$2.Array.prototype.subarray || /* istanbul ignore next */
742
742
  util$2.Array.prototype.slice;
743
- Reader$1.prototype.uint32 = /* @__PURE__ */ function o() {
743
+ Reader$1.prototype.uint32 = /* @__PURE__ */ (function o() {
744
744
  var t = 4294967295;
745
745
  return function() {
746
746
  if (t = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (t = (t | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (t = (t | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return t;
@@ -748,7 +748,7 @@ Reader$1.prototype.uint32 = /* @__PURE__ */ function o() {
748
748
  throw this.pos = this.len, indexOutOfRange(this, 10);
749
749
  return t;
750
750
  };
751
- }();
751
+ })();
752
752
  Reader$1.prototype.int32 = function o() {
753
753
  return this.uint32() | 0;
754
754
  };
@@ -866,6 +866,7 @@ Reader$1.prototype.skipType = function(o) {
866
866
  case 5:
867
867
  this.skip(4);
868
868
  break;
869
+ /* istanbul ignore next */
869
870
  default:
870
871
  throw Error("invalid wire type " + o + " at offset " + this.pos);
871
872
  }
@@ -977,13 +978,13 @@ var roots = {};
977
978
  var minimal = indexMinimal;
978
979
  const $Reader = minimal.Reader, $Writer = minimal.Writer, $util = minimal.util, $root = minimal.roots.default || (minimal.roots.default = {}), com = $root.com = (() => {
979
980
  const o = {};
980
- return o.amazonaws = function() {
981
+ return o.amazonaws = (function() {
981
982
  const t = {};
982
- return t.iot = function() {
983
+ return t.iot = (function() {
983
984
  const n = {};
984
- return n.securedtunneling = function() {
985
+ return n.securedtunneling = (function() {
985
986
  const l = {};
986
- return l.ProtocolV1Message = function() {
987
+ return l.ProtocolV1Message = (function() {
987
988
  function r(a) {
988
989
  if (a)
989
990
  for (let e = Object.keys(a), i = 0; i < e.length; ++i)
@@ -1090,11 +1091,11 @@ const $Reader = minimal.Reader, $Writer = minimal.Writer, $util = minimal.util,
1090
1091
  return this.constructor.toObject(this, minimal.util.toJSONOptions);
1091
1092
  }, r.getTypeUrl = function(e) {
1092
1093
  return e === void 0 && (e = "type.googleapis.com"), e + "/com.amazonaws.iot.securedtunneling.ProtocolV1Message";
1093
- }, r.Type = function() {
1094
+ }, r.Type = (function() {
1094
1095
  const a = {}, e = Object.create(a);
1095
1096
  return e[a[0] = "UNKNOWN"] = 0, e[a[1] = "DATA"] = 1, e[a[2] = "STREAM_START"] = 2, e[a[3] = "STREAM_END"] = 3, e;
1096
- }(), r;
1097
- }(), l.ProtocolV2Message = function() {
1097
+ })(), r;
1098
+ })(), l.ProtocolV2Message = (function() {
1098
1099
  function r(a) {
1099
1100
  if (this.availableServiceIds = [], a)
1100
1101
  for (let e = Object.keys(a), i = 0; i < e.length; ++i)
@@ -1255,11 +1256,11 @@ const $Reader = minimal.Reader, $Writer = minimal.Writer, $util = minimal.util,
1255
1256
  return this.constructor.toObject(this, minimal.util.toJSONOptions);
1256
1257
  }, r.getTypeUrl = function(e) {
1257
1258
  return e === void 0 && (e = "type.googleapis.com"), e + "/com.amazonaws.iot.securedtunneling.ProtocolV2Message";
1258
- }, r.Type = function() {
1259
+ }, r.Type = (function() {
1259
1260
  const a = {}, e = Object.create(a);
1260
1261
  return e[a[0] = "UNKNOWN"] = 0, e[a[1] = "DATA"] = 1, e[a[2] = "STREAM_START"] = 2, e[a[3] = "STREAM_RESET"] = 3, e[a[4] = "SESSION_RESET"] = 4, e[a[5] = "SERVICE_IDS"] = 5, e;
1261
- }(), r;
1262
- }(), l.ProtocolV3Message = function() {
1262
+ })(), r;
1263
+ })(), l.ProtocolV3Message = (function() {
1263
1264
  function r(a) {
1264
1265
  if (this.availableServiceIds = [], a)
1265
1266
  for (let e = Object.keys(a), i = 0; i < e.length; ++i)
@@ -1437,14 +1438,14 @@ const $Reader = minimal.Reader, $Writer = minimal.Writer, $util = minimal.util,
1437
1438
  return this.constructor.toObject(this, minimal.util.toJSONOptions);
1438
1439
  }, r.getTypeUrl = function(e) {
1439
1440
  return e === void 0 && (e = "type.googleapis.com"), e + "/com.amazonaws.iot.securedtunneling.ProtocolV3Message";
1440
- }, r.Type = function() {
1441
+ }, r.Type = (function() {
1441
1442
  const a = {}, e = Object.create(a);
1442
1443
  return e[a[0] = "UNKNOWN"] = 0, e[a[1] = "DATA"] = 1, e[a[2] = "STREAM_START"] = 2, e[a[3] = "STREAM_RESET"] = 3, e[a[4] = "SESSION_RESET"] = 4, e[a[5] = "SERVICE_IDS"] = 5, e[a[6] = "CONNECTION_START"] = 6, e[a[7] = "CONNECTION_RESET"] = 7, e;
1443
- }(), r;
1444
- }(), l;
1445
- }(), n;
1446
- }(), t;
1447
- }(), o;
1444
+ })(), r;
1445
+ })(), l;
1446
+ })(), n;
1447
+ })(), t;
1448
+ })(), o;
1448
1449
  })(), ProtocolV1Message = com.amazonaws.iot.securedtunneling.ProtocolV1Message, ProtocolV2Message = com.amazonaws.iot.securedtunneling.ProtocolV2Message, ProtocolV3Message = com.amazonaws.iot.securedtunneling.ProtocolV3Message, TunnelMessageType = {
1449
1450
  UNKNOWN: 0,
1450
1451
  DATA: 1,