@aws-amplify/storage 4.5.7-legacy-ui.10 → 4.5.7-sideEffects-storage.14
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 +8 -0
- package/dist/aws-amplify-storage.js +49 -61
- package/dist/aws-amplify-storage.js.map +1 -1
- package/dist/aws-amplify-storage.min.js +1 -1
- package/dist/aws-amplify-storage.min.js.map +1 -1
- package/lib/Storage.d.ts +1 -0
- package/lib/Storage.js +29 -0
- package/lib/Storage.js.map +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/index.js +2 -39
- package/lib/index.js.map +1 -1
- package/lib-esm/Storage.d.ts +1 -0
- package/lib-esm/Storage.js +30 -1
- package/lib-esm/Storage.js.map +1 -1
- package/lib-esm/index.d.ts +3 -4
- package/lib-esm/index.js +3 -41
- package/lib-esm/index.js.map +1 -1
- package/package.json +6 -6
- package/src/Storage.ts +37 -1
- package/src/index.ts +3 -40
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.5.8](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.5.6...@aws-amplify/storage@4.5.8) (2022-09-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-amplify/storage
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [4.5.7](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/storage@4.5.6...@aws-amplify/storage@4.5.7) (2022-09-20)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aws-amplify/storage
|
|
@@ -47956,12 +47956,13 @@ module.exports = g;
|
|
|
47956
47956
|
/*!****************************!*\
|
|
47957
47957
|
!*** ./lib-esm/Storage.js ***!
|
|
47958
47958
|
\****************************/
|
|
47959
|
-
/*! exports provided: Storage, default */
|
|
47959
|
+
/*! exports provided: Storage, StorageInstance, default */
|
|
47960
47960
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
47961
47961
|
|
|
47962
47962
|
"use strict";
|
|
47963
47963
|
__webpack_require__.r(__webpack_exports__);
|
|
47964
47964
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Storage", function() { return Storage; });
|
|
47965
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StorageInstance", function() { return StorageInstance; });
|
|
47965
47966
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
47966
47967
|
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
47967
47968
|
/* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./providers */ "./lib-esm/providers/index.js");
|
|
@@ -48028,6 +48029,8 @@ var __read = undefined && undefined.__read || function (o, n) {
|
|
|
48028
48029
|
|
|
48029
48030
|
|
|
48030
48031
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('StorageClass');
|
|
48032
|
+
var loggerStorageInstance = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('Storage'); // Logging relating to Storage instance management
|
|
48033
|
+
|
|
48031
48034
|
var DEFAULT_PROVIDER = 'AWSS3';
|
|
48032
48035
|
/**
|
|
48033
48036
|
* Provide storage methods to use AWS S3
|
|
@@ -48290,6 +48293,45 @@ function () {
|
|
|
48290
48293
|
}();
|
|
48291
48294
|
|
|
48292
48295
|
|
|
48296
|
+
/**
|
|
48297
|
+
* Configure & register Storage singleton instance.
|
|
48298
|
+
*/
|
|
48299
|
+
|
|
48300
|
+
var _instance = null;
|
|
48301
|
+
|
|
48302
|
+
var getInstance = function getInstance() {
|
|
48303
|
+
if (_instance) {
|
|
48304
|
+
return _instance;
|
|
48305
|
+
}
|
|
48306
|
+
|
|
48307
|
+
loggerStorageInstance.debug('Create Storage Instance, debug');
|
|
48308
|
+
_instance = new Storage();
|
|
48309
|
+
_instance.vault = new Storage();
|
|
48310
|
+
var old_configure = _instance.configure;
|
|
48311
|
+
|
|
48312
|
+
_instance.configure = function (options) {
|
|
48313
|
+
loggerStorageInstance.debug('storage configure called');
|
|
48314
|
+
|
|
48315
|
+
var vaultConfig = __assign({}, old_configure.call(_instance, options)); // set level private for each provider for the vault
|
|
48316
|
+
|
|
48317
|
+
|
|
48318
|
+
Object.keys(vaultConfig).forEach(function (providerName) {
|
|
48319
|
+
if (typeof vaultConfig[providerName] !== 'string') {
|
|
48320
|
+
vaultConfig[providerName] = __assign(__assign({}, vaultConfig[providerName]), {
|
|
48321
|
+
level: 'private'
|
|
48322
|
+
});
|
|
48323
|
+
}
|
|
48324
|
+
});
|
|
48325
|
+
loggerStorageInstance.debug('storage vault configure called');
|
|
48326
|
+
|
|
48327
|
+
_instance.vault.configure(vaultConfig);
|
|
48328
|
+
};
|
|
48329
|
+
|
|
48330
|
+
return _instance;
|
|
48331
|
+
};
|
|
48332
|
+
|
|
48333
|
+
var StorageInstance = getInstance();
|
|
48334
|
+
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["Amplify"].register(StorageInstance);
|
|
48293
48335
|
/**
|
|
48294
48336
|
* @deprecated use named import
|
|
48295
48337
|
*/
|
|
@@ -48793,19 +48835,18 @@ var isArrayBuffer = function isArrayBuffer(x) {
|
|
|
48793
48835
|
/*!**************************!*\
|
|
48794
48836
|
!*** ./lib-esm/index.js ***!
|
|
48795
48837
|
\**************************/
|
|
48796
|
-
/*! exports provided:
|
|
48838
|
+
/*! exports provided: default, StorageClass, Storage, AWSS3Provider */
|
|
48797
48839
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
48798
48840
|
|
|
48799
48841
|
"use strict";
|
|
48800
48842
|
__webpack_require__.r(__webpack_exports__);
|
|
48801
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Storage", function() { return Storage; });
|
|
48802
48843
|
/* harmony import */ var _Storage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Storage */ "./lib-esm/Storage.js");
|
|
48803
48844
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StorageClass", function() { return _Storage__WEBPACK_IMPORTED_MODULE_0__["Storage"]; });
|
|
48804
48845
|
|
|
48805
|
-
/* harmony
|
|
48806
|
-
|
|
48807
|
-
/* harmony import */ var
|
|
48808
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSS3Provider", function() { return
|
|
48846
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Storage", function() { return _Storage__WEBPACK_IMPORTED_MODULE_0__["StorageInstance"]; });
|
|
48847
|
+
|
|
48848
|
+
/* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./providers */ "./lib-esm/providers/index.js");
|
|
48849
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AWSS3Provider", function() { return _providers__WEBPACK_IMPORTED_MODULE_1__["AWSS3Provider"]; });
|
|
48809
48850
|
|
|
48810
48851
|
/*
|
|
48811
48852
|
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -48819,65 +48860,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48819
48860
|
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
|
|
48820
48861
|
* and limitations under the License.
|
|
48821
48862
|
*/
|
|
48822
|
-
var __assign = undefined && undefined.__assign || function () {
|
|
48823
|
-
__assign = Object.assign || function (t) {
|
|
48824
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
48825
|
-
s = arguments[i];
|
|
48826
48863
|
|
|
48827
|
-
for (var p in s) {
|
|
48828
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
48829
|
-
}
|
|
48830
|
-
}
|
|
48831
|
-
|
|
48832
|
-
return t;
|
|
48833
|
-
};
|
|
48834
|
-
|
|
48835
|
-
return __assign.apply(this, arguments);
|
|
48836
|
-
};
|
|
48837
|
-
|
|
48838
|
-
|
|
48839
|
-
|
|
48840
|
-
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('Storage');
|
|
48841
|
-
var _instance = null;
|
|
48842
|
-
|
|
48843
|
-
var getInstance = function getInstance() {
|
|
48844
|
-
if (_instance) {
|
|
48845
|
-
return _instance;
|
|
48846
|
-
}
|
|
48847
|
-
|
|
48848
|
-
logger.debug('Create Storage Instance, debug');
|
|
48849
|
-
_instance = new _Storage__WEBPACK_IMPORTED_MODULE_0__["Storage"]();
|
|
48850
|
-
_instance.vault = new _Storage__WEBPACK_IMPORTED_MODULE_0__["Storage"]();
|
|
48851
|
-
var old_configure = _instance.configure;
|
|
48852
|
-
|
|
48853
|
-
_instance.configure = function (options) {
|
|
48854
|
-
logger.debug('storage configure called');
|
|
48855
|
-
|
|
48856
|
-
var vaultConfig = __assign({}, old_configure.call(_instance, options)); // set level private for each provider for the vault
|
|
48857
|
-
|
|
48858
|
-
|
|
48859
|
-
Object.keys(vaultConfig).forEach(function (providerName) {
|
|
48860
|
-
if (typeof vaultConfig[providerName] !== 'string') {
|
|
48861
|
-
vaultConfig[providerName] = __assign(__assign({}, vaultConfig[providerName]), {
|
|
48862
|
-
level: 'private'
|
|
48863
|
-
});
|
|
48864
|
-
}
|
|
48865
|
-
});
|
|
48866
|
-
logger.debug('storage vault configure called');
|
|
48867
|
-
|
|
48868
|
-
_instance.vault.configure(vaultConfig);
|
|
48869
|
-
};
|
|
48870
|
-
|
|
48871
|
-
return _instance;
|
|
48872
|
-
};
|
|
48873
|
-
|
|
48874
|
-
var Storage = getInstance();
|
|
48875
|
-
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(Storage);
|
|
48876
48864
|
/**
|
|
48877
48865
|
* @deprecated use named import
|
|
48878
48866
|
*/
|
|
48879
48867
|
|
|
48880
|
-
/* harmony default export */ __webpack_exports__["default"] = (
|
|
48868
|
+
/* harmony default export */ __webpack_exports__["default"] = (_Storage__WEBPACK_IMPORTED_MODULE_0__["StorageInstance"]);
|
|
48881
48869
|
|
|
48882
48870
|
|
|
48883
48871
|
|