agora-foundation 3.7.4 → 3.7.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.
@@ -38,7 +38,11 @@ var createLogHandler = exports.createLogHandler = function createLogHandler(hold
38
38
  methodName: evt.method,
39
39
  traceId: evt.context.traceId
40
40
  }, elapsed, (_evt$arguments = evt.arguments) !== null && _evt$arguments !== void 0 ? _evt$arguments : [], evt["return"], evt.error);
41
- holder.logger.info(msg);
41
+ if (evt.error) {
42
+ holder.logger.error(msg);
43
+ } else {
44
+ holder.logger.info(msg);
45
+ }
42
46
  }
43
47
  return _interceptor.Result.CONTINUE;
44
48
  };
@@ -6,3 +6,6 @@ export declare enum FcrApplicationPlatform {
6
6
  WEB_MOBILE = 6
7
7
  }
8
8
  export declare const getPlatform: () => FcrApplicationPlatform;
9
+ export declare const isWindows: () => boolean;
10
+ export declare const windowsVersion: () => string | null;
11
+ export declare const isMac: () => boolean;
@@ -4,12 +4,14 @@ require("core-js/modules/es.object.define-property.js");
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.isElectron = exports.getPlatform = exports.FcrApplicationPlatform = void 0;
7
+ exports.windowsVersion = exports.isWindows = exports.isMac = exports.isElectron = exports.getPlatform = exports.FcrApplicationPlatform = void 0;
8
8
  require("core-js/modules/es.array.find.js");
9
9
  require("core-js/modules/es.array.includes.js");
10
10
  require("core-js/modules/es.array.index-of.js");
11
11
  require("core-js/modules/es.object.to-string.js");
12
+ require("core-js/modules/es.regexp.exec.js");
12
13
  require("core-js/modules/es.string.includes.js");
14
+ require("core-js/modules/es.string.match.js");
13
15
  var _browser = require("./browser");
14
16
  var isElectron = exports.isElectron = function isElectron() {
15
17
  var userAgent = navigator.userAgent.toLowerCase();
@@ -42,4 +44,18 @@ var getPlatform = exports.getPlatform = function getPlatform() {
42
44
  } else {
43
45
  return (0, _browser.isMobileWebBrowser)() ? FcrApplicationPlatform.WEB_MOBILE : FcrApplicationPlatform.WEB_DESKTOP;
44
46
  }
47
+ };
48
+ var isWindows = exports.isWindows = function isWindows() {
49
+ return getPlatform() === FcrApplicationPlatform.WINDOWS;
50
+ };
51
+ var windowsVersion = exports.windowsVersion = function windowsVersion() {
52
+ if (!isWindows()) {
53
+ return null;
54
+ }
55
+ var userAgent = navigator.userAgent.toLowerCase();
56
+ var version = userAgent.match(/windows nt (\d+\.\d+)/);
57
+ return version ? version[1] : null; // return like 10.0
58
+ };
59
+ var isMac = exports.isMac = function isMac() {
60
+ return getPlatform() === FcrApplicationPlatform.MACOS;
45
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-foundation",
3
- "version": "3.7.4",
3
+ "version": "3.7.5",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "build": "agora-tc-transpile && agora-tc-bundle-worker --entry=./src/worker/worker-factory.ts",
@@ -20,7 +20,7 @@
20
20
  "@types/jasmine": "^5.1.4",
21
21
  "@types/lodash": "^4.14.168",
22
22
  "@types/node": "^20.11.30",
23
- "agora-toolchain": "~3.7.4",
23
+ "agora-toolchain": "~3.7.5",
24
24
  "core-js": "^3.33.3",
25
25
  "tslib": "^2.6.2",
26
26
  "winston": "^3.16.0",