@travetto/model-s3 7.0.0-rc.2 → 7.0.0-rc.3
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 +1 -1
- package/package.json +4 -4
- package/src/config.ts +5 -1
- package/src/service.ts +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-s3",
|
|
3
|
-
"version": "7.0.0-rc.
|
|
3
|
+
"version": "7.0.0-rc.3",
|
|
4
4
|
"description": "S3 backing for the travetto model module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"s3",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"@aws-sdk/client-s3": "^3.940.0",
|
|
29
29
|
"@aws-sdk/credential-provider-ini": "^3.940.0",
|
|
30
30
|
"@aws-sdk/s3-request-presigner": "^3.940.0",
|
|
31
|
-
"@travetto/cli": "^7.0.0-rc.
|
|
32
|
-
"@travetto/config": "^7.0.0-rc.
|
|
33
|
-
"@travetto/model": "^7.0.0-rc.
|
|
31
|
+
"@travetto/cli": "^7.0.0-rc.3",
|
|
32
|
+
"@travetto/config": "^7.0.0-rc.3",
|
|
33
|
+
"@travetto/model": "^7.0.0-rc.3"
|
|
34
34
|
},
|
|
35
35
|
"travetto": {
|
|
36
36
|
"displayName": "S3 Model Support"
|
package/src/config.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class S3ModelConfig {
|
|
|
27
27
|
|
|
28
28
|
chunkSize = 5 * 2 ** 20; // Chunk size in bytes
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
modifyStorage?: boolean;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Provide host to bucket
|
|
@@ -40,6 +40,10 @@ export class S3ModelConfig {
|
|
|
40
40
|
* Produces the s3 config from the provide details, post construction
|
|
41
41
|
*/
|
|
42
42
|
async postConstruct(): Promise<void> {
|
|
43
|
+
if (!Runtime.production) {
|
|
44
|
+
this.endpoint ??= 'http://localhost:4566'; // From docker
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
if (!this.accessKeyId && !this.secretAccessKey) {
|
|
44
48
|
const creds = await fromIni({ profile: this.profile })();
|
|
45
49
|
this.accessKeyId = creds.accessKeyId;
|
package/src/service.ts
CHANGED
|
@@ -190,7 +190,7 @@ export class S3ModelService implements ModelCrudSupport, ModelBlobSupport, Model
|
|
|
190
190
|
}),
|
|
191
191
|
} : {})
|
|
192
192
|
});
|
|
193
|
-
ModelStorageUtil.
|
|
193
|
+
ModelStorageUtil.storageInitialization(this);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
async head<T extends ModelType>(cls: Class<T>, id: string): Promise<boolean> {
|