New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rn-blockmonitor

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-blockmonitor

block monitor

latest
npmnpm
Version
0.0.44
Version published
Maintainers
2
Created
Source

rn昆虫上报使用步骤:

1。package.json dependencies配置"rn-blockmonitor": "^0.0.34"

2。项目入口文件index.js导入require('rn-blockmonitor').StartMonitor(config);

require('rn-blockmonitor').StartMonitor({

  /*
    require↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     */
  /*
    线上-上报数据开关
    true:打开,上线后开启
    false:关闭(default)
     */
  onlineUploadStackSwitchOn: false,
  /*
  上报url
  可自定义
   */
  uploadStackUrl: 'http://...',
  /*
 调用栈上限
 200(default)
 可自定义
   */
  recordLength: 200,

  /*
    线下-上报数据开关
    true:打开
    false:关闭(default)
     */
  offlineUploadStackSwitchOn: false,
  /*
  监控开关
  true:关闭
  false:打开(default)
   */
  stopWatchdog: false,
  /*
   remote debugging模式,配置该字段,控制台会额外打印超过该阀值的调用栈
    */
  showLocalConsoleLogByTimeInterval: 30
});

AppRegistry.registerComponent('Wuba', () => HomeView);

3。配置babel.config.js plugins

module.exports = {
   presets: ['module:metro-react-native-babel-preset'],
   plugins: [
                ['rn-blockmonitor/lib/BMStackRecorder', {
               
                /*
                  require online
                   */
                /*
                 项目源码所在根目录,node_modules平级
                 '/App'(default)
                 不能为空,填写实际目录即可
                  */
                root: '/App',
      
      
                /*
                option debug
                 */
                /*
                打印工程指定文件插桩后代码
                默认空串
                 */
                showLocalTerminalCodeByFileName: '',
                /*
                打印工程所有文件插桩后代码
                默认false
                 */
                showLocalTerminalCodeByAllFile: false
              }
              ]
           ]
 };

Keywords

rn

FAQs

Package last updated on 15 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts