@pixotope/socket.io-client 0.0.1 → 0.1.0

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,14 +1,14 @@
1
1
 
2
- > @pixotope/socket.io-client@0.0.1 build D:\dev\w\pixotope-foundation\packages\socket.io-client
2
+ > @pixotope/socket.io-client@0.0.1 build /home/circleci/project/packages/socket.io-client
3
3
  > tsup src/index.ts --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
- CLI Target: esnext
8
+ CLI Target: es6
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist\index.cjs 255.56 KB
12
- CJS ⚡️ Build success in 204ms
13
- ESM dist\index.js 255.39 KB
14
- ESM ⚡️ Build success in 204ms
11
+ ESM dist/index.js 255.92 KB
12
+ ESM ⚡️ Build success in 1207ms
13
+ CJS dist/index.cjs 256.09 KB
14
+ CJS ⚡️ Build success in 1214ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # @pixotope/socket.io-client
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e3a7b17: - `@pixotope/socket.io-client` bump minor version
8
+ - `@pixotope/zmq-client` export default endpoints config struct
package/dist/index.cjs CHANGED
@@ -1,10 +1,27 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
9
  var __getProtoOf = Object.getPrototypeOf;
7
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8
25
  var __commonJS = (cb, mod) => function __require() {
9
26
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
27
  };
@@ -899,29 +916,27 @@ var require_has_flag = __commonJS({
899
916
  }
900
917
  });
901
918
 
