scratch-storage 2.3.194 → 2.3.196
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/CHANGELOG.md +14 -0
- package/dist/node/scratch-storage.js +32 -17
- package/dist/node/scratch-storage.js.map +1 -1
- package/dist/web/scratch-storage.js +32 -17
- package/dist/web/scratch-storage.js.map +1 -1
- package/dist/web/scratch-storage.min.js +32 -17
- package/dist/web/scratch-storage.min.js.map +1 -1
- package/pack/scratch-storage-2.3.196.tgz +0 -0
- package/package.json +2 -2
- package/pack/scratch-storage-2.3.194.tgz +0 -0
|
@@ -331,6 +331,20 @@ module.exports = _possibleConstructorReturn, module.exports.__esModule = true, m
|
|
|
331
331
|
|
|
332
332
|
/***/ }),
|
|
333
333
|
|
|
334
|
+
/***/ "./node_modules/@babel/runtime/helpers/readOnlyError.js":
|
|
335
|
+
/*!**************************************************************!*\
|
|
336
|
+
!*** ./node_modules/@babel/runtime/helpers/readOnlyError.js ***!
|
|
337
|
+
\**************************************************************/
|
|
338
|
+
/*! no static exports found */
|
|
339
|
+
/***/ (function(module, exports) {
|
|
340
|
+
|
|
341
|
+
function _readOnlyError(r) {
|
|
342
|
+
throw new TypeError('"' + r + '" is read-only');
|
|
343
|
+
}
|
|
344
|
+
module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
345
|
+
|
|
346
|
+
/***/ }),
|
|
347
|
+
|
|
334
348
|
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
|
335
349
|
/*!***************************************************************!*\
|
|
336
350
|
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
|
@@ -5595,17 +5609,17 @@ var ProxyTool = /*#__PURE__*/function () {
|
|
|
5595
5609
|
value: function get(reqConfig) {
|
|
5596
5610
|
var _this = this;
|
|
5597
5611
|
var toolIndex = 0;
|
|
5598
|
-
var
|
|
5612
|
+
var _nextTool = function nextTool(err) {
|
|
5599
5613
|
var tool = _this.tools[toolIndex++];
|
|
5600
5614
|
if (!tool) {
|
|
5601
5615
|
throw err;
|
|
5602
5616
|
}
|
|
5603
5617
|
if (!tool.isGetSupported) {
|
|
5604
|
-
return
|
|
5618
|
+
return _nextTool(err);
|
|
5605
5619
|
}
|
|
5606
|
-
return tool.get(reqConfig).catch(
|
|
5620
|
+
return tool.get(reqConfig).catch(_nextTool);
|
|
5607
5621
|
};
|
|
5608
|
-
return
|
|
5622
|
+
return _nextTool();
|
|
5609
5623
|
}
|
|
5610
5624
|
|
|
5611
5625
|
/**
|
|
@@ -5630,17 +5644,17 @@ var ProxyTool = /*#__PURE__*/function () {
|
|
|
5630
5644
|
value: function send(reqConfig) {
|
|
5631
5645
|
var _this2 = this;
|
|
5632
5646
|
var toolIndex = 0;
|
|
5633
|
-
var
|
|
5647
|
+
var _nextTool2 = function nextTool(err) {
|
|
5634
5648
|
var tool = _this2.tools[toolIndex++];
|
|
5635
5649
|
if (!tool) {
|
|
5636
5650
|
throw err;
|
|
5637
5651
|
}
|
|
5638
5652
|
if (!tool.isSendSupported) {
|
|
5639
|
-
return
|
|
5653
|
+
return _nextTool2(err);
|
|
5640
5654
|
}
|
|
5641
|
-
return tool.send(reqConfig).catch(
|
|
5655
|
+
return tool.send(reqConfig).catch(_nextTool2);
|
|
5642
5656
|
};
|
|
5643
|
-
return
|
|
5657
|
+
return _nextTool2();
|
|
5644
5658
|
}
|
|
5645
5659
|
}]);
|
|
5646
5660
|
}();
|
|
@@ -5879,7 +5893,7 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
5879
5893
|
dataFormat = dataFormat || assetType.runtimeFormat;
|
|
5880
5894
|
var helperIndex = 0;
|
|
5881
5895
|
var helper;
|
|
5882
|
-
var
|
|
5896
|
+
var _tryNextHelper = function tryNextHelper(err) {
|
|
5883
5897
|
if (err) {
|
|
5884
5898
|
// Track the error, but continue looking
|
|
5885
5899
|
errors.push(err);
|
|
@@ -5888,12 +5902,12 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
5888
5902
|
if (helper) {
|
|
5889
5903
|
var loading = helper.load(assetType, assetId, dataFormat);
|
|
5890
5904
|
if (loading === null) {
|
|
5891
|
-
return
|
|
5905
|
+
return _tryNextHelper();
|
|
5892
5906
|
}
|
|
5893
5907
|
// Note that other attempts may have logged errors; if this succeeds they will be suppressed.
|
|
5894
5908
|
return loading
|
|
5895
5909
|
// TODO: maybe some types of error should prevent trying the next helper?
|
|
5896
|
-
.catch(
|
|
5910
|
+
.catch(_tryNextHelper);
|
|
5897
5911
|
} else if (errors.length > 0) {
|
|
5898
5912
|
// We looked through all the helpers and couldn't find the asset, AND
|
|
5899
5913
|
// at least one thing went wrong while we were looking.
|
|
@@ -5903,7 +5917,7 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
5903
5917
|
// Nothing went wrong but we couldn't find the asset.
|
|
5904
5918
|
return Promise.resolve(null);
|
|
5905
5919
|
};
|
|
5906
|
-
return
|
|
5920
|
+
return _tryNextHelper();
|
|
5907
5921
|
}
|
|
5908
5922
|
|
|
5909
5923
|
/**
|
|
@@ -5957,6 +5971,7 @@ module.exports = ScratchStorage;
|
|
|
5957
5971
|
/*! no static exports found */
|
|
5958
5972
|
/***/ (function(module, exports, __webpack_require__) {
|
|
5959
5973
|
|
|
5974
|
+
var _readOnlyError = __webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "./node_modules/@babel/runtime/helpers/readOnlyError.js");
|
|
5960
5975
|
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
|
5961
5976
|
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
|
5962
5977
|
var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
|
@@ -6075,7 +6090,7 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6075
6090
|
tool = this.projectTool;
|
|
6076
6091
|
}
|
|
6077
6092
|
var storeIndex = 0;
|
|
6078
|
-
var
|
|
6093
|
+
var _tryNextSource = function tryNextSource(err) {
|
|
6079
6094
|
if (err) {
|
|
6080
6095
|
errors.push(err);
|
|
6081
6096
|
}
|
|
@@ -6086,15 +6101,15 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6086
6101
|
if (reqConfigFunction) {
|
|
6087
6102
|
var reqConfig = ensureRequestConfig(reqConfigFunction(asset));
|
|
6088
6103
|
if (reqConfig === false) {
|
|
6089
|
-
return
|
|
6104
|
+
return _tryNextSource();
|
|
6090
6105
|
}
|
|
6091
6106
|
return tool.get(reqConfig).then(function (body) {
|
|
6092
6107
|
if (body) {
|
|
6093
6108
|
asset.setData(body, dataFormat);
|
|
6094
6109
|
return asset;
|
|
6095
6110
|
}
|
|
6096
|
-
return
|
|
6097
|
-
}).catch(
|
|
6111
|
+
return _tryNextSource();
|
|
6112
|
+
}).catch(_tryNextSource);
|
|
6098
6113
|
} else if (errors.length > 0) {
|
|
6099
6114
|
return Promise.reject(errors);
|
|
6100
6115
|
}
|
|
@@ -6102,7 +6117,7 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6102
6117
|
// no stores matching asset
|
|
6103
6118
|
return Promise.resolve(null);
|
|
6104
6119
|
};
|
|
6105
|
-
return
|
|
6120
|
+
return _tryNextSource();
|
|
6106
6121
|
}
|
|
6107
6122
|
|
|
6108
6123
|
/**
|