videomail-client 13.13.2 → 13.13.4

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.
@@ -10876,7 +10876,7 @@ var __webpack_exports__ = {};
10876
10876
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10877
10877
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10878
10878
  var package_namespaceObject = {
10879
- rE: "13.13.2"
10879
+ rE: "13.13.4"
10880
10880
  };
10881
10881
  function isAudioEnabled(options) {
10882
10882
  return Boolean(options.audio.enabled);
@@ -16745,11 +16745,29 @@ var __webpack_exports__ = {};
16745
16745
  canvas_to_buffer_modern_r.atob = void 0;
16746
16746
  var websocket_stream_stream = __webpack_require__("./node_modules/websocket-stream/stream.js");
16747
16747
  var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
16748
- function getWebSocketDiagnostic() {
16749
- const wsCtorName = globalThis.WebSocket.name;
16748
+ function getEdgeCodes(value, amount, fromEnd) {
16749
+ const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
16750
+ const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
16751
+ return codes || "none";
16752
+ }
16753
+ function hasControlCharacters(value) {
16754
+ return Array.from(value).some((char)=>{
16755
+ const code = char.codePointAt(0);
16756
+ if (void 0 === code) return false;
16757
+ return code <= 31 || 127 === code;
16758
+ });
16759
+ }
16760
+ function getWebSocketDiagnostic(url2Connect) {
16750
16761
  const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
16751
- const webdriverFlag = String(navigator.webdriver);
16752
- const diagnostic = ` websocketDiagnostics{webdriver=${webdriverFlag}, wsCtor=${wsCtorName}, wsCtorFingerprint=${wsCtorFingerprint}}`;
16762
+ const wsCtorNative = wsCtorFingerprint.includes("[native code]");
16763
+ let urlParsedProtocol = "invalid";
16764
+ try {
16765
+ urlParsedProtocol = new URL(url2Connect).protocol;
16766
+ } catch (_exc) {}
16767
+ const urlHasWhitespace = /\s/u.test(url2Connect);
16768
+ const urlHasControlChars = hasControlCharacters(url2Connect);
16769
+ const urlHasReplacementChar = url2Connect.includes("\uFFFD");
16770
+ const diagnostic = `websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
16753
16771
  return diagnostic;
16754
16772
  }
16755
16773
  const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
@@ -17452,16 +17470,31 @@ var __webpack_exports__ = {};
17452
17470
  });
17453
17471
  return;
17454
17472
  }
17455
- this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
17473
+ this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
17474
+ let nativeSocket;
17475
+ try {
17476
+ nativeSocket = new WebSocket(url2Connect);
17477
+ } catch (exc) {
17478
+ this.connecting = this.connected = false;
17479
+ const diagnostic = error_getWebSocketDiagnostic(url2Connect);
17480
+ const err = error_createError({
17481
+ message: `Failed to construct WebSocket to ${url2Connect}`,
17482
+ explanation: `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic}`,
17483
+ options: this.options,
17484
+ exc
17485
+ });
17486
+ this.emit("ERROR", {
17487
+ err
17488
+ });
17489
+ return;
17490
+ }
17456
17491
  try {
17457
- const nativeSocket = new WebSocket(url2Connect);
17458
17492
  this.stream = stream_default()(nativeSocket);
17459
17493
  } catch (exc) {
17460
17494
  this.connecting = this.connected = false;
17461
- const diagnostic = error_getWebSocketDiagnostic();
17462
17495
  const err = error_createError({
17463
- message: "Failed to connect to server",
17464
- explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
17496
+ message: `Failed to create a stream to ${url2Connect}`,
17497
+ explanation: "Please check your connection and try again. If the problem persists, contact us.",
17465
17498
  options: this.options,
17466
17499
  exc
17467
17500
  });
package/dist/esm/index.js CHANGED
@@ -3617,7 +3617,7 @@ const constants = {
3617
3617
  }
3618
3618
  };
3619
3619
  var package_namespaceObject = {
3620
- rE: "13.13.2"
3620
+ rE: "13.13.4"
3621
3621
  };
3622
3622
  function isAudioEnabled(options) {
3623
3623
  return Boolean(options.audio.enabled);
@@ -5905,11 +5905,29 @@ class Notifier extends util_Despot {
5905
5905
  }
5906
5906
  }
5907
5907
  const notifier = Notifier;
5908
- function getWebSocketDiagnostic() {
5909
- const wsCtorName = globalThis.WebSocket.name;
5908
+ function getEdgeCodes(value, amount, fromEnd) {
5909
+ const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
5910
+ const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
5911
+ return codes || "none";
5912
+ }
5913
+ function hasControlCharacters(value) {
5914
+ return Array.from(value).some((char)=>{
5915
+ const code = char.codePointAt(0);
5916
+ if (void 0 === code) return false;
5917
+ return code <= 31 || 127 === code;
5918
+ });
5919
+ }
5920
+ function getWebSocketDiagnostic(url2Connect) {
5910
5921
  const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
5911
- const webdriverFlag = String(navigator.webdriver);
5912
- const diagnostic = ` websocketDiagnostics{webdriver=${webdriverFlag}, wsCtor=${wsCtorName}, wsCtorFingerprint=${wsCtorFingerprint}}`;
5922
+ const wsCtorNative = wsCtorFingerprint.includes("[native code]");
5923
+ let urlParsedProtocol = "invalid";
5924
+ try {
5925
+ urlParsedProtocol = new URL(url2Connect).protocol;
5926
+ } catch (_exc) {}
5927
+ const urlHasWhitespace = /\s/u.test(url2Connect);
5928
+ const urlHasControlChars = hasControlCharacters(url2Connect);
5929
+ const urlHasReplacementChar = url2Connect.includes("\uFFFD");
5930
+ const diagnostic = `websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
5913
5931
  return diagnostic;
5914
5932
  }
5915
5933
  const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
@@ -6582,16 +6600,31 @@ class Recorder extends util_Despot {
6582
6600
  });
