@ives_xxz/framework 1.1.1 → 1.1.2

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.
@@ -145,11 +145,15 @@ export default class FWHotUpdateManager extends FWManager implements FW.HotUpdat
145
145
  const code = event.getEventCode();
146
146
  const msg = event.getMessage();
147
147
  FWLog.debug('updateEvent getEventCode -> ', code);
148
+ let str = '';
148
149
  switch (code) {
149
150
  case jsb.EventAssetsManager.ERROR_NO_LOCAL_MANIFEST:
150
151
  failed = true;
152
+ str = 'ERROR_NO_LOCAL_MANIFEST';
151
153
  break;
152
154
  case jsb.EventAssetsManager.UPDATE_PROGRESSION:
155
+ str = 'UPDATE_PROGRESSION';
156
+ FWLog.debug('updateEvent percent -> ', event.getPercent());
153
157
  if (event.getPercent() > 0) {
154
158
  downloadedFiles = event.getDownloadedFiles();
155
159
  totalFiles = event.getTotalFiles();
@@ -160,31 +164,38 @@ export default class FWHotUpdateManager extends FWManager implements FW.HotUpdat
160
164
  percent = event.getPercent();
161
165
  FWLog.debug('正在更新中 -> ', '下载文件数量:', downloadedFiles, ',下载文件总数量:', totalFiles, ',已下载大小:', convertDownloadedBytes, ',下载总大小:', convertTotalBytes);
162
166
  }
163
-
164
167
  break;
165
168
  case jsb.EventAssetsManager.ERROR_DOWNLOAD_MANIFEST:
169
+ str = 'ERROR_DOWNLOAD_MANIFEST';
166
170
  break;
167
171
  case jsb.EventAssetsManager.ERROR_PARSE_MANIFEST:
172
+ str = 'ERROR_PARSE_MANIFEST';
168
173
  failed = true;
169
174
  break;
170
175
  case jsb.EventAssetsManager.ALREADY_UP_TO_DATE:
176
+ str = 'ALREADY_UP_TO_DATE';
171
177
  failed = true;
172
178
  break;
173
179
  case jsb.EventAssetsManager.UPDATE_FINISHED:
180
+ str = 'UPDATE_FINISHED';
174
181
  needRestart = true;
175
182
  break;
176
183
  case jsb.EventAssetsManager.UPDATE_FAILED:
184
+ str = 'UPDATE_FAILED';
177
185
  this.isUpdate = false;
178
186
  this.isRetry = true;
179
187
  break;
180
188
  case jsb.EventAssetsManager.ERROR_UPDATING:
189
+ str = 'ERROR_UPDATING';
181
190
  break;
182
191
  case jsb.EventAssetsManager.ERROR_DECOMPRESS:
192
+ str = 'ERROR_DECOMPRESS';
183
193
  break;
184
194
  default:
185
195
  break;
186
196
  }
187
197
 
198
+ FWLog.debug('热更新中->', str);
188
199
  this.listener.hotUpdatingHandle?.(code, {
189
200
  percent: percent,
190
201
  downloadedFiles: downloadedFiles,
@@ -194,14 +205,14 @@ export default class FWHotUpdateManager extends FWManager implements FW.HotUpdat
194
205
  convertDownloadedBytes: convertDownloadedBytes,
195
206
  convertTotalBytes: convertTotalBytes,
196
207
  });
197
-
208
+ FWLog.debug('热更新中结果 failed -> ', failed);
198
209
  if (failed) {
199
210
  FWLog.debug('下载失败');
200
211
  this.assetMgr.setEventCallback(null!);
201
212
  this.isUpdate = false;
202
213
  this.retry();
203
214
  }
204
-
215
+ FWLog.debug('热更新中结果 needRestart -> ', needRestart);
205
216
  if (needRestart) {
206
217
  FWLog.debug('下载完成');
207
218
  this.assetMgr.setEventCallback(null!);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": [