'use strict' ; import { StorageProvider } from '@smcloudstore/core/dist/StorageProvider' ; const SMCloudStore = { param provider param connection returns Create : ( provider , connection ) : StorageProvider => { const supportedProviders = SMCloudStore . Providers ( ) ; if ( ! provider || typeof provider !== 'string' || supportedProviders . indexOf ( provider ) < 0 ) { throw Error ( 'The specified provider is not valid. Valid providers inlcude: ' + supportedProviders . join ( ', ' ) ) ; } if ( ! connection ) { throw Error ( 'The connection argument must be non-empty' ) ; } const providerModule = require ( '@smcloudstore/' + provider ) ; return new providerModule ( connection ) ; } , returns Providers : ( ) : string [ ] => { return [ 'aws-s3' , 'azure-storage' , 'backblaze-b2' , 'generic-s3' , 'google-cloud-storage' , 'minio' ] ; } } ; export = SMCloudStore ;