@aws-amplify/predictions 4.0.30-custom-pk.97 → 4.0.30-custom-pk.98

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 CHANGED
@@ -3,209 +3,128 @@
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.0.46](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.45...@aws-amplify/predictions@4.0.46) (2022-07-21)
6
+ ## [4.0.51](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.50...@aws-amplify/predictions@4.0.51) (2022-08-23)
7
7
 
8
8
  **Note:** Version bump only for package @aws-amplify/predictions
9
9
 
10
+ ## [4.0.50](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.49...@aws-amplify/predictions@4.0.50) (2022-08-18)
10
11
 
12
+ **Note:** Version bump only for package @aws-amplify/predictions
11
13
 
12
-
13
-
14
- ## [4.0.45](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.44...@aws-amplify/predictions@4.0.45) (2022-07-07)
14
+ ## [4.0.49](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.48...@aws-amplify/predictions@4.0.49) (2022-08-16)
15
15
 
16
16
  **Note:** Version bump only for package @aws-amplify/predictions
17
17
 
18
+ ## [4.0.48](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.47...@aws-amplify/predictions@4.0.48) (2022-08-01)
18
19
 
20
+ **Note:** Version bump only for package @aws-amplify/predictions
19
21
 
22
+ ## [4.0.47](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.46...@aws-amplify/predictions@4.0.47) (2022-07-28)
20
23
 
24
+ **Note:** Version bump only for package @aws-amplify/predictions
21
25
 
22
- ## [4.0.44](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.43...@aws-amplify/predictions@4.0.44) (2022-06-18)
26
+ ## [4.0.46](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.45...@aws-amplify/predictions@4.0.46) (2022-07-21)
23
27
 
24
28
  **Note:** Version bump only for package @aws-amplify/predictions
25
29
 
30
+ ## [4.0.45](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.44...@aws-amplify/predictions@4.0.45) (2022-07-07)
26
31
 
32
+ **Note:** Version bump only for package @aws-amplify/predictions
27
33
 
34
+ ## [4.0.44](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.43...@aws-amplify/predictions@4.0.44) (2022-06-18)
28
35
 
36
+ **Note:** Version bump only for package @aws-amplify/predictions
29
37
 
30
38
  ## [4.0.43](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.42...@aws-amplify/predictions@4.0.43) (2022-06-15)
31
39
 
32
40
  **Note:** Version bump only for package @aws-amplify/predictions
33
41
 
34
-
35
-
36
-
37
-
38
42
  ## [4.0.42](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.41...@aws-amplify/predictions@4.0.42) (2022-05-24)
39
43
 
40
44
  **Note:** Version bump only for package @aws-amplify/predictions
41
45
 
42
-
43
-
44
-
45
-
46
46
  ## [4.0.41](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.40...@aws-amplify/predictions@4.0.41) (2022-05-23)
47
47
 
48
48
  **Note:** Version bump only for package @aws-amplify/predictions
49
49
 
50
-
51
-
52
-
53
-
54
50
  ## [4.0.40](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.39...@aws-amplify/predictions@4.0.40) (2022-05-12)
55
51
 
56
52
  **Note:** Version bump only for package @aws-amplify/predictions
57
53
 
58
-
59
-
60
-
61
-
62
54
  ## [4.0.39](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.38...@aws-amplify/predictions@4.0.39) (2022-05-03)
63
55
 
64
56
  **Note:** Version bump only for package @aws-amplify/predictions
65
57
 
66
-
67
-
68
-
69
-
70
58
  ## [4.0.38](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.37...@aws-amplify/predictions@4.0.38) (2022-04-14)
71
59
 
72
60
  **Note:** Version bump only for package @aws-amplify/predictions
73
61
 
74
-
75
-
76
-
77
-
78
62
  ## [4.0.37](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.36...@aws-amplify/predictions@4.0.37) (2022-04-04)
79
63
 
80
64
  **Note:** Version bump only for package @aws-amplify/predictions
81
65
 
82
-
83
-
84
-
85
-
86
66
  ## [4.0.36](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.35...@aws-amplify/predictions@4.0.36) (2022-03-28)
87
67
 
88
68
  **Note:** Version bump only for package @aws-amplify/predictions
89
69
 
90
-
91
-
92
-
93
-
94
70
  ## [4.0.35](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.34...@aws-amplify/predictions@4.0.35) (2022-03-22)
95
71
 
96
72
  **Note:** Version bump only for package @aws-amplify/predictions
97
73
 
98
-
99
-
100
-
101
-
102
74
  ## [4.0.34](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.33...@aws-amplify/predictions@4.0.34) (2022-03-10)
103
75
 
104
76
  **Note:** Version bump only for package @aws-amplify/predictions
105
77
 
106
-
107
-
108
-
109
-
110
78
  ## [4.0.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.32...@aws-amplify/predictions@4.0.33) (2022-02-28)
111
79
 
112
80
  **Note:** Version bump only for package @aws-amplify/predictions
113
81
 
114
-
115
-
116
-
117
-
118
82
  ## [4.0.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.31...@aws-amplify/predictions@4.0.32) (2022-02-03)
119
83
 
120
84
  **Note:** Version bump only for package @aws-amplify/predictions
121
85
 
122
-
123
-
124
-
125
-
126
86
  ## [4.0.31](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.30...@aws-amplify/predictions@4.0.31) (2022-01-27)
127
87
 
128
88
  **Note:** Version bump only for package @aws-amplify/predictions
129
89
 
130
-
131
-
132
-
133
-
134
90
  ## [4.0.30](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.29...@aws-amplify/predictions@4.0.30) (2022-01-07)
135
91
 
136
92
  **Note:** Version bump only for package @aws-amplify/predictions
137
93
 
138
-
139
-
140
-
141
-
142
94
  ## [4.0.29](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.28...@aws-amplify/predictions@4.0.29) (2021-12-16)
143
95
 
144
96
  **Note:** Version bump only for package @aws-amplify/predictions
145
97
 
146
-
147
-
148
-
149
-
150
98
  ## [4.0.28](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.27...@aws-amplify/predictions@4.0.28) (2021-12-03)
151
99
 
152
100
  **Note:** Version bump only for package @aws-amplify/predictions
153
101
 
154
-
155
-
156
-
157
-
158
102
  ## [4.0.27](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.26...@aws-amplify/predictions@4.0.27) (2021-12-02)
159
103
 
160
104
  **Note:** Version bump only for package @aws-amplify/predictions
161
105
 
162
-
163
-
164
-
165
-
166
106
  ## [4.0.26](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.25...@aws-amplify/predictions@4.0.26) (2021-11-18)
167
107
 
168
108
  **Note:** Version bump only for package @aws-amplify/predictions
169
109
 
170
-
171
-
172
-
173
-
174
110
  ## [4.0.25](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.24...@aws-amplify/predictions@4.0.25) (2021-11-16)
175
111
 
176
112
  **Note:** Version bump only for package @aws-amplify/predictions
177
113
 
178
-
179
-
180
-
181
-
182
114
  ## [4.0.24](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.23...@aws-amplify/predictions@4.0.24) (2021-11-12)
183
115
 
184
116
  **Note:** Version bump only for package @aws-amplify/predictions
185
117
 
186
-
187
-
188
-
189
-
190
118
  ## [4.0.23](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.22...@aws-amplify/predictions@4.0.23) (2021-11-09)
191
119
 
192
-
193
120
  ### Reverts
194
121
 
