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

veplayer-mp-wechat

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

veplayer-mp-wechat - npm Package Compare versions

Comparing version 0.1.17 to 1.0.0

25

dist/behaviors/collectorBehavior.js

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

const index_1 = require("../tool/index");
const error_1 = require("../utils/error");
const index_2 = require("../enums/index");
exports.default = Behavior({

@@ -16,5 +18,17 @@ properties: {

}
},
// 屏蔽日志配置验证,默认false,true的时候可以不配置日志
disableLogVerify: {
type: Boolean,
value: false
}
},
data: {},
lifetimes: {
ready() {
this.initCollector();
this.updateCollector(this.data);
this.verifyCollector();
}
},
methods: {

@@ -46,4 +60,15 @@ initCollector() {

}
},
// 默认要求配置Collector,不然会报错提醒开发者,这个有利于提高接入日志率
verifyCollector() {
if (!this.properties.disableLogVerify && !this.collector) {
const message = 'Collector for log not configured';
const error = new error_1.XGError(error_1.ErrorCategory.Collector, index_2.ErrorCodes.Collector_NOT_CONFIGURED, message);
error.severity = error_1.ErrorSeverity.INTERRUPTED;
this.setData({
error: error
});
}
}
}
});

4

dist/enums/errorCode.js

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

ErrorCodes[ErrorCodes["Component_LIFETIME_ERROR"] = 1] = "Component_LIFETIME_ERROR";
/**
* 日志未配置
*/
ErrorCodes[ErrorCodes["Collector_NOT_CONFIGURED"] = 9] = "Collector_NOT_CONFIGURED";
////////////////////////////////////////////////////////////////////////

@@ -10,0 +14,0 @@ //////////////////////// 1000 -> 1999 = MEDIA //////////////////////////

2

dist/index.js

@@ -206,4 +206,2 @@ "use strict";

!!controls && this.focusPlayer();
this.initCollector();
this.updateCollector(this.data);
},

@@ -210,0 +208,0 @@ /**

@@ -20,2 +20,4 @@ "use strict";

ErrorCategory[ErrorCategory["SERVICE"] = 2] = "SERVICE";
/** Log Colector not configured. */
ErrorCategory[ErrorCategory["Collector"] = 3] = "Collector";
})(ErrorCategory = exports.ErrorCategory || (exports.ErrorCategory = {}));

@@ -22,0 +24,0 @@ /**

{
"name": "veplayer-mp-wechat",
"version": "0.1.17",
"version": "1.0.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "miniprogram": "dist",

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