@travetto/model-s3 8.0.0-alpha.28 → 8.0.0-alpha.29
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/README.md +3 -3
- package/package.json +7 -7
- package/src/config.ts +3 -3
- package/src/service.ts +1 -1
package/README.md
CHANGED
|
@@ -90,9 +90,9 @@ export class S3ModelConfig {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
if (!this.accessKeyId && !this.secretAccessKey) {
|
|
93
|
-
const
|
|
94
|
-
this.accessKeyId =
|
|
95
|
-
this.secretAccessKey =
|
|
93
|
+
const credentials = await fromIni({ profile: this.profile })();
|
|
94
|
+
this.accessKeyId = credentials.accessKeyId;
|
|
95
|
+
this.secretAccessKey = credentials.secretAccessKey;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
this.config = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-s3",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "S3 backing for the travetto model module.",
|
|
6
6
|
"keywords": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"directory": "module/model-s3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aws-sdk/client-s3": "^3.
|
|
30
|
-
"@aws-sdk/credential-provider-ini": "^3.973.
|
|
31
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
32
|
-
"@travetto/config": "^8.0.0-alpha.
|
|
33
|
-
"@travetto/model": "^8.0.0-alpha.
|
|
29
|
+
"@aws-sdk/client-s3": "^3.1116.0",
|
|
30
|
+
"@aws-sdk/credential-provider-ini": "^3.973.15",
|
|
31
|
+
"@aws-sdk/s3-request-presigner": "^3.1116.0",
|
|
32
|
+
"@travetto/config": "^8.0.0-alpha.26",
|
|
33
|
+
"@travetto/model": "^8.0.0-alpha.27"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^8.0.0-alpha.
|
|
36
|
+
"@travetto/cli": "^8.0.0-alpha.32"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/cli": {
|
package/src/config.ts
CHANGED
|
@@ -58,9 +58,9 @@ export class S3ModelConfig {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
if (!this.accessKeyId && !this.secretAccessKey) {
|
|
61
|
-
const
|
|
62
|
-
this.accessKeyId =
|
|
63
|
-
this.secretAccessKey =
|
|
61
|
+
const credentials = await fromIni({ profile: this.profile })();
|
|
62
|
+
this.accessKeyId = credentials.accessKeyId;
|
|
63
|
+
this.secretAccessKey = credentials.secretAccessKey;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
this.config = {
|
package/src/service.ts
CHANGED
|
@@ -123,7 +123,7 @@ export class S3ModelService implements ModelCrudSupport, ModelBlobSupport, Model
|
|
|
123
123
|
const batchSize = options?.batchSizeHint ?? 100;
|
|
124
124
|
const maxCount = options?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
125
125
|
let produced = 0;
|
|
126
|
-
for (; !options?.abort?.aborted && produced < maxCount;
|
|
126
|
+
for (; !options?.abort?.aborted && produced < maxCount;) {
|
|
127
127
|
const items = await this.client.listObjects({
|
|
128
128
|
Bucket: this.config.bucket,
|
|
129
129
|
Prefix: cls ? this.#resolveKey(cls) : this.config.namespace,
|