@travetto/model-s3 7.0.0-rc.3 → 7.0.0-rc.4

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 CHANGED
@@ -73,6 +73,13 @@ export class S3ModelConfig {
73
73
  * Produces the s3 config from the provide details, post construction
74
74
  */
75
75
  async postConstruct(): Promise<void> {
76
+ if (!Runtime.production) {
77
+ this.endpoint ??= 'http://localhost:4566'; // From docker
78
+ if (this.endpoint.includes('localhost')) {
79
+ this.config.forcePathStyle ??= true;
80
+ }
81
+ }
82
+
76
83
  if (!this.accessKeyId && !this.secretAccessKey) {
77
84
  const creds = await fromIni({ profile: this.profile })();
78
85
  this.accessKeyId = creds.accessKeyId;
@@ -88,11 +95,6 @@ export class S3ModelConfig {
88
95
  secretAccessKey: this.secretAccessKey
89
96
  }
90
97
  };
91
-
92
- // We are in localhost and not in prod, turn on forcePathStyle
93
- if (!Runtime.production && this.endpoint.includes('localhost')) {
94
- this.config.forcePathStyle ??= true;
95
- }
96
98
  }
97
99
  }
98
100
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-s3",
3
- "version": "7.0.0-rc.3",
3
+ "version": "7.0.0-rc.4",
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.3",
32
- "@travetto/config": "^7.0.0-rc.3",
33
- "@travetto/model": "^7.0.0-rc.3"
31
+ "@travetto/cli": "^7.0.0-rc.4",
32
+ "@travetto/config": "^7.0.0-rc.4",
33
+ "@travetto/model": "^7.0.0-rc.4"
34
34
  },
35
35
  "travetto": {
36
36
  "displayName": "S3 Model Support"
package/src/config.ts CHANGED
@@ -42,6 +42,9 @@ export class S3ModelConfig {
42
42
  async postConstruct(): Promise<void> {
43
43
  if (!Runtime.production) {
44
44
  this.endpoint ??= 'http://localhost:4566'; // From docker
45
+ if (this.endpoint.includes('localhost')) {
46
+ this.config.forcePathStyle ??= true;
47
+ }
45
48
  }
46
49
 
47
50
  if (!this.accessKeyId && !this.secretAccessKey) {
@@ -59,10 +62,5 @@ export class S3ModelConfig {
59
62
  secretAccessKey: this.secretAccessKey
60
63
  }
61
64
  };
62
-
63
- // We are in localhost and not in prod, turn on forcePathStyle
64
- if (!Runtime.production && this.endpoint.includes('localhost')) {
65
- this.config.forcePathStyle ??= true;
66
- }
67
65
  }
68
66
  }