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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.196](https://github.com/scratchfoundation/scratch-storage/compare/v2.3.195...v2.3.196) (2024-07-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **deps:** lock file maintenance ([9ecedf1](https://github.com/scratchfoundation/scratch-storage/commit/9ecedf1645a1ff6f5245ea1936910107d996503b))
|
|
12
|
+
|
|
13
|
+
## [2.3.195](https://github.com/scratchfoundation/scratch-storage/compare/v2.3.194...v2.3.195) (2024-07-27)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **deps:** lock file maintenance ([712f258](https://github.com/scratchfoundation/scratch-storage/commit/712f2581d05ffc128153a0f1bb729810875043b2))
|
|
19
|
+
|
|
6
20
|
## [2.3.194](https://github.com/scratchfoundation/scratch-storage/compare/v2.3.193...v2.3.194) (2024-07-26)
|
|
7
21
|
|
|
8
22
|
|
|
@@ -322,6 +322,20 @@ module.exports = _possibleConstructorReturn, module.exports.__esModule = true, m
|
|
|
322
322
|
|
|
323
323
|
/***/ }),
|
|
324
324
|
|
|
325
|
+
/***/ "./node_modules/@babel/runtime/helpers/readOnlyError.js":
|
|
326
|
+
/*!**************************************************************!*\
|
|
327
|
+
!*** ./node_modules/@babel/runtime/helpers/readOnlyError.js ***!
|
|
328
|
+
\**************************************************************/
|
|
329
|
+
/*! no static exports found */
|
|
330
|
+
/***/ (function(module, exports) {
|
|
331
|
+
|
|
332
|
+
function _readOnlyError(r) {
|
|
333
|
+
throw new TypeError('"' + r + '" is read-only');
|
|
334
|
+
}
|
|
335
|
+
module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
336
|
+
|
|
337
|
+
/***/ }),
|
|
338
|
+
|
|
325
339
|
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
|
326
340
|
/*!***************************************************************!*\
|
|
327
341
|
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
|
@@ -6290,17 +6304,17 @@ var ProxyTool = /*#__PURE__*/function () {
|
|
|
6290
6304
|
value: function get(reqConfig) {
|
|
6291
6305
|
var _this = this;
|
|
6292
6306
|
var toolIndex = 0;
|
|
6293
|
-
var
|
|
6307
|
+
var _nextTool = function nextTool(err) {
|
|
6294
6308
|
var tool = _this.tools[toolIndex++];
|
|
6295
6309
|
if (!tool) {
|
|
6296
6310
|
throw err;
|
|
6297
6311
|
}
|
|
6298
6312
|
if (!tool.isGetSupported) {
|
|
6299
|
-
return
|
|
6313
|
+
return _nextTool(err);
|
|
6300
6314
|
}
|
|
6301
|
-
return tool.get(reqConfig).catch(
|
|
6315
|
+
return tool.get(reqConfig).catch(_nextTool);
|
|
6302
6316
|
};
|
|
6303
|
-
return
|
|
6317
|
+
return _nextTool();
|
|
6304
6318
|
}
|
|
6305
6319
|
|
|
6306
6320
|
/**
|
|
@@ -6325,17 +6339,17 @@ var ProxyTool = /*#__PURE__*/function () {
|
|
|
6325
6339
|
value: function send(reqConfig) {
|
|
6326
6340
|
var _this2 = this;
|
|
6327
6341
|
var toolIndex = 0;
|
|
6328
|
-
var
|
|
6342
|
+
var _nextTool2 = function nextTool(err) {
|
|
6329
6343
|
var tool = _this2.tools[toolIndex++];
|
|
6330
6344
|
if (!tool) {
|
|
6331
6345
|
throw err;
|
|
6332
6346
|
}
|
|
6333
6347
|
if (!tool.isSendSupported) {
|
|
6334
|
-
return
|
|
6348
|
+
return _nextTool2(err);
|
|
6335
6349
|
}
|
|
6336
|
-
return tool.send(reqConfig).catch(
|
|
6350
|
+
return tool.send(reqConfig).catch(_nextTool2);
|
|
6337
6351
|
};
|
|
6338
|
-
return
|
|
6352
|
+
return _nextTool2();
|
|
6339
6353
|
}
|
|
6340
6354
|
}]);
|
|
6341
6355
|
}();
|
|
@@ -6574,7 +6588,7 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
6574
6588
|
dataFormat = dataFormat || assetType.runtimeFormat;
|
|
6575
6589
|
var helperIndex = 0;
|
|
6576
6590
|
var helper;
|
|
6577
|
-
var
|
|
6591
|
+
var _tryNextHelper = function tryNextHelper(err) {
|
|
6578
6592
|
if (err) {
|
|
6579
6593
|
// Track the error, but continue looking
|
|
6580
6594
|
errors.push(err);
|
|
@@ -6583,12 +6597,12 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
6583
6597
|
if (helper) {
|
|
6584
6598
|
var loading = helper.load(assetType, assetId, dataFormat);
|
|
6585
6599
|
if (loading === null) {
|
|
6586
|
-
return
|
|
6600
|
+
return _tryNextHelper();
|
|
6587
6601
|
}
|
|
6588
6602
|
// Note that other attempts may have logged errors; if this succeeds they will be suppressed.
|
|
6589
6603
|
return loading
|
|
6590
6604
|
// TODO: maybe some types of error should prevent trying the next helper?
|
|
6591
|
-
.catch(
|
|
6605
|
+
.catch(_tryNextHelper);
|
|
6592
6606
|
} else if (errors.length > 0) {
|
|
6593
6607
|
// We looked through all the helpers and couldn't find the asset, AND
|
|
6594
6608
|
// at least one thing went wrong while we were looking.
|
|
@@ -6598,7 +6612,7 @@ var ScratchStorage = /*#__PURE__*/function () {
|
|
|
6598
6612
|
// Nothing went wrong but we couldn't find the asset.
|
|
6599
6613
|
return Promise.resolve(null);
|
|
6600
6614
|
};
|
|
6601
|
-
return
|
|
6615
|
+
return _tryNextHelper();
|
|
6602
6616
|
}
|
|
6603
6617
|
|
|
6604
6618
|
/**
|
|
@@ -6652,6 +6666,7 @@ module.exports = ScratchStorage;
|
|
|
6652
6666
|
/*! no static exports found */
|
|
6653
6667
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6654
6668
|
|
|
6669
|
+
var _readOnlyError = __webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "./node_modules/@babel/runtime/helpers/readOnlyError.js");
|
|
6655
6670
|
var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
|
6656
6671
|
var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
|
6657
6672
|
var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
|
@@ -6770,7 +6785,7 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6770
6785
|
tool = this.projectTool;
|
|
6771
6786
|
}
|
|
6772
6787
|
var storeIndex = 0;
|
|
6773
|
-
var
|
|
6788
|
+
var _tryNextSource = function tryNextSource(err) {
|
|
6774
6789
|
if (err) {
|
|
6775
6790
|
errors.push(err);
|
|
6776
6791
|
}
|
|
@@ -6781,15 +6796,15 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6781
6796
|
if (reqConfigFunction) {
|
|
6782
6797
|
var reqConfig = ensureRequestConfig(reqConfigFunction(asset));
|
|
6783
6798
|
if (reqConfig === false) {
|
|
6784
|
-
return
|
|
6799
|
+
return _tryNextSource();
|
|
6785
6800
|
}
|
|
6786
6801
|
return tool.get(reqConfig).then(function (body) {
|
|
6787
6802
|
if (body) {
|
|
6788
6803
|
asset.setData(body, dataFormat);
|
|
6789
6804
|
return asset;
|
|
6790
6805
|
}
|
|
6791
|
-
return
|
|
6792
|
-
}).catch(
|
|
6806
|
+
return _tryNextSource();
|
|
6807
|
+
}).catch(_tryNextSource);
|
|
6793
6808
|
} else if (errors.length > 0) {
|
|
6794
6809
|
return Promise.reject(errors);
|
|
6795
6810
|
}
|
|
@@ -6797,7 +6812,7 @@ var WebHelper = /*#__PURE__*/function (_Helper) {
|
|
|
6797
6812
|
// no stores matching asset
|
|
6798
6813
|
return Promise.resolve(null);
|
|
6799
6814
|
};
|
|
6800
|
-
return
|
|
6815
|
+
return _tryNextSource();
|
|
6801
6816
|
}
|
|
6802
6817
|
|
|
6803
6818
|
/**
|