6583
6601
  return;
6584
6602
  }
6585
- this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
6603
+ this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
6604
+ let nativeSocket;
6605
+ try {
6606
+ nativeSocket = new WebSocket(url2Connect);
6607
+ } catch (exc) {
6608
+ this.connecting = this.connected = false;
6609
+ const diagnostic = error_getWebSocketDiagnostic(url2Connect);
6610
+ const err = error_createError({
6611
+ message: `Failed to construct WebSocket to ${url2Connect}`,
6612
+ explanation: `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic}`,
6613
+ options: this.options,
6614
+ exc
6615
+ });
6616
+ this.emit("ERROR", {
6617
+ err
6618
+ });
6619
+ return;
6620
+ }
6586
6621
  try {
6587
- const nativeSocket = new WebSocket(url2Connect);
6588
6622
  this.stream = websocket_stream(nativeSocket);
6589
6623
  } catch (exc) {
6590
6624
  this.connecting = this.connected = false;
6591
- const diagnostic = error_getWebSocketDiagnostic();
6592
6625
  const err = error_createError({
6593
- message: "Failed to connect to server",
6594
- explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
6626
+ message: `Failed to create a stream to ${url2Connect}`,
6627
+ explanation: "Please check your connection and try again. If the problem persists, contact us.",
6595
6628
  options: this.options,
6596
6629
  exc
6597
6630
  });
@@ -1,2 +1,2 @@
1
- declare function getWebSocketDiagnostic(): string;
1
+ declare function getWebSocketDiagnostic(url2Connect: string): string;
2
2
  export default getWebSocketDiagnostic;
package/dist/umd/index.js CHANGED
@@ -10882,7 +10882,7 @@
10882
10882
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10883
10883
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10884
10884
  var package_namespaceObject = {
10885
- rE: "13.13.2"
10885
+ rE: "13.13.4"
10886
10886
  };
10887
10887
  function isAudioEnabled(options) {
10888
10888
  return Boolean(options.audio.enabled);
@@ -16508,11 +16508,29 @@
16508
16508
  canvas_to_buffer_modern_r.atob = void 0;
16509
16509
  var websocket_stream_stream = __webpack_require__("./node_modules/websocket-stream/stream.js");
16510
16510
  var stream_default = /*#__PURE__*/ __webpack_require__.n(websocket_stream_stream);
16511
- function getWebSocketDiagnostic() {
16512
- const wsCtorName = globalThis.WebSocket.name;
16511
+ function getEdgeCodes(value, amount, fromEnd) {
16512
+ const chars = fromEnd ? value.slice(-amount) : value.slice(0, amount);
16513
+ const codes = Array.from(chars, (char)=>String(char.codePointAt(0))).join(".");
16514
+ return codes || "none";
16515
+ }
16516
+ function hasControlCharacters(value) {
16517
+ return Array.from(value).some((char)=>{
16518
+ const code = char.codePointAt(0);
16519
+ if (void 0 === code) return false;
16520
+ return code <= 31 || 127 === code;
16521
+ });
16522
+ }
16523
+ function getWebSocketDiagnostic(url2Connect) {
16513
16524
  const wsCtorFingerprint = String(globalThis.WebSocket).slice(0, 80).replace(/\s+/gu, " ");
16514
- const webdriverFlag = String(navigator.webdriver);
16515
- const diagnostic = ` websocketDiagnostics{webdriver=${webdriverFlag}, wsCtor=${wsCtorName}, wsCtorFingerprint=${wsCtorFingerprint}}`;
16525
+ const wsCtorNative = wsCtorFingerprint.includes("[native code]");
16526
+ let urlParsedProtocol = "invalid";
16527
+ try {
16528
+ urlParsedProtocol = new URL(url2Connect).protocol;
16529
+ } catch (_exc) {}
16530
+ const urlHasWhitespace = /\s/u.test(url2Connect);
16531
+ const urlHasControlChars = hasControlCharacters(url2Connect);
16532
+ const urlHasReplacementChar = url2Connect.includes("\uFFFD");
16533
+ const diagnostic = `websocketDiagnostics{webdriver=${String(navigator.webdriver)}, wsCtorNative=${String(wsCtorNative)}, urlLen=${url2Connect.length}, urlParsedProtocol=${urlParsedProtocol}, locationProtocol=${location.protocol}, secureContext=${String(globalThis.isSecureContext)}, online=${String(navigator.onLine)}, urlHasWhitespace=${String(urlHasWhitespace)}, urlHasControlChars=${String(urlHasControlChars)}, urlHasReplacementChar=${String(urlHasReplacementChar)}, urlFirstCodes=${getEdgeCodes(url2Connect, 4)}, urlLastCodes=${getEdgeCodes(url2Connect, 4, true)}}`;
16516
16534
  return diagnostic;
16517
16535
  }
16518
16536
  const error_getWebSocketDiagnostic = getWebSocketDiagnostic;
@@ -17216,16 +17234,31 @@
17216
17234
  });
17217
17235
  return;
17218
17236
  }
