@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.
@@ -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): 1 | 0 | -1;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",