videomail-client 13.12.11 → 13.13.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.
@@ -10872,7 +10872,7 @@ var __webpack_exports__ = {};
10872
10872
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10873
10873
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10874
10874
  var package_namespaceObject = {
10875
- rE: "13.12.11"
10875
+ rE: "13.13.0"
10876
10876
  };
10877
10877
  function isAudioEnabled(options) {
10878
10878
  return Boolean(options.audio.enabled);
@@ -17422,7 +17422,24 @@ var __webpack_exports__ = {};
17422
17422
  if (!this.connected) {
17423
17423
  this.connecting = true;
17424
17424
  this.emit("CONNECTING");
17425
- const url2Connect = `${this.options.socketUrl}?${encodeURIComponent(constants.WHITELIST_KEY_LABEL)}=${encodeURIComponent(this.options.whitelistKey)}`;
17425
+ let url2Connect;
17426
+ try {
17427
+ const socketUrlObj = new URL(this.options.socketUrl);
17428
+ socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
17429
+ url2Connect = socketUrlObj.toString();
17430
+ } catch (exc) {
17431
+ this.connecting = this.connected = false;
17432
+ const err = error_createError({
17433
+ message: "Invalid WebSocket URL",
17434
+ explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
17435
+ options: this.options,
17436
+ exc
17437
+ });
17438
+ this.emit("ERROR", {
17439
+ err
17440
+ });
17441
+ return;
17442
+ }
17426
17443
  this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
17427
17444
  try {
17428
17445
  this.stream = stream_default()(url2Connect, {
package/dist/esm/index.js CHANGED
@@ -3613,7 +3613,7 @@ const constants = {
3613
3613
  }
3614
3614
  };
3615
3615
  var package_namespaceObject = {
3616
- rE: "13.12.11"
3616
+ rE: "13.13.0"
3617
3617
  };
3618
3618
  function isAudioEnabled(options) {
3619
3619
  return Boolean(options.audio.enabled);
@@ -6552,7 +6552,24 @@ class Recorder extends util_Despot {
6552
6552
  if (!this.connected) {
6553
6553
  this.connecting = true;
6554
6554
  this.emit("CONNECTING");
6555
- const url2Connect = `${this.options.socketUrl}?${encodeURIComponent(constants.WHITELIST_KEY_LABEL)}=${encodeURIComponent(this.options.whitelistKey)}`;
6555
+ let url2Connect;
6556
+ try {
6557
+ const socketUrlObj = new URL(this.options.socketUrl);
6558
+ socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
6559
+ url2Connect = socketUrlObj.toString();
6560
+ } catch (exc) {
6561
+ this.connecting = this.connected = false;
6562
+ const err = error_createError({
6563
+ message: "Invalid WebSocket URL",
6564
+ explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
6565
+ options: this.options,
6566
+ exc
6567
+ });
6568
+ this.emit("ERROR", {
6569
+ err
6570
+ });
6571
+ return;
6572
+ }
6556
6573
  this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
6557
6574
  try {
6558
6575
  this.stream = websocket_stream(url2Connect, {
package/dist/umd/index.js CHANGED
@@ -10878,7 +10878,7 @@
10878
10878
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10879
10879
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10880
10880
  var package_namespaceObject = {
10881
- rE: "13.12.11"
10881
+ rE: "13.13.0"
10882
10882
  };
10883
10883
  function isAudioEnabled(options) {
10884
10884
  return Boolean(options.audio.enabled);
@@ -17186,7 +17186,24 @@
17186
17186
  if (!this.connected) {
17187
17187
  this.connecting = true;
17188
17188
  this.emit("CONNECTING");
17189
- const url2Connect = `${this.options.socketUrl}?${encodeURIComponent(constants.WHITELIST_KEY_LABEL)}=${encodeURIComponent(this.options.whitelistKey)}`;
17189
+ let url2Connect;
17190
+ try {
17191
+ const socketUrlObj = new URL(this.options.socketUrl);
17192
+ socketUrlObj.searchParams.set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey);
17193
+ url2Connect = socketUrlObj.toString();
17194
+ } catch (exc) {
17195
+ this.connecting = this.connected = false;
17196
+ const err = error_createError({
17197
+ message: "Invalid WebSocket URL",
17198
+ explanation: `The configured socketUrl "${this.options.socketUrl}" is not a valid URL. Please check your videomail-client configuration.`,
17199
+ options: this.options,
17200
+ exc
17201
+ });
17202
+ this.emit("ERROR", {
17203
+ err
17204
+ });
17205
+ return;
17206
+ }
17190
17207
  this.options.logger.debug(`Recorder: initializing web socket to ${url2Connect}`);
17191
17208
  try {
17192
17209
  this.stream = stream_default()(url2Connect, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.12.11",
3
+ "version": "13.13.0",
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",
@@ -76,11 +76,11 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@chromatic-com/storybook": "5.2.1",
79
- "@eslint/config-inspector": "3.0.3",
79
+ "@eslint/config-inspector": "3.0.4",
80
80
  "@eslint/js": "10.0.1",
81
- "@rsbuild/plugin-node-polyfill": "1.4.4",
82
- "@rsbuild/plugin-stylus": "2.0.0",
83
- "@rsdoctor/rspack-plugin": "1.5.11",
81
+ "@rsbuild/plugin-node-polyfill": "1.4.5",
82
+ "@rsbuild/plugin-stylus": "2.0.1",
83
+ "@rsdoctor/rspack-plugin": "1.5.12",
84
84
  "@rslib/core": "0.21.5",
85
85
  "@storybook/addon-a11y": "10.4.1",
86
86
  "@storybook/addon-docs": "10.4.1",
@@ -94,14 +94,14 @@
94
94
  "@types/ua-parser-js": "0.7.39",
95
95
  "@vitest/eslint-plugin": "1.6.18",
96
96
  "audit-ci": "7.1.0",
97
- "chromatic": "17.0.1",
97
+ "chromatic": "17.1.0",
98
98
  "cross-env": "10.1.0",
99
99
  "eslint": "10.4.0",
100
100
  "eslint-import-resolver-typescript": "4.4.4",
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.1.0",
104
+ "eslint-plugin-package-json": "1.2.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",
@@ -110,7 +110,7 @@
110
110
  "msw-storybook-addon": "2.0.7",
111
111
  "prettier": "3.8.3",
112
112
  "prettier-plugin-curly": "0.4.1",
113
- "prettier-plugin-jsdoc": "1.8.0",
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.0.1",