diff --git a/packages/publisher/s3/package.json b/packages/publisher/s3/package.json index 08b04bd2ee..a55064afda 100644 --- a/packages/publisher/s3/package.json +++ b/packages/publisher/s3/package.json @@ -5,8 +5,7 @@ "repository": "https://github.com/electron/forge", "author": "Samuel Attard", "license": "MIT", - "main": "dist/PublisherS3.js", - "typings": "dist/PublisherS3.d.ts", + "main": "dist/PublisherS3.ts", "devDependencies": { "chai": "^4.3.3", "mocha": "^9.0.1" diff --git a/packages/publisher/s3/src/Config.ts b/packages/publisher/s3/src/Config.ts index 52abd50a30..0428b67951 100644 --- a/packages/publisher/s3/src/Config.ts +++ b/packages/publisher/s3/src/Config.ts @@ -62,6 +62,13 @@ export interface PublisherS3Config { * Default: false */ s3ForcePathStyle?: boolean; + + /** + * Whether to calculate checksums for uploaded files (Fix for Cloudflare R2) + * + * Default: false + */ + s3RequestChecksumCalculation?: 'WHEN_SUPPORTED' | 'WHEN_REQUIRED'; /** * Custom function to provide the key to upload a given file to */ diff --git a/packages/publisher/s3/src/PublisherS3.ts b/packages/publisher/s3/src/PublisherS3.ts index d5994538ad..9e9964abc7 100644 --- a/packages/publisher/s3/src/PublisherS3.ts +++ b/packages/publisher/s3/src/PublisherS3.ts @@ -48,6 +48,7 @@ export default class PublisherS3 extends PublisherStatic { region: this.config.region, endpoint: this.config.endpoint, forcePathStyle: !!this.config.s3ForcePathStyle, + requestChecksumCalculation: this.config.s3RequestChecksumCalculation, }); d('creating s3 client with options:', this.config);