feat: add DATASOURCE_S3_FORCE_PATH_STYLE (#658)

Co-authored-by: dicedtomato <35403473+diced@users.noreply.github.com>
This commit is contained in:
Creation's
2025-01-09 01:28:18 -05:00
committed by GitHub
parent d6ef09f5b3
commit c0311283a5
4 changed files with 6 additions and 0 deletions
+2
View File
@@ -156,6 +156,7 @@ export const PROP_TO_ENV = {
'datasource.s3.region': 'DATASOURCE_S3_REGION',
'datasource.s3.bucket': 'DATASOURCE_S3_BUCKET',
'datasource.s3.endpoint': 'DATASOURCE_S3_ENDPOINT',
'datasource.s3.forcePathStyle': 'DATASOURCE_S3_FORCE_PATH_STYLE',
'datasource.local.directory': 'DATASOURCE_LOCAL_DIRECTORY',
@@ -321,6 +322,7 @@ export function readEnv() {
env('datasource.s3.region', 'string'),
env('datasource.s3.bucket', 'string'),
env('datasource.s3.endpoint', 'string'),
env('datasource.s3.forcePathStyle', 'boolean'),
env('datasource.local.directory', 'string'),
+1
View File
@@ -109,6 +109,7 @@ export const schema = z.object({
region: z.string(),
bucket: z.string(),
endpoint: z.string().nullable().default(null),
forcePathStyle: z.boolean().default(false),
})
.optional(),
local: z
+2
View File
@@ -24,6 +24,7 @@ export class S3Datasource extends Datasource {
region?: string;
bucket: string;
endpoint?: string | null;
forcePathStyle?: boolean;
},
) {
super();
@@ -35,6 +36,7 @@ export class S3Datasource extends Datasource {
},
region: this.options.region ?? undefined,
endpoint: this.options.endpoint ?? undefined,
forcePathStyle: this.options.forcePathStyle ?? false,
});
this.ensureBucketExists();
+1
View File
@@ -27,6 +27,7 @@ function getDatasource(conf?: typeof config): void {
region: config.datasource.s3?.region,
bucket: config.datasource.s3!.bucket,
endpoint: config.datasource.s3?.endpoint,
forcePathStyle: config.datasource.s3?.forcePathStyle,
});
break;
default: