New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tuhu/mp-monitor

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tuhu/mp-monitor - npm Package Compare versions

Comparing version 0.1.6-alpha.0 to 0.1.6

3

lib/config.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var platform_1 = require("./platform");
var info = platform_1.api.getSystemInfoSync();
var info = wx.getSystemInfoSync();
exports.defaultConfig = {

@@ -6,0 +5,0 @@ appId: "",

@@ -7,3 +7,2 @@ "use strict";

var config_1 = require("./config");
var platform_1 = require("./platform");
var logger_1 = require("./logger");

@@ -16,5 +15,5 @@ /**

function initMonitorError(report) {
if (typeof platform_1.api.onError !== "undefined") {
if (typeof wx.onError !== "undefined") {
logger_1.info("monitor: use wx.onError");
platform_1.api.onError(function (err) {
wx.onError(function (err) {
try {

@@ -21,0 +20,0 @@ var data = processError(err);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var platform_1 = require("./platform");
var logger_1 = require("./logger");

@@ -10,5 +9,5 @@ /**

function initMonitorMemory(report) {
if (typeof platform_1.api.onMemoryWarning !== "undefined") {
if (typeof wx.onMemoryWarning !== "undefined") {
logger_1.info("monitor: use wx.onMemoryWarning");
platform_1.api.onMemoryWarning(function (res) {
wx.onMemoryWarning(function (res) {
report(res.level || "unknow");

@@ -15,0 +14,0 @@ });

@@ -6,3 +6,2 @@ "use strict";

var config_1 = require("./config");
var platform_1 = require("./platform");
var logger_1 = require("./logger");

@@ -19,4 +18,4 @@ /**

logger_1.info("monitor: use wx.request");
var oldRequest_1 = platform_1.api.request;
Object.defineProperty(platform_1.api, "request", {
var oldRequest_1 = wx.request;
Object.defineProperty(wx, "request", {
configurable: true,

@@ -51,7 +50,7 @@ get: function () {

// @ts-ignore
var oldHttpRequest_1 = platform_1.api.httpRequest;
var oldHttpRequest_1 = wx.httpRequest;
// for aliap
if (oldHttpRequest_1) {
logger_1.info("monitor: use my.httpRequest");
Object.defineProperty(platform_1.api, "httpRequest", {
Object.defineProperty(wx, "httpRequest", {
configurable: true,

@@ -58,0 +57,0 @@ get: function () {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var platform_1 = require("./platform");
function hook(opts, name, func) {

@@ -103,3 +102,3 @@ var old = opts[name];

}
var path = platform_1.api.getLaunchOptionsSync().path;
var path = wx.getLaunchOptionsSync().path;
return path;

@@ -106,0 +105,0 @@ }

{
"name": "@tuhu/mp-monitor",
"version": "0.1.6-alpha.0",
"version": "0.1.6",
"main": "lib/index.js",

@@ -26,3 +26,3 @@ "types": "lib/index.d.ts",

},
"gitHead": "c72dbf50fa59597416510ff2065ef41bd9669b2b"
"gitHead": "5d2440777a505ac0d6a201ed407c456916681af6"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc