Registry / testing / reg-publish-s3-plugin

reg-publish-s3-plugin

JSON →
library0.14.4jsnpmunverified

A reg-suit plugin for fetching and publishing visual regression testing snapshot images to AWS S3. Current stable version is 0.14.4. It is part of the reg-suit ecosystem and is maintained by reg-viz. This plugin handles upload/download of snapshot artifacts to/from S3, with support for custom ACL, server-side encryption (SSE), KMS, custom domains, and path prefixes. It uses the AWS SDK v3 and integrates seamlessly with the reg-suit CLI via `reg-suit prepare -p publish-s3`. Key differentiators: S3-specific storage for visual regression reports, simple configuration, and support for standard S3 features.

npm install reg-publish-s3-plugin
INSTALL
IMPORT
SIG · REG-PUBLISH-S3-PLU
R
reg-publish-s3-plugin
testingjavascriptv0.14.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

S3PublisherPlugin
import { S3PublisherPlugin } from 'reg-publish-s3-plugin'
This plugin is designed to be used as a reg-suit plugin, not typically imported directly in user code.
default (config object)
import regPublishS3Plugin from 'reg-publish-s3-plugin'
The default export is a function that returns a plugin instance.
PluginConfig
import type { PluginConfig } from 'reg-publish-s3-plugin'
Type export for configuration object; use with TypeScript.

Install reg-suit and this plugin, then run prepare command to set up S3 configuration interactively.

npm i reg-suit reg-publish-s3-plugin --save-dev npx reg-suit prepare -p publish-s3 # Answer prompts to configure bucket name, etc. # Then run visual regression tests and reg-suit will use S3 for storing snapshots.
Debug
Known issues
gotchaThe plugin requires an S3 bucket with appropriate IAM permissions: s3:DeleteObject, s3:GetObject, s3:GetObjectAcl, s3:PutObject, s3:PutObjectAcl, s3:ListBucket. Missing permissions will cause silent failures or Access Denied errors.
fix
Attach a policy with the required actions to the role or user running reg-suit.
affects: >=0.0.0
deprecatedThe `acl` config option may be deprecated in favor of `enableACL` and explicit `acl` values. Using both simultaneously may cause conflicts.
fix
Set `enableACL` to false if you want to use bucket policies instead of ACLs.
affects: >=0.14.0
gotchaThe plugin uses AWS SDK v3. If your project uses AWS SDK v2, mixing versions can lead to dependency conflicts or missing credentials.
fix
Ensure only one version of AWS SDK is used. Use `sdkOptions` to pass v3 S3Client options.
affects: >=0.14.0
breakingStarting from v0.14.0, the plugin switched from `@aws-sdk/client-s3` v2 to v3. Configuration for credentials/region must be updated to v3 format.
fix
Update your `sdkOptions` to use v3 config (e.g., region as string, credentials object).
affects: >=0.14.0
Errors
Common errors & fixes
Error: Cannot find module '@aws-sdk/client-s3'
Missing dependency `@aws-sdk/client-s3`
fix
Run `npm install @aws-sdk/client-s3` or ensure it is in your package.json.
The specified bucket does not exist
S3 bucket name is incorrect or bucket is in different region.
fix
Verify bucket name spelling and ensure bucket exists in the same region as configured.
Access Denied when trying to put object
IAM role/user does not have s3:PutObject permission.
fix
Add s3:PutObject to the IAM policy attached to the execution role/user.
Upgrade
Version history
0.14.4latest on npm
Audit
Dependencies
reg-suit-corerequiredCore library for reg-suit plugins; provides interfaces and types
@aws-sdk/client-s3requiredAWS SDK v3 S3 client for API calls
Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
reg-publish-s3-plugin — npm install reg-publish-s3-plugin · libregistry