@alipay/ams-checkout 1.11.1 → 1.12.0
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/umd/ams-checkout.min.js +1 -1
- package/esm/core/bus/index.d.ts +1 -1
- package/esm/core/bus/interface.d.ts +5 -1
- package/esm/core/bus/interface.js +6 -1
- package/esm/core/component/index.js +10 -4
- package/esm/core/instance/index.d.ts +8 -1
- package/esm/core/instance/index.js +16 -10
- package/esm/plugin/applepay/component.d.ts +1 -1
- package/esm/plugin/applepay/component.js +5 -5
- package/esm/plugin/applepay/index.d.ts +1 -1
- package/esm/plugin/applepay/index.js +6 -6
- package/esm/plugin/component/index.js +57 -35
- package/esm/plugin/const.js +18 -4
- package/esm/plugin/paypal/index.d.ts +20 -0
- package/esm/plugin/paypal/index.js +389 -0
- package/esm/plugin/type.d.ts +2 -2
- package/esm/plugin/utils.d.ts +6 -0
- package/esm/plugin/utils.js +21 -0
- package/esm/types/index.d.ts +53 -3
- package/esm/types/index.js +18 -0
- package/esm/util/index.d.ts +2 -1
- package/esm/util/index.js +4 -2
- package/esm/util/logger.d.ts +4 -0
- package/esm/util/logger.js +23 -3
- package/esm/util/versionCompare.d.ts +1 -1
- package/package.json +1 -1
package/esm/util/logger.js
CHANGED
@@ -15,6 +15,7 @@ export var Logger = /*#__PURE__*/function () {
|
|
15
15
|
_defineProperty(this, "debug", void 0);
|
16
16
|
_defineProperty(this, "componentStartTime", void 0);
|
17
17
|
_defineProperty(this, "isLoaded", void 0);
|
18
|
+
_defineProperty(this, "trackId", void 0);
|
18
19
|
this.logs = [];
|
19
20
|
this.config = config;
|
20
21
|
this.debug = debug;
|
@@ -99,19 +100,28 @@ export var Logger = /*#__PURE__*/function () {
|
|
99
100
|
try {
|
100
101
|
var log = logs.pop();
|
101
102
|
if (log.type === 'error') {
|
103
|
+
var _log$logPayload;
|
102
104
|
logError(log.logPayload, _objectSpread({
|
103
105
|
fsDuration: fsDuration,
|
104
|
-
timeStamp: now
|
106
|
+
timeStamp: now,
|
107
|
+
trackId: this.trackId,
|
108
|
+
title: (_log$logPayload = log.logPayload) === null || _log$logPayload === void 0 ? void 0 : _log$logPayload.title
|
105
109
|
}, log === null || log === void 0 ? void 0 : log.extra));
|
106
110
|
} else if (log.type === 'info') {
|
111
|
+
var _log$logPayload2;
|
107
112
|
logInfo(log.logPayload, _objectSpread({
|
108
113
|
fsDuration: fsDuration,
|
109
|
-
timeStamp: now
|
114
|
+
timeStamp: now,
|
115
|
+
trackId: this.trackId,
|
116
|
+
title: (_log$logPayload2 = log.logPayload) === null || _log$logPayload2 === void 0 ? void 0 : _log$logPayload2.title
|
110
117
|
}, log === null || log === void 0 ? void 0 : log.extra));
|
111
118
|
} else if (log.type === 'rpc') {
|
119
|
+
var _log$logPayload3;
|
112
120
|
reportRPC(log.logPayload, _objectSpread({
|
113
121
|
fsDuration: fsDuration,
|
114
|
-
timeStamp: now
|
122
|
+
timeStamp: now,
|
123
|
+
trackId: this.trackId,
|
124
|
+
title: (_log$logPayload3 = log.logPayload) === null || _log$logPayload3 === void 0 ? void 0 : _log$logPayload3.title
|
115
125
|
}, log === null || log === void 0 ? void 0 : log.extra));
|
116
126
|
}
|
117
127
|
} catch (error) {
|
@@ -166,6 +176,16 @@ export var Logger = /*#__PURE__*/function () {
|
|
166
176
|
value: function setComponentStartTime(val) {
|
167
177
|
this.componentStartTime = val;
|
168
178
|
}
|
179
|
+
}, {
|
180
|
+
key: "setTrackId",
|
181
|
+
value: function setTrackId(trackId) {
|
182
|
+
this.trackId = trackId;
|
183
|
+
}
|
184
|
+
}, {
|
185
|
+
key: "getComponentStartTime",
|
186
|
+
value: function getComponentStartTime() {
|
187
|
+
return this.componentStartTime;
|
188
|
+
}
|
169
189
|
}]);
|
170
190
|
return Logger;
|
171
191
|
}();
|
@@ -3,6 +3,6 @@
|
|
3
3
|
* @param v1
|
4
4
|
* @param v2
|
5
5
|
*/
|
6
|
-
export declare function compareVersion(v1: string, v2: string):
|
6
|
+
export declare function compareVersion(v1: string, v2: string): 0 | 1 | -1;
|
7
7
|
export declare function isVersionInRange(currentVersion: any, minVersion: any, maxVersion: any): boolean;
|
8
8
|
export declare function matchVersion(config: any, currentVersion: any): boolean;
|