pixuireactcomponents 1.3.85 → 1.3.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixuireactcomponents",
3
- "version": "1.3.85",
3
+ "version": "1.3.86",
4
4
  "description": "pixui react components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -85,21 +85,23 @@ export var assetCache;
85
85
  return [4 /*yield*/, getLocalPath(urlWithoutParams)];
86
86
  case 1:
87
87
  localPath = _a.sent();
88
+ console.log('cacheAsset getlocalPath', localPath);
88
89
  if (!force) {
89
90
  if (lib.fileExists(localPath)) {
90
91
  console.log('cacheAsset file exist', localPath);
91
92
  resolve(localPath);
92
93
  }
93
94
  }
95
+ console.log('cacheAsset file not exist or not force', url, localPath);
94
96
  xhr = new XMLHttpRequest();
95
97
  xhr.open('GET', url, true);
96
98
  xhr.responseType = 'arraybuffer';
97
99
  xhr.onload = function () { return __awaiter(_this, void 0, void 0, function () {
98
- var buf;
99
100
  return __generator(this, function (_a) {
100
101
  if (xhr.status === 200) {
101
- buf = Buffer.from(xhr.response, 'binary').buffer;
102
- lib.saveToFile(localPath, buf);
102
+ console.log('cacheAsset xhr statue=200', url, localPath);
103
+ // let buf = Buffer.from(xhr.response, 'binary').buffer;
104
+ lib.saveToFile(localPath, xhr.response);
103
105
  resolve(localPath);
104
106
  }
105
107
  else {