files-sdk@2.4.1
Patch Changes
-
c9f4105:
softDelete()andversioning()can now be composed on one instance. Both plugins contributed arestoreextension, socreateFiles({ plugins: [softDelete(), versioning()] })threw an extension collision at construction (#157). The two restores are now namespaced to match the names the gateway,FilesClient, anduseFilesalready use:versioning():files.restore(key, versionId?)is nowfiles.restoreVersion(key, versionId?).softDelete():files.restore(key)is nowfiles.restoreTrashed(key).
versioning()also gains anignoreoption, a list of key prefixes that are never snapshotted. Pass the trash prefix when pairing the two plugins -versioning({ ignore: [".trash"] })- otherwise apurge()(a real delete of the trash key) is snapshotted into.versions/.trash/…, a copy nothing lists and nothing reclaims. Placeversioning()outermost so deletes are snapshotted before they’re trashed.