Registry / storage / reg-publish-gcs-plugin

reg-publish-gcs-plugin

JSON →
library0.14.4jsnpmunverified

Publish snapshot images to Google Cloud Storage as part of the reg-suit visual regression testing framework. This plugin (v0.14.4) handles uploading and fetching snapshot images from GCS buckets. It integrates with reg-suit's prepare command and uses Google Application Default Credentials for authentication. The plugin is part of the reg-suit ecosystem and is maintained by reg-viz. Key differentiator: seamless integration with reg-suit for visual regression workflows.

npm install reg-publish-gcs-plugin
INSTALL
IMPORT
SIG · REG-PUBLISH-GCS-PL
R
reg-publish-gcs-plugin
storagejavascriptv0.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.

plugin
import { Plugin } from 'reg-publish-gcs-plugin'
const Plugin = require('reg-publish-gcs-plugin')
Plugin is a named export, not default.
PluginConfig
import { PluginConfig } from 'reg-publish-gcs-plugin'
TypeScript interface for plugin configuration.
default
import pkg from 'reg-publish-gcs-plugin'
import { default } from 'reg-publish-gcs-plugin'
Default import accesses the module's default export; named export 'default' is invalid.

Demonstrates how to configure the plugin with a GCS bucket and pathPrefix in reg-suit config.

// Install: npm i reg-publish-gcs-plugin -D // In reg-suit configuration file (e.g., regconfig.json or regconfig.js) // Use the plugin after running `reg-suit prepare -p publish-gcs` // Example setup in a reg-suit config: { "plugins": { "reg-publish-gcs-plugin": { "bucketName": "my-visual-regression-bucket", "pathPrefix": "snapshots" } } } // Authentication is handled via Application Default Credentials. // On CI, set GOOGLE_APPLICATION_CREDENTIALS environment variable to the service account key file path.
Debug
Known issues
breakingGoogle Cloud Storage authentication requires Application Default Credentials (ADC) set up. Without ADC, the plugin fails with permission errors.
fix
Follow GCP ADC setup: https://cloud.google.com/docs/authentication/production
affects: >=0.1.0
gotchaThe bucket name is required and must be globally unique across GCP.
fix
Verify bucket existence and permissions.
affects: >=0.1.0
deprecatedOlder versions (pre-0.10.0) used a different configuration structure for customUri and pathPrefix.
fix
Upgrade to latest and use current config format.
affects: >=0.1.0 <0.10.0
gotchaThe plugin publishes snapshot images to GCS; ensure the bucket lifecycle policy does not delete images prematurely.
fix
Set appropriate lifecycle rules or use versioning.
affects: >=0.1.0
breakingNode.js 10+ required; older Node.js versions may cause runtime errors.
fix
Use Node.js 10 or later.
affects: >=0.12.0
Errors
Common errors & fixes
Error: EACCES: permission denied, open '/path/to/service-account-key.json'
Service account key file not accessible or missing.
fix
Ensure the key file path is correct and has read permissions.
Error: Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.
Application Default Credentials not configured.
fix
Set GOOGLE_APPLICATION_CREDENTIALS environment variable or use a service account in GCP environment.
The bucket you are attempting to access must be addressed using the specified hostname.
Custom hostname mismatch with bucket location (e.g., multi-region vs regional).
fix
Use the correct bucket hostname or omit customUri.
Error: Bucket name 'my-bucket' is not in a valid GCS bucket name format.
Bucket name contains invalid characters or pattern (e.g., underscores).
fix
Use lowercase letters, numbers, hyphens, and dots only (no underscores).
Upgrade
Version history
0.14.4latest on npm
Audit
Dependencies
reg-suitrequiredCore framework for visual regression testing
@google-cloud/storagerequiredGCS client library for interacting with buckets
Agent activity
25 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
reg-publish-gcs-plugin — npm install reg-publish-gcs-plugin · libregistry