902
- // ../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
919
+ // ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
903
920
  var require_supports_color = __commonJS({
904
- "../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports2, module2) {
921
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
905
922
  "use strict";
906
923
  var os = require("os");
907
924
  var tty = require("tty");
908
925
  var hasFlag = require_has_flag();
909
926
  var { env } = process;
910
- var flagForceColor;
927
+ var forceColor;
911
928
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
912
- flagForceColor = 0;
929
+ forceColor = 0;
913
930
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
914
- flagForceColor = 1;
931
+ forceColor = 1;
915
932
  }
916
- function envForceColor() {
917
- if ("FORCE_COLOR" in env) {
918
- if (env.FORCE_COLOR === "true") {
919
- return 1;
920
- }
921
- if (env.FORCE_COLOR === "false") {
922
- return 0;
923
- }
924
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
933
+ if ("FORCE_COLOR" in env) {
934
+ if (env.FORCE_COLOR === "true") {
935
+ forceColor = 1;
936
+ } else if (env.FORCE_COLOR === "false") {
937
+ forceColor = 0;
938
+ } else {
939
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
925
940
  }
926
941
  }
927
942
  function translateLevel(level) {
@@ -935,22 +950,15 @@ var require_supports_color = __commonJS({
935
950
  has16m: level >= 3
936
951
  };
937
952
  }
938
- function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
939
- const noFlagForceColor = envForceColor();
940
- if (noFlagForceColor !== void 0) {
941
- flagForceColor = noFlagForceColor;
942
- }
943
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
953
+ function supportsColor(haveStream, streamIsTTY) {
944
954
  if (forceColor === 0) {
945
955
  return 0;
946
956
  }
947
- if (sniffFlags) {
948
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
949
- return 3;
950
- }
951
- if (hasFlag("color=256")) {
952
- return 2;
953
- }
957
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
958
+ return 3;
959
+ }
960
+ if (hasFlag("color=256")) {
961
+ return 2;
954
962
  }
955
963
  if (haveStream && !streamIsTTY && forceColor === void 0) {
956
964
  return 0;
@@ -967,7 +975,7 @@ var require_supports_color = __commonJS({
967
975
  return 1;
968
976
  }
969
977
  if ("CI" in env) {
970
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
978
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
971
979
  return 1;
972
980
  }
973
981
  return min;
@@ -979,7 +987,7 @@ var require_supports_color = __commonJS({
979
987
  return 3;
980
988
  }
981
989
  if ("TERM_PROGRAM" in env) {
982
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
990
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
983
991
  switch (env.TERM_PROGRAM) {
984
992
  case "iTerm.app":
985
993
  return version >= 3 ? 3 : 2;
@@ -998,17 +1006,14 @@ var require_supports_color = __commonJS({
998
1006
  }
999
1007
  return min;
1000
1008
  }
1001
- function getSupportLevel(stream, options = {}) {
1002
- const level = supportsColor(stream, {
1003
- streamIsTTY: stream && stream.isTTY,
1004
- ...options
1005
- });
1009
+ function getSupportLevel(stream) {
1010
+ const level = supportsColor(stream, stream && stream.isTTY);
1006
1011
  return translateLevel(level);
1007
1012
  }
1008
1013
  module2.exports = {
1009
1014
  supportsColor: getSupportLevel,
1010
- stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
1011
- stderr: getSupportLevel({ isTTY: tty.isatty(2) })
1015
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1016
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1012
1017
  };
1013
1018
  }
1014
1019
  });
@@ -1222,13 +1227,12 @@ var require_stream = __commonJS({
1222
1227
  }
1223
1228
  function createWebSocketStream2(ws, options) {
1224
1229
  let terminateOnDestroy = true;
1225
- const duplex = new Duplex({
1226
- ...options,
1230
+ const duplex = new Duplex(__spreadProps(__spreadValues({}, options), {
1227
1231
  autoDestroy: false,
1228
1232
  emitClose: false,
1229
1233
  objectMode: false,
1230
1234
  writableObjectMode: false
1231
- });
1235
+ }));
1232
1236
  ws.on("message", function message(msg, isBinary2) {
1233
1237
  const data = !isBinary2 && duplex._readableState.objectMode ? msg.toString() : msg;
1234
1238
  if (!duplex.push(data)) ws.pause();
@@ -1712,10 +1716,9 @@ var require_permessage_deflate = __commonJS({
1712
1716
  if (!this._inflate) {
1713
1717
  const key = `${endpoint}_max_window_bits`;
1714
1718
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
1715
- this._inflate = zlib.createInflateRaw({
1716
- ...this._options.zlibInflateOptions,
1719
+ this._inflate = zlib.createInflateRaw(__spreadProps(__spreadValues({}, this._options.zlibInflateOptions), {
1717
1720
  windowBits
1718
- });
1721
+ }));
1719
1722
  this._inflate[kPerMessageDeflate] = this;
1720
1723
  this._inflate[kTotalLength] = 0;
1721
1724
  this._inflate[kBuffers] = [];
@@ -1763,10 +1766,9 @@ var require_permessage_deflate = __commonJS({
1763
1766
  if (!this._deflate) {
1764
1767
  const key = `${endpoint}_max_window_bits`;
1765
1768
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
1766
- this._deflate = zlib.createDeflateRaw({
1767
- ...this._options.zlibDeflateOptions,
1769
+ this._deflate = zlib.createDeflateRaw(__spreadProps(__spreadValues({}, this._options.zlibDeflateOptions), {
1768
1770
  windowBits
1769
- });
1771
+ }));
1770
1772
  this._deflate[kTotalLength] = 0;
1771
1773
  this._deflate[kBuffers] = [];
1772
1774
  this._deflate.on("data", deflateOnData);
@@ -3779,13 +3781,12 @@ var require_websocket = __commonJS({
3779
3781
  sendAfterClose(this, data, cb);
3780
3782
  return;
3781
3783
  }
3782
- const opts = {
3784
+ const opts = __spreadValues({
3783
3785
  binary: typeof data !== "string",
3784
3786
  mask: !this._isServer,
3785
3787
  compress: true,
3786
- fin: true,
3787
- ...options
3788
- };
3788
+ fin: true
3789
+ }, options);
3789
3790
  if (!this._extensions[PerMessageDeflate.extensionName]) {
3790
3791
  opts.compress = false;
3791
3792
  }
@@ -3879,7 +3880,7 @@ var require_websocket = __commonJS({
3879
3880
  WebSocket2.prototype.removeEventListener = removeEventListener2;
3880
3881
  module2.exports = WebSocket2;
3881
3882
  function initAsClient(websocket, address, protocols, options) {
3882
- const opts = {
3883
+ const opts = __spreadProps(__spreadValues({
3883
3884
  allowSynchronousEvents: true,
3884
3885
  autoPong: true,
3885
3886
  protocolVersion: protocolVersions[1],
@@ -3887,8 +3888,8 @@ var require_websocket = __commonJS({
3887
3888
  skipUTF8Validation: false,
3888
3889
  perMessageDeflate: true,
3889
3890
  followRedirects: false,
3890
- maxRedirects: 10,
3891
- ...options,
3891
+ maxRedirects: 10
3892
+ }, options), {
3892
3893
  socketPath: void 0,
3893
3894
  hostname: void 0,
3894
3895
  protocol: void 0,
@@ -3897,7 +3898,7 @@ var require_websocket = __commonJS({
3897
3898
  host: void 0,
3898
3899
  path: void 0,
3899
3900
  port: void 0
3900
- };
3901
+ });
3901
3902
  websocket._autoPong = opts.autoPong;
3902
3903
  if (!protocolVersions.includes(opts.protocolVersion)) {
3903
3904
  throw new RangeError(
@@ -3948,13 +3949,12 @@ var require_websocket = __commonJS({
3948
3949
  opts.defaultPort = opts.defaultPort || defaultPort;
3949
3950
  opts.port = parsedUrl.port || defaultPort;
3950
3951
  opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
3951
- opts.headers = {
3952
- ...opts.headers,
3952
+ opts.headers = __spreadProps(__spreadValues({}, opts.headers), {
3953
3953
  "Sec-WebSocket-Version": opts.protocolVersion,
3954
3954
  "Sec-WebSocket-Key": key,
3955
3955
  Connection: "Upgrade",
3956
3956
  Upgrade: "websocket"
3957
- };
3957
+ });
3958
3958
  opts.path = parsedUrl.pathname + parsedUrl.search;
3959
3959
  opts.timeout = opts.handshakeTimeout;
3960
3960
  if (opts.perMessageDeflate) {
@@ -4000,7 +4000,7 @@ var require_websocket = __commonJS({
4000
4000
  websocket._originalSecure = isSecure;
4001
4001
  websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
4002
4002
  const headers = options && options.headers;
4003
- options = { ...options, headers: {} };
4003
+ options = __spreadProps(__spreadValues({}, options), { headers: {} });
4004
4004
  if (headers) {
4005
4005
  for (const [key2, value2] of Object.entries(headers)) {
4006
4006
  options.headers[key2.toLowerCase()] = value2;
@@ -4360,7 +4360,7 @@ var require_websocket_server = __commonJS({
4360
4360
  */
4361
4361
  constructor(options, callback) {
4362
4362
  super();
4363
- options = {
4363
+ options = __spreadValues({
4364
4364
  allowSynchronousEvents: true,
4365
4365
  autoPong: true,
4366
4366
  maxPayload: 100 * 1024 * 1024,
@@ -4376,9 +4376,8 @@ var require_websocket_server = __commonJS({
4376
4376
  host: null,
4377
4377
  path: null,
4378
4378
  port: null,
4379
- WebSocket: WebSocket2,
4380
- ...options
4381
- };
4379
+ WebSocket: WebSocket2
4380
+ }, options);
4382
4381
  if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) {
4383
4382
  throw new TypeError(
4384
4383
  'One and only one of the "port", "server", or "noServer" options must be specified'
@@ -4672,12 +4671,11 @@ var require_websocket_server = __commonJS({
4672
4671
  }
4673
4672
  function abortHandshake(socket, code, message, headers) {
4674
4673
  message = message || http.STATUS_CODES[code];
4675
- headers = {
4674
+ headers = __spreadValues({
4676
4675
  Connection: "close",
4677
4676
  "Content-Type": "text/html",
4678
- "Content-Length": Buffer.byteLength(message),
4679
- ...headers
4680
- };
4677
+ "Content-Length": Buffer.byteLength(message)
4678
+ }, headers);
4681
4679
  socket.once("finish", socket.destroy);
4682
4680
  socket.end(
4683
4681
  `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
package/dist/index.js CHANGED
@@ -1,9 +1,26 @@
1
1
  var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __getProtoOf = Object.getPrototypeOf;
6
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7
24
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
25
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
26
  }) : x)(function(x) {
@@ -903,29 +920,27 @@ var require_has_flag = __commonJS({
903
920
  }
904
921
  });
905
922
 
906
- // ../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
923
+ // ../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
907
924
  var require_supports_color = __commonJS({
908
- "../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module) {
925
+ "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
909
926
  "use strict";
910
927
  var os = __require("os");
911
928
  var tty = __require("tty");
912
929
  var hasFlag = require_has_flag();
913
930
  var { env } = process;
914
- var flagForceColor;
931
+ var forceColor;
915
932
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
916
- flagForceColor = 0;
933
+ forceColor = 0;
917
934
  } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
918
- flagForceColor = 1;
935
+ forceColor = 1;
919
936
  }
920
- function envForceColor() {
921
- if ("FORCE_COLOR" in env) {
922
- if (env.FORCE_COLOR === "true") {
923
- return 1;
924
- }
925
- if (env.FORCE_COLOR === "false") {
926
- return 0;
927
- }
928
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
937
+ if ("FORCE_COLOR" in env) {
938
+ if (env.FORCE_COLOR === "true") {
939
+ forceColor = 1;
940
+ } else if (env.FORCE_COLOR === "false") {
941
+ forceColor = 0;
942
+ } else {
943
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
929
944
  }
930
945
  }
931
946
  function translateLevel(level) {
@@ -939,22 +954,15 @@ var require_supports_color = __commonJS({
939
954
  has16m: level >= 3
940
955
  };
941
956
  }
942
- function supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
943
- const noFlagForceColor = envForceColor();
944
- if (noFlagForceColor !== void 0) {
945
- flagForceColor = noFlagForceColor;
946
- }
947
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
957
+ function supportsColor(haveStream, streamIsTTY) {
948
958
  if (forceColor === 0) {
949
959
  return 0;
950
960
  }
951
- if (sniffFlags) {
952
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
953
- return 3;
954
- }
955
- if (hasFlag("color=256")) {
956
- return 2;
957
- }
961
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
962
+ return 3;
963
+ }
964
+ if (hasFlag("color=256")) {
965
+ return 2;
958
966
  }
959
967
  if (haveStream && !streamIsTTY && forceColor === void 0) {
960
968
  return 0;
@@ -971,7 +979,7 @@ var require_supports_color = __commonJS({
971
979
  return 1;
972
980
  }
973
981
  if ("CI" in env) {
974
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
982
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
975
983
  return 1;
976
984
  }
977
985
  return min;
@@ -983,7 +991,7 @@ var require_supports_color = __commonJS({
983
991
  return 3;
984
992
  }
985
993
  if ("TERM_PROGRAM" in env) {
986
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
994
+ const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
987
995
  switch (env.TERM_PROGRAM) {
988
996
  case "iTerm.app":
989
997
  return version >= 3 ? 3 : 2;
@@ -1002,17 +1010,14 @@ var require_supports_color = __commonJS({
1002
1010
  }
1003
1011
  return min;
1004
1012
  }
1005
- function getSupportLevel(stream, options = {}) {
1006
- const level = supportsColor(stream, {
1007
- streamIsTTY: stream && stream.isTTY,
1008
- ...options
1009
- });
1013
+ function getSupportLevel(stream) {
1014
+ const level = supportsColor(stream, stream && stream.isTTY);
1010
1015
  return translateLevel(level);
1011
1016
  }
1012
1017
  module.exports = {
1013
1018
  supportsColor: getSupportLevel,
1014
- stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
1015
- stderr: getSupportLevel({ isTTY: tty.isatty(2) })
1019
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1020
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1016
1021
  };
1017
1022
  }
1018
1023
  });
@@ -1226,13 +1231,12 @@ var require_stream = __commonJS({
1226
1231
  }
1227
1232
  function createWebSocketStream2(ws, options) {
1228
1233
  let terminateOnDestroy = true;
1229
- const duplex = new Duplex({
1230
- ...options,
1234
+ const duplex = new Duplex(__spreadProps(__spreadValues({}, options), {
1231
1235
  autoDestroy: false,
1232
1236
  emitClose: false,
1233
1237
  objectMode: false,
1234
1238
  writableObjectMode: false
1235
- });
1239
+ }));
1236
1240
  ws.on("message", function message(msg, isBinary2) {
1237
1241
  const data = !isBinary2 && duplex._readableState.objectMode ? msg.toString() : msg;
1238
1242
  if (!duplex.push(data)) ws.pause();
@@ -1716,10 +1720,9 @@ var require_permessage_deflate = __commonJS({
1716
1720
  if (!this._inflate) {
1717
1721
  const key = `${endpoint}_max_window_bits`;
1718
1722
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
1719
- this._inflate = zlib.createInflateRaw({
1720
- ...this._options.zlibInflateOptions,
1723
+ this._inflate = zlib.createInflateRaw(__spreadProps(__spreadValues({}, this._options.zlibInflateOptions), {
1721
1724
  windowBits
1722
- });
1725
+ }));
1723
1726
  this._inflate[kPerMessageDeflate] = this;
1724
1727
  this._inflate[kTotalLength] = 0;
1725
1728
  this._inflate[kBuffers] = [];
@@ -1767,10 +1770,9 @@ var require_permessage_deflate = __commonJS({
1767
1770
  if (!this._deflate) {
1768
1771
  const key = `${endpoint}_max_window_bits`;
1769
1772
  const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
1770
- this._deflate = zlib.createDeflateRaw({
1771
- ...this._options.zlibDeflateOptions,
1773
+ this._deflate = zlib.createDeflateRaw(__spreadProps(__spreadValues({}, this._options.zlibDeflateOptions), {
1772
1774
  windowBits
1773
- });
1775
+ }));
1774
1776
  this._deflate[kTotalLength] = 0;
1775
1777
  this._deflate[kBuffers] = [];
1776
1778
  this._deflate.on("data", deflateOnData);
@@ -3783,13 +3785,12 @@ var require_websocket = __commonJS({
3783
3785
  sendAfterClose(this, data, cb);
3784
3786
  return;
3785
3787
  }
3786
- const opts = {
3788
+ const opts = __spreadValues({
3787
3789
  binary: typeof data !== "string",
3788
3790
  mask: !this._isServer,
3789
3791
  compress: true,
3790
- fin: true,
3791
- ...options
3792
- };
3792
+ fin: true
3793
+ }, options);
3793
3794
  if (!this._extensions[PerMessageDeflate.extensionName]) {
3794
3795
  opts.compress = false;
3795
3796
  }
@@ -3883,7 +3884,7 @@ var require_websocket = __commonJS({
3883
3884
  WebSocket2.prototype.removeEventListener = removeEventListener2;
3884
3885
  module.exports = WebSocket2;
3885
3886
  function initAsClient(websocket, address, protocols, options) {
3886
- const opts = {
3887
+ const opts = __spreadProps(__spreadValues({
3887
3888
  allowSynchronousEvents: true,
3888
3889
  autoPong: true,
3889
3890
  protocolVersion: protocolVersions[1],
@@ -3891,8 +3892,8 @@ var require_websocket = __commonJS({
3891
3892
  skipUTF8Validation: false,
3892
3893
  perMessageDeflate: true,
3893
3894
  followRedirects: false,
3894
- maxRedirects: 10,
3895
- ...options,
3895
+ maxRedirects: 10
3896
+ }, options), {
3896
3897
  socketPath: void 0,
3897
3898
  hostname: void 0,
3898
3899
  protocol: void 0,
@@ -3901,7 +3902,7 @@ var require_websocket = __commonJS({
3901
3902
  host: void 0,
3902
3903
  path: void 0,
3903
3904
  port: void 0
3904
- };
3905
+ });
3905
3906
  websocket._autoPong = opts.autoPong;
3906
3907
  if (!protocolVersions.includes(opts.protocolVersion)) {
3907
3908
  throw new RangeError(
@@ -3952,13 +3953,12 @@ var require_websocket = __commonJS({
3952
3953
  opts.defaultPort = opts.defaultPort || defaultPort;
3953
3954
  opts.port = parsedUrl.port || defaultPort;
3954
3955
  opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
3955
- opts.headers = {
3956
- ...opts.headers,
3956
+ opts.headers = __spreadProps(__spreadValues({}, opts.headers), {
3957
3957
  "Sec-WebSocket-Version": opts.protocolVersion,
3958
3958
  "Sec-WebSocket-Key": key,
3959
3959
  Connection: "Upgrade",
3960
3960
  Upgrade: "websocket"
3961
- };
3961
+ });
3962
3962
  opts.path = parsedUrl.pathname + parsedUrl.search;
3963
3963
  opts.timeout = opts.handshakeTimeout;
3964
3964
  if (opts.perMessageDeflate) {
@@ -4004,7 +4004,7 @@ var require_websocket = __commonJS({
4004
4004
  websocket._originalSecure = isSecure;
4005
4005
  websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
4006
4006
  const headers = options && options.headers;
4007
- options = { ...options, headers: {} };
4007
+ options = __spreadProps(__spreadValues({}, options), { headers: {} });
4008
4008
  if (headers) {
4009
4009
  for (const [key2, value2] of Object.entries(headers)) {
4010
4010
  options.headers[key2.toLowerCase()] = value2;
@@ -4364,7 +4364,7 @@ var require_websocket_server = __commonJS({
4364
4364
  */
4365
4365
  constructor(options, callback) {
4366
4366
  super();
4367
- options = {
4367
+ options = __spreadValues({
4368
4368
  allowSynchronousEvents: true,
4369
4369
  autoPong: true,
4370
4370
  maxPayload: 100 * 1024 * 1024,
@@ -4380,9 +4380,8 @@ var require_websocket_server = __commonJS({
4380
4380
  host: null,
4381
4381
  path: null,
4382
4382
  port: null,
4383
- WebSocket: WebSocket2,
4384
- ...options
4385
- };
4383
+ WebSocket: WebSocket2
4384
+ }, options);
4386
4385
  if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) {
4387
4386
  throw new TypeError(
4388
4387
  'One and only one of the "port", "server", or "noServer" options must be specified'
@@ -4676,12 +4675,11 @@ var require_websocket_server = __commonJS({
4676
4675
  }
4677
4676
  function abortHandshake(socket, code, message, headers) {
4678
4677
  message = message || http.STATUS_CODES[code];
4679
- headers = {
4678
+ headers = __spreadValues({
4680
4679
  Connection: "close",
4681
4680
  "Content-Type": "text/html",
4682
- "Content-Length": Buffer.byteLength(message),
4683
- ...headers
4684
- };
4681
+ "Content-Length": Buffer.byteLength(message)
4682
+ }, headers);
4685
4683
  socket.once("finish", socket.destroy);
4686
4684
  socket.end(
4687
4685
  `HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixotope/socket.io-client",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from "socket.io-client";
1
+ export * from "socket.io-client";
package/tsconfig.json CHANGED
@@ -1,27 +1,26 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": "./src",
4
- "rootDir": "./src",
5
- "target": "ESNext",
6
- "module": "ESNext",
7
- "moduleResolution": "Node",
8
- "types": ["node"],
9
- "lib": ["ESNext"],
10
- "allowJs": true,
11
- "allowSyntheticDefaultImports": true,
12
- "useDefineForClassFields": true,
13
- "strict": true,
14
- "skipLibCheck": false,
15
- "sourceMap": true,
16
- "resolveJsonModule": true,
17
- "isolatedModules": true,
18
- "esModuleInterop": true,
19
- "noEmit": true,
20
- "noUnusedLocals": false,
21
- "noUnusedParameters": false,
22
- "noImplicitReturns": false,
23
- "forceConsistentCasingInFileNames": true
24
- },
25
- "include": ["src"],
26
- "exclude": ["node_modules"]
27
- }
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": "./src",
4
+ "rootDir": "./src",
5
+ "target": "es6",
6
+ "module": "es6",
7
+ "types": ["node"],
8
+ "lib": ["es6"],
9
+ "allowJs": true,
10
+ "allowSyntheticDefaultImports": true,
11
+ "useDefineForClassFields": true,
12
+ "strict": true,
13
+ "skipLibCheck": false,
14
+ "sourceMap": true,
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "esModuleInterop": true,
18
+ "noEmit": true,
19
+ "noUnusedLocals": false,
20
+ "noUnusedParameters": false,
21
+ "noImplicitReturns": false,
22
+ "forceConsistentCasingInFileNames": true
23
+ },
24
+ "include": ["src"],
25
+ "exclude": ["node_modules"]
26
+ }