yach.open.jssdk 4.3.0-beta2 → 4.3.1-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/yach_jssdk_4.1.32-bata.1.js +1 -0
- package/es/api/app/custom/talYoungFilesUpload.js +2 -0
- package/es/api/biz/chat/chooseConversationByCorpId.js +2 -0
- package/es/api/biz/chat/openSingleChat.js +2 -0
- package/es/api/biz/chat/openSquad.js +2 -0
- package/es/api/biz/chat/openTeamChat.js +2 -0
- package/es/api/biz/chat/pickConversation.js +2 -0
- package/es/api/biz/chat/sendP2PMsg.js +2 -0
- package/es/api/biz/contact/complexPicker.js +2 -0
- package/es/api/biz/contact/departmentsPicker.js +2 -0
- package/es/api/biz/group/groupComplexPicker.js +2 -0
- package/es/api/biz/map/multipointView.js +2 -0
- package/es/api/biz/map/view.js +2 -0
- package/es/api/biz/navigation/close.js +2 -0
- package/es/api/biz/navigation/goBack.js +2 -0
- package/es/api/biz/navigation/quit.js +2 -0
- package/es/api/biz/navigation/replace.js +2 -0
- package/es/api/biz/navigation/setIcon.js +2 -0
- package/es/api/biz/navigation/setLeft.js +2 -0
- package/es/api/biz/navigation/setMenu.js +2 -0
- package/es/api/biz/navigation/setRight.js +2 -0
- package/es/api/biz/navigation/setTitle.js +2 -0
- package/es/api/biz/navigation/setTitleExpandIcon.js +2 -0
- package/es/api/biz/navigation/setWindowBig.js +2 -0
- package/es/api/biz/navigation/tencentMeeting.js +2 -0
- package/es/api/biz/navigation/tencentMeetingBegin.js +2 -0
- package/es/api/biz/navigation/updateExpandTitle.js +2 -0
- package/es/api/biz/telephone/call.js +2 -0
- package/es/api/biz/telephone/showCallMenu.js +2 -0
- package/es/api/biz/util/authFinish.js +2 -0
- package/es/api/biz/util/authStart.js +2 -0
- package/es/api/biz/util/chosen.js +2 -0
- package/es/api/biz/util/clipboardFileUpload.js +2 -0
- package/es/api/biz/util/closeWindow.js +2 -0
- package/es/api/biz/util/complain.js +2 -0
- package/es/api/biz/util/createModifySchedule.js +2 -0
- package/es/api/biz/util/datepicker.js +2 -0
- package/es/api/biz/util/datetimepicker.js +2 -0
- package/es/api/biz/util/downloadFile.js +2 -0
- package/es/api/biz/util/entergroupCheck.js +3 -1
- package/es/api/biz/util/externalLinkPreviewFile.js +2 -0
- package/es/api/biz/util/feedback.js +2 -0
- package/es/api/biz/util/getSingleWebviewData.js +2 -0
- package/es/api/biz/util/getTogetherConfig.js +2 -0
- package/es/api/biz/util/getToken.js +2 -0
- package/es/api/biz/util/injectScript.js +2 -0
- package/es/api/biz/util/invoice.js +2 -0
- package/es/api/biz/util/mediaFileUpload.js +2 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.js +2 -0
- package/es/api/biz/util/open.js +2 -0
- package/es/api/biz/util/openLink.js +2 -0
- package/es/api/biz/util/openMediaFileDialog.js +2 -0
- package/es/api/biz/util/openSingleWebview.js +2 -0
- package/es/api/biz/util/openSlidePanel.js +2 -0
- package/es/api/biz/util/openTalYoungToTopic.js +2 -0
- package/es/api/biz/util/openTogetherEyeWebview.js +2 -0
- package/es/api/biz/util/openUserSchedule.js +2 -0
- package/es/api/biz/util/openVideoPlayer.js +2 -0
- package/es/api/biz/util/previewFile.js +2 -0
- package/es/api/biz/util/previewImage.js +2 -0
- package/es/api/biz/util/proxy.js +2 -0
- package/es/api/biz/util/pushWorkMsg.js +2 -0
- package/es/api/biz/util/remind.js +2 -0
- package/es/api/biz/util/rouseApp.js +2 -0
- package/es/api/biz/util/savePic.js +2 -0
- package/es/api/biz/util/scan.js +2 -0
- package/es/api/biz/util/selectDepartment.js +2 -0
- package/es/api/biz/util/share.js +2 -0
- package/es/api/biz/util/takePicture.js +2 -0
- package/es/api/biz/util/uploadAttachment.js +2 -0
- package/es/api/biz/util/zfbAuth.js +2 -0
- package/es/api/biz/webViewMessage/send.js +2 -0
- package/es/api/device/audio/download.js +2 -0
- package/es/api/device/audio/onPlayEnd.js +2 -0
- package/es/api/device/audio/onRecordEnd.js +2 -0
- package/es/api/device/audio/onRecordEnd_v2.js +2 -0
- package/es/api/device/audio/pause.js +2 -0
- package/es/api/device/audio/play.js +2 -0
- package/es/api/device/audio/resume.js +2 -0
- package/es/api/device/audio/startRecord.js +2 -0
- package/es/api/device/audio/startRecord_v2.js +2 -0
- package/es/api/device/audio/stop.js +2 -0
- package/es/api/device/audio/stopRecord.js +2 -0
- package/es/api/device/audio/stopRecord_v2.js +2 -0
- package/es/api/device/base/checkStepPermission.js +2 -0
- package/es/api/device/base/getPhoneInfo.js +2 -0
- package/es/api/device/base/getUUID.js +3 -5
- package/es/api/device/connection/getNetworkType.js +2 -0
- package/es/api/device/connection/isAtTal.js +4 -2
- package/es/api/device/geolocation/get.js +2 -0
- package/es/api/device/geolocation/getSwitch.js +2 -0
- package/es/api/device/notification/actionSheet.js +2 -0
- package/es/api/device/notification/alert.js +2 -0
- package/es/api/device/notification/confirm.js +2 -0
- package/es/api/device/notification/hidePreloader.js +2 -0
- package/es/api/device/notification/showPreloader.js +2 -0
- package/es/api/device/notification/toast.js +2 -0
- package/es/api/device/notification/vibrate.js +2 -0
- package/es/api/device/system/getLang.js +2 -0
- package/es/api/device/system/setLight.js +2 -0
- package/es/api/initAPI.js +5 -3
- package/es/api/primary/createTab.js +2 -0
- package/es/api/primary/exitFullScreen.js +2 -0
- package/es/api/primary/fullScreen.js +2 -0
- package/es/api/primary/weeklyShare.js +2 -0
- package/es/api/runtime/permission/requestAuthCode.js +2 -0
- package/es/api/ui/pullToRefresh/disable.js +2 -0
- package/es/api/ui/pullToRefresh/enable.js +2 -0
- package/es/api/ui/pullToRefresh/stop.js +2 -0
- package/es/api/ui/webViewBounce/disable.js +2 -0
- package/es/api/util/domainStorage/getItem.js +2 -0
- package/es/api/util/domainStorage/removeItem.js +2 -0
- package/es/api/util/domainStorage/setItem.js +2 -0
- package/es/api/util/tool/flushLog.js +2 -0
- package/es/api/util/tool/log.js +2 -0
- package/es/index.d.ts +1 -7
- package/es/index.js +27 -22
- package/es/lib/bridge/mobile.js +19 -4
- package/es/lib/bridge/pc.js +11 -2
- package/es/lib/helper/apiHelper.js +2 -0
- package/es/lib/helper/codeMap.js +2 -0
- package/es/lib/helper/event.js +13 -0
- package/es/lib/helper/pcIframe.js +43 -12
- package/es/lib/index.js +21 -7
- package/es/lib/sdk/index.js +37 -18
- package/es/lib/sdk/sdk.typings.js +1 -0
- package/es/utils/bpitLog.js +13 -4
- package/es/utils/compareVersions.js +50 -23
- package/es/utils/console.js +15 -0
- package/es/utils/env.js +18 -11
- package/es/utils/index.js +5 -0
- package/libs/api/app/custom/talYoungFilesUpload.js +6 -1
- package/libs/api/biz/chat/chooseConversationByCorpId.js +6 -0
- package/libs/api/biz/chat/openSingleChat.js +6 -0
- package/libs/api/biz/chat/openSquad.js +6 -0
- package/libs/api/biz/chat/openTeamChat.js +6 -0
- package/libs/api/biz/chat/pickConversation.js +6 -0
- package/libs/api/biz/chat/sendP2PMsg.js +6 -0
- package/libs/api/biz/contact/complexPicker.js +6 -0
- package/libs/api/biz/contact/departmentsPicker.js +6 -0
- package/libs/api/biz/group/groupComplexPicker.js +6 -0
- package/libs/api/biz/map/multipointView.js +6 -0
- package/libs/api/biz/map/view.js +6 -0
- package/libs/api/biz/navigation/close.js +6 -0
- package/libs/api/biz/navigation/goBack.js +6 -0
- package/libs/api/biz/navigation/quit.js +6 -0
- package/libs/api/biz/navigation/replace.js +6 -0
- package/libs/api/biz/navigation/setIcon.js +7 -0
- package/libs/api/biz/navigation/setLeft.js +7 -0
- package/libs/api/biz/navigation/setMenu.js +7 -0
- package/libs/api/biz/navigation/setRight.js +7 -0
- package/libs/api/biz/navigation/setTitle.js +6 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.js +7 -0
- package/libs/api/biz/navigation/setWindowBig.js +6 -1
- package/libs/api/biz/navigation/tencentMeeting.js +6 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.js +6 -0
- package/libs/api/biz/navigation/updateExpandTitle.js +6 -0
- package/libs/api/biz/telephone/call.js +6 -0
- package/libs/api/biz/telephone/showCallMenu.js +6 -0
- package/libs/api/biz/util/authFinish.js +6 -0
- package/libs/api/biz/util/authStart.js +6 -0
- package/libs/api/biz/util/chosen.js +6 -0
- package/libs/api/biz/util/clipboardFileUpload.js +6 -0
- package/libs/api/biz/util/closeWindow.js +6 -0
- package/libs/api/biz/util/complain.js +6 -0
- package/libs/api/biz/util/createModifySchedule.js +6 -0
- package/libs/api/biz/util/datepicker.js +6 -0
- package/libs/api/biz/util/datetimepicker.js +6 -0
- package/libs/api/biz/util/downloadFile.js +6 -0
- package/libs/api/biz/util/entergroupCheck.js +7 -1
- package/libs/api/biz/util/externalLinkPreviewFile.js +6 -0
- package/libs/api/biz/util/feedback.js +6 -0
- package/libs/api/biz/util/getSingleWebviewData.js +6 -0
- package/libs/api/biz/util/getTogetherConfig.js +6 -0
- package/libs/api/biz/util/getToken.js +6 -0
- package/libs/api/biz/util/injectScript.js +6 -0
- package/libs/api/biz/util/invoice.js +6 -1
- package/libs/api/biz/util/mediaFileUpload.js +6 -1
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +6 -0
- package/libs/api/biz/util/open.js +6 -0
- package/libs/api/biz/util/openLink.js +6 -0
- package/libs/api/biz/util/openMediaFileDialog.js +6 -1
- package/libs/api/biz/util/openSingleWebview.js +6 -0
- package/libs/api/biz/util/openSlidePanel.js +6 -0
- package/libs/api/biz/util/openTalYoungToTopic.js +6 -1
- package/libs/api/biz/util/openTogetherEyeWebview.js +6 -0
- package/libs/api/biz/util/openUserSchedule.js +6 -0
- package/libs/api/biz/util/openVideoPlayer.js +6 -0
- package/libs/api/biz/util/previewFile.js +6 -0
- package/libs/api/biz/util/previewImage.js +6 -0
- package/libs/api/biz/util/proxy.js +6 -0
- package/libs/api/biz/util/pushWorkMsg.js +6 -1
- package/libs/api/biz/util/remind.js +6 -0
- package/libs/api/biz/util/rouseApp.js +6 -1
- package/libs/api/biz/util/savePic.js +6 -0
- package/libs/api/biz/util/scan.js +6 -0
- package/libs/api/biz/util/selectDepartment.js +6 -0
- package/libs/api/biz/util/share.js +6 -0
- package/libs/api/biz/util/takePicture.js +6 -0
- package/libs/api/biz/util/uploadAttachment.js +6 -0
- package/libs/api/biz/util/zfbAuth.js +6 -0
- package/libs/api/biz/webViewMessage/send.js +6 -0
- package/libs/api/device/audio/download.js +6 -0
- package/libs/api/device/audio/onPlayEnd.js +6 -0
- package/libs/api/device/audio/onRecordEnd.js +6 -0
- package/libs/api/device/audio/onRecordEnd_v2.js +6 -0
- package/libs/api/device/audio/pause.js +6 -0
- package/libs/api/device/audio/play.js +6 -0
- package/libs/api/device/audio/resume.js +6 -0
- package/libs/api/device/audio/startRecord.js +6 -0
- package/libs/api/device/audio/startRecord_v2.js +6 -0
- package/libs/api/device/audio/stop.js +6 -0
- package/libs/api/device/audio/stopRecord.js +6 -0
- package/libs/api/device/audio/stopRecord_v2.js +6 -0
- package/libs/api/device/base/checkStepPermission.js +6 -0
- package/libs/api/device/base/getPhoneInfo.js +6 -0
- package/libs/api/device/base/getUUID.js +7 -5
- package/libs/api/device/connection/getNetworkType.js +6 -0
- package/libs/api/device/connection/isAtTal.js +8 -2
- package/libs/api/device/geolocation/get.js +6 -0
- package/libs/api/device/geolocation/getSwitch.js +6 -0
- package/libs/api/device/notification/actionSheet.js +6 -0
- package/libs/api/device/notification/alert.js +6 -0
- package/libs/api/device/notification/confirm.js +6 -0
- package/libs/api/device/notification/hidePreloader.js +6 -0
- package/libs/api/device/notification/showPreloader.js +6 -0
- package/libs/api/device/notification/toast.js +6 -0
- package/libs/api/device/notification/vibrate.js +6 -0
- package/libs/api/device/system/getLang.js +6 -0
- package/libs/api/device/system/setLight.js +6 -0
- package/libs/api/initAPI.js +13 -4
- package/libs/api/primary/createTab.js +6 -0
- package/libs/api/primary/exitFullScreen.js +6 -0
- package/libs/api/primary/fullScreen.js +6 -0
- package/libs/api/primary/weeklyShare.js +6 -0
- package/libs/api/runtime/permission/requestAuthCode.js +6 -0
- package/libs/api/ui/pullToRefresh/disable.js +6 -0
- package/libs/api/ui/pullToRefresh/enable.js +6 -0
- package/libs/api/ui/pullToRefresh/stop.js +6 -0
- package/libs/api/ui/webViewBounce/disable.js +6 -0
- package/libs/api/util/domainStorage/getItem.js +6 -0
- package/libs/api/util/domainStorage/removeItem.js +6 -0
- package/libs/api/util/domainStorage/setItem.js +6 -0
- package/libs/api/util/tool/flushLog.js +6 -0
- package/libs/api/util/tool/log.js +6 -0
- package/libs/index.d.ts +1 -7
- package/libs/index.js +271 -37
- package/libs/lib/bridge/index.js +7 -0
- package/libs/lib/bridge/mobile.js +39 -7
- package/libs/lib/bridge/pc.js +25 -5
- package/libs/lib/helper/apiHelper.js +6 -0
- package/libs/lib/helper/codeMap.js +6 -0
- package/libs/lib/helper/event.js +22 -1
- package/libs/lib/helper/pcIframe.js +49 -11
- package/libs/lib/index.js +32 -8
- package/libs/lib/sdk/index.js +47 -19
- package/libs/lib/sdk/sdk.typings.js +4 -0
- package/libs/utils/bpitLog.js +16 -4
- package/libs/utils/compareVersions.js +72 -27
- package/libs/utils/console.js +16 -0
- package/libs/utils/env.js +20 -11
- package/libs/utils/index.js +13 -0
- package/package.json +1 -1
- package/dist/yach_jssdk_4.3.0-beta2.js +0 -1
- package/es/api/biz/util/assistantCreate.d.ts +0 -11
- package/es/api/biz/util/assistantCreate.js +0 -23
- package/es/api/biz/util/disableScreenCapture.d.ts +0 -8
- package/es/api/biz/util/disableScreenCapture.js +0 -19
- package/es/api/biz/util/yachEvent.d.ts +0 -12
- package/es/api/biz/util/yachEvent.js +0 -27
- package/libs/api/biz/util/assistantCreate.d.ts +0 -11
- package/libs/api/biz/util/assistantCreate.js +0 -30
- package/libs/api/biz/util/disableScreenCapture.d.ts +0 -8
- package/libs/api/biz/util/disableScreenCapture.js +0 -26
- package/libs/api/biz/util/yachEvent.d.ts +0 -12
- package/libs/api/biz/util/yachEvent.js +0 -34
package/libs/lib/sdk/index.js
CHANGED
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
5
7
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
10
|
+
|
|
8
11
|
exports["default"] = void 0;
|
|
12
|
+
|
|
9
13
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/promise"));
|
|
14
|
+
|
|
10
15
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/concat"));
|
|
16
|
+
|
|
11
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
18
|
+
|
|
12
19
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
20
|
+
|
|
13
21
|
var _utils = require("../../utils");
|
|
22
|
+
|
|
14
23
|
var _compareVersions = require("../../utils/compareVersions");
|
|
24
|
+
|
|
15
25
|
var _package = _interopRequireDefault(require("../../../package.json"));
|
|
26
|
+
|
|
16
27
|
var Sdk = /*#__PURE__*/function () {
|
|
17
28
|
function Sdk(env) {
|
|
18
29
|
var _this = this;
|
|
30
|
+
|
|
19
31
|
(0, _classCallCheck2["default"])(this, Sdk);
|
|
20
32
|
this.invokeAPIConfigMapByMethod = {};
|
|
21
33
|
this.configJsApiList = [];
|
|
@@ -37,9 +49,11 @@ var Sdk = /*#__PURE__*/function () {
|
|
|
37
49
|
platformV2: env.platformV2,
|
|
38
50
|
config: function config() {
|
|
39
51
|
var _config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
52
|
+
|
|
40
53
|
// 鉴权
|
|
41
54
|
var _config$jsApiList = _config.jsApiList,
|
|
42
|
-
|
|
55
|
+
jsApiList = _config$jsApiList === void 0 ? [] : _config$jsApiList;
|
|
56
|
+
|
|
43
57
|
if (_this.hadConfig) {
|
|
44
58
|
console.log('Config has been executed');
|
|
45
59
|
} else {
|
|
@@ -47,6 +61,7 @@ var Sdk = /*#__PURE__*/function () {
|
|
|
47
61
|
fn('config', _config).then(function (value) {
|
|
48
62
|
// 鉴权成功
|
|
49
63
|
_this.cacheP.resolve(value);
|
|
64
|
+
|
|
50
65
|
_this.hadConfig = true;
|
|
51
66
|
_this.configJsApiList = jsApiList;
|
|
52
67
|
})["catch"](function (error) {
|
|
@@ -78,19 +93,19 @@ var Sdk = /*#__PURE__*/function () {
|
|
|
78
93
|
}
|
|
79
94
|
};
|
|
80
95
|
}
|
|
96
|
+
|
|
81
97
|
(0, _createClass2["default"])(Sdk, [{
|
|
82
98
|
key: "setAPI",
|
|
83
99
|
value: function setAPI(method, config) {
|
|
84
100
|
this.invokeAPIConfigMapByMethod[method] = config;
|
|
85
|
-
}
|
|
86
|
-
|
|
101
|
+
} // 确定端的同事初始化bridge
|
|
102
|
+
|
|
87
103
|
}, {
|
|
88
104
|
key: "setPlatform",
|
|
89
105
|
value: function setPlatform(value) {
|
|
90
106
|
var platform = value.platform,
|
|
91
|
-
|
|
92
|
-
this.platformConfigMap[platform] = value;
|
|
93
|
-
// if (this.env.platform === platform) bridgeInit();
|
|
107
|
+
bridgeInit = value.bridgeInit;
|
|
108
|
+
this.platformConfigMap[platform] = value; // if (this.env.platform === platform) bridgeInit();
|
|
94
109
|
}
|
|
95
110
|
}, {
|
|
96
111
|
key: "bridgeInitFn",
|
|
@@ -99,13 +114,16 @@ var Sdk = /*#__PURE__*/function () {
|
|
|
99
114
|
if (this.bridgeInitFnPromise) {
|
|
100
115
|
return this.bridgeInitFnPromise;
|
|
101
116
|
}
|
|
117
|
+
|
|
102
118
|
var o = this.platformConfigMap[this.env.platform];
|
|
119
|
+
|
|
103
120
|
if (o) {
|
|
104
121
|
this.bridgeInitFnPromise = o.bridgeInit();
|
|
105
122
|
} else {
|
|
106
123
|
var n = 'Do not support the current environment�' + this.env.platform;
|
|
107
124
|
this.bridgeInitFnPromise = _promise["default"].reject(new Error(n));
|
|
108
125
|
}
|
|
126
|
+
|
|
109
127
|
return this.bridgeInitFnPromise;
|
|
110
128
|
}
|
|
111
129
|
}, {
|
|
@@ -125,44 +143,54 @@ var Sdk = /*#__PURE__*/function () {
|
|
|
125
143
|
key: "invokeAPI",
|
|
126
144
|
value: function invokeAPI(method, params) {
|
|
127
145
|
var _context2;
|
|
146
|
+
|
|
128
147
|
if (!params) params = {};
|
|
129
|
-
if (!method) return;
|
|
130
|
-
|
|
148
|
+
if (!method) return; // 验证方法是否可用
|
|
149
|
+
|
|
131
150
|
var apiConfigs = this.invokeAPIConfigMapByMethod[method];
|
|
151
|
+
|
|
132
152
|
if (!apiConfigs) {
|
|
133
153
|
return this._onFail(method, '-1', "[".concat(method, "] method is not exist"), params.onFail);
|
|
134
154
|
}
|
|
155
|
+
|
|
135
156
|
var apiConfig = apiConfigs[this.env.platform];
|
|
157
|
+
|
|
136
158
|
if (apiConfig) {
|
|
137
159
|
var supportVersion = apiConfig.vs || '0.0.0';
|
|
160
|
+
|
|
138
161
|
if ((0, _compareVersions.compareVersions)(this.env.version, supportVersion) < 0) {
|
|
139
162
|
var _context;
|
|
163
|
+
|
|
140
164
|
return this._onFail(method, '-1', (0, _concat["default"])(_context = "The current application version is ".concat(this.env.version, ". This method does not support versions less than ")).call(_context, supportVersion), params.onFail);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
// 确定回调
|
|
165
|
+
} // 确定参数
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
var p = apiConfig.paramsDeal ? apiConfig.paramsDeal(params) : params; // 确定回调
|
|
169
|
+
|
|
145
170
|
if ('function' == typeof p.onSuccess) {
|
|
146
171
|
var v = p.onSuccess;
|
|
172
|
+
|
|
147
173
|
p.onSuccess = function (e) {
|
|
148
174
|
v(e);
|
|
149
175
|
};
|
|
150
|
-
}
|
|
151
|
-
|
|
176
|
+
} // 主方法
|
|
177
|
+
|
|
178
|
+
|
|
152
179
|
this.bridgeInitFn().then(function (fn) {
|
|
153
|
-
fn(method, p).then(function () {
|
|
154
|
-
|
|
155
|
-
})["catch"](function (error) {
|
|
156
|
-
// 调用失败
|
|
180
|
+
fn(method, p).then(function () {// 调用成功
|
|
181
|
+
})["catch"](function (error) {// 调用失败
|
|
157
182
|
});
|
|
158
183
|
})["catch"](function (err) {
|
|
159
184
|
console.log('wenai err', err);
|
|
160
185
|
});
|
|
161
186
|
return;
|
|
162
187
|
}
|
|
188
|
+
|
|
163
189
|
this._onFail(method, '-1', (0, _concat["default"])(_context2 = "[".concat(method, "] method do not support the current platform (")).call(_context2, this.env.platform, ")"), params.onFail);
|
|
164
190
|
}
|
|
165
191
|
}]);
|
|
166
192
|
return Sdk;
|
|
167
193
|
}();
|
|
168
|
-
|
|
194
|
+
|
|
195
|
+
var _default = Sdk;
|
|
196
|
+
exports["default"] = _default;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
8
|
+
|
|
7
9
|
exports.ENV_ENUM = void 0;
|
|
8
10
|
var ENV_ENUM;
|
|
11
|
+
exports.ENV_ENUM = ENV_ENUM;
|
|
12
|
+
|
|
9
13
|
(function (ENV_ENUM) {
|
|
10
14
|
ENV_ENUM["pc"] = "pc";
|
|
11
15
|
ENV_ENUM["android"] = "android";
|
package/libs/utils/bpitLog.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
8
|
+
|
|
7
9
|
exports["default"] = bpitLog;
|
|
10
|
+
|
|
8
11
|
function loadScript(url) {
|
|
9
12
|
var script = document.createElement('script');
|
|
10
13
|
script.type = 'text/javascript';
|
|
14
|
+
|
|
11
15
|
if (script.readyState) {
|
|
12
16
|
// ie 浏览器
|
|
13
17
|
script.onreadystatechange = function () {
|
|
@@ -22,31 +26,38 @@ function loadScript(url) {
|
|
|
22
26
|
document.getElementsByTagName('head')[0].removeChild(script);
|
|
23
27
|
};
|
|
24
28
|
}
|
|
29
|
+
|
|
25
30
|
script.src = url;
|
|
26
31
|
document.getElementsByTagName('head')[0].appendChild(script);
|
|
27
32
|
}
|
|
33
|
+
|
|
28
34
|
function bpitLog(options) {
|
|
29
35
|
if (!options) {
|
|
30
36
|
console.log('bpit error: need options');
|
|
31
37
|
return;
|
|
32
38
|
}
|
|
39
|
+
|
|
33
40
|
if (!options.group) {
|
|
34
41
|
console.log('bpit error: need options.group');
|
|
35
42
|
return;
|
|
36
43
|
}
|
|
44
|
+
|
|
37
45
|
if (!options.project) {
|
|
38
46
|
console.log('bpit error: need options.project');
|
|
39
47
|
return;
|
|
40
48
|
}
|
|
49
|
+
|
|
41
50
|
if (!options.hasOwnProperty('env')) {
|
|
42
51
|
console.log('bpit error: need options.env');
|
|
43
52
|
return;
|
|
44
53
|
}
|
|
54
|
+
|
|
45
55
|
if (!options.hasOwnProperty('version')) {
|
|
46
56
|
console.log('bpit error: need options.version');
|
|
47
57
|
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
58
|
+
} // upload data
|
|
59
|
+
|
|
60
|
+
|
|
50
61
|
var uploadData = ['https://es.zhiyinlou.com/log.js?'];
|
|
51
62
|
uploadData.push('group=' + options.group);
|
|
52
63
|
uploadData.push('&project=' + options.project);
|
|
@@ -57,12 +68,13 @@ function bpitLog(options) {
|
|
|
57
68
|
if (options.workcode) uploadData.push('&workcode=' + options.workcode);
|
|
58
69
|
if (options.timestamp) uploadData.push('×tamp=' + options.timestamp);
|
|
59
70
|
if (options.errorcode) uploadData.push('&errorcode=' + options.errorcode);
|
|
60
|
-
if (options.message) uploadData.push('&message=' + options.message);
|
|
61
|
-
|
|
71
|
+
if (options.message) uploadData.push('&message=' + options.message); // api load time
|
|
72
|
+
|
|
62
73
|
if (options.api && options.time) {
|
|
63
74
|
uploadData.push('&api=' + options.api);
|
|
64
75
|
uploadData.push('&load_time=' + options.time);
|
|
65
76
|
}
|
|
77
|
+
|
|
66
78
|
var uploadDataUrl = uploadData.join('');
|
|
67
79
|
loadScript(uploadDataUrl);
|
|
68
80
|
if (options.env != 'online') console.log(uploadDataUrl);
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
5
7
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
10
|
+
|
|
8
11
|
exports.validate = exports.satisfies = exports.compareVersions = exports.compare = void 0;
|
|
12
|
+
|
|
9
13
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
|
|
14
|
+
|
|
10
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
16
|
+
|
|
11
17
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/includes"));
|
|
18
|
+
|
|
12
19
|
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/parse-int"));
|
|
20
|
+
|
|
13
21
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/keys"));
|
|
22
|
+
|
|
14
23
|
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/index-of"));
|
|
24
|
+
|
|
15
25
|
/**
|
|
16
26
|
* Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.
|
|
17
27
|
* This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.
|
|
@@ -19,22 +29,23 @@ var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/in
|
|
|
19
29
|
* @param v2 - Second version to compare
|
|
20
30
|
* @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).
|
|
21
31
|
*/
|
|
22
|
-
var compareVersions =
|
|
32
|
+
var compareVersions = function compareVersions(v1, v2) {
|
|
23
33
|
// validate input and split into segments
|
|
24
34
|
var n1 = validateAndParse(v1);
|
|
25
|
-
var n2 = validateAndParse(v2);
|
|
26
|
-
|
|
35
|
+
var n2 = validateAndParse(v2); // pop off the patch
|
|
36
|
+
|
|
27
37
|
var p1 = n1.pop();
|
|
28
|
-
var p2 = n2.pop();
|
|
29
|
-
|
|
38
|
+
var p2 = n2.pop(); // validate numbers
|
|
39
|
+
|
|
30
40
|
var r = compareSegments(n1, n2);
|
|
31
|
-
if (r !== 0) return r;
|
|
32
|
-
|
|
41
|
+
if (r !== 0) return r; // validate pre-release
|
|
42
|
+
|
|
33
43
|
if (p1 && p2) {
|
|
34
44
|
return compareSegments(p1.split('.'), p2.split('.'));
|
|
35
45
|
} else if (p1 || p2) {
|
|
36
46
|
return p1 ? -1 : 1;
|
|
37
47
|
}
|
|
48
|
+
|
|
38
49
|
return 0;
|
|
39
50
|
};
|
|
40
51
|
/**
|
|
@@ -50,7 +61,11 @@ var compareVersions = exports.compareVersions = function compareVersions(v1, v2)
|
|
|
50
61
|
* validate('foo'); // return false
|
|
51
62
|
* ```
|
|
52
63
|
*/
|
|
53
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
exports.compareVersions = compareVersions;
|
|
67
|
+
|
|
68
|
+
var validate = function validate(version) {
|
|
54
69
|
return typeof version === 'string' && /^[v\d]/.test(version) && semver.test(version);
|
|
55
70
|
};
|
|
56
71
|
/**
|
|
@@ -70,12 +85,17 @@ var validate = exports.validate = function validate(version) {
|
|
|
70
85
|
* compare('10.1.1', '10.2.2', '>='); // return false
|
|
71
86
|
* ```
|
|
72
87
|
*/
|
|
73
|
-
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
exports.validate = validate;
|
|
91
|
+
|
|
92
|
+
var compare = function compare(v1, v2, operator) {
|
|
74
93
|
var _context;
|
|
94
|
+
|
|
75
95
|
// validate input operator
|
|
76
|
-
assertValidOperator(operator);
|
|
77
|
-
// since result of compareVersions can only be -1 or 0 or 1
|
|
96
|
+
assertValidOperator(operator); // since result of compareVersions can only be -1 or 0 or 1
|
|
78
97
|
// a simple map can be used to replace switch
|
|
98
|
+
|
|
79
99
|
var res = compareVersions(v1, v2);
|
|
80
100
|
return (0, _includes["default"])(_context = operatorResMap[operator]).call(_context, res);
|
|
81
101
|
};
|
|
@@ -92,69 +112,92 @@ var compare = exports.compare = function compare(v1, v2, operator) {
|
|
|
92
112
|
* satisfies('1.1.0', '~1.0.0'); // return false
|
|
93
113
|
* ```
|
|
94
114
|
*/
|
|
95
|
-
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
exports.compare = compare;
|
|
118
|
+
|
|
119
|
+
var satisfies = function satisfies(version, range) {
|
|
96
120
|
// if no range operator then "="
|
|
97
121
|
var m = range.match(/^([<>=~^]+)/);
|
|
98
|
-
var op = m ? m[1] : '=';
|
|
99
|
-
|
|
100
|
-
if (op !== '^' && op !== '~') return compare(version, range, op);
|
|
101
|
-
|
|
122
|
+
var op = m ? m[1] : '='; // if gt/lt/eq then operator compare
|
|
123
|
+
|
|
124
|
+
if (op !== '^' && op !== '~') return compare(version, range, op); // else range of either "~" or "^" is assumed
|
|
125
|
+
|
|
102
126
|
var _validateAndParse = validateAndParse(version),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
127
|
+
_validateAndParse2 = (0, _slicedToArray2["default"])(_validateAndParse, 3),
|
|
128
|
+
v1 = _validateAndParse2[0],
|
|
129
|
+
v2 = _validateAndParse2[1],
|
|
130
|
+
v3 = _validateAndParse2[2];
|
|
131
|
+
|
|
107
132
|
var _validateAndParse3 = validateAndParse(range),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
133
|
+
_validateAndParse4 = (0, _slicedToArray2["default"])(_validateAndParse3, 3),
|
|
134
|
+
r1 = _validateAndParse4[0],
|
|
135
|
+
r2 = _validateAndParse4[1],
|
|
136
|
+
r3 = _validateAndParse4[2];
|
|
137
|
+
|
|
112
138
|
if (compareStrings(v1, r1) !== 0) return false;
|
|
139
|
+
|
|
113
140
|
if (op === '^') {
|
|
114
141
|
return compareSegments([v2, v3], [r2, r3]) >= 0;
|
|
115
142
|
}
|
|
143
|
+
|
|
116
144
|
if (compareStrings(v2, r2) !== 0) return false;
|
|
117
145
|
return compareStrings(v3, r3) >= 0;
|
|
118
146
|
};
|
|
147
|
+
|
|
148
|
+
exports.satisfies = satisfies;
|
|
119
149
|
var semver = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
|
|
150
|
+
|
|
120
151
|
var validateAndParse = function validateAndParse(version) {
|
|
121
152
|
if (typeof version !== 'string') {
|
|
122
153
|
throw new TypeError('Invalid argument expected string');
|
|
123
154
|
}
|
|
155
|
+
|
|
124
156
|
var match = version.match(semver);
|
|
157
|
+
|
|
125
158
|
if (!match) {
|
|
126
159
|
throw new Error("Invalid argument not valid semver ('".concat(version, "' received)"));
|
|
127
160
|
}
|
|
161
|
+
|
|
128
162
|
match.shift();
|
|
129
163
|
return match;
|
|
130
164
|
};
|
|
165
|
+
|
|
131
166
|
var isWildcard = function isWildcard(s) {
|
|
132
167
|
return s === '*' || s === 'x' || s === 'X';
|
|
133
168
|
};
|
|
169
|
+
|
|
134
170
|
var tryParse = function tryParse(v) {
|
|
135
171
|
var n = (0, _parseInt2["default"])(v, 10);
|
|
136
172
|
return isNaN(n) ? v : n;
|
|
137
173
|
};
|
|
174
|
+
|
|
138
175
|
var forceType = function forceType(a, b) {
|
|
139
176
|
return (0, _typeof2["default"])(a) !== (0, _typeof2["default"])(b) ? [String(a), String(b)] : [a, b];
|
|
140
177
|
};
|
|
178
|
+
|
|
141
179
|
var compareStrings = function compareStrings(a, b) {
|
|
142
180
|
if (isWildcard(a) || isWildcard(b)) return 0;
|
|
181
|
+
|
|
143
182
|
var _forceType = forceType(tryParse(a), tryParse(b)),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
183
|
+
_forceType2 = (0, _slicedToArray2["default"])(_forceType, 2),
|
|
184
|
+
ap = _forceType2[0],
|
|
185
|
+
bp = _forceType2[1];
|
|
186
|
+
|
|
147
187
|
if (ap > bp) return 1;
|
|
148
188
|
if (ap < bp) return -1;
|
|
149
189
|
return 0;
|
|
150
190
|
};
|
|
191
|
+
|
|
151
192
|
var compareSegments = function compareSegments(a, b) {
|
|
152
193
|
for (var i = 0; i < Math.max(a.length, b.length); i++) {
|
|
153
194
|
var r = compareStrings(a[i] || '0', b[i] || '0');
|
|
154
195
|
if (r !== 0) return r;
|
|
155
196
|
}
|
|
197
|
+
|
|
156
198
|
return 0;
|
|
157
199
|
};
|
|
200
|
+
|
|
158
201
|
var operatorResMap = {
|
|
159
202
|
'>': [1],
|
|
160
203
|
'>=': [0, 1],
|
|
@@ -163,10 +206,12 @@ var operatorResMap = {
|
|
|
163
206
|
'<': [-1]
|
|
164
207
|
};
|
|
165
208
|
var allowedOperators = (0, _keys["default"])(operatorResMap);
|
|
209
|
+
|
|
166
210
|
var assertValidOperator = function assertValidOperator(op) {
|
|
167
211
|
if (typeof op !== 'string') {
|
|
168
212
|
throw new TypeError("Invalid operator type, expected string but got ".concat((0, _typeof2["default"])(op)));
|
|
169
213
|
}
|
|
214
|
+
|
|
170
215
|
if ((0, _indexOf["default"])(allowedOperators).call(allowedOperators, op) === -1) {
|
|
171
216
|
throw new Error("Invalid operator, expected one of ".concat(allowedOperators.join('|')));
|
|
172
217
|
}
|
package/libs/utils/console.js
CHANGED
|
@@ -1,53 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
5
7
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
10
|
+
|
|
8
11
|
exports.error = error;
|
|
9
12
|
exports.log = log;
|
|
10
13
|
exports.warn = warn;
|
|
14
|
+
|
|
11
15
|
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/instance/bind"));
|
|
16
|
+
|
|
12
17
|
var _context, _context2, _context3;
|
|
18
|
+
|
|
13
19
|
// 防止被应用复写console
|
|
14
20
|
var myconsole = {
|
|
15
21
|
log: function log() {},
|
|
16
22
|
warn: function warn() {},
|
|
17
23
|
error: function error() {}
|
|
18
24
|
};
|
|
25
|
+
|
|
19
26
|
if (window && window.console) {
|
|
20
27
|
myconsole = window.console;
|
|
21
28
|
}
|
|
29
|
+
|
|
22
30
|
if (document && document.body) {
|
|
23
31
|
var iframe = document.createElement('iframe');
|
|
32
|
+
|
|
24
33
|
if (iframe && iframe.contentWindow && iframe.contentWindow.console) {
|
|
25
34
|
iframe.style.display = 'none';
|
|
26
35
|
document.body.appendChild(iframe);
|
|
27
36
|
myconsole = iframe.contentWindow.console;
|
|
28
37
|
}
|
|
29
38
|
}
|
|
39
|
+
|
|
30
40
|
var myLog = (0, _bind["default"])(_context = myconsole.log).call(_context, myconsole);
|
|
31
41
|
var myWarn = (0, _bind["default"])(_context2 = myconsole.warn).call(_context2, myconsole);
|
|
32
42
|
var myError = (0, _bind["default"])(_context3 = myconsole.error).call(_context3, myconsole);
|
|
33
43
|
var style = 'color:#fff;font-weight:bold;border-radius:5px;background:#67c23a;';
|
|
34
44
|
var styleError = "".concat(style, "background-color:red;");
|
|
35
45
|
var styleWarn = "".concat(style, "background-color:orange;");
|
|
46
|
+
|
|
36
47
|
function log() {
|
|
37
48
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38
49
|
args[_key] = arguments[_key];
|
|
39
50
|
}
|
|
51
|
+
|
|
40
52
|
return myLog("%c Yach-jssdk log: ", style, args);
|
|
41
53
|
}
|
|
54
|
+
|
|
42
55
|
function error() {
|
|
43
56
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
44
57
|
args[_key2] = arguments[_key2];
|
|
45
58
|
}
|
|
59
|
+
|
|
46
60
|
return myWarn("%c Yach-jssdk log: ", styleError, args);
|
|
47
61
|
}
|
|
62
|
+
|
|
48
63
|
function warn() {
|
|
49
64
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
50
65
|
args[_key3] = arguments[_key3];
|
|
51
66
|
}
|
|
67
|
+
|
|
52
68
|
return myError("%c Yach-jssdk log: ", styleWarn, args);
|
|
53
69
|
}
|
package/libs/utils/env.js
CHANGED
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
8
|
+
|
|
7
9
|
exports.getENV = getENV;
|
|
10
|
+
|
|
8
11
|
var _sdk = require("../lib/sdk/sdk.typings");
|
|
12
|
+
|
|
9
13
|
function getUA() {
|
|
10
14
|
return typeof navigator !== 'undefined' ? navigator.userAgent : '';
|
|
11
15
|
}
|
|
16
|
+
|
|
12
17
|
function getENV() {
|
|
13
18
|
var ua = getUA(),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
inYach = /Yach/i.test(ua),
|
|
20
|
+
inIOS = /iPhone|iPad|iPod|iOS/i.test(ua) && inYach,
|
|
21
|
+
inAndroid = /Android/i.test(ua) && inYach,
|
|
22
|
+
inPC = /YachPc/i.test(ua),
|
|
23
|
+
inIpad = /iPad/i.test(ua) && inYach,
|
|
24
|
+
inIPhone = /iPhone/i.test(ua) && inYach; // platform
|
|
25
|
+
|
|
21
26
|
var platform = _sdk.ENV_ENUM.notInYach;
|
|
27
|
+
|
|
22
28
|
if (inIOS) {
|
|
23
29
|
platform = _sdk.ENV_ENUM.ios;
|
|
24
30
|
}
|
|
31
|
+
|
|
25
32
|
if (inAndroid) {
|
|
26
33
|
platform = _sdk.ENV_ENUM.android;
|
|
27
34
|
}
|
|
35
|
+
|
|
28
36
|
if (inPC) {
|
|
29
37
|
platform = _sdk.ENV_ENUM.pc;
|
|
30
|
-
}
|
|
31
|
-
|
|
38
|
+
} // version
|
|
39
|
+
|
|
40
|
+
|
|
32
41
|
var versionArr = ua.match(/Yach\/[a-zA-Z0-9.-]+/) || [];
|
|
33
|
-
var version = (versionArr[0] || '').split('/')[1] || '';
|
|
34
|
-
|
|
42
|
+
var version = (versionArr[0] || '').split('/')[1] || ''; // language
|
|
43
|
+
|
|
35
44
|
var language = typeof navigator !== 'undefined' ? navigator.language : '*';
|
|
36
45
|
return {
|
|
37
46
|
platform: platform,
|
package/libs/utils/index.js
CHANGED
|
@@ -1,40 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
|
|
4
5
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
5
7
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
8
|
value: true
|
|
7
9
|
});
|
|
10
|
+
|
|
8
11
|
exports.bpitLog = staticsLog;
|
|
12
|
+
|
|
9
13
|
_Object$defineProperty(exports, "error", {
|
|
10
14
|
enumerable: true,
|
|
11
15
|
get: function get() {
|
|
12
16
|
return _console.error;
|
|
13
17
|
}
|
|
14
18
|
});
|
|
19
|
+
|
|
15
20
|
_Object$defineProperty(exports, "getENV", {
|
|
16
21
|
enumerable: true,
|
|
17
22
|
get: function get() {
|
|
18
23
|
return _env.getENV;
|
|
19
24
|
}
|
|
20
25
|
});
|
|
26
|
+
|
|
21
27
|
_Object$defineProperty(exports, "log", {
|
|
22
28
|
enumerable: true,
|
|
23
29
|
get: function get() {
|
|
24
30
|
return _console.log;
|
|
25
31
|
}
|
|
26
32
|
});
|
|
33
|
+
|
|
27
34
|
_Object$defineProperty(exports, "warn", {
|
|
28
35
|
enumerable: true,
|
|
29
36
|
get: function get() {
|
|
30
37
|
return _console.warn;
|
|
31
38
|
}
|
|
32
39
|
});
|
|
40
|
+
|
|
33
41
|
var _now = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/date/now"));
|
|
42
|
+
|
|
34
43
|
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js/object/assign"));
|
|
44
|
+
|
|
35
45
|
var _env = require("./env");
|
|
46
|
+
|
|
36
47
|
var _bpitLog = _interopRequireDefault(require("./bpitLog"));
|
|
48
|
+
|
|
37
49
|
var _console = require("./console");
|
|
50
|
+
|
|
38
51
|
function staticsLog(config) {
|
|
39
52
|
var env = 'test';
|
|
40
53
|
var version = (0, _env.getENV)().version;
|