195
- * uuid dependency upgrade ([#9159](https://github.com/aws-amplify/amplify-js/issues/9159)) ([4ef8aa9](https://github.com/aws-amplify/amplify-js/commit/4ef8aa9c7c25dbe921fd02b6205b8defb93fbaec))
196
-
197
-
198
-
199
-
122
+ - uuid dependency upgrade ([#9159](https://github.com/aws-amplify/amplify-js/issues/9159)) ([4ef8aa9](https://github.com/aws-amplify/amplify-js/commit/4ef8aa9c7c25dbe921fd02b6205b8defb93fbaec))
200
123
 
201
124
  ## [4.0.22](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.21...@aws-amplify/predictions@4.0.22) (2021-10-28)
202
125
 
203
126
  **Note:** Version bump only for package @aws-amplify/predictions
204
127
 
205
-
206
-
207
-
208
-
209
128
  ## [4.0.21](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/predictions@4.0.20...@aws-amplify/predictions@4.0.21) (2021-10-21)
210
129
 
211
130
  **Note:** Version bump only for package @aws-amplify/predictions
@@ -95610,6 +95610,41 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
95610
95610
  };
95611
95611
  }
95612
95612
  };
95613
+
95614
+ var __read = undefined && undefined.__read || function (o, n) {
95615
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
95616
+ if (!m) return o;
95617
+ var i = m.call(o),
95618
+ r,
95619
+ ar = [],
95620
+ e;
95621
+
95622
+ try {
95623
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
95624
+ ar.push(r.value);
95625
+ }
95626
+ } catch (error) {
95627
+ e = {
95628
+ error: error
95629
+ };
95630
+ } finally {
95631
+ try {
95632
+ if (r && !r.done && (m = i["return"])) m.call(i);
95633
+ } finally {
95634
+ if (e) throw e.error;
95635
+ }
95636
+ }
95637
+
95638
+ return ar;
95639
+ };
95640
+
95641
+ var __spread = undefined && undefined.__spread || function () {
95642
+ for (var ar = [], i = 0; i < arguments.length; i++) {
95643
+ ar = ar.concat(__read(arguments[i]));
95644
+ }
95645
+
95646
+ return ar;
95647
+ };
95613
95648
  /*
95614
95649
  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
95615
95650
  *
@@ -96243,6 +96278,45 @@ function () {
96243
96278
  });
96244
96279
  });
96245
96280
  };
96281
+
96282
+ AWSS3Provider.prototype._list = function (params, opt, prefix) {
96283
+ return __awaiter(this, void 0, void 0, function () {
96284
+ var result, s3, listObjectsV2Command, response;
96285
+ return __generator(this, function (_a) {
96286
+ switch (_a.label) {
96287
+ case 0:
96288
+ result = {
96289
+ contents: [],
96290
+ nextToken: ''
96291
+ };
96292
+ s3 = this._createNewS3Client(opt);
96293
+ listObjectsV2Command = new _aws_sdk_client_s3__WEBPACK_IMPORTED_MODULE_1__["ListObjectsV2Command"](__assign({}, params));
96294
+ return [4
96295
+ /*yield*/
96296
+ , s3.send(listObjectsV2Command)];
96297
+
96298
+ case 1:
96299
+ response = _a.sent();
96300
+
96301
+ if (response && response.Contents) {
96302
+ result.contents = response.Contents.map(function (item) {
96303
+ return {
96304
+ key: item.Key.substr(prefix.length),
96305
+ eTag: item.ETag,
96306
+ lastModified: item.LastModified,
96307
+ size: item.Size
96308
+ };
96309
+ });
96310
+ result.nextToken = response.NextContinuationToken;
96311
+ }
96312
+
96313
+ return [2
96314
+ /*return*/
96315
+ , result];
96316
+ }
96317
+ });
96318
+ });
96319
+ };
96246
96320
  /**
96247
96321
  * List bucket objects relative to the level and prefix specified
96248
96322
  * @param {string} path - the path that contains objects
@@ -96254,7 +96328,7 @@ function () {
96254
96328
 
96255
96329
  AWSS3Provider.prototype.list = function (path, config) {
96256
96330
  return __awaiter(this, void 0, void 0, function () {
96257
- var credentialsOK, opt, bucket, track, maxKeys, prefix, final_path, s3, params, listObjectsCommand, response, list, error_5;
96331
+ var credentialsOK, opt, bucket, track, maxKeys, prefix, final_path, list, token, listResult, params, error_5;
96258
96332
  return __generator(this, function (_a) {
96259
96333
  switch (_a.label) {
96260
96334
  case 0:
@@ -96273,38 +96347,62 @@ function () {
96273
96347
  bucket = opt.bucket, track = opt.track, maxKeys = opt.maxKeys;
96274
96348
  prefix = this._prefix(opt);
96275
96349
  final_path = prefix + path;
96276
- s3 = this._createNewS3Client(opt);
96277
96350
  logger.debug('list ' + path + ' from ' + final_path);
96351
+ _a.label = 2;
96352
+
96353
+ case 2:
96354
+ _a.trys.push([2, 10,, 11]);
96355
+
96356
+ list = [];
96357
+ token = void 0;
96358
+ listResult = void 0;
96278
96359
  params = {
96279
96360
  Bucket: bucket,
96280
96361
  Prefix: final_path,
96281
- MaxKeys: maxKeys
96362
+ MaxKeys: 1000
96282
96363
  };
96283
- listObjectsCommand = new _aws_sdk_client_s3__WEBPACK_IMPORTED_MODULE_1__["ListObjectsCommand"](params);
96284
- _a.label = 2;
96285
-
96286
- case 2:
96287
- _a.trys.push([2, 4,, 5]);
96364
+ if (!(maxKeys === 'ALL')) return [3
96365
+ /*break*/
96366
+ , 7];
96367
+ _a.label = 3;
96288
96368
 