17219
- this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
17237
+ this.options.logger.debug(`Recorder: initializing web socket stream to ${url2Connect}`);
17238
+ let nativeSocket;
17239
+ try {
17240
+ nativeSocket = new WebSocket(url2Connect);
17241
+ } catch (exc) {
17242
+ this.connecting = this.connected = false;
17243
+ const diagnostic = error_getWebSocketDiagnostic(url2Connect);
17244
+ const err = error_createError({
17245
+ message: `Failed to construct WebSocket to ${url2Connect}`,
17246
+ explanation: `Please check your connection and try again. If the problem persists, contact us. Diagnostic: ${diagnostic}`,
17247
+ options: this.options,
17248
+ exc
17249
+ });
17250
+ this.emit("ERROR", {
17251
+ err
17252
+ });
17253
+ return;
17254
+ }
17220
17255
  try {
17221
- const nativeSocket = new WebSocket(url2Connect);
17222
17256
  this.stream = stream_default()(nativeSocket);
17223
17257
  } catch (exc) {
17224
17258
  this.connecting = this.connected = false;
17225
- const diagnostic = error_getWebSocketDiagnostic();
17226
17259
  const err = error_createError({
17227
- message: "Failed to connect to server",
17228
- explanation: `Unable to build websocket to ${url2Connect}. Please check your connection and try again. If the problem persists, contact us.${diagnostic}`,
17260
+ message: `Failed to create a stream to ${url2Connect}`,
17261
+ explanation: "Please check your connection and try again. If the problem persists, contact us.",
17229
17262
  options: this.options,
17230
17263
  exc
17231
17264
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.13.2",
3
+ "version": "13.13.4",
4
4
  "description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -78,48 +78,48 @@
78
78
  "@chromatic-com/storybook": "5.2.1",
79
79
  "@eslint/config-inspector": "3.0.4",
80
80
  "@eslint/js": "10.0.1",
81
- "@rsbuild/plugin-node-polyfill": "1.4.5",
81
+ "@rsbuild/plugin-node-polyfill": "1.4.6",
82
82
  "@rsbuild/plugin-stylus": "2.0.1",
83
- "@rsdoctor/rspack-plugin": "1.5.12",
84
- "@rslib/core": "0.22.0",
85
- "@storybook/addon-a11y": "10.4.1",
86
- "@storybook/addon-docs": "10.4.1",
87
- "@storybook/addon-links": "10.4.1",
88
- "@storybook/html": "10.4.1",
83
+ "@rsdoctor/rspack-plugin": "1.5.13",
84
+ "@rslib/core": "0.22.1",
85
+ "@storybook/addon-a11y": "10.4.5",
86
+ "@storybook/addon-docs": "10.4.5",
87
+ "@storybook/addon-links": "10.4.5",
88
+ "@storybook/html": "10.4.5",
89
89
  "@tsconfig/node24": "24.0.4",
90
90
  "@tsconfig/strictest": "2.0.8",
91
91
  "@types/defined": "1.0.2",
92
92
  "@types/node": "24.12.3",
93
93
  "@types/superagent": "8.1.10",
94
94
  "@types/ua-parser-js": "0.7.39",
95
- "@vitest/eslint-plugin": "1.6.19",
95
+ "@vitest/eslint-plugin": "1.6.20",
96
96
  "audit-ci": "7.1.0",
97
- "chromatic": "17.1.0",
97
+ "chromatic": "17.4.1",
98
98
  "cross-env": "10.1.0",
99
- "eslint": "10.4.1",
100
- "eslint-import-resolver-typescript": "4.4.4",
99
+ "eslint": "10.5.0",
100
+ "eslint-import-resolver-typescript": "4.4.5",
101
101
  "eslint-plugin-de-morgan": "2.1.2",
102
102
  "eslint-plugin-depend": "1.5.0",
103
103
  "eslint-plugin-import-x": "4.16.2",
104
- "eslint-plugin-package-json": "1.2.0",
104
+ "eslint-plugin-package-json": "1.3.0",
105
105
  "eslint-plugin-regexp": "3.1.0",
106
106
  "eslint-plugin-simple-import-sort": "13.0.0",
107
107
  "globals": "17.6.0",
108
108
  "jsdom": "29.1.1",
109
109
  "msw": "2.14.6",
110
110
  "msw-storybook-addon": "2.0.7",
111
- "prettier": "3.8.3",
111
+ "prettier": "3.8.4",
112
112
  "prettier-plugin-curly": "0.4.1",
113
113
  "prettier-plugin-jsdoc": "1.8.1",
114
114
  "prettier-plugin-packagejson": "3.0.2",
115
115
  "prettier-plugin-sh": "0.18.1",
116
116
  "release-it": "20.2.0",
117
- "storybook": "10.4.1",
117
+ "storybook": "10.4.5",
118
118
  "storybook-html-rsbuild": "3.3.4",
119
119
  "type-fest": "5.7.0",
120
120
  "typescript": "6.0.3",
121
- "typescript-eslint": "8.60.0",
122
- "vitest": "4.1.7"
121
+ "typescript-eslint": "8.61.1",
122
+ "vitest": "4.1.9"
123
123
  },
124
124
  "engines": {
125
125
  "node": "^24.15.0",