videomail-client 10.2.45 → 10.2.47

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.
@@ -13713,7 +13713,7 @@ var __webpack_exports__ = {};
13713
13713
  return getBrowser_browser;
13714
13714
  }
13715
13715
  const util_getBrowser = getBrowser;
13716
- function HTTPError_define_property(obj, key, value) {
13716
+ function HTTPVideomailError_define_property(obj, key, value) {
13717
13717
  if (key in obj) Object.defineProperty(obj, key, {
13718
13718
  value: value,
13719
13719
  enumerable: true,
@@ -13723,12 +13723,12 @@ var __webpack_exports__ = {};
13723
13723
  else obj[key] = value;
13724
13724
  return obj;
13725
13725
  }
13726
- class HTTPError extends Error {
13726
+ class HTTPVideomailError_HTTPVideomailError extends Error {
13727
13727
  constructor(...args){
13728
- super(...args), HTTPError_define_property(this, "code", void 0), HTTPError_define_property(this, "status", void 0);
13728
+ super(...args), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
13729
13729
  }
13730
13730
  }
13731
- const error_HTTPError = HTTPError;
13731
+ const HTTPVideomailError = HTTPVideomailError_HTTPVideomailError;
13732
13732
  function VideomailError_define_property(obj, key, value) {
13733
13733
  if (key in obj) Object.defineProperty(obj, key, {
13734
13734
  value: value,
@@ -13739,7 +13739,7 @@ var __webpack_exports__ = {};
13739
13739
  else obj[key] = value;
13740
13740
  return obj;
13741
13741
  }
13742
- class VideomailError extends error_HTTPError {
13742
+ class VideomailError extends HTTPVideomailError {
13743
13743
  hasClass(name) {
13744
13744
  var _this_classList;
13745
13745
  return null == (_this_classList = this.classList) ? void 0 : _this_classList.includes(name);
@@ -13751,7 +13751,7 @@ var __webpack_exports__ = {};
13751
13751
  return this.classList;
13752
13752
  }
13753
13753
  constructor(message, options, classList, errData){
13754
- super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "explanation", void 0), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "siteName", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "classList", void 0);
13754
+ super(message, errData), VideomailError_define_property(this, "title", "Error from videomail-client npm package"), VideomailError_define_property(this, "location", window.location.href), VideomailError_define_property(this, "logLines", void 0), VideomailError_define_property(this, "siteName", void 0), VideomailError_define_property(this, "cookie", void 0), VideomailError_define_property(this, "err", void 0), VideomailError_define_property(this, "promise", void 0), VideomailError_define_property(this, "reason", void 0), VideomailError_define_property(this, "browser", void 0), VideomailError_define_property(this, "cpu", void 0), VideomailError_define_property(this, "device", void 0), VideomailError_define_property(this, "engine", void 0), VideomailError_define_property(this, "os", void 0), VideomailError_define_property(this, "screen", void 0), VideomailError_define_property(this, "orientation", void 0), VideomailError_define_property(this, "classList", void 0);
13755
13755
  this.explanation = null == errData ? void 0 : errData.explanation;
13756
13756
  this.logLines = null == errData ? void 0 : errData.logLines;
13757
13757
  this.siteName = options.siteName;
@@ -13894,6 +13894,7 @@ var __webpack_exports__ = {};
13894
13894
  const originalExplanation = explanation;
13895
13895
  if (explanation && "object" == typeof explanation) explanation = util_pretty(explanation);
13896
13896
  if (!explanation && originalExplanation) explanation = `Inspected: ${originalExplanation}`;
13897
+ if (!explanation && (null == err ? void 0 : err.explanation)) explanation = err.explanation;
13897
13898
  if (!message && (null == err ? void 0 : err.message)) message = err.message;
13898
13899
  if (!message) {
13899
13900
  if (errName) message = `${errName} (weird)`;
@@ -14375,7 +14376,7 @@ var __webpack_exports__ = {};
14375
14376
  }
14376
14377
  const wrappers_form = Form;
14377
14378
  var package_namespaceObject = {
14378
- i8: "10.2.45"
14379
+ i8: "10.2.47"
14379
14380
  };
14380
14381
  function resource_define_property(obj, key, value) {
14381
14382
  if (key in obj) Object.defineProperty(obj, key, {
@@ -14394,10 +14395,11 @@ var __webpack_exports__ = {};
14394
14395
  if ("error" in body) {
14395
14396
  const message = body.error.message;
14396
14397
  const cause = body.error.cause;
14397
- const error = new error_HTTPError(message, {
14398
+ const error = new HTTPVideomailError(message, {
14398
14399
  cause
14399
14400
  });
14400
14401
  if (body.error.name) error.name = body.error.name;
14402
+ if (body.error.explanation) error.explanation = body.error.explanation;
14401
14403
  if (body.error.stack) error.stack = body.error.stack;
14402
14404
  if (body.error.status) error.status = body.error.status;
14403
14405
  if (body.error.code) error.code = body.error.code;
package/dist/esm/index.js CHANGED
@@ -3664,15 +3664,15 @@ function getBrowser(localOptions) {
3664
3664
  return getBrowser_browser;
3665
3665
  }
3666
3666
  const util_getBrowser = getBrowser;
3667
- class HTTPError extends Error {
3667
+ class HTTPVideomailError_HTTPVideomailError extends Error {
3668
3668
  code;
3669
3669
  status;
3670
+ explanation;
3670
3671
  }
3671
- const error_HTTPError = HTTPError;
3672
- class VideomailError extends error_HTTPError {
3672
+ const HTTPVideomailError = HTTPVideomailError_HTTPVideomailError;
3673
+ class VideomailError extends HTTPVideomailError {
3673
3674
  title = "Error from videomail-client npm package";
3674
3675
  location = window.location.href;
3675
- explanation;
3676
3676
  logLines;
3677
3677
  siteName;
3678
3678
  cookie;
@@ -3837,6 +3837,7 @@ function createError(errorParams) {
3837
3837
  const originalExplanation = explanation;
3838
3838
  if (explanation && "object" == typeof explanation) explanation = util_pretty(explanation);
3839
3839
  if (!explanation && originalExplanation) explanation = `Inspected: ${originalExplanation}`;
3840
+ if (!explanation && err?.explanation) explanation = err.explanation;
3840
3841
  if (!message && err?.message) message = err.message;
3841
3842
  if (!message) {
3842
3843
  if (errName) message = `${errName} (weird)`;
@@ -4182,7 +4183,7 @@ class Form extends util_Despot {
4182
4183
  }
4183
4184
  const wrappers_form = Form;
4184
4185
  var package_namespaceObject = {
4185
- i8: "10.2.45"
4186
+ i8: "10.2.47"
4186
4187
  };
4187
4188
  function findOriginalExc(exc) {
4188
4189
  if (exc instanceof Error && "response" in exc) {
@@ -4191,10 +4192,11 @@ function findOriginalExc(exc) {
4191
4192
  if ("error" in body) {
4192
4193
  const message = body.error.message;
4193
4194
  const cause = body.error.cause;
4194
- const error = new error_HTTPError(message, {
4195
+ const error = new HTTPVideomailError(message, {
4195
4196
  cause
4196
4197
  });
4197
4198
  if (body.error.name) error.name = body.error.name;
4199
+ if (body.error.explanation) error.explanation = body.error.explanation;
4198
4200
  if (body.error.stack) error.stack = body.error.stack;
4199
4201
  if (body.error.status) error.status = body.error.status;
4200
4202
  if (body.error.code) error.code = body.error.code;
@@ -0,0 +1,6 @@
1
+ declare class HTTPVideomailError extends Error {
2
+ code?: string | undefined;
3
+ status?: number | undefined;
4
+ explanation?: string | undefined;
5
+ }
6
+ export default HTTPVideomailError;
@@ -1,15 +1,14 @@
1
1
  import { IBrowser, ICPU, IDevice, IEngine, IOS } from "ua-parser-js";
2
2
  import { VideomailClientOptions } from "../../types/options";
3
- import HTTPError from "./HTTPError";
3
+ import HTTPVideomailError from "./HTTPVideomailError";
4
4
  export interface ErrData extends ErrorOptions {
5
5
  explanation: string | undefined;
6
6
  logLines?: string[] | undefined;
7
7
  err?: Error | undefined;
8
8
  }
9
- declare class VideomailError extends HTTPError {
9
+ declare class VideomailError extends HTTPVideomailError {
10
10
  readonly title = "Error from videomail-client npm package";
11
11
  readonly location: string;
12
- explanation: string | undefined;
13
12
  logLines?: string[] | undefined;
14
13
  siteName: string | undefined;
15
14
  cookie: string | undefined;
@@ -1,8 +1,8 @@
1
1
  import VideomailError from "./VideomailError";
2
2
  import { VideomailClientOptions } from "../../types/options";
3
- import HTTPError from "./HTTPError";
3
+ import HTTPVideomailError from "./HTTPVideomailError";
4
4
  interface ErrorParams {
5
- err?: HTTPError;
5
+ err?: HTTPVideomailError;
6
6
  exc?: unknown;
7
7
  message?: string;
8
8
  explanation?: string;
package/dist/umd/index.js CHANGED
@@ -13709,15 +13709,15 @@
13709
13709
  return getBrowser_browser;
13710
13710
  }
13711
13711
  const util_getBrowser = getBrowser;
13712
- class HTTPError extends Error {
13712
+ class HTTPVideomailError_HTTPVideomailError extends Error {
13713
13713
  code;
13714
13714
  status;
13715
+ explanation;
13715
13716
  }
13716
- const error_HTTPError = HTTPError;
13717
- class VideomailError extends error_HTTPError {
13717
+ const HTTPVideomailError = HTTPVideomailError_HTTPVideomailError;
13718
+ class VideomailError extends HTTPVideomailError {
13718
13719
  title = "Error from videomail-client npm package";
13719
13720
  location = window.location.href;
13720
- explanation;
13721
13721
  logLines;
13722
13722
  siteName;
13723
13723
  cookie;
@@ -13882,6 +13882,7 @@
13882
13882
  const originalExplanation = explanation;
13883
13883
  if (explanation && "object" == typeof explanation) explanation = util_pretty(explanation);
13884
13884
  if (!explanation && originalExplanation) explanation = `Inspected: ${originalExplanation}`;
13885
+ if (!explanation && err?.explanation) explanation = err.explanation;
13885
13886
  if (!message && err?.message) message = err.message;
13886
13887
  if (!message) {
13887
13888
  if (errName) message = `${errName} (weird)`;
@@ -14342,7 +14343,7 @@
14342
14343
  }
14343
14344
  const wrappers_form = Form;
14344
14345
  var package_namespaceObject = {
14345
- i8: "10.2.45"
14346
+ i8: "10.2.47"
14346
14347
  };
14347
14348
  function findOriginalExc(exc) {
14348
14349
  if (exc instanceof Error && "response" in exc) {
@@ -14351,10 +14352,11 @@
14351
14352
  if ("error" in body) {
14352
14353
  const message = body.error.message;
14353
14354
  const cause = body.error.cause;
14354
- const error = new error_HTTPError(message, {
14355
+ const error = new HTTPVideomailError(message, {
14355
14356
  cause
14356
14357
  });
14357
14358
  if (body.error.name) error.name = body.error.name;
14359
+ if (body.error.explanation) error.explanation = body.error.explanation;
14358
14360
  if (body.error.stack) error.stack = body.error.stack;
14359
14361
  if (body.error.status) error.status = body.error.status;
14360
14362
  if (body.error.code) error.code = body.error.code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "10.2.45",
3
+ "version": "10.2.47",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -93,7 +93,7 @@
93
93
  "@types/node": "22.15.30",
94
94
  "@types/superagent": "8.1.9",
95
95
  "@types/ua-parser-js": "0.7.39",
96
- "@vitest/eslint-plugin": "1.2.1",
96
+ "@vitest/eslint-plugin": "1.2.2",
97
97
  "audit-ci": "7.1.0",
98
98
  "chromatic": "11.28.2",
99
99
  "cross-env": "7.0.3",
@@ -104,12 +104,12 @@
104
104
  "eslint-plugin-import-x": "4.15.1",
105
105
  "eslint-plugin-package-json": "0.33.2",
106
106
  "eslint-plugin-promise": "7.2.1",
107
- "eslint-plugin-regexp": "2.8.0",
107
+ "eslint-plugin-regexp": "2.9.0",
108
108
  "eslint-plugin-security": "3.0.1",
109
109
  "eslint-plugin-storybook": "0.12.0",
110
110
  "globals": "16.2.0",
111
111
  "jsdom": "26.1.0",
112
- "msw": "2.10.1",
112
+ "msw": "2.10.2",
113
113
  "msw-storybook-addon": "2.0.5",
114
114
  "prettier": "3.5.3",
115
115
  "prettier-plugin-curly": "0.3.2",
@@ -120,8 +120,8 @@
120
120
  "storybook-html-rsbuild": "1.0.1",
121
121
  "type-fest": "4.41.0",
122
122
  "typescript": "5.8.3",
123
- "typescript-eslint": "8.33.1",
124
- "vitest": "3.2.2"
123
+ "typescript-eslint": "8.34.0",
124
+ "vitest": "3.2.3"
125
125
  },
126
126
  "engines": {
127
127
  "node": "^22.8.0",
@@ -1,5 +0,0 @@
1
- declare class HTTPError extends Error {
2
- code?: string | undefined;
3
- status?: number | undefined;
4
- }
5
- export default HTTPError;