@travetto/model-s3 3.1.2 → 3.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-s3",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "S3 backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "s3",
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@aws-sdk/client-s3": "^3.272.0",
29
29
  "@aws-sdk/credential-provider-ini": "^3.218.0",
30
- "@travetto/config": "^3.1.1",
31
- "@travetto/model": "^3.1.2"
30
+ "@travetto/config": "^3.1.2",
31
+ "@travetto/model": "^3.1.5"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@travetto/command": "^3.1.1"
package/src/config.ts CHANGED
@@ -3,6 +3,7 @@ import type s3 from '@aws-sdk/client-s3';
3
3
 
4
4
  import { Config, EnvVar } from '@travetto/config';
5
5
  import { Field, Required } from '@travetto/schema';
6
+ import { GlobalEnv } from '@travetto/base';
6
7
 
7
8
  /**
8
9
  * S3 Support as an Asset Source
@@ -55,5 +56,10 @@ export class S3ModelConfig {
55
56
  secretAccessKey: this.secretAccessKey
56
57
  }
57
58
  };
59
+
60
+ // We are in localhost and not in prod, turn on forcePathStyle
61
+ if (!GlobalEnv.prod && this.endpoint.includes('localhost')) {
62
+ this.config.forcePathStyle ??= true;
63
+ }
58
64
  }
59
65
  }
@@ -8,7 +8,7 @@ try {
8
8
  mkdirSync(temp);
9
9
  } catch { }
10
10
 
11
- const version = 'latest';
11
+ const version = '2.0.1';
12
12
 
13
13
  export const service: CommandService = {
14
14
  name: 's3',
@@ -21,7 +21,7 @@ export const service: CommandService = {
21
21
  HOST_TMP_FOLDER: temp
22
22
  },
23
23
  volumes: {
24
- [temp]: '/tmp/localstack'
24
+ [temp]: '/var/lib/localstack'
25
25
  },
26
26
  ports: { 4566: 4566, 4571: 4571, 8080: 8080, 8081: 8081 },
27
27
  image: `localstack/localstack:${version}`