- Removed
await-to-js
dependency in local storage adapter
- Added
ConfigAmazonS3
,ConfigBackblazeB2
,ConfigGoogleCloud
andConfigLocal
to exported types - Removed
await-to-js
dependency
- Added
AdapterConfig
to exported types
- Changed the name of the 'functional classes' from Storage to Adapter, e.g.
StorageAmazonS3
becameAdapterAmazonS3
- Replaced
introspect()
bygetConfiguration():AdapterConfig
andgetType():string
- Added adapter class for BackBlaze B2
- Made configuration more generic and extensible
- Removed option to create a new Storage without configuration (StorageLocal)
- Added default storage options that can be overruled or extended by the config object or url
- Made slugify optional and turned it off by default for StorageLocal
- Added API method
fileExists():Promise<boolean>
- In the configuration object or string non-existent keys or invalid values are no longer filtered out: it is the programmer's responsibility to provide valid options
- If no bucket name is provided the bucket name will always be an empty string "", not
undefined
ornull
. Also when no bucket is selectedbucketName
will be "". - Adapter modules are only loaded when needed (using
require
) - Removed options from both configuration and adapters.
- Formalized return values
- Removed sloppy code: parsing and validation of configuration is now done in one place.
- Removed jasmine-ts dependency
- Removed
getFileByteRangeAsReadable
and merged the functionality ingetFileAsReadable
by adding a range parameter{start: number, end: number}
- Removed the option to instantiate a specific storage type directly; all instantiating must be done with
new Storage(config)
. - Optimized
getFileAsReadable
for Google Cloud. - Implemented
addFileFromReadable
, fixes issue#2 - Added configuration urls: all configuration options in a single string.
- When creating a local storage without specifying a directory, the directory where the process runs will be used (in earlier versions the os' tmp folder was used)
- When creating a local storage without specifying a bucket name, a directory named
local-bucket
will be created and used as selected bucket. - When using
new Storage()
without configuration you create a local storage instance with the default configuration (as described in the 2 bullets above). - Updated documentation.
- Updated dependency version.
- Added yarn.lock.
- Renamed 'functional classes' to 'adapter classes'
(Pull request #3)[tweedegolf#3]
- Implemented
sizeOf
,getFileByteRangeAsReadable
- Improved AWS performance
(Pull request #1)[tweedegolf#1]
- Expanded the S3 configuration options