@bugsnag/plugin-react-native-client-sync
Advanced tools
Comparing version 7.15.1 to 7.16.0
@@ -45,2 +45,30 @@ const { DeviceEventEmitter, NativeEventEmitter, NativeModules, Platform } = require('react-native') | ||
const origAddFeatureFlags = client.addFeatureFlags | ||
client.addFeatureFlags = function (featureFlags) { | ||
const ret = origAddFeatureFlags.apply(this, arguments) | ||
NativeClient.addFeatureFlags(featureFlags) | ||
return ret | ||
} | ||
const origAddFeatureFlag = client.addFeatureFlag | ||
client.addFeatureFlag = function (name, variant) { | ||
const ret = origAddFeatureFlag.apply(this, arguments) | ||
NativeClient.addFeatureFlag(name, variant) | ||
return ret | ||
} | ||
const origClearFeatureFlag = client.clearFeatureFlag | ||
client.clearFeatureFlag = function (name) { | ||
const ret = origClearFeatureFlag.apply(this, arguments) | ||
NativeClient.clearFeatureFlag(name) | ||
return ret | ||
} | ||
const origClearFeatureFlags = client.clearFeatureFlags | ||
client.clearFeatureFlags = function () { | ||
const ret = origClearFeatureFlags.apply(this, arguments) | ||
NativeClient.clearFeatureFlags() | ||
return ret | ||
} | ||
const getEmitter = () => { | ||
@@ -74,2 +102,12 @@ switch (Platform.OS) { | ||
break | ||
case 'AddFeatureFlag': | ||
origAddFeatureFlag.call(client, event.data.name, event.data.variant) | ||
break | ||
case 'ClearFeatureFlag': | ||
if (event.data && event.data.name) { | ||
origClearFeatureFlag.call(client, event.data.name) | ||
} else { | ||
origClearFeatureFlags.call(client) | ||
} | ||
break | ||
default: | ||
@@ -76,0 +114,0 @@ } |
{ | ||
"name": "@bugsnag/plugin-react-native-client-sync", | ||
"version": "7.15.1", | ||
"version": "7.16.0", | ||
"main": "client-sync.js", | ||
@@ -20,3 +20,3 @@ "description": "@bugsnag/react-native plugin to sync information between JS and native layer", | ||
"devDependencies": { | ||
"@bugsnag/core": "^7.15.1" | ||
"@bugsnag/core": "^7.16.0" | ||
}, | ||
@@ -26,3 +26,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "bc9e184988aad3d793b6f0abe2e7be9e69c821bd" | ||
"gitHead": "15164a6fd606169f481f8105f5f7f2e8c1d57714" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5871
103