96369
+ case 3:
96370
+ params.ContinuationToken = token;
96371
+ params.MaxKeys = 1000;
96289
96372
  return [4
96290
96373
  /*yield*/
96291
- , s3.send(listObjectsCommand)];
96374
+ , this._list(params, opt, prefix)];
96292
96375
 
96293
- case 3:
96294
- response = _a.sent();
96295
- list = [];
96376
+ case 4:
96377
+ listResult = _a.sent();
96378
+ list.push.apply(list, __spread(listResult.contents));
96379
+ if (listResult.nextToken) token = listResult.nextToken;
96380
+ _a.label = 5;
96296
96381
 
96297
- if (response && response.Contents) {
96298
- list = response.Contents.map(function (item) {
96299
- return {
96300
- key: item.Key.substr(prefix.length),
96301
- eTag: item.ETag,
96302
- lastModified: item.LastModified,
96303
- size: item.Size
96304
- };
96305
- });
96306
- }
96382
+ case 5:
96383
+ if (listResult.nextToken) return [3
96384
+ /*break*/
96385
+ , 3];
96386
+ _a.label = 6;
96307
96387
 
96388
+ case 6:
96389
+ return [3
96390
+ /*break*/
96391
+ , 9];
96392
+
96393
+ case 7:
96394
+ maxKeys < 1000 || typeof maxKeys === 'string' ? params.MaxKeys = maxKeys : params.MaxKeys = 1000;
96395
+ return [4
96396
+ /*yield*/
96397
+ , this._list(params, opt, prefix)];
96398
+
96399
+ case 8:
96400
+ listResult = _a.sent();
96401
+ list.push.apply(list, __spread(listResult.contents));
96402
+ if (maxKeys > 1000) logger.warn("maxkeys can be from 0 - 1000 or 'ALL'. To list all files you can set maxKeys to 'ALL'.");
96403
+ _a.label = 9;
96404
+
96405
+ case 9:
96308
96406
  Object(_common_StorageUtils__WEBPACK_IMPORTED_MODULE_7__["dispatchStorageEvent"])(track, 'list', {
96309
96407
  method: 'list',
96310
96408
  result: 'success'
@@ -96314,7 +96412,7 @@ function () {
96314
96412
  /*return*/
96315
96413
  , list];
96316
96414
 
96317
- case 4:
96415
+ case 10:
96318
96416
  error_5 = _a.sent();
96319
96417
  logger.warn('list error', error_5);
96320
96418
  Object(_common_StorageUtils__WEBPACK_IMPORTED_MODULE_7__["dispatchStorageEvent"])(track, 'list', {
@@ -96323,7 +96421,7 @@ function () {
96323
96421
  }, null, "Listing items failed: " + error_5.message);
96324
96422
  throw error_5;
96325
96423
 
96326
- case 5:
96424
+ case 11:
96327
96425
  return [2
96328
96426
  /*return*/
96329
96427
  ];