Merge branch 'master' of https://github.com/facebook/Sonar into Fix-Android
This commit is contained in:
79
iOS/Podfile.lock
Normal file
79
iOS/Podfile.lock
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
PODS:
|
||||||
|
- boost-for-react-native (1.63.0)
|
||||||
|
- CocoaAsyncSocket (7.6.3)
|
||||||
|
- CocoaLibEvent (1.0.0)
|
||||||
|
- DoubleConversion (3.0.0)
|
||||||
|
- Folly (1.0.0):
|
||||||
|
- boost-for-react-native
|
||||||
|
- CocoaLibEvent (~> 1.0)
|
||||||
|
- DoubleConversion
|
||||||
|
- glog
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
|
- glog (0.3.5)
|
||||||
|
- OpenSSL-Static (1.0.2.c1)
|
||||||
|
- PeerTalk (1.0.0)
|
||||||
|
- RSocket (0.10.0):
|
||||||
|
- Folly
|
||||||
|
- Sonar (0.0.1):
|
||||||
|
- Folly
|
||||||
|
- RSocket
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- CocoaAsyncSocket
|
||||||
|
- DoubleConversion (from `third-party-podspecs/DoubleConversion.podspec`)
|
||||||
|
- Folly (from `third-party-podspecs/Folly.podspec`)
|
||||||
|
- glog (from `third-party-podspecs/glog.podspec`)
|
||||||
|
- PeerTalk (from `third-party-podspecs/PeerTalk.podspec`)
|
||||||
|
- RSocket (from `third-party-podspecs/RSocket.podspec`)
|
||||||
|
- Sonar (from `../xplat/Sonar/Sonar.podspec`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
https://github.com/cocoapods/specs.git:
|
||||||
|
- boost-for-react-native
|
||||||
|
- CocoaAsyncSocket
|
||||||
|
- CocoaLibEvent
|
||||||
|
- OpenSSL-Static
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
DoubleConversion:
|
||||||
|
:podspec: third-party-podspecs/DoubleConversion.podspec
|
||||||
|
Folly:
|
||||||
|
:podspec: third-party-podspecs/Folly.podspec
|
||||||
|
glog:
|
||||||
|
:podspec: third-party-podspecs/glog.podspec
|
||||||
|
PeerTalk:
|
||||||
|
:podspec: third-party-podspecs/PeerTalk.podspec
|
||||||
|
RSocket:
|
||||||
|
:podspec: third-party-podspecs/RSocket.podspec
|
||||||
|
Sonar:
|
||||||
|
:podspec: "../xplat/Sonar/Sonar.podspec"
|
||||||
|
|
||||||
|
CHECKOUT OPTIONS:
|
||||||
|
Folly:
|
||||||
|
:commit: 1ed5d00ca4f43d5c81f4d731119e71509179dc99
|
||||||
|
:git: https://github.com/facebook/folly.git
|
||||||
|
PeerTalk:
|
||||||
|
:commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e
|
||||||
|
:git: https://github.com/rsms/PeerTalk.git
|
||||||
|
RSocket:
|
||||||
|
:commit: 7f4fc67b1dc085e41cd89193077a70d994cb8500
|
||||||
|
:git: https://github.com/rsocket/rsocket-cpp.git
|
||||||
|
Sonar:
|
||||||
|
:commit: 54fa6aa8f2777304d923a9e9425e53bd5a3eab43
|
||||||
|
:git: https://github.com/facebook/Sonar.git
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||||
|
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
||||||
|
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
|
||||||
|
DoubleConversion: 9bd61b1134a393694e95e0950c5bf3f99534817f
|
||||||
|
Folly: 65270e20aba2ebbb87febbf1f9052ccd28571ea4
|
||||||
|
glog: fdb5d40eb83acd6a4d5d61d95ecc583f5970a119
|
||||||
|
OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e
|
||||||
|
PeerTalk: aadc42bc7d7f19e89f817b59ef8196305a711504
|
||||||
|
RSocket: e9ee232080f995ba8f403ccf4cb61238a5646cb6
|
||||||
|
Sonar: 29d8fb9b010e56fa1358be996d68d4b436dd8c21
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: c3be9232e8e3190250398e3f9b310c5585d7d26b
|
||||||
|
|
||||||
|
COCOAPODS: 1.5.2
|
||||||
@@ -1,53 +1,62 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- boost-for-react-native (1.63.0)
|
- boost-for-react-native (1.63.0)
|
||||||
- CocoaAsyncSocket (7.6.3)
|
- CocoaAsyncSocket (7.6.3)
|
||||||
|
- CocoaLibEvent (1.0.0)
|
||||||
- ComponentKit (0.21):
|
- ComponentKit (0.21):
|
||||||
- Yoga
|
- Yoga
|
||||||
- DoubleConversion (3.0.0)
|
- DoubleConversion (3.0.0)
|
||||||
- EasyWSClient (1.0.0)
|
- Folly (1.0.0):
|
||||||
- Folly (2018.05.07.00):
|
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
|
- CocoaLibEvent (~> 1.0)
|
||||||
- DoubleConversion
|
- DoubleConversion
|
||||||
- glog
|
- glog
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- glog (0.3.5)
|
- glog (0.3.5)
|
||||||
- PeerTalk (0.0.2)
|
- OpenSSL-Static (1.0.2.c1)
|
||||||
- Sonar (1.0.0):
|
- PeerTalk (1.0.0)
|
||||||
- EasyWSClient
|
- RSocket (0.10.0):
|
||||||
- Folly
|
- Folly
|
||||||
- SonarKit (1.0.0):
|
- Sonar (0.0.1):
|
||||||
|
- Folly
|
||||||
|
- RSocket
|
||||||
|
- SonarKit (0.0.1):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SKIOSNetworkPlugin (= 1.0.0)
|
- SonarKit/SKIOSNetworkPlugin (= 0.0.1)
|
||||||
- SonarKit/SonarKitLayoutComponentKitSupport (= 1.0.0)
|
- SonarKit/SonarKitLayoutComponentKitSupport (= 0.0.1)
|
||||||
- SonarKit/SonarKitLayoutPlugin (= 1.0.0)
|
- SonarKit/SonarKitLayoutPlugin (= 0.0.1)
|
||||||
- SonarKit/SonarKitNetworkPlugin (= 1.0.0)
|
- SonarKit/SonarKitNetworkPlugin (= 0.0.1)
|
||||||
- SonarKit/SonarKitNetworkPlugin (= 1.0.0)
|
- SonarKit/SKIOSNetworkPlugin (0.0.1):
|
||||||
- SonarKit/SKIOSNetworkPlugin (1.0.0):
|
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SonarKitNetworkPlugin
|
- SonarKit/SonarKitNetworkPlugin
|
||||||
- SonarKit/SonarKitLayoutComponentKitSupport (1.0.0):
|
- SonarKit/SonarKitLayoutComponentKitSupport (0.0.1):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- ComponentKit
|
- ComponentKit
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- SonarKit/SonarKitLayoutPlugin
|
- SonarKit/SonarKitLayoutPlugin
|
||||||
- Yoga (= 1.8.1)
|
- Yoga (~> 1.8)
|
||||||
- SonarKit/SonarKitLayoutPlugin (1.0.0):
|
- SonarKit/SonarKitLayoutPlugin (0.0.1):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- Yoga (= 1.8.1)
|
- Yoga (~> 1.8)
|
||||||
- YogaKit (= 1.8.1)
|
- YogaKit (= 1.8.1)
|
||||||
- SonarKit/SonarKitNetworkPlugin (1.0.0):
|
- SonarKit/SonarKitNetworkPlugin (0.0.1):
|
||||||
- CocoaAsyncSocket (~> 7.6)
|
- CocoaAsyncSocket (~> 7.6)
|
||||||
- Folly
|
- Folly
|
||||||
|
- OpenSSL-Static (= 1.0.2.c1)
|
||||||
- PeerTalk
|
- PeerTalk
|
||||||
- Sonar
|
- Sonar
|
||||||
- Yoga (1.8.1)
|
- Yoga (1.8.1)
|
||||||
@@ -57,11 +66,11 @@ PODS:
|
|||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- ComponentKit (from `../third-party-podspecs/ComponentKit.podspec`)
|
- ComponentKit (from `../third-party-podspecs/ComponentKit.podspec`)
|
||||||
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
|
- DoubleConversion (from `../third-party-podspecs/DoubleConversion.podspec`)
|
||||||
- EasyWSClient (from `../third-party-podspecs/EasyWSClient.podspec`)
|
|
||||||
- Folly (from `../third-party-podspecs/Folly.podspec`)
|
- Folly (from `../third-party-podspecs/Folly.podspec`)
|
||||||
- glog (from `../third-party-podspecs/glog.podspec`)
|
- glog (from `../third-party-podspecs/glog.podspec`)
|
||||||
- PeerTalk (from `https://github.com/rsms/peertalk`)
|
- PeerTalk (from `../third-party-podspecs/PeerTalk.podspec`)
|
||||||
- Sonar (from `../../xplat/Sonar/SonarKitCPP.podspec`)
|
- RSocket (from `../third-party-podspecs/RSocket.podspec`)
|
||||||
|
- Sonar (from `../../xplat/Sonar/Sonar.podspec`)
|
||||||
- SonarKit (from `../SonarKit.podspec`)
|
- SonarKit (from `../SonarKit.podspec`)
|
||||||
- SonarKit/SKIOSNetworkPlugin (from `../SonarKit.podspec`)
|
- SonarKit/SKIOSNetworkPlugin (from `../SonarKit.podspec`)
|
||||||
- SonarKit/SonarKitLayoutComponentKitSupport (from `../SonarKit.podspec`)
|
- SonarKit/SonarKitLayoutComponentKitSupport (from `../SonarKit.podspec`)
|
||||||
@@ -71,6 +80,8 @@ SPEC REPOS:
|
|||||||
https://github.com/cocoapods/specs.git:
|
https://github.com/cocoapods/specs.git:
|
||||||
- boost-for-react-native
|
- boost-for-react-native
|
||||||
- CocoaAsyncSocket
|
- CocoaAsyncSocket
|
||||||
|
- CocoaLibEvent
|
||||||
|
- OpenSSL-Static
|
||||||
- Yoga
|
- Yoga
|
||||||
- YogaKit
|
- YogaKit
|
||||||
|
|
||||||
@@ -79,50 +90,55 @@ EXTERNAL SOURCES:
|
|||||||
:podspec: "../third-party-podspecs/ComponentKit.podspec"
|
:podspec: "../third-party-podspecs/ComponentKit.podspec"
|
||||||
DoubleConversion:
|
DoubleConversion:
|
||||||
:podspec: "../third-party-podspecs/DoubleConversion.podspec"
|
:podspec: "../third-party-podspecs/DoubleConversion.podspec"
|
||||||
EasyWSClient:
|
|
||||||
:podspec: "../third-party-podspecs/EasyWSClient.podspec"
|
|
||||||
Folly:
|
Folly:
|
||||||
:podspec: "../third-party-podspecs/Folly.podspec"
|
:podspec: "../third-party-podspecs/Folly.podspec"
|
||||||
glog:
|
glog:
|
||||||
:podspec: "../third-party-podspecs/glog.podspec"
|
:podspec: "../third-party-podspecs/glog.podspec"
|
||||||
PeerTalk:
|
PeerTalk:
|
||||||
:git: https://github.com/rsms/peertalk
|
:podspec: "../third-party-podspecs/PeerTalk.podspec"
|
||||||
|
RSocket:
|
||||||
|
:podspec: "../third-party-podspecs/RSocket.podspec"
|
||||||
Sonar:
|
Sonar:
|
||||||
:podspec: "../../xplat/Sonar/SonarKitCPP.podspec"
|
:podspec: "../../xplat/Sonar/Sonar.podspec"
|
||||||
SonarKit:
|
SonarKit:
|
||||||
:podspec: "../SonarKit.podspec"
|
:podspec: "../SonarKit.podspec"
|
||||||
|
|
||||||
CHECKOUT OPTIONS:
|
CHECKOUT OPTIONS:
|
||||||
ComponentKit:
|
ComponentKit:
|
||||||
:commit: f801317e71f88fbb5a398cd726fc0375255f43ba
|
:commit: 89c5e28e4ccc02927187a8aac6b7196f533cf86d
|
||||||
:git: https://github.com/facebook/ComponentKit.git
|
:git: https://github.com/facebook/ComponentKit.git
|
||||||
EasyWSClient:
|
Folly:
|
||||||
:commit: 9b87dc488048900a8cd684f51ddc98143682dbc3
|
:commit: 1ed5d00ca4f43d5c81f4d731119e71509179dc99
|
||||||
:git: https://github.com/dhbaird/easywsclient.git
|
:git: https://github.com/facebook/folly.git
|
||||||
PeerTalk:
|
PeerTalk:
|
||||||
:commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e
|
:commit: 588303b43efa5082d654b6f75d1b84a6ba4b5b9e
|
||||||
:git: https://github.com/rsms/peertalk
|
:git: https://github.com/rsms/PeerTalk.git
|
||||||
|
RSocket:
|
||||||
|
:commit: 7f4fc67b1dc085e41cd89193077a70d994cb8500
|
||||||
|
:git: https://github.com/rsocket/rsocket-cpp.git
|
||||||
Sonar:
|
Sonar:
|
||||||
:commit: 26c298ad3401157ac2b7336218c1dde63260dc0c
|
:commit: 54fa6aa8f2777304d923a9e9425e53bd5a3eab43
|
||||||
:git: https://github.com/facebook/Sonar.git
|
:git: https://github.com/facebook/Sonar.git
|
||||||
SonarKit:
|
SonarKit:
|
||||||
:commit: 26c298ad3401157ac2b7336218c1dde63260dc0c
|
:commit: 54fa6aa8f2777304d923a9e9425e53bd5a3eab43
|
||||||
:git: https://github.com/facebook/Sonar.git
|
:git: https://github.com/facebook/Sonar.git
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
|
||||||
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987
|
||||||
|
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
|
||||||
ComponentKit: 7bd0ad508946aeb68dd52ed8739ced9846ff3671
|
ComponentKit: 7bd0ad508946aeb68dd52ed8739ced9846ff3671
|
||||||
DoubleConversion: 310ccd7cdf00175c32883664f84fe026025604df
|
DoubleConversion: 9bd61b1134a393694e95e0950c5bf3f99534817f
|
||||||
EasyWSClient: 7ec8effe7d86f6061a47d19a55355769c9edfd2f
|
Folly: 65270e20aba2ebbb87febbf1f9052ccd28571ea4
|
||||||
Folly: 2d29ed217455246ae583ff1980f9ce882af31e80
|
glog: fdb5d40eb83acd6a4d5d61d95ecc583f5970a119
|
||||||
glog: f175af2df1f453be65bd355b287a07c842927a99
|
OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e
|
||||||
PeerTalk: f5389c286e4d477e59b73dfbf25c5c70a2464761
|
PeerTalk: aadc42bc7d7f19e89f817b59ef8196305a711504
|
||||||
Sonar: 815b6c6357c78564d9132f6389605b285a06f052
|
RSocket: e9ee232080f995ba8f403ccf4cb61238a5646cb6
|
||||||
SonarKit: 29b45073b54d7f5db13e53b7afe6fb6f36c6bea7
|
Sonar: 29d8fb9b010e56fa1358be996d68d4b436dd8c21
|
||||||
|
SonarKit: 5f67fab955cfebd1d47e711606eff97d18f6013c
|
||||||
Yoga: e6f1fed82138c17da5332e15e5770abf0e9cc386
|
Yoga: e6f1fed82138c17da5332e15e5770abf0e9cc386
|
||||||
YogaKit: bb90d11e297e06abef7e0cfb20e035a6bd00cdc4
|
YogaKit: bb90d11e297e06abef7e0cfb20e035a6bd00cdc4
|
||||||
|
|
||||||
PODFILE CHECKSUM: cab936292346d86ef8900c8f67d3c707dc421709
|
PODFILE CHECKSUM: 6d021549fc806a559ec83f4086fadb9d8dc59e00
|
||||||
|
|
||||||
COCOAPODS: 1.5.2
|
COCOAPODS: 1.5.2
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
namespace facebook {
|
namespace facebook {
|
||||||
namespace cxxutils {
|
namespace cxxutils {
|
||||||
|
|
||||||
folly::dynamic convertIdToFollyDynamic(id json);
|
folly::dynamic convertIdToFollyDynamic(id json, bool nullifyNanAndInf = false);
|
||||||
id convertFollyDynamicToId(const folly::dynamic &dyn);
|
id convertFollyDynamicToId(const folly::dynamic &dyn);
|
||||||
|
|
||||||
} }
|
} }
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ id convertFollyDynamicToId(const folly::dynamic &dyn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
folly::dynamic convertIdToFollyDynamic(id json)
|
folly::dynamic convertIdToFollyDynamic(id json, bool nullifyNanAndInf)
|
||||||
{
|
{
|
||||||
if (json == nil || json == (id)kCFNull) {
|
if (json == nil || json == (id)kCFNull) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -63,7 +63,11 @@ folly::dynamic convertIdToFollyDynamic(id json)
|
|||||||
if ([json isKindOfClass:[@YES class]]) {
|
if ([json isKindOfClass:[@YES class]]) {
|
||||||
return (bool) [json boolValue];
|
return (bool) [json boolValue];
|
||||||
} else {
|
} else {
|
||||||
return [json longLongValue];
|
const auto value = [json longLongValue];
|
||||||
|
if (nullifyNanAndInf && (isnan(value) || isinf(value))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
case _C_UCHR:
|
case _C_UCHR:
|
||||||
case _C_SHT:
|
case _C_SHT:
|
||||||
@@ -73,12 +77,22 @@ folly::dynamic convertIdToFollyDynamic(id json)
|
|||||||
case _C_LNG:
|
case _C_LNG:
|
||||||
case _C_ULNG:
|
case _C_ULNG:
|
||||||
case _C_LNG_LNG:
|
case _C_LNG_LNG:
|
||||||
case _C_ULNG_LNG:
|
case _C_ULNG_LNG: {
|
||||||
return [json longLongValue];
|
const auto value = [json longLongValue];
|
||||||
|
if (nullifyNanAndInf && (isnan(value) || isinf(value))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
case _C_FLT:
|
case _C_FLT:
|
||||||
case _C_DBL:
|
case _C_DBL: {
|
||||||
return [json doubleValue];
|
const auto value = [json doubleValue];
|
||||||
|
if (nullifyNanAndInf && (isnan(value) || isinf(value))) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
// default:
|
// default:
|
||||||
// fall through
|
// fall through
|
||||||
@@ -90,15 +104,15 @@ folly::dynamic convertIdToFollyDynamic(id json)
|
|||||||
} else if ([json isKindOfClass:[NSArray class]]) {
|
} else if ([json isKindOfClass:[NSArray class]]) {
|
||||||
folly::dynamic array = folly::dynamic::array;
|
folly::dynamic array = folly::dynamic::array;
|
||||||
for (id element in json) {
|
for (id element in json) {
|
||||||
array.push_back(convertIdToFollyDynamic(element));
|
array.push_back(convertIdToFollyDynamic(element, nullifyNanAndInf));
|
||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
} else if ([json isKindOfClass:[NSDictionary class]]) {
|
} else if ([json isKindOfClass:[NSDictionary class]]) {
|
||||||
__block folly::dynamic object = folly::dynamic::object();
|
__block folly::dynamic object = folly::dynamic::object();
|
||||||
|
|
||||||
[json enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, __unused BOOL *stop) {
|
[json enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, __unused BOOL *stop) {
|
||||||
object.insert(convertIdToFollyDynamic(key),
|
object.insert(convertIdToFollyDynamic(key, nullifyNanAndInf),
|
||||||
convertIdToFollyDynamic(value));
|
convertIdToFollyDynamic(value, nullifyNanAndInf));
|
||||||
}];
|
}];
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import {Server, Client} from './server.js';
|
|||||||
import * as reducers from './reducers.js';
|
import * as reducers from './reducers.js';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import BugReporter from './fb-stubs/BugReporter.js';
|
import BugReporter from './fb-stubs/BugReporter.js';
|
||||||
import ErrorReporter from './fb-stubs/ErrorReporter.js';
|
|
||||||
import BugReporterDialog from './chrome/BugReporterDialog.js';
|
import BugReporterDialog from './chrome/BugReporterDialog.js';
|
||||||
import ErrorBar from './chrome/ErrorBar.js';
|
import ErrorBar from './chrome/ErrorBar.js';
|
||||||
import Logger from './fb-stubs/Logger.js';
|
import Logger from './fb-stubs/Logger.js';
|
||||||
@@ -75,14 +74,12 @@ export class App extends React.Component<Props, State> {
|
|||||||
server: this.initServer(),
|
server: this.initServer(),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.errorReporter = new ErrorReporter(this.logger.scribeLogger);
|
|
||||||
this.bugReporter = new BugReporter(this.logger);
|
this.bugReporter = new BugReporter(this.logger);
|
||||||
this.commandLineArgs = yargs.parse(electron.remote.process.argv);
|
this.commandLineArgs = yargs.parse(electron.remote.process.argv);
|
||||||
|
|
||||||
setupMenu(this.sendKeyboardAction);
|
setupMenu(this.sendKeyboardAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
errorReporter: ErrorReporter;
|
|
||||||
bugReporter: BugReporter;
|
bugReporter: BugReporter;
|
||||||
logger: Logger;
|
logger: Logger;
|
||||||
commandLineArgs: Object;
|
commandLineArgs: Object;
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This class exists to allow error reporting to your own service.
|
||||||
|
* The recommended way to use this, is to instantiate it inside LogManager,
|
||||||
|
* so that all logged errors get reported to this class.
|
||||||
|
*/
|
||||||
export function cleanStack(stack: string, loc: ?string) {}
|
export function cleanStack(stack: string, loc: ?string) {}
|
||||||
import type ScribeLogger from './ScribeLogger';
|
import type ScribeLogger from './ScribeLogger';
|
||||||
|
|
||||||
|
|||||||
@@ -171,11 +171,12 @@ export class Client extends EventEmitter {
|
|||||||
if (id == null) {
|
if (id == null) {
|
||||||
const {error} = data;
|
const {error} = data;
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
this.app.logger.error(error.stacktrace || error.message, 'deviceError');
|
this.app.logger.error(
|
||||||
this.app.errorReporter.report({
|
`Error received from device ${
|
||||||
message: error.message,
|
method ? `when calling ${method}` : ''
|
||||||
stack: error.stacktrace,
|
}: ${error.message} + \nDevice Stack Trace: ${error.stacktrace}`,
|
||||||
});
|
'deviceError',
|
||||||
|
);
|
||||||
} else if (method === 'refreshPlugins') {
|
} else if (method === 'refreshPlugins') {
|
||||||
this.refreshPlugins();
|
this.refreshPlugins();
|
||||||
} else if (method === 'execute') {
|
} else if (method === 'execute') {
|
||||||
|
|||||||
Reference in New Issue
Block a user