Overview
@saflib/vendors-gcs implements ObjectStore against Google Cloud Storage.
What this package provides
GcsObjectStore— upload, list, read, and delete with path traversal checkscreateGcsObjectStore({ bucketName })— factory; returnsTestObjectStorewhenNODE_ENV=testconfigureGcsClient(options)/getStorage()— shared GCS client; optional explicit credentials or Application Default Credentials
Integration
Wire createGcsObjectStore({ bucketName }) in production service bootstrap and pass the instance through service context (backup restore, file uploads, etc.).
Credentials:
- Call
configureGcsClient()with service-account options from your secret store, or - Rely on Application Default Credentials (
GOOGLE_APPLICATION_CREDENTIALSor GCE/GKE metadata)
Local development typically uses DiskObjectStore via createObjectStore({ type: "disk", rootPath }).
Azure Blob Storage alternative: @saflib/vendors